Extract bit set manipulation from psa.w