Message ID | 20181214031923.29527-27-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="YXsINChI"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43GGd03zTlz9sC7 for <incoming@patchwork.ozlabs.org>; Fri, 14 Dec 2018 14:44:20 +1100 (AEDT) Received: from localhost ([::1]:59190 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1gXeOg-0002So-3p for incoming@patchwork.ozlabs.org; Thu, 13 Dec 2018 22:44:18 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1gXe1D-0006Hv-Bj for qemu-devel@nongnu.org; Thu, 13 Dec 2018 22:20:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1gXe1C-0007iy-9w for qemu-devel@nongnu.org; Thu, 13 Dec 2018 22:20:03 -0500 Received: from mail-ot1-x330.google.com ([2607:f8b0:4864:20::330]:36807) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <richard.henderson@linaro.org>) id 1gXe1B-0007Po-W2 for qemu-devel@nongnu.org; Thu, 13 Dec 2018 22:20:02 -0500 Received: by mail-ot1-x330.google.com with SMTP id k98so4130455otk.3 for <qemu-devel@nongnu.org>; Thu, 13 Dec 2018 19:19:55 -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=YXsINChI7wUAtV2yh7yOIbcbvOU+ITA76Pb8fE3ADFZDNSeo78IXlwBtC3K67Ot8WE tIFnS+HF3q+ANT6/re0WWMEHHzfYGN6uWoPCMsdkmg5VpKElglB3qbkuSvKXLxaUCAtM D4swzQ2VsP5Ga2V/zbGIYdvzqNQtCTZhtm9zo= 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=H8iUx0L0F3w3iYtkS02uguSkod6uagJyY+rUKkitncBzEheLbWibPMzxDqM4EuYKDi 5WPHUWGsPYJD+kuVDURvRtme21Hk3RQavEjFMc9tN9bCWtpOd/F5+BZYLGCSl9TsTsqg qbZPu0QCkXPiv0T2F6rVaTrU4L9zwk4LBIWMt81CyenXNnXdOXvpSolovKJc03JZkSh+ 8cPlWQa/Ee7ORjd6WMrHCUmPI3FFa1KBtWLmmfkFSX32CNv4iotW4Lev7h7X2C3a5eHj fYOoTYNh4i2A/PmX6YagfxHTGNWAiZGgDQXXrGq1W9Np8UZ5oGgyqcRSWNaQs0rfbTwl hRQQ== X-Gm-Message-State: AA+aEWYapO7QwiMOmUNaReBippsOrAwCGTCRVxFrZdqM6ZhJtf9uRfcQ 812lXqD8d9KuFOsSKD+36z1LuGie8frqeA== X-Google-Smtp-Source: AFSGD/VZoGAKFLltrgXOc+lWj/PEU7aHLve4tmoeVP108aAWMxetX1e1HgAj7YX/Kgg2y2iW2NUxkw== X-Received: by 2002:a9d:77d4:: with SMTP id w20mr957442otl.196.1544757594343; Thu, 13 Dec 2018 19:19:54 -0800 (PST) Received: from cloudburst.twiddle.net ([187.217.227.243]) by smtp.gmail.com with ESMTPSA id g138sm2367537oib.26.2018.12.13.19.19.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Dec 2018 19:19:53 -0800 (PST) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Date: Thu, 13 Dec 2018 21:19:16 -0600 Message-Id: <20181214031923.29527-27-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181214031923.29527-1-richard.henderson@linaro.org> References: <20181214031923.29527-1-richard.henderson@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::330 Subject: [Qemu-devel] [PULL 25/32] 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
[PULL,01/32] tcg/i386: Always use %ebp for TCG_AREG0
|
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(+)