Add supported asm types for LoongArch32

This commit is contained in:
WANG Rui
2025-06-09 22:29:59 +08:00
parent 7c10378e1f
commit de8a91b51c
2 changed files with 11 additions and 4 deletions

View File

@@ -34,11 +34,13 @@ impl LoongArchInlineAsmRegClass {
pub fn supported_types(
self,
_arch: InlineAsmArch,
arch: InlineAsmArch,
) -> &'static [(InlineAsmType, Option<Symbol>)] {
match self {
Self::reg => types! { _: I8, I16, I32, I64, F32, F64; },
Self::freg => types! { f: F32; d: F64; },
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; },
_ => unreachable!("unsupported register class"),
}
}
}