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 */
*/
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:
*
static const TargetInfo target_info_stub = {
.target_name = TARGET_NAME,
+ .long_bits = TARGET_LONG_BITS,
.cpu_type = CPU_RESOLVING_TYPE,
.machine_typename = TYPE_MACHINE,
};
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;