Message ID | 20181123144558.5048-29-richard.henderson@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2231734ljp; Fri, 23 Nov 2018 07:06:13 -0800 (PST) X-Google-Smtp-Source: AFSGD/Upb+mYhR6r6xOO1JC1VqM7q5nQM+13mqnjxEOYua60W2n7QEO0VOIjgGpuPLv+ON/JApED X-Received: by 2002:ab0:6446:: with SMTP id j6mr6602640uap.2.1542985573395; Fri, 23 Nov 2018 07:06:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542985573; cv=none; d=google.com; s=arc-20160816; b=BLhM9fT03s/ZWrAAmYT2770zuRCOOch2vVsm94cyvHOnyQ9GAYwKAbgESEpeCM7fOk JfgOBCrLYenuMMbJuRMd1wrOm6ypkl3AGj2axcsa4itjPYsJXY38n2LIxXQCIvaQZ85C uEs9OZ1Ke+VjPnrgOl4PfcfMlWOOkFuAPfVaokQP6bF7u62xK3y8+zwB58BSGnPdq7hr aeVyVnZP3qEFp0SsFzG7MyaOY8PQJtP9GZBnHXEOI0Y3W/8H1W/FLL5u4xjNSeVJvWNh YXV7oB6EzE6DaCbImy63rkew01SmeNp5kOJpNU+XiCJB06cOAp71833PI04oXOUcCMjw 7QcQ== 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:subject:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=tusyFviTXg3Z07DzPNMpcS9w3/27t1wRBGHj82A/Eoc=; b=TxncIIBdbWKhXydRl4XrQICyvyAkpDJhIzIjMCaevywXREG/kUJeIWURweEtfnqdbz 0HX4fZLix9UuVhGWeBSxnDaPNVYt6xM3swjJSiK/j0Efng4eWvAzfkJAKN0ybiO1IW1w Xiiu8nMNgcr9GMYmU4sokPlUm9KTckVabpGAhdao329yKF3b6VkaGQsMWD0qLNpIsh6+ 6xK//bVP6f/HAeGrGpNOXets+5q9Nq5Jubf9d4MvIlkVe8VnulM2lvwluNxvgpwDKtwO G5aUiaDT1ePHefDKHZzVNl2AwAFbnRQrSnyJB04TdZ71WYUFraITzPqDiLU3BQ8NIsqs 4SlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X8pX7XW2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id y14si6505976vsa.18.2018.11.23.07.06.13 for <patch@linaro.org> (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 23 Nov 2018 07:06:13 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=X8pX7XW2; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:52871 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1gQD24-00027q-9t for patch@linaro.org; Fri, 23 Nov 2018 10:06:12 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1gQCj2-0000H3-KE for qemu-devel@nongnu.org; Fri, 23 Nov 2018 09:46:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1gQCiz-0003eJ-TT for qemu-devel@nongnu.org; Fri, 23 Nov 2018 09:46:31 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:38760) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1gQCiz-0003ar-KF for qemu-devel@nongnu.org; Fri, 23 Nov 2018 09:46:29 -0500 Received: by mail-wm1-x32b.google.com with SMTP id k198so12262466wmd.3 for <qemu-devel@nongnu.org>; Fri, 23 Nov 2018 06:46:28 -0800 (PST) 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; bh=tusyFviTXg3Z07DzPNMpcS9w3/27t1wRBGHj82A/Eoc=; b=X8pX7XW2D68tBuvkvpTczRUGbEqnYIFZ/7p2cDCqJ7fHJh3A2bHZRENZjsEFmlIzVr 3wjv5Jbik8sJVyN7BsJ1NMBu5h/zdOXNHbt4Wiv/Qtp5b7aff0SWZwmzVaAC+R3Mgsut 9BxITsXYFkCC870EQbYX9UH1yBZBFI8bUp6as= 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; bh=tusyFviTXg3Z07DzPNMpcS9w3/27t1wRBGHj82A/Eoc=; b=gXRJ/YoLpW+V41GmTqF6UWy+K9TaWBJIEXHb6IHygIfcCViIRWwhOq5yk2YodTxFMC AE0v+kIGlAebTNbAJamHenid4Wit0Sgh1PG9TT0O4PzCtsYrlnGrtWlOpo1LShwGIpDV FC21j3TDWyJsOizbil8YlbmDbeixnTraJHkFmjnq7brTI7qGxJKsh6vglkR3KFnpgzr+ KsCz9jrw/K+J64jaD6+a1Y6LwFcyQnRybtn6WqkkgpGRKlgs8EUuiTX6ancmwMuJa0rn DVUz18CitrtXBtQG1S4Ygx5uQLQpFGsq4yXLH1k3QlM+apQCxVJgcd1dcKfW3rdY1/g+ ydpA== X-Gm-Message-State: AGRZ1gIf01i90W+gLdb8X2kiLjARkorPZaZ7oP/gX+Zp2ap+YJi0NMIc PcjeiPUTflEdGisqKkApbqMslyDHf4ywDA== X-Received: by 2002:a1c:af89:: with SMTP id y131mr13886578wme.137.1542984387614; Fri, 23 Nov 2018 06:46:27 -0800 (PST) Received: from cloudburst.twiddle.net ([195.77.246.50]) by smtp.gmail.com with ESMTPSA id p74sm10339630wmd.29.2018.11.23.06.46.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Nov 2018 06:46:26 -0800 (PST) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Fri, 23 Nov 2018 15:45:49 +0100 Message-Id: <20181123144558.5048-29-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181123144558.5048-1-richard.henderson@linaro.org> References: <20181123144558.5048-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32b Subject: [Qemu-devel] [PATCH for-4.0 v2 28/37] tcg/optimize: Optimize bswap X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Alistair.Francis@wdc.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
tcg: Assorted cleanups
|
expand
|
diff --git a/tcg/optimize.c b/tcg/optimize.c index 5dbe11c3c8..6b98ec13e6 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -353,6 +353,15 @@ static TCGArg do_constant_folding_2(TCGOpcode op, TCGArg x, TCGArg y) CASE_OP_32_64(ext16u): return (uint16_t)x; + CASE_OP_32_64(bswap16): + return bswap16(x); + + CASE_OP_32_64(bswap32): + return bswap32(x); + + case INDEX_op_bswap64_i64: + return bswap64(x); + case INDEX_op_ext_i32_i64: case INDEX_op_ext32s_i64: return (int32_t)x; @@ -1105,6 +1114,9 @@ void tcg_optimize(TCGContext *s) CASE_OP_32_64(ext16s): CASE_OP_32_64(ext16u): CASE_OP_32_64(ctpop): + CASE_OP_32_64(bswap16): + CASE_OP_32_64(bswap32): + case INDEX_op_bswap64_i64: case INDEX_op_ext32s_i64: case INDEX_op_ext32u_i64: case INDEX_op_ext_i32_i64:
Somehow we forgot these operations, once upon a time. This will allow immediate stores to have their bswap optimized away. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/optimize.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.17.2