From patchwork Thu Sep 27 21:13:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 147741 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp2526900lji; Thu, 27 Sep 2018 14:40:15 -0700 (PDT) X-Google-Smtp-Source: ACcGV60oX1ekowsRt2CJB7CGcmHmvw66tHYl64A/10ijQLohHpXh8ZzzpNdGx4MOCRs/v2u54/yb X-Received: by 2002:a0c:d5aa:: with SMTP id g39-v6mr9868847qvi.176.1538084414842; Thu, 27 Sep 2018 14:40:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538084414; cv=none; d=google.com; s=arc-20160816; b=A/2SczaWBHlQuF1oCpEiy31U71mACeru5aLDyCj+fBGBJQxzTIYVheQG3GxziHoxlB 6gruJVqIQwBYNKLlGxmoLOi5uE5XXNjfo8+YqmU3ZySh7bSHHkVrDTXiUa26RqzKInbU u3hCpKbk5XSKj7uv+IUZ8uj1DqPik20jPF6Y1HI+pLINAgXlOI43dTFrbLjzhhHf+uMo vc8eMDfuLJYOBd3RVmY+bEhTzH6H055upPMls4Xvjoe+wCKwYhFbZZ1DctGTJ86wRvVE gJS2jw3uCQxSn5hG7EmQpw9YTxszpRsJWeesNKHorrLSRraH724e7Kpsrp5msgMrKbcE qZbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=5ZsYiXvYqPMOwtzKs1izA74eJT68haQXBetiywP0i7Y=; b=f78pRAAPFYDi9DH3w4sghdl7BUYioREQrh3c6tlr/3y+Ez++1AJBMxeFDp/drZe9w+ aZ4rnDmPgghNLibpONJbnrWHAeCJtKGzTFQEOgb62+YL/D3z5BkPk8TRIthf0wBbz2R6 73epouVkwjSLTeU3kRrAIfFa9Qfl1hWGTlYxeSpbvd9+/boEQlszNgPYh/hq/IfglIKJ LTH3yZ9laGEzTgu+aGeKGqwB6lkYBmuKQcvp3mAnLe9fI6XtPYYhCCYvvdtkor0yeE+Z W608E5P/cV1Kg9+qALZ7LNkjVXzaeNAJlDqS4qyOj0IFMWrPrjERPHnahbXJHseyCNLE LLOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PEWMavTQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id n6-v6si2135183qkh.285.2018.09.27.14.40.14 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 27 Sep 2018 14:40:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=PEWMavTQ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:39594 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5e18-0003ba-AW for patch@linaro.org; Thu, 27 Sep 2018 17:40:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53588) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5dpP-0002Hp-P0 for qemu-devel@nongnu.org; Thu, 27 Sep 2018 17:28:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5dbV-0000tr-N0 for qemu-devel@nongnu.org; Thu, 27 Sep 2018 17:13:49 -0400 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]:34776) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g5dbU-0000eW-CD for qemu-devel@nongnu.org; Thu, 27 Sep 2018 17:13:45 -0400 Received: by mail-pg1-x543.google.com with SMTP id d19-v6so2853557pgv.1 for ; Thu, 27 Sep 2018 14:13:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5ZsYiXvYqPMOwtzKs1izA74eJT68haQXBetiywP0i7Y=; b=PEWMavTQg1jOBST4glbATo04ZyauBQWRiYttsBU3JcFht+HeT9CdZMXdziWffo/SVu zNusUY1I0WeZ6pSefwhOCTqtbuVaeZR75mp5v0z7JfotDVj6l65akjIzRRFWCq1xsLjT Datb4qlc4MO1DbBdYTjMX8M7kfVddAzdIS86w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=5ZsYiXvYqPMOwtzKs1izA74eJT68haQXBetiywP0i7Y=; b=p5fKm5BB1lLl2cI0iuTa+kL/dLes7qdWMeammZ5lHeLdY0vHxh3L+Jw7FmSoNtc2+g zzs1DEHi9x1Ez39+nhug0KImV83P9kq8PROZOrKWXDEEPeKEYRqBlT6WmgywBQLUYMvf Nb8v9s5cMI/iKIzrnRTqh0/eTG5KdkltxeJ3KWluyDguxSG1AQgWw3NN8RyI48830zaF nKrHTOhg2V6g83r0C5/E5YpOkapdGh+zN2JgshA4KkzNMzGUUdahwUvoCnjgku1QEQhg wGE5FU+vY6yyrDbDM1k3C1276+wpVNigQMEd/aZPl/+Q0q4CdW4T1BxcuOImMN4MjbiG sDRg== X-Gm-Message-State: ABuFfohs0DRiS+O4xoRA/u9AF074KDUgUbnoxYq3NkRnc7I4Yw6hcRA2 LI9sX/V5KBJxj/kInCWYZyqgkXQBJ+c= X-Received: by 2002:a63:cc4f:: with SMTP id q15-v6mr11901900pgi.217.1538082815589; Thu, 27 Sep 2018 14:13:35 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-8-179.tukw.qwest.net. [97.113.8.179]) by smtp.gmail.com with ESMTPSA id l26-v6sm5395884pfg.161.2018.09.27.14.13.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Sep 2018 14:13:34 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Thu, 27 Sep 2018 14:13:20 -0700 Message-Id: <20180927211322.16118-8-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180927211322.16118-1-richard.henderson@linaro.org> References: <20180927211322.16118-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::543 Subject: [Qemu-devel] [PATCH v2 7/9] target/arm: Convert t32ee from feature bit to isar3 test X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/arm/cpu.h | 6 +++++- linux-user/elfload.c | 2 +- target/arm/cpu.c | 4 ---- target/arm/helper.c | 2 +- target/arm/machine.c | 3 +-- 5 files changed, 8 insertions(+), 9 deletions(-) -- 2.17.1 Reviewed-by: Philippe Mathieu-Daudé diff --git a/target/arm/cpu.h b/target/arm/cpu.h index c9996d2534..da841f8538 100644 --- a/target/arm/cpu.h +++ b/target/arm/cpu.h @@ -1529,7 +1529,6 @@ enum arm_features { ARM_FEATURE_NEON, ARM_FEATURE_M, /* Microcontroller profile. */ ARM_FEATURE_OMAPCP, /* OMAP specific CP15 ops handling. */ - ARM_FEATURE_THUMB2EE, ARM_FEATURE_V7MP, /* v7 Multiprocessing Extensions */ ARM_FEATURE_V7VE, /* v7 Virtualization Extensions (non-EL2 parts) */ ARM_FEATURE_V4T, @@ -3123,6 +3122,11 @@ static inline bool aa32_feature_jazelle(ARMCPU *cpu) return FIELD_EX32(cpu->id_isar1, ID_ISAR1, JAZELLE) != 0; } +static inline bool aa32_feature_t32ee(ARMCPU *cpu) +{ + return FIELD_EX32(cpu->id_isar3, ID_ISAR3, T32EE) != 0; +} + static inline bool aa32_feature_aes(ARMCPU *cpu) { return FIELD_EX32(cpu->id_isar5, ID_ISAR5, AES) != 0; diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 1ddb1fd102..01707ebb91 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -466,7 +466,7 @@ static uint32_t get_elf_hwcap(void) GET_FEATURE(ARM_FEATURE_V5, ARM_HWCAP_ARM_EDSP); GET_FEATURE(ARM_FEATURE_VFP, ARM_HWCAP_ARM_VFP); GET_FEATURE(ARM_FEATURE_IWMMXT, ARM_HWCAP_ARM_IWMMXT); - GET_FEATURE(ARM_FEATURE_THUMB2EE, ARM_HWCAP_ARM_THUMBEE); + GET_FEATURE_ID(t32ee, ARM_HWCAP_ARM_THUMBEE); GET_FEATURE(ARM_FEATURE_NEON, ARM_HWCAP_ARM_NEON); GET_FEATURE(ARM_FEATURE_VFP3, ARM_HWCAP_ARM_VFPv3); GET_FEATURE(ARM_FEATURE_V6K, ARM_HWCAP_ARM_TLS); diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 41a1b27c61..abb1b6fe5c 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -1436,7 +1436,6 @@ static void cortex_a8_initfn(Object *obj) set_feature(&cpu->env, ARM_FEATURE_V7); set_feature(&cpu->env, ARM_FEATURE_VFP3); set_feature(&cpu->env, ARM_FEATURE_NEON); - set_feature(&cpu->env, ARM_FEATURE_THUMB2EE); set_feature(&cpu->env, ARM_FEATURE_DUMMY_C15_REGS); set_feature(&cpu->env, ARM_FEATURE_EL3); cpu->midr = 0x410fc080; @@ -1505,7 +1504,6 @@ static void cortex_a9_initfn(Object *obj) set_feature(&cpu->env, ARM_FEATURE_VFP3); set_feature(&cpu->env, ARM_FEATURE_VFP_FP16); set_feature(&cpu->env, ARM_FEATURE_NEON); - set_feature(&cpu->env, ARM_FEATURE_THUMB2EE); set_feature(&cpu->env, ARM_FEATURE_EL3); /* Note that A9 supports the MP extensions even for * A9UP and single-core A9MP (which are both different @@ -1568,7 +1566,6 @@ static void cortex_a7_initfn(Object *obj) set_feature(&cpu->env, ARM_FEATURE_V7VE); set_feature(&cpu->env, ARM_FEATURE_VFP4); set_feature(&cpu->env, ARM_FEATURE_NEON); - set_feature(&cpu->env, ARM_FEATURE_THUMB2EE); set_feature(&cpu->env, ARM_FEATURE_GENERIC_TIMER); set_feature(&cpu->env, ARM_FEATURE_DUMMY_C15_REGS); set_feature(&cpu->env, ARM_FEATURE_CBAR_RO); @@ -1614,7 +1611,6 @@ static void cortex_a15_initfn(Object *obj) set_feature(&cpu->env, ARM_FEATURE_V7VE); set_feature(&cpu->env, ARM_FEATURE_VFP4); set_feature(&cpu->env, ARM_FEATURE_NEON); - set_feature(&cpu->env, ARM_FEATURE_THUMB2EE); set_feature(&cpu->env, ARM_FEATURE_GENERIC_TIMER); set_feature(&cpu->env, ARM_FEATURE_DUMMY_C15_REGS); set_feature(&cpu->env, ARM_FEATURE_CBAR_RO); diff --git a/target/arm/helper.c b/target/arm/helper.c index 64b1564594..5af89f6d9d 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -5328,7 +5328,7 @@ void register_cp_regs_for_features(ARMCPU *cpu) define_arm_cp_regs(cpu, vmsa_pmsa_cp_reginfo); define_arm_cp_regs(cpu, vmsa_cp_reginfo); } - if (arm_feature(env, ARM_FEATURE_THUMB2EE)) { + if (aa32_feature_t32ee(cpu)) { define_arm_cp_regs(cpu, t2ee_cp_reginfo); } if (arm_feature(env, ARM_FEATURE_GENERIC_TIMER)) { diff --git a/target/arm/machine.c b/target/arm/machine.c index ff4ec22bf7..d44e891533 100644 --- a/target/arm/machine.c +++ b/target/arm/machine.c @@ -301,9 +301,8 @@ static const VMStateDescription vmstate_m = { static bool thumb2ee_needed(void *opaque) { ARMCPU *cpu = opaque; - CPUARMState *env = &cpu->env; - return arm_feature(env, ARM_FEATURE_THUMB2EE); + return aa32_feature_t32ee(cpu); } static const VMStateDescription vmstate_thumb2ee = {