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.5 by cebix, 1999-10-21T15:55:32Z vs.
Revision 1.7 by cebix, 1999-10-28T16:00:23Z

# Line 59 | 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 72 | 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 723 | Line 723 | static void genflags (flagtypes type, wo
723                          switch(size)
724                          {
725                                  case sz_byte:
726 <                                        printf("\t%s = sparc_v8_flag_add_8(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", value, src, dst);
726 >                                        printf("\t%s = sparc_v8_flag_add_8(M68K_FLAGS_ADDR, (uae_u32)(%s), (uae_u32)(%s));\n", value, src, dst);
727                                          break;
728                                  case sz_word:
729 <                                        printf("\t%s = sparc_v8_flag_add_16(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", value, src, dst);
729 >                                        printf("\t%s = sparc_v8_flag_add_16(M68K_FLAGS_ADDR, (uae_u32)(%s), (uae_u32)(%s));\n", value, src, dst);
730                                          break;
731                                  case sz_long:
732 <                                        printf("\t%s = sparc_v8_flag_add_32(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", value, src, dst);
732 >                                        printf("\t%s = sparc_v8_flag_add_32(M68K_FLAGS_ADDR, (uae_u32)(%s), (uae_u32)(%s));\n", value, src, dst);
733                                          break;
734                          }
735                          return;
736                
737                case flag_sub:
738                        start_brace();
739                        printf("\tuae_u32 %s;\n", value);
740                        switch(size)
741                        {
742                                case sz_byte:
743                                        printf("\t%s = sparc_v8_flag_sub_8(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", value, src, dst);
744                                        break;
745                                case sz_word:
746                                        printf("\t%s = sparc_v8_flag_sub_16(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", value, src, dst);
747                                        break;
748                                case sz_long:
749                                        printf("\t%s = sparc_v8_flag_sub_32(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", value, src, dst);
750                                        break;
751                        }
752                        return;
753                
754                case flag_cmp:
755                        switch(size)
756                        {
757                                case sz_byte:
758 //                                      printf("\tsparc_v8_flag_cmp_8(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", src, dst);
759                                        break;
760                                case sz_word:
761 //                                      printf("\tsparc_v8_flag_cmp_16(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", src, dst);
762                                        break;
763                                case sz_long:
764 #if 1
765                                        printf("\tsparc_v8_flag_cmp_32(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", src, dst);
766                                        return;
767 #endif
768                                        break;
769                        }
770 //                      return;
771                        break;
736          }
737   #elif defined(SPARC_V9_ASSEMBLY)
738          switch(type)
# Line 1517 | Line 1481 | static void gen_opcode (unsigned long in
1481              printf ("\tif ((format & 0xF000) == 0x0000) { break; }\n");
1482              printf ("\telse if ((format & 0xF000) == 0x1000) { ; }\n");
1483              printf ("\telse if ((format & 0xF000) == 0x2000) { m68k_areg(regs, 7) += 4; break; }\n");
1484 +            printf ("\telse if ((format & 0xF000) == 0x3000) { m68k_areg(regs, 7) += 4; break; }\n");
1485 +            printf ("\telse if ((format & 0xF000) == 0x7000) { m68k_areg(regs, 7) += 52; break; }\n");
1486              printf ("\telse if ((format & 0xF000) == 0x8000) { m68k_areg(regs, 7) += 50; break; }\n");
1487              printf ("\telse if ((format & 0xF000) == 0x9000) { m68k_areg(regs, 7) += 12; break; }\n");
1488              printf ("\telse if ((format & 0xF000) == 0xa000) { m68k_areg(regs, 7) += 24; break; }\n");
# Line 2442 | Line 2408 | static void gen_opcode (unsigned long in
2408          swap_opcode ();
2409          printf ("\tfrestore_opp(opcode);\n");
2410          break;
2411 +     case i_CINVL:
2412 +     case i_CINVP:
2413 +     case i_CINVA:
2414 +     case i_CPUSHL:
2415 +     case i_CPUSHP:
2416 +     case i_CPUSHA:
2417 +        break;
2418 +     case i_MOVE16:
2419 +        printf ("\tuaecptr mems = m68k_areg(regs, srcreg) & ~15, memd;\n");
2420 +        printf ("\tdstreg = (%s >> 12) & 7;\n", gen_nextiword());
2421 +        printf ("\tmemd = m68k_areg(regs, dstreg) & ~15;\n");
2422 +        printf ("\tput_long(memd, get_long(mems));\n");
2423 +        printf ("\tput_long(memd+4, get_long(mems+4));\n");
2424 +        printf ("\tput_long(memd+8, get_long(mems+8));\n");
2425 +        printf ("\tput_long(memd+12, get_long(mems+12));\n");
2426 +        printf ("\tm68k_areg(regs, srcreg) += 16;\n");
2427 +        printf ("\tm68k_areg(regs, dstreg) += 16;\n");
2428 +        break;
2429       case i_MMUOP:
2430          genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0);
2431          sync_m68k_pc ();
# Line 2620 | Line 2604 | static void generate_func (void)
2604  
2605      using_prefetch = 0;
2606      using_exception_3 = 0;
2607 <    for (i = 0; i < 5; i++) {
2608 <        cpu_level = 3 - i;
2609 <        if (i == 4) {
2607 >    for (i = 0; i < 6; i++) {
2608 >        cpu_level = 4 - i;
2609 >        if (i == 5) {
2610              cpu_level = 0;
2611              using_prefetch = 1;
2612              using_exception_3 = 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines