target-i386: fix decoding of negative 4-byte displacements

Negative four byte displacements need to be sign-extended after
c086b783eb.  Do so.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Richard Henderson  <rth@twiddle.net>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Paolo Bonzini 2010-06-04 16:27:33 +02:00 committed by Blue Swirl
parent 358c360feb
commit 8c0e6340fb
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}