From patchwork Tue Aug 22 12:51:22 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: 715753 Delivered-To: patch@linaro.org Received: by 2002:adf:f747:0:b0:317:ecd7:513f with SMTP id z7csp239615wrp; Tue, 22 Aug 2023 05:52:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHYmXVjX6ez+6cQkncLkrEmaatRJ3XW97UbHwEF8SFRAQ9oGi/iW+6zEFfpytYAw3wRC9q4 X-Received: by 2002:a05:622a:14d3:b0:403:a7a0:c85f with SMTP id u19-20020a05622a14d300b00403a7a0c85fmr15601201qtx.26.1692708729547; Tue, 22 Aug 2023 05:52:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692708729; cv=none; d=google.com; s=arc-20160816; b=pgy59jIIpAsZFjtXmnpvASZsPC2ofBkY1VcnGoGInzQ9yB1DCieMTGGlMJwKfhlXTX ZXaHKMyrju4ukRMLnMRD76usxUVSEImCYapcNgUNxD/qCG3EsDBP5acTuRmTDNxWwXpz Nuhcf0o6CXfqJeC5SC6JwBF3fyCMCd/Ca1edvwDpjFwth4wNlPhlS2f5zDJO8RcJoTNZ Mdp9RdrVwb5BrO8gXkuqaZkQ+liv/QV7xns55k09K8FeMgTfa5aRHJf6taGzMgW8leQ9 W8rlAQPfN+h3lzdKOBH3oGMRS8kG0FGmIY4GVyeY1hZ9RtgbFtjWXbcik7TmuV6NK8Qf dwDA== 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=I2L/xuYIR23wVFda3pdpuHsob8xvGwoQ3f9U0j6VhpA=; fh=WTNzBzBWhI6YyLjiFd1Gx/+Ggetq/7tfVgf3EfLcLKA=; b=ZqcLktwQZ4mojk7olB4gsfRdj/QknoZNbYJr1Xti1Q/hTl7pmyIqKhngzGTlk/K7q+ BqT2j/eIDN/hNTZNQrtxghFwD1w2Px9e8C0yJVOl58iiHSF1CQBjyvr/V5XLBSkDR8B1 FqGu/8pkuxRf4yDs0270LWp1z6PKQyZ+OmWbLr5uPwr8MYI/WdO1wSEGj4eT8/jXo26U FTQNy4uCZ45+/2UOut6gsehDMMZdNTR5hveP/rnxCx31DUBghGN9w2hFKfRzRd0tg2wL tTW1pOJBEHsW0J/1ew1EYUcYWwQ7mKeCzPNQjJgF8COqc60qiTcVp6DFSpZ4xRcCWHQl e40w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eQHgsXn4; 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 r19-20020ac85c93000000b004032cbfb5absi6135569qta.603.2023.08.22.05.52.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Aug 2023 05:52: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=pass header.i=@linaro.org header.s=google header.b=eQHgsXn4; 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 1qYQrE-0000uv-S5; Tue, 22 Aug 2023 08:51:40 -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 1qYQrD-0000uj-9T for qemu-devel@nongnu.org; Tue, 22 Aug 2023 08:51:39 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qYQr9-0001cb-6L for qemu-devel@nongnu.org; Tue, 22 Aug 2023 08:51:39 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-31969580797so3990411f8f.3 for ; Tue, 22 Aug 2023 05:51:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692708693; x=1693313493; 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=I2L/xuYIR23wVFda3pdpuHsob8xvGwoQ3f9U0j6VhpA=; b=eQHgsXn4UsdTo7sq5zoFj37UGH/8dagKt8G98lQFpIZs7yQZAuTUQT6VxUvghoMwPM JQiPF1gHx9xJRYZ+NaDUJZrO0JxKx21gRJAfPRBRnehYtsLMO/sqGU3ZFGjilwnZrTGu jL8wff9FGjXqbjsjyvC+nsHJnywPPsd27XYaLgdgneKlpEGbvfjAhloBPQuLmECrjzTy WDIBrTTtB+bxuj3VECnr5xyEWfzPQHhh48E7NQKuA42E1moURCBLLeUqrzXuUeO6SjIL BII9HjpISVeAiZy2pH8BokxmHwYcco38+hWu5tvG4FG5yzGaYX1+ov3x1EDvfwNlxUCC LvUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692708693; x=1693313493; 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=I2L/xuYIR23wVFda3pdpuHsob8xvGwoQ3f9U0j6VhpA=; b=TGr6r9GI2EQhGkPehrol4N6aAPNeM4jJUs6l6+LcAPpBp++oXVlLl7yw9IZUvF2eUY rdhcN2qFU6YEkvx1ffI1E9t1o9BqR/SKEPpKrixhNZywYccTL0Ak+3Utc1TYOftKJSzV VcT7yRKXjsBarzLtEuKGgNsazRfjgTRojctp+FoA6OLnGwXxrB5X6lrhizrycNJ6q2pr O6X3V2NefN+bbksdspcpzfToxndnBbNxl7hXPw4I1iMt39RCbZ/GcFpOzzcQJyLVIlAJ /exrXgZhCz33JoGK4gNrrq/Wn5phN2bmn9ouauhAP2o6FO/j/8rifLr6NQ29GIfWDnXv Tpew== X-Gm-Message-State: AOJu0Yy6TO5hWaS+qlTFzEp0e3pPz2UM5JgHAw6AaX1E1EclpZCXBycG HS0uGrfK6n4FkgFo1YiimJnpoy1LkDd7+rSGubDCrQ== X-Received: by 2002:adf:e6c9:0:b0:313:dee2:e052 with SMTP id y9-20020adfe6c9000000b00313dee2e052mr7242354wrm.26.1692708693255; Tue, 22 Aug 2023 05:51:33 -0700 (PDT) Received: from localhost.localdomain ([37.19.214.4]) by smtp.gmail.com with ESMTPSA id y21-20020a05600c365500b003fef19bb55csm6331542wmq.34.2023.08.22.05.51.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 22 Aug 2023 05:51:32 -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 08/12] target/loongarch: Use generic hrev64_i64() in REVB.4H opcode Date: Tue, 22 Aug 2023 14:51:22 +0200 Message-ID: <20230822125122.54991-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::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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/loongarch/insn_trans/trans_bit.c.inc | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/target/loongarch/insn_trans/trans_bit.c.inc b/target/loongarch/insn_trans/trans_bit.c.inc index 95b4ee5bc8..c04806dc21 100644 --- a/target/loongarch/insn_trans/trans_bit.c.inc +++ b/target/loongarch/insn_trans/trans_bit.c.inc @@ -124,19 +124,6 @@ static void gen_revb_2h(TCGv dest, TCGv src1) tcg_gen_or_tl(dest, t0, t1); } -static void gen_revb_4h(TCGv dest, TCGv src1) -{ - TCGv mask = tcg_constant_tl(0x00FF00FF00FF00FFULL); - TCGv t0 = tcg_temp_new(); - TCGv t1 = tcg_temp_new(); - - tcg_gen_shri_tl(t0, src1, 8); - tcg_gen_and_tl(t0, t0, mask); - tcg_gen_and_tl(t1, src1, mask); - tcg_gen_shli_tl(t1, t1, 8); - tcg_gen_or_tl(dest, t0, t1); -} - static void gen_revh_2w(TCGv dest, TCGv src1) { TCGv_i64 t0 = tcg_temp_new_i64(); @@ -175,7 +162,7 @@ TRANS(clz_d, gen_rr, EXT_NONE, EXT_NONE, gen_clz_d) TRANS(cto_d, gen_rr, EXT_NONE, EXT_NONE, gen_cto_d) TRANS(ctz_d, gen_rr, EXT_NONE, EXT_NONE, gen_ctz_d) TRANS(revb_2h, gen_rr, EXT_NONE, EXT_SIGN, gen_revb_2h) -TRANS(revb_4h, gen_rr, EXT_NONE, EXT_NONE, gen_revb_4h) +TRANS(revb_4h, gen_rr, EXT_NONE, EXT_NONE, tcg_gen_hrev64_i64) TRANS(revb_2w, gen_rr, EXT_NONE, EXT_NONE, gen_revb_2w) TRANS(revb_d, gen_rr, EXT_NONE, EXT_NONE, tcg_gen_bswap64_i64) TRANS(revh_2w, gen_rr, EXT_NONE, EXT_NONE, gen_revh_2w)