That's only a partial solution : from my scan, the "asm" construction
occurs in these places in math.h :

dannypc: {16} fgrep -n asm src/mingw/include/math.h
334:  __asm__ ("fxam; fstsw %%ax;" : "=a" (sw): "t" (x));
355:  __asm__ ("fxam;"
364:  __asm__ ("fxam;"
373:  __asm__ ("fxam;"
390:  __asm__ ( "fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
396:  __asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
402:  __asm__ ("fxam; fstsw %%ax;": "=a" (stw) : "t" (x));
524:  __asm__ ("fxtract\n\t"
532:  __asm__ ("fxtract\n\t"
540:  __asm__ ("fxtract\n\t"
638:  __asm__ ("frndint;": "=t" (retval) : "0" (x));
645:  __asm__ ("frndint;" : "=t" (retval) : "0" (x) );
652:  __asm__ ("frndint;" : "=t" (retval) : "0" (x) );
659:  __asm__ __volatile__
667:  __asm__ __volatile__
675:  __asm__ __volatile__
683:  __asm__ __volatile__
691:  __asm__ __volatile__
699:  __asm__ __volatile__
817:  __asm__ ("fucom %%st(1);"
dannypc: {17} 

Your patch only addresses the lines between 634 and 703.

Some of the other constructions are less simple to fix, e.g. the first
one (definition of __fpclassifyl at line 362) doesn't appear to have an
equivalent anywhere else. There's no declaration for it in math.h, and
the only other mention of that function appears to be in
src/mingw/mingwex/math/fpclassifyl.c where it is coded in assembler
similar but slightly different from the implementation in math.h .

        Danny

On Tue, 2007-01-30 at 22:19 +0000, Nuno Lucas wrote:
> Some functions in math.h (like rint), are inlined in the math.h
> header, but fail to compile with an error when used:
> 
> <output>
> 
> [EMAIL PROTECTED]:~/prjs/wince/cegcc/test/math_h_header$ cat main.c
> #include <math.h>
> 
> int main( void )
> {
>     double i = rint( 3.14 );
>     return 0;
> }
> [EMAIL PROTECTED]:~/prjs/wince/cegcc/test/math_h_header$ 
> arm-wince-mingw32ce-gcc main.c
> main.c: In function 'main':
> /home/lucas/apps/mingw32ce/lib/gcc/arm-wince-mingw32ce/4.1.0/../../../../arm-wince-mingw32ce/include/math.h:638:
> error: impossible constraint in 'asm'
> 
> </output>
> 
> The following patch tries to fix this:
> 
> 
> --- math.h      2007-01-26 23:02:47.000000000 +0000
> +++ math.h      2007-01-27 01:41:11.000000000 +0000
> @@ -631,7 +631,7 @@
> 
>  /* Inline versions of above.
>     GCC 4.0+ can do a better fast-math job with __builtins. */
> -#if !(__MINGW_GNUC_PREREQ (4, 0) && defined __FAST_MATH__ )
> +#if !defined(__MINGW32CE__) && !(__MINGW_GNUC_PREREQ (4, 0) &&
> defined __FAST_MATH__ )
>  __CRT_INLINE double __cdecl rint (double x)
>  {
>    double retval;
> 
> 
> Regards,
> ~Nuno Lucas
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Cegcc-devel mailing list
> Cegcc-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/cegcc-devel
-- 
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info

Attachment: signature.asc
Description: This is a digitally signed message part

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Cegcc-devel mailing list
Cegcc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cegcc-devel

Reply via email to