We were failing to convert this expression to pcrel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306573
91177308-0d34-0410-b5e6-
96231b3b80d8
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;
}
--- /dev/null
+// 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