1 --- generator/cpu68k.c.orig
7 - if (cpu68k_iibtable[bitmap] != NULL) {EXIT(283,0,"CPU definition #%d conflicts (0x%x)", i, bitmap);}
8 + if (cpu68k_iibtable[bitmap] != NULL) {EXITR(283,0,"CPU definition #%d conflicts (0x%x)", i, bitmap);}
10 cpu68k_iibtable[bitmap] = iib;
11 /* set both flag and non-flag versions */
14 if (j != cpu68k_totalinstr)
16 - EXIT(84,0,"Instruction count not verified (%d/%d)\n",
17 + EXITR(84,0,"Instruction count not verified (%d/%d)\n",
18 cpu68k_totalinstr, i);
22 else /*---- Nope! We're out of IPCt's, allocate some more. ----*/
25 - if ( ipcts_free) { EXIT(3,0,"Bug! ipcts_free is %ld, but ipct_free_head is null",ipcts_free);}
26 + if ( ipcts_free) { EXITR(3,0,"Bug! ipcts_free is %ld, but ipct_free_head is null",ipcts_free);}
30 /*--- Did we call Malloc too many times? ---*/
31 - if ((iipct_mallocs++)>MAX_IPCT_MALLOCS) { EXIT(2,0,"Excessive mallocs of ipct's recompile with more!");}
32 + if ((iipct_mallocs++)>MAX_IPCT_MALLOCS) { EXITR(2,0,"Excessive mallocs of ipct's recompile with more!");}
34 size_to_get = (ipcts_allocated/IPCT_ALLOC_PERCENT)+1; // add a percentange of what we have, least 1
35 if ( (ipct_mallocs[iipct_mallocs]=(t_ipc_table *)malloc(size_to_get * sizeof(t_ipc_table)+1) )==NULL)
37 DEBUG_LOG(0,"Out of memory getting more ipcs: %p was returned", ipct_mallocs[iipct_mallocs]);
38 DEBUG_LOG(0,"%d ipcts allocated so far, %d are free, %d used, %d mallocs done", ipcts_allocated, ipcts_free, ipcts_used, iipct_mallocs);
39 - EXIT(86,0,"Out of memory while allocating more ipct's");
40 + EXITR(86,0,"Out of memory while allocating more ipct's");
43 // DEBUG_LOG(0,"zzzzzzz ipct land allocated:: %p -to- %p", ipct_mallocs[iipct_mallocs], (void *)(ipct_mallocs[iipct_mallocs]+size_to_get * sizeof(t_ipc_table)));
45 DEBUG_LOG(1000,"Nope - calling get_ipct()");
46 mmu_trn->table=get_ipct(); // allocate an ipc table for this mmu_t
48 - if (!table) {EXIT(21,0,"Couldn't get IPC Table! Doh!");}
49 - if (pc&1) {EXIT(14,0,"odd pc!");}
50 + if (!table) {EXITR(21,0,"Couldn't get IPC Table! Doh!");}
51 + if (pc&1) {EXITR(14,0,"odd pc!");}
55 @@ -1094,11 +1094,11 @@
56 // ipc points to the MMU translation table entry for this page.
57 ipc = &(table->ipc[((pc>>1) & 0xff)]);
58 DEBUG_LOG(200,"ipc is now %p at pc %06x max %06x",ipc,pc,xpc);
59 - if (!ipc) {EXIT(501,0,"cpu68k_makeipclist: But! ipc is null!"); }
60 - if (pc&1) {EXIT(501,0,"odd pc!");}
61 + if (!ipc) {EXITR(501,0,"cpu68k_makeipclist: But! ipc is null!"); }
62 + if (pc&1) {EXITR(501,0,"odd pc!");}
65 - {EXIT(502,0,"Let the bodies hit the floor!\nLet the bodies hit the floor!\nLet the bodies hit the floor!\n\n Either mmu_trn or table is null!");}
66 + {EXITR(502,0,"Let the bodies hit the floor!\nLet the bodies hit the floor!\nLet the bodies hit the floor!\n\n Either mmu_trn or table is null!");}
74 - EXIT(17,0,"ipc=NULL\n1. Something's got to give 2. Something's got to give. 3. Something's got to give 4. Something's got to give.\nNOW!");
75 + EXITR(17,0,"ipc=NULL\n1. Something's got to give 2. Something's got to give. 3. Something's got to give 4. Something's got to give.\nNOW!");
83 - EXIT(20,0,"ipc=NULL\n1. Something's got to give 2. Something's got to give. 3. Something's got to give 4. Something's got to give.\nNOW!");
84 + EXITR(20,0,"ipc=NULL\n1. Something's got to give 2. Something's got to give. 3. Something's got to give 4. Something's got to give.\nNOW!");
92 - if (!iib) {EXIT(53,0,"There's no proper IIB for the possibly illegal instruction opcode %04x @ pc=%08x\n",opcode,pc);}
93 - if ( !ipc) {EXIT(54,0,"Have a cow man! ipc=NULL\n"); }
94 + if (!iib) {EXITR(53,0,"There's no proper IIB for the possibly illegal instruction opcode %04x @ pc=%08x\n",opcode,pc);}
95 + if ( !ipc) {EXITR(54,0,"Have a cow man! ipc=NULL\n"); }
97 //DEBUG_LOG(200,"ipc is %s",(!ipc)?"null":"ok");
100 // grow the list of ipcs if we need to.
101 if (instrs>=ipcs_to_get)
103 - EXIT(24,0,"Welcome to the realms of chaos! I'm dealing with over %d instructions, %d ipcs! %d/%d/%d pc=%d/%08x",instrs,ipcs_to_get,segment1,segment2,start,context,pc);
104 + EXITR(24,0,"Welcome to the realms of chaos! I'm dealing with over %d instructions, %d ipcs! %d/%d/%d pc=%d/%08x",instrs,ipcs_to_get,segment1,segment2,start,context,pc);
108 @@ -1308,7 +1308,7 @@
109 table=mmu_trn->table;
112 - EXIT(99,0,"Couldnt get IPC Table! Doh!\n");}
113 + EXITR(99,0,"Couldnt get IPC Table! Doh!\n");}
115 //if (pc&1) {DEBUG_LOG(200,"odd pc!"); EXIT(26);}
117 @@ -1333,7 +1333,7 @@
121 - if (!table) {EXIT(27,0,"Couldnt get IPC Table! Doh!");}
122 + if (!table) {EXITR(27,0,"Couldnt get IPC Table! Doh!");}
123 //ipc = &(mmu_trn->table->ipc[((pc>>1) & 0xff)]);
124 //myiib=cpu68k_iibtable[opcode]; iib=myiib; // iib = myiib ? myiib : illegaliib;
125 //////cpu68k_ipc(pc, iib, ipc);
126 @@ -1370,7 +1370,7 @@
130 - if (pc&1) {EXIT(28,0,"odd pc!");}
131 + if (pc&1) {EXITR(28,0,"odd pc!");}
132 DEBUG_LOG(200,"*~*~*~*~*~*~ in 2instrs ipc is now %p at pc %06x max %06x",ipc,pc,xpc);
133 ipc=ipcs[instrs-1-1]; //ipc--
134 DEBUG_LOG(200,"ipc is now %p at pc %06x max %06x",ipc,pc,xpc);
135 @@ -1443,7 +1443,7 @@
136 DEBUG_LOG(200,"ipc is now %p at pc %06x max %06x ix=%d",ipc,pc,xpc,ix);
139 - EXIT(29,0,"Null ipc, bye");
140 + EXITR(29,0,"Null ipc, bye");
144 @@ -1460,7 +1460,7 @@
148 - EXIT(3,0,"Null IPC fn returned for opcode:%04x ix=%d of %d instrs",ipc->opcode,ix,instrs);
149 + EXITR(3,0,"Null IPC fn returned for opcode:%04x ix=%d of %d instrs",ipc->opcode,ix,instrs);
150 // cpu68k_printipc(ipc);
153 @@ -1479,7 +1479,7 @@
157 - EXIT(6,0,"FATAL ipc with null fnction at index %d-> used:%d, set:%d, opcode %04x, len %02x, src %08x, dst %08x\n",
158 + EXITR(6,0,"FATAL ipc with null fnction at index %d-> used:%d, set:%d, opcode %04x, len %02x, src %08x, dst %08x\n",
159 ix, ipc->used, ipc->set, ipc->opcode, ipc->wordlen, ipc->src, ipc->dst);