mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
qemu/target_info: Add target_arm() helper
Add a helper to distinct whether the binary is targetting ARM (32-bit only) or not. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Acked-by: Peter Maydell <peter.maydell@linaro.org> Message-Id: <20251021210144.58108-1-philmd@linaro.org>
This commit is contained in:
@@ -50,4 +50,11 @@ const char *target_cpu_type(void);
|
||||
*/
|
||||
bool target_big_endian(void);
|
||||
|
||||
/**
|
||||
* target_arm:
|
||||
*
|
||||
* Returns whether the target architecture is ARM (32-bit, not Aarch64).
|
||||
*/
|
||||
bool target_arm(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -52,3 +52,8 @@ bool target_big_endian(void)
|
||||
{
|
||||
return target_endian_mode() == ENDIAN_MODE_BIG;
|
||||
}
|
||||
|
||||
bool target_arm(void)
|
||||
{
|
||||
return target_arch() == SYS_EMU_TARGET_ARM;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user