From: Andrew Waterman Date: Tue, 20 Jul 2010 05:58:42 +0000 (-0700) Subject: [pk,sim] added temporary "exit" functionality X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a38f874326755f131afe2bd336c0a261d58d4f2;p=riscv-isa-sim.git [pk,sim] added temporary "exit" functionality --- 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); }