This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
inline-asm/9637: arguments passed/return to asm block via mmx registers trigger failure
- From: pgw99 at doc dot ic dot ac dot uk
- To: gcc-gnats at gcc dot gnu dot org
- Date: 9 Feb 2003 18:54:25 -0000
- Subject: inline-asm/9637: arguments passed/return to asm block via mmx registers trigger failure
- Reply-to: pgw99 at doc dot ic dot ac dot uk
>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: