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 8f6e269a-dfd6-0310-a8e1-e2731360e62c
1 file changed