zero offset optimisation

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@635 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2004-02-22 13:40:57 +00:00
parent edf779ffcc
commit 537730b956

View File

@ -279,7 +279,8 @@ static inline void gen_add_data_offset(DisasContext *s, unsigned int insn)
val = insn & 0xfff;
if (!(insn & (1 << 23)))
val = -val;
gen_op_addl_T1_im(val);
if (val != 0)
gen_op_addl_T1_im(val);
} else {
/* shift/register */
rm = (insn) & 0xf;
@ -304,7 +305,8 @@ static inline void gen_add_datah_offset(DisasContext *s, unsigned int insn)
val = (insn & 0xf) | ((insn >> 4) & 0xf0);
if (!(insn & (1 << 23)))
val = -val;
gen_op_addl_T1_im(val);
if (val != 0)
gen_op_addl_T1_im(val);
} else {
/* register */
rm = (insn) & 0xf;