[PATCH 1/3] util: add ARCH_IS_MIPS helper macro

Lubomir Rintel lkundrak at v3.sk
Tue Feb 1 14:33:53 UTC 2022


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

Signed-off-by: Lubomir Rintel <lkundrak at v3.sk>
---
 src/util/virarch.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/util/virarch.h b/src/util/virarch.h
index 528f84f8a5..81b1b27a57 100644
--- a/src/util/virarch.h
+++ b/src/util/virarch.h
@@ -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)
 
-- 
2.34.1




More information about the libvir-list mailing list