qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 08/10] target-i386: exception handling for se


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v6 08/10] target-i386: exception handling for seg_helper functions
Date: Tue, 7 Jul 2015 15:44:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1

On 07/07/2015 02:31 PM, Pavel Dovgalyuk wrote:
@@ -2301,9 +2294,6 @@ static inline void gen_op_movl_seg_T0_vm(int seg_reg)
  static void gen_movl_seg_T0(DisasContext *s, int seg_reg, target_ulong 
cur_eip)
  {
      if (s->pe && !s->vm86) {
-        /* XXX: optimize by finding processor state dynamically */
-        gen_update_cc_op(s);
-        gen_jmp_im(cur_eip);
          tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]);
          gen_helper_load_seg(cpu_env, tcg_const_i32(seg_reg), cpu_tmp2_i32);
          /* abort translation because the addseg value may change or

The cur_eip parameter is now unused.

         do_lcall:
             if (s->pe && !s->vm86) {
-                gen_update_cc_op(s);
                 gen_jmp_im(pc_start - s->cs_base);
                 tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]);
                 gen_helper_lcall_protected(cpu_env, cpu_tmp2_i32, cpu_T[1],
@@ -4971,7 +4960,6 @@ static target_ulong disas_insn(CPUX86State *env, 
DisasContext *s,
             gen_op_ld_v(s, MO_16, cpu_T[0], cpu_A0);
         do_ljmp:
             if (s->pe && !s->vm86) {
-                gen_update_cc_op(s);
                 gen_jmp_im(pc_start - s->cs_base);
                 tcg_gen_trunc_tl_i32(cpu_tmp2_i32, cpu_T[0]);
                 gen_helper_ljmp_protected(cpu_env, cpu_tmp2_i32, cpu_T[1],

You should be able to change the "int next_eip_addend" parameter so that it's just "target_ulong next_eip", and then you don't ahve to do the gen_jmp_im to save the current eip.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]