* i386-mingw32-gcc can't find register in class FP_TOP_REG
@ 2003-05-13 19:55 Bernd Jendrissek
0 siblings, 0 replies; only message in thread
From: Bernd Jendrissek @ 2003-05-13 19:55 UTC (permalink / raw)
To: gcc
[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]
Hi
I have a compiler error at -O2 that goes away at -O0:
/mnt/disk2/src/mingw/mingw-runtime-3.0/mingwex: PATH=/usr/cross/bin:$PATH i386-mingw32-gcc -c -g -O2 -fomit-frame-pointer -I ./../../w32api/include -I. -I./../include -nostdinc -nostdinc++ -iwithprefixbefore include -da ./math/pow.c -o pow.o
math/pow.c: In function `pow':
../include/math.h:174: error: can't find a register in class `FP_TOP_REG' while reloading `asm'
Here's that part of the header:
#if !defined (__NO_INLINES__)
extern __inline__ __cdecl double fabs (double x)
{
double res;
__asm__ ("fabs;" : "=t" (res) : "0" (x));
return res;
}
#endif
/usr/src/home: cat /mnt/disk2/src/gcc/LAST_UPDATED
Tue May 13 17:39:22 SAST 2003
Tue May 13 15:39:22 UTC 2003
Unfortunately I don't know what do do with all those -da output files.
But I do have a testcase derived from the mingw-runtime and w32-api sources
(attached).
--
bernd.jendrissek@mailbox.co.za is probably better to bookmark than any
employer-specific email address I may have appearing in the headers.
[-- Attachment #2: powcrash.c --]
[-- Type: text/plain, Size: 691 bytes --]
/* Run like so:
/usr/cross/bin/i386-mingw32-gcc -c -O2 -Wall powcrash.c -o powcrash.o
*/
# ifndef _CRTIMP
# define _CRTIMP __declspec(dllimport)
# endif
# ifndef __cdecl
# define __cdecl __attribute__((cdecl))
# endif
_CRTIMP double __cdecl floor (double);
_CRTIMP double __cdecl fabs (double);
extern __inline__ __cdecl double fabs (double x)
{
double res;
__asm__ ("fabs;" : "=t" (res) : "0" (x));
return res;
}
double pow(double x, double y)
{
double ya;
double yb;
int yoddint;
yoddint = 0;
/* Test for odd integer y. */
ya = floor(0.5);
yb = 0.5 * fabs(0.0);
if( ya != yb )
yoddint = 1;
if( y < 0.0 ) {
if( yoddint )
return( 0.0 );
}
return( 0.0 );
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-05-13 19:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-13 19:55 i386-mingw32-gcc can't find register in class FP_TOP_REG Bernd Jendrissek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).