mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
target-info: Add target_riscv64()
Adds a helper function to tell if the binary is targeting riscv64 or not. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Anton Johansson <anjo@rev.ng> Reviewed-by: Chao Liu <chao.liu.zevorn@gmail.com> Acked-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Message-Id: <20260520-hw-riscv-cpu-int-v3-7-d1123ea63d9c@rev.ng> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
committed by
Philippe Mathieu-Daudé
parent
750d25fc66
commit
9067113cdf
@@ -99,4 +99,11 @@ bool target_ppc64(void);
|
||||
*/
|
||||
bool target_s390x(void);
|
||||
|
||||
/**
|
||||
* target_riscv64:
|
||||
*
|
||||
* Returns whether the target architecture is riscv64
|
||||
*/
|
||||
bool target_riscv64(void);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -93,3 +93,8 @@ bool target_s390x(void)
|
||||
{
|
||||
return target_arch() == SYS_EMU_TARGET_S390X;
|
||||
}
|
||||
|
||||
bool target_riscv64(void)
|
||||
{
|
||||
return target_arch() == SYS_EMU_TARGET_RISCV64;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user