diff options
author | Izik Eidus <izike@qumranet.com> | 2007-11-11 07:40:48 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2007-11-27 08:08:22 -0500 |
commit | e826ec9ae2baf9980402e85f0bbe1dac53ceb110 (patch) | |
tree | d931387123cef2bec18115e1a710b60068c68efa /drivers | |
parent | 8c27eba54970c6ebbb408186e5baa2274435e869 (diff) |
KVM: x86 emulator: fix JMP_REL
Change JMP_REL to call to register_address_increment(): the operands size
should not effect the calculation of the eip, instead the ad_bytes should
affect it.
Signed-off-by: Izik Eidus <izike@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/kvm/x86_emulate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c index 33b181451557..a1a9c9be39b3 100644 --- a/drivers/kvm/x86_emulate.c +++ b/drivers/kvm/x86_emulate.c | |||
@@ -448,8 +448,7 @@ struct operand { | |||
448 | 448 | ||
449 | #define JMP_REL(rel) \ | 449 | #define JMP_REL(rel) \ |
450 | do { \ | 450 | do { \ |
451 | _eip += (int)(rel); \ | 451 | register_address_increment(_eip, rel); \ |
452 | _eip = ((op_bytes == 2) ? (uint16_t)_eip : (uint32_t)_eip); \ | ||
453 | } while (0) | 452 | } while (0) |
454 | 453 | ||
455 | /* | 454 | /* |