xref: /llvm-project/llvm/test/CodeGen/ARM/interwork.ll (revision bb6984d4019fe530663f93bcd813deb9b7c1b072)
1*bb6984d4SPablo Barrio; One file may have multiple functions targeted at different (ARM, Thumb)
2*bb6984d4SPablo Barrio; instruction sets. Passing this information to the linker and the assembler
3*bb6984d4SPablo Barrio; is done through the ".code 16" and ".code 32" directives.
4*bb6984d4SPablo Barrio;
5*bb6984d4SPablo Barrio; RUN: llc -mtriple=arm-arm-none-eabi %s -o - | FileCheck %s
6*bb6984d4SPablo Barrio
7*bb6984d4SPablo Barriodefine void @ft() #0 {
8*bb6984d4SPablo Barrio; CHECK: .code 16
9*bb6984d4SPablo Barrio; CHECK: .thumb_func
10*bb6984d4SPablo Barrio; CHECK-LABEL: ft:
11*bb6984d4SPablo Barrioentry:
12*bb6984d4SPablo Barrio  ret void
13*bb6984d4SPablo Barrio}
14*bb6984d4SPablo Barrio
15*bb6984d4SPablo Barriodefine void @fz() #1 {
16*bb6984d4SPablo Barrio; CHECK: .code 32
17*bb6984d4SPablo Barrio; CHECK-LABEL: fz:
18*bb6984d4SPablo Barrioentry:
19*bb6984d4SPablo Barrio  ret void
20*bb6984d4SPablo Barrio}
21*bb6984d4SPablo Barrio
22*bb6984d4SPablo Barrioattributes #0 = { "target-features"="+thumb-mode" }
23*bb6984d4SPablo Barrioattributes #1 = { "target-features"="-thumb-mode" }
24