summaryrefslogtreecommitdiff
path: root/src/arch/arm/predecoder.hh
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2011-04-04 11:42:28 -0500
committerAli Saidi <Ali.Saidi@ARM.com>2011-04-04 11:42:28 -0500
commita679cd917ac4775979e23594de52f1bca407c08c (patch)
treed48bb74b729d2e11e62e1db9a4fb860b70ddd1b3 /src/arch/arm/predecoder.hh
parentac650199eeb62bf05fec11a4f2d7666cbd31331c (diff)
downloadgem5-a679cd917ac4775979e23594de52f1bca407c08c.tar.xz
ARM: Cleanup implementation of ITSTATE and put important code in PCState.
Consolidate all code to handle ITSTATE in the PCState object rather than touching a variety of structures/objects.
Diffstat (limited to 'src/arch/arm/predecoder.hh')
-rw-r--r--src/arch/arm/predecoder.hh22
1 files changed, 7 insertions, 15 deletions
diff --git a/src/arch/arm/predecoder.hh b/src/arch/arm/predecoder.hh
index 08e1676c0..e650d52d6 100644
--- a/src/arch/arm/predecoder.hh
+++ b/src/arch/arm/predecoder.hh
@@ -66,9 +66,8 @@ namespace ArmISA
bool emiReady;
bool outOfBytes;
int offset;
- ITSTATE itstate;
- Addr predAddr;
- bool predAddrValid;
+ bool foundIt;
+ ITSTATE itBits;
public:
void reset()
@@ -78,15 +77,7 @@ namespace ArmISA
emi = 0;
emiReady = false;
outOfBytes = true;
- itstate = 0;
- predAddr = 0;
- predAddrValid = false;
- }
-
- void reset(const ExtMachInst &old_emi)
- {
- reset();
- itstate = old_emi.newItstate;
+ foundIt = false;
}
Predecoder(ThreadContext * _tc) :
@@ -106,7 +97,6 @@ namespace ArmISA
tc = _tc;
}
- void advanceThumbCond();
void process();
//Use this to give data to the predecoder. This should be used
@@ -149,11 +139,13 @@ namespace ArmISA
assert(emiReady);
ExtMachInst thisEmi = emi;
pc.npc(pc.pc() + getInstSize());
- predAddrValid = true;
- predAddr = pc.pc() + getInstSize();
+ if (foundIt)
+ pc.nextItstate(itBits);
+ thisEmi.itstate = pc.itstate();
pc.size(getInstSize());
emi = 0;
emiReady = false;
+ foundIt = false;
return thisEmi;
}
};