qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 11/14] target-i386: Update BNDSTATUS for exceptions


From: Richard Henderson
Subject: [Qemu-devel] [PATCH 11/14] target-i386: Update BNDSTATUS for exceptions raised by BOUND
Date: Thu, 9 Jul 2015 09:17:26 +0100

Signed-off-by: Richard Henderson <address@hidden>
---
 target-i386/mem_helper.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/target-i386/mem_helper.c b/target-i386/mem_helper.c
index 1aec8a5..c8d5fac 100644
--- a/target-i386/mem_helper.c
+++ b/target-i386/mem_helper.c
@@ -91,6 +91,9 @@ void helper_boundw(CPUX86State *env, target_ulong a0, int v)
     high = cpu_ldsw_data(env, a0 + 2);
     v = (int16_t)v;
     if (v < low || v > high) {
+        if (env->hflags & HF_MPX_EN_MASK) {
+            env->bndcs_regs.sts = 0;
+        }
         raise_exception(env, EXCP05_BOUND);
     }
 }
@@ -102,6 +105,9 @@ void helper_boundl(CPUX86State *env, target_ulong a0, int v)
     low = cpu_ldl_data(env, a0);
     high = cpu_ldl_data(env, a0 + 4);
     if (v < low || v > high) {
+        if (env->hflags & HF_MPX_EN_MASK) {
+            env->bndcs_regs.sts = 0;
+        }
         raise_exception(env, EXCP05_BOUND);
     }
 }
-- 
2.4.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]