mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
x86_64: rewrite scalar -|
This commit is contained in:
parent
4adb7eca6a
commit
3529889cf3
File diff suppressed because it is too large
Load Diff
@ -127,12 +127,12 @@ test "saturating subtraction" {
|
||||
|
||||
test "saturating subtraction 128bit" {
|
||||
if (builtin.zig_backend == .stage2_wasm) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_x86_64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_x86_64 and builtin.target.ofmt != .elf and builtin.target.ofmt != .macho) return error.SkipZigTest;
|
||||
|
||||
const S = struct {
|
||||
fn doTheTest() !void {
|
||||
|
||||
@ -5097,6 +5097,14 @@ test subWrap {
|
||||
try test_sub_wrap.testIntVectors();
|
||||
}
|
||||
|
||||
inline fn subSat(comptime Type: type, lhs: Type, rhs: Type) Type {
|
||||
return lhs -| rhs;
|
||||
}
|
||||
test subSat {
|
||||
const test_sub_sat = binary(subSat, .{});
|
||||
try test_sub_sat.testInts();
|
||||
}
|
||||
|
||||
inline fn mulUnsafe(comptime Type: type, lhs: Type, rhs: Type) DoubleBits(Type) {
|
||||
@setRuntimeSafety(false);
|
||||
return @as(DoubleBits(Type), lhs) * rhs;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user