helpers for register read-modify-write operations