mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 02:24:33 +01:00
std.Target: Add Arch.isLoongArch() function.
This commit is contained in:
parent
624fa8523a
commit
5e08d00862
1 changed files with 7 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue