From f3f3747431e001dc6c80da5b6489516b610c22d6 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Wed, 19 Sep 2007 18:26:42 -0700 Subject: X86: Put in the foundation for x87 stack based fp registers. --HG-- extra : convert_revision : 940f92efd4a9dc59106e991cc6d9836861ab69de --- src/cpu/o3/thread_context_impl.hh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/cpu/o3/thread_context_impl.hh') diff --git a/src/cpu/o3/thread_context_impl.hh b/src/cpu/o3/thread_context_impl.hh index a145e046e..efbbc2329 100755 --- a/src/cpu/o3/thread_context_impl.hh +++ b/src/cpu/o3/thread_context_impl.hh @@ -314,6 +314,7 @@ template TheISA::FloatReg O3ThreadContext::readFloatReg(int reg_idx, int width) { + reg_idx = TheISA::flattenFloatIndex(this, reg_idx); switch(width) { case 32: return cpu->readArchFloatRegSingle(reg_idx, thread->readTid()); @@ -329,6 +330,7 @@ template TheISA::FloatReg O3ThreadContext::readFloatReg(int reg_idx) { + reg_idx = TheISA::flattenFloatIndex(this, reg_idx); return cpu->readArchFloatRegSingle(reg_idx, thread->readTid()); } @@ -337,6 +339,7 @@ TheISA::FloatRegBits O3ThreadContext::readFloatRegBits(int reg_idx, int width) { DPRINTF(Fault, "Reading floatint register through the TC!\n"); + reg_idx = TheISA::flattenFloatIndex(this, reg_idx); return cpu->readArchFloatRegInt(reg_idx, thread->readTid()); } @@ -344,6 +347,7 @@ template TheISA::FloatRegBits O3ThreadContext::readFloatRegBits(int reg_idx) { + reg_idx = TheISA::flattenFloatIndex(this, reg_idx); return cpu->readArchFloatRegInt(reg_idx, thread->readTid()); } @@ -364,6 +368,7 @@ template void O3ThreadContext::setFloatReg(int reg_idx, FloatReg val, int width) { + reg_idx = TheISA::flattenFloatIndex(this, reg_idx); switch(width) { case 32: cpu->setArchFloatRegSingle(reg_idx, val, thread->readTid()); @@ -383,6 +388,7 @@ template void O3ThreadContext::setFloatReg(int reg_idx, FloatReg val) { + reg_idx = TheISA::flattenFloatIndex(this, reg_idx); cpu->setArchFloatRegSingle(reg_idx, val, thread->readTid()); if (!thread->trapPending && !thread->inSyscall) { @@ -396,6 +402,7 @@ O3ThreadContext::setFloatRegBits(int reg_idx, FloatRegBits val, int width) { DPRINTF(Fault, "Setting floatint register through the TC!\n"); + reg_idx = TheISA::flattenFloatIndex(this, reg_idx); cpu->setArchFloatRegInt(reg_idx, val, thread->readTid()); // Squash if we're not already in a state update mode. @@ -408,6 +415,7 @@ template void O3ThreadContext::setFloatRegBits(int reg_idx, FloatRegBits val) { + reg_idx = TheISA::flattenFloatIndex(this, reg_idx); cpu->setArchFloatRegInt(reg_idx, val, thread->readTid()); // Squash if we're not already in a state update mode. -- cgit v1.2.3