Only break out of the simulator loop on WFI, not on CSR writes
authorAndrew Waterman <andrew@sifive.com>
Mon, 30 Apr 2018 22:06:52 +0000 (15:06 -0700)
committerAndrew Waterman <andrew@sifive.com>
Mon, 30 Apr 2018 22:06:52 +0000 (15:06 -0700)
commit3d016e2765f9ad5f34e471e345004c6e16438e3c
treec9c03645fbd87502e8d18d7947518d83ea33b491
parentc0172e96bc2e83c990a22342ce7e99ba73142c47
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.
riscv/decode.h
riscv/execute.cc
riscv/insns/wfi.h