comparison lwasm/lwasm.c @ 376:35d4213e6657

Add cycle counting to listing Add option to include instruction cycle counts to the listing. Thanks to Erik G <erik@6809.org> for the patch.
author William Astle <lost@l-w.ca>
date Mon, 13 Jul 2015 20:47:30 -0600
parents 71f507f404f1
children 17fcd0c3ee45
comparison
equal deleted inserted replaced
375:71f507f404f1 376:35d4213e6657
454 } 454 }
455 } 455 }
456 456
457 void lwasm_emitop(line_t *cl, int opc) 457 void lwasm_emitop(line_t *cl, int opc)
458 { 458 {
459 if (cl->cycle_base == 0)
460 lwasm_cycle_update_count(cl, opc); /* only call first time, never on postbyte */
461
459 if (opc > 0x100) 462 if (opc > 0x100)
460 lwasm_emit(cl, opc >> 8); 463 lwasm_emit(cl, opc >> 8);
461 lwasm_emit(cl, opc); 464 lwasm_emit(cl, opc);
462 } 465 }
463 466