PPC: Clean up masked shift/rotate target settings.

This commit is contained in:
Mike Pall
2010-08-29 12:52:20 +02:00
parent 9c16a9f705
commit 844e40d700
3 changed files with 14 additions and 17 deletions

View File

@@ -1552,10 +1552,9 @@ static void LJ_FASTCALL recff_bit_shift(jit_State *J, RecordFFData *rd)
{
TRef tr = lj_ir_tobit(J, J->base[0]);
TRef tsh = lj_ir_tobit(J, J->base[1]);
#if !LJ_TARGET_MASKEDSHIFT
if (!tref_isk(tsh))
if (!(rd->data < IR_BROL ? LJ_TARGET_MASKSHIFT : LJ_TARGET_MASKROT) &&
!tref_isk(tsh))
tsh = emitir(IRTI(IR_BAND), tsh, lj_ir_kint(J, 31));
#endif
J->base[0] = emitir(IRTI(rd->data), tr, tsh);
}