/[gxemul]/trunk/src/cpus/generate_head.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/generate_head.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 20 by dpavlin, Mon Oct 8 16:19:23 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: generate_head.c,v 1.5 2005/09/18 19:54:14 debug Exp $   *  $Id: generate_head.c,v 1.8 2005/11/06 22:41:12 debug Exp $
29   */   */
30    
31  #include <stdio.h>  #include <stdio.h>
# Line 103  int main(int argc, char *argv[]) Line 103  int main(int argc, char *argv[])
103              "extern int old_show_trace_tree;\n"              "extern int old_show_trace_tree;\n"
104              "extern int old_instruction_trace;\n"              "extern int old_instruction_trace;\n"
105              "extern int old_quiet_mode;\n"              "extern int old_quiet_mode;\n"
106                "extern int show_opcode_statistics;\n"
107              "extern int quiet_mode;\n");              "extern int quiet_mode;\n");
108    
109          printf("\n/* instr uses the same names as in "          printf("\n/* instr uses the same names as in "
# Line 112  int main(int argc, char *argv[]) Line 113  int main(int argc, char *argv[])
113              "#define instr32(n) %s32_instr_ ## n\n\n", a);              "#define instr32(n) %s32_instr_ ## n\n\n", a);
114          printf("#endif\n\n");          printf("#endif\n\n");
115    
116          printf("/*  This is for marking a physical page as containing "          printf("/*  This is for marking a physical page as containing"
117              "translated or\n    combined instructions, respectively:  */\n");              "\n    combined instructions:  */\n");
         printf("#define translated (cpu->cd.%s.cur_physpage->flags "  
             "|= TRANSLATIONS)\n", a);  
118          printf("#define combined (cpu->cd.%s.cur_physpage->flags "          printf("#define combined (cpu->cd.%s.cur_physpage->flags "
119              "|= COMBINATIONS)\n", a);              "|= COMBINATIONS)\n", a);
120    
# Line 139  int main(int argc, char *argv[]) Line 138  int main(int argc, char *argv[])
138          /*  TODO: solve this in a nicer way!  */          /*  TODO: solve this in a nicer way!  */
139          if (strcmp(a, "avr") == 0)          if (strcmp(a, "avr") == 0)
140                  printf("static struct %s_instr_call nothing_call = { "                  printf("static struct %s_instr_call nothing_call = { "
141                      "instr(nothing), {0,0} };\n", a);                      "instr(nothing), 0, {0,0} };\n", a);
142          else          else {
143                    printf("#ifdef DYNTRANS_VARIABLE_INSTRUCTION_LENGTH\n");
144                    printf("static struct %s_instr_call nothing_call = { "
145                        "instr(nothing), 0, {0,0,0} };\n", a);
146                    printf("#else\n");
147                  printf("static struct %s_instr_call nothing_call = { "                  printf("static struct %s_instr_call nothing_call = { "
148                      "instr(nothing), {0,0,0} };\n", a);                      "instr(nothing), {0,0,0} };\n", a);
149                    printf("#endif\n");
150            }
151    
152          printf("\n");          printf("\n");
153    

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

  ViewVC Help
Powered by ViewVC 1.1.26