also print sreg names when showing ureg
authorrekado <rekado@elephly.net>
Fri, 19 Sep 2014 21:47:09 +0000 (23:47 +0200)
committerrekado <rekado@elephly.net>
Fri, 19 Sep 2014 21:47:09 +0000 (23:47 +0200)
SHARC/Types.hs

index a0a0973..ba95413 100644 (file)
@@ -123,6 +123,7 @@ instance Show Ureg where
                    0x40 -> format0100 stripped
                    0x50 -> format0101 stripped
                    0x60 -> names0110 !! fromIntegral stripped
+                   0x70 -> names0111 !! fromIntegral stripped
                    _ -> printf "0x%02X" n
     where
       prefix = n .&. 0xF0
@@ -150,6 +151,24 @@ instance Show Ureg where
                   , "TPERIOD"
                   , "TCOUNT"
                   ]
+      names0111 = [ "USTAT1"
+                  , "USTAT2"
+                  , "MODE1"
+                  , "MMASK"
+                  , "MODE2"
+                  , "FLAGS"
+                  , "ASTATx"
+                  , "ASTATy"
+                  , "STKYx"
+                  , "STKYy"
+                  , "IRPTL"
+                  , "IMASK"
+                  , "IMASKP"
+                  , "LRPTL"
+                  , "USTAT3"
+                  , "USTAT4"
+                  ]
+
 
 -- TODO: Sreg is just a special case Ureg.  Unify types!
 -- 4 bit system register