2 # Check various cases of microMIPS - regular code cross-calls.
4 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
5 # RUN: -mattr=micromips %s -o %t-eb.o
6 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
7 # RUN: -position-independent -mattr=micromips \
8 # RUN: %S/Inputs/mips-micro.s -o %t-eb-pic.o
9 # RUN: ld.lld -o %t-eb.exe %t-eb.o %t-eb-pic.o
10 # RUN: llvm-objdump -d -t --mattr=-micromips \
11 # RUN: --no-show-raw-insn --print-imm-hex %t-eb.exe \
12 # RUN: | FileCheck --check-prefix=REG %s
13 # RUN: llvm-objdump -d -t --mattr=+micromips \
14 # RUN: --no-show-raw-insn --print-imm-hex %t-eb.exe \
15 # RUN: | FileCheck --check-prefix=MICRO %s
17 # REG: {{0*}}[[FOOT:[0-9a-f]+]] l F .text 0000000e 0x80 __microLA25Thunk_foo
18 # REG: {{0*}}[[MIC:[0-9a-f]+]] g .text 00000000 0x80 micro
19 # REG: {{0*}}[[BAR:[0-9a-f]+]] g F .text 00000000 bar
22 # REG-NEXT: jalx 0x[[MIC]] <micro>
24 # REG-NEXT: jalx 0x[[FOOT]] <__microLA25Thunk_foo>
26 # REG: <__LA25Thunk_bar>:
27 # REG-NEXT: lui $25, 0x2
28 # REG-NEXT: j 0x[[BAR]] <bar>
30 # MICRO: {{0*}}[[BART:[0-9a-f]+]] l F .text 00000010 __LA25Thunk_bar
31 # MICRO: {{0*}}[[START:[0-9a-f]+]] g .text 00000000 __start
32 # MICRO: {{0*}}[[FOO:[0-9a-f]+]] g F .text 00000000 0x80 foo
35 # MICRO-NEXT: jalx 0x[[START]]
37 # MICRO-NEXT: jalx 0x[[BART]]
39 # MICRO: <__microLA25Thunk_foo>:
40 # MICRO-NEXT: lui $25, 0x2
41 # MICRO-NEXT: j 0x[[FOO]] <foo>