From patchwork Tue May 31 18:39:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pranith Kumar X-Patchwork-Id: 9145499 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DF74160777 for ; Tue, 31 May 2016 18:45:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D49D020072 for ; Tue, 31 May 2016 18:45:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C98A320700; Tue, 31 May 2016 18:45:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5711020072 for ; Tue, 31 May 2016 18:45:25 +0000 (UTC) Received: from localhost ([::1]:37856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7ofM-0007rZ-HK for patchwork-qemu-devel@patchwork.kernel.org; Tue, 31 May 2016 14:45:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44706) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7oax-0003cE-Sk for qemu-devel@nongnu.org; Tue, 31 May 2016 14:40:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7oat-0001dK-Mw for qemu-devel@nongnu.org; Tue, 31 May 2016 14:40:50 -0400 Received: from mail-yw0-x243.google.com ([2607:f8b0:4002:c05::243]:33691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7oal-0001bd-RR; Tue, 31 May 2016 14:40:39 -0400 Received: by mail-yw0-x243.google.com with SMTP id y6so20074253ywe.0; Tue, 31 May 2016 11:40:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=h8VXdB3wdqJ7PGEFtlTztqnyc6qs2clD/TVF4jvmzxU=; b=ztzkocJdpqaRbmYENFTUm/HvG2zzF8ZbFnKbTXIIBqkFa9Q+do3Bx9Rn19YnNVgH9O IFtCHw1AY9OcfzIExfEDdROZZSULpX/QTKIYts+qaQLK2783wg5f3xwEIIpotZ6Qpv9n 9cqqyEywZ3q2FcC49KxM5H5uJdUs8HRGLPS4HHZhS9TnbLeKmIAvD6a2zVgilcVoxsyi zXTXWelVEDr9ICs0ErE4HlSvez9ICepr/E3Myn49V4Au63oG372LYzU7wSJNJUVeOssR CZ3QwarDxOFrN2/42jDLEGSJsuIHQav92R9jY06O/e5mwPviB5eFTL/eE9djN9+FOEWf rkew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=h8VXdB3wdqJ7PGEFtlTztqnyc6qs2clD/TVF4jvmzxU=; b=XtDDu9PxYphT/aRzBtUMY6w0dijXwrM91fBUc3/f7EGIHePz8anxGV8mY2Hn1dLu2c q3miboZ3yXS+4pjDaIv+YQH2zVzgQAMMd16LotRPDxzrLB5kBAY/YvJMgvYyk1zMY8BW WP86hTXam47ep6Gpgsj4i6ZG/mqocbvzJgji82+sqMvsPDLMGedzPZyKyqr6Btl1swJ0 tfINcKidgGiFC6AFcjBCIf6Z3vqNgZ3I+GiT/+GScS4mmIqjNxaB1aGxPz8xr3P5JKVa yg8DBRCWfqJjL+gz4RaqutxpC7zSoASzpd0MdFWJzLFUJABPpvnZQZ35CJhdpwj0wrs9 C9wA== X-Gm-Message-State: ALyK8tIsQFpqpSltpepcQ4NqgbEGNHsVXW1o2hQtcTml3WTocq3zM3C2aW0K+kN63WHJvA== X-Received: by 10.37.115.75 with SMTP id o72mr10790837ybc.132.1464720039424; Tue, 31 May 2016 11:40:39 -0700 (PDT) Received: from evgadesktop.attlocal.net (108-232-152-155.lightspeed.tukrga.sbcglobal.net. [108.232.152.155]) by smtp.gmail.com with ESMTPSA id c62sm17150085ywf.12.2016.05.31.11.40.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 May 2016 11:40:38 -0700 (PDT) From: Pranith Kumar To: Peter Maydell , qemu-arm@nongnu.org (open list:ARM), qemu-devel@nongnu.org (open list:All patches CC here) Date: Tue, 31 May 2016 14:39:26 -0400 Message-Id: <20160531183928.29406-12-bobby.prani@gmail.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160531183928.29406-1-bobby.prani@gmail.com> References: <20160531183928.29406-1-bobby.prani@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4002:c05::243 Subject: [Qemu-devel] [RFC v2 PATCH 11/13] target-arm: Generate fences in ARMv7 frontend X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: serge.fdrv@linaro.org, alex.bennee@linaro.org, qemu-devel@nongnu.org, rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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); + 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