From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Vorel Date: Mon, 26 Apr 2021 15:09:21 +0200 Subject: [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture In-Reply-To: <20210426070320.iow3avu2pq22qled@vireshk-i7> References: <20210422072609.9938-1-sujiaxun@uniontech.com> <20210426055556.dmcogdykez2ddxn3@vireshk-i7> <20210426062357.i72js3urkoofvzcj@vireshk-i7> <20210426070320.iow3avu2pq22qled@vireshk-i7> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it > 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 Thanks for verification! > > 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. +1 Kind regards, Petr