diff options
author | Koakuma <koachan@protonmail.com> | 2024-09-30 08:32:33 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-30 08:32:33 +0700 |
commit | dbad963a69fd7b16c6838f81b61167fbf00a413c (patch) | |
tree | 7bbab49c416d0db17dd5d8bfbfe7d94daed02314 /llvm/lib/Target/Sparc/SparcTargetMachine.cpp | |
parent | 129ade21bdad5f09206b773cd0591a9616ad0ca4 (diff) | |
download | llvm-dbad963a69fd7b16c6838f81b61167fbf00a413c.zip llvm-dbad963a69fd7b16c6838f81b61167fbf00a413c.tar.gz llvm-dbad963a69fd7b16c6838f81b61167fbf00a413c.tar.bz2 |
[SPARC] Align i128 to 16 bytes in SPARC datalayouts (#106951)
Align i128s to 16 bytes, following the example at
https://reviews.llvm.org/D86310.
clang already does this implicitly, but do it in backend code too for
the benefit of other frontends (see e.g
https://github.com/llvm/llvm-project/issues/102783 &
https://github.com/rust-lang/rust/issues/128950).
Diffstat (limited to 'llvm/lib/Target/Sparc/SparcTargetMachine.cpp')
-rw-r--r-- | llvm/lib/Target/Sparc/SparcTargetMachine.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/Sparc/SparcTargetMachine.cpp b/llvm/lib/Target/Sparc/SparcTargetMachine.cpp index fec2d3a..50a9636 100644 --- a/llvm/lib/Target/Sparc/SparcTargetMachine.cpp +++ b/llvm/lib/Target/Sparc/SparcTargetMachine.cpp @@ -48,6 +48,10 @@ static std::string computeDataLayout(const Triple &T, bool is64Bit) { // Alignments for 64 bit integers. Ret += "-i64:64"; + // Alignments for 128 bit integers. + // This is not specified in the ABI document but is the de facto standard. + Ret += "-i128:128"; + // On SparcV9 128 floats are aligned to 128 bits, on others only to 64. // On SparcV9 registers can hold 64 or 32 bits, on others only 32. if (is64Bit) |