[PATCH-for-9.1 3/4] linux-user/mips: Select MIPS64R2-generic for Rel2 binaries

Philippe Mathieu-Daudé posted 4 patches 3 months, 1 week ago
[PATCH-for-9.1 3/4] linux-user/mips: Select MIPS64R2-generic for Rel2 binaries
Posted by Philippe Mathieu-Daudé 3 months, 1 week ago
Cc: YunQiang Su <syq@debian.org>
Reported-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 linux-user/mips64/target_elf.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h
index ce6fb6541e..a3a8b2e385 100644
--- a/linux-user/mips64/target_elf.h
+++ b/linux-user/mips64/target_elf.h
@@ -17,8 +17,13 @@ static inline const char *cpu_get_model(uint32_t eflags)
     default:
         break;
     }
-    if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R6) {
+    switch (eflags & EF_MIPS_ARCH) {
+    case EF_MIPS_ARCH_64R6:
         return "I6400";
+    case EF_MIPS_ARCH_64R2:
+        return "MIPS64R2-generic";
+    default:
+        break;
     }
     return "5KEf";
 }
-- 
2.45.2


Re: [PATCH-for-9.1 3/4] linux-user/mips: Select MIPS64R2-generic for Rel2 binaries
Posted by Richard Henderson 3 months, 1 week ago
On 8/14/24 23:39, Philippe Mathieu-Daudé wrote:
> Cc: YunQiang Su<syq@debian.org>
> Reported-by: Jiaxun Yang<jiaxun.yang@flygoat.com>
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
>   linux-user/mips64/target_elf.h | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~