This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix unwinder directives for ARM EABI libffi


The previous patch with the unwinder directives wasn't quite right.

Andrew.


2007-08-14  Andrew Haley  <aph@redhat.com>

        * src/arm/sysv.S: Add unwinder directives.

Index: src/arm/sysv.S
===================================================================
--- src/arm/sysv.S	(revision 126985)
+++ src/arm/sysv.S	(working copy)
@@ -92,6 +92,7 @@
 	bx	pc
 	nop
 	.arm
+	.fnstart
 /* A hook to tell gdb that we've switched to ARM mode.  Also used to call
    directly from other local arm routines.  */
 _L__\name:		
@@ -102,6 +103,7 @@
 	.align 0
 	.arm
 	ENTRY(\name)
+	.fnstart
 .endm
 #endif
 
@@ -134,8 +136,11 @@
 ARM_FUNC_START ffi_call_SYSV
 	@ Save registers
         stmfd	sp!, {r0-r3, fp, lr}
+	.save	{r0-r3, fp, lr}
 	mov	fp, sp
 
+	.setfp	fp, sp
+
 	@ Make room for all of the new args.
 	sub	sp, fp, r2
 
@@ -205,6 +210,7 @@
 	RETLDM	"r0-r3,fp"
 
 .ffi_call_SYSV_end:
+	.fnend
         .size    CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV)
 
 /*
@@ -216,9 +222,12 @@
 */
 
 ARM_FUNC_START ffi_closure_SYSV
+	.pad #16
 	add	ip, sp, #16
 	stmfd	sp!, {ip, lr}
+	.save	{r0, lr}
 	add	r2, sp, #8
+	.pad #16
 	sub	sp, sp, #16
 	str	sp, [sp, #8]
 	add	r1, sp, #8
@@ -273,5 +282,6 @@
 #endif
 
 .ffi_closure_SYSV_end:
+	.fnend
         .size    CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV)
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]