diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2010-06-02 12:58:02 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2010-06-02 12:58:02 -0500 |
commit | b6e7029dd59fa9508835a5af7696c93785a00d87 (patch) | |
tree | 0b0c0404639d39c6186bec663665d5014bfe61d2 /src/arch/arm/insts | |
parent | 7eb3ea2798275b7f242ea82fdf8ee14f012210c7 (diff) | |
download | gem5-b6e7029dd59fa9508835a5af7696c93785a00d87.tar.xz |
ARM: Fix PC operand handling.
Diffstat (limited to 'src/arch/arm/insts')
-rw-r--r-- | src/arch/arm/insts/static_inst.hh | 12 |
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) { |