From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18851 invoked by alias); 5 Apr 2012 13:32:02 -0000 Received: (qmail 18836 invoked by uid 22791); 5 Apr 2012 13:32:00 -0000 X-SWARE-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Apr 2012 13:31:47 +0000 Received: by pbcum15 with SMTP id um15so1451882pbc.20 for ; Thu, 05 Apr 2012 06:31:47 -0700 (PDT) Received: by 10.68.241.41 with SMTP id wf9mr6933551pbc.134.1333632707000; Thu, 05 Apr 2012 06:31:47 -0700 (PDT) Received: from PaulHP (124-149-166-113.dyn.iinet.net.au. [124.149.166.113]) by mx.google.com with ESMTPS id l6sm3283325pbp.33.2012.04.05.06.31.43 (version=SSLv3 cipher=OTHER); Thu, 05 Apr 2012 06:31:45 -0700 (PDT) Message-ID: From: "Paul Edwards" To: "Ulrich Weigand" Cc: References: <201108221222.p7MCMYlQ023734@d06av02.portsmouth.uk.ibm.com> In-Reply-To: <201108221222.p7MCMYlQ023734@d06av02.portsmouth.uk.ibm.com> Subject: Re: i370 port Date: Thu, 05 Apr 2012 13:32:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original 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: 2012-04/txt/msg00190.txt.bz2 Hi Ulrich. I'm getting back to this after a long hiatus. 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. 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? I'll give that a try tomorrow. Thanks. Paul. -----Original Message----- From: Ulrich Weigand Sent: Monday, August 22, 2011 10:22 PM To: Paul Edwards Cc: gcc@gcc.gnu.org Subject: Re: i370 port Paul Edwards wrote: > if (operands[1] == const0_rtx) > { > CC_STATUS_INIT; > mvs_check_page (0, 6, 8); > return \"MVC %O0(8,%R0),=XL8'00'\"; > } > mvs_check_page (0, 6, 8); > return \"MVC %O0(8,%R0),%1\"; > }" > [(set_attr "length" "8")] > ) > > forces it to use XL8'00' instead of the default F'0' and that > seems to work. Does that seem like a proper solution to > you? Well, there isn't really anything special about const0_rtx. *Any* CONST_INT that shows up as second operand to the movdi pattern must be emitted into an 8 byte literal at this point. You can do that inline; but the more usual way would be to define an operand print format that encodes the fact that a 64-bit operand is requested. In fact, looking at the i370.h PRINT_OPERAND, there already seems to be such a format: 'W'. (Maybe not quite; since 'W' sign-extends a 32-bit operand to 64-bit. But since 'W' doesn't seem to be used anyway, maybe this can be changed.) Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com