From patchwork Tue Aug 22 12:46:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 715751 Delivered-To: patch@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp237752wrp; Tue, 22 Aug 2023 05:47:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGvR6CIiV1IDDXHZ4Jabtq9I3a6+kfs/YUdVLJrOT7s/I3fJT2VSt0yvOReJWpFp6TCCLOK X-Received: by 2002:a05:6830:2042:b0:6b9:742a:750e with SMTP id f2-20020a056830204200b006b9742a750emr11751289otp.2.1692708458544; Tue, 22 Aug 2023 05:47:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692708458; cv=none; d=google.com; s=arc-20160816; b=XaV+ZuA8kX0Pztnm0Ag9Ucr9QQe5/mxlqmilK/0yK/ANDaGpctwfU60FMVG+Lxy6xo kKNsWFkyLxQ+wR25wjkN9E8avLrNvKW2mBnY59oX4RdkBm5UCKmBG7Az/81Sg0h9bdcP nyjckfYVj/PEPukVvPPy39MKVGvWG1rdZXEyaGrSt5mx5xGKnFysBIOeQaeEfcrYo//c 7iAwHt8Vi5/21UnHAG027xGC9RT7CN+arxEmtr8FCs/J+Aq/sL50Wx2NcE0TPgStxsbW GGT+T5zVzteM/fiZYs//ASrowG3AZObjtfMFs4nXh5asn13Rbk9b72A+zsplPgHKaXpg CHeQ== 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:cc:to :from:dkim-signature; bh=3CvejP1SPWKY/vo0PkTSUlRcOk/R6PHI3gbd8lW0JWk=; fh=WTNzBzBWhI6YyLjiFd1Gx/+Ggetq/7tfVgf3EfLcLKA=; b=o3ISBwU2zEbkPnZSurrbEUmpDh9UlmdBTr4SgF+eGvqZn+pNuMRJku/Zovge5zPASa SXTSPZbOH8QgDMT8FnKMX2iQm6el2M96exxtEMEOTw98JVz0TUWiZDCxpuL3mo6KKsw1 r+H/ZM5Iy1rUKUYT/Z5Z2aPeK3RryFRfOzw3OfZqBSN73uff+9PY57eRi+J0RIlhEi6e 5zbYlhhMDZg3Lx4ylqE4VCVQMYEPm/5yQ36UVgqqyFoygrp3Mp2VQD1+Vfq4/kwYKvDT tKxvschM8ZqeGCr0fNsM72zSE4vqennccVC8BqQdTuJ5SNWpfKVOexqa9O30h0OGupQO 2kbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F9aGn+Mc; 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 d8-20020ac85d88000000b0040cb20e8fd3si6306779qtx.768.2023.08.22.05.47.38 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Aug 2023 05:47:38 -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=F9aGn+Mc; 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] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qYQmP-0005O9-2f; Tue, 22 Aug 2023 08:46:41 -0400 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 1qYQmN-0005Nl-0H for qemu-devel@nongnu.org; Tue, 22 Aug 2023 08:46:39 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYQmI-0007JB-SY for qemu-devel@nongnu.org; Tue, 22 Aug 2023 08:46:37 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-5007f3d3235so3481413e87.2 for ; Tue, 22 Aug 2023 05:46:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692708386; x=1693313186; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3CvejP1SPWKY/vo0PkTSUlRcOk/R6PHI3gbd8lW0JWk=; b=F9aGn+McmTleL0Oc26hFNmWY8lYtYrL/tLJ3J8c2prORtmV7052GRh0OnHCKIy3XpF f+V/8ibJ6xAXPhSUKA0y746fcWfpRdYvm1et+zDXrgcGSDqANDYOKgKY7bXHN9c6cqRN tNo/uHuqGPsyJ7tvvlck9rBH/t1Zw450N+phEbF9SMfSuRTxesJDRS9jTMmpxbBXEUwh 6i8S2yMa+U8t4rEr4LWm9q2tBQ+6gJ2qB1Z8OUV+Otoj74Z/5jZ5R9jF+zlJBnyBH5N4 vcQk42X9Z9L34SyPQjiv2fyL0rbCnuDyUx0tdf9CwN/K3uqE93EBh+l/5YequWE8OGBH GFBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692708386; x=1693313186; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3CvejP1SPWKY/vo0PkTSUlRcOk/R6PHI3gbd8lW0JWk=; b=XGaPagZYHprJoHr6zwUrNLK2WrAtMCXvNTeZmALXDe0DvY0PyuQy6/VcZbI5VTU0n4 lhrvBn/UB6smPf/ugiZDxd1h108828cVr9yIYHf0oOrLWvheG07KBYvhQzxvDWaDaTSZ MoT2sK6Wp0GeVkP5zQNfWmUYm8N0/TFxaKfDuK8zOTL3mln03hLhanPPax0MmBXkxBEo 5QJaci3yRTicT8CTUWjXcEJD01wu6qEZTXuOlAWVrap+ObP9apXVX76F6Whp8+9YXnPQ /8bG7TZK8YSpcODMNNNKpv27gRCdJUTRb8LHgGNlddwi9UZUkY73jXKpVfaYOgr3H5ho SfbQ== X-Gm-Message-State: AOJu0YwifFLp7OvId4lBXuNTvKGnKiAW3NBIyitbPnhZMG1Y6OM/Kik2 rLrYlxIC/FvDCEjCnhQkRltbeeYl7Hkmnej+ZrQ/1Q== X-Received: by 2002:a05:6512:340c:b0:4fb:7592:7e03 with SMTP id i12-20020a056512340c00b004fb75927e03mr7569000lfr.20.1692708385982; Tue, 22 Aug 2023 05:46:25 -0700 (PDT) Received: from localhost.localdomain ([37.19.214.4]) by smtp.gmail.com with ESMTPSA id z10-20020a1c4c0a000000b003fef5402d2dsm3982597wmf.8.2023.08.22.05.46.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 22 Aug 2023 05:46:25 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Song Gao , "Edgar E. Iglesias" , Richard Henderson , Greg Kurz , Aurelien Jarno , qemu-ppc@nongnu.org, Peter Maydell , Daniel Henrique Barboza , Aleksandar Rikalo , Paolo Bonzini , David Gibson , Jiaxun Yang , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Yoshinori Sato , Nicholas Piggin , Xiaojuan Yang , qemu-arm@nongnu.org, =?utf-8?q?Ph?= =?utf-8?q?ilippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 10/12] target/arm: Use generic hrev_i64() in Aarch64 REV16 opcode Date: Tue, 22 Aug 2023 14:46:18 +0200 Message-ID: <20230822124618.54873-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230822124042.54739-1-philmd@linaro.org> References: <20230822124042.54739-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::132; envelope-from=philmd@linaro.org; helo=mail-lf1-x132.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 Signed-off-by: Philippe Mathieu-Daudé --- target/arm/tcg/translate-a64.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index 5fa1257d32..2973831b38 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -5040,16 +5040,7 @@ static void handle_rev32(DisasContext *s, unsigned int sf, static void handle_rev16(DisasContext *s, unsigned int sf, unsigned int rn, unsigned int rd) { - TCGv_i64 tcg_rd = cpu_reg(s, rd); - TCGv_i64 tcg_tmp = tcg_temp_new_i64(); - TCGv_i64 tcg_rn = read_cpu_reg(s, rn, sf); - TCGv_i64 mask = tcg_constant_i64(sf ? 0x00ff00ff00ff00ffull : 0x00ff00ff); - - tcg_gen_shri_i64(tcg_tmp, tcg_rn, 8); - tcg_gen_and_i64(tcg_rd, tcg_rn, mask); - tcg_gen_and_i64(tcg_tmp, tcg_tmp, mask); - tcg_gen_shli_i64(tcg_rd, tcg_rd, 8); - tcg_gen_or_i64(tcg_rd, tcg_rd, tcg_tmp); + tcg_gen_hrev_i64(cpu_reg(s, rd), read_cpu_reg(s, rn, sf), sf); } /* Data-processing (1 source)