diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-05-28 23:49:29 -0400 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-05-28 23:49:29 -0400 |
commit | 981471c31db18aa55f9dfacd590db1728858baaf (patch) | |
tree | e0c110d8f1ca92d912f9adbafc7b522171c4df7e /src/arch/sparc/isa/formats | |
parent | a433cf140e939bc503de27a015eb9b80826412d7 (diff) | |
download | gem5-981471c31db18aa55f9dfacd590db1728858baaf.tar.xz |
Used the Priv and new HPriv instruction formats, which have been tweaked to let some checks be done by the misc reg file.
--HG--
extra : convert_revision : efee709cbab706bdb8ef7010ce153cd75a0a2ec6
Diffstat (limited to 'src/arch/sparc/isa/formats')
-rw-r--r-- | src/arch/sparc/isa/formats/priv.isa | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/arch/sparc/isa/formats/priv.isa b/src/arch/sparc/isa/formats/priv.isa index 7df59d736..56b78833a 100644 --- a/src/arch/sparc/isa/formats/priv.isa +++ b/src/arch/sparc/isa/formats/priv.isa @@ -87,9 +87,10 @@ def template PrivExecute {{ if(%(check)s) return new PrivilegedAction; + Fault fault = NoFault; %(code)s; %(op_wb)s; - return NoFault; + return fault; } }}; @@ -116,10 +117,17 @@ let {{ // Primary format for integer operate instructions: def format Priv(code, *opt_flags) {{ - checkCode = "((xc->readMiscReg(PrStart + MISCREG_PSTATE))<2:2>)" + checkCode = '''((xc->readMiscReg(PrStart + MISCREG_PSTATE))<2:2>) || + ((xc->readMiscReg(HprStart + MISCREG_HPSTATE))<2:2>)''' (header_output, decoder_output, exec_output, decode_block) = doPrivFormat(code, checkCode, name, Name, opt_flags) }}; +def format HPriv(code, *opt_flags) {{ + checkCode = "((xc->readMiscReg(HprStart + MISCREG_HPSTATE))<2:2>)" + (header_output, decoder_output, + exec_output, decode_block) = doPrivFormat(code, + checkCode, name, Name, opt_flags) +}}; |