Issue |
126531
|
Summary |
MIPS assembler cannot resolve local label arithmetic in immediate _expression_ (GNU `as` parity issue)
|
Labels |
new issue
|
Assignees |
|
Reporter |
bravely-beep
|
When assembling [this file](https://github.com/DragonMinded/libdragon/blob/5024b45b219c1ac283a9d5d4726fb384a5200e40/boot/boot_trampoline.S), `llvm-mc` throws an error that it is unable to handle the immediate value at line 39:
```
$ llvm-mc --arch=mips64 --filetype=obj libdragon/boot/boot_trampoline.S
libdragon/boot/boot_trampoline.S:39:23: error: expected an immediate
addiu $t2, $t3, .Lend-.Lstart-4
^
libdragon/boot/boot_trampoline.S:39:29: error: expected an immediate
addiu $t2, $t3, .Lend-.Lstart-4
```
GNU `as` is able to determine that both of the labels in this _expression_ are local to the current file, and correctly resolves the difference between them at assembly time. LLVM's MIPS assembler fails to do this.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs