* device/lib/acosf.c (acosf),
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 31 Aug 2004 04:19:16 +0000 (04:19 +0000)
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 31 Aug 2004 04:19:16 +0000 (04:19 +0000)
* device/lib/asinf.c (asinf),
* device/lib/atanf.c (atanf),
* device/lib/ceilf.c (ceilf),
* device/lib/cosf.c (cosf),
* device/lib/coshf.c (coshf),
* device/lib/cotf.c (cotf),
* device/lib/fabsf.c (fabsf),
* device/lib/floorf.c (floorf),
* device/lib/log10f.c (log10f),
* device/lib/logf.c (logf),
* device/lib/sinf.c (sinf),
* device/lib/sinhf.c (sinhf),
* device/lib/sqrtf.c (sqrtf),
* device/lib/tanf.c (tanf),
* device/lib/tanhf.c (tanhf),
* device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
replaced all instances of "reentrant" in the library functions
defined in math.h with this macro.
* support/regression/tests/float_trans.c: reenabled test for hc08

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@3465 4a8a32a2-be11-0410-ad9d-d568d2c75423

19 files changed:
ChangeLog
device/include/math.h
device/lib/acosf.c
device/lib/asinf.c
device/lib/atanf.c
device/lib/ceilf.c
device/lib/cosf.c
device/lib/coshf.c
device/lib/cotf.c
device/lib/fabsf.c
device/lib/floorf.c
device/lib/log10f.c
device/lib/logf.c
device/lib/sinf.c
device/lib/sinhf.c
device/lib/sqrtf.c
device/lib/tanf.c
device/lib/tanhf.c
support/regression/tests/float_trans.c

index 2ca73001460d102d25370893f4fb1b13cdbe128e..32bd6227baa587408feeedc0fc8f09133b4b599f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2004-08-30 Erik Petrich <epetrich AT ivorytower.norman.ok.us>
+
+       * device/lib/acosf.c (acosf),
+       * device/lib/asinf.c (asinf),
+       * device/lib/atanf.c (atanf),
+       * device/lib/ceilf.c (ceilf),
+       * device/lib/cosf.c (cosf),
+       * device/lib/coshf.c (coshf),
+       * device/lib/cotf.c (cotf),
+       * device/lib/fabsf.c (fabsf),
+       * device/lib/floorf.c (floorf),
+       * device/lib/log10f.c (log10f),
+       * device/lib/logf.c (logf),
+       * device/lib/sinf.c (sinf),
+       * device/lib/sinhf.c (sinhf),
+       * device/lib/sqrtf.c (sqrtf),
+       * device/lib/tanf.c (tanf),
+       * device/lib/tanhf.c (tanhf),
+       * device/include/math.h: defined _FLOAT_FUNC_REENTRANT macro and
+       replaced all instances of "reentrant" in the library functions
+       defined in math.h with this macro.
+       * support/regression/tests/float_trans.c: reenabled test for hc08
+
 2004-08-30 Bernhard Held <bernhard AT bernhardheld.de>
 
        * device/lib/pic16/Makefile.common.in: added MODELFLAGS again, it was
index 326ab00e620a90845f57f54acf60cd1e7603c999..ce084d039db53e8afe0ac477e5ad6097d92afc56 100644 (file)
@@ -42,38 +42,46 @@ union float_long
     long l;
 };
 
+/* Functions on the z80 & gbz80 are always reentrant and so the "reentrant" */
+/* keyword is not defined. */
+#if defined(SDCC_z80) || defined(SDCC_gbz80)
+#define _FLOAT_FUNC_REENTRANT
+#else
+#define _FLOAT_FUNC_REENTRANT reentrant
+#endif
+
 /**********************************************
  * Prototypes for float ANSI C math functions *
  **********************************************/
 
 /* Trigonometric functions */
-float sinf(const float x);
-float cosf(const float x);
-float tanf(const float x);
-float cotf(const float x);
-float asinf(const float x);
-float acosf(const float x);
-float atanf(const float x);
+float sinf(const float x) _FLOAT_FUNC_REENTRANT;
+float cosf(const float x) _FLOAT_FUNC_REENTRANT;
+float tanf(const float x) _FLOAT_FUNC_REENTRANT;
+float cotf(const float x) _FLOAT_FUNC_REENTRANT;
+float asinf(const float x) _FLOAT_FUNC_REENTRANT;
+float acosf(const float x) _FLOAT_FUNC_REENTRANT;
+float atanf(const float x) _FLOAT_FUNC_REENTRANT;
 float atan2f(const float x, const float y);
 
 /* Hyperbolic functions */
