unsigned DasmSH2(char *buffer, unsigned pc) { UINT16 opcode; opcode = cpu_readmem32bedw_word(pc & 0x1fffffff); pc += 2; switch((opcode >> 12) & 15) { case 0: op0000(buffer,pc,opcode); break; case 1: op0001(buffer,pc,opcode); break; case 2: op0010(buffer,pc,opcode); break; case 3: op0011(buffer,pc,opcode); break; case 4: op0100(buffer,pc,opcode); break; case 5: op0101(buffer,pc,opcode); break; case 6: op0110(buffer,pc,opcode); break; case 7: op0111(buffer,pc,opcode); break; case 8: op1000(buffer,pc,opcode); break; case 9: op1001(buffer,pc,opcode); break; case 10: op1010(buffer,pc,opcode); break; case 11: op1011(buffer,pc,opcode); break; case 12: op1100(buffer,pc,opcode); break; case 13: op1101(buffer,pc,opcode); break; case 14: op1110(buffer,pc,opcode); break; default: op1111(buffer,pc,opcode); break; } return 2; }
static unsigned DasmSH2(char *buffer, unsigned pc, UINT16 opcode) { UINT32 flags; pc += 2; switch((opcode >> 12) & 15) { case 0: flags = op0000(buffer,pc,opcode); break; case 1: flags = op0001(buffer,pc,opcode); break; case 2: flags = op0010(buffer,pc,opcode); break; case 3: flags = op0011(buffer,pc,opcode); break; case 4: flags = op0100(buffer,pc,opcode); break; case 5: flags = op0101(buffer,pc,opcode); break; case 6: flags = op0110(buffer,pc,opcode); break; case 7: flags = op0111(buffer,pc,opcode); break; case 8: flags = op1000(buffer,pc,opcode); break; case 9: flags = op1001(buffer,pc,opcode); break; case 10: flags = op1010(buffer,pc,opcode); break; case 11: flags = op1011(buffer,pc,opcode); break; case 12: flags = op1100(buffer,pc,opcode); break; case 13: flags = op1101(buffer,pc,opcode); break; case 14: flags = op1110(buffer,pc,opcode); break; default: flags = op1111(buffer,pc,opcode); break; } return 2 | flags | DASMFLAG_SUPPORTED; }