From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id DDD2D3858D33 for ; Tue, 28 Feb 2023 14:24:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DDD2D3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=emagii.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=emagii.com Received: from [10.175.196.145] (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id 04B7112013F; Tue, 28 Feb 2023 15:24:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1677594254; bh=Bk6Z5zypgBlxzmAe3CnKh+2edy7fb+Jst3JR+pJbTFg=; h=Subject:To:From; b=mbx0BsroCMcQZg1MvQhAqlYUmMXhNZYxRo4nRIEXQay0j2FBQFzhM/clMCwdqiQUB 2vFn6Jf96ITZdT9RBCR3RxOpfqBclcCI5WUwsZzkU6gjDhKoCOxdHGm4dwFJYVuVRM xCyhPvGRWTy7E0cF3dKy2Q4IibHNAKQq+/qXzVXU= Authentication-Results: emagii.beebytevps.io; spf=pass (sender IP is 84.55.68.216) smtp.mailfrom=binutils@emagii.com smtp.helo=[10.175.196.145] Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) Message-ID: <9955d69b-5da6-c1c9-140c-8cd055bd1942@emagii.com> Date: Tue, 28 Feb 2023 15:24:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v4 2/5] CRC64 testsuite Content-Language: en-US To: Nick Clifton Cc: binutils@sourceware.org References: <74421307-88dc-f745-fac0-ba8ae59dcddc@redhat.com> <741f0e19-7e3e-7554-567a-6ca5dc81bdf2@redhat.com> From: Ulf Samuelsson In-Reply-To: <741f0e19-7e3e-7554-567a-6ca5dc81bdf2@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <167759425340.3424738.8793844488684864412@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_FAIL,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 2023-02-28 14:06, Nick Clifton wrote: > Hi Ulf, > >> I am considering ”cheating” by always storing the CRC as big endian. >> That would simplify the test. >> It would also make the CRC readable in the text output. >> Drawback is of course that small endian targets would have to swap >> the CRC before use. > > I expect that users of little endian targets would complain about that > ... > Yes, From a useability point of view it is not ideal. Since I am not familiar with Perl, I would like to avoid digging down in the test harness. I can test the endianess of the host, and "link_info.big_endian" tells the endianess of the target. Based on that I can make decisions in the linker. I can see some alternative. * Always storing the small-endian version - same complaint from fewer people. * Store both big-endian and small-endian - wastes 4-8 bytes of space * Adding a switch to force to use "natural" endianess. * Adding something to the command.   Stored as small endian, unless you have an extension   DIGEST ".BE" ?   I.E:   DIGEST "CRC64-ISO.BE" ?   That removes the test problem, but if we want to test every algorithm   this way, the tests are multiplying. ============================================ The CRC table is another issue Right now, only the endianess of the table is that of the host. This needs to change, but that is not difficult, except how to control it. If we explicitly tell the endianess of the table, we get rid of the test problem. DIGEST TABLE "