diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2017-04-28 14:24:53 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-04-28 14:25:32 -0400 |
commit | 9ac22183e405773ea7147728e593edd78f30a025 (patch) | |
tree | 1245d521e9ea2929244e64aee740772bfcf2d9dd /compiler/nativeGen/X86/Instr.hs | |
parent | 9f9b90f1fb85fef568f535664f55c4674603e65b (diff) | |
download | haskell-9ac22183e405773ea7147728e593edd78f30a025.tar.gz |
nativeGen: Use SSE2 SQRT instruction
Reviewers: austin, dfeuer
Subscribers: dfeuer, rwbarton, thomie
GHC Trac Issues: #13629
Differential Revision: https://phabricator.haskell.org/D3508
Diffstat (limited to 'compiler/nativeGen/X86/Instr.hs')
-rw-r--r-- | compiler/nativeGen/X86/Instr.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/nativeGen/X86/Instr.hs b/compiler/nativeGen/X86/Instr.hs index f4ac55c34f..16e08f3a97 100644 --- a/compiler/nativeGen/X86/Instr.hs +++ b/compiler/nativeGen/X86/Instr.hs @@ -289,7 +289,7 @@ data Instr | CVTSI2SS Format Operand Reg -- I32/I64 to F32 | CVTSI2SD Format Operand Reg -- I32/I64 to F64 - -- use ADD & SUB for arithmetic. In both cases, operands + -- use ADD, SUB, and SQRT for arithmetic. In both cases, operands -- are Operand Reg. -- SSE2 floating-point division: @@ -447,6 +447,7 @@ x86_regUsageOfInstr platform instr CVTSI2SS _ src dst -> mkRU (use_R src []) [dst] CVTSI2SD _ src dst -> mkRU (use_R src []) [dst] FDIV _ src dst -> usageRM src dst + SQRT _ src dst -> mkRU (use_R src []) [dst] FETCHGOT reg -> mkRU [] [reg] FETCHPC reg -> mkRU [] [reg] @@ -617,6 +618,7 @@ x86_patchRegsOfInstr instr env CVTSI2SS fmt src dst -> CVTSI2SS fmt (patchOp src) (env dst) CVTSI2SD fmt src dst -> CVTSI2SD fmt (patchOp src) (env dst) FDIV fmt src dst -> FDIV fmt (patchOp src) (patchOp dst) + SQRT fmt src dst -> SQRT fmt (patchOp src) (env dst) CALL (Left _) _ -> instr CALL (Right reg) p -> CALL (Right (env reg)) p |