diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2013-12-16 17:17:41 +0000 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2013-12-16 17:17:41 +0000 |
commit | 77d4586cc47e8f4c02278afbc220145bba0d442b (patch) | |
tree | ba088e5e4c09032de0d5a4c06521c514a61352dd /testsuite/libffi.call/struct1_win32.c | |
parent | 7e282893378b9ea580e21e3ec48d2ad49d8735c0 (diff) | |
parent | 5c455874a36d62983b63c2ea33fdc861be417d18 (diff) | |
download | libffi-baserock/morph.tar.gz |
Merge branch 'baserock/pedroalvarez/power-port' into baserock/morphbaserock/morph
Reviewed-by: Ben Brown
Reviewed-by: Daniel Silverstone
Diffstat (limited to 'testsuite/libffi.call/struct1_win32.c')
-rw-r--r-- | testsuite/libffi.call/struct1_win32.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/testsuite/libffi.call/struct1_win32.c b/testsuite/libffi.call/struct1_win32.c index 4a7eb94..b756f5a 100644 --- a/testsuite/libffi.call/struct1_win32.c +++ b/testsuite/libffi.call/struct1_win32.c @@ -14,7 +14,7 @@ typedef struct unsigned int ui; } test_structure_1; -static __attribute__ ((fastcall)) test_structure_1 struct1(test_structure_1 ts) +static test_structure_1 __FASTCALL__ struct1(test_structure_1 ts) { ts.uc++; ts.d--; @@ -30,6 +30,13 @@ int main (void) void *values[MAX_ARGS]; ffi_type ts1_type; ffi_type *ts1_type_elements[4]; + + test_structure_1 ts1_arg; + + /* This is a hack to get a properly aligned result buffer */ + test_structure_1 *ts1_result = + (test_structure_1 *) malloc (sizeof(test_structure_1)); + ts1_type.size = 0; ts1_type.alignment = 0; ts1_type.type = FFI_TYPE_STRUCT; @@ -39,11 +46,6 @@ int main (void) ts1_type_elements[2] = &ffi_type_uint; ts1_type_elements[3] = NULL; - test_structure_1 ts1_arg; - /* This is a hack to get a properly aligned result buffer */ - test_structure_1 *ts1_result = - (test_structure_1 *) malloc (sizeof(test_structure_1)); - args[0] = &ts1_type; values[0] = &ts1_arg; |