diff --git a/include/qemu/target-info.h b/include/qemu/target-info.h index 984fba3f42..e8fbdf19d5 100644 --- a/include/qemu/target-info.h +++ b/include/qemu/target-info.h @@ -57,4 +57,11 @@ bool target_big_endian(void); */ bool target_arm(void); +/** + * target_aarch64: + * + * Returns whether the target architecture is Aarch64. + */ +bool target_aarch64(void); + #endif diff --git a/target-info.c b/target-info.c index 40716bf405..e567cb4c40 100644 --- a/target-info.c +++ b/target-info.c @@ -57,3 +57,8 @@ bool target_arm(void) { return target_arch() == SYS_EMU_TARGET_ARM; } + +bool target_aarch64(void) +{ + return target_arch() == SYS_EMU_TARGET_AARCH64; +}