diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2013-01-04 18:09:45 -0600 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2013-01-04 18:09:45 -0600 |
commit | 63b10907ef822aa6873d7f4f4d1ee849a188b2c4 (patch) | |
tree | 5b1874709929d6f330cb18aacc75c2a13e753f21 /src/arch/sparc/decoder.hh | |
parent | a83e74b37adc26afe4e69e59ed0092dafa63fc09 (diff) | |
download | gem5-63b10907ef822aa6873d7f4f4d1ee849a188b2c4.tar.xz |
SPARC: Keep a copy of the current ASI in the decoder.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'src/arch/sparc/decoder.hh')
-rw-r--r-- | src/arch/sparc/decoder.hh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/arch/sparc/decoder.hh b/src/arch/sparc/decoder.hh index ea0793286..f85d5e4de 100644 --- a/src/arch/sparc/decoder.hh +++ b/src/arch/sparc/decoder.hh @@ -49,9 +49,10 @@ class Decoder // The extended machine instruction being generated ExtMachInst emi; bool instDone; + MiscReg asi; public: - Decoder(ThreadContext * _tc) : tc(_tc), instDone(false) + Decoder(ThreadContext * _tc) : tc(_tc), instDone(false), asi(0) {} ThreadContext * @@ -86,8 +87,7 @@ class Decoder // into all the execute functions if (inst & (1 << 13)) { emi |= (static_cast<ExtMachInst>( - tc->readMiscRegNoEffect(MISCREG_ASI)) - << (sizeof(MachInst) * 8)); + asi << (sizeof(MachInst) * 8))); } else { emi |= (static_cast<ExtMachInst>(bits(inst, 12, 5)) << (sizeof(MachInst) * 8)); @@ -107,6 +107,12 @@ class Decoder return instDone; } + void + setContext(MiscReg _asi) + { + asi = _asi; + } + protected: /// A cache of decoded instruction objects. static GenericISA::BasicDecodeCache defaultCache; |