]> git.proxmox.com Git - mirror_qemu.git/commitdiff
tcg/tci: Add support for fence
authorPranith Kumar <bobby.prani@gmail.com>
Thu, 14 Jul 2016 20:20:22 +0000 (16:20 -0400)
committerRichard Henderson <rth@twiddle.net>
Fri, 16 Sep 2016 15:12:12 +0000 (08:12 -0700)
Cc: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
Message-Id: <20160714202026.9727-11-bobby.prani@gmail.com>
Signed-off-by: Richard Henderson <rth@twiddle.net>
tcg/tci/tcg-target.inc.c
tci.c

index 3c47ea7a9e1c2e6067ccb43888c68529f4d91b10..9dbf4d5512577ab8f1f13c3dfeb9c950776eaf60 100644 (file)
@@ -255,6 +255,7 @@ static const TCGTargetOpDef tcg_target_op_defs[] = {
     { INDEX_op_bswap32_i32, { R, R } },
 #endif
 
+    { INDEX_op_mb, { } },
     { -1 },
 };
 
@@ -800,6 +801,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 b488c0d8e412f8cc1d70208a55fb14795d91d11c..4bdc645f2a55ef8a15950772f70ce17f393593c9 100644 (file)
--- a/tci.c
+++ b/tci.c
@@ -1236,6 +1236,10 @@ uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr)
                 tcg_abort();
             }
             break;
+        case INDEX_op_mb:
+            /* Ensure ordering for all kinds */
+            smp_mb();
+            break;
         default:
             TODO();
             break;