From 45506bddba6fe73f61cf15fb682ffff73ce156c0 Mon Sep 17 00:00:00 2001 From: YunQiang Su Date: Tue, 20 Feb 2018 18:33:07 +0100 Subject: linux-user: MIPS set cpu to r6 CPU if binary is R6 So here we need to detect the version of binaries and set cpu_model for it. Signed-off-by: YunQiang Su [lv: original patch modified to move code into cpu_get_model()] Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20180220173307.25125-5-laurent@vivier.eu> --- linux-user/mips64/target_elf.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'linux-user/mips64/target_elf.h') diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h index 5b6f4692e0..ec55d8542a 100644 --- a/linux-user/mips64/target_elf.h +++ b/linux-user/mips64/target_elf.h @@ -9,6 +9,9 @@ #define MIPS64_TARGET_ELF_H static inline const char *cpu_get_model(uint32_t eflags) { + if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R6) { + return "I6400"; + } return "5KEf"; } #endif -- cgit v1.2.3-55-g7522