summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/arch/i386/bn_arch.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/arch/i386/bn_arch.h')
-rw-r--r--src/lib/libcrypto/bn/arch/i386/bn_arch.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/bn/arch/i386/bn_arch.h b/src/lib/libcrypto/bn/arch/i386/bn_arch.h
index 268c51e41a..eef519fcc7 100644
--- a/src/lib/libcrypto/bn/arch/i386/bn_arch.h
+++ b/src/lib/libcrypto/bn/arch/i386/bn_arch.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_arch.h,v 1.8 2023/01/31 05:53:49 jsing Exp $ */ 1/* $OpenBSD: bn_arch.h,v 1.9 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 *
@@ -61,24 +61,24 @@ bn_div_rem_words_inline(BN_ULONG h, BN_ULONG l, BN_ULONG d, BN_ULONG *out_q,
61#endif /* __GNUC__ */ 61#endif /* __GNUC__ */
62 62
63#if defined(__GNUC__) 63#if defined(__GNUC__)
64#define HAVE_BN_UMUL_HILO 64#define HAVE_BN_MULW
65 65
66static inline void 66static inline void
67bn_umul_hilo(BN_ULONG a, BN_ULONG b, BN_ULONG *out_h, BN_ULONG *out_l) 67bn_mulw(BN_ULONG a, BN_ULONG b, BN_ULONG *out_r1, BN_ULONG *out_r0)
68{ 68{
69 BN_ULONG h, l; 69 BN_ULONG r1, r0;
70 70
71 /* 71 /*
72 * Unsigned multiplication of %eax, with the double word result being 72 * Unsigned multiplication of %eax, with the double word result being
73 * stored in %edx:%eax. 73 * stored in %edx:%eax.
74 */ 74 */
75 __asm__ ("mull %3" 75 __asm__ ("mull %3"
76 : "=d"(h), "=a"(l) 76 : "=d"(r1), "=a"(r0)
77 : "a"(a), "rm"(b) 77 : "a"(a), "rm"(b)
78 : "cc"); 78 : "cc");
79 79
80 *out_h = h; 80 *out_r1 = r1;
81 *out_l = l; 81 *out_r0 = r0;
82} 82}
83#endif /* __GNUC__ */ 83#endif /* __GNUC__ */
84 84