mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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>
This commit is contained in:
1 parent
b02a2c6266
commit
e8688e2ff2
1 file changed
+1
-1
@@ -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])
|
||||
|
||||