-float sinhf(const float x);
-float coshf(const float x);
-float tanhf(const float x);
+float sinhf(const float x) _FLOAT_FUNC_REENTRANT;
+float coshf(const float x) _FLOAT_FUNC_REENTRANT;
+float tanhf(const float x) _FLOAT_FUNC_REENTRANT;
 
 /* Exponential, logarithmic and power functions */
 float expf(const float x);
-float logf(const float x);
-float log10f(const float x);
+float logf(const float x) _FLOAT_FUNC_REENTRANT;
+float log10f(const float x) _FLOAT_FUNC_REENTRANT;
 float powf(const float x, const float y);
-float sqrtf(const float a);
+float sqrtf(const float a) _FLOAT_FUNC_REENTRANT;
 
 /* Nearest integer, absolute value, and remainder functions */
-float fabsf(const float x);
+float fabsf(const float x) _FLOAT_FUNC_REENTRANT;
 float frexpf(const float x, int *pw2);
 float ldexpf(const float x, const int pw2);
-float ceilf(float x);
-float floorf(float x);
+float ceilf(float x) _FLOAT_FUNC_REENTRANT;
+float floorf(float x) _FLOAT_FUNC_REENTRANT;
 float modff(float x, float * y);
 
 #endif  /* _INC_MATH */
index 110ffa4076c12f81c982163107d33242ed7271ed..fa86e135cc8d744fa6e1f2a3d151694c835f4536 100644 (file)
@@ -22,7 +22,7 @@
 
 float asincosf(const float x, const int isacos);
 
