Rollup merge of #126530 - beetrees:f16-inline-asm-riscv, r=Amanieu
Add `f16` inline ASM support for RISC-V This PR adds `f16` inline ASM support for RISC-V. A `FIXME` is left for `f128` support as LLVM does not support the required `Q` (Quad-Precision Floating-Point) extension yet. Relevant issue: #125398 Tracking issue: #116909 `@rustbot` label +F-f16_and_f128
This commit is contained in:
commit
e7956cd994
4 changed files with 108 additions and 11 deletions
|
@ -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 => &[],
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue