66 lines · plain
1# RUN: rm -rf %t && mkdir -p %t2# RUN: llvm-mc -triple=mipsel-unknown-linux -filetype=obj -o %t/test_ELF_O32.o %s3# RUN: llc -mtriple=mipsel-unknown-linux -filetype=obj -o %t/test_ELF_ExternalFunction_O32.o %S/Inputs/ExternalFunction.ll4# RUN: llvm-rtdyld -triple=mipsel-unknown-linux -verify -map-section test_ELF_O32.o,"<common symbols>"=0x7FF8 -map-section test_ELF_O32.o,.text=0x1000 -map-section test_ELF_ExternalFunction_O32.o,.text=0x10000 -check=%s %t/test_ELF_O32.o %t/test_ELF_ExternalFunction_O32.o5 6# RUN: llvm-mc -triple=mips-unknown-linux -filetype=obj -o %t/test_ELF_O32.o %s7# RUN: llc -mtriple=mips-unknown-linux -filetype=obj -o %t/test_ELF_ExternalFunction_O32.o %S/Inputs/ExternalFunction.ll8# RUN: llvm-rtdyld -triple=mips-unknown-linux -verify -map-section test_ELF_O32.o,"<common symbols>"=0x7FF8 -map-section test_ELF_O32.o,.text=0x1000 -map-section test_ELF_ExternalFunction_O32.o,.text=0x10000 -check=%s %t/test_ELF_O32.o %t/test_ELF_ExternalFunction_O32.o9 10 .data11# rtdyld-check: *{4}R_MIPS_32 = foo[31:0]12R_MIPS_32:13 .word foo14# rtdyld-check: *{4}(R_MIPS_32+4) = foo[31:0]15 .4byte foo16# rtdyld-check: *{4}(R_MIPS_PC32) = (foo - R_MIPS_PC32)[31:0]17R_MIPS_PC32:18 .word foo-.19# rtdyld-check: *{4}(R_MIPS_PC32 + 4) = (foo - tmp1)[31:0]20tmp1:21 .4byte foo-tmp122 23 .text24 .abicalls25 .nan legacy26 .text27 .set nomicromips28 .set nomips1629 .set noreorder30 .set nomacro31 .set noat32 33 .align 334 .globl bar35 .type bar,@function36bar:37# rtdyld-check: decode_operand(R_MIPS_26, 0)[27:0] = stub_addr(test_ELF_O32.o/.text, foo)[27:0]38# rtdyld-check: decode_operand(R_MIPS_26, 0)[1:0] = 039R_MIPS_26:40 j foo41 nop42 43# rtdyld-check: decode_operand(R_MIPS_PC16, 1)[17:0] = (foo - R_MIPS_PC16)[17:0]44R_MIPS_PC16:45 bal foo46 nop47 48# rtdyld-check: decode_operand(R_MIPS_HI16, 1)[15:0] = foo[31:16]49R_MIPS_HI16:50 lui $1, %hi(foo)51 52# rtdyld-check: decode_operand(R_MIPS_LO16, 1)[15:0] = foo[15:0]53R_MIPS_LO16:54 lui $1, %lo(foo)55 56# rtdyld-check: decode_operand(R_MIPS_HI16_ADDEND, 1)[15:0] = (var+0x8008)[31:16]57R_MIPS_HI16_ADDEND:58 lui $2, %hi(var+8)59 60# rtdyld-check: decode_operand(R_MIPS_LO16_ADDEND, 2)[15:0] = (var+0x8)[15:0]61R_MIPS_LO16_ADDEND:62 lb $2, %lo(var+8)($2)63 64 .size bar, .-bar65 .comm var,9,166