From 28165e22cd970f0269c27f31a30c166c9732cfea Mon Sep 17 00:00:00 2001 From: Richard Earnshaw Date: Sat, 28 Sep 2002 12:09:27 +0000 Subject: sysv.S: If we don't have machine/asm.h and the pre-processor has defined... * 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/src/arm/sysv.S | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libffi/src/arm') diff --git a/libffi/src/arm/sysv.S b/libffi/src/arm/sysv.S index 84744d7..a494a2f 100644 --- a/libffi/src/arm/sysv.S +++ b/libffi/src/arm/sysv.S @@ -28,6 +28,13 @@ #ifdef HAVE_MACHINE_ASM_H #include #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} -- cgit v1.1