]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
qemu/target_info: Add target_aarch64() helper
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 4 Apr 2025 22:41:48 +0000 (00:41 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 30 Oct 2025 13:48:26 +0000 (14:48 +0100)
Add a helper to distinct whether the binary is targetting
Aarch64 or not.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Acked-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20251021210144.58108-2-philmd@linaro.org>

include/qemu/target-info.h
target-info.c

index 984fba3f42d0c8df7bbd67c0a0d031d7640714b8..e8fbdf19d5312c2b2bbdb188b2accb9d67517a56 100644 (file)
@@ -57,4 +57,11 @@ bool target_big_endian(void);
  */
 bool target_arm(void);
 
+/**
+ * target_aarch64:
+ *
+ * Returns whether the target architecture is Aarch64.
+ */
+bool target_aarch64(void);
+
 #endif
index 40716bf40513e3242f6c442ae8531f7a71dafa40..e567cb4c40aa4473cd8c18b7190de3bc0fe273b4 100644 (file)
@@ -57,3 +57,8 @@ bool target_arm(void)
 {
     return target_arch() == SYS_EMU_TARGET_ARM;
 }
+
+bool target_aarch64(void)
+{
+    return target_arch() == SYS_EMU_TARGET_AARCH64;
+}