From 2faf57c08da1098b16591430940a07fa865b2e98 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Tue, 25 Oct 2022 12:32:41 -0400 Subject: [PATCH] might as well add the link to the LLVM assembly code as well. --- library/compiler-builtins/src/riscv.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/compiler-builtins/src/riscv.rs b/library/compiler-builtins/src/riscv.rs index eff249692ce3..ae361b33acfb 100644 --- a/library/compiler-builtins/src/riscv.rs +++ b/library/compiler-builtins/src/riscv.rs @@ -14,6 +14,9 @@ intrinsics! { // // for reference, see also implementation from gcc // https://raw.githubusercontent.com/gcc-mirror/gcc/master/libgcc/config/epiphany/mulsi3.c + // + // and from LLVM (in relatively readable RISC-V assembly): + // https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/builtins/riscv/int_mul_impl.inc pub extern "C" fn __mulsi3(a: u32, b: u32) -> u32 { let (mut a, mut b) = (a, b); let mut r = 0;