Skip to content

global_asm! macro causes non-fatal errors to be printed during compilation for some RISC-V extension instructions when targeting the GC extensions #80608

Open
@repnop

Description

@repnop

I'm currently using the asm! macro on the riscv64gc-unknown-none-elf target, and have been getting some "errors" for a while about instructions requiring extensions -- except that GC includes the extensions of the instructions I'm using (IMAFDC). So far I've seen errors for F, D, and A instructions, everything else seems to be fine that I've used so far. Despite them being reported as errors, the build still succeeds however. @nbdd0121 suggested this may be an LLVM bug.

Example:

error: instruction requires the following: 'D' (Double-Precision Floating-Point)
        fsd f0, 248(sp)
        ^
error: instruction requires the following: 'A' (Atomic Instructions)
        sc.d zero, zero, 0(sp)
        ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-inline-assemblyArea: Inline assembly (`asm!(…)`)C-external-bugCategory: issue that is caused by bugs in software beyond our controlF-asm`#![feature(asm)]` (not `llvm_asm`)O-riscvTarget: RISC-V architecture

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions