221 |
|
} |
222 |
|
|
223 |
|
/* getv == 1: fetch data; getv != 0: check for odd address. If movem != 0, |
224 |
< |
* the calling routine handles Apdi and Aipi modes. */ |
224 |
> |
* the calling routine handles Apdi and Aipi modes. |
225 |
> |
* gb-- movem == 2 means the same thing but for a MOVE16 instruction */ |
226 |
|
static void genamode (amodes mode, char *reg, wordsizes size, char *name, int getv, int movem) |
227 |
|
{ |
228 |
|
start_brace (); |
2453 |
|
case i_CPUSHA: |
2454 |
|
break; |
2455 |
|
case i_MOVE16: |
2456 |
< |
printf ("\tuaecptr mems = m68k_areg(regs, srcreg) & ~15, memd;\n"); |
2457 |
< |
printf ("\tdstreg = (%s >> 12) & 7;\n", gen_nextiword()); |
2458 |
< |
printf ("\tmemd = m68k_areg(regs, dstreg) & ~15;\n"); |
2459 |
< |
printf ("\tput_long(memd, get_long(mems));\n"); |
2460 |
< |
printf ("\tput_long(memd+4, get_long(mems+4));\n"); |
2461 |
< |
printf ("\tput_long(memd+8, get_long(mems+8));\n"); |
2462 |
< |
printf ("\tput_long(memd+12, get_long(mems+12));\n"); |
2463 |
< |
printf ("\tm68k_areg(regs, srcreg) += 16;\n"); |
2464 |
< |
printf ("\tm68k_areg(regs, dstreg) += 16;\n"); |
2456 |
> |
if ((opcode & 0xfff8) == 0xf620) { |
2457 |
> |
/* MOVE16 (Ax)+,(Ay)+ */ |
2458 |
> |
printf ("\tuaecptr mems = m68k_areg(regs, srcreg) & ~15, memd;\n"); |
2459 |
> |
printf ("\tdstreg = (%s >> 12) & 7;\n", gen_nextiword()); |
2460 |
> |
printf ("\tmemd = m68k_areg(regs, dstreg) & ~15;\n"); |
2461 |
> |
printf ("\tput_long(memd, get_long(mems));\n"); |
2462 |
> |
printf ("\tput_long(memd+4, get_long(mems+4));\n"); |
2463 |
> |
printf ("\tput_long(memd+8, get_long(mems+8));\n"); |
2464 |
> |
printf ("\tput_long(memd+12, get_long(mems+12));\n"); |
2465 |
> |
printf ("\tif (srcreg != dstreg)\n"); |
2466 |
> |
printf ("\tm68k_areg(regs, srcreg) += 16;\n"); |
2467 |
> |
printf ("\tm68k_areg(regs, dstreg) += 16;\n"); |
2468 |
> |
} |
2469 |
> |
else { |
2470 |
> |
/* Other variants */ |
2471 |
> |
genamode (curi->smode, "srcreg", curi->size, "mems", 0, 2); |
2472 |
> |
genamode (curi->dmode, "dstreg", curi->size, "memd", 0, 2); |
2473 |
> |
printf ("\tmemsa &= ~15;\n"); |
2474 |
> |
printf ("\tmemda &= ~15;\n"); |
2475 |
> |
printf ("\tput_long(memda, get_long(memsa));\n"); |
2476 |
> |
printf ("\tput_long(memda+4, get_long(memsa+4));\n"); |
2477 |
> |
printf ("\tput_long(memda+8, get_long(memsa+8));\n"); |
2478 |
> |
printf ("\tput_long(memda+12, get_long(memsa+12));\n"); |
2479 |
> |
if ((opcode & 0xfff8) == 0xf600) |
2480 |
> |
printf ("\tm68k_areg(regs, srcreg) += 16;\n"); |
2481 |
> |
else if ((opcode & 0xfff8) == 0xf608) |
2482 |
> |
printf ("\tm68k_areg(regs, dstreg) += 16;\n"); |
2483 |
> |
} |
2484 |
|
break; |
2485 |
|
case i_MMUOP: |
2486 |
|
genamode (curi->smode, "srcreg", curi->size, "extra", 1, 0); |
2543 |
|
case 3: smsk = 7; break; |
2544 |
|
case 4: smsk = 7; break; |
2545 |
|
case 5: smsk = 63; break; |
2546 |
+ |
case 7: smsk = 3; break; |
2547 |
|
default: abort (); |
2548 |
|
} |
2549 |
|
dmsk = 7; |