comparison lwasm/cycle.c @ 405:4c8925f97eb5

Fix bug identifying long branches in cycle counting code Long branch opcodes start at 0x1022 for conditional branches, not 0x1023.
author William Astle <lost@l-w.ca>
date Thu, 03 Mar 2016 20:52:15 -0700
parents 4fd16faa4d93
children 0af33282b518
comparison
equal deleted inserted replaced
404:f6e03c2cebfb 405:4c8925f97eb5
657 cl->cycle_base = CURPRAGMA(cl, PRAGMA_6809) ? cycletable[i].cycles_6809 : cycletable[i].cycles_6309; 657 cl->cycle_base = CURPRAGMA(cl, PRAGMA_6809) ? cycletable[i].cycles_6809 : cycletable[i].cycles_6309;
658 cl->cycle_flags = cycletable[i].flags; 658 cl->cycle_flags = cycletable[i].flags;
659 cl->cycle_adj = 0; 659 cl->cycle_adj = 0;
660 660
661 // long branches are estimated on 6809 661 // long branches are estimated on 6809
662 if (CURPRAGMA(cl, PRAGMA_6809) && (opc >= 0x1023 && opc <= 0x102f)) 662 if (CURPRAGMA(cl, PRAGMA_6809) && (opc >= 0x1022 && opc <= 0x102f))
663 cl->cycle_flags |= CYCLE_ESTIMATED; 663 cl->cycle_flags |= CYCLE_ESTIMATED;
664 664
665 return; 665 return;
666 } 666 }
667 } 667 }