From: Yunsup Lee Date: Tue, 22 Oct 2013 01:53:02 +0000 (-0700) Subject: clarify vxcptsave/vxctkill semantics X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1bcda9195b55d23fe373b23ae38884fd7a4ecef8;p=riscv-isa-sim.git clarify vxcptsave/vxctkill semantics --- diff --git a/hwacha/hwacha.h b/hwacha/hwacha.h index 100477c..df0add3 100644 --- a/hwacha/hwacha.h +++ b/hwacha/hwacha.h @@ -46,8 +46,9 @@ public: bool get_debug() { return debug; } disassembler_t* get_ut_disassembler() { return &ut_disassembler; } -private: static const int max_uts = 2048; + +private: ct_state_t ct_state; ut_state_t ut_state[max_uts]; reg_t cause; diff --git a/hwacha/insns/vxcptkill.h b/hwacha/insns/vxcptkill.h index 684a816..08efc12 100644 --- a/hwacha/insns/vxcptkill.h +++ b/hwacha/insns/vxcptkill.h @@ -1,3 +1,4 @@ require_supervisor_hwacha; -for (uint32_t i=0; iget_ut_state(i)->run = false; +h->get_ct_state()->reset(); +for (uint32_t i=0; imax_uts; i++) + h->get_ut_state(i)->reset(); diff --git a/hwacha/insns/vxcptsave.h b/hwacha/insns/vxcptsave.h index 2ff7761..cc663ed 100644 --- a/hwacha/insns/vxcptsave.h +++ b/hwacha/insns/vxcptsave.h @@ -40,3 +40,5 @@ for (uint32_t i=0; i