aboutsummaryrefslogtreecommitdiff
path: root/riscv/processor.cc
diff options
context:
space:
mode:
Diffstat (limited to 'riscv/processor.cc')
-rw-r--r--riscv/processor.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/riscv/processor.cc b/riscv/processor.cc
index 070ec15..e047126 100644
--- a/riscv/processor.cc
+++ b/riscv/processor.cc
@@ -271,7 +271,8 @@ void processor_t::set_pcr(int which, reg_t val)
vecbanks_count = __builtin_popcountll(vecbanks);
break;
case PCR_TOHOST:
- tohost = val;
+ if (tohost == 0)
+ tohost = val;
break;
case PCR_FROMHOST:
fromhost = val;