From patchwork Mon Jun 21 23:18:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 464637 Delivered-To: patch@linaro.org Received: by 2002:a17:906:71d0:0:0:0:0 with SMTP id i16csp4678053ejk; Mon, 21 Jun 2021 16:35:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGTTxg+uhdYfh/krofSuadL3Rbgi1LzU5h36+XtrVA6F6Fxkh9JBB3bQgGWOLn2w2V6LkX X-Received: by 2002:a67:c09c:: with SMTP id x28mr19859125vsi.9.1624318533715; Mon, 21 Jun 2021 16:35:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624318533; cv=none; d=google.com; s=arc-20160816; b=yZWQdW4n7OIm/j/iKk8kFDK0DyK4RkcKF0GVwGvqLOBtN2iYrEEVQXqI9zCHX3Oe1P TyLDEJExMFxlBp0hZNpZa3pIP5lOQWh1KsDzwbJY+u0tgugz8+amzDXdG9lU7Dyip4B8 ei3O0Id5qIiMX+tvPUuO/OaW7MyxyqXRQxc9y4G6YZaE3UI6sjl8HVWvVsSmaXy+bAHw Ld3FxYMF5WEyxLxS/mu5irO25HX3rkus88609FhRfUy4+MasajOYk026hckkOjOvJpv3 9k+ZY5Z7HYRDqOIJc0tsWmU2jnBBYJ7BLCEoDQJ0m0crFyletbAtauq3XPmsPp8KK/2n cYsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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=ziCUNw7iMfXxhXUy1AbaM+Ca/hJ3SGJZ/ldvQFuxiE8=; b=v8kXQYJpyVSZHKB18heXGYTWipinCPhiqegnwZIiXf+xUc7vbfmlO9OUneCpajr6Gm mch4LBDk178N5MdhE/tSaVdPGRA3XV+86HyQ4VbfWshg5jqfMPcoBMRpjwv0wYL/R+nW kh8Q6PFxh+Vxwth8OZsbfMv+sNIpgMzySaMAurGdIroFFX/7DCBb+Mop6jyFXxJvesdW yUvt5KSsETADU01yYPn2+95ykNZFwkjwexTSBUTLwt/rZURoRAGTyz0fK9gJ1sCae2Mi dmin4Ax2eGw+R23ze1/16YVmO0DPU401fcditmLeTlV3LVvKniMXRCtj2OMMLXIR25GY HFBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iRRLsFbU; 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 i18si559661uap.127.2021.06.21.16.35.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Jun 2021 16:35:33 -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=iRRLsFbU; 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]:54992 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lvTS1-0004Vw-0J for patch@linaro.org; Mon, 21 Jun 2021 19:35:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lvTC9-00017h-LV for qemu-devel@nongnu.org; Mon, 21 Jun 2021 19:19:09 -0400 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:41484) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lvTC6-00062J-RL for qemu-devel@nongnu.org; Mon, 21 Jun 2021 19:19:09 -0400 Received: by mail-pl1-x635.google.com with SMTP id y13so3296108plc.8 for ; Mon, 21 Jun 2021 16:19:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ziCUNw7iMfXxhXUy1AbaM+Ca/hJ3SGJZ/ldvQFuxiE8=; b=iRRLsFbU2eyy5IhuFxyKQVJigjYMFlNBjrxYCuRlOTQayTYiFeBLPrOt5XJPKvDVPR 4QF0d7ozH2LRwZurki8o1LfvFabWb8kSNM/o7xWz4cQfU8LlkpPCvV94U1z6cP25+0WO MyXHuaUWKp/isLueLqH4G/rzwW3IOGUm0PNRNdtnQro5OxD+d+imH16Syp+ZwNFv5W9E 3qPa+pfENfgpfuaPjC3sq5hzvooPwqa0bXrOm/NGpPatFlTIBKwlTnGrlXIQa4G8ntyh e4YcIwMFZxH6WiFL2mAQiiKpvPO5rpTvu6z49+SebC2/uZ1loyToZuzyV4Bmh6SqupsT b8RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ziCUNw7iMfXxhXUy1AbaM+Ca/hJ3SGJZ/ldvQFuxiE8=; b=HQd7NrGEObl/domIWc8NNQzxIp7BFTUVVwCgcbOg1gIIJ7JjI0lx6MUgxLFofYDf2D voY3kbmhrLURaB0kEb2VVesH+Drl/lrov8GDgSeYR4NwJ7FNsW7asV81ddd2ifD0F0Fe sYhGtrldfxcUR3Lsk0A1DF0peJdVMpVzwgomoawBrOFQQ8ceBcaO8ordL+TYvFkAWKaA hs3YB0HMAMcGvRLhXDtYmYc3cXsooWOdnMfV27oSMiO02CBC7uya15N73cK6EBLmCkA+ BQ9oLNYgtXGoVn6ZojuKOYuqkJ44GaiwzDHJWpkXrSBfnB9oV5LZP+QHnycPBq5+1QY2 H5tw== X-Gm-Message-State: AOAM532QXiJvrIHCyeWgv5EeUQkoZrqdiNOTjZGRrnF2vdeGbok1IEhA gDPZn2Byf1JY5whR2/ayP0qy/mc2bhj0pQ== X-Received: by 2002:a17:902:263:b029:110:e758:2748 with SMTP id 90-20020a1709020263b0290110e7582748mr19886070plc.53.1624317545555; Mon, 21 Jun 2021 16:19:05 -0700 (PDT) Received: from localhost.localdomain ([71.212.149.176]) by smtp.gmail.com with ESMTPSA id 135sm14429952pgf.20.2021.06.21.16.19.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jun 2021 16:19:05 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 23/29] target/arm: Improve REVSH Date: Mon, 21 Jun 2021 16:18:43 -0700 Message-Id: <20210621231849.1871164-24-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210621231849.1871164-1-richard.henderson@linaro.org> References: <20210621231849.1871164-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x635.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.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-D?= =?utf-8?b?YXVkw6k=?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The new bswap flags can implement the semantics exactly. Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/translate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.25.1 diff --git a/target/arm/translate.c b/target/arm/translate.c index 669b0be578..a0c6cfa902 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -354,9 +354,7 @@ void gen_rev16(TCGv_i32 dest, TCGv_i32 var) /* Byteswap low halfword and sign extend. */ static void gen_revsh(TCGv_i32 dest, TCGv_i32 var) { - tcg_gen_ext16u_i32(var, var); - tcg_gen_bswap16_i32(var, var, TCG_BSWAP_IZ | TCG_BSWAP_OZ); - tcg_gen_ext16s_i32(dest, var); + tcg_gen_bswap16_i32(var, var, TCG_BSWAP_OS); } /* Dual 16-bit add. Result placed in t0 and t1 is marked as dead.