1
0
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:
Rafael Espindola 2017-06-28 17:56:07 +00:00
parent 4e9170ce41
commit cd6839055b
2 changed files with 13 additions and 1 deletions

View File

@ -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;
}

View 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