[InstCombine] Signed saturation patterns
[llvm-core.git] / test / MC / X86 / compact-unwind.s
blob03138c4034059e80b054c3a0d9d4ea998e0ccd79
1 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin10.0 %s | llvm-objdump -unwind-info - | FileCheck %s
3 .section __TEXT,__text,regular,pure_instructions
4 .macosx_version_min 10, 10
6 # Check that we emit compact-unwind info with UNWIND_X86_MODE_STACK_IND encoding
8 # CHECK: Contents of __compact_unwind section:
9 # CHECK-NEXT: Entry at offset 0x0:
10 # CHECK-NEXT: start: 0x0 _test0
11 # CHECK-NEXT: length: 0x15
12 # CHECK-NEXT: compact encoding: 0x03056804
13 .globl _test0
14 _test0: ## @test0
15 .cfi_startproc
16 ## %bb.0: ## %entry
17 pushq %rbp
18 Ltmp0:
19 .cfi_def_cfa_offset 16
20 pushq %rbx
21 Ltmp1:
22 .cfi_def_cfa_offset 24
23 subq $14408, %rsp ## imm = 0x3848
24 Ltmp2:
25 .cfi_def_cfa_offset 14432
26 Ltmp3:
27 .cfi_offset %rbx, -24
28 Ltmp4:
29 .cfi_offset %rbp, -16
30 xorl %eax, %eax
31 addq $14408, %rsp ## imm = 0x3848
32 popq %rbx
33 popq %rbp
34 retq
35 .cfi_endproc
37 # Check that we emit compact-unwind info with UNWIND_X86_MODE_STACK_IMMD encoding
39 # CHECK: Entry at offset 0x20:
40 # CHECK-NEXT: start: 0x15 _test1
41 # CHECK-NEXT: length: 0x15
42 # CHECK-NEXT: compact encoding: 0x02360804
43 .globl _test1
44 _test1: ## @test1
45 .cfi_startproc
46 ## %bb.0: ## %entry
47 pushq %rbp
48 Ltmp10:
49 .cfi_def_cfa_offset 16
50 pushq %rbx
51 Ltmp11:
52 .cfi_def_cfa_offset 24
53 subq $408, %rsp ## imm = 0x198
54 Ltmp12:
55 .cfi_def_cfa_offset 432
56 Ltmp13:
57 .cfi_offset %rbx, -24
58 Ltmp14:
59 .cfi_offset %rbp, -16
60 xorl %eax, %eax
61 addq $408, %rsp ## imm = 0x198
62 popq %rbx
63 popq %rbp
64 retq
65 .cfi_endproc
67 # Check that a adjustment through a push %rax is the same as a sub.
69 # CHECK: Entry at offset 0x40:
70 # CHECK-NEXT: start: 0x2a _testrax
71 # CHECK-NEXT: length: 0x5
72 # CHECK-NEXT: compact encoding: 0x02020000
73 .globl _testrax
74 _testrax: ## @testrax
75 .cfi_startproc
76 ## %bb.0: ## %entry
77 pushq %rax
78 Ltmp15:
79 .cfi_def_cfa_offset 16
80 xorl %eax, %eax
81 popq %rax
82 retq
83 .cfi_endproc
85 .section __TEXT,__cstring,cstring_literals
86 L_.str: ## @.str
87 .asciz "%d\n"
90 .subsections_via_symbols