diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-08-01 03:36:03 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-08-01 03:36:03 -0400 |
| commit | 6cb4cac5cd1c68f41c62a3c23b09513988337c8d (patch) | |
| tree | bc27c72e26d25ebf42d8611d33dc42dc2d123348 | |
| parent | 38b5812c4895eb0157f99348f51c40bbd17c3b94 (diff) | |
| download | zig-6cb4cac5cd1c68f41c62a3c23b09513988337c8d.tar.gz zig-6cb4cac5cd1c68f41c62a3c23b09513988337c8d.zip | |
disable behavior test for 128-bit cmpxchg
once #2883 is done this can be revisited
| -rw-r--r-- | test/stage1/behavior/atomics.zig | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/test/stage1/behavior/atomics.zig b/test/stage1/behavior/atomics.zig index 3d1caaaa15..a97467e416 100644 --- a/test/stage1/behavior/atomics.zig +++ b/test/stage1/behavior/atomics.zig @@ -70,22 +70,23 @@ test "cmpxchg with ptr" { expect(x == &data2); } -test "128-bit cmpxchg" { - if (builtin.arch != .x86_64) { - return error.SkipZigTest; - } - var x: u128 align(16) = 1234; // TODO: https://github.com/ziglang/zig/issues/2987 - if (@cmpxchgWeak(u128, &x, 99, 5678, .SeqCst, .SeqCst)) |x1| { - expect(x1 == 1234); - } else { - @panic("cmpxchg should have failed"); - } - - while (@cmpxchgWeak(u128, &x, 1234, 5678, .SeqCst, .SeqCst)) |x1| { - expect(x1 == 1234); - } - expect(x == 5678); - - expect(@cmpxchgStrong(u128, &x, 5678, 42, .SeqCst, .SeqCst) == null); - expect(x == 42); -} +// TODO this test is disabled until this issue is resolved: +// https://github.com/ziglang/zig/issues/2883 +// otherwise cross compiling will result in: +// lld: error: undefined symbol: __sync_val_compare_and_swap_16 +//test "128-bit cmpxchg" { +// var x: u128 align(16) = 1234; // TODO: https://github.com/ziglang/zig/issues/2987 +// if (@cmpxchgWeak(u128, &x, 99, 5678, .SeqCst, .SeqCst)) |x1| { +// expect(x1 == 1234); +// } else { +// @panic("cmpxchg should have failed"); +// } +// +// while (@cmpxchgWeak(u128, &x, 1234, 5678, .SeqCst, .SeqCst)) |x1| { +// expect(x1 == 1234); +// } +// expect(x == 5678); +// +// expect(@cmpxchgStrong(u128, &x, 5678, 42, .SeqCst, .SeqCst) == null); +// expect(x == 42); +//} |
