diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2013-01-04 18:09:35 -0600 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2013-01-04 18:09:35 -0600 |
commit | a83e74b37adc26afe4e69e59ed0092dafa63fc09 (patch) | |
tree | 5419dab639987b79738898cad8425656746d877e /src/arch/arm/decoder.hh | |
parent | 1945f9963d95cdd244a4540519f3d9d1b9597767 (diff) | |
download | gem5-a83e74b37adc26afe4e69e59ed0092dafa63fc09.tar.xz |
ARM: Keep a copy of the fpscr len and stride fields in the decoder.
Avoid reading them every instruction, and also eliminate the last use of the
thread context in the decoders.
Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'src/arch/arm/decoder.hh')
-rw-r--r-- | src/arch/arm/decoder.hh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/arch/arm/decoder.hh b/src/arch/arm/decoder.hh index a5f2c88a5..9099e3e2e 100644 --- a/src/arch/arm/decoder.hh +++ b/src/arch/arm/decoder.hh @@ -58,6 +58,9 @@ class Decoder bool foundIt; ITSTATE itBits; + int fpscrLen; + int fpscrStride; + public: void reset() { @@ -69,7 +72,8 @@ class Decoder foundIt = false; } - Decoder(ThreadContext * _tc) : tc(_tc), data(0) + Decoder(ThreadContext * _tc) : tc(_tc), data(0), + fpscrLen(0), fpscrStride(0) { reset(); } @@ -121,6 +125,12 @@ class Decoder return (!emi.thumb || emi.bigThumb) ? 4 : 2; } + void setContext(FPSCR fpscr) + { + fpscrLen = fpscr.len; + fpscrStride = fpscr.stride; + } + protected: /// A cache of decoded instruction objects. static GenericISA::BasicDecodeCache defaultCache; |