master
h 109 lines 1.99 KB
Raw
1 /*
2 * QEMU target info API (returning native types)
3 *
4 * Copyright (c) Linaro
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
9 #ifndef QEMU_TARGET_INFO_H
10 #define QEMU_TARGET_INFO_H
11
12 /**
13 * target_name:
14 *
15 * Returns: Canonical target name (i.e. "i386").
16 */
17 const char *target_name(void);
18
19 /**
20 * target_long_bits:
21 *
22 * Returns: number of bits in a long type for this target (i.e. 64).
23 */
24 unsigned target_long_bits(void);
25
26 /**
27 * target_machine_typename:
28 *
29 * Returns: Name of the QOM interface implemented by machines
30 * usable on this target binary.
31 */
32 const char *target_machine_typename(void);
33
34 /**
35 * target_cpu_type:
36 *
37 * Returns: target CPU base QOM type name (i.e. TYPE_X86_CPU).
38 */
39 const char *target_cpu_type(void);
40
41 /**
42 * target_big_endian:
43 *
44 * Returns: %true if the (default) endianness of the target is big endian,
45 * %false otherwise.
46 *
47 * Common code should normally never need to know about the endianness of
48 * the target, so please do *not* use this function unless you know very
49 * well what you are doing!
50 */
51 bool target_big_endian(void);
52
53 /**
54 * target_base_arm:
55 *
56 * Returns whether the target architecture is ARM or Aarch64.
57 */
58 bool target_base_arm(void);
59
60 /**
61 * target_arm:
62 *
63 * Returns whether the target architecture is ARM (32-bit, not Aarch64).
64 */
65 bool target_arm(void);
66
67 /**
68 * target_aarch64:
69 *
70 * Returns whether the target architecture is Aarch64.
71 */
72 bool target_aarch64(void);
73
74 /**
75 * target_base_ppc:
76 *
77 * Returns whether the target architecture is PowerPC 32-bit or 64-bit.
78 */
79 bool target_base_ppc(void);
80
81 /**
82 * target_ppc:
83 *
84 * Returns whether the target architecture is PowerPC 32-bit.
85 */
86 bool target_ppc(void);
87
88 /**
89 * target_ppc64:
90 *
91 * Returns whether the target architecture is PowerPC 64-bit.
92 */
93 bool target_ppc64(void);
94
95 /**
96 * target_s390x:
97 *
98 * Returns whether the target architecture is S390x.
99 */
100 bool target_s390x(void);
101
102 /**
103 * target_riscv64:
104 *
105 * Returns whether the target architecture is riscv64
106 */
107 bool target_riscv64(void);
108
109 #endif