From patchwork Wed May 1 12:01:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 1930133 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=DXoyNcyo; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=patchwork.ozlabs.org) Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VTwf54gfPz1ymp for ; Wed, 1 May 2024 22:01:49 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 9871135282E7; Wed, 1 May 2024 14:01:42 +0200 (CEST) Authentication-Results: helium.openadk.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=DXoyNcyo; dkim-atps=neutral Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by helium.openadk.org (Postfix) with ESMTPS id 7CD7D35208EF for ; Wed, 1 May 2024 14:01:37 +0200 (CEST) Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-34d7b0dac54so410223f8f.0 for ; Wed, 01 May 2024 05:01:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714564896; x=1715169696; darn=uclibc-ng.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=v9grayjLXrAsvI51BhUbbbr+M0ZlzPJnWHYjpCAmUO0=; b=DXoyNcyoUOoEBHJY5UoM3n6S39VE0qZnFADucLql/T08a09e/aDBhLyE5sOulJHkct ZwestWX6db61Q8hGMr5ytPk0XyT7lFJr+SB90i4rykYUp6Jfg8drjzEifj/FLxH7ail3 dR5jV7a6LoQeP7zhdB8tRR844L6auW5VpcVvhxl3lEqkYm0rw1cQDtyixK4I4CHmXaPh MTKZ/CUioYi1alrHRYeAaurqKRfAFPk+ngDczveArCpX/I6jERkjN+pT8s23RHy5HuG2 eqc2jjzy78KBcP+zzsrM43ZWlUCjlNGSg0qjYKikOXpwsFm4HYwojwAY1pjSQKu4uBux Dx2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714564896; x=1715169696; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=v9grayjLXrAsvI51BhUbbbr+M0ZlzPJnWHYjpCAmUO0=; b=SLVHdU+oC4BUqonBGzmclrC3dVsKSL/Q44EspjXig0TCcRcE9661Bn2Pt6OASyAN+2 OqSWwl9NAkAqecE52OmDzVKIhj4ghrP7LGh2JUf6dJbs/ipgN/xGZ0S48OdL7Zr/HqN5 sOeB8wbmw/qnPUDi3tDdLFJ4MRX+oAsHiRzwskLuTnHB0nTE4rKVm1ttxqmkmJdINNj6 9sL95Femf8fbAVxBms8Ugk1uqyE5Q+xggjiRJVr99J7alf4JsjaViNEXNdffKq9eMxek NweSSnCD5VNC2g22KggufZoT3IXrC3zobjOAG5e3gnPOOwhp2j9Kh8BdkAOE9/zTQoyV pCtw== X-Gm-Message-State: AOJu0YxkH/IcjzAqWXpyH7wfXEyGRt96ep0n2GfKoRBIquvTPMqQOC/n G63D67g9szgyzKLgERoNVOkeQJIfaC6JmLbCMvAPiJVL4mQklm8I1L5R5w== X-Google-Smtp-Source: AGHT+IHoutobTfKftX3+XDpuPjUQqgCDuBrKq55m2EPx04k4eZBaHNtXwKqX6dVkzB4G15s3vA+Aeg== X-Received: by 2002:adf:e7c1:0:b0:34d:ab1a:6384 with SMTP id e1-20020adfe7c1000000b0034dab1a6384mr2300121wrn.13.1714564895787; Wed, 01 May 2024 05:01:35 -0700 (PDT) Received: from octofox.metropolis (77-46-212-180.dynamic.isp.telekom.rs. [77.46.212.180]) by smtp.gmail.com with ESMTPSA id l10-20020a5d410a000000b00343d1d09550sm34252714wrp.60.2024.05.01.05.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 05:01:35 -0700 (PDT) From: Max Filippov To: devel@uclibc-ng.org Date: Wed, 1 May 2024 05:01:22 -0700 Message-Id: <20240501120122.1124348-1-jcmvbkbc@gmail.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Message-ID-Hash: R6CJUN43FAVLLAGRVMVVY2I7UCD4KIE3 X-Message-ID-Hash: R6CJUN43FAVLLAGRVMVVY2I7UCD4KIE3 X-MailFrom: jcmvbkbc@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list Subject: [uclibc-ng-devel] [PATCH] xtensa: use compiler-provided XCHAL macros List-Id: uClibc-ng Development Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Starting with gcc-13 the compiler provides configuration-specific macro definitions for the target xtensa core. Use them when available instead of the configuration overlay file xtensa-config.h Signed-off-by: Max Filippov --- .../sysdeps/linux/xtensa/bits/xtensa-config.h | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libc/sysdeps/linux/xtensa/bits/xtensa-config.h b/libc/sysdeps/linux/xtensa/bits/xtensa-config.h index b99928b1e058..bfcd571d26e2 100644 --- a/libc/sysdeps/linux/xtensa/bits/xtensa-config.h +++ b/libc/sysdeps/linux/xtensa/bits/xtensa-config.h @@ -32,21 +32,41 @@ macros. */ #undef XCHAL_HAVE_NSA +#ifdef __XCHAL_HAVE_NSA +#define XCHAL_HAVE_NSA __XCHAL_HAVE_NSA +#else #define XCHAL_HAVE_NSA 1 +#endif #undef XCHAL_HAVE_LOOPS +#ifdef __XCHAL_HAVE_LOOPS +#define XCHAL_HAVE_LOOPS __XCHAL_HAVE_LOOPS +#else #define XCHAL_HAVE_LOOPS 1 +#endif /* Assume the maximum number of AR registers. This currently only affects the __window_spill function, and it is always safe to flush extra. */ #undef XCHAL_NUM_AREGS +#ifdef __XCHAL_NUM_AREGS +#define XCHAL_NUM_AREGS __XCHAL_NUM_AREGS +#else #define XCHAL_NUM_AREGS 64 +#endif #undef XCHAL_HAVE_S32C1I +#ifdef __XCHAL_HAVE_S32C1I +#define XCHAL_HAVE_S32C1I __XCHAL_HAVE_S32C1I +#else #define XCHAL_HAVE_S32C1I 1 +#endif #undef XCHAL_HAVE_EXCLUSIVE +#ifdef __XCHAL_HAVE_EXCLUSIVE +#define XCHAL_HAVE_EXCLUSIVE __XCHAL_HAVE_EXCLUSIVE +#else #define XCHAL_HAVE_EXCLUSIVE 0 +#endif #endif /* !XTENSA_CONFIG_H */