qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 3/4] linux-user, m68k: select CPU according to EL


From: Laurent Vivier
Subject: [Qemu-devel] [PATCH v2 3/4] linux-user, m68k: select CPU according to ELF header values
Date: Tue, 16 Jan 2018 18:25:09 +0100

M680x0 doesn't support the same set of instructions
as ColdFire, so we can't use "any" CPU type to execute
m68020 instructions.
We select CPU type ("m68020" or "any" for ColdFire)
according to the ELF header. If we can't, we
use by default the value used until now: "any".

Signed-off-by: Laurent Vivier <address@hidden>
---

Notes:
    v2: call cpu_get_model() with the result of get_elf_eflags()

 linux-user/m68k/target_elf.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/linux-user/m68k/target_elf.h b/linux-user/m68k/target_elf.h
index df375ad5d3..946b90f342 100644
--- a/linux-user/m68k/target_elf.h
+++ b/linux-user/m68k/target_elf.h
@@ -9,6 +9,12 @@
 #define M68K_TARGET_ELF_H
 static inline const char *cpu_get_model(uint32_t eflags)
 {
+    if (eflags == 0) {
+        /* 680x0 */
+        return "m68020";
+    }
+
+    /* Coldfire */
     return "any";
 }
 #endif
-- 
2.14.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]