623d7e3551
Move the code from tcg/. Fix a bug in that PPC_FEATURE2_ARCH_3_10 is actually spelled PPC_FEATURE2_ARCH_3_1. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
30 lines
810 B
C
30 lines
810 B
C
/*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
* Host specific cpu indentification for ppc.
|
|
*/
|
|
|
|
#ifndef HOST_CPUINFO_H
|
|
#define HOST_CPUINFO_H
|
|
|
|
/* Digested version of <cpuid.h> */
|
|
|
|
#define CPUINFO_ALWAYS (1u << 0) /* so cpuinfo is nonzero */
|
|
#define CPUINFO_V2_06 (1u << 1)
|
|
#define CPUINFO_V2_07 (1u << 2)
|
|
#define CPUINFO_V3_0 (1u << 3)
|
|
#define CPUINFO_V3_1 (1u << 4)
|
|
#define CPUINFO_ISEL (1u << 5)
|
|
#define CPUINFO_ALTIVEC (1u << 6)
|
|
#define CPUINFO_VSX (1u << 7)
|
|
|
|
/* Initialized with a constructor. */
|
|
extern unsigned cpuinfo;
|
|
|
|
/*
|
|
* We cannot rely on constructor ordering, so other constructors must
|
|
* use the function interface rather than the variable above.
|
|
*/
|
|
unsigned cpuinfo_init(void);
|
|
|
|
#endif /* HOST_CPUINFO_H */
|