WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86: Fix EFLAGS adjustment for emulated i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Fix EFLAGS adjustment for emulated instructions.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sat, 20 Oct 2007 05:50:23 -0700
Delivery-date: Sat, 20 Oct 2007 05:52:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1192812260 -3600
# Node ID 959b4b92b6bfc127eea48ad9b94564a522803fbe
# Parent  08295dc13166f238098ab2bcee45204bfc9ee66a
x86: Fix EFLAGS adjustment for emulated instructions.
Issue flagged by David Lively <dlively@xxxxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/x86_emulate.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff -r 08295dc13166 -r 959b4b92b6bf xen/arch/x86/x86_emulate.c
--- a/xen/arch/x86/x86_emulate.c        Fri Oct 19 14:49:08 2007 +0100
+++ b/xen/arch/x86/x86_emulate.c        Fri Oct 19 17:44:20 2007 +0100
@@ -299,21 +299,21 @@ struct operand {
 #define EFLAGS_MASK (EFLG_OF|EFLG_SF|EFLG_ZF|EFLG_AF|EFLG_PF|EFLG_CF)
 
 /* Before executing instruction: restore necessary bits in EFLAGS. */
-#define _PRE_EFLAGS(_sav, _msk, _tmp)           \
-/* EFLAGS = (_sav & _msk) | (EFLAGS & ~_msk); */\
-"push %"_sav"; "                                \
-"movl %"_msk",%"_LO32 _tmp"; "                  \
-"andl %"_LO32 _tmp",("_STK"); "                 \
-"pushf; "                                       \
-"notl %"_LO32 _tmp"; "                          \
-"andl %"_LO32 _tmp",("_STK"); "                 \
-"pop  %"_tmp"; "                                \
-"orl  %"_LO32 _tmp",("_STK"); "                 \
-"popf; "                                        \
-/* _sav &= ~msk; */                             \
-"movl %"_msk",%"_LO32 _tmp"; "                  \
-"notl %"_LO32 _tmp"; "                          \
-"andl %"_LO32 _tmp",%"_sav"; "
+#define _PRE_EFLAGS(_sav, _msk, _tmp)                           \
+/* EFLAGS = (_sav & _msk) | (EFLAGS & ~_msk); _sav &= ~_msk; */ \
+"movl %"_sav",%"_LO32 _tmp"; "                                  \
+"push %"_tmp"; "                                                \
+"push %"_tmp"; "                                                \
+"movl %"_msk",%"_LO32 _tmp"; "                                  \
+"andl %"_LO32 _tmp",("_STK"); "                                 \
+"pushf; "                                                       \
+"notl %"_LO32 _tmp"; "                                          \
+"andl %"_LO32 _tmp",("_STK"); "                                 \
+"andl %"_LO32 _tmp","STR(BITS_PER_LONG/4)"("_STK"); "           \
+"pop  %"_tmp"; "                                                \
+"orl  %"_LO32 _tmp",("_STK"); "                                 \
+"popf; "                                                        \
+"pop  %"_sav"; "
 
 /* After executing instruction: write-back necessary bits in EFLAGS. */
 #define _POST_EFLAGS(_sav, _msk, _tmp)          \

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Fix EFLAGS adjustment for emulated instructions., Xen patchbot-unstable <=