aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/divuw.h
blob: bc7e9d2d3fd0622e602ce1e253de16d1e59d369b (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));