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-3.1-testing] x86_emulate: Allow to build outside Xe

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] x86_emulate: Allow to build outside Xen tree (in tools/test).
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 Mar 2008 12:10:17 -0700
Delivery-date: Mon, 24 Mar 2008 12:10:17 -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.fraser@xxxxxxxxxx>
# Date 1206385240 0
# Node ID 4026a49fb0a0853d220b68a051c0a8164715cdbb
# Parent  a792a0ca66e7b1b1d5e05a558491c23aa7390050
x86_emulate: Allow to build outside Xen tree (in tools/test).
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
xen-unstable changeset:   16309:3e397fa3a6adbe595b038c90179a390ede9ddede
xen-unstable date:        Fri Nov 02 10:22:22 2007 +0000
---
 xen/arch/x86/x86_emulate.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff -r a792a0ca66e7 -r 4026a49fb0a0 xen/arch/x86/x86_emulate.c
--- a/xen/arch/x86/x86_emulate.c        Mon Mar 24 15:38:14 2008 +0000
+++ b/xen/arch/x86/x86_emulate.c        Mon Mar 24 19:00:40 2008 +0000
@@ -24,6 +24,7 @@
 #ifndef __XEN__
 #include <stddef.h>
 #include <stdint.h>
+#include <string.h>
 #include <public/xen.h>
 #else
 #include <xen/config.h>
@@ -262,6 +263,7 @@ struct operand {
 };
 
 /* EFLAGS bit definitions. */
+#define EFLG_RF (1<<16)
 #define EFLG_OF (1<<11)
 #define EFLG_DF (1<<10)
 #define EFLG_IF (1<<9)
@@ -287,9 +289,11 @@ struct operand {
 #if defined(__x86_64__)
 #define _LO32 "k"          /* force 32-bit operand */
 #define _STK  "%%rsp"      /* stack pointer */
+#define _BYTES_PER_LONG "8"
 #elif defined(__i386__)
 #define _LO32 ""           /* force 32-bit operand */
 #define _STK  "%%esp"      /* stack pointer */
+#define _BYTES_PER_LONG "4"
 #endif
 
 /*
@@ -309,7 +313,7 @@ struct operand {
 "pushf; "                                                       \
 "notl %"_LO32 _tmp"; "                                          \
 "andl %"_LO32 _tmp",("_STK"); "                                 \
-"andl %"_LO32 _tmp","STR(BITS_PER_LONG/4)"("_STK"); "           \
+"andl %"_LO32 _tmp",2*"_BYTES_PER_LONG"("_STK"); "              \
 "pop  %"_tmp"; "                                                \
 "orl  %"_LO32 _tmp",("_STK"); "                                 \
 "popf; "                                                        \
@@ -1643,7 +1647,7 @@ x86_emulate(
     }
 
     /* Commit shadow register state. */
-    _regs.eflags &= ~EF_RF;
+    _regs.eflags &= ~EFLG_RF;
     *ctxt->regs = _regs;
 
  done:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] x86_emulate: Allow to build outside Xen tree (in tools/test)., Xen patchbot-3.1-testing <=