target/arm: Remove redundant s->pc & ~1

The thumb bit has already been removed from s->pc, and is always even.

Backports commit 4818c3743b0e0095fdcecd24457da9b3443730ab from qemu
This commit is contained in:
Richard Henderson 2019-11-18 17:15:14 -05:00 committed by Lioncash
parent a2e60445de
commit 7d1fcef722
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -1349,7 +1349,7 @@ static void gen_exception_bkpt_insn(DisasContext *s, int offset, uint32_t syn)
static inline void gen_lookup_tb(DisasContext *s)
{
TCGContext *tcg_ctx = s->uc->tcg_ctx;
tcg_gen_movi_i32(tcg_ctx, tcg_ctx->cpu_R[15], s->pc & ~1);
tcg_gen_movi_i32(tcg_ctx, tcg_ctx->cpu_R[15], s->pc);
s->base.is_jmp = DISAS_EXIT;
}
@ -7988,7 +7988,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn)
* self-modifying code correctly and also to take
* any pending interrupts immediately.
*/
gen_goto_tb(s, 0, s->pc & ~1);
gen_goto_tb(s, 0, s->pc);
return;
case 7: /* sb */
if ((insn & 0xf) || !dc_isar_feature(aa32_sb, s)) {
@ -7999,7 +7999,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn)
* for TCG; MB and end the TB instead.
*/
tcg_gen_mb(tcg_ctx, TCG_MO_ALL | TCG_BAR_SC);
gen_goto_tb(s, 0, s->pc & ~1);
gen_goto_tb(s, 0, s->pc);
return;
default:
goto illegal_op;
@ -10629,7 +10629,7 @@ static void disas_thumb2_insn(DisasContext *s, uint32_t insn)
* and also to take any pending interrupts
* immediately.
*/
gen_goto_tb(s, 0, s->pc & ~1);
gen_goto_tb(s, 0, s->pc);
break;
case 7: /* sb */
if ((insn & 0xf) || !dc_isar_feature(aa32_sb, s)) {
@ -10640,7 +10640,7 @@ static void disas_thumb2_insn(DisasContext *s, uint32_t insn)
* for TCG; MB and end the TB instead.
*/
tcg_gen_mb(tcg_ctx, TCG_MO_ALL | TCG_BAR_SC);
gen_goto_tb(s, 0, s->pc & ~1);
gen_goto_tb(s, 0, s->pc);
break;
default:
goto illegal_op;