Add arbitrary mask for nxm-reg