diff --git a/ChangeLog b/ChangeLog index b6f86d53..144833ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2013-01-11 Anthony Green + + * 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 * configure.ac: Robustify pc relative reloc check. diff --git a/README b/README index 936b971f..dc9bf2ae 100644 --- a/README +++ b/README @@ -66,6 +66,7 @@ tested: | MIPS | Linux | GCC | | MIPS | RTEMS | GCC | | MIPS64 | Linux | GCC | +| Power | AIX 7.1.1.0 | IBM XL C/C++, V11.1 | | PowerPC | AMIGA | GCC | | PowerPC | Linux | GCC | | PowerPC | Mac OSX | GCC | diff --git a/src/powerpc/aix.S b/src/powerpc/aix.S index 213f2db3..349e78c2 100644 --- a/src/powerpc/aix.S +++ b/src/powerpc/aix.S @@ -137,7 +137,7 @@ ffi_call_AIX: mtcrf 0x40, r31 mtctr r0 /* 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 r4, 40+(2*8)(r1) ld r5, 40+(3*8)(r1) @@ -150,7 +150,7 @@ ffi_call_AIX: L1: /* Load all the FP registers. */ - bf 6,L2 // 2f + 0x18 + bf 6,L2 /* 2f + 0x18 */ lfd f1,-32-(13*8)(r28) lfd f2,-32-(12*8)(r28) lfd f3,-32-(11*8)(r28) @@ -239,7 +239,7 @@ L(float_return_value): mtcrf 0x40, r31 mtctr r0 /* 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 r4, 20+(2*4)(r1) lwz r5, 20+(3*4)(r1) @@ -252,7 +252,7 @@ L(float_return_value): L1: /* Load all the FP registers. */ - bf 6,L2 // 2f + 0x18 + bf 6,L2 /* 2f + 0x18 */ lfd f1,-16-(13*8)(r28) lfd f2,-16-(12*8)(r28) lfd f3,-16-(11*8)(r28) @@ -307,7 +307,7 @@ L(float_return_value): #endif .long 0 .byte 0,0,0,1,128,4,0,0 -//END(ffi_call_AIX) +/* END(ffi_call_AIX) */ .csect .text[PR] .align 2 @@ -325,4 +325,4 @@ ffi_call_DARWIN: blr .long 0 .byte 0,0,0,0,0,0,0,0 -//END(ffi_call_DARWIN) +/* END(ffi_call_DARWIN) */ diff --git a/src/powerpc/ffi_darwin.c b/src/powerpc/ffi_darwin.c index dd897f4c..1d1d48c2 100644 --- a/src/powerpc/ffi_darwin.c +++ b/src/powerpc/ffi_darwin.c @@ -302,10 +302,10 @@ ffi_prep_args (extended_cif *ecif, unsigned long *const stack) } /* Check that we didn't overrun the stack... */ - //FFI_ASSERT(gpr_base <= stacktop - ASM_NEEDS_REGISTERS); - //FFI_ASSERT((unsigned *)fpr_base - // <= stacktop - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS); - //FFI_ASSERT(flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4); + /* FFI_ASSERT(gpr_base <= stacktop - ASM_NEEDS_REGISTERS); + FFI_ASSERT((unsigned *)fpr_base + <= stacktop - ASM_NEEDS_REGISTERS - NUM_GPR_ARG_REGISTERS); + FFI_ASSERT(flags & FLAG_4_GPR_ARGUMENTS || intarg_count <= 4); */ } #if defined(POWERPC_DARWIN64) diff --git a/testsuite/libffi.call/ffitest.h b/testsuite/libffi.call/ffitest.h index a264fb5c..5564b6d3 100644 --- a/testsuite/libffi.call/ffitest.h +++ b/testsuite/libffi.call/ffitest.h @@ -128,7 +128,7 @@ #endif #ifdef USING_MMAP -static inline void * +static void * allocate_mmap (size_t size) { void *page;