]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
qemu/target_info: Add %target_cpu_type field to TargetInfo
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 29 Apr 2025 18:18:03 +0000 (20:18 +0200)
committerRichard Henderson <richard.henderson@linaro.org>
Wed, 30 Apr 2025 19:51:51 +0000 (12:51 -0700)
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
include/qemu/target-info-impl.h
target-info-stub.c
target-info.c

index d0e8c86176cd08d88718c3903fb6f2fbcb68b059..76766eeaae3987d7a8705e76814b76b25f4167c5 100644 (file)
@@ -14,6 +14,8 @@
 typedef struct TargetInfo {
     /* runtime equivalent of TARGET_NAME definition */
     const char *target_name;
+    /* runtime equivalent of CPU_RESOLVING_TYPE definition */
+    const char *cpu_type;
     /* QOM typename machines for this binary must implement */
     const char *machine_typename;
 } TargetInfo;
index bcf834f71d3ea44094e0746629f1fbbef4ad5ab1..86da297277c838bbe225c65edbf0c24156cd93d1 100644 (file)
@@ -14,6 +14,7 @@
 
 static const TargetInfo target_info_stub = {
     .target_name = TARGET_NAME,
+    .cpu_type = CPU_RESOLVING_TYPE,
     .machine_typename = TYPE_MACHINE,
 };
 
@@ -21,8 +22,3 @@ const TargetInfo *target_info(void)
 {
     return &target_info_stub;
 }
-
-const char *target_cpu_type(void)
-{
-    return CPU_RESOLVING_TYPE;
-}
index 0042769e3a2e1c4fc2e643d809fd79cfd9aae2c9..5f5ef1f93250631f2cdff326db0a16bd6d960393 100644 (file)
@@ -15,6 +15,11 @@ const char *target_name(void)
     return target_info()->target_name;
 }
 
+const char *target_cpu_type(void)
+{
+    return target_info()->cpu_type;
+}
+
 const char *target_machine_typename(void)
 {
     return target_info()->machine_typename;