[llvm-readobj] - Simplify stack-sizes.test test case.
[llvm-complete.git] / test / MC / ARM / eh-directive-unwind_raw.s
blobc617aa37c497e82675decdbbb5ff7625cb3eabde
1 @ RUN: llvm-mc -triple armv7-linux-eabi -filetype obj -o - %s | llvm-readobj -u \
2 @ RUN: | FileCheck %s
4 .syntax unified
6 .type save,%function
7 .thumb_func
8 save:
9 .fnstart
10 .unwind_raw 4, 0xb1, 0x01
11 push {r0}
12 pop {r0}
13 bx lr
14 .fnend
16 .type empty,%function
17 .thumb_func
18 empty:
19 .fnstart
20 .unwind_raw 0, 0xb0
21 bx lr
22 .fnend
24 .type extended,%function
25 .thumb_func
26 extended:
27 .fnstart
28 .unwind_raw 12, 0x9b, 0x40, 0x84, 0x80, 0xb0, 0xb0
29 @ .save {fp, lr}
30 stmfd sp!, {fp, lr}
31 @ .setfp fp, sp, #4
32 add fp, sp, #4
33 @ .pad #8
34 sub sp, sp, #8
35 add sp, sp, #8
36 sub fp, sp, #4
37 ldmfd sp!, {fp, lr}
38 bx lr
39 .fnend
41 .type refuse,%function
42 .thumb_func
43 refuse:
44 .fnstart
45 .unwind_raw 0, 0x80, 0x00
46 bx lr
47 .fnend
49 .type stack_adjust,%function
50 .thumb_func
51 stack_adjust:
52 .fnstart
53 .setfp fp, sp, #32
54 .unwind_raw 24, 0xc2
55 .fnend
57 @ CHECK: UnwindInformation {
58 @ CHECK: UnwindIndexTable {
59 @ CHECK: SectionName: .ARM.exidx
60 @ CHECK: Entries [
61 @ CHECK: Entry {
62 @ CHECK: Model: Compact (Inline)
63 @ CHECK: PersonalityIndex: 0
64 @ CHECK: Opcodes [
65 @ CHECK: 0xB1 0x01 ; pop {r0}
66 @ CHECK: 0xB0 ; finish
67 @ CHECK: ]
68 @ CHECK: }
69 @ CHECK: Entry {
70 @ CHECK: Model: Compact (Inline)
71 @ CHECK: PersonalityIndex: 0
72 @ CHECK: Opcodes [
73 @ CHECK: 0xB0 ; finish
74 @ CHECK: 0xB0 ; finish
75 @ CHECK: 0xB0 ; finish
76 @ CHECK: ]
77 @ CHECK: }
78 @ CHECK: Entry {
79 @ CHECK: ExceptionHandlingTable: .ARM.extab
80 @ CHECK: Model: Compact
81 @ CHECK: PersonalityIndex: 1
82 @ CHECK: Opcodes [
83 @ CHECK: 0x9B ; vsp = r11
84 @ CHECK: 0x40 ; vsp = vsp - 4
85 @ CHECK: 0x84 0x80 ; pop {fp, lr}
86 @ CHECK: 0xB0 ; finish
87 @ CHECK: 0xB0 ; finish
88 @ CHECK: ]
89 @ CHECK: }
90 @ CHECK: Entry {
91 @ CHECK: Model: Compact (Inline)
92 @ CHECK: PersonalityIndex: 0
93 @ CHECK: Opcodes [
94 @ CHECK: 0x80 0x00 ; refuse to unwind
95 @ CHECK: 0xB0 ; finish
96 @ CHECK: ]
97 @ CHECK: }
98 @ CHECK: Entry {
99 @ CHECK: Model: Compact (Inline)
100 @ CHECK: PersonalityIndex: 0
101 @ CHECK: Opcodes [
102 @ CHECK: 0x9B ; vsp = r11
103 @ CHECK: 0x4D ; vsp = vsp - 56
104 @ CHECK: 0xC2 ; pop {wR10, wR11, wR12}
105 @ CHECK: ]
106 @ CHECK: }
107 @ CHECK: ]
108 @ CHECK: }
109 @ CHECK: }