https://llvm.org/bugs/show_bug.cgi?id=28231

            Bug ID: 28231
           Summary: Consider using movw/movt for got entries
           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 = external global i32
define i32* @f()  {
  ret i32* @a
}

llc produces

        movw    r0, :lower16:(L_a$non_lazy_ptr-(LPC0_0+8))
        movt    r0, :upper16:(L_a$non_lazy_ptr-(LPC0_0+8))
LPC0_0:
        ldr     r0, [pc, r0]

when targeting MachO, but

        ldr     r0, .LCPI0_0
.LPC0_0:
        ldr     r0, [pc, r0]

When targeting ELF.

I think we are missing GOT relative relocations for movw/movt on ELF.

-- 
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

Reply via email to