Mark Wielaard 62fc9a
------------------------------------------------------------------------
Mark Wielaard 62fc9a
r2499 | sewardj | 2012-09-02 14:13:34 +0200 (Sun, 02 Sep 2012) | 4 lines
Mark Wielaard 62fc9a
Mark Wielaard 62fc9a
Remove alignment checks for VMPSADBW, VPHMINPOSUW, VPALIGNR since they
Mark Wielaard 62fc9a
do not apply to the AVX versions of these instructions.  Fixes #305926.
Mark Wielaard 62fc9a
(Jakub Jelinek, jakub@redhat.com)
Mark Wielaard 62fc9a
Mark Wielaard 62fc9a
------------------------------------------------------------------------
Mark Wielaard 62fc9a
Index: priv/guest_amd64_toIR.c
Mark Wielaard 62fc9a
===================================================================
Mark Wielaard 62fc9a
--- valgrind-3.8.0/VEX/priv/guest_amd64_toIR.c	(revision 2498)
Mark Wielaard 62fc9a
+++ valgrind-3.8.0/VEX/priv/guest_amd64_toIR.c	(revision 2499)
Mark Wielaard 62fc9a
@@ -16028,7 +16028,8 @@
Mark Wielaard 62fc9a
       DIP("%sphminposuw %s,%s\n", mbV, nameXMMReg(rE), nameXMMReg(rG));
Mark Wielaard 62fc9a
    } else {
Mark Wielaard 62fc9a
       addr = disAMode ( &alen, vbi, pfx, delta, dis_buf, 0 );
Mark Wielaard 62fc9a
-      gen_SEGV_if_not_16_aligned(addr);
Mark Wielaard 62fc9a
+      if (!isAvx)
Mark Wielaard 62fc9a
+         gen_SEGV_if_not_16_aligned(addr);
Mark Wielaard 62fc9a
       assign( sV, loadLE(Ity_V128, mkexpr(addr)) );
Mark Wielaard 62fc9a
       delta += alen;
Mark Wielaard 62fc9a
       DIP("%sphminposuw %s,%s\n", mbV, dis_buf, nameXMMReg(rG));
Mark Wielaard 62fc9a
@@ -25898,7 +25899,6 @@
Mark Wielaard 62fc9a
                                            nameXMMReg(rV), nameXMMReg(rG));
Mark Wielaard 62fc9a
          } else {
Mark Wielaard 62fc9a
             addr = disAMode( &alen, vbi, pfx, delta, dis_buf, 1 );
Mark Wielaard 62fc9a
-            gen_SEGV_if_not_16_aligned( addr );
Mark Wielaard 62fc9a
             assign( sV, loadLE(Ity_V128, mkexpr(addr)) );
Mark Wielaard 62fc9a
             imm8 = getUChar(delta+alen);
Mark Wielaard 62fc9a
             delta += alen+1;
Mark Wielaard 62fc9a
@@ -26291,7 +26291,6 @@
Mark Wielaard 62fc9a
          } else {
Mark Wielaard 62fc9a
             addr = disAMode( &alen, vbi, pfx, delta, dis_buf, 
Mark Wielaard 62fc9a
                              1/* imm8 is 1 byte after the amode */ );
Mark Wielaard 62fc9a
-            gen_SEGV_if_not_16_aligned( addr );
Mark Wielaard 62fc9a
             assign( src_vec, loadLE( Ity_V128, mkexpr(addr) ) );
Mark Wielaard 62fc9a
             imm8 = (Int)getUChar(delta+alen);
Mark Wielaard 62fc9a
             delta += alen+1;