diff options
author | Stefan Weil <weil@mail.berlios.de> | 2010-01-20 19:43:25 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-02-06 23:16:05 +0100 |
commit | bc4347b883e8175dadef77ed9e02ccaa5e8eba94 (patch) | |
tree | af1f35c79686771564161e5c3525a7d55dbdad00 /fpu/softfloat-native.c | |
parent | 1d2699ae5a812b4b568ec9f19ab071f7932c4964 (diff) |
arm host: fix compiler warning
Compilation for arm (native or cross) results in this
warning:
fpu/softfloat-native.c: In function ‘float64_round_to_int’:
fpu/softfloat-native.c:387: error: control reaches end of non-void function
float64_round_to_int uses special assembler code for arm
and has no explicit return value.
As there is no obvious reason why arm should need special
code, all fpu related conditionals were removed.
The remaining code is standard (C99) and compiles for arm,
too.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Acked-by: Laurent Desnogues <laurent.desnogues@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'fpu/softfloat-native.c')
-rw-r--r-- | fpu/softfloat-native.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/fpu/softfloat-native.c b/fpu/softfloat-native.c index 8d64f4eff4..049c8300f5 100644 --- a/fpu/softfloat-native.c +++ b/fpu/softfloat-native.c @@ -12,8 +12,6 @@ void set_float_rounding_mode(int val STATUS_PARAM) #if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)) || \ (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10) fpsetround(val); -#elif defined(__arm__) - /* nothing to do */ #else fesetround(val); #endif @@ -365,25 +363,7 @@ float64 float64_trunc_to_int( float64 a STATUS_PARAM ) float64 float64_round_to_int( float64 a STATUS_PARAM ) { -#if defined(__arm__) - switch(STATUS(float_rounding_mode)) { - default: - case float_round_nearest_even: - asm("rndd %0, %1" : "=f" (a) : "f"(a)); - break; - case float_round_down: - asm("rnddm %0, %1" : "=f" (a) : "f"(a)); - break; - case float_round_up: - asm("rnddp %0, %1" : "=f" (a) : "f"(a)); - break; - case float_round_to_zero: - asm("rnddz %0, %1" : "=f" (a) : "f"(a)); - break; - } -#else return rint(a); -#endif } float64 float64_rem( float64 a, float64 b STATUS_PARAM) |