[llvm] r218437 - MC: Use @IMGREL instead of @IMGREL32, which we can't parse
Reid Kleckner
reid at kleckner.net
Wed Sep 24 19:09:18 PDT 2014
Author: rnk
Date: Wed Sep 24 21:09:18 2014
New Revision: 218437
URL: http://llvm.org/viewvc/llvm-project?rev=218437&view=rev
Log:
MC: Use @IMGREL instead of @IMGREL32, which we can't parse
Nico Rieck added support for this 32-bit COFF relocation some time ago
for Win64 stuff. It appears that as an oversight, the assembly output
used "foo"@IMGREL32 instead of "foo"@IMGREL, which is what we can parse.
Sadly, there were actually tests that took in IMGREL and put out
IMGREL32, and we didn't notice the inconsistency. Oh well. Now LLVM can
assemble it's own output with slightly more fidelity.
Modified:
llvm/trunk/lib/MC/MCExpr.cpp
llvm/trunk/test/MC/COFF/ir-to-imgrel.ll
llvm/trunk/test/MC/X86/intel-syntax.s
Modified: llvm/trunk/lib/MC/MCExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCExpr.cpp?rev=218437&r1=218436&r2=218437&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCExpr.cpp (original)
+++ llvm/trunk/lib/MC/MCExpr.cpp Wed Sep 24 21:09:18 2014
@@ -273,7 +273,7 @@ StringRef MCSymbolRefExpr::getVariantKin
case VK_Mips_CALL_LO16: return "CALL_LO16";
case VK_Mips_PCREL_HI16: return "PCREL_HI16";
case VK_Mips_PCREL_LO16: return "PCREL_LO16";
- case VK_COFF_IMGREL32: return "IMGREL32";
+ case VK_COFF_IMGREL32: return "IMGREL";
}
llvm_unreachable("Invalid variant kind");
}
Modified: llvm/trunk/test/MC/COFF/ir-to-imgrel.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/COFF/ir-to-imgrel.ll?rev=218437&r1=218436&r2=218437&view=diff
==============================================================================
--- llvm/trunk/test/MC/COFF/ir-to-imgrel.ll (original)
+++ llvm/trunk/test/MC/COFF/ir-to-imgrel.ll Wed Sep 24 21:09:18 2014
@@ -2,5 +2,5 @@
@__ImageBase = external global i8
-; X64: .quad "?x@@3HA"@IMGREL32
+; X64: .quad "?x@@3HA"@IMGREL
@"\01?x@@3HA" = global i64 sub nsw (i64 ptrtoint (i64* @"\01?x@@3HA" to i64), i64 ptrtoint (i8* @__ImageBase to i64)), align 8
Modified: llvm/trunk/test/MC/X86/intel-syntax.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/X86/intel-syntax.s?rev=218437&r1=218436&r2=218437&view=diff
==============================================================================
--- llvm/trunk/test/MC/X86/intel-syntax.s (original)
+++ llvm/trunk/test/MC/X86/intel-syntax.s Wed Sep 24 21:09:18 2014
@@ -606,7 +606,7 @@ mov rcx, qword ptr [_g0 + 8]
fadd dword ptr "?half@?0??bar@@YAXXZ at 4NA"
fadd dword ptr "?half@?0??bar@@YAXXZ at 4NA"@IMGREL
// CHECK: fadds "?half@?0??bar@@YAXXZ at 4NA"
-// CHECK: fadds "?half@?0??bar@@YAXXZ at 4NA"@IMGREL32
+// CHECK: fadds "?half@?0??bar@@YAXXZ at 4NA"@IMGREL
inc qword ptr [rax]
inc dword ptr [rax]
More information about the llvm-commits
mailing list