Issue |
135283
|
Summary |
[Mips] Presence of inline asm instructions affects ELF ABI info
|
Labels |
backend:MIPS,
miscompilation
|
Assignees |
|
Reporter |
alexrp
|
```console
❯ cat test.ll
target datalayout = "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
target triple = "mips-linux-musleabi"
define dso_local void @entry() "use-soft-float"="true" {
call void asm sideeffect "nop", ""()
ret void
}
❯ llc --version | head -n2
LLVM (http://llvm.org/):
LLVM version 20.1.2
❯ llc -filetype obj test.ll -O0
❯ readelf -A test.o
MIPS ABI Flags Version: 0
ISA: MIPS32
GPR size: 32
CPR1 size: 0
CPR2 size: 0
FP ABI: Soft float
ISA Extension: None
ASEs:
None
FLAGS 1: 00000001
FLAGS 2: 00000000
❯ sed -i s/nop// test.ll
❯ llc -filetype obj test.ll -O0
❯ readelf -A test.o
MIPS ABI Flags Version: 0
ISA: MIPS32
GPR size: 32
CPR1 size: 32
CPR2 size: 0
FP ABI: Hard float (double precision)
ISA Extension: None
ASEs:
None
FLAGS 1: 00000001
FLAGS 2: 00000000
```
Note that the resulting code is soft float in both cases. It's just the ELF ABI info that's wrong.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs