55 lines · plain
1# REQUIRES: mips2# Check various cases of microMIPS - regular code cross-calls.3 4# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \5# RUN: -mattr=micromips %s -o %t-eb.o6# 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.o9# RUN: ld.lld -o %t-eb.exe %t-eb.o %t-eb-pic.o10# 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 %s13# 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 %s16 17# REG: {{0*}}[[FOOT:[0-9a-f]+]] l F .text 0000000e 0x80 __microLA25Thunk_foo18# REG: {{0*}}[[MIC:[0-9a-f]+]] g .text 00000000 0x80 micro19# REG: {{0*}}[[BAR:[0-9a-f]+]] g F .text 00000000 bar20 21# REG: <__start>:22# REG-NEXT: jalx 0x[[MIC]] <micro>23# REG-NEXT: nop24# REG-NEXT: jalx 0x[[FOOT]] <__microLA25Thunk_foo>25 26# REG: <__LA25Thunk_bar>:27# REG-NEXT: lui $25, 0x228# REG-NEXT: j 0x[[BAR]] <bar>29 30# MICRO: {{0*}}[[BART:[0-9a-f]+]] l F .text 00000010 __LA25Thunk_bar31# MICRO: {{0*}}[[START:[0-9a-f]+]] g .text 00000000 __start32# MICRO: {{0*}}[[FOO:[0-9a-f]+]] g F .text 00000000 0x80 foo33 34# MICRO: <micro>:35# MICRO-NEXT: jalx 0x[[START]]36# MICRO-NEXT: nop37# MICRO-NEXT: jalx 0x[[BART]]38 39# MICRO: <__microLA25Thunk_foo>:40# MICRO-NEXT: lui $25, 0x241# MICRO-NEXT: j 0x[[FOO]] <foo>42 43 .text44 .set nomicromips45 .global __start46__start:47 jal micro48 jal foo49 50 .set micromips51 .global micro52micro:53 jal __start54 jal bar55