Fix signed vs. unsigned math on ARM