diff options
author | YunQiang Su <syq@debian.org> | 2018-02-20 18:33:07 +0100 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2018-02-25 17:29:45 +0100 |
commit | 45506bddba6fe73f61cf15fb682ffff73ce156c0 (patch) | |
tree | bf2bbf59bb6d98715f1a04e8b52d053a270cf8cd /linux-user | |
parent | 33dff5ff909c54c6545aa818419caf8802156d55 (diff) |
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 <syq@debian.org>
[lv: original patch modified to move code into cpu_get_model()]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20180220173307.25125-5-laurent@vivier.eu>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/mips/target_elf.h | 3 | ||||
-rw-r--r-- | linux-user/mips64/target_elf.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/linux-user/mips/target_elf.h b/linux-user/mips/target_elf.h index bed0b43259..fa5d30bf99 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 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 |