// This test checks that the SEH directives emit the correct unwind data.
// RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | llvm-readobj -S -u -r - | FileCheck %s
// CHECK: Sections
// CHECK-NEXT: Relocations
// CHECK: UnwindInformation
.text
.globl func
.def func; .scl 2; .type 32; .endef
.seh_proc func
func:
.seh_pushframe @code
subq $24, %rsp
.seh_stackalloc 24
movq %rsi, 16(%rsp)
.seh_savereg %rsi, 16
movups %xmm8, (%rsp)
.seh_savexmm %xmm8, 0
pushq %rbx
.seh_pushreg %rbx
mov %rsp, %rbx
.seh_setframe 3, 0
.seh_endprologue
.seh_handler __C_specific_handler, @except
.seh_handlerdata
.long 0
.text
.seh_startchained
.seh_endprologue
.seh_endchained
, %rsp
pop %rbx
addq $24, %rsp
ret
.seh_endproc
// Test emission of small functions.
.globl smallFunc
.def smallFunc; .scl 2; .type 32; .endef
.seh_proc smallFunc
smallFunc:
ret
.seh_endproc