Jason Kim
2011-Jan-10 22:59 UTC
[LLVMdev] ARM/MC/ELF Support for pcrel movw/movt coming soon
Hi everyone, happy new year. This note is to announce that support for PC relative reloc tags for movw/movt is nearing completion (hopefully <48hrs!). This work is is from Jan Voung, David Meyer and myself. Unfortunately, to test this change, we need to patch ARM/AsmParser to address http://llvm.org/bugs/show_bug.cgi?id=8721 Locally, we have hacked up a solution to 8721, but its not ideal since VK_ARM_HI16 and VK_ARM_LO16 should apply to any MCExpr, not just MCSymbolRef like it is now. The proper fix to 8721 looks to be nontrivial, so what I will do is commit the "hack" patch to 8721 separately, and then the main patch, as 8721 is blocking the testing. The interim hack for 8721 can then be rolled back separately once someone (ddunbar? pdox? me? :) get around to refactoring MCExpr so that :lower16: and :upper16: can apply to arbitrary expressions. Thanks -jason
Renato Golin
2011-Jan-10 23:21 UTC
[LLVMdev] ARM/MC/ELF Support for pcrel movw/movt coming soon
On 10 January 2011 22:59, Jason Kim <jasonwkim at google.com> wrote:> Hi everyone, happy new year. > > This note is to announce that support for PC relative reloc tags for > movw/movt is nearing completion (hopefully <48hrs!). This work is is > from Jan Voung, David Meyer and myself.Hi Jason, Happy new year! That seems a long patch... with many changes... can't wait for it. ;) 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? cheers, --renato
Jason Kim
2011-Jan-10 23:54 UTC
[LLVMdev] ARM/MC/ELF Support for pcrel movw/movt coming soon
-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
Maybe Matching Threads
- [LLVMdev] ARM/MC/ELF Support for pcrel movw/movt coming soon
- [LLVMdev] ARM/MC/ELF Support for pcrel movw/movt coming soon
- [LLVMdev] ARM/MC/ELF Support for pcrel movw/movt coming soon
- [LLVMdev] [llvm-commits] [patch] ARM/MC/ELF add new stub for movt/movw in ARMFixupKinds
- [LLVMdev] Thumb-2 code generation error in Apple LLVM at all optimization levels