From 655aedc0ebd2326d69d389bc714c2d622bf2cb08 Mon Sep 17 00:00:00 2001 From: Chih-Min Chao Date: Thu, 6 Jun 2019 03:24:27 -0700 Subject: rvv: add integer/fixed-point/mask/reduction/permutation instructions based on v-spec 0.7.1, support sections: 12/13/15.1 ~ 15.2/16/17 element size: 8/16/32/64 support ediv: 1 Signed-off-by: Bruce Hoult Signed-off-by: Chih-Min Chao Signed-off-by: Dave Wen --- riscv/insns/vssubu_vv.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 riscv/insns/vssubu_vv.h (limited to 'riscv/insns/vssubu_vv.h') diff --git a/riscv/insns/vssubu_vv.h b/riscv/insns/vssubu_vv.h new file mode 100644 index 0000000..c5c74fe --- /dev/null +++ b/riscv/insns/vssubu_vv.h @@ -0,0 +1,29 @@ +// vssubu.vv vd, vs2, vs1 +VI_LOOP_BASE +bool sat = false; + +switch (sew) { +case e8: { + VV_U_PARAMS(e8); + vd = sat_subu(vs2, vs1, sat); + break; +} +case e16: { + VV_U_PARAMS(e16); + vd = sat_subu(vs2, vs1, sat); + break; +} +case e32: { + VV_U_PARAMS(e32); + vd = sat_subu(vs2, vs1, sat); + break; +} +default: { + VV_U_PARAMS(e64); + vd = sat_subu(vs2, vs1, sat); + break; +} +} +P.VU.vxsat |= sat; + +VI_LOOP_END -- cgit v1.1