Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#180 add support for BMI instructions

closed-fixed
nobody
None
1
2011-09-06
2010-11-04
nasm64developer
No

http://gcc.gnu.org/ml/gcc-patches/2010-10/msg01766.html

#ANDN dest, src1, src2 - Logical And-Not: bitwise and of src2 with one's complement of src1 into dest
ANDN reg32, reg32, reg/mem32 C4 RXB.02 0.src1.0.00 F2 /r
ANDN reg64, reg64, reg/mem64 C4 RXB.02 1.src1.0.00 F2 /r

#BEXTR dest, src, cntl - Bit Field Extract: extract src[S+L-1:S] to dest, where L=cntl[15:8] and S=cntl[7:0]
BEXTR reg32, reg/mem32, reg32 C4 RXB.02 0.cntl.0.00 F7 /r
BEXTR reg64, reg/mem64, reg64 C4 RXB.02 1.cntl.0.00 F7 /r

#BLSI dest, src - Isolate Lowest Set Bit (X & -X): extract LSB set to 1 from src to dest
BLSI reg32, reg/mem32 C4 RXB.02 0.dest.0.00 F3 /3
BLSI reg64, reg/mem64 C4 RXB.02 1.dest.0.00 F3 /3

#BLSMSK dest, src - Mask From Lowest Set Bit (X^(X-1)): write mask of 1s in dest[L:0] to dest, where L is LSB in src
BLSMSK reg32, reg/mem32 C4 RXB.02 0.dest.0.00 F3 /2
BLSMSK reg64, reg/mem64 C4 RXB.02 1.dest.0.00 F3 /2

#BLSR dest, src - Reset Lowest Set Bit (X&(X-1)): clear LSB in src and write to dest
BLSR reg32, reg/mem32 C4 RXB.02 0.dest.0.00 F3 /1
BLSR reg64, reg/mem64 C4 RXB.02 1.dest.0.00 F3 /1

#note that LZCNT is an ABM instruction, it's listed here for completeness
#LZNT dest, src - Count Leading Zeros : Count number of leading zeros in src
#LZCNT reg16, reg/mem16 F3 0F BD /r
#LZCNT reg32, reg/mem32 F3 0F BD /r
#LZCNT reg64, reg/mem64 F3 0F BD /r

#TZNT dest, src - Count Trailing Zeros: Count number of trailing zeros in src
TZCNT reg16, reg/mem16 F3 0F BC /r
TZCNT reg32, reg/mem32 F3 0F BC /r
TZCNT reg64, reg/mem64 F3 0F BC /r

Discussion

    • status: open --> closed
     
    • priority: 5 --> 1
    • status: closed --> closed-fixed