> +    // I'm not sure why, but the length argument is in arg reg 3
> +    loff_t length = process->getSyscallArg(tc, 3);

The reason for this is that on various architectures, if you are passing a 
64-bit value on a 32-bit architecture, the 64-bit value has to be in an 
even/odd register pair.  So on calls like ftruncate64 a register is wasted 
to get this alignment.

I am pretty sure at least ARM and MIPS are like this, and I guess PPC if 
you needed this fix.  X86 doesn't need this as far as I know, so for x86 
to use this syscall we'll have to handle this differently.  What would be 
the cleanest way to do this... an #ifdef ?  ( that's what qemu does) or 
would there be some sort of OO way to do it?

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

Reply via email to