mirror of
https://github.com/ziglang/zig.git
synced 2024-11-15 00:26:57 +00:00
parent
17e3fcc3a5
commit
401de6dd2f
@ -84,6 +84,13 @@ pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, _: ?
|
||||
/// here in compiler-rt.
|
||||
pub fn F16T(comptime other_type: type) type {
|
||||
return switch (builtin.cpu.arch) {
|
||||
.arm, .armeb, .thumb, .thumbeb => if (std.Target.arm.featureSetHas(builtin.cpu.features, .has_v8))
|
||||
switch (builtin.abi.floatAbi()) {
|
||||
.soft => u16,
|
||||
.hard => f16,
|
||||
}
|
||||
else
|
||||
u16,
|
||||
.aarch64, .aarch64_be, .aarch64_32 => f16,
|
||||
.riscv64 => if (builtin.zig_backend == .stage1) u16 else f16,
|
||||
.x86, .x86_64 => if (builtin.target.isDarwin()) switch (other_type) {
|
||||
|
@ -1473,7 +1473,6 @@ pub const Target = struct {
|
||||
pub const FloatAbi = enum {
|
||||
hard,
|
||||
soft,
|
||||
soft_fp,
|
||||
};
|
||||
|
||||
pub inline fn getFloatAbi(self: Target) FloatAbi {
|
||||
|
@ -722,11 +722,6 @@ test "@floor f128" {
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest;
|
||||
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isARM()) {
|
||||
// https://github.com/ziglang/zig/issues/16848
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
|
||||
try testFloorLegacy(f128, 12.0);
|
||||
try comptime testFloorLegacy(f128, 12.0);
|
||||
}
|
||||
|
@ -57,11 +57,6 @@ test "@mulAdd f80" {
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest;
|
||||
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isARM()) {
|
||||
// https://github.com/ziglang/zig/issues/16848
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
|
||||
try comptime testMulAdd80();
|
||||
try testMulAdd80();
|
||||
}
|
||||
@ -81,11 +76,6 @@ test "@mulAdd f128" {
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
if (builtin.zig_backend == .stage2_c and comptime builtin.cpu.arch.isArmOrThumb()) return error.SkipZigTest;
|
||||
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isARM()) {
|
||||
// https://github.com/ziglang/zig/issues/16848
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
|
||||
try comptime testMulAdd128();
|
||||
try testMulAdd128();
|
||||
}
|
||||
|
@ -12,11 +12,6 @@ test "no clobbering happened" {
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isARM()) {
|
||||
// https://github.com/ziglang/zig/issues/16848
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
|
||||
@This().foo_function();
|
||||
@This().bar_function();
|
||||
try expect(@This().saw_foo_function);
|
||||
|
@ -66,11 +66,6 @@ test "float widening f16 to f128" {
|
||||
if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO
|
||||
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
||||
|
||||
if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isARM()) {
|
||||
// https://github.com/ziglang/zig/issues/16848
|
||||
return error.SkipZigTest;
|
||||
}
|
||||
|
||||
var x: f16 = 12.34;
|
||||
var y: f128 = x;
|
||||
try expect(x == y);
|
||||
|
Loading…
Reference in New Issue
Block a user