X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=cpu%2Fsh2%2Fmame%2Fsh2pico.c;h=79264ac8caf4a7d5d2efd8e1cc80d6f883073667;hb=a8b03e2d4dc3fc0202a227375bf46bd4ad55f84a;hp=34fd1770b6d8a8d0646403344ec88a0e602a8d30;hpb=41397701210c08b9d25ca66cbe372c7ed86d6927;p=picodrive.git diff --git a/cpu/sh2/mame/sh2pico.c b/cpu/sh2/mame/sh2pico.c index 34fd177..79264ac 100644 --- a/cpu/sh2/mame/sh2pico.c +++ b/cpu/sh2/mame/sh2pico.c @@ -33,6 +33,8 @@ typedef unsigned char UINT8; #include "sh2.c" +#ifndef DRC_TMP + void sh2_execute(SH2 *sh2_, int cycles) { sh2 = sh2_; @@ -96,3 +98,34 @@ void sh2_execute(SH2 *sh2_, int cycles) sh2->cycles_done += cycles - sh2->icount; } +#else // DRC_TMP + +// tmp +void __attribute__((regparm(2))) sh2_do_op(SH2 *sh2_, int opcode) +{ + sh2 = sh2_; + sh2->pc += 2; + + switch (opcode & ( 15 << 12)) + { + case 0<<12: op0000(opcode); break; + case 1<<12: op0001(opcode); break; + case 2<<12: op0010(opcode); break; + case 3<<12: op0011(opcode); break; + case 4<<12: op0100(opcode); break; + case 5<<12: op0101(opcode); break; + case 6<<12: op0110(opcode); break; + case 7<<12: op0111(opcode); break; + case 8<<12: op1000(opcode); break; + case 9<<12: op1001(opcode); break; + case 10<<12: op1010(opcode); break; + case 11<<12: op1011(opcode); break; + case 12<<12: op1100(opcode); break; + case 13<<12: op1101(opcode); break; + case 14<<12: op1110(opcode); break; + default: op1111(opcode); break; + } +} + +#endif +