Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

ARM assembler refuses to assemble instruction #50264

Open Quuxplusone opened 3 years ago

Quuxplusone commented 3 years ago
Bugzilla Link PR51297
Status NEW
Importance P normal
Reported by Jacob Navia (jacobnavia7@gmail.com)
Reported on 2021-08-01 01:39:35 -0700
Last modified on 2021-08-27 07:45:48 -0700
Version unspecified
Hardware Other Linux
CC blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
jacob@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@rock64:~/lcc/book/test$ clang bug.s
bug.s:4:10: error: Immediate too large for register
        ldr d15,=0x401acccccccccccd
                ^
jacob@rock64:~/lcc/book/test$ as -c -o bug bug.s
jacob@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
Quuxplusone commented 3 years ago
One month later NOTHING!
Is anyone reading this?