]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add support needed for exp-ptrcheck on ppc32/64.
authorJulian Seward <jseward@acm.org>
Wed, 30 Jul 2008 09:56:45 +0000 (09:56 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 30 Jul 2008 09:56:45 +0000 (09:56 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@1860

VEX/priv/host-ppc/isel.c
VEX/pub/libvex_guest_ppc64.h

index 6911407b1cfa07d061acdc3e67a49f9ad963f7b4..d33b27784b995f9b5099638b6ac0c3fa99369c24 100644 (file)
@@ -1831,6 +1831,29 @@ static HReg iselWordExpr_R_wrk ( ISelEnv* env, IRExpr* e )
          }
          break;
 
+      /* ReinterpF32asI32(e) */
+      /* Given an IEEE754 float, produce an I32 with the same bit
+         pattern. */
+      case Iop_ReinterpF32asI32: {
+         /* I believe this generates correct code for both 32- and
+            64-bit hosts. */
+         PPCAMode *am_addr;
+         HReg fr_src = iselFltExpr(env, e->Iex.Unop.arg);
+         HReg r_dst  = newVRegI(env);
+
+         sub_from_sp( env, 16 );     // Move SP down 16 bytes
+         am_addr = PPCAMode_IR( 0, StackFramePtr(mode64) );
+
+         // store as F32
+         addInstr(env, PPCInstr_FpLdSt( False/*store*/, 4,
+                                        fr_src, am_addr ));
+         // load as Ity_I32
+         addInstr(env, PPCInstr_Load( 4, r_dst, am_addr, mode64 ));
+
+         add_to_sp( env, 16 );       // Reset SP
+         return r_dst;
+      }
+
       default: 
          break;
       }
index d03c01db99e9f10517ace3877cf1438c86a4e987..d6ff1360693e89eb744a0b633adcd5d3259a44bd 100644 (file)
@@ -271,7 +271,7 @@ typedef
 
       /* Needed for AIX: CIA at the last SC insn.  Used when backing up
          to restart a syscall that has been interrupted by a signal. */
-      /* ???? */ ULong guest_CIA_AT_SC; 
+      /* 1392 */ ULong guest_CIA_AT_SC; 
 
       /* SPRG3, which AIUI is readonly in user space.  Needed for
          threading on AIX. */