aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/divuw.h
blob: e127619aa990ad3394c16810268be611543ef221 (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(UINT64_MAX);
else
  WRITE_RD(sext32(lhs / rhs));