diff mbox series

[v6,6/7] linux-user/mips: Recognise the R5900 CPU model

Message ID f76eac5d801c6d7149da4ef84cade5e1caa4792c.1538240994.git.noring@nocrew.org (mailing list archive)
State New, archived
Headers show
Series target/mips: Limited support for the R5900 | expand

Commit Message

Fredrik Noring Sept. 15, 2018, 9:08 a.m. UTC
This kind of ELF for the R5900 relies on an IEEE 754-1985 compliant FPU.
The R5900 FPU hardware is noncompliant and it is therefore emulated in
software by the Linux kernel. QEMU emulates a compliant FPU accordingly.

Signed-off-by: Fredrik Noring <noring@nocrew.org>
---
 linux-user/mips/target_elf.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Philippe Mathieu-Daudé Sept. 30, 2018, 3:10 p.m. UTC | #1
On 9/15/18 11:08 AM, Fredrik Noring wrote:
> This kind of ELF for the R5900 relies on an IEEE 754-1985 compliant FPU.
> The R5900 FPU hardware is noncompliant and it is therefore emulated in
> software by the Linux kernel. QEMU emulates a compliant FPU accordingly.
> 
> Signed-off-by: Fredrik Noring <noring@nocrew.org>

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

> ---
>  linux-user/mips/target_elf.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/linux-user/mips/target_elf.h b/linux-user/mips/target_elf.h
> index fa5d30bf99..a98c9bd6ad 100644
> --- a/linux-user/mips/target_elf.h
> +++ b/linux-user/mips/target_elf.h
> @@ -12,6 +12,9 @@ static inline const char *cpu_get_model(uint32_t eflags)
>      if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_32R6) {
>          return "mips32r6-generic";
>      }
> +    if ((eflags & EF_MIPS_MACH) == EF_MIPS_MACH_5900) {
> +        return "R5900";
> +    }
>      return "24Kf";
>  }
>  #endif
>
diff mbox series

Patch

diff --git a/linux-user/mips/target_elf.h b/linux-user/mips/target_elf.h
index fa5d30bf99..a98c9bd6ad 100644
--- a/linux-user/mips/target_elf.h
+++ b/linux-user/mips/target_elf.h
@@ -12,6 +12,9 @@  static inline const char *cpu_get_model(uint32_t eflags)
     if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_32R6) {
         return "mips32r6-generic";
     }
+    if ((eflags & EF_MIPS_MACH) == EF_MIPS_MACH_5900) {
+        return "R5900";
+    }
     return "24Kf";
 }
 #endif