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

# 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 724 | 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;
737                
738                case flag_sub:
739                        start_brace();
740                        printf("\tuae_u32 %s;\n", value);
741                        switch(size)
742                        {
743                                case sz_byte:
744                                        printf("\t%s = sparc_v8_flag_sub_8(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", value, src, dst);
745                                        break;
746                                case sz_word:
747                                        printf("\t%s = sparc_v8_flag_sub_16(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", value, src, dst);
748                                        break;
749                                case sz_long:
750                                        printf("\t%s = sparc_v8_flag_sub_32(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", value, src, dst);
751                                        break;
752                        }
753                        return;
754                
755                case flag_cmp:
756                        switch(size)
757                        {
758                                case sz_byte:
759 //                                      printf("\tsparc_v8_flag_cmp_8(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", src, dst);
760                                        break;
761                                case sz_word:
762 //                                      printf("\tsparc_v8_flag_cmp_16(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", src, dst);
763                                        break;
764                                case sz_long:
765 #if 1
766                                        printf("\tsparc_v8_flag_cmp_32(&regflags, (uae_u32)(%s), (uae_u32)(%s));\n", src, dst);
767                                        return;
768 #endif
769                                        break;
770                        }
771 //                      return;
772                        break;
736          }
737   #elif defined(SPARC_V9_ASSEMBLY)
738          switch(type)
# Line 1518 | 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 2443 | 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 2621 | 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