diff options
Diffstat (limited to 'src/lib/libcrypto/bn/arch/amd64/bn_arch.h')
-rw-r--r-- | src/lib/libcrypto/bn/arch/amd64/bn_arch.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/bn/arch/amd64/bn_arch.h b/src/lib/libcrypto/bn/arch/amd64/bn_arch.h index 637903077a..80f73bf15f 100644 --- a/src/lib/libcrypto/bn/arch/amd64/bn_arch.h +++ b/src/lib/libcrypto/bn/arch/amd64/bn_arch.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_arch.h,v 1.11 2023/02/04 14:00:18 jsing Exp $ */ | 1 | /* $OpenBSD: bn_arch.h,v 1.12 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 | * |
@@ -63,24 +63,24 @@ bn_div_rem_words_inline(BN_ULONG h, BN_ULONG l, BN_ULONG d, BN_ULONG *out_q, | |||
63 | #endif /* __GNUC__ */ | 63 | #endif /* __GNUC__ */ |
64 | 64 | ||
65 | #if defined(__GNUC__) | 65 | #if defined(__GNUC__) |
66 | #define HAVE_BN_UMUL_HILO | 66 | #define HAVE_BN_MULW |
67 | 67 | ||
68 | static inline void | 68 | static inline void |
69 | bn_umul_hilo(BN_ULONG a, BN_ULONG b, BN_ULONG *out_h, BN_ULONG *out_l) | 69 | bn_mulw(BN_ULONG a, BN_ULONG b, BN_ULONG *out_r1, BN_ULONG *out_r0) |
70 | { | 70 | { |
71 | BN_ULONG h, l; | 71 | BN_ULONG r1, r0; |
72 | 72 | ||
73 | /* | 73 | /* |
74 | * Unsigned multiplication of %rax, with the double word result being | 74 | * Unsigned multiplication of %rax, with the double word result being |
75 | * stored in %rdx:%rax. | 75 | * stored in %rdx:%rax. |
76 | */ | 76 | */ |
77 | __asm__ ("mulq %3" | 77 | __asm__ ("mulq %3" |
78 | : "=d"(h), "=a"(l) | 78 | : "=d"(r1), "=a"(r0) |
79 | : "a"(a), "rm"(b) | 79 | : "a"(a), "rm"(b) |
80 | : "cc"); | 80 | : "cc"); |
81 | 81 | ||
82 | *out_h = h; | 82 | *out_r1 = r1; |
83 | *out_l = l; | 83 | *out_r0 = r0; |
84 | } | 84 | } |
85 | #endif /* __GNUC__ */ | 85 | #endif /* __GNUC__ */ |
86 | 86 | ||