diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2023-04-21 15:58:40 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2023-04-21 16:36:31 -0400 |
| commit | d56c6c77913a6d560b7d3ebd6283cbf71d5a0222 (patch) | |
| tree | 11af28d08220a48515a75f073bd18127f6cebd7a /src/target.zig | |
| parent | 5afaaf865f93965f2a13069d4890c1491664652f (diff) | |
| download | zig-d56c6c77913a6d560b7d3ebd6283cbf71d5a0222.tar.gz zig-d56c6c77913a6d560b7d3ebd6283cbf71d5a0222.zip | |
cbe: implement 128-bit atomics support
* Disable 128-bit atomics for x86_64 generic (currently also baseline)
because they require heavy abi agreement to correctly lower.
** This is a breaking change **
* Enable 128-bit atomics for aarch64 in Sema since it just works.
Diffstat (limited to 'src/target.zig')
| -rw-r--r-- | src/target.zig | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/target.zig b/src/target.zig index 76186db269..5e66c8f417 100644 --- a/src/target.zig +++ b/src/target.zig @@ -575,9 +575,6 @@ pub fn atomicPtrAlignment( .xtensa, => 32, - .aarch64, - .aarch64_be, - .aarch64_32, .amdgcn, .bpfel, .bpfeb, @@ -600,7 +597,12 @@ pub fn atomicPtrAlignment( .loongarch64, => 64, - .x86_64 => 128, + .aarch64, + .aarch64_be, + .aarch64_32, + => 128, + + .x86_64 => if (std.Target.x86.featureSetHas(target.cpu.features, .cx16)) 128 else 64, }; var buffer: Type.Payload.Bits = undefined; |
