svn commit: r243667 - in projects/bhyve/sys/amd64/vmm: . intel
Peter Grehan
grehan at freebsd.org
Thu Nov 29 15:44:29 UTC 2012
> 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.
More information about the svn-src-projects
mailing list