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

Close

#181 add support for TBM instructions

open
nobody
None
5
2010-11-04
2010-11-04
nasm64developer
No

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

#BEXTR dest, src, cntl - Bit Field Extract (imm): extract src[S+L-1:S] to dest, where L=cntl[15:8] and S=cntl[7:0]
BEXTR reg32, reg/mem32, imm32 8F RXB.0A 0.1111.0.00 10 /r /id
BEXTR reg64, reg/mem64, imm32 8F RXB.0A 1.1111.0.00 10 /r /id

#BLCFILL dest, src - Fill from Lowest Clear Bit (X&(X+1)): clear dest[L:0], where L is LSB in src
BLCFILL reg32, reg/mem32 8F RXB.09 0.dest.0.00 01 /1
BLCFILL reg64, reg/mem64 8F RXB.09 1.dest.0.00 01 /1

#BLCI dest, src - Isolate Lowest Clear Bit (X|~(X+1)): set all bits in dest, except LS zero bit from src
BLCI reg32, reg/mem32 8F RXB.09 0.dest.0.00 02 /6
BLCI reg64, reg/mem64 8F RXB.09 1.dest.0.00 02 /6

#BLCIC dest, src - Isolate Lowest Clear Bit and Complement (~X&(X+1)): set dest[L] to one, where L is LS zero bit from src
BLCIC reg32, reg/mem32 8F RXB.09 0.dest.0.00 01 /5
BLCIC reg64, reg/mem64 8F RXB.09 1.dest.0.00 01 /5

#BLCMSK dest, src - Mask From Lowest Clear Bit (X^(X+1)): set dest[L:0] to one, where L is LS zero bit from src
BLCMSK reg32, reg/mem32 8F RXB.09 0.dest.0.00 02 /1
BLCMSK reg64, reg/mem64 8F RXB.09 1.dest.0.00 02 /1

#BLCS dest, src - Set Lowest Clear Bit (X|(X+1)): copy src to dest and set dest[L] bit, where L is LS zero bit from src
BLCS reg32, reg/mem32 8F RXB.09 0.dest.0.00 01 /3
BLCS reg64, reg/mem64 8F RXB.09 1.dest.0.00 01 /3

#BLSFILL dest, src - Fill From Lowest Set Bit (X|(X-1)): set dest[L:0] to one, where L is LSB from src
BLSFILL reg32, reg/mem32 8F RXB.09 0.dest.0.00 01 /2
BLSFILL reg64, reg/mem64 8F RXB.09 1.dest.0.00 01 /2

#BLSIC dest, src - Isolate Lowest Set Bit and Complement (~X|(X-1)): set all bits and clear dest[L], where L is LSB from src
BLSIC reg32, reg/mem32 8F RXB.09 0.dest.0.00 01 /6
BLSIC reg64, reg/mem64 8F RXB.09 1.dest.0.00 01 /6

#T1MSKC dest, src - Inverse Mask from Trailing Ones (~X|(X+1)): set dest[:L] to one (including L), where L is LS zero from src
T1MSKC reg32, reg/mem32 8F RXB.09 0.dest.0.00 01 /7
T1MSKC reg64, reg/mem64 8F RXB.09 1.dest.0.00 01 /7

#TZMSK dest, src - Mask From Trailing Zeros (~X&(X+1)): clear dest[L:0] (including L), where L is LSB from src
TZMSK reg32, reg/mem32 8F RXB.09 0.dest.0.00 01 /4
TZMSK reg64, reg/mem64 8F RXB.09 1.dest.0.00 01 /4

Discussion