aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2018-04-30 15:06:52 -0700
committerAndrew Waterman <andrew@sifive.com>2018-04-30 15:06:52 -0700
commit3d016e2765f9ad5f34e471e345004c6e16438e3c (patch)
treec9c03645fbd87502e8d18d7947518d83ea33b491 /riscv/insns
parentc0172e96bc2e83c990a22342ce7e99ba73142c47 (diff)
downloadspike-3d016e2765f9ad5f34e471e345004c6e16438e3c.zip
spike-3d016e2765f9ad5f34e471e345004c6e16438e3c.tar.gz
spike-3d016e2765f9ad5f34e471e345004c6e16438e3c.tar.bz2
Only break out of the simulator loop on WFI, not on CSR writes
Breaking out of the loop on WFI was intended to let other threads run when the current thread has no work to do. There's no advantage to doing so on CSR writes, and the unintentional change in thread interleaving broke some test programs that relied on short timer periods.
Diffstat (limited to 'riscv/insns')
-rw-r--r--riscv/insns/wfi.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/insns/wfi.h b/riscv/insns/wfi.h
index 16de594..6504b78 100644
--- a/riscv/insns/wfi.h
+++ b/riscv/insns/wfi.h
@@ -1,2 +1,2 @@
require_privilege(get_field(STATE.mstatus, MSTATUS_TW) ? PRV_M : PRV_S);
-set_pc_and_serialize(npc);
+wfi();