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]" Subject: Re: different binary output with 32- and 64-bit hosted compilers In-reply-to: X-012-Sender: halo1 AT inter DOT net DOT il To: djgpp AT delorie DOT com Message-id: <837fo8byx8.fsf@gnu.org> References: <83d1y2cf7e DOT fsf AT gnu DOT org> <83fv2wc2jf DOT fsf AT gnu DOT org> 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 Precedence: bulk > Date: Wed, 2 Sep 2015 18:18:56 +0300 > From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" > > On 9/2/15, Eli Zaretskii (eliz AT gnu DOT org) [via 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]" > >> > >> > >> > -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?