diff options
author | 2009-09-27 19:36:05 +0200 | |
---|---|---|
committer | 2009-09-27 20:00:38 +0200 | |
commit | b70650cbfea324438f55c2269138dd7f4e7cf086 (patch) | |
tree | ef9d00d4145ef450001c3f418d3ac565b0a34b8b /tcg | |
parent | Compile some user files only once for all targets (diff) | |
download | qemu-kvm-b70650cbfea324438f55c2269138dd7f4e7cf086.tar.gz qemu-kvm-b70650cbfea324438f55c2269138dd7f4e7cf086.tar.bz2 qemu-kvm-b70650cbfea324438f55c2269138dd7f4e7cf086.zip |
tcg/i386: optimize and $0xff(ff), reg
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg')
-rw-r--r-- | tcg/i386/tcg-target.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index a95fe4c20..d318443ff 100644 --- a/tcg/i386/tcg-target.c +++ b/tcg/i386/tcg-target.c @@ -281,6 +281,12 @@ static inline void tgen_arithi(TCGContext *s, int c, int r0, int32_t val) if (val == (int8_t)val) { tcg_out_modrm(s, 0x83, c, r0); tcg_out8(s, val); + } else if (c == ARITH_AND && val == 0xffu && r0 < 4) { + /* movzbl */ + tcg_out_modrm(s, 0xb6 | P_EXT, r0, r0); + } else if (c == ARITH_AND && val == 0xffffu) { + /* movzwl */ + tcg_out_modrm(s, 0xb7 | P_EXT, r0, r0); } else { tcg_out_modrm(s, 0x81, c, r0); tcg_out32(s, val); |