diff options
author | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-06-13 13:26:14 +0000 |
---|---|---|
committer | bellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162> | 2004-06-13 13:26:14 +0000 |
commit | dc196a57e3e2e00e0c5f887390b1191787990193 (patch) | |
tree | a721fcdec69a9753afdde348e253d635d6ae01db /target-i386/translate.c | |
parent | 2a2820560ddca9da787e6baccd169ad47c617d7c (diff) |
fixed 16 bit segment optimisations
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@922 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'target-i386/translate.c')
-rw-r--r-- | target-i386/translate.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/target-i386/translate.c b/target-i386/translate.c index 811356bafc..13840bbf92 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -1538,15 +1538,17 @@ static void gen_movl_seg_T0(DisasContext *s, int seg_reg, unsigned int cur_eip) gen_op_set_cc_op(s->cc_op); gen_op_jmp_im(cur_eip); gen_op_movl_seg_T0(seg_reg); + /* abort translation because the addseg value may change or + because ss32 may change. For R_SS, translation must always + stop as a special handling must be done to disable hardware + interrupts for the next instruction */ + if (seg_reg == R_SS || (s->code32 && seg_reg < R_FS)) + s->is_jmp = 3; } else { gen_op_movl_seg_T0_vm(offsetof(CPUX86State,segs[seg_reg])); + if (seg_reg == R_SS) + s->is_jmp = 3; } - /* abort translation because the register may have a non zero base - or because ss32 may change. For R_SS, translation must always - stop as a special handling must be done to disable hardware - interrupts for the next instruction */ - if (seg_reg == R_SS || (!s->addseg && seg_reg < R_FS)) - s->is_jmp = 3; } static inline void gen_stack_update(DisasContext *s, int addend) @@ -4572,7 +4574,7 @@ static inline int gen_intermediate_code_internal(CPUState *env, ); #if 0 /* check addseg logic */ - if (!dc->addseg && (dc->vm86 || !dc->pe)) + if (!dc->addseg && (dc->vm86 || !dc->pe || !dc->code32)) printf("ERROR addseg\n"); #endif |