-float acosf(const float x) reentrant
+float acosf(const float x) _FLOAT_FUNC_REENTRANT
 {
          if(x== 1.0) return 0.0;
     else if(x==-1.0) return PI;
index 29291364f06f889dfb6b32a2e63fca388f0f01a4..0d5b1523d098fa907cd69a3fddb75aac352102a8 100644 (file)
@@ -22,7 +22,7 @@
 
 float asincosf(const float x, const int isacos);
 
-float asinf(const float x) reentrant
+float asinf(const float x) _FLOAT_FUNC_REENTRANT
 {   
          if(x== 1.0) return  HALF_PI;
     else if(x==-1.0) return -HALF_PI;
index ed70035c9c04b051bdd8409b1c63d698aaf99fac..135c3f90f7bd17c2e65de5b00973f0f070bf71d8 100644 (file)
@@ -42,7 +42,7 @@
    #define myconst const
 #endif
 
-float atanf(const float x) reentrant
+float atanf(const float x) _FLOAT_FUNC_REENTRANT
 {
     float f, r, g;
     int n=0;
index f3599f8ad5607ea4c5e8170cd3b1671f5150821c..54b7c0fe8a9dbbf58f1bc5f0e9420a15c2bb04e5 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <math.h>
 
-float ceilf(float x) reentrant
+float ceilf(float x) _FLOAT_FUNC_REENTRANT
 {
     long r;
     r=x;
index 9335a314216a70e3b85bf6bcd967bd491654075d..57f430c5a4086ad7accb8c4879fa11c828904dc9 100644 (file)
@@ -22,7 +22,7 @@
 
 float sincosf(const float x, const int iscos);
 
-float cosf(const float x) reentrant
+float cosf(const float x) _FLOAT_FUNC_REENTRANT
 {
     if (x==0.0) return 1.0;
     return sincosf(x, 1);
index 3a12eda8bad5ea92b67f854430dd321fab60e04f..3e8257e927d9ecf4684557922c341e3443842344 100644 (file)
@@ -22,7 +22,7 @@
 
 float sincoshf(const float x, const int iscosh);
 
-float coshf(const float x) reentrant
+float coshf(const float x) _FLOAT_FUNC_REENTRANT
 {
     return sincoshf(x, 1);
 }
index 9e8329a57c9fea97e2cd3110485841cd59cbdd4a..03886c12304d492ba1aa085a9787111a7c903e62 100644 (file)
@@ -23,7 +23,7 @@
 
 float tancotf(const float x, const int iscot);
 
-float cotf(const float x) reentrant
+float cotf(const float x) _FLOAT_FUNC_REENTRANT
 {
     float y;
 
index 827a99a1bb38884cb99d2ef6a1dff66efd7b973c..4a061d172e86364481c0b73c1fa33d3e122b789e 100644 (file)
@@ -21,7 +21,7 @@
 #include <math.h>
 #include <errno.h>
 
-float fabsf(const float x) reentrant
+float fabsf(const float x) _FLOAT_FUNC_REENTRANT
 {
     union float_long fl;
 
index b0f474f3cef766bd9748e7d49f9031cb900eeb96..f12adae1157a72cd1b6500a241c68d17da366bf2 100644 (file)
@@ -20,7 +20,7 @@
 
 #include <math.h>
 
-float floorf (float x) reentrant
+float floorf (float x) _FLOAT_FUNC_REENTRANT
 {
     long r;
     r=x;
index 13f77cdabe522cb509080088040c369f4d3b46bd..8a564bb69f4e6055952a30fa4a5776413270c88a 100644 (file)
@@ -21,7 +21,7 @@
 #include <math.h>
 #include <errno.h>
 
-float log10f(const float x) reentrant
+float log10f(const float x) _FLOAT_FUNC_REENTRANT
 {
     return logf(x)*0.4342944819;
 }
index c89778c774a6b457ce1ed8f6ff7f4fb22e7871c5..75c3f71becbbd89b25259e2f59feea69a96f9e1b 100644 (file)
@@ -34,7 +34,7 @@
 #define C1  0.693359375 /*355.0/512.0*/
 #define C2 -2.121944400546905827679E-4
 
-float logf(const float x) reentrant
+float logf(const float x) _FLOAT_FUNC_REENTRANT
 {
 #if     defined(SDCC_mcs51) && defined(SDCC_MODEL_SMALL) \
     && !defined(SDCC_NOOVERLAY)
index 63585710f406e73d07b413cc5579ee2aaf4a9974..50458a34e1af949592b62462aabd7b9815c4fd0a 100644 (file)
@@ -22,7 +22,7 @@
 
 float sincosf(const float x, const int iscos);
 
-float sinf(const float x) reentrant
+float sinf(const float x) _FLOAT_FUNC_REENTRANT
 {
     if (x==0.0) return 0.0;
     return sincosf(x, 0);
index 3741d401b3ac3bcb22e9d0bc1cc99e32d01524b6..81c2bb71a7722d9186e956833091faddf9d67fc9 100644 (file)
@@ -22,7 +22,7 @@
 
 float sincoshf(const float x, const int iscosh);
 
-float sinhf(const float x) reentrant
+float sinhf(const float x) _FLOAT_FUNC_REENTRANT
 {
     return sincoshf(x, 0);
 }
index 477d535a82410f758bf06de89c0a3a23aed1f68c..740fac79ae363f5b48a11aca87fbfedda3c64824 100644 (file)
@@ -24,7 +24,7 @@
 #include <math.h>
 #include <errno.h>
 
-float sqrtf(const float x) reentrant
+float sqrtf(const float x) _FLOAT_FUNC_REENTRANT
 {
     float f, y;
     int n;
index 48c18bff73b41a938ce360ef1cb60eb72cda8e42..2ba74008a0a09018ba2e5c1bb170543820e962fe 100644 (file)
@@ -22,7 +22,7 @@
 
 float tancotf(const float x, const int iscot);
 
-float tanf(const float x) reentrant
+float tanf(const float x) _FLOAT_FUNC_REENTRANT
 {
     return tancotf(x, 0);
 }
index 5737c0019f738a1799e0f343dc4b60764152ae9a..9fc7e5302e66d8d93566c8cf652de7acdb8536b7 100644 (file)
@@ -37,7 +37,7 @@
 #define P(g) ((P1*g+P0)*g)
 #define Q(g) (Q1*g+Q0)
 
-float tanhf(const float x) reentrant
+float tanhf(const float x) _FLOAT_FUNC_REENTRANT
 {
     float f, g, r;
 
index a6dbb1582e88795777122c4e64915482f533558f..6431baf664888cd93c85eb2005dc40a37449a0d6 100644 (file)
@@ -11,7 +11,7 @@
 void
 testTrans(void)
 {
-#if !defined(SDCC_z80) && !defined(SDCC_hc08) && !PORT_HOST
+#if !defined(SDCC_z80) && !PORT_HOST
 # ifdef SQRTF
       ASSERT(fabsf (sqrtf (5.0)     -   2.23606801) < 0.00001);
 # endif