mirror of
https://gitlab.com/qemu-project/qemu.git
synced 2026-10-28 14:04:39 +08:00
linux-user/mips: pick Loongson-3A4000 if a pre-r6 mips64 binary needs nan2008
Before this patch, we'd pick MIPS64R2-generic which does not have 2008 mode, so the binary would just fail to run without an explicit -cpu flag. Now it'll just work as in the pre-r6 mips32 case. Signed-off-by: Alex Rønne Petersen <alex@alexrp.com> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
1 parent
524732d7df
commit
8e021b85cc
1 file changed
+8
-6
@@ -20,17 +20,19 @@ const char *get_elf_cpu_model(uint32_t eflags)
|
||||
case EF_MIPS_MACH_LS2F:
|
||||
return "Loongson-2F";
|
||||
case EF_MIPS_MACH_LS3A:
|
||||
return "Loongson-3A1000";
|
||||
return (eflags & EF_MIPS_NAN2008) ? "Loongson-3A4000"
|
||||
: "Loongson-3A1000";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
switch (eflags & EF_MIPS_ARCH) {
|
||||
case EF_MIPS_ARCH_64R6:
|
||||
if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R6) {
|
||||
return "I6400";
|
||||
case EF_MIPS_ARCH_64R2:
|
||||
}
|
||||
if (eflags & EF_MIPS_NAN2008) {
|
||||
return "Loongson-3A4000";
|
||||
}
|
||||
if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R2) {
|
||||
return "MIPS64R2-generic";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return "5KEf";
|
||||
#else
|
||||
|
||||
Reference in new issue
Block a user