From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7oal-0003QM-VN for qemu-devel@nongnu.org; Tue, 31 May 2016 14:40:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7oaj-0001ap-Se for qemu-devel@nongnu.org; Tue, 31 May 2016 14:40:38 -0400 Received: from mail-yw0-x242.google.com ([2607:f8b0:4002:c05::242]:36405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7oaj-0001ae-MI for qemu-devel@nongnu.org; Tue, 31 May 2016 14:40:37 -0400 Received: by mail-yw0-x242.google.com with SMTP id l126so20064060ywe.3 for ; Tue, 31 May 2016 11:40:37 -0700 (PDT) From: Pranith Kumar Date: Tue, 31 May 2016 14:39:24 -0400 Message-Id: <20160531183928.29406-10-bobby.prani@gmail.com> In-Reply-To: <20160531183928.29406-1-bobby.prani@gmail.com> References: <20160531183928.29406-1-bobby.prani@gmail.com> Subject: [Qemu-devel] [RFC v2 PATCH 09/13] tcg/sparc: Add support for fence List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl , Richard Henderson , "open list:All patches CC here" Cc: alex.bennee@linaro.org, serge.fdrv@linaro.org Cc: Blue Swirl Signed-off-by: Richard Henderson Signed-off-by: Pranith Kumar --- 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 a611885..81f263f 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_mb: + /* 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_mb, { "r" } }, { -1 }, }; -- 2.8.3