master
 1///! The quoted behavior definitions are from
 2///! https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gccint/Soft-float-library-routines.html#Soft-float-library-routines
 3const common = @import("./common.zig");
 4const comparef = @import("./comparef.zig");
 5
 6pub const panic = common.panic;
 7
 8comptime {
 9    @export(&__gehf2, .{ .name = "__gehf2", .linkage = common.linkage, .visibility = common.visibility });
10    @export(&__gthf2, .{ .name = "__gthf2", .linkage = common.linkage, .visibility = common.visibility });
11}
12
13/// "These functions return a value greater than or equal to zero if neither
14/// argument is NaN, and a is greater than or equal to b."
15pub fn __gehf2(a: f16, b: f16) callconv(.c) i32 {
16    return @intFromEnum(comparef.cmpf2(f16, comparef.GE, a, b));
17}
18
19/// "These functions return a value greater than zero if neither argument is NaN,
20/// and a is strictly greater than b."
21pub fn __gthf2(a: f16, b: f16) callconv(.c) i32 {
22    return __gehf2(a, b);
23}