162 lines · plain
1# RUN: not llvm-mc -triple x86_64-windows-msvc %s -filetype=obj -o /dev/null 2>&1 | FileCheck %s --implicit-check-not=error:2# RUN: not llvm-mc -triple x86_64-windows-msvc %s -o /dev/null 2>&1 | FileCheck %s --implicit-check-not=error:3 .text4 5# CHECK: error: .seh_ directive must appear within an active frame6 .seh_handlerdata7 8 .seh_pushreg %rsi9 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: .seh_ directive must appear within an active frame10 11 .seh_stackalloc 3212 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: .seh_ directive must appear within an active frame13 14 .seh_startepilogue15 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: .seh_ directive must appear within an active frame16 17 .seh_endepilogue18 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: .seh_ directive must appear within an active frame19 20 .seh_unwindv2start21 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: .seh_ directive must appear within an active frame22 23 .def f;24 .scl 2;25 .type 32;26 .endef27 .globl f # -- Begin function f28 .p2align 4, 0x9029f: # @f30.seh_proc f31 pushq %rsi32 .seh_pushreg %rsi33 pushq %rdi34 .seh_pushreg %rdi35 pushq %rbx36 .seh_pushreg %rbx37 subq $32, %rsp38 .seh_stackalloc 039 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: stack allocation size must be non-zero40 .seh_stackalloc 741 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: stack allocation size is not a multiple of 842 .seh_stackalloc 3243 .seh_startepilogue44 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: starting epilogue (.seh_startepilogue) before prologue has ended (.seh_endprologue) in f45 .seh_endprologue46 nop47 .seh_endepilogue48 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: Stray .seh_endepilogue in f49 .seh_startepilogue50 addq $32, %rsp51 popq %rbx52 popq %rdi53 popq %rsi54 .seh_endepilogue55 retq56 .seh_handlerdata57 .text58 .seh_endproc59 60 61 .seh_pushreg %rsi62 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: .seh_ directive must appear within an active frame63 64g:65 .seh_proc g66 pushq %rbp67 .seh_pushreg %rbx68 pushq %rsi69 .seh_pushreg %rsi70 .seh_endprologue71 .seh_setframe 3 25572 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: you must specify a stack pointer offset73 .seh_setframe 3, 25574 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: offset is not a multiple of 1675 .seh_setframe 3, 25676 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: frame offset must be less than or equal to 24077 .seh_setframe 3, 12878 .seh_setframe 3, 12879 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: frame register and offset can be set at most once80 nop81 .seh_startepilogue82 popq %rsi83 popq %rbp84 .seh_endepilogue85 retq86 .seh_endproc87 88 .globl h # -- Begin function h89 .p2align 4, 0x9090h: # @h91.seh_proc h92# %bb.0: # %entry93 subq $72, %rsp94 .seh_stackalloc 7295 movaps %xmm7, 48(%rsp) # 16-byte Spill96 .seh_savexmm 7 4497 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: you must specify an offset on the stack98 .seh_savexmm %xmm7, 4499 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: offset is not a multiple of 16100 .seh_savexmm %xmm7, 48101 movaps %xmm6, 32(%rsp) # 16-byte Spill102 .seh_savexmm %xmm6, 32103 .seh_endprologue104 movapd %xmm0, %xmm6105 callq getdbl106 movapd %xmm0, %xmm7107 addsd %xmm6, %xmm7108 callq getdbl109 addsd %xmm7, %xmm0110 .seh_startepilogue111 movaps 32(%rsp), %xmm6 # 16-byte Reload112 movaps 48(%rsp), %xmm7 # 16-byte Reload113 addq $72, %rsp114 .seh_endepilogue115 retq116 .seh_handlerdata117 .text118 .seh_endproc119 # -- End function120 121 .globl i122 .def i; .scl 2; .type 32; .endef123 .p2align 4, 0x90124i:125 .seh_proc i126 pushq %rbp127 .seh_pushreg 32128# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: incorrect register number for use with this directive129 pushq %rbx130 .seh_pushreg %xmm0131# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: register is not supported for use with this directive132 leaq 16(%rsp), %rbp133 .seh_setframe %xmm0, 16134# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: register is not supported for use with this directive135 .seh_endprologue136 ret137 .seh_endproc138 139j:140 .seh_proc j141 .seh_unwindversion 1142# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: Unsupported version specified in .seh_unwindversion in j143 .seh_unwindversion 2144 .seh_unwindversion 2145# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: Duplicate .seh_unwindversion in j146 .seh_endprologue147 .seh_unwindv2start148# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: Stray .seh_unwindv2start in j149 150 .seh_startepilogue151 .seh_endepilogue152# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: Missing .seh_unwindv2start in j153 ret154 155 .seh_startepilogue156 .seh_unwindv2start157 .seh_unwindv2start158# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: Duplicate .seh_unwindv2start in j159 .seh_endepilogue160 ret161 .seh_endproc162