projects
/
riscv-isa-sim.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
reimplement div[u][w]/rem[u][w]
[riscv-isa-sim.git]
/
riscv
/
insns
/
remw.h
1
require_xpr64
;
2
sreg_t lhs
=
sext32
(
RS1
);
3
sreg_t rhs
=
sext32
(
RS2
);
4
if
(
rhs
==
0
)
5
RD
=
lhs
;
6
else
7
RD
=
sext32
(
lhs
%
rhs
);