aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill McSpadden <bill@riscv.org>2024-05-23 09:20:10 -0500
committerGitHub <noreply@github.com>2024-05-23 09:20:10 -0500
commit66ebcc76bfc332f2cc8a643316efc71ff6423920 (patch)
treee8a63d9f517b103eb8584eec4b3240676f128f66
parentbaf157df2570f6d80a6e333d77e3caf0df9cc811 (diff)
parent6c758e9b8ff00ededb11d4cffe4983d69bd47a91 (diff)
downloadsail-riscv-66ebcc76bfc332f2cc8a643316efc71ff6423920.zip
sail-riscv-66ebcc76bfc332f2cc8a643316efc71ff6423920.tar.gz
sail-riscv-66ebcc76bfc332f2cc8a643316efc71ff6423920.tar.bz2
Merge pull request #476 from Timmmm/user/timh/minor_fixes
Minor style fixes
-rw-r--r--model/riscv_fetch.sail1
-rw-r--r--model/riscv_step.sail7
2 files changed, 3 insertions, 5 deletions
diff --git a/model/riscv_fetch.sail b/model/riscv_fetch.sail
index 9c9e06a..6fd6691 100644
--- a/model/riscv_fetch.sail
+++ b/model/riscv_fetch.sail
@@ -12,7 +12,6 @@
function isRVC(h : half) -> bool = not(h[1 .. 0] == 0b11)
-val fetch : unit -> FetchResult
function fetch() -> FetchResult =
/* fetch PC check for extensions: extensions return a transformed PC to fetch,
* but any exceptions use the untransformed PC.
diff --git a/model/riscv_step.sail b/model/riscv_step.sail
index 69d2b8c..5ff7e4b 100644
--- a/model/riscv_step.sail
+++ b/model/riscv_step.sail
@@ -33,8 +33,7 @@ function step(step_no : int) -> bool = {
},
None() => {
/* the extension hook interposes on the fetch result */
- let f : FetchResult = ext_fetch_hook(fetch());
- match f {
+ match ext_fetch_hook(fetch()) {
/* extension error */
F_Ext_Error(e) => {
ext_handle_fetch_check_error(e);
@@ -58,10 +57,10 @@ function step(step_no : int) -> bool = {
if haveRVC() then {
nextPC = PC + 2;
(execute(ast), true)
- } else {
+ } else {
handle_illegal();
(RETIRE_FAIL, true)
- }
+ }
},
F_Base(w) => {
sail_instr_announce(w);