Skip to content

Commit

Permalink
Fix cycle computation on cosmac cpus ##arch
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Jan 31, 2025
1 parent 5d1ef88 commit b85fe91
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion libr/arch/p/cosmac/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,11 @@ static int cdp_disasm(RAnalOp *aop, RArchDecodeMask mask) {
clock cycles to execute. The 1804 and 1805 use slightly less clock cycles,
making them just a little bit less slow.
#endif
aop->cycles = 2;
if (buf[0] >= 0xc0 && buf[0] <= 0xcf) {
aop->cycles = 3;
} else {
aop->cycles = 2;
}
aop->size = size;
aop->type = op.type;
return size;
Expand Down

0 comments on commit b85fe91

Please sign in to comment.