/[gxemul]/trunk/src/cpus/generate_arm_dpi.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_arm_dpi.c

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

revision 21 by dpavlin, Mon Oct 8 16:19:23 2007 UTC revision 22 by dpavlin, Mon Oct 8 16:19:37 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: generate_arm_dpi.c,v 1.3 2005/11/11 07:31:31 debug Exp $   *  $Id: generate_arm_dpi.c,v 1.5 2005/12/26 12:32:10 debug Exp $
29   */   */
30    
31  #include <stdio.h>  #include <stdio.h>
# Line 39  char *op[16] = { Line 39  char *op[16] = {
39          "tst", "teq", "cmp", "cmn", "orr", "mov", "bic", "mvn" };          "tst", "teq", "cmp", "cmn", "orr", "mov", "bic", "mvn" };
40    
41    
42  char *uppercase(char *l)  static char *uppercase(char *l)
43  {  {
44          static char staticbuf[1000];          static char staticbuf[1000];
45          int i = 0;          size_t i = 0;
46    
47          while (*l && i < sizeof(staticbuf)) {          while (*l && i < sizeof(staticbuf)) {
48                  char u = *l++;                  char u = *l++;
# Line 65  int main(int argc, char *argv[]) Line 65  int main(int argc, char *argv[])
65          printf("#include <stdio.h>\n#include <stdlib.h>\n"          printf("#include <stdio.h>\n#include <stdlib.h>\n"
66              "#include \"cpu.h\"\n"              "#include \"cpu.h\"\n"
67              "#include \"misc.h\"\n"              "#include \"misc.h\"\n"
68              "#include \"arm_quick_pc_to_pointers.h\"\n"              "#define DYNTRANS_PC_TO_POINTERS arm_pc_to_pointers\n"
69                "#include \"quick_pc_to_pointers.h\"\n"
70              "#define reg(x) (*((uint32_t *)(x)))\n");              "#define reg(x) (*((uint32_t *)(x)))\n");
71          printf("extern void arm_instr_nop(struct cpu *, "          printf("extern void arm_instr_nop(struct cpu *, "
72              "struct arm_instr_call *);\n");              "struct arm_instr_call *);\n");
73          printf("extern void arm_instr_invalid(struct cpu *, "          printf("extern void arm_instr_invalid(struct cpu *, "
74              "struct arm_instr_call *);\n");              "struct arm_instr_call *);\n");
75            printf("extern void arm_pc_to_pointers(struct cpu *);\n");
76    
77          for (reg=0; reg<=2; reg++)          for (reg=0; reg<=2; reg++)
78            for (pc=0; pc<=1; pc++)            for (pc=0; pc<=1; pc++)

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

  ViewVC Help
Powered by ViewVC 1.1.26