mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
Hexagon (target/hexagon) add F2_sfinvsqrta
Rd32,Pe4 = sfinvsqrta(Rs32) Square root approx The helper packs the 2 32-bit results into a 64-bit value, and the fGEN_TCG override unpacks them into the proper results. Test cases in tests/tcg/hexagon/multi_result.c FP exception tests added to tests/tcg/hexagon/fpstuff.c Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <1617930474-31979-19-git-send-email-tsimpson@quicinc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
d934c16d8a
commit
dd8705bdf5
9 changed files with 121 additions and 1 deletions
|
@ -216,6 +216,22 @@
|
|||
tcg_temp_free_i64(tmp); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Approximation of the reciprocal square root
|
||||
* r1,p0 = sfinvsqrta(r0)
|
||||
*
|
||||
* The helper packs the 2 32-bit results into a 64-bit value,
|
||||
* so unpack them into the proper results.
|
||||
*/
|
||||
#define fGEN_TCG_F2_sfinvsqrta(SHORTCODE) \
|
||||
do { \
|
||||
TCGv_i64 tmp = tcg_temp_new_i64(); \
|
||||
gen_helper_sfinvsqrta(tmp, cpu_env, RsV); \
|
||||
tcg_gen_extrh_i64_i32(RdV, tmp); \
|
||||
tcg_gen_extrl_i64_i32(PeV, tmp); \
|
||||
tcg_temp_free_i64(tmp); \
|
||||
} while (0)
|
||||
|
||||
/* Floating point */
|
||||
#define fGEN_TCG_F2_conv_sf2df(SHORTCODE) \
|
||||
gen_helper_conv_sf2df(RddV, cpu_env, RsV)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue