Perhaps someone who has experience with the use of PEXT for bitboard move generation can help me with this:
How does the PEXT instruction behave if the mask has no set bits at all? Does it produce a zero result?
I run into this issue when preparing tables for generation of diagonal (as opposed to anti-diagonal) rides. E.g. on an 8x8 board the diagonal f1-h3 has only 3 squares, and a piece on g2 would only have unblockable leaps to f1 and h3. So the mask for this square would be zero. Would it cause any problems to treat that square the same as the others in a PEXT implementation? (With a 'table' of attacks bitboards containing only a single element, with moves to f1 and h3.)
PEXT question
Moderator: Ras
-
hgm
- Posts: 28461
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
-
RubiChess
- Posts: 660
- Joined: Fri Mar 30, 2018 7:20 am
- Full name: Andreas Matthies
Re: PEXT question
-
hgm
- Posts: 28461
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: PEXT question
Thanks! So nothing to worry about. 