Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
howjmay committed Nov 30, 2024
1 parent ee072a9 commit 9225e3b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1959,7 +1959,7 @@ static inline bool op_mvx(rv_insn_t *ir, const uint32_t insn) {}
static inline bool op_v(rv_insn_t *ir, const uint32_t insn)
{
uint32_t funct3_mask = 0x7000;
switch (insn & funct3_mask) {
switch ((insn & funct3_mask) >> 7) {
case 0:
return op_ivv(ir, insn);
case 1:
Expand Down
4 changes: 4 additions & 0 deletions src/riscv.h
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,10 @@ typedef struct {
*/
uint32_t args_offset_size;

/* The max bits that RVV a single instruction can process
*/
uint16_t vlen;

/* arguments of emulation program */
int argc;
char **argv;
Expand Down
4 changes: 4 additions & 0 deletions src/riscv_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ struct riscv_internal {
uint32_t csr_fcsr;
#endif

#if RV32_HAS(EXT_RVV)
uint8_t vl; /* current vl size */
#endif

/* csr registers */
uint64_t csr_cycle; /* Machine cycle counter */
uint32_t csr_time[2]; /* Performance counter */
Expand Down

0 comments on commit 9225e3b

Please sign in to comment.