m68k: Add support for the FNOP instruction (fixes #1916)
The FNOP instruction has the same encoding as FBF with zero displacement, but according to the manual, it has some additional synchronization functions, so it would be good if Capstone disassembles this with the FNOP mnemonic instead of the FBF mnemonic. Before this change: $ cstool m68k40 0xf2800000 0 f2 80 00 00 fbf.w $2 After this change: $ cstool m68k40 0xf2800000 0 f2 80 00 00 fnop
This commit is contained in:
parent
55dd90c50a
commit
15286490fb
|
@ -1784,6 +1784,13 @@ static void d68020_cpbcc_16(m68k_info *info)
|
|||
cs_m68k* ext;
|
||||
LIMIT_CPU_TYPES(info, M68020_PLUS);
|
||||
|
||||
// FNOP is a special case of FBF
|
||||
if (info->ir == 0xf280 && peek_imm_16(info) == 0) {
|
||||
MCInst_setOpcode(info->inst, M68K_INS_FNOP);
|
||||
info->pc += 2;
|
||||
return;
|
||||
}
|
||||
|
||||
// these are all in row with the extension so just doing a add here is fine
|
||||
info->inst->Opcode += (info->ir & 0x2f);
|
||||
|
||||
|
|
Loading…
Reference in New Issue