* [Qemu-devel] MIPS linux-user ftruncate64 patch
@ 2008-05-22 17:33 Vince Weaver
0 siblings, 0 replies; only message in thread
From: Vince Weaver @ 2008-05-22 17:33 UTC (permalink / raw)
To: qemu-devel
Hello
the below patch is needed for ftruncate64() to work properly when
simulating a 32-bit mips binary using linux-user on an x86 system.
Without this fix, the "sixtrack" fortran benchmark from the SPEC CPU 2000
benchmark suite fails to run.
I am not familar enough with the register layout for the ftruncate64()
syscall to know if something unusual is going on with how MIPS binaries
call this, or if this is a weird big/little endian or 32/64bit issue.
It does seem suspicious that arm/eabi also needs a similar fix in this
function.
Vince
--- svn/linux-user/syscall.c 2008-04-23 12:23:06.000000000 -0400
+++ svn.dinero/linux-user/syscall.c 2008-05-22 13:28:44.000000000 -0400
@@ -3026,6 +3026,11 @@
arg3 = arg4;
}
#endif
+
+#ifdef TARGET_MIPS
+ arg2 = arg4;
+#endif
+
return get_errno(ftruncate64(arg1, target_offset64(arg2, arg3)));
}
#endif
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-05-22 17:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22 17:33 [Qemu-devel] MIPS linux-user ftruncate64 patch Vince Weaver
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).