-/* $OpenBSD: bn_arch.h,v 1.2 2023/01/31 05:53:49 jsing Exp $ */
+/* $OpenBSD: bn_arch.h,v 1.3 2023/02/04 11:48:55 jsing Exp $ */
/*
* Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
*
/* Unsigned multiplication using a umulh/mul pair. */
__asm__ ("umulh %0, %2, %3; mul %1, %2, %3"
- : "=r"(h), "=r"(l)
+ : "=&r"(h), "=r"(l)
: "r"(a), "r"(b));
*out_h = h;
-/* $OpenBSD: bn_arch.h,v 1.2 2023/01/31 05:57:08 jsing Exp $ */
+/* $OpenBSD: bn_arch.h,v 1.3 2023/02/04 11:48:55 jsing Exp $ */
/*
* Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
*
/* Unsigned multiplication using a umulh/mulq pair. */
__asm__ ("umulh %2, %3, %0; mulq %2, %3, %1"
- : "=r"(h), "=r"(l)
+ : "=&r"(h), "=r"(l)
: "r"(a), "r"(b));
*out_h = h;
-/* $OpenBSD: bn_arch.h,v 1.2 2023/01/31 05:57:08 jsing Exp $ */
+/* $OpenBSD: bn_arch.h,v 1.3 2023/02/04 11:48:55 jsing Exp $ */
/*
* Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
*
/* Unsigned multiplication using a mulhdu/mul pair. */
__asm__ ("mulhdu %0, %2, %3; mul %1, %2, %3"
- : "=r"(h), "=r"(l)
+ : "=&r"(h), "=r"(l)
: "r"(a), "r"(b));
*out_h = h;
-/* $OpenBSD: bn_arch.h,v 1.2 2023/01/31 05:57:08 jsing Exp $ */
+/* $OpenBSD: bn_arch.h,v 1.3 2023/02/04 11:48:55 jsing Exp $ */
/*
* Copyright (c) 2023 Joel Sing <jsing@openbsd.org>
*
* into a single operation.
*/
__asm__ ("mulh %0, %2, %3; mul %1, %2, %3"
- : "=r"(h), "=r"(l)
+ : "=&r"(h), "=r"(l)
: "r"(a), "r"(b));
*out_h = h;