whoops fraction in fpfromint off-by-one
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 7 Jun 2021 12:24:03 +0000 (13:24 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 7 Jun 2021 12:24:03 +0000 (13:24 +0100)
openpower/isafunctions/fpfromint.mdwn

index 7502e9f2f59101ae2f87e14d84e85f53f41c61f0..2068509bfbf42aabacf4cefbb6e806f83ebd0e0a 100644 (file)
@@ -43,7 +43,7 @@ Convert From Integer instructions.
             tmp[1:53]  <- frac[0:52]
             tmp[0:53]  <- tmp[0:53] + inc
             carry_out  <- tmp[53]
-            frac[0:52] <- tmp[1:54]
+            frac[0:52] <- tmp[1:53]
         if carry_out = 1 then exp <- exp + 1
         # TODO, later
         # FPSCR[FR] <- inc