From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28141 invoked by alias); 6 Apr 2012 18:13:15 -0000 Received: (qmail 28133 invoked by uid 22791); 6 Apr 2012 18:13:14 -0000 X-SWARE-Spam-Status: No, hits=-4.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,MSGID_FROM_MTA_HEADER,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from e06smtp16.uk.ibm.com (HELO e06smtp16.uk.ibm.com) (195.75.94.112) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Apr 2012 18:13:00 +0000 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 6 Apr 2012 19:12:59 +0100 Received: from d06nrmr1307.portsmouth.uk.ibm.com (9.149.38.129) by e06smtp16.uk.ibm.com (192.168.101.146) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 6 Apr 2012 19:12:57 +0100 Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1307.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q36ICv102842666 for ; Fri, 6 Apr 2012 19:12:57 +0100 Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q36ICuYE019858 for ; Fri, 6 Apr 2012 12:12:56 -0600 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id q36ICtm9019855; Fri, 6 Apr 2012 12:12:55 -0600 Message-Id: <201204061812.q36ICtm9019855@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Fri, 06 Apr 2012 20:12:55 +0200 Subject: Re: i370 port To: mutazilah@gmail.com (Paul Edwards) Date: Fri, 06 Apr 2012 18:13:00 -0000 From: "Ulrich Weigand" Cc: gcc@gcc.gnu.org In-Reply-To: from "Paul Edwards" at Apr 05, 2012 11:31:39 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit x-cbid: 12040618-3548-0000-0000-0000018E44D0 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: 2012-04/txt/msg00214.txt.bz2 Paul Edwards wrote: > I have reviewed the 'W' code in PRINT_OPERAND: > > else if (CODE == 'W') > { > /* hand-built sign-extension of signed 32-bit to 64-bit */ > mvs_page_lit += 8; > if (0 <= INTVAL (XV)) { > fprintf (FILE, "=XL8'00000000"); > } else { > fprintf (FILE, "=XL8'FFFFFFFF"); > } > fprintf (FILE, "%08X'", INTVAL (XV)); > } > > and it looks to me like it is already correct. If movdi is given a > const_int as a parameter, then sign-extending to 64-bit is > exactly what needs to happen, isn't it? > > I'm only expecting to compile programs as 32-bit, so I'm not > expecting more than 32-bit integers. The IFOX assembler > won't do more than that. In case that's the issue. Well, even on 32-bit you may get 64-bit integer constants, e.g. via the "long long" data type: long long x = 0x123456789abcdefLL; However, the real question in your case is whether those are represented as CONST_INT. This is only true if HOST_WIDE_INT is a 64-bit type; otherwise, such constants would be represented as a CONST_DOUBLE. Whether or not HOST_WIDE_INT is a 64-bit type now depends on which *host* you're building GCC as a cross-compiler on. If you only ever support 32-bit hosts, then HOST_WIDE_INT will always be a 32-bit type, and the code above should be fine. If you want to support 64-bit hosts as well, however, you will need to handle 64-bit CONST_INT values too. > But regardless I don't know how to make this code: > > mvs_check_page (0, 6, 8); > return \"MVC^I%O0(8,%R0),%1\"; > > make use of that 'W' operand. > > Do I change that %1 to %W1 perhaps? Yes, exactly. Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com