Mercurial > hg > index.cgi
comparison lwasm/insn_rel.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 | 8764142b3192 |
children | 67373a053c49 |
comparison
equal
deleted
inserted
replaced
375:71f507f404f1 | 376:35d4213e6657 |
---|---|
230 if (l -> lint == 8 && (offs < -128 || offs > 127)) | 230 if (l -> lint == 8 && (offs < -128 || offs > 127)) |
231 { | 231 { |
232 lwasm_register_error(as, l, E_BYTE_OVERFLOW); | 232 lwasm_register_error(as, l, E_BYTE_OVERFLOW); |
233 return; | 233 return; |
234 } | 234 } |
235 | |
236 | 235 |
237 lwasm_emitop(l, instab[l -> insn].ops[2]); | 236 lwasm_emitop(l, instab[l -> insn].ops[2]); |
238 lwasm_emit(l, offs); | 237 lwasm_emit(l, offs); |
238 | |
239 l -> cycle_adj = 2; | |
239 } | 240 } |
240 else | 241 else |
241 { | 242 { |
242 lwasm_emitop(l, instab[l -> insn].ops[3]); | 243 lwasm_emitop(l, instab[l -> insn].ops[3]); |
243 lwasm_emitexpr(l, e, 2); | 244 lwasm_emitexpr(l, e, 2); |
245 | |
246 l->cycle_adj = 4; | |
244 } | 247 } |
245 } | 248 } |