qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] RFC: fix run of 32 bits Linux executables on 64 bits ta


From: Thiemo Seufer
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
User-agent: Mutt/1.5.16 (2007-06-11)

Blue Swirl wrote:
> On 10/12/07, Thiemo Seufer <address@hidden> 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




reply via email to

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