From patchwork Sat Aug 7 10:45:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 61177 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 70404B70A4 for ; Sat, 7 Aug 2010 20:45:30 +1000 (EST) Received: (qmail 26587 invoked by alias); 7 Aug 2010 10:45:28 -0000 Received: (qmail 26574 invoked by uid 22791); 7 Aug 2010 10:45:26 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, TW_ZJ, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-qw0-f47.google.com (HELO mail-qw0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 07 Aug 2010 10:45:21 +0000 Received: by qwg8 with SMTP id 8so6013390qwg.20 for ; Sat, 07 Aug 2010 03:45:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.1.103 with SMTP id 39mr5423451qce.253.1281177919598; Sat, 07 Aug 2010 03:45:19 -0700 (PDT) Received: by 10.229.46.67 with HTTP; Sat, 7 Aug 2010 03:45:19 -0700 (PDT) In-Reply-To: References: Date: Sat, 7 Aug 2010 12:45:19 +0200 Message-ID: Subject: Re: PATCH: PR target/45213: "suffix or operands invalid for `push'" triggered by optimisations on x86_64 From: Uros Bizjak To: gcc-patches@gcc.gnu.org Cc: "H.J. Lu" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Sat, Aug 7, 2010 at 12:11 PM, Uros Bizjak wrote: >> "pushq $imm32S" only takes 32bit signed extended immediate. You can't push >> 0xbf800000. Instead, you push -1082130432 or 0xffffffffbf800000.  This >> patch makes it signed.  OK for trunk/4.5/4.4? > > No, see the comment in real.h: > > /* IN is a REAL_VALUE_TYPE.  OUT is a long.  */ > #define REAL_VALUE_TO_TARGET_SINGLE(IN, OUT) \ >  ((OUT) = real_to_target (NULL, &(IN), mode_for_size (32, MODE_FLOAT, 0))) IMO, this is correct patch, to also generate correct extension on ILP32 hosts. Uros. Index: i386.c =================================================================== --- i386.c (revision 162975) +++ i386.c (working copy) @@ -12921,7 +12921,7 @@ if (ASSEMBLER_DIALECT == ASM_ATT) putc ('$', file); - fprintf (file, "0x%08lx", (long unsigned int) l); + fprintf (file, "0x%08llx", (unsigned long long) (int) l); } /* These float cases don't actually occur as immediate operands. */