aboutsummaryrefslogtreecommitdiff
path: root/linux-user/mips/target_elf.h
diff options
context:
space:
mode:
authorYunQiang Su <syq@debian.org>2018-02-20 18:33:07 +0100
committerLaurent Vivier <laurent@vivier.eu>2018-02-25 17:29:45 +0100
commit45506bddba6fe73f61cf15fb682ffff73ce156c0 (patch)
treebf2bbf59bb6d98715f1a04e8b52d053a270cf8cd /linux-user/mips/target_elf.h
parent33dff5ff909c54c6545aa818419caf8802156d55 (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/mips/target_elf.h')
-rw-r--r--linux-user/mips/target_elf.h3
1 files changed, 3 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