summaryrefslogtreecommitdiff
path: root/src/cpu/o3/decode.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-05-26 09:23:13 -0700
committerNathan Binkert <nate@binkert.org>2009-05-26 09:23:13 -0700
commit47877cf2dbd6ee2f1cf9b2c609d37b0589e876ca (patch)
tree6beb00dfe7e31b9bf82f7aba4710b0c487b6543f /src/cpu/o3/decode.hh
parentd93392df28fc6c9a5c70fb6252a12afdc72d9344 (diff)
downloadgem5-47877cf2dbd6ee2f1cf9b2c609d37b0589e876ca.tar.xz
types: add a type for thread IDs and try to use it everywhere
Diffstat (limited to 'src/cpu/o3/decode.hh')
-rw-r--r--src/cpu/o3/decode.hh26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/cpu/o3/decode.hh b/src/cpu/o3/decode.hh
index 294b5b623..e272b661f 100644
--- a/src/cpu/o3/decode.hh
+++ b/src/cpu/o3/decode.hh
@@ -105,7 +105,7 @@ class DefaultDecode
void setFetchQueue(TimeBuffer<FetchStruct> *fq_ptr);
/** Sets pointer to list of active threads. */
- void setActiveThreads(std::list<unsigned> *at_ptr);
+ void setActiveThreads(std::list<ThreadID> *at_ptr);
/** Drains the decode stage. */
bool drain();
@@ -129,20 +129,20 @@ class DefaultDecode
* change (ie switching from from blocking to unblocking).
* @param tid Thread id to decode instructions from.
*/
- void decode(bool &status_change, unsigned tid);
+ void decode(bool &status_change, ThreadID tid);
/** Processes instructions from fetch and passes them on to rename.
* Decoding of instructions actually happens when they are created in
* fetch, so this function mostly checks if PC-relative branches are
* correct.
*/
- void decodeInsts(unsigned tid);
+ void decodeInsts(ThreadID tid);
private:
/** Inserts a thread's instructions into the skid buffer, to be decoded
* once decode unblocks.
*/
- void skidInsert(unsigned tid);
+ void skidInsert(ThreadID tid);
/** Returns if all of the skid buffers are empty. */
bool skidsEmpty();
@@ -156,13 +156,13 @@ class DefaultDecode
void sortInsts();
/** Reads all stall signals from the backwards communication timebuffer. */
- void readStallSignals(unsigned tid);
+ void readStallSignals(ThreadID tid);
/** Checks all input signals and updates decode's status appropriately. */
- bool checkSignalsAndUpdate(unsigned tid);
+ bool checkSignalsAndUpdate(ThreadID tid);
/** Checks all stall signals, and returns if any are true. */
- bool checkStall(unsigned tid) const;
+ bool checkStall(ThreadID tid) const;
/** Returns if there any instructions from fetch on this cycle. */
inline bool fetchInstsValid();
@@ -171,24 +171,24 @@ class DefaultDecode
* become blocked.
* @return Returns true if there is a status change.
*/
- bool block(unsigned tid);
+ bool block(ThreadID tid);
/** Switches decode to unblocking if the skid buffer is empty, and
* signals back that decode has unblocked.
* @return Returns true if there is a status change.
*/
- bool unblock(unsigned tid);
+ bool unblock(ThreadID tid);
/** Squashes if there is a PC-relative branch that was predicted
* incorrectly. Sends squash information back to fetch.
*/
- void squash(DynInstPtr &inst, unsigned tid);
+ void squash(DynInstPtr &inst, ThreadID tid);
public:
/** Squashes due to commit signalling a squash. Changes status to
* squashing and clears block/unblock signals as needed.
*/
- unsigned squash(unsigned tid);
+ unsigned squash(ThreadID tid);
private:
// Interfaces to objects outside of decode.
@@ -263,10 +263,10 @@ class DefaultDecode
unsigned toRenameIndex;
/** number of Active Threads*/
- unsigned numThreads;
+ ThreadID numThreads;
/** List of active thread ids */
- std::list<unsigned> *activeThreads;
+ std::list<ThreadID> *activeThreads;
/** Number of branches in flight. */
unsigned branchCount[Impl::MaxThreads];