[llvm-bugs] [Bug 51297] New: ARM assembler refuses to assemble instruction

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Aug 1 01:39:35 PDT 2021


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

            Bug ID: 51297
           Summary: ARM assembler refuses to assemble instruction
           Product: clang
           Version: unspecified
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jacobnavia7 at gmail.com
                CC: blitzrakete at gmail.com, dgregor at apple.com,
                    erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

jacob at rock64:~/lcc/book/test$ cat bug.s
        .text
main:
        ldr x15,=0x401acccccccccccd # assembles and executes correctly
        ldr d15,=0x401acccccccccccd # <<<<<<<<<< BUG <<<<<<<<<<<<<
        ret
        .pool
.L9:
        .size main,.L9-main
        .globl main
jacob at rock64:~/lcc/book/test$ clang bug.s
bug.s:4:10: error: Immediate too large for register
        ldr d15,=0x401acccccccccccd
                ^
jacob at rock64:~/lcc/book/test$ as -c -o bug bug.s
jacob at rock64:~/lcc/book/test$ 

As you can see, "as" (gnu as) assembles correctly the SAME program. Now, at the
execution, the instruction DOESN'T WORK at all. Some rubbish is loaded into
d15.
Is this a bug in clang?
Or is this a bug in "as" that assembles an incorrect instruction?
Or is this a bug in clang AND as?
Or is this a bug in the rockchip processor that doesn't do what is supposed to
do?
Or is this a bug in  the documentation that doesn't warn that d15 shouldn't be
used with "ldr"?

PLEEEEEEEZE enlightmen me.

Thanks

-- 
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/20210801/bd253376/attachment-0001.html>


More information about the llvm-bugs mailing list