summaryrefslogtreecommitdiff
path: root/src/arch/arm/isa.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/isa.cc')
-rw-r--r--src/arch/arm/isa.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arch/arm/isa.cc b/src/arch/arm/isa.cc
index 22447184e..d557cecbb 100644
--- a/src/arch/arm/isa.cc
+++ b/src/arch/arm/isa.cc
@@ -173,7 +173,7 @@ ISA::readMiscReg(int misc_reg, ThreadContext *tc)
cpsr.j = 1;
else
cpsr.j = 0;
- if (pc & (ULL(1) << PcTBitShift))
+ if (isThumb(pc))
cpsr.t = 1;
else
cpsr.t = 0;
@@ -241,9 +241,9 @@ ISA::setMiscReg(int misc_reg, const MiscReg &val, ThreadContext *tc)
miscRegs[misc_reg], cpsr, cpsr.f, cpsr.i, cpsr.a, cpsr.mode);
Addr npc = tc->readNextPC() & ~PcModeMask;
if (cpsr.j)
- npc = npc | (ULL(1) << PcJBitShift);
+ npc = npc | PcJBit;
if (cpsr.t)
- npc = npc | (ULL(1) << PcTBitShift);
+ npc = npc | PcTBit;
tc->setNextPC(npc);
} else if (misc_reg >= MISCREG_CP15_UNIMP_START &&