diff options
author | Abhinay Kayastha <59576105+abhinay-kayastha@users.noreply.github.com> | 2020-07-16 19:11:22 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-16 17:11:22 -0700 |
commit | 8d860c190640e19e0f23a21d2479b4a36d13d342 (patch) | |
tree | 260657ce4dab42b7731f81fedc3f77bd9f7e7ef6 /riscv/processor.cc | |
parent | 759f4eba829d299eb34cd1568d3f4694e0d198cb (diff) | |
download | spike-8d860c190640e19e0f23a21d2479b4a36d13d342.zip spike-8d860c190640e19e0f23a21d2479b4a36d13d342.tar.gz spike-8d860c190640e19e0f23a21d2479b4a36d13d342.tar.bz2 |
Fix legalize_privilege for extension H (#508)
Diffstat (limited to 'riscv/processor.cc')
-rw-r--r-- | riscv/processor.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/processor.cc b/riscv/processor.cc index 315a035..921487d 100644 --- a/riscv/processor.cc +++ b/riscv/processor.cc @@ -592,7 +592,7 @@ reg_t processor_t::legalize_privilege(reg_t prv) if (!supports_extension('U')) return PRV_M; - if (prv == PRV_S && !supports_extension('S')) + if ((prv == PRV_HS && !supports_extension('H')) || (prv == PRV_S && !supports_extension('S'))) return PRV_U; return prv; |