target/riscv: rvv: Add mask agnostic for vector integer comparison instructions
Signed-off-by: eop Chen <eop.chen@sifive.com> Reviewed-by: Frank Chang <frank.chang@sifive.com> Reviewed-by: Weiwei Li <liweiwei@iscas.ac.cn> Acked-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <165570784143.17634.35095816584573691-5@git.sr.ht> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
fd93045ebf
commit
6e11d7eaa0
|
@ -1718,6 +1718,7 @@ static bool trans_##NAME(DisasContext *s, arg_rmrr *a) \
|
|||
data = FIELD_DP32(data, VDATA, VTA, s->vta); \
|
||||
data = \
|
||||
FIELD_DP32(data, VDATA, VTA_ALL_1S, s->cfg_vta_all_1s);\
|
||||
data = FIELD_DP32(data, VDATA, VMA, s->vma); \
|
||||
tcg_gen_gvec_4_ptr(vreg_ofs(s, a->rd), vreg_ofs(s, 0), \
|
||||
vreg_ofs(s, a->rs1), \
|
||||
vreg_ofs(s, a->rs2), cpu_env, \
|
||||
|
|
|
@ -1404,12 +1404,17 @@ void HELPER(NAME)(void *vd, void *v0, void *vs1, void *vs2, \
|
|||
uint32_t vl = env->vl; \
|
||||
uint32_t total_elems = env_archcpu(env)->cfg.vlen; \
|
||||
uint32_t vta_all_1s = vext_vta_all_1s(desc); \
|
||||
uint32_t vma = vext_vma(desc); \
|
||||
uint32_t i; \
|
||||
\
|
||||
for (i = env->vstart; i < vl; i++) { \
|
||||
ETYPE s1 = *((ETYPE *)vs1 + H(i)); \
|
||||
ETYPE s2 = *((ETYPE *)vs2 + H(i)); \
|
||||
if (!vm && !vext_elem_mask(v0, i)) { \
|
||||
/* set masked-off elements to 1s */ \
|
||||
if (vma) { \
|
||||
vext_set_elem_mask(vd, i, 1); \
|
||||
} \
|
||||
continue; \
|
||||
} \
|
||||
vext_set_elem_mask(vd, i, DO_OP(s2, s1)); \
|
||||
|
@ -1462,11 +1467,16 @@ void HELPER(NAME)(void *vd, void *v0, target_ulong s1, void *vs2, \
|
|||
uint32_t vl = env->vl; \
|
||||
uint32_t total_elems = env_archcpu(env)->cfg.vlen; \
|
||||
uint32_t vta_all_1s = vext_vta_all_1s(desc); \
|
||||
uint32_t vma = vext_vma(desc); \
|
||||
uint32_t i; \
|
||||
\
|
||||
for (i = env->vstart; i < vl; i++) { \
|
||||
ETYPE s2 = *((ETYPE *)vs2 + H(i)); \
|
||||
if (!vm && !vext_elem_mask(v0, i)) { \
|
||||
/* set masked-off elements to 1s */ \
|
||||
if (vma) { \
|
||||
vext_set_elem_mask(vd, i, 1); \
|
||||
} \
|
||||
continue; \
|
||||
} \
|
||||
vext_set_elem_mask(vd, i, \
|
||||
|
|
Loading…
Reference in New Issue