From nobody Wed Nov 19 00:12:41 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1613164675; cv=none; d=zohomail.com; s=zohoarc; b=Pzgosq6TXOYl6GeZHo0bTlizJDDtDRSS6u8kfdVCkTtraphho/Uap2Yxl1M0vCPH8poode6Gol14vxsYSz/4ZhcLJh7c3LUs5ZYLjgz5ACjkja5ZLKIRwqWiEjeZRd9XnEdb6XxTTTaWCT7suhLqvy0FMOs8NePJonO8W3AYSHI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613164675; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=M0IMzFq5k9lKxO1IVLKwTOyLyJzdkJCWCluWPUhDPVA=; b=NNbiE/bsYhe9N3ryigXFW/ozyqbexCqnvDnAHXcLORo3fz09yMQiom2IlMDeUyoxNp+pqlrOONrBg74oH0qykE8ox0HYz22c7Xs2l/Fkdv/6puYUK0pHjHFJZ3jPCwFzmOlzX/8MczxmQeSnjSyGd1vy8aAQHD8rO7OaNE7Hxp4= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1613164674752489.4515591609995; Fri, 12 Feb 2021 13:17:54 -0800 (PST) Received: from localhost ([::1]:36948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lAfp2-0003oq-Ku for importer@patchew.org; Fri, 12 Feb 2021 16:17:52 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41474) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAfmI-00020Q-Os for qemu-devel@nongnu.org; Fri, 12 Feb 2021 16:15:02 -0500 Received: from mout.kundenserver.de ([212.227.126.134]:58791) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lAfmG-0003UA-U1 for qemu-devel@nongnu.org; Fri, 12 Feb 2021 16:15:02 -0500 Received: from localhost.localdomain ([82.252.149.54]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MuUvS-1m0i681Sks-00rVmI; Fri, 12 Feb 2021 22:14:54 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 4/7] m68k: add missing BUSCR/PCR CR defines, and BUSCR/PCR/CAAR CR to m68k_move_to/from Date: Fri, 12 Feb 2021 22:14:45 +0100 Message-Id: <20210212211448.413489-5-laurent@vivier.eu> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210212211448.413489-1-laurent@vivier.eu> References: <20210212211448.413489-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:WeYo1MYK+l+qL5Uxbha8GIc3P6rgK/vz3MqsT/h0lyOGQGd0vrF ePcVt5vraZSf9Z6n48SDy/IzC6pehoBP3lmOQXOWluKOF55utRp4kC3t9epoBwevTv9aTNg lRrBKNhCPFfJYGlb1xbu8fevK9JB3k/c87BYS7NJL/gclH5CoSbGNnEAJBcehVmZgBCSsza NzViCV/3UUKQdnOs9pBKw== X-UI-Out-Filterresults: notjunk:1;V03:K0:sNQulsOmDZ4=:6UyNkTZ7BBOd1oyGJ19oDZ BggdxQ4d1z+mkerHF8P31T4laaaELaRYXglxxQctt5uJcwtXR1sYRz8HV8dtwkcRQ5Iz4Pjbb AjafWGkFHjgHQUyG8eEpItI1/cpoFy6v028Gs1NoUKbonw1QHs0PE7C9qLpQcF7meYFExytGs 23icg11wCFZRCpqPJJS63++NjptLOj9Upqnfi79Wxx4tTb0xh9ielpeoFDnK+cSXy19ztVv4Y w+MZmlk7Dzxt4P6lkouxm5Q0exMJwINm1pJNa+EwzWjFtpo/xxJQM9iSdbJCREJlO1X36pouR WKAgfa18PNsAOUf+r40wPQF4bGmOtSsPmUOvbUvM/D21UkIPL/zZ9NbI3/bD8KX52M60Xok0x irUSJq+yth4n6ABhBmUpEk2dx2Tdbj2tYquPOZrIP1dz2RTx/7OZwG10hfP9hYI7rKityfzTG jcZzj+1a4A== Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=212.227.126.134; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Lucien Murray-Pitts Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Lucien Murray-Pitts The BUSCR/PCR CR defines were missing for 68060, and the move_to/from helper functions were also missing a decode for the 68060 M68K_CR_CAAR CR register. Added missing defines, and respective decodes for all three CR registers to the helpers. Although this patch defines them, the implementation is empty in this patch and these registers will result in a cpu abort - which is the default prior to this patch. This patch aims to reach full coverage of all CR registers within the helpe= rs. Signed-off-by: Lucien Murray-Pitts Reviewed-by: Laurent Vivier Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <19e5c0fa8baed6479ed0502fd3deb132d19457fb.1612137712.git.balato= n@eik.bme.hu> Signed-off-by: Laurent Vivier --- target/m68k/cpu.h | 4 ++++ target/m68k/helper.c | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/target/m68k/cpu.h b/target/m68k/cpu.h index 2b1cdf241bab..ae34c9461503 100644 --- a/target/m68k/cpu.h +++ b/target/m68k/cpu.h @@ -393,6 +393,10 @@ typedef enum { #define M68K_CR_DACR0 0x006 #define M68K_CR_DACR1 0x007 =20 +/* MC68060 */ +#define M68K_CR_BUSCR 0x008 +#define M68K_CR_PCR 0x808 + #define M68K_FPIAR_SHIFT 0 #define M68K_FPIAR (1 << M68K_FPIAR_SHIFT) #define M68K_FPSR_SHIFT 1 diff --git a/target/m68k/helper.c b/target/m68k/helper.c index 9e81ee53ad8b..69acdc3b353c 100644 --- a/target/m68k/helper.c +++ b/target/m68k/helper.c @@ -255,6 +255,11 @@ void HELPER(m68k_movec_to)(CPUM68KState *env, uint32_t= reg, uint32_t val) case M68K_CR_DTT1: env->mmu.ttr[M68K_DTTR1] =3D val; return; + /* Unimplemented Registers */ + case M68K_CR_CAAR: + case M68K_CR_PCR: + case M68K_CR_BUSCR: + break; } cpu_abort(env_cpu(env), "Unimplemented control register write 0x%x =3D 0x%x\n", @@ -309,6 +314,11 @@ uint32_t HELPER(m68k_movec_from)(CPUM68KState *env, ui= nt32_t reg) /* MC68040/MC68LC040 */ case M68K_CR_DTT1: /* MC68EC040 only: M68K_CR_DACR1 */ return env->mmu.ttr[M68K_DTTR1]; + /* Unimplemented Registers */ + case M68K_CR_CAAR: + case M68K_CR_PCR: + case M68K_CR_BUSCR: + break; } cpu_abort(env_cpu(env), "Unimplemented control register read 0x%x\n", reg); --=20 2.29.2