[llvm-bugs] [Bug 39922] New: LLD is missing support for ARMv6M thunks

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Dec 8 00:23:15 PST 2018


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

            Bug ID: 39922
           Summary: LLD is missing support for ARMv6M thunks
           Product: lld
           Version: unspecified
          Hardware: Other
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: ELF
          Assignee: unassignedbugs at nondot.org
          Reporter: eblot.ml at gmail.com
                CC: llvm-bugs at lists.llvm.org, peter.smith at linaro.org

ARMv6M does not support movw/movt Thumb2 instructions.

Current LLD version v7.0 emits such instructions to generate long jump in
thunks. For example, this code generation occurs when code is relocated from
flash to RAM on embedded Cortex-M0/M0+ cores.

This prevents using LLD with Cortex-M0/M0+ cores when such a feature is used.

I've written a small patch to support this feature, but I'm not a LLD developer
and I do not know how to write valid tests for the LLVM infrastructure, so I
guess this would require more work effort to propose a valid patch:

https://gist.github.com/eblot/43552f8c01cc7d2ee4faef42454c2c83

It only support absolute addressing, not position-independent code - I'm not
sure this is a useful feature on M0+ core anyway and I would not have any real
world examples to test it.

-- 
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/20181208/173bfd7a/attachment.html>


More information about the llvm-bugs mailing list