mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
Hexagon (target/hexagon) add A6_vminub_RdP
Rdd32,Pe4 = vminub(Rtt32, Rss32) Vector min of bytes Test cases in tests/tcg/hexagon/multi_result.c Signed-off-by: Taylor Simpson <tsimpson@quicinc.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <1617930474-31979-21-git-send-email-tsimpson@quicinc.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
da74cd2dce
commit
0a65d28693
5 changed files with 94 additions and 0 deletions
|
@ -237,6 +237,33 @@
|
|||
tcg_temp_free_i64(tmp); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
* Compare each of the 8 unsigned bytes
|
||||
* The minimum is placed in each byte of the destination.
|
||||
* Each bit of the predicate is set true if the bit from the first operand
|
||||
* is greater than the bit from the second operand.
|
||||
* r5:4,p1 = vminub(r1:0, r3:2)
|
||||
*/
|
||||
#define fGEN_TCG_A6_vminub_RdP(SHORTCODE) \
|
||||
do { \
|
||||
TCGv left = tcg_temp_new(); \
|
||||
TCGv right = tcg_temp_new(); \
|
||||
TCGv tmp = tcg_temp_new(); \
|
||||
tcg_gen_movi_tl(PeV, 0); \
|
||||
tcg_gen_movi_i64(RddV, 0); \
|
||||
for (int i = 0; i < 8; i++) { \
|
||||
gen_get_byte_i64(left, i, RttV, false); \
|
||||
gen_get_byte_i64(right, i, RssV, false); \
|
||||
tcg_gen_setcond_tl(TCG_COND_GT, tmp, left, right); \
|
||||
tcg_gen_deposit_tl(PeV, PeV, tmp, i, 1); \
|
||||
tcg_gen_umin_tl(tmp, left, right); \
|
||||
gen_set_byte_i64(i, RddV, tmp); \
|
||||
} \
|
||||
tcg_temp_free(left); \
|
||||
tcg_temp_free(right); \
|
||||
tcg_temp_free(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