New bit test and set primop?
FetchOrAddrOp_Word primop performs atomic multi-bit
OR via a compare-and-swap loop using
AMO_Or. But in the special case that only one bit is to be set in the target, on Intel hardware the
BTS (bit test and test) instruction can perform the operation in a single deterministic step.
It would be useful to have a primop that exposes the BTS operation for setting a given bit in a target Word. One use-case is Bloom filter implementations, but there are surely others.