From patchwork Mon Jun 14 08:37:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 459791 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp3099929jae; Mon, 14 Jun 2021 02:08:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJZ8clbiTBwOZm47fI24DPHh8DspYb8sngOSiQ/TIZlC8N1aRJzZedhkFFmm7oWbH43rkp X-Received: by 2002:a05:6e02:cd1:: with SMTP id c17mr13291159ilj.210.1623661707562; Mon, 14 Jun 2021 02:08:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623661707; cv=none; d=google.com; s=arc-20160816; b=paRP8pCxkfLtzHM41qmAjMZSezgolUBWHhG+kJYZDXiCUrP2RuOgt7hik/ZhJlmbVZ WekMydvPrmFZhHMvYlie4gXu0aXftsanLXH4eSvw9XqqB3QgHPmuKyo+NSC+MdYbQqpX 1NwP33JhyT92C5qGxk4ASW9TU3fic20egL4jbtt71tS0ppKvGykeBx5ZWOikw5tSF157 3pU8R/s/6Gb2/XHfJ2+/qaAfH2esGfqwJzSeP+537cMkJ8CEMHE9RCBuIfzTtEATucTT 3Tc4S4JTT9DMpy/puRBNPeXNV+XFwhYM9y5vljbkt90wsS5bO4rQiIx8CTlS+vEGg8et kYYQ== 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=9pPwNgd+FhwESG7b/TarUMGEShi9vbglIUO+o/J97nY=; b=ZrX+0frZRZB3ZFAN49q+TaUvfcHmkiisyuRteZ5/rviqgei1zA54Gl2m/4jAVcQihZ pgkZy9MbOjRnEw/y4GXFKFQLzxmcT84Yh+vAYy2Fvu2CkE3qL73epqeSCvggbjCOucNu Q+WIjAhCHvQRHxJswZPharxmwoIs4M+7koGHVsXztHIavinOvLKgF50e6AKHGVdT7S3r OhORpa0LB/sJF/hCZxm041P2lh6MpfjSM4KHG397JxUHrfPHmb6NDdViR+pcVkFzjwI0 8I4hOQeAdTF0VXOvxcmRPgRuG+RYJO5455ijHE4mHHbpQm2K0PsufFZYoBTFMj3PtgWr CESQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RYWZ6ppt; 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 p19si16028897jal.78.2021.06.14.02.08.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 14 Jun 2021 02:08:27 -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=RYWZ6ppt; 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]:34378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsia3-0006iy-1T for patch@linaro.org; Mon, 14 Jun 2021 05:08:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsi70-0002er-Ox for qemu-devel@nongnu.org; Mon, 14 Jun 2021 04:38:26 -0400 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:54214) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsi6q-0003d3-Bm for qemu-devel@nongnu.org; Mon, 14 Jun 2021 04:38:26 -0400 Received: by mail-pj1-x1029.google.com with SMTP id ei4so9287141pjb.3 for ; Mon, 14 Jun 2021 01:38:15 -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=9pPwNgd+FhwESG7b/TarUMGEShi9vbglIUO+o/J97nY=; b=RYWZ6pptEGzMOaI53mfq7NTrcI2qI7z98tlgRCTqsZj6IWA49N+OLKfPoIiwTGHV8E GZMor8a5jP83+2oS9hDlFN/uc/MrsBFjOOLxhFiEaCxohNMpVi/hsW6c3v9yw1dOohbo CIo2sYSBqb6EvF94qck+5VLX/nyiZSlxNM+XqqoMqkISeh5hPfAeYveZHSX1cEd5Saof gf0FCA4JHk4IHC1lhjucFDTfjjI5G7sj5vbc6iYRpyDwVdbDRy+oifZnVaWDlz4wdaK2 /kOiDcHQ4FsrVNV4g5hJr6iyamOrHLeK0IiVKhmUqjicqHHib0YFyteilLsTjgGS+6ql Wqjw== 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=9pPwNgd+FhwESG7b/TarUMGEShi9vbglIUO+o/J97nY=; b=ZYoRrg3lRpIBoCxCwxYKrq+UwZM013c4/M48sh7RSOfU0euFKxiv8LKLfUgF+nXpEk vbDW8bl8XGYtwGHdASVDxhL4kKPxhrYbVUyia/P1FXV18htaw6QIZz/IjQKTrSlqqzYr G3DETUYaRfwLWVe3ukzYRvpX5Pu42lqaK3Yzohx4xDOiEgTB/RHSQSNx2rzglhdMH0r4 DwJjA6KVa11ERM5akQRiGCZb8kgihLdoJSQKfp6KUoIm3+b2JZIe+ffTUydSq+0zmfkF a/7U59MPMcOpkVwEuUNxAh/A7GAE+zAppFLqBhhcb0GmYAank35k3TAQLaRlTJLUsgF+ 4XZg== X-Gm-Message-State: AOAM530AsUw1DmlNEB+DESWsFXv/8LzfZldhZjv6TuBBTKTGM+a4GpJU /4gV7nAlDzBc1ynxVO6z1H3U71hGDHtZIg== X-Received: by 2002:a17:902:ceca:b029:112:b67b:fe4f with SMTP id d10-20020a170902cecab0290112b67bfe4fmr15773235plg.32.1623659894674; Mon, 14 Jun 2021 01:38:14 -0700 (PDT) Received: from localhost.localdomain (174-21-70-228.tukw.qwest.net. [174.21.70.228]) by smtp.gmail.com with ESMTPSA id h20sm2242022pfh.24.2021.06.14.01.38.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Jun 2021 01:38:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 22/28] target/arm: Improve REVSH Date: Mon, 14 Jun 2021 01:37:54 -0700 Message-Id: <20210614083800.1166166-23-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210614083800.1166166-1-richard.henderson@linaro.org> References: <20210614083800.1166166-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1029; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1029.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 Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The new bswap flags can implement the semantics exactly. Cc: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/translate.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.25.1 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell diff --git a/target/arm/translate.c b/target/arm/translate.c index 6b88163e3a..46d95d75ae 100644 --- a/target/arm/translate.c +++ b/target/arm/translate.c @@ -341,9 +341,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.