/[qemu]/qemu/target-arm/translate.c
ViewVC logotype

Diff of /qemu/target-arm/translate.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.29 by bellard, Sun Nov 6 19:36:29 2005 UTC revision 1.30 by bellard, Sun Nov 20 10:30:32 2005 UTC
# Line 903  static int disas_vfp_insn(CPUState * env Line 903  static int disas_vfp_insn(CPUState * env
903      return 0;      return 0;
904  }  }
905    
906  static inline void gen_jmp_tb(long tb, int n, uint32_t dest)  static inline void gen_goto_tb(DisasContext *s, int n, uint32_t dest)
907  {  {
908      if (n == 0)      TranslationBlock *tb;
909          gen_op_goto_tb0(TBPARAM(tb));  
910      else      tb = s->tb;
911          gen_op_goto_tb1(TBPARAM(tb));      if ((tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK)) {
912      gen_op_movl_T0_im(dest);          if (n == 0)
913      gen_op_movl_r15_T0();              gen_op_goto_tb0(TBPARAM(tb));
914      gen_op_movl_T0_im(tb + n);          else
915      gen_op_exit_tb();              gen_op_goto_tb1(TBPARAM(tb));
916            gen_op_movl_T0_im(dest);
917            gen_op_movl_r15_T0();
918            gen_op_movl_T0_im((long)tb + n);
919            gen_op_exit_tb();
920        } else {
921            gen_op_movl_T0_im(dest);
922            gen_op_movl_r15_T0();
923            gen_op_movl_T0_0();
924            gen_op_exit_tb();
925        }
926  }  }
927    
928  static inline void gen_jmp (DisasContext *s, uint32_t dest)  static inline void gen_jmp (DisasContext *s, uint32_t dest)
# Line 924  static inline void gen_jmp (DisasContext Line 934  static inline void gen_jmp (DisasContext
934          gen_op_movl_T0_im(dest);          gen_op_movl_T0_im(dest);
935          gen_bx(s);          gen_bx(s);
936      } else {      } else {
937          long tb = (long)s->tb;          gen_goto_tb(s, 0, dest);
         gen_jmp_tb(tb, 0, dest);  
938          s->is_jmp = DISAS_TB_JUMP;          s->is_jmp = DISAS_TB_JUMP;
939      }      }
940  }  }
# Line 2137  static inline int gen_intermediate_code_ Line 2146  static inline int gen_intermediate_code_
2146      } else {      } else {
2147          switch(dc->is_jmp) {          switch(dc->is_jmp) {
2148          case DISAS_NEXT:          case DISAS_NEXT:
2149              gen_jmp_tb((long)dc->tb, 1, dc->pc);              gen_goto_tb(dc, 1, dc->pc);
2150              break;              break;
2151          default:          default:
2152          case DISAS_JUMP:          case DISAS_JUMP:
# Line 2152  static inline int gen_intermediate_code_ Line 2161  static inline int gen_intermediate_code_
2161          }          }
2162          if (dc->condjmp) {          if (dc->condjmp) {
2163              gen_set_label(dc->condlabel);              gen_set_label(dc->condlabel);
2164              gen_jmp_tb((long)dc->tb, 1, dc->pc);              gen_goto_tb(dc, 1, dc->pc);
2165              dc->condjmp = 0;              dc->condjmp = 0;
2166          }          }
2167      }      }

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26