Negative four byte displacements need to be sign-extended after c086b783eb7a578993d6d2ab62c4c2666800b63d. Do so.
Signed-off-by: Paolo Bonzini <pbonz...@redhat.com> --- There are quite a few other ldl's to audit after the patch (about 70 in target-*). Any volunteers? :-) target-i386/translate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 38c6016..708b0a1 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -2016,7 +2016,7 @@ static void gen_lea_modrm(DisasContext *s, int modrm, int *reg_ptr, int *offset_ break; default: case 2: - disp = ldl_code(s->pc); + disp = (int32_t)ldl_code(s->pc); s->pc += 4; break; } -- 1.7.0.1