std.Target: Add Arch.isLoongArch() function.

This commit is contained in:
Alex Rønne Petersen 2024-07-30 00:12:02 +02:00
parent 624fa8523a
commit 5e08d00862
No known key found for this signature in database

View File

@ -1084,6 +1084,13 @@ pub const Cpu = struct {
};
}
pub inline fn isLoongArch(arch: Arch) bool {
return switch (arch) {
.loongarch32, .loongarch64 => true,
else => false,
};
}
pub inline fn isRISCV(arch: Arch) bool {
return switch (arch) {
.riscv32, .riscv64 => true,