qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] MIPS linux-user ftruncate64 patch


From: Vince Weaver
Subject: [Qemu-devel] MIPS linux-user ftruncate64 patch
Date: Thu, 22 May 2008 13:33:26 -0400 (EDT)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]