1# REQUIRES: mips 2 3# Check handling of microMIPS R6 relocations. 4 5# RUN: echo "SECTIONS { \ 6# RUN: . = 0x20000; .text ALIGN(0x100) : { *(.text) } \ 7# RUN: }" > %t.script 8 9# RUN: llvm-mc -filetype=obj -triple=mips -mcpu=mips32r6 \ 10# RUN: %S/Inputs/mips-micro.s -o %t1eb.o 11# RUN: llvm-mc -filetype=obj -triple=mips -mcpu=mips32r6 %s -o %t2eb.o 12# RUN: ld.lld -o %teb.exe -script %t.script %t1eb.o %t2eb.o 13# RUN: llvm-objdump -d -t --mattr=micromips --no-show-raw-insn %teb.exe \ 14# RUN: | FileCheck %s 15 16# RUN: llvm-mc -filetype=obj -triple=mipsel -mcpu=mips32r6 \ 17# RUN: %S/Inputs/mips-micro.s -o %t1el.o 18# RUN: llvm-mc -filetype=obj -triple=mipsel -mcpu=mips32r6 %s -o %t2el.o 19# RUN: ld.lld -o %tel.exe -script %t.script %t1el.o %t2el.o 20# RUN: llvm-objdump -d -t --mattr=micromips --no-show-raw-insn %tel.exe \ 21# RUN: | FileCheck %s 22 23# CHECK: 00020100 g F .text 00000000 0x80 foo 24# CHECK: 00020110 g .text 00000000 0x80 __start 25 26# CHECK: <__start>: 27# CHECK-NEXT: 20110: lapc $2, -12 28# CHECK-NEXT: beqzc $3, -36 29# CHECK-NEXT: balc -24 <foo> 30 31 .text 32 .set micromips 33 .global __start 34__start: 35 addiupc $2, foo+4 # R_MICROMIPS_PC19_S2 36 beqzc $3, foo+4 # R_MICROMIPS_PC21_S1 37 balc foo+4 # R_MICROMIPS_PC26_S1 38