blob: 5464919b26b9f21e375c15a1cd1f90f18e00c3f6 [file] [log] [blame]
//===--- mulsi3.S - Integer multiplication routines routines ---===//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#if !defined(__riscv_mul) && __riscv_xlen == 32
.align 2
.globl __mulsi3
.type __mulsi3, @function
mv a2, a0
mv a0, zero
andi a3, a1, 1
beqz a3, .L2
add a0, a0, a2
srli a1, a1, 1
slli a2, a2, 1
bnez a1, .L1