diff 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
line wrap: on
line diff
--- a/lwasm/lwasm.c	Mon Jul 13 20:35:16 2015 -0600
+++ b/lwasm/lwasm.c	Mon Jul 13 20:47:30 2015 -0600
@@ -456,6 +456,9 @@
 
 void lwasm_emitop(line_t *cl, int opc)
 {
+	if (cl->cycle_base == 0)
+		lwasm_cycle_update_count(cl, opc);	/* only call first time, never on postbyte */
+
 	if (opc > 0x100)
 		lwasm_emit(cl, opc >> 8);
 	lwasm_emit(cl, opc);