Ejemplo n.º 1
0
 public void genCountFinish(int count) {
   // flag certian lines as non countable
   printComment("Setting " + flagged_line_numbers.size() + " line count flags..");
   for (int i = 0; i < count + 1; i++) {
     if (!flagged_line_numbers.contains(i)) {
       printInsn("movq", "$" + COUNT_LABEL, "%r13");
       printInsn("movq", "(%r13)", "%r14");
       printInsn("movq", "$-1", 8 * (i - 1) + "(%r14)");
     }
   }
   // print results!
   printComment("Finishing up with line count..");
   printInsn("movq", "$" + COUNT_LABEL, "%rdi");
   printInsn("movq", "$" + NAME_LABEL, "%r14");
   printInsn("movq", "(%r14)", "%rsi");
   printInsn("call", "display_line_count_results");
   printComment("Done with line counting!");
 }
Ejemplo n.º 2
0
 public void addFlaggedLine(int line_num) {
   flagged_line_numbers.add(line_num);
 }