[llvm-commits] [llvm] r80728 - /llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp
Bruno Cardoso Lopes
bruno.cardoso at gmail.com
Tue Sep 1 15:56:12 PDT 2009
Hi Daniel,
On Tue, Sep 1, 2009 at 7:07 PM, Daniel Dunbar<daniel at zuster.org> wrote:
> Author: ddunbar
> Date: Tue Sep 1 17:07:00 2009
> New Revision: 80728
>
> URL: http://llvm.org/viewvc/llvm-project?rev=80728&view=rev
> Log:
> Fix what I believe is a copy-n-pasto introduced in r78129.
> - Bruno, please check!!
>
> Modified:
> llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp
>
> Modified: llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp?rev=80728&r1=80727&r2=80728&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp (original)
> +++ llvm/trunk/lib/Target/X86/X86CodeEmitter.cpp Tue Sep 1 17:07:00 2009
> @@ -340,18 +340,18 @@
> } else if (RelocOp->isSymbol()) {
> unsigned rt = Is64BitMode ?
> (IsPCRel ? X86::reloc_pcrel_word : X86::reloc_absolute_word_sext)
> - : (IsPCRel ? X86::reloc_picrel_word : X86::reloc_absolute_word);
> + : (IsPIC ? X86::reloc_picrel_word : X86::reloc_absolute_word);
It's not a copy-n-pasto. The old behavior in r78129 was:
unsigned rt = Is64BitMode ? X86::reloc_pcrel_word : X86::reloc_picrel_word;
That is, to use reloc_picrel_word for "!Is64BitMode" even if we're not
in PIC mode.
> emitExternalSymbolAddress(RelocOp->getSymbolName(), rt);
> } else if (RelocOp->isCPI()) {
> unsigned rt = Is64BitMode ?
> (IsPCRel ? X86::reloc_pcrel_word : X86::reloc_absolute_word_sext)
> - : (IsPCRel ? X86::reloc_picrel_word : X86::reloc_absolute_word);
> + : (IsPIC ? X86::reloc_picrel_word : X86::reloc_absolute_word);
> emitConstPoolAddress(RelocOp->getIndex(), rt,
> RelocOp->getOffset(), Adj);
> } else if (RelocOp->isJTI()) {
> unsigned rt = Is64BitMode ?
> (IsPCRel ? X86::reloc_pcrel_word : X86::reloc_absolute_word_sext)
> - : (IsPCRel ? X86::reloc_picrel_word : X86::reloc_absolute_word);
> + : (IsPIC ? X86::reloc_picrel_word : X86::reloc_absolute_word);
> emitJumpTableAddress(RelocOp->getIndex(), rt, Adj);
> } else {
> llvm_unreachable("Unknown value to relocate!");
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
--
Bruno Cardoso Lopes
http://www.brunocardoso.cc
More information about the llvm-commits
mailing list