mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 04:24:33 +01:00
std.Target: Add isMIPS32()/isMIPS64() functions.
This commit is contained in:
parent
e5c75479c2
commit
5a97045644
1 changed files with 12 additions and 1 deletions
|
|
@ -1099,8 +1099,19 @@ pub const Cpu = struct {
|
|||
}
|
||||
|
||||
pub inline fn isMIPS(arch: Arch) bool {
|
||||
return arch.isMIPS32() or arch.isMIPS64();
|
||||
}
|
||||
|
||||
pub inline fn isMIPS32(arch: Arch) bool {
|
||||
return switch (arch) {
|
||||
.mips, .mipsel, .mips64, .mips64el => true,
|
||||
.mips, .mipsel => true,
|
||||
else => false,
|
||||
};
|
||||
}
|
||||
|
||||
pub inline fn isMIPS64(arch: Arch) bool {
|
||||
return switch (arch) {
|
||||
.mips64, .mips64el => true,
|
||||
else => false,
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue