| ... | @@ -1510,7 +1510,10 @@ pub const Cpu = struct { | ... | @@ -1510,7 +1510,10 @@ pub const Cpu = struct { |
| 1510 | }; | 1510 | }; |
| 1511 | } | 1511 | } |
| 1512 | | 1512 | |
| 1513 | pub inline fn isAARCH64(arch: Arch) bool { | 1513 | /// Deprecated; to be removed in 0.18.0. Use `isAarch64` instead. |
| | 1514 | pub const isAARCH64 = isAarch64; |
| | 1515 | |
| | 1516 | pub inline fn isAarch64(arch: Arch) bool { |
| 1514 | return switch (arch) { | 1517 | return switch (arch) { |
| 1515 | .aarch64, .aarch64_be => true, | 1518 | .aarch64, .aarch64_be => true, |
| 1516 | else => false, | 1519 | else => false, |
| ... | @@ -1538,14 +1541,20 @@ pub const Cpu = struct { | ... | @@ -1538,14 +1541,20 @@ pub const Cpu = struct { |
| 1538 | }; | 1541 | }; |
| 1539 | } | 1542 | } |
| 1540 | | 1543 | |
| 1541 | pub inline fn isLoongArch(arch: Arch) bool { | 1544 | /// Deprecated; to be removed in 0.18.0. Use `isLoongarch` instead. |
| | 1545 | pub const isLoongArch = isLoongarch; |
| | 1546 | |
| | 1547 | pub inline fn isLoongarch(arch: Arch) bool { |
| 1542 | return switch (arch) { | 1548 | return switch (arch) { |
| 1543 | .loongarch32, .loongarch64 => true, | 1549 | .loongarch32, .loongarch64 => true, |
| 1544 | else => false, | 1550 | else => false, |
| 1545 | }; | 1551 | }; |
| 1546 | } | 1552 | } |
| 1547 | | 1553 | |
| 1548 | pub inline fn isRISCV(arch: Arch) bool { | 1554 | /// Deprecated; to be removed in 0.18.0. Use `isRiscv` instead. |
| | 1555 | pub const isRISCV = isRiscv; |
| | 1556 | |
| | 1557 | pub inline fn isRiscv(arch: Arch) bool { |
| 1549 | return arch.isRiscv32() or arch.isRiscv64(); | 1558 | return arch.isRiscv32() or arch.isRiscv64(); |
| 1550 | } | 1559 | } |
| 1551 | | 1560 | |
| ... | @@ -1570,50 +1579,74 @@ pub const Cpu = struct { | ... | @@ -1570,50 +1579,74 @@ pub const Cpu = struct { |
| 1570 | }; | 1579 | }; |
| 1571 | } | 1580 | } |
| 1572 | | 1581 | |
| 1573 | pub inline fn isMIPS(arch: Arch) bool { | 1582 | /// Deprecated; to be removed in 0.18.0. Use `isMips` instead. |
| 1574 | return arch.isMIPS32() or arch.isMIPS64(); | 1583 | pub const isMIPS = isMips; |
| | 1584 | |
| | 1585 | pub inline fn isMips(arch: Arch) bool { |
| | 1586 | return arch.isMips32() or arch.isMips64(); |
| 1575 | } | 1587 | } |
| 1576 | | 1588 | |
| 1577 | pub inline fn isMIPS32(arch: Arch) bool { | 1589 | /// Deprecated; to be removed in 0.18.0. Use `isMips32` instead. |
| | 1590 | pub const isMIPS32 = isMips32; |
| | 1591 | |
| | 1592 | pub inline fn isMips32(arch: Arch) bool { |
| 1578 | return switch (arch) { | 1593 | return switch (arch) { |
| 1579 | .mips, .mipsel => true, | 1594 | .mips, .mipsel => true, |
| 1580 | else => false, | 1595 | else => false, |
| 1581 | }; | 1596 | }; |
| 1582 | } | 1597 | } |
| 1583 | | 1598 | |
| 1584 | pub inline fn isMIPS64(arch: Arch) bool { | 1599 | /// Deprecated; to be removed in 0.18.0. Use `isMips64` instead. |
| | 1600 | pub const isMIPS64 = isMips64; |
| | 1601 | |
| | 1602 | pub inline fn isMips64(arch: Arch) bool { |
| 1585 | return switch (arch) { | 1603 | return switch (arch) { |
| 1586 | .mips64, .mips64el => true, | 1604 | .mips64, .mips64el => true, |
| 1587 | else => false, | 1605 | else => false, |
| 1588 | }; | 1606 | }; |
| 1589 | } | 1607 | } |
| 1590 | | 1608 | |
| 1591 | pub inline fn isPowerPC(arch: Arch) bool { | 1609 | /// Deprecated; to be removed in 0.18.0. Use `isPowerpc` instead. |
| 1592 | return arch.isPowerPC32() or arch.isPowerPC64(); | 1610 | pub const isPowerPC = isPowerpc; |
| | 1611 | |
| | 1612 | pub inline fn isPowerpc(arch: Arch) bool { |
| | 1613 | return arch.isPowerpc32() or arch.isPowerpc64(); |
| 1593 | } | 1614 | } |
| 1594 | | 1615 | |
| 1595 | pub inline fn isPowerPC32(arch: Arch) bool { | 1616 | /// Deprecated; to be removed in 0.18.0. Use `isPowerpc32` instead. |
| | 1617 | pub const isPowerPC32 = isPowerpc32; |
| | 1618 | |
| | 1619 | pub inline fn isPowerpc32(arch: Arch) bool { |
| 1596 | return switch (arch) { | 1620 | return switch (arch) { |
| 1597 | .powerpc, .powerpcle => true, | 1621 | .powerpc, .powerpcle => true, |
| 1598 | else => false, | 1622 | else => false, |
| 1599 | }; | 1623 | }; |
| 1600 | } | 1624 | } |
| 1601 | | 1625 | |
| 1602 | pub inline fn isPowerPC64(arch: Arch) bool { | 1626 | /// Deprecated; to be removed in 0.18.0. Use `isPowerpc64` instead. |
| | 1627 | pub const isPowerPC64 = isPowerpc64; |
| | 1628 | |
| | 1629 | pub inline fn isPowerpc64(arch: Arch) bool { |
| 1603 | return switch (arch) { | 1630 | return switch (arch) { |
| 1604 | .powerpc64, .powerpc64le => true, | 1631 | .powerpc64, .powerpc64le => true, |
| 1605 | else => false, | 1632 | else => false, |
| 1606 | }; | 1633 | }; |
| 1607 | } | 1634 | } |
| 1608 | | 1635 | |
| 1609 | pub inline fn isSPARC(arch: Arch) bool { | 1636 | /// Deprecated; to be removed in 0.18.0. Use `isSparc` instead. |
| | 1637 | pub const isSPARC = isSparc; |
| | 1638 | |
| | 1639 | pub inline fn isSparc(arch: Arch) bool { |
| 1610 | return switch (arch) { | 1640 | return switch (arch) { |
| 1611 | .sparc, .sparc64 => true, | 1641 | .sparc, .sparc64 => true, |
| 1612 | else => false, | 1642 | else => false, |
| 1613 | }; | 1643 | }; |
| 1614 | } | 1644 | } |
| 1615 | | 1645 | |
| 1616 | pub inline fn isSpirV(arch: Arch) bool { | 1646 | /// Deprecated; to be removed in 0.18.0. Use `isSpirv` instead. |
| | 1647 | pub const isSpirV = isSpirv; |
| | 1648 | |
| | 1649 | pub inline fn isSpirv(arch: Arch) bool { |
| 1617 | return switch (arch) { | 1650 | return switch (arch) { |
| 1618 | .spirv32, .spirv64 => true, | 1651 | .spirv32, .spirv64 => true, |
| 1619 | else => false, | 1652 | else => false, |