diff options
Diffstat (limited to 'src/lib/libcrypto/bn/arch/alpha/bn_arch.h')
-rw-r--r-- | src/lib/libcrypto/bn/arch/alpha/bn_arch.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/libcrypto/bn/arch/alpha/bn_arch.h b/src/lib/libcrypto/bn/arch/alpha/bn_arch.h index 0f7c582fdf..5bf4ba8722 100644 --- a/src/lib/libcrypto/bn/arch/alpha/bn_arch.h +++ b/src/lib/libcrypto/bn/arch/alpha/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 | * |
@@ -22,20 +22,20 @@ | |||
22 | 22 | ||
23 | #if 0 /* Needs testing and enabling. */ | 23 | #if 0 /* Needs testing and enabling. */ |
24 | #if defined(__GNUC__) | 24 | #if defined(__GNUC__) |
25 | #define HAVE_BN_UMUL_HILO | 25 | #define HAVE_BN_MULW |
26 | 26 | ||
27 | static inline void | 27 | static inline void |
28 | bn_umul_hilo(BN_ULONG a, BN_ULONG b, BN_ULONG *out_h, BN_ULONG *out_l) | 28 | bn_mulw(BN_ULONG a, BN_ULONG b, BN_ULONG *out_r1, BN_ULONG *out_r0) |
29 | { | 29 | { |
30 | BN_ULONG h, l; | 30 | BN_ULONG r1, r0; |
31 | 31 | ||
32 | /* Unsigned multiplication using a umulh/mulq pair. */ | 32 | /* Unsigned multiplication using a umulh/mulq pair. */ |
33 | __asm__ ("umulh %2, %3, %0; mulq %2, %3, %1" | 33 | __asm__ ("umulh %2, %3, %0; mulq %2, %3, %1" |
34 | : "=&r"(h), "=r"(l) | 34 | : "=&r"(r1), "=r"(r0) |
35 | : "r"(a), "r"(b)); | 35 | : "r"(a), "r"(b)); |
36 | 36 | ||
37 | *out_h = h; | 37 | *out_r1 = r1; |
38 | *out_l = l; | 38 | *out_r0 = r0; |
39 | } | 39 | } |
40 | #endif /* __GNUC__ */ | 40 | #endif /* __GNUC__ */ |
41 | #endif | 41 | #endif |