Veikka Tuominen
d968d9d103
llvm: add attributes to the arguments of function pointer calls
...
Closes #13605
2022-11-20 20:25:12 +02:00
Veikka Tuominen
9e7293619f
llvm: aarch64 C ABI: pass byref params as mutable pointers
...
Closes #13597
2022-11-20 20:25:12 +02:00
Guillaume Wenzek
5221c90164
add C ABI tests with double
...
const DC = extern struct { v1: f64, v2: u8 };
const CFF = extern struct { v1: u8, v2: f32, v3: f32 };
const PD = extern struct { v1: ?*anyopaque, v2: f64 };
Signed-off-by: Guillaume Wenzek <gwenzek@users.noreply.github.com>
2022-11-18 14:05:25 +02:00
Veikka Tuominen
f2a7aba586
x86_64 llvm: correct lowering of ptr sized float struct
...
Closes #13211
2022-10-22 22:00:59 +03:00
Veikka Tuominen
5e0b4836a1
stage2: implement RISCV C ABI
2022-10-22 14:52:26 +03:00
Veikka Tuominen
12a2ccfb45
make C ABI tests compile on powerpc
2022-10-22 11:31:41 +03:00
Veikka Tuominen
031c768cc8
add C ABI tests for simd vectors
2022-10-22 11:31:41 +03:00
Veikka Tuominen
9ae78a5890
stage2: implement ARM C ABI
...
Six new passing tests and the previously incorrectly passing
complex tests are now skipped.
2022-10-21 18:07:11 +03:00
Veikka Tuominen
2609e33ab0
make C ABI tests compile on arm, mips and riscv
...
x86_64 24/25
x86 15/25
aarch64 25/25 - all
arm 18/25
mips 10/24
riscv64 13/25
wasm32 25/25 - all
2022-10-20 20:11:12 +03:00
Veikka Tuominen
646d927c79
stage2: fix handling of aarch64 C ABI float array like structs
...
Closes #11702
Closes #13125
2022-10-20 20:11:12 +03:00
Veikka Tuominen
7e946bc790
make C ABI tests compile on i386
2022-10-20 20:11:12 +03:00
Veikka Tuominen
51491186cb
stage2: fix x86_64 C ABI of struct with array member
...
Closes #12185
2022-10-20 20:11:12 +03:00
Cody Tapscott
a06185f362
C ABI: Add tests for complex float/double support
...
These tests will be failing on many platforms until #8465 is resolved.
Luckily, the particular function signature used for __divXc3 and __mulXc3
seems to be OK on x86-64.
2022-10-09 23:24:29 -07:00
Cody Tapscott
e165b8b223
stage2: Fix multiple_llvm_int parameter passing
...
Small iteration oopsie
We could really use some more comprehensive C ABI tests.
2022-09-28 12:48:28 +03:00
Veikka Tuominen
b83c037f9f
Sema: only ABI sized packed structs are extern compatible
2022-09-03 01:04:46 +03:00
Luuk de Gram
91dba79c48
wasm: fix abi size of c_longdouble
...
According to https://github.com/WebAssembly/tool-conventions/blob/main/BasicCABI.md
the size of c's long double is 16 bytes for Wasm, rather than 8 bytes
which was the value previously in the compiler. This ensures
we not only pass the correct value, but also creates the correct
function signature needed to pass the Wasm validator.
This also adds an additional test case in c_abi tests.
2022-08-26 21:01:05 +02:00
Andrew Kelley
e2d4709779
C ABI tests no longer apply to only stage1
2022-07-26 14:51:45 -07:00