summaryrefslogtreecommitdiff
path: root/src/arch/arm/insts
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:02 -0500
committerGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:02 -0500
commitb6e7029dd59fa9508835a5af7696c93785a00d87 (patch)
tree0b0c0404639d39c6186bec663665d5014bfe61d2 /src/arch/arm/insts
parent7eb3ea2798275b7f242ea82fdf8ee14f012210c7 (diff)
downloadgem5-b6e7029dd59fa9508835a5af7696c93785a00d87.tar.xz
ARM: Fix PC operand handling.
Diffstat (limited to 'src/arch/arm/insts')
-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)
{