git-svn-id: svn://svn.valgrind.org/vex/trunk@148
if (!hregIsVirtual(vreg))
continue;
k = hregNumber(vreg);
- if (k < 0 || k >= n_vregs)
+ if (k < 0 || k >= n_vregs) {
+ vex_printf("\n");
+ (*ppInstr)(instrs_in->arr[ii]);
+ vex_printf("\n");
+ vex_printf("vreg %d, n_vregs %d\n", k, n_vregs);
vpanic("doRegisterAllocation: out-of-range vreg");
+ }
/* Take the opportunity to note its regclass. We'll need
that when allocating spill slots. */
env->vregmap[i] = hreg;
env->vregmapHI[i] = hregHI;
}
- env->vreg_ctr = env->n_vregmap;
+ env->vreg_ctr = j;
/* Ok, finally we can iterate over the statements. */
for (stmt = bb->stmts; stmt; stmt=stmt->link)