[llvm-commits] CVS: llvm/lib/Target/X86/X86Subtarget.cpp X86Subtarget.h X86TargetMachine.cpp

Evan Cheng evan.cheng at apple.com
Wed Dec 20 09:36:27 PST 2006


I took a look at mingw related code. It seems to me for mingw that  
you can set relocation type to pic for llc and static for jit. No?  
Then GVRequiresExtraLoad can just check relocation type?

Also GVRequiresExtraLoad now violates 80-col policy and its style is  
inconsistent with the rest of the llvm code. Please fix it.

bool foo()
{
}

vs.

bool foo() {
}

Thanks,

Evan

On Dec 20, 2006, at 2:31 AM, Anton Korobeynikov wrote:

> Hello, Chris.
>
>> PPC64 has a similar problem.  It wants to do codegen in PIC mode, but
>> it doesn't want the JIT to make dyld stubs.  As such, it does 'JIT
>> PIC' mode, which is like PIC but doesn't do the extra load to go
>> through dyld stubs.
>
> Yes, It's quite the same. At codegen level we know only addres of  
> import
> table entry, which will be filled by system loader with correct  
> address
> of symbol. Thus, we need to perform extra load in order to get this
> address runtime.
> When we get address of symbol during JIT via libSystem we know *exact*
> address, so, we don't need any extra load. So, in general, dllimported
> GVs are just ordinary externals in JIT mode.
>
> -- 
> With best regards, Anton Korobeynikov.
>
> Faculty of Mathematics & Mechanics, Saint Petersburg State University.
>
>




More information about the llvm-commits mailing list