Commit 2dc8c9cf72 for qemu.org

commit 2dc8c9cf72fd6c255a5c466e300f63059ddcfd17
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date:   Fri Feb 13 14:50:36 2026 +0100

    qemu/target_info: Add target_s390x() helper

    Add a helper to distinct whether the binary is targetting
    S390x or not.

    Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
    Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
    Reviewed-by: Thomas Huth <thuth@redhat.com>
    Message-Id: <20260213175032.32121-3-philmd@linaro.org>

diff --git a/include/qemu/target-info.h b/include/qemu/target-info.h
index e328733430..23c997de54 100644
--- a/include/qemu/target-info.h
+++ b/include/qemu/target-info.h
@@ -92,4 +92,11 @@ bool target_ppc(void);
  */
 bool target_ppc64(void);

+/**
+ * target_s390x:
+ *
+ * Returns whether the target architecture is S390x.
+ */
+bool target_s390x(void);
+
 #endif
diff --git a/target-info.c b/target-info.c
index a26532f660..28c458fc7a 100644
--- a/target-info.c
+++ b/target-info.c
@@ -88,3 +88,8 @@ bool target_ppc64(void)
 {
     return target_arch() == SYS_EMU_TARGET_PPC64;
 }
+
+bool target_s390x(void)
+{
+    return target_arch() == SYS_EMU_TARGET_S390X;
+}