diff options
Diffstat (limited to 'riscv/insns/remu.h')
-rw-r--r-- | riscv/insns/remu.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/riscv/insns/remu.h b/riscv/insns/remu.h index e6af512..3b6c44f 100644 --- a/riscv/insns/remu.h +++ b/riscv/insns/remu.h @@ -1,2 +1,5 @@ require64; -RD = RS1 % RS2; +if(RS2 == 0) + RD = 0; +else + RD = RS1 % RS2; |