.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"?
| | |
| --- | --- |
| Bugzilla Link | [51297](https://llvm.org/bz51297) |
| Version | unspecified |
| OS | Linux |
| Reporter | LLVM Bugzilla Contributor |
| CC | @DougGregor,@zygoloid |
## Extended Description
```
jacob@rock64:~/lcc/book/test$ cat bug.s
```
```asm
.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
| | |
| --- | --- |
| Bugzilla Link | [51297](https://llvm.org/bz51297) |
| Version | unspecified |
| OS | Linux |
| Reporter | LLVM Bugzilla Contributor |
| CC | @DougGregor,@zygoloid |
## Extended Description
```
jacob@rock64:~/lcc/book/test$ cat bug.s
```
```asm
.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
Extended Description
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