]> git.ipfire.org Git - thirdparty/valgrind.git/commit
A major overhaul of the way integer register decoding is done on
authorJulian Seward <jseward@acm.org>
Sun, 27 Feb 2005 13:10:48 +0000 (13:10 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 27 Feb 2005 13:10:48 +0000 (13:10 +0000)
commitbcb1c11a1490bb83c0eb3de434ae4df06b8ed072
tree77225420b3e34baa98c1ee8be0b800bb925318ff
parent9c549444d9151e46cc4a871d470fcf47a3a69b40
A major overhaul of the way integer register decoding is done on
amd64.

The presence of REX bytes -- whilst apparently a simple change --
significantly complicates instruction decoding.  The main problem is
that integer register numbers are now split into two pieces, one bit
from the REX byte and three bits from the modrm byte (or wherever).
The tricky bit is to always ensure that the correct pieces are
reassembled to form 4-bit register numbers.  Prior to this commit, it
was easy to make that kind of error -- eg, conjoining the REX.B bit
with the 'g' modrm field to produce a nonsense register number.  This
commit rearranges the handling functions for integer registers to make
that kind of error much less likely, basically by not allowing you to
deal in fragments of register fields unless absolutely necessary.

git-svn-id: svn://svn.valgrind.org/vex/trunk@980
VEX/priv/guest-amd64/toIR.c