util: add ARCH_IS_MIPS helper macro

Identifies all of various MIPS sub-architectures: 32-bit or 64-bit,
little-endian or big-endian.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Lubomir Rintel 2022-02-01 15:33:53 +01:00 committed by Michal Privoznik
parent 2c0898ff4e
commit 395bbd61ea

View File

@ -95,6 +95,11 @@ typedef enum {
#define ARCH_IS_S390(arch) ((arch) == VIR_ARCH_S390 ||\
(arch) == VIR_ARCH_S390X)
#define ARCH_IS_MIPS(arch) ((arch) == VIR_ARCH_MIPS ||\
(arch) == VIR_ARCH_MIPSEL ||\
(arch) == VIR_ARCH_MIPS64 ||\
(arch) == VIR_ARCH_MIPS64EL)
#define ARCH_IS_MIPS64(arch) ((arch) == VIR_ARCH_MIPS64 ||\
(arch) == VIR_ARCH_MIPS64EL)