psx emulator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
441 B

2 years ago
  1. #include "cpu.h"
  2. #include "insn.h"
  3. static cpu_insn_handler primary_insn_handler[0x34] = {};
  4. static cpu_insn_handler secondary_insn_handler[0x34] = {};
  5. void cpu_execute_insn(cpu_t *cpu, uint32_t insn) {
  6. const op_primary_t op = extract_primary_op(insn);
  7. if (op == SPECIAL) {
  8. const op_secondary_t op2 = extract_secondary_op(insn);
  9. secondary_insn_handler[op2](cpu, insn);
  10. return;
  11. }
  12. primary_insn_handler[op](cpu, insn);
  13. }