2015-04-24 00:45:24 +08:00
|
|
|
;; RUN: llc -verify-machineinstrs \
|
2013-05-15 00:26:38 +08:00
|
|
|
;; RUN: -mtriple=armv7-linux-gnueabi -filetype=obj %s -o - | \
|
2013-04-12 12:06:46 +08:00
|
|
|
;; RUN: llvm-readobj -t | FileCheck -check-prefix=ARM %s
|
2012-12-08 00:50:23 +08:00
|
|
|
|
2015-04-24 00:45:24 +08:00
|
|
|
;; RUN: llc -verify-machineinstrs \
|
2013-05-15 00:26:38 +08:00
|
|
|
;; RUN: -mtriple=thumbv7-linux-gnueabi -filetype=obj %s -o - | \
|
2013-04-12 12:06:46 +08:00
|
|
|
;; RUN: llvm-readobj -t | FileCheck -check-prefix=TMB %s
|
2012-12-08 00:50:23 +08:00
|
|
|
|
|
|
|
;; Ensure that if a jump table is generated that it has Mapping Symbols
|
|
|
|
;; marking the data-in-code region.
|
|
|
|
|
|
|
|
define void @foo(i32* %ptr) nounwind ssp {
|
2015-02-28 05:17:42 +08:00
|
|
|
%tmp = load i32, i32* %ptr, align 4
|
2015-04-24 00:45:24 +08:00
|
|
|
switch i32 %tmp, label %exit [
|
|
|
|
i32 0, label %bb0
|
|
|
|
i32 1, label %bb1
|
|
|
|
i32 2, label %bb2
|
|
|
|
i32 3, label %bb3
|
2012-12-08 00:50:23 +08:00
|
|
|
]
|
|
|
|
bb0:
|
2015-04-24 00:45:24 +08:00
|
|
|
store i32 0, i32* %ptr, align 4
|
2012-12-08 00:50:23 +08:00
|
|
|
br label %exit
|
|
|
|
bb1:
|
2015-04-24 00:45:24 +08:00
|
|
|
store i32 1, i32* %ptr, align 4
|
2012-12-08 00:50:23 +08:00
|
|
|
br label %exit
|
|
|
|
bb2:
|
2015-04-24 00:45:24 +08:00
|
|
|
store i32 2, i32* %ptr, align 4
|
2012-12-08 00:50:23 +08:00
|
|
|
br label %exit
|
|
|
|
bb3:
|
2015-04-24 00:45:24 +08:00
|
|
|
store i32 3, i32* %ptr, align 4
|
2012-12-08 00:50:23 +08:00
|
|
|
br label %exit
|
|
|
|
exit:
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2013-04-12 12:06:46 +08:00
|
|
|
;; ARM: Symbol {
|
|
|
|
;; ARM: Name: $a
|
|
|
|
;; ARM-NEXT: Value: 0x0
|
|
|
|
;; ARM-NEXT: Size: 0
|
|
|
|
;; ARM-NEXT: Binding: Local
|
|
|
|
;; ARM-NEXT: Type: None
|
|
|
|
;; ARM-NEXT: Other:
|
|
|
|
;; ARM-NEXT: Section: [[MIXED_SECT:[^ ]+]]
|
|
|
|
|
|
|
|
;; ARM: Symbol {
|
|
|
|
;; ARM: Name: $a
|
2013-05-15 00:26:38 +08:00
|
|
|
;; ARM-NEXT: Value: 0x{{[0-9A-F]+}}
|
2013-04-12 12:06:46 +08:00
|
|
|
;; ARM-NEXT: Size: 0
|
|
|
|
;; ARM-NEXT: Binding: Local
|
|
|
|
;; ARM-NEXT: Type: None
|
|
|
|
;; ARM-NEXT: Other:
|
|
|
|
;; ARM-NEXT: Section: [[MIXED_SECT]]
|
|
|
|
|
2015-11-29 01:23:46 +08:00
|
|
|
;; ARM: Symbol {
|
|
|
|
;; ARM: Name: $d
|
|
|
|
;; ARM-NEXT: Value: 0
|
|
|
|
;; ARM-NEXT: Size: 0
|
|
|
|
;; ARM-NEXT: Binding: Local
|
|
|
|
;; ARM-NEXT: Type: None
|
|
|
|
|
2013-04-12 12:06:46 +08:00
|
|
|
;; ARM: Symbol {
|
|
|
|
;; ARM: Name: $d
|
2013-05-15 00:26:38 +08:00
|
|
|
;; ARM-NEXT: Value: 0x{{[0-9A-F]+}}
|
2013-04-12 12:06:46 +08:00
|
|
|
;; ARM-NEXT: Size: 0
|
|
|
|
;; ARM-NEXT: Binding: Local
|
|
|
|
;; ARM-NEXT: Type: None
|
|
|
|
;; ARM-NEXT: Other:
|
|
|
|
;; ARM-NEXT: Section: [[MIXED_SECT]]
|
2012-12-08 00:50:23 +08:00
|
|
|
|
2014-02-08 04:12:49 +08:00
|
|
|
;; ARM: Symbol {
|
|
|
|
;; ARM: Name: $d
|
|
|
|
;; ARM-NEXT: Value: 0x0
|
|
|
|
;; ARM-NEXT: Size: 0
|
|
|
|
;; ARM-NEXT: Binding: Local (0x0)
|
|
|
|
;; ARM-NEXT: Type: None (0x0)
|
|
|
|
;; ARM-NEXT: Other: 0
|
|
|
|
;; ARM-NEXT: Section: .ARM.exidx
|
|
|
|
;; ARM-NEXT: }
|
|
|
|
|
2012-12-08 00:50:23 +08:00
|
|
|
;; ARM-NOT: ${{[atd]}}
|
|
|
|
|
2013-04-12 12:06:46 +08:00
|
|
|
;; TMB: Symbol {
|
2015-11-29 01:23:46 +08:00
|
|
|
;; TMB: Name: $d.2
|
2013-05-15 00:26:38 +08:00
|
|
|
;; TMB-NEXT: Value: 0x{{[0-9A-F]+}}
|
2013-04-12 12:06:46 +08:00
|
|
|
;; TMB-NEXT: Size: 0
|
|
|
|
;; TMB-NEXT: Binding: Local
|
|
|
|
;; TMB-NEXT: Type: None
|
|
|
|
;; TMB-NEXT: Other:
|
|
|
|
;; TMB-NEXT: Section: [[MIXED_SECT:[^ ]+]]
|
|
|
|
|
|
|
|
;; TMB: Symbol {
|
|
|
|
;; TMB: Name: $t
|
|
|
|
;; TMB-NEXT: Value: 0x0
|
|
|
|
;; TMB-NEXT: Size: 0
|
|
|
|
;; TMB-NEXT: Binding: Local
|
|
|
|
;; TMB-NEXT: Type: None
|
|
|
|
;; TMB-NEXT: Other:
|
|
|
|
;; TMB-NEXT: Section: [[MIXED_SECT]]
|
|
|
|
|
|
|
|
;; TMB: Symbol {
|
|
|
|
;; TMB: Name: $t
|
2013-05-15 00:26:38 +08:00
|
|
|
;; TMB-NEXT: Value: 0x{{[0-9A-F]+}}
|
2013-04-12 12:06:46 +08:00
|
|
|
;; TMB-NEXT: Size: 0
|
|
|
|
;; TMB-NEXT: Binding: Local
|
|
|
|
;; TMB-NEXT: Type: None
|
|
|
|
;; TMB-NEXT: Other:
|
|
|
|
;; TMB-NEXT: Section: [[MIXED_SECT]]
|
2012-12-08 00:50:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
;; TMB-NOT: ${{[atd]}}
|
|
|
|
|