aboutsummaryrefslogtreecommitdiff
path: root/lib/std
diff options
context:
space:
mode:
authorNoam Preil <noam@pixelhero.dev>2020-08-21 17:52:03 -0400
committerAndrew Kelley <andrew@ziglang.org>2020-08-22 12:45:29 -0700
commit803a1025bbfb8757589068ae29f6f2fc57a4f566 (patch)
treed98b099c1e4f956a0fe86ce0bd8ebb72b9ded1e0 /lib/std
parent29051a0674800881957479c423a1feb043391671 (diff)
downloadzig-803a1025bbfb8757589068ae29f6f2fc57a4f566.tar.gz
zig-803a1025bbfb8757589068ae29f6f2fc57a4f566.zip
Targets: add SPU Mark II architecture
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/elf.zig3
-rw-r--r--lib/std/target.zig8
2 files changed, 10 insertions, 1 deletions
diff --git a/lib/std/elf.zig b/lib/std/elf.zig
index 79303e7163..cd2b5fcd06 100644
--- a/lib/std/elf.zig
+++ b/lib/std/elf.zig
@@ -976,6 +976,9 @@ pub const EM = extern enum(u16) {
/// MIPS RS3000 Little-endian
_MIPS_RS3_LE = 10,
+ /// SPU Mark II
+ _SPU_2 = 13,
+
/// Hewlett-Packard PA-RISC
_PARISC = 15,
diff --git a/lib/std/target.zig b/lib/std/target.zig
index b162bdd0c3..fcd90357fb 100644
--- a/lib/std/target.zig
+++ b/lib/std/target.zig
@@ -663,6 +663,8 @@ pub const Target = struct {
renderscript32,
renderscript64,
ve,
+ // Non-LLVM targets go here
+ spu_2,
pub fn isARM(arch: Arch) bool {
return switch (arch) {
@@ -761,6 +763,7 @@ pub const Target = struct {
.sparcv9 => ._SPARCV9,
.s390x => ._S390,
.ve => ._NONE,
+ .spu_2 => ._SPU_2,
};
}
@@ -803,6 +806,7 @@ pub const Target = struct {
.renderscript64,
.shave,
.ve,
+ .spu_2,
=> .Little,
.arc,
@@ -827,6 +831,7 @@ pub const Target = struct {
switch (arch) {
.avr,
.msp430,
+ .spu_2,
=> return 16,
.arc,
@@ -1317,12 +1322,13 @@ pub const Target = struct {
.bpfeb,
.nvptx,
.nvptx64,
+ .spu_2,
+ .avr,
=> return result,
// TODO go over each item in this list and either move it to the above list, or
// implement the standard dynamic linker path code for it.
.arc,
- .avr,
.hexagon,
.msp430,
.r600,