X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Recipient: djgpp AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Guzqthxk1pmXgU9Ocy5Vd0/5td4Zvbq5uhpH9d+rb84=; b=YSwHKsNhyxdhlNnA3IpFR/WxRe7sDQzzpq1oaTHjFIflG7X23ew9UIzmZk9SbPXlLs 1aiHrXM79o0jlkEMO8p7kMhQKMXrB1WcHZOnUct++wuLmsv0DYr5pM5GISGPne87nGsT BcteEDGbARmup9WEnDggJC8Vtt9t4aY+onOpG5vlK5dYE68skzhmkKG4kFeFid13pBIv qOKD4pXjOqI0tpHzpT10l5qm61Nrc3MR6EnQwZxH8fMQW514mrJlBU0vnCXcRgLIFHyM DnBdjdDiDI0WGvx7fYwn2x+IVT4oswvmgJyGWZV2tkQffM4TCaIwMt7xNGSmxpLtqVzA dhQA== MIME-Version: 1.0 X-Received: by 10.107.27.195 with SMTP id b186mr36903999iob.140.1441131720836; Tue, 01 Sep 2015 11:22:00 -0700 (PDT) In-Reply-To: References: <83d1y2cf7e DOT fsf AT gnu DOT org> Date: Tue, 1 Sep 2015 21:22:00 +0300 Message-ID: Subject: Re: different binary output with 32- and 64-bit hosted compilers From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" To: djgpp AT delorie DOT com Content-Type: text/plain; charset=UTF-8 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 On 9/1/15, Ozkan Sezer wrote: > On 9/1/15, Eli Zaretskii (eliz AT gnu DOT org) [via djgpp AT delorie DOT com] > wrote: >>> Date: Tue, 1 Sep 2015 18:20:56 +0300 >>> From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" >>> >>> >>> 32-bit (i686-linux fedora-9) and 64-bit (x86_64-linux fedora-20) hosted >>> djgpp-targeting compiler generates different output for some sources. >>> This happens with djgpp source itself too, and it isn't a nice thing >>> and was not an expected thing for me. Did the following with gcc-3.4.6: >>> >>> Compiled djgpp-cvs with a 32- and 64-bit hosted toolchain (gcc-3.4.6 >>> and binutils-2.25.1), then did: >>> diff -urp --exclude=*.d --exclude=id_*.o --exclude=stub* \ >>> --exclude=*.tex --exclude=*.exe --exclude=djasm.c \ >>> 32/src 64/src > 64.diff >>> ... which results in this: >> >> Looks like sign extension and register allocation differences. >> >> GCC 3.4.6 is quite old, could well be a compiler bug. Maybe it's a >> good idea to repeat this experiment with a newer version, like 4.9.x? >> > > Tried with gcc5, not as bad as gcc-3.4.6 but still shows a difference Also used the same gcc5 on x86 and x86_64 host to compile our dxe files in q2dos project, some of them did differ.