aboutsummaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2005-03-24 00:45:38 +0000
committerMike Stump <mrs@apple.com>2005-03-24 00:45:38 +0000
commit0d1b15f7c2da9cc3b61926eb534cb581f24eb267 (patch)
tree352417f09bb9c6a25eaefac030604021a423f2fa /libffi
parent52627ccf623dc936a2b3456d82d0bea93f07709f (diff)
* src/powerpc/darwin.S: Update for -m64 multilib.
* src/powerpc/darwin_closure.S: Likewise. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@96967 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog5
-rw-r--r--libffi/src/powerpc/darwin.S22
-rw-r--r--libffi/src/powerpc/darwin_closure.S41
3 files changed, 48 insertions, 20 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 88dc9581e0a..fa801d1539c 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-23 Mike Stump <mrs@apple.com>
+
+ * src/powerpc/darwin.S: Update for -m64 multilib.
+ * src/powerpc/darwin_closure.S: Likewise.
+
2005-03-21 Zack Weinberg <zack@codesourcery.com>
* configure.ac: Do not invoke TL_AC_GCC_VERSION.
diff --git a/libffi/src/powerpc/darwin.S b/libffi/src/powerpc/darwin.S
index b608e9c0333..d8a1df5fe98 100644
--- a/libffi/src/powerpc/darwin.S
+++ b/libffi/src/powerpc/darwin.S
@@ -24,6 +24,16 @@
OTHER DEALINGS IN THE SOFTWARE.
----------------------------------------------------------------------- */
+#if defined(__ppc64__)
+#define MODE_CHOICE(x, y) y
+#else
+#define MODE_CHOICE(x, y) x
+#endif
+
+#define g_long MODE_CHOICE(long, quad) /* usage is ".g_long" */
+
+#define LOG2_GPR_BYTES MODE_CHOICE(2,3) /* log2(GPR_BYTES) */
+
#define LIBFFI_ASM
#include <fficonfig.h>
#include <ffi.h>
@@ -190,7 +200,7 @@ LSCIE1:
.byte 0xc ; DW_CFA_def_cfa
.byte 0x1 ; uleb128 0x1
.byte 0x0 ; uleb128 0x0
- .align 2
+ .align LOG2_GPR_BYTES
LECIE1:
.globl _ffi_call_DARWIN.eh
_ffi_call_DARWIN.eh:
@@ -199,9 +209,9 @@ LSFDE1:
.long L$set$1 ; FDE Length
LASFDE1:
.long LASFDE1-EH_frame1 ; FDE CIE offset
- .long LLFB0$non_lazy_ptr-. ; FDE initial location
+ .g_long LLFB0$non_lazy_ptr-. ; FDE initial location
.set L$set$3,LFE1-LFB0
- .long L$set$3 ; FDE address range
+ .g_long L$set$3 ; FDE address range
.byte 0x0 ; uleb128 0x0; Augmentation size
.byte 0x4 ; DW_CFA_advance_loc4
.set L$set$4,LCFI0-LFB1
@@ -227,9 +237,9 @@ LASFDE1:
.long L$set$6
.byte 0xd ; DW_CFA_def_cfa_register
.byte 0x1c ; uleb128 0x1c
- .align 2
+ .align LOG2_GPR_BYTES
LEFDE1:
.data
- .align 2
+ .align LOG2_GPR_BYTES
LLFB0$non_lazy_ptr:
- .long LFB0
+ .g_long LFB0
diff --git a/libffi/src/powerpc/darwin_closure.S b/libffi/src/powerpc/darwin_closure.S
index 272278b938b..7959838e95b 100644
--- a/libffi/src/powerpc/darwin_closure.S
+++ b/libffi/src/powerpc/darwin_closure.S
@@ -27,13 +27,25 @@
#define LIBFFI_ASM
#define L(x) x
+#if defined(__ppc64__)
+#define MODE_CHOICE(x, y) y
+#else
+#define MODE_CHOICE(x, y) x
+#endif
+
+#define lgu MODE_CHOICE(lwzu, ldu)
+
+#define g_long MODE_CHOICE(long, quad) /* usage is ".g_long" */
+
+#define LOG2_GPR_BYTES MODE_CHOICE(2,3) /* log2(GPR_BYTES) */
+
.file "darwin_closure.S"
.text
- .align 2
+ .align LOG2_GPR_BYTES
.globl _ffi_closure_ASM
.text
- .align 2
+ .align LOG2_GPR_BYTES
_ffi_closure_ASM:
LFB1:
mflr r0 /* extract return address */
@@ -234,7 +246,7 @@ Lfinish:
/* END(ffi_closure_ASM) */
.data
-.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms
+.section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
EH_frame1:
.set L$set$0,LECIE1-LSCIE1
.long L$set$0 ; Length of Common Information Entry
@@ -250,7 +262,7 @@ LSCIE1:
.byte 0xc ; DW_CFA_def_cfa
.byte 0x1 ; uleb128 0x1
.byte 0x0 ; uleb128 0x0
- .align 2
+ .align LOG2_GPR_BYTES
LECIE1:
.globl _ffi_closure_ASM.eh
_ffi_closure_ASM.eh:
@@ -260,9 +272,9 @@ LSFDE1:
LASFDE1:
.long LASFDE1-EH_frame1 ; FDE CIE offset
- .long LLFB1$non_lazy_ptr-. ; FDE initial location
+ .g_long LLFB1$non_lazy_ptr-. ; FDE initial location
.set L$set$3,LFE1-LFB1
- .long L$set$3 ; FDE address range
+ .g_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
@@ -275,14 +287,15 @@ LASFDE1:
.byte 0x11 ; DW_CFA_offset_extended_sf
.byte 0x41 ; uleb128 0x41
.byte 0x7e ; sleb128 -2
- .align 2
+ .align LOG2_GPR_BYTES
LEFDE1:
.data
- .align 2
+ .align LOG2_GPR_BYTES
LDFCM0:
.section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32
- .align 2
+ .align LOG2_GPR_BYTES
Lffi_closure_helper_DARWIN$stub:
+#if 1
.indirect_symbol _ffi_closure_helper_DARWIN
mflr r0
bcl 20,31,LO$ffi_closure_helper_DARWIN
@@ -290,15 +303,15 @@ LO$ffi_closure_helper_DARWIN:
mflr r11
addis r11,r11,ha16(L_ffi_closure_helper_DARWIN$lazy_ptr - LO$ffi_closure_helper_DARWIN)
mtlr r0
- lwzu r12,lo16(L_ffi_closure_helper_DARWIN$lazy_ptr - LO$ffi_closure_helper_DARWIN)(r11)
+ lgu r12,lo16(L_ffi_closure_helper_DARWIN$lazy_ptr - LO$ffi_closure_helper_DARWIN)(r11)
mtctr r12
bctr
-.data
.lazy_symbol_pointer
L_ffi_closure_helper_DARWIN$lazy_ptr:
.indirect_symbol _ffi_closure_helper_DARWIN
- .long dyld_stub_binding_helper
+ .g_long dyld_stub_binding_helper
+#endif
.data
- .align 2
+ .align LOG2_GPR_BYTES
LLFB1$non_lazy_ptr:
- .long LFB1
+ .g_long LFB1