Skip to content

error: couldn't allocate input reg for constraint 'r' on MIPS when building some wasm2c-generated code #63632

Open
@glandium

Description

@glandium

This is similar to #52638, but for floats.

Reduced C reproducer:

float a;
void foo() {
    __asm__("" :: "r"(a));
}
$ clang --target=mips64el-linux-gnuabi64 -c test.c
test.c:3:13: error: couldn't allocate input reg for constraint 'r'
    __asm__("" :: "r"(a));
            ^
1 error generated.

Reduced LLVM IR reproducer:

target triple = "mips64el-unknown-linux-gnuabi64"

define void @foo() {
  call void asm sideeffect "", "r,~{$1}"(float 0.000000e+00)
  ret void
}
$ llc test.ll
error: couldn't allocate input reg for constraint 'r'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions