Vince Weaver wrote:
> Hello
>
> I've tested this patch.  It is broken on 32-bit x86 unless the below patch 
> is applied.  With that applied, it seems to work fine on the various test 
> cases I have, including truncate64 and ftruncate64.
>
> Vince
>
> diff -r 62800dbea5a8 src/arch/x86/process.cc
> --- a/src/arch/x86/process.cc Tue Oct 27 15:44:35 2009 -0400
> +++ b/src/arch/x86/process.cc Tue Oct 27 16:13:49 2009 -0400
> @@ -715,7 +715,7 @@
>  I386LiveProcess::getSyscallArg(ThreadContext *tc, int &i)
>  {
>      assert(i < NumArgumentRegs32);
> -    return tc->readIntReg(ArgumentReg32[i]);
> +    return tc->readIntReg(ArgumentReg32[i++]);
>  }
>  
>  X86ISA::IntReg
> @@ -723,10 +723,10 @@
>  {
>      assert(width == 32 || width == 64);
>      assert(i < NumArgumentRegs);
> -    uint64_t retVal = ArgumentReg[i++] & mask(32);
> +    uint64_t retVal = tc->readIntReg(ArgumentReg32[i++]) & mask(32);
>      if (width == 64)
> -        retVal |= ((uint64_t)ArgumentReg[i++] << 32);
> -    return tc->readIntReg(retVal);
> +        retVal |= ((uint64_t)tc->readIntReg(ArgumentReg[i++]) << 32);
> +    return retVal;
>  }
>  
>  void
> _______________________________________________
> m5-dev mailing list
> [email protected]
> http://m5sim.org/mailman/listinfo/m5-dev
>   

Yes, thank you for fixing my fairly silly mistakes here. I should
refrain from working on M5 when I don't have the time to pay attention
properly.

Gabe
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to