From: Thiemo Seufer <ths@networkno.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: "J. Mayer" <l_indien@magic.fr>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] RFC: fix run of 32 bits Linux executables on 64 bits targets
Date: Fri, 12 Oct 2007 21:24:08 +0100 [thread overview]
Message-ID: <20071012202408.GM3379@networkno.de> (raw)
In-Reply-To: <f43fc5580710121237g8aba64we387d002e880aaa9@mail.gmail.com>
Blue Swirl wrote:
> On 10/12/07, Thiemo Seufer <ths@networkno.de> wrote:
> > Blue Swirl wrote:
> > [snip]
> > > Index: qemu/linux-user/mipsn32/syscall.h
> > > ===================================================================
> > > --- qemu.orig/linux-user/mipsn32/syscall.h 2007-10-11 19:17:14.000000000 +0000
> > > +++ qemu/linux-user/mipsn32/syscall.h 2007-10-11 19:17:46.000000000 +0000
> > > @@ -4,15 +4,15 @@
> > >
> > > struct target_pt_regs {
> > > /* Saved main processor registers. */
> > > - target_ulong regs[32];
> > > + abi_ulong regs[32];
> > >
> > > /* Saved special registers. */
> > > - target_ulong cp0_status;
> > > - target_ulong lo;
> > > - target_ulong hi;
> > > - target_ulong cp0_badvaddr;
> > > - target_ulong cp0_cause;
> > > - target_ulong cp0_epc;
> > > + abi_ulong cp0_status;
> > > + abi_ulong lo;
> > > + abi_ulong hi;
> > > + abi_ulong cp0_badvaddr;
> > > + abi_ulong cp0_cause;
> > > + abi_ulong cp0_epc;
> > > };
> >
> > This is broken. n32 has 64bit wide registers (and uses them for long long).
>
> If target_ulong is 64 bits, then abi_ulong is 64 bits too and
> therefore correct. Unless you want to enable the ABI32 feature? It is
> only enabled for the new Sparc32plus and PPC targets for now.
>
> But I put the original target_ulongs back.
I probably should have written "looks broken" than "is broken".
In any case, having abi_ulong not matching the ABI's "unsigned long"
is even more confusing than target_ulong not matching the ABI's
"unsigned long".
Now that I think of it again I believe the ABI32 feature isn't usable
for mips. The ABI-mandated structures are too different.
Thiemo
next prev parent reply other threads:[~2007-10-12 20:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-10 7:42 [Qemu-devel] RFC: fix run of 32 bits Linux executables on 64 bits targets J. Mayer
2007-10-10 8:18 ` Fabrice Bellard
2007-10-10 16:09 ` Blue Swirl
2007-10-10 17:49 ` Thiemo Seufer
2007-10-10 18:40 ` Fabrice Bellard
2007-10-10 19:02 ` Blue Swirl
2007-10-10 21:51 ` J. Mayer
2007-10-11 15:17 ` Thiemo Seufer
2007-10-11 15:47 ` Blue Swirl
2007-10-11 16:00 ` Thiemo Seufer
2007-10-11 19:26 ` Blue Swirl
2007-10-11 22:00 ` J. Mayer
2007-10-12 16:21 ` Blue Swirl
2007-10-12 18:42 ` Thiemo Seufer
2007-10-12 19:37 ` Blue Swirl
2007-10-12 20:24 ` Thiemo Seufer [this message]
2007-10-10 16:01 ` Blue Swirl
2007-10-10 18:42 ` J. Mayer
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=20071012202408.GM3379@networkno.de \
--to=ths@networkno.de \
--cc=blauwirbel@gmail.com \
--cc=l_indien@magic.fr \
--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).