target/microblaze: mbar: Add support for data-access barriers

Add support for data-access barriers.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
This commit is contained in:
Edgar E. Iglesias 2020-08-13 17:41:33 +02:00
parent 6f3c458baf
commit 3f17274491

View File

@ -1233,6 +1233,11 @@ static void dec_br(DisasContext *dc)
LOG_DIS("mbar %d\n", mbar_imm);
/* Data access memory barrier. */
if ((mbar_imm & 2) == 0) {
tcg_gen_mb(TCG_BAR_SC | TCG_MO_ALL);
}
/* mbar IMM & 16 decodes to sleep. */
if (mbar_imm & 16) {
TCGv_i32 tmp_hlt = tcg_const_i32(EXCP_HLT);