From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 989EA3858C52 for ; Sat, 4 Feb 2023 16:31:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 989EA3858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x633.google.com with SMTP id e19so231188plc.9 for ; Sat, 04 Feb 2023 08:31:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=fAdczH7GuHjCoOlSNvJmTyXc+U/uE6wDDv67a8lTqL0=; b=K2MPZ/XMebOVelFDl0b0AiyRBjSRI40H9M5c6eu0Vy8xY6CfEZbroU1eLA8FqV6Slu xMnI5QtasU24WqrQco0YnTeDM5RNdq9dpbtY3PU8AlRbQqYU6/njP83Ypq4yg5VNUsUM Md8mGmFQAr6aOxvr7Cf52VnwczthIi1DoY3umD+nl2fZN2cJ30CB2ypS4kEluLP4pPYm iPs2qPdijrD+0naxvh801i2Wq03QPz+ucpOMhVmWlaZnpftyfbzsyPp4FHPhN2ay4cDY Psl3Cv7xr9r2u96gXl1bUgaIzfgpS4kvGKK6FM9L07RxkhxH7IGCPIvj54SF9jSU4hhO 5bQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references: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=fAdczH7GuHjCoOlSNvJmTyXc+U/uE6wDDv67a8lTqL0=; b=rXOctVdOMtfgTqkp7bqJ4F5znBhXkmmoTGuDxqXznDZsJYGxNxvTD+3u6OfE9pfLj0 O1UASJ3FSf5fKtktiSwVTqWUhqgJ3BQnlbt978iDj5u3epFWDQ3awYdlrhuZfTrZQoF0 HB8o+wcP4QZszuGrcBYWsVbSvhydKInfK+yY7t/2JbzqME93REz6A1603YJ9WFQwmBpm oCJ+KHoNROnNx0qcjWNIapgrnPbFJspGb7fBIFMAoiTSpqJ4jK7as2+1L5VO5rffhJDB 6fAxgRjyLulLvImQcJhdFW4+NzyS7vhzqrU0wJvV+/XkfeUijf4O54XR6s2FzqRQRo4g 8M3w== X-Gm-Message-State: AO0yUKVAnjBxuqtAAHdKZhXUOaHynKNvqCQ/2e3K9Q6BCl6LnCOUB3Tz rLsHQFcxooLwKKCUKfFB9ECX4qYBne4= X-Google-Smtp-Source: AK7set91stS/UX8+f2DsJblbvzpqauSq3MaEUuCxj/5oKFbWqIorzn+n0yHFkfhzqXC1BBVanjp31g== X-Received: by 2002:a17:90b:1803:b0:230:1449:335a with SMTP id lw3-20020a17090b180300b002301449335amr15093766pjb.48.1675528294367; Sat, 04 Feb 2023 08:31:34 -0800 (PST) Received: from ?IPV6:2601:681:8600:13d0::f0a? ([2601:681:8600:13d0::f0a]) by smtp.gmail.com with ESMTPSA id m17-20020a17090a859100b0022c52a0c202sm3586663pjn.18.2023.02.04.08.31.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 04 Feb 2023 08:31:33 -0800 (PST) Message-ID: Date: Sat, 4 Feb 2023 09:31:32 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v11 20/29] riscv: Add string-fza.h and string-fzi.h Content-Language: en-US To: Adhemerval Zanella Netto , Richard Henderson , libc-alpha@sourceware.org, Noah Goldstein , Xi Ruoyao References: <20230201170406.303978-1-adhemerval.zanella@linaro.org> <20230201170406.303978-21-adhemerval.zanella@linaro.org> From: Jeff Law In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,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 2/2/23 05:30, Adhemerval Zanella Netto wrote: > > > On 01/02/23 14:53, Richard Henderson wrote: >> On 2/1/23 07:03, Adhemerval Zanella wrote: >>> +static __always_inline unsigned int >>> +index_first (find_t c) >>> +{ >>> +  if (c & 0x80U) >>> +    return 0; >>> +  if (c & 0x8000U) >>> +    return 1; >>> +  if (c & 0x800000U) >>> +    return 2; >>> + >>> +  if (sizeof (op_t) == 4) >>> +    return 3; >>> + >>> +  if (c & 0x80000000U) >>> +    return 3; >>> +  if (c & 0x8000000000UL) >>> +    return 4; >>> +  if (c & 0x800000000000UL) >>> +    return 5; >>> +  if (c & 0x80000000000000UL) >>> +    return 6; >>> +  return 7; >> >> There is a -mbig-endian switch to gcc, even if that isn't the normal configuration. > > I though about adding BE support, however we explicit do not support it > (sysdeps/riscv/bits/endianness.h) so I think we can assume LE for now. I wouldn't bother with BE until someone comes asking for it. Jeff