On Mon, Apr 01, 2013 at 08:43:24AM -0700, Richard Henderson wrote: > On 2013-04-01 07:55, Aurelien Jarno wrote: > >>>+static void tcg_out_andi32(TCGContext *s, TCGReg dst, TCGReg src, > >>>uint32_t c) > >>>+{ > >>>+ int mb, me; > >>>+ > >>>+ if ((c & 0xffff) == c) { > >>>+ tcg_out32(s, ANDI | SAI(src, dst, c)); > >>>+ return; > >>>+ } else if ((c & 0xffff0000) == c) { > >>>+ tcg_out32(s, ANDIS | SAI(src, dst, c >> 16)); > >>>+ return; > >>>+ } else if (mask_operand(c, &mb, &me)) { > >>>+ tcg_out_rlw(s, RLWINM, dst, src, 0, mb, me); > >>>+ } else { > >>>+ tcg_out_movi(s, TCG_TYPE_I32, 0, c); > >>>+ tcg_out32(s, AND | SAB(src, dst, 0)); > >Give it's a 32-bit constant, wouldn't it be better to use ANDI + > >ANDIS here? > > > > x & 0xffff0000 & 0x0000ffff == 0. > > Unlike IOR and XOR...
Looks like I read it too quickly. Therefore: Reviewed-by: Aurelien Jarno <aurel...@aurel32.net> -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurel...@aurel32.net http://www.aurel32.net