sysv.S: If we don't have machine/asm.h and the pre-processor has defined...
authorRichard Earnshaw <rearnsha@arm.com>
Sat, 28 Sep 2002 12:09:27 +0000 (12:09 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Sat, 28 Sep 2002 12:09:27 +0000 (12:09 +0000)
* src/arm/sysv.S: If we don't have machine/asm.h and the pre-processor
has defined __USER_LABEL_PREFIX__, then use it in CNAME.
(ffi_call_SYSV): Handle soft-float.

From-SVN: r57609

libffi/ChangeLog
libffi/src/arm/sysv.S

index 3fd628f8334b55e5f2d969aaf6e465110c29ea96..365a1043b9964494e46912c457a58cac1c139646 100644 (file)
@@ -1,3 +1,9 @@
+2002-09-28  Richard Earnshaw  <rearnsha@arm.com>
+
+       * src/arm/sysv.S: If we don't have machine/asm.h and the pre-processor
+       has defined __USER_LABEL_PREFIX__, then use it in CNAME.
+       (ffi_call_SYSV): Handle soft-float.
+
 2002-09-27  Bo Thorsen  <bo@suse.de>
 
        * include/ffi.h.in: Fix multilib x86-64 support.
index 84744d77562156564ea390abb72d6d4e06d2e40e..a494a2ffebfda191c836327b2221e287680bf293 100644 (file)
 #ifdef HAVE_MACHINE_ASM_H
 #include <machine/asm.h>
 #else
+#ifdef __USER_LABEL_PREFIX__
+#define CONCAT1(a, b) CONCAT2(a, b)
+#define CONCAT2(a, b) a ## b
+
+/* Use the right prefix for global labels.  */
+#define CNAME(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
+#else
 /* XXX these lose for some platforms, I'm sure. */
 #define CNAME(x) x
 #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x):
@@ -96,12 +103,20 @@ ENTRY(ffi_call_SYSV)
 
 # return FLOAT
        cmp     a4, #FFI_TYPE_FLOAT
+#ifdef __SOFTFP__
+       streq   a1, [a3]
+#else
        stfeqs  f0, [a3]
+#endif
        beq     epilogue
 
 # return DOUBLE or LONGDOUBLE
        cmp     a4, #FFI_TYPE_DOUBLE
+#ifdef __SOFTFP__
+       stmeqia a3, {a1, a2}
+#else
        stfeqd  f0, [a3]
+#endif
 
 epilogue:
         ldmfd sp!, {a1-a4, fp, pc}