libffi unwinder data
Andrew Haley
aph@cambridge.redhat.com
Sun Jun 3 06:56:00 GMT 2001
Unwind info for asm sources in libffi: this is made necesary by the
new exception handling.
Without this, interpreted Java crashes when catching exceptions.
I checked these into branch and trunk,
Andrew.
2001年06月03日 Andrew Haley <aph@redhat.com>
* src/alpha/osf.S: Add unwind info.
* src/powerpc/sysv.S: Add unwind info.
* src/powerpc/ppc_closure.S: Likewise.
Index: src/alpha/osf.S
===================================================================
RCS file: /cvs/gcc/gcc/libffi/src/alpha/osf.S,v
retrieving revision 1.3
diff -c -2 -r1.3 osf.S
*** osf.S 2000年12月10日 07:13:18 1.3
--- osf.S 2001年06月03日 13:31:36
***************
*** 1,4 ****
/* -----------------------------------------------------------------------
! osf.S - Copyright (c) 1998 Cygnus Solutions
Alpha/OSF Foreign Function Interface
--- 1,4 ----
/* -----------------------------------------------------------------------
! osf.S - Copyright (c) 1998, 2001 Red Hat
Alpha/OSF Foreign Function Interface
***************
*** 45,54 ****
--- 45,58 ----
.frame 15,ドル 32, 26,ドル 0
.mask 0x4008000, -32
+ $LFB1:
addq 16,ドル17,ドル1ドル
mov 16,ドル 30ドル
stq 26,ドル 0(1ドル)
+ $LCFI0:
stq 15,ドル 8(1ドル)
+ $LCFI1:
stq 18,ドル 16(1ドル)
mov 1,ドル 15ドル
+ $LCFI2:
.prologue 0
***************
*** 111,114 ****
--- 115,119 ----
ldq 15,ドル 8(15ドル)
ret
+ $LFE1:
.end ffi_call_osf
***************
*** 124,130 ****
--- 129,138 ----
.frame 30,ドル 16*8, 26,ドル 0
.mask 0x4000000, -16*8
+ $LFB2:
ldgp 29,ドル 0(27ドル)
subq 30,ドル 16*8, 30ドル
+ $LCFI5:
stq 26,ドル 0(30ドル)
+ $LCFI6:
.prologue 1
***************
*** 240,243 ****
--- 248,252 ----
addq 30,ドル 16*8, 30ドル
ret
+ $LFE2:
.end ffi_closure_osf
***************
*** 278,279 ****
--- 287,348 ----
#error "osf.S out of sync with ffi.h"
#endif
+
+ .section .eh_frame,"aw",@progbits
+ __FRAME_BEGIN__:
+ .4byte $LECIE1-$LSCIE1 # Length of Common Information Entry
+ $LSCIE1:
+ .4byte 0x0 # CIE Identifier Tag
+ .byte 0x1 # CIE Version
+ .ascii "zR0円" # CIE Augmentation
+ .byte 0x1 # uleb128 0x1; CIE Code Alignment Factor
+ .byte 0x78 # sleb128 -8; CIE Data Alignment Factor
+ .byte 0x1a # CIE RA Column
+ .byte 0x1 # uleb128 0x1; Augmentation size
+ .byte 0x1b # FDE Encoding (pcrel sdata4)
+ .byte 0xc # DW_CFA_def_cfa
+ .byte 0x1e # uleb128 0x1e
+ .byte 0x0 # uleb128 0x0
+ .align 3
+ $LECIE1:
+ $LSFDE1:
+ .4byte $LEFDE1-$LASFDE1 # FDE Length
+ $LASFDE1:
+ .4byte $LASFDE1-__FRAME_BEGIN__ # FDE CIE offset
+ .4byte $LFB1-. # FDE initial location
+ .4byte $LFE1-$LFB1 # FDE address range
+ .byte 0x0 # uleb128 0x0; Augmentation size
+ .byte 0x4 # DW_CFA_advance_loc4
+ .4byte $LCFI0-$LFB1
+ .byte 0xe # DW_CFA_def_cfa_offset
+ .byte 0x30 # uleb128 0x30
+ .byte 0x4 # DW_CFA_advance_loc4
+ .4byte $LCFI1-$LCFI0
+ .byte 0x9a # DW_CFA_offset, column 0x1a
+ .byte 0x6 # uleb128 0x6
+ .byte 0x8f # DW_CFA_offset, column 0xf
+ .byte 0x5 # uleb128 0x5
+ .byte 0x4 # DW_CFA_advance_loc4
+ .4byte $LCFI2-$LCFI1
+ .byte 0xc # DW_CFA_def_cfa
+ .byte 0xf # uleb128 0xf
+ .byte 0x30 # uleb128 0x30
+ .align 3
+ $LEFDE1:
+
+ $LSFDE3:
+ .4byte $LEFDE3-$LASFDE3 # FDE Length
+ $LASFDE3:
+ .4byte $LASFDE3-__FRAME_BEGIN__ # FDE CIE offset
+ .4byte $LFB2-. # FDE initial location
+ .4byte $LFE2-$LFB2 # FDE address range
+ .byte 0x0 # uleb128 0x0; Augmentation size
+ .byte 0x4 # DW_CFA_advance_loc4
+ .4byte $LCFI5-$LFB2
+ .byte 0xe # DW_CFA_def_cfa_offset
+ .byte 0x90,0x1 # uleb128 0x90
+ .byte 0x4 # DW_CFA_advance_loc4
+ .4byte $LCFI6-$LCFI5
+ .byte 0x9a # DW_CFA_offset, column 0x1a
+ .byte 0x12 # uleb128 0x12
+ .align 3
+ $LEFDE3:
Index: src/powerpc/sysv.S
===================================================================
RCS file: /cvs/gcc/gcc/libffi/src/powerpc/sysv.S,v
retrieving revision 1.1.1.1
diff -c -2 -r1.1.1.1 sysv.S
*** sysv.S 1999年08月08日 13:27:19 1.1.1.1
--- sysv.S 2001年06月03日 13:31:36
***************
*** 32,38 ****
--- 32,40 ----
.globl ffi_prep_args
ENTRY(ffi_call_SYSV)
+ .LFB1:
/* Save the old stack pointer as AP. */
mr %r8,%r1
+ .LCFI0:
/* Allocate the stack space we need. */
stwux %r1,%r1,%r4
***************
*** 40,47 ****
--- 42,54 ----
mflr %r9
stw %r28,-16(%r8)
+ .LCFI1:
stw %r29,-12(%r8)
+ .LCFI2:
stw %r30, -8(%r8)
+ .LCFI3:
stw %r31, -4(%r8)
+ .LCFI4:
stw %r9, 4(%r8)
+ .LCFI5:
/* Save arguments over call... */
***************
*** 50,53 ****
--- 57,61 ----
mr %r29,%r7 /* function address, */
mr %r28,%r8 /* our AP. */
+ .LCFI6:
/* Call ffi_prep_args. */
***************
*** 117,119 ****
--- 125,173 ----
stfs %f1,0(%r30)
b L(done_return_value)
+ .LFE1:
END(ffi_call_SYSV)
+
+ .section ".eh_frame","aw"
+ __FRAME_BEGIN__:
+ .4byte .LECIE1-.LSCIE1 /* Length of Common Information Entry */
+ .LSCIE1:
+ .4byte 0x0 /* CIE Identifier Tag */
+ .byte 0x1 /* CIE Version */
+ .ascii "0円" /* CIE Augmentation */
+ .byte 0x1 /* uleb128 0x1; CIE Code Alignment Factor */
+ .byte 0x7c /* sleb128 -4; CIE Data Alignment Factor */
+ .byte 0x41 /* CIE RA Column */
+ .byte 0xc /* DW_CFA_def_cfa */
+ .byte 0x1 /* uleb128 0x1 */
+ .byte 0x0 /* uleb128 0x0 */
+ .align 2
+ .LECIE1:
+ .LSFDE1:
+ .4byte .LEFDE1-.LASFDE1 /* FDE Length */
+ .LASFDE1:
+ .4byte .LASFDE1-__FRAME_BEGIN__ /* FDE CIE offset */
+ .4byte .LFB1 /* FDE initial location */
+ .4byte .LFE1-.LFB1 /* FDE address range */
+ .byte 0x4 /* DW_CFA_advance_loc4 */
+ .4byte .LCFI0-.LFB1
+ .byte 0xd /* DW_CFA_def_cfa_register */
+ .byte 0x08 /* uleb128 0x08 */
+ .byte 0x4 /* DW_CFA_advance_loc4 */
+ .4byte .LCFI5-.LCFI0
+ .byte 0x2f /* DW_CFA_GNU_negative_offset_extended */
+ .byte 0x41 /* uleb128 0x41 */
+ .byte 0x1 /* uleb128 0x1 */
+ .byte 0x9f /* DW_CFA_offset, column 0x1f */
+ .byte 0x1 /* uleb128 0x1 */
+ .byte 0x9e /* DW_CFA_offset, column 0x1e */
+ .byte 0x2 /* uleb128 0x2 */
+ .byte 0x9d /* DW_CFA_offset, column 0x1d */
+ .byte 0x3 /* uleb128 0x3 */
+ .byte 0x9c /* DW_CFA_offset, column 0x1c */
+ .byte 0x4 /* uleb128 0x4 */
+ .byte 0x4 /* DW_CFA_advance_loc4 */
+ .4byte .LCFI6-.LCFI5
+ .byte 0xd /* DW_CFA_def_cfa_register */
+ .byte 0x1c /* uleb128 0x1c */
+ .align 2
+ .LEFDE1:
Index: src/powerpc/ppc_closure.S
===================================================================
RCS file: /cvs/gcc/gcc/libffi/src/powerpc/ppc_closure.S,v
retrieving revision 1.1.2.1
diff -c -2 -r1.1.2.1 ppc_closure.S
*** ppc_closure.S 2001年03月24日 03:10:30 1.1.2.1
--- ppc_closure.S 2001年06月03日 13:31:36
***************
*** 5,11 ****
--- 5,14 ----
ENTRY(ffi_closure_SYSV)
+ .LFB1:
stwu %r1,-144(%r1)
+ .LCFI0:
mflr %r0
stw %r31,140(%r1)
+ .LCFI1:
stw %r0,148(%r1)
***************
*** 68,71 ****
--- 71,75 ----
mtctr %r3
bctr # jump to it
+ .LFE1:
.align 2
.L60:
***************
*** 144,147 ****
--- 148,185 ----
END(ffi_closure_SYSV)
+ .section ".eh_frame","aw"
+ __FRAME_BEGIN__:
+ .4byte .LECIE1-.LSCIE1 # Length of Common Information Entry
+ .LSCIE1:
+ .4byte 0x0 # CIE Identifier Tag
+ .byte 0x1 # CIE Version
+ .ascii "0円" # CIE Augmentation
+ .byte 0x1 # uleb128 0x1; CIE Code Alignment Factor
+ .byte 0x7c # sleb128 -4; CIE Data Alignment Factor
+ .byte 0x41 # CIE RA Column
+ .byte 0xc # DW_CFA_def_cfa
+ .byte 0x1 # uleb128 0x1
+ .byte 0x0 # uleb128 0x0
+ .align 2
+ .LECIE1:
+ .LSFDE1:
+ .4byte .LEFDE1-.LASFDE1 # FDE Length
+ .LASFDE1:
+ .4byte .LASFDE1-__FRAME_BEGIN__ # FDE CIE offset
+ .4byte .LFB1 # FDE initial location
+ .4byte .LFE1-.LFB1 # FDE address range
+ .byte 0x4 # DW_CFA_advance_loc4
+ .4byte .LCFI0-.LFB1
+ .byte 0xe # DW_CFA_def_cfa_offset
+ .byte 144,1 # uleb128 144
+ .byte 0x4 # DW_CFA_advance_loc4
+ .4byte .LCFI1-.LCFI0
+ .byte 0x2f # DW_CFA_GNU_negative_offset_extended
+ .byte 0x41 # uleb128 0x41
+ .byte 0x1 # uleb128 0x1
+ .align 2
+ .LEFDE1:
More information about the Java
mailing list