Commit 750afe93fd15fafc20b6c34d30f339547d15c2d1
1 parent
00a67ba1
avoid using char when it is not necessary
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2204 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
5 changed files
with
110 additions
and
110 deletions
fpu/softfloat-native.c
| ... | ... | @@ -149,7 +149,7 @@ float32 float32_sqrt( float32 a STATUS_PARAM) |
| 149 | 149 | { |
| 150 | 150 | return sqrtf(a); |
| 151 | 151 | } |
| 152 | -char float32_compare( float32 a, float32 b STATUS_PARAM ) | |
| 152 | +int float32_compare( float32 a, float32 b STATUS_PARAM ) | |
| 153 | 153 | { |
| 154 | 154 | if (a < b) { |
| 155 | 155 | return -1; |
| ... | ... | @@ -161,7 +161,7 @@ char float32_compare( float32 a, float32 b STATUS_PARAM ) |
| 161 | 161 | return 2; |
| 162 | 162 | } |
| 163 | 163 | } |
| 164 | -char float32_compare_quiet( float32 a, float32 b STATUS_PARAM ) | |
| 164 | +int float32_compare_quiet( float32 a, float32 b STATUS_PARAM ) | |
| 165 | 165 | { |
| 166 | 166 | if (isless(a, b)) { |
| 167 | 167 | return -1; |
| ... | ... | @@ -173,7 +173,7 @@ char float32_compare_quiet( float32 a, float32 b STATUS_PARAM ) |
| 173 | 173 | return 2; |
| 174 | 174 | } |
| 175 | 175 | } |
| 176 | -char float32_is_signaling_nan( float32 a1) | |
| 176 | +int float32_is_signaling_nan( float32 a1) | |
| 177 | 177 | { |
| 178 | 178 | float32u u; |
| 179 | 179 | uint32_t a; |
| ... | ... | @@ -258,7 +258,7 @@ float64 float64_sqrt( float64 a STATUS_PARAM) |
| 258 | 258 | { |
| 259 | 259 | return sqrt(a); |
| 260 | 260 | } |
| 261 | -char float64_compare( float64 a, float64 b STATUS_PARAM ) | |
| 261 | +int float64_compare( float64 a, float64 b STATUS_PARAM ) | |
| 262 | 262 | { |
| 263 | 263 | if (a < b) { |
| 264 | 264 | return -1; |
| ... | ... | @@ -270,7 +270,7 @@ char float64_compare( float64 a, float64 b STATUS_PARAM ) |
| 270 | 270 | return 2; |
| 271 | 271 | } |
| 272 | 272 | } |
| 273 | -char float64_compare_quiet( float64 a, float64 b STATUS_PARAM ) | |
| 273 | +int float64_compare_quiet( float64 a, float64 b STATUS_PARAM ) | |
| 274 | 274 | { |
| 275 | 275 | if (isless(a, b)) { |
| 276 | 276 | return -1; |
| ... | ... | @@ -282,7 +282,7 @@ char float64_compare_quiet( float64 a, float64 b STATUS_PARAM ) |
| 282 | 282 | return 2; |
| 283 | 283 | } |
| 284 | 284 | } |
| 285 | -char float64_is_signaling_nan( float64 a1) | |
| 285 | +int float64_is_signaling_nan( float64 a1) | |
| 286 | 286 | { |
| 287 | 287 | float64u u; |
| 288 | 288 | uint64_t a; |
| ... | ... | @@ -294,7 +294,7 @@ char float64_is_signaling_nan( float64 a1) |
| 294 | 294 | |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | -char float64_is_nan( float64 a1 ) | |
| 297 | +int float64_is_nan( float64 a1 ) | |
| 298 | 298 | { |
| 299 | 299 | float64u u; |
| 300 | 300 | uint64_t a; |
| ... | ... | @@ -350,7 +350,7 @@ floatx80 floatx80_sqrt( floatx80 a STATUS_PARAM) |
| 350 | 350 | { |
| 351 | 351 | return sqrtl(a); |
| 352 | 352 | } |
| 353 | -char floatx80_compare( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 353 | +int floatx80_compare( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 354 | 354 | { |
| 355 | 355 | if (a < b) { |
| 356 | 356 | return -1; |
| ... | ... | @@ -362,7 +362,7 @@ char floatx80_compare( floatx80 a, floatx80 b STATUS_PARAM ) |
| 362 | 362 | return 2; |
| 363 | 363 | } |
| 364 | 364 | } |
| 365 | -char floatx80_compare_quiet( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 365 | +int floatx80_compare_quiet( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 366 | 366 | { |
| 367 | 367 | if (isless(a, b)) { |
| 368 | 368 | return -1; |
| ... | ... | @@ -374,7 +374,7 @@ char floatx80_compare_quiet( floatx80 a, floatx80 b STATUS_PARAM ) |
| 374 | 374 | return 2; |
| 375 | 375 | } |
| 376 | 376 | } |
| 377 | -char floatx80_is_signaling_nan( floatx80 a1) | |
| 377 | +int floatx80_is_signaling_nan( floatx80 a1) | |
| 378 | 378 | { |
| 379 | 379 | floatx80u u; |
| 380 | 380 | u.f = a1; | ... | ... |
fpu/softfloat-native.h
| ... | ... | @@ -152,38 +152,38 @@ INLINE float32 float32_div( float32 a, float32 b STATUS_PARAM) |
| 152 | 152 | } |
| 153 | 153 | float32 float32_rem( float32, float32 STATUS_PARAM); |
| 154 | 154 | float32 float32_sqrt( float32 STATUS_PARAM); |
| 155 | -INLINE char float32_eq( float32 a, float32 b STATUS_PARAM) | |
| 155 | +INLINE int float32_eq( float32 a, float32 b STATUS_PARAM) | |
| 156 | 156 | { |
| 157 | 157 | return a == b; |
| 158 | 158 | } |
| 159 | -INLINE char float32_le( float32 a, float32 b STATUS_PARAM) | |
| 159 | +INLINE int float32_le( float32 a, float32 b STATUS_PARAM) | |
| 160 | 160 | { |
| 161 | 161 | return a <= b; |
| 162 | 162 | } |
| 163 | -INLINE char float32_lt( float32 a, float32 b STATUS_PARAM) | |
| 163 | +INLINE int float32_lt( float32 a, float32 b STATUS_PARAM) | |
| 164 | 164 | { |
| 165 | 165 | return a < b; |
| 166 | 166 | } |
| 167 | -INLINE char float32_eq_signaling( float32 a, float32 b STATUS_PARAM) | |
| 167 | +INLINE int float32_eq_signaling( float32 a, float32 b STATUS_PARAM) | |
| 168 | 168 | { |
| 169 | 169 | return a <= b && a >= b; |
| 170 | 170 | } |
| 171 | -INLINE char float32_le_quiet( float32 a, float32 b STATUS_PARAM) | |
| 171 | +INLINE int float32_le_quiet( float32 a, float32 b STATUS_PARAM) | |
| 172 | 172 | { |
| 173 | 173 | return islessequal(a, b); |
| 174 | 174 | } |
| 175 | -INLINE char float32_lt_quiet( float32 a, float32 b STATUS_PARAM) | |
| 175 | +INLINE int float32_lt_quiet( float32 a, float32 b STATUS_PARAM) | |
| 176 | 176 | { |
| 177 | 177 | return isless(a, b); |
| 178 | 178 | } |
| 179 | -INLINE char float32_unordered( float32 a, float32 b STATUS_PARAM) | |
| 179 | +INLINE int float32_unordered( float32 a, float32 b STATUS_PARAM) | |
| 180 | 180 | { |
| 181 | 181 | return isunordered(a, b); |
| 182 | 182 | |
| 183 | 183 | } |
| 184 | -char float32_compare( float32, float32 STATUS_PARAM ); | |
| 185 | -char float32_compare_quiet( float32, float32 STATUS_PARAM ); | |
| 186 | -char float32_is_signaling_nan( float32 ); | |
| 184 | +int float32_compare( float32, float32 STATUS_PARAM ); | |
| 185 | +int float32_compare_quiet( float32, float32 STATUS_PARAM ); | |
| 186 | +int float32_is_signaling_nan( float32 ); | |
| 187 | 187 | |
| 188 | 188 | INLINE float32 float32_abs(float32 a) |
| 189 | 189 | { |
| ... | ... | @@ -233,40 +233,40 @@ INLINE float64 float64_div( float64 a, float64 b STATUS_PARAM) |
| 233 | 233 | } |
| 234 | 234 | float64 float64_rem( float64, float64 STATUS_PARAM ); |
| 235 | 235 | float64 float64_sqrt( float64 STATUS_PARAM ); |
| 236 | -INLINE char float64_eq( float64 a, float64 b STATUS_PARAM) | |
| 236 | +INLINE int float64_eq( float64 a, float64 b STATUS_PARAM) | |
| 237 | 237 | { |
| 238 | 238 | return a == b; |
| 239 | 239 | } |
| 240 | -INLINE char float64_le( float64 a, float64 b STATUS_PARAM) | |
| 240 | +INLINE int float64_le( float64 a, float64 b STATUS_PARAM) | |
| 241 | 241 | { |
| 242 | 242 | return a <= b; |
| 243 | 243 | } |
| 244 | -INLINE char float64_lt( float64 a, float64 b STATUS_PARAM) | |
| 244 | +INLINE int float64_lt( float64 a, float64 b STATUS_PARAM) | |
| 245 | 245 | { |
| 246 | 246 | return a < b; |
| 247 | 247 | } |
| 248 | -INLINE char float64_eq_signaling( float64 a, float64 b STATUS_PARAM) | |
| 248 | +INLINE int float64_eq_signaling( float64 a, float64 b STATUS_PARAM) | |
| 249 | 249 | { |
| 250 | 250 | return a <= b && a >= b; |
| 251 | 251 | } |
| 252 | -INLINE char float64_le_quiet( float64 a, float64 b STATUS_PARAM) | |
| 252 | +INLINE int float64_le_quiet( float64 a, float64 b STATUS_PARAM) | |
| 253 | 253 | { |
| 254 | 254 | return islessequal(a, b); |
| 255 | 255 | } |
| 256 | -INLINE char float64_lt_quiet( float64 a, float64 b STATUS_PARAM) | |
| 256 | +INLINE int float64_lt_quiet( float64 a, float64 b STATUS_PARAM) | |
| 257 | 257 | { |
| 258 | 258 | return isless(a, b); |
| 259 | 259 | |
| 260 | 260 | } |
| 261 | -INLINE char float64_unordered( float64 a, float64 b STATUS_PARAM) | |
| 261 | +INLINE int float64_unordered( float64 a, float64 b STATUS_PARAM) | |
| 262 | 262 | { |
| 263 | 263 | return isunordered(a, b); |
| 264 | 264 | |
| 265 | 265 | } |
| 266 | -char float64_compare( float64, float64 STATUS_PARAM ); | |
| 267 | -char float64_compare_quiet( float64, float64 STATUS_PARAM ); | |
| 268 | -char float64_is_signaling_nan( float64 ); | |
| 269 | -flag float64_is_nan( float64 ); | |
| 266 | +int float64_compare( float64, float64 STATUS_PARAM ); | |
| 267 | +int float64_compare_quiet( float64, float64 STATUS_PARAM ); | |
| 268 | +int float64_is_signaling_nan( float64 ); | |
| 269 | +int float64_is_nan( float64 ); | |
| 270 | 270 | |
| 271 | 271 | INLINE float64 float64_abs(float64 a) |
| 272 | 272 | { |
| ... | ... | @@ -315,39 +315,39 @@ INLINE floatx80 floatx80_div( floatx80 a, floatx80 b STATUS_PARAM) |
| 315 | 315 | } |
| 316 | 316 | floatx80 floatx80_rem( floatx80, floatx80 STATUS_PARAM ); |
| 317 | 317 | floatx80 floatx80_sqrt( floatx80 STATUS_PARAM ); |
| 318 | -INLINE char floatx80_eq( floatx80 a, floatx80 b STATUS_PARAM) | |
| 318 | +INLINE int floatx80_eq( floatx80 a, floatx80 b STATUS_PARAM) | |
| 319 | 319 | { |
| 320 | 320 | return a == b; |
| 321 | 321 | } |
| 322 | -INLINE char floatx80_le( floatx80 a, floatx80 b STATUS_PARAM) | |
| 322 | +INLINE int floatx80_le( floatx80 a, floatx80 b STATUS_PARAM) | |
| 323 | 323 | { |
| 324 | 324 | return a <= b; |
| 325 | 325 | } |
| 326 | -INLINE char floatx80_lt( floatx80 a, floatx80 b STATUS_PARAM) | |
| 326 | +INLINE int floatx80_lt( floatx80 a, floatx80 b STATUS_PARAM) | |
| 327 | 327 | { |
| 328 | 328 | return a < b; |
| 329 | 329 | } |
| 330 | -INLINE char floatx80_eq_signaling( floatx80 a, floatx80 b STATUS_PARAM) | |
| 330 | +INLINE int floatx80_eq_signaling( floatx80 a, floatx80 b STATUS_PARAM) | |
| 331 | 331 | { |
| 332 | 332 | return a <= b && a >= b; |
| 333 | 333 | } |
| 334 | -INLINE char floatx80_le_quiet( floatx80 a, floatx80 b STATUS_PARAM) | |
| 334 | +INLINE int floatx80_le_quiet( floatx80 a, floatx80 b STATUS_PARAM) | |
| 335 | 335 | { |
| 336 | 336 | return islessequal(a, b); |
| 337 | 337 | } |
| 338 | -INLINE char floatx80_lt_quiet( floatx80 a, floatx80 b STATUS_PARAM) | |
| 338 | +INLINE int floatx80_lt_quiet( floatx80 a, floatx80 b STATUS_PARAM) | |
| 339 | 339 | { |
| 340 | 340 | return isless(a, b); |
| 341 | 341 | |
| 342 | 342 | } |
| 343 | -INLINE char floatx80_unordered( floatx80 a, floatx80 b STATUS_PARAM) | |
| 343 | +INLINE int floatx80_unordered( floatx80 a, floatx80 b STATUS_PARAM) | |
| 344 | 344 | { |
| 345 | 345 | return isunordered(a, b); |
| 346 | 346 | |
| 347 | 347 | } |
| 348 | -char floatx80_compare( floatx80, floatx80 STATUS_PARAM ); | |
| 349 | -char floatx80_compare_quiet( floatx80, floatx80 STATUS_PARAM ); | |
| 350 | -char floatx80_is_signaling_nan( floatx80 ); | |
| 348 | +int floatx80_compare( floatx80, floatx80 STATUS_PARAM ); | |
| 349 | +int floatx80_compare_quiet( floatx80, floatx80 STATUS_PARAM ); | |
| 350 | +int floatx80_is_signaling_nan( floatx80 ); | |
| 351 | 351 | |
| 352 | 352 | INLINE floatx80 floatx80_abs(floatx80 a) |
| 353 | 353 | { | ... | ... |
fpu/softfloat-specialize.h
| ... | ... | @@ -68,7 +68,7 @@ typedef struct { |
| 68 | 68 | | otherwise returns 0. |
| 69 | 69 | *----------------------------------------------------------------------------*/ |
| 70 | 70 | |
| 71 | -flag float32_is_nan( float32 a ) | |
| 71 | +int float32_is_nan( float32 a ) | |
| 72 | 72 | { |
| 73 | 73 | |
| 74 | 74 | return ( 0xFF000000 < (bits32) ( a<<1 ) ); |
| ... | ... | @@ -80,7 +80,7 @@ flag float32_is_nan( float32 a ) |
| 80 | 80 | | NaN; otherwise returns 0. |
| 81 | 81 | *----------------------------------------------------------------------------*/ |
| 82 | 82 | |
| 83 | -flag float32_is_signaling_nan( float32 a ) | |
| 83 | +int float32_is_signaling_nan( float32 a ) | |
| 84 | 84 | { |
| 85 | 85 | |
| 86 | 86 | return ( ( ( a>>22 ) & 0x1FF ) == 0x1FE ) && ( a & 0x003FFFFF ); |
| ... | ... | @@ -161,7 +161,7 @@ static float32 propagateFloat32NaN( float32 a, float32 b STATUS_PARAM) |
| 161 | 161 | | otherwise returns 0. |
| 162 | 162 | *----------------------------------------------------------------------------*/ |
| 163 | 163 | |
| 164 | -flag float64_is_nan( float64 a ) | |
| 164 | +int float64_is_nan( float64 a ) | |
| 165 | 165 | { |
| 166 | 166 | |
| 167 | 167 | return ( LIT64( 0xFFE0000000000000 ) < (bits64) ( a<<1 ) ); |
| ... | ... | @@ -173,7 +173,7 @@ flag float64_is_nan( float64 a ) |
| 173 | 173 | | NaN; otherwise returns 0. |
| 174 | 174 | *----------------------------------------------------------------------------*/ |
| 175 | 175 | |
| 176 | -flag float64_is_signaling_nan( float64 a ) | |
| 176 | +int float64_is_signaling_nan( float64 a ) | |
| 177 | 177 | { |
| 178 | 178 | |
| 179 | 179 | return |
| ... | ... | @@ -264,7 +264,7 @@ static float64 propagateFloat64NaN( float64 a, float64 b STATUS_PARAM) |
| 264 | 264 | | NaN; otherwise returns 0. |
| 265 | 265 | *----------------------------------------------------------------------------*/ |
| 266 | 266 | |
| 267 | -flag floatx80_is_nan( floatx80 a ) | |
| 267 | +int floatx80_is_nan( floatx80 a ) | |
| 268 | 268 | { |
| 269 | 269 | |
| 270 | 270 | return ( ( a.high & 0x7FFF ) == 0x7FFF ) && (bits64) ( a.low<<1 ); |
| ... | ... | @@ -276,7 +276,7 @@ flag floatx80_is_nan( floatx80 a ) |
| 276 | 276 | | signaling NaN; otherwise returns 0. |
| 277 | 277 | *----------------------------------------------------------------------------*/ |
| 278 | 278 | |
| 279 | -flag floatx80_is_signaling_nan( floatx80 a ) | |
| 279 | +int floatx80_is_signaling_nan( floatx80 a ) | |
| 280 | 280 | { |
| 281 | 281 | bits64 aLow; |
| 282 | 282 | |
| ... | ... | @@ -371,7 +371,7 @@ static floatx80 propagateFloatx80NaN( floatx80 a, floatx80 b STATUS_PARAM) |
| 371 | 371 | | otherwise returns 0. |
| 372 | 372 | *----------------------------------------------------------------------------*/ |
| 373 | 373 | |
| 374 | -flag float128_is_nan( float128 a ) | |
| 374 | +int float128_is_nan( float128 a ) | |
| 375 | 375 | { |
| 376 | 376 | |
| 377 | 377 | return |
| ... | ... | @@ -385,7 +385,7 @@ flag float128_is_nan( float128 a ) |
| 385 | 385 | | signaling NaN; otherwise returns 0. |
| 386 | 386 | *----------------------------------------------------------------------------*/ |
| 387 | 387 | |
| 388 | -flag float128_is_signaling_nan( float128 a ) | |
| 388 | +int float128_is_signaling_nan( float128 a ) | |
| 389 | 389 | { |
| 390 | 390 | |
| 391 | 391 | return | ... | ... |
fpu/softfloat.c
| ... | ... | @@ -2023,7 +2023,7 @@ float32 float32_sqrt( float32 a STATUS_PARAM ) |
| 2023 | 2023 | | according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 2024 | 2024 | *----------------------------------------------------------------------------*/ |
| 2025 | 2025 | |
| 2026 | -flag float32_eq( float32 a, float32 b STATUS_PARAM ) | |
| 2026 | +int float32_eq( float32 a, float32 b STATUS_PARAM ) | |
| 2027 | 2027 | { |
| 2028 | 2028 | |
| 2029 | 2029 | if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) |
| ... | ... | @@ -2045,7 +2045,7 @@ flag float32_eq( float32 a, float32 b STATUS_PARAM ) |
| 2045 | 2045 | | Arithmetic. |
| 2046 | 2046 | *----------------------------------------------------------------------------*/ |
| 2047 | 2047 | |
| 2048 | -flag float32_le( float32 a, float32 b STATUS_PARAM ) | |
| 2048 | +int float32_le( float32 a, float32 b STATUS_PARAM ) | |
| 2049 | 2049 | { |
| 2050 | 2050 | flag aSign, bSign; |
| 2051 | 2051 | |
| ... | ... | @@ -2068,7 +2068,7 @@ flag float32_le( float32 a, float32 b STATUS_PARAM ) |
| 2068 | 2068 | | according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 2069 | 2069 | *----------------------------------------------------------------------------*/ |
| 2070 | 2070 | |
| 2071 | -flag float32_lt( float32 a, float32 b STATUS_PARAM ) | |
| 2071 | +int float32_lt( float32 a, float32 b STATUS_PARAM ) | |
| 2072 | 2072 | { |
| 2073 | 2073 | flag aSign, bSign; |
| 2074 | 2074 | |
| ... | ... | @@ -2092,7 +2092,7 @@ flag float32_lt( float32 a, float32 b STATUS_PARAM ) |
| 2092 | 2092 | | according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 2093 | 2093 | *----------------------------------------------------------------------------*/ |
| 2094 | 2094 | |
| 2095 | -flag float32_eq_signaling( float32 a, float32 b STATUS_PARAM ) | |
| 2095 | +int float32_eq_signaling( float32 a, float32 b STATUS_PARAM ) | |
| 2096 | 2096 | { |
| 2097 | 2097 | |
| 2098 | 2098 | if ( ( ( extractFloat32Exp( a ) == 0xFF ) && extractFloat32Frac( a ) ) |
| ... | ... | @@ -2112,7 +2112,7 @@ flag float32_eq_signaling( float32 a, float32 b STATUS_PARAM ) |
| 2112 | 2112 | | IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 2113 | 2113 | *----------------------------------------------------------------------------*/ |
| 2114 | 2114 | |
| 2115 | -flag float32_le_quiet( float32 a, float32 b STATUS_PARAM ) | |
| 2115 | +int float32_le_quiet( float32 a, float32 b STATUS_PARAM ) | |
| 2116 | 2116 | { |
| 2117 | 2117 | flag aSign, bSign; |
| 2118 | 2118 | |
| ... | ... | @@ -2138,7 +2138,7 @@ flag float32_le_quiet( float32 a, float32 b STATUS_PARAM ) |
| 2138 | 2138 | | Standard for Binary Floating-Point Arithmetic. |
| 2139 | 2139 | *----------------------------------------------------------------------------*/ |
| 2140 | 2140 | |
| 2141 | -flag float32_lt_quiet( float32 a, float32 b STATUS_PARAM ) | |
| 2141 | +int float32_lt_quiet( float32 a, float32 b STATUS_PARAM ) | |
| 2142 | 2142 | { |
| 2143 | 2143 | flag aSign, bSign; |
| 2144 | 2144 | |
| ... | ... | @@ -2952,7 +2952,7 @@ float64 float64_sqrt( float64 a STATUS_PARAM ) |
| 2952 | 2952 | | according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 2953 | 2953 | *----------------------------------------------------------------------------*/ |
| 2954 | 2954 | |
| 2955 | -flag float64_eq( float64 a, float64 b STATUS_PARAM ) | |
| 2955 | +int float64_eq( float64 a, float64 b STATUS_PARAM ) | |
| 2956 | 2956 | { |
| 2957 | 2957 | |
| 2958 | 2958 | if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) |
| ... | ... | @@ -2974,7 +2974,7 @@ flag float64_eq( float64 a, float64 b STATUS_PARAM ) |
| 2974 | 2974 | | Arithmetic. |
| 2975 | 2975 | *----------------------------------------------------------------------------*/ |
| 2976 | 2976 | |
| 2977 | -flag float64_le( float64 a, float64 b STATUS_PARAM ) | |
| 2977 | +int float64_le( float64 a, float64 b STATUS_PARAM ) | |
| 2978 | 2978 | { |
| 2979 | 2979 | flag aSign, bSign; |
| 2980 | 2980 | |
| ... | ... | @@ -2997,7 +2997,7 @@ flag float64_le( float64 a, float64 b STATUS_PARAM ) |
| 2997 | 2997 | | according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 2998 | 2998 | *----------------------------------------------------------------------------*/ |
| 2999 | 2999 | |
| 3000 | -flag float64_lt( float64 a, float64 b STATUS_PARAM ) | |
| 3000 | +int float64_lt( float64 a, float64 b STATUS_PARAM ) | |
| 3001 | 3001 | { |
| 3002 | 3002 | flag aSign, bSign; |
| 3003 | 3003 | |
| ... | ... | @@ -3021,7 +3021,7 @@ flag float64_lt( float64 a, float64 b STATUS_PARAM ) |
| 3021 | 3021 | | according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 3022 | 3022 | *----------------------------------------------------------------------------*/ |
| 3023 | 3023 | |
| 3024 | -flag float64_eq_signaling( float64 a, float64 b STATUS_PARAM ) | |
| 3024 | +int float64_eq_signaling( float64 a, float64 b STATUS_PARAM ) | |
| 3025 | 3025 | { |
| 3026 | 3026 | |
| 3027 | 3027 | if ( ( ( extractFloat64Exp( a ) == 0x7FF ) && extractFloat64Frac( a ) ) |
| ... | ... | @@ -3041,7 +3041,7 @@ flag float64_eq_signaling( float64 a, float64 b STATUS_PARAM ) |
| 3041 | 3041 | | IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 3042 | 3042 | *----------------------------------------------------------------------------*/ |
| 3043 | 3043 | |
| 3044 | -flag float64_le_quiet( float64 a, float64 b STATUS_PARAM ) | |
| 3044 | +int float64_le_quiet( float64 a, float64 b STATUS_PARAM ) | |
| 3045 | 3045 | { |
| 3046 | 3046 | flag aSign, bSign; |
| 3047 | 3047 | |
| ... | ... | @@ -3067,7 +3067,7 @@ flag float64_le_quiet( float64 a, float64 b STATUS_PARAM ) |
| 3067 | 3067 | | Standard for Binary Floating-Point Arithmetic. |
| 3068 | 3068 | *----------------------------------------------------------------------------*/ |
| 3069 | 3069 | |
| 3070 | -flag float64_lt_quiet( float64 a, float64 b STATUS_PARAM ) | |
| 3070 | +int float64_lt_quiet( float64 a, float64 b STATUS_PARAM ) | |
| 3071 | 3071 | { |
| 3072 | 3072 | flag aSign, bSign; |
| 3073 | 3073 | |
| ... | ... | @@ -3890,7 +3890,7 @@ floatx80 floatx80_sqrt( floatx80 a STATUS_PARAM ) |
| 3890 | 3890 | | Arithmetic. |
| 3891 | 3891 | *----------------------------------------------------------------------------*/ |
| 3892 | 3892 | |
| 3893 | -flag floatx80_eq( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 3893 | +int floatx80_eq( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 3894 | 3894 | { |
| 3895 | 3895 | |
| 3896 | 3896 | if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) |
| ... | ... | @@ -3920,7 +3920,7 @@ flag floatx80_eq( floatx80 a, floatx80 b STATUS_PARAM ) |
| 3920 | 3920 | | Floating-Point Arithmetic. |
| 3921 | 3921 | *----------------------------------------------------------------------------*/ |
| 3922 | 3922 | |
| 3923 | -flag floatx80_le( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 3923 | +int floatx80_le( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 3924 | 3924 | { |
| 3925 | 3925 | flag aSign, bSign; |
| 3926 | 3926 | |
| ... | ... | @@ -3953,7 +3953,7 @@ flag floatx80_le( floatx80 a, floatx80 b STATUS_PARAM ) |
| 3953 | 3953 | | Arithmetic. |
| 3954 | 3954 | *----------------------------------------------------------------------------*/ |
| 3955 | 3955 | |
| 3956 | -flag floatx80_lt( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 3956 | +int floatx80_lt( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 3957 | 3957 | { |
| 3958 | 3958 | flag aSign, bSign; |
| 3959 | 3959 | |
| ... | ... | @@ -3986,7 +3986,7 @@ flag floatx80_lt( floatx80 a, floatx80 b STATUS_PARAM ) |
| 3986 | 3986 | | according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 3987 | 3987 | *----------------------------------------------------------------------------*/ |
| 3988 | 3988 | |
| 3989 | -flag floatx80_eq_signaling( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 3989 | +int floatx80_eq_signaling( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 3990 | 3990 | { |
| 3991 | 3991 | |
| 3992 | 3992 | if ( ( ( extractFloatx80Exp( a ) == 0x7FFF ) |
| ... | ... | @@ -4013,7 +4013,7 @@ flag floatx80_eq_signaling( floatx80 a, floatx80 b STATUS_PARAM ) |
| 4013 | 4013 | | to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 4014 | 4014 | *----------------------------------------------------------------------------*/ |
| 4015 | 4015 | |
| 4016 | -flag floatx80_le_quiet( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 4016 | +int floatx80_le_quiet( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 4017 | 4017 | { |
| 4018 | 4018 | flag aSign, bSign; |
| 4019 | 4019 | |
| ... | ... | @@ -4049,7 +4049,7 @@ flag floatx80_le_quiet( floatx80 a, floatx80 b STATUS_PARAM ) |
| 4049 | 4049 | | IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 4050 | 4050 | *----------------------------------------------------------------------------*/ |
| 4051 | 4051 | |
| 4052 | -flag floatx80_lt_quiet( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 4052 | +int floatx80_lt_quiet( floatx80 a, floatx80 b STATUS_PARAM ) | |
| 4053 | 4053 | { |
| 4054 | 4054 | flag aSign, bSign; |
| 4055 | 4055 | |
| ... | ... | @@ -5010,7 +5010,7 @@ float128 float128_sqrt( float128 a STATUS_PARAM ) |
| 5010 | 5010 | | according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 5011 | 5011 | *----------------------------------------------------------------------------*/ |
| 5012 | 5012 | |
| 5013 | -flag float128_eq( float128 a, float128 b STATUS_PARAM ) | |
| 5013 | +int float128_eq( float128 a, float128 b STATUS_PARAM ) | |
| 5014 | 5014 | { |
| 5015 | 5015 | |
| 5016 | 5016 | if ( ( ( extractFloat128Exp( a ) == 0x7FFF ) |
| ... | ... | @@ -5040,7 +5040,7 @@ flag float128_eq( float128 a, float128 b STATUS_PARAM ) |
| 5040 | 5040 | | Arithmetic. |
| 5041 | 5041 | *----------------------------------------------------------------------------*/ |
| 5042 | 5042 | |
| 5043 | -flag float128_le( float128 a, float128 b STATUS_PARAM ) | |
| 5043 | +int float128_le( float128 a, float128 b STATUS_PARAM ) | |
| 5044 | 5044 | { |
| 5045 | 5045 | flag aSign, bSign; |
| 5046 | 5046 | |
| ... | ... | @@ -5072,7 +5072,7 @@ flag float128_le( float128 a, float128 b STATUS_PARAM ) |
| 5072 | 5072 | | according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 5073 | 5073 | *----------------------------------------------------------------------------*/ |
| 5074 | 5074 | |
| 5075 | -flag float128_lt( float128 a, float128 b STATUS_PARAM ) | |
| 5075 | +int float128_lt( float128 a, float128 b STATUS_PARAM ) | |
| 5076 | 5076 | { |
| 5077 | 5077 | flag aSign, bSign; |
| 5078 | 5078 | |
| ... | ... | @@ -5105,7 +5105,7 @@ flag float128_lt( float128 a, float128 b STATUS_PARAM ) |
| 5105 | 5105 | | according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 5106 | 5106 | *----------------------------------------------------------------------------*/ |
| 5107 | 5107 | |
| 5108 | -flag float128_eq_signaling( float128 a, float128 b STATUS_PARAM ) | |
| 5108 | +int float128_eq_signaling( float128 a, float128 b STATUS_PARAM ) | |
| 5109 | 5109 | { |
| 5110 | 5110 | |
| 5111 | 5111 | if ( ( ( extractFloat128Exp( a ) == 0x7FFF ) |
| ... | ... | @@ -5132,7 +5132,7 @@ flag float128_eq_signaling( float128 a, float128 b STATUS_PARAM ) |
| 5132 | 5132 | | IEC/IEEE Standard for Binary Floating-Point Arithmetic. |
| 5133 | 5133 | *----------------------------------------------------------------------------*/ |
| 5134 | 5134 | |
| 5135 | -flag float128_le_quiet( float128 a, float128 b STATUS_PARAM ) | |
| 5135 | +int float128_le_quiet( float128 a, float128 b STATUS_PARAM ) | |
| 5136 | 5136 | { |
| 5137 | 5137 | flag aSign, bSign; |
| 5138 | 5138 | |
| ... | ... | @@ -5168,7 +5168,7 @@ flag float128_le_quiet( float128 a, float128 b STATUS_PARAM ) |
| 5168 | 5168 | | Standard for Binary Floating-Point Arithmetic. |
| 5169 | 5169 | *----------------------------------------------------------------------------*/ |
| 5170 | 5170 | |
| 5171 | -flag float128_lt_quiet( float128 a, float128 b STATUS_PARAM ) | |
| 5171 | +int float128_lt_quiet( float128 a, float128 b STATUS_PARAM ) | |
| 5172 | 5172 | { |
| 5173 | 5173 | flag aSign, bSign; |
| 5174 | 5174 | |
| ... | ... | @@ -5283,7 +5283,7 @@ unsigned int float64_to_uint32_round_to_zero( float64 a STATUS_PARAM ) |
| 5283 | 5283 | } |
| 5284 | 5284 | |
| 5285 | 5285 | #define COMPARE(s, nan_exp) \ |
| 5286 | -INLINE char float ## s ## _compare_internal( float ## s a, float ## s b, \ | |
| 5286 | +INLINE int float ## s ## _compare_internal( float ## s a, float ## s b, \ | |
| 5287 | 5287 | int is_quiet STATUS_PARAM ) \ |
| 5288 | 5288 | { \ |
| 5289 | 5289 | flag aSign, bSign; \ |
| ... | ... | @@ -5317,12 +5317,12 @@ INLINE char float ## s ## _compare_internal( float ## s a, float ## s b, \ |
| 5317 | 5317 | } \ |
| 5318 | 5318 | } \ |
| 5319 | 5319 | \ |
| 5320 | -char float ## s ## _compare( float ## s a, float ## s b STATUS_PARAM ) \ | |
| 5320 | +int float ## s ## _compare( float ## s a, float ## s b STATUS_PARAM ) \ | |
| 5321 | 5321 | { \ |
| 5322 | 5322 | return float ## s ## _compare_internal(a, b, 0 STATUS_VAR); \ |
| 5323 | 5323 | } \ |
| 5324 | 5324 | \ |
| 5325 | -char float ## s ## _compare_quiet( float ## s a, float ## s b STATUS_PARAM ) \ | |
| 5325 | +int float ## s ## _compare_quiet( float ## s a, float ## s b STATUS_PARAM ) \ | |
| 5326 | 5326 | { \ |
| 5327 | 5327 | return float ## s ## _compare_internal(a, b, 1 STATUS_VAR); \ |
| 5328 | 5328 | } | ... | ... |
fpu/softfloat.h
| ... | ... | @@ -43,7 +43,7 @@ these four paragraphs for those parts of this code that are retained. |
| 43 | 43 | | implementations of C, `flag', `uint8', and `int8' should all be `typedef'ed |
| 44 | 44 | | to the same as `int'. |
| 45 | 45 | *----------------------------------------------------------------------------*/ |
| 46 | -typedef char flag; | |
| 46 | +typedef uint8_t flag; | |
| 47 | 47 | typedef uint8_t uint8; |
| 48 | 48 | typedef int8_t int8; |
| 49 | 49 | typedef int uint16; |
| ... | ... | @@ -228,16 +228,16 @@ float32 float32_mul( float32, float32 STATUS_PARAM ); |
| 228 | 228 | float32 float32_div( float32, float32 STATUS_PARAM ); |
| 229 | 229 | float32 float32_rem( float32, float32 STATUS_PARAM ); |
| 230 | 230 | float32 float32_sqrt( float32 STATUS_PARAM ); |
| 231 | -char float32_eq( float32, float32 STATUS_PARAM ); | |
| 232 | -char float32_le( float32, float32 STATUS_PARAM ); | |
| 233 | -char float32_lt( float32, float32 STATUS_PARAM ); | |
| 234 | -char float32_eq_signaling( float32, float32 STATUS_PARAM ); | |
| 235 | -char float32_le_quiet( float32, float32 STATUS_PARAM ); | |
| 236 | -char float32_lt_quiet( float32, float32 STATUS_PARAM ); | |
| 237 | -char float32_compare( float32, float32 STATUS_PARAM ); | |
| 238 | -char float32_compare_quiet( float32, float32 STATUS_PARAM ); | |
| 239 | -char float32_is_signaling_nan( float32 ); | |
| 240 | -flag float64_is_nan( float64 a ); | |
| 231 | +int float32_eq( float32, float32 STATUS_PARAM ); | |
| 232 | +int float32_le( float32, float32 STATUS_PARAM ); | |
| 233 | +int float32_lt( float32, float32 STATUS_PARAM ); | |
| 234 | +int float32_eq_signaling( float32, float32 STATUS_PARAM ); | |
| 235 | +int float32_le_quiet( float32, float32 STATUS_PARAM ); | |
| 236 | +int float32_lt_quiet( float32, float32 STATUS_PARAM ); | |
| 237 | +int float32_compare( float32, float32 STATUS_PARAM ); | |
| 238 | +int float32_compare_quiet( float32, float32 STATUS_PARAM ); | |
| 239 | +int float32_is_signaling_nan( float32 ); | |
| 240 | +int float64_is_nan( float64 a ); | |
| 241 | 241 | |
| 242 | 242 | INLINE float32 float32_abs(float32 a) |
| 243 | 243 | { |
| ... | ... | @@ -277,15 +277,15 @@ float64 float64_mul( float64, float64 STATUS_PARAM ); |
| 277 | 277 | float64 float64_div( float64, float64 STATUS_PARAM ); |
| 278 | 278 | float64 float64_rem( float64, float64 STATUS_PARAM ); |
| 279 | 279 | float64 float64_sqrt( float64 STATUS_PARAM ); |
| 280 | -char float64_eq( float64, float64 STATUS_PARAM ); | |
| 281 | -char float64_le( float64, float64 STATUS_PARAM ); | |
| 282 | -char float64_lt( float64, float64 STATUS_PARAM ); | |
| 283 | -char float64_eq_signaling( float64, float64 STATUS_PARAM ); | |
| 284 | -char float64_le_quiet( float64, float64 STATUS_PARAM ); | |
| 285 | -char float64_lt_quiet( float64, float64 STATUS_PARAM ); | |
| 286 | -char float64_compare( float64, float64 STATUS_PARAM ); | |
| 287 | -char float64_compare_quiet( float64, float64 STATUS_PARAM ); | |
| 288 | -char float64_is_signaling_nan( float64 ); | |
| 280 | +int float64_eq( float64, float64 STATUS_PARAM ); | |
| 281 | +int float64_le( float64, float64 STATUS_PARAM ); | |
| 282 | +int float64_lt( float64, float64 STATUS_PARAM ); | |
| 283 | +int float64_eq_signaling( float64, float64 STATUS_PARAM ); | |
| 284 | +int float64_le_quiet( float64, float64 STATUS_PARAM ); | |
| 285 | +int float64_lt_quiet( float64, float64 STATUS_PARAM ); | |
| 286 | +int float64_compare( float64, float64 STATUS_PARAM ); | |
| 287 | +int float64_compare_quiet( float64, float64 STATUS_PARAM ); | |
| 288 | +int float64_is_signaling_nan( float64 ); | |
| 289 | 289 | |
| 290 | 290 | INLINE float64 float64_abs(float64 a) |
| 291 | 291 | { |
| ... | ... | @@ -322,13 +322,13 @@ floatx80 floatx80_mul( floatx80, floatx80 STATUS_PARAM ); |
| 322 | 322 | floatx80 floatx80_div( floatx80, floatx80 STATUS_PARAM ); |
| 323 | 323 | floatx80 floatx80_rem( floatx80, floatx80 STATUS_PARAM ); |
| 324 | 324 | floatx80 floatx80_sqrt( floatx80 STATUS_PARAM ); |
| 325 | -char floatx80_eq( floatx80, floatx80 STATUS_PARAM ); | |
| 326 | -char floatx80_le( floatx80, floatx80 STATUS_PARAM ); | |
| 327 | -char floatx80_lt( floatx80, floatx80 STATUS_PARAM ); | |
| 328 | -char floatx80_eq_signaling( floatx80, floatx80 STATUS_PARAM ); | |
| 329 | -char floatx80_le_quiet( floatx80, floatx80 STATUS_PARAM ); | |
| 330 | -char floatx80_lt_quiet( floatx80, floatx80 STATUS_PARAM ); | |
| 331 | -char floatx80_is_signaling_nan( floatx80 ); | |
| 325 | +int floatx80_eq( floatx80, floatx80 STATUS_PARAM ); | |
| 326 | +int floatx80_le( floatx80, floatx80 STATUS_PARAM ); | |
| 327 | +int floatx80_lt( floatx80, floatx80 STATUS_PARAM ); | |
| 328 | +int floatx80_eq_signaling( floatx80, floatx80 STATUS_PARAM ); | |
| 329 | +int floatx80_le_quiet( floatx80, floatx80 STATUS_PARAM ); | |
| 330 | +int floatx80_lt_quiet( floatx80, floatx80 STATUS_PARAM ); | |
| 331 | +int floatx80_is_signaling_nan( floatx80 ); | |
| 332 | 332 | |
| 333 | 333 | INLINE floatx80 floatx80_abs(floatx80 a) |
| 334 | 334 | { |
| ... | ... | @@ -369,13 +369,13 @@ float128 float128_mul( float128, float128 STATUS_PARAM ); |
| 369 | 369 | float128 float128_div( float128, float128 STATUS_PARAM ); |
| 370 | 370 | float128 float128_rem( float128, float128 STATUS_PARAM ); |
| 371 | 371 | float128 float128_sqrt( float128 STATUS_PARAM ); |
| 372 | -char float128_eq( float128, float128 STATUS_PARAM ); | |
| 373 | -char float128_le( float128, float128 STATUS_PARAM ); | |
| 374 | -char float128_lt( float128, float128 STATUS_PARAM ); | |
| 375 | -char float128_eq_signaling( float128, float128 STATUS_PARAM ); | |
| 376 | -char float128_le_quiet( float128, float128 STATUS_PARAM ); | |
| 377 | -char float128_lt_quiet( float128, float128 STATUS_PARAM ); | |
| 378 | -char float128_is_signaling_nan( float128 ); | |
| 372 | +int float128_eq( float128, float128 STATUS_PARAM ); | |
| 373 | +int float128_le( float128, float128 STATUS_PARAM ); | |
| 374 | +int float128_lt( float128, float128 STATUS_PARAM ); | |
| 375 | +int float128_eq_signaling( float128, float128 STATUS_PARAM ); | |
| 376 | +int float128_le_quiet( float128, float128 STATUS_PARAM ); | |
| 377 | +int float128_lt_quiet( float128, float128 STATUS_PARAM ); | |
| 378 | +int float128_is_signaling_nan( float128 ); | |
| 379 | 379 | |
| 380 | 380 | INLINE float128 float128_abs(float128 a) |
| 381 | 381 | { | ... | ... |