From f6448f57e6047dd61b3cded43c531416189c0c80 Mon Sep 17 00:00:00 2001 From: Bruno Cardoso Lopes Date: Sat, 8 Aug 2009 17:47:41 +0000 Subject: [PATCH] Use reloc_absolute_word_sext relocation for X86::MOV64(ri/mi)32 instructions, since they are in 64 bit mode with i64immSExt32 imms. JIT is not affected since it handles both word absolute relocations in the same way llvm-svn: 78479 --- llvm/lib/Target/X86/X86CodeEmitter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Target/X86/X86CodeEmitter.cpp b/llvm/lib/Target/X86/X86CodeEmitter.cpp index 8b60b86a561f..03d871a67db2 100644 --- a/llvm/lib/Target/X86/X86CodeEmitter.cpp +++ b/llvm/lib/Target/X86/X86CodeEmitter.cpp @@ -763,7 +763,7 @@ void Emitter::emitInstruction( unsigned rt = Is64BitMode ? X86::reloc_pcrel_word : (IsPIC ? X86::reloc_picrel_word : X86::reloc_absolute_word); if (Opcode == X86::MOV64ri32) - rt = X86::reloc_absolute_word; // FIXME: add X86II flag? + rt = X86::reloc_absolute_word_sext; // FIXME: add X86II flag? if (MO1.isGlobal()) { bool NeedStub = isa(MO1.getGlobal()); bool Indirect = gvNeedsNonLazyPtr(MO1, TM); @@ -802,7 +802,7 @@ void Emitter::emitInstruction( unsigned rt = Is64BitMode ? X86::reloc_pcrel_word : (IsPIC ? X86::reloc_picrel_word : X86::reloc_absolute_word); if (Opcode == X86::MOV64mi32) - rt = X86::reloc_absolute_word; // FIXME: add X86II flag? + rt = X86::reloc_absolute_word_sext; // FIXME: add X86II flag? if (MO.isGlobal()) { bool NeedStub = isa(MO.getGlobal()); bool Indirect = gvNeedsNonLazyPtr(MO, TM);