diff options
Diffstat (limited to 'llvm/test')
22 files changed, 193 insertions, 169 deletions
diff --git a/llvm/test/CodeGen/X86/avx512-regcall-Mask.ll b/llvm/test/CodeGen/X86/avx512-regcall-Mask.ll index 41dfe16402a..01f89aa589a 100644 --- a/llvm/test/CodeGen/X86/avx512-regcall-Mask.ll +++ b/llvm/test/CodeGen/X86/avx512-regcall-Mask.ll @@ -118,21 +118,21 @@ define i64 @caller_argv64i1() #0 { ; WIN64-LABEL: caller_argv64i1: ; WIN64: # %bb.0: # %entry ; WIN64-NEXT: pushq %r15 -; WIN64-NEXT: .seh_pushreg 15 +; WIN64-NEXT: .seh_pushreg %r15 ; WIN64-NEXT: pushq %r14 -; WIN64-NEXT: .seh_pushreg 14 +; WIN64-NEXT: .seh_pushreg %r14 ; WIN64-NEXT: pushq %r12 -; WIN64-NEXT: .seh_pushreg 12 +; WIN64-NEXT: .seh_pushreg %r12 ; WIN64-NEXT: pushq %rsi -; WIN64-NEXT: .seh_pushreg 6 +; WIN64-NEXT: .seh_pushreg %rsi ; WIN64-NEXT: pushq %rdi -; WIN64-NEXT: .seh_pushreg 7 +; WIN64-NEXT: .seh_pushreg %rdi ; WIN64-NEXT: subq $48, %rsp ; WIN64-NEXT: .seh_stackalloc 48 ; WIN64-NEXT: vmovaps %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 7, 32 +; WIN64-NEXT: .seh_savexmm %xmm7, 32 ; WIN64-NEXT: vmovaps %xmm6, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 6, 16 +; WIN64-NEXT: .seh_savexmm %xmm6, 16 ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: movabsq $4294967298, %rax # imm = 0x100000002 ; WIN64-NEXT: movq %rax, (%rsp) @@ -244,15 +244,15 @@ define <64 x i1> @caller_retv64i1() #0 { ; WIN64-LABEL: caller_retv64i1: ; WIN64: # %bb.0: # %entry ; WIN64-NEXT: pushq %rsi -; WIN64-NEXT: .seh_pushreg 6 +; WIN64-NEXT: .seh_pushreg %rsi ; WIN64-NEXT: pushq %rdi -; WIN64-NEXT: .seh_pushreg 7 +; WIN64-NEXT: .seh_pushreg %rdi ; WIN64-NEXT: subq $40, %rsp ; WIN64-NEXT: .seh_stackalloc 40 ; WIN64-NEXT: vmovaps %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 7, 16 +; WIN64-NEXT: .seh_savexmm %xmm7, 16 ; WIN64-NEXT: vmovaps %xmm6, (%rsp) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 6, 0 +; WIN64-NEXT: .seh_savexmm %xmm6, 0 ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: callq test_retv64i1 ; WIN64-NEXT: kmovq %rax, %k0 @@ -315,11 +315,11 @@ define x86_regcallcc i32 @test_argv32i1(<32 x i1> %x0, <32 x i1> %x1, <32 x i1> ; WIN64-LABEL: test_argv32i1: ; WIN64: # %bb.0: # %entry ; WIN64-NEXT: pushq %r11 -; WIN64-NEXT: .seh_pushreg 11 +; WIN64-NEXT: .seh_pushreg %r11 ; WIN64-NEXT: pushq %r10 -; WIN64-NEXT: .seh_pushreg 10 +; WIN64-NEXT: .seh_pushreg %r10 ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: subq $32, %rsp ; WIN64-NEXT: .seh_stackalloc 32 ; WIN64-NEXT: .seh_endprologue @@ -409,15 +409,15 @@ define i32 @caller_argv32i1() #0 { ; WIN64-LABEL: caller_argv32i1: ; WIN64: # %bb.0: # %entry ; WIN64-NEXT: pushq %rsi -; WIN64-NEXT: .seh_pushreg 6 +; WIN64-NEXT: .seh_pushreg %rsi ; WIN64-NEXT: pushq %rdi -; WIN64-NEXT: .seh_pushreg 7 +; WIN64-NEXT: .seh_pushreg %rdi ; WIN64-NEXT: subq $40, %rsp ; WIN64-NEXT: .seh_stackalloc 40 ; WIN64-NEXT: vmovaps %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 7, 16 +; WIN64-NEXT: .seh_savexmm %xmm7, 16 ; WIN64-NEXT: vmovaps %xmm6, (%rsp) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 6, 0 +; WIN64-NEXT: .seh_savexmm %xmm6, 0 ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: movl $1, %eax ; WIN64-NEXT: movl $1, %ecx @@ -476,15 +476,15 @@ define i32 @caller_retv32i1() #0 { ; WIN64-LABEL: caller_retv32i1: ; WIN64: # %bb.0: # %entry ; WIN64-NEXT: pushq %rsi -; WIN64-NEXT: .seh_pushreg 6 +; WIN64-NEXT: .seh_pushreg %rsi ; WIN64-NEXT: pushq %rdi -; WIN64-NEXT: .seh_pushreg 7 +; WIN64-NEXT: .seh_pushreg %rdi ; WIN64-NEXT: subq $40, %rsp ; WIN64-NEXT: .seh_stackalloc 40 ; WIN64-NEXT: vmovaps %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 7, 16 +; WIN64-NEXT: .seh_savexmm %xmm7, 16 ; WIN64-NEXT: vmovaps %xmm6, (%rsp) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 6, 0 +; WIN64-NEXT: .seh_savexmm %xmm6, 0 ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: callq test_retv32i1 ; WIN64-NEXT: incl %eax @@ -547,11 +547,11 @@ define x86_regcallcc i16 @test_argv16i1(<16 x i1> %x0, <16 x i1> %x1, <16 x i1> ; WIN64-LABEL: test_argv16i1: ; WIN64: # %bb.0: ; WIN64-NEXT: pushq %r11 -; WIN64-NEXT: .seh_pushreg 11 +; WIN64-NEXT: .seh_pushreg %r11 ; WIN64-NEXT: pushq %r10 -; WIN64-NEXT: .seh_pushreg 10 +; WIN64-NEXT: .seh_pushreg %r10 ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: subq $32, %rsp ; WIN64-NEXT: .seh_stackalloc 32 ; WIN64-NEXT: .seh_endprologue @@ -640,15 +640,15 @@ define i16 @caller_argv16i1() #0 { ; WIN64-LABEL: caller_argv16i1: ; WIN64: # %bb.0: # %entry ; WIN64-NEXT: pushq %rsi -; WIN64-NEXT: .seh_pushreg 6 +; WIN64-NEXT: .seh_pushreg %rsi ; WIN64-NEXT: pushq %rdi -; WIN64-NEXT: .seh_pushreg 7 +; WIN64-NEXT: .seh_pushreg %rdi ; WIN64-NEXT: subq $40, %rsp ; WIN64-NEXT: .seh_stackalloc 40 ; WIN64-NEXT: vmovaps %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 7, 16 +; WIN64-NEXT: .seh_savexmm %xmm7, 16 ; WIN64-NEXT: vmovaps %xmm6, (%rsp) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 6, 0 +; WIN64-NEXT: .seh_savexmm %xmm6, 0 ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: movl $1, %eax ; WIN64-NEXT: movl $1, %ecx @@ -709,15 +709,15 @@ define i16 @caller_retv16i1() #0 { ; WIN64-LABEL: caller_retv16i1: ; WIN64: # %bb.0: # %entry ; WIN64-NEXT: pushq %rsi -; WIN64-NEXT: .seh_pushreg 6 +; WIN64-NEXT: .seh_pushreg %rsi ; WIN64-NEXT: pushq %rdi -; WIN64-NEXT: .seh_pushreg 7 +; WIN64-NEXT: .seh_pushreg %rdi ; WIN64-NEXT: subq $40, %rsp ; WIN64-NEXT: .seh_stackalloc 40 ; WIN64-NEXT: vmovaps %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 7, 16 +; WIN64-NEXT: .seh_savexmm %xmm7, 16 ; WIN64-NEXT: vmovaps %xmm6, (%rsp) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 6, 0 +; WIN64-NEXT: .seh_savexmm %xmm6, 0 ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: callq test_retv16i1 ; WIN64-NEXT: # kill: def $ax killed $ax def $eax @@ -784,11 +784,11 @@ define x86_regcallcc i8 @test_argv8i1(<8 x i1> %x0, <8 x i1> %x1, <8 x i1> %x2) ; WIN64-LABEL: test_argv8i1: ; WIN64: # %bb.0: ; WIN64-NEXT: pushq %r11 -; WIN64-NEXT: .seh_pushreg 11 +; WIN64-NEXT: .seh_pushreg %r11 ; WIN64-NEXT: pushq %r10 -; WIN64-NEXT: .seh_pushreg 10 +; WIN64-NEXT: .seh_pushreg %r10 ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: subq $32, %rsp ; WIN64-NEXT: .seh_stackalloc 32 ; WIN64-NEXT: .seh_endprologue @@ -877,15 +877,15 @@ define i8 @caller_argv8i1() #0 { ; WIN64-LABEL: caller_argv8i1: ; WIN64: # %bb.0: # %entry ; WIN64-NEXT: pushq %rsi -; WIN64-NEXT: .seh_pushreg 6 +; WIN64-NEXT: .seh_pushreg %rsi ; WIN64-NEXT: pushq %rdi -; WIN64-NEXT: .seh_pushreg 7 +; WIN64-NEXT: .seh_pushreg %rdi ; WIN64-NEXT: subq $40, %rsp ; WIN64-NEXT: .seh_stackalloc 40 ; WIN64-NEXT: vmovaps %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 7, 16 +; WIN64-NEXT: .seh_savexmm %xmm7, 16 ; WIN64-NEXT: vmovaps %xmm6, (%rsp) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 6, 0 +; WIN64-NEXT: .seh_savexmm %xmm6, 0 ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: movl $1, %eax ; WIN64-NEXT: movl $1, %ecx @@ -948,15 +948,15 @@ define <8 x i1> @caller_retv8i1() #0 { ; WIN64-LABEL: caller_retv8i1: ; WIN64: # %bb.0: # %entry ; WIN64-NEXT: pushq %rsi -; WIN64-NEXT: .seh_pushreg 6 +; WIN64-NEXT: .seh_pushreg %rsi ; WIN64-NEXT: pushq %rdi -; WIN64-NEXT: .seh_pushreg 7 +; WIN64-NEXT: .seh_pushreg %rdi ; WIN64-NEXT: subq $40, %rsp ; WIN64-NEXT: .seh_stackalloc 40 ; WIN64-NEXT: vmovaps %xmm7, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 7, 16 +; WIN64-NEXT: .seh_savexmm %xmm7, 16 ; WIN64-NEXT: vmovaps %xmm6, (%rsp) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 6, 0 +; WIN64-NEXT: .seh_savexmm %xmm6, 0 ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: callq test_retv8i1 ; WIN64-NEXT: # kill: def $al killed $al def $eax diff --git a/llvm/test/CodeGen/X86/avx512-regcall-NoMask.ll b/llvm/test/CodeGen/X86/avx512-regcall-NoMask.ll index c03a8f6ab6e..fe8b95d8930 100644 --- a/llvm/test/CodeGen/X86/avx512-regcall-NoMask.ll +++ b/llvm/test/CodeGen/X86/avx512-regcall-NoMask.ll @@ -42,7 +42,7 @@ define x86_regcallcc i1 @test_CallargReti1(i1 %a) { ; WIN64-LABEL: test_CallargReti1: ; WIN64: # %bb.0: ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: incb %al ; WIN64-NEXT: movzbl %al, %eax @@ -110,7 +110,7 @@ define x86_regcallcc i8 @test_CallargReti8(i8 %a) { ; WIN64-LABEL: test_CallargReti8: ; WIN64: # %bb.0: ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: incb %al ; WIN64-NEXT: movzbl %al, %eax @@ -179,7 +179,7 @@ define x86_regcallcc i16 @test_CallargReti16(i16 %a) { ; WIN64-LABEL: test_CallargReti16: ; WIN64: # %bb.0: ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: incl %eax ; WIN64-NEXT: callq test_argReti16 @@ -245,7 +245,7 @@ define x86_regcallcc i32 @test_CallargReti32(i32 %a) { ; WIN64-LABEL: test_CallargReti32: ; WIN64: # %bb.0: ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: incl %eax ; WIN64-NEXT: callq test_argReti32 @@ -312,7 +312,7 @@ define x86_regcallcc i64 @test_CallargReti64(i64 %a) { ; WIN64-LABEL: test_CallargReti64: ; WIN64: # %bb.0: ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: incq %rax ; WIN64-NEXT: callq test_argReti64 @@ -379,11 +379,11 @@ define x86_regcallcc float @test_CallargRetFloat(float %a) { ; WIN64-LABEL: test_CallargRetFloat: ; WIN64: # %bb.0: ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: subq $16, %rsp ; WIN64-NEXT: .seh_stackalloc 16 ; WIN64-NEXT: vmovaps %xmm8, (%rsp) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 8, 0 +; WIN64-NEXT: .seh_savexmm %xmm8, 0 ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: vmovss {{.*#+}} xmm8 = mem[0],zero,zero,zero ; WIN64-NEXT: vaddss %xmm8, %xmm0, %xmm0 @@ -461,11 +461,11 @@ define x86_regcallcc double @test_CallargRetDouble(double %a) { ; WIN64-LABEL: test_CallargRetDouble: ; WIN64: # %bb.0: ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: subq $16, %rsp ; WIN64-NEXT: .seh_stackalloc 16 ; WIN64-NEXT: vmovaps %xmm8, (%rsp) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 8, 0 +; WIN64-NEXT: .seh_savexmm %xmm8, 0 ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: vmovsd {{.*#+}} xmm8 = mem[0],zero ; WIN64-NEXT: vaddsd %xmm8, %xmm0, %xmm0 @@ -538,7 +538,7 @@ define x86_regcallcc x86_fp80 @test_CallargRetf80(x86_fp80 %a) { ; WIN64-LABEL: test_CallargRetf80: ; WIN64: # %bb.0: ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: fadd %st, %st(0) ; WIN64-NEXT: callq test_argRetf80 @@ -602,7 +602,7 @@ define x86_regcallcc [4 x i32]* @test_CallargRetPointer([4 x i32]* %a) { ; WIN64-LABEL: test_CallargRetPointer: ; WIN64: # %bb.0: ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: incl %eax ; WIN64-NEXT: callq test_argRetPointer @@ -684,11 +684,11 @@ define x86_regcallcc <4 x i32> @test_CallargRet128Vector(<4 x i1> %x, <4 x i32> ; WIN64-LABEL: test_CallargRet128Vector: ; WIN64: # %bb.0: ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: subq $32, %rsp ; WIN64-NEXT: .seh_stackalloc 32 ; WIN64-NEXT: vmovaps %xmm8, {{[-0-9]+}}(%r{{[sb]}}p) # 16-byte Spill -; WIN64-NEXT: .seh_savexmm 8, 16 +; WIN64-NEXT: .seh_savexmm %xmm8, 16 ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: vmovdqa %xmm1, %xmm8 ; WIN64-NEXT: vpslld $31, %xmm0, %xmm1 @@ -780,7 +780,7 @@ define x86_regcallcc <8 x i32> @test_CallargRet256Vector(<8 x i1> %x, <8 x i32> ; WIN64-LABEL: test_CallargRet256Vector: ; WIN64: # %bb.0: ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: subq $80, %rsp ; WIN64-NEXT: .seh_stackalloc 80 ; WIN64-NEXT: .seh_endprologue @@ -868,7 +868,7 @@ define x86_regcallcc <16 x i32> @test_CallargRet512Vector(<16 x i1> %x, <16 x i3 ; WIN64-LABEL: test_CallargRet512Vector: ; WIN64: # %bb.0: ; WIN64-NEXT: pushq %rsp -; WIN64-NEXT: .seh_pushreg 4 +; WIN64-NEXT: .seh_pushreg %rsp ; WIN64-NEXT: subq $176, %rsp ; WIN64-NEXT: .seh_stackalloc 176 ; WIN64-NEXT: .seh_endprologue diff --git a/llvm/test/CodeGen/X86/catchpad-realign-savexmm.ll b/llvm/test/CodeGen/X86/catchpad-realign-savexmm.ll index e8bccdabdcd..e68294b83b3 100644 --- a/llvm/test/CodeGen/X86/catchpad-realign-savexmm.ll +++ b/llvm/test/CodeGen/X86/catchpad-realign-savexmm.ll @@ -29,13 +29,13 @@ catch: ; CHECK: f: # @f ; CHECK: pushq %rbp -; CHECK: .seh_pushreg 5 +; CHECK: .seh_pushreg %rbp ; CHECK: subq $64, %rsp ; CHECK: .seh_stackalloc 64 ; CHECK: leaq 64(%rsp), %rbp -; CHECK: .seh_setframe 5, 64 +; CHECK: .seh_setframe %rbp, 64 ; CHECK: movaps %xmm6, -16(%rbp) # 16-byte Spill -; CHECK: .seh_savexmm 6, 48 +; CHECK: .seh_savexmm %xmm6, 48 ; CHECK: .seh_endprologue ; CHECK: movq $-2, -24(%rbp) ; CHECK: movsd fp_global(%rip), %xmm6 # xmm6 = mem[0],zero @@ -54,12 +54,12 @@ catch: ; CHECK: # %catch ; CHECK: movq %rdx, 16(%rsp) ; CHECK: pushq %rbp -; CHECK: .seh_pushreg 5 +; CHECK: .seh_pushreg %rbp ; CHECK: subq $48, %rsp ; CHECK: .seh_stackalloc 48 ; CHECK: leaq 64(%rdx), %rbp ; CHECK: movapd %xmm6, 32(%rsp) -; CHECK: .seh_savexmm 6, 32 +; CHECK: .seh_savexmm %xmm6, 32 ; CHECK: .seh_endprologue ; CHECK: movapd 32(%rsp), %xmm6 ; CHECK: leaq .LBB0_1(%rip), %rax diff --git a/llvm/test/CodeGen/X86/cleanuppad-realign.ll b/llvm/test/CodeGen/X86/cleanuppad-realign.ll index 314d5da07d7..33afa946cd0 100644 --- a/llvm/test/CodeGen/X86/cleanuppad-realign.ll +++ b/llvm/test/CodeGen/X86/cleanuppad-realign.ll @@ -47,13 +47,13 @@ ehcleanup: ; preds = %entry ; X64-LABEL: realigned_cleanup: # @realigned_cleanup ; X64: pushq %rbp -; X64: .seh_pushreg 5 +; X64: .seh_pushreg %rbp ; X64: pushq %rbx -; X64: .seh_pushreg 3 +; X64: .seh_pushreg %rbx ; X64: subq $104, %rsp ; X64: .seh_stackalloc 104 ; X64: leaq 96(%rsp), %rbp -; X64: .seh_setframe 5, 96 +; X64: .seh_setframe %rbp, 96 ; X64: .seh_endprologue ; X64: andq $-32, %rsp ; X64: movq %rsp, %rbx @@ -64,9 +64,9 @@ ehcleanup: ; preds = %entry ; X64-LABEL: "?dtor$2@?0?realigned_cleanup@4HA": ; X64: movq %rdx, 16(%rsp) ; X64: pushq %rbp -; X64: .seh_pushreg 5 +; X64: .seh_pushreg %rbp ; X64: pushq %rbx -; X64: .seh_pushreg 3 +; X64: .seh_pushreg %rbx ; X64: subq $40, %rsp ; X64: .seh_stackalloc 40 ; X64: leaq 96(%rdx), %rbp diff --git a/llvm/test/CodeGen/X86/conditional-tailcall.ll b/llvm/test/CodeGen/X86/conditional-tailcall.ll index e1a1e7b777d..17078413a82 100644 --- a/llvm/test/CodeGen/X86/conditional-tailcall.ll +++ b/llvm/test/CodeGen/X86/conditional-tailcall.ll @@ -106,7 +106,7 @@ define void @f_non_leaf(i32 %x, i32 %y) optsize { ; WIN64-LABEL: f_non_leaf: ; WIN64: # %bb.0: # %entry ; WIN64-NEXT: pushq %rbx # encoding: [0x53] -; WIN64-NEXT: .seh_pushreg 3 +; WIN64-NEXT: .seh_pushreg %rbx ; WIN64-NEXT: .seh_endprologue ; WIN64-NEXT: #APP ; WIN64-NEXT: #NO_APP diff --git a/llvm/test/CodeGen/X86/gcc_except_table.ll b/llvm/test/CodeGen/X86/gcc_except_table.ll index 92ea539bcf7..a6e802a5b43 100644 --- a/llvm/test/CodeGen/X86/gcc_except_table.ll +++ b/llvm/test/CodeGen/X86/gcc_except_table.ll @@ -15,7 +15,7 @@ define i32 @main() uwtable optsize ssp personality i8* bitcast (i32 (...)* @__gx ; MINGW64: .seh_proc ; MINGW64: .seh_handler __gxx_personality_v0 -; MINGW64: .seh_setframe 5, 32 +; MINGW64: .seh_setframe %rbp, 32 ; MINGW64: callq _Unwind_Resume ; MINGW64: .seh_handlerdata ; MINGW64: .seh_endproc diff --git a/llvm/test/CodeGen/X86/localescape.ll b/llvm/test/CodeGen/X86/localescape.ll index 2fba9b2868a..4593845f637 100644 --- a/llvm/test/CodeGen/X86/localescape.ll +++ b/llvm/test/CodeGen/X86/localescape.ll @@ -77,7 +77,7 @@ define void @alloc_func(i32 %n) { ; X64: subq $16, %rsp ; X64: .seh_stackalloc 16 ; X64: leaq 16(%rsp), %rbp -; X64: .seh_setframe 5, 16 +; X64: .seh_setframe %rbp, 16 ; X64: .set .Lalloc_func$frame_escape_0, -4 ; X64: .set .Lalloc_func$frame_escape_1, -12 ; X64: movl $42, -4(%rbp) diff --git a/llvm/test/CodeGen/X86/musttail-varargs.ll b/llvm/test/CodeGen/X86/musttail-varargs.ll index b62343fc82a..1144ce8eba7 100644 --- a/llvm/test/CodeGen/X86/musttail-varargs.ll +++ b/llvm/test/CodeGen/X86/musttail-varargs.ll @@ -206,15 +206,15 @@ define void @f_thunk(i8* %this, ...) { ; WINDOWS-LABEL: f_thunk: ; WINDOWS: # %bb.0: ; WINDOWS-NEXT: pushq %r14 -; WINDOWS-NEXT: .seh_pushreg 14 +; WINDOWS-NEXT: .seh_pushreg %r14 ; WINDOWS-NEXT: pushq %rsi -; WINDOWS-NEXT: .seh_pushreg 6 +; WINDOWS-NEXT: .seh_pushreg %rsi ; WINDOWS-NEXT: pushq %rdi -; WINDOWS-NEXT: .seh_pushreg 7 +; WINDOWS-NEXT: .seh_pushreg %rdi ; WINDOWS-NEXT: pushq %rbp -; WINDOWS-NEXT: .seh_pushreg 5 +; WINDOWS-NEXT: .seh_pushreg %rbp ; WINDOWS-NEXT: pushq %rbx -; WINDOWS-NEXT: .seh_pushreg 3 +; WINDOWS-NEXT: .seh_pushreg %rbx ; WINDOWS-NEXT: subq $64, %rsp ; WINDOWS-NEXT: .seh_stackalloc 64 ; WINDOWS-NEXT: .seh_endprologue diff --git a/llvm/test/CodeGen/X86/seh-catchpad.ll b/llvm/test/CodeGen/X86/seh-catchpad.ll index 7dc93531509..bf4f87e035c 100644 --- a/llvm/test/CodeGen/X86/seh-catchpad.ll +++ b/llvm/test/CodeGen/X86/seh-catchpad.ll @@ -87,11 +87,11 @@ __except.ret: ; preds = %catch.dispatch.7 ; CHECK: .seh_proc main ; CHECK: .seh_handler __C_specific_handler, @unwind, @except ; CHECK: pushq %rbp -; CHECK: .seh_pushreg 5 +; CHECK: .seh_pushreg %rbp ; CHECK: subq $32, %rsp ; CHECK: .seh_stackalloc 32 ; CHECK: leaq 32(%rsp), %rbp -; CHECK: .seh_setframe 5, 32 +; CHECK: .seh_setframe %rbp, 32 ; CHECK: .seh_endprologue ; CHECK: .Ltmp0: ; CHECK: movl $1, %ecx @@ -151,7 +151,7 @@ __except.ret: ; preds = %catch.dispatch.7 ; CHECK: .LBB1_[[finbb]]: # %ehcleanup ; CHECK: movq %rdx, 16(%rsp) ; CHECK: pushq %rbp -; CHECK: .seh_pushreg 5 +; CHECK: .seh_pushreg %rbp ; CHECK: subq $32, %rsp ; CHECK: .seh_stackalloc 32 ; CHECK: leaq 32(%rdx), %rbp diff --git a/llvm/test/CodeGen/X86/win-catchpad-csrs.ll b/llvm/test/CodeGen/X86/win-catchpad-csrs.ll index 64c7a9747df..b8a9c6bce8f 100644 --- a/llvm/test/CodeGen/X86/win-catchpad-csrs.ll +++ b/llvm/test/CodeGen/X86/win-catchpad-csrs.ll @@ -87,17 +87,17 @@ handler1: ; X64-LABEL: try_catch_catch: ; X64: pushq %rbp -; X64: .seh_pushreg 5 +; X64: .seh_pushreg %rbp ; X64: pushq %rsi -; X64: .seh_pushreg 6 +; X64: .seh_pushreg %rsi ; X64: pushq %rdi -; X64: .seh_pushreg 7 +; X64: .seh_pushreg %rdi ; X64: pushq %rbx -; X64: .seh_pushreg 3 +; X64: .seh_pushreg %rbx ; X64: subq $40, %rsp ; X64: .seh_stackalloc 40 ; X64: leaq 32(%rsp), %rbp -; X64: .seh_setframe 5, 32 +; X64: .seh_setframe %rbp, 32 ; X64: .seh_endprologue ; X64: movq $-2, (%rbp) ; X64: callq getint @@ -117,13 +117,13 @@ handler1: ; X64: LBB0_[[catch1bb]]: # %handler1{{$}} ; X64: movq %rdx, 16(%rsp) ; X64: pushq %rbp -; X64: .seh_pushreg 5 +; X64: .seh_pushreg %rbp ; X64: pushq %rsi -; X64: .seh_pushreg 6 +; X64: .seh_pushreg %rsi ; X64: pushq %rdi -; X64: .seh_pushreg 7 +; X64: .seh_pushreg %rdi ; X64: pushq %rbx -; X64: .seh_pushreg 3 +; X64: .seh_pushreg %rbx ; X64: subq $40, %rsp ; X64: .seh_stackalloc 40 ; X64: leaq 32(%rdx), %rbp @@ -166,14 +166,14 @@ try.cont: ; X64-LABEL: try_one_csr: ; X64: pushq %rbp -; X64: .seh_pushreg 5 +; X64: .seh_pushreg %rbp ; X64: pushq %rsi -; X64: .seh_pushreg 6 +; X64: .seh_pushreg %rsi ; X64-NOT: pushq ; X64: subq $40, %rsp ; X64: .seh_stackalloc 40 ; X64: leaq 32(%rsp), %rbp -; X64: .seh_setframe 5, 32 +; X64: .seh_setframe %rbp, 32 ; X64: .seh_endprologue ; X64: callq getint ; X64: callq getint @@ -192,9 +192,9 @@ try.cont: ; X64: LBB1_[[catch1bb]]: # %handler1{{$}} ; X64: movq %rdx, 16(%rsp) ; X64: pushq %rbp -; X64: .seh_pushreg 5 +; X64: .seh_pushreg %rbp ; X64: pushq %rsi -; X64: .seh_pushreg 6 +; X64: .seh_pushreg %rsi ; X64: subq $40, %rsp ; X64: .seh_stackalloc 40 ; X64: leaq 32(%rdx), %rbp @@ -230,12 +230,12 @@ try.cont: ; X64-LABEL: try_no_csr: ; X64: pushq %rbp -; X64: .seh_pushreg 5 +; X64: .seh_pushreg %rbp ; X64-NOT: pushq ; X64: subq $48, %rsp ; X64: .seh_stackalloc 48 ; X64: leaq 48(%rsp), %rbp -; X64: .seh_setframe 5, 48 +; X64: .seh_setframe %rbp, 48 ; X64: .seh_endprologue ; X64: movl $1, %ecx ; X64: callq f @@ -250,7 +250,7 @@ try.cont: ; X64: LBB2_[[catch1bb]]: # %handler1{{$}} ; X64: movq %rdx, 16(%rsp) ; X64: pushq %rbp -; X64: .seh_pushreg 5 +; X64: .seh_pushreg %rbp ; X64: subq $32, %rsp ; X64: .seh_stackalloc 32 ; X64: leaq 48(%rdx), %rbp diff --git a/llvm/test/CodeGen/X86/win-catchpad.ll b/llvm/test/CodeGen/X86/win-catchpad.ll index 48866490c16..6dddcb97084 100644 --- a/llvm/test/CodeGen/X86/win-catchpad.ll +++ b/llvm/test/CodeGen/X86/win-catchpad.ll @@ -123,11 +123,11 @@ try.cont: ; X64-LABEL: try_catch_catch: ; X64: Lfunc_begin0: ; X64: pushq %rbp -; X64: .seh_pushreg 5 +; X64: .seh_pushreg %rbp ; X64: subq $[[STCK_ALLOC:.*]], %rsp ; X64: .seh_stackalloc [[STCK_ALLOC]] ; X64: leaq [[STCK_ALLOC]](%rsp), %rbp -; X64: .seh_setframe 5, [[STCK_ALLOC]] +; X64: .seh_setframe %rbp, [[STCK_ALLOC]] ; X64: .seh_endprologue ; X64: movq $-2, -16(%rbp) ; X64: .Ltmp0 @@ -144,7 +144,7 @@ try.cont: ; X64: LBB0_[[catch1bb]]: # %handler1{{$}} ; X64: movq %rdx, 16(%rsp) ; X64: pushq %rbp -; X64: .seh_pushreg 5 +; X64: .seh_pushreg %rbp ; X64: subq $32, %rsp ; X64: .seh_stackalloc 32 ; X64: leaq [[STCK_ALLOC]](%rdx), %rbp @@ -161,7 +161,7 @@ try.cont: ; X64: LBB0_[[catch2bb]]: # %handler2{{$}} ; X64: movq %rdx, 16(%rsp) ; X64: pushq %rbp -; X64: .seh_pushreg 5 +; X64: .seh_pushreg %rbp ; X64: subq $32, %rsp ; X64: .seh_stackalloc 32 ; X64: leaq [[STCK_ALLOC]](%rdx), %rbp @@ -278,11 +278,11 @@ try.cont: ; X64-LABEL: branch_to_normal_dest: ; X64: # %entry ; X64: pushq %rbp -; X64: .seh_pushreg 5 +; X64: .seh_pushreg %rbp ; X64: subq $48, %rsp ; X64: .seh_stackalloc 48 ; X64: leaq 48(%rsp), %rbp -; X64: .seh_setframe 5, 48 +; X64: .seh_setframe %rbp, 48 ; X64: .seh_endprologue ; X64: .Ltmp[[before_call:[0-9]+]]: ; X64: callq f @@ -297,7 +297,7 @@ try.cont: ; X64: LBB1_[[catchbb]]: # %catch{{$}} ; X64: movq %rdx, 16(%rsp) ; X64: pushq %rbp -; X64: .seh_pushreg 5 +; X64: .seh_pushreg %rbp ; X64: subq $32, %rsp ; X64: .seh_stackalloc 32 ; X64: leaq 48(%rdx), %rbp diff --git a/llvm/test/CodeGen/X86/win-funclet-cfi.ll b/llvm/test/CodeGen/X86/win-funclet-cfi.ll index 2151cdc7bb4..5e78e576695 100644 --- a/llvm/test/CodeGen/X86/win-funclet-cfi.ll +++ b/llvm/test/CodeGen/X86/win-funclet-cfi.ll @@ -42,7 +42,7 @@ declare i32 @__CxxFrameHandler3(...) ; Emit CFI for pushing RBP. ; CHECK: movq %rdx, 16(%rsp) ; CHECK: pushq %rbp -; CHECK: .seh_pushreg 5 +; CHECK: .seh_pushreg %rbp ; Emit CFI for allocating from the stack pointer. ; CHECK: subq $32, %rsp @@ -72,7 +72,7 @@ declare i32 @__CxxFrameHandler3(...) ; Emit CFI for pushing RBP. ; CHECK: movq %rdx, 16(%rsp) ; CHECK: pushq %rbp -; CHECK: .seh_pushreg 5 +; CHECK: .seh_pushreg %rbp ; Emit CFI for allocating from the stack pointer. ; CHECK: subq $32, %rsp diff --git a/llvm/test/CodeGen/X86/win64-funclet-savexmm.ll b/llvm/test/CodeGen/X86/win64-funclet-savexmm.ll index 62ddebb9a5a..b3f9c32210f 100644 --- a/llvm/test/CodeGen/X86/win64-funclet-savexmm.ll +++ b/llvm/test/CodeGen/X86/win64-funclet-savexmm.ll @@ -79,18 +79,18 @@ try.cont: ; preds = %catchret.dest, %inv ; CHECK: # %catch ; CHECK: movq %rdx, 16(%rsp) ; CHECK: pushq %rbp -; CHECK: .seh_pushreg 5 +; CHECK: .seh_pushreg %rbp ; CHECK: pushq %rbx -; CHECK: .seh_pushreg 3 +; CHECK: .seh_pushreg %rbx ; CHECK: subq $88, %rsp ; CHECK: .seh_stackalloc 88 ; CHECK: leaq 112(%rdx), %rbp ; CHECK: vmovaps %xmm8, 48(%rsp) -; CHECK: .seh_savexmm 8, 48 +; CHECK: .seh_savexmm %xmm8, 48 ; CHECK: vmovaps %xmm7, 64(%rsp) -; CHECK: .seh_savexmm 7, 64 +; CHECK: .seh_savexmm %xmm7, 64 ; CHECK: vmovaps %xmm6, 80(%rsp) -; CHECK: .seh_savexmm 6, 80 +; CHECK: .seh_savexmm %xmm6, 80 ; CHECK: .seh_endprologue ; CHECK: movl -{{[0-9]+}}(%rbp), %ecx ; CHECK: vmovaps 80(%rsp), %xmm6 diff --git a/llvm/test/CodeGen/X86/win64_eh.ll b/llvm/test/CodeGen/X86/win64_eh.ll index b51edf4c19b..caadea4fe2e 100644 --- a/llvm/test/CodeGen/X86/win64_eh.ll +++ b/llvm/test/CodeGen/X86/win64_eh.ll @@ -145,20 +145,20 @@ entry: ; WIN64-LABEL: foo5: ; WIN64: .seh_proc foo5 ; WIN64: pushq %rbp -; WIN64: .seh_pushreg 5 +; WIN64: .seh_pushreg %rbp ; WIN64: pushq %rdi -; WIN64: .seh_pushreg 7 +; WIN64: .seh_pushreg %rdi ; WIN64: pushq %rbx -; WIN64: .seh_pushreg 3 +; WIN64: .seh_pushreg %rbx ; NORM: subq $96, %rsp ; ATOM: leaq -96(%rsp), %rsp ; WIN64: .seh_stackalloc 96 ; WIN64: leaq 96(%rsp), %rbp -; WIN64: .seh_setframe 5, 96 +; WIN64: .seh_setframe %rbp, 96 ; WIN64: movaps %xmm7, -16(%rbp) # 16-byte Spill -; WIN64: .seh_savexmm 7, 80 +; WIN64: .seh_savexmm %xmm7, 80 ; WIN64: movaps %xmm6, -32(%rbp) # 16-byte Spill -; WIN64: .seh_savexmm 6, 64 +; WIN64: .seh_savexmm %xmm6, 64 ; WIN64: .seh_endprologue ; WIN64: andq $-64, %rsp ; WIN64: movaps -32(%rbp), %xmm6 # 16-byte Reload diff --git a/llvm/test/CodeGen/X86/win64_frame.ll b/llvm/test/CodeGen/X86/win64_frame.ll index eae02dafa71..8c570951ce8 100644 --- a/llvm/test/CodeGen/X86/win64_frame.ll +++ b/llvm/test/CodeGen/X86/win64_frame.ll @@ -6,9 +6,9 @@ define i32 @f1(i32 %p1, i32 %p2, i32 %p3, i32 %p4, i32 %p5) "no-frame-pointer-el ; ALL-LABEL: f1: ; ALL: # %bb.0: ; ALL-NEXT: pushq %rbp -; ALL-NEXT: .seh_pushreg 5 +; ALL-NEXT: .seh_pushreg %rbp ; ALL-NEXT: movq %rsp, %rbp -; ALL-NEXT: .seh_setframe 5, 0 +; ALL-NEXT: .seh_setframe %rbp, 0 ; ALL-NEXT: .seh_endprologue ; ALL-NEXT: movl 48(%rbp), %eax ; ALL-NEXT: popq %rbp @@ -23,11 +23,11 @@ define void @f2(i32 %p, ...) "no-frame-pointer-elim"="true" { ; ALL-LABEL: f2: ; ALL: # %bb.0: ; ALL-NEXT: pushq %rbp -; ALL-NEXT: .seh_pushreg 5 +; ALL-NEXT: .seh_pushreg %rbp ; ALL-NEXT: pushq %rax ; ALL-NEXT: .seh_stackalloc 8 ; ALL-NEXT: movq %rsp, %rbp -; ALL-NEXT: .seh_setframe 5, 0 +; ALL-NEXT: .seh_setframe %rbp, 0 ; ALL-NEXT: .seh_endprologue ; ALL-NEXT: movq %rdx, 32(%rbp) ; ALL-NEXT: movq %r8, 40(%rbp) @@ -49,9 +49,9 @@ define i8* @f3() "no-frame-pointer-elim"="true" { ; ALL-LABEL: f3: ; ALL: # %bb.0: ; ALL-NEXT: pushq %rbp -; ALL-NEXT: .seh_pushreg 5 +; ALL-NEXT: .seh_pushreg %rbp ; ALL-NEXT: movq %rsp, %rbp -; ALL-NEXT: .seh_setframe 5, 0 +; ALL-NEXT: .seh_setframe %rbp, 0 ; ALL-NEXT: .seh_endprologue ; ALL-NEXT: movq 8(%rbp), %rax ; ALL-NEXT: popq %rbp @@ -67,11 +67,11 @@ define i8* @f4() "no-frame-pointer-elim"="true" { ; ALL-LABEL: f4: ; ALL: # %bb.0: ; ALL-NEXT: pushq %rbp -; ALL-NEXT: .seh_pushreg 5 +; ALL-NEXT: .seh_pushreg %rbp ; ALL-NEXT: subq $304, %rsp # imm = 0x130 ; ALL-NEXT: .seh_stackalloc 304 ; ALL-NEXT: leaq {{[0-9]+}}(%rsp), %rbp -; ALL-NEXT: .seh_setframe 5, 128 +; ALL-NEXT: .seh_setframe %rbp, 128 ; ALL-NEXT: .seh_endprologue ; ALL-NEXT: movq 184(%rbp), %rax ; ALL-NEXT: addq $304, %rsp # imm = 0x130 @@ -91,11 +91,11 @@ define void @f5() "no-frame-pointer-elim"="true" { ; ALL-LABEL: f5: ; ALL: # %bb.0: ; ALL-NEXT: pushq %rbp -; ALL-NEXT: .seh_pushreg 5 +; ALL-NEXT: .seh_pushreg %rbp ; ALL-NEXT: subq $336, %rsp # imm = 0x150 ; ALL-NEXT: .seh_stackalloc 336 ; ALL-NEXT: leaq {{[0-9]+}}(%rsp), %rbp -; ALL-NEXT: .seh_setframe 5, 128 +; ALL-NEXT: .seh_setframe %rbp, 128 ; ALL-NEXT: .seh_endprologue ; ALL-NEXT: leaq -92(%rbp), %rcx ; ALL-NEXT: callq external @@ -116,11 +116,11 @@ define void @f6(i32 %p, ...) "no-frame-pointer-elim"="true" { ; ALL-LABEL: f6: ; ALL: # %bb.0: ; ALL-NEXT: pushq %rbp -; ALL-NEXT: .seh_pushreg 5 +; ALL-NEXT: .seh_pushreg %rbp ; ALL-NEXT: subq $336, %rsp # imm = 0x150 ; ALL-NEXT: .seh_stackalloc 336 ; ALL-NEXT: leaq {{[0-9]+}}(%rsp), %rbp -; ALL-NEXT: .seh_setframe 5, 128 +; ALL-NEXT: .seh_setframe %rbp, 128 ; ALL-NEXT: .seh_endprologue ; ALL-NEXT: leaq -92(%rbp), %rcx ; ALL-NEXT: callq external @@ -141,11 +141,11 @@ define i32 @f7(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e) "no-frame-pointer-elim"=" ; ALL-LABEL: f7: ; ALL: # %bb.0: ; ALL-NEXT: pushq %rbp -; ALL-NEXT: .seh_pushreg 5 +; ALL-NEXT: .seh_pushreg %rbp ; ALL-NEXT: subq $304, %rsp # imm = 0x130 ; ALL-NEXT: .seh_stackalloc 304 ; ALL-NEXT: leaq {{[0-9]+}}(%rsp), %rbp -; ALL-NEXT: .seh_setframe 5, 128 +; ALL-NEXT: .seh_setframe %rbp, 128 ; ALL-NEXT: .seh_endprologue ; ALL-NEXT: andq $-64, %rsp ; ALL-NEXT: movl 224(%rbp), %eax @@ -163,15 +163,15 @@ define i32 @f8(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e) "no-frame-pointer-elim"=" ; ALL-LABEL: f8: ; ALL: # %bb.0: ; ALL-NEXT: pushq %rbp -; ALL-NEXT: .seh_pushreg 5 +; ALL-NEXT: .seh_pushreg %rbp ; ALL-NEXT: pushq %rsi -; ALL-NEXT: .seh_pushreg 6 +; ALL-NEXT: .seh_pushreg %rsi ; ALL-NEXT: pushq %rbx -; ALL-NEXT: .seh_pushreg 3 +; ALL-NEXT: .seh_pushreg %rbx ; ALL-NEXT: subq $352, %rsp # imm = 0x160 ; ALL-NEXT: .seh_stackalloc 352 ; ALL-NEXT: leaq {{[0-9]+}}(%rsp), %rbp -; ALL-NEXT: .seh_setframe 5, 128 +; ALL-NEXT: .seh_setframe %rbp, 128 ; ALL-NEXT: .seh_endprologue ; ALL-NEXT: andq $-64, %rsp ; ALL-NEXT: movq %rsp, %rbx @@ -205,9 +205,9 @@ define i64 @f9() { ; ALL-LABEL: f9: ; ALL: # %bb.0: # %entry ; ALL-NEXT: pushq %rbp -; ALL-NEXT: .seh_pushreg 5 +; ALL-NEXT: .seh_pushreg %rbp ; ALL-NEXT: movq %rsp, %rbp -; ALL-NEXT: .seh_setframe 5, 0 +; ALL-NEXT: .seh_setframe %rbp, 0 ; ALL-NEXT: .seh_endprologue ; ALL-NEXT: pushfq ; ALL-NEXT: popq %rax @@ -227,9 +227,9 @@ define i64 @f10(i64* %foo, i64 %bar, i64 %baz) { ; ALL-LABEL: f10: ; ALL: # %bb.0: ; ALL-NEXT: pushq %rsi -; ALL-NEXT: .seh_pushreg 6 +; ALL-NEXT: .seh_pushreg %rsi ; ALL-NEXT: pushq %rbx -; ALL-NEXT: .seh_pushreg 3 +; ALL-NEXT: .seh_pushreg %rbx ; ALL-NEXT: subq $40, %rsp ; ALL-NEXT: .seh_stackalloc 40 ; ALL-NEXT: .seh_endprologue @@ -259,9 +259,9 @@ define i8* @f11() "no-frame-pointer-elim"="true" { ; ALL-LABEL: f11: ; ALL: # %bb.0: ; ALL-NEXT: pushq %rbp -; ALL-NEXT: .seh_pushreg 5 +; ALL-NEXT: .seh_pushreg %rbp ; ALL-NEXT: movq %rsp, %rbp -; ALL-NEXT: .seh_setframe 5, 0 +; ALL-NEXT: .seh_setframe %rbp, 0 ; ALL-NEXT: .seh_endprologue ; ALL-NEXT: leaq 8(%rbp), %rax ; ALL-NEXT: popq %rbp diff --git a/llvm/test/CodeGen/X86/x86-64-flags-intrinsics.ll b/llvm/test/CodeGen/X86/x86-64-flags-intrinsics.ll index 2852ef49e0a..2cc64685552 100644 --- a/llvm/test/CodeGen/X86/x86-64-flags-intrinsics.ll +++ b/llvm/test/CodeGen/X86/x86-64-flags-intrinsics.ll @@ -12,9 +12,9 @@ entry: ; CHECK-LABEL: read_flags: ; CHECK: pushq %rbp -; CHECK: .seh_pushreg 5 +; CHECK: .seh_pushreg %rbp ; CHECK: movq %rsp, %rbp -; CHECK: .seh_setframe 5, 0 +; CHECK: .seh_setframe %rbp, 0 ; CHECK: .seh_endprologue ; CHECK-NEXT: pushfq ; CHECK-NEXT: popq %rax @@ -28,9 +28,9 @@ entry: ; CHECK-LABEL: write_flags: ; CHECK: pushq %rbp -; CHECK: .seh_pushreg 5 +; CHECK: .seh_pushreg %rbp ; CHECK: movq %rsp, %rbp -; CHECK: .seh_setframe 5, 0 +; CHECK: .seh_setframe %rbp, 0 ; CHECK: .seh_endprologue ; CHECK-NEXT: pushq %rcx ; CHECK-NEXT: popfq 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 diff --git a/llvm/test/tools/llvm-objdump/Inputs/win64-unwind.exe.coff-x86_64.asm b/llvm/test/tools/llvm-objdump/Inputs/win64-unwind.exe.coff-x86_64.asm index 4d47fa4515a..c44d59b3240 100644 --- a/llvm/test/tools/llvm-objdump/Inputs/win64-unwind.exe.coff-x86_64.asm +++ b/llvm/test/tools/llvm-objdump/Inputs/win64-unwind.exe.coff-x86_64.asm @@ -11,7 +11,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 |