The purpose of the patch is to fix the syntax of ARM mrc and mrc2 instructions when...
[oota-llvm.git] / test / MC / ARM / eh-compact-pr0.s
1 @ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \
2 @ RUN:   | llvm-readobj -s -sd -sr | FileCheck %s
3
4 @ Check the compact pr0 model
5
6         .syntax unified
7
8         .section        .TEST1
9         .globl  func1
10         .align  2
11         .type   func1,%function
12 func1:
13         .fnstart
14         .save   {r11, lr}
15         push    {r11, lr}
16         .setfp  r11, sp
17         mov     r11, sp
18         pop     {r11, lr}
19         mov     pc, lr
20         .fnend
21
22         .section        .TEST2
23         .globl  func2
24         .align  2
25         .type   func2,%function
26 func2:
27         .fnstart
28         .save   {r11, lr}
29         push    {r11, lr}
30         pop     {r11, pc}
31         .fnend
32
33
34
35 @-------------------------------------------------------------------------------
36 @ Check .TEST1 section
37 @-------------------------------------------------------------------------------
38 @ CHECK: Sections [
39 @ CHECK:   Section {
40 @ CHECK:     Name: .TEST1
41 @ CHECK:     SectionData (
42 @ CHECK:       0000: 00482DE9 0DB0A0E1 0048BDE8 0EF0A0E1  |.H-......H......|
43 @ CHECK:     )
44 @ CHECK:   }
45
46
47 @-------------------------------------------------------------------------------
48 @ Check .ARM.exidx.TEST1 section
49 @-------------------------------------------------------------------------------
50 @ CHECK:   Section {
51 @ CHECK:     Name: .ARM.exidx.TEST1
52 @-------------------------------------------------------------------------------
53 @ The first word should be relocated to .TEST1 section.  Besides, there is
54 @ another relocation entry for __aeabi_unwind_cpp_pr0, so that the linker
55 @ will keep __aeabi_unwind_cpp_pr0.
56 @-------------------------------------------------------------------------------
57 @ CHECK:     Relocations [
58 @ CHECK:       0x0 R_ARM_PREL31 .TEST1 0x0
59 @ CHECK:       0x0 R_ARM_NONE __aeabi_unwind_cpp_pr0 0x0
60 @ CHECK:     ]
61 @-------------------------------------------------------------------------------
62 @ 0x80   = Compact model 0, personality routine: __aeabi_unwind_cpp_pr0
63 @ 0x9B   = $sp can be found in $r11
64 @ 0x8480 = pop {r11, r14}
65 @-------------------------------------------------------------------------------
66 @ CHECK:     SectionData (
67 @ CHECK:       0000: 00000000 80849B80                    |........|
68 @ CHECK:     )
69 @ CHECK:   }
70
71
72 @-------------------------------------------------------------------------------
73 @ Check .TEST2 section
74 @-------------------------------------------------------------------------------
75 @ CHECK:   Section {
76 @ CHECK:     Name: .TEST2
77 @ CHECK:     SectionData (
78 @ CHECK:       0000: 00482DE9 0088BDE8                    |.H-.....|
79 @ CHECK:     )
80 @ CHECK:   }
81 @-------------------------------------------------------------------------------
82 @ Check .ARM.exidx.TEST1 section
83 @-------------------------------------------------------------------------------
84 @ CHECK:   Section {
85 @ CHECK:     Name: .ARM.exidx.TEST2
86 @-------------------------------------------------------------------------------
87 @ The first word should be relocated to .TEST2 section.  Besides, there is
88 @ another relocation entry for __aeabi_unwind_cpp_pr0, so that the linker
89 @ will keep __aeabi_unwind_cpp_pr0.
90 @-------------------------------------------------------------------------------
91 @ CHECK:     Relocations [
92 @ CHECK:       0x0 R_ARM_PREL31 .TEST2 0x0
93 @ CHECK:       0x0 R_ARM_NONE __aeabi_unwind_cpp_pr0 0x0
94 @ CHECK:     ]
95 @-------------------------------------------------------------------------------
96 @ 0x80   = Compact model 0, personality routine: __aeabi_unwind_cpp_pr0
97 @ 0x8480 = pop {r11, r14}
98 @ 0xB0   = finish
99 @-------------------------------------------------------------------------------
100 @ CHECK:     SectionData (
101 @ CHECK:       0000: 00000000 B0808480                    |........|
102 @ CHECK:     )
103 @ CHECK:   }
104 @ CHECK: ]