mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
d8778f44e4
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
13 lines
372 B
LLVM
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
|