Refactor the guards so that we use the same code on ARM as everywhere else, just with different types.