* include/math.h (asm): Change to __asm__ throughout.

Expose ISO C99 functions if __GLIBCPP__.
	(hypotf): Use hypot, not _hypot in stub..
This commit is contained in:
Danny Smith 2002-08-20 23:26:11 +00:00
parent aabc7d585a
commit cfb5d4db12
2 changed files with 20 additions and 14 deletions

View File

@ -1,12 +1,18 @@
2002-08-20 Danny Smith <dannysmith@users.sourceforge.net 2002-08-21 Danny Smith <dannysmith@users.sourceforge.net>
* include/math.h (asm): Change to __asm__ throughout.
Expose ISO C99 functions if __GLIPCPP__.
(hypotf): Use hypot, not _hypot in stub.
2002-08-20 Danny Smith <dannysmith@users.sourceforge.net>
* include/tchar.h: Ansi-fy another comment. * include/tchar.h: Ansi-fy another comment.
2002-08-20 Danny Smith <dannysmith@users.sourceforge.net 2002-08-20 Danny Smith <dannysmith@users.sourceforge.net>
* include/tchar.h: Ansi-fy comment. * include/tchar.h: Ansi-fy comment.
2002-08-20 Danny Smith <dannysmith@users.sourceforge.net 2002-08-20 Danny Smith <dannysmith@users.sourceforge.net>
* test_headers.c : New file. * test_headers.c : New file.
* Makefile.in (test_headers): New target, using it, * Makefile.in (test_headers): New target, using it,

View File

@ -147,7 +147,7 @@ double sqrt (double);
extern __inline__ double sqrt (double x) extern __inline__ double sqrt (double x)
{ {
double res; double res;
asm ("fsqrt" : "=t" (res) : "0" (x)); __asm__ ("fsqrt;" : "=t" (res) : "0" (x));
return res; return res;
} }
double ceil (double); double ceil (double);
@ -156,7 +156,7 @@ double fabs (double);
extern __inline__ double fabs (double x) extern __inline__ double fabs (double x)
{ {
double res; double res;
asm ("fabs;" : "=t" (res) : "0" (x)); __asm__ ("fabs;" : "=t" (res) : "0" (x));
return res; return res;
} }
double ldexp (double, int); double ldexp (double, int);
@ -232,7 +232,7 @@ int fpclass (double);
#ifndef __NO_ISOCEXT #ifndef __NO_ISOCEXT
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \ #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
|| !defined __STRICT_ANSI__ || !defined __STRICT_ANSI__ || defined __GLIBCPP__
#define NAN (0.0F/0.0F) #define NAN (0.0F/0.0F)
#define HUGE_VALF (1.0F/0.0F) #define HUGE_VALF (1.0F/0.0F)
@ -437,7 +437,7 @@ extern long double logbl (long double);
extern __inline__ double logb (double x) extern __inline__ double logb (double x)
{ {
double res; double res;
asm ("fxtract\n\t" __asm__ ("fxtract\n\t"
"fstp %%st" : "=t" (res) : "0" (x)); "fstp %%st" : "=t" (res) : "0" (x));
return res; return res;
} }
@ -445,7 +445,7 @@ extern __inline__ double logb (double x)
extern __inline__ float logbf (float x) extern __inline__ float logbf (float x)
{ {
float res; float res;
asm ("fxtract\n\t" __asm__ ("fxtract\n\t"
"fstp %%st" : "=t" (res) : "0" (x)); "fstp %%st" : "=t" (res) : "0" (x));
return res; return res;
} }
@ -453,7 +453,7 @@ extern __inline__ float logbf (float x)
extern __inline__ long double logbl (long double x) extern __inline__ long double logbl (long double x)
{ {
long double res; long double res;
asm ("fxtract\n\t" __asm__ ("fxtract\n\t"
"fstp %%st" : "=t" (res) : "0" (x)); "fstp %%st" : "=t" (res) : "0" (x));
return res; return res;
} }
@ -481,21 +481,21 @@ extern long double cbrtl (long double);
extern __inline__ float fabsf (float x) extern __inline__ float fabsf (float x)
{ {
float res; float res;
asm ("fabs;" : "=t" (res) : "0" (x)); __asm__ ("fabs;" : "=t" (res) : "0" (x));
return res; return res;
} }
extern __inline__ long double fabsl (long double x) extern __inline__ long double fabsl (long double x)
{ {
long double res; long double res;
asm ("fabs;" : "=t" (res) : "0" (x)); __asm__ ("fabs;" : "=t" (res) : "0" (x));
return res; return res;
} }
/* 7.12.7.3 */ /* 7.12.7.3 */
extern double hypot (double, double); /* in libmoldname.a */ extern double hypot (double, double); /* in libmoldname.a */
extern __inline__ float hypotf (float x, float y) extern __inline__ float hypotf (float x, float y)
{ return (float) _hypot (x, y);} { return (float) hypot (x, y);}
extern long double hypotl (long double, long double); extern long double hypotl (long double, long double);
/* 7.12.7.4 The pow functions. Double in C89 */ /* 7.12.7.4 The pow functions. Double in C89 */
@ -507,14 +507,14 @@ extern long double powl (long double, long double);
extern __inline__ float sqrtf (float x) extern __inline__ float sqrtf (float x)
{ {
float res; float res;
asm ("fsqrt" : "=t" (res) : "0" (x)); __asm__ ("fsqrt" : "=t" (res) : "0" (x));
return res; return res;
} }
extern __inline__ long double sqrtl (long double x) extern __inline__ long double sqrtl (long double x)
{ {
long double res; long double res;
asm ("fsqrt" : "=t" (res) : "0" (x)); __asm__ ("fsqrt" : "=t" (res) : "0" (x));
return res; return res;
} }