xref: /freebsd/contrib/llvm-project/compiler-rt/lib/builtins/mulosi4.c (revision 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
10b57cec5SDimitry Andric //===-- mulosi4.c - Implement __mulosi4 -----------------------------------===//
20b57cec5SDimitry Andric //
30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
60b57cec5SDimitry Andric //
70b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
80b57cec5SDimitry Andric //
90b57cec5SDimitry Andric // This file implements __mulosi4 for the compiler_rt library.
100b57cec5SDimitry Andric //
110b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
120b57cec5SDimitry Andric 
13e8d8bef9SDimitry Andric #define fixint_t si_int
14*06c3fb27SDimitry Andric #define fixuint_t su_int
15e8d8bef9SDimitry Andric #include "int_mulo_impl.inc"
160b57cec5SDimitry Andric 
170b57cec5SDimitry Andric // Returns: a * b
180b57cec5SDimitry Andric 
190b57cec5SDimitry Andric // Effects: sets *overflow to 1  if a * b overflows
200b57cec5SDimitry Andric 
__mulosi4(si_int a,si_int b,int * overflow)210b57cec5SDimitry Andric COMPILER_RT_ABI si_int __mulosi4(si_int a, si_int b, int *overflow) {
22e8d8bef9SDimitry Andric   return __muloXi4(a, b, overflow);
230b57cec5SDimitry Andric }
24