From patchwork Mon Aug 24 14:29:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 248206 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:522:0:0:0:0 with SMTP id h2csp2603992ils; Mon, 24 Aug 2020 07:29:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1Bh60xEvyQRulFNW4yn91JcfCn34fPwnnNc47p/qMSE0H+riEsgwKTaPv3y9G3ta1rO2l X-Received: by 2002:a25:260c:: with SMTP id m12mr7476796ybm.431.1598279395669; Mon, 24 Aug 2020 07:29:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598279395; cv=none; d=google.com; s=arc-20160816; b=MiwQuiiMUX4SKZIi6BO6nUrcwp4cc9oTqMhP6sX/ymnE36y0gRT7lfpVLzcJ69CHp9 0z3ZasUJOtm/UvDUHJzJlRxHbAvAiR/WVHH+5TcoVpnIeYkL0rmVoY4zTc/AhdleX2Cn zqyDkbZ/fNV0+kCAw6PDHOIZJ6zVvbhaS/qh7nMZS1NJ6ryVrTIgR60ZbWjJmpyivu/o fNZt1zzCDa0E4HmzQ4g+NCbeN4daHiz6gr2RZI5Gs0fMWqCM96UchoB994560mSgoPkt pkuitdLuHppy6WVb6QPiZ9NJipNxYu/8ydEOMCjgLH5Tvhzd2Zzn2BxyG/j30c1IxWJQ OBDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=bJjPsrivssu5AFGU0GHe8QW+4C7NJ4zaWEp8nyO14bs=; b=XOE0pEZn/b2cnZfiw3L4M6dW9DcQaQGELbrzjmPh9CanjYJSBcXndwZHOqoP33E26K fxLvxWGvGwBjCDFtCkvsYJjCmVjRUhkbq507Mr2yAeJQ2PHNw/2vuhqUuoxCV8rgNA1i Pzrn6ByDNw9J0NW2SaVoxt2fr5GNf39P/E4sdDKNoQRRfECjyNs/RLq/2X40F6fgqZuD ILshYC+X2Gmn1SgK1m9+ToDB6xm/F5vBAIMaZnVc8yxDv46d8yEkhLdyH5b6nxQks2PN 2YU5a0+v3xEs2ckpn1OOasAPRFkYxuRITFUUFaxwtAUkR+pC7E/kDAo/cVyUdsXXNwGs TkCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NUteb7xf; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c10si12039232ybm.341.2020.08.24.07.29.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 24 Aug 2020 07:29:55 -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=pass header.i=@linaro.org header.s=google header.b=NUteb7xf; 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 Received: from localhost ([::1]:39338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kADTv-00083r-0X for patch@linaro.org; Mon, 24 Aug 2020 10:29:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kADTh-00081w-CN for qemu-devel@nongnu.org; Mon, 24 Aug 2020 10:29:41 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:40782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kADTf-0002es-J4 for qemu-devel@nongnu.org; Mon, 24 Aug 2020 10:29:41 -0400 Received: by mail-wr1-x441.google.com with SMTP id l2so8915591wrc.7 for ; Mon, 24 Aug 2020 07:29:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=bJjPsrivssu5AFGU0GHe8QW+4C7NJ4zaWEp8nyO14bs=; b=NUteb7xfBsXChWoGpvfQK34P1MGve0qQWzExVnDuouDw0Sxsh9vlvzu72ujN5p49Kt v4ktEkMpG6O4xcj8nOQpw5YIC83LWG4QhcZKgdyhG0HzbtqvthA8TC0qaRttxJvjx/Vl UDi5Y2Jy5er/EsU0n9gK1J/bmgdigzkbSf563G3OZT15aFBOuw56pWdJtrJWYiEmdgQb 5NyhN+TB7mxt5VszFscF3TTf7vzs7ZTQTGq2IweGM30cDFdXNVhxodNiak7x/Qt0v2kM EMpCE7coDVEKXgXg/RFqcFWgEdnq6dE29KdkYVAp4pb1b4gV51e+OfDRDYzml+g2M+S6 a6sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bJjPsrivssu5AFGU0GHe8QW+4C7NJ4zaWEp8nyO14bs=; b=rcNEwNhQDSOefrnnhPYe3SJJ7uw1ivc8Z0DUu/ljPoK+JzPlEK7nO0HxVA3b3+fucB TD2q4O6SPK3h7coOi78t7qxzrR7MdAl0ageUKxbtVMZpuDL2ACjBacHRkFWo4lYwcNdw pxAwe6GAA4emleNOGH/GK/FpwFDR95/3X2MLh5hZDxFgdUTtuC3F/r9ijpwt18FCLdVX LOTpN77DzFvxgHb6EvPE+MGD6GPhVS9BpsaPmaEQ54Qat0D6PF3F13F9WGmckrLxLg+V mCaMA1uEKOA9ybYVOu21nrSzwuqjrO9BsGMz9HETimR9p39EruCM4HIYADrD7Iw0pXUF /T7Q== X-Gm-Message-State: AOAM532l0e2HND2TETPTPIOsk+hmBtjJU1Z4SjQnWWrmfyr82mT10KNa CJTgMQnZ53wceHgbRBixQ+fJyg== X-Received: by 2002:a5d:4746:: with SMTP id o6mr6497149wrs.410.1598279378153; Mon, 24 Aug 2020 07:29:38 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id b14sm24499091wrj.93.2020.08.24.07.29.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Aug 2020 07:29:37 -0700 (PDT) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 01/22] target/arm: Remove local definitions of float constants Date: Mon, 24 Aug 2020 15:29:13 +0100 Message-Id: <20200824142934.20850-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200824142934.20850-1-peter.maydell@linaro.org> References: <20200824142934.20850-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::441; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x441.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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.23 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" In several places the target/arm code defines local float constants for 2, 3 and 1.5, which are also provided by include/fpu/softfloat.h. Remove the unnecessary local duplicate versions. Signed-off-by: Peter Maydell --- target/arm/helper-a64.c | 11 ----------- target/arm/translate-sve.c | 4 ---- target/arm/vfp_helper.c | 4 ---- 3 files changed, 19 deletions(-) -- 2.20.1 Reviewed-by: Richard Henderson diff --git a/target/arm/helper-a64.c b/target/arm/helper-a64.c index 8682630ff6c..030821489b3 100644 --- a/target/arm/helper-a64.c +++ b/target/arm/helper-a64.c @@ -234,17 +234,6 @@ uint64_t HELPER(neon_cgt_f64)(float64 a, float64 b, void *fpstp) * versions, these do a fully fused multiply-add or * multiply-add-and-halve. */ -#define float16_two make_float16(0x4000) -#define float16_three make_float16(0x4200) -#define float16_one_point_five make_float16(0x3e00) - -#define float32_two make_float32(0x40000000) -#define float32_three make_float32(0x40400000) -#define float32_one_point_five make_float32(0x3fc00000) - -#define float64_two make_float64(0x4000000000000000ULL) -#define float64_three make_float64(0x4008000000000000ULL) -#define float64_one_point_five make_float64(0x3FF8000000000000ULL) uint32_t HELPER(recpsf_f16)(uint32_t a, uint32_t b, void *fpstp) { diff --git a/target/arm/translate-sve.c b/target/arm/translate-sve.c index d97cb37d83f..1e2bcf840e7 100644 --- a/target/arm/translate-sve.c +++ b/target/arm/translate-sve.c @@ -3872,10 +3872,6 @@ static bool trans_##NAME##_zpzi(DisasContext *s, arg_rpri_esz *a) \ return true; \ } -#define float16_two make_float16(0x4000) -#define float32_two make_float32(0x40000000) -#define float64_two make_float64(0x4000000000000000ULL) - DO_FP_IMM(FADD, fadds, half, one) DO_FP_IMM(FSUB, fsubs, half, one) DO_FP_IMM(FMUL, fmuls, half, two) diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c index 64266ece620..02ab8d7f2d8 100644 --- a/target/arm/vfp_helper.c +++ b/target/arm/vfp_helper.c @@ -582,10 +582,6 @@ uint32_t HELPER(vfp_fcvt_f64_to_f16)(float64 a, void *fpstp, uint32_t ahp_mode) return r; } -#define float32_two make_float32(0x40000000) -#define float32_three make_float32(0x40400000) -#define float32_one_point_five make_float32(0x3fc00000) - float32 HELPER(recps_f32)(CPUARMState *env, float32 a, float32 b) { float_status *s = &env->vfp.standard_fp_status;