From: Julian Seward Date: Fri, 14 Sep 2018 11:19:34 +0000 (+0200) Subject: Bug 397089 - Incorrect decoding of three-register vmovss/vmovsd opcode 11h. X-Git-Tag: VALGRIND_3_14_0~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27194eb985b22a66b439925e821a41800bcb881e;p=thirdparty%2Fvalgrind.git Bug 397089 - Incorrect decoding of three-register vmovss/vmovsd opcode 11h. This fixes the incorrect 11h decoding of three-register vmovss/vmovsd. Patch from Tomas Trnka (tomastrnka@gmx.com). --- diff --git a/VEX/priv/guest_amd64_toIR.c b/VEX/priv/guest_amd64_toIR.c index f4620306ca..2cabf80c9f 100644 --- a/VEX/priv/guest_amd64_toIR.c +++ b/VEX/priv/guest_amd64_toIR.c @@ -24234,12 +24234,12 @@ Long dis_ESC_0F__VEX ( UInt rV = getVexNvvvv(pfx); delta++; DIP("vmovsd %s,%s,%s\n", - nameXMMReg(rE), nameXMMReg(rV), nameXMMReg(rG)); + nameXMMReg(rG), nameXMMReg(rV), nameXMMReg(rE)); IRTemp res = newTemp(Ity_V128); assign(res, binop(Iop_64HLtoV128, getXMMRegLane64(rV, 1), - getXMMRegLane64(rE, 0))); - putYMMRegLoAndZU(rG, mkexpr(res)); + getXMMRegLane64(rG, 0))); + putYMMRegLoAndZU(rE, mkexpr(res)); *uses_vvvv = True; goto decode_success; } @@ -24264,14 +24264,14 @@ Long dis_ESC_0F__VEX ( UInt rV = getVexNvvvv(pfx); delta++; DIP("vmovss %s,%s,%s\n", - nameXMMReg(rE), nameXMMReg(rV), nameXMMReg(rG)); + nameXMMReg(rG), nameXMMReg(rV), nameXMMReg(rE)); IRTemp res = newTemp(Ity_V128); assign( res, binop( Iop_64HLtoV128, getXMMRegLane64(rV, 1), binop(Iop_32HLto64, getXMMRegLane32(rV, 1), - getXMMRegLane32(rE, 0)) ) ); - putYMMRegLoAndZU(rG, mkexpr(res)); + getXMMRegLane32(rG, 0)) ) ); + putYMMRegLoAndZU(rE, mkexpr(res)); *uses_vvvv = True; goto decode_success; }