diff options
Diffstat (limited to 'target-arm/translate.c')
-rw-r--r-- | target-arm/translate.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/target-arm/translate.c b/target-arm/translate.c index 50fe8aa5e5..3efd55ee3e 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -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; |