[llvm-commits] [llvm] r165989 - in /llvm/trunk: lib/Target/X86/X86ISelDAGToDAG.cpp lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h lib/Target/X86/X86InstrCompiler.td lib/Target/X86/X86InstrInfo.td lib/Target/X86/X86RegisterInf

Michael Liao michael.liao at intel.com
Tue Oct 16 19:26:45 PDT 2012


This's fixed in r166084. I verified locally with X86/X64 static/PIC
modes. Without a Mac, I only checked the code generated for Mac but
cannot verify its execution. Please help me to see whether it works for
you.

Thanks
- Michael

On Tue, 2012-10-16 at 13:58 -0700, Michael Liao wrote:
> On Tue, 2012-10-16 at 13:46 -0700, Eli Friedman wrote:
> > On Mon, Oct 15, 2012 at 3:39 PM, Michael Liao <michael.liao at intel.com> wrote:
> > > Author: hliao
> > > Date: Mon Oct 15 17:39:43 2012
> > > New Revision: 165989
> > >
> > > URL: http://llvm.org/viewvc/llvm-project?rev=165989&view=rev
> > > Log:
> > > Add __builtin_setjmp/_longjmp supprt in X86 backend
> > >
> > > - Besides used in SjLj exception handling, __builtin_setjmp/__longjmp is also
> > >   used as a light-weight replacement of setjmp/longjmp which are used to
> > >   implementation continuation, user-level threading, and etc. The support added
> > >   in this patch ONLY addresses this usage and is NOT intended to support SjLj
> > >   exception handling as zero-cost DWARF exception handling is used by default
> > >   in X86.
> > 
> > The implementation of __builtin_setjmp causes a link error on x86-64
> > OSX.  Specifically, you can't take the address of a label in the way
> > you're doing it (generating an instruction like "movq	$LBB1_12,
> > 8(%rsi)"); the right way to take the address of a label is using
> > RIP-relative addressing.
> 
> It depends on the relocation mode used. For small static code model,
> 'movq' is good enough without adding register pressure. I will fix it
> for other models. Thanks for pointing this out.
> 
> Yours
> - Michael
> 
> > 
> > -Eli
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list