summaryrefslogtreecommitdiff
path: root/src/arch/arm/insts/static_inst.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/arm/insts/static_inst.hh')
-rw-r--r--src/arch/arm/insts/static_inst.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/arch/arm/insts/static_inst.hh b/src/arch/arm/insts/static_inst.hh
index e0d268979..59d7fe705 100644
--- a/src/arch/arm/insts/static_inst.hh
+++ b/src/arch/arm/insts/static_inst.hh
@@ -140,6 +140,18 @@ class ArmStaticInstBase : public StaticInst
}
template<class XC>
+ static Addr
+ readPC(XC *xc)
+ {
+ Addr pc = xc->readPC();
+ Addr tBit = pc & (ULL(1) << PcTBitShift);
+ if (tBit)
+ return pc + 4;
+ else
+ return pc + 8;
+ }
+
+ template<class XC>
static void
setNextPC(XC *xc, Addr val)
{