On Thu, May 03, 2018 at 11:21:54AM -0700, Richard Henderson wrote: > On 05/03/2018 02:19 AM, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" <edgar.igles...@xilinx.com> > > > > Use TCGv for load/store addresses, allowing for future > > computation of 64-bit load/store address. > > > > No functional change. > > > > Signed-off-by: Edgar E. Iglesias <edgar.igles...@xilinx.com> > > Reviewed-by: Richard Henderson <richard.hender...@linaro.org> > > > > if (dc->imm == 0) { > > - tcg_gen_mov_i32(t, cpu_R[dc->ra]); > > - return; > > + tcg_gen_mov_i32(t32, cpu_R[dc->ra]); > > + } else { > > + tcg_gen_movi_i32(t32, (int32_t)((int16_t)dc->imm)); > > + tcg_gen_add_i32(t32, cpu_R[dc->ra], t32); > > } > > For future cleanup, this should be > > tcg_gen_addi_i32(t32, cpu_R[dc->ra], (int16_t)dc->imm); > > The check for 0 will be done inside of tcg_gen_addi_i32.
Thanks, I've added a follow-up patch that cleans this up in v2 of this series. Cheers, Edgar