From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b8YQv-0004Vc-TG for qemu-devel@nongnu.org; Thu, 02 Jun 2016 15:37:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b8YQp-0004Ze-Uf for qemu-devel@nongnu.org; Thu, 02 Jun 2016 15:37:32 -0400 References: <20160531183928.29406-1-bobby.prani@gmail.com> <20160531183928.29406-12-bobby.prani@gmail.com> From: Sergey Fedorov Message-ID: <57508AEE.70706@gmail.com> Date: Thu, 2 Jun 2016 22:37:18 +0300 MIME-Version: 1.0 In-Reply-To: <20160531183928.29406-12-bobby.prani@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v2 PATCH 11/13] target-arm: Generate fences in ARMv7 frontend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pranith Kumar , Peter Maydell , "open list:ARM" , "open list:All patches CC here" Cc: alex.bennee@linaro.org, rth@twiddle.net On 31/05/16 21:39, Pranith Kumar wrote: > Signed-off-by: Pranith Kumar > Signed-off-by: Richard Henderson > --- > target-arm/translate.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/target-arm/translate.c b/target-arm/translate.c > index c946c0e..e1b16c0 100644 > --- a/target-arm/translate.c > +++ b/target-arm/translate.c > @@ -7980,9 +7980,11 @@ static void disas_arm_insn(DisasContext *s, unsigned int insn) > gen_clrex(s); > return; > case 4: /* dsb */ > + ARCH(7); ARMv7 ARM says: "A DSB behaves as a DMB with the same arguments, and also has the additional properties...". Kind regards, Sergey > + return; > case 5: /* dmb */ > ARCH(7); > - /* We don't emulate caches so these are a no-op. */ > + tcg_gen_mb(TCG_MB_FULL); > return; > case 6: /* isb */ > /* We need to break the TB after this insn to execute > @@ -10330,8 +10332,9 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw > gen_clrex(s); > break; > case 4: /* dsb */ > + break; > case 5: /* dmb */ > - /* These execute as NOPs. */ > + tcg_gen_mb(TCG_MB_FULL); > break; > case 6: /* isb */ > /* We need to break the TB after this insn