shithub: mc

Download patch

ref: 128a304c58ed737c2f3c3bfff6957ccfc4c5bd50
parent: 136c7085039d88051aa71ad041bd749e69dadbfd
author: Ori Bernstein <[email protected]>
date: Fri Jun 15 11:45:39 EDT 2012

Add comments to the assembly to tell it's source.

--- a/8/isel.c
+++ b/8/isel.c
@@ -735,8 +735,10 @@
     for (j = 0; j < fn->cfg->nbb; j++) {
         is.curbb = is.bb[j];
         for (i = 0; i < fn->cfg->bb[j]->nnl; i++) {
+            /* put in a comment that says where this line comes from */
+            snprintf(buf, sizeof buf, "\n\t# bb = %zd, bbidx = %zd, line=%d",
+                     j, i, fn->cfg->bb[j]->nl[i]->line);
             isel(&is, fn->cfg->bb[j]->nl[i]);
-            snprintf(buf, sizeof buf, "# bbidx = %zd, line=%d", i, fn->cfg->bb[j]->nl[i]->line);
             g(&is, Ilbl, locstrlbl(buf), NULL);
         }
     }