| ... | @@ -763,6 +763,7 @@ pub const mips = @import("Target/mips.zig"); | ... | @@ -763,6 +763,7 @@ pub const mips = @import("Target/mips.zig"); |
| 763 | pub const msp430 = @import("Target/msp430.zig"); | 763 | pub const msp430 = @import("Target/msp430.zig"); |
| 764 | pub const nvptx = @import("Target/nvptx.zig"); | 764 | pub const nvptx = @import("Target/nvptx.zig"); |
| 765 | pub const powerpc = @import("Target/powerpc.zig"); | 765 | pub const powerpc = @import("Target/powerpc.zig"); |
| | 766 | pub const propeller = @import("Target/propeller.zig"); |
| 766 | pub const riscv = @import("Target/riscv.zig"); | 767 | pub const riscv = @import("Target/riscv.zig"); |
| 767 | pub const sparc = @import("Target/sparc.zig"); | 768 | pub const sparc = @import("Target/sparc.zig"); |
| 768 | pub const spirv = @import("Target/spirv.zig"); | 769 | pub const spirv = @import("Target/spirv.zig"); |
| ... | @@ -772,7 +773,6 @@ pub const wasm = @import("Target/wasm.zig"); | ... | @@ -772,7 +773,6 @@ pub const wasm = @import("Target/wasm.zig"); |
| 772 | pub const x86 = @import("Target/x86.zig"); | 773 | pub const x86 = @import("Target/x86.zig"); |
| 773 | pub const xcore = @import("Target/xcore.zig"); | 774 | pub const xcore = @import("Target/xcore.zig"); |
| 774 | pub const xtensa = @import("Target/xtensa.zig"); | 775 | pub const xtensa = @import("Target/xtensa.zig"); |
| 775 | pub const propeller = @import("Target/propeller.zig"); | | |
| 776 | | 776 | |
| 777 | pub const Abi = enum { | 777 | pub const Abi = enum { |
| 778 | none, | 778 | none, |
| ... | @@ -1081,6 +1081,7 @@ pub fn toElfMachine(target: Target) std.elf.EM { | ... | @@ -1081,6 +1081,7 @@ pub fn toElfMachine(target: Target) std.elf.EM { |
| 1081 | .msp430 => .MSP430, | 1081 | .msp430 => .MSP430, |
| 1082 | .powerpc, .powerpcle => .PPC, | 1082 | .powerpc, .powerpcle => .PPC, |
| 1083 | .powerpc64, .powerpc64le => .PPC64, | 1083 | .powerpc64, .powerpc64le => .PPC64, |
| | 1084 | .propeller => .PROPELLER, |
| 1084 | .riscv32, .riscv64 => .RISCV, | 1085 | .riscv32, .riscv64 => .RISCV, |
| 1085 | .s390x => .S390, | 1086 | .s390x => .S390, |
| 1086 | .sparc => if (Target.sparc.featureSetHas(target.cpu.features, .v9)) .SPARC32PLUS else .SPARC, | 1087 | .sparc => if (Target.sparc.featureSetHas(target.cpu.features, .v9)) .SPARC32PLUS else .SPARC, |
| ... | @@ -1091,9 +1092,6 @@ pub fn toElfMachine(target: Target) std.elf.EM { | ... | @@ -1091,9 +1092,6 @@ pub fn toElfMachine(target: Target) std.elf.EM { |
| 1091 | .xcore => .XCORE, | 1092 | .xcore => .XCORE, |
| 1092 | .xtensa => .XTENSA, | 1093 | .xtensa => .XTENSA, |
| 1093 | | 1094 | |
| 1094 | .propeller1 => .PROPELLER, | | |
| 1095 | .propeller2 => .PROPELLER2, | | |
| 1096 | | | |
| 1097 | .nvptx, | 1095 | .nvptx, |
| 1098 | .nvptx64, | 1096 | .nvptx64, |
| 1099 | .spirv, | 1097 | .spirv, |
| ... | @@ -1152,8 +1150,7 @@ pub fn toCoffMachine(target: Target) std.coff.MachineType { | ... | @@ -1152,8 +1150,7 @@ pub fn toCoffMachine(target: Target) std.coff.MachineType { |
| 1152 | .wasm64, | 1150 | .wasm64, |
| 1153 | .xcore, | 1151 | .xcore, |
| 1154 | .xtensa, | 1152 | .xtensa, |
| 1155 | .propeller1, | 1153 | .propeller, |
| 1156 | .propeller2, | | |
| 1157 | => .UNKNOWN, | 1154 | => .UNKNOWN, |
| 1158 | }; | 1155 | }; |
| 1159 | } | 1156 | } |
| ... | @@ -1366,8 +1363,7 @@ pub const Cpu = struct { | ... | @@ -1366,8 +1363,7 @@ pub const Cpu = struct { |
| 1366 | powerpcle, | 1363 | powerpcle, |
| 1367 | powerpc64, | 1364 | powerpc64, |
| 1368 | powerpc64le, | 1365 | powerpc64le, |
| 1369 | propeller1, | 1366 | propeller, |
| 1370 | propeller2, | | |
| 1371 | riscv32, | 1367 | riscv32, |
| 1372 | riscv64, | 1368 | riscv64, |
| 1373 | s390x, | 1369 | s390x, |
| ... | @@ -1517,14 +1513,6 @@ pub const Cpu = struct { | ... | @@ -1517,14 +1513,6 @@ pub const Cpu = struct { |
| 1517 | }; | 1513 | }; |
| 1518 | } | 1514 | } |
| 1519 | | 1515 | |
| 1520 | /// Returns if the architecture is a Parallax propeller architecture. | | |
| 1521 | pub inline fn isPropeller(arch: Arch) bool { | | |
| 1522 | return switch (arch) { | | |
| 1523 | .propeller1, .propeller2 => true, | | |
| 1524 | else => false, | | |
| 1525 | }; | | |
| 1526 | } | | |
| 1527 | | | |
| 1528 | pub fn parseCpuModel(arch: Arch, cpu_name: []const u8) !*const Cpu.Model { | 1516 | pub fn parseCpuModel(arch: Arch, cpu_name: []const u8) !*const Cpu.Model { |
| 1529 | for (arch.allCpuModels()) |cpu| { | 1517 | for (arch.allCpuModels()) |cpu| { |
| 1530 | if (std.mem.eql(u8, cpu_name, cpu.name)) { | 1518 | if (std.mem.eql(u8, cpu_name, cpu.name)) { |
| ... | @@ -1568,8 +1556,7 @@ pub const Cpu = struct { | ... | @@ -1568,8 +1556,7 @@ pub const Cpu = struct { |
| 1568 | .loongarch32, | 1556 | .loongarch32, |
| 1569 | .loongarch64, | 1557 | .loongarch64, |
| 1570 | .arc, | 1558 | .arc, |
| 1571 | .propeller1, | 1559 | .propeller, |
| 1572 | .propeller2, | | |
| 1573 | => .little, | 1560 | => .little, |
| 1574 | | 1561 | |
| 1575 | .armeb, | 1562 | .armeb, |
| ... | @@ -1604,8 +1591,8 @@ pub const Cpu = struct { | ... | @@ -1604,8 +1591,8 @@ pub const Cpu = struct { |
| 1604 | .flash, .flash1, .flash2, .flash3, .flash4, .flash5 => arch == .avr, | 1591 | .flash, .flash1, .flash2, .flash3, .flash4, .flash5 => arch == .avr, |
| 1605 | | 1592 | |
| 1606 | // Propeller address spaces: | 1593 | // Propeller address spaces: |
| 1607 | .cog, .hub => arch.isPropeller(), | 1594 | .cog, .hub => arch == .propeller, |
| 1608 | .lut => (arch == .propeller2), | 1595 | .lut => arch == .propeller, // TODO: This should check for the `p2` CPU feature. |
| 1609 | }; | 1596 | }; |
| 1610 | } | 1597 | } |
| 1611 | | 1598 | |
| ... | @@ -1618,6 +1605,7 @@ pub const Cpu = struct { | ... | @@ -1618,6 +1605,7 @@ pub const Cpu = struct { |
| 1618 | .loongarch32, .loongarch64 => "loongarch", | 1605 | .loongarch32, .loongarch64 => "loongarch", |
| 1619 | .mips, .mipsel, .mips64, .mips64el => "mips", | 1606 | .mips, .mipsel, .mips64, .mips64el => "mips", |
| 1620 | .powerpc, .powerpcle, .powerpc64, .powerpc64le => "powerpc", | 1607 | .powerpc, .powerpcle, .powerpc64, .powerpc64le => "powerpc", |
| | 1608 | .propeller => "propeller", |
| 1621 | .riscv32, .riscv64 => "riscv", | 1609 | .riscv32, .riscv64 => "riscv", |
| 1622 | .sparc, .sparc64 => "sparc", | 1610 | .sparc, .sparc64 => "sparc", |
| 1623 | .s390x => "s390x", | 1611 | .s390x => "s390x", |
| ... | @@ -1625,7 +1613,6 @@ pub const Cpu = struct { | ... | @@ -1625,7 +1613,6 @@ pub const Cpu = struct { |
| 1625 | .nvptx, .nvptx64 => "nvptx", | 1613 | .nvptx, .nvptx64 => "nvptx", |
| 1626 | .wasm32, .wasm64 => "wasm", | 1614 | .wasm32, .wasm64 => "wasm", |
| 1627 | .spirv, .spirv32, .spirv64 => "spirv", | 1615 | .spirv, .spirv32, .spirv64 => "spirv", |
| 1628 | .propeller1, .propeller2 => "propeller", | | |
| 1629 | else => @tagName(arch), | 1616 | else => @tagName(arch), |
| 1630 | }; | 1617 | }; |
| 1631 | } | 1618 | } |
| ... | @@ -1851,10 +1838,7 @@ pub const Cpu = struct { | ... | @@ -1851,10 +1838,7 @@ pub const Cpu = struct { |
| 1851 | => &.{.msp430}, | 1838 | => &.{.msp430}, |
| 1852 | | 1839 | |
| 1853 | .propeller1_sysv, | 1840 | .propeller1_sysv, |
| 1854 | => &.{.propeller1}, | 1841 | => &.{.propeller}, |
| 1855 | | | |
| 1856 | .propeller2_sysv, | | |
| 1857 | => &.{.propeller2}, | | |
| 1858 | | 1842 | |
| 1859 | .s390x_sysv, | 1843 | .s390x_sysv, |
| 1860 | .s390x_sysv_vx, | 1844 | .s390x_sysv_vx, |
| ... | @@ -1933,8 +1917,7 @@ pub const Cpu = struct { | ... | @@ -1933,8 +1917,7 @@ pub const Cpu = struct { |
| 1933 | .msp430 => &msp430.cpu.generic, | 1917 | .msp430 => &msp430.cpu.generic, |
| 1934 | .powerpc, .powerpcle => &powerpc.cpu.ppc, | 1918 | .powerpc, .powerpcle => &powerpc.cpu.ppc, |
| 1935 | .powerpc64, .powerpc64le => &powerpc.cpu.ppc64, | 1919 | .powerpc64, .powerpc64le => &powerpc.cpu.ppc64, |
| 1936 | .propeller1 => &propeller.cpu.generic, | 1920 | .propeller => &propeller.cpu.p1, |
| 1937 | .propeller2 => &propeller.cpu.generic, | | |
| 1938 | .riscv32 => &riscv.cpu.generic_rv32, | 1921 | .riscv32 => &riscv.cpu.generic_rv32, |
| 1939 | .riscv64 => &riscv.cpu.generic_rv64, | 1922 | .riscv64 => &riscv.cpu.generic_rv64, |
| 1940 | .spirv, .spirv32, .spirv64 => &spirv.cpu.generic, | 1923 | .spirv, .spirv32, .spirv64 => &spirv.cpu.generic, |
| ... | @@ -2647,8 +2630,7 @@ pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 { | ... | @@ -2647,8 +2630,7 @@ pub fn ptrBitWidth_cpu_abi(cpu: Cpu, abi: Abi) u16 { |
| 2647 | .spirv32, | 2630 | .spirv32, |
| 2648 | .loongarch32, | 2631 | .loongarch32, |
| 2649 | .xtensa, | 2632 | .xtensa, |
| 2650 | .propeller1, | 2633 | .propeller, |
| 2651 | .propeller2, | | |
| 2652 | => 32, | 2634 | => 32, |
| 2653 | | 2635 | |
| 2654 | .aarch64, | 2636 | .aarch64, |
| ... | @@ -3159,8 +3141,7 @@ pub fn cTypeAlignment(target: Target, c_type: CType) u16 { | ... | @@ -3159,8 +3141,7 @@ pub fn cTypeAlignment(target: Target, c_type: CType) u16 { |
| 3159 | .xcore, | 3141 | .xcore, |
| 3160 | .kalimba, | 3142 | .kalimba, |
| 3161 | .xtensa, | 3143 | .xtensa, |
| 3162 | .propeller1, | 3144 | .propeller, |
| 3163 | .propeller2, | | |
| 3164 | => 4, | 3145 | => 4, |
| 3165 | | 3146 | |
| 3166 | .arm, | 3147 | .arm, |
| ... | @@ -3254,8 +3235,7 @@ pub fn cTypePreferredAlignment(target: Target, c_type: CType) u16 { | ... | @@ -3254,8 +3235,7 @@ pub fn cTypePreferredAlignment(target: Target, c_type: CType) u16 { |
| 3254 | .xcore, | 3235 | .xcore, |
| 3255 | .kalimba, | 3236 | .kalimba, |
| 3256 | .xtensa, | 3237 | .xtensa, |
| 3257 | .propeller1, | 3238 | .propeller, |
| 3258 | .propeller2, | | |
| 3259 | => 4, | 3239 | => 4, |
| 3260 | | 3240 | |
| 3261 | .arc, | 3241 | .arc, |
| ... | @@ -3360,8 +3340,7 @@ pub fn cCallingConvention(target: Target) ?std.builtin.CallingConvention { | ... | @@ -3360,8 +3340,7 @@ pub fn cCallingConvention(target: Target) ?std.builtin.CallingConvention { |
| 3360 | else | 3340 | else |
| 3361 | .{ .m68k_sysv = .{} }, | 3341 | .{ .m68k_sysv = .{} }, |
| 3362 | .msp430 => .{ .msp430_eabi = .{} }, | 3342 | .msp430 => .{ .msp430_eabi = .{} }, |
| 3363 | .propeller1 => .{ .propeller1_sysv = .{} }, | 3343 | .propeller => .{ .propeller1_sysv = .{} }, |
| 3364 | .propeller2 => .{ .propeller2_sysv = .{} }, | | |
| 3365 | .s390x => .{ .s390x_sysv = .{} }, | 3344 | .s390x => .{ .s390x_sysv = .{} }, |
| 3366 | .ve => .{ .ve_sysv = .{} }, | 3345 | .ve => .{ .ve_sysv = .{} }, |
| 3367 | .xcore => .{ .xcore_xs1 = .{} }, | 3346 | .xcore => .{ .xcore_xs1 = .{} }, |