Add new mbmi and mbmi2 compiler flags
authorJohn Ky <newhoggy@gmail.com>
Wed, 15 Nov 2017 16:35:42 +0000 (11:35 -0500)
committerBen Gamari <ben@smart-cactus.org>
Wed, 15 Nov 2017 16:37:00 +0000 (11:37 -0500)
commitf5dc8ccc29429d0a1d011f62b6b430f6ae50290c
tree3b3e3d9cf1a1276efd977523b5ea18fa65ecf812
parent47ad6578ea460999b53eb4293c3a3b3017a56d65
Add new mbmi and mbmi2 compiler flags

This adds support for the bit deposit and extraction operations provided
by the BMI and BMI2 instruction set extensions on modern amd64 machines.

Test Plan: Validate

Reviewers: austin, simonmar, bgamari, hvr, goldfire, erikd

Reviewed By: bgamari

Subscribers: goldfire, erikd, trommler, newhoggy, rwbarton, thomie

GHC Trac Issues: #14206

Differential Revision: https://phabricator.haskell.org/D4063
22 files changed:
compiler/cmm/CmmMachOp.hs
compiler/cmm/CmmParse.y
compiler/cmm/PprC.hs
compiler/codeGen/StgCmmPrim.hs
compiler/coreSyn/MkCore.hs
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
compiler/main/DynFlags.hs
compiler/nativeGen/CPrim.hs
compiler/nativeGen/PPC/CodeGen.hs
compiler/nativeGen/SPARC/CodeGen.hs
compiler/nativeGen/X86/CodeGen.hs
compiler/nativeGen/X86/Instr.hs
compiler/nativeGen/X86/Ppr.hs
compiler/prelude/primops.txt.pp
libraries/ghc-prim/cbits/pdep.c [new file with mode: 0644]
libraries/ghc-prim/cbits/pext.c [new file with mode: 0644]
libraries/ghc-prim/ghc-prim.cabal
testsuite/tests/codeGen/should_run/all.T
testsuite/tests/codeGen/should_run/cgrun075.hs [new file with mode: 0644]
testsuite/tests/codeGen/should_run/cgrun075.stdout [new file with mode: 0644]
testsuite/tests/codeGen/should_run/cgrun076.hs [new file with mode: 0644]
testsuite/tests/codeGen/should_run/cgrun076.stdout [new file with mode: 0644]