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:
parent
9f5791334e
commit
cc08d4d1c3
2 changed files with 12 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue