[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.1-testing] x86: Fix emulation of DIV instruction. Never actually used currently,



# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1192126692 -3600
# Node ID 97c651bac87fffb6b099c53baef79567ea487b8f
# Parent  3674da19741ac406ebc9ee497a92ec852bad70ee
x86: Fix emulation of DIV instruction. Never actually used currently,
but this will avoid a #DE in Xen.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
xen-unstable changeset:   16097:d5531095d06b5e4513e891b89fd3085311490304
xen-unstable date:        Thu Oct 11 19:18:12 2007 +0100
---
 xen/arch/x86/x86_emulate.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 3674da19741a -r 97c651bac87f xen/arch/x86/x86_emulate.c
--- a/xen/arch/x86/x86_emulate.c        Thu Oct 11 10:21:08 2007 +0100
+++ b/xen/arch/x86/x86_emulate.c        Thu Oct 11 19:18:12 2007 +0100
@@ -586,7 +586,7 @@ static int imul_dbl(unsigned long m[2])
  */
 static int div_dbl(unsigned long u[2], unsigned long v)
 {
-    if ( (v == 0) || (u[1] > v) || ((u[1] == v) && (u[0] != 0)) )
+    if ( (v == 0) || (u[1] >= v) )
         return 1;
     asm ( "div %4"
           : "=a" (u[0]), "=d" (u[1])

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.