Revision 9ea62f57
b/target-arm/helper.c | ||
---|---|---|
2612 | 2612 |
float32 HELPER(rsqrts_f32)(float32 a, float32 b, CPUState *env) |
2613 | 2613 |
{ |
2614 | 2614 |
float_status *s = &env->vfp.fp_status; |
2615 |
float32 two = int32_to_float32(2, s); |
|
2615 | 2616 |
float32 three = int32_to_float32(3, s); |
2616 |
return float32_sub(three, float32_mul(a, b, s), s); |
|
2617 |
float32 product; |
|
2618 |
if ((float32_is_infinity(a) && float32_is_zero_or_denormal(b)) || |
|
2619 |
(float32_is_infinity(b) && float32_is_zero_or_denormal(a))) { |
|
2620 |
product = float32_zero; |
|
2621 |
} else { |
|
2622 |
product = float32_mul(a, b, s); |
|
2623 |
} |
|
2624 |
return float32_div(float32_sub(three, product, s), two, s); |
|
2617 | 2625 |
} |
2618 | 2626 |
|
2619 | 2627 |
/* NEON helpers. */ |
Also available in: Unified diff