https://llvm.org/bugs/show_bug.cgi?id=28229
Bug ID: 28229 Summary: Consider using movw/movt for local symbols in position independent code on ELF Product: libraries Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: Backend: ARM Assignee: unassignedb...@nondot.org Reporter: rafael.espind...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Given @a = hidden global i32 42 define i32* @f() { ret i32* @a } llc produces movw r0, :lower16:(_a-(LPC0_0+8)) movt r0, :upper16:(_a-(LPC0_0+8)) LPC0_0: add r0, pc, r0 When targeting MachO but ldr r0, .LCPI0_0 .LPC0_0: add r0, pc, r0 ... .LCPI0_0: .long a-(.LPC0_0+8) When targeting ELF. ELF has PREL relocations for MOVW/MOVT, so it should be possible to use movw/movt on ELF too. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs