Skip to content

Commit

Permalink
Simplify match statement since variable arch that is predictable
Browse files Browse the repository at this point in the history
  • Loading branch information
heiher committed May 8, 2023
1 parent 8ad78cb commit c5382ad
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions compiler/rustc_target/src/asm/loongarch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,11 @@ impl LoongArchInlineAsmRegClass {

pub fn supported_types(
self,
arch: InlineAsmArch,
_arch: InlineAsmArch,
) -> &'static [(InlineAsmType, Option<Symbol>)] {
match (self, arch) {
(Self::reg, InlineAsmArch::LoongArch64) => types! { _: I8, I16, I32, I64, F32, F64; },
(Self::reg, _) => types! { _: I8, I16, I32, F32; },
(Self::freg, _) => types! { _: F32, F64; },
match self {
Self::reg => types! { _: I8, I16, I32, I64, F32, F64; },
Self::freg => types! { _: F32, F64; },
}
}
}
Expand Down

0 comments on commit c5382ad

Please sign in to comment.