Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Mar 1999 01:42:58 -0500 (EST)
From:      "John S. Dyson" <dyson@iquest.net>
To:        dillon@apollo.backplane.com (Matthew Dillon)
Cc:        luoqi@watermarkgroup.com, current@FreeBSD.ORG
Subject:   Re: VM86 assembly code problem
Message-ID:  <199903170642.BAA03109@y.dyson.net>
In-Reply-To: <199903170528.VAA24119@apollo.backplane.com> from Matthew Dillon at "Mar 16, 99 09:28:47 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon said:
> :There're a couple of places in swtch.s where code looks like this,
> :
> :#ifdef VM86
> :        btrl    %esi, _private_tss
> :        je      3f
> :	...
> :3:
> :#endif
> :
> :The conditional jump statement doesn't seem right, according to manual,
> :btrl instruction modifies CF flag but not Z, so the jump should be jae/jb
> :instead of je/jne. Could anyone confirm this?
> :
> :-lq
> 
>     btrl only effects the Carry.  The VM86 code looks wrong to me, though
>     there is an outside chance that it is doing a conditional jump based
>     on something that occured prior to the btrl.
> 
Even though you are correct in practice, the Intel Architecture Software
developer's manual #2 says that the ZF is undefined, not that it is
unchanged.  In fact, the above code sequence is incorrect "by the book."

-- 
John                  | Never try to teach a pig to sing,
dyson@iquest.net      | it makes one look stupid
jdyson@nc.com         | and it irritates the pig.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903170642.BAA03109>