Re-enable msabi testing (#436)
* Revert "disable msabi testing for now"
This reverts commit 7b7638eb0e.
* x86: Correct testing for 64-bit x86-64
Since passing -m32 to x86-64 compiler will generate i386 code, we
need to check both __ILP32__ and __i386__ for 64-bit x86-64.
* x86: Check __i386__ instead of i?86-*-* targets
Since passing -m32 to x86-64 compiler will generate i386 code, we need
to check __i386__ instead of i?86-*-* targets for i386 targets.
* i386: Properly passing integer parameters in registers
For thiscall and fastcall, if the paramter passed as 64-bit integer or
struct, all following integer paramters will be passed on stack.
* test: Add ABI_ATTR to callback_code
Add ABI_ATTR to callback_code to properly test different ABIs.
This commit is contained in:
@@ -317,22 +317,23 @@ proc run-many-tests { testcases extra_flags } {
|
||||
|
||||
set targetabis { "" }
|
||||
if [string match $compiler_vendor "gnu"] {
|
||||
if [istarget "i?86-*-*"] {
|
||||
if [libffi_feature_test "#ifdef __i386__"] {
|
||||
set targetabis {
|
||||
""
|
||||
"-DABI_NUM=FFI_STDCALL -DABI_ATTR=__STDCALL__"
|
||||
"-DABI_NUM=FFI_THISCALL -DABI_ATTR=__THISCALL__"
|
||||
"-DABI_NUM=FFI_FASTCALL -DABI_ATTR=__FASTCALL__"
|
||||
}
|
||||
} elseif { [istarget "x86_64-*-*"] \
|
||||
&& [libffi_feature_test "#if !defined __ILP32__ \
|
||||
&& !defined __i386__"] } {
|
||||
set targetabis {
|
||||
""
|
||||
"-DABI_NUM=FFI_WIN64 -DABI_ATTR=__MSABI__"
|
||||
}
|
||||
}
|
||||
# elseif { [istarget "x86_64-*-*"] \
|
||||
# && [libffi_feature_test "#ifndef __ILP32__"] } {
|
||||
# set targetabis {
|
||||
# ""
|
||||
# "-DABI_NUM=FFI_WIN64 -DABI_ATTR=__MSABI__"
|
||||
# }
|
||||
# }
|
||||
}
|
||||
|
||||
set common [ concat $common $extra_flags ]
|
||||
foreach test $testcases {
|
||||
set testname [file tail $test]
|
||||
|
||||
Reference in New Issue
Block a user