diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-08-27 08:30:07 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-08-27 08:30:07 -0400 |
commit | efda9452046bdd707b23a85b7846ec33548f84f1 (patch) | |
tree | f08c915049ea1829ba115cd41a0ba28ddf184e07 /arch/arm/nwfpe | |
parent | b01f2cc1c37ac3d5ca313c90370a586dffe5aca9 (diff) | |
parent | 36676bcbf9f6bcbea9d06e67ee8d04eacde54952 (diff) |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'arch/arm/nwfpe')
-rw-r--r-- | arch/arm/nwfpe/fpopcode.h | 6 | ||||
-rw-r--r-- | arch/arm/nwfpe/softfloat.c | 34 |
2 files changed, 13 insertions, 27 deletions
diff --git a/arch/arm/nwfpe/fpopcode.h b/arch/arm/nwfpe/fpopcode.h index 8035f4faafbf..1777e92a88e6 100644 --- a/arch/arm/nwfpe/fpopcode.h +++ b/arch/arm/nwfpe/fpopcode.h | |||
@@ -370,20 +370,20 @@ TABLE 5 | |||
370 | #define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5) | 370 | #define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5) |
371 | 371 | ||
372 | #ifdef CONFIG_FPE_NWFPE_XP | 372 | #ifdef CONFIG_FPE_NWFPE_XP |
373 | static inline const floatx80 getExtendedConstant(const unsigned int nIndex) | 373 | static inline __attribute_pure__ floatx80 getExtendedConstant(const unsigned int nIndex) |
374 | { | 374 | { |
375 | extern const floatx80 floatx80Constant[]; | 375 | extern const floatx80 floatx80Constant[]; |
376 | return floatx80Constant[nIndex]; | 376 | return floatx80Constant[nIndex]; |
377 | } | 377 | } |
378 | #endif | 378 | #endif |
379 | 379 | ||
380 | static inline const float64 getDoubleConstant(const unsigned int nIndex) | 380 | static inline __attribute_pure__ float64 getDoubleConstant(const unsigned int nIndex) |
381 | { | 381 | { |
382 | extern const float64 float64Constant[]; | 382 | extern const float64 float64Constant[]; |
383 | return float64Constant[nIndex]; | 383 | return float64Constant[nIndex]; |
384 | } | 384 | } |
385 | 385 | ||
386 | static inline const float32 getSingleConstant(const unsigned int nIndex) | 386 | static inline __attribute_pure__ float32 getSingleConstant(const unsigned int nIndex) |
387 | { | 387 | { |
388 | extern const float32 float32Constant[]; | 388 | extern const float32 float32Constant[]; |
389 | return float32Constant[nIndex]; | 389 | return float32Constant[nIndex]; |
diff --git a/arch/arm/nwfpe/softfloat.c b/arch/arm/nwfpe/softfloat.c index 8b75a6e7cb3a..f9f049132a17 100644 --- a/arch/arm/nwfpe/softfloat.c +++ b/arch/arm/nwfpe/softfloat.c | |||
@@ -1602,9 +1602,7 @@ flag float32_le_quiet( float32 a, float32 b ) | |||
1602 | if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) | 1602 | if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) |
1603 | || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) | 1603 | || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) |
1604 | ) { | 1604 | ) { |
1605 | if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) { | 1605 | /* Do nothing, even if NaN as we're quiet */ |
1606 | float_raise( float_flag_invalid ); | ||
1607 | } | ||
1608 | return 0; | 1606 | return 0; |
1609 | } | 1607 | } |
1610 | aSign = extractFloat32Sign( a ); | 1608 | aSign = extractFloat32Sign( a ); |
@@ -1629,9 +1627,7 @@ flag float32_lt_quiet( float32 a, float32 b ) | |||
1629 | if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) | 1627 | if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) |
1630 | || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) | 1628 | || ( ( extractFloat32Exp( b ) == 0xFF ) && extractFloat32Frac( b ) ) |
1631 | ) { | 1629 | ) { |
1632 | if ( float32_is_signaling_nan( a ) || float32_is_signaling_nan( b ) ) { | 1630 | /* Do nothing, even if NaN as we're quiet */ |
1633 | float_raise( float_flag_invalid ); | ||
1634 | } | ||
1635 | return 0; | 1631 | return 0; |
1636 | } | 1632 | } |
1637 | aSign = extractFloat32Sign( a ); | 1633 | aSign = extractFloat32Sign( a ); |
@@ -2493,9 +2489,7 @@ flag float64_le_quiet( float64 a, float64 b ) | |||
2493 | if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) | 2489 | if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) |
2494 | || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) | 2490 | || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) |
2495 | ) { | 2491 | ) { |
2496 | if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) { | 2492 | /* Do nothing, even if NaN as we're quiet */ |
2497 | float_raise( float_flag_invalid ); | ||
2498 | } | ||
2499 | return 0; | 2493 | return 0; |
2500 | } | 2494 | } |
2501 | aSign = extractFloat64Sign( a ); | 2495 | aSign = extractFloat64Sign( a ); |
@@ -2520,9 +2514,7 @@ flag float64_lt_quiet( float64 a, float64 b ) | |||
2520 | if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) | 2514 | if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) |
2521 | || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) | 2515 | || ( ( extractFloat64Exp( b ) == 0x7FF ) && extractFloat64Frac( b ) ) |
2522 | ) { | 2516 | ) { |
2523 | if ( float64_is_signaling_nan( a ) || float64_is_signaling_nan( b ) ) { | 2517 | /* Do nothing, even if NaN as we're quiet */ |
2524 | float_raise( float_flag_invalid ); | ||
2525 | } | ||
2526 | return 0; | 2518 | return 0; |
2527 | } | 2519 | } |
2528 | aSign = extractFloat64Sign( a ); | 2520 | aSign = extractFloat64Sign( a ); |
@@ -3256,7 +3248,7 @@ flag floatx80_eq( floatx80 a, floatx80 b ) | |||
3256 | ) { | 3248 | ) { |
3257 | if ( floatx80_is_signaling_nan( a ) | 3249 | if ( floatx80_is_signaling_nan( a ) |
3258 | || floatx80_is_signaling_nan( b ) ) { | 3250 | || floatx80_is_signaling_nan( b ) ) { |
3259 | roundData->exception |= float_flag_invalid; | 3251 | float_raise( float_flag_invalid ); |
3260 | } | 3252 | } |
3261 | return 0; | 3253 | return 0; |
3262 | } | 3254 | } |
@@ -3286,7 +3278,7 @@ flag floatx80_le( floatx80 a, floatx80 b ) | |||
3286 | || ( ( extractFloatx80Exp( b ) == 0x7FFF ) | 3278 | || ( ( extractFloatx80Exp( b ) == 0x7FFF ) |
3287 | && (bits64) ( extractFloatx80Frac( b )<<1 ) ) | 3279 | && (bits64) ( extractFloatx80Frac( b )<<1 ) ) |
3288 | ) { | 3280 | ) { |
3289 | roundData->exception |= float_flag_invalid; | 3281 | float_raise( float_flag_invalid ); |
3290 | return 0; | 3282 | return 0; |
3291 | } | 3283 | } |
3292 | aSign = extractFloatx80Sign( a ); | 3284 | aSign = extractFloatx80Sign( a ); |
@@ -3320,7 +3312,7 @@ flag floatx80_lt( floatx80 a, floatx80 b ) | |||
3320 | || ( ( extractFloatx80Exp( b ) == 0x7FFF ) | 3312 | || ( ( extractFloatx80Exp( b ) == 0x7FFF ) |
3321 | && (bits64) ( extractFloatx80Frac( b )<<1 ) ) | 3313 | && (bits64) ( extractFloatx80Frac( b )<<1 ) ) |
3322 | ) { | 3314 | ) { |
3323 | roundData->exception |= float_flag_invalid; | 3315 | float_raise( float_flag_invalid ); |
3324 | return 0; | 3316 | return 0; |
3325 | } | 3317 | } |
3326 | aSign = extractFloatx80Sign( a ); | 3318 | aSign = extractFloatx80Sign( a ); |
@@ -3353,7 +3345,7 @@ flag floatx80_eq_signaling( floatx80 a, floatx80 b ) | |||
3353 | || ( ( extractFloatx80Exp( b ) == 0x7FFF ) | 3345 | || ( ( extractFloatx80Exp( b ) == 0x7FFF ) |
3354 | && (bits64) ( extractFloatx80Frac( b )<<1 ) ) | 3346 | && (bits64) ( extractFloatx80Frac( b )<<1 ) ) |
3355 | ) { | 3347 | ) { |
3356 | roundData->exception |= float_flag_invalid; | 3348 | float_raise( float_flag_invalid ); |
3357 | return 0; | 3349 | return 0; |
3358 | } | 3350 | } |
3359 | return | 3351 | return |
@@ -3382,10 +3374,7 @@ flag floatx80_le_quiet( floatx80 a, floatx80 b ) | |||
3382 | || ( ( extractFloatx80Exp( b ) == 0x7FFF ) | 3374 | || ( ( extractFloatx80Exp( b ) == 0x7FFF ) |
3383 | && (bits64) ( extractFloatx80Frac( b )<<1 ) ) | 3375 | && (bits64) ( extractFloatx80Frac( b )<<1 ) ) |
3384 | ) { | 3376 | ) { |
3385 | if ( floatx80_is_signaling_nan( a ) | 3377 | /* Do nothing, even if NaN as we're quiet */ |
3386 | || floatx80_is_signaling_nan( b ) ) { | ||
3387 | roundData->exception |= float_flag_invalid; | ||
3388 | } | ||
3389 | return 0; | 3378 | return 0; |
3390 | } | 3379 | } |
3391 | aSign = extractFloatx80Sign( a ); | 3380 | aSign = extractFloatx80Sign( a ); |
@@ -3419,10 +3408,7 @@ flag floatx80_lt_quiet( floatx80 a, floatx80 b ) | |||
3419 | || ( ( extractFloatx80Exp( b ) == 0x7FFF ) | 3408 | || ( ( extractFloatx80Exp( b ) == 0x7FFF ) |
3420 | && (bits64) ( extractFloatx80Frac( b )<<1 ) ) | 3409 | && (bits64) ( extractFloatx80Frac( b )<<1 ) ) |
3421 | ) { | 3410 | ) { |
3422 | if ( floatx80_is_signaling_nan( a ) | 3411 | /* Do nothing, even if NaN as we're quiet */ |
3423 | || floatx80_is_signaling_nan( b ) ) { | ||
3424 | roundData->exception |= float_flag_invalid; | ||
3425 | } | ||
3426 | return 0; | 3412 | return 0; |
3427 | } | 3413 | } |
3428 | aSign = extractFloatx80Sign( a ); | 3414 | aSign = extractFloatx80Sign( a ); |