projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b02a2c6
)
x86: Fix emulation of DIV instruction. Never actually used currently,
author
Keir Fraser
<keir@xensource.com>
Thu, 11 Oct 2007 18:18:12 +0000
(19:18 +0100)
committer
Keir Fraser
<keir@xensource.com>
Thu, 11 Oct 2007 18:18:12 +0000
(19:18 +0100)
but this will avoid a #DE in Xen.
Signed-off-by: Keir Fraser <keir@xensource.com>
xen/arch/x86/x86_emulate.c
patch
|
blob
|
history
diff --git
a/xen/arch/x86/x86_emulate.c
b/xen/arch/x86/x86_emulate.c
index 321187acf21de4fae2298b81045621267e58e5dc..3a319ce1dd87e362dd817ccc0f97b021aadd2df7 100644
(file)
--- a/
xen/arch/x86/x86_emulate.c
+++ b/
xen/arch/x86/x86_emulate.c
@@
-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])