qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vince Weaver <vince@csl.cornell.edu>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] MIPS linux-user ftruncate64 patch
Date: Thu, 22 May 2008 13:33:26 -0400 (EDT)	[thread overview]
Message-ID: <20080522133001.O38215-100000@bell.csl.cornell.edu> (raw)

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	other threads:[~2008-05-22 17:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080522133001.O38215-100000@bell.csl.cornell.edu \
    --to=vince@csl.cornell.edu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).