From 163a9d2422828460091f5b5d63e2c42b5040609c Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 26 Aug 2024 11:06:04 +0200 Subject: Fix inline assembly for ARM64 --- src/sha1-generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sha1-generic.c') diff --git a/src/sha1-generic.c b/src/sha1-generic.c index 600dcf5..b084f09 100644 --- a/src/sha1-generic.c +++ b/src/sha1-generic.c @@ -74,8 +74,8 @@ rotl32(uint32_t x, uint8_t bits) #if (__GNUC__ || __TINYC__) && __x86_64__ __asm__ ("roll %1, %0" : "+r" (x) : "c" (bits) : "cc"); return x; -#elif __GNUC__ && __aarch64__ /* TODO: Test this! */ - __asm__ ("ror %0, %0, %1" : "+r" (x) : "c" (-bits)); +#elif __GNUC__ && __aarch64__ + __asm__ ("ror %w0, %w0, %w1" : "+r" (x) : "r" (-bits)); return x; #else return (x << bits) | (x >> (32 - bits)); -- cgit v1.2.3