From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44665) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7oaq-0003VK-NO 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 1b7oal-0001bM-0z for qemu-devel@nongnu.org; Tue, 31 May 2016 14:40:44 -0400 Received: from mail-yw0-x243.google.com ([2607:f8b0:4002:c05::243]:36408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7oak-0001bC-St for qemu-devel@nongnu.org; Tue, 31 May 2016 14:40:38 -0400 Received: by mail-yw0-x243.google.com with SMTP id l126so20064130ywe.3 for ; Tue, 31 May 2016 11:40:38 -0700 (PDT) From: Pranith Kumar Date: Tue, 31 May 2016 14:39:25 -0400 Message-Id: <20160531183928.29406-11-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 10/13] tcg/tci: Add support for fence List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil , Richard Henderson , "open list:All patches CC here" Cc: alex.bennee@linaro.org, serge.fdrv@linaro.org Cc: Stefan Weil Signed-off-by: Richard Henderson Signed-off-by: Pranith Kumar --- tcg/tci/tcg-target.inc.c | 3 +++ tci.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/tcg/tci/tcg-target.inc.c b/tcg/tci/tcg-target.inc.c index 4e91687..a507ceb 100644 --- a/tcg/tci/tcg-target.inc.c +++ b/tcg/tci/tcg-target.inc.c @@ -255,6 +255,7 @@ static const TCGTargetOpDef tcg_target_op_defs[] = { { INDEX_op_bswap32_i32, { R, R } }, #endif + { INDEX_op_mb, { "r" } }, { -1 }, }; @@ -798,6 +799,8 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, const TCGArg *args, } tcg_out_i(s, *args++); break; + case INDEX_op_mb: + 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. */ diff --git a/tci.c b/tci.c index 7cbb39e..d35b24f 100644 --- a/tci.c +++ b/tci.c @@ -1230,6 +1230,9 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr) tcg_abort(); } break; + case INDEX_op_mb: + smp_mb(); + break; default: TODO(); break; -- 2.8.3