mirror of
https://github.com/partic2/libffi
synced 2026-11-10 10:07:19 +00:00
This separates the 32-bit sysv/linux/bsd code from the 64-bit linux
code, and makes it possible to link code compiled with different options to those used to compile libffi. For example, a -mlong-double-128 libffi can be used with -mlong-double-64 code. Using the return value area as a place to pass parameters wasn't such a good idea, causing a failure of cls_ulonglong.c. I didn't see this when running the mainline gcc libffi testsuite because that version of the test is inferior to the upstreamm libffi test. Using NUM_FPR_ARG_REGISTERS rather than NUM_FPR_ARG_REGISTERS64 meant that a parameter save area could be allocated before it was strictly necessary. Wrong but harmless. Found when splitting apart ffi.c into 32-bit and 64-bit support.
This commit is contained in:
committed by
Anthony Green
parent
69df91cfb4
commit
ac75368893
@@ -645,6 +645,7 @@ FFI_EXEC_TRAMPOLINE_TABLE
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_FALSE
|
||||
FFI_EXEC_TRAMPOLINE_TABLE_TRUE
|
||||
sys_symbol_underscore
|
||||
HAVE_LONG_DOUBLE_VARIANT
|
||||
HAVE_LONG_DOUBLE
|
||||
ALLOCA
|
||||
XTENSA_FALSE
|
||||
@@ -13345,6 +13346,7 @@ fi
|
||||
|
||||
|
||||
TARGETDIR="unknown"
|
||||
HAVE_LONG_DOUBLE_VARIANT=0
|
||||
case "$host" in
|
||||
aarch64*-*-*)
|
||||
TARGET=AARCH64; TARGETDIR=aarch64
|
||||
@@ -13505,6 +13507,7 @@ case "$host" in
|
||||
|
||||
powerpc*-*-linux* | powerpc-*-sysv*)
|
||||
TARGET=POWERPC; TARGETDIR=powerpc
|
||||
HAVE_LONG_DOUBLE_VARIANT=1
|
||||
;;
|
||||
powerpc-*-amigaos*)
|
||||
TARGET=POWERPC; TARGETDIR=powerpc
|
||||
@@ -13520,6 +13523,7 @@ case "$host" in
|
||||
;;
|
||||
powerpc-*-freebsd* | powerpc-*-openbsd*)
|
||||
TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
|
||||
HAVE_LONG_DOUBLE_VARIANT=1
|
||||
;;
|
||||
powerpc64-*-freebsd*)
|
||||
TARGET=POWERPC; TARGETDIR=powerpc
|
||||
@@ -14252,17 +14256,25 @@ _ACEOF
|
||||
# Also AC_SUBST this variable for ffi.h.
|
||||
if test -z "$HAVE_LONG_DOUBLE"; then
|
||||
HAVE_LONG_DOUBLE=0
|
||||
if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then
|
||||
if test $ac_cv_sizeof_long_double != 0; then
|
||||
if test $ac_cv_sizeof_long_double != 0; then
|
||||
if test $HAVE_LONG_DOUBLE_VARIANT != 0; then
|
||||
|
||||
$as_echo "#define HAVE_LONG_DOUBLE_VARIANT 1" >>confdefs.h
|
||||
|
||||
HAVE_LONG_DOUBLE=1
|
||||
else
|
||||
if test $ac_cv_sizeof_double != $ac_cv_sizeof_long_double; then
|
||||
HAVE_LONG_DOUBLE=1
|
||||
|
||||
$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
|
||||
$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
|
||||
if ${ac_cv_c_bigendian+:} false; then :
|
||||
|
||||
Reference in New Issue
Block a user