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: unassignedb...@nondot.org
          Reporter: eblot...@gmail.com
                CC: llvm-bugs@lists.llvm.org, peter.sm...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to