diff options
author | Chih-Min Chao <chihmin.chao@sifive.com> | 2019-04-18 19:53:31 -0700 |
---|---|---|
committer | Chih-Min Chao <chihmin.chao@sifive.com> | 2019-04-18 19:53:33 -0700 |
commit | 3b0e5114147ecbc63e4b086357bb3514c89cd5dd (patch) | |
tree | 273db864abe0d045d3564b496864ad472de18959 /riscv/insns/vmv_s_x.h | |
parent | 335043589c4b320b6cf4725c7b0fc94e8912b612 (diff) | |
download | spike-3b0e5114147ecbc63e4b086357bb3514c89cd5dd.zip spike-3b0e5114147ecbc63e4b086357bb3514c89cd5dd.tar.gz spike-3b0e5114147ecbc63e4b086357bb3514c89cd5dd.tar.bz2 |
rvv: fix vmv.s.x wordaround
as has been fix
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Diffstat (limited to 'riscv/insns/vmv_s_x.h')
-rw-r--r-- | riscv/insns/vmv_s_x.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/riscv/insns/vmv_s_x.h b/riscv/insns/vmv_s_x.h index 8ee0fc2..0d541aa 100644 --- a/riscv/insns/vmv_s_x.h +++ b/riscv/insns/vmv_s_x.h @@ -1,6 +1,4 @@ // vmv_s_x: vd[0] = rs1 -// this is wordaround implementation. The spec uses rs1 -// require(STATE.VU.vsew == e8 || STATE.VU.vsew == e16 || STATE.VU.vsew == e32 || STATE.VU.vsew == e64); reg_t vl = STATE.VU.vl; @@ -12,16 +10,16 @@ if (vl == 0) { } else { switch(sew) { case e8: - STATE.VU.elt<uint8_t>(rd_num, 0) = RS2; + STATE.VU.elt<uint8_t>(rd_num, 0) = RS1; break; case e16: - STATE.VU.elt<uint16_t>(rd_num, 0) = RS2; + STATE.VU.elt<uint16_t>(rd_num, 0) = RS1; break; case e32: - STATE.VU.elt<uint32_t>(rd_num, 0) = RS2; + STATE.VU.elt<uint32_t>(rd_num, 0) = RS1; break; default: - STATE.VU.elt<uint64_t>(rd_num, 0) = RS2; + STATE.VU.elt<uint64_t>(rd_num, 0) = RS1; break; } |