[LTP] [PATCH] Fix the 64-bit macro definition of mips architecture

Viresh Kumar viresh.kumar@linaro.org
Mon Apr 26 09:03:20 CEST 2021


On 26-04-21, 15:00, sujiaxun wrote:
> uos@uos-PC:~$ echo |gcc -dM -E - | grep -i arch
> #define _MIPS_ARCH "mips64r2"
> #define _MIPS_ARCH_MIPS64R2 1
> uos@uos-PC:~$ echo |gcc -dM -E - | grep -i mips64
> #define _MIPS_ISA _MIPS_ISA_MIPS64
> #define _MIPS_TUNE "mips64r2"
> #define _MIPS_TUNE_MIPS64R2 1
> #define _MIPS_ARCH "mips64r2"
> #define _MIPS_ARCH_MIPS64R2 1
> #define __mips64 1
> uos@uos-PC:~$ uname  -m
> mips64
> 
> The mips architecture gcc has no built-in __arch64__, only __mips64
> definitions. Of course, "__BITS_PER_LONG == 64" can also be used, but I
> think it is better to use __mips64 in the mips architecture.

Hmm, I will rather try to do what the kernel source code does, i.e.
use __BITS_PER_LONG here instead.

-- 
viresh


More information about the ltp mailing list