bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] sha512-buffer: port back to 32-bit-only hosts


From: Collin Funk
Subject: Re: [PATCH] sha512-buffer: port back to 32-bit-only hosts
Date: Sat, 18 May 2024 20:42:08 -0700
User-agent: Mozilla Thunderbird

Hi Paul,

Patch looks good.

On 5/18/24 7:04 PM, Paul Eggert wrote:
> Port to platforms lacking 64-bit integers (something that Emacs
> still attempts to do, in theory) by adding an u64bswap primitive
> to u64.h and using that, instead of using bswap_64.  This fixes a
> bug I made in commit 0d45ec7c033c165ad73a6509c7fa84aa67edf4ea
> dated Sun Jun 17 14:35:37 2018 -0700.

Out of personal interest, do you happen to know what platforms Emacs
builds on that lack 64-bit types?

My first computer was 32-bit x86 and I have never run into a place
they are missing.

To be honest I never looked into how GCC implements 64-bit integers on
i386. I'm guessing two 32-bit operations with one involving the carry
flag? I guess that is what the u64.h functions are doing but the
compiler knows the instructions. :)

I think for i386 that is add, adc for addition and sub, sbb for
subtraction but I am a bit rusty.

Collin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]