1 @ RUN: llvm-mc -triple armv7-linux-eabi -filetype obj -o - %s \ 2 @ RUN: | llvm-readobj -u | FileCheck %s 3 4 .syntax unified 5 6 .cpu cortex-a8 7 .fpu neon 8 9 .section .personality 10 11 .type __personality,%function 12 __personality: 13 .fnstart 14 bkpt 15 .fnend 16 17 18 .section .personality0 19 20 .type personality0,%function 21 personality0: 22 .fnstart 23 bx lr 24 .fnend 25 26 27 .section .personality1 28 29 .type personality1,%function 30 personality1: 31 .fnstart 32 .pad #0x100 33 sub sp, sp, #0x100 34 .save {r0-r11} 35 push {r0-r11} 36 pop {r0-r11} 37 add sp, sp, #0x100 38 bx lr 39 .fnend 40 41 42 .section .custom_personality 43 44 .type custom_personality,%function 45 custom_personality: 46 .fnstart 47 .personality __personality 48 bx lr 49 .fnend 50 51 52 .section .opcodes 53 54 .type opcodes,%function 55 opcodes: 56 .fnstart 57 .vsave {d8-d12} 58 vpush {d8-d12} 59 vpop {d8-d12} 60 bx lr 61 .fnend 62 63 64 .section .multiple 65 66 .type function0,%function 67 function0: 68 .fnstart 69 bx lr 70 .fnend 71 72 .type function1,%function 73 function1: 74 .fnstart 75 .personality __personality 76 bx lr 77 .fnend 78 79 .type function2,%function 80 function2: 81 .fnstart 82 bx lr 83 .fnend 84 85 .section .raw 86 87 .type raw,%function 88 .thumb_func 89 raw: 90 .fnstart 91 .unwind_raw 12, 0x02 92 .unwind_raw -12, 0x42 93 .unwind_raw 0, 0x80, 0x00 94 .unwind_raw 4, 0x81, 0x00 95 .unwind_raw 4, 0x80, 0x01 96 .unwind_raw 8, 0x80, 0xc0 97 .unwind_raw 12, 0x84, 0xc0 98 .unwind_raw 0, 0x91 99 .unwind_raw 8, 0xa1 100 .unwind_raw 12, 0xa9 101 .unwind_raw 0, 0xb0 102 .unwind_raw 4, 0xb1, 0x01 103 .unwind_raw 0xa04, 0xb2, 0x80, 0x04 104 .unwind_raw 24, 0xb3, 0x12 105 .unwind_raw 24, 0xba 106 .unwind_raw 24, 0xc2 107 .unwind_raw 24, 0xc6, 0x02 108 .unwind_raw 8, 0xc7, 0x03 109 .unwind_raw 24, 0xc8, 0x02 110 .unwind_raw 24, 0xc9, 0x02 111 .unwind_raw 64, 0xd7 112 .fnend 113 114 .section .spare 115 116 .type spare,%function 117 spare: 118 .fnstart 119 .unwind_raw 4, 0x00 120 .unwind_raw -4, 0x40 121 .unwind_raw 0, 0x80, 0x00 122 .unwind_raw 4, 0x88, 0x00 123 .unwind_raw 0, 0x91 124 .unwind_raw 0, 0x9d 125 .unwind_raw 0, 0x9f 126 .unwind_raw 0, 0xa0 127 .unwind_raw 0, 0xa8 128 .unwind_raw 0, 0xb0 129 .unwind_raw 0, 0xb1, 0x00 130 .unwind_raw 4, 0xb1, 0x01 131 .unwind_raw 0, 0xb1, 0x10 132 .unwind_raw 0x204, 0xb2, 0x00 133 .unwind_raw 16, 0xb3, 0x00 134 .unwind_raw 0, 0xb4 135 .unwind_raw 16, 0xb8 136 .unwind_raw 4, 0xc0 137 .unwind_raw 4, 0xc6, 0x00 138 .unwind_raw 4, 0xc7, 0x00 139 .unwind_raw 4, 0xc7, 0x01 140 .unwind_raw 0, 0xc7, 0x10 141 .unwind_raw 16, 0xc8, 0x00 142 .unwind_raw 16, 0xc9, 0x00 143 .unwind_raw 0, 0xca 144 .unwind_raw 16, 0xd0 145 .unwind_raw 0, 0xd8 146 .fnend 147 148 @ CHECK: UnwindInformation { 149 @ CHECK: UnwindIndexTable { 150 @ CHECK: SectionName: .ARM.exidx.personality 151 @ CHECK: Entries [ 152 @ CHECK: Entry { 153 @ CHECK: FunctionAddress: 0x0 154 @ CHECK: FunctionName: __personality 155 @ CHECK: Model: Compact (Inline) 156 @ CHECK: PersonalityIndex: 0 157 @ CHECK: Opcodes [ 158 @ CHECK: 0xB0 ; finish 159 @ CHECK: 0xB0 ; finish 160 @ CHECK: 0xB0 ; finish 161 @ CHECK: ] 162 @ CHECK: } 163 @ CHECK: ] 164 @ CHECK: } 165 @ CHECK: UnwindIndexTable { 166 @ CHECK: SectionName: .ARM.exidx.personality0 167 @ CHECK: Entries [ 168 @ CHECK: Entry { 169 @ CHECK: FunctionAddress: 0x0 170 @ CHECK: FunctionName: personality0 171 @ CHECK: Model: Compact (Inline) 172 @ CHECK: PersonalityIndex: 0 173 @ CHECK: Opcodes [ 174 @ CHECK: 0xB0 ; finish 175 @ CHECK: 0xB0 ; finish 176 @ CHECK: 0xB0 ; finish 177 @ CHECK: ] 178 @ CHECK: } 179 @ CHECK: ] 180 @ CHECK: } 181 @ CHECK: UnwindIndexTable { 182 @ CHECK: SectionName: .ARM.exidx.personality1 183 @ CHECK: Entries [ 184 @ CHECK: Entry { 185 @ CHECK: FunctionAddress: 0x0 186 @ CHECK: FunctionName: personality1 187 @ CHECK: ExceptionHandlingTable: .ARM.extab.personality1 188 @ CHECK: TableEntryOffset: 0x0 189 @ CHECK: Model: Compact 190 @ CHECK: PersonalityIndex: 1 191 @ CHECK: Opcodes [ 192 @ CHECK: 0xB1 0x0F ; pop {r0, r1, r2, r3} 193 @ CHECK: 0xA7 ; pop {r4, r5, r6, r7, r8, r9, r10, fp} 194 @ CHECK: 0x3F ; vsp = vsp + 256 195 @ CHECK: 0xB0 ; finish 196 @ CHECK: 0xB0 ; finish 197 @ CHECK: ] 198 @ CHECK: } 199 @ CHECK: ] 200 @ CHECK: } 201 @ CHECK: UnwindIndexTable { 202 @ CHECK: SectionName: .ARM.exidx.custom_personality 203 @ CHECK: Entries [ 204 @ CHECK: Entry { 205 @ CHECK: FunctionAddress: 0x0 206 @ CHECK: FunctionName: custom_personality 207 @ CHECK: ExceptionHandlingTable: .ARM.extab.custom_personality 208 @ CHECK: TableEntryOffset: 0x0 209 @ CHECK: Model: Generic 210 @ CHECK: PersonalityRoutineAddress: 0x0 211 @ CHECK: } 212 @ CHECK: ] 213 @ CHECK: } 214 @ CHECK: UnwindIndexTable { 215 @ CHECK: SectionName: .ARM.exidx.opcodes 216 @ CHECK: Entries [ 217 @ CHECK: Entry { 218 @ CHECK: FunctionAddress: 0x0 219 @ CHECK: FunctionName: opcodes 220 @ CHECK: Model: Compact (Inline) 221 @ CHECK: PersonalityIndex: 0 222 @ CHECK: Opcodes [ 223 @ CHECK: 0xC9 0x84 ; pop {d8, d9, d10, d11, d12} 224 @ CHECK: 0xB0 ; finish 225 @ CHECK: ] 226 @ CHECK: } 227 @ CHECK: ] 228 @ CHECK: } 229 @ CHECK: UnwindIndexTable { 230 @ CHECK: SectionName: .ARM.exidx.multiple 231 @ CHECK: Entries [ 232 @ CHECK: Entry { 233 @ CHECK: FunctionAddress: 0x0 234 @ CHECK: FunctionName: function0 235 @ CHECK: Model: Compact (Inline) 236 @ CHECK: PersonalityIndex: 0 237 @ CHECK: Opcodes [ 238 @ CHECK: 0xB0 ; finish 239 @ CHECK: 0xB0 ; finish 240 @ CHECK: 0xB0 ; finish 241 @ CHECK: ] 242 @ CHECK: } 243 @ CHECK: Entry { 244 @ CHECK: FunctionAddress: 0x4 245 @ CHECK: FunctionName: function1 246 @ CHECK: ExceptionHandlingTable: .ARM.extab.multiple 247 @ CHECK: Model: Generic 248 @ CHECK: PersonalityRoutineAddress: 0x0 249 @ CHECK: } 250 @ CHECK: Entry { 251 @ CHECK: FunctionAddress: 0x8 252 @ CHECK: FunctionName: function2 253 @ CHECK: Model: Compact (Inline) 254 @ CHECK: PersonalityIndex: 0 255 @ CHECK: Opcodes [ 256 @ CHECK: 0xB0 ; finish 257 @ CHECK: 0xB0 ; finish 258 @ CHECK: 0xB0 ; finish 259 @ CHECK: ] 260 @ CHECK: } 261 @ CHECK: ] 262 @ CHECK: } 263 @ CHECK: UnwindIndexTable { 264 @ CHECK: SectionName: .ARM.exidx.raw 265 @ CHECK: Entries [ 266 @ CHECK: Opcodes [ 267 @ CHECK: 0xD7 ; pop {d8, d9, d10, d11, d12, d13, d14, d15} 268 @ CHECK: 0xC9 0x02 ; pop {d0, d1, d2} 269 @ CHECK: 0xC8 0x02 ; pop {d16, d17, d18} 270 @ CHECK: 0xC7 0x03 ; pop {wCGR0, wCGR1} 271 @ CHECK: 0xC6 0x02 ; pop {wR0, wR1, wR2} 272 @ CHECK: 0xC2 ; pop {wR10, wR11, wR12} 273 @ CHECK: 0xBA ; pop {d8, d9, d10} 274 @ CHECK: 0xB3 0x12 ; pop {d1, d2, d3} 275 @ CHECK: 0xB2 0x80 0x04 ; vsp = vsp + 2564 276 @ CHECK: 0xB1 0x01 ; pop {r0} 277 @ CHECK: 0xB0 ; finish 278 @ CHECK: 0xA9 ; pop {r4, r5, lr} 279 @ CHECK: 0xA1 ; pop {r4, r5} 280 @ CHECK: 0x91 ; vsp = r1 281 @ CHECK: 0x84 0xC0 ; pop {r10, fp, lr} 282 @ CHECK: 0x80 0xC0 ; pop {r10, fp} 283 @ CHECK: 0x80 0x01 ; pop {r4} 284 @ CHECK: 0x81 0x00 ; pop {ip} 285 @ CHECK: 0x80 0x00 ; refuse to unwind 286 @ CHECK: 0x42 ; vsp = vsp - 12 287 @ CHECK: 0x02 ; vsp = vsp + 12 288 @ CHECK: ] 289 @ CHECK: ] 290 @ CHECK: } 291 @ CHECK: UnwindIndexTable { 292 @ CHECK: SectionName: .ARM.exidx.spare 293 @ CHECK: Entries [ 294 @ CHECK: Opcodes [ 295 @ CHECK: 0xD8 ; spare 296 @ CHECK: 0xD0 ; pop {d8} 297 @ CHECK: 0xCA ; spare 298 @ CHECK: 0xC9 0x00 ; pop {d0} 299 @ CHECK: 0xC8 0x00 ; pop {d16} 300 @ CHECK: 0xC7 0x10 ; spare 301 @ CHECK: 0xC7 0x01 ; pop {wCGR0} 302 @ CHECK: 0xC7 0x00 ; spare 303 @ CHECK: 0xC6 0x00 ; pop {wR0} 304 @ CHECK: 0xC0 ; pop {wR10} 305 @ CHECK: 0xB8 ; pop {d8} 306 @ CHECK: 0xB4 ; spare 307 @ CHECK: 0xB3 0x00 ; pop {d0} 308 @ CHECK: 0xB2 0x00 ; vsp = vsp + 516 309 @ CHECK: 0xB1 0x10 ; spare 310 @ CHECK: 0xB1 0x01 ; pop {r0} 311 @ CHECK: 0xB1 0x00 ; spare 312 @ CHECK: 0xB0 ; finish 313 @ CHECK: 0xA8 ; pop {r4, lr} 314 @ CHECK: 0xA0 ; pop {r4} 315 @ CHECK: 0x9F ; reserved (WiMMX MOVrr) 316 @ CHECK: 0x9D ; reserved (ARM MOVrr) 317 @ CHECK: 0x91 ; vsp = r1 318 @ CHECK: 0x88 0x00 ; pop {pc} 319 @ CHECK: 0x80 0x00 ; refuse to unwind 320 @ CHECK: 0x40 ; vsp = vsp - 4 321 @ CHECK: 0x00 ; vsp = vsp + 4 322 @ CHECK: ] 323 @ CHECK: ] 324 @ CHECK: } 325 @ CHECK: } 326 327