This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
libffi on PowerPC/AIX: aix_closure.S failure
- From: chennam <csit at axway dot com>
- To: libffi-discuss at sourceware dot org
- Date: Mon, 27 Feb 2012 02:40:03 -0800 (PST)
- Subject: libffi on PowerPC/AIX: aix_closure.S failure
Hi all,
I am running libffi 3.0.11 on PowerPC/AIX 6.1.
The host is 64 bits, but the targeted libffi.a to generate is 32 bits (as
for our need).
The downloaded package has been compiled with GCC v4.6.2 with the following
options:
<--------------------------------------------------------------------------------------------------------------
export CFLAGS="-DAIX -DPOWERPC_AIX -maix32 -maix-struct-return -mxl-compat"
export LDFLAGS="-lc128 -lc -lm -lpthread -g"
export AR="ar -X32_64"
./configure --enable-debug --disable-shared --with-pic --enable-threads
make
make check
ââ
=== libffi Summary ===
# of expected passes 813
# of unexpected failures 423
# of unsupported tests 55
-------------------------------------------------------------------------------------------------------------->
After some investigation of the failed tests, it appears that all failures
are related to closure calls of a function. I have isolated the test case
âtestclosure.câ by adding in some trace messages to trace the related
function calls. Here is the result:
<--------------------------------------------------------------------------------------------------------------
PASS: libffi.call/testclosure.c -O0 -W -Wall (test for excess errors)
Setting LD_LIBRARY_PATH to .::
/freeware/libffi/powerpc-ibm-aix6.1.0.0/testsuite/../.libs
:.:: /freeware/libffi/powerpc-ibm-aix6.1.0.0/testsuite/../.libs
spawn [open ...]
main: calling ffi_closure_alloc()
main: FFI_TRAMPOLINE_SIZE=12, ffi_aix_trampoline_struct size=12
main: calling ffi_prep_cif()
main: calling ffi_prep_closure_loc()
ffi_prep_closure_loc(): FFI_AIX:
main: calling code()
ffi_closure_helper_DARWIN(): avn=1, arg_types[0]=13
ffi_closure_helper_DARWIN(): calling closure->fun
cls_strcut_combined_gn: calling cls_struct_combined_fn()
4 5 1 8
cls_strcut_combined_gn: exit
ffi_closure_helper_DARWIN(): return from closure->fun. rtype=0
FAIL: libffi.call/testclosure.c -O0 -W -Wall execution test
-------------------------------------------------------------------------------------------------------------->
i.e. In testclosure.c
â.
fprintf(stdout, "main: calling code() \n"); fflush(stdout);
((void(*)(cls_struct_combined)) (code))(g_dbl);
fprintf(stdout, "main: exit \n"); fflush(stdout);
exit(0);
(code) has the assembly code to call ffi_closure_helper_DARWIN(), which
calls cls_struct_combined_gn()
cls_struct_combined_gn() runs correctly and returns to
ffi_closure_helper_DARWIN(), which then returns to the calling assembly
code.
Then the failure occurs. So I presume the failure occurs within the
aix_closure.S
I know nothing about PowerPC assembly code, so this is the lowest level of
tracing I can have.
Has anybody ever run successfully all test cases on PowerPC/AIX ?
Thanks for your attention.
P.S
BTW, it appear that aix.S works perfectly, since all ffi_call_AIX run
without any problem.
The behaviour is the same when I use libffi 3.0.10
--
View this message in context: http://old.nabble.com/libffi-on-PowerPC-AIX%3A-aix_closure.S-failure-tp33398886p33398886.html
Sent from the Sourceware - libffi-discuss mailing list archive at Nabble.com.