summaryrefslogtreecommitdiffstats
path: root/patches/libffi-3.0.8/fix-arm-softfp.diff
diff options
context:
space:
mode:
Diffstat (limited to 'patches/libffi-3.0.8/fix-arm-softfp.diff')
-rw-r--r--patches/libffi-3.0.8/fix-arm-softfp.diff84
1 files changed, 84 insertions, 0 deletions
diff --git a/patches/libffi-3.0.8/fix-arm-softfp.diff b/patches/libffi-3.0.8/fix-arm-softfp.diff
new file mode 100644
index 000000000..6bd4c56ec
--- /dev/null
+++ b/patches/libffi-3.0.8/fix-arm-softfp.diff
@@ -0,0 +1,84 @@
+From: Marc Kleine-Budde <mkl@pengutronix.de>
+Subject: unsupported asm instructions in libffi/src/arm/sysv.S
+
+See: "http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40242"
+
+Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>:
+
+---
+ src/arm/sysv.S | 18 +++++++++++-------
+ 1 file changed, 11 insertions(+), 7 deletions(-)
+
+Index: libffi-3.0.8/src/arm/sysv.S
+===================================================================
+--- libffi-3.0.8.orig/src/arm/sysv.S
++++ libffi-3.0.8/src/arm/sysv.S
+@@ -34,6 +34,10 @@
+ #define CONCAT1(a, b) CONCAT2(a, b)
+ #define CONCAT2(a, b) a ## b
+
++#if defined(__SOFTFP__) || defined(__VFP_FP__)
++#define __PASS_INT__
++#endif
++
+ /* Use the right prefix for global labels. */
+ #define CNAME(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
+ #else
+@@ -189,7 +193,7 @@ ARM_FUNC_START ffi_call_SYSV
+
+ @ return INT
+ cmp r3, #FFI_TYPE_INT
+-#ifdef __SOFTFP__
++#ifdef __PASS_INT__
+ cmpne r3, #FFI_TYPE_FLOAT
+ #endif
+ streq r0, [r2]
+@@ -197,12 +201,12 @@ ARM_FUNC_START ffi_call_SYSV
+
+ @ return INT64
+ cmp r3, #FFI_TYPE_SINT64
+-#ifdef __SOFTFP__
++#ifdef __PASS_INT__
+ cmpne r3, #FFI_TYPE_DOUBLE
+ #endif
+ stmeqia r2, {r0, r1}
+
+-#ifndef __SOFTFP__
++#ifndef __PASS_INT__
+ beq LSYM(Lepilogue)
+
+ @ return FLOAT
+@@ -245,21 +249,21 @@ ARM_FUNC_START ffi_closure_SYSV
+ beq .Lretint
+
+ cmp r0, #FFI_TYPE_FLOAT
+-#ifdef __SOFTFP__
++#ifdef __PASS_INT__
+ beq .Lretint
+ #else
+ beq .Lretfloat
+ #endif
+
+ cmp r0, #FFI_TYPE_DOUBLE
+-#ifdef __SOFTFP__
++#ifdef __PASS_INT__
+ beq .Lretlonglong
+ #else
+ beq .Lretdouble
+ #endif
+
+ cmp r0, #FFI_TYPE_LONGDOUBLE
+-#ifdef __SOFTFP__
++#ifdef __PASS_INT__
+ beq .Lretlonglong
+ #else
+ beq .Lretlongdouble
+@@ -278,7 +282,7 @@ ARM_FUNC_START ffi_closure_SYSV
+ ldr r1, [sp, #4]
+ b .Lclosure_epilogue
+
+-#ifndef __SOFTFP__
++#ifndef __PASS_INT__
+ .Lretfloat:
+ ldfs f0, [sp]
+ b .Lclosure_epilogue