summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/arch/aarch64/bn_arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/arch/aarch64/bn_arch.h')
-rw-r--r--src/lib/libcrypto/bn/arch/aarch64/bn_arch.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/bn/arch/aarch64/bn_arch.h b/src/lib/libcrypto/bn/arch/aarch64/bn_arch.h
index 7592971dc0..cc456848c9 100644
--- a/src/lib/libcrypto/bn/arch/aarch64/bn_arch.h
+++ b/src/lib/libcrypto/bn/arch/aarch64/bn_arch.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_arch.h,v 1.3 2023/02/04 11:48:55 jsing Exp $ */ 1/* $OpenBSD: bn_arch.h,v 1.4 2023/02/16 10:41:03 jsing Exp $ */
2/* 2/*
3 * Copyright (c) 2023 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -23,20 +23,20 @@
23#ifndef OPENSSL_NO_ASM 23#ifndef OPENSSL_NO_ASM
24 24
25#if defined(__GNUC__) 25#if defined(__GNUC__)
26#define HAVE_BN_UMUL_HILO 26#define HAVE_BN_MULW
27 27
28static inline void 28static inline void
29bn_umul_hilo(BN_ULONG a, BN_ULONG b, BN_ULONG *out_h, BN_ULONG *out_l) 29bn_mulw(BN_ULONG a, BN_ULONG b, BN_ULONG *out_r1, BN_ULONG *out_r0)
30{ 30{
31 BN_ULONG h, l; 31 BN_ULONG r1, r0;
32 32
33 /* Unsigned multiplication using a umulh/mul pair. */ 33 /* Unsigned multiplication using a umulh/mul pair. */
34 __asm__ ("umulh %0, %2, %3; mul %1, %2, %3" 34 __asm__ ("umulh %0, %2, %3; mul %1, %2, %3"
35 : "=&r"(h), "=r"(l) 35 : "=&r"(r1), "=r"(r0)
36 : "r"(a), "r"(b)); 36 : "r"(a), "r"(b));
37 37
38 *out_h = h; 38 *out_r1 = r1;
39 *out_l = l; 39 *out_r0 = r0;
40} 40}
41#endif /* __GNUC__ */ 41#endif /* __GNUC__ */
42 42