summaryrefslogtreecommitdiffstats
path: root/libffi/src/alpha
diff options
context:
space:
mode:
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-29 08:49:08 +0000
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-29 08:49:08 +0000
commit526ee8cf611b8546fa161aa9570b7fe32695dcba (patch)
tree17b48b4b75626c5b0439993a77c53e5cdf93f233 /libffi/src/alpha
parentd0aa45d0e076f4b997afbac938d8808cbe34d0c2 (diff)
downloadppe42-gcc-526ee8cf611b8546fa161aa9570b7fe32695dcba.tar.gz
ppe42-gcc-526ee8cf611b8546fa161aa9570b7fe32695dcba.zip
* src/alpha/osf.S (UA_SI, FDE_ENCODING, FDE_ENCODE, FDE_ARANGE):
Define. Use them to handle ELF vs. ECOFF differences. [__osf__] (_GLOBAL__F_ffi_call_osf): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173151 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi/src/alpha')
-rw-r--r--libffi/src/alpha/osf.S57
1 files changed, 39 insertions, 18 deletions
diff --git a/libffi/src/alpha/osf.S b/libffi/src/alpha/osf.S
index d0e77828f5c..6b9f4dfa031 100644
--- a/libffi/src/alpha/osf.S
+++ b/libffi/src/alpha/osf.S
@@ -1,5 +1,5 @@
/* -----------------------------------------------------------------------
- osf.S - Copyright (c) 1998, 2001, 2007, 2008 Red Hat
+ osf.S - Copyright (c) 1998, 2001, 2007, 2008, 2011 Red Hat
Alpha/OSF Foreign Function Interface
@@ -299,33 +299,51 @@ $load_table:
#endif
#ifdef __ELF__
+# define UA_SI .4byte
+# define FDE_ENCODING 0x1b /* pcrel sdata4 */
+# define FDE_ENCODE(X) .4byte X-.
+# define FDE_ARANGE(X) .4byte X
+#elif defined __osf__
+# define UA_SI .align 0; .long
+# define FDE_ENCODING 0x50 /* aligned absolute */
+# define FDE_ENCODE(X) .align 3; .quad X
+# define FDE_ARANGE(X) .align 0; .quad X
+#endif
+
+#ifdef __ELF__
.section .eh_frame,EH_FRAME_FLAGS,@progbits
+#elif defined __osf__
+ .data
+ .align 3
+ .globl _GLOBAL__F_ffi_call_osf
+_GLOBAL__F_ffi_call_osf:
+#endif
__FRAME_BEGIN__:
- .4byte $LECIE1-$LSCIE1 # Length of Common Information Entry
+ UA_SI $LECIE1-$LSCIE1 # Length of Common Information Entry
$LSCIE1:
- .4byte 0x0 # CIE Identifier Tag
+ UA_SI 0x0 # CIE Identifier Tag
.byte 0x1 # CIE Version
.ascii "zR\0" # CIE Augmentation
.byte 0x1 # uleb128 0x1; CIE Code Alignment Factor
.byte 0x78 # sleb128 -8; CIE Data Alignment Factor
.byte 26 # CIE RA Column
.byte 0x1 # uleb128 0x1; Augmentation size
- .byte 0x1b # FDE Encoding (pcrel sdata4)
+ .byte FDE_ENCODING # FDE Encoding
.byte 0xc # DW_CFA_def_cfa
.byte 30 # uleb128 column 30
.byte 0 # uleb128 offset 0
.align 3
$LECIE1:
$LSFDE1:
- .4byte $LEFDE1-$LASFDE1 # FDE Length
+ UA_SI $LEFDE1-$LASFDE1 # FDE Length
$LASFDE1:
- .4byte $LASFDE1-__FRAME_BEGIN__ # FDE CIE offset
- .4byte $LFB1-. # FDE initial location
- .4byte $LFE1-$LFB1 # FDE address range
+ UA_SI $LASFDE1-__FRAME_BEGIN__ # FDE CIE offset
+ FDE_ENCODE($LFB1) # FDE initial location
+ FDE_ARANGE($LFE1-$LFB1) # FDE address range
.byte 0x0 # uleb128 0x0; Augmentation size
.byte 0x4 # DW_CFA_advance_loc4
- .4byte $LCFI1-$LFB1
+ UA_SI $LCFI1-$LFB1
.byte 0x9a # DW_CFA_offset, column 26
.byte 4 # uleb128 4*-8
.byte 0x8f # DW_CFA_offset, column 15
@@ -335,32 +353,35 @@ $LASFDE1:
.byte 32 # uleb128 offset 32
.byte 0x4 # DW_CFA_advance_loc4
- .4byte $LCFI2-$LCFI1
+ UA_SI $LCFI2-$LCFI1
.byte 0xda # DW_CFA_restore, column 26
.align 3
$LEFDE1:
$LSFDE3:
- .4byte $LEFDE3-$LASFDE3 # FDE Length
+ UA_SI $LEFDE3-$LASFDE3 # FDE Length
$LASFDE3:
- .4byte $LASFDE3-__FRAME_BEGIN__ # FDE CIE offset
- .4byte $LFB2-. # FDE initial location
- .4byte $LFE2-$LFB2 # FDE address range
+ UA_SI $LASFDE3-__FRAME_BEGIN__ # FDE CIE offset
+ FDE_ENCODE($LFB2) # FDE initial location
+ FDE_ARANGE($LFE2-$LFB2) # FDE address range
.byte 0x0 # uleb128 0x0; Augmentation size
.byte 0x4 # DW_CFA_advance_loc4
- .4byte $LCFI5-$LFB2
+ UA_SI $LCFI5-$LFB2
.byte 0xe # DW_CFA_def_cfa_offset
.byte 0x80,0x1 # uleb128 128
.byte 0x4 # DW_CFA_advance_loc4
- .4byte $LCFI6-$LCFI5
+ UA_SI $LCFI6-$LCFI5
.byte 0x9a # DW_CFA_offset, column 26
.byte 16 # uleb128 offset 16*-8
.align 3
$LEFDE3:
+#if defined __osf__
+ .align 0
+ .long 0 # End of Table
+#endif
-#ifdef __linux__
+#if defined __ELF__ && defined __linux__
.section .note.GNU-stack,"",@progbits
#endif
-#endif
OpenPOWER on IntegriCloud