mirror of https://gitee.com/openkylin/qemu.git
softfloat queue:
* update MAINTAINERS with a section for softfloat * drop all the uses of int_fast*_t types -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCAAGBQJWx0QbAAoJEDwlJe0UNgzeCZ0P/i2sh58fwv40t2cauYqDdnJo a0bZCB2twC0aAf8czscBg9oI+nZ64SG1+Q0oGjfo4QAp2pcUGamGVcddzSNn99/9 LR7U09T8mpzLcaKYdk3SjzMJVmaHaztCnYYeqEUFgZNOccKWsC9vERiy6uqkstHN UG0N1ZN96eV70ctBYUUOoLZl8BSb/xVG+z3uDlGD2PJLehBNutaQDqjZcQK33NQN SrjjkMjfl6Qeylt7Hq1Ixa+k0I5zQA0998RPjAQEkIgDkqThE2GP8XPfBDqDFH8f MBeq6TShTRaGpjXv6JLGX/Nw6f82QEmx9ke+7JTYwxkcNbiHKvXSC4qrqn8mCfoN ggZDefWN5nk1uCpKzRa0GPrFkXoQWvOYZnqxaMp4/hF6qct9ygg2OB/BdWguikN0 0+AdtYUkjnsSTO9QYpnMv/RuU/NJ+Tslhd+tzqYO0bYZY6Fx+c7+YQYZuJOHkqcd UbCAUExZuuBjIrI80IogHvn7ZAb/jWnS1xGbKpyko0D+lDmnJtEA2QeVu680ZW9M NglZj301ggLisq5xfGqIwk/suTiIHVqnWFG+Ub9EHjjYKhXkSnKnoT8uMdQ0mHvX 4otfdnJ1+XeaKChRWTJ6KHdEy2rlaUaSKE99dk9Z1OCHcBalzMOryHqlrixI4MIZ /gmRK0hJJ0PDOXEKwBMt =bjQ9 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/pmaydell/tags/pull-softfloat-20160219' into staging softfloat queue: * update MAINTAINERS with a section for softfloat * drop all the uses of int_fast*_t types # gpg: Signature made Fri 19 Feb 2016 16:34:35 GMT using RSA key ID 14360CDE # gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" # gpg: aka "Peter Maydell <pmaydell@gmail.com>" # gpg: aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" * remotes/pmaydell/tags/pull-softfloat-20160219: MAINTAINERS: Add section for FPU emulation osdep.h: Remove int_fast*_t Solaris compatibility code fpu: Use plain 'int' rather than 'int_fast16_t' for exponents fpu: Use plain 'int' rather than 'int_fast16_t' for shift counts fpu: Remove use of int_fast16_t in conversions to int16 target-mips: Stop using uint_fast*_t types in r4k_tlb_t struct Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
3ba32c100a
|
@ -84,6 +84,13 @@ F: include/exec/exec-all.h
|
|||
F: include/exec/helper*.h
|
||||
F: include/exec/tb-hash.h
|
||||
|
||||
FPU emulation
|
||||
M: Aurelien Jarno <aurelien@aurel32.net>
|
||||
M: Peter Maydell <peter.maydell@linaro.org>
|
||||
S: Odd Fixes
|
||||
F: fpu/
|
||||
F: include/fpu/
|
||||
|
||||
Alpha
|
||||
M: Richard Henderson <rth@twiddle.net>
|
||||
S: Maintained
|
||||
|
|
|
@ -99,7 +99,7 @@ this code that are retained.
|
|||
| The result is stored in the location pointed to by `zPtr'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static inline void shift32RightJamming(uint32_t a, int_fast16_t count, uint32_t *zPtr)
|
||||
static inline void shift32RightJamming(uint32_t a, int count, uint32_t *zPtr)
|
||||
{
|
||||
uint32_t z;
|
||||
|
||||
|
@ -125,7 +125,7 @@ static inline void shift32RightJamming(uint32_t a, int_fast16_t count, uint32_t
|
|||
| The result is stored in the location pointed to by `zPtr'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static inline void shift64RightJamming(uint64_t a, int_fast16_t count, uint64_t *zPtr)
|
||||
static inline void shift64RightJamming(uint64_t a, int count, uint64_t *zPtr)
|
||||
{
|
||||
uint64_t z;
|
||||
|
||||
|
@ -161,7 +161,7 @@ static inline void shift64RightJamming(uint64_t a, int_fast16_t count, uint64_t
|
|||
|
||||
static inline void
|
||||
shift64ExtraRightJamming(
|
||||
uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr)
|
||||
uint64_t a0, uint64_t a1, int count, uint64_t *z0Ptr, uint64_t *z1Ptr)
|
||||
{
|
||||
uint64_t z0, z1;
|
||||
int8_t negCount = ( - count ) & 63;
|
||||
|
@ -198,7 +198,7 @@ static inline void
|
|||
|
||||
static inline void
|
||||
shift128Right(
|
||||
uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr)
|
||||
uint64_t a0, uint64_t a1, int count, uint64_t *z0Ptr, uint64_t *z1Ptr)
|
||||
{
|
||||
uint64_t z0, z1;
|
||||
int8_t negCount = ( - count ) & 63;
|
||||
|
@ -233,7 +233,7 @@ static inline void
|
|||
|
||||
static inline void
|
||||
shift128RightJamming(
|
||||
uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr)
|
||||
uint64_t a0, uint64_t a1, int count, uint64_t *z0Ptr, uint64_t *z1Ptr)
|
||||
{
|
||||
uint64_t z0, z1;
|
||||
int8_t negCount = ( - count ) & 63;
|
||||
|
@ -287,7 +287,7 @@ static inline void
|
|||
uint64_t a0,
|
||||
uint64_t a1,
|
||||
uint64_t a2,
|
||||
int_fast16_t count,
|
||||
int count,
|
||||
uint64_t *z0Ptr,
|
||||
uint64_t *z1Ptr,
|
||||
uint64_t *z2Ptr
|
||||
|
@ -342,7 +342,7 @@ static inline void
|
|||
|
||||
static inline void
|
||||
shortShift128Left(
|
||||
uint64_t a0, uint64_t a1, int_fast16_t count, uint64_t *z0Ptr, uint64_t *z1Ptr)
|
||||
uint64_t a0, uint64_t a1, int count, uint64_t *z0Ptr, uint64_t *z1Ptr)
|
||||
{
|
||||
|
||||
*z1Ptr = a1<<count;
|
||||
|
@ -364,7 +364,7 @@ static inline void
|
|||
uint64_t a0,
|
||||
uint64_t a1,
|
||||
uint64_t a2,
|
||||
int_fast16_t count,
|
||||
int count,
|
||||
uint64_t *z0Ptr,
|
||||
uint64_t *z1Ptr,
|
||||
uint64_t *z2Ptr
|
||||
|
@ -635,7 +635,7 @@ static uint64_t estimateDiv128To64( uint64_t a0, uint64_t a1, uint64_t b )
|
|||
| value.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static uint32_t estimateSqrt32(int_fast16_t aExp, uint32_t a)
|
||||
static uint32_t estimateSqrt32(int aExp, uint32_t a)
|
||||
{
|
||||
static const uint16_t sqrtOddAdjustments[] = {
|
||||
0x0004, 0x0022, 0x005D, 0x00B1, 0x011D, 0x019F, 0x0236, 0x02E0,
|
||||
|
|
162
fpu/softfloat.c
162
fpu/softfloat.c
|
@ -118,7 +118,7 @@ static inline uint32_t extractFloat16Frac(float16 a)
|
|||
| Returns the exponent bits of the half-precision floating-point value `a'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static inline int_fast16_t extractFloat16Exp(float16 a)
|
||||
static inline int extractFloat16Exp(float16 a)
|
||||
{
|
||||
return (float16_val(a) >> 10) & 0x1f;
|
||||
}
|
||||
|
@ -314,7 +314,7 @@ static inline uint32_t extractFloat32Frac( float32 a )
|
|||
| Returns the exponent bits of the single-precision floating-point value `a'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static inline int_fast16_t extractFloat32Exp(float32 a)
|
||||
static inline int extractFloat32Exp(float32 a)
|
||||
{
|
||||
|
||||
return ( float32_val(a)>>23 ) & 0xFF;
|
||||
|
@ -355,7 +355,7 @@ float32 float32_squash_input_denormal(float32 a, float_status *status)
|
|||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static void
|
||||
normalizeFloat32Subnormal(uint32_t aSig, int_fast16_t *zExpPtr, uint32_t *zSigPtr)
|
||||
normalizeFloat32Subnormal(uint32_t aSig, int *zExpPtr, uint32_t *zSigPtr)
|
||||
{
|
||||
int8_t shiftCount;
|
||||
|
||||
|
@ -376,7 +376,7 @@ static void
|
|||
| significand.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static inline float32 packFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig)
|
||||
static inline float32 packFloat32(flag zSign, int zExp, uint32_t zSig)
|
||||
{
|
||||
|
||||
return make_float32(
|
||||
|
@ -406,7 +406,7 @@ static inline float32 packFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig)
|
|||
| Binary Floating-Point Arithmetic.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static float32 roundAndPackFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig,
|
||||
static float32 roundAndPackFloat32(flag zSign, int zExp, uint32_t zSig,
|
||||
float_status *status)
|
||||
{
|
||||
int8_t roundingMode;
|
||||
|
@ -481,7 +481,7 @@ static float32 roundAndPackFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig,
|
|||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static float32
|
||||
normalizeRoundAndPackFloat32(flag zSign, int_fast16_t zExp, uint32_t zSig,
|
||||
normalizeRoundAndPackFloat32(flag zSign, int zExp, uint32_t zSig,
|
||||
float_status *status)
|
||||
{
|
||||
int8_t shiftCount;
|
||||
|
@ -507,7 +507,7 @@ static inline uint64_t extractFloat64Frac( float64 a )
|
|||
| Returns the exponent bits of the double-precision floating-point value `a'.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static inline int_fast16_t extractFloat64Exp(float64 a)
|
||||
static inline int extractFloat64Exp(float64 a)
|
||||
{
|
||||
|
||||
return ( float64_val(a)>>52 ) & 0x7FF;
|
||||
|
@ -548,7 +548,7 @@ float64 float64_squash_input_denormal(float64 a, float_status *status)
|
|||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static void
|
||||
normalizeFloat64Subnormal(uint64_t aSig, int_fast16_t *zExpPtr, uint64_t *zSigPtr)
|
||||
normalizeFloat64Subnormal(uint64_t aSig, int *zExpPtr, uint64_t *zSigPtr)
|
||||
{
|
||||
int8_t shiftCount;
|
||||
|
||||
|
@ -569,7 +569,7 @@ static void
|
|||
| significand.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static inline float64 packFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig)
|
||||
static inline float64 packFloat64(flag zSign, int zExp, uint64_t zSig)
|
||||
{
|
||||
|
||||
return make_float64(
|
||||
|
@ -599,12 +599,12 @@ static inline float64 packFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig)
|
|||
| Binary Floating-Point Arithmetic.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static float64 roundAndPackFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig,
|
||||
static float64 roundAndPackFloat64(flag zSign, int zExp, uint64_t zSig,
|
||||
float_status *status)
|
||||
{
|
||||
int8_t roundingMode;
|
||||
flag roundNearestEven;
|
||||
int_fast16_t roundIncrement, roundBits;
|
||||
int roundIncrement, roundBits;
|
||||
flag isTiny;
|
||||
|
||||
roundingMode = status->float_rounding_mode;
|
||||
|
@ -673,7 +673,7 @@ static float64 roundAndPackFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig,
|
|||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static float64
|
||||
normalizeRoundAndPackFloat64(flag zSign, int_fast16_t zExp, uint64_t zSig,
|
||||
normalizeRoundAndPackFloat64(flag zSign, int zExp, uint64_t zSig,
|
||||
float_status *status)
|
||||
{
|
||||
int8_t shiftCount;
|
||||
|
@ -1543,7 +1543,8 @@ float128 uint64_to_float128(uint64_t a, float_status *status)
|
|||
int32_t float32_to_int32(float32 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp, shiftCount;
|
||||
int aExp;
|
||||
int shiftCount;
|
||||
uint32_t aSig;
|
||||
uint64_t aSig64;
|
||||
|
||||
|
@ -1574,7 +1575,8 @@ int32_t float32_to_int32(float32 a, float_status *status)
|
|||
int32_t float32_to_int32_round_to_zero(float32 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp, shiftCount;
|
||||
int aExp;
|
||||
int shiftCount;
|
||||
uint32_t aSig;
|
||||
int32_t z;
|
||||
a = float32_squash_input_denormal(a, status);
|
||||
|
@ -1616,10 +1618,11 @@ int32_t float32_to_int32_round_to_zero(float32 a, float_status *status)
|
|||
| returned.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
int_fast16_t float32_to_int16_round_to_zero(float32 a, float_status *status)
|
||||
int16_t float32_to_int16_round_to_zero(float32 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp, shiftCount;
|
||||
int aExp;
|
||||
int shiftCount;
|
||||
uint32_t aSig;
|
||||
int32_t z;
|
||||
|
||||
|
@ -1668,7 +1671,8 @@ int_fast16_t float32_to_int16_round_to_zero(float32 a, float_status *status)
|
|||
int64_t float32_to_int64(float32 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp, shiftCount;
|
||||
int aExp;
|
||||
int shiftCount;
|
||||
uint32_t aSig;
|
||||
uint64_t aSig64, aSigExtra;
|
||||
a = float32_squash_input_denormal(a, status);
|
||||
|
@ -1707,7 +1711,8 @@ int64_t float32_to_int64(float32 a, float_status *status)
|
|||
uint64_t float32_to_uint64(float32 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp, shiftCount;
|
||||
int aExp;
|
||||
int shiftCount;
|
||||
uint32_t aSig;
|
||||
uint64_t aSig64, aSigExtra;
|
||||
a = float32_squash_input_denormal(a, status);
|
||||
|
@ -1771,7 +1776,8 @@ uint64_t float32_to_uint64_round_to_zero(float32 a, float_status *status)
|
|||
int64_t float32_to_int64_round_to_zero(float32 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp, shiftCount;
|
||||
int aExp;
|
||||
int shiftCount;
|
||||
uint32_t aSig;
|
||||
uint64_t aSig64;
|
||||
int64_t z;
|
||||
|
@ -1817,7 +1823,7 @@ int64_t float32_to_int64_round_to_zero(float32 a, float_status *status)
|
|||
float64 float32_to_float64(float32 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint32_t aSig;
|
||||
a = float32_squash_input_denormal(a, status);
|
||||
|
||||
|
@ -1849,7 +1855,7 @@ float64 float32_to_float64(float32 a, float_status *status)
|
|||
floatx80 float32_to_floatx80(float32 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint32_t aSig;
|
||||
|
||||
a = float32_squash_input_denormal(a, status);
|
||||
|
@ -1881,7 +1887,7 @@ floatx80 float32_to_floatx80(float32 a, float_status *status)
|
|||
float128 float32_to_float128(float32 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint32_t aSig;
|
||||
|
||||
a = float32_squash_input_denormal(a, status);
|
||||
|
@ -1913,7 +1919,7 @@ float128 float32_to_float128(float32 a, float_status *status)
|
|||
float32 float32_round_to_int(float32 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint32_t lastBitMask, roundBitsMask;
|
||||
uint32_t z;
|
||||
a = float32_squash_input_denormal(a, status);
|
||||
|
@ -1995,9 +2001,9 @@ float32 float32_round_to_int(float32 a, float_status *status)
|
|||
static float32 addFloat32Sigs(float32 a, float32 b, flag zSign,
|
||||
float_status *status)
|
||||
{
|
||||
int_fast16_t aExp, bExp, zExp;
|
||||
int aExp, bExp, zExp;
|
||||
uint32_t aSig, bSig, zSig;
|
||||
int_fast16_t expDiff;
|
||||
int expDiff;
|
||||
|
||||
aSig = extractFloat32Frac( a );
|
||||
aExp = extractFloat32Exp( a );
|
||||
|
@ -2081,9 +2087,9 @@ static float32 addFloat32Sigs(float32 a, float32 b, flag zSign,
|
|||
static float32 subFloat32Sigs(float32 a, float32 b, flag zSign,
|
||||
float_status *status)
|
||||
{
|
||||
int_fast16_t aExp, bExp, zExp;
|
||||
int aExp, bExp, zExp;
|
||||
uint32_t aSig, bSig, zSig;
|
||||
int_fast16_t expDiff;
|
||||
int expDiff;
|
||||
|
||||
aSig = extractFloat32Frac( a );
|
||||
aExp = extractFloat32Exp( a );
|
||||
|
@ -2207,7 +2213,7 @@ float32 float32_sub(float32 a, float32 b, float_status *status)
|
|||
float32 float32_mul(float32 a, float32 b, float_status *status)
|
||||
{
|
||||
flag aSign, bSign, zSign;
|
||||
int_fast16_t aExp, bExp, zExp;
|
||||
int aExp, bExp, zExp;
|
||||
uint32_t aSig, bSig;
|
||||
uint64_t zSig64;
|
||||
uint32_t zSig;
|
||||
|
@ -2272,7 +2278,7 @@ float32 float32_mul(float32 a, float32 b, float_status *status)
|
|||
float32 float32_div(float32 a, float32 b, float_status *status)
|
||||
{
|
||||
flag aSign, bSign, zSign;
|
||||
int_fast16_t aExp, bExp, zExp;
|
||||
int aExp, bExp, zExp;
|
||||
uint32_t aSig, bSig, zSig;
|
||||
a = float32_squash_input_denormal(a, status);
|
||||
b = float32_squash_input_denormal(b, status);
|
||||
|
@ -2342,7 +2348,7 @@ float32 float32_div(float32 a, float32 b, float_status *status)
|
|||
float32 float32_rem(float32 a, float32 b, float_status *status)
|
||||
{
|
||||
flag aSign, zSign;
|
||||
int_fast16_t aExp, bExp, expDiff;
|
||||
int aExp, bExp, expDiff;
|
||||
uint32_t aSig, bSig;
|
||||
uint32_t q;
|
||||
uint64_t aSig64, bSig64, q64;
|
||||
|
@ -2450,7 +2456,7 @@ float32 float32_muladd(float32 a, float32 b, float32 c, int flags,
|
|||
float_status *status)
|
||||
{
|
||||
flag aSign, bSign, cSign, zSign;
|
||||
int_fast16_t aExp, bExp, cExp, pExp, zExp, expDiff;
|
||||
int aExp, bExp, cExp, pExp, zExp, expDiff;
|
||||
uint32_t aSig, bSig, cSig;
|
||||
flag pInf, pZero, pSign;
|
||||
uint64_t pSig64, cSig64, zSig64;
|
||||
|
@ -2670,7 +2676,7 @@ float32 float32_muladd(float32 a, float32 b, float32 c, int flags,
|
|||
float32 float32_sqrt(float32 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp, zExp;
|
||||
int aExp, zExp;
|
||||
uint32_t aSig, zSig;
|
||||
uint64_t rem, term;
|
||||
a = float32_squash_input_denormal(a, status);
|
||||
|
@ -2758,7 +2764,7 @@ static const float64 float32_exp2_coefficients[15] =
|
|||
float32 float32_exp2(float32 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint32_t aSig;
|
||||
float64 r, x, xn;
|
||||
int i;
|
||||
|
@ -2808,7 +2814,7 @@ float32 float32_exp2(float32 a, float_status *status)
|
|||
float32 float32_log2(float32 a, float_status *status)
|
||||
{
|
||||
flag aSign, zSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint32_t aSig, zSig, i;
|
||||
|
||||
a = float32_squash_input_denormal(a, status);
|
||||
|
@ -3075,7 +3081,8 @@ int float32_unordered_quiet(float32 a, float32 b, float_status *status)
|
|||
int32_t float64_to_int32(float64 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp, shiftCount;
|
||||
int aExp;
|
||||
int shiftCount;
|
||||
uint64_t aSig;
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
|
||||
|
@ -3103,7 +3110,8 @@ int32_t float64_to_int32(float64 a, float_status *status)
|
|||
int32_t float64_to_int32_round_to_zero(float64 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp, shiftCount;
|
||||
int aExp;
|
||||
int shiftCount;
|
||||
uint64_t aSig, savedASig;
|
||||
int32_t z;
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
|
@ -3149,10 +3157,11 @@ int32_t float64_to_int32_round_to_zero(float64 a, float_status *status)
|
|||
| returned.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
int_fast16_t float64_to_int16_round_to_zero(float64 a, float_status *status)
|
||||
int16_t float64_to_int16_round_to_zero(float64 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp, shiftCount;
|
||||
int aExp;
|
||||
int shiftCount;
|
||||
uint64_t aSig, savedASig;
|
||||
int32_t z;
|
||||
|
||||
|
@ -3203,7 +3212,8 @@ int_fast16_t float64_to_int16_round_to_zero(float64 a, float_status *status)
|
|||
int64_t float64_to_int64(float64 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp, shiftCount;
|
||||
int aExp;
|
||||
int shiftCount;
|
||||
uint64_t aSig, aSigExtra;
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
|
||||
|
@ -3246,7 +3256,8 @@ int64_t float64_to_int64(float64 a, float_status *status)
|
|||
int64_t float64_to_int64_round_to_zero(float64 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp, shiftCount;
|
||||
int aExp;
|
||||
int shiftCount;
|
||||
uint64_t aSig;
|
||||
int64_t z;
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
|
@ -3298,7 +3309,7 @@ int64_t float64_to_int64_round_to_zero(float64 a, float_status *status)
|
|||
float32 float64_to_float32(float64 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint64_t aSig;
|
||||
uint32_t zSig;
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
|
@ -3333,7 +3344,7 @@ float32 float64_to_float32(float64 a, float_status *status)
|
|||
| than the desired result exponent whenever `zSig' is a complete, normalized
|
||||
| significand.
|
||||
*----------------------------------------------------------------------------*/
|
||||
static float16 packFloat16(flag zSign, int_fast16_t zExp, uint16_t zSig)
|
||||
static float16 packFloat16(flag zSign, int zExp, uint16_t zSig)
|
||||
{
|
||||
return make_float16(
|
||||
(((uint32_t)zSign) << 15) + (((uint32_t)zExp) << 10) + zSig);
|
||||
|
@ -3367,7 +3378,7 @@ static float16 packFloat16(flag zSign, int_fast16_t zExp, uint16_t zSig)
|
|||
| Binary Floating-Point Arithmetic.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
||||
static float16 roundAndPackFloat16(flag zSign, int_fast16_t zExp,
|
||||
static float16 roundAndPackFloat16(flag zSign, int zExp,
|
||||
uint32_t zSig, flag ieee,
|
||||
float_status *status)
|
||||
{
|
||||
|
@ -3454,7 +3465,7 @@ static float16 roundAndPackFloat16(flag zSign, int_fast16_t zExp,
|
|||
return packFloat16(zSign, zExp, zSig >> 13);
|
||||
}
|
||||
|
||||
static void normalizeFloat16Subnormal(uint32_t aSig, int_fast16_t *zExpPtr,
|
||||
static void normalizeFloat16Subnormal(uint32_t aSig, int *zExpPtr,
|
||||
uint32_t *zSigPtr)
|
||||
{
|
||||
int8_t shiftCount = countLeadingZeros32(aSig) - 21;
|
||||
|
@ -3468,7 +3479,7 @@ static void normalizeFloat16Subnormal(uint32_t aSig, int_fast16_t *zExpPtr,
|
|||
float32 float16_to_float32(float16 a, flag ieee, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint32_t aSig;
|
||||
|
||||
aSign = extractFloat16Sign(a);
|
||||
|
@ -3495,7 +3506,7 @@ float32 float16_to_float32(float16 a, flag ieee, float_status *status)
|
|||
float16 float32_to_float16(float32 a, flag ieee, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint32_t aSig;
|
||||
|
||||
a = float32_squash_input_denormal(a, status);
|
||||
|
@ -3539,7 +3550,7 @@ float16 float32_to_float16(float32 a, flag ieee, float_status *status)
|
|||
float64 float16_to_float64(float16 a, flag ieee, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint32_t aSig;
|
||||
|
||||
aSign = extractFloat16Sign(a);
|
||||
|
@ -3567,7 +3578,7 @@ float64 float16_to_float64(float16 a, flag ieee, float_status *status)
|
|||
float16 float64_to_float16(float64 a, flag ieee, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint64_t aSig;
|
||||
uint32_t zSig;
|
||||
|
||||
|
@ -3621,7 +3632,7 @@ float16 float64_to_float16(float64 a, flag ieee, float_status *status)
|
|||
floatx80 float64_to_floatx80(float64 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint64_t aSig;
|
||||
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
|
@ -3654,7 +3665,7 @@ floatx80 float64_to_floatx80(float64 a, float_status *status)
|
|||
float128 float64_to_float128(float64 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint64_t aSig, zSig0, zSig1;
|
||||
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
|
@ -3687,7 +3698,7 @@ float128 float64_to_float128(float64 a, float_status *status)
|
|||
float64 float64_round_to_int(float64 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint64_t lastBitMask, roundBitsMask;
|
||||
uint64_t z;
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
|
@ -3781,9 +3792,9 @@ float64 float64_trunc_to_int(float64 a, float_status *status)
|
|||
static float64 addFloat64Sigs(float64 a, float64 b, flag zSign,
|
||||
float_status *status)
|
||||
{
|
||||
int_fast16_t aExp, bExp, zExp;
|
||||
int aExp, bExp, zExp;
|
||||
uint64_t aSig, bSig, zSig;
|
||||
int_fast16_t expDiff;
|
||||
int expDiff;
|
||||
|
||||
aSig = extractFloat64Frac( a );
|
||||
aExp = extractFloat64Exp( a );
|
||||
|
@ -3867,9 +3878,9 @@ static float64 addFloat64Sigs(float64 a, float64 b, flag zSign,
|
|||
static float64 subFloat64Sigs(float64 a, float64 b, flag zSign,
|
||||
float_status *status)
|
||||
{
|
||||
int_fast16_t aExp, bExp, zExp;
|
||||
int aExp, bExp, zExp;
|
||||
uint64_t aSig, bSig, zSig;
|
||||
int_fast16_t expDiff;
|
||||
int expDiff;
|
||||
|
||||
aSig = extractFloat64Frac( a );
|
||||
aExp = extractFloat64Exp( a );
|
||||
|
@ -3993,7 +4004,7 @@ float64 float64_sub(float64 a, float64 b, float_status *status)
|
|||
float64 float64_mul(float64 a, float64 b, float_status *status)
|
||||
{
|
||||
flag aSign, bSign, zSign;
|
||||
int_fast16_t aExp, bExp, zExp;
|
||||
int aExp, bExp, zExp;
|
||||
uint64_t aSig, bSig, zSig0, zSig1;
|
||||
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
|
@ -4056,7 +4067,7 @@ float64 float64_mul(float64 a, float64 b, float_status *status)
|
|||
float64 float64_div(float64 a, float64 b, float_status *status)
|
||||
{
|
||||
flag aSign, bSign, zSign;
|
||||
int_fast16_t aExp, bExp, zExp;
|
||||
int aExp, bExp, zExp;
|
||||
uint64_t aSig, bSig, zSig;
|
||||
uint64_t rem0, rem1;
|
||||
uint64_t term0, term1;
|
||||
|
@ -4134,7 +4145,7 @@ float64 float64_div(float64 a, float64 b, float_status *status)
|
|||
float64 float64_rem(float64 a, float64 b, float_status *status)
|
||||
{
|
||||
flag aSign, zSign;
|
||||
int_fast16_t aExp, bExp, expDiff;
|
||||
int aExp, bExp, expDiff;
|
||||
uint64_t aSig, bSig;
|
||||
uint64_t q, alternateASig;
|
||||
int64_t sigMean;
|
||||
|
@ -4228,7 +4239,7 @@ float64 float64_muladd(float64 a, float64 b, float64 c, int flags,
|
|||
float_status *status)
|
||||
{
|
||||
flag aSign, bSign, cSign, zSign;
|
||||
int_fast16_t aExp, bExp, cExp, pExp, zExp, expDiff;
|
||||
int aExp, bExp, cExp, pExp, zExp, expDiff;
|
||||
uint64_t aSig, bSig, cSig;
|
||||
flag pInf, pZero, pSign;
|
||||
uint64_t pSig0, pSig1, cSig0, cSig1, zSig0, zSig1;
|
||||
|
@ -4469,7 +4480,7 @@ float64 float64_muladd(float64 a, float64 b, float64 c, int flags,
|
|||
float64 float64_sqrt(float64 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp, zExp;
|
||||
int aExp, zExp;
|
||||
uint64_t aSig, zSig, doubleZSig;
|
||||
uint64_t rem0, rem1, term0, term1;
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
|
@ -4522,7 +4533,7 @@ float64 float64_sqrt(float64 a, float_status *status)
|
|||
float64 float64_log2(float64 a, float_status *status)
|
||||
{
|
||||
flag aSign, zSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint64_t aSig, aSig0, aSig1, zSig, i;
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
|
||||
|
@ -5005,7 +5016,7 @@ float64 floatx80_to_float64(floatx80 a, float_status *status)
|
|||
float128 floatx80_to_float128(floatx80 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp;
|
||||
int aExp;
|
||||
uint64_t aSig, zSig0, zSig1;
|
||||
|
||||
aSig = extractFloatx80Frac( a );
|
||||
|
@ -7117,10 +7128,10 @@ uint32_t float32_to_uint32_round_to_zero(float32 a, float_status *status)
|
|||
return res;
|
||||
}
|
||||
|
||||
int_fast16_t float32_to_int16(float32 a, float_status *status)
|
||||
int16_t float32_to_int16(float32 a, float_status *status)
|
||||
{
|
||||
int32_t v;
|
||||
int_fast16_t res;
|
||||
int16_t res;
|
||||
int old_exc_flags = get_float_exception_flags(status);
|
||||
|
||||
v = float32_to_int32(a, status);
|
||||
|
@ -7137,10 +7148,10 @@ int_fast16_t float32_to_int16(float32 a, float_status *status)
|
|||
return res;
|
||||
}
|
||||
|
||||
uint_fast16_t float32_to_uint16(float32 a, float_status *status)
|
||||
uint16_t float32_to_uint16(float32 a, float_status *status)
|
||||
{
|
||||
int32_t v;
|
||||
uint_fast16_t res;
|
||||
uint16_t res;
|
||||
int old_exc_flags = get_float_exception_flags(status);
|
||||
|
||||
v = float32_to_int32(a, status);
|
||||
|
@ -7157,10 +7168,10 @@ uint_fast16_t float32_to_uint16(float32 a, float_status *status)
|
|||
return res;
|
||||
}
|
||||
|
||||
uint_fast16_t float32_to_uint16_round_to_zero(float32 a, float_status *status)
|
||||
uint16_t float32_to_uint16_round_to_zero(float32 a, float_status *status)
|
||||
{
|
||||
int64_t v;
|
||||
uint_fast16_t res;
|
||||
uint16_t res;
|
||||
int old_exc_flags = get_float_exception_flags(status);
|
||||
|
||||
v = float32_to_int64_round_to_zero(a, status);
|
||||
|
@ -7210,10 +7221,10 @@ uint32_t float64_to_uint32_round_to_zero(float64 a, float_status *status)
|
|||
return res;
|
||||
}
|
||||
|
||||
int_fast16_t float64_to_int16(float64 a, float_status *status)
|
||||
int16_t float64_to_int16(float64 a, float_status *status)
|
||||
{
|
||||
int64_t v;
|
||||
int_fast16_t res;
|
||||
int16_t res;
|
||||
int old_exc_flags = get_float_exception_flags(status);
|
||||
|
||||
v = float64_to_int32(a, status);
|
||||
|
@ -7230,10 +7241,10 @@ int_fast16_t float64_to_int16(float64 a, float_status *status)
|
|||
return res;
|
||||
}
|
||||
|
||||
uint_fast16_t float64_to_uint16(float64 a, float_status *status)
|
||||
uint16_t float64_to_uint16(float64 a, float_status *status)
|
||||
{
|
||||
int64_t v;
|
||||
uint_fast16_t res;
|
||||
uint16_t res;
|
||||
int old_exc_flags = get_float_exception_flags(status);
|
||||
|
||||
v = float64_to_int32(a, status);
|
||||
|
@ -7250,10 +7261,10 @@ uint_fast16_t float64_to_uint16(float64 a, float_status *status)
|
|||
return res;
|
||||
}
|
||||
|
||||
uint_fast16_t float64_to_uint16_round_to_zero(float64 a, float_status *status)
|
||||
uint16_t float64_to_uint16_round_to_zero(float64 a, float_status *status)
|
||||
{
|
||||
int64_t v;
|
||||
uint_fast16_t res;
|
||||
uint16_t res;
|
||||
int old_exc_flags = get_float_exception_flags(status);
|
||||
|
||||
v = float64_to_int64_round_to_zero(a, status);
|
||||
|
@ -7284,7 +7295,8 @@ uint_fast16_t float64_to_uint16_round_to_zero(float64 a, float_status *status)
|
|||
uint64_t float64_to_uint64(float64 a, float_status *status)
|
||||
{
|
||||
flag aSign;
|
||||
int_fast16_t aExp, shiftCount;
|
||||
int aExp;
|
||||
int shiftCount;
|
||||
uint64_t aSig, aSigExtra;
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
|
||||
|
|
|
@ -362,10 +362,10 @@ extern const float16 float16_default_nan;
|
|||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE single-precision conversion routines.
|
||||
*----------------------------------------------------------------------------*/
|
||||
int_fast16_t float32_to_int16(float32, float_status *status);
|
||||
uint_fast16_t float32_to_uint16(float32, float_status *status);
|
||||
int_fast16_t float32_to_int16_round_to_zero(float32, float_status *status);
|
||||
uint_fast16_t float32_to_uint16_round_to_zero(float32, float_status *status);
|
||||
int16_t float32_to_int16(float32, float_status *status);
|
||||
uint16_t float32_to_uint16(float32, float_status *status);
|
||||
int16_t float32_to_int16_round_to_zero(float32, float_status *status);
|
||||
uint16_t float32_to_uint16_round_to_zero(float32, float_status *status);
|
||||
int32_t float32_to_int32(float32, float_status *status);
|
||||
int32_t float32_to_int32_round_to_zero(float32, float_status *status);
|
||||
uint32_t float32_to_uint32(float32, float_status *status);
|
||||
|
@ -474,10 +474,10 @@ extern const float32 float32_default_nan;
|
|||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE double-precision conversion routines.
|
||||
*----------------------------------------------------------------------------*/
|
||||
int_fast16_t float64_to_int16(float64, float_status *status);
|
||||
uint_fast16_t float64_to_uint16(float64, float_status *status);
|
||||
int_fast16_t float64_to_int16_round_to_zero(float64, float_status *status);
|
||||
uint_fast16_t float64_to_uint16_round_to_zero(float64, float_status *status);
|
||||
int16_t float64_to_int16(float64, float_status *status);
|
||||
uint16_t float64_to_uint16(float64, float_status *status);
|
||||
int16_t float64_to_int16_round_to_zero(float64, float_status *status);
|
||||
uint16_t float64_to_uint16_round_to_zero(float64, float_status *status);
|
||||
int32_t float64_to_int32(float64, float_status *status);
|
||||
int32_t float64_to_int32_round_to_zero(float64, float_status *status);
|
||||
uint32_t float64_to_uint32(float64, float_status *status);
|
||||
|
|
|
@ -84,13 +84,6 @@ extern int daemon(int, int);
|
|||
|
||||
#include "qapi/error.h"
|
||||
|
||||
#if defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10
|
||||
/* [u]int_fast*_t not in <sys/int_types.h> */
|
||||
typedef unsigned char uint_fast8_t;
|
||||
typedef unsigned int uint_fast16_t;
|
||||
typedef signed int int_fast16_t;
|
||||
#endif
|
||||
|
||||
#ifndef O_LARGEFILE
|
||||
#define O_LARGEFILE 0
|
||||
#endif
|
||||
|
|
|
@ -19,19 +19,19 @@ typedef struct r4k_tlb_t r4k_tlb_t;
|
|||
struct r4k_tlb_t {
|
||||
target_ulong VPN;
|
||||
uint32_t PageMask;
|
||||
uint_fast8_t ASID;
|
||||
uint_fast16_t G:1;
|
||||
uint_fast16_t C0:3;
|
||||
uint_fast16_t C1:3;
|
||||
uint_fast16_t V0:1;
|
||||
uint_fast16_t V1:1;
|
||||
uint_fast16_t D0:1;
|
||||
uint_fast16_t D1:1;
|
||||
uint_fast16_t XI0:1;
|
||||
uint_fast16_t XI1:1;
|
||||
uint_fast16_t RI0:1;
|
||||
uint_fast16_t RI1:1;
|
||||
uint_fast16_t EHINV:1;
|
||||
uint8_t ASID;
|
||||
unsigned int G:1;
|
||||
unsigned int C0:3;
|
||||
unsigned int C1:3;
|
||||
unsigned int V0:1;
|
||||
unsigned int V1:1;
|
||||
unsigned int D0:1;
|
||||
unsigned int D1:1;
|
||||
unsigned int XI0:1;
|
||||
unsigned int XI1:1;
|
||||
unsigned int RI0:1;
|
||||
unsigned int RI1:1;
|
||||
unsigned int EHINV:1;
|
||||
uint64_t PFN[2];
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue