1 ;; RUN: llc -verify-machineinstrs \ 2 ;; RUN: -mtriple=armv7-linux-gnueabi -filetype=obj %s -o - | \ 3 ;; RUN: llvm-readobj -t | FileCheck -check-prefix=ARM %s 4 5 ;; RUN: llc -verify-machineinstrs \ 6 ;; RUN: -mtriple=thumbv7-linux-gnueabi -filetype=obj %s -o - | \ 7 ;; RUN: llvm-readobj -t | FileCheck -check-prefix=TMB %s 8 9 ;; Ensure that if a jump table is generated that it has Mapping Symbols 10 ;; marking the data-in-code region. 11 12 define void @foo(i32* %ptr) nounwind ssp { 13 %tmp = load i32, i32* %ptr, align 4 14 switch i32 %tmp, label %exit [ 15 i32 0, label %bb0 16 i32 1, label %bb1 17 i32 2, label %bb2 18 i32 3, label %bb3 19 ] 20 bb0: 21 store i32 0, i32* %ptr, align 4 22 br label %exit 23 bb1: 24 store i32 1, i32* %ptr, align 4 25 br label %exit 26 bb2: 27 store i32 2, i32* %ptr, align 4 28 br label %exit 29 bb3: 30 store i32 3, i32* %ptr, align 4 31 br label %exit 32 exit: 33 ret void 34 } 35 36 ;; ARM: Symbol { 37 ;; ARM: Name: $a 38 ;; ARM-NEXT: Value: 0x0 39 ;; ARM-NEXT: Size: 0 40 ;; ARM-NEXT: Binding: Local 41 ;; ARM-NEXT: Type: None 42 ;; ARM-NEXT: Other: 43 ;; ARM-NEXT: Section: [[MIXED_SECT:[^ ]+]] 44 45 ;; ARM: Symbol { 46 ;; ARM: Name: $a 47 ;; ARM-NEXT: Value: 0x{{[0-9A-F]+}} 48 ;; ARM-NEXT: Size: 0 49 ;; ARM-NEXT: Binding: Local 50 ;; ARM-NEXT: Type: None 51 ;; ARM-NEXT: Other: 52 ;; ARM-NEXT: Section: [[MIXED_SECT]] 53 54 ;; ARM: Symbol { 55 ;; ARM: Name: $d 56 ;; ARM-NEXT: Value: 0x{{[0-9A-F]+}} 57 ;; ARM-NEXT: Size: 0 58 ;; ARM-NEXT: Binding: Local 59 ;; ARM-NEXT: Type: None 60 ;; ARM-NEXT: Other: 61 ;; ARM-NEXT: Section: [[MIXED_SECT]] 62 63 ;; ARM: Symbol { 64 ;; ARM: Name: $d 65 ;; ARM-NEXT: Value: 0x0 66 ;; ARM-NEXT: Size: 0 67 ;; ARM-NEXT: Binding: Local (0x0) 68 ;; ARM-NEXT: Type: None (0x0) 69 ;; ARM-NEXT: Other: 0 70 ;; ARM-NEXT: Section: .ARM.exidx 71 ;; ARM-NEXT: } 72 73 ;; ARM: Symbol { 74 ;; ARM: Name: $d 75 ;; ARM-NEXT: Value: 0 76 ;; ARM-NEXT: Size: 0 77 ;; ARM-NEXT: Binding: Local 78 ;; ARM-NEXT: Type: None 79 80 ;; ARM-NOT: ${{[atd]}} 81 82 ;; TMB: Symbol { 83 ;; TMB: Name: $d.1 84 ;; TMB-NEXT: Value: 0x{{[0-9A-F]+}} 85 ;; TMB-NEXT: Size: 0 86 ;; TMB-NEXT: Binding: Local 87 ;; TMB-NEXT: Type: None 88 ;; TMB-NEXT: Other: 89 ;; TMB-NEXT: Section: [[MIXED_SECT:[^ ]+]] 90 91 ;; TMB: Symbol { 92 ;; TMB: Name: $t 93 ;; TMB-NEXT: Value: 0x0 94 ;; TMB-NEXT: Size: 0 95 ;; TMB-NEXT: Binding: Local 96 ;; TMB-NEXT: Type: None 97 ;; TMB-NEXT: Other: 98 ;; TMB-NEXT: Section: [[MIXED_SECT]] 99 100 ;; TMB: Symbol { 101 ;; TMB: Name: $t 102 ;; TMB-NEXT: Value: 0x{{[0-9A-F]+}} 103 ;; TMB-NEXT: Size: 0 104 ;; TMB-NEXT: Binding: Local 105 ;; TMB-NEXT: Type: None 106 ;; TMB-NEXT: Other: 107 ;; TMB-NEXT: Section: [[MIXED_SECT]] 108 109 110 ;; TMB-NOT: ${{[atd]}} 111 112