make REMAP persistent (if persistence requested) even on svshape
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 24 Jul 2021 07:30:45 +0000 (08:30 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 24 Jul 2021 07:30:45 +0000 (08:30 +0100)
openpower/isa/simplev.mdwn

index 77a8a6791693e2def3732ca27d95af28577b81db..404f74970affeffe41ae77c55f1e3b3a297bb084 100644 (file)
@@ -71,7 +71,17 @@ Pseudo-code:
 
     # for convenience, VL to be calculated and stored in SVSTATE
     vlen <- [0] * 7
-    SVSTATE[0:63] <- [0] * 64
+    SVSTATE[0:31] <- [0] * 32
+    # only overwrite REMAP if "persistence" is zero
+    if (SVSTATE[62] = 0b0) then
+        SVSTATE[32:33] <- 0b00
+        SVSTATE[34:35] <- 0b00
+        SVSTATE[36:37] <- 0b00
+        SVSTATE[38:39] <- 0b00
+        SVSTATE[40:41] <- 0b00
+        SVSTATE[42:46] <- 0b00000
+        SVSTATE[62] <- 0b0
+        SVSTATE[63] <- 0b0
     # clear out all SVSHAPEs
     SVSHAPE0[0:31] <- [0] * 32
     SVSHAPE1[0:31] <- [0] * 32