Signed-off-by: Richard Henderson <r...@twiddle.net> --- 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