From: Rabin Vincent Date: Sun, 14 Feb 2010 18:32:34 +0000 (+0530) Subject: target-arm: fix thumb CPS X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fa26df032ec3da7bf0db541e40b2ac1b19aea391;p=qemu.git target-arm: fix thumb CPS The Thumb CPS currently does not work correctly: CPSID touches more bits than the instruction wants to, and CPSIE does nothing. Fix it by passing the correct mask (the "affect" bits) and value. Signed-off-by: Rabin Vincent --- diff --git a/target-arm/translate.c b/target-arm/translate.c index 786c3294da..10a516b909 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -8898,7 +8898,7 @@ static void disas_thumb_insn(CPUState *env, DisasContext *s) shift = CPSR_A | CPSR_I | CPSR_F; else shift = 0; - gen_set_psr_im(s, shift, 0, ((insn & 7) << 6) & shift); + gen_set_psr_im(s, ((insn & 7) << 6), 0, shift); } break;