add another test and fix broken fishmv pseudocode
authorJacob Lifshay <programmerjake@gmail.com>
Wed, 27 Jul 2022 17:54:23 +0000 (10:54 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Wed, 27 Jul 2022 17:54:23 +0000 (10:54 -0700)
openpower/isa/av.mdwn
openpower/isatables/RM-2P-1S1D.csv
src/openpower/test/alu/fmvis_cases.py

index 1347adcc52b779770eb6e7eccdcc3843c8f4d84e..ffbb7e7f51cf9d93ee8ebfd2d35ae0769e0d4e79 100644 (file)
@@ -230,10 +230,9 @@ DX-Form
 
 Pseudo-code:
 
-    LH   <- FRS[0:15]
-    fp32 <- LH || d0 || d1 || d2
-    n    <- DOUBLE(fp32)
-    FRS  <- LH || n[16:63]
+    fp32 <- SINGLE((FRS))
+    fp32[16:31] <- d0 || d1 || d2
+    FRS <- DOUBLE(fp32)
 
 Special Registers Altered:
 
index 31d93e24f81d7a87537577df40875ecec10c65aa..29e10d54562dc24f9d3bbc33b353c56eea7beeaf 100644 (file)
@@ -27,6 +27,7 @@ oris,NORMAL,,2P,EXTRA3,d:RA,s:RS,0,0,RS,0,0,RA,0,0,0
 xori,NORMAL,,2P,EXTRA3,d:RA,s:RS,0,0,RS,0,0,RA,0,0,0
 xoris,NORMAL,,2P,EXTRA3,d:RA,s:RS,0,0,RS,0,0,RA,0,0,0
 subfic,NORMAL,,2P,EXTRA3,d:RT,s:RA,0,0,RA,0,0,RT,0,0,0
+fishmv,NORMAL,,2P,EXTRA3,TODO,0,0,0,FRS,0,0,FRS,0,0,0
 cntlzw,NORMAL,,2P,EXTRA3,d:RA;d:CR0,s:RS,0,0,RS,0,0,RA,0,CR0,0
 cntlzd,NORMAL,,2P,EXTRA3,d:RA;d:CR0,s:RS,0,0,RS,0,0,RA,0,CR0,0
 subfze,NORMAL,,2P,EXTRA3,d:RT;d:CR0,s:RA,0,0,RA,0,0,RT,0,CR0,0
index de03d8b728d5efdc8f7a39d54b842c19cae5e11f..4689c26f778f0b1ca3c9de6f4eb1cf68082c4a21 100644 (file)
@@ -37,6 +37,8 @@ class FMVISTestCase(TestAccumulatorBase):
                         "fishmv 4, 0x4000",  # 2nd half of 1.00195 in FP32 form
                         "fmvis  5, 0xC049",  # 1st half of -3.14159 in FP32 form
                         "fishmv 5, 0x0FD0",  # 2nd half of -3.14159 in FP32 form
+                        "fmvis  6, 0x89AB",  # 1st half of 0x89ABCDEF in FP32 form
+                        "fishmv 6, 0xCDEF",  # 2nd half of 0x89ABCDEF in FP32 form
                        ])
         lst = list(lst)
 
@@ -44,5 +46,6 @@ class FMVISTestCase(TestAccumulatorBase):
         expected_fprs[3] = 0x400921fa00000000 # 3.14159 in FP64 form
         expected_fprs[4] = 0x3ff0080000000000 # 1.00195 in FP64 form
         expected_fprs[5] = 0xC00921fa00000000 # -3.14159 in FP64 form
-        e = ExpectedState(pc=0x18, fp_regs=expected_fprs)
+        expected_fprs[6] = 0xB93579BDE0000000 # converted value in FP64 form
+        e = ExpectedState(pc=0x20, fp_regs=expected_fprs)
         self.add_case(Program(lst, bigendian), expected=e)