mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Fix PR33625.
We were failing to convert this expression to pcrel. llvm-svn: 306573
This commit is contained in:
parent
4e9170ce41
commit
cd6839055b
@ -44,7 +44,7 @@ unsigned X86WinCOFFObjectWriter::getRelocType(MCContext &Ctx,
|
||||
const MCAsmBackend &MAB) const {
|
||||
unsigned FixupKind = Fixup.getKind();
|
||||
if (IsCrossSection) {
|
||||
if (FixupKind != FK_Data_4) {
|
||||
if (FixupKind != FK_Data_4 && FixupKind != llvm::X86::reloc_signed_4byte) {
|
||||
Ctx.reportError(Fixup.getLoc(), "Cannot represent this expression");
|
||||
return COFF::IMAGE_REL_AMD64_ADDR32;
|
||||
}
|
||||
|
12
test/MC/X86/signed-coff-pcrel.s
Normal file
12
test/MC/X86/signed-coff-pcrel.s
Normal file
@ -0,0 +1,12 @@
|
||||
// RUN: llvm-mc -triple i686-unknown-windows-msvc -filetype obj -o %t.o %s
|
||||
// RUN: llvm-objdump -r %t.o | FileCheck %s
|
||||
|
||||
// CHECK: 00000004 IMAGE_REL_I386_REL32 twop32
|
||||
|
||||
.section .rdata,"rd"
|
||||
twop32:
|
||||
.quad 0x41f0000000000000
|
||||
|
||||
.text
|
||||
0:
|
||||
mulsd twop32-0b(%eax), %xmm1
|
Loading…
x
Reference in New Issue
Block a user