LoongArch: Use functions instead of magic numbers.