From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) by sourceware.org (Postfix) with ESMTPS id D6FCB3858417 for ; Mon, 23 Aug 2021 12:23:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D6FCB3858417 Received: by mail-pj1-x1032.google.com with SMTP id 28-20020a17090a031cb0290178dcd8a4d1so13287450pje.0 for ; Mon, 23 Aug 2021 05:23:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RgYQES1kgan+v4ZfcQalgBUGVNiB0ILZsIUlKTSgWbk=; b=KVvlG5NPgF7QcccrLYpA687MhbdCxcAfHPs453phHpQkSt8Dx3U51naW+aO6XwGGX9 xslqRA04HDeY/mQKA6q9bpVF1QQfJhBWCSltLK7tnVAg2BpVkR81DLl9bzRUkr8p7zn6 FqGo3txainSevDtWZHVDGmSgAuAU9uKU97JKLIi+Y+nURp+Z3nNph6QlFKhoA0Qv5ePU XVq63KyolH2yR7lyVZbOvvGrVVusWH2PvFnT09RbGR+5BHnCSdwFHHU2m47MdRpUWDck uVNBKzfUmqKq8v1zq0FBffzsk3ZDIFK+HVixCleJx3/0hGdtFNfjcvAplEjvV8CI5MEN 748w== X-Gm-Message-State: AOAM533cIir/RKVXxr9PsVTszoUHkwWXcay/xxZHU8qFIXzn0es3Vr8P Dacz6AsO0join/wcyzYR3oJro10EAdK+aw== X-Google-Smtp-Source: ABdhPJyXagFR8gFmJ8iMsFqQVU6SMcl1TmXxpIqm6J4CoCL/1EFoZjOp0P6DXy1LhCo+UHQzNFz8MA== X-Received: by 2002:a17:90a:890a:: with SMTP id u10mr19264616pjn.40.1629721426857; Mon, 23 Aug 2021 05:23:46 -0700 (PDT) Received: from ?IPv6:2804:431:c7ca:cd83:c38b:b50d:5d9a:43d4? ([2804:431:c7ca:cd83:c38b:b50d:5d9a:43d4]) by smtp.gmail.com with ESMTPSA id q29sm16819485pfl.142.2021.08.23.05.23.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 23 Aug 2021 05:23:46 -0700 (PDT) Subject: Re: Twiddling with 64-bit values as 2 ints; To: Stefan Kanthak , libc-help@sourceware.org References: <4DD65B114A174A35AC6960DD2104BDE7@H270> From: Adhemerval Zanella Message-ID: <4c8ee26d-764e-736f-c3d6-5728e54c4c0f@linaro.org> Date: Mon, 23 Aug 2021 09:23:44 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <4DD65B114A174A35AC6960DD2104BDE7@H270> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-help@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-help mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2021 12:23:58 -0000 On 21/08/2021 10:34, Stefan Kanthak wrote: > > (Heretic.-) questions: > - why does glibc still employ such ugly code? > - Why doesn't glibc take advantage of 64-bit integers in such code? Because no one cared to adjust the implementation. Recently Wilco has removed a lot of old code that still uses 32-bit instead of 64-bit bo bit twinddling in floating-pointer implementation (check caa884dda7 and 9e97f239eae1f2). I think we should move to use a simplest code assuming 64-bit CPU and let the compiler optimize it (which unfortunately gcc is not that smart in all the cases).