aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/vfnmsub_vf.h
diff options
context:
space:
mode:
authorChih-Min Chao <chihmin.chao@sifive.com>2019-06-06 03:25:04 -0700
committerChih-Min Chao <chihmin.chao@sifive.com>2019-06-18 08:56:11 -0700
commit833b965679f4502f83c66353bfc07a092cfac9f6 (patch)
tree293532625d0f60ec6b149b79b353f1ff1dda98c7 /riscv/insns/vfnmsub_vf.h
parent80ebc70e43e48c5a851348e898c13a2d8a8148d7 (diff)
downloadspike-833b965679f4502f83c66353bfc07a092cfac9f6.zip
spike-833b965679f4502f83c66353bfc07a092cfac9f6.tar.gz
spike-833b965679f4502f83c66353bfc07a092cfac9f6.tar.bz2
rvv: add floating-point instructions
based on v-spec 0.7.1, support sections: 14/15.3 ~ 15.4 element size: 32 Signed-off-by: Bruce Hoult <bruce@hoult.org> Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com> Signed-off-by: Dave Wen <dave.wen@sifive.com>
Diffstat (limited to 'riscv/insns/vfnmsub_vf.h')
-rw-r--r--riscv/insns/vfnmsub_vf.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/riscv/insns/vfnmsub_vf.h b/riscv/insns/vfnmsub_vf.h
new file mode 100644
index 0000000..1879b9e
--- /dev/null
+++ b/riscv/insns/vfnmsub_vf.h
@@ -0,0 +1,5 @@
+// vfnmsub: vd[i] = -(vd[i] * f[rs1]) + vs2[i]
+VI_VFP_VF_LOOP
+({
+ vd = f32_mulAdd(f32(vd.v ^ F32_SIGN), rs1, vs2);
+})