[llvm-bugs] [Bug 45070] New: invalid instruction when using ldrht/ldrsht/ldrsbt without immediate offset

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Mar 1 12:44:36 PST 2020


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

            Bug ID: 45070
           Summary: invalid instruction when using ldrht/ldrsht/ldrsbt
                    without immediate offset
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: ARM
          Assignee: unassignedbugs at nondot.org
          Reporter: stefan at agner.ch
                CC: llvm-bugs at lists.llvm.org, smithp352 at googlemail.com,
                    Ties.Stuij at arm.com

Trying to assemble these instructions without offset (which is optional
according to the ARM ARM) leads to invalid instruction:

        .syntax unified
        .text
        .arch   armv6t2
        .arm
        ldrht r5, [r4]

Building with:

$ llvm-mc --triple=armv6t2-linux-gnueabihf repr-armv6t2.S 
        .text
        .arch   armv6t2

        .code   32
repr-armv6t2.S:5:2: error: invalid instruction, any one of the following would
fix this:
        ldrht r5, [r4]
        ^
repr-armv6t2.S:5:16: note: too few operands for instruction
        ldrht r5, [r4]
                      ^
repr-armv6t2.S:5:2: note: instruction requires: thumb2
        ldrht r5, [r4]
        ^


This appeared when trying to build Linux with Clang's integrated assembler:
https://github.com/ClangBuiltLinux/linux/issues/909

-- 
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/20200301/963dfa4b/attachment.html>


More information about the llvm-bugs mailing list