[llvm-branch-commits] [llvm] [Support] Integrate SipHash.cpp into libSupport. (PR #94394)

Anton Korobeynikov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Jun 7 23:14:05 PDT 2024


asl wrote:

So, regarding big-endian things. Original siphash is always "little-endian" regardless of the host platform. On big endian hosts it essentially does byte swap in the end. We do not have it here, so we will end with different hashes on platforms with different endianness.

>From the pauth perspective this is not a problem, as we do not do cross-platform hash calculation and further comparison. The hash output (discriminator value) is always compiled on compiler side and left as-is.

So, we can either keep the present code as-is. Or we can just sprinkle few calls from `Endian.h` to do byteswap on BE platforms.

https://github.com/llvm/llvm-project/pull/94394


More information about the llvm-branch-commits mailing list