ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/uae_cpu/gencpu.c
(Generate patch)

Comparing BasiliskII/src/uae_cpu/gencpu.c (file contents):
Revision 1.3 by cebix, 1999-10-21T15:14:42Z vs.
Revision 1.9 by cebix, 1999-10-31T23:18:40Z

# Line 26 | Line 26
26  
27   #if defined(SPARC_V8_ASSEMBLY) || defined(SPARC_V9_ASSEMBLY)
28   #define SPARC_ASSEMBLY 0
29 #include "sparcasm.h"
29   #endif
30  
31   #define BOOL_TYPE "int"
# Line 60 | Line 59 | static void read_counts (void)
59      if (file) {
60          fscanf (file, "Total: %lu\n", &total);
61          while (fscanf (file, "%lx: %lu %s\n", &opcode, &count, name) == 3) {
62 <            opcode_next_clev[nr] = 3;
62 >            opcode_next_clev[nr] = 4;
63              opcode_last_postfix[nr] = -1;
64              opcode_map[nr++] = opcode;
65              counts[opcode] = count;
# Line 73 | Line 72 | static void read_counts (void)
72          if (table68k[opcode].handler == -1 && table68k[opcode].mnemo != i_ILLG
73              && counts[opcode] == 0)
74          {
75 <            opcode_next_clev[nr] = 3;
75 >            opcode_next_clev[nr] = 4;
76              opcode_last_postfix[nr] = -1;
77              opcode_map[nr++] = opcode;
78              counts[opcode] = count;
# Line 1518 | Line 1517 | static void gen_opcode (unsigned long in
1517              printf ("\tif ((format & 0xF000) == 0x0000) { break; }\n");
1518              printf ("\telse if ((format & 0xF000) == 0x1000) { ; }\n");
1519              printf ("\telse if ((format & 0xF000) == 0x2000) { m68k_areg(regs, 7) += 4; break; }\n");
1520 +            printf ("\telse if ((format & 0xF000) == 0x3000) { m68k_areg(regs, 7) += 4; break; }\n");
1521 +            printf ("\telse if ((format & 0xF000) == 0x7000) { m68k_areg(regs, 7) += 52; break; }\n");
1522              printf ("\telse if ((format & 0xF000) == 0x8000) { m68k_areg(regs, 7) += 50; break; }\n");
1523              printf ("\telse if ((format & 0xF000) == 0x9000) { m68k_areg(regs, 7) += 12; break; }\n");
1524              printf ("\telse if ((format & 0xF000) == 0xa000) { m68k_areg(regs, 7) += 24; break; }\n");
# Line 2443 | Line 2444 | static void gen_opcode (unsigned long in
2444          swap_opcode ();
2445          printf ("\tfrestore_opp(opcode);\n");
2446          break;
2447 +     case i_CINVL:
2448 +     case i_CINVP:
2449 +     case i_CINVA:
2450 +     case i_CPUSHL:
2451 +     case i_CPUSHP:
2452 +     case i_CPUSHA:
2453 +        break;
2454 +     case i_MOVE16:
2455 +        printf ("\tuaecptr mems = m68k_areg(regs, srcreg) & ~15, memd;\n");
2456 +        printf ("\tdstreg = (%s >> 12) & 7;\n", gen_nextiword());
2457 +        printf ("\tmemd = m68k_areg(regs, dstreg) & ~15;\n");
2458 +        printf ("\tput_long(memd, get_long(mems));\n");
2459 +        printf ("\tput_long(memd+4, get_long(mems+4));\n");
2460 +        printf ("\tput_long(memd+8, get_long(mems+8));\n");
2461 +        printf ("\tput_long(memd+12, get_long(mems+12));\n");
2462 +        printf ("\tm68k_areg(regs, srcreg) += 16;\n");
2463 +        printf ("\tm68k_areg(regs, dstreg) += 16;\n");
2464 +        break;
2465       case i_MMUOP:
2466          genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0);
2467          sync_m68k_pc ();
# Line 2495 | Line 2514 | static void generate_one_opcode (int rp)
2514      }
2515      fprintf (stblfile, "{ op_%lx_%d, 0, %ld }, /* %s */\n", opcode, postfix, opcode, lookuptab[i].name);
2516      fprintf (headerfile, "extern cpuop_func op_%lx_%d;\n", opcode, postfix);
2517 < /*      fprintf (headerfile, "extern unsigned long REGPARAM2 op_%lx_%d(uae_u32);\n", opcode, postfix); */
2499 <    printf ("unsigned long REGPARAM2 op_%lx_%d(uae_u32 opcode) /* %s */\n{\n", opcode, postfix, lookuptab[i].name);
2517 >    printf ("void REGPARAM2 op_%lx_%d(uae_u32 opcode) /* %s */\n{\n", opcode, postfix, lookuptab[i].name);
2518  
2519      switch (table68k[opcode].stype) {
2520       case 0: smsk = 7; break;
# Line 2610 | Line 2628 | static void generate_one_opcode (int rp)
2628      gen_opcode (opcode);
2629      if (need_endlabel)
2630          printf ("%s: ;\n", endlabelstr);
2613    printf ("return %d;\n", insn_n_cycles);
2631      printf ("}\n");
2632      opcode_next_clev[rp] = next_cpu_level;
2633      opcode_last_postfix[rp] = postfix;
# Line 2622 | Line 2639 | static void generate_func (void)
2639  
2640      using_prefetch = 0;
2641      using_exception_3 = 0;
2642 <    for (i = 0; i < 5; i++) {
2643 <        cpu_level = 3 - i;
2644 <        if (i == 4) {
2642 >    for (i = 0; i < 6; i++) {
2643 >        cpu_level = 4 - i;
2644 >        if (i == 5) {
2645              cpu_level = 0;
2646              using_prefetch = 1;
2647              using_exception_3 = 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines