mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-25 19:33:54 -06:00
qemu: Introduce target_long_bits()
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
b113dfa081
commit
c1be135ad5
4 changed files with 15 additions and 0 deletions
|
@ -14,6 +14,8 @@
|
|||
typedef struct TargetInfo {
|
||||
/* runtime equivalent of TARGET_NAME definition */
|
||||
const char *target_name;
|
||||
/* runtime equivalent of TARGET_LONG_BITS definition */
|
||||
unsigned long_bits;
|
||||
/* runtime equivalent of CPU_RESOLVING_TYPE definition */
|
||||
const char *cpu_type;
|
||||
/* QOM typename machines for this binary must implement */
|
||||
|
|
|
@ -16,6 +16,13 @@
|
|||
*/
|
||||
const char *target_name(void);
|
||||
|
||||
/**
|
||||
* target_long_bits:
|
||||
*
|
||||
* Returns: number of bits in a long type for this target (i.e. 64).
|
||||
*/
|
||||
unsigned target_long_bits(void);
|
||||
|
||||
/**
|
||||
* target_machine_typename:
|
||||
*
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
|
||||
static const TargetInfo target_info_stub = {
|
||||
.target_name = TARGET_NAME,
|
||||
.long_bits = TARGET_LONG_BITS,
|
||||
.cpu_type = CPU_RESOLVING_TYPE,
|
||||
.machine_typename = TYPE_MACHINE,
|
||||
};
|
||||
|
|
|
@ -15,6 +15,11 @@ const char *target_name(void)
|
|||
return target_info()->target_name;
|
||||
}
|
||||
|
||||
unsigned target_long_bits(void)
|
||||
{
|
||||
return target_info()->long_bits;
|
||||
}
|
||||
|
||||
const char *target_cpu_type(void)
|
||||
{
|
||||
return target_info()->cpu_type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue