From: Luke Kenneth Casson Leighton Date: Fri, 19 Oct 2018 22:46:00 +0000 (+0100) Subject: const& on more sv_sreg_t usage X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d09cb546347d4f56439d1c480b95908913b3731c;p=riscv-isa-sim.git const& on more sv_sreg_t usage --- diff --git a/riscv/sv_insn_redirect.cc b/riscv/sv_insn_redirect.cc index c46b55c..a5ba035 100644 --- a/riscv/sv_insn_redirect.cc +++ b/riscv/sv_insn_redirect.cc @@ -579,17 +579,17 @@ sv_reg_t (sv_proc_t::f128_to_i64)( float128_t a, uint_fast8_t roundingMode, return sv_reg_t(::f128_to_i64(a, roundingMode, exact)); } -sv_sreg_t (sv_proc_t::mulhsu)(sv_sreg_t a, sv_reg_t b) +sv_sreg_t (sv_proc_t::mulhsu)(sv_sreg_t const& a, sv_reg_t const& b) { return sv_sreg_t(::mulhsu(a, b)); } -sv_sreg_t (sv_proc_t::mulh)(sv_sreg_t a, sv_sreg_t b) +sv_sreg_t (sv_proc_t::mulh)(sv_sreg_t const& a, sv_sreg_t const& b) { return sv_sreg_t(::mulh(a, b)); } -sv_reg_t (sv_proc_t::mulhu)(sv_reg_t a, sv_reg_t b) +sv_reg_t (sv_proc_t::mulhu)(sv_reg_t const& a, sv_reg_t const& b) { return sv_reg_t(::mulhu(a, b)); } diff --git a/riscv/sv_insn_redirect.h b/riscv/sv_insn_redirect.h index 8c4c9ef..4988ad5 100644 --- a/riscv/sv_insn_redirect.h +++ b/riscv/sv_insn_redirect.h @@ -191,9 +191,9 @@ public: bool exact ); - sv_sreg_t (mulhsu)(sv_sreg_t a, sv_reg_t b); - sv_reg_t (mulhu)(sv_reg_t a, sv_reg_t b); - sv_sreg_t (mulh)(sv_sreg_t a, sv_sreg_t b); + sv_sreg_t (mulhsu)(sv_sreg_t const& a, sv_reg_t const& b); + sv_reg_t (mulhu)(sv_reg_t const& a, sv_reg_t const& b); + sv_sreg_t (mulh)(sv_sreg_t const& a, sv_sreg_t const& b); #include "sv_insn_decl.h"