Browse Source

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>
master
Philippe Mathieu-Daudé 2 months ago
parent
commit
2dc8c9cf72
  1. 7
      include/qemu/target-info.h
  2. 5
      target-info.c

7
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

5
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;
}

Loading…
Cancel
Save