aboutsummaryrefslogtreecommitdiff
path: root/src/ARM_InstrInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ARM_InstrInfo.cpp')
-rw-r--r--src/ARM_InstrInfo.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ARM_InstrInfo.cpp b/src/ARM_InstrInfo.cpp
index 28362d9..b50e821 100644
--- a/src/ARM_InstrInfo.cpp
+++ b/src/ARM_InstrInfo.cpp
@@ -373,16 +373,16 @@ Info Decode(bool thumb, u32 num, u32 instr)
if (res.Kind == tk_LDMIA || res.Kind == tk_POP)
{
- u32 set = (instr & 0xFF) & ~(res.DstRegs|res.SrcRegs);
- res.NotStrictlyNeeded |= set;
+ u32 set = (instr & 0xFF);
+ res.NotStrictlyNeeded |= set & ~(res.DstRegs|res.SrcRegs);
res.DstRegs |= set;
}
if (res.Kind == tk_STMIA || res.Kind == tk_PUSH)
{
- u32 set = (instr & 0xFF) & ~(res.DstRegs|res.SrcRegs);
+ u32 set = (instr & 0xFF);
if (res.Kind == tk_PUSH && instr & (1 << 8))
set |= (1 << 14);
- res.NotStrictlyNeeded |= set;
+ res.NotStrictlyNeeded |= set & ~(res.DstRegs|res.SrcRegs);
res.SrcRegs |= set;
}
@@ -495,15 +495,15 @@ Info Decode(bool thumb, u32 num, u32 instr)
if (res.Kind == ak_LDM)
{
- u16 set = (instr & 0xFFFF) & ~(res.SrcRegs|res.DstRegs|(1<<15));
+ u16 set = (instr & 0xFFFF);
+ res.NotStrictlyNeeded |= set & ~(res.SrcRegs|res.DstRegs|(1<<15));
res.DstRegs |= set;
- res.NotStrictlyNeeded |= set;
}
if (res.Kind == ak_STM)
{
- u16 set = (instr & 0xFFFF) & ~(res.SrcRegs|res.DstRegs|(1<<15));
+ u16 set = (instr & 0xFFFF);
+ res.NotStrictlyNeeded |= set & ~(res.SrcRegs|res.DstRegs|(1<<15));
res.SrcRegs |= set;
- res.NotStrictlyNeeded |= set;
}
if ((instr >> 28) < 0xE)