1 2 3 4 5 6 7 8
require_extension('M'); require_rv64; sreg_t lhs = sext32(RS1); sreg_t rhs = sext32(RS2); if(rhs == 0) WRITE_RD(UINT64_MAX); else WRITE_RD(sext32(lhs / rhs));