This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: Libffi (git master) and guile (git master) on MIPS n32
- From: Andrew Pinski <pinskia at gcc dot gnu dot org>
- To: rixed at happyleptic dot org, loongson-dev at googlegroups dot com, guile-user at gnu dot org, libffi-discuss at sources dot redhat dot com, green at redhat dot com
- Date: Mon, 7 Feb 2011 13:58:07 -0800
- Subject: Re: Libffi (git master) and guile (git master) on MIPS n32
- References: <20110207214150.GA31804@yeeloong.happyleptic.org>
On Mon, Feb 7, 2011 at 1:41 PM, <rixed@happyleptic.org> wrote:
> The problem is : of these 64 bits, only the 32 lowest bits were set by
> guile, and the upper 32 are desperately random.
How were those lower 32bits set? If set by the 32bit instructions
then it is automatically sign extended. If not then there is a bug in
how guile is doing the returns
Unless you have a bug somewhere in which you are using a non sign
extended value with the 32bit instructions which then it becomes
undefined at what the value of those instructions do (could be either
treating it as a 64bit value, or do a sign extend or even put
0xDEADBEEFDEADBEEF in the register which is what the Octeon simulators
do).
-- Pinski