Commit 794543a21b for qemu.org
commit 794543a21b7c62bdffa7d3b787569c954466b22a
Author: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Date: Wed Sep 30 02:01:05 2026 +0000
target-info: add target_or1k
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Link: https://lore.kernel.org/qemu-devel/20260930020108.217892-19-pierrick.bouvier@oss.qualcomm.com
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
diff --git a/include/qemu/target-info.h b/include/qemu/target-info.h
index c7b3fda3b2..adda363ac3 100644
--- a/include/qemu/target-info.h
+++ b/include/qemu/target-info.h
@@ -70,6 +70,13 @@ bool target_aarch64(void);
*/
bool target_m68k(void);
+/**
+ * target_or1k:
+ *
+ * Returns whether the target architecture is OpenRISC 1000.
+ */
+bool target_or1k(void);
+
/**
* target_base_ppc:
*
diff --git a/target-info.c b/target-info.c
index f3d98998eb..ab43c9f802 100644
--- a/target-info.c
+++ b/target-info.c
@@ -68,6 +68,11 @@ bool target_m68k(void)
return target_arch() == SYS_EMU_TARGET_M68K;
}
+bool target_or1k(void)
+{
+ return target_arch() == SYS_EMU_TARGET_OR1K;
+}
+
bool target_base_ppc(void)
{
switch (target_arch()) {