aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/x86_emulate
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2010-10-29 18:05:50 +0100
committerKeir Fraser <keir@xen.org>2010-10-29 18:05:50 +0100
commit5100a5ede1a200a2831f0b357fb474b853f8c83f (patch)
tree179b84e20f46a09cf19007e46e9cd850e5720618 /xen/arch/x86/x86_emulate
parent9bbfbb147798c91c4f4c6f0b947ca62a7ae8b89a (diff)
downloadxen-5100a5ede1a200a2831f0b357fb474b853f8c83f.tar.gz
xen-5100a5ede1a200a2831f0b357fb474b853f8c83f.tar.bz2
xen-5100a5ede1a200a2831f0b357fb474b853f8c83f.zip
Xen: fix various checks of unsigned integers < 0
Some of these could be benignly discarded by the compiler but some are actual bugs. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'xen/arch/x86/x86_emulate')
-rw-r--r--xen/arch/x86/x86_emulate/x86_emulate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 51e199adbc..7ad0dd5d2f 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -2102,7 +2102,7 @@ x86_emulate(
_regs.edx = (uint32_t)(((int32_t)_regs.eax < 0) ? -1 : 0);
break;
case 8:
- _regs.edx = (_regs.eax < 0) ? -1 : 0;
+ _regs.edx = ((int64_t)_regs.eax < 0) ? -1 : 0;
break;
}
break;