From patchwork Mon Jun 17 14:34:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 167068 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp3006810ilk; Mon, 17 Jun 2019 08:31:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqwNUfysBmHp3+P4na1N9H46/WaBbIdzCwTMRe9yXY9qv4UJckWkmS2CReeN8/4w6Fmv2fKz X-Received: by 2002:a17:906:f10d:: with SMTP id gv13mr60975104ejb.151.1560785469707; Mon, 17 Jun 2019 08:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560785469; cv=none; d=google.com; s=arc-20160816; b=f5cN9LzJ2dpCgRyiRYS9OwuR3yYCQiiQu3ejFIcvZjlNSuh+GFGprDBFrOkgi7FQKi vbzG3XeVtzl2QVR9dcxsFU4Nck4LCMr/Bo9b16frjUx8OHe4/d+432/VaAeUeTH9/01E dl/D7ZTSoWjdNLRhP6D0lx4nwnxHwu2Dhe/mCQn6sDrmnyKcLyHbxdFnCBsU7ZKTdy2X i70LJir3lZLOF2vfIbKXDKJCbnIpLY1P/e5p9aDrjhsdsG1ZPzMTAnqMM/WaSSA3jtKg p0y1ySjd1cYvExI/KEaJiLrmbpCLl70bv/3pxJfEIieSX5m4kSbAG7AuZzhOfF9aNJLj ztDA== 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:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=Ul7s+t7hXiN2ylOfOOWOvIZY61Jzqwc15l5S4ChbjBk=; b=vkztTpMqefKLHhT5FDCy7jhEgwnC4N/QMnizJfkI9e22M6Xg/yh3Og0KVSVdprqvD7 t5svvbIJT2MUxZWu0H9gCWOBerLBhG2pU18GsP5NiZqcqZZkzxaHytY2YWTARP1zxt9m kVIxqdQ0HcdoqlSqJDnBYk+TjVNBWUWSsYCAbwfz8MTb9M4QgwpaA8dA04D2tTiTeMWI J67anD+6nIm6j06F5WbtLnAcjxeT8SZcEpA0UDoMBgrWHU5/ucHzWCS4NIWvbhiSWalV RRnBCcZAk5GVksEzrzBDfDzd7ihOCMBW1Sxbu7LhUPstYR5461ApW5jGC2JDJ+cPL2Ry LS9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=CvFMte1e; 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 z19si485680ejm.26.2019.06.17.08.31.09 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 17 Jun 2019 08:31:09 -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=CvFMte1e; 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]:48502 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hctbA-0001af-Jk for patch@linaro.org; Mon, 17 Jun 2019 11:31:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46747) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcsiN-0003hE-Sz for qemu-devel@nongnu.org; Mon, 17 Jun 2019 10:34:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcsiM-00087i-AY for qemu-devel@nongnu.org; Mon, 17 Jun 2019 10:34:31 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:46867) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hcsiM-00086z-3y for qemu-devel@nongnu.org; Mon, 17 Jun 2019 10:34:30 -0400 Received: by mail-wr1-x42c.google.com with SMTP id n4so10192276wrw.13 for ; Mon, 17 Jun 2019 07:34:30 -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=Ul7s+t7hXiN2ylOfOOWOvIZY61Jzqwc15l5S4ChbjBk=; b=CvFMte1edGk9eG8aLfxqr1dB7a84QSvtFjjuq7lkeTzTmBVgwE83VlUWCqVTNuVytC Sz0MOwq0w9oLGDbjx2SudKGXC0gAwuR5r0wdmnTiiLzEonSYmWsu9cFSvUiswtzzqY18 HGvMqeXeVTvjbKTxEIDdzLYCrrgOwHZS5Y+fS0xb7itG3ItmRtuvtq6sjb3M3Rwr4l0V SJ13cOYCGeI8DQ2GFY2tDZUwwhkVGUGBD5HsKKfiV8K4bv2gFwHvUhZ7cJVHBcy03hdV 9P/oP6xdHr7cBFsXkYwuqg81qRzLWmaLseu5D2qkRgjZ1KvPfyc+WWnB4y+d55urNIeO /eYQ== 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=Ul7s+t7hXiN2ylOfOOWOvIZY61Jzqwc15l5S4ChbjBk=; b=aHVPsbuJ2/V/3h+60eoSVRAjKhOkJyuOQscf+hdRnaE2RQSWOPuf5t+2eI+lVm5Mh+ WYGtxTM/jaWjxupQnII1JwyXJo4a4r4vtOKpRtvelStTc3uImseEs3lA12aH/BJcNYmR 7hkmYIfoJyY6rBtFctVnQZ5wHaGYD3V8+Y4umS61i5rIsq0Vixt5KSV6f5yZVVslAPpn GEzXRBlittyEprr+O9nLTA7xTnQwtnrRUVBmPa9Kkeb/VkFIRQagvViK8TEb1B4sRzly FHkWtEo9z5rJgjb/PeiBj3Yrhp19cFnkO7MVvni5Fnu+qXHurvWw3uNbocVJtdiV7Rgh EEnQ== X-Gm-Message-State: APjAAAUVES4jqe9qRGBmVthaURQGcjrPzjXWGBnwy8awHeO12bgcdLhP ui9pnUYNCxJImb2thkCnR5APVXpOuhfiLQ== X-Received: by 2002:a5d:6212:: with SMTP id y18mr29951084wru.178.1560782068873; Mon, 17 Jun 2019 07:34:28 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id a67sm13819985wmh.40.2019.06.17.07.34.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 07:34:28 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Date: Mon, 17 Jun 2019 15:34:01 +0100 Message-Id: <20190617143412.5734-14-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190617143412.5734-1-peter.maydell@linaro.org> References: <20190617143412.5734-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42c Subject: [Qemu-devel] [PULL 13/24] target/arm: Stop using cpu_F0s for NEON_2RM_VABS_F 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" Where Neon instructions are floating point operations, we mostly use the old VFP utility functions like gen_vfp_abs() which work on the TCG globals cpu_F0s and cpu_F1s. The Neon for-each-element loop conditionally loads the inputs into either a plain old TCG temporary for most operations or into cpu_F0s for float operations, and similarly stores back either cpu_F0s or the temporary. Switch NEON_2RM_VABS_F away from using cpu_F0s, and update neon_2rm_is_float_op() accordingly. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé Message-id: 20190613163917.28589-4-peter.maydell@linaro.org --- target/arm/translate.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) -- 2.20.1 diff --git a/target/arm/translate.c b/target/arm/translate.c index c274c8b4602..a10fded1f39 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -1374,14 +1374,6 @@ static TCGv_ptr get_fpstatus_ptr(int neon) return statusptr; } -static inline void gen_vfp_abs(int dp) -{ - if (dp) - gen_helper_vfp_absd(cpu_F0d, cpu_F0d); - else - gen_helper_vfp_abss(cpu_F0s, cpu_F0s); -} - static inline void gen_vfp_neg(int dp) { if (dp) @@ -4191,8 +4183,13 @@ static const uint8_t neon_3r_sizes[] = { static int neon_2rm_is_float_op(int op) { - /* Return true if this neon 2reg-misc op is float-to-float */ - return (op == NEON_2RM_VABS_F || op == NEON_2RM_VNEG_F || + /* + * Return true if this neon 2reg-misc op is float-to-float. + * This is not a property of the operation but of our code -- + * what we are asking here is "does the code for this case in + * the Neon for-each-pass loop use cpu_F0s?". + */ + return (op == NEON_2RM_VNEG_F || (op >= NEON_2RM_VRINTN && op <= NEON_2RM_VRINTZ) || op == NEON_2RM_VRINTM || (op >= NEON_2RM_VRINTP && op <= NEON_2RM_VCVTMS) || @@ -6761,7 +6758,7 @@ static int disas_neon_data_insn(DisasContext *s, uint32_t insn) break; } case NEON_2RM_VABS_F: - gen_vfp_abs(0); + gen_helper_vfp_abss(tmp, tmp); break; case NEON_2RM_VNEG_F: gen_vfp_neg(0);