diff options
author | Roman Bolshakov <r.bolshakov@yadro.com> | 2019-01-25 18:47:43 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2019-02-05 16:50:18 +0100 |
commit | 1edead0f72acc146298c3d4913a7705b2c4a1baa (patch) | |
tree | aac6e77c39f278f570a82568903ed0d938327277 /target/i386/hvf | |
parent | dce5874fc70fe8a50e4dab9f6b105e84768cae07 (diff) |
i386: hvf: Don't miss 16-bit displacement
In 16-bit addressing mode, when Mod = 0 and R/M = 6, decoded displacement
doesn't reach decode_linear_addr and gets lost. Instructions that
involve the combination of ModRM always get a pointer with zero offset
from the beginning of DS segment.
The change fixes drawing in F-BIRD from day 1 of '18 advent calendar.
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
Message-Id: <20190125154743.14498-1-r.bolshakov@yadro.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target/i386/hvf')
-rw-r--r-- | target/i386/hvf/x86_decode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/i386/hvf/x86_decode.c b/target/i386/hvf/x86_decode.c index 5f513c5563..9ef7d7513f 100644 --- a/target/i386/hvf/x86_decode.c +++ b/target/i386/hvf/x86_decode.c @@ -1642,7 +1642,7 @@ void calc_modrm_operand16(CPUX86State *env, struct x86_decode *decode, X86Seg seg = R_DS; if (!decode->modrm.mod && 6 == decode->modrm.rm) { - op->ptr = (uint16_t)decode->displacement; + ptr = decode->displacement; goto calc_addr; } |