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

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

revision 32 by dpavlin, Mon Oct 8 16:20:58 2007 UTC revision 38 by dpavlin, Mon Oct 8 16:21:53 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Copyright (C) 2005-2006  Anders Gavare.  All rights reserved.   *  Copyright (C) 2005-2007  Anders Gavare.  All rights reserved.
3   *   *
4   *  Redistribution and use in source and binary forms, with or without   *  Redistribution and use in source and binary forms, with or without
5   *  modification, are permitted provided that the following conditions are met:   *  modification, are permitted provided that the following conditions are met:
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: cpu_mips_instr.c,v 1.118 2006/10/29 05:10:27 debug Exp $   *  $Id: cpu_mips_instr.c,v 1.126 2007/03/28 18:33:36 debug Exp $
29   *   *
30   *  MIPS instructions.   *  MIPS instructions.
31   *   *
# Line 2586  X(sw_loop) Line 2586  X(sw_loop)
2586    
2587    
2588  #ifdef MODE32  #ifdef MODE32
2589  /*  /*  multi_{l,s}w_2, _3, etc.  */
2590   *  multi_sw_2, _3, _4:  #include "tmp_mips_loadstore_multi.c"
  *  
  *      sw      r?,ofs(rX)              r?=arg[0], rX=arg[1], ofs=arg[2]  
  */  
 X(multi_sw_2_le)  
 {  
         uint32_t *page;  
         MODE_uint_t rX = reg(ic[0].arg[1]), r1, r2;  
         MODE_uint_t addr0 = rX + (int32_t)ic[0].arg[2];  
         MODE_uint_t addr1 = rX + (int32_t)ic[1].arg[2];  
         uint32_t index0 = addr0 >> 12, index1 = addr1 >> 12;  
   
         page = (uint32_t *) cpu->cd.mips.host_store[index0];  
   
         /*  Fallback:  */  
         if (cpu->delay_slot ||  
             page == NULL || (addr0 & 3) != 0 || (addr1 & 3) != 0 ||  
             index0 != index1) {  
                 /*  Normal safe sw:  */  
                 mips32_loadstore[8 + 2 * 2](cpu, ic);  
                 return;  
         }  
   
         addr0 = (addr0 >> 2) & 0x3ff;  
         addr1 = (addr1 >> 2) & 0x3ff;  
   
         r1 = reg(ic[0].arg[0]);  
         r2 = reg(ic[1].arg[0]);  
   
         r1 = LE32_TO_HOST(r1);  
         r2 = LE32_TO_HOST(r2);  
   
         page[addr0] = r1;  
         page[addr1] = r2;  
   
         cpu->n_translated_instrs ++;  
         cpu->cd.mips.next_ic ++;  
 }  
 X(multi_sw_2_be)  
 {  
         uint32_t *page;  
         MODE_uint_t rX = reg(ic[0].arg[1]), r1, r2;  
         MODE_uint_t addr0 = rX + (int32_t)ic[0].arg[2];  
         MODE_uint_t addr1 = rX + (int32_t)ic[1].arg[2];  
         uint32_t index0 = addr0 >> 12, index1 = addr1 >> 12;  
   
         page = (uint32_t *) cpu->cd.mips.host_store[index0];  
   
         /*  Fallback:  */  
         if (cpu->delay_slot ||  
             page == NULL || (addr0 & 3) != 0 || (addr1 & 3) != 0 ||  
             index0 != index1) {  
                 /*  Normal safe sw:  */  
                 mips32_loadstore[16 + 8 + 2 * 2](cpu, ic);  
                 return;  
         }  
   
         addr0 = (addr0 >> 2) & 0x3ff;  
         addr1 = (addr1 >> 2) & 0x3ff;  
   
         r1 = reg(ic[0].arg[0]);  
         r2 = reg(ic[1].arg[0]);  
   
         r1 = BE32_TO_HOST(r1);  
         r2 = BE32_TO_HOST(r2);  
   
         page[addr0] = r1;  
         page[addr1] = r2;  
   
         cpu->n_translated_instrs ++;  
         cpu->cd.mips.next_ic ++;  
 }  
 X(multi_sw_3_le)  
 {  
         uint32_t *page;  
         MODE_uint_t rX = reg(ic[0].arg[1]), r1, r2, r3;  
         MODE_uint_t addr0 = rX + (int32_t)ic[0].arg[2];  
         MODE_uint_t addr1 = rX + (int32_t)ic[1].arg[2];  
         MODE_uint_t addr2 = rX + (int32_t)ic[2].arg[2];  
         uint32_t index0 = addr0 >> 12, index1 = addr1 >> 12,  
             index2 = addr2 >> 12;  
   
         page = (uint32_t *) cpu->cd.mips.host_store[index0];  
   
         /*  Fallback:  */  
         if (cpu->delay_slot ||  
             page == NULL || (addr0 & 3) != 0 || (addr1 & 3) != 0 ||  
             (addr2 & 3) != 0 || index0 != index1 || index0 != index2) {  
                 /*  Normal safe sw:  */  
                 mips32_loadstore[8 + 2 * 2](cpu, ic);  
                 return;  
         }  
   
         addr0 = (addr0 >> 2) & 0x3ff;  
         addr1 = (addr1 >> 2) & 0x3ff;  
         addr2 = (addr2 >> 2) & 0x3ff;  
   
         /*  printf("addr0=%x 1=%x 2=%x\n",  
             (int)addr0, (int)addr1, (int)addr2);  */  
   
         r1 = reg(ic[0].arg[0]);  
         r2 = reg(ic[1].arg[0]);  
         r3 = reg(ic[2].arg[0]);  
   
         r1 = LE32_TO_HOST(r1);  
         r2 = LE32_TO_HOST(r2);  
         r3 = LE32_TO_HOST(r3);  
   
         page[addr0] = r1;  
         page[addr1] = r2;  
         page[addr2] = r3;  
   
         cpu->n_translated_instrs += 2;  
         cpu->cd.mips.next_ic += 2;  
 }  
 X(multi_sw_3_be)  
 {  
         uint32_t *page;  
         MODE_uint_t rX = reg(ic[0].arg[1]), r1, r2, r3;  
         MODE_uint_t addr0 = rX + (int32_t)ic[0].arg[2];  
         MODE_uint_t addr1 = rX + (int32_t)ic[1].arg[2];  
         MODE_uint_t addr2 = rX + (int32_t)ic[2].arg[2];  
         uint32_t index0 = addr0 >> 12, index1 = addr1 >> 12,  
             index2 = addr2 >> 12;  
   
         page = (uint32_t *) cpu->cd.mips.host_store[index0];  
   
         /*  Fallback:  */  
         if (cpu->delay_slot ||  
             page == NULL || (addr0 & 3) != 0 || (addr1 & 3) != 0 ||  
             (addr2 & 3) != 0 || index0 != index1 || index0 != index2) {  
                 /*  Normal safe sw:  */  
                 mips32_loadstore[16 + 8 + 2 * 2](cpu, ic);  
                 return;  
         }  
   
         addr0 = (addr0 >> 2) & 0x3ff;  
         addr1 = (addr1 >> 2) & 0x3ff;  
         addr2 = (addr2 >> 2) & 0x3ff;  
   
         /*  printf("addr0=%x 1=%x 2=%x\n",  
             (int)addr0, (int)addr1, (int)addr2);  */  
   
         r1 = reg(ic[0].arg[0]);  
         r2 = reg(ic[1].arg[0]);  
         r3 = reg(ic[2].arg[0]);  
   
         r1 = BE32_TO_HOST(r1);  
         r2 = BE32_TO_HOST(r2);  
         r3 = BE32_TO_HOST(r3);  
   
         page[addr0] = r1;  
         page[addr1] = r2;  
         page[addr2] = r3;  
   
         cpu->n_translated_instrs += 2;  
         cpu->cd.mips.next_ic += 2;  
 }  
 X(multi_sw_4_le)  
 {  
         uint32_t *page;  
         MODE_uint_t rX = reg(ic[0].arg[1]), r1, r2, r3, r4;  
         MODE_uint_t addr0 = rX + (int32_t)ic[0].arg[2];  
         MODE_uint_t addr1 = rX + (int32_t)ic[1].arg[2];  
         MODE_uint_t addr2 = rX + (int32_t)ic[2].arg[2];  
         MODE_uint_t addr3 = rX + (int32_t)ic[3].arg[2];  
         uint32_t index0 = addr0 >> 12, index1 = addr1 >> 12,  
             index2 = addr2 >> 12, index3 = addr3 >> 12;  
   
         page = (uint32_t *) cpu->cd.mips.host_store[index0];  
   
         /*  Fallback:  */  
         if (cpu->delay_slot ||  
             page == NULL || (addr0 & 3) != 0 || (addr1 & 3) != 0 ||  
             (addr2 & 3) != 0 || (addr3 & 3) != 0 || index0 != index1 ||  
             index0 != index2 || index0 != index3) {  
                 /*  Normal safe sw:  */  
                 mips32_loadstore[8 + 2 * 2](cpu, ic);  
                 return;  
         }  
   
         addr0 = (addr0 >> 2) & 0x3ff;  
         addr1 = (addr1 >> 2) & 0x3ff;  
         addr2 = (addr2 >> 2) & 0x3ff;  
         addr3 = (addr3 >> 2) & 0x3ff;  
   
         r1 = reg(ic[0].arg[0]);  
         r2 = reg(ic[1].arg[0]);  
         r3 = reg(ic[2].arg[0]);  
         r4 = reg(ic[3].arg[0]);  
   
         r1 = LE32_TO_HOST(r1);  
         r2 = LE32_TO_HOST(r2);  
         r3 = LE32_TO_HOST(r3);  
         r4 = LE32_TO_HOST(r4);  
   
         page[addr0] = r1;  
         page[addr1] = r2;  
         page[addr2] = r3;  
         page[addr3] = r4;  
   
         cpu->n_translated_instrs += 3;  
         cpu->cd.mips.next_ic += 3;  
 }  
 X(multi_sw_4_be)  
 {  
         uint32_t *page;  
         MODE_uint_t rX = reg(ic[0].arg[1]), r1, r2, r3, r4;  
         MODE_uint_t addr0 = rX + (int32_t)ic[0].arg[2];  
         MODE_uint_t addr1 = rX + (int32_t)ic[1].arg[2];  
         MODE_uint_t addr2 = rX + (int32_t)ic[2].arg[2];  
         MODE_uint_t addr3 = rX + (int32_t)ic[3].arg[2];  
         uint32_t index0 = addr0 >> 12, index1 = addr1 >> 12,  
             index2 = addr2 >> 12, index3 = addr3 >> 12;  
   
         page = (uint32_t *) cpu->cd.mips.host_store[index0];  
   
         /*  Fallback:  */  
         if (cpu->delay_slot ||  
             page == NULL || (addr0 & 3) != 0 || (addr1 & 3) != 0 ||  
             (addr2 & 3) != 0 || (addr3 & 3) != 0 || index0 != index1 ||  
             index0 != index2 || index0 != index3) {  
                 /*  Normal safe sw:  */  
                 mips32_loadstore[16 + 8 + 2 * 2](cpu, ic);  
                 return;  
         }  
   
         addr0 = (addr0 >> 2) & 0x3ff;  
         addr1 = (addr1 >> 2) & 0x3ff;  
         addr2 = (addr2 >> 2) & 0x3ff;  
         addr3 = (addr3 >> 2) & 0x3ff;  
   
         r1 = reg(ic[0].arg[0]);  
         r2 = reg(ic[1].arg[0]);  
         r3 = reg(ic[2].arg[0]);  
         r4 = reg(ic[3].arg[0]);  
   
         r1 = BE32_TO_HOST(r1);  
         r2 = BE32_TO_HOST(r2);  
         r3 = BE32_TO_HOST(r3);  
         r4 = BE32_TO_HOST(r4);  
   
         page[addr0] = r1;  
         page[addr1] = r2;  
         page[addr2] = r3;  
         page[addr3] = r4;  
   
         cpu->n_translated_instrs += 3;  
         cpu->cd.mips.next_ic += 3;  
 }  
 #endif  
   
   
 #ifdef MODE32  
 /*  
  *  multi_lw_2, _3, _4:  
  *  
  *      lw      r?,ofs(rX)              r?=arg[0], rX=arg[1], ofs=arg[2]  
  */  
 X(multi_lw_2_le)  
 {  
         uint32_t *page;  
         MODE_uint_t rX = reg(ic[0].arg[1]), r1, r2;  
         MODE_uint_t addr0 = rX + (int32_t)ic[0].arg[2];  
         MODE_uint_t addr1 = rX + (int32_t)ic[1].arg[2];  
         uint32_t index0 = addr0 >> 12, index1 = addr1 >> 12;  
   
         page = (uint32_t *) cpu->cd.mips.host_load[index0];  
   
         /*  Fallback:  */  
         if (cpu->delay_slot ||  
             page == NULL || (addr0 & 3) != 0 || (addr1 & 3) != 0 ||  
             index0 != index1) {  
                 /*  Normal safe lw:  */  
                 mips32_loadstore[2 * 2 + 1](cpu, ic);  
                 return;  
         }  
   
         addr0 = (addr0 >> 2) & 0x3ff;  
         addr1 = (addr1 >> 2) & 0x3ff;  
   
         r1 = page[addr0];  
         r2 = page[addr1];  
   
         r1 = LE32_TO_HOST(r1);  
         r2 = LE32_TO_HOST(r2);  
   
         reg(ic[0].arg[0]) = r1;  
         reg(ic[1].arg[0]) = r2;  
   
         cpu->n_translated_instrs ++;  
         cpu->cd.mips.next_ic ++;  
 }  
 X(multi_lw_2_be)  
 {  
         uint32_t *page;  
         MODE_uint_t rX = reg(ic[0].arg[1]), r1, r2;  
         MODE_uint_t addr0 = rX + (int32_t)ic[0].arg[2];  
         MODE_uint_t addr1 = rX + (int32_t)ic[1].arg[2];  
         uint32_t index0 = addr0 >> 12, index1 = addr1 >> 12;  
   
         page = (uint32_t *) cpu->cd.mips.host_load[index0];  
   
         /*  Fallback:  */  
         if (cpu->delay_slot ||  
             page == NULL || (addr0 & 3) != 0 || (addr1 & 3) != 0 ||  
             index0 != index1) {  
                 /*  Normal safe lw:  */  
                 mips32_loadstore[16 + 2 * 2 + 1](cpu, ic);  
                 return;  
         }  
   
         addr0 = (addr0 >> 2) & 0x3ff;  
         addr1 = (addr1 >> 2) & 0x3ff;  
   
         r1 = page[addr0];  
         r2 = page[addr1];  
   
         r1 = BE32_TO_HOST(r1);  
         r2 = BE32_TO_HOST(r2);  
   
         reg(ic[0].arg[0]) = r1;  
         reg(ic[1].arg[0]) = r2;  
   
         cpu->n_translated_instrs ++;  
         cpu->cd.mips.next_ic ++;  
 }  
 X(multi_lw_3_le)  
 {  
         uint32_t *page;  
         MODE_uint_t rX = reg(ic[0].arg[1]), r1, r2, r3;  
         MODE_uint_t addr0 = rX + (int32_t)ic[0].arg[2];  
         MODE_uint_t addr1 = rX + (int32_t)ic[1].arg[2];  
         MODE_uint_t addr2 = rX + (int32_t)ic[2].arg[2];  
         uint32_t index0 = addr0 >> 12, index1 = addr1 >> 12,  
             index2 = addr2 >> 12;  
   
         page = (uint32_t *) cpu->cd.mips.host_load[index0];  
   
         /*  Fallback:  */  
         if (cpu->delay_slot ||  
             page == NULL || (addr0 & 3) != 0 || (addr1 & 3) != 0 ||  
             (addr2 & 3) != 0 || index0 != index1 || index0 != index2) {  
                 /*  Normal safe lw:  */  
                 mips32_loadstore[2 * 2 + 1](cpu, ic);  
                 return;  
         }  
   
         addr0 = (addr0 >> 2) & 0x3ff;  
         addr1 = (addr1 >> 2) & 0x3ff;  
         addr2 = (addr2 >> 2) & 0x3ff;  
   
         /*  printf("addr0=%x 1=%x 2=%x\n",  
             (int)addr0, (int)addr1, (int)addr2);  */  
   
         r1 = page[addr0];  
         r2 = page[addr1];  
         r3 = page[addr2];  
   
         r1 = LE32_TO_HOST(r1);  
         r2 = LE32_TO_HOST(r2);  
         r3 = LE32_TO_HOST(r3);  
   
         reg(ic[0].arg[0]) = r1;  
         reg(ic[1].arg[0]) = r2;  
         reg(ic[2].arg[0]) = r3;  
   
         cpu->n_translated_instrs += 2;  
         cpu->cd.mips.next_ic += 2;  
 }  
 X(multi_lw_3_be)  
 {  
         uint32_t *page;  
         MODE_uint_t rX = reg(ic[0].arg[1]), r1, r2, r3;  
         MODE_uint_t addr0 = rX + (int32_t)ic[0].arg[2];  
         MODE_uint_t addr1 = rX + (int32_t)ic[1].arg[2];  
         MODE_uint_t addr2 = rX + (int32_t)ic[2].arg[2];  
         uint32_t index0 = addr0 >> 12, index1 = addr1 >> 12,  
             index2 = addr2 >> 12;  
   
         page = (uint32_t *) cpu->cd.mips.host_load[index0];  
   
         /*  Fallback:  */  
         if (cpu->delay_slot ||  
             page == NULL || (addr0 & 3) != 0 || (addr1 & 3) != 0 ||  
             (addr2 & 3) != 0 || index0 != index1 || index0 != index2) {  
                 /*  Normal safe lw:  */  
                 mips32_loadstore[16 + 2 * 2 + 1](cpu, ic);  
                 return;  
         }  
   
         addr0 = (addr0 >> 2) & 0x3ff;  
         addr1 = (addr1 >> 2) & 0x3ff;  
         addr2 = (addr2 >> 2) & 0x3ff;  
   
         /*  printf("addr0=%x 1=%x 2=%x\n",  
             (int)addr0, (int)addr1, (int)addr2);  */  
   
         r1 = page[addr0];  
         r2 = page[addr1];  
         r3 = page[addr2];  
   
         r1 = BE32_TO_HOST(r1);  
         r2 = BE32_TO_HOST(r2);  
         r3 = BE32_TO_HOST(r3);  
   
         reg(ic[0].arg[0]) = r1;  
         reg(ic[1].arg[0]) = r2;  
         reg(ic[2].arg[0]) = r3;  
   
         cpu->n_translated_instrs += 2;  
         cpu->cd.mips.next_ic += 2;  
 }  
 X(multi_lw_4_le)  
 {  
         uint32_t *page;  
         MODE_uint_t rX = reg(ic[0].arg[1]), r1, r2, r3, r4;  
         MODE_uint_t addr0 = rX + (int32_t)ic[0].arg[2];  
         MODE_uint_t addr1 = rX + (int32_t)ic[1].arg[2];  
         MODE_uint_t addr2 = rX + (int32_t)ic[2].arg[2];  
         MODE_uint_t addr3 = rX + (int32_t)ic[3].arg[2];  
         uint32_t index0 = addr0 >> 12, index1 = addr1 >> 12,  
             index2 = addr2 >> 12, index3 = addr3 >> 12;  
   
         page = (uint32_t *) cpu->cd.mips.host_load[index0];  
   
         /*  Fallback:  */  
         if (cpu->delay_slot ||  
             page == NULL || (addr0 & 3) != 0 || (addr1 & 3) != 0 ||  
             (addr2 & 3) != 0 || (addr3 & 3) != 0 ||  
             index0 != index1 || index0 != index2 || index0 != index3) {  
                 /*  Normal safe lw:  */  
                 mips32_loadstore[2 * 2 + 1](cpu, ic);  
                 return;  
         }  
   
         addr0 = (addr0 >> 2) & 0x3ff;  
         addr1 = (addr1 >> 2) & 0x3ff;  
         addr2 = (addr2 >> 2) & 0x3ff;  
         addr3 = (addr3 >> 2) & 0x3ff;  
   
         r1 = page[addr0];  
         r2 = page[addr1];  
         r3 = page[addr2];  
         r4 = page[addr3];  
   
         r1 = LE32_TO_HOST(r1);  
         r2 = LE32_TO_HOST(r2);  
         r3 = LE32_TO_HOST(r3);  
         r4 = LE32_TO_HOST(r4);  
   
         reg(ic[0].arg[0]) = r1;  
         reg(ic[1].arg[0]) = r2;  
         reg(ic[2].arg[0]) = r3;  
         reg(ic[3].arg[0]) = r4;  
   
         cpu->n_translated_instrs += 3;  
         cpu->cd.mips.next_ic += 3;  
 }  
 X(multi_lw_4_be)  
 {  
         uint32_t *page;  
         MODE_uint_t rX = reg(ic[0].arg[1]), r1, r2, r3, r4;  
         MODE_uint_t addr0 = rX + (int32_t)ic[0].arg[2];  
         MODE_uint_t addr1 = rX + (int32_t)ic[1].arg[2];  
         MODE_uint_t addr2 = rX + (int32_t)ic[2].arg[2];  
         MODE_uint_t addr3 = rX + (int32_t)ic[3].arg[2];  
         uint32_t index0 = addr0 >> 12, index1 = addr1 >> 12,  
             index2 = addr2 >> 12, index3 = addr3 >> 12;  
   
         page = (uint32_t *) cpu->cd.mips.host_load[index0];  
   
         /*  Fallback:  */  
         if (cpu->delay_slot ||  
             page == NULL || (addr0 & 3) != 0 || (addr1 & 3) != 0 ||  
             (addr2 & 3) != 0 || (addr3 & 3) != 0 ||  
             index0 != index1 || index0 != index2 || index0 != index3) {  
                 /*  Normal safe lw:  */  
                 mips32_loadstore[16 + 2 * 2 + 1](cpu, ic);  
                 return;  
         }  
   
         addr0 = (addr0 >> 2) & 0x3ff;  
         addr1 = (addr1 >> 2) & 0x3ff;  
         addr2 = (addr2 >> 2) & 0x3ff;  
         addr3 = (addr3 >> 2) & 0x3ff;  
   
         r1 = page[addr0];  
         r2 = page[addr1];  
         r3 = page[addr2];  
         r4 = page[addr3];  
   
         r1 = BE32_TO_HOST(r1);  
         r2 = BE32_TO_HOST(r2);  
         r3 = BE32_TO_HOST(r3);  
         r4 = BE32_TO_HOST(r4);  
   
         reg(ic[0].arg[0]) = r1;  
         reg(ic[1].arg[0]) = r2;  
         reg(ic[2].arg[0]) = r3;  
         reg(ic[3].arg[0]) = r4;  
   
         cpu->n_translated_instrs += 3;  
         cpu->cd.mips.next_ic += 3;  
 }  
