From 7a38f874326755f131afe2bd336c0a261d58d4f2 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Mon, 19 Jul 2010 22:58:42 -0700 Subject: [PATCH] [pk,sim] added temporary "exit" functionality --- riscv/insns/mtc0.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/riscv/insns/mtc0.h b/riscv/insns/mtc0.h index ee38f48..3b34f7a 100644 --- a/riscv/insns/mtc0.h +++ b/riscv/insns/mtc0.h @@ -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); } -- 2.30.2