From patchwork Tue Sep 6 10:17:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 603036 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:4388:0:0:0:0 with SMTP id w8csp4465313mae; Tue, 6 Sep 2022 05:06:31 -0700 (PDT) X-Google-Smtp-Source: AA6agR5//R/xn26abQq0bbr9bnGRz0hDtqTm15AJ0oFob9Foz16HGGRiOJLxD7fSZqM4Tq3ys4Jj X-Received: by 2002:ac8:578c:0:b0:344:9333:7dee with SMTP id v12-20020ac8578c000000b0034493337deemr43499312qta.177.1662465991272; Tue, 06 Sep 2022 05:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662465991; cv=none; d=google.com; s=arc-20160816; b=lnN8J/UiV2wcZ6Ylndjg9WNKMJKhFnY6O+Zahqd5pdKOzgw/G42wHd0etOPNRcCyUS k8B1qEdrtusqwGIy6ruduKN+WaAPGiQSUPJvkftab1gpzymUJX8+T8BLJ6a31wZ4KoMH hVXYFs24i56RSNsjrebvPxRWdHyB00y8kHRwcNIMm51FobZFh+O62ZFzngasZD6SA13a UGoTXGlmDcIi/suEyzJdFaYhPMvbh1HdLZPVtdsfww4RUP8wXJnnt2oR9XQjFrJG+Lt4 pI+bgLaiojJS3xMz0dhvlPprQhKuDPkXGXE3Wd58YgjejyM8pW2tlGr02gZ+0E7K0Bho 6swg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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:cc:to :from:dkim-signature; bh=TX1smXvv0vZH8BGSs3ForgPhQTaJXwq4cozeOtT/Nb0=; b=D2aNTaglZgb469rvR/kxH86PWupgzqxZODl62IzglUipWVKeBpnZFnoZZ3zOhA7lbQ 3OIKkQKk6dXUP6PLpcsDcC43OdNx2F/5nXbqmOCJ1YHuTahcQowcKq1lqhV417WvHmrY rD+lyt3G8efjyBw3laM6lyfquW7yL4JKy1LSkbykuSenh3GxR6dHZkfuOQWLdVhsosVf nzBZr4pSMSW5FoLAjDPOzKKlk/vtXFjX6aQ5MssmhZMFblCXkGvdqk4LJxXRq6zT0G/g zqTIA+bA6N0v8PwS6XXC8Pww5pTB6YFkBBujxTmkGNGHW4/92jV9ojUG1LRc/UOZUlLX Hi5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kvbZObAo; 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 x4-20020a379504000000b006b8d35bb0a6si6539061qkd.506.2022.09.06.05.06.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Sep 2022 05:06:31 -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=kvbZObAo; 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]:59644 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVXLZ-00041O-8k for patch@linaro.org; Tue, 06 Sep 2022 08:06:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46498) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVVeu-0003WQ-Dz for qemu-devel@nongnu.org; Tue, 06 Sep 2022 06:18:20 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:34383) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVVeq-0005B2-CZ for qemu-devel@nongnu.org; Tue, 06 Sep 2022 06:18:20 -0400 Received: by mail-wr1-x433.google.com with SMTP id e13so14709861wrm.1 for ; Tue, 06 Sep 2022 03:18:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=TX1smXvv0vZH8BGSs3ForgPhQTaJXwq4cozeOtT/Nb0=; b=kvbZObAoNmCGjOKFYG7Shn+dxy+oN60XQFR+NP2NhIzbYUiC/EkDPuoWoQpmIAxg6L TLbj4o52/Gyj9YSjALTcEABwQHyhz0NaH2gIaULCLzpxnfhkhfy2yhKCJ421mKL8FEYo jDZniRQ7vUW5yK9f+6evMSvxS6Or/0JgrMjKDkXIMcZb86uAOENsRE6hLPtizrdLvJ5B cwlGghS2oA53YdyfmqV/SIacOqAlyNy94AOLaEjcggdrvJpRKLKLI8NJn4AiKZZ4G5te Ezd5lZ4vSwo7zAMZ5etvo7fcld3pwKtrnzCuIN9nczbdq4x1tLZFnlerkVw/2JuEheRx fPIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=TX1smXvv0vZH8BGSs3ForgPhQTaJXwq4cozeOtT/Nb0=; b=6ol4v+Vi7eJv2Q31WLn4ZZydJMFCWDT3ceWr78gbB3sCO/66Em4FYlrWv7SzN4rxfJ tTgxyYWf/GqYVCLd+GtlYhkSS77RqykcS07ahBLiZHkz9yX3ofn7OASg/DGWfTbXpQPd S/vXMGGVFFjEF+4sFA76/DfSxvklMFZTNcA93KHJaXMVnpGbYzQ4w7Y+p8+IFMYE2wIx Y05rBI6iCcGkc9HPZFxI74nZ0KIUxd1TYXRHzize2VKaSyaamEtc/uBIXi64KVPeaUCa GHzCgoT/p2gLpCAdHWjcOSuaaZgn9mUIdCh0sYKPiNznFh7Yxil6zwQC+EWUYdYHpj+q cLgQ== X-Gm-Message-State: ACgBeo2lkN3KBYwAyMPfES65p05WLl/VSbEPQ5bpsruV3x9vxVR8hhKU vPedopLOWBI/0OtM2dKghLs+ggPrs7Gtrpvo X-Received: by 2002:a05:6000:1446:b0:222:c466:58a0 with SMTP id v6-20020a056000144600b00222c46658a0mr27794712wrx.53.1662459495344; Tue, 06 Sep 2022 03:18:15 -0700 (PDT) Received: from localhost.localdomain ([2a02:8084:a5c0:5a80:ba98:3a71:8524:e0b1]) by smtp.gmail.com with ESMTPSA id y16-20020a05600c365000b003a62bc1735asm14094361wmq.9.2022.09.06.03.18.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Sep 2022 03:18:14 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org Subject: [PATCH v1 25/26] tcg: Introduce tcg_temp_is_normal_* Date: Tue, 6 Sep 2022 11:17:46 +0100 Message-Id: <20220906101747.344559-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220906101747.344559-1-richard.henderson@linaro.org> References: <20220906101747.344559-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-wr1-x433.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, T_SCC_BODY_TEXT_LINE=-0.01 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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Allow targets to determine if a given temp will die across a branch. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- include/tcg/tcg-op.h | 2 ++ include/tcg/tcg.h | 15 +++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h index 0ebbee6e24..4b06895a32 100644 --- a/include/tcg/tcg-op.h +++ b/include/tcg/tcg-op.h @@ -850,6 +850,7 @@ static inline void tcg_gen_plugin_cb_end(void) #define tcg_temp_local_new() tcg_temp_local_new_i32() #define tcg_temp_ebb_new() tcg_temp_ebb_new_i32() #define tcg_temp_free tcg_temp_free_i32 +#define tcg_temp_is_normal tcg_temp_is_normal_i32 #define tcg_gen_qemu_ld_tl tcg_gen_qemu_ld_i32 #define tcg_gen_qemu_st_tl tcg_gen_qemu_st_i32 #else @@ -858,6 +859,7 @@ static inline void tcg_gen_plugin_cb_end(void) #define tcg_temp_local_new() tcg_temp_local_new_i64() #define tcg_temp_ebb_new() tcg_temp_ebb_new_i64() #define tcg_temp_free tcg_temp_free_i64 +#define tcg_temp_is_normal tcg_temp_is_normal_i64 #define tcg_gen_qemu_ld_tl tcg_gen_qemu_ld_i64 #define tcg_gen_qemu_st_tl tcg_gen_qemu_st_i64 #endif diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index 546cb3d9d7..c766e45242 100644 --- a/include/tcg/tcg.h +++ b/include/tcg/tcg.h @@ -871,6 +871,21 @@ static inline void tcg_temp_free_vec(TCGv_vec arg) tcg_temp_free_internal(tcgv_vec_temp(arg)); } +static inline bool tcg_temp_is_normal_i32(TCGv_i32 arg) +{ + return tcgv_i32_temp(arg)->kind == TEMP_NORMAL; +} + +static inline bool tcg_temp_is_normal_i64(TCGv_i64 arg) +{ + return tcgv_i64_temp(arg)->kind == TEMP_NORMAL; +} + +static inline bool tcg_temp_is_normal_ptr(TCGv_ptr arg) +{ + return tcgv_ptr_temp(arg)->kind == TEMP_NORMAL; +} + static inline TCGv_i32 tcg_global_mem_new_i32(TCGv_ptr reg, intptr_t offset, const char *name) {