From patchwork Mon Aug 7 11:07:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Arsen_Arsenovi=C4=87?= X-Patchwork-Id: 131879 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1402491vqr; Mon, 7 Aug 2023 05:12:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGbQEUBEQm3E6tPwxJJoPETpEi+qviziTnbb5JajZ01y9jk4RyU/dtgXWI5OZv21coPi4k3 X-Received: by 2002:a05:6402:3da:b0:522:2782:537 with SMTP id t26-20020a05640203da00b0052227820537mr7186112edw.15.1691410329465; Mon, 07 Aug 2023 05:12:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691410329; cv=none; d=google.com; s=arc-20160816; b=z+BUqQDh/iYWC58pnjZngdy3b9PH9ecH8KtB/Lbt8v44daDlYZ7KjU6nuX2zToAcU6 oHxlaAQPmiLN1g1nbTOVvW/752Gsmc80UTtV+34ivj1f8Y6Iu+thvgpfQeUtikc4iQhT 4xSIaV97aEf6EgrG1mYduc2XVdCt01q1y0rr/LuT5tuEyZ7SczTCoeeNz+yorUsLXnVO 0+3bvj/SxSOYjHv7juAnZXtB5VtsXcNjZBfXyuJvPJtcbQFHBt0iULQ678O8PA2BsxGI wx95q9+TDLUlcDEUPCMynzIUdTxS8PKHPc5mVZJ7ynKO8qs3IOzm03GViogE33swPdBM XjtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from: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:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=kX39zaC+Rb9jcJDntmtQPYMTzxNvY7IsFri59+EpFa0=; fh=D291J7YVlE0aBpdj5MNAW7T9XuG3a7We39B9ME8rjjY=; b=lPLrtVBBg817tPi/QycksZAmsvZs9GtcYVCVs7nxFqdzSm0/SwY9kS1zARjYt/Z4Nq aUNZbcDYtPJqUF5SIaA+VidyAAlEZrnV8E84E9dot9Uwv6IYw3whSMFQxgvFx0ERAK4F TQNC9+kzr6z6c7DEmx3pFgbIZu09eIZiWzX/ciwLOzqcyE1iWfqpMbBWqBc3B3SHsj6K 00I/Xl3zUv+jivZUV1JZ2rs+nn9ncX0jnXfZhAB/pCTzxOaB0KQz7/bsQcAUKu2noBOI uAwBh5IxZUelRWhG/dRm8ME/oNrSg+yzDix/q/02XVJJcJ6M6hoiKAQ2Mm6BKdFQBUYG wNtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="EyV/pAGo"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id a7-20020aa7d907000000b0051e28ec9d30si5769660edr.665.2023.08.07.05.12.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Aug 2023 05:12:09 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="EyV/pAGo"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8711E3833CEF for ; Mon, 7 Aug 2023 11:43:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8711E3833CEF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691408622; bh=kX39zaC+Rb9jcJDntmtQPYMTzxNvY7IsFri59+EpFa0=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=EyV/pAGo5abmNq+D3/ygX4rtYuUsTdLtRKzyXUPal+5H1Zl0ooAwpvgIh+GdixM9W vuiqROIjek4/kI8RoIavKWe5Ttbum1XGcGNgq6GxEs7cJjWFSf/mQsHuvF9qJa0ffN JKJvNcg17lSmEf1TBTs5BgRDFaVrAIbGRWGSD5Pk= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by sourceware.org (Postfix) with ESMTPS id D9FEA3857723; Mon, 7 Aug 2023 11:19:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D9FEA3857723 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:b231:465::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4RKDP82S0sz9sRD; Mon, 7 Aug 2023 13:19:40 +0200 (CEST) To: gdb-patches@sourceware.org, binutils@sourceware.org Cc: Max Filippov Subject: [PATCH 27/45] gcc: xtensa: add XCHAL_HAVE_{CLAMPS, DEPBITS, EXCLUSIVE, XEA3} to dynconfig Date: Mon, 7 Aug 2023 13:07:30 +0200 Message-ID: <20230807111029.2320238-28-arsen@aarsen.me> In-Reply-To: <20230807111029.2320238-1-arsen@aarsen.me> References: <20230807111029.2320238-1-arsen@aarsen.me> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4RKDP82S0sz9sRD X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_INFOUSMEBIZ, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Arsen_Arsenovi=C4=87_via_Binutils?= From: =?utf-8?q?Arsen_Arsenovi=C4=87?= Reply-To: =?utf-8?q?Arsen_Arsenovi=C4=87?= Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773572277313316684 X-GMAIL-MSGID: 1773572277313316684 From: Max Filippov include/ * xtensa-dynconfig.h (xtensa_config_v3): New struct. (xtensa_get_config_v3): New declaration. (XCHAL_HAVE_CLAMPS, XCHAL_HAVE_DEPBITS, XCHAL_HAVE_EXCLUSIVE) (XCHAL_HAVE_XEA3, XTENSA_CONFIG_V3_ENTRY_LIST): New definitions. (XTENSA_CONFIG_INSTANCE_LIST): Add xtensa_config_v3 instance. (XTENSA_CONFIG_ENTRY_LIST): Add XTENSA_CONFIG_V3_ENTRY_LIST. --- include/xtensa-dynconfig.h | 50 +++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/include/xtensa-dynconfig.h b/include/xtensa-dynconfig.h index b6b02186413..19e42349510 100644 --- a/include/xtensa-dynconfig.h +++ b/include/xtensa-dynconfig.h @@ -104,11 +104,20 @@ struct xtensa_config_v2 int xtensa_march_earliest; }; +struct xtensa_config_v3 +{ + int xchal_have_clamps; + int xchal_have_depbits; + int xchal_have_exclusive; + int xchal_have_xea3; +}; + extern const void *xtensa_load_config (const char *name, const void *no_plugin_def, const void *no_name_def); extern const struct xtensa_config_v1 *xtensa_get_config_v1 (void); extern const struct xtensa_config_v2 *xtensa_get_config_v2 (void); +extern const struct xtensa_config_v3 *xtensa_get_config_v3 (void); #ifdef XTENSA_CONFIG_DEFINITION @@ -180,6 +189,22 @@ extern const struct xtensa_config_v2 *xtensa_get_config_v2 (void); #define XTENSA_MARCH_EARLIEST 0 #endif +#ifndef XCHAL_HAVE_CLAMPS +#define XCHAL_HAVE_CLAMPS 0 +#endif + +#ifndef XCHAL_HAVE_DEPBITS +#define XCHAL_HAVE_DEPBITS 0 +#endif + +#ifndef XCHAL_HAVE_EXCLUSIVE +#define XCHAL_HAVE_EXCLUSIVE 0 +#endif + +#ifndef XCHAL_HAVE_XEA3 +#define XCHAL_HAVE_XEA3 0 +#endif + #define XTENSA_CONFIG_ENTRY(a) a #define XTENSA_CONFIG_V1_ENTRY_LIST \ @@ -243,17 +268,27 @@ extern const struct xtensa_config_v2 *xtensa_get_config_v2 (void); XTENSA_CONFIG_ENTRY(XTENSA_MARCH_LATEST), \ XTENSA_CONFIG_ENTRY(XTENSA_MARCH_EARLIEST) +#define XTENSA_CONFIG_V3_ENTRY_LIST \ + XTENSA_CONFIG_ENTRY(XCHAL_HAVE_CLAMPS), \ + XTENSA_CONFIG_ENTRY(XCHAL_HAVE_DEPBITS), \ + XTENSA_CONFIG_ENTRY(XCHAL_HAVE_EXCLUSIVE), \ + XTENSA_CONFIG_ENTRY(XCHAL_HAVE_XEA3) + #define XTENSA_CONFIG_INSTANCE_LIST \ const struct xtensa_config_v1 xtensa_config_v1 = { \ XTENSA_CONFIG_V1_ENTRY_LIST, \ }; \ const struct xtensa_config_v2 xtensa_config_v2 = { \ XTENSA_CONFIG_V2_ENTRY_LIST, \ +}; \ +const struct xtensa_config_v3 xtensa_config_v3 = { \ + XTENSA_CONFIG_V3_ENTRY_LIST, \ } #define XTENSA_CONFIG_ENTRY_LIST \ XTENSA_CONFIG_V1_ENTRY_LIST, \ - XTENSA_CONFIG_V2_ENTRY_LIST + XTENSA_CONFIG_V2_ENTRY_LIST, \ + XTENSA_CONFIG_V3_ENTRY_LIST #else /* XTENSA_CONFIG_DEFINITION */ @@ -432,6 +467,19 @@ const struct xtensa_config_v2 xtensa_config_v2 = { \ #undef XTENSA_MARCH_EARLIEST #define XTENSA_MARCH_EARLIEST (xtensa_get_config_v2 ()->xtensa_march_earliest) + +#undef XCHAL_HAVE_CLAMPS +#define XCHAL_HAVE_CLAMPS (xtensa_get_config_v3 ()->xchal_have_clamps) + +#undef XCHAL_HAVE_DEPBITS +#define XCHAL_HAVE_DEPBITS (xtensa_get_config_v3 ()->xchal_have_depbits) + +#undef XCHAL_HAVE_EXCLUSIVE +#define XCHAL_HAVE_EXCLUSIVE (xtensa_get_config_v3 ()->xchal_have_exclusive) + +#undef XCHAL_HAVE_XEA3 +#define XCHAL_HAVE_XEA3 (xtensa_get_config_v3 ()->xchal_have_xea3) + #endif /* XTENSA_CONFIG_DEFINITION */ #ifdef __cplusplus