[llvm-commits] [llvm] r107826 - in /llvm/trunk/lib: MC/MachObjectWriter.cpp Target/X86/X86MCCodeEmitter.cpp
Chris Lattner
sabre at nondot.org
Wed Jul 7 15:35:14 PDT 2010
Author: lattner
Date: Wed Jul 7 17:35:13 2010
New Revision: 107826
URL: http://llvm.org/viewvc/llvm-project?rev=107826&view=rev
Log:
finish up support for callw: PR7195
Modified:
llvm/trunk/lib/MC/MachObjectWriter.cpp
llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp
Modified: llvm/trunk/lib/MC/MachObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MachObjectWriter.cpp?rev=107826&r1=107825&r2=107826&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MachObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/MachObjectWriter.cpp Wed Jul 7 17:35:13 2010
@@ -33,6 +33,7 @@
default: llvm_unreachable("invalid fixup kind!");
case X86::reloc_pcrel_1byte:
case FK_Data_1: return 0;
+ case X86::reloc_pcrel_2byte:
case FK_Data_2: return 1;
case X86::reloc_pcrel_4byte:
case X86::reloc_riprel_4byte:
@@ -47,6 +48,7 @@
default:
return false;
case X86::reloc_pcrel_1byte:
+ case X86::reloc_pcrel_2byte:
case X86::reloc_pcrel_4byte:
case X86::reloc_riprel_4byte:
case X86::reloc_riprel_4byte_movq_load:
Modified: llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp?rev=107826&r1=107825&r2=107826&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86MCCodeEmitter.cpp Wed Jul 7 17:35:13 2010
@@ -201,7 +201,7 @@
FixupKind == MCFixupKind(X86::reloc_riprel_4byte_movq_load))
ImmOffset -= 4;
if (FixupKind == MCFixupKind(X86::reloc_pcrel_2byte))
- ImmOffset -= 4;// FIXME: This should be 2, but 'as' produces an offset of 4.
+ ImmOffset -= 2;
if (FixupKind == MCFixupKind(X86::reloc_pcrel_1byte))
ImmOffset -= 1;
More information about the llvm-commits
mailing list