Home | History | Annotate | Download | only in AsmParser
      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 	.text
      3 
      4 	.seh_pushreg 6
      5 	# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: .seh_ directive must appear within an active frame
      6 
      7 	.seh_stackalloc 32
      8 	# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: .seh_ directive must appear within an active frame
      9 
     10 	.def	 f;
     11 	.scl	2;
     12 	.type	32;
     13 	.endef
     14 	.globl	f                       # -- Begin function f
     15 	.p2align	4, 0x90
     16 f:                                      # @f
     17 .seh_proc f
     18 	pushq	%rsi
     19 	.seh_pushreg 6
     20 	pushq	%rdi
     21 	.seh_pushreg 7
     22 	pushq	%rbx
     23 	.seh_pushreg 3
     24 	subq	$32, %rsp
     25 	.seh_stackalloc 0
     26 	# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: stack allocation size must be non-zero
     27 	.seh_stackalloc 7
     28 	# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: stack allocation size is not a multiple of 8
     29 	.seh_stackalloc 32
     30 	.seh_endprologue
     31 	nop
     32 	addq	$32, %rsp
     33 	popq	%rbx
     34 	popq	%rdi
     35 	popq	%rsi
     36 	retq
     37 	.seh_handlerdata
     38 	.text
     39 	.seh_endproc
     40 
     41 
     42 	.seh_pushreg 6
     43 	# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: .seh_ directive must appear within an active frame
     44 
     45 g:
     46 	.seh_proc g
     47 	pushq %rbp
     48 	.seh_pushreg 3
     49 	pushq %rsi
     50 	.seh_pushreg 6
     51 	.seh_endprologue
     52 	.seh_setframe 3 255
     53 	# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: you must specify a stack pointer offset
     54 	.seh_setframe 3, 255
     55 	# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: offset is not a multiple of 16
     56 	.seh_setframe 3, 256
     57 	# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: frame offset must be less than or equal to 240
     58 	.seh_setframe 3, 128
     59 	.seh_setframe 3, 128
     60 	# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: frame register and offset can be set at most once
     61 	nop
     62 	popq %rsi
     63 	popq %rbp
     64 	retq
     65 	.seh_endproc
     66 
     67         .globl  h                       # -- Begin function h
     68         .p2align        4, 0x90
     69 h:                                      # @h
     70 .seh_proc h
     71 # %bb.0:                                # %entry
     72         subq    $72, %rsp
     73         .seh_stackalloc 72
     74         movaps  %xmm7, 48(%rsp)         # 16-byte Spill
     75         .seh_savexmm 7 44
     76 	# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: you must specify an offset on the stack
     77         .seh_savexmm 7, 44
     78 	# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: offset is not a multiple of 16
     79         .seh_savexmm 7, 48
     80         movaps  %xmm6, 32(%rsp)         # 16-byte Spill
     81         .seh_savexmm 6, 32
     82         .seh_endprologue
     83         movapd  %xmm0, %xmm6
     84         callq   getdbl
     85         movapd  %xmm0, %xmm7
     86         addsd   %xmm6, %xmm7
     87         callq   getdbl
     88         addsd   %xmm7, %xmm0
     89         movaps  32(%rsp), %xmm6         # 16-byte Reload
     90         movaps  48(%rsp), %xmm7         # 16-byte Reload
     91         addq    $72, %rsp
     92         retq
     93         .seh_handlerdata
     94         .text
     95         .seh_endproc
     96                                         # -- End function
     97