Skip to content

[Mips] Presence of inline asm instructions affects ELF ABI info #135283

Open
@alexrp

Description

@alexrp
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.2llc -filetype obj test.ll -O0readelf -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: 00000000sed -i s/nop// test.llllc -filetype obj test.ll -O0readelf -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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions