diff mbox

[v5,05/10] softfloat: Use [u]int_fast16_t consistently

Message ID 1299458053-69428-5-git-send-email-andreas.faerber@web.de
State New
Headers show

Commit Message

Andreas Färber March 7, 2011, 12:34 a.m. UTC
Adapt float{32,64}_to_uint16_round_to_zero().

v5:
* Reworded.

v3:
* Split off. Use uint_fast16_t rather than uint16_t.

v2:
* Initial.

Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Nathan Froyd <froydnj@codesourcery.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
---
 fpu/softfloat.c |    8 ++++----
 fpu/softfloat.h |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index befd400..4e23511 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -5865,10 +5865,10 @@  unsigned int float32_to_uint32_round_to_zero( float32 a STATUS_PARAM )
     return res;
 }
 
-unsigned int float32_to_uint16_round_to_zero( float32 a STATUS_PARAM )
+uint_fast16_t float32_to_uint16_round_to_zero( float32 a STATUS_PARAM )
 {
     int64_t v;
-    unsigned int res;
+    uint_fast16_t res;
 
     v = float32_to_int64_round_to_zero(a STATUS_VAR);
     if (v < 0) {
@@ -5919,10 +5919,10 @@  unsigned int float64_to_uint32_round_to_zero( float64 a STATUS_PARAM )
     return res;
 }
 
-unsigned int float64_to_uint16_round_to_zero( float64 a STATUS_PARAM )
+uint_fast16_t float64_to_uint16_round_to_zero( float64 a STATUS_PARAM )
 {
     int64_t v;
-    unsigned int res;
+    uint_fast16_t res;
 
     v = float64_to_int64_round_to_zero(a STATUS_VAR);
     if (v < 0) {
diff --git a/fpu/softfloat.h b/fpu/softfloat.h
index f98e50c..795c2ea 100644
--- a/fpu/softfloat.h
+++ b/fpu/softfloat.h
@@ -285,7 +285,7 @@  float16 float16_maybe_silence_nan( float16 );
 | Software IEC/IEEE single-precision conversion routines.
 *----------------------------------------------------------------------------*/
 int_fast16_t float32_to_int16_round_to_zero( float32 STATUS_PARAM );
-unsigned int float32_to_uint16_round_to_zero( float32 STATUS_PARAM );
+uint_fast16_t float32_to_uint16_round_to_zero( float32 STATUS_PARAM );
 int32 float32_to_int32( float32 STATUS_PARAM );
 int32 float32_to_int32_round_to_zero( float32 STATUS_PARAM );
 uint32 float32_to_uint32( float32 STATUS_PARAM );
@@ -395,7 +395,7 @@  INLINE float32 float32_set_sign(float32 a, int sign)
 | Software IEC/IEEE double-precision conversion routines.
 *----------------------------------------------------------------------------*/
 int_fast16_t float64_to_int16_round_to_zero( float64 STATUS_PARAM );
-unsigned int float64_to_uint16_round_to_zero( float64 STATUS_PARAM );
+uint_fast16_t float64_to_uint16_round_to_zero( float64 STATUS_PARAM );
 int32 float64_to_int32( float64 STATUS_PARAM );
 int32 float64_to_int32_round_to_zero( float64 STATUS_PARAM );
 uint32 float64_to_uint32( float64 STATUS_PARAM );