Skip to content

Commit a3b1041

Browse files
committed
Align f128 to 16 bytes when passing on x86
LLVM does not seem to enforce the required 16-byte alignment, which is causing an ABI mismatch. This is not yet working locally.
1 parent e6d7f46 commit a3b1041

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Target/X86/X86CallingConv.td

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,6 +829,9 @@ def CC_X86_32_Common : CallingConv<[
829829
// Long doubles get slots whose size and alignment depends on the subtarget.
830830
CCIfType<[f80], CCAssignToStack<0, 0>>,
831831

832+
// f128 get 16-byte slots that are 16-byte aligned.
833+
CCIfType<[f128], CCAssignToStack<16, 16>>,
834+
832835
// Boolean vectors of AVX-512 are passed in SIMD registers.
833836
// The call from AVX to AVX-512 function should work,
834837
// since the boolean types in AVX/AVX2 are promoted by default.

0 commit comments

Comments
 (0)