delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2015/09/02/11:53:34

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
Date: Wed, 02 Sep 2015 18:53:23 +0300
From: "Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
Subject: Re: different binary output with 32- and 64-bit hosted compilers
In-reply-to: <CAA2C=vDk747gQcYU+j9TL_QFiikkYkcENLYFO1mSSOa7dSv5nA@mail.gmail.com>
X-012-Sender: halo1 AT inter DOT net DOT il
To: djgpp AT delorie DOT com
Message-id: <837fo8byx8.fsf@gnu.org>
References: <CAA2C=vBjWACN4ZNsYTeCWXOr9vU9s2s23ZaXvLuCgE=OEWK1Vg AT mail DOT gmail DOT com> <83d1y2cf7e DOT fsf AT gnu DOT org> <CAA2C=vCu9fjcEDr_3_FLMXoRzuvmXw57zRkwchbYRD1SpqS4NA AT mail DOT gmail DOT com> <ms63dr$3k4$1 AT speranza DOT aioe DOT org> <CAA2C=vABL08je+e-uOpgkSAR+_Zrs80AkAzQEbXUc6CJhOq4AA AT mail DOT gmail DOT com> <83fv2wc2jf DOT fsf AT gnu DOT org> <CAA2C=vDk747gQcYU+j9TL_QFiikkYkcENLYFO1mSSOa7dSv5nA AT mail DOT gmail DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Wed, 2 Sep 2015 18:18:56 +0300
> From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
> 
> On 9/2/15, Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com]
> <djgpp AT delorie DOT com> wrote:
> >> Date: Wed, 2 Sep 2015 10:18:24 +0300
> >> From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]"
> >> <djgpp AT delorie DOT com>
> >>
> >> > -858993459 and 3435973837 is the same number on a 32-bit
> >> > two-complements machine (you'll get the same bit pattern in the
> >> > memory). Likewise -858993460 and 3435973836.
> >> >
> >> > I say all the others are as well but I haven't verified that.
> >>
> >> I have a source that gives the following asm output difference
> >>
> >> --- g_weapon.s
> >> +++ ../../g_weapon.s
> >> @@ -4526,7 +4526,7 @@
> >>  	.long	1065353216
> >>  	.p2align 3
> >>  LC5:
> >> -	.long	-1717986918
> >> +	.long	2576980378
> >>  	.long	1069128089
> >>  	.p2align 2
> >>  LC13:
> >
> > They are again the same bit pattern, only represented as a signed or
> > unsigned value.
> >
> >> ... and results in different *.o.
> >
> > Can you disassemble the *.o files and show the differences?
> >
> 
> See attached tarball. The source in question is here:
> https://bitbucket.org/neozeed/q2dos/ (see: game/g_weapon.c )

Looks like the only difference is some alignment issue, perhaps the
64-bit compiler wants to align stronger.

Could someone who feels more at home with assembly please take a look?
DJ?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019