Date: Thu, 29 Nov 2012 08:44:22 -0700 From: Peter Grehan <grehan@freebsd.org> To: Jilles Tjoelker <jilles@stack.nl> Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r243667 - in projects/bhyve/sys/amd64/vmm: . intel Message-ID: <50B782D6.5060507@freebsd.org> In-Reply-To: <20121129152550.GB29338@stack.nl> References: <201211290626.qAT6QhOr007958@svn.freebsd.org> <20121129152550.GB29338@stack.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
> I don't see a check on the ModRM reg field, which indicates whether the > 0x81 opcode is an ADD, OR, ADC, SBB, AND, SUB, XOR or CMP. So if one of > the other seven happens, it will silently execute as an AND. I don't > think it is useful to implement the other seven but they should be > rejected explicitly (if the ModRM reg field is not 4). Will do, thanks. > A hardware AND of any kind will update %rflags and compilers may take > advantage of this to branch based on the result without the need for a > separate instruction to test it. I suppose this is unlikely here (the > AND serving only to clear one or more bits). Yeh... x86 sucks :( later, Peter.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50B782D6.5060507>