summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDmitry Ivanov <ethercrow@gmail.com>2018-12-08 16:45:02 +0100
committerBen Gamari <ben@smart-cactus.org>2019-01-30 10:06:31 -0500
commitc1d9416f2672b8d844141c0393fe773676749777 (patch)
tree30d388f8070e3316e40397293ce4150c24351536 /docs
parentcc2261d42f6a954d88e355aaad41f001f65c95da (diff)
downloadhaskell-c1d9416f2672b8d844141c0393fe773676749777.tar.gz
Compile count{Leading,Trailing}Zeros to corresponding x86_64 instructions under -mbmi2
This works similarly to existing implementation for popCount. Trac ticket: #16086.
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/using.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/users_guide/using.rst b/docs/users_guide/using.rst
index 420e2d3bfc..83eeb51eed 100644
--- a/docs/users_guide/using.rst
+++ b/docs/users_guide/using.rst
@@ -1088,6 +1088,16 @@ Some flags only make sense for particular target platforms.
SSE4.2 if your processor supports it but detects this automatically
so no flag is required.
+.. ghc-flag:: -mbmi2
+ :shortdesc: (x86 only) Use BMI2 for bit manipulation operations
+ :type: dynamic
+ :category: platform-options
+
+ (x86 only, added in GHC 7.4.1) Use the BMI2 instruction set to
+ implement some bit operations when using the
+ :ref:`native code generator <native-code-gen>`. The resulting compiled
+ code will only run on processors that support BMI2 (Intel Haswell and newer, AMD Excavator, Zen and newer).
+
Miscellaneous flags
-------------------