From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25569 invoked by alias); 27 Dec 2002 16:56:00 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 25550 invoked by uid 71); 27 Dec 2002 16:56:00 -0000 Resent-Date: 27 Dec 2002 16:56:00 -0000 Resent-Message-ID: <20021227165600.25549.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, jh@suse.cz Resent-Reply-To: gcc-gnats@gcc.gnu.org, kelleycook@comcast.net Received: (qmail 17541 invoked by uid 61); 27 Dec 2002 16:51:06 -0000 Message-Id: <20021227165106.17540.qmail@sources.redhat.com> Date: Fri, 27 Dec 2002 08:56:00 -0000 From: kelleycook@comcast.net Reply-To: kelleycook@comcast.net To: gcc-gnats@gcc.gnu.org Cc: jh@suse.cz X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) X-GNATS-Notify: jh@suse.cz Subject: target/9068: [x86] comisd & comiss intel-syntax constraints are incorrect X-SW-Source: 2002-12/txt/msg01316.txt.bz2 List-Id: >Number: 9068 >Category: target >Synopsis: [x86] comisd & comiss intel-syntax constraints are incorrect >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Fri Dec 27 08:56:00 PST 2002 >Closed-Date: >Last-Modified: >Originator: kelleycook@comcast.net >Release: gcc version 3.3 20021223 (prerelease) >Organization: >Environment: CYGWIN_NT-5.1 KELLEYCOOK 1.3.18(0.69/3/2) 2002-12-25 15:37 i686 unknown >Description: This testcase: int ice_using_intel_syntax(int count, double sum) { int test; test = (sum/count > 0.0000001); return test; } crashes with ice_using_intel_syntax.c: In function `ice_using_intel_syntax': ice_using_intel_syntax.c:5: output_operand: operand number missing after %-letter Please submit a full bug report, with preprocessed source if appropriate. See for instructions. on 3.2.x, 3.3-branch, and mainline when compiled with -masm=intel and enabling SSE2. The problem results from a typo in the Intel alternative constaints for "comisd". The same typo exists in "comiss", so I corrected that one also. This error has existed since the patterns were added by Jan Hubicka on version 1.217, 2001/02/13 22:32:32. >How-To-Repeat: gcc -Wall -march=pentium4 -ffast-math -mfpmath=sse -masm=intel ice_using_intel_syntax.c >Fix: 2002-12-26 Kelley Cook * config/i386/i386.c (output_fp_compare): Correct typo in the Intel alternatives for the commisd and comiss patterns. --- config/i386/i386.c.orig 2002-12-27 11:03:30.656250000 -0500 +++ config/i386/i386.c 2002-12-27 11:04:01.187500000 -0500 @@ -7484,12 +7484,12 @@ output_fp_compare (insn, operands, eflag if (unordered_p) return "ucomiss\t{%1, %0|%0, %1}"; else - return "comiss\t{%1, %0|%0, %y}"; + return "comiss\t{%1, %0|%0, %1}"; else if (unordered_p) return "ucomisd\t{%1, %0|%0, %1}"; else - return "comisd\t{%1, %0|%0, %y}"; + return "comisd\t{%1, %0|%0, %1}"; } if (! STACK_TOP_P (cmp_op0)) This was made Applies to the current gcc-3_3-branch. Jugding by CVS annotate, it should also applies cleanly to mainline and gcc-3_2-branch if it is deemed a regression. The testcase will compile under 3.0.x, since the comis[sd] patterns didn't exist then. >Release-Note: >Audit-Trail: >Unformatted: