1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/CodeGen/X86/win64_regcall.ll
Reid Kleckner d8778f44e4 [Win64] Ensure all stack frames are 8 byte aligned
The unwind info format requires that all adjustments are 8 byte aligned,
and the bottom three bits are masked out. Most Win64 calling conventions
have 32 bytes of shadow stack space for spilling parameters, and I
believe that constructing these fixed stack objects had the side effect
of ensuring an alignment of 8. However, the Intel regcall convention
does not have this shadow space, so when using that convention, it was
possible to make a 4 byte stack frame, which was impossible to describe
with unwind info.

Fixes pr48867
2021-01-25 10:39:27 -08:00

13 lines
372 B
LLVM

; RUN: llc < %s -mtriple=x86_64-windows-msvc | FileCheck %s
define dso_local x86_regcallcc void @ensure_align() local_unnamed_addr #0 {
entry:
%b = alloca i32, align 4
call void asm sideeffect "nopl $0", "=*m,~{dirflag},~{fpsr},~{flags}"(i32* nonnull %b)
ret void
}
; CHECK-LABEL: ensure_align: # @ensure_align
; CHECK: .seh_stackalloc 8
; CHECK: .seh_endprologue