[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 17/18] target-i386: Generate fences for x86
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PULL v3 17/18] target-i386: Generate fences for x86 |
Date: |
Mon, 12 Sep 2016 16:39:51 -0700 |
From: Pranith Kumar <address@hidden>
Signed-off-by: Pranith Kumar <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
---
target-i386/translate.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/target-i386/translate.c b/target-i386/translate.c
index fa2ac48..9447557 100644
--- a/target-i386/translate.c
+++ b/target-i386/translate.c
@@ -8012,13 +8012,21 @@ static target_ulong disas_insn(CPUX86State *env,
DisasContext *s,
|| (prefixes & PREFIX_LOCK)) {
goto illegal_op;
}
+ tcg_gen_mb(TCG_MO_ST_ST | TCG_BAR_SC);
break;
case 0xe8 ... 0xef: /* lfence */
+ if (!(s->cpuid_features & CPUID_SSE)
+ || (prefixes & PREFIX_LOCK)) {
+ goto illegal_op;
+ }
+ tcg_gen_mb(TCG_MO_LD_LD | TCG_BAR_SC);
+ break;
case 0xf0 ... 0xf7: /* mfence */
if (!(s->cpuid_features & CPUID_SSE2)
|| (prefixes & PREFIX_LOCK)) {
goto illegal_op;
}
+ tcg_gen_mb(TCG_MO_ALL | TCG_BAR_SC);
break;
default:
--
2.7.4
- [Qemu-devel] [PULL v3 08/18] tcg/ia64: Add support for fence, (continued)
- [Qemu-devel] [PULL v3 08/18] tcg/ia64: Add support for fence, Richard Henderson, 2016/09/12
- [Qemu-devel] [PULL v3 11/18] tcg/s390: Add support for fence, Richard Henderson, 2016/09/12
- [Qemu-devel] [PULL v3 09/18] tcg/mips: Add support for fence, Richard Henderson, 2016/09/12
- [Qemu-devel] [PULL v3 10/18] tcg/ppc: Add support for fence, Richard Henderson, 2016/09/12
- [Qemu-devel] [PULL v3 12/18] tcg/sparc: Add support for fence, Richard Henderson, 2016/09/12
- [Qemu-devel] [PULL v3 13/18] tcg/tci: Add support for fence, Richard Henderson, 2016/09/12
- [Qemu-devel] [PULL v3 14/18] target-arm: Generate fences in ARMv7 frontend, Richard Henderson, 2016/09/12
- [Qemu-devel] [PULL v3 15/18] target-alpha: Generate fence op, Richard Henderson, 2016/09/12
- [Qemu-devel] [PULL v3 16/18] target-aarch64: Generate fences for aarch64, Richard Henderson, 2016/09/12
- [Qemu-devel] [PULL v3 18/18] tcg: Optimize fence instructions, Richard Henderson, 2016/09/12
- [Qemu-devel] [PULL v3 17/18] target-i386: Generate fences for x86,
Richard Henderson <=
- Re: [Qemu-devel] [PULL v3 00/18] tcg queued patches, Peter Maydell, 2016/09/13