[llvm-bugs] [Bug 28231] New: Consider using movw/movt for got entries

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 21 06:33:24 PDT 2016


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: unassignedbugs at nondot.org
          Reporter: rafael.espindola at gmail.com
                CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160621/40fa6eed/attachment.html>


More information about the llvm-bugs mailing list