]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Disable dangerous case in advance4 which is not currently needed.
authorJulian Seward <jseward@acm.org>
Thu, 23 Jun 2005 21:14:45 +0000 (21:14 +0000)
committerJulian Seward <jseward@acm.org>
Thu, 23 Jun 2005 21:14:45 +0000 (21:14 +0000)
git-svn-id: svn://svn.valgrind.org/vex/trunk@1221

VEX/priv/host-ppc32/isel.c

index 8cfe7210a0d0e8f816eb612b131224764d4bb748..d1c511b46fa5e4882e00cae4edded14fd669e3ce 100644 (file)
@@ -443,11 +443,16 @@ static PPC32AMode* advance4 ( ISelEnv* env, PPC32AMode* am )
    switch (am4->tag) {
       case Pam_IR:
          am4->Pam.RR.index += 4; break;
-     case Pam_RR: {
-         HReg r_index = am4->Pam.IR.index;
-         addInstr(env, PPC32Instr_Alu32(Palu_ADD, r_index, r_index, PPC32RI_Imm(4)));
-         break;
-      }
+      case Pam_RR:
+      // This trashes r_index, which might be used by others later.
+      // Disable for the moment.  If needs to be reinstated, construct
+      // (r_index+4) in a new register and use that instead.
+      //{
+      //  HReg r_index = am4->Pam.IR.index;
+      //   addInstr(env, PPC32Instr_Alu32(Palu_ADD, r_index, r_index, 
+      //                                            PPC32RI_Imm(4)));
+      //   break;
+      // }
       default:
          vpanic("advance4(ppc32,host)");
    }