Fix output constraints for bn_umul_hilo().
authorjsing <jsing@openbsd.org>
Sat, 4 Feb 2023 11:48:55 +0000 (11:48 +0000)
committerjsing <jsing@openbsd.org>
Sat, 4 Feb 2023 11:48:55 +0000 (11:48 +0000)
commitafb7f053dfcd58a018767b56b365689890c70d59
tree35df3864094d16065bbf06a78641a5b0f7d5e269
parentcc639ecb48a205b2f7c4d94ad08af110934dec51
Fix output constraints for bn_umul_hilo().

When bn_umul_hilo() is implemented using an instruction pair, mark the
first output with a constraint that prevents the output from overlapping
with the inputs ("&"). Otherwise the first instruction can overwrite the
inputs, which then results in the second instruction producing incorrect
value.
lib/libcrypto/bn/arch/aarch64/bn_arch.h
lib/libcrypto/bn/arch/alpha/bn_arch.h
lib/libcrypto/bn/arch/powerpc64/bn_arch.h
lib/libcrypto/bn/arch/riscv64/bn_arch.h