From patchwork Fri Feb 21 19:09:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 867124 Delivered-To: patch@linaro.org Received: by 2002:a5d:47cf:0:b0:38f:210b:807b with SMTP id o15csp515300wrc; Fri, 21 Feb 2025 11:11:01 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWP+YxaogWGfdxrIBly9na8y6Fkzt0comQbzrzjksi/cdYl33DW8RuTqENyOnmtgFc4RvPibw==@linaro.org X-Google-Smtp-Source: AGHT+IGT/8PUB5kDHdl9HJK+QGnrYzoU9+y+JPo1w81NwlHjLppzFRKe73MMKydR8/RyPO3lK7pI X-Received: by 2002:ac8:7f8e:0:b0:471:b9e1:670b with SMTP id d75a77b69052e-4722291daefmr73113771cf.34.1740165061518; Fri, 21 Feb 2025 11:11:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740165061; cv=none; d=google.com; s=arc-20240605; b=C0eiKcZCjdA/pUqM0W/1bKGfNaECMAJWF1/iFr4f0os+rUlvIIGQlo2TArrQIQWV6Z RRaYt2CuP1xUlFINNqa/KczRgpzcYIrk6g61MuByxbyZS82lLMDOuj7+DDD0UvnjVAeg AO5NUnu96B7fQy/vFWzKLl6tjtCQNWZLWkSFukXQ5yeI4Yn9CEJybGlBE3cC6647O984 Qp/3jYUfWyr/71OYbia8ggg0YNSoyMjeZtf0pbwuv6KqaS2j8WcJPYVkpmhpYCU2MihY ybWf/9CgnzQapwffoPdBo+IRqDXdZXlq9sHPf2PtfSPiwSI2LyGOhKpdKf4y3MVQ73a6 OvCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=psLz427g16MJMWGLUupBo7uTcJrzhpucl+zyFztvGko=; fh=HsesPRzzeWnqUNBPi4XLWOE4r9Rskn8q4OOJ5JdgO+8=; b=LxpK2agse5OSkTo1DPpOgPLHlOnTBu5nzDWyzkUp9aGc8ssbdNihYGH8dzlAGc+q3r lpw9aB0RAswODdRI7EhE1arKX8B4209UYlcRIVEjbM0QesvXnvf8954ImPaJNJzej8h3 /8kVOkFiPV+le9DehC5Szz7h8hPxTNxVAeHtCAT+ntols/bVb2wvHY4XYxsJCedU/Hqk uapcKA5n8XYMuZXeJ/E3mNRhniZsq5LZrh8NRME7MlnXY85VVi6bVfIvYt5vJYfOBct6 sOnUT3cpOPWb5p2e/GpKugeoit5oym0mnMByDNgBFrW/HTJhphmCMnllggGWHag9Tq/m tf2Q==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=evOd6ryp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-471f092819bsi101740341cf.595.2025.02.21.11.11.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Feb 2025 11:11:01 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=evOd6ryp; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tlYPY-0006LW-Vy; Fri, 21 Feb 2025 14:10:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tlYPX-0006Jw-HH for qemu-devel@nongnu.org; Fri, 21 Feb 2025 14:10:07 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tlYPU-00046D-Gd for qemu-devel@nongnu.org; Fri, 21 Feb 2025 14:10:07 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-4398ec2abc2so21555505e9.1 for ; Fri, 21 Feb 2025 11:10:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740165002; x=1740769802; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=psLz427g16MJMWGLUupBo7uTcJrzhpucl+zyFztvGko=; b=evOd6rypVOoh/RUOIn9UrTHnoAzmIIPft/1d2PLkgQ2jc4RtCHyOog87Q7q2JxKO6u fbdfrlc/fnyT1p34vjPWRNPw8qIB5RDHjcuV5czzCmKRBKnedniRf6G4iUX1rMWIki3O zQ/IrDc9rLj+Cyqq6h74wZ+l58kU72BNXAzZ3mj7ETQoWnA44EKMlw+QY9PX1+CnyjS4 N8gjvc+o9PLWM7GQmvSnd3vN3XUNUuF37APco18neSFrCxvZKwl55rrWZX2ULNfmXPuO UYZnp7/7EkSogDZPrrsYvtGug20/JybisKHgFMdVFY2Dm2wDqF1ESDWdDcXUpkAKVu+D Qh0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740165002; x=1740769802; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=psLz427g16MJMWGLUupBo7uTcJrzhpucl+zyFztvGko=; b=T33bl3CgNz8aoUNDYE9MfxqD932iC2RlcnDK6QtovdQvbbSdcJya6kMbS28Tc9KWXa 5Th7kGmpV0GTa9hWNGDhtMn7Zf8pegNlQiGoEpjqTy0vt5mysunCwtG0VZVhHq870wU9 VHhpCOQJ7kH3gEpl4fjyYnF8Nd24k/4Dt8v7oBbwMnO7WnT9S7oBBXrwLVw5lSd2AWcF +qQVMP7oRn3UDEpBKSQNeZDy9LZ9GmXE6iJw6BuZQ4HQLKrC7/PEqx54BwaWJp7oW+CM oi3aU8PvxPw/03TWAqhuqm/hYq0lKkj9Rs0H3lUyDeJxbiJYrGsJg9NhXA5BRvRbTzW/ 0mYw== X-Forwarded-Encrypted: i=1; AJvYcCUT/dQS9fB8IKYzKwfwO6IIcSv/EuGTfJV+Mb0V6dqgAMtD1HJPrGLgcL1zFYDBmnjB4KtzIpVGEsHU@nongnu.org X-Gm-Message-State: AOJu0YwEP6r/KiUNXKsDC1VEu7+N5pMqLCR/LxOq1BMx4X12rzI9TQ3X OEB/jmICbm7IgaQu3sMppH3AbGpLOw5l8VZoGbgS/aTagI2AuPmymjKkMtMrcuD+hQqnNih28xm k X-Gm-Gg: ASbGncszBmrNNpPpErJ37VF0V19Ms7BC72AWg1CIqOgQkrnmIB+3bU0kQf6OQtQcDfx i4V6KSm+PnfqM8mEyuVKeE5k8ftra2pLuFAy+rRmA5Pw+iNqE9t8G+jt3rGHnkjbDgjna/JTLOH MYvbRnqMmyN1CVb/hXGQWUMS7qHf+c0dbTtGrKZCHBFBAAj1oqmqUrecVzR/l5WF7BN5G5Lnvvh aLXZbJiWZfjgC52V93Nb4YTPzIRVinjWCisYozgRl2R8zYBg4J8QjF9ZvrfFtvfnj6orSQkzuuC mLb9bBAPHak4mEHiAkEr2eEQGmYXVpE1 X-Received: by 2002:a05:6000:1867:b0:38f:4fa6:68df with SMTP id ffacd0b85a97d-38f6f0d1fa2mr4328488f8f.51.1740165001845; Fri, 21 Feb 2025 11:10:01 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38f258ddbe0sm24392478f8f.39.2025.02.21.11.10.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2025 11:10:00 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 2/4] target/arm: Move FPSCR get/set helpers to tcg/vfp_helper.c Date: Fri, 21 Feb 2025 19:09:54 +0000 Message-ID: <20250221190957.811948-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250221190957.811948-1-peter.maydell@linaro.org> References: <20250221190957.811948-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Currently the helper_vfp_get_fpscr() and helper_vfp_set_fpscr() functions do the actual work of updating the FPSCR, and we have wrappers vfp_get_fpscr() and vfp_set_fpscr() which we use for calls from other QEMU C code. Flip these around so that it is vfp_get_fpscr() and vfp_set_fpscr() which do the actual work, and helper_vfp_get_fpscr() and helper_vfp_set_fpscr() which are the wrappers; this allows us to move them to tcg/vfp_helper.c. Since this is the last HELPER() we had in arm/vfp_helper.c, we can drop the include of helper-proto.h. Signed-off-by: Peter Maydell --- target/arm/tcg/vfp_helper.c | 10 ++++++++++ target/arm/vfp_helper.c | 15 ++------------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/target/arm/tcg/vfp_helper.c b/target/arm/tcg/vfp_helper.c index aa580ff64c7..cd6e0d0edab 100644 --- a/target/arm/tcg/vfp_helper.c +++ b/target/arm/tcg/vfp_helper.c @@ -1128,3 +1128,13 @@ void HELPER(check_hcr_el2_trap)(CPUARMState *env, uint32_t rt, uint32_t reg) raise_exception(env, EXCP_HYP_TRAP, syndrome, 2); } + +uint32_t HELPER(vfp_get_fpscr)(CPUARMState *env) +{ + return vfp_get_fpscr(env); +} + +void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val) +{ + vfp_set_fpscr(env, val); +} diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c index 0e849d8d4dc..0919acb7b89 100644 --- a/target/arm/vfp_helper.c +++ b/target/arm/vfp_helper.c @@ -19,7 +19,6 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "exec/helper-proto.h" #include "internals.h" #include "cpu-features.h" #include "fpu/softfloat.h" @@ -298,17 +297,12 @@ uint32_t vfp_get_fpsr(CPUARMState *env) return fpsr; } -uint32_t HELPER(vfp_get_fpscr)(CPUARMState *env) +uint32_t vfp_get_fpscr(CPUARMState *env) { return (vfp_get_fpcr(env) & FPSCR_FPCR_MASK) | (vfp_get_fpsr(env) & FPSCR_FPSR_MASK); } -uint32_t vfp_get_fpscr(CPUARMState *env) -{ - return HELPER(vfp_get_fpscr)(env); -} - void vfp_set_fpsr(CPUARMState *env, uint32_t val) { ARMCPU *cpu = env_archcpu(env); @@ -402,13 +396,8 @@ void vfp_set_fpcr(CPUARMState *env, uint32_t val) vfp_set_fpcr_masked(env, val, MAKE_64BIT_MASK(0, 32)); } -void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val) +void vfp_set_fpscr(CPUARMState *env, uint32_t val) { vfp_set_fpcr_masked(env, val, FPSCR_FPCR_MASK); vfp_set_fpsr(env, val & FPSCR_FPSR_MASK); } - -void vfp_set_fpscr(CPUARMState *env, uint32_t val) -{ - HELPER(vfp_set_fpscr)(env, val); -}