target-arm: Generate fences in ARMv7 frontend

Backports commit 61e4c432ab26526bab0f3ef746c1861415b6da29 from qemu
This commit is contained in:
Pranith Kumar 2018-02-26 03:21:35 -05:00 committed by Lioncash
parent 65a73763e3
commit 7849f8d72a
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7

View File

@ -8239,7 +8239,7 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn) // qq
case 4: /* dsb */ case 4: /* dsb */
case 5: /* dmb */ case 5: /* dmb */
ARCH(7); ARCH(7);
/* We don't emulate caches so these are a no-op. */ tcg_gen_mb(tcg_ctx, TCG_MO_ALL | TCG_BAR_SC);
return; return;
case 6: /* isb */ case 6: /* isb */
/* We need to break the TB after this insn to execute /* We need to break the TB after this insn to execute
@ -10584,7 +10584,7 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw
break; break;
case 4: /* dsb */ case 4: /* dsb */
case 5: /* dmb */ case 5: /* dmb */
/* These execute as NOPs. */ tcg_gen_mb(tcg_ctx, TCG_MO_ALL | TCG_BAR_SC);
break; break;
case 6: /* isb */ case 6: /* isb */
/* We need to break the TB after this insn /* We need to break the TB after this insn