diff options
| author | Linus Groh <mail@linusgroh.de> | 2025-03-03 18:01:47 +0000 |
|---|---|---|
| committer | Linus Groh <mail@linusgroh.de> | 2025-03-05 03:01:43 +0000 |
| commit | 79460d4a3eef8eb927b02a7eda8bc9999a766672 (patch) | |
| tree | 8ce2cfb123bf590e8c522860ad04c13b6e6d9aa9 /lib/compiler_rt/cos.zig | |
| parent | 05937b362a8206f7eca193a28617049371f11b26 (diff) | |
| download | zig-79460d4a3eef8eb927b02a7eda8bc9999a766672.tar.gz zig-79460d4a3eef8eb927b02a7eda8bc9999a766672.zip | |
Remove uses of deprecated callconv aliases
Diffstat (limited to 'lib/compiler_rt/cos.zig')
| -rw-r--r-- | lib/compiler_rt/cos.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/compiler_rt/cos.zig b/lib/compiler_rt/cos.zig index 5cbe5af6e8..01a5196232 100644 --- a/lib/compiler_rt/cos.zig +++ b/lib/compiler_rt/cos.zig @@ -22,12 +22,12 @@ comptime { @export(&cosl, .{ .name = "cosl", .linkage = common.linkage, .visibility = common.visibility }); } -pub fn __cosh(a: f16) callconv(.C) f16 { +pub fn __cosh(a: f16) callconv(.c) f16 { // TODO: more efficient implementation return @floatCast(cosf(a)); } -pub fn cosf(x: f32) callconv(.C) f32 { +pub fn cosf(x: f32) callconv(.c) f32 { // Small multiples of pi/2 rounded to double precision. const c1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18 const c2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18 @@ -84,7 +84,7 @@ pub fn cosf(x: f32) callconv(.C) f32 { }; } -pub fn cos(x: f64) callconv(.C) f64 { +pub fn cos(x: f64) callconv(.c) f64 { var ix = @as(u64, @bitCast(x)) >> 32; ix &= 0x7fffffff; @@ -113,17 +113,17 @@ pub fn cos(x: f64) callconv(.C) f64 { }; } -pub fn __cosx(a: f80) callconv(.C) f80 { +pub fn __cosx(a: f80) callconv(.c) f80 { // TODO: more efficient implementation return @floatCast(cosq(a)); } -pub fn cosq(a: f128) callconv(.C) f128 { +pub fn cosq(a: f128) callconv(.c) f128 { // TODO: more correct implementation return cos(@floatCast(a)); } -pub fn cosl(x: c_longdouble) callconv(.C) c_longdouble { +pub fn cosl(x: c_longdouble) callconv(.c) c_longdouble { switch (@typeInfo(c_longdouble).float.bits) { 16 => return __cosh(x), 32 => return cosf(x), |
