• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc <%s -mtriple=arm-unknown-linux-gnueabi -jump-table-type=single | FileCheck --check-prefix=ARM %s
2; RUN: llc <%s -mtriple=thumb-unknown-linux-gnueabi -jump-table-type=single | FileCheck --check-prefix=THUMB %s
3
4define void @indirect_fun() unnamed_addr jumptable {
5  ret void
6}
7define void ()* @get_fun() {
8  ret void ()* @indirect_fun
9
10; ARM:         ldr     r0, [[LABEL:.*]]
11; ARM:         mov     pc, lr
12; ARM: [[LABEL]]:
13; ARM:         .long   __llvm_jump_instr_table_0_1
14
15; THUMB:         ldr     r0, [[LABEL:.*]]
16; THUMB:         bx      lr
17; THUMB: [[LABEL]]:
18; THUMB:         .long   __llvm_jump_instr_table_0_1
19}
20
21; ARM:         .globl  __llvm_jump_instr_table_0_1
22; ARM:         .align  3
23; ARM:         .type   __llvm_jump_instr_table_0_1,%function
24; ARM: __llvm_jump_instr_table_0_1:
25; ARM:         b     indirect_fun(PLT)
26
27; THUMB:         .globl  __llvm_jump_instr_table_0_1
28; THUMB:         .align  3
29; THUMB:         .thumb_func
30; THUMB:         .type   __llvm_jump_instr_table_0_1,%function
31; THUMB: __llvm_jump_instr_table_0_1:
32; THUMB:         b     indirect_fun(PLT)
33