Disasm now translates xor x0,x0,x0 as a machine-generated bubble ("-").
authorChristopher Celio <celio@eecs.berkeley.edu>
Wed, 29 Jan 2014 01:06:27 +0000 (17:06 -0800)
committerChristopher Celio <celio@eecs.berkeley.edu>
Wed, 29 Jan 2014 01:06:27 +0000 (17:06 -0800)
  It is very convenient for pipeline trace viewing to differentiate
  between compiler NOPs and pipeline bubbles.

spike/disasm.cc

index 31e4068df6a4e46d35dc72e30da3c797abf7c55c..e4e731508a3ed05f8b4a4eea38ed67390a23c6c0 100644 (file)
@@ -247,6 +247,7 @@ disassembler_t::disassembler_t()
   DEFINE_ITYPE(jalr);
 
   add_insn(new disasm_insn_t("nop", match_addi, mask_addi | mask_rd | mask_rs1 | mask_imm, {}));
+  add_insn(new disasm_insn_t(" - ", match_xor, mask_xor | mask_rd | mask_rs1 | mask_rs2, {})); // for machine-generated bubbles
   DEFINE_I0TYPE("li", addi);
   DEFINE_I1TYPE("move", addi);
   DEFINE_ITYPE(addi);