comparison m68k_to_x86.c @ 542:5d57fd8b44f8

Removed old debug print function that is no longer needed
author Michael Pavone <pavone@retrodev.com>
date Sun, 16 Feb 2014 16:50:10 -0800
parents a59ac6b4b5b5
children 915a1cb98bac
comparison
equal deleted inserted replaced
541:a59ac6b4b5b5 542:5d57fd8b44f8
39 void set_ccr(); 39 void set_ccr();
40 void get_sr(); 40 void get_sr();
41 void do_sync(); 41 void do_sync();
42 void bcd_add(); 42 void bcd_add();
43 void bcd_sub(); 43 void bcd_sub();
44 void debug_print_sr();
45 44
46 uint8_t * cycles(uint8_t * dst, uint32_t num) 45 uint8_t * cycles(uint8_t * dst, uint32_t num)
47 { 46 {
48 dst = add_ir(dst, num, CYCLES, SZ_D); 47 dst = add_ir(dst, num, CYCLES, SZ_D);
49 return dst; 48 return dst;
2851 //leave supervisor mode 2850 //leave supervisor mode
2852 dst = mov_rr(dst, opts->aregs[7], SCRATCH1, SZ_B); 2851 dst = mov_rr(dst, opts->aregs[7], SCRATCH1, SZ_B);
2853 dst = mov_rdisp8r(dst, CONTEXT, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, opts->aregs[7], SZ_B); 2852 dst = mov_rdisp8r(dst, CONTEXT, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, opts->aregs[7], SZ_B);
2854 dst = mov_rrdisp8(dst, SCRATCH1, CONTEXT, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, SZ_B); 2853 dst = mov_rrdisp8(dst, SCRATCH1, CONTEXT, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, SZ_B);
2855 } 2854 }
2856 //dst = call(dst, (uint8_t *)debug_print_sr);
2857 if (inst->src.params.immed & 0x700) { 2855 if (inst->src.params.immed & 0x700) {
2858 dst = call(dst, (uint8_t *)do_sync); 2856 dst = call(dst, (uint8_t *)do_sync);
2859 } 2857 }
2860 } 2858 }
2861 break; 2859 break;
3168 if (inst->src.params.immed & 0x10) { 3166 if (inst->src.params.immed & 0x10) {
3169 dst = xor_irdisp8(dst, 1, CONTEXT, 0, SZ_B); 3167 dst = xor_irdisp8(dst, 1, CONTEXT, 0, SZ_B);
3170 } 3168 }
3171 if (inst->op == M68K_ORI_SR) { 3169 if (inst->op == M68K_ORI_SR) {
3172 dst = xor_irdisp8(dst, inst->src.params.immed >> 8, CONTEXT, offsetof(m68k_context, status), SZ_B); 3170 dst = xor_irdisp8(dst, inst->src.params.immed >> 8, CONTEXT, offsetof(m68k_context, status), SZ_B);
3173 //dst = call(dst, (uint8_t *)debug_print_sr);
3174 if (inst->src.params.immed & 0x700) { 3171 if (inst->src.params.immed & 0x700) {
3175 dst = call(dst, (uint8_t *)do_sync); 3172 dst = call(dst, (uint8_t *)do_sync);
3176 } 3173 }
3177 } 3174 }
3178 break; 3175 break;
3229 //leave supervisor mode 3226 //leave supervisor mode
3230 dst = mov_rr(dst, opts->aregs[7], SCRATCH1, SZ_D); 3227 dst = mov_rr(dst, opts->aregs[7], SCRATCH1, SZ_D);
3231 dst = mov_rdisp8r(dst, CONTEXT, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, opts->aregs[7], SZ_D); 3228 dst = mov_rdisp8r(dst, CONTEXT, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, opts->aregs[7], SZ_D);
3232 dst = mov_rrdisp8(dst, SCRATCH1, CONTEXT, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, SZ_D); 3229 dst = mov_rrdisp8(dst, SCRATCH1, CONTEXT, offsetof(m68k_context, aregs) + sizeof(uint32_t) * 8, SZ_D);
3233 } 3230 }
3234 //dst = call(dst, (uint8_t *)debug_print_sr);
3235 dst = call(dst, (uint8_t *)do_sync); 3231 dst = call(dst, (uint8_t *)do_sync);
3236 } 3232 }
3237 dst = cycles(dst, 12); 3233 dst = cycles(dst, 12);
3238 } else { 3234 } else {
3239 if (src_op.base != SCRATCH1) { 3235 if (src_op.base != SCRATCH1) {
3418 if (inst->src.params.immed & 0x10) { 3414 if (inst->src.params.immed & 0x10) {
3419 dst = mov_irind(dst, 1, CONTEXT, SZ_B); 3415 dst = mov_irind(dst, 1, CONTEXT, SZ_B);
3420 } 3416 }
3421 if (inst->op == M68K_ORI_SR) { 3417 if (inst->op == M68K_ORI_SR) {
3422 dst = or_irdisp8(dst, inst->src.params.immed >> 8, CONTEXT, offsetof(m68k_context, status), SZ_B); 3418 dst = or_irdisp8(dst, inst->src.params.immed >> 8, CONTEXT, offsetof(m68k_context, status), SZ_B);
3423 //dst = call(dst, (uint8_t *)debug_print_sr);
3424 if (inst->src.params.immed & 0x700) { 3419 if (inst->src.params.immed & 0x700) {
3425 dst = call(dst, (uint8_t *)do_sync); 3420 dst = call(dst, (uint8_t *)do_sync);
3426 } 3421 }
3427 } 3422 }
3428 break; 3423 break;