summaryrefslogtreecommitdiff
path: root/src/cpu/o3/thread_context.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/o3/thread_context.hh')
-rwxr-xr-xsrc/cpu/o3/thread_context.hh34
1 files changed, 27 insertions, 7 deletions
diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh
index c6fa178b5..1efcfff9c 100755
--- a/src/cpu/o3/thread_context.hh
+++ b/src/cpu/o3/thread_context.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 ARM Limited
+ * Copyright (c) 2011-2012 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -175,18 +175,30 @@ class O3ThreadContext : public ThreadContext
virtual void clearArchRegs();
/** Reads an integer register. */
- virtual uint64_t readIntReg(int reg_idx);
+ virtual uint64_t readIntReg(int reg_idx) {
+ return readIntRegFlat(flattenIntIndex(reg_idx));
+ }
- virtual FloatReg readFloatReg(int reg_idx);
+ virtual FloatReg readFloatReg(int reg_idx) {
+ return readFloatRegFlat(flattenFloatIndex(reg_idx));
+ }
- virtual FloatRegBits readFloatRegBits(int reg_idx);
+ virtual FloatRegBits readFloatRegBits(int reg_idx) {
+ return readFloatRegBitsFlat(flattenFloatIndex(reg_idx));
+ }
/** Sets an integer register to a value. */
- virtual void setIntReg(int reg_idx, uint64_t val);
+ virtual void setIntReg(int reg_idx, uint64_t val) {
+ setIntRegFlat(flattenIntIndex(reg_idx), val);
+ }
- virtual void setFloatReg(int reg_idx, FloatReg val);
+ virtual void setFloatReg(int reg_idx, FloatReg val) {
+ setFloatRegFlat(flattenFloatIndex(reg_idx), val);
+ }
- virtual void setFloatRegBits(int reg_idx, FloatRegBits val);
+ virtual void setFloatRegBits(int reg_idx, FloatRegBits val) {
+ setFloatRegBitsFlat(flattenFloatIndex(reg_idx), val);
+ }
/** Reads this thread's PC state. */
virtual TheISA::PCState pcState()
@@ -268,6 +280,14 @@ class O3ThreadContext : public ThreadContext
cpu->squashFromTC(thread->threadId());
}
+ virtual uint64_t readIntRegFlat(int idx);
+ virtual void setIntRegFlat(int idx, uint64_t val);
+
+ virtual FloatReg readFloatRegFlat(int idx);
+ virtual void setFloatRegFlat(int idx, FloatReg val);
+
+ virtual FloatRegBits readFloatRegBitsFlat(int idx);
+ virtual void setFloatRegBitsFlat(int idx, FloatRegBits val);
};
#endif