Skip to content

Commit

Permalink
tcg/tci: Add support for fence
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
pranith authored and rth7680 committed Sep 16, 2016
1 parent f8f03b3 commit a1e69e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tcg/tci/tcg-target.inc.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ static const TCGTargetOpDef tcg_target_op_defs[] = {
{ INDEX_op_bswap32_i32, { R, R } },
#endif

{ INDEX_op_mb, { } },
{ -1 },
};

Expand Down Expand Up @@ -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. */
Expand Down
4 changes: 4 additions & 0 deletions tci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a1e69e2

Please sign in to comment.