From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x231.google.com (mail-oi1-x231.google.com [IPv6:2607:f8b0:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id 64CD93858412 for ; Mon, 24 Oct 2022 14:10:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 64CD93858412 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oi1-x231.google.com with SMTP id j188so10945800oih.4 for ; Mon, 24 Oct 2022 07:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=8fBWhyrWlDAghd6XtVb16qgdZGm8KIMMtQpFPX2WTPM=; b=CvkK9A/Nr9/xWKosG8sOBPy6bjfBp/rBATbVoIgxCdBliI+9kJl5qLnrRxA05/MQRv 5ZuFuyrUfhTwGykMkzWSCrpUMnsho3mqUBlalRJPwkqUhMRCy0ND++C8Yuocz9UaFwdJ DWWE6uDnC7/9cZc/m+p1ubuY0QG3MmOiW1xgaTi36j0GySFJjO/pfYCEYHXBKMgOpRBY irk6kAmgEAP21SOVwYU3+JQtWalELDXCcyhWDsPivJ6acXacA4oapPcLSNkFP9crT7/X MMPw+LNjmftYDk96ZFfdIm+XLEkuksBUoS3hvP5qVlU4w9WIdTcW3tpG0MFs4bCLKvOx RVyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=8fBWhyrWlDAghd6XtVb16qgdZGm8KIMMtQpFPX2WTPM=; b=TlXkc8uuuV3IuxyJSKuOGgwG3Y6EOaQPzjnST0a814A+Ym2PCQ34sdZHHoDYpzCSDn sOkBD4HgSZFveGurnpmErb/C+6OW0bBFnbue5DbJirobietNlO2TCpH0kuW/5toQLhu9 vxPnGci5I6o15QTGo/26MO7Zq22yaH9EOQkqnIDTM9oO45wo+5jl3pVF8Hi5quAgN3Nq TAMenHyAjrsnjTReR18d+1wVuo4/MMtYb87zQXSDzrJAqHzzpBlX92l6BXvjv6kvTnY4 Af+RtRQ8iPF5cJDC7IgLQ5QqQeMwUl2qQMNcv/yd+ZzSU+V6MQAxXnmr/VRPfnd6veo+ fPuw== X-Gm-Message-State: ACrzQf0H9g3dgsUcKN573UYahcJEyUNA3pDIRcCDZ4d0oVzxNHjjrt9f F0gAcPiBMwxnabC3BsX7jPY+LRh5Epwn4TTu X-Google-Smtp-Source: AMsMyM6dcJ1W87v380Te8sSmybwB59sAj0cyYwoGRpWgbQVJL/tG6MQ/BwFl6TDO0e/gjPg11zX0eQ== X-Received: by 2002:a54:4482:0:b0:354:7f9d:5e7 with SMTP id v2-20020a544482000000b003547f9d05e7mr16573872oiv.242.1666620604585; Mon, 24 Oct 2022 07:10:04 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c0:17c8:44f6:f713:4bf:c2aa? ([2804:1b3:a7c0:17c8:44f6:f713:4bf:c2aa]) by smtp.gmail.com with ESMTPSA id a4-20020a056808128400b00349a06c581fsm4136162oiw.3.2022.10.24.07.10.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Oct 2022 07:10:03 -0700 (PDT) Message-ID: Date: Mon, 24 Oct 2022 11:10:00 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH] longlong.h: update from GCC for LoongArch clz/ctz support Content-Language: en-US To: Xi Ruoyao , libc-alpha@sourceware.org Cc: Wang Xuerui , Joseph Myers , caiyinyu References: <20221015061212.23105-1-xry111@xry111.site> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20221015061212.23105-1-xry111@xry111.site> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,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 List-Id: On 15/10/22 03:12, Xi Ruoyao via Libc-alpha wrote: > Update longlong.h to GCC r13-3269. Keep our local change (prefer https > for gnu.org URL). LGTM, it matches gcc commit 6f653a2c85a450714bac905ea4f153234bc6cd5f. Reviewed-by: Adhemerval Zanella > --- > stdlib/longlong.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/stdlib/longlong.h b/stdlib/longlong.h > index 9b89469ac2..d8f76a43b5 100644 > --- a/stdlib/longlong.h > +++ b/stdlib/longlong.h > @@ -593,6 +593,18 @@ extern UDItype __umulsidi3 (USItype, USItype); > #define UMUL_TIME 14 > #endif > > +#ifdef __loongarch__ > +# if W_TYPE_SIZE == 32 > +# define count_leading_zeros(count, x) ((count) = __builtin_clz (x)) > +# define count_trailing_zeros(count, x) ((count) = __builtin_ctz (x)) > +# define COUNT_LEADING_ZEROS_0 32 > +# elif W_TYPE_SIZE == 64 > +# define count_leading_zeros(count, x) ((count) = __builtin_clzll (x)) > +# define count_trailing_zeros(count, x) ((count) = __builtin_ctzll (x)) > +# define COUNT_LEADING_ZEROS_0 64 > +# endif > +#endif > + > #if defined (__M32R__) && W_TYPE_SIZE == 32 > #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ > /* The cmp clears the condition bit. */ \