From patchwork Fri May 27 01:00:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9137545 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 85720602A7 for ; Fri, 27 May 2016 01:13:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C1CF28061 for ; Fri, 27 May 2016 01:13:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5D6E6282F7; Fri, 27 May 2016 01:13:26 +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_SIGNED, 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 CA36928061 for ; Fri, 27 May 2016 01:13:25 +0000 (UTC) Received: from localhost ([::1]:41210 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b66L6-0002Ln-PO for patchwork-qemu-devel@patchwork.kernel.org; Thu, 26 May 2016 21:13:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b669B-0000CI-KU for qemu-devel@nongnu.org; Thu, 26 May 2016 21:01:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b669A-0004DX-7w for qemu-devel@nongnu.org; Thu, 26 May 2016 21:01:05 -0400 Received: from mail-qk0-x243.google.com ([2607:f8b0:400d:c09::243]:32944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b669A-0004DM-3m for qemu-devel@nongnu.org; Thu, 26 May 2016 21:01:04 -0400 Received: by mail-qk0-x243.google.com with SMTP id q184so11240002qkf.0 for ; Thu, 26 May 2016 18:01:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=yKy6ML1MYa9YBDbbhvIRadOSf/MXdaxnfHNT7QfDc1U=; b=FTPRMdVYdHv/FxPy5y6Oby1oTP5ZjjZQi10Sc+6D7hEDbS1QuW/iksiBDC6x3Yw2LF ylOO+sftj0MF43HWfiC09NOdLXTXvfltthf3gGVyT7v/+4+b60ZiJ72bv5Y8kaOQUD9g HJEDfCB29nUCkahsBlDUUhDMHVMa6dz7XThuN2jRuyIBEjR5X0JZLV5Ig8bsbvlIIf+6 AAAxQ4Z4We3DbmsKqczy1c2k+y1npJ4YQ3IWnlzQYmJDeOAqkBunhARlMOeHlOT6UC6v Z48d92j0/ppgaiF3FWA5+s7mrc1+dCK21hNfZCGpy9kLh9cnfm5qrqsaNRO5F8XLfjDe /DpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=yKy6ML1MYa9YBDbbhvIRadOSf/MXdaxnfHNT7QfDc1U=; b=a7AtaR75EQPVVNXcf8OzqEkJQTXy926W65pcPqD4cH+HOqXpe5m29nKL6bAHl+TcrD 5kSLStcLLmDNoQ+5HDtZiZx/4saMnn6lhq3jRW2otHIsAnYuqI3HIHW2ehCkau1PdT1t kxvge6l+wvpMIegn2DPbEUSWM368cupMtypPLgcmd0Dd7hpz6sinpvp92LVtAiu39Tvd mZs9D0dsH45Mi4IztjeshtPnWaxfGfy9D3qYGG8boUP48BtZ+Wyi8go9enuzFMcmNNBy G0cuJ0blQ6yxSBLJgY8xZ14VYMS2Q4CIG39VgqWodRCpN7A4s13zVpnA9j/4UZAWgh1Z RbFw== X-Gm-Message-State: ALyK8tIvSqB4LiBNjtAYjG3LoitAuQlG4FL6apvGXR1MQtZ6q1N991LvfI4+ZOwBy5I/kw== X-Received: by 10.200.45.205 with SMTP id q13mr11978972qta.2.1464310863696; Thu, 26 May 2016 18:01:03 -0700 (PDT) Received: from bigtime.com ([172.56.17.0]) by smtp.gmail.com with ESMTPSA id 77sm1872030qgn.29.2016.05.26.18.01.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 May 2016 18:01:03 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 26 May 2016 18:00:12 -0700 Message-Id: <1464310815-13554-10-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464310815-13554-1-git-send-email-rth@twiddle.net> References: <1464310815-13554-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c09::243 Subject: [Qemu-devel] [PATCH v2 09/12] tcg/sparc: Add support for fence 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: Blue Swirl , bobby.prani@gmail.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Cc: Blue Swirl Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.inc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tcg/sparc/tcg-target.inc.c b/tcg/sparc/tcg-target.inc.c index 9938a50..16d8d8f 100644 --- a/tcg/sparc/tcg-target.inc.c +++ b/tcg/sparc/tcg-target.inc.c @@ -249,6 +249,8 @@ static const int tcg_target_call_oarg_regs[] = { #define STWA (INSN_OP(3) | INSN_OP3(0x14)) #define STXA (INSN_OP(3) | INSN_OP3(0x1e)) +#define MEMBAR (INSN_OP(2) | INSN_OP3(0x28) | INSN_RS1(15) | (1 << 13)) + #ifndef ASI_PRIMARY_LITTLE #define ASI_PRIMARY_LITTLE 0x88 #endif @@ -1450,6 +1452,11 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, tcg_out_arithc(s, a0, TCG_REG_G0, a1, const_args[1], c); break; + case INDEX_op_fence: + /* membar #LoadLoad|#LoadStore|#StoreStore|#StoreLoad */ + tcg_out32(s, MEMBAR | 15); + break; + case INDEX_op_mov_i32: /* Always emitted via tcg_out_mov. */ case INDEX_op_mov_i64: case INDEX_op_movi_i32: /* Always emitted via tcg_out_movi. */ @@ -1551,6 +1558,7 @@ static const TCGTargetOpDef sparc_op_defs[] = { { INDEX_op_qemu_st_i32, { "sZ", "A" } }, { INDEX_op_qemu_st_i64, { "SZ", "A" } }, + { INDEX_op_fence, { } }, { -1 }, };