aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2019-09-21 23:00:36 +0200
committerLemonBoy <thatlemon@gmail.com>2019-09-26 09:31:55 +0200
commit4ebcf64864eeec6c2086826242f53eedc69275ad (patch)
tree3002ce16fcb94c9b1e6852e9bae6eda3b1da5583 /test
parent2f208330975041cdb36763fab314037e46c291fc (diff)
downloadzig-4ebcf64864eeec6c2086826242f53eedc69275ad.tar.gz
zig-4ebcf64864eeec6c2086826242f53eedc69275ad.zip
Initial support for mipsel architecture¬
Diffstat (limited to 'test')
-rw-r--r--test/stage1/behavior/byteswap.zig2
-rw-r--r--test/stage1/behavior/new_stack_call.zig1
-rw-r--r--test/stage1/behavior/shuffle.zig2
-rw-r--r--test/tests.zig10
4 files changed, 14 insertions, 1 deletions
diff --git a/test/stage1/behavior/byteswap.zig b/test/stage1/behavior/byteswap.zig
index d8fc554808..ab7265bf77 100644
--- a/test/stage1/behavior/byteswap.zig
+++ b/test/stage1/behavior/byteswap.zig
@@ -39,6 +39,8 @@ test "@byteSwap integers" {
}
test "@byteSwap vectors" {
+ if (@import("builtin").arch == .mipsel) return error.SkipZigTest;
+
const ByteSwapVectorTest = struct {
fn run() void {
t(u8, 2, [_]u8{ 0x12, 0x13 }, [_]u8{ 0x12, 0x13 });
diff --git a/test/stage1/behavior/new_stack_call.zig b/test/stage1/behavior/new_stack_call.zig
index 2200407882..2fef4816d3 100644
--- a/test/stage1/behavior/new_stack_call.zig
+++ b/test/stage1/behavior/new_stack_call.zig
@@ -6,6 +6,7 @@ var new_stack_bytes: [1024]u8 align(16) = undefined;
test "calling a function with a new stack" {
// TODO: https://github.com/ziglang/zig/issues/3268
if (@import("builtin").arch == .aarch64) return error.SkipZigTest;
+ if (@import("builtin").arch == .mipsel) return error.SkipZigTest;
const arg = 1234;
diff --git a/test/stage1/behavior/shuffle.zig b/test/stage1/behavior/shuffle.zig
index 2029ec582f..fc8c2b56de 100644
--- a/test/stage1/behavior/shuffle.zig
+++ b/test/stage1/behavior/shuffle.zig
@@ -33,7 +33,7 @@ test "@shuffle" {
expect(mem.eql(i32, ([4]i32)(res), [4]i32{ 2147483647, 3, -2, 4 }));
// bool
- {
+ if (@import("builtin").arch != .mipsel) {
var x2: @Vector(4, bool) = [4]bool{ false, true, false, true };
var v4: @Vector(2, bool) = [2]bool{ true, false };
const mask5: @Vector(4, i32) = [4]i32{ 0, ~i32(1), 1, 2 };
diff --git a/test/tests.zig b/test/tests.zig
index 1b51a0c694..4a9b2c89e6 100644
--- a/test/tests.zig
+++ b/test/tests.zig
@@ -134,6 +134,16 @@ const test_targets = [_]TestTarget{
TestTarget{
.target = Target{
.Cross = CrossTarget{
+ .os = .linux,
+ .arch = .mipsel,
+ .abi = .none,
+ },
+ },
+ },
+
+ TestTarget{
+ .target = Target{
+ .Cross = CrossTarget{
.os = .macosx,
.arch = .x86_64,
.abi = .gnu,