diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2017-03-10 09:30:10 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2017-03-10 09:30:10 +0000 |
commit | 46246a6d57c35ebf12032d13a4cd7ff18f713770 (patch) | |
tree | 96512412c2d3e52853e43fd97d9ffa61cf28441f | |
parent | a6e06c7b6ac9d0eb54f09721dbac9b1bed4c8c32 (diff) | |
download | haskell-46246a6d57c35ebf12032d13a4cd7ff18f713770.tar.gz |
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@gentoo.org>
-rw-r--r-- | compiler/cmm/PprC.hs | 4 | ||||
-rw-r--r-- | 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 6a84e30abb..aa21174109 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 704514e324..562303cad8 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" |