mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
fpu: Use plain 'int' rather than 'int_fast16_t' for shift counts
Use the plain 'int' type rather than 'int_fast16_t' for shift counts in the various shift related functions, since we don't actually care about the size of the integer at all here, and using int16_t would be confusing. This should be a safe change because int_fast16_t semantics permit use of 'int' (and on 32-bit glibc that is what you get). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Message-id: 1453807806-32698-3-git-send-email-peter.maydell@linaro.org
This commit is contained in:
@@ -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_fast16_t 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_fast16_t aExp;
|
||||
int shiftCount;
|
||||
uint32_t aSig;
|
||||
int32_t z;
|
||||
a = float32_squash_input_denormal(a, status);
|
||||
@@ -1619,7 +1621,8 @@ int32_t float32_to_int32_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_fast16_t aExp;
|
||||
int shiftCount;
|
||||
uint32_t aSig;
|
||||
int32_t z;
|
||||
|
||||
@@ -1668,7 +1671,8 @@ int16_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_fast16_t 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_fast16_t 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_fast16_t aExp;
|
||||
int shiftCount;
|
||||
uint32_t aSig;
|
||||
uint64_t aSig64;
|
||||
int64_t z;
|
||||
@@ -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_fast16_t 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_fast16_t aExp;
|
||||
int shiftCount;
|
||||
uint64_t aSig, savedASig;
|
||||
int32_t z;
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
@@ -3152,7 +3160,8 @@ int32_t float64_to_int32_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_fast16_t aExp;
|
||||
int shiftCount;
|
||||
uint64_t aSig, savedASig;
|
||||
int32_t z;
|
||||
|
||||
@@ -3203,7 +3212,8 @@ int16_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_fast16_t 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_fast16_t aExp;
|
||||
int shiftCount;
|
||||
uint64_t aSig;
|
||||
int64_t z;
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
@@ -7284,7 +7295,8 @@ uint16_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_fast16_t aExp;
|
||||
int shiftCount;
|
||||
uint64_t aSig, aSigExtra;
|
||||
a = float64_squash_input_denormal(a, status);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user