From 1ca9fb6394c2f53467c9acc2000ec0a08817e47c Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Thu, 23 Jun 2005 21:14:45 +0000 Subject: [PATCH] Disable dangerous case in advance4 which is not currently needed. git-svn-id: svn://svn.valgrind.org/vex/trunk@1221 --- VEX/priv/host-ppc32/isel.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/VEX/priv/host-ppc32/isel.c b/VEX/priv/host-ppc32/isel.c index 8cfe7210a0..d1c511b46f 100644 --- a/VEX/priv/host-ppc32/isel.c +++ b/VEX/priv/host-ppc32/isel.c @@ -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)"); } -- 2.47.3