mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
qemu/target_info: Add %target_cpu_type field to TargetInfo
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
28502121be
commit
b113dfa081
3 changed files with 8 additions and 5 deletions
|
@ -14,6 +14,8 @@
|
||||||
typedef struct TargetInfo {
|
typedef struct TargetInfo {
|
||||||
/* runtime equivalent of TARGET_NAME definition */
|
/* runtime equivalent of TARGET_NAME definition */
|
||||||
const char *target_name;
|
const char *target_name;
|
||||||
|
/* runtime equivalent of CPU_RESOLVING_TYPE definition */
|
||||||
|
const char *cpu_type;
|
||||||
/* QOM typename machines for this binary must implement */
|
/* QOM typename machines for this binary must implement */
|
||||||
const char *machine_typename;
|
const char *machine_typename;
|
||||||
} TargetInfo;
|
} TargetInfo;
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
|
|
||||||
static const TargetInfo target_info_stub = {
|
static const TargetInfo target_info_stub = {
|
||||||
.target_name = TARGET_NAME,
|
.target_name = TARGET_NAME,
|
||||||
|
.cpu_type = CPU_RESOLVING_TYPE,
|
||||||
.machine_typename = TYPE_MACHINE,
|
.machine_typename = TYPE_MACHINE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -21,8 +22,3 @@ const TargetInfo *target_info(void)
|
||||||
{
|
{
|
||||||
return &target_info_stub;
|
return &target_info_stub;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *target_cpu_type(void)
|
|
||||||
{
|
|
||||||
return CPU_RESOLVING_TYPE;
|
|
||||||
}
|
|
||||||
|
|
|
@ -15,6 +15,11 @@ const char *target_name(void)
|
||||||
return target_info()->target_name;
|
return target_info()->target_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *target_cpu_type(void)
|
||||||
|
{
|
||||||
|
return target_info()->cpu_type;
|
||||||
|
}
|
||||||
|
|
||||||
const char *target_machine_typename(void)
|
const char *target_machine_typename(void)
|
||||||
{
|
{
|
||||||
return target_info()->machine_typename;
|
return target_info()->machine_typename;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue