OSDN Git Service

2003-01-21 Andreas Tobler <a.tobler@schweiz.ch>
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Jan 2003 20:49:26 +0000 (20:49 +0000)
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 21 Jan 2003 20:49:26 +0000 (20:49 +0000)
* src/powerpc/darwin.S: Add unwind info.
* src/powerpc/darwin_closure.S: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61568 138bc75d-0d04-0410-961f-82ee72b054a4

libffi/ChangeLog
libffi/src/powerpc/darwin.S
libffi/src/powerpc/darwin_closure.S

index 6b5df6b..5517463 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-21  Andreas Tobler  <a.tobler@schweiz.ch>
+
+       * src/powerpc/darwin.S: Add unwind info.
+       * src/powerpc/darwin_closure.S: Likewise.
+
 2003-01-14  Andrew Haley  <aph@redhat.com>
 
        * src/x86/ffi64.c (ffi_prep_args): Check for void retval.
index 930f060..c8ab3fc 100644 (file)
 .text
        .align 2
 _ffi_call_DARWIN:
-       mr      r12,r8 // We only need r12 until the call, so it doesn't have to be saved...
+LFB0:  
+       mr      r12,r8          /* We only need r12 until the call,
+                               so it doesn't have to be saved...  */
+LFB1:  
        /* Save the old stack pointer as AP.  */
        mr      r8,r1
-
+LCFI0: 
        /* Allocate the stack space we need.  */
        stwux   r1,r1,r4        
        
        /* Save registers we use.  */
        mflr    r9
 
-       stw     r28,-16(r8)
+       stw     r28,-16(r8)     
        stw     r29,-12(r8)
        stw     r30, -8(r8)
        stw     r31, -4(r8)
-       
-       stw     r9,  8(r8)
+
+       stw     r9,  8(r8)      
        stw     r2, 20(r1)
+LCFI1: 
 
        /* Save arguments over call...  */
-       mr      r31,r5  /* flags, */
-       mr      r30,r6  /* rvalue, */
-       mr      r29,r7  /* function address, */
-       mr      r28,r8  /* our AP. */
-               
+       mr      r31,r5  /* flags,  */
+       mr      r30,r6  /* rvalue,  */
+       mr      r29,r7  /* function address,  */
+       mr      r28,r8  /* our AP.  */
+LCFI2:         
        /* Call ffi_prep_args.  */
        mr      r4,r1
        li      r9,0
@@ -143,7 +147,8 @@ L(fp_return_value):
 L(float_return_value):
        stfs    f1,0(r30)
        b       L(done_return_value)
-//END(_ffi_call_DARWIN)
+LFE1:  
+/* END(_ffi_call_DARWIN)  */
 
 /* Provide a null definition of _ffi_call_AIX.  */
 .text
@@ -153,5 +158,60 @@ L(float_return_value):
        .align 2
 _ffi_call_AIX:
        blr
-//END(_ffi_call_AIX)
-
+/* END(_ffi_call_AIX)  */
+
+.data
+.section __TEXT,__eh_frame
+Lframe1:
+       .set    L$set$0,LECIE1-LSCIE1
+       .long   L$set$0 ; Length of Common Information Entry
+LSCIE1:
+       .long   0x0     ; CIE Identifier Tag
+       .byte   0x1     ; CIE Version
+       .ascii  "zR\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   0x1     ; uleb128 0x1; Augmentation size
+       .byte   0x10    ; FDE Encoding (pcrel)
+       .byte   0xc     ; DW_CFA_def_cfa
+       .byte   0x1     ; uleb128 0x1
+       .byte   0x0     ; uleb128 0x0
+       .align  2
+LECIE1:
+LSFDE1:
+       .set    L$set$1,LEFDE1-LASFDE1
+       .long   L$set$1 ; FDE Length
+LASFDE1:
+       .set    L$set$2,LASFDE1-Lframe1
+       .long   L$set$2 ; FDE CIE offset
+       .long   LFB0-.  ; FDE initial location
+       .set    L$set$3,LFE1-LFB0
+       .long   L$set$3 ; FDE address range
+       .byte   0x4     ; DW_CFA_advance_loc4
+       .set    L$set$4,LCFI0-LFB1
+       .long   L$set$4
+       .byte   0xd     ; DW_CFA_def_cfa_register
+       .byte   0x08    ; uleb128 0x08 
+       .byte   0x4     ; DW_CFA_advance_loc4
+       .set    L$set$5,LCFI1-LCFI0
+       .long   L$set$5
+       .byte   0x11    ; DW_CFA_offset_extended_sf
+       .byte   0x41    ; uleb128 0x41
+       .byte   0x7e    ; sleb128 -2
+       .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 
+       .set    L$set$6,LCFI2-LCFI1
+       .long   L$set$6
+       .byte   0xd     ; DW_CFA_def_cfa_register 
+       .byte   0x1c    ; uleb128 0x1c 
+       .align 2
+LEFDE1:
+       
index 9e54d22..5420c77 100644 (file)
@@ -1,6 +1,6 @@
 /* -----------------------------------------------------------------------
-   darwin_closures.S - Copyright (c) 2002 Free Software Foundation, Inc.
-   based on ppc_closures.S
+   darwin_closure.S - Copyright (c) 2002 2003 Free Software Foundation, 
+   Inc. based on ppc_closure.S
  
    PowerPC Assembly glue.
 
 .text
        .align 2
 _ffi_closure_ASM:
-       
-       mflr r0                 /* extract return address */
-       stw r0, 8(r1)           /* save the return address */
-       
+LFB1:          
+       mflr r0                 /* extract return address  */
+       stw r0, 8(r1)           /* save the return address  */
+LCFI0: 
        /* 24 Bytes (Linkage Area) */
        /* 32 Bytes (outgoing parameter area, always reserved) */
        /* 104 Bytes (13*8 from FPR) */ 
        /* 4 Bytes (result)
        /* 164 Bytes */
        
-       stwu r1,-164(r1)        /* skip over caller save area */
-       
-/* we want to build up an area for the parameters passed */
-/* in registers (both floating point and integer) */
+       stwu r1,-164(r1)        /* skip over caller save area  */
+LCFI1:         
+       /* we want to build up an area for the parameters passed
+       in registers (both floating point and integer)  */
        
        /* we store gpr 3 to gpr 10 (aligned to 4) */
        /* in the parents outgoing area            */
@@ -111,7 +111,9 @@ _ffi_closure_ASM:
        lwzx r3,r4,r3           /* get the contents of that table value */
        add r3,r3,r4            /* add contents of table to table address */
        mtctr r3
-       bctr                    /* jump to it */
+       bctr                    /* jump to it  */
+LFE1:
+       .align  2
 
 .L60:
        .long .L44-.L60    /* FFI_TYPE_VOID */
@@ -185,5 +187,49 @@ _ffi_closure_ASM:
        mtlr r0                 /* reset link register */
        blr
        
-/* END(ffi_closure_ASM) */
+/* END(ffi_closure_ASM)  */
+
+.data
+.section __TEXT,__eh_frame
+Lframe1:
+       .set    L$set$0,LECIE1-LSCIE1
+       .long   L$set$0 ; Length of Common Information Entry
+LSCIE1:
+       .long   0x0     ; CIE Identifier Tag
+       .byte   0x1     ; CIE Version
+       .ascii  "zR\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   0x1     ; uleb128 0x1; Augmentation size
+       .byte   0x10    ; FDE Encoding (pcrel)
+       .byte   0xc     ; DW_CFA_def_cfa
+       .byte   0x1     ; uleb128 0x1
+       .byte   0x0     ; uleb128 0x0
+       .align  2
+LECIE1:
+LSFDE1:
+       .set    L$set$1,LEFDE1-LASFDE1
+       .long   L$set$1 ; FDE Length
+
+LASFDE1:
+       .set    L$set$2,LASFDE1-Lframe1
+       .long   L$set$2 ; FDE CIE offset
+       .long   LFB1-.  ; FDE initial location
+       .set    L$set$3,LFE1-LFB1
+       .long   L$set$3 ; FDE address range
+       .byte   0x0     ; uleb128 0x0; Augmentation size
+       .byte   0x4     ; DW_CFA_advance_loc4
+       .set    L$set$3,LCFI1-LCFI0
+       .long   L$set$3
+       .byte   0xe     ; DW_CFA_def_cfa_offset
+       .byte   164,1   ; uleb128 164
+       .byte   0x4     ; DW_CFA_advance_loc4
+       .set    L$set$4,LCFI0-LFB1
+       .long   L$set$4
+       .byte   0x11    ; DW_CFA_offset_extended_sf
+       .byte   0x41    ; uleb128 0x41
+       .byte   0x7e    ; sleb128 -2
+       .align  2
+LEFDE1: