aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunsup Lee <yunsup@cs.berkeley.edu>2014-03-02 00:49:32 -0800
committerYunsup Lee <yunsup@cs.berkeley.edu>2014-03-02 00:49:32 -0800
commite4a605049ae7066004acbdce65d6e87ced84a398 (patch)
tree8141d8caa14ab05a1b957c7c61d749fc5c7a1f36
parent0a048a93ebdab87473fcb50bc647e84098693cd0 (diff)
downloadriscv-isa-sim-e4a605049ae7066004acbdce65d6e87ced84a398.zip
riscv-isa-sim-e4a605049ae7066004acbdce65d6e87ced84a398.tar.gz
riscv-isa-sim-e4a605049ae7066004acbdce65d6e87ced84a398.tar.bz2
add hwacha vfmsv instructions
-rw-r--r--hwacha/encodings_hwacha.h8
-rw-r--r--hwacha/hwacha_disasm.cc3
-rw-r--r--hwacha/insns/vfmsv_d.h (renamed from hwacha/insns/vfmsv.h)0
-rw-r--r--hwacha/insns/vfmsv_s.h3
-rw-r--r--hwacha/opcodes_hwacha.h3
5 files changed, 12 insertions, 5 deletions
diff --git a/hwacha/encodings_hwacha.h b/hwacha/encodings_hwacha.h
index 2be35eb..11fa889 100644
--- a/hwacha/encodings_hwacha.h
+++ b/hwacha/encodings_hwacha.h
@@ -73,8 +73,9 @@
#define MASK_VFLSEGSTD 0x1e00707f
#define MASK_VFLSEGSTW 0x1e00707f
#define MASK_VFLSEGW 0x1ff0707f
-#define MASK_VFMSV 0xfff0707f
#define MASK_VFMVV 0xfff0707f
+#define MASK_VFMSV_S 0xfff0707f
+#define MASK_VFMSV_D 0xfff0707f
#define MASK_VFSSEGD 0x1ff0707f
#define MASK_VFSSEGSTD 0x1e00707f
#define MASK_VFSSEGSTW 0x1e00707f
@@ -120,8 +121,9 @@
#define MATCH_VFLSEGSTD 0x1600305b
#define MATCH_VFLSEGSTW 0x1400305b
#define MATCH_VFLSEGW 0x1400205b
-#define MATCH_VFMSV 0x1200202b
-#define MATCH_VFMVV 0x1200002b
+#define MATCH_VFMVV 0x1000002b
+#define MATCH_VFMSV_S 0x1000202b
+#define MATCH_VFMSV_D 0x1200202b
#define MATCH_VFSSEGD 0x1600207b
#define MATCH_VFSSEGSTD 0x1600307b
#define MATCH_VFSSEGSTW 0x1400307b
diff --git a/hwacha/hwacha_disasm.cc b/hwacha/hwacha_disasm.cc
index 6d3f13f..02e3d57 100644
--- a/hwacha/hwacha_disasm.cc
+++ b/hwacha/hwacha_disasm.cc
@@ -133,7 +133,8 @@ std::vector<disasm_insn_t*> hwacha_t::get_disasms()
DISASM_INSN("vmvv", vmvv, 0, {&vxrd, &vxrs1});
DISASM_INSN("vmsv", vmsv, 0, {&vxrd, &xrs1});
DISASM_INSN("vfmvv", vfmvv, 0, {&vfrd, &vfrs1});
- DISASM_INSN("vfmsv", vfmsv, 0, {&vfrd, &xrs1});
+ DISASM_INSN("vfmsv.s", vfmsv_s, 0, {&vfrd, &xrs1});
+ DISASM_INSN("vfmsv.d", vfmsv_d, 0, {&vfrd, &xrs1});
DISASM_INSN("vf", vf, 0, {&vf_addr});
DISASM_INSN("vxcptcause", vxcptcause, 0, {&xrd});
diff --git a/hwacha/insns/vfmsv.h b/hwacha/insns/vfmsv_d.h
index d1df3a1..d1df3a1 100644
--- a/hwacha/insns/vfmsv.h
+++ b/hwacha/insns/vfmsv_d.h
diff --git a/hwacha/insns/vfmsv_s.h b/hwacha/insns/vfmsv_s.h
new file mode 100644
index 0000000..d1df3a1
--- /dev/null
+++ b/hwacha/insns/vfmsv_s.h
@@ -0,0 +1,3 @@
+for (uint32_t i=0; i<VL; i++) {
+ UT_WRITE_FRD(i, XS1);
+}
diff --git a/hwacha/opcodes_hwacha.h b/hwacha/opcodes_hwacha.h
index 7fa05e3..b6dbe8b 100644
--- a/hwacha/opcodes_hwacha.h
+++ b/hwacha/opcodes_hwacha.h
@@ -5,7 +5,8 @@ DECLARE_INSN(vflsegd, MATCH_VFLSEGD, MASK_VFLSEGD)
DECLARE_INSN(vflsegstd, MATCH_VFLSEGSTD, MASK_VFLSEGSTD)
DECLARE_INSN(vflsegstw, MATCH_VFLSEGSTW, MASK_VFLSEGSTW)
DECLARE_INSN(vflsegw, MATCH_VFLSEGW, MASK_VFLSEGW)
-DECLARE_INSN(vfmsv, MATCH_VFMSV, MASK_VFMSV)
+DECLARE_INSN(vfmsv_d, MATCH_VFMSV_D, MASK_VFMSV_D)
+DECLARE_INSN(vfmsv_s, MATCH_VFMSV_S, MASK_VFMSV_S)
DECLARE_INSN(vfmvv, MATCH_VFMVV, MASK_VFMVV)
DECLARE_INSN(vfssegd, MATCH_VFSSEGD, MASK_VFSSEGD)
DECLARE_INSN(vfssegstd, MATCH_VFSSEGSTD, MASK_VFSSEGSTD)