diff options
Diffstat (limited to 'llvm/test/MC')
-rw-r--r-- | llvm/test/MC/AsmParser/directive_seh.s | 22 | ||||
-rw-r--r-- | llvm/test/MC/AsmParser/seh-directive-errors.s | 38 | ||||
-rw-r--r-- | llvm/test/MC/COFF/seh-align3.s | 4 | ||||
-rw-r--r-- | llvm/test/MC/COFF/seh-linkonce.s | 4 | ||||
-rw-r--r-- | llvm/test/MC/COFF/seh.s | 2 |
5 files changed, 47 insertions, 23 deletions
diff --git a/llvm/test/MC/AsmParser/directive_seh.s b/llvm/test/MC/AsmParser/directive_seh.s index 1821747a2ba..139195dcb49 100644 --- a/llvm/test/MC/AsmParser/directive_seh.s +++ b/llvm/test/MC/AsmParser/directive_seh.s @@ -13,28 +13,34 @@ func: # CHECK: .seh_stackalloc 24 movq %rsi, 16(%rsp) .seh_savereg %rsi, 16 -# CHECK: .seh_savereg 6, 16 +# CHECK: .seh_savereg %rsi, 16 + .seh_savereg 6, 16 +# CHECK: .seh_savereg %rsi, 16 movups %xmm8, (%rsp) .seh_savexmm %xmm8, 0 -# CHECK: .seh_savexmm 8, 0 +# CHECK: .seh_savexmm %xmm8, 0 + .seh_savexmm 8, 0 +# CHECK: .seh_savexmm %xmm8, 0 pushq %rbx + .seh_pushreg %rbx +# CHECK: .seh_pushreg %rbx .seh_pushreg 3 -# CHECK: .seh_pushreg 3 +# CHECK: .seh_pushreg %rbx mov %rsp, %rbx .seh_setframe 3, 0 +# CHECK: .seh_setframe %rbx, 0 .seh_endprologue +# CHECK: .seh_endprologue .seh_handler __C_specific_handler, @except +# CHECK: .seh_handler __C_specific_handler, @except .seh_handlerdata +# CHECK-NOT: .section{{.*}}.xdata +# CHECK: .seh_handlerdata .long 0 .text .seh_startchained .seh_endprologue .seh_endchained -# CHECK: .seh_setframe 3, 0 -# CHECK: .seh_endprologue -# CHECK: .seh_handler __C_specific_handler, @except -# CHECK-NOT: .section{{.*}}.xdata -# CHECK: .seh_handlerdata # CHECK: .text # CHECK: .seh_startchained # CHECK: .seh_endprologue diff --git a/llvm/test/MC/AsmParser/seh-directive-errors.s b/llvm/test/MC/AsmParser/seh-directive-errors.s index 07d0a4a6179..fd46df73979 100644 --- a/llvm/test/MC/AsmParser/seh-directive-errors.s +++ b/llvm/test/MC/AsmParser/seh-directive-errors.s @@ -1,7 +1,7 @@ # RUN: not llvm-mc -triple x86_64-windows-msvc %s -filetype=obj -o /dev/null 2>&1 | FileCheck %s --implicit-check-not=error: .text - .seh_pushreg 6 + .seh_pushreg %rsi # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: .seh_ directive must appear within an active frame .seh_stackalloc 32 @@ -16,11 +16,11 @@ f: # @f .seh_proc f pushq %rsi - .seh_pushreg 6 + .seh_pushreg %rsi pushq %rdi - .seh_pushreg 7 + .seh_pushreg %rdi pushq %rbx - .seh_pushreg 3 + .seh_pushreg %rbx subq $32, %rsp .seh_stackalloc 0 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: stack allocation size must be non-zero @@ -39,15 +39,15 @@ f: # @f .seh_endproc - .seh_pushreg 6 + .seh_pushreg %rsi # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: .seh_ directive must appear within an active frame g: .seh_proc g pushq %rbp - .seh_pushreg 3 + .seh_pushreg %rbx pushq %rsi - .seh_pushreg 6 + .seh_pushreg %rsi .seh_endprologue .seh_setframe 3 255 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: you must specify a stack pointer offset @@ -74,11 +74,11 @@ h: # @h movaps %xmm7, 48(%rsp) # 16-byte Spill .seh_savexmm 7 44 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: you must specify an offset on the stack - .seh_savexmm 7, 44 + .seh_savexmm %xmm7, 44 # CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: offset is not a multiple of 16 - .seh_savexmm 7, 48 + .seh_savexmm %xmm7, 48 movaps %xmm6, 32(%rsp) # 16-byte Spill - .seh_savexmm 6, 32 + .seh_savexmm %xmm6, 32 .seh_endprologue movapd %xmm0, %xmm6 callq getdbl @@ -94,3 +94,21 @@ h: # @h .text .seh_endproc # -- End function + + .globl i + .def i; .scl 2; .type 32; .endef + .p2align 4, 0x90 +i: + .seh_proc i + pushq %rbp + .seh_pushreg 17 +# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: incorrect register number for use with this directive + pushq %rbx + .seh_pushreg %xmm0 +# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: register is not supported for use with this directive + leaq 16(%rsp), %rbp + .seh_setframe %xmm0, 16 +# CHECK: :[[@LINE-1]]:{{[0-9]+}}: error: register is not supported for use with this directive + .seh_endprologue + ret + .seh_endproc diff --git a/llvm/test/MC/COFF/seh-align3.s b/llvm/test/MC/COFF/seh-align3.s index 34a2fe3aef7..7b8331a71d6 100644 --- a/llvm/test/MC/COFF/seh-align3.s +++ b/llvm/test/MC/COFF/seh-align3.s @@ -68,9 +68,9 @@ .def func; .scl 2; .type 32; .endef .seh_proc func push %r12 - .seh_pushreg 12 + .seh_pushreg %r12 push %r13 - .seh_pushreg 13 + .seh_pushreg %r13 .seh_handler __C_specific_handler, @except, @unwind .seh_handlerdata .long 0xcafebabe diff --git a/llvm/test/MC/COFF/seh-linkonce.s b/llvm/test/MC/COFF/seh-linkonce.s index 9cd37bb90d4..675b5395b72 100644 --- a/llvm/test/MC/COFF/seh-linkonce.s +++ b/llvm/test/MC/COFF/seh-linkonce.s @@ -14,10 +14,10 @@ weak_func: # @weak_func # %bb.0: # %entry pushq %rbp .Ltmp1: - .seh_pushreg 5 + .seh_pushreg %rbp movq %rsp, %rbp .Ltmp2: - .seh_setframe 5, 0 + .seh_setframe %rbp, 0 .Ltmp3: .seh_endprologue xorl %eax, %eax diff --git a/llvm/test/MC/COFF/seh.s b/llvm/test/MC/COFF/seh.s index 959ac6413d3..11e4c9c362b 100644 --- a/llvm/test/MC/COFF/seh.s +++ b/llvm/test/MC/COFF/seh.s @@ -133,7 +133,7 @@ func: movups %xmm8, (%rsp) .seh_savexmm %xmm8, 0 pushq %rbx - .seh_pushreg 3 + .seh_pushreg %rbx mov %rsp, %rbx .seh_setframe 3, 0 .seh_endprologue |