From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12763 invoked by alias); 9 Feb 2003 18: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 12745 invoked by uid 71); 9 Feb 2003 18:56:00 -0000 Resent-Date: 9 Feb 2003 18:56:00 -0000 Resent-Message-ID: <20030209185600.12743.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 Resent-Reply-To: gcc-gnats@gcc.gnu.org, pgw99@doc.ic.ac.uk Received: (qmail 12550 invoked by uid 48); 9 Feb 2003 18:54:25 -0000 Message-Id: <20030209185425.12549.qmail@sources.redhat.com> Date: Sun, 09 Feb 2003 18:56:00 -0000 From: pgw99@doc.ic.ac.uk Reply-To: pgw99@doc.ic.ac.uk To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: inline-asm/9637: arguments passed/return to asm block via mmx registers trigger failure X-SW-Source: 2003-02/txt/msg00439.txt.bz2 List-Id: >Number: 9637 >Category: inline-asm >Synopsis: arguments passed/return to asm block via mmx registers trigger failure >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Sun Feb 09 18:56:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Philip Graham Willoughby >Release: gcc-3.2.2 >Organization: >Environment: SuSE Linux 7.2, glibc 2.2.2, binutils 2.13.1 >Description: This error occurs with -O: test.c: In function `AMD_sqrt': test.c:18: Internal compiler error in fixup_var_refs_1, at function.c:1966 and this error without: test.c: In function `AMD_sqrt': test.c:18: Internal compiler error in instantiate_virtual_regs_1, at function.c:3971 When attempting to compile the following: float AMD_sqrt (float param) { long long a, b, c; memcpy (&c, ¶m, sizeof (float)); c >>= 32; asm("pfrsqrt %y1, %y0 \n\t" "movq %y2, %y1 \n\t" "pfmul %y1, %y1 \n\t" "pfrsqit1 %y1, %y0 \n\t" "pfrcpit2 %y1, %y2 \n\t" "pfmul %y0, %y1 \n\t" : "=y" (c), "=y" (a), "=y" (b) :"0" (c)); memcpy (¶m, &c, sizeof (float)); c <<= 32; return param; } I have not used MMX assembler in GCC before, so I am willing to be told I'm responsible for this error. However, I think it'd be best if it didn't fail in quite so dramatic a way. >How-To-Repeat: gcc -c -o test.o test.c Where test.c contains the above code. Adding/removing -O will let you see both cases. >Fix: >Release-Note: >Audit-Trail: >Unformatted: