Laytan Laats
e8c5bb4629
compiler: support returning 0 sized types in arm64 abi
2024-04-24 19:50:39 +02:00
Laytan Laats
133b45d843
fix amd64 sysv abi to pass asan everywhere
...
I verified the PR by running the entire test suite of Odin itself with
`-sanitize:address` and also the ols test suite (which caused unique problems
before).
A test has also been added with some problematic code, Windows seems to
have problems with asan in CI or in general so it is not ran there.
The LB_ABI_COMPUTE_RETURN_TYPES block has been removed entirely because
it was unused, I got pretty confused why it didn't effect anything at
first.
Fixes #3211
2024-04-04 23:45:23 +02:00
gingerBill
fbff2b4fd6
Merge pull request #3372 from laytan/fix-lbarg-ignore-logic
...
fix lbArg_Ignore logic
2024-04-04 18:09:12 +01:00
Laytan Laats
31407d9b1b
fix 128 bit int alignment on arm64
...
Fixes #2403
2024-04-04 18:39:41 +02:00
Laytan Laats
a7056f2b4f
fix lbArg_Ignore logic
...
Fixes #2698
2024-04-04 16:58:22 +02:00
gingerBill
308e9112f2
Disable packing on ARM64 and AMD64
2024-03-28 10:58:40 +00:00
gingerBill
6588fe35b3
Fix wasm abi
2024-03-26 16:47:29 +00:00
Laytan Laats
07a9969a41
darwin: arm64 abi fixes
...
Since commit b4fe9677a1 some core tests
segfault during build, upon investigation it is because some arg types
were of size 0 and you can't have a 0 sized int.
It also applies the earlier fix for parameters to the return types, this
fixes #3223
Thought I would put this PR up, but I am in no way an expert in abi so
feel free to close for a better fix if there is one.
I am able to run the entire core test suite with `-sanitize:address`
with these changes.
2024-03-23 23:17:01 +01:00
gingerBill
c17adc98f5
Try doing <{i64, i32}> instead of [i64, i64] for ARM64 12-byte parameters
2024-03-20 17:39:00 +00:00
gingerBill
e804fbd891
Force packed structs in ABI parameters
2024-03-20 17:27:05 +00:00
gingerBill
b4fe9677a1
Change ARM64 ABI for integer-like parameters
2024-03-20 16:06:50 +00:00
gingerBill
1514d64964
Update ARM64 ABI return type
2024-03-20 11:12:43 +00:00
gingerBill
082324d7b9
Begin work on making the type info table be constantly initialized
2023-09-22 14:39:51 +01:00
gingerBill
295cfc905c
Fix typo in wasm64p32 abi
2023-06-07 00:53:31 +01:00
gingerBill
204924927a
Ignore non-variable parameters
2023-06-07 00:35:11 +01:00
gingerBill
f622a8393c
Change ABI for wasm64p32 on slices and structs
2023-06-07 00:30:14 +01:00
gingerBill
4a75a1e839
Merge branch 'master' into separate-int-word-sizes
2023-06-06 22:42:04 +01:00
gingerBill
6cbce9fdff
Merge pull request #2563 from charles-l/master
...
WASM: Use BasicC ABI convention for arguments that have `proc "c"`
2023-05-29 23:33:58 +01:00
charles
052051244f
WASM: Use BasicC ABI convention for arguments that have a proc "c" annotation
2023-05-29 18:20:25 -04:00
gingerBill
f3a463000d
Fix #2561 - ARM64 ABI bug for homogenous structs with more than 4 elements
2023-05-29 22:50:28 +01:00
gingerBill
685f7d0fea
Rename word_size to ptr_size internally to make it clearer
2023-04-20 12:18:13 +01:00
gingerBill
f5d9ca64f9
Begin work on new pseudo-architecture: wasm64p32
2023-04-20 12:02:32 +01:00
gingerBill
fe533fb809
Improve llreg integer type generation for SysV ABI
2023-03-19 01:29:53 +00:00
gingerBill
1f5bb99548
Improve SysV ABI for multiple return values that fit into a single register; Fixes #2384
2023-03-19 00:51:57 +00:00
gingerBill
b9a2426e57
Merge branch 'master' into compiler-improvements-2022-12
2022-12-21 23:59:31 +00:00
gingerBill
81037b3091
Change the order of the args and ret for Arm64 ABI
2022-12-21 23:56:34 +00:00
gingerBill
6cdec65ca1
gb_internal LLVM backend
2022-12-18 22:32:05 +00:00
gingerBill
d88b052d2d
Naïve optimization of named _split_ multiple return valued when defer is never used
...
This is a naïve optimization but it helps a lot in the general case where callee temporary stack variables
are not allocated to represent the named return values by using that specific memory.
In the future, try to check if a specific named return value is ever used a `defer` within a procedure or not,
or is ever passed to a nested procedure call (e.g. possibly escapes).
2022-11-25 23:57:55 +00:00
gingerBill
d3c65b6ba5
Make split multiple return logic only work for the native Odin calling conventions
2022-11-24 13:16:02 +00:00
gingerBill
90415e4a6e
Add split multiple return to different ABIs
2022-11-24 12:14:19 +00:00
gingerBill
7ab591667a
Basic support for new ABI experiment on Win64
2022-11-23 16:25:09 +00:00
gingerBill
83f3ae14d5
Improve SysV ABI LLVM IR generation for development purposes
2022-10-30 22:50:24 +00:00
gingerBill
419eab5059
Force call site attributes for procedures (relating to #2121 causing ABI issues for intrinsics.objc_send)
2022-10-10 21:48:56 +01:00
gingerBill
aeacf3a9d8
Correct max alignment handling throughout the llvm backend
2022-08-24 13:07:41 +01:00
gingerBill
812823cad8
Wrap all LLVMGetElementType uses
2022-08-09 21:17:32 +01:00
gingerBill
cb0a59bb2c
Eliminate use of LLVMGetElementType for pointers
2022-08-09 15:36:18 +01:00
gingerBill
9614ca92f0
Fix #1834
2022-07-24 22:46:00 +01:00
gingerBill
b57edb89eb
Unify abi for wasm32 and the future wasm64
2022-05-21 13:18:04 +01:00
gingerBill
9eb4cbcbd2
Improve ABI design for wasm32 targets
2022-05-21 12:32:50 +01:00
gingerBill
10a311092b
Add basic arm32 ABI support (linux_arm32)
2022-05-01 23:15:06 +01:00
gingerBill
4a04a32e0a
Change target name to freestanding_amd64_sysv
2022-02-23 11:33:28 +00:00
gingerBill
1bec9e5331
Add freestanding_amd64_gnu
2022-02-20 14:19:52 +00:00
gingerBill
db6bd9b358
Allow sysv and win64 calling conventions to be used on any platform on amd64
2022-02-16 16:03:49 +00:00
gingerBill
29ebe0c3c9
Rename architecture 386 to i386
2022-01-15 17:40:00 +00:00
Platin21
86f831ddd1
This adds code which checks how big the return is and if it is to big returns the value via sret
2021-12-27 22:10:52 +01:00
Platin21
8dbeed8a9f
Removes unneeded lookups / Adds sret to call site which fixes the mac bug
2021-12-23 01:59:31 +01:00
gingerBill
a4b68b93f2
Modify ABI for the wasm32
2021-11-01 23:18:39 +00:00
gingerBill
5f51337a01
Add procs for wasm32
2021-10-31 19:00:01 +00:00
gingerBill
32506a34ff
Separate out the ABI for wasm32 from 386
2021-10-31 15:23:39 +00:00
gingerBill
5bc8a491a7
Begin work on supporting wasm64; Correct wasm32 compilation behaviour
2021-10-30 23:24:34 +01:00