diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-05-04 15:22:41 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-05-04 17:34:17 -0700 |
| commit | f21c11a7f7fb84db4289a6f735dea012387606d6 (patch) | |
| tree | 9d744e2487ded968fc2ff7003674fe1fe53fff09 /src | |
| parent | 5b1c0d922c1061706ae1673333fcfb1d8fdd4602 (diff) | |
| download | zig-f21c11a7f7fb84db4289a6f735dea012387606d6.tar.gz zig-f21c11a7f7fb84db4289a6f735dea012387606d6.zip | |
stage2: change x86_64 max int alignment from 8 to 16
For x86_64, LLVMABIAlignmentOfType(i128) reports 8. However I think 16
is a better number for two reasons:
1. Better machine code when loading into SIMD register.
2. The C ABI wants 16 for extern structs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/target.zig | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/target.zig b/src/target.zig index 7818d496eb..9249ed1b60 100644 --- a/src/target.zig +++ b/src/target.zig @@ -555,7 +555,7 @@ pub const AtomicPtrAlignmentDiagnostics = struct { max_bits: u16 = undefined, }; -/// If ABI alignment of `ty` is OK for atomic operations, returs 0. +/// If ABI alignment of `ty` is OK for atomic operations, returns 0. /// Otherwise returns the alignment required on a pointer for the target /// to perform atomic operations. pub fn atomicPtrAlignment( @@ -645,9 +645,6 @@ pub fn atomicPtrAlignment( }; return error.FloatTooBig; } - if (target.cpu.arch == .x86_64 and bit_count > 64) { - return 16; - } return 0; }, .Bool => return 0, @@ -666,10 +663,6 @@ pub fn atomicPtrAlignment( return error.IntTooBig; } - if (target.cpu.arch == .x86_64 and bit_count > 64) { - return 16; - } - return 0; } |
