Browse Source
new features in spec 0.9 Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>pull/448/head
17 changed files with 58 additions and 156 deletions
@ -1,3 +1,3 @@ |
|||
// vsb.v and vsseg[2-8]b.v
|
|||
// vsb.v
|
|||
require(P.VU.vsew >= e8); |
|||
VI_ST(0, i * nf + fn, uint8, 1); |
|||
VI_ST(0, i * nf + fn, uint8, 1, false); |
|||
|
|||
@ -1,13 +1,13 @@ |
|||
// vsw.v and vsseg[2-8]w.v
|
|||
// vse.v and vsseg[2-8]e.v
|
|||
reg_t sew = P.VU.vsew; |
|||
|
|||
if (sew == e8) { |
|||
VI_ST(0, (i * nf + fn), uint8, 1); |
|||
VI_ST(0, (i * nf + fn), uint8, 1, true); |
|||
} else if (sew == e16) { |
|||
VI_ST(0, (i * nf + fn), uint16, 2); |
|||
VI_ST(0, (i * nf + fn), uint16, 2, true); |
|||
} else if (sew == e32) { |
|||
VI_ST(0, (i * nf + fn), uint32, 4); |
|||
VI_ST(0, (i * nf + fn), uint32, 4, true); |
|||
} else if (sew == e64) { |
|||
VI_ST(0, (i * nf + fn), uint64, 8); |
|||
VI_ST(0, (i * nf + fn), uint64, 8, true); |
|||
} |
|||
|
|||
|
|||
@ -1,3 +1,3 @@ |
|||
// vsh.v and vsseg[2-8]h.v
|
|||
// vsh.v
|
|||
require(P.VU.vsew >= e16); |
|||
VI_ST(0, i * nf + fn, uint16, 2); |
|||
VI_ST(0, i * nf + fn, uint16, 2, false); |
|||
|
|||
@ -1,3 +1,3 @@ |
|||
// vssb.v and vssseg[2-8]b.v
|
|||
// vssb.v
|
|||
require(P.VU.vsew >= e8); |
|||
VI_ST(i * RS2, fn, uint8, 1); |
|||
VI_ST(i * RS2, fn, uint8, 1, false); |
|||
|
|||
@ -1,3 +1,3 @@ |
|||
// vssh.v and vssseg[2-8]h.v
|
|||
// vssh.v
|
|||
require(P.VU.vsew >= e16); |
|||
VI_ST(i * RS2, fn, uint16, 2); |
|||
VI_ST(i * RS2, fn, uint16, 2, false); |
|||
|
|||
@ -1,3 +1,3 @@ |
|||
// vssw.v and vssseg[2-8]w.v
|
|||
// vssw.v
|
|||
require(P.VU.vsew >= e32); |
|||
VI_ST(i * RS2, fn, uint32, 4); |
|||
VI_ST(i * RS2, fn, uint32, 4, false); |
|||
|
|||
@ -1,34 +1,4 @@ |
|||
// vsuxb.v and vsxseg[2-8]b.v
|
|||
// vsuxb.v
|
|||
require(P.VU.vsew >= e8); |
|||
VI_CHECK_STORE_SXX; |
|||
require((insn.rs2() & (P.VU.vlmul - 1)) == 0); \ |
|||
reg_t vl = P.VU.vl; |
|||
reg_t baseAddr = RS1; |
|||
reg_t stride = insn.rs2(); |
|||
reg_t vs3 = insn.rd(); |
|||
reg_t vlmax = P.VU.vlmax; |
|||
VI_DUPLICATE_VREG(stride, vlmax); |
|||
for (reg_t i = 0; i < vlmax && vl != 0; ++i) { |
|||
VI_ELEMENT_SKIP(i); |
|||
VI_STRIP(i) |
|||
|
|||
switch (P.VU.vsew) { |
|||
case e8: |
|||
MMU.store_uint8(baseAddr + index[i], |
|||
P.VU.elt<uint8_t>(vs3, vreg_inx)); |
|||
break; |
|||
case e16: |
|||
MMU.store_uint8(baseAddr + index[i], |
|||
P.VU.elt<uint16_t>(vs3, vreg_inx)); |
|||
break; |
|||
case e32: |
|||
MMU.store_uint8(baseAddr + index[i], |
|||
P.VU.elt<uint32_t>(vs3, vreg_inx)); |
|||
break; |
|||
case e64: |
|||
MMU.store_uint8(baseAddr + index[i], |
|||
P.VU.elt<uint64_t>(vs3, vreg_inx)); |
|||
break; |
|||
} |
|||
} |
|||
P.VU.vstart = 0; |
|||
VI_DUPLICATE_VREG(insn.rs2(), P.VU.vlmax); |
|||
VI_ST_INDEX(index[i], fn, uint8, 1, false); |
|||
|
|||
@ -1,30 +1,4 @@ |
|||
// vsxh.v and vsxseg[2-8]h.v
|
|||
// vsuxh.v
|
|||
require(P.VU.vsew >= e16); |
|||
VI_CHECK_STORE_SXX; |
|||
require((insn.rs2() & (P.VU.vlmul - 1)) == 0); \ |
|||
reg_t vl = P.VU.vl; |
|||
reg_t baseAddr = RS1; |
|||
reg_t stride = insn.rs2(); |
|||
reg_t vs3 = insn.rd(); |
|||
reg_t vlmax = P.VU.vlmax; |
|||
VI_DUPLICATE_VREG(stride, vlmax); |
|||
for (reg_t i = 0; i < vlmax && vl != 0; ++i) { |
|||
VI_ELEMENT_SKIP(i); |
|||
VI_STRIP(i) |
|||
|
|||
switch (P.VU.vsew) { |
|||
case e16: |
|||
MMU.store_uint16(baseAddr + index[i], |
|||
P.VU.elt<uint16_t>(vs3, vreg_inx)); |
|||
break; |
|||
case e32: |
|||
MMU.store_uint16(baseAddr + index[i], |
|||
P.VU.elt<uint32_t>(vs3, vreg_inx)); |
|||
break; |
|||
case e64: |
|||
MMU.store_uint16(baseAddr + index[i], |
|||
P.VU.elt<uint64_t>(vs3, vreg_inx)); |
|||
break; |
|||
} |
|||
} |
|||
P.VU.vstart = 0; |
|||
VI_DUPLICATE_VREG(insn.rs2(), P.VU.vlmax); |
|||
VI_ST_INDEX(index[i], fn, uint16, 2, false); |
|||
|
|||
@ -1,26 +1,4 @@ |
|||
// vsxw.v and vsxseg[2-8]w.v
|
|||
// vsuxw.v
|
|||
require(P.VU.vsew >= e32); |
|||
VI_CHECK_STORE_SXX; |
|||
require((insn.rs2() & (P.VU.vlmul - 1)) == 0); \ |
|||
reg_t vl = P.VU.vl; |
|||
reg_t baseAddr = RS1; |
|||
reg_t stride = insn.rs2(); |
|||
reg_t vs3 = insn.rd(); |
|||
reg_t vlmax = P.VU.vlmax; |
|||
VI_DUPLICATE_VREG(stride, vlmax); |
|||
for (reg_t i = 0; i < vlmax && vl != 0; ++i) { |
|||
VI_ELEMENT_SKIP(i); |
|||
VI_STRIP(i) |
|||
|
|||
switch (P.VU.vsew) { |
|||
case e32: |
|||
MMU.store_uint32(baseAddr + index[i], |
|||
P.VU.elt<uint32_t>(vs3, vreg_inx)); |
|||
break; |
|||
case e64: |
|||
MMU.store_uint32(baseAddr + index[i], |
|||
P.VU.elt<uint64_t>(vs3, vreg_inx)); |
|||
break; |
|||
} |
|||
} |
|||
P.VU.vstart = 0; |
|||
VI_DUPLICATE_VREG(insn.rs2(), P.VU.vlmax); |
|||
VI_ST_INDEX(index[i], fn, uint32, 4, false); |
|||
|
|||
@ -1,3 +1,3 @@ |
|||
// vsw.v and vsseg[2-8]w.v
|
|||
// vsw.v
|
|||
require(P.VU.vsew >= e32); |
|||
VI_ST(0, i * nf + fn, uint32, 4); |
|||
VI_ST(0, i * nf + fn, uint32, 4, false); |
|||
|
|||
@ -1,4 +1,4 @@ |
|||
// vsxb.v and vsxseg[2-8]b.v
|
|||
// vsxb.v
|
|||
require(P.VU.vsew >= e8); |
|||
VI_DUPLICATE_VREG(insn.rs2(), P.VU.vlmax); |
|||
VI_ST_INDEX(index[i], fn, uint8, 1); |
|||
VI_ST_INDEX(index[i], fn, uint8, 1, false); |
|||
|
|||
@ -1,4 +1,4 @@ |
|||
// vsxh.v and vsxseg[2-8]h.v
|
|||
// vsxh.v
|
|||
require(P.VU.vsew >= e16); |
|||
VI_DUPLICATE_VREG(insn.rs2(), P.VU.vlmax); |
|||
VI_ST_INDEX(index[i], fn, uint16, 2); |
|||
VI_ST_INDEX(index[i], fn, uint16, 2, false); |
|||
|
|||
@ -1,4 +1,4 @@ |
|||
// vsxw.v and vsxseg[2-8]w.v
|
|||
// vsxw.v
|
|||
require(P.VU.vsew >= e32); |
|||
VI_DUPLICATE_VREG(insn.rs2(), P.VU.vlmax); |
|||
VI_ST_INDEX(index[i], fn, uint32, 4); |
|||
VI_ST_INDEX(index[i], fn, uint32, 4, false); |
|||
|
|||
Loading…
Reference in new issue