remove code, which is only reached if c_longdouble is only 16 or 32 bits big

This commit is contained in:
rpkak
2026-04-08 08:41:07 +02:00
parent e74b98227e
commit f564a7733c
20 changed files with 0 additions and 40 deletions
-2
View File
@@ -173,8 +173,6 @@ pub fn cosq(x: f128) callconv(.c) f128 {
pub fn cosl(x: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return cosh(x),
32 => return cosf(x),
64 => return cos(x),
80 => return cosx(x),
128 => return cosq(x),
-2
View File
@@ -198,8 +198,6 @@ const expq = @import("exp_f128.zig").exp;
pub fn expl(x: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return __exph(x),
32 => return expf(x),
64 => return exp(x),
80 => return __expx(x),
128 => return expq(x),
-2
View File
@@ -165,8 +165,6 @@ pub const exp2q = @import("exp_f128.zig").exp2;
pub fn exp2l(x: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return __exp2h(x),
32 => return exp2f(x),
64 => return exp2(x),
80 => return __exp2x(x),
128 => return exp2q(x),
-2
View File
@@ -38,8 +38,6 @@ pub fn fabsq(a: f128) callconv(.c) f128 {
pub fn fabsl(x: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return __fabsh(x),
32 => return fabsf(x),
64 => return fabs(x),
80 => return __fabsx(x),
128 => return fabsq(x),
-2
View File
@@ -151,8 +151,6 @@ pub fn fmaq(x: f128, y: f128, z: f128) callconv(.c) f128 {
pub fn fmal(x: c_longdouble, y: c_longdouble, z: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return __fmah(x, y, z),
32 => return fmaf(x, y, z),
64 => return fma(x, y, z),
80 => return __fmax(x, y, z),
128 => return fmaq(x, y, z),
-2
View File
@@ -39,8 +39,6 @@ pub fn fmaxq(x: f128, y: f128) callconv(.c) f128 {
pub fn fmaxl(x: c_longdouble, y: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return __fmaxh(x, y),
32 => return fmaxf(x, y),
64 => return fmax(x, y),
80 => return __fmaxx(x, y),
128 => return fmaxq(x, y),
-2
View File
@@ -39,8 +39,6 @@ pub fn fminq(x: f128, y: f128) callconv(.c) f128 {
pub fn fminl(x: c_longdouble, y: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return __fminh(x, y),
32 => return fminf(x, y),
64 => return fmin(x, y),
80 => return __fminx(x, y),
128 => return fminq(x, y),
-2
View File
@@ -251,8 +251,6 @@ pub fn fmodq(a: f128, b: f128) callconv(.c) f128 {
pub fn fmodl(a: c_longdouble, b: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return __fmodh(a, b),
32 => return fmodf(a, b),
64 => return fmod(a, b),
80 => return __fmodx(a, b),
128 => return fmodq(a, b),
-2
View File
@@ -443,8 +443,6 @@ pub fn logq(a: f128) callconv(.c) f128 {
pub fn logl(x: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return __logh(x),
32 => return logf(x),
64 => return log(x),
80 => return __logx(x),
128 => return logq(x),
-2
View File
@@ -177,8 +177,6 @@ pub fn log10q(a: f128) callconv(.c) f128 {
pub fn log10l(x: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return __log10h(x),
32 => return log10f(x),
64 => return log10(x),
80 => return __log10x(x),
128 => return log10q(x),
-2
View File
@@ -170,8 +170,6 @@ pub fn log2q(a: f128) callconv(.c) f128 {
pub fn log2l(x: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return __log2h(x),
32 => return log2f(x),
64 => return log2(x),
80 => return __log2x(x),
128 => return log2q(x),
-2
View File
@@ -142,8 +142,6 @@ pub fn roundq(x_: f128) callconv(.c) f128 {
pub fn roundl(x: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return __roundh(x),
32 => return roundf(x),
64 => return round(x),
80 => return __roundx(x),
128 => return roundq(x),
-2
View File
@@ -189,8 +189,6 @@ pub fn sinq(x: f128) callconv(.c) f128 {
pub fn sinl(x: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return sinh(x),
32 => return sinf(x),
64 => return sin(x),
80 => return sinx(x),
128 => return sinq(x),
-2
View File
@@ -292,8 +292,6 @@ pub fn sincosq(x: f128, r_sin: *f128, r_cos: *f128) callconv(.c) void {
pub fn sincosl(x: c_longdouble, r_sin: *c_longdouble, r_cos: *c_longdouble) callconv(.c) void {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return sincosh(x, r_sin, r_cos),
32 => return sincosf(x, r_sin, r_cos),
64 => return sincos(x, r_sin, r_cos),
80 => return sincosx(x, r_sin, r_cos),
128 => return sincosq(x, r_sin, r_cos),
-2
View File
@@ -481,8 +481,6 @@ fn _Qp_sqrt(c: *f128, a: *f128) callconv(.c) void {
pub fn sqrtl(x: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return __sqrth(x),
32 => return sqrtf(x),
64 => return sqrt(x),
80 => return __sqrtx(x),
128 => return sqrtq(x),
-2
View File
@@ -164,8 +164,6 @@ pub fn tanq(x: f128) callconv(.c) f128 {
pub fn tanl(x: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return tanh(x),
32 => return tanf(x),
64 => return tan(x),
80 => return tanx(x),
128 => return tanq(x),
-2
View File
@@ -99,8 +99,6 @@ pub fn truncq(x: f128) callconv(.c) f128 {
pub fn truncl(x: c_longdouble) callconv(.c) c_longdouble {
switch (@typeInfo(c_longdouble).float.bits) {
16 => return __trunch(x),
32 => return truncf(x),
64 => return trunc(x),
80 => return __truncx(x),
128 => return truncq(x),
-2
View File
@@ -3049,8 +3049,6 @@ pub fn cTypeByteSize(t: *const Target, c_type: CType) u16 {
=> @divExact(cTypeBitSize(t, c_type), 8),
.longdouble => switch (cTypeBitSize(t, c_type)) {
16 => 2,
32 => 4,
64 => 8,
80 => @intCast(std.mem.alignForward(usize, 10, cTypeAlignment(t, .longdouble))),
128 => 16,
-2
View File
@@ -12381,8 +12381,6 @@ pub const CallAbiIterator = struct {
.f128 => .quad,
.c_longdouble => switch (zcu.getTarget().cTypeBitSize(.longdouble)) {
else => unreachable,
16 => .half,
32 => .single,
64 => .double,
80 => null,
128 => .quad,
-2
View File
@@ -1838,8 +1838,6 @@ test "coerce between pointers of compatible differently-named floats" {
}
const F = switch (@typeInfo(c_longdouble).float.bits) {
16 => f16,
32 => f32,
64 => f64,
80 => f80,
128 => f128,