Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/arm32/fplib * Prefix softfloat symbols which r...
details: https://anonhg.NetBSD.org/src/rev/3acc83f25c58
branches: trunk
changeset: 472750:3acc83f25c58
user: kleink <kleink%NetBSD.org@localhost>
date: Thu May 06 13:56:28 1999 +0000
description:
* Prefix softfloat symbols which require external linkage with _arm32_ to
move them out of user namespace; declare those not requiring external linkage
static.
* In due course, disable those functions that require neither external nor
internal linkage.
Addresses PR port-arm32/7517.
diffstat:
lib/libc/arch/arm32/fplib/environment.h | 18 ++++++-
lib/libc/arch/arm32/fplib/fplib_glue.S | 26 +++++-----
lib/libc/arch/arm32/fplib/fplib_libc.c | 3 +-
lib/libc/arch/arm32/fplib/softfloat-macros.h | 6 ++-
lib/libc/arch/arm32/fplib/softfloat-specialize.h | 12 ++--
lib/libc/arch/arm32/fplib/softfloat.c | 60 ++++++++++++++++++------
lib/libc/arch/arm32/fplib/softfloat.h | 40 +++++++++++----
7 files changed, 116 insertions(+), 49 deletions(-)
diffs (truncated from 637 to 300 lines):
diff -r d96f47e1a6d5 -r 3acc83f25c58 lib/libc/arch/arm32/fplib/environment.h
--- a/lib/libc/arch/arm32/fplib/environment.h Thu May 06 13:54:06 1999 +0000
+++ b/lib/libc/arch/arm32/fplib/environment.h Thu May 06 13:56:28 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: environment.h,v 1.4 1998/06/28 20:19:30 christos Exp $ */
+/* $NetBSD: environment.h,v 1.5 1999/05/06 13:56:28 kleink Exp $ */
/*
===============================================================================
@@ -45,3 +45,19 @@
-------------------------------------------------------------------------------
*/
#define INLINE static __inline
+
+/*
+-------------------------------------------------------------------------------
+Move private identifiers with external linkage into implementation namespace.
+ -- Klaus Klein <kleink%netbsd.org@localhost>, May 5, 1999
+-------------------------------------------------------------------------------
+*/
+#define float_exception_flags _arm32_float_exception_flags
+#define float_rounding_mode _arm32_float_rounding_mode
+#define float32_eq _arm32_float32_eq
+#define float32_le _arm32_float32_le
+#define float32_lt _arm32_float32_lt
+#define float64_eq _arm32_float64_eq
+#define float64_le _arm32_float64_le
+#define float64_lt _arm32_float64_lt
+#define float_raise _arm32_float_raise
diff -r d96f47e1a6d5 -r 3acc83f25c58 lib/libc/arch/arm32/fplib/fplib_glue.S
--- a/lib/libc/arch/arm32/fplib/fplib_glue.S Thu May 06 13:54:06 1999 +0000
+++ b/lib/libc/arch/arm32/fplib/fplib_glue.S Thu May 06 13:56:28 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fplib_glue.S,v 1.1 1997/10/12 21:18:08 mark Exp $ */
+/* $NetBSD: fplib_glue.S,v 1.2 1999/05/06 13:56:28 kleink Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -48,13 +48,13 @@
*/
ENTRY(__eqsf2)
stmfd sp!, {lr}
- bl _float32_eq
+ bl _C_LABEL(_arm32_float32_eq)
eor r0, r0, #1
ldmfd sp!, {pc}
ENTRY(__eqdf2)
stmfd sp!, {lr}
- bl _float64_eq
+ bl _C_LABEL(_arm32_float64_eq)
eor r0, r0, #1
ldmfd sp!, {pc}
@@ -66,13 +66,13 @@
*/
ENTRY(__nesf2)
stmfd sp!, {lr}
- bl _float32_eq
+ bl _C_LABEL(_arm32_float32_eq)
eor r0, r0, #1
ldmfd sp!, {pc}
ENTRY(__nedf2)
stmfd sp!, {lr}
- bl _float64_eq
+ bl _C_LABEL(_arm32_float64_eq)
eor r0, r0, #1
ldmfd sp!, {pc}
@@ -85,13 +85,13 @@
*/
ENTRY(__gtsf2)
stmfd sp!, {lr}
- bl _float32_le
+ bl _C_LABEL(_arm32_float32_le)
eor r0, r0, #1
ldmfd sp!, {pc}
ENTRY(__gtdf2)
stmfd sp!, {lr}
- bl _float64_le
+ bl _C_LABEL(_arm32_float64_le)
eor r0, r0, #1
ldmfd sp!, {pc}
@@ -101,7 +101,7 @@
*/
ENTRY(__gesf2)
stmfd sp!, {lr}
- bl _float32_lt
+ bl _C_LABEL(_arm32_float32_lt)
eor r0, r0, #1
cmp r0, #0
mvneq r0, #0
@@ -109,7 +109,7 @@
ENTRY(__gedf2)
stmfd sp!, {lr}
- bl _float64_lt
+ bl _C_LABEL(_arm32_float64_lt)
eor r0, r0, #1
cmp r0, #0
mvneq r0, #0
@@ -120,14 +120,14 @@
*/
ENTRY(__ltsf2)
stmfd sp!, {lr}
- bl _float32_lt
+ bl _C_LABEL(_arm32_float32_lt)
cmp r0, #1
mvneq r0, #0
ldmfd sp!, {pc}
ENTRY(__ltdf2)
stmfd sp!, {lr}
- bl _float64_lt
+ bl _C_LABEL(_arm32_float64_lt)
cmp r0, #1
mvneq r0, #0
ldmfd sp!, {pc}
@@ -137,13 +137,13 @@
*/
ENTRY(__lesf2)
stmfd sp!, {lr}
- bl _float32_le
+ bl _C_LABEL(_arm32_float32_le)
eor r0, r0, #1
ldmfd sp!, {pc}
ENTRY(__ledf2)
stmfd sp!, {lr}
- bl _float64_le
+ bl _C_LABEL(_arm32_float64_le)
eor r0, r0, #1
ldmfd sp!, {pc}
diff -r d96f47e1a6d5 -r 3acc83f25c58 lib/libc/arch/arm32/fplib/fplib_libc.c
--- a/lib/libc/arch/arm32/fplib/fplib_libc.c Thu May 06 13:54:06 1999 +0000
+++ b/lib/libc/arch/arm32/fplib/fplib_libc.c Thu May 06 13:56:28 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fplib_libc.c,v 1.2 1997/10/13 21:28:53 mark Exp $ */
+/* $NetBSD: fplib_libc.c,v 1.3 1999/05/06 13:56:28 kleink Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -37,6 +37,7 @@
*/
#include <sys/types.h>
+#include "environment.h"
#include "softfloat.h"
void sfp_setround __P((int rnd_dir));
diff -r d96f47e1a6d5 -r 3acc83f25c58 lib/libc/arch/arm32/fplib/softfloat-macros.h
--- a/lib/libc/arch/arm32/fplib/softfloat-macros.h Thu May 06 13:54:06 1999 +0000
+++ b/lib/libc/arch/arm32/fplib/softfloat-macros.h Thu May 06 13:56:28 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: softfloat-macros.h,v 1.4 1998/04/24 18:46:53 cgd Exp $ */
+/* $NetBSD: softfloat-macros.h,v 1.5 1999/05/06 13:56:28 kleink Exp $ */
/*
===============================================================================
@@ -115,7 +115,9 @@
static bits32 estimateDiv64To32( bits32 a0, bits32 a1, bits32 b );
+#if 0 /* unused */
static bits32 estimateSqrt32( int16 aExp, bits32 a );
+#endif
static int8 countLeadingZeros( bits32 a );
@@ -608,6 +610,7 @@
}
+#if 0 /* unused */
/*
-------------------------------------------------------------------------------
Returns an approximation to the square root of the 32-bit significand given
@@ -647,6 +650,7 @@
return ( ( estimateDiv64To32( a, 0, z ) )>>1 ) + ( z>>1 );
}
+#endif /* unused */
/*
-------------------------------------------------------------------------------
diff -r d96f47e1a6d5 -r 3acc83f25c58 lib/libc/arch/arm32/fplib/softfloat-specialize.h
--- a/lib/libc/arch/arm32/fplib/softfloat-specialize.h Thu May 06 13:54:06 1999 +0000
+++ b/lib/libc/arch/arm32/fplib/softfloat-specialize.h Thu May 06 13:56:28 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: softfloat-specialize.h,v 1.3 1998/01/06 00:06:12 perry Exp $ */
+/* $NetBSD: softfloat-specialize.h,v 1.4 1999/05/06 13:56:28 kleink Exp $ */
/*
===============================================================================
@@ -30,15 +30,15 @@
===============================================================================
*/
-flag float32_is_signaling_nan( float32 a );
-flag float64_is_signaling_nan( float64 a );
+static flag float32_is_signaling_nan( float32 a );
+static flag float64_is_signaling_nan( float64 a );
/*
-------------------------------------------------------------------------------
Underflow tininess-detection mode. (Statically initialized to default.)
-------------------------------------------------------------------------------
*/
-flag float_detect_tininess = float_tininess_after_rounding;
+static flag float_detect_tininess = float_tininess_after_rounding;
/*
-------------------------------------------------------------------------------
@@ -81,7 +81,7 @@
NaN; otherwise returns false.
-------------------------------------------------------------------------------
*/
-flag float32_is_signaling_nan( float32 a )
+static flag float32_is_signaling_nan( float32 a )
{
return ( ( a & 0x7FC00000 ) == 0x7F800000 ) && ( a & 0x003FFFFF );
@@ -94,7 +94,7 @@
NaN; otherwise returns false.
-------------------------------------------------------------------------------
*/
-flag float64_is_signaling_nan( float64 a )
+static flag float64_is_signaling_nan( float64 a )
{
return
diff -r d96f47e1a6d5 -r 3acc83f25c58 lib/libc/arch/arm32/fplib/softfloat.c
--- a/lib/libc/arch/arm32/fplib/softfloat.c Thu May 06 13:54:06 1999 +0000
+++ b/lib/libc/arch/arm32/fplib/softfloat.c Thu May 06 13:56:28 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: softfloat.c,v 1.3 1998/01/06 00:06:12 perry Exp $ */
+/* $NetBSD: softfloat.c,v 1.4 1999/05/06 13:56:28 kleink Exp $ */
/*
===============================================================================
@@ -564,6 +564,7 @@
}
+#if 0 /* unused */
/*
-------------------------------------------------------------------------------
Returns the result of converting the single-precision floating-point value
@@ -575,7 +576,7 @@
integer with the same sign as `a' is returned.
-------------------------------------------------------------------------------
*/
-int32 float32_to_int32( float32 a )
+static int32 float32_to_int32( float32 a )
{
flag aSign;
int16 aExp, shiftCount;
@@ -631,6 +632,7 @@
return z;
}
+#endif /* unused */
/*
-------------------------------------------------------------------------------
@@ -705,6 +707,7 @@
}
+#if 0 /* unused */
/*
-------------------------------------------------------------------------------
Returns the result of converting the double-precision floating-point value
@@ -716,7 +719,8 @@
integer with the same sign as `a' is returned.
-------------------------------------------------------------------------------
*/
-int32 float64_to_int32( float64 a )
+
+static int32 float64_to_int32( float64 a )
{
flag aSign;
int16 aExp, shiftCount;
@@ -778,6 +782,7 @@
return z;
}
+#endif /* unused */
/*
-------------------------------------------------------------------------------
@@ -864,6 +869,7 @@
}
+#if 0 /* unused */
Home |
Main Index |
Thread Index |
Old Index