[Git][ghc/ghc][wip/supersven/riscv64-ncg] Fix float -> int conversion (width)

Sven Tennie (@supersven) gitlab at gitlab.haskell.org
Fri Nov 3 17:25:38 UTC 2023



Sven Tennie pushed to branch wip/supersven/riscv64-ncg at Glasgow Haskell Compiler / GHC


Commits:
15809eba by Sven Tennie at 2023-11-03T18:24:58+01:00
Fix float -> int conversion (width)

- - - - -


1 changed file:

- compiler/GHC/CmmToAsm/RV64/Ppr.hs


Changes:

=====================================
compiler/GHC/CmmToAsm/RV64/Ppr.hs
=====================================
@@ -692,9 +692,9 @@ pprInstr platform instr = case instr of
                   line (pprOp platform o1 <> text "->" <> pprOp platform o2)
 
   FCVTZS o1@(OpReg W32 _) o2@(OpReg W32 _) -> op2 (text "\tfcvt.w.s") o1 o2
-  FCVTZS o1@(OpReg W32 _) o2@(OpReg W64 _) -> op2 (text "\tfcvt.w.s") o1 o2
+  FCVTZS o1@(OpReg W32 _) o2@(OpReg W64 _) -> op2 (text "\tfcvt.w.d") o1 o2
   FCVTZS o1@(OpReg W64 _) o2@(OpReg W32 _) -> op2 (text "\tfcvt.l.s") o1 o2
-  FCVTZS o1@(OpReg W64 _) o2@(OpReg W64 _) -> op2 (text "\tfcvt.l.s") o1 o2
+  FCVTZS o1@(OpReg W64 _) o2@(OpReg W64 _) -> op2 (text "\tfcvt.l.d") o1 o2
   FCVTZS o1 o2 -> pprPanic "RV64.pprInstr - impossible float to integer conversion" $
                   line (pprOp platform o1 <> text "->" <> pprOp platform o2)
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/15809ebaa682fce112d9f09f61cbf615838186fa

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/15809ebaa682fce112d9f09f61cbf615838186fa
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20231103/f2a2aba3/attachment-0001.html>


More information about the ghc-commits mailing list