From 0ebcd8834a2a06ede85d66b44f8c44818774466d Mon Sep 17 00:00:00 2001 From: Mamy Ratsimbazafy Date: Thu, 16 Jan 2025 20:39:37 +0100 Subject: [PATCH] arm64: ARM is NOT x86 --- constantine/hashes/h_sha256.nim | 2 +- constantine/hashes/sha256/sha256_arm64_sha2.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/constantine/hashes/h_sha256.nim b/constantine/hashes/h_sha256.nim index 16c687d8..644be63a 100644 --- a/constantine/hashes/h_sha256.nim +++ b/constantine/hashes/h_sha256.nim @@ -63,7 +63,7 @@ func hashMessageBlocks( hashMessageBlocks_generic(s, message, numBlocks) elif UseASM_ARM_64 and defined(macosx): # All Apple Silicon Mac support SHA2 extension - hashMessageBlocks_x86_sha(s, message, numBlocks) + hashMessageBlocks_arm_sha(s, message, numBlocks) else: hashMessageBlocks_generic(s, message, numBlocks) diff --git a/constantine/hashes/sha256/sha256_arm64_sha2.nim b/constantine/hashes/sha256/sha256_arm64_sha2.nim index dcac1e79..3a7ed0c2 100644 --- a/constantine/hashes/sha256/sha256_arm64_sha2.nim +++ b/constantine/hashes/sha256/sha256_arm64_sha2.nim @@ -44,7 +44,7 @@ import # It makes for easier code to read but while Apple CPUs can prefetch up to 8 instructions ahead # it's best to interleave independent instructions to maximize throughput with an out-of-order 9superscalar) processor. -func hashMessageBlocks_x86_sha*( +func hashMessageBlocks_arm_sha*( H: var Sha256_state, message: ptr UncheckedArray[byte], numBlocks: uint)=