qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] gnu-c99-math.h include file
@ 2005-04-07 19:32 Ben Taylor
  0 siblings, 0 replies; 3+ messages in thread
From: Ben Taylor @ 2005-04-07 19:32 UTC (permalink / raw)
  To: qemu-devel

Downloaded a tarball of the latest cvs bits to see about
getting the latest changes melded with the working solaris
host bits.

In fpu/softfloat-native.h, there is an include
#include "gnu-c99-math.h" that is not part of 
any of the gnu software I have loaded.

I dropped that into google and didn't have any success 
finding  any references at all to it.  Can someone point 
me at it?

Thanks,

Ben

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] gnu-c99-math.h include file
@ 2005-04-08  8:33 Juergen Keil
  2005-04-08 11:39 ` Paul Brook
  0 siblings, 1 reply; 3+ messages in thread
From: Juergen Keil @ 2005-04-08  8:33 UTC (permalink / raw)
  To: sol10x86, qemu-devel



> Downloaded a tarball of the latest cvs bits to see about
> getting the latest changes melded with the working solaris
> host bits.
> 
> In fpu/softfloat-native.h, there is an include
> #include "gnu-c99-math.h" that is not part of 
> any of the gnu software I have loaded.

I've invented this file, to work around the problem that some of the
new C99 "math.h" features/macros like isnormal(), isgreater(),
isunordered(), etc... cannot be compiled with GNUC 3.4.x on Solaris 10
(the new macros can only be used with Sun's C-Compiler)



% cat gnu-c99-math.h
#if defined(__SVR4) && defined(__GNUC__)

/*
 * C99 7.12.3 classification macros
 * and
 * C99 7.12.14 comparison macros
 *
 * ... do not work on Solaris 10 using GNU CC 3.4.x.
 * Try to workaround the missing / broken C99 math macros.
 */
#include <ieeefp.h>

#define isnormal(x)             (fpclass(x) >= FP_NZERO)

#define isgreater(x, y)         ((x) > (y))
#define isgreaterequal(x, y)    ((x) >= (y))
#define isless(x, y)            ((x) < (y))
#define islessequal(x, y)       ((x) <= (y))

#define isunordered(x,y)        unordered(x, y)

#endif

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] gnu-c99-math.h include file
  2005-04-08  8:33 [Qemu-devel] gnu-c99-math.h include file Juergen Keil
@ 2005-04-08 11:39 ` Paul Brook
  0 siblings, 0 replies; 3+ messages in thread
From: Paul Brook @ 2005-04-08 11:39 UTC (permalink / raw)
  To: qemu-devel

> #include <ieeefp.h>
>
> #define isnormal(x)             (fpclass(x) >= FP_NZERO)
>
> #define isgreater(x, y)         ((x) > (y))
> #define isgreaterequal(x, y)    ((x) >= (y))
> #define isless(x, y)            ((x) < (y))
> #define islessequal(x, y)       ((x) <= (y))

These are not correct. eg. You should be using

#define isgreater(x, y) ((!unordered(x, y)) && ((x) > (y))

Paul

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-04-08 11:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-08  8:33 [Qemu-devel] gnu-c99-math.h include file Juergen Keil
2005-04-08 11:39 ` Paul Brook
  -- strict thread matches above, loose matches on Subject: below --
2005-04-07 19:32 Ben Taylor

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 NNTP newsgroup(s).