]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Deal with backend case of 1Sto64
authorCerion Armour-Brown <cerion@valgrind.org>
Fri, 23 Dec 2005 01:06:35 +0000 (01:06 +0000)
committerCerion Armour-Brown <cerion@valgrind.org>
Fri, 23 Dec 2005 01:06:35 +0000 (01:06 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@1505

VEX/priv/host-ppc32/isel.c

index 0ea857759627a68e189493bcad4e6a9a4fa8bc23..13a5c6d85a9db71d35c42dcf39cae11903d65408 100644 (file)
@@ -1582,6 +1582,17 @@ static HReg iselIntExpr_R_wrk ( ISelEnv* env, IRExpr* e )
                                 r_dst, r_dst, PPCRH_Imm(False,31)));
          return r_dst;
       }
+      case Iop_1Sto64: {
+         /* could do better than this, but for now ... */
+         HReg        r_dst = newVRegI(env);
+         PPCCondCode cond  = iselCondCode(env, e->Iex.Unop.arg);
+         addInstr(env, PPCInstr_Set(cond,r_dst));
+         addInstr(env, PPCInstr_Shft(Pshft_SHL, False/*64bit shift*/,
+                                     r_dst, r_dst, PPCRH_Imm(False,63)));
+         addInstr(env, PPCInstr_Shft(Pshft_SAR, False/*64bit shift*/,
+                                     r_dst, r_dst, PPCRH_Imm(False,63)));
+         return r_dst;
+      }
       case Iop_Clz32:
       case Iop_Clz64: {
          PPCUnaryOp op_clz = (op_unop == Iop_Clz32) ? Pun_CLZ32 :