Skip to content

Commit

Permalink
vcompress.vm: Check if there is any vector extension before using vec…
Browse files Browse the repository at this point in the history
…tor CSRs
  • Loading branch information
YenHaoChen committed Aug 1, 2024
1 parent 9572283 commit a17842c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions riscv/insns/vcompress_vm.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
// vcompress vd, vs2, vs1
require(P.VU.vstart->read() == 0);
require_align(insn.rd(), P.VU.vflmul);
require_align(insn.rs2(), P.VU.vflmul);
require(insn.rd() != insn.rs2());
require_noover(insn.rd(), P.VU.vflmul, insn.rs1(), 1);

reg_t pos = 0;

VI_GENERAL_LOOP_BASE
require(P.VU.vstart->read() == 0);
require_align(insn.rd(), P.VU.vflmul);
require_align(insn.rs2(), P.VU.vflmul);
require_noover(insn.rd(), P.VU.vflmul, insn.rs1(), 1);

const int midx = i / 64;
const int mpos = i % 64;

Expand Down

0 comments on commit a17842c

Please sign in to comment.