Support for writing to bitfields of arbitrary scalar type.  Tweak the code for
reading such bitfields while there.