[pk,sim] added temporary "exit" functionality
authorAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>
Tue, 20 Jul 2010 05:58:42 +0000 (22:58 -0700)
committerAndrew Waterman <waterman@s141.Millennium.Berkeley.EDU>
Tue, 20 Jul 2010 05:58:42 +0000 (22:58 -0700)
riscv/insns/mtc0.h

index ee38f48cc318fdb4c47f1ba8df69317ef86f957a..3b34f7a2090d18c5a1c11cd062a0e2021e6d87d4 100644 (file)
@@ -12,7 +12,12 @@ switch(insn.rtype.rs)
     ebase = sext32(RT & ~0xFFF);
     break;
   case 8:
+  {
     char ch = RT;
     demand(1 == write(1,&ch,1),"wtf");
     break;
+  }
+  case 9:
+    printf("%ld insns retired\n",counters[0]);
+    exit(0);
 }