| author | |
| committer | |
| log | 803a1025bbfb8757589068ae29f6f2fc57a4f566 |
| tree | d98b099c1e4f956a0fe86ce0bd8ebb72b9ded1e0 |
| parent | 29051a0674800881957479c423a1feb043391671 |
3 files changed, 12 insertions(+), 3 deletions(-)
lib/std/elf.zig+3| ... | ... | @@ -976,6 +976,9 @@ pub const EM = extern enum(u16) { |
| 976 | 976 | /// MIPS RS3000 Little-endian |
| 977 | 977 | _MIPS_RS3_LE = 10, |
| 978 | 978 | |
| 979 | /// SPU Mark II | |
| 980 | _SPU_2 = 13, | |
| 981 | ||
| 979 | 982 | /// Hewlett-Packard PA-RISC |
| 980 | 983 | _PARISC = 15, |
| 981 | 984 |
lib/std/target.zig+7-1| ... | ... | @@ -663,6 +663,8 @@ pub const Target = struct { |
| 663 | 663 | renderscript32, |
| 664 | 664 | renderscript64, |
| 665 | 665 | ve, |
| 666 | // Non-LLVM targets go here | |
| 667 | spu_2, | |
| 666 | 668 | |
| 667 | 669 | pub fn isARM(arch: Arch) bool { |
| 668 | 670 | return switch (arch) { |
| ... | ... | @@ -761,6 +763,7 @@ pub const Target = struct { |
| 761 | 763 | .sparcv9 => ._SPARCV9, |
| 762 | 764 | .s390x => ._S390, |
| 763 | 765 | .ve => ._NONE, |
| 766 | .spu_2 => ._SPU_2, | |
| 764 | 767 | }; |
| 765 | 768 | } |
| 766 | 769 | |
| ... | ... | @@ -803,6 +806,7 @@ pub const Target = struct { |
| 803 | 806 | .renderscript64, |
| 804 | 807 | .shave, |
| 805 | 808 | .ve, |
| 809 | .spu_2, | |
| 806 | 810 | => .Little, |
| 807 | 811 | |
| 808 | 812 | .arc, |
| ... | ... | @@ -827,6 +831,7 @@ pub const Target = struct { |
| 827 | 831 | switch (arch) { |
| 828 | 832 | .avr, |
| 829 | 833 | .msp430, |
| 834 | .spu_2, | |
| 830 | 835 | => return 16, |
| 831 | 836 | |
| 832 | 837 | .arc, |
| ... | ... | @@ -1317,12 +1322,13 @@ pub const Target = struct { |
| 1317 | 1322 | .bpfeb, |
| 1318 | 1323 | .nvptx, |
| 1319 | 1324 | .nvptx64, |
| 1325 | .spu_2, | |
| 1326 | .avr, | |
| 1320 | 1327 | => return result, |
| 1321 | 1328 | |
| 1322 | 1329 | // TODO go over each item in this list and either move it to the above list, or |
| 1323 | 1330 | // implement the standard dynamic linker path code for it. |
| 1324 | 1331 | .arc, |
| 1325 | .avr, | |
| 1326 | 1332 | .hexagon, |
| 1327 | 1333 | .msp430, |
| 1328 | 1334 | .r600, |
src-self-hosted/link/Elf.zig+2-2| ... | ... | @@ -249,7 +249,7 @@ fn openFile(allocator: *Allocator, file: fs.File, options: link.Options) !Elf { |
| 249 | 249 | .allocator = allocator, |
| 250 | 250 | }, |
| 251 | 251 | .ptr_width = switch (options.target.cpu.arch.ptrBitWidth()) { |
| 252 | 32 => .p32, | |
| 252 | 16, 32 => .p32, | |
| 253 | 253 | 64 => .p64, |
| 254 | 254 | else => return error.UnsupportedELFArchitecture, |
| 255 | 255 | }, |
| ... | ... | @@ -278,7 +278,7 @@ fn createFile(allocator: *Allocator, file: fs.File, options: link.Options) !Elf |
| 278 | 278 | .file = file, |
| 279 | 279 | }, |
| 280 | 280 | .ptr_width = switch (options.target.cpu.arch.ptrBitWidth()) { |
| 281 | 32 => .p32, | |
| 281 | 16, 32 => .p32, | |
| 282 | 282 | 64 => .p64, |
| 283 | 283 | else => return error.UnsupportedELFArchitecture, |
| 284 | 284 | }, |