1
Fork 0

Add f16 inline ASM support for RISC-V

This commit is contained in:
beetrees 2024-06-15 22:30:25 +01:00
parent 92af831290
commit 771e44ebd3
No known key found for this signature in database
GPG key ID: 8791BD754191EBD6
4 changed files with 108 additions and 11 deletions

View file

@ -40,12 +40,13 @@ impl RiscVInlineAsmRegClass {
match self {
Self::reg => {
if arch == InlineAsmArch::RiscV64 {
types! { _: I8, I16, I32, I64, F32, F64; }
types! { _: I8, I16, I32, I64, F16, F32, F64; }
} else {
types! { _: I8, I16, I32, F32; }
types! { _: I8, I16, I32, F16, F32; }
}
}
Self::freg => types! { f: F32; d: F64; },
// FIXME(f16_f128): Add `q: F128;` once LLVM support the `Q` extension.
Self::freg => types! { f: F16, F32; d: F64; },
Self::vreg => &[],
}
}