summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/il.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/il.cpp b/arch/powerpc/il.cpp
index 728b3069..67ce4b99 100644
--- a/arch/powerpc/il.cpp
+++ b/arch/powerpc/il.cpp
@@ -660,8 +660,9 @@ bool GetLowLevelILForPPCInstruction(Architecture *arch, LowLevelILFunction &il,
// VLE instructions that get translated to ANDIx may
// not have the rc bit set
- if (instruction->flags.rc)
- ei0 = il.SetRegister(addressSize_l, oper0->reg, ei0, IL_FLAGWRITE_CR0_S);
+ ei0 = il.SetRegister(addressSize_l, oper0->reg, ei0,
+ instruction->flags.rc ? IL_FLAGWRITE_CR0_S : 0
+ );
il.AddInstruction(ei0);
break;