]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Handle 16Uto64, which can now show up at the back end as a
authorJulian Seward <jseward@acm.org>
Thu, 9 Sep 2010 07:14:31 +0000 (07:14 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 9 Sep 2010 07:14:31 +0000 (07:14 +0000)
result of more iropt folding introduced in r2030.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2031

VEX/priv/host_x86_isel.c

index e6d92e0e4935bddf3b44701a51bc45f16d77ae08..fc5cf05725d91fc4cecc0a07b8403a46a6eea97c 100644 (file)
@@ -2488,6 +2488,20 @@ static void iselInt64Expr_wrk ( HReg* rHi, HReg* rLo, ISelEnv* env, IRExpr* e )
             return;
          }
 
+         /* 16Uto64(e) */
+         case Iop_16Uto64: {
+            HReg tLo = newVRegI(env);
+            HReg tHi = newVRegI(env);
+            HReg src = iselIntExpr_R(env, e->Iex.Unop.arg);
+            addInstr(env, mk_iMOVsd_RR(src,tLo));
+            addInstr(env, X86Instr_Alu32R(Xalu_AND,
+                                          X86RMI_Imm(0xFFFF), tLo));
+            addInstr(env, X86Instr_Alu32R(Xalu_MOV, X86RMI_Imm(0), tHi));
+            *rHi = tHi;
+            *rLo = tLo;
+            return;
+         }
+
          /* V128{HI}to64 */
          case Iop_V128HIto64:
          case Iop_V128to64: {