From patchwork Fri Aug 6 22:38:27 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 61157 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 87C94B6EED for ; Sat, 7 Aug 2010 08:38:35 +1000 (EST) Received: (qmail 11023 invoked by alias); 6 Aug 2010 22:38:32 -0000 Received: (qmail 11014 invoked by uid 22791); 6 Aug 2010 22:38:32 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga11.intel.com (HELO mga11.intel.com) (192.55.52.93) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 06 Aug 2010 22:38:28 +0000 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 06 Aug 2010 15:35:55 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by fmsmga002.fm.intel.com with ESMTP; 06 Aug 2010 15:37:29 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id 2B85621278; Fri, 6 Aug 2010 15:38:27 -0700 (PDT) Date: Fri, 6 Aug 2010 15:38:27 -0700 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Subject: PATCH: PR target/45213: "suffix or operands invalid for `push'" triggered by optimisations on x86_64 Message-ID: <20100806223827.GA1400@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) 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 Hi, "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? Thanks. H.J. --- gcc/ 2010-08-08 H.J. Lu PR target/45213 * config/i386/i386.c (ix86_print_operand): Use int instead of long with REAL_VALUE_TO_TARGET_SINGLE. gcc/testsuite/ 2010-08-08 H.J. Lu PR target/45213 * gcc.target/i386/pr45213.c. diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 204211a..f461481 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -12914,7 +12914,7 @@ ix86_print_operand (FILE *file, rtx x, int code) else if (GET_CODE (x) == CONST_DOUBLE && GET_MODE (x) == SFmode) { REAL_VALUE_TYPE r; - long l; + int l; REAL_VALUE_FROM_CONST_DOUBLE (r, x); REAL_VALUE_TO_TARGET_SINGLE (r, l); --- /dev/null 2010-07-23 13:04:30.193381062 -0700 +++ gcc/gcc/testsuite/gcc.target/i386/pr45213.c 2010-08-06 15:15:03.680353825 -0700 @@ -0,0 +1,9 @@ +/* PR target/45213 */ +/* { dg-do assemble } */ +/* { dg-options "-Os -fno-omit-frame-pointer" } */ + +void f(float, float, float, float, float, float, float, float, float, float); + +void g() { + f(0,0,0,0, 0,0,0,0, -1,1); +}