Code: Select all
pc += (0xA280414082444141 >> ((opcode & 0x1F) * 2) & 3) + ((opcode & 0x9F) == 0x82);Code: Select all
static int const instr_lens [256] = { // lengths including opcode
2,2,1,2,2,2,2,2,1,2,1,2,3,3,3,3,// 0
2,2,1,2,2,2,2,2,1,3,1,3,3,3,3,3,// 1
3,2,1,2,2,2,2,2,1,2,1,2,3,3,3,3,// 2
2,2,1,2,2,2,2,2,1,3,1,3,3,3,3,3,// 3
2,2,1,2,2,2,2,2,1,2,1,2,3,3,3,3,// 4
2,2,1,2,2,2,2,2,1,3,1,3,3,3,3,3,// 5
3,2,1,2,2,2,2,2,1,2,1,2,3,3,3,3,// 6
2,2,1,2,2,2,2,2,1,3,1,3,3,3,3,3,// 7
2,2,2,2,2,2,2,2,1,2,1,2,3,3,3,3,// 8
2,2,1,2,2,2,2,2,1,3,1,3,3,3,3,3,// 9
2,2,2,2,2,2,2,2,1,2,1,2,3,3,3,3,// A
2,2,1,2,2,2,2,2,1,3,1,3,3,3,3,3,// B
2,2,2,2,2,2,2,2,1,2,1,2,3,3,3,3,// C
2,2,1,2,2,2,2,2,1,3,1,3,3,3,3,3,// D
2,2,2,2,2,2,2,2,1,2,1,2,3,3,3,3,// E
2,2,1,2,2,2,2,2,1,3,1,3,3,3,3,3,// F
};
pc += instr_lens [opcode] - 1;