projects
/
riscv-isa-sim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
939d3fd
)
mulh* redirect through rv_mul, to save on code
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Wed, 7 Nov 2018 11:49:00 +0000
(11:49 +0000)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Wed, 7 Nov 2018 11:49:00 +0000
(11:49 +0000)
riscv/sv_insn_redirect.cc
patch
|
blob
|
history
diff --git
a/riscv/sv_insn_redirect.cc
b/riscv/sv_insn_redirect.cc
index 1dcc3d478bd83cf48a7d87ac53b43b8bce947334..cfdc6dc88505ca8432a7362f7722eaeac4ed0fea 100644
(file)
--- a/
riscv/sv_insn_redirect.cc
+++ b/
riscv/sv_insn_redirect.cc
@@
-605,17
+605,17
@@
sv_sreg_t sv_proc_t::rv_mul(sv_sreg_t const & lhs, sv_sreg_t const & rhs)
/* 32-bit mulh/mulhu/mulhsu */
sv_reg_t sv_proc_t::rv_mulhu(sv_reg_t const & lhs, sv_reg_t const & rhs)
{
- return
(lhs *
rhs) >> 32;
+ return
rv_mul(lhs,
rhs) >> 32;
}
sv_sreg_t sv_proc_t::rv_mulhsu(sv_sreg_t const & lhs, sv_reg_t const & rhs)
{
- return
(lhs *
rhs) >> 32;
+ return
rv_mul(lhs,
rhs) >> 32;
}
sv_sreg_t sv_proc_t::rv_mulh(sv_sreg_t const & lhs, sv_sreg_t const & rhs)
{
- return
(lhs *
rhs) >> 32;
+ return
rv_mul(lhs,
rhs) >> 32;
}
/* 64-bit mulh/mulhu/mulhsu */