From patchwork Fri Dec 13 17:31:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 850141 Delivered-To: patch@linaro.org Received: by 2002:a05:6000:2c4:b0:385:e875:8a9e with SMTP id o4csp1638107wry; Fri, 13 Dec 2024 09:34:12 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXs7L1iwRX+Y02EuykdLmJsh6D5EoUQym8VT7sFiY7MrguD6B43gmfDPMQZP0n+oI62tVjyVg==@linaro.org X-Google-Smtp-Source: AGHT+IH5qnOFk2g6u30eEtPyU1Mh/Jw4ySoZRMRNHvwdYzQcbUnfQfopEIIg8WLm4NjEaCbOSAWp X-Received: by 2002:a05:620a:1a04:b0:7b6:e8d4:9b85 with SMTP id af79cd13be357-7b6fbf45006mr464545485a.61.1734111252542; Fri, 13 Dec 2024 09:34:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734111252; cv=none; d=google.com; s=arc-20240605; b=ZLm14ItxWurtZ1o5uo7FG6s8ayK8Vtk6rp71XBzqN1hDCCle1t1wScUyvhYRIyBXQq w1y/WkrbW0h7CQawWqn2N1pBp/hDtRphzSU5NB2XGSA4v1YnaSYojlVvdo9Du1ZsezCd WmYWPE5OnYsJtRqLE9+hq4PJsZNzd72V8Ggctc87QY43QMOR9LURACor20kulqocCkY6 fk59vID2AkTthmxJjYzfxcSI1efMetY2RUDUtNlI2d45tZEhG1j7cWTb7fXr/lLs5/g8 joyJxDPehdIjBlRMf4xbaS2zaUj92nS9j/WpZwg2a81DQIgyJmR7boJKtQjAvDWe0kzR rvmg== 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=eaX6KljypzYLDCkXE/78gtp4RnXR8b1xmtguoFNogMg=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=AYvR2JqZImDNoSAvBzrawAfUGnz+9VAc+9h8NU1mhlZapi5sped587DROmgLm6TP3H Fa3ikiZ4lnMxoerB7AWMwz56U4WXkYnIheZ+qSEh4HB0k4F9LTqmEiF+eTRhz70kUZP2 74p7RDm8KUB84VX0MDP2Ol+eIaeVkR3EVXAnF9p7qw23HGYtYLcbDZNPhSP4zO1/RR6Z lX8+dJIwfv+yhf/sgBLNyNxVfg3GcXbkfh3VQ8zDFxIlIb8j+JrZ8vlPoftCmqE+URKX PNo/sXbCTOuqToz5t02eKsUp5+2JZEnXJFjsi4L7c2p/J4wYd8Eq3rUkU2bpt+G8BvoN dzKw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Unnyc63j; 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 af79cd13be357-7b6f3782300si542099385a.225.2024.12.13.09.34.12 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 13 Dec 2024 09:34:12 -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=Unnyc63j; 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 1tM9Y6-0008Mc-1h; Fri, 13 Dec 2024 12:33:58 -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 1tM9XA-00072C-8B for qemu-devel@nongnu.org; Fri, 13 Dec 2024 12:33:00 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tM9X7-0001Wv-Ei for qemu-devel@nongnu.org; Fri, 13 Dec 2024 12:32:58 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-436281c8a38so11937005e9.3 for ; Fri, 13 Dec 2024 09:32:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734111176; x=1734715976; 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=eaX6KljypzYLDCkXE/78gtp4RnXR8b1xmtguoFNogMg=; b=Unnyc63jgLBZPO42xV5hX0GP9aWCTxw8wOakQSJU8jJuyGECA2XK4PjjmXP2/SjkzD sFU4rhHuOXjwJfYzt6cV/q27Dy4PHbhNu0+VhDQNkzSHtakxSBFCA2EI3RU4wvHF08jB 4pdFWqww0QkH/zOkNJPADxXY+ILIsf3ZjLrmi/f4+8+OuG4M9qIkZeeHyrrhaE4yUs3v +nR3FwAroitqJwWFZlERnWVS4eu9OabcFM8JJe7L/6Mf/P60naR2/21wwbH/rLQpMwRy yr0R3jkWRhjdD3Y5oyYUcCkbLdhveZM4yEYSnvbaVG7AnjnpbKBihsFyaOB5LT9Z2nf/ hI7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734111176; x=1734715976; 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=eaX6KljypzYLDCkXE/78gtp4RnXR8b1xmtguoFNogMg=; b=Rz+1k+zVMAemzYBb7pevzgRcatg9RRVd5fjFerKiqlJoaKgxl6E5nbfUdMAmDXwhNE DtNzcyA77mabkmWoK1g5aKoGliHIZENtzVTutvLo0E92iBfqGMl5nqP638YSYJuAk3ba r/1T/rCgsVueJQPou/vPvocHlLZLC/ACbulM4m+XAJR+QFlcEUH6V8xHSESFlptrObv9 21iQ0cQKMHhQn4NQ7Ov5vJuW0Ov1fZkf2mOhhYCITFjEcKaXvmfy67gC90cYo3oR6+d3 lwP0gM8zDCGGy/u6+IXkPoDOvIYjSIZD3+NXaJ5WclYHU5FUDLdZgquksNRdBUoxl2X8 fgCA== X-Gm-Message-State: AOJu0YwglsJjfHmOzGGPYoPrNJ/1OGDVCXK5TL0vl+qPos3fNmVu4GYi oXGJMFyJwHVQ5ha8aBvFfLOu8wd3Ng6UL5quC7adlMKWCFuydJctv+qsMVxYgjEQ5Ue+Svw3eYa A X-Gm-Gg: ASbGncsXhEqa2NguHgRqs9yly+502S7Yy7uhIKQY/aR6nGQmpxoq2+knOLSp34fzRnN QUq4bH2LGivaFikhJ3knd4k+0z/kV943AM8asUBbPSB2G9lkEqukJylrNbSOWT95WqbkYpcS8K/ eNK9uuk/Tz4KVXpLWKThusHmCDMaRyZmS+2mYFaXAp4kGk5yZZzl5dljiMr7teY9POzF+sLEfF8 2mylImPBytRIghwaar7l8+gj/njSGu/w14hpwVmzxTtr2NpqMflyKDlbtxOAQ== X-Received: by 2002:a05:6000:4709:b0:386:3803:bbd8 with SMTP id ffacd0b85a97d-3888e0c4d35mr2809601f8f.59.1734111175963; Fri, 13 Dec 2024 09:32:55 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-388c80162ddsm87026f8f.37.2024.12.13.09.32.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Dec 2024 09:32:55 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 23/85] target/arm: Fix decode of fp16 vector fabs, fneg, fsqrt Date: Fri, 13 Dec 2024 17:31:27 +0000 Message-Id: <20241213173229.3308926-24-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241213173229.3308926-1-peter.maydell@linaro.org> References: <20241213173229.3308926-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x333.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 From: Richard Henderson These opcodes are only supported as vector operations, not as advsimd scalar. Set only_in_vector, and remove the unreachable implementation of scalar fneg. Reported-by: Peter Maydell Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell Message-id: 20241211163036.2297116-24-richard.henderson@linaro.org Signed-off-by: Peter Maydell --- target/arm/tcg/translate-a64.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index a99f3d0d135..3c1784593a4 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -10816,10 +10816,13 @@ static void disas_simd_two_reg_misc_fp16(DisasContext *s, uint32_t insn) break; case 0x2f: /* FABS */ case 0x6f: /* FNEG */ + only_in_vector = true; need_fpst = false; break; case 0x7d: /* FRSQRTE */ + break; case 0x7f: /* FSQRT (vector) */ + only_in_vector = true; break; default: unallocated_encoding(s); @@ -10877,9 +10880,6 @@ static void disas_simd_two_reg_misc_fp16(DisasContext *s, uint32_t insn) case 0x7b: /* FCVTZU */ gen_helper_advsimd_f16touinth(tcg_res, tcg_op, tcg_fpstatus); break; - case 0x6f: /* FNEG */ - tcg_gen_xori_i32(tcg_res, tcg_op, 0x8000); - break; case 0x7d: /* FRSQRTE */ gen_helper_rsqrte_f16(tcg_res, tcg_op, tcg_fpstatus); break;