diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2025-04-29 20:18:03 +0200 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2025-04-30 12:51:51 -0700 |
commit | b113dfa081a6a7e061551a70e6ede7af0941a845 (patch) | |
tree | 1398a750b534b329320256532be352b9877a79d3 | |
parent | 28502121be7b1422af55bbed6f65a273b889ef01 (diff) | |
download | qemu-b113dfa081a6a7e061551a70e6ede7af0941a845.zip qemu-b113dfa081a6a7e061551a70e6ede7af0941a845.tar.gz qemu-b113dfa081a6a7e061551a70e6ede7af0941a845.tar.bz2 |
qemu/target_info: Add %target_cpu_type field to TargetInfo
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-rw-r--r-- | include/qemu/target-info-impl.h | 2 | ||||
-rw-r--r-- | target-info-stub.c | 6 | ||||
-rw-r--r-- | target-info.c | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/include/qemu/target-info-impl.h b/include/qemu/target-info-impl.h index d0e8c86..76766ee 100644 --- a/include/qemu/target-info-impl.h +++ b/include/qemu/target-info-impl.h @@ -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; diff --git a/target-info-stub.c b/target-info-stub.c index bcf834f..86da297 100644 --- a/target-info-stub.c +++ b/target-info-stub.c @@ -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; -} diff --git a/target-info.c b/target-info.c index 0042769..5f5ef1f 100644 --- a/target-info.c +++ b/target-info.c @@ -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; |