Skip to content

Commit

Permalink
VEX IR generator added for RISCV WFI instruction (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvelynVusky authored Aug 8, 2023
1 parent 7fec1bc commit 441d2f1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions priv/guest_riscv64_toIR.c
Original file line number Diff line number Diff line change
Expand Up @@ -3283,6 +3283,14 @@ static Bool dis_RV64Zicsr(/*MB_OUT*/ DisResult* dres,
}
}

/* ----------------- wfi ------------------ */
if (INSN(6, 0) == 0b1110011 && INSN(14, 12) == 0b000 && INSN(24, 20) == 0b00101) {
/* Add a noOp statement to the list held by irsb. */
stmt(irsb, IRStmt_NoOp());
DIP("wfi\n");
return True;
}

return False;
}

Expand Down

0 comments on commit 441d2f1

Please sign in to comment.