Fix compiling for SPARC_SE:
- change include from exec_context.hh -> threadcontext.hh - g++ 4.0.3 complaint about broken code (which it was). - bad merge thread_context -> exec_context src/arch/sparc/isa/includes.isa: Fix SPARC_SE for exec_context->thread_context switch src/arch/sparc/regfile.hh: fix g++ 4.0.3 complaint about broken code (which it was). src/cpu/thread_context.hh: fix bad merge --HG-- extra : convert_revision : f5bab822d5c25177756e9890e143b0ad8d704201
This commit is contained in:
parent
bb58e4b851
commit
4ab8e881ed
3 changed files with 20 additions and 9 deletions
|
@ -48,7 +48,7 @@ output header {{
|
||||||
output decoder {{
|
output decoder {{
|
||||||
#include "base/cprintf.hh"
|
#include "base/cprintf.hh"
|
||||||
#include "base/loader/symtab.hh"
|
#include "base/loader/symtab.hh"
|
||||||
#include "cpu/exec_context.hh" // for Jump::branchTarget()
|
#include "cpu/thread_context.hh" // for Jump::branchTarget()
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#if defined(linux)
|
#if defined(linux)
|
||||||
|
|
|
@ -244,17 +244,22 @@ namespace SparcISA
|
||||||
//In each of these cases, we have to copy the value into a temporary
|
//In each of these cases, we have to copy the value into a temporary
|
||||||
//variable. This is because we may otherwise try to access an
|
//variable. This is because we may otherwise try to access an
|
||||||
//unaligned portion of memory.
|
//unaligned portion of memory.
|
||||||
|
|
||||||
|
uint32_t result32;
|
||||||
|
uint64_t result64;
|
||||||
switch(width)
|
switch(width)
|
||||||
{
|
{
|
||||||
case SingleWidth:
|
case SingleWidth:
|
||||||
uint32_t result32 = gtoh((uint32_t)val);
|
result32 = gtoh((uint32_t)val);
|
||||||
memcpy(regSpace + 4 * floatReg, &result32, width);
|
memcpy(regSpace + 4 * floatReg, &result32, width);
|
||||||
|
break;
|
||||||
case DoubleWidth:
|
case DoubleWidth:
|
||||||
uint64_t result64 = gtoh((uint64_t)val);
|
result64 = gtoh((uint64_t)val);
|
||||||
memcpy(regSpace + 4 * floatReg, &result64, width);
|
memcpy(regSpace + 4 * floatReg, &result64, width);
|
||||||
|
break;
|
||||||
case QuadWidth:
|
case QuadWidth:
|
||||||
uint64_t result128 = gtoh((uint64_t)val);
|
panic("Quad width FP not implemented.");
|
||||||
memcpy(regSpace + 4 * floatReg, &result128, width);
|
break;
|
||||||
default:
|
default:
|
||||||
panic("Attempted to read a %d bit floating point register!", width);
|
panic("Attempted to read a %d bit floating point register!", width);
|
||||||
}
|
}
|
||||||
|
@ -266,17 +271,21 @@ namespace SparcISA
|
||||||
//In each of these cases, we have to copy the value into a temporary
|
//In each of these cases, we have to copy the value into a temporary
|
||||||
//variable. This is because we may otherwise try to access an
|
//variable. This is because we may otherwise try to access an
|
||||||
//unaligned portion of memory.
|
//unaligned portion of memory.
|
||||||
|
uint32_t result32;
|
||||||
|
uint64_t result64;
|
||||||
switch(width)
|
switch(width)
|
||||||
{
|
{
|
||||||
case SingleWidth:
|
case SingleWidth:
|
||||||
uint32_t result32 = gtoh((uint32_t)val);
|
result32 = gtoh((uint32_t)val);
|
||||||
memcpy(regSpace + 4 * floatReg, &result32, width);
|
memcpy(regSpace + 4 * floatReg, &result32, width);
|
||||||
|
break;
|
||||||
case DoubleWidth:
|
case DoubleWidth:
|
||||||
uint64_t result64 = gtoh((uint64_t)val);
|
result64 = gtoh((uint64_t)val);
|
||||||
memcpy(regSpace + 4 * floatReg, &result64, width);
|
memcpy(regSpace + 4 * floatReg, &result64, width);
|
||||||
|
break;
|
||||||
case QuadWidth:
|
case QuadWidth:
|
||||||
uint64_t result128 = gtoh((uint64_t)val);
|
panic("Quad width FP not implemented.");
|
||||||
memcpy(regSpace + 4 * floatReg, &result128, width);
|
break;
|
||||||
default:
|
default:
|
||||||
panic("Attempted to read a %d bit floating point register!", width);
|
panic("Attempted to read a %d bit floating point register!", width);
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,6 +245,7 @@ class ThreadContext
|
||||||
|
|
||||||
virtual void setSyscallReturn(SyscallReturn return_value) = 0;
|
virtual void setSyscallReturn(SyscallReturn return_value) = 0;
|
||||||
|
|
||||||
|
virtual void syscall(int64_t callnum) = 0;
|
||||||
|
|
||||||
// Same with st cond failures.
|
// Same with st cond failures.
|
||||||
virtual Counter readFuncExeInst() = 0;
|
virtual Counter readFuncExeInst() = 0;
|
||||||
|
@ -431,6 +432,7 @@ class ProxyThreadContext : public ThreadContext
|
||||||
void setSyscallReturn(SyscallReturn return_value)
|
void setSyscallReturn(SyscallReturn return_value)
|
||||||
{ actualTC->setSyscallReturn(return_value); }
|
{ actualTC->setSyscallReturn(return_value); }
|
||||||
|
|
||||||
|
void syscall(int64_t callnum) { actualTC->syscall(callnum); }
|
||||||
|
|
||||||
Counter readFuncExeInst() { return actualTC->readFuncExeInst(); }
|
Counter readFuncExeInst() { return actualTC->readFuncExeInst(); }
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue