Skip to content

Verify floating point inline asm register allocation works #69

@MabezDev

Description

@MabezDev

This is a bug in the current LLVM backend, should be fixed in the future.

Test case:

Choosing a specific register:

let _x: f32;
unsafe {
    asm!(
        "lsi f0, a0, 152", out("f0") _x
    );
};

However class based register allocation doesn't seem to work yet:

let _x: f32;
unsafe {
    asm!(
        "lsi {}, a0, 152", out(freg) _x
    );
};

Fails with

error: invalid operand for instruction
  --> src/main.rs:76:14
   |
76 |             "lsi {}, a0, 152", out(freg) _x
   |              ^
   |
note: instantiated into assembly here
  --> <inline asm>:1:6
   |
1  |     lsi a8, a0, 152
   |         ^

error: could not compile `xtensa-quickstart` due to previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions