mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-12 05:40:30 +00:00
This reverts commit r238838, r238844 and r238888.
Trying to bring back a windows bot: http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/1224/steps/ninja%20check%202/logs/FAIL%3A%20LLVM%3A%3AELF_O32_PIC_relocations.s git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238903 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a0bcb4184b
commit
60e0898710
@ -480,7 +480,7 @@ void RuntimeDyldELF::resolveMIPSRelocation(const SectionEntry &Section,
|
|||||||
uint32_t *TargetPtr = (uint32_t *)(Section.Address + Offset);
|
uint32_t *TargetPtr = (uint32_t *)(Section.Address + Offset);
|
||||||
Value += Addend;
|
Value += Addend;
|
||||||
|
|
||||||
DEBUG(dbgs() << "resolveMIPSRelocation, LocalAddress: "
|
DEBUG(dbgs() << "resolveMipselocation, LocalAddress: "
|
||||||
<< Section.Address + Offset << " FinalAddress: "
|
<< Section.Address + Offset << " FinalAddress: "
|
||||||
<< format("%p", Section.LoadAddress + Offset) << " Value: "
|
<< format("%p", Section.LoadAddress + Offset) << " Value: "
|
||||||
<< format("%x", Value) << " Type: " << format("%x", Type)
|
<< format("%x", Value) << " Type: " << format("%x", Type)
|
||||||
@ -504,10 +504,6 @@ void RuntimeDyldELF::resolveMIPSRelocation(const SectionEntry &Section,
|
|||||||
case ELF::R_MIPS_LO16:
|
case ELF::R_MIPS_LO16:
|
||||||
*TargetPtr = ((*TargetPtr) & 0xffff0000) | (Value & 0xffff);
|
*TargetPtr = ((*TargetPtr) & 0xffff0000) | (Value & 0xffff);
|
||||||
break;
|
break;
|
||||||
case ELF::R_MIPS_PC32:
|
|
||||||
uint32_t FinalAddress = (Section.LoadAddress + Offset);
|
|
||||||
writeBytesUnaligned(Value + Addend - FinalAddress, (uint8_t *)TargetPtr, 4);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
# RUN: llvm-mc -triple=mipsel-unknown-linux -relocation-model=pic -code-model=small -filetype=obj -o %T/test_ELF_O32.o %s
|
|
||||||
# RUN: llc -mtriple=mipsel-unknown-linux -relocation-model=pic -filetype=obj -o %T/test_ELF_ExternalFunction_O32.o %S/Inputs/ExternalFunction.ll
|
|
||||||
# RUN: llvm-rtdyld -triple=mipsel-unknown-linux -verify -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.o
|
|
||||||
# There are endian awareness bugs in the O32 support.
|
|
||||||
# XFAIL: mips-
|
|
||||||
|
|
||||||
.data
|
|
||||||
# rtdyld-check: *{4}R_MIPS_32 = foo
|
|
||||||
R_MIPS_32:
|
|
||||||
.word foo
|
|
||||||
# rtdyld-check: *{4}(R_MIPS_32+4) = foo
|
|
||||||
.4byte foo
|
|
||||||
# rtdyld-check: *{4}(R_MIPS_PC32) = foo - R_MIPS_PC32
|
|
||||||
R_MIPS_PC32:
|
|
||||||
.word foo-.
|
|
||||||
# rtdyld-check: *{4}(R_MIPS_PC32 + 4) = foo - tmp1
|
|
||||||
tmp1:
|
|
||||||
.4byte foo-tmp1
|
|
||||||
|
|
||||||
.text
|
|
||||||
.abicalls
|
|
||||||
.nan legacy
|
|
||||||
.text
|
|
||||||
.set nomicromips
|
|
||||||
.set nomips16
|
|
||||||
.set noreorder
|
|
||||||
.set nomacro
|
|
||||||
.set noat
|
|
||||||
|
|
||||||
.align 3
|
|
||||||
.globl bar
|
|
||||||
.type bar,@function
|
|
||||||
bar:
|
|
||||||
# rtdyld-check: decode_operand(R_MIPS_26, 0)[27:0] = stub_addr(test_ELF_O32.o, .text, foo)[27:0]
|
|
||||||
# rtdyld-check: decode_operand(R_MIPS_26, 0)[1:0] = 0
|
|
||||||
R_MIPS_26:
|
|
||||||
j foo
|
|
||||||
nop
|
|
||||||
|
|
||||||
# rtdyld-check: decode_operand(R_MIPS_HI16, 1)[15:0] = foo[31:16]
|
|
||||||
R_MIPS_HI16:
|
|
||||||
lui $1, %hi(foo)
|
|
||||||
|
|
||||||
# rtdyld-check: decode_operand(R_MIPS_LO16, 1)[15:0] = foo[15:0]
|
|
||||||
R_MIPS_LO16:
|
|
||||||
lui $1, %lo(foo)
|
|
||||||
|
|
||||||
.size bar, .-bar
|
|
Loading…
x
Reference in New Issue
Block a user