From: kub Date: Thu, 15 Apr 2021 22:18:58 +0000 (+0200) Subject: sh2 drc, tiny optimization for x86 X-Git-Tag: v2.00~553 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75aba9cc656ba7ae26df5c09e7ef46f209dcbda0;p=picodrive.git sh2 drc, tiny optimization for x86 --- diff --git a/cpu/sh2/compiler.c b/cpu/sh2/compiler.c index 8a46f431..1adfe838 100644 --- a/cpu/sh2/compiler.c +++ b/cpu/sh2/compiler.c @@ -2661,6 +2661,10 @@ static int emit_get_rbase_and_offs(SH2 *sh2, sh2_reg_e r, int rmode, s32 *offs) } else { // known fixed host address la = split_address(la + ((a + *offs) & mask), omask, offs); + if (la == 0) { + la = *offs; + *offs = 0; + } hr = rcache_get_tmp(); emith_move_r_ptr_imm(hr, la); }