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

sujiaxun sujiaxun@uniontech.com
Mon Apr 26 10:28:40 CEST 2021



在 2021/4/26 下午4:12, Viresh Kumar 写道:
> On 26-04-21, 15:53, sujiaxun wrote:
>>
>>
>> On 2021/4/26 下午3:03, Viresh Kumar wrote:
>>> 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.
>>>
>> I resubmitted a patch and changed "__arch64__" to "#if __BITS_PER_LONG ==
>> 64", the link is: https://patchwork.ozlabs.org/project/ltp/patch/20210426074812.27798-1-sujiaxun@uniontech.com
> 
> You should have cc'd me directly :(
> 
> I don't have that patch in my inbox..
> 
> Though the patch looks fine.
> 
Sorry, what should I do now?




More information about the ltp mailing list