From patchwork Tue Dec 6 00:30:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 129479 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 81DDBB6F9F for ; Tue, 6 Dec 2011 11:32:12 +1100 (EST) Received: from localhost ([::1]:36030 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXix7-0005Td-AY for incoming@patchwork.ozlabs.org; Mon, 05 Dec 2011 19:32:09 -0500 Received: from eggs.gnu.org ([140.186.70.92]:53250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXiwr-0005JQ-K6 for qemu-devel@nongnu.org; Mon, 05 Dec 2011 19:31:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXiwq-0007gT-Cm for qemu-devel@nongnu.org; Mon, 05 Dec 2011 19:31:53 -0500 Received: from mout.web.de ([212.227.15.3]:56417) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXiwq-0007g7-0d for qemu-devel@nongnu.org; Mon, 05 Dec 2011 19:31:52 -0500 Received: from localhost.localdomain ([2.39.114.236]) by smtp.web.de (mrweb002) with ESMTPA (Nemesis) id 0M5woT-1Qa9HD13Jx-00xojG; Tue, 06 Dec 2011 01:31:50 +0100 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Tue, 6 Dec 2011 01:30:39 +0100 Message-Id: <1323131446-21864-3-git-send-email-andreas.faerber@web.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1323131446-21864-1-git-send-email-andreas.faerber@web.de> References: <1323131446-21864-1-git-send-email-andreas.faerber@web.de> MIME-Version: 1.0 X-Provags-ID: V02:K0:mnwV5688bsOiqS6/CuB4udXHo7813yzovBsxl62saJE D7ASjn1jAmoBssj+kwrbNAWstnytWNstrEpf8neOr2YM85VdqI cvAiKVFFI8FtrSjC/5rXJa7KltvVn8+DAVbNHK5QetkLnhF2XL GNsUWXMmLsk+eKLpKAIP5wNaGdN2zdxZHDS4p4YNzeZPRfl25E 0bh1TeiilNdTNgunGKpPw== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.227.15.3 Cc: Peter Maydell , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [Qemu-devel] [PATCH v3 2/9] target-arm: Infer ARMv5 feature from ARMv6 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org V6 => V5 Signed-off-by: Andreas Färber Cc: Peter Maydell --- target-arm/helper.c | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index 79d42f0..b8b6921 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -82,7 +82,6 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) * older core than plain "arm1136". In particular this does not * have the v6K features. */ - set_feature(env, ARM_FEATURE_V5); set_feature(env, ARM_FEATURE_V6); set_feature(env, ARM_FEATURE_VFP); set_feature(env, ARM_FEATURE_AUXCR); @@ -99,7 +98,6 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) env->cp15.c1_sys = 0x00050078; break; case ARM_CPUID_ARM1176: - set_feature(env, ARM_FEATURE_V5); set_feature(env, ARM_FEATURE_V6); set_feature(env, ARM_FEATURE_V6K); set_feature(env, ARM_FEATURE_VFP); @@ -114,7 +112,6 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) env->cp15.c1_sys = 0x00050078; break; case ARM_CPUID_ARM11MPCORE: - set_feature(env, ARM_FEATURE_V5); set_feature(env, ARM_FEATURE_V6); set_feature(env, ARM_FEATURE_V6K); set_feature(env, ARM_FEATURE_VFP); @@ -128,7 +125,6 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) env->cp15.c0_cachetype = 0x1dd20d2; break; case ARM_CPUID_CORTEXA8: - set_feature(env, ARM_FEATURE_V5); set_feature(env, ARM_FEATURE_V6); set_feature(env, ARM_FEATURE_V6K); set_feature(env, ARM_FEATURE_V7); @@ -151,7 +147,6 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) env->cp15.c1_sys = 0x00c50078; break; case ARM_CPUID_CORTEXA9: - set_feature(env, ARM_FEATURE_V5); set_feature(env, ARM_FEATURE_V6); set_feature(env, ARM_FEATURE_V6K); set_feature(env, ARM_FEATURE_V7); @@ -179,7 +174,6 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) env->cp15.c1_sys = 0x00c50078; break; case ARM_CPUID_CORTEXM3: - set_feature(env, ARM_FEATURE_V5); set_feature(env, ARM_FEATURE_V6); set_feature(env, ARM_FEATURE_THUMB2); set_feature(env, ARM_FEATURE_V7); @@ -187,7 +181,6 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) set_feature(env, ARM_FEATURE_THUMB_DIV); break; case ARM_CPUID_ANY: /* For userspace emulation. */ - set_feature(env, ARM_FEATURE_V5); set_feature(env, ARM_FEATURE_V6); set_feature(env, ARM_FEATURE_V6K); set_feature(env, ARM_FEATURE_V7); @@ -250,6 +243,9 @@ static void cpu_reset_model_id(CPUARMState *env, uint32_t id) if (arm_feature(env, ARM_FEATURE_V7)) { set_feature(env, ARM_FEATURE_VAPA); } + if (arm_feature(env, ARM_FEATURE_V6)) { + set_feature(env, ARM_FEATURE_V5); + } if (arm_feature(env, ARM_FEATURE_V5)) { set_feature(env, ARM_FEATURE_V4T); }