Skip to contentSkip to conversation

x86emul: correct direction of FPU insn emulations

PATCH In review Jan Beulich 3 participants 3 messages Nov 9, 2016 – Nov 10, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86emul: correct direction of FPU insn emulations

There are two cases where this was wrong, albeit in a benign way (the compiler - according to my checking - didn't leverage the wrongness for any optimizations affecting overall outcome).

xen/arch/x86/x86_emulate/x86_emulate.c +2 -2
@@ -3683,7 +3683,7 @@ x86_emulate(
                 if ( (rc = ops->read(src.mem.seg, src.mem.off,
                                      &src.val, src.bytes, ctxt)) != 0 )
                     goto done;
-                emulate_fpu_insn_memdst("fldt", src.val);
+                emulate_fpu_insn_memsrc("fldt", src.val);
                 break;
             case 7: /* fstp m80fp */
                 ea.bytes = 10;
@@ -3780,7 +3780,7 @@ x86_emulate(
                 ea.bytes = 8;
                 dst = ea;
                 dst.type = OP_MEM;
-                emulate_fpu_insn_memsrc("fstl", dst.val);
+                emulate_fpu_insn_memdst("fstl", dst.val);
                 break;
             case 3: /* fstp m64fp */
                 ea.bytes = 8;

x86emul: correct direction of FPU insn emulations

There are two cases where this was wrong, albeit in a benign way (the compiler - according to my checking - didn't leverage the wrongness for any optimizations affecting overall outcome).

xen/arch/x86/x86_emulate/x86_emulate.c +2 -2
@@ -3683,7 +3683,7 @@ x86_emulate(
                 if ( (rc = ops->read(src.mem.seg, src.mem.off,
                                      &src.val, src.bytes, ctxt)) != 0 )
                     goto done;
-                emulate_fpu_insn_memdst("fldt", src.val);
+                emulate_fpu_insn_memsrc("fldt", src.val);
                 break;
             case 7: /* fstp m80fp */
                 ea.bytes = 10;
@@ -3780,7 +3780,7 @@ x86_emulate(
                 ea.bytes = 8;
                 dst = ea;
                 dst.type = OP_MEM;
-                emulate_fpu_insn_memsrc("fstl", dst.val);
+                emulate_fpu_insn_memdst("fstl", dst.val);
                 break;
             case 3: /* fstp m64fp */
                 ea.bytes = 8;

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel