kivy-ios/recipes/libffi/ffi-3.0.13-sysv.S.patch

138 lines
2.6 KiB
Diff
Raw Permalink Normal View History

--- libffi-3.0.13-old/src/arm/sysv.S 2013-03-16 12:19:39.000000000 +0100
+++ libffi-3.0.13-new/src/arm/sysv.S 2013-08-26 19:33:28.000000000 +0200
@@ -109,58 +109,35 @@
#define UNWIND @
#endif
+.syntax unified
#if defined(__thumb__) && !defined(__THUMB_INTERWORK__)
-.macro ARM_FUNC_START name
- .text
- .align 0
- .thumb
- .thumb_func
-#ifdef __APPLE__
- ENTRY($0)
+#define ARM_FUNC_START(name) \
+ .text; \
+ .align 4; \
+ .thumb; \
+ .thumb_func; \
+ ENTRY(name); \
+ bx pc; \
+ nop; \
+ .arm; \
+ UNWIND .fnstart; \
+_L__##name:
#else
- ENTRY(\name)
-#endif
- bx pc
- nop
- .arm
- UNWIND .fnstart
-/* A hook to tell gdb that we've switched to ARM mode. Also used to call
- directly from other local arm routines. */
-#ifdef __APPLE__
-_L__$0:
-#else
-_L__\name:
-#endif
-.endm
-#else
-.macro ARM_FUNC_START name
- .text
- .align 0
- .arm
-#ifdef __APPLE__
- ENTRY($0)
-#else
- ENTRY(\name)
-#endif
+#define ARM_FUNC_START(name) \
+ .text; \
+ .align 4; \
+ .arm; \
+ ENTRY(name); \
UNWIND .fnstart
-.endm
#endif
-.macro RETLDM regs=, cond=, dirn=ia
+.macro RETLDM
#if defined (__INTERWORKING__)
- .ifc "\regs",""
- ldr\cond lr, [sp], #4
- .else
- ldm\cond\dirn sp!, {\regs, lr}
- .endif
- bx\cond lr
+ ldr lr, [sp], #4
+ bx lr
#else
- .ifc "\regs",""
- ldr\cond pc, [sp], #4
- .else
- ldm\cond\dirn sp!, {\regs, pc}
- .endif
+ ldr pc, [sp], #4
#endif
.endm
@@ -170,8 +147,7 @@
@ r3: fig->flags
@ sp+0: ecif.rvalue
- @ This assumes we are using gas.
-ARM_FUNC_START ffi_call_SYSV
+ARM_FUNC_START(ffi_call_SYSV)
@ Save registers
stmfd sp!, {r0-r3, fp, lr}
UNWIND .save {r0-r3, fp, lr}
@@ -228,7 +204,7 @@
#if defined(__SOFTFP__) || defined(__ARM_EABI__)
cmpne r3, #FFI_TYPE_DOUBLE
#endif
- stmeqia r2, {r0, r1}
+ stmiaeq r2, {r0, r1}
#if !defined(__SOFTFP__) && !defined(__ARM_EABI__)
beq LSYM(Lepilogue)
@@ -266,7 +242,7 @@
void *args;
*/
-ARM_FUNC_START ffi_closure_SYSV
+ARM_FUNC_START(ffi_closure_SYSV)
UNWIND .pad #16
add ip, sp, #16
stmfd sp!, {ip, lr}
@@ -345,7 +321,7 @@
@ r3: fig->flags
@ sp+0: ecif.rvalue
-ARM_FUNC_START ffi_call_VFP
+ARM_FUNC_START(ffi_call_VFP)
@ Save registers
stmfd sp!, {r0-r3, fp, lr}
UNWIND .save {r0-r3, fp, lr}
@@ -410,7 +386,7 @@
beq LSYM(Lepilogue_vfp)
cmp r3, #FFI_TYPE_SINT64
- stmeqia r2, {r0, r1}
+ stmiaeq r2, {r0, r1}
beq LSYM(Lepilogue_vfp)
cmp r3, #FFI_TYPE_FLOAT
@@ -433,7 +409,7 @@
.size CNAME(ffi_call_VFP),.ffi_call_VFP_end-CNAME(ffi_call_VFP)
-ARM_FUNC_START ffi_closure_VFP
+ARM_FUNC_START(ffi_closure_VFP)
fstmfdd sp!, {d0-d7}
@ r0-r3, then d0-d7
UNWIND .pad #80