From patchwork Fri Oct 11 15:55:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 175999 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp970165ill; Fri, 11 Oct 2019 09:19:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwstUc605r9sTN8K1jY54WpODD4LM1wriAcLgjxoE1rrSxC3rGtx7EA0kjsDz382Lw7TMGE X-Received: by 2002:a37:b985:: with SMTP id j127mr16478470qkf.337.1570810761121; Fri, 11 Oct 2019 09:19:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570810761; cv=none; d=google.com; s=arc-20160816; b=BxZ+WyezG1LOHoda5qb41JhRhwaxzMwHgo9EOo+Tj0MnGlW20t843PFM8YvAz79SNG 82//bNMoUknpa25B8KJd4U/lYF3+RMRiDhXfotEthSOEzO3UaffNLwrXmDvfPKPC57J5 heszdip1pFtXRLee4wcsatDdTIsfc4jyfM/9r3i8rxhOPZ5Bom0H4wWQpmTa8/4EA6Qh t+Xr5cqGz1pWCTr9FoeBIJjLNX4I+SoUdBTyGiEXnmaFLEjpecQbokJQSG3gfD3KVMMr h+ydjqUhV0f5BkAmcsh4zUlx6y6eXLTcBP28Hm9LFJzAXry2vqSUi11vSP1cbBNJHWht h90Q== 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:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=Iin/3YIyrPimduLw1VgVV/RDqodmDq3TgBG1S+Tb+Mo=; b=CLd4A1kxoXtoaQZJ/63W0NYvfJemVIHr4KOxHIrqLgdJNmK6TqBYOcXPA5Xl9OaEWR 1uFfUy9DyZPMYK+/n6xTBgr95INW9I8asejtDsiTaAuQ3Bi54hGRzPvgs7pAow2ZOg63 2fMLQVjLCsoyQH5SpMgYBXa8bieUH+0b52hctal9a/WCgHTsdgeKp3qNlNC8AT8fZiak okCEkxMOiCxJR4LGJp8q4R+uwWcoqfwbvz2UnO0QqJw7C1izYCHgqTOJyS7w+duyO/1W JwFuLc8Hspwu0G/l7/57iaMAHquMQ1z+LCYhgj/smawnSLpRrbfSB/dVtDkedIPV/AHJ IBYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=lU7J01XE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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. [209.51.188.17]) by mx.google.com with ESMTPS id z18si9102456qve.50.2019.10.11.09.19.21 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Oct 2019 09:19:21 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=lU7J01XE; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 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]:53582 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIxdQ-0002Hf-5I for patch@linaro.org; Fri, 11 Oct 2019 12:19:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33892) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iIxGx-0002db-Hk for qemu-devel@nongnu.org; Fri, 11 Oct 2019 11:56:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iIxGw-0007mj-Bw for qemu-devel@nongnu.org; Fri, 11 Oct 2019 11:56:07 -0400 Received: from mail-yw1-xc44.google.com ([2607:f8b0:4864:20::c44]:34612) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iIxGw-0007mL-8N for qemu-devel@nongnu.org; Fri, 11 Oct 2019 11:56:06 -0400 Received: by mail-yw1-xc44.google.com with SMTP id d192so3653768ywa.1 for ; Fri, 11 Oct 2019 08:56:06 -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=Iin/3YIyrPimduLw1VgVV/RDqodmDq3TgBG1S+Tb+Mo=; b=lU7J01XEmy7MwlGMcLEal+OIpkx5U72IeW5sQlWZeUUQtC5BH2JLG+pYtkNuCPJxjO Yz/GRsQBIDXjb+YO17oID6BTV2CEolWF2Dm8AZE2kKbj4vxdgtHSNV7P9McwOyAhlGu/ Z1JndOwbmAcUXggIo4tocmtf9kzatvQwqA4927qeMkFKrq5Qrw0jMhRWDYXPP1O5+hAT e4awSXVvlPTzqEeZhVXlT4Ck5ar3PbPpouryt2ROWj55gL4t/UsoRau2E+tu/2WYZrg0 CxuEgKP+NUnNLaFkfDfzUQ94zHE5acyxLO3I6UpAg9edJsOsjRQJuAcpIsFC8MqTCkfB UYpw== 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=Iin/3YIyrPimduLw1VgVV/RDqodmDq3TgBG1S+Tb+Mo=; b=WB4QeVt8XBb7UlQTevu5Z7+U/of9rLE7H0WFu305mkK0PZquPy+1OEl5xYFP0VWAEP yEY7gMLBbZb/elIUtuVT1GHo2rdsBgZz/QLBVd5rZCoOMb+6VgmpAlrjlFmHgIP16n88 nol1rHTYfBtIUvbTuQsI1J25QrHYQovZmhhsA1UGAI+m96fvE8qjVQ2KWRhJzGJHn/G0 RDGpabyC2BAaj0nPOiYXuTsTh/RyAIvlpnq2FYLXkl7ayZlYtgYdNoJyavSWI+fpziWD US6MM8OB1XMldVLHlD0jpSIsWm9nxQXEIWt9KgI081moeRxxKZMzFE2oQKW7yE0UbQUx aUSg== X-Gm-Message-State: APjAAAV/SDCWVJ65XRnMqfoCvtKKwkakoWBnk/OXZHUa9xjM49PhB04n FdcRwC67W+PRrqhj4fJYUSqOWWhhkis= X-Received: by 2002:a81:441b:: with SMTP id r27mr2817947ywa.371.1570809365305; Fri, 11 Oct 2019 08:56:05 -0700 (PDT) Received: from cloudburst.gateway.pace.com (67.216.151.25.pool.hargray.net. [67.216.151.25]) by smtp.gmail.com with ESMTPSA id d17sm2473139ywb.95.2019.10.11.08.56.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Oct 2019 08:56:04 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v6 15/20] target/arm: Add HELPER(rebuild_hflags_{a32, a64, m32}) Date: Fri, 11 Oct 2019 11:55:41 -0400 Message-Id: <20191011155546.14342-16-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191011155546.14342-1-richard.henderson@linaro.org> References: <20191011155546.14342-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::c44 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: laurent.desnogues@gmail.com, peter.maydell@linaro.org, qemu-arm@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This functions are given the mode and el state of the cpu and writes the computed value to env->hflags. Signed-off-by: Richard Henderson --- target/arm/helper.h | 4 ++++ target/arm/helper.c | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) -- 2.17.1 Reviewed-by: Alex Bennée diff --git a/target/arm/helper.h b/target/arm/helper.h index 1fb2cb5a77..3d4ec267a2 100644 --- a/target/arm/helper.h +++ b/target/arm/helper.h @@ -90,6 +90,10 @@ DEF_HELPER_4(msr_banked, void, env, i32, i32, i32) DEF_HELPER_2(get_user_reg, i32, env, i32) DEF_HELPER_3(set_user_reg, void, env, i32, i32) +DEF_HELPER_FLAGS_2(rebuild_hflags_m32, TCG_CALL_NO_RWG, void, env, int) +DEF_HELPER_FLAGS_2(rebuild_hflags_a32, TCG_CALL_NO_RWG, void, env, int) +DEF_HELPER_FLAGS_2(rebuild_hflags_a64, TCG_CALL_NO_RWG, void, env, int) + DEF_HELPER_1(vfp_get_fpscr, i32, env) DEF_HELPER_2(vfp_set_fpscr, void, env, i32) diff --git a/target/arm/helper.c b/target/arm/helper.c index 37424e3d4d..b2d701cf00 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -11220,6 +11220,30 @@ void arm_rebuild_hflags(CPUARMState *env) env->hflags = rebuild_hflags_internal(env); } +void HELPER(rebuild_hflags_m32)(CPUARMState *env, int el) +{ + int fp_el = fp_exception_el(env, el); + ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); + + env->hflags = rebuild_hflags_m32(env, fp_el, mmu_idx); +} + +void HELPER(rebuild_hflags_a32)(CPUARMState *env, int el) +{ + int fp_el = fp_exception_el(env, el); + ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); + + env->hflags = rebuild_hflags_a32(env, fp_el, mmu_idx); +} + +void HELPER(rebuild_hflags_a64)(CPUARMState *env, int el) +{ + int fp_el = fp_exception_el(env, el); + ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); + + env->hflags = rebuild_hflags_a64(env, el, fp_el, mmu_idx); +} + void cpu_get_tb_cpu_state(CPUARMState *env, target_ulong *pc, target_ulong *cs_base, uint32_t *pflags) {