aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/remuw.h
blob: b239c8f32397db74e128e8139bbf028a5a3f004d (plain)
1
2
3
4
5
6
7
8
require_extension('M');
require_rv64;
reg_t lhs = zext32(RS1);
reg_t rhs = zext32(RS2);
if(rhs == 0)
  WRITE_RD(sext32(lhs));
else
  WRITE_RD(sext32(lhs % rhs));