Skip to contentSkip to conversation

target-i386: avoid repeated calls to the bnd_jmp helper

PATCH In review Paolo Bonzini 2 participants 2 messages Mar 1, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 target-i386: avoid repeated calls to the bnd_jmp helper

One flag was tested the wrong way.

---
 target-i386/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-i386/translate.c +1 -1
index b345e2c..ebd8995 100644
@@ -2420,7 +2420,7 @@ static void gen_bnd_jmp(DisasContext *s)
        itself will check BNDPRESERVE at runtime.  */
     if ((s->prefix & PREFIX_REPNZ) == 0
         && (s->flags & HF_MPX_EN_MASK) == 0
-        && (s->flags & HF_MPX_IU_MASK) == 0) {
+        && (s->flags & HF_MPX_IU_MASK) != 0) {
         gen_helper_bnd_jmp(cpu_env);
     }
 }
Signature · 1 line
2.5.0
#1 lore raw
Quoted 13 lines · Paolo Bonzini

One flag was tested the wrong way.

---
 target-i386/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
target-i386/translate.c +0 -0
index b345e2c..ebd8995 100644

target-i386/translate.c static void gen_bnd_jmp(DisasContext *s) · line 2423

Quoted 5 lines
target-i386/translate.c +1 -1
@@ -2420,7 +2420,7 @@ static void gen_bnd_jmp(DisasContext *s)
        itself will check BNDPRESERVE at runtime.  */
     if ((s->prefix & PREFIX_REPNZ) == 0
         && (s->flags & HF_MPX_EN_MASK) == 0
-        && (s->flags & HF_MPX_IU_MASK) == 0) {
+        && (s->flags & HF_MPX_IU_MASK) != 0) {

Ho hum. Two flags tested the wrong way -- EN_MASK should be on as well.

r~