aboutsummaryrefslogtreecommitdiff
path: root/libffi/src/powerpc/darwin.S
diff options
context:
space:
mode:
Diffstat (limited to 'libffi/src/powerpc/darwin.S')
-rw-r--r--libffi/src/powerpc/darwin.S22
1 files changed, 16 insertions, 6 deletions
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