aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/div.h
blob: 82a40666dcca5021cf67dc7f74c828b52e2e3089 (plain)
1
2
3
4
5
6
if(RS2 == 0)
  RD = UINT64_MAX;
else if(sreg_t(RS1) == INT64_MIN && sreg_t(RS2) == -1)
  RD = RS1;
else
  RD = sext_xprlen(sext_xprlen(RS1) / sext_xprlen(RS2));