x86_64: rewrite scalar +|
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -53,12 +53,12 @@ test "saturating add" {
|
||||
|
||||
test "saturating add 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 {
|
||||
|
||||
@@ -5282,6 +5282,14 @@ test addWrap {
|
||||
try test_add_wrap.testIntVectors();
|
||||
}
|
||||
|
||||
inline fn addSat(comptime Type: type, lhs: Type, rhs: Type) Type {
|
||||
return lhs +| rhs;
|
||||
}
|
||||
test addSat {
|
||||
const test_add_sat = binary(addSat, .{});
|
||||
try test_add_sat.testInts();
|
||||
}
|
||||
|
||||
inline fn subUnsafe(comptime Type: type, lhs: Type, rhs: Type) AddOneBit(Type) {
|
||||
@setRuntimeSafety(false);
|
||||
return switch (@typeInfo(Scalar(Type))) {
|
||||
|
||||
Reference in New Issue
Block a user