Article View: gnu.gcc.bug
Article #2413asms that only work unoptimized
From: Benson I. Margulies Kendall Squa...
Date: Fri, 17 Mar 1989 13:38
Date: Fri, 17 Mar 1989 13:38
43 lines
1367 bytes
1367 bytes
In gcc 1.34, the following compiles correctly (it seems) and without
error only so long as -O is not provided on the command line.
When -O is given, I get:
sasm.c: In function set_fpastatus:
sasm.c:5: inconsistent operand constraints in an `asm'
gcc: Program cc1 got fatal signal 4.
This is also a test case for the rejection of "asm volatile"
in -traditional mode.
void
set_fpastatus(value)
long value;
{
asm volatile ("ld %0,%%fsr" : : "m" (value));
}
long
get_fpastatus()
{
long ret;
asm ("st %%fsr,%0" : "=m" (ret));
return ret;
}
void
sparc_compare_single_floats(f1, f2)
float f1;
float f2;
{
asm volatile ("fcmps %0,%1" : : "f" (f1), "f" (f2));
}
void
sparc_compare_double_floats(f1, f2)
double f1;
double f2;
{
asm volatile ("fcmpd %0,%1" : : "f" (f1), "f" (f2));
}
Technical Details
Message-ID:
<8903171338.AA16420@rikers.ksr.com>Path:
arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!HARVARD.HARVARD.EDU!ksr!bensonShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!attcan!uunet!tut.cis.ohio-state.edu!HARVARD.HARVARD.EDU!ksr!benson From: ksr!benson@HARVARD.HARVARD.EDU (Benson I. Margulies Kendall Square Research Corp.) Newsgroups: gnu.gcc.bug Subject: asms that only work unoptimized Message-ID: <8903171338.AA16420@rikers.ksr.com> Date: 17 Mar 89 13:38:04 GMT Sender: daemon@tut.cis.ohio-state.edu Reply-To: benson@ksr.com Distribution: gnu Organization: GNUs Not Usenet Lines: 43