From patchwork Thu Oct 6 03:44:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 612889 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp1211501pvb; Wed, 5 Oct 2022 21:12:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7HWmHgIjPrPV0BXrXlU17pKyNMOtC/Es12Du9xj8O5o8FzEgYe87dP2NYQJZ8mEQ5IF6Xf X-Received: by 2002:a05:620a:1593:b0:6e4:32f9:10e6 with SMTP id d19-20020a05620a159300b006e432f910e6mr1839396qkk.767.1665029557697; Wed, 05 Oct 2022 21:12:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665029557; cv=none; d=google.com; s=arc-20160816; b=lnlnNRgH419ZfECZnPQXchErXyeR/1cyQxjPGGWl0+bto2qtOzlx1A42y6uCsyTcHm p4Rvl8M0FqOrdMW8yT9Bw0GEb9us5G0K0DFP/mOu/zVQnAoKvfofAjZpFIsUWZFtsy4K tmF/+Sh1+juF7b+Hookn0AYfGJuUm3D7xmIYA7p3vWZYCDTA03QUYq71kIh3hfHTSs3n ZpitO9PgvxtyMykndL8CSZfmj2ZU1IznwkWLHLIZQyGNTCBJOYUdhr8ah0sPkIk14sRc LaqD3lsf+X/3NGMPwpPpV9Wo0moy1c/CxkHXoaQyZ+U8EN1uzVVfOgkCh9qwHpVq9eEN nUNg== 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=dymtBTjNDFvkVseJCTMJpwyHfk/v6x0F+7yT+M5DpeU=; b=eGys0Tnd8VSDUIrbxP59InuF8Zu/PKqXKG+hh3ZM+U+2l+47Q53ZxJqj0nGpW72XL7 TgTEXqwN9YSE4VVhUcLruj0jOMTDKKTwlWmGSDXfr1MKT3E8Uu7Dibdjti5p/ECjILNC GnQqk3/JdA3tQh9/WMj3LmxSWgvRLVbkI0A0k6VOp8WC0Uh4sHdnufPKyACnC/B6u1A/ DBD0VgromSjRtwaxx00ezOxCzTGTnVGhCfTovM2mq7ADRZgF/mgDVJ79o2bMbGODBQIB 0VO9XChYNh4/GInXA7JWt4jiCbYNG6wlJ0SGIjlvwgd2rHiRqX9T1C0xNulK8SZIhBbM K/Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oRn4GGuY; 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 if13-20020a0562141c4d00b004966556c2desi3190176qvb.184.2022.10.05.21.12.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 05 Oct 2022 21:12:37 -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=oRn4GGuY; 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]:46164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ogIFR-0007Vx-7e for patch@linaro.org; Thu, 06 Oct 2022 00:12:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50938) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ogHoa-0004Mx-Dn for qemu-devel@nongnu.org; Wed, 05 Oct 2022 23:44:52 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:33597) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ogHoX-0003zg-D4 for qemu-devel@nongnu.org; Wed, 05 Oct 2022 23:44:52 -0400 Received: by mail-pj1-x1032.google.com with SMTP id n18-20020a17090ade9200b0020b0012097cso1009941pjv.0 for ; Wed, 05 Oct 2022 20:44:47 -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=dymtBTjNDFvkVseJCTMJpwyHfk/v6x0F+7yT+M5DpeU=; b=oRn4GGuY+A/QoidPix4q4HRHXppdiW6Q+9V/dzObUiJAJgN5vB6YxaWdGp+Pmv1uYT VHGXac3b8hleEP4eUI2SROmHH2WPX2SOL6z0x0WI+9pyMdI6jbdk4YUdCbDUJ8BHQjMb +6MKtAMCNZEUm8uVs+089mpcTutodiv/dabS9Ws0nCDKfYHIu58UabPiDA0zSAiALK+a p1pD5L7DAKA1PGQsxSvPhJMYXB4Zv3xtauGS//r0PEXLU9pP+Td7qewG1EcmepyZwVSN G3q8lZsPiTUIe0KpZTmcYCPors/GJa3Hgl0wlRb+kXn35Cw1jxKwyuiDqTpfIiTnNjlM izjw== 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=dymtBTjNDFvkVseJCTMJpwyHfk/v6x0F+7yT+M5DpeU=; b=i0xcwODsVEHpufVz6YuBGZ5BcS3gZsv88R8zFA+dRqR/b65q0VcYPx6oHsRXtQZcaQ KZJj5/ZLJ9AtRjn47jfUDTLx7b+dxpXGmmErpitUnWG6EQCt+Qfdn0d6CAfG7JouxqjS 2rtqZrEytfegDIBRUJ4DlIuJhWsuld2WrajawzJ4j4wXi+MkoASjvTMUIBVZUCzVPVXL RfvPLf+VsPdd7+SrVj3S+HSlprw+LZwKXWrc4uEdu41Ald4/Zh3hmk50hSo9c/Wb5byK PDo6J4RcZEHy5b6UuKtWDRzTa7LmUt3q9F+t6Du2eLjRb/hU/MPweMpdMU1H8K8aZN/l eJ9g== X-Gm-Message-State: ACrzQf0AAqmLuUBVAPJa5+BFmqGRUZmHZmd34Z+Q/EenQ+gRXm7BAQ2S MoOZXJhsEktagSp+7S24JZ4ljIULIByHMA== X-Received: by 2002:a17:90b:1b06:b0:202:c7c2:b66d with SMTP id nu6-20020a17090b1b0600b00202c7c2b66dmr3020498pjb.77.1665027886775; Wed, 05 Oct 2022 20:44:46 -0700 (PDT) Received: from stoup.. ([2602:47:d49d:ec01:9ad0:4307:7d39:bb61]) by smtp.gmail.com with ESMTPSA id y6-20020a17090ad0c600b00205f4f7a3b3sm1905086pjw.21.2022.10.05.20.44.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Oct 2022 20:44:46 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH 25/26] tcg: Introduce tcg_temp_is_normal_* Date: Wed, 5 Oct 2022 20:44:20 -0700 Message-Id: <20221006034421.1179141-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221006034421.1179141-1-richard.henderson@linaro.org> References: <20221006034421.1179141-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1032.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=unavailable 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. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich --- 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 3835711d52..0659c465da 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) {