1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-19 21:32:19 +00:00

guard some more things with ifdef DOUBLES, removes some warnings

This commit is contained in:
mrdudz 2022-09-17 16:52:24 +02:00
parent 09d383dd32
commit 13dd4e296f
2 changed files with 28 additions and 0 deletions

View File

@ -49,6 +49,7 @@ INLINE void shift32RightJamming( bits32 a, int16 count, bits32 *zPtr )
}
#ifdef DOUBLES
/*----------------------------------------------------------------------------
| Shifts the 64-bit value formed by concatenating `a0' and `a1' right by the
| number of bits given in `count'. Any bits shifted off are lost. The value
@ -80,7 +81,9 @@ INLINE void
*z0Ptr = z0;
}
#endif
#ifdef DOUBLES
/*----------------------------------------------------------------------------
| Shifts the 64-bit value formed by concatenating `a0' and `a1' right by the
| number of bits given in `count'. If any nonzero bits are shifted off, they
@ -123,7 +126,9 @@ INLINE void
*z0Ptr = z0;
}
#endif
#ifdef DOUBLES
/*----------------------------------------------------------------------------
| Shifts the 96-bit value formed by concatenating `a0', `a1', and `a2' right
| by 32 _plus_ the number of bits given in `count'. The shifted result is
@ -193,6 +198,7 @@ INLINE void
*z0Ptr = z0;
}
#endif
/*----------------------------------------------------------------------------
| Shifts the 64-bit value formed by concatenating `a0' and `a1' left by the
@ -212,6 +218,7 @@ INLINE void
}
#ifdef DOUBLES
/*----------------------------------------------------------------------------
| Shifts the 96-bit value formed by concatenating `a0', `a1', and `a2' left
| by the number of bits given in `count'. Any bits shifted off are lost.
@ -247,6 +254,7 @@ INLINE void
*z0Ptr = z0;
}
#endif
/*----------------------------------------------------------------------------
| Adds the 64-bit value formed by concatenating `a0' and `a1' to the 64-bit
@ -267,6 +275,7 @@ INLINE void
}
#ifdef DOUBLES
/*----------------------------------------------------------------------------
| Adds the 96-bit value formed by concatenating `a0', `a1', and `a2' to the
| 96-bit value formed by concatenating `b0', `b1', and `b2'. Addition is
@ -304,6 +313,7 @@ INLINE void
*z0Ptr = z0;
}
#endif
/*----------------------------------------------------------------------------
| Subtracts the 64-bit value formed by concatenating `b0' and `b1' from the
@ -323,6 +333,7 @@ INLINE void
}
#ifdef DOUBLES
/*----------------------------------------------------------------------------
| Subtracts the 96-bit value formed by concatenating `b0', `b1', and `b2' from
| the 96-bit value formed by concatenating `a0', `a1', and `a2'. Subtraction
@ -360,6 +371,7 @@ INLINE void
*z0Ptr = z0;
}
#endif
/*----------------------------------------------------------------------------
| Multiplies `a' by `b' to obtain a 64-bit product. The product is broken
@ -390,6 +402,7 @@ INLINE void mul32To64( bits32 a, bits32 b, bits32 *z0Ptr, bits32 *z1Ptr )
}
#ifdef DOUBLES
/*----------------------------------------------------------------------------
| Multiplies the 64-bit value formed by concatenating `a0' and `a1' by `b'
| to obtain a 96-bit product. The product is broken into three 32-bit pieces
@ -417,7 +430,9 @@ INLINE void
*z0Ptr = z0;
}
#endif
#ifdef DOUBLES
/*----------------------------------------------------------------------------
| Multiplies the 64-bit value formed by concatenating `a0' and `a1' to the
| 64-bit value formed by concatenating `b0' and `b1' to obtain a 128-bit
@ -454,6 +469,7 @@ INLINE void
*z0Ptr = z0;
}
#endif
/*----------------------------------------------------------------------------
| Returns an approximation to the 32-bit integer quotient obtained by dividing
@ -566,6 +582,7 @@ static int8 countLeadingZeros32( bits32 a )
}
#ifdef DOUBLES
/*----------------------------------------------------------------------------
| Returns 1 if the 64-bit value formed by concatenating `a0' and `a1' is
| equal to the 64-bit value formed by concatenating `b0' and `b1'. Otherwise,
@ -578,7 +595,9 @@ INLINE flag eq64( bits32 a0, bits32 a1, bits32 b0, bits32 b1 )
return ( a0 == b0 ) && ( a1 == b1 );
}
#endif
#ifdef DOUBLES
/*----------------------------------------------------------------------------
| Returns 1 if the 64-bit value formed by concatenating `a0' and `a1' is less
| than or equal to the 64-bit value formed by concatenating `b0' and `b1'.
@ -591,7 +610,9 @@ INLINE flag le64( bits32 a0, bits32 a1, bits32 b0, bits32 b1 )
return ( a0 < b0 ) || ( ( a0 == b0 ) && ( a1 <= b1 ) );
}
#endif
#ifdef DOUBLES
/*----------------------------------------------------------------------------
| Returns 1 if the 64-bit value formed by concatenating `a0' and `a1' is less
| than the 64-bit value formed by concatenating `b0' and `b1'. Otherwise,
@ -604,7 +625,9 @@ INLINE flag lt64( bits32 a0, bits32 a1, bits32 b0, bits32 b1 )
return ( a0 < b0 ) || ( ( a0 == b0 ) && ( a1 < b1 ) );
}
#endif
#ifdef DOUBLES
/*----------------------------------------------------------------------------
| Returns 1 if the 64-bit value formed by concatenating `a0' and `a1' is not
| equal to the 64-bit value formed by concatenating `b0' and `b1'. Otherwise,
@ -617,4 +640,5 @@ INLINE flag ne64( bits32 a0, bits32 a1, bits32 b0, bits32 b1 )
return ( a0 != b0 ) || ( a1 != b1 );
}
#endif

View File

@ -82,6 +82,7 @@ flag float32_is_signaling_nan( float32 a )
}
#ifdef DOUBLES
/*----------------------------------------------------------------------------
| Returns the result of converting the single-precision floating-point NaN
| `a' to the canonical NaN format. If `a' is a signaling NaN, the invalid
@ -98,7 +99,9 @@ static commonNaNT *float32ToCommonNaN( float32 a )
z.high = a<<9;
return &z;
}
#endif
#ifdef DOUBLES
/*----------------------------------------------------------------------------
| Returns the result of converting the canonical NaN `a' to the single-
| precision floating-point format.
@ -110,6 +113,7 @@ static float32 commonNaNToFloat32( commonNaNT *a )
return ( ( (bits32) a->sign )<<31 ) | 0x7FC00000 | ( a->high>>9 );
}
#endif
/*----------------------------------------------------------------------------
| Takes two single-precision floating-point values `a' and `b', one of which