mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
target-info: add target_base_ppc, target_ppc and target_ppc64
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20260131020100.1115203-2-pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
committed by
Philippe Mathieu-Daudé
parent
b377abc220
commit
f2ac221cc5
@@ -71,4 +71,25 @@ bool target_arm(void);
|
||||
*/
|
||||
bool target_aarch64(void);
|
||||
|
||||
/**
|
||||
* target_base_ppc:
|
||||
*
|
||||
* Returns whether the target architecture is PowerPC 32-bit or 64-bit.
|
||||
*/
|
||||
bool target_base_ppc(void);
|
||||
|
||||
/**
|
||||
* target_ppc:
|
||||
*
|
||||
* Returns whether the target architecture is PowerPC 32-bit.
|
||||
*/
|
||||
bool target_ppc(void);
|
||||
|
||||
/**
|
||||
* target_ppc64:
|
||||
*
|
||||
* Returns whether the target architecture is PowerPC 64-bit.
|
||||
*/
|
||||
bool target_ppc64(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -73,3 +73,24 @@ bool target_aarch64(void)
|
||||
{
|
||||
return target_arch() == SYS_EMU_TARGET_AARCH64;
|
||||
}
|
||||
|
||||
bool target_base_ppc(void)
|
||||
{
|
||||
switch (target_arch()) {
|
||||
case SYS_EMU_TARGET_PPC:
|
||||
case SYS_EMU_TARGET_PPC64:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool target_ppc(void)
|
||||
{
|
||||
return target_arch() == SYS_EMU_TARGET_PPC;
|
||||
}
|
||||
|
||||
bool target_ppc64(void)
|
||||
{
|
||||
return target_arch() == SYS_EMU_TARGET_PPC64;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user