Update the bn_div_rem_words comment The comment says something about adding assembly for other ISAs, but it seems most ISAs don't actually have double-wide division instructions. (Despite this, the division-based BN_MONT_CTX_set still seems to beat the Montgomery one on Arm. Less drastically than before https://boringssl-review.googlesource.com/c/boringssl/+/60686, but division still makes things faster.) Also update the bug links post LLVM's GitHub migration. Finding the corresponding GitHub issue is not always trivial. Bug: 358687140 Change-Id: Iafb5118461a2c09c66840a44fbd257320a8d98b4 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/70168 Auto-Submit: David Benjamin <davidben@google.com> Reviewed-by: Bob Beck <bbe@google.com> Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/crypto/fipsmodule/bn/div.c b/crypto/fipsmodule/bn/div.c index f524f89..ba6b69e 100644 --- a/crypto/fipsmodule/bn/div.c +++ b/crypto/fipsmodule/bn/div.c
@@ -149,11 +149,11 @@ // * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65668 // // Clang bugs: - // * https://llvm.org/bugs/show_bug.cgi?id=6397 - // * https://llvm.org/bugs/show_bug.cgi?id=12418 + // * https://github.com/llvm/llvm-project/issues/6769 + // * https://github.com/llvm/llvm-project/issues/12790 // - // These issues aren't specific to x86 and x86_64, so it might be worthwhile - // to add more assembly language implementations. + // These is specific to x86 and x86_64; Arm and RISC-V do not have double-wide + // division instructions. #if defined(BN_CAN_USE_INLINE_ASM) && defined(OPENSSL_X86) __asm__ volatile("divl %4" : "=a"(*quotient_out), "=d"(*rem_out)