]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: add ARCH_IS_MIPS helper macro
authorLubomir Rintel <lkundrak@v3.sk>
Tue, 1 Feb 2022 14:33:53 +0000 (15:33 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 2 Feb 2022 09:07:15 +0000 (10:07 +0100)
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>
src/util/virarch.h

index 528f84f8a5fcebc34fc4ce808e8a0bbe68fdeca1..81b1b27a5799e736e1bf0118383b51208040f663 100644 (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)