authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-07-30 00:12:02+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-08-01 13:11:21+02:00
log5e08d00862fb10c72cd011bf29112e12ef38d576
tree07d126fb52f97f3f3c93f3105d9e180efc9ec411
parent624fa8523a2c4158ddc9fce231181a9e8583a633
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

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


1 files changed, 7 insertions(+), 0 deletions(-)

lib/std/Target.zig+7
......@@ -1084,6 +1084,13 @@ pub const Cpu = struct {
10841084 };
10851085 }
10861086
1087 pub inline fn isLoongArch(arch: Arch) bool {
1088 return switch (arch) {
1089 .loongarch32, .loongarch64 => true,
1090 else => false,
1091 };
1092 }
1093
10871094 pub inline fn isRISCV(arch: Arch) bool {
10881095 return switch (arch) {
10891096 .riscv32, .riscv64 => true,