ia64/xen-unstable
changeset 16097:d5531095d06b
x86: Fix emulation of DIV instruction. Never actually used currently,
but this will avoid a #DE in Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
but this will avoid a #DE in Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
author | Keir Fraser <keir@xensource.com> |
---|---|
date | Thu Oct 11 19:18:12 2007 +0100 (2007-10-11) |
parents | 313ab23f05db |
children | f6a06b2eefc5 |
files | xen/arch/x86/x86_emulate.c |
line diff
1.1 --- a/xen/arch/x86/x86_emulate.c Thu Oct 11 13:53:50 2007 +0100 1.2 +++ b/xen/arch/x86/x86_emulate.c Thu Oct 11 19:18:12 2007 +0100 1.3 @@ -586,7 +586,7 @@ static int imul_dbl(unsigned long m[2]) 1.4 */ 1.5 static int div_dbl(unsigned long u[2], unsigned long v) 1.6 { 1.7 - if ( (v == 0) || (u[1] > v) || ((u[1] == v) && (u[0] != 0)) ) 1.8 + if ( (v == 0) || (u[1] >= v) ) 1.9 return 1; 1.10 asm ( "div %4" 1.11 : "=a" (u[0]), "=d" (u[1])