[LLVMdev] non_lazy_ptr question

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Aug 24 00:57:27 PDT 2010


On 24 Aug 2010, at 08:56, Talin wrote:

> However, the code that is being generated looks like this:
>
>        movl    L_gc_safepoint_map$non_lazy_ptr, %eax
>        movl    %eax, (%esp)
>        call    _GC_init
>
> In other words, it's passing the 'non_lazy_ptr' version of the symbol
> directly to GC_init, without dereferencing it.


That the above code does dereference the non-lazy pointer symbol. To  
load the symbol address itself in AT&T syntax, you'd have to prepend a  
$ to the symbol name:

movl    $L_gc_safepoint_map$non_lazy_ptr, %eax


Jonas



More information about the llvm-dev mailing list