This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] arm_store_return_value, big-endian (take 2)
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Michael Snyder <msnyder at redhat dot com>
- Cc: Richard dot Earnshaw at arm dot com, gdb-patches at sources dot redhat dot com, cagney at redhat dot com, kevinb at redhat dot com
- Date: Sat, 09 Nov 2002 11:54:37 +0000
- Subject: Re: [RFA] arm_store_return_value, big-endian (take 2)
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> Richard Earnshaw wrote:
> >
> > > Richard Earnshaw wrote:
> > > >
> > > > Leaving asside the issue of the correctness of write_register_bytes (note
> > > > to self, must finish of my register patches), I don't think this is
> > > > correct -- in fact, I think it's also wrong for little-endian as well.
> > > >
> > > > What should happen is that the smaller-than-word value should be
> > > > zero/sign-extended to 32 bits and then the whole thing stored in A1_REGNUM.
> > >
> > > Ah, thanks. OK, how about this?
> > >
> > > 2002-11-06 Michael Snyder <msnyder@redhat.com>
> > >
> > > * arm-tdep.c (arm_store_return_value): Handle offset of
> > > small types on big-endian machines.
> >
> > And for little-endian?
>
> It already works for little-endian. I've tested this with
> arm-sim, arm-sim/-mbig-endian, and arm-sim/-mthumb.
But it's not zero/sign extending properly for little-endian, so garbage is
remaining in the top part of A1
R.