Bit Manipulation Instructions Sets ( BMI ) are instruction set extensions for microprocessors from Intel and AMD .
There are several subsets of BMI: BMI1 and BMI2 from Intel, which were introduced with the Intel Haswell microarchitecture , and ABM and TBM from AMD. ABM (Advanced Bit Manipulation) contains instructions from Intel's SSE4.2 and BMI1, TBM (Trailing Bit Manipulation) is an extension of BMI1 that was introduced with the Piledriver architecture .
New instructions
ABM
BMI1
instruction
description
Expression in C
ANDN
AND NOT
~x & y
BEXTR
bit field extract
(src >> start) & ((1 << len)-1)
BLSI
x & -x
BLSMSK
x ^ (x - 1)
BLSR
x & (x - 1)
TZCNT
Number of trailing zeros
-
BMI2
TBM
instruction
Description (English)
Expression in C
BEXTR
Bit field extract (immediate control value)
(src >> start) & ((1 << len)-1)
BLCFILL
Fill from lowest clear bit
x & (x + 1)
BLCI
Isolate lowest clear bit
x | ~(x + 1)
BLCIC
Isolate lowest clear bit and complement
~x & (x + 1)
BLCMASK
Mask from lowest clear bit
x ^ (x + 1)
BLCS
Set lowest clear bit
x | (x + 1)
BLSFILL
Fill from lowest set bit
x | (x - 1)
BLSIC
Isolate lowest set bit and complement
~x | (x - 1)
T1MSKC
Inverse mask from trailing ones
~x | (x + 1)
TZMSK
Mask from trailing zeros
~x & (x - 1)
Individual evidence
↑ a b AMD64 Architecture Programmer's Manual, Volume 3: General-Purpose and System Instructions (PDF) In: amd.com . AMD . October 2013. Retrieved January 2, 2014.
↑ Intel Advanced Vector Extensions Programming Reference (PDF) In: intel.com . Intel . June 2011. Retrieved January 3, 2014.
↑ bmiintrin.h from GCC 4.8 . Retrieved March 17, 2014.
↑ Chess Programming BMI1 . Retrieved April 8, 2014.
^ A b Haswell Cryptographic Performance , July 2013
↑ tbmintrin.h from GCC 4.8 . Retrieved March 17, 2014.
<img src="//de.wikipedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" title="" width="1" height="1" style="border: none; position: absolute;">