summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2009-05-31 02:03:40 +0000
committermarcel <marcel@FreeBSD.org>2009-05-31 02:03:40 +0000
commit9babfe9f9b2fa8b533dad4a39b00918df9809aa7 (patch)
tree9294c569aa98188876135b992fbadbd3a545dbab /lib/libc
parenta42ef97c19dd2dd23ea9ebe78131298cad57b0ad (diff)
downloadFreeBSD-src-9babfe9f9b2fa8b533dad4a39b00918df9809aa7.zip
FreeBSD-src-9babfe9f9b2fa8b533dad4a39b00918df9809aa7.tar.gz
Use GCC's __SOFTFP__ to test whether we're being compiled
with softfloat or not. Now -msoft-float can be overridden more easily.
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/arm/Makefile.inc2
-rw-r--r--lib/libc/arm/gen/_setjmp.S8
-rw-r--r--lib/libc/arm/gen/setjmp.S8
3 files changed, 8 insertions, 10 deletions
diff --git a/lib/libc/arm/Makefile.inc b/lib/libc/arm/Makefile.inc
index 666cadc..4c72e56 100644
--- a/lib/libc/arm/Makefile.inc
+++ b/lib/libc/arm/Makefile.inc
@@ -5,8 +5,6 @@
SOFTFLOAT_BITS=32
-CFLAGS+=-DSOFTFLOAT
-
# Long double is just double precision.
MDSRCS+=machdep_ldisd.c
SYM_MAPS+=${.CURDIR}/arm/Symbol.map
diff --git a/lib/libc/arm/gen/_setjmp.S b/lib/libc/arm/gen/_setjmp.S
index 1cd370c..6594afb 100644
--- a/lib/libc/arm/gen/_setjmp.S
+++ b/lib/libc/arm/gen/_setjmp.S
@@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$");
ENTRY(_setjmp)
ldr r1, .L_setjmp_magic
str r1, [r0], #4
-#ifdef SOFTFLOAT
+#ifdef __SOFTFP__
add r0, r0, #52
#else
/* Store fp registers */
@@ -59,7 +59,7 @@ ENTRY(_setjmp)
/* Store fpsr */
rfs r1
str r1, [r0], #0x0004
-#endif /* SOFTFLOAT */
+#endif /* __SOFTFP__ */
/* Store integer registers */
stmia r0, {r4-r14}
@@ -76,7 +76,7 @@ ENTRY(_longjmp)
teq r2, r3
bne botch
-#ifdef SOFTFLOAT
+#ifdef __SOFTFP__
add r0, r0, #52
#else
/* Restore fp registers */
@@ -84,7 +84,7 @@ ENTRY(_longjmp)
/* Restore fpsr */
ldr r4, [r0], #0x0004
wfs r4
-#endif /* SOFTFLOAT */
+#endif /* __SOFTFP__ */
/* Restore integer registers */
ldmia r0, {r4-r14}
diff --git a/lib/libc/arm/gen/setjmp.S b/lib/libc/arm/gen/setjmp.S
index f0e9cfa..e5f581f 100644
--- a/lib/libc/arm/gen/setjmp.S
+++ b/lib/libc/arm/gen/setjmp.S
@@ -58,7 +58,7 @@ ENTRY(setjmp)
ldr r1, .Lsetjmp_magic
str r1, [r0], #4
-#ifdef SOFTFLOAT
+#ifdef __SOFTFP__
add r0, r0, #52
#else
/* Store fp registers */
@@ -66,7 +66,7 @@ ENTRY(setjmp)
/* Store fpsr */
rfs r1
str r1, [r0], #0x0004
-#endif /*SOFTFLOAT*/
+#endif /* __SOFTFP__ */
/* Store integer registers */
stmia r0, {r4-r14}
mov r0, #0x00000000
@@ -98,7 +98,7 @@ ENTRY(__longjmp)
ldmfd sp!, {r0, r1, r14}
add r0, r0, #4
-#ifdef SOFTFLOAT
+#ifdef __SOFTFP__
add r0, r0, #52
#else
/* Restore fp registers */
@@ -106,7 +106,7 @@ ENTRY(__longjmp)
/* Restore FPSR */
ldr r4, [r0], #0x0004
wfs r4
-#endif /* SOFTFLOAT */
+#endif /* __SOFTFP__ */
/* Restore integer registers */
ldmia r0, {r4-r14}
OpenPOWER on IntegriCloud