2591  #endif  #endif
2592    
2593    
# Line 3873  void COMBINE(b_daddiu)(struct cpu *cpu, Line 3369  void COMBINE(b_daddiu)(struct cpu *cpu,
3369   */   */
3370  X(to_be_translated)  X(to_be_translated)
3371  {  {
3372    #ifdef NATIVE_CODE_GENERATION
3373            int native = 0;
3374    #endif
3375          uint64_t addr, low_pc;          uint64_t addr, low_pc;
3376          uint32_t iword, imm;          uint32_t iword, imm;
3377          unsigned char *page;          unsigned char *page;
# Line 4164  X(to_be_translated) Line 3663  X(to_be_translated)
3663    
3664                          if (ic->f == instr(addu))                          if (ic->f == instr(addu))
3665                                  cpu->cd.mips.combination_check = COMBINE(addu);                                  cpu->cd.mips.combination_check = COMBINE(addu);
3666    
3667                          break;                          break;
3668    
3669                  case SPECIAL_JR:                  case SPECIAL_JR:
# Line 4588  X(to_be_translated) Line 4088  X(to_be_translated)
4088                  goto bad;                  goto bad;
4089                  break;                  break;
4090    
4091            case HI6_COP3:
4092                    /*  Always cause a coprocessor unusable exception if
4093                        there is no coprocessor 3:  */
4094                    if (cpu->cd.mips.coproc[3] == NULL) {
4095                            ic->f = instr(cpu);
4096                            ic->arg[0] = 3;
4097                            break;
4098                    }
4099    
4100                    if (iword == 0x4d00ffff) {
4101                            /*  R2020 writeback thing, used by e.g. NetBSD/pmax
4102                                on MIPSMATE.  */
4103                            ic->f = instr(nop);
4104                    } else {
4105                            fatal("COP3 iword=0x%08x\n", iword);
4106                            goto bad;
4107                    }
4108                    break;
4109    
4110          case HI6_SPECIAL2:          case HI6_SPECIAL2:
4111                  if (cpu->cd.mips.cpu_type.rev == MIPS_R5900) {                  if (cpu->cd.mips.cpu_type.rev == MIPS_R5900) {
4112                          /*  R5900, TX79/C790, have MMI instead of SPECIAL2:  */                          /*  R5900, TX79/C790, have MMI instead of SPECIAL2:  */
# Line 5031  X(to_be_translated) Line 4550  X(to_be_translated)
4550          default:goto bad;          default:goto bad;
4551          }          }
4552    
4553    
4554  #ifdef MODE32  #ifdef MODE32
4555          if (x64) {          if (x64) {
4556                  static int has_warned = 0;                  static int has_warned = 0;
# Line 5043  X(to_be_translated) Line 4563  X(to_be_translated)
4563          }          }
4564  #endif  #endif
4565    
4566    
4567    #ifdef NATIVE_CODE_GENERATION
4568            if (native == 0 || (addr & 0xffc) == 0xffc ||
4569                ic[1].f != instr(to_be_translated)) {
4570                    /*  TODO  */
4571                    /*  flush etc.  */
4572            }
4573    #endif
4574    
4575    
4576  #define DYNTRANS_TO_BE_TRANSLATED_TAIL  #define DYNTRANS_TO_BE_TRANSLATED_TAIL
4577  #include "cpu_dyntrans.c"  #include "cpu_dyntrans.c"

Legend:
Removed from v.32  
changed lines
  Added in v.38

  ViewVC Help
Powered by ViewVC 1.1.26