brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 9054735 Raw
38 lines · plain
1# REQUIRES: mips2 3# Check handling of microMIPS R6 relocations.4 5# RUN: echo "SECTIONS { \6# RUN:         . = 0x20000;  .text ALIGN(0x100) : { *(.text) } \7# RUN:       }" > %t.script8 9# RUN: llvm-mc -filetype=obj -triple=mips -mcpu=mips32r6 \10# RUN:         %S/Inputs/mips-micro.s -o %t1eb.o11# RUN: llvm-mc -filetype=obj -triple=mips -mcpu=mips32r6 %s -o %t2eb.o12# RUN: ld.lld -o %teb.exe -script %t.script %t1eb.o %t2eb.o13# RUN: llvm-objdump --no-print-imm-hex -d -t --mattr=micromips --no-show-raw-insn %teb.exe \14# RUN:   | FileCheck %s15 16# RUN: llvm-mc -filetype=obj -triple=mipsel -mcpu=mips32r6 \17# RUN:         %S/Inputs/mips-micro.s -o %t1el.o18# RUN: llvm-mc -filetype=obj -triple=mipsel -mcpu=mips32r6 %s -o %t2el.o19# RUN: ld.lld -o %tel.exe -script %t.script %t1el.o %t2el.o20# RUN: llvm-objdump --no-print-imm-hex -d -t --mattr=micromips --no-show-raw-insn %tel.exe \21# RUN:   | FileCheck %s22 23# CHECK: 00020100 g F     .text  00000000 0x80 foo24# CHECK: 00020110 g       .text  00000000 0x80 __start25 26# CHECK:      <__start>:27# CHECK-NEXT:    20110:  lapc   $2, -1228# CHECK-NEXT:            beqzc  $3, 0x200f029# CHECK-NEXT:            balc   {{.*}} <foo>30 31  .text32  .set micromips33  .global __start34__start:35  addiupc $2, foo+4   # R_MICROMIPS_PC19_S236  beqzc   $3, foo+4   # R_MICROMIPS_PC21_S137  balc    foo+4       # R_MICROMIPS_PC26_S138