From patchwork Tue Feb 25 18:04:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 868141 Delivered-To: patch@linaro.org Received: by 2002:a5d:5f56:0:b0:38f:210b:807b with SMTP id cm22csp434951wrb; Tue, 25 Feb 2025 10:08:54 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWerePE9okX485FSXgJEXDISkpVEHJ2ZwzFm9u1jBE1JAkU8XHK62hmMedbJln9FX5+hFv0Xw==@linaro.org X-Google-Smtp-Source: AGHT+IEY0WpYGfQh55C+3HFMK7QmxLGcxnqcOXAejyW20+SIdQZOuwTal0NQ/l2voCBBXlz/UnUc X-Received: by 2002:a05:622a:19aa:b0:471:c407:1e61 with SMTP id d75a77b69052e-4738132aac4mr6829761cf.20.1740506934478; Tue, 25 Feb 2025 10:08:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1740506934; cv=none; d=google.com; s=arc-20240605; b=EKq375PMdRKRnG2risq3Qn93sucO32PvX3tm2Br8KmSnYDDRrokq/sgVqZwGtRw/Rg LDO0r+8cwscfiyMgJ1P3mo+DCl9jOX1gu+d7h1DB8zHKX/YoKMNh/DLdliUw/0UJHibe YVEhzD2pD3yAiEXTZJG60BCowB4GO1Pi/JlzhAVN76Rmvg1VK9beYaoGiEYlfPJqE6GP Yc5z9CjHyGpmBtCCr62kqYNsuzMGjx4Zlakt0jhU6rsW7OaKtrVLS03OPTLFfVIrvoVR K71d+QiGOZX8EaklqsU8Sv3RIMNa46R+w01vRVPi7x94iA3oOeXXuMg+5ixZ+JXDST5e 0KLg== 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=9tK7aZMwwxowa7tqyYPjyzaoV+MdzmwMZbJPQFTnklQ=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=fqA/t7+kdoZO5UzWIJiMmBK1ycqrboLN/Ayzij0Zmu9YhX1Hh1Cf6QfFg+cu5mu9yT G7TBQBmyA8ZnOQylXwcmF7PnnC4jUhST+sOYnMKyG6G4qsEUvx3V2rtp4AR9ETrPjQ4N jXqOjQI2WAumklHXsUpLbjzinvxOszYWQ1LX/EKuQzEL8VAWhNY42+bImTqrSXroW7/d YvxSfXRQqocZuzXr8EUZ3kbSYO0DyYdebWqC1Wx4gpaVbfswWpB/QSiW/1/2P3Vr06bm ol8DQYpu7UcwtqHeAAsud6GN3Fm2NQ4qFml1z2FWNEUpLA2WGDd9MpVltZ6LvtKRB09c 1bYg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ylyPd7HP; 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-47377e1ce40si19713751cf.65.2025.02.25.10.08.54 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Feb 2025 10:08:54 -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=ylyPd7HP; 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 1tmzLU-0004v4-L9; Tue, 25 Feb 2025 13:07:53 -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 1tmzJe-0000DU-W4 for qemu-devel@nongnu.org; Tue, 25 Feb 2025 13:05:59 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tmzJY-0002HS-UB for qemu-devel@nongnu.org; Tue, 25 Feb 2025 13:05:57 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4394a0c65fcso60289185e9.1 for ; Tue, 25 Feb 2025 10:05:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1740506738; x=1741111538; 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=9tK7aZMwwxowa7tqyYPjyzaoV+MdzmwMZbJPQFTnklQ=; b=ylyPd7HPFm6BRXnw93+f9IllEESEf6XC85UgHdr/mhKJli5DZgRwsTKfUhulLG1Mmd 5kUf/wQgkIfFSB9TucVg6zUTWF//8ZJmKj2DiJ2NSYh/8Z8zEFeu/WMQyqbCKcbuaf72 WH4iYrbH2TS0Zu5njHJ0PoII+Bo+bEI+qkdvOT1526OzOimn8TbjoVLUhd8+p0i9Se1e 6h64mij0Pt0rUyLlxBUc0bHqn8ZQrUYYytr4BNvyavaj0q3l+bTQigB3r8sG0HMbbBQV EmQ3ru/ReIEAY9iNcHTJE0bEn6PMDin8s235phP+NuOAomC31m5pw7bYXxC+AhnIsRze OEyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740506738; x=1741111538; 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=9tK7aZMwwxowa7tqyYPjyzaoV+MdzmwMZbJPQFTnklQ=; b=RvIrW/73BwG1ZJUcVtrSWgW8sCgN6qjPByRZVqLnsExOxGJpneZs9dgrjZYxT6tjQM 2Bg3jxjflDoSEQJo9v+J44kiUNmkNKAqDSbpKnCmHxVBO5UQM87pQcJqjWby9B1aZ7D+ 0QNuaNc1PE6MqeI63oXkkDjskwPXAzsCx+J4bB3ZcXOLcEqWqJADA2Upm8lw8fpuqlGt Tg91Cl7CMFA42mSK3LPDSvIeVmhBACeQv5TONu4h5gqFefXci6KSX2wbxJCi6GlqZCgu j1qTMKewRXH2J77CPj7bloOS7pNuz11e9h1iW2eUbmyu8kaQfrQhc2MM1Ih+g1NmMgCu SCjA== X-Gm-Message-State: AOJu0YxKQ7J0i/8nWlhS2jep7axD2OJWVDlFMBWVulX8UsntDj4HLkZm NJQQQm2UGdU2a+PUCltRY7fYo6W2+H33Pv5fjNn7fxzHm6pzXrUs7fhPcYxNWomsHwBXLn67fQA 7 X-Gm-Gg: ASbGnct1ALyL6SMW8YAgSZZqOCVFt5EfMzwrzUIwAoVuEul1pELLkaz4btEJ4I0z5kT r9l+5KYXi4cD+vUCgypY+ZQk1gHgaMzPcHjBht5dCTiLG8zacrn4trKxDsQFr5KNefFjoRsYLsv xZU4yo7xzeGFwu3DV+PmepiyzIzxRAoLWzAVZr8wrbptUgS9oXiE+amzqSu6sA+Km2/wEnsl88s qKW4YkXaG7DFe5AiOBYDA8eKSlhpS4R5YxBw0zi2PKOctMT4Jd1YRiOZeS6d5Oaoi0SYUhJAwPR Xepx5HlHMWA7ATX2i2qC9FvojSI5wSZW X-Received: by 2002:a05:600c:1ca9:b0:439:94f8:fc79 with SMTP id 5b1f17b1804b1-43ab7ae46efmr16915755e9.0.1740506738204; Tue, 25 Feb 2025 10:05:38 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43ab156a136sm35147875e9.35.2025.02.25.10.05.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Feb 2025 10:05:37 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 22/43] target/arm: Move FPSCR get/set helpers to tcg/vfp_helper.c Date: Tue, 25 Feb 2025 18:04:48 +0000 Message-ID: <20250225180510.1318207-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250225180510.1318207-1-peter.maydell@linaro.org> References: <20250225180510.1318207-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32d.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=ham 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 Reviewed-by: Richard Henderson Message-id: 20250221190957.811948-3-peter.maydell@linaro.org --- 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); -}