tcg-i386: fix andi r, r, 0xff

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
This commit is contained in:
Aurelien Jarno 2010-06-10 20:52:47 +02:00
parent 447d681e8b
commit dc397ca35e

View File

@ -679,7 +679,7 @@ static void tgen_arithi(TCGContext *s, int c, int r0,
rexw = 0;
}
}
if (val == 0xffu) {
if (val == 0xffu && (r0 < 4 || TCG_TARGET_REG_BITS == 64)) {
tcg_out_ext8u(s, r0, r0);
return;
}