Message ID | 20241224200521.310066-11-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp4081634wrq; Tue, 24 Dec 2024 12:07:50 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCWAzws1h0Ycb1zjnFHgWqeqtu7DpRGsUFUHZOYE5RrDZ+7qkrXmJ0ebBiUVYFQ6a/F3Q9cPiA==@linaro.org X-Google-Smtp-Source: AGHT+IFI4GK1LjIgwlp09rclkUeA0hEhgavCHritiyRom2v1si9+2b6fNBe0fe/h0vBKQxI6NRgy X-Received: by 2002:a05:6214:c4b:b0:6d8:7d6b:cb78 with SMTP id 6a1803df08f44-6dd233af5dfmr311650386d6.47.1735070869856; Tue, 24 Dec 2024 12:07:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1735070869; cv=none; d=google.com; s=arc-20240605; b=LGLzg3Qk45DKxQOOm6SdvdLDX7ROAVMMGwQjWu+G2LA+SR6x/ShGOPQEw22sWkbdyF D8LqqvjNs6NFXf0SHyrj2rHIBrseox0rwWcA0gKRwNafUe1lWQ8ryQkAzpE2dn5dGXJv 6ZK8FltGIM+ayRjzMTPVfScyWIZ8XW2pnJTkC80c4/sOsxTFGAqK1Tdhd0BKNCx9xtQy z+LbWnfCx1xWaNaqz+bqDU6VW7la/+isGZV5++3hN0NDZb9aMRyAx0w0twqugMz7sii8 DZ79yGa34bUCuz+IQvFeYhcfNzu4S9w5A4OKtunK4FYSP9GborMWCiShvIgx8H4cysIo G6tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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:to:from :dkim-signature; bh=MvL7unhiDd3lPuRXr6mq82bN6R8xw9zcqDFlejItlQ8=; fh=PnYt+qEB9tAfMKoqBm2xjKOFpYyFFGPudh5cVIoieJM=; b=iHx5Z1jEaYOyJ4V1tSYtx50fWNbCxTOLXIZApPJpYvpJ8Tha6gX4cbrsFXu+SHxvz+ h5zdAuLvi0JeSHiPcMwkuKTv1IHIO7D8DCjXzVzyOFvl3NUwZZnRrBPBwnR3bDpsnVQG vWJmm1pfjHnP5PxzKs+ELC1puEK6tEL6EW873DGnbVONXp6axpFt9V8308bBm1HPCPO3 mK+Y9Xll9YiutH5TOQDeM2rUxagDj5FS7jmMxkzHbDDsxdDXW09Vc0BOXYGZ/++aId66 gwHV4cIXSDxNeXojaOeFY55RiQbz8GwW2S86cqDnSpPQdXT/zkSHnr7DjHP8XzptJvVx fqcw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YkAKyEFe; 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; dara=neutral header.i=@linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd182505e9si134285076d6.316.2024.12.24.12.07.49 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 24 Dec 2024 12:07:49 -0800 (PST) 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=YkAKyEFe; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tQB9u-0002lv-Ic; Tue, 24 Dec 2024 15:05:38 -0500 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 <richard.henderson@linaro.org>) id 1tQB9q-0002kp-TR for qemu-devel@nongnu.org; Tue, 24 Dec 2024 15:05:36 -0500 Received: from mail-pl1-x636.google.com ([2607:f8b0:4864:20::636]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>) id 1tQB9o-0002Y1-V3 for qemu-devel@nongnu.org; Tue, 24 Dec 2024 15:05:34 -0500 Received: by mail-pl1-x636.google.com with SMTP id d9443c01a7336-21649a7bcdcso57354525ad.1 for <qemu-devel@nongnu.org>; Tue, 24 Dec 2024 12:05:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1735070732; x=1735675532; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=MvL7unhiDd3lPuRXr6mq82bN6R8xw9zcqDFlejItlQ8=; b=YkAKyEFepi1p/NeYSv+IOTBD0qRrkdC9/sEd6CrACfgjNhpTEpEvXZfIdbIGtJI+kL tmD/KuAK53eZaotCkhOBWHoeYQJ05u/kIiQ8BnD51+nQDx41CgazTUvZQMahV5GZrGN6 WDHMHCXOAVzHoCrvxGDzQ0WPzg66T9G7kXO0bTrUiJ94E6AIg/QAGq6ZVi23qKwFIsuW aZj1AGl4ebudsogynIS/BHJMxniucyTCL95IIRbDu6rJL5ioTHZYO/EIs6aUNmSsK90C yyGAL1yFWK7lM0tawhauPEv7THWbIimnoU/O72ezFT1lE6oZ1pNkjXwMyZf54Lp6acLb b+kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735070732; x=1735675532; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MvL7unhiDd3lPuRXr6mq82bN6R8xw9zcqDFlejItlQ8=; b=RDLEhlX7kq/YAp40EZwuMrHWSM95/a1SgNwS36nhII+Ighil1jXfZh+XDjZQcJDusj c5bUodfNJtoxkULwxqKj4j+EsV4LPwrbjrTAV9ShJFHYisXkEibBQALm3v9jYBaFvNm/ 06oOSjMODtTbYK7lHHktFza41TLfckbkwb+VtJyW+DoHID7E3pj58GD3hOiyenbgpftz W6rfibIDCVsFLdT8+YUoCzTAPV1f810Ly6Q8+Z1HeFO7PHXYRUxN3jvvjZzwAxcBFCGx 73dE4wKkR8cs0konGtypoCu0gqwk/AmgFTQievzDqdgt56tFlbnF38scjgwIX2NLp/1b JkSw== X-Gm-Message-State: AOJu0YxibKUj8OOGAicXcUoYyt63c5aTrA9du3vaf6+urRTDLdlbCChg y0n7KGRbjZP5toam1F1gcXHrak5Dp+rSBrRxsdtdWwcj7tI3ZETtsiQXUWFCblbyIUzZB+8ZMO/ nebc= X-Gm-Gg: ASbGncuA5EJZC6SGvBe7J08SUXe2aIA3FCkY/zFptly5yR7d70orfzOB5Mu4b27wG08 WzG1XJSqBORq+BTmqJK9c97t2gW75tJQwy+S2MEqcj1t12HHC+190rf9Ec8dBXzJM8cpH6d7GM4 iIqN/bv4ODkGTXGdofNLWAC+OGO9k+PzuYC5G4oS/HYcpLyb1+BC1IqHRdsAveRceL5zT7XkTJi ecMJBXCeodQYcG9gKnm5bwoP9W9miJoZHlMIfK2aExCGe1NpQy2/u1L+AsMEvIlvZgv0zuIhDjw 9/IZdc3G8td5xoYG6noSPmGA8w== X-Received: by 2002:a05:6a00:4ac6:b0:725:e015:9090 with SMTP id d2e1a72fcca58-72abdea0803mr21685710b3a.9.1735070731748; Tue, 24 Dec 2024 12:05:31 -0800 (PST) Received: from stoup.. (syn-156-019-246-023.biz.spectrum.com. [156.19.246.23]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-72aad8fb895sm10027159b3a.162.2024.12.24.12.05.31 for <qemu-devel@nongnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Dec 2024 12:05:31 -0800 (PST) From: Richard Henderson <richard.henderson@linaro.org> To: qemu-devel@nongnu.org Subject: [PULL 10/72] tcg/optimize: Introduce const value accessors for TempOptInfo Date: Tue, 24 Dec 2024 12:04:19 -0800 Message-ID: <20241224200521.310066-11-richard.henderson@linaro.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241224200521.310066-1-richard.henderson@linaro.org> References: <20241224200521.310066-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::636; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x636.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.29 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: <https://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> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
[PULL,01/72] tests/tcg: Do not use inttypes.h in multiarch/system/memory.c
|
expand
|
diff --git a/tcg/optimize.c b/tcg/optimize.c index 26d1c5d4a1..5090f6e759 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -79,15 +79,29 @@ static inline TempOptInfo *arg_info(TCGArg arg) return ts_info(arg_temp(arg)); } +static inline bool ti_is_const(TempOptInfo *ti) +{ + return ti->is_const; +} + +static inline uint64_t ti_const_val(TempOptInfo *ti) +{ + return ti->val; +} + +static inline bool ti_is_const_val(TempOptInfo *ti, uint64_t val) +{ + return ti_is_const(ti) && ti_const_val(ti) == val; +} + static inline bool ts_is_const(TCGTemp *ts) { - return ts_info(ts)->is_const; + return ti_is_const(ts_info(ts)); } static inline bool ts_is_const_val(TCGTemp *ts, uint64_t val) { - TempOptInfo *ti = ts_info(ts); - return ti->is_const && ti->val == val; + return ti_is_const_val(ts_info(ts), val); } static inline bool arg_is_const(TCGArg arg)
Introduce ti_is_const, ti_const_val, ti_is_const_val. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- tcg/optimize.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-)