[commit: ghc] master: implement missing Fabs{32, 64} on i386 NCG and UNREG (46246a6)
git at git.haskell.org
git at git.haskell.org
Fri Mar 10 09:56:47 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/46246a6d57c35ebf12032d13a4cd7ff18f713770/ghc
>---------------------------------------------------------------
commit 46246a6d57c35ebf12032d13a4cd7ff18f713770
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date: Fri Mar 10 09:30:10 2017 +0000
implement missing Fabs{32,64} on i386 NCG and UNREG
Noticed breakage as build failure on i386 freebsd build bot:
http://haskell.inf.elte.hu/builders/freebsd-i386-head/1267/10.html
ghc-stage1: panic! (the 'impossible' happened)
(GHC version 8.1.20170310 for i386-portbld-freebsd):
outOfLineCmmOp: MO_F64_Fabs not supported here
Signed-off-by: Sergei Trofimovich <slyfox at gentoo.org>
>---------------------------------------------------------------
46246a6d57c35ebf12032d13a4cd7ff18f713770
compiler/cmm/PprC.hs | 4 ++--
compiler/nativeGen/X86/CodeGen.hs | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
index 6a84e30..aa21174 100644
--- a/compiler/cmm/PprC.hs
+++ b/compiler/cmm/PprC.hs
@@ -754,7 +754,7 @@ pprCallishMachOp_for_C mop
MO_F64_Log -> text "log"
MO_F64_Exp -> text "exp"
MO_F64_Sqrt -> text "sqrt"
- MO_F64_Fabs -> unsupported
+ MO_F64_Fabs -> text "fabs"
MO_F32_Pwr -> text "powf"
MO_F32_Sin -> text "sinf"
MO_F32_Cos -> text "cosf"
@@ -768,7 +768,7 @@ pprCallishMachOp_for_C mop
MO_F32_Log -> text "logf"
MO_F32_Exp -> text "expf"
MO_F32_Sqrt -> text "sqrtf"
- MO_F32_Fabs -> unsupported
+ MO_F32_Fabs -> text "fabsf"
MO_WriteBarrier -> text "write_barrier"
MO_Memcpy _ -> text "memcpy"
MO_Memset _ -> text "memset"
diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs
index 704514e..562303c 100644
--- a/compiler/nativeGen/X86/CodeGen.hs
+++ b/compiler/nativeGen/X86/CodeGen.hs
@@ -2623,7 +2623,7 @@ outOfLineCmmOp mop res args
fn = case mop of
MO_F32_Sqrt -> fsLit "sqrtf"
- MO_F32_Fabs -> unsupported
+ MO_F32_Fabs -> fsLit "fabsf"
MO_F32_Sin -> fsLit "sinf"
MO_F32_Cos -> fsLit "cosf"
MO_F32_Tan -> fsLit "tanf"
@@ -2640,7 +2640,7 @@ outOfLineCmmOp mop res args
MO_F32_Pwr -> fsLit "powf"
MO_F64_Sqrt -> fsLit "sqrt"
- MO_F64_Fabs -> unsupported
+ MO_F64_Fabs -> fsLit "fabs"
MO_F64_Sin -> fsLit "sin"
MO_F64_Cos -> fsLit "cos"
MO_F64_Tan -> fsLit "tan"
More information about the ghc-commits
mailing list