[LLVMdev] ARM/MC/ELF Support for pcrel movw/movt coming soon

Jason Kim jasonwkim at google.com
Mon Jan 10 15:54:26 PST 2011


-llvmcommits

On Mon, Jan 10, 2011 at 3:21 PM, Renato Golin <renato.golin at arm.com> wrote:
> Btw, I know this is for ELF printing, but can the same infrastructure
> you're using to print the hi/lo be used to print relocation in Asm
> output? Or is this a completely separate subject?

Hi Renato,
If I am understanding you correctly, then the answer is no, because .s
output doesn't care about relocations per se... BUT..
its also yes because sometimes, the asmwriter will sometimes need to
generate sequences like below

foo:
   movw r0, :lower16:bar-foo
   movt r0, :upper16:bar-foo

The subtraction implies that the value bar-foo is implicitly
pc-relative (at least according to GNU as).

Thanks!

-jason



More information about the llvm-dev mailing list