:[diStorm}: REP+REX prefix ordering
Sanjay Patel
sanjay3000 at yahoo.com
Mon Feb 12 14:59:35 EST 2007
I just found a bit of a problem decoding a multi-prefix SSE instruction from
GCC. It produced this byte sequence:
0x55,
0x48, 0x89, 0xe5,
0x48, 0x89, 0x7d, 0xf8,
0xf2, 0x48, 0x0f, 0x2a, 0x4d, 0xf8,
Which should be:
push rbbp
mov rbp, rsp
cvtsi2sd xmm1, -8(rbp)
DiStorm got confused by the 0xf2, 0x48 prefix sequence, so it decoded the
last instruction as a 'cvtpi2ps'.
Note that the REX prefix and the SSE prefix are swapped from the normal way
you would expect...but it appears this is legal codegen.
--Sanjay
____________________________________________________________________________________
TV dinner still cooling?
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/
More information about the diStorm
mailing list