[mips] [IAS] Add support for the DLA pseudo-instruction and fix problems with DLI
[oota-llvm.git] / test / MC / Mips / eh-frame.s
1 // Test the bits of .eh_frame on mips that are already implemented correctly.
2
3 // FIXME: This test would be a lot cleaner if llvm-objdump had the
4 // --dwarf=frames option.
5
6 // RUN: llvm-mc -filetype=obj %s -o %t.o -arch=mips
7 // RUN: llvm-objdump -r -s %t.o | FileCheck --check-prefix=MIPS32 %s
8
9 // RUN: llvm-mc -filetype=obj %s -o %t.o -arch=mipsel
10 // RUN: llvm-objdump -r -s %t.o | FileCheck --check-prefix=MIPS32EL %s
11
12 // RUN: llvm-mc -filetype=obj %s -o %t.o -arch=mips64
13 // RUN: llvm-objdump -r -s %t.o | FileCheck --check-prefix=MIPS64 %s
14
15 // RUN: llvm-mc -filetype=obj %s -o %t.o -arch=mips64el
16 // RUN: llvm-objdump -r -s %t.o | FileCheck --check-prefix=MIPS64EL %s
17
18 func:
19         .cfi_startproc
20         .cfi_endproc
21
22 // MIPS32: RELOCATION RECORDS FOR [.rel.eh_frame]:
23 // MIPS32-NEXT: R_MIPS_32
24 // MIPS32: Contents of section .eh_frame:
25 // MIPS32-NEXT: 0000
26
27 // Length
28 // MIPS32: 00000010
29
30 // CIE ID
31 // MIPS32: 00000000
32
33 // Version
34 // MIPS32: 01
35
36 // Augmentation String
37 // MIPS32: 7a5200
38
39 // Code Alignment Factor
40 // MIPS32: 01
41
42 // Data Alignment Factor (-4)
43 // MIPS32: 7c
44
45 // Return Address Register
46 // MIPS32: 1f
47
48 // Augmentation Size
49 // MIPS32: 01
50
51 // MIPS32: .........zR..|..
52 // MIPS32-NEXT: 0010
53
54 // Augmentation (fde pointer encoding: DW_EH_PE_sdata4)
55 // MIPS32: 0b
56 // FIXME: The instructions are different from the ones produces by gas.
57
58 // MIPS32EL: RELOCATION RECORDS FOR [.rel.eh_frame]:
59 // MIPS32EL-NEXT: R_MIPS_32
60 // MIPS32EL: Contents of section .eh_frame:
61 // MIPS32EL-NEXT: 0000
62
63 // Length
64 // MIPS32EL: 10000000
65
66 // CIE ID
67 // MIPS32EL: 00000000
68
69 // Version
70 // MIPS32EL: 01
71
72 // Augmentation String
73 // MIPS32EL: 7a5200
74
75 // Code Alignment Factor
76 // MIPS32EL: 01
77
78 // Data Alignment Factor (-4)
79 // MIPS32EL: 7c
80
81 // Return Address Register
82 // MIPS32EL: 1f
83
84 // Augmentation Size
85 // MIPS32EL: 01
86
87 // MIPS32EL: .........zR..|..
88 // MIPS32EL-NEXT: 0010
89
90 // Augmentation (fde pointer encoding: DW_EH_PE_sdata4)
91 // MIPS32EL: 0b
92 // FIXME: The instructions are different from the ones produces by gas.
93
94 // MIPS64: RELOCATION RECORDS FOR [.rela.eh_frame]:
95 // MIPS64-NEXT: R_MIPS_64
96 // MIPS64: Contents of section .eh_frame:
97 // MIPS64-NEXT: 0000
98
99 // Length
100 // MIPS64: 00000010
101
102 // CIE ID
103 // MIPS64: 00000000
104
105 // Version
106 // MIPS64: 01
107
108 // Augmentation String
109 // MIPS64: 7a5200
110
111 // Code Alignment Factor
112 // MIPS64: 01
113
114 // Data Alignment Factor (-8). GAS uses -4. Should be ok as long as all
115 // offsets we need are a multiple of 8.
116 // MIPS64: 78
117
118 // Return Address Register
119 // MIPS64: 1f
120
121 // Augmentation Size
122 // MIPS64: 01
123
124 // MIPS64: .........zR..x..
125 // MIPS64-NEXT: 0010
126
127 // Augmentation (fde pointer encoding: DW_EH_PE_sdata8)
128 // MIPS64: 0c
129 // FIXME: The instructions are different from the ones produces by gas.
130
131
132 // MIPS64EL: RELOCATION RECORDS FOR [.rela.eh_frame]:
133 // MIPS64EL-NEXT: R_MIPS_64
134 // MIPS64EL: Contents of section .eh_frame:
135 // MIPS64EL-NEXT: 0000
136
137 // Length
138 // MIPS64EL: 10000000
139
140 // CIE ID
141 // MIPS64EL: 00000000
142
143 // Version
144 // MIPS64EL: 01
145
146 // Augmentation String
147 // MIPS64EL: 7a5200
148
149 // Code Alignment Factor
150 // MIPS64EL: 01
151
152 // Data Alignment Factor (-8). GAS uses -4. Should be ok as long as all
153 // offsets we need are a multiple of 8.
154 // MIPS64EL: 78
155
156 // Return Address Register
157 // MIPS64EL: 1f
158
159 // Augmentation Size
160 // MIPS64EL: 01
161
162 // MIPS64EL: .........zR..x..
163 // MIPS64EL-NEXT: 0010
164
165 // Augmentation (fde pointer encoding: DW_EH_PE_sdata8)
166 // MIPS64EL: 0c
167 // FIXME: The instructions are different from the ones produces by gas.