]> xenbits.xensource.com Git - xen.git/commitdiff
x86_emulate: set the operand size for SMSW/reg writeback.
authorKeir Fraser <keir@xen.org>
Fri, 21 Jan 2011 16:03:04 +0000 (16:03 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 21 Jan 2011 16:03:04 +0000 (16:03 +0000)
Otherwise it defaults to 0 bytes.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Signed-off-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   22782:fe8a177ae9cb
xen-unstable date:        Wed Jan 19 15:29:04 2011 +0000

xen/arch/x86/x86_emulate/x86_emulate.c

index d6586d6944ae94daa2a1661d044a0dac870ca2d3..186cef2b9be8bb2d4139afa593997856e9cbfb62 100644 (file)
@@ -3555,8 +3555,7 @@ x86_emulate(
                 goto done;
             break;
         case 4: /* smsw */
-            if ( ea.type == OP_MEM )
-                ea.bytes = 2;
+            ea.bytes = (ea.type == OP_MEM) ? 2 : op_bytes;
             dst = ea;
             fail_if(ops->read_cr == NULL);
             if ( (rc = ops->read_cr(0, &dst.val, ctxt)) )