From owner-freebsd-current Tue Mar 16 22:43:26 1999 Delivered-To: freebsd-current@freebsd.org Received: from iquest3.iquest.net (iquest3.iquest.net [209.43.20.203]) by hub.freebsd.org (Postfix) with SMTP id BA7E315244 for ; Tue, 16 Mar 1999 22:43:24 -0800 (PST) (envelope-from toor@y.dyson.net) Received: (qmail 1455 invoked from network); 17 Mar 1999 06:43:04 -0000 Received: from dyson.iquest.net (HELO y.dyson.net) (198.70.144.127) by iquest3.iquest.net with SMTP; 17 Mar 1999 06:43:04 -0000 Received: (from toor@localhost) by y.dyson.net (8.9.3/8.9.1) id BAA03109; Wed, 17 Mar 1999 01:42:58 -0500 (EST) Message-Id: <199903170642.BAA03109@y.dyson.net> Subject: Re: VM86 assembly code problem In-Reply-To: <199903170528.VAA24119@apollo.backplane.com> from Matthew Dillon at "Mar 16, 99 09:28:47 pm" To: dillon@apollo.backplane.com (Matthew Dillon) Date: Wed, 17 Mar 1999 01:42:58 -0500 (EST) Cc: luoqi@watermarkgroup.com, current@FreeBSD.ORG From: "John S. Dyson" Reply-To: dyson@iquest.net X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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