zig/lib/compiler_rt/negxf2.zig
Andrew Kelley 6bc6e47b15 stage2: lower float negation explicitly
Rather than lowering float negation as `0.0 - x`.

 * Add AIR instruction for float negation.
 * Add compiler-rt functions for f128, f80 negation

closes #11853
2022-06-30 00:02:00 -07:00

12 lines
231 B
Zig

const common = @import("./common.zig");
pub const panic = common.panic;
comptime {
@export(__negxf2, .{ .name = "__negxf2", .linkage = common.linkage });
}
fn __negxf2(a: f80) callconv(.C) f80 {
return common.fneg(a);
}