diff options
author | Andrew Waterman <andrew@sifive.com> | 2022-10-19 21:40:42 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2022-10-19 21:40:42 -0700 |
commit | b1f2ae41a1e64f416fb5f5aa092352439ecefa83 (patch) | |
tree | a5918c9e5ff22fb72c568f9751602ebbd8974d0f /riscv/v_ext_macros.h | |
parent | d41af9f81cb393ed6fad8b9cb756a5b459e7c9ab (diff) | |
download | riscv-isa-sim-b1f2ae41a1e64f416fb5f5aa092352439ecefa83.zip riscv-isa-sim-b1f2ae41a1e64f416fb5f5aa092352439ecefa83.tar.gz riscv-isa-sim-b1f2ae41a1e64f416fb5f5aa092352439ecefa83.tar.bz2 |
Template-ize stores
Diffstat (limited to 'riscv/v_ext_macros.h')
-rw-r--r-- | riscv/v_ext_macros.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/riscv/v_ext_macros.h b/riscv/v_ext_macros.h index 82d5622..0984a80 100644 --- a/riscv/v_ext_macros.h +++ b/riscv/v_ext_macros.h @@ -1238,7 +1238,7 @@ reg_t index[P.VU.vlmax]; \ P.VU.vstart->write(i); \ for (reg_t fn = 0; fn < nf; ++fn) { \ elt_width##_t val = P.VU.elt<elt_width##_t>(vs3 + fn * emul, vreg_inx); \ - MMU.store_##elt_width( \ + MMU.store<elt_width##_t>( \ baseAddr + (stride) + (offset) * sizeof(elt_width##_t), val); \ } \ } \ @@ -1260,19 +1260,19 @@ reg_t index[P.VU.vlmax]; \ for (reg_t fn = 0; fn < nf; ++fn) { \ switch (P.VU.vsew) { \ case e8: \ - MMU.store_uint8(baseAddr + index[i] + fn * 1, \ + MMU.store<uint8_t>(baseAddr + index[i] + fn * 1, \ P.VU.elt<uint8_t>(vs3 + fn * flmul, vreg_inx)); \ break; \ case e16: \ - MMU.store_uint16(baseAddr + index[i] + fn * 2, \ + MMU.store<uint16_t>(baseAddr + index[i] + fn * 2, \ P.VU.elt<uint16_t>(vs3 + fn * flmul, vreg_inx)); \ break; \ case e32: \ - MMU.store_uint32(baseAddr + index[i] + fn * 4, \ + MMU.store<uint32_t>(baseAddr + index[i] + fn * 4, \ P.VU.elt<uint32_t>(vs3 + fn * flmul, vreg_inx)); \ break; \ default: \ - MMU.store_uint64(baseAddr + index[i] + fn * 8, \ + MMU.store<uint64_t>(baseAddr + index[i] + fn * 8, \ P.VU.elt<uint64_t>(vs3 + fn * flmul, vreg_inx)); \ break; \ } \ @@ -1359,7 +1359,7 @@ reg_t index[P.VU.vlmax]; \ if (off) { \ for (reg_t pos = off; pos < P.VU.vlenb; ++pos) { \ auto val = P.VU.elt<uint8_t>(vs3 + i, pos); \ - MMU.store_uint8(baseAddr + P.VU.vstart->read(), val); \ + MMU.store<uint8_t>(baseAddr + P.VU.vstart->read(), val); \ P.VU.vstart->write(P.VU.vstart->read() + 1); \ } \ i++; \ @@ -1367,7 +1367,7 @@ reg_t index[P.VU.vlmax]; \ for (; i < len; ++i) { \ for (reg_t pos = 0; pos < P.VU.vlenb; ++pos) { \ auto val = P.VU.elt<uint8_t>(vs3 + i, pos); \ - MMU.store_uint8(baseAddr + P.VU.vstart->read(), val); \ + MMU.store<uint8_t>(baseAddr + P.VU.vstart->read(), val); \ P.VU.vstart->write(P.VU.vstart->read() + 1); \ } \ } \ |