Skip to content

Commit 251799d

Browse files
chedahubplafosse
authored andcommitted
Fix VLE ANDIx translation to always store result in destination register
1 parent d32a550 commit 251799d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/powerpc/il.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -660,8 +660,9 @@ bool GetLowLevelILForPPCInstruction(Architecture *arch, LowLevelILFunction &il,
660660

661661
// VLE instructions that get translated to ANDIx may
662662
// not have the rc bit set
663-
if (instruction->flags.rc)
664-
ei0 = il.SetRegister(addressSize_l, oper0->reg, ei0, IL_FLAGWRITE_CR0_S);
663+
ei0 = il.SetRegister(addressSize_l, oper0->reg, ei0,
664+
instruction->flags.rc ? IL_FLAGWRITE_CR0_S : 0
665+
);
665666
il.AddInstruction(ei0);
666667
break;
667668

0 commit comments

Comments
 (0)