/[gxemul]/trunk/src/cpus/cpu_sh_instr.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/cpus/cpu_sh_instr.c

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

revision 14 by dpavlin, Mon Oct 8 16:18:51 2007 UTC revision 22 by dpavlin, Mon Oct 8 16:19:37 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Copyright (C) 2005  Anders Gavare.  All rights reserved.   *  Copyright (C) 2005-2006  Anders Gavare.  All rights reserved.
3   *   *
4   *  Redistribution and use in source and binary forms, with or without   *  Redistribution and use in source and binary forms, with or without
5   *  modification, are permitted provided that the following conditions are met:   *  modification, are permitted provided that the following conditions are met:
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: cpu_sh_instr.c,v 1.2 2005/09/04 02:49:11 debug Exp $   *  $Id: cpu_sh_instr.c,v 1.5 2006/02/09 22:40:27 debug Exp $
29   *   *
30   *  SH instructions.   *  SH instructions.
31   *   *
# Line 67  X(end_of_page) Line 67  X(end_of_page)
67    
68    
69  /*  /*
  *  sh_combine_instructions():  
  *  
  *  Combine two or more instructions, if possible, into a single function call.  
  */  
 void COMBINE_INSTRUCTIONS(struct cpu *cpu, struct sh_instr_call *ic,  
         uint32_t addr)  
 {  
         int n_back;  
         n_back = (addr >> SH_INSTR_ALIGNMENT_SHIFT)  
             & (SH_IC_ENTRIES_PER_PAGE-1);  
   
         if (n_back >= 1) {  
                 /*  TODO  */  
         }  
   
         /*  TODO: Combine forward as well  */  
 }  
   
   
 /*****************************************************************************/  
   
   
 /*  
70   *  sh_instr_to_be_translated():   *  sh_instr_to_be_translated():
71   *   *
72   *  Translate an instruction word into an sh_instr_call. ic is filled in with   *  Translate an instruction word into an sh_instr_call. ic is filled in with
# Line 99  void COMBINE_INSTRUCTIONS(struct cpu *cp Line 76  void COMBINE_INSTRUCTIONS(struct cpu *cp
76   */   */
77  X(to_be_translated)  X(to_be_translated)
78  {  {
79          uint64_t addr, low_pc, tmp_addr;          uint64_t addr, low_pc;
80          uint32_t iword;          uint32_t iword;
81          unsigned char *page;          unsigned char *page;
82          unsigned char ib[4];          unsigned char ib[4];
83    #ifdef DYNTRANS_BACKEND
84            int simple = 0;
85    #endif
86          int main_opcode, instr_size = 4;          int main_opcode, instr_size = 4;
87          void (*samepage_function)(struct cpu *, struct sh_instr_call *);          /* void (*samepage_function)(struct cpu *, struct sh_instr_call *);*/
88    
89          /*  Figure out the (virtual) address of the instruction:  */          /*  Figure out the (virtual) address of the instruction:  */
90          if (cpu->cd.sh.compact) {          if (cpu->cd.sh.compact) {

Legend:
Removed from v.14  
changed lines
  Added in v.22

  ViewVC Help
Powered by ViewVC 1.1.26