aboutsummaryrefslogtreecommitdiff
path: root/linux-user
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
parent33dff5ff909c54c6545aa818419caf8802156d55 (diff)
downloadqemu-45506bddba6fe73f61cf15fb682ffff73ce156c0.zip
qemu-45506bddba6fe73f61cf15fb682ffff73ce156c0.tar.gz
qemu-45506bddba6fe73f61cf15fb682ffff73ce156c0.tar.bz2
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.h3
-rw-r--r--linux-user/mips64/target_elf.h3
2 files changed, 6 insertions, 0 deletions
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
diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h
index 5b6f469..ec55d85 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