[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 68/72] target/hexagon: Remove Float
From: |
Richard Henderson |
Subject: |
[PULL 68/72] target/hexagon: Remove Float |
Date: |
Tue, 24 Dec 2024 12:05:17 -0800 |
This structure, with bitfields, is incorrect for big-endian.
Use the existing float32_getexp_raw which uses extract32.
Reviewed-by: Brian Cain <brian.cain@oss.qualcomm.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/hexagon/fma_emu.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/target/hexagon/fma_emu.c b/target/hexagon/fma_emu.c
index 0769de43de..2a8f72fee3 100644
--- a/target/hexagon/fma_emu.c
+++ b/target/hexagon/fma_emu.c
@@ -53,16 +53,6 @@ typedef union {
};
} Double;
-typedef union {
- float f;
- uint32_t i;
- struct {
- uint32_t mant:23;
- uint32_t exp:8;
- uint32_t sign:1;
- };
-} Float;
-
static uint64_t float64_getmant(float64 f64)
{
Double a = { .i = f64 };
@@ -92,12 +82,12 @@ int32_t float64_getexp(float64 f64)
int32_t float32_getexp(float32 f32)
{
- Float a = { .i = f32 };
+ int exp = float32_getexp_raw(f32);
if (float32_is_normal(f32)) {
- return a.exp;
+ return exp;
}
if (float32_is_denormal(f32)) {
- return a.exp + 1;
+ return exp + 1;
}
return -1;
}
--
2.43.0
- [PULL 50/72] tcg/optimize: Use finish_folding as default in tcg_optimize, (continued)
- [PULL 50/72] tcg/optimize: Use finish_folding as default in tcg_optimize, Richard Henderson, 2024/12/24
- [PULL 42/72] tcg/optimize: Use fold_masks_zs in fold_sextract, Richard Henderson, 2024/12/24
- [PULL 46/72] tcg/optimize: Use fold_masks_zs in fold_tcg_ld, Richard Henderson, 2024/12/24
- [PULL 47/72] tcg/optimize: Use finish_folding in fold_tcg_ld_memcopy, Richard Henderson, 2024/12/24
- [PULL 49/72] tcg/optimize: Use finish_folding in fold_bitsel_vec, Richard Henderson, 2024/12/24
- [PULL 53/72] tcg/optimize: Move fold_bitsel_vec into alphabetic sort, Richard Henderson, 2024/12/24
- [PULL 58/72] softfloat: Remove float_muladd_halve_result, Richard Henderson, 2024/12/24
- [PULL 60/72] softfloat: Add float_muladd_suppress_add_product_zero, Richard Henderson, 2024/12/24
- [PULL 61/72] target/hexagon: Use float32_mul in helper_sfmpy, Richard Henderson, 2024/12/24
- [PULL 64/72] target/hexagon: Use float32_muladd_scalbn for helper_sffma_sc, Richard Henderson, 2024/12/24
- [PULL 68/72] target/hexagon: Remove Float,
Richard Henderson <=
- [PULL 44/72] tcg/optimize: Simplify sign bit test in fold_shift, Richard Henderson, 2024/12/24
- [PULL 56/72] target/arm: Use float*_muladd_scalbn, Richard Henderson, 2024/12/24
- [PULL 52/72] tcg/optimize: Re-enable sign-mask optimizations, Richard Henderson, 2024/12/24
- [PULL 69/72] target/hexagon: Remove Double, Richard Henderson, 2024/12/24
- [PULL 70/72] target/hexagon: Use mulu64 for int128_mul_6464, Richard Henderson, 2024/12/24
- [PULL 51/72] tcg/optimize: Remove z_mask, s_mask from OptContext, Richard Henderson, 2024/12/24
- [PULL 67/72] target/hexagon: Expand GEN_XF_ROUND, Richard Henderson, 2024/12/24
- [PULL 72/72] accel/tcg: Move gen_intermediate_code to TCGCPUOps.translate_core, Richard Henderson, 2024/12/24
- [PULL 62/72] target/hexagon: Use float32_muladd for helper_sffma, Richard Henderson, 2024/12/24
- [PULL 63/72] target/hexagon: Use float32_muladd for helper_sffms, Richard Henderson, 2024/12/24