Make sure all addresses used in syscalls are truncated to 32 bits. Actually -all- arguements are truncated to 32 bits, but we should be able to get away with it.
--HG-- extra : convert_revision : 3b8766c68a4ab36e2e769fac4812657f3f7e0d1c
This commit is contained in:
parent
6d199f0b25
commit
debf04aef1
|
@ -272,7 +272,10 @@ SparcO3CPU<Impl>::getSyscallArg(int i, int tid)
|
||||||
{
|
{
|
||||||
TheISA::IntReg idx = TheISA::flattenIntIndex(this->tcBase(tid),
|
TheISA::IntReg idx = TheISA::flattenIntIndex(this->tcBase(tid),
|
||||||
SparcISA::ArgumentReg0 + i);
|
SparcISA::ArgumentReg0 + i);
|
||||||
return this->readArchIntReg(idx, tid);
|
TheISA::IntReg val = this->readArchIntReg(idx, tid);
|
||||||
|
if (bits(this->readMiscRegNoEffect(SparcISA::MISCREG_PSTATE, tid), 3, 3))
|
||||||
|
val = bits(val, 31, 0);
|
||||||
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Impl>
|
template <class Impl>
|
||||||
|
|
Loading…
Reference in a new issue