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/mips/target_elf.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'linux-user/mips') diff --git a/linux-user/mips/target_elf.h b/linux-user/mips/target_elf.h index bed0b43..fa5d30b 100644 --- a/linux-user/mips/target_elf.h +++ b/linux-user/mips/target_elf.h @@ -9,6 +9,9 @@ #define MIPS_TARGET_ELF_H static inline const char *cpu_get_model(uint32_t eflags) { + if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_32R6) { + return "mips32r6-generic"; + } return "24Kf"; } #endif -- cgit v1.1