| ... | @@ -1626,6 +1626,9 @@ pub const EM = enum(u16) { | ... | @@ -1626,6 +1626,9 @@ pub const EM = enum(u16) { |
| 1626 | /// C-SKY | 1626 | /// C-SKY |
| 1627 | CSKY = 252, | 1627 | CSKY = 252, |
| 1628 | | 1628 | |
| | 1629 | /// LoongArch |
| | 1630 | LOONGARCH = 258, |
| | 1631 | |
| 1629 | /// Fujitsu FR-V | 1632 | /// Fujitsu FR-V |
| 1630 | FRV = 0x5441, | 1633 | FRV = 0x5441, |
| 1631 | | 1634 | |
| ... | @@ -1655,6 +1658,14 @@ pub const EM = enum(u16) { | ... | @@ -1655,6 +1658,14 @@ pub const EM = enum(u16) { |
| 1655 | .SPARCV9 => .sparc64, | 1658 | .SPARCV9 => .sparc64, |
| 1656 | .S390 => .s390x, | 1659 | .S390 => .s390x, |
| 1657 | .SPU_2 => .spu_2, | 1660 | .SPU_2 => .spu_2, |
| | 1661 | // FIXME: |
| | 1662 | // No support for .loongarch32 yet so it is safe to assume we are on .loongarch64. |
| | 1663 | // |
| | 1664 | // However, when e_machine is .LOONGARCH, we should check |
| | 1665 | // ei_class's value to decide the CPU architecture. |
| | 1666 | // - ELFCLASS32 => .loongarch32 |
| | 1667 | // - ELFCLASS64 => .loongarch64 |
| | 1668 | .LOONGARCH => .loongarch64, |
| 1658 | // there's many cases we don't (yet) handle, or will never have a | 1669 | // there's many cases we don't (yet) handle, or will never have a |
| 1659 | // zig target cpu arch equivalent (such as null). | 1670 | // zig target cpu arch equivalent (such as null). |
| 1660 | else => null, | 1671 | else => null, |