From: Cerion Armour-Brown Date: Wed, 23 Feb 2005 18:21:31 +0000 (+0000) Subject: Just some assembly printout changes X-Git-Tag: svn/VALGRIND_3_0_1^2~380 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ae5c0e7a1b6b6777cf0d7c5bf4bfeb4d3741d44c;p=thirdparty%2Fvalgrind.git Just some assembly printout changes git-svn-id: svn://svn.valgrind.org/vex/trunk@954 --- diff --git a/VEX/priv/host-ppc32/hdefs.c b/VEX/priv/host-ppc32/hdefs.c index c96e369420..74fa95ecc7 100644 --- a/VEX/priv/host-ppc32/hdefs.c +++ b/VEX/priv/host-ppc32/hdefs.c @@ -277,7 +277,7 @@ void ppPPC32AMode ( PPC32AMode* am ) { switch (am->tag) { case Pam_IR: if (am->Pam.IR.index == 0) - vex_printf("("); + vex_printf("0("); else vex_printf("0x%x(", am->Pam.IR.index); ppHRegPPC32(am->Pam.IR.base); @@ -884,10 +884,29 @@ void ppPPC32Instr ( PPC32Instr* i ) ppPPC32AMode(i->Pin.Store.dst); return; } - case Pin_Set32: - vex_printf("set32 (%s) ", showPPC32CondCode(i->Pin.Set32.cond)); + case Pin_Set32: { + PPC32CondCode cc = i->Pin.Set32.cond; + vex_printf("set32 (%s),", showPPC32CondCode(cc)); ppHRegPPC32(i->Pin.Set32.dst); + if (cc.test == Pct_ALWAYS) { + vex_printf(": { li "); + ppHRegPPC32(i->Pin.Set32.dst); + vex_printf(",1 }"); + } else { + vex_printf(": { mfcr r0 ; rlwinm "); + ppHRegPPC32(i->Pin.Set32.dst); + vex_printf(",r0,%d,31,31,0", cc.flag+1); + if (cc.test == Pct_FALSE) { + vex_printf("; xori "); + ppHRegPPC32(i->Pin.Set32.dst); + vex_printf(","); + ppHRegPPC32(i->Pin.Set32.dst); + vex_printf("1"); + } + vex_printf(" }"); + } return; + } //.. case Xin_Bsfr32: //.. vex_printf("bs%cl ", i->Xin.Bsfr32.isFwds ? 'f' : 'r'); //.. ppHRegX86(i->Xin.Bsfr32.src);