From d98fac9b36dcfe34ae5721f01e1b1f2eb2c90c16 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 7 Nov 2018 11:49:00 +0000 Subject: [PATCH] mulh* redirect through rv_mul, to save on code --- riscv/sv_insn_redirect.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/riscv/sv_insn_redirect.cc b/riscv/sv_insn_redirect.cc index 1dcc3d4..cfdc6dc 100644 --- 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 */ -- 2.30.2