diff options
author | Yueh-Ting (eop) Chen <yueh.ting.chen@gmail.com> | 2021-12-08 03:18:45 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-07 11:18:45 -0800 |
commit | 8f16ed328f13eb00fdae921b2e6adf8d6e528f0b (patch) | |
tree | 9b12823d9babd725c43b58c48af4f6260e6181b1 /riscv/insns/vsbc_vxm.h | |
parent | 522d8a20b7bf4ab5cad0ceaa3b45155fb6d08f76 (diff) | |
download | spike-8f16ed328f13eb00fdae921b2e6adf8d6e528f0b.zip spike-8f16ed328f13eb00fdae921b2e6adf8d6e528f0b.tar.gz spike-8f16ed328f13eb00fdae921b2e6adf8d6e528f0b.tar.bz2 |
Simplify vadc and vsbc (#876)
Diffstat (limited to 'riscv/insns/vsbc_vxm.h')
-rw-r--r-- | riscv/insns/vsbc_vxm.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/riscv/insns/vsbc_vxm.h b/riscv/insns/vsbc_vxm.h index c6f9ca8..fc98321 100644 --- a/riscv/insns/vsbc_vxm.h +++ b/riscv/insns/vsbc_vxm.h @@ -1,10 +1,5 @@ // vsbc.vxm vd, vs2, rs1, v0 VI_XI_LOOP_WITH_CARRY ({ - auto &v0 = P.VU.elt<uint64_t>(0, midx); - const uint128_t op_mask = (UINT64_MAX >> (64 - sew)); - uint64_t carry = (v0 >> mpos) & 0x1; - - uint128_t res = (op_mask & vs2) - (op_mask & rs1) - carry; - vd = res; + vd = (uint128_t)((op_mask & vs2) - (op_mask & rs1) - carry); }) |