diff options
author | Laurent Vivier | 2018-02-20 18:33:04 +0100 |
---|---|---|
committer | Laurent Vivier | 2018-02-25 17:27:41 +0100 |
commit | 542ca4349878a2ea3818aea5c448a6db567da3ae (patch) | |
tree | fb4408f35dce5576fe4e258db4535ab6f8653d1d /linux-user/ppc | |
parent | maintainers: Add myself as a OpenBSD maintainer (diff) | |
download | qemu-542ca4349878a2ea3818aea5c448a6db567da3ae.tar.gz qemu-542ca4349878a2ea3818aea5c448a6db567da3ae.tar.xz qemu-542ca4349878a2ea3818aea5c448a6db567da3ae.zip |
linux-user: Move CPU type name selection to a function
Instead of a sequence of "#if ... #endif" move the
selection to a function in linux-user/*/target_elf.h
We can't add them in linux-user/*/target_cpu.h
because we will need to include "elf.h" to
use ELF flags with eflags, and including
"elf.h" in "target_cpu.h" introduces some
conflicts in elfload.c
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180220173307.25125-2-laurent@vivier.eu>
Diffstat (limited to 'linux-user/ppc')
-rw-r--r-- | linux-user/ppc/target_elf.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/linux-user/ppc/target_elf.h b/linux-user/ppc/target_elf.h new file mode 100644 index 0000000000..576a5b9959 --- /dev/null +++ b/linux-user/ppc/target_elf.h @@ -0,0 +1,18 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation, or (at your option) any + * later version. See the COPYING file in the top-level directory. + */ + +#ifndef PPC_TARGET_ELF_H +#define PPC_TARGET_ELF_H +static inline const char *cpu_get_model(uint32_t eflags) +{ +#ifdef TARGET_PPC64 + return "POWER8"; +#else + return "750"; +#endif +} +#endif |