xlc compiler support

This commit is contained in:
Anthony Green
2013-01-11 16:54:40 -05:00
parent 0b4986a788
commit 05fbe1faed
5 changed files with 21 additions and 11 deletions

View File

@@ -1,3 +1,12 @@
2013-01-11 Anthony Green <green@moxielogic.com>
* src/powerpc/ffi_darwin.c (ffi_prep_args): Replace // style
comments with /* */ for xlc compiler.
* src/powerpc/aix.S (ffi_call_AIX): Ditto.
* testsuite/libffi.call/ffitest.h (allocate_mmap): Remove inline
for xlc compiler.
* README: Add update for AIX support.
2013-01-11 Anthony Green <green@moxielogic.com> 2013-01-11 Anthony Green <green@moxielogic.com>
* configure.ac: Robustify pc relative reloc check. * configure.ac: Robustify pc relative reloc check.

1
README
View File

@@ -66,6 +66,7 @@ tested:
| MIPS | Linux | GCC | | MIPS | Linux | GCC |
| MIPS | RTEMS | GCC | | MIPS | RTEMS | GCC |
| MIPS64 | Linux | GCC | | MIPS64 | Linux | GCC |
| Power | AIX 7.1.1.0 | IBM XL C/C++, V11.1 |
| PowerPC | AMIGA | GCC | | PowerPC | AMIGA | GCC |
| PowerPC | Linux | GCC | | PowerPC | Linux | GCC |
| PowerPC | Mac OSX | GCC | | PowerPC | Mac OSX | GCC |

View File

@@ -137,7 +137,7 @@ ffi_call_AIX:
mtcrf 0x40, r31 mtcrf 0x40, r31
mtctr r0 mtctr r0
/* Load all those argument registers. */ /* Load all those argument registers. */
// We have set up a nice stack frame, just load it into registers. /* We have set up a nice stack frame, just load it into registers. */
ld r3, 40+(1*8)(r1) ld r3, 40+(1*8)(r1)
ld r4, 40+(2*8)(r1) ld r4, 40+(2*8)(r1)
ld r5, 40+(3*8)(r1) ld r5, 40+(3*8)(r1)
@@ -150,7 +150,7 @@ ffi_call_AIX:
L1: L1:
/* Load all the FP registers. */ /* Load all the FP registers. */
bf 6,L2 // 2f + 0x18 bf 6,L2 /* 2f + 0x18 */
lfd f1,-32-(13*8)(r28) lfd f1,-32-(13*8)(r28)
lfd f2,-32-(12*8)(r28) lfd f2,-32-(12*8)(r28)
lfd f3,-32-(11*8)(r28) lfd f3,-32-(11*8)(r28)
@@ -239,7 +239,7 @@ L(float_return_value):
mtcrf 0x40, r31 mtcrf 0x40, r31
mtctr r0 mtctr r0
/* Load all those argument registers. */ /* Load all those argument registers. */
// We have set up a nice stack frame, just load it into registers. /* We have set up a nice stack frame, just load it into registers. */
lwz r3, 20+(1*4)(r1) lwz r3, 20+(1*4)(r1)
lwz r4, 20+(2*4)(r1) lwz r4, 20+(2*4)(r1)
lwz r5, 20+(3*4)(r1) lwz r5, 20+(3*4)(r1)
@@ -252,7 +252,7 @@ L(float_return_value):
L1: L1:
/* Load all the FP registers. */ /* Load all the FP registers. */
bf 6,L2 // 2f + 0x18 bf 6,L2 /* 2f + 0x18 */
lfd f1,-16-(13*8)(r28) lfd f1,-16-(13*8)(r28)
lfd f2,-16-(12*8)(r28) lfd f2,-16-(12*8)(r28)
lfd f3,-16-(11*8)(r28) lfd f3,-16-(11*8)(r28)
@@ -307,7 +307,7 @@ L(float_return_value):
#endif #endif
.long 0 .long 0
.byte 0,0,0,1,128,4,0,0 .byte 0,0,0,1,128,4,0,0
//END(ffi_call_AIX) /* END(ffi_call_AIX) */
.csect .text[PR] .csect .text[PR]
.align 2 .align 2
@@ -325,4 +325,4 @@ ffi_call_DARWIN:
blr blr
.long 0 .long 0
.byte 0,0,0,0,0,0,0,0 .byte 0,0,0,0,0,0,0,0
//END(ffi_call_DARWIN) /* END(ffi_call_DARWIN) */

View File

@@ -302,10 +302,10 @@ ffi_prep_args (extended_cif *ecif, unsigned long *const stack)
} }
/* Check that we didn't overrun the stack... */ /* Check that we didn't overrun the stack... */
//FFI_ASSERT(gpr_base <= stacktop - ASM_NEEDS_REGISTERS); /* FFI_ASSERT(gpr_base <= stacktop - ASM_NEEDS_REGISTERS);
//FFI_ASSERT((unsigned *)fpr_base FFI_ASSERT((unsigned *)fpr_base
// <= stacktop - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS); <= stacktop - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS);
//FFI_ASSERT(flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4); FFI_ASSERT(flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4); */
} }
#if defined(POWERPC_DARWIN64) #if defined(POWERPC_DARWIN64)

View File

@@ -128,7 +128,7 @@
#endif #endif
#ifdef USING_MMAP #ifdef USING_MMAP
static inline void * static void *
allocate_mmap (size_t size) allocate_mmap (size_t size)
{ {
void *page; void *page;