diff options
| author | WANG Rui <wangrui@loongson.cn> | 2025-06-12 17:07:36 +0800 |
|---|---|---|
| committer | WANG Rui <wangrui@loongson.cn> | 2025-06-14 09:39:30 +0800 |
| commit | c49ec838685eb54fbbc5acc55e9cb2947cad315e (patch) | |
| tree | a5f912e5e8b12e5428bacc3d39c37e4d7f1630f1 /compiler/rustc_target/src | |
| parent | 8da623945f83933dd38644d5745532ee032e855b (diff) | |
Add `f16` inline asm support for LoongArch
Diffstat (limited to 'compiler/rustc_target/src')
| -rw-r--r-- | compiler/rustc_target/src/asm/loongarch.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_target/src/asm/loongarch.rs b/compiler/rustc_target/src/asm/loongarch.rs index 8783d3953b1..51e7ee8daa4 100644 --- a/compiler/rustc_target/src/asm/loongarch.rs +++ b/compiler/rustc_target/src/asm/loongarch.rs @@ -37,9 +37,11 @@ impl LoongArchInlineAsmRegClass { arch: InlineAsmArch, ) -> &'static [(InlineAsmType, Option<Symbol>)] { match (self, arch) { - (Self::reg, InlineAsmArch::LoongArch64) => types! { _: I8, I16, I32, I64, F32, F64; }, - (Self::reg, InlineAsmArch::LoongArch32) => types! { _: I8, I16, I32, F32; }, - (Self::freg, _) => types! { f: F32; d: F64; }, + (Self::reg, InlineAsmArch::LoongArch64) => { + types! { _: I8, I16, I32, I64, F16, F32, F64; } + } + (Self::reg, InlineAsmArch::LoongArch32) => types! { _: I8, I16, I32, F16, F32; }, + (Self::freg, _) => types! { f: F16, F32; d: F64; }, _ => unreachable!("unsupported register class"), } } |
