summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:00 -0500
committerGabe Black <gblack@eecs.umich.edu>2010-06-02 12:58:00 -0500
commit292b8a3c9169fcf587dd81fb8072e7d451e16afe (patch)
tree6069e45aad34f40a00437be9a771a21b227c9172 /src/arch
parent003346077f466e4a5cabdd9e80ea05009bcf9204 (diff)
downloadgem5-292b8a3c9169fcf587dd81fb8072e7d451e16afe.tar.xz
ARM: Add an operand for accessing the current PC.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm/isa/operands.isa7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/arm/isa/operands.isa b/src/arch/arm/isa/operands.isa
index a27f61228..fefe9d925 100644
--- a/src/arch/arm/isa/operands.isa
+++ b/src/arch/arm/isa/operands.isa
@@ -61,6 +61,9 @@ let {{
xc->%(func)s(this, %(op_idx)s, %(final_val)s))
'''
+ readPC = 'xc->readPC() & ~PcModeMask'
+ writePC = 'setPC(xc, %(final_val)s)'
+
readNPC = 'xc->readNextPC() & ~PcModeMask'
writeNPC = 'setNextPC(xc, %(final_val)s)'
}};
@@ -101,6 +104,8 @@ def operands {{
'Fpsid': ('ControlReg', 'uw', 'MISCREG_FPSID', None, 43),
'Fpscr': ('ControlReg', 'uw', 'MISCREG_FPSCR', None, 44),
'Fpexc': ('ControlReg', 'uw', 'MISCREG_FPEXC', None, 45),
- 'NPC': ('NPC', 'ud', None, (None, None, 'IsControl'), 50,
+ 'PC': ('PC', 'ud', None, (None, None, 'IsControl'), 50,
+ readPC, writePC),
+ 'NPC': ('NPC', 'ud', None, (None, None, 'IsControl'), 51,
readNPC, writeNPC),
}};