From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6114 invoked by alias); 15 Jun 2009 17:46:21 -0000 Received: (qmail 6104 invoked by uid 22791); 15 Jun 2009 17:46:20 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mtagate8.de.ibm.com (HELO mtagate8.de.ibm.com) (195.212.29.157) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Jun 2009 17:46:13 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate8.de.ibm.com (8.14.3/8.13.8) with ESMTP id n5FHjX0D720890 for ; Mon, 15 Jun 2009 17:45:33 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n5FHjTVD3264696 for ; Mon, 15 Jun 2009 19:45:32 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n5FHjTKK029902 for ; Mon, 15 Jun 2009 19:45:29 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id n5FHjSul029896; Mon, 15 Jun 2009 19:45:28 +0200 Message-Id: <200906151745.n5FHjSul029896@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 15 Jun 2009 19:45:28 +0200 Subject: Re: i370 port To: mutazilah@gmail.com (Paul Edwards) Date: Mon, 15 Jun 2009 17:46:00 -0000 From: "Ulrich Weigand" Cc: drow@false.org (Daniel Jacobowitz), gcc@gcc.gnu.org In-Reply-To: <25D4C7F8A9394EA2A1A2D67B1DFF6472@Paullaptop> from "Paul Edwards" at Jun 07, 2009 01:00:30 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-06/txt/msg00319.txt.bz2 Paul Edwards wrote: > One of the things that I experienced when porting 3.2.3 to MVS > was that GCC was sensitive to the exact floating point representation. > > Register selection was different depending on those slight differences. > > Below is what documentation I have for it. Dave Edwards, who > wrote another S/370 emulator, was the one who discovered that. > > Does anyone know if that was changed somewhere along the line? > > BFN. Paul. > > > > 17. The assembler code generated by gccmvs when run on the > PC is slightly different (even when the same parameters > are used for code generation) from that when run on the > mainframe, if -O2 is used instead of -Os. But functionally > equivalent. This non-deterministic nature of the compiler > is disconcerting. It seems to not always allocate registers > consistently. This has been traced to floating point code > in predict.c and local-alloc.c which is sensitive to the > very small changes in floating point representation. This > should be changed to include deltas when comparing floating > point values. Here's an example of what's happening: I agree that GCC output should not depend on details of the host floating point representation. (Ideally, the output of GCC built as a cross-compiler should not depend on the host architecture at all.) However, it is hard to say whether such observations made on a GCC 3.2 code base have any relevance to the current code -- for example, local-alloc.c does not even exist any more, we now have a completely new register allocator. I'd recommend you go ahead with a port to current mainline and verify whether you still see problems along those lines; if so, it would be appropriate to open a bug report against GCC. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com