avoid calling bitwise_cast on platform types in slide
don't return a reference in genmask