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