summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Norton2016-06-06 13:58:39 +0100
committerRobert Norton2016-06-06 13:58:39 +0100
commitff27d06655c619038fbf75433040492d2ca81c13 (patch)
tree71e9eb4c5080934691472ee496c04ee1c0a2a3a4
parentd9cd314728d6d72f961ca06ce9297760559a63b2 (diff)
revert accidental functional change introduced when formatting -- simulator halt instructions decode statements are a special case of mtc0 so clauses must appear first.
-rw-r--r--mips/mips_insts.sail22
1 files changed, 11 insertions, 11 deletions
diff --git a/mips/mips_insts.sail b/mips/mips_insts.sail
index a6cef9ca..2555bb78 100644
--- a/mips/mips_insts.sail
+++ b/mips/mips_insts.sail
@@ -1461,6 +1461,17 @@ function clause execute (MFC0(rt, rd, sel, double)) = {
wGPR(rt) := if (double) then result else EXTS(result[31..0])
}
+(* simulator halt instruction "MTC0 rt, r23" (cheri specific behaviour) *)
+union ast member unit HCF
+function clause decode (0b010000 : 0b00100 : (regno) rt : 0b10111 : 0b00000000000) =
+ Some(HCF())
+
+function clause decode (0b010000 : 0b00100 : (regno) rt : 0b11010 : 0b00000000000) =
+ Some(HCF())
+
+function clause execute (HCF) =
+ () (* halt instruction actually executed by interpreter framework *)
+
union ast member (regno, regno, bit[3], bool) MTC0
function clause decode (0b010000 : 0b00100 : (regno) rt : (regno) rd : 0b00000000 : (bit[3]) sel) =
Some(MTC0(rt, rd, sel, false)) (* MTC0 *)
@@ -1645,14 +1656,3 @@ function clause execute (ERET) =
CP0Status.EXL := 0;
}
}
-
-(* simulator halt instruction "MTC0 rt, r23" (cheri specific behaviour) *)
-union ast member unit HCF
-function clause decode (0b010000 : 0b00100 : (regno) rt : 0b10111 : 0b00000000000) =
- Some(HCF())
-
-function clause decode (0b010000 : 0b00100 : (regno) rt : 0b11010 : 0b00000000000) =
- Some(HCF())
-
-function clause execute (HCF) =
- () (* halt instruction actually executed by interpreter framework *)