kalsprite
c6fcad51f8
riscv64: use a Slice for the coerce offsets
2026-08-17 18:54:58 -07:00
gingerBill
645b57be9f
Merge pull request #7327 from kalsprite/abi_conformance
...
ABI Conformance Harness + Fixes
2026-08-17 16:28:01 +02:00
kalsprite
0fb1721e45
i386: return a complex of eight bytes or fewer in EAX:EDX, not through a hidden pointer
...
abi test: cover bare f16, complex, rawptr, enum and bit_set
2026-08-14 21:09:26 -07:00
kalsprite
1b57f6e092
remove cpp17 feature
2026-08-14 19:34:49 -07:00
kalsprite
ba708a2ad2
riscv64: read a flattened aggregate's members from their real offsets
2026-08-14 19:15:11 -07:00
kalsprite
eb72d8ffbe
arm32: pass homogeneous vector aggregates in the VFP registers
...
arm32: coerce narrow bare vectors, and return wide ones through a hidden pointer
2026-08-14 18:42:23 -07:00
kalsprite
9047c60ec1
arm32: default to arm1176jzf-s so the gnueabihf triple actually has an FPU,
...
arm32: implement AAPCS32 homogeneous float aggregates incl unions,
arm32: fix reversed arguments in the small-struct return coercion,abi test: __aeabi_uldivmod so the arm32 corpus links
2026-08-14 18:08:11 -07:00
kalsprite
1e2d91c38b
i386: pass and return bare vectors directly, coercing only 8-byte integer vectors,
...
i386: treat a bit_field as the aggregate it is in C, fixing a segfault on return,
abi test: document the i386 microarch baseline; do not read a signal exit as a type index
2026-08-14 17:38:21 -07:00
kalsprite
90d658f7d9
abi: sign/zero-extend sub-32-bit scalar arguments on every psABI that requires it
2026-08-13 23:31:51 -07:00
kalsprite
81a4bf16fe
riscv64: exclude aggregates containing a union from the FP calling convention
...
checker: keep #raw_union marked when it has a single field, #raw_union must mark on single field
2026-08-13 23:11:02 -07:00
kalsprite
a2f92401d3
sysv: fix a union passed as its last member when that member is narrower
2026-08-13 22:51:07 -07:00
kalsprite
98e580404a
pack structs whose member alignment LLVM would raise above the target cap
...
arm64: return a narrow bare vector as itself, not coerced to an integer
2026-08-13 21:52:34 -07:00
kalsprite
1cf1c4103e
fix SysV vector ABI: 64-bit slot width, wide-vector return, wrapped-vector return
2026-08-13 21:30:36 -07:00
kalsprite
88c194379c
fix SysV vector classification: SSEUp scan, wide-SSE args, short-vector lanes and sub-eightbyte class
2026-08-13 20:48:50 -07:00
kalsprite
e621a924f5
darwin align(16) max
2026-08-13 00:04:19 -07:00
kalsprite
f5ab81cfa1
simd fix; generator fix
2026-08-12 23:47:27 -07:00
kalsprite
b92e8af434
i128 unwrap aggregate single member structs
2026-08-12 23:29:48 -07:00
kalsprite
c2389067d2
arm64 HFA eligibility; byval stack slot align on i386, amd64 + callsite; sse eightbyte merge
2026-08-12 23:11:39 -07:00
gingerBill
fa342bb540
Merge pull request #7292 from kalsprite/sysv_source_type
...
amd64/arm64: classify aggregates from the source type
2026-08-12 19:43:29 +02:00
kalsprite
2285f4e061
sysv abi
2026-08-11 16:53:57 -07:00
Jeroen van Rijn
5f321d687c
Merge pull request #7284 from kalsprite/i386_sret
...
i386: return aggregates through the hidden pointer on System V targets
2026-08-11 12:30:19 +02:00
Jeroen van Rijn
06cad2ece4
Merge pull request #7283 from kalsprite/i386_byval
...
i386: pass aggregate arguments by value on the stack
2026-08-11 12:02:54 +02:00
kalsprite
37e1c98b1f
i386: return aggregates through the hidden pointer on System V targets
2026-08-10 22:08:15 -07:00
kalsprite
b3c254d629
i386: pass aggregate arguments by value on the stack
2026-08-10 21:48:10 -07:00
kalsprite
aec971197a
riscv64: a pointer is not an integer in the FP calling convention
2026-08-10 21:34:08 -07:00
kalsprite
a50660b5bb
apply the FP rules to over-aligned structs
2026-08-10 21:11:43 -07:00
kalsprite
2f39bd797d
riscv abi bug
2026-08-10 20:57:47 -07:00
Urjasvi Suthar
38788c0348
Fix arm64 argument alignment abi for composite type of size <= 16 bytes
2026-07-14 21:33:39 +05:30
Urjasvi Suthar
b27f28d1ea
Fix darwin arm64 argument passing abi.
...
Darwin arm64 expects caller to take responsibility of zero/sign extending any arguments < 32 bits.
Fixes #6809 and #6816
2026-07-14 10:26:52 +05:30
Urjasvi Suthar
713772ff2a
Fix i64 to i32 conversion for lb_sizeof(type) call in llvm_abi.cpp
2026-07-13 11:42:04 +05:30
Urjasvi Suthar
aef401fc9b
Fix arm64 ABI: '#simd' vectors and vector aggregates not passed in registers ( fixes #7010 )
2026-07-12 21:29:57 +05:30
MauriceElliott
56cee0c2cf
fix: made suggested changes to add a playdate subtarget, updated help text and reduce required build flags for playdate to just the subtarget, no-movt and cortex-m7 added to default on playdate subtarget flag.
2026-07-01 21:18:28 +01:00
MauriceElliott
a3fa3476c6
feat(arm32 cdecl): Added thumb as the triple for cortex-m7. Updated the calling convention for cortex-m7 arm32 micro processors as the soft float register was being used when calling across the C ABI boundary causing guff data to be passed.
2026-06-30 20:07:36 +01:00
gingerBill
1744f57d01
Use permanent_alloc_item directly rather than through the gb_alloc_item generic interface
2026-03-16 16:03:27 +00:00
Laytan
e7ecb16a1e
llvm 21 support
2025-10-14 19:55:00 +02:00
gingerBill
5d3092bf2d
Again, better const union stuff
2025-09-24 14:27:44 +01:00
Laytan
d0890c2135
fix dropping part of particular vecs
2025-08-01 19:18:43 +02:00
Laytan
5527982c20
fix vec offset calculation
2025-07-31 22:01:17 +02:00
Laytan
f32ee28e6d
amd64 support half in the abi too
2025-07-31 20:50:46 +02:00
Laytan
c3bae964d0
amd64 abi fixes regarding vectors
...
- Fixes the code so SSEUp is grouped/skipped over properly (Fixes #5429 )
- Fixes f16 vectors using garbage widths, because it would call
LLVMGetIntTypeWidth and an f16 is not an int so doesn't have that
function
2025-07-31 20:26:22 +02:00
Laytan Laats
3a86bc9c6d
Fix WASM C ABI for raw unions
2025-06-20 22:04:53 +02:00
Laytan Laats
2d00f8d69d
fix compat with earlier llvm versions
2025-05-15 19:20:04 +02:00
Laytan Laats
f9b9e9e7dc
some ABI fixups and improvements
...
Started with trying to enable asan in the CI for MacOS, noticed it wasn't enabled on the `tests/internal`
folder, it came up with a couple of issues with the abi/OdinLLVMBuildTransmute that this also solves.
- Looking at clang output for arm64, we should be promoting `{ i64, i32 }` to `{ i64, i64 }`
- after doing the previous point, I noticed this is not handled well in OdinLLVMBuildTransmute
which was emitting loads and stores into the space of a value that was alignment, asan does not want this,
looking at clang output again, a memcpy is the appropriate way of handling this.
- Having done this we don't need the hacky "return is packed" set anymore in the amd64 sysv ABI anymore either
2025-05-09 23:03:17 +02:00
gingerBill
2d4cb79baa
Fix SysV ABI bug
2025-04-15 11:26:41 +01:00
gingerBill
d209af5094
Update to LLVM 20.1.0
2025-03-18 15:39:18 +00:00
gingerBill
c305c9dd04
[ABI FIX] Fix 128-bit ABI issues
2024-10-04 11:16:33 +01:00
gingerBill
4b6410e225
ABI BREAKING for SysV: Change how multiple return values are handled to be separate like all other ABIs
2024-09-30 12:32:55 +01:00
gingerBill
b173fa1b9a
Fix LLVM 18 ABI for 128-bit integers (because LLVM broke things)
2024-09-30 11:45:24 +01:00
gingerBill
b116e8ff55
Fix 128-bit integer support for wasm targets
2024-09-20 01:29:39 +01:00
Laytan Laats
5b22bfa2b7
unify LB_ABI_INFO and LB_ABI_INFO_CTX
2024-08-20 14:07:47 +02:00