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:
Keir Fraser committed 2007-10-11 19:18:12 +01:00
1 parent b02a2c6266
commit e8688e2ff2
1 file changed
+1 -1
+1 -1
View File
@@ -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])
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.