From: Luiz Capitulino <lcapitulino@redhat.com>
To: peter.maydell@linaro.org
Cc: qemu-devel@nongnu.org, anthony@codemonkey.ws
Subject: [Qemu-devel] [PULL 01/43] fpu: softfloat: drop INLINE macro
Date: Mon, 23 Jun 2014 12:36:01 -0400 [thread overview]
Message-ID: <1403541403-16468-2-git-send-email-lcapitulino@redhat.com> (raw)
In-Reply-To: <1403541403-16468-1-git-send-email-lcapitulino@redhat.com>
This commit expands all uses of the INLINE macro and drop it.
The reason for this is to avoid clashes with external libraries with
bad name conventions and also because renaming keywords is not a good
practice.
PS: I'm fine with this change to be licensed under softfloat-2a or
softfloat-2b.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
---
fpu/softfloat-macros.h | 38 +++++++++----------
fpu/softfloat.c | 48 ++++++++++++------------
include/fpu/softfloat.h | 99 ++++++++++++++++++++++++-------------------------
3 files changed, 92 insertions(+), 93 deletions(-)
diff --git a/fpu/softfloat-macros.h b/fpu/softfloat-macros.h
index 9b09545..0dcda93 100644
--- a/fpu/softfloat-macros.h
+++ b/fpu/softfloat-macros.h
@@ -55,7 +55,7 @@ these four paragraphs for those parts of this code that are retained.
| The result is stored in the location pointed to by `zPtr'.
*----------------------------------------------------------------------------*/
-INLINE void shift32RightJamming(uint32_t a, int_fast16_t count, uint32_t *zPtr)
+static inline void shift32RightJamming(uint32_t a, int_fast16_t count, uint32_t *zPtr)
{
uint32_t z;
@@ -81,7 +81,7 @@ INLINE void shift32RightJamming(uint32_t a, int_fast16_t count, uint32_t *zPtr)
| The result is stored in the location pointed to by `zPtr'.
*----------------------------------------------------------------------------*/
-INLINE void shift64RightJamming(uint64_t a, int_fast16_t count, uint64_t *zPtr)
+static inline void shift64RightJamming(uint64_t a, int_fast16_t count, uint64_t *zPtr)
{
uint64_t z;
@@ -115,7 +115,7 @@ INLINE void shift64RightJamming(uint64_t a, int_fast16_t count, uint64_t *zPtr)
| described above, and is returned at the location pointed to by `z1Ptr'.)
*----------------------------------------------------------------------------*/
-INLINE void
+static inline void
shift64ExtraRightJamming(
uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr)
{
@@ -152,7 +152,7 @@ INLINE void
| which are stored at the locations pointed to by `z0Ptr' and `z1Ptr'.
*----------------------------------------------------------------------------*/
-INLINE void
+static inline void
shift128Right(
uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr)
{
@@ -187,7 +187,7 @@ INLINE void
| the locations pointed to by `z0Ptr' and `z1Ptr'.
*----------------------------------------------------------------------------*/
-INLINE void
+static inline void
shift128RightJamming(
uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr)
{
@@ -238,7 +238,7 @@ INLINE void
| `z2Ptr'.)
*----------------------------------------------------------------------------*/
-INLINE void
+static inline void
shift128ExtraRightJamming(
uint64_t a0,
uint64_t a1,
@@ -296,7 +296,7 @@ INLINE void
| pieces which are stored at the locations pointed to by `z0Ptr' and `z1Ptr'.
*----------------------------------------------------------------------------*/
-INLINE void
+static inline void
shortShift128Left(
uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr)
{
@@ -315,7 +315,7 @@ INLINE void
| `z1Ptr', and `z2Ptr'.
*----------------------------------------------------------------------------*/
-INLINE void
+static inline void
shortShift192Left(
uint64_t a0,
uint64_t a1,
@@ -350,7 +350,7 @@ INLINE void
| are stored at the locations pointed to by `z0Ptr' and `z1Ptr'.
*----------------------------------------------------------------------------*/
-INLINE void
+static inline void
add128(
uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1, uint64_t *z0Ptr, uint64_t *z1Ptr )
{
@@ -370,7 +370,7 @@ INLINE void
| `z1Ptr', and `z2Ptr'.
*----------------------------------------------------------------------------*/
-INLINE void
+static inline void
add192(
uint64_t a0,
uint64_t a1,
@@ -408,7 +408,7 @@ INLINE void
| `z1Ptr'.
*----------------------------------------------------------------------------*/
-INLINE void
+static inline void
sub128(
uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1, uint64_t *z0Ptr, uint64_t *z1Ptr )
{
@@ -426,7 +426,7 @@ INLINE void
| pointed to by `z0Ptr', `z1Ptr', and `z2Ptr'.
*----------------------------------------------------------------------------*/
-INLINE void
+static inline void
sub192(
uint64_t a0,
uint64_t a1,
@@ -462,7 +462,7 @@ INLINE void
| `z0Ptr' and `z1Ptr'.
*----------------------------------------------------------------------------*/
-INLINE void mul64To128( uint64_t a, uint64_t b, uint64_t *z0Ptr, uint64_t *z1Ptr )
+static inline void mul64To128( uint64_t a, uint64_t b, uint64_t *z0Ptr, uint64_t *z1Ptr )
{
uint32_t aHigh, aLow, bHigh, bLow;
uint64_t z0, zMiddleA, zMiddleB, z1;
@@ -492,7 +492,7 @@ INLINE void mul64To128( uint64_t a, uint64_t b, uint64_t *z0Ptr, uint64_t *z1Ptr
| `z2Ptr'.
*----------------------------------------------------------------------------*/
-INLINE void
+static inline void
mul128By64To192(
uint64_t a0,
uint64_t a1,
@@ -520,7 +520,7 @@ INLINE void
| the locations pointed to by `z0Ptr', `z1Ptr', `z2Ptr', and `z3Ptr'.
*----------------------------------------------------------------------------*/
-INLINE void
+static inline void
mul128To256(
uint64_t a0,
uint64_t a1,
@@ -702,7 +702,7 @@ static int8 countLeadingZeros64( uint64_t a )
| Otherwise, returns 0.
*----------------------------------------------------------------------------*/
-INLINE flag eq128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 )
+static inline flag eq128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 )
{
return ( a0 == b0 ) && ( a1 == b1 );
@@ -715,7 +715,7 @@ INLINE flag eq128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 )
| Otherwise, returns 0.
*----------------------------------------------------------------------------*/
-INLINE flag le128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 )
+static inline flag le128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 )
{
return ( a0 < b0 ) || ( ( a0 == b0 ) && ( a1 <= b1 ) );
@@ -728,7 +728,7 @@ INLINE flag le128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 )
| returns 0.
*----------------------------------------------------------------------------*/
-INLINE flag lt128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 )
+static inline flag lt128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 )
{
return ( a0 < b0 ) || ( ( a0 == b0 ) && ( a1 < b1 ) );
@@ -741,7 +741,7 @@ INLINE flag lt128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 )
| Otherwise, returns 0.
*----------------------------------------------------------------------------*/
-INLINE flag ne128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 )
+static inline flag ne128( uint64_t a0, uint64_t a1, uint64_t b0, uint64_t b1 )
{
return ( a0 != b0 ) || ( a1 != b1 );
diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index e00a6fb..9274ebf 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -66,7 +66,7 @@ these four paragraphs for those parts of this code that are retained.
| Returns the fraction bits of the half-precision floating-point value `a'.
*----------------------------------------------------------------------------*/
-INLINE uint32_t extractFloat16Frac(float16 a)
+static inline uint32_t extractFloat16Frac(float16 a)
{
return float16_val(a) & 0x3ff;
}
@@ -75,7 +75,7 @@ INLINE uint32_t extractFloat16Frac(float16 a)
| Returns the exponent bits of the half-precision floating-point value `a'.
*----------------------------------------------------------------------------*/
-INLINE int_fast16_t extractFloat16Exp(float16 a)
+static inline int_fast16_t extractFloat16Exp(float16 a)
{
return (float16_val(a) >> 10) & 0x1f;
}
@@ -84,7 +84,7 @@ INLINE int_fast16_t extractFloat16Exp(float16 a)
| Returns the sign bit of the single-precision floating-point value `a'.
*----------------------------------------------------------------------------*/
-INLINE flag extractFloat16Sign(float16 a)
+static inline flag extractFloat16Sign(float16 a)
{
return float16_val(a)>>15;
}
@@ -255,7 +255,7 @@ static int64 roundAndPackUint64(flag zSign, uint64_t absZ0,
| Returns the fraction bits of the single-precision floating-point value `a'.
*----------------------------------------------------------------------------*/
-INLINE uint32_t extractFloat32Frac( float32 a )
+static inline uint32_t extractFloat32Frac( float32 a )
{
return float32_val(a) & 0x007FFFFF;
@@ -266,7 +266,7 @@ INLINE uint32_t extractFloat32Frac( float32 a )
| Returns the exponent bits of the single-precision floating-point value `a'.
*----------------------------------------------------------------------------*/
-INLINE int_fast16_t extractFloat32Exp(float32 a)
+static inline int_fast16_t extractFloat32Exp(float32 a)
{
return ( float32_val(a)>>23 ) & 0xFF;
@@ -277,7 +277,7 @@ INLINE int_fast16_t extractFloat32Exp(float32 a)
| Returns the sign bit of the single-precision floating-point value `a'.
*----------------------------------------------------------------------------*/
-INLINE flag extractFloat32Sign( float32 a )
+static inline flag extractFloat32Sign( float32 a )
{
return float32_val(a)>>31;
@@ -328,7 +328,7 @@ static void
| significand.
*----------------------------------------------------------------------------*/
-INLINE float32 packFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig)
+static inline float32 packFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig)
{
return make_float32(
@@ -440,7 +440,7 @@ static float32
| Returns the fraction bits of the double-precision floating-point value `a'.
*----------------------------------------------------------------------------*/
-INLINE uint64_t extractFloat64Frac( float64 a )
+static inline uint64_t extractFloat64Frac( float64 a )
{
return float64_val(a) & LIT64( 0x000FFFFFFFFFFFFF );
@@ -451,7 +451,7 @@ INLINE uint64_t extractFloat64Frac( float64 a )
| Returns the exponent bits of the double-precision floating-point value `a'.
*----------------------------------------------------------------------------*/
-INLINE int_fast16_t extractFloat64Exp(float64 a)
+static inline int_fast16_t extractFloat64Exp(float64 a)
{
return ( float64_val(a)>>52 ) & 0x7FF;
@@ -462,7 +462,7 @@ INLINE int_fast16_t extractFloat64Exp(float64 a)
| Returns the sign bit of the double-precision floating-point value `a'.
*----------------------------------------------------------------------------*/
-INLINE flag extractFloat64Sign( float64 a )
+static inline flag extractFloat64Sign( float64 a )
{
return float64_val(a)>>63;
@@ -513,7 +513,7 @@ static void
| significand.
*----------------------------------------------------------------------------*/
-INLINE float64 packFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig)
+static inline float64 packFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig)
{
return make_float64(
@@ -625,7 +625,7 @@ static float64
| value `a'.
*----------------------------------------------------------------------------*/
-INLINE uint64_t extractFloatx80Frac( floatx80 a )
+static inline uint64_t extractFloatx80Frac( floatx80 a )
{
return a.low;
@@ -637,7 +637,7 @@ INLINE uint64_t extractFloatx80Frac( floatx80 a )
| value `a'.
*----------------------------------------------------------------------------*/
-INLINE int32 extractFloatx80Exp( floatx80 a )
+static inline int32 extractFloatx80Exp( floatx80 a )
{
return a.high & 0x7FFF;
@@ -649,7 +649,7 @@ INLINE int32 extractFloatx80Exp( floatx80 a )
| `a'.
*----------------------------------------------------------------------------*/
-INLINE flag extractFloatx80Sign( floatx80 a )
+static inline flag extractFloatx80Sign( floatx80 a )
{
return a.high>>15;
@@ -679,7 +679,7 @@ static void
| extended double-precision floating-point value, returning the result.
*----------------------------------------------------------------------------*/
-INLINE floatx80 packFloatx80( flag zSign, int32 zExp, uint64_t zSig )
+static inline floatx80 packFloatx80( flag zSign, int32 zExp, uint64_t zSig )
{
floatx80 z;
@@ -921,7 +921,7 @@ static floatx80
| floating-point value `a'.
*----------------------------------------------------------------------------*/
-INLINE uint64_t extractFloat128Frac1( float128 a )
+static inline uint64_t extractFloat128Frac1( float128 a )
{
return a.low;
@@ -933,7 +933,7 @@ INLINE uint64_t extractFloat128Frac1( float128 a )
| floating-point value `a'.
*----------------------------------------------------------------------------*/
-INLINE uint64_t extractFloat128Frac0( float128 a )
+static inline uint64_t extractFloat128Frac0( float128 a )
{
return a.high & LIT64( 0x0000FFFFFFFFFFFF );
@@ -945,7 +945,7 @@ INLINE uint64_t extractFloat128Frac0( float128 a )
| `a'.
*----------------------------------------------------------------------------*/
-INLINE int32 extractFloat128Exp( float128 a )
+static inline int32 extractFloat128Exp( float128 a )
{
return ( a.high>>48 ) & 0x7FFF;
@@ -956,7 +956,7 @@ INLINE int32 extractFloat128Exp( float128 a )
| Returns the sign bit of the quadruple-precision floating-point value `a'.
*----------------------------------------------------------------------------*/
-INLINE flag extractFloat128Sign( float128 a )
+static inline flag extractFloat128Sign( float128 a )
{
return a.high>>63;
@@ -1017,7 +1017,7 @@ static void
| significand.
*----------------------------------------------------------------------------*/
-INLINE float128
+static inline float128
packFloat128( flag zSign, int32 zExp, uint64_t zSig0, uint64_t zSig1 )
{
float128 z;
@@ -7088,7 +7088,7 @@ uint64_t float64_to_uint64_round_to_zero (float64 a STATUS_PARAM)
}
#define COMPARE(s, nan_exp) \
-INLINE int float ## s ## _compare_internal( float ## s a, float ## s b, \
+static inline int float ## s ## _compare_internal( float ## s a, float ## s b, \
int is_quiet STATUS_PARAM ) \
{ \
flag aSign, bSign; \
@@ -7140,7 +7140,7 @@ int float ## s ## _compare_quiet( float ## s a, float ## s b STATUS_PARAM ) \
COMPARE(32, 0xff)
COMPARE(64, 0x7ff)
-INLINE int floatx80_compare_internal( floatx80 a, floatx80 b,
+static inline int floatx80_compare_internal( floatx80 a, floatx80 b,
int is_quiet STATUS_PARAM )
{
flag aSign, bSign;
@@ -7186,7 +7186,7 @@ int floatx80_compare_quiet( floatx80 a, floatx80 b STATUS_PARAM )
return floatx80_compare_internal(a, b, 1 STATUS_VAR);
}
-INLINE int float128_compare_internal( float128 a, float128 b,
+static inline int float128_compare_internal( float128 a, float128 b,
int is_quiet STATUS_PARAM )
{
flag aSign, bSign;
@@ -7242,7 +7242,7 @@ int float128_compare_quiet( float128 a, float128 b STATUS_PARAM )
* semantics provided by many CPUs which predate that specification.
*/
#define MINMAX(s) \
-INLINE float ## s float ## s ## _minmax(float ## s a, float ## s b, \
+static inline float ## s float ## s ## _minmax(float ## s a, float ## s b, \
int ismin, int isieee STATUS_PARAM) \
{ \
flag aSign, bSign; \
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h
index 4b3090c..77177c5 100644
--- a/include/fpu/softfloat.h
+++ b/include/fpu/softfloat.h
@@ -63,7 +63,6 @@ typedef uint64_t uint64;
typedef int64_t int64;
#define LIT64( a ) a##LL
-#define INLINE static inline
#define STATUS_PARAM , float_status *status
#define STATUS(field) status->field
@@ -181,59 +180,59 @@ typedef struct float_status {
flag default_nan_mode;
} float_status;
-INLINE void set_float_detect_tininess(int val STATUS_PARAM)
+static inline void set_float_detect_tininess(int val STATUS_PARAM)
{
STATUS(float_detect_tininess) = val;
}
-INLINE void set_float_rounding_mode(int val STATUS_PARAM)
+static inline void set_float_rounding_mode(int val STATUS_PARAM)
{
STATUS(float_rounding_mode) = val;
}
-INLINE void set_float_exception_flags(int val STATUS_PARAM)
+static inline void set_float_exception_flags(int val STATUS_PARAM)
{
STATUS(float_exception_flags) = val;
}
-INLINE void set_floatx80_rounding_precision(int val STATUS_PARAM)
+static inline void set_floatx80_rounding_precision(int val STATUS_PARAM)
{
STATUS(floatx80_rounding_precision) = val;
}
-INLINE void set_flush_to_zero(flag val STATUS_PARAM)
+static inline void set_flush_to_zero(flag val STATUS_PARAM)
{
STATUS(flush_to_zero) = val;
}
-INLINE void set_flush_inputs_to_zero(flag val STATUS_PARAM)
+static inline void set_flush_inputs_to_zero(flag val STATUS_PARAM)
{
STATUS(flush_inputs_to_zero) = val;
}
-INLINE void set_default_nan_mode(flag val STATUS_PARAM)
+static inline void set_default_nan_mode(flag val STATUS_PARAM)
{
STATUS(default_nan_mode) = val;
}
-INLINE int get_float_detect_tininess(float_status *status)
+static inline int get_float_detect_tininess(float_status *status)
{
return STATUS(float_detect_tininess);
}
-INLINE int get_float_rounding_mode(float_status *status)
+static inline int get_float_rounding_mode(float_status *status)
{
return STATUS(float_rounding_mode);
}
-INLINE int get_float_exception_flags(float_status *status)
+static inline int get_float_exception_flags(float_status *status)
{
return STATUS(float_exception_flags);
}
-INLINE int get_floatx80_rounding_precision(float_status *status)
+static inline int get_floatx80_rounding_precision(float_status *status)
{
return STATUS(floatx80_rounding_precision);
}
-INLINE flag get_flush_to_zero(float_status *status)
+static inline flag get_flush_to_zero(float_status *status)
{
return STATUS(flush_to_zero);
}
-INLINE flag get_flush_inputs_to_zero(float_status *status)
+static inline flag get_flush_inputs_to_zero(float_status *status)
{
return STATUS(flush_inputs_to_zero);
}
-INLINE flag get_default_nan_mode(float_status *status)
+static inline flag get_default_nan_mode(float_status *status)
{
return STATUS(default_nan_mode);
}
@@ -284,22 +283,22 @@ float128 int64_to_float128(int64_t STATUS_PARAM);
float128 uint64_to_float128(uint64_t STATUS_PARAM);
/* We provide the int16 versions for symmetry of API with float-to-int */
-INLINE float32 int16_to_float32(int16_t v STATUS_PARAM)
+static inline float32 int16_to_float32(int16_t v STATUS_PARAM)
{
return int32_to_float32(v STATUS_VAR);
}
-INLINE float32 uint16_to_float32(uint16_t v STATUS_PARAM)
+static inline float32 uint16_to_float32(uint16_t v STATUS_PARAM)
{
return uint32_to_float32(v STATUS_VAR);
}
-INLINE float64 int16_to_float64(int16_t v STATUS_PARAM)
+static inline float64 int16_to_float64(int16_t v STATUS_PARAM)
{
return int32_to_float64(v STATUS_VAR);
}
-INLINE float64 uint16_to_float64(uint16_t v STATUS_PARAM)
+static inline float64 uint16_to_float64(uint16_t v STATUS_PARAM)
{
return uint32_to_float64(v STATUS_VAR);
}
@@ -319,7 +318,7 @@ int float16_is_quiet_nan( float16 );
int float16_is_signaling_nan( float16 );
float16 float16_maybe_silence_nan( float16 );
-INLINE int float16_is_any_nan(float16 a)
+static inline int float16_is_any_nan(float16 a)
{
return ((float16_val(a) & ~0x8000) > 0x7c00);
}
@@ -380,7 +379,7 @@ int float32_is_signaling_nan( float32 );
float32 float32_maybe_silence_nan( float32 );
float32 float32_scalbn( float32, int STATUS_PARAM );
-INLINE float32 float32_abs(float32 a)
+static inline float32 float32_abs(float32 a)
{
/* Note that abs does *not* handle NaN specially, nor does
* it flush denormal inputs to zero.
@@ -388,7 +387,7 @@ INLINE float32 float32_abs(float32 a)
return make_float32(float32_val(a) & 0x7fffffff);
}
-INLINE float32 float32_chs(float32 a)
+static inline float32 float32_chs(float32 a)
{
/* Note that chs does *not* handle NaN specially, nor does
* it flush denormal inputs to zero.
@@ -396,32 +395,32 @@ INLINE float32 float32_chs(float32 a)
return make_float32(float32_val(a) ^ 0x80000000);
}
-INLINE int float32_is_infinity(float32 a)
+static inline int float32_is_infinity(float32 a)
{
return (float32_val(a) & 0x7fffffff) == 0x7f800000;
}
-INLINE int float32_is_neg(float32 a)
+static inline int float32_is_neg(float32 a)
{
return float32_val(a) >> 31;
}
-INLINE int float32_is_zero(float32 a)
+static inline int float32_is_zero(float32 a)
{
return (float32_val(a) & 0x7fffffff) == 0;
}
-INLINE int float32_is_any_nan(float32 a)
+static inline int float32_is_any_nan(float32 a)
{
return ((float32_val(a) & ~(1 << 31)) > 0x7f800000UL);
}
-INLINE int float32_is_zero_or_denormal(float32 a)
+static inline int float32_is_zero_or_denormal(float32 a)
{
return (float32_val(a) & 0x7f800000) == 0;
}
-INLINE float32 float32_set_sign(float32 a, int sign)
+static inline float32 float32_set_sign(float32 a, int sign)
{
return make_float32((float32_val(a) & 0x7fffffff) | (sign << 31));
}
@@ -490,7 +489,7 @@ int float64_is_signaling_nan( float64 );
float64 float64_maybe_silence_nan( float64 );
float64 float64_scalbn( float64, int STATUS_PARAM );
-INLINE float64 float64_abs(float64 a)
+static inline float64 float64_abs(float64 a)
{
/* Note that abs does *not* handle NaN specially, nor does
* it flush denormal inputs to zero.
@@ -498,7 +497,7 @@ INLINE float64 float64_abs(float64 a)
return make_float64(float64_val(a) & 0x7fffffffffffffffLL);
}
-INLINE float64 float64_chs(float64 a)
+static inline float64 float64_chs(float64 a)
{
/* Note that chs does *not* handle NaN specially, nor does
* it flush denormal inputs to zero.
@@ -506,32 +505,32 @@ INLINE float64 float64_chs(float64 a)
return make_float64(float64_val(a) ^ 0x8000000000000000LL);
}
-INLINE int float64_is_infinity(float64 a)
+static inline int float64_is_infinity(float64 a)
{
return (float64_val(a) & 0x7fffffffffffffffLL ) == 0x7ff0000000000000LL;
}
-INLINE int float64_is_neg(float64 a)
+static inline int float64_is_neg(float64 a)
{
return float64_val(a) >> 63;
}
-INLINE int float64_is_zero(float64 a)
+static inline int float64_is_zero(float64 a)
{
return (float64_val(a) & 0x7fffffffffffffffLL) == 0;
}
-INLINE int float64_is_any_nan(float64 a)
+static inline int float64_is_any_nan(float64 a)
{
return ((float64_val(a) & ~(1ULL << 63)) > 0x7ff0000000000000ULL);
}
-INLINE int float64_is_zero_or_denormal(float64 a)
+static inline int float64_is_zero_or_denormal(float64 a)
{
return (float64_val(a) & 0x7ff0000000000000LL) == 0;
}
-INLINE float64 float64_set_sign(float64 a, int sign)
+static inline float64 float64_set_sign(float64 a, int sign)
{
return make_float64((float64_val(a) & 0x7fffffffffffffffULL)
| ((int64_t)sign << 63));
@@ -585,39 +584,39 @@ int floatx80_is_signaling_nan( floatx80 );
floatx80 floatx80_maybe_silence_nan( floatx80 );
floatx80 floatx80_scalbn( floatx80, int STATUS_PARAM );
-INLINE floatx80 floatx80_abs(floatx80 a)
+static inline floatx80 floatx80_abs(floatx80 a)
{
a.high &= 0x7fff;
return a;
}
-INLINE floatx80 floatx80_chs(floatx80 a)
+static inline floatx80 floatx80_chs(floatx80 a)
{
a.high ^= 0x8000;
return a;
}
-INLINE int floatx80_is_infinity(floatx80 a)
+static inline int floatx80_is_infinity(floatx80 a)
{
return (a.high & 0x7fff) == 0x7fff && a.low == 0x8000000000000000LL;
}
-INLINE int floatx80_is_neg(floatx80 a)
+static inline int floatx80_is_neg(floatx80 a)
{
return a.high >> 15;
}
-INLINE int floatx80_is_zero(floatx80 a)
+static inline int floatx80_is_zero(floatx80 a)
{
return (a.high & 0x7fff) == 0 && a.low == 0;
}
-INLINE int floatx80_is_zero_or_denormal(floatx80 a)
+static inline int floatx80_is_zero_or_denormal(floatx80 a)
{
return (a.high & 0x7fff) == 0;
}
-INLINE int floatx80_is_any_nan(floatx80 a)
+static inline int floatx80_is_any_nan(floatx80 a)
{
return ((a.high & 0x7fff) == 0x7fff) && (a.low<<1);
}
@@ -670,39 +669,39 @@ int float128_is_signaling_nan( float128 );
float128 float128_maybe_silence_nan( float128 );
float128 float128_scalbn( float128, int STATUS_PARAM );
-INLINE float128 float128_abs(float128 a)
+static inline float128 float128_abs(float128 a)
{
a.high &= 0x7fffffffffffffffLL;
return a;
}
-INLINE float128 float128_chs(float128 a)
+static inline float128 float128_chs(float128 a)
{
a.high ^= 0x8000000000000000LL;
return a;
}
-INLINE int float128_is_infinity(float128 a)
+static inline int float128_is_infinity(float128 a)
{
return (a.high & 0x7fffffffffffffffLL) == 0x7fff000000000000LL && a.low == 0;
}
-INLINE int float128_is_neg(float128 a)
+static inline int float128_is_neg(float128 a)
{
return a.high >> 63;
}
-INLINE int float128_is_zero(float128 a)
+static inline int float128_is_zero(float128 a)
{
return (a.high & 0x7fffffffffffffffLL) == 0 && a.low == 0;
}
-INLINE int float128_is_zero_or_denormal(float128 a)
+static inline int float128_is_zero_or_denormal(float128 a)
{
return (a.high & 0x7fff000000000000LL) == 0;
}
-INLINE int float128_is_any_nan(float128 a)
+static inline int float128_is_any_nan(float128 a)
{
return ((a.high >> 48) & 0x7fff) == 0x7fff &&
((a.low != 0) || ((a.high & 0xffffffffffffLL) != 0));
--
1.9.3
next prev parent reply other threads:[~2014-06-23 16:37 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-23 16:36 [Qemu-devel] [PULL 00/43] QMP queue Luiz Capitulino
2014-06-23 16:36 ` Luiz Capitulino [this message]
2014-06-23 16:36 ` [Qemu-devel] [PULL 02/43] audio: fmopl: drop INLINE macro Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 03/43] qapi: fix coding style in parameters list Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 04/43] qapi: add const prefix to 'char *' insider c_type() Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 05/43] qapi: Suppress unwanted space between type and identifier Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 06/43] json-lexer: fix escaped backslash in single-quoted string Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 07/43] os-posix: include sys/time.h Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 08/43] qapi: Add includes from qapi/ as dependencies Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 09/43] qapi: add event helper functions Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 10/43] qapi script: add event support Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 11/43] test: add test cases for qapi event Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 12/43] qapi: adjust existing defines Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 13/43] monitor: add an implemention of qapi event emit method Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 14/43] qapi: add new schema file qapi-event.json Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 15/43] qapi event: convert SHUTDOWN Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 16/43] qapi event: convert POWERDOWN Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 17/43] qapi event: convert RESET Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 18/43] qapi event: convert STOP Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 19/43] qapi event: convert RESUME Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 20/43] qapi event: convert SUSPEND Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 21/43] qapi event: convert SUSPEND_DISK Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 22/43] qapi event: convert WAKEUP Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 23/43] qapi event: convert RTC_CHANGE Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 24/43] qapi event: convert WATCHDOG Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 25/43] qapi event: convert DEVICE_DELETED Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 26/43] qapi event: convert DEVICE_TRAY_MOVED Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 27/43] qapi event: convert BLOCK_IO_ERROR and BLOCK_JOB_ERROR Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 28/43] qapi event: convert BLOCK_IMAGE_CORRUPTED Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 29/43] qapi event: convert other BLOCK_JOB events Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 30/43] qapi event: convert NIC_RX_FILTER_CHANGED Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 31/43] qapi event: convert VNC events Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 32/43] qapi event: convert SPICE events Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 33/43] qmp: convert ACPI_DEVICE_OST event Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 34/43] qapi event: convert BALLOON_CHANGE Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 35/43] qapi event: convert GUEST_PANICKED Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 36/43] qapi event: convert QUORUM events Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 37/43] qapi event: clean up Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 38/43] qemu-char: introduce qemu_chr_alloc Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 39/43] qemu-char: do not call chr_write directly Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 40/43] qemu-char: move pty_chr_update_read_handler around Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 41/43] qemu-char: make writes thread-safe Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 42/43] monitor: protect outbuf and mux_out with mutex Luiz Capitulino
2014-06-23 16:36 ` [Qemu-devel] [PULL 43/43] monitor: protect event emission Luiz Capitulino
2014-06-23 16:39 ` [Qemu-devel] [PULL 00/43] QMP queue Luiz Capitulino
2014-06-23 16:40 ` Paolo Bonzini
2014-06-23 17:15 ` Eric Blake
2014-06-24 13:15 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403541403-16468-2-git-send-email-lcapitulino@redhat.com \
--to=lcapitulino@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).