From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebXoS-0003I4-Tn for qemu-devel@nongnu.org; Tue, 16 Jan 2018 15:26:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebXoO-00081l-6m for qemu-devel@nongnu.org; Tue, 16 Jan 2018 15:26:28 -0500 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]:34008) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ebXoO-00080l-0N for qemu-devel@nongnu.org; Tue, 16 Jan 2018 15:26:24 -0500 Received: by mail-pf0-x241.google.com with SMTP id e76so10288453pfk.1 for ; Tue, 16 Jan 2018 12:26:23 -0800 (PST) References: <20180116172510.28878-1-laurent@vivier.eu> <20180116172510.28878-5-laurent@vivier.eu> From: Richard Henderson Message-ID: Date: Tue, 16 Jan 2018 12:26:19 -0800 MIME-Version: 1.0 In-Reply-To: <20180116172510.28878-5-laurent@vivier.eu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 4/4] linux-user: MIPS set cpu to r6 CPU if binary is R6 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laurent Vivier , qemu-devel@nongnu.org Cc: YunQiang Su , =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= , Peter Maydell , Riku Voipio , Aaron Sierra On 01/16/2018 09:25 AM, Laurent Vivier wrote: > From: YunQiang Su > > So here we need to detect the version of binaries and set > cpu_model for it. > > [lv: original patch modified to move code into cpu_get_model()] > Signed-off-by: Laurent Vivier > --- Reviewed-by: Richard Henderson > static inline const char *cpu_get_model(uint32_t eflags) > { > + if ((eflags & EF_MIPS_ARCH_32R6) != 0) { > + return "mips32r6-generic"; > + } > return "24Kf"; That said, I don't suppose it's worth diagnosing cases that we can't support somehow? E.g. mips-linux-user and EF_MIPS_ARCH_64. Or even coldfire ISA-C. r~