2019-04-28 22:47:49 +00:00
|
|
|
//===-- mulosi4.c - Implement __mulosi4 -----------------------------------===//
|
|
|
|
//
|
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file implements __mulosi4 for the compiler_rt library.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2011-06-17 20:17:05 +00:00
|
|
|
|
2020-08-27 13:19:08 +03:00
|
|
|
#define fixint_t si_int
|
2023-03-09 08:37:47 +01:00
|
|
|
#define fixuint_t su_int
|
2020-08-27 13:19:08 +03:00
|
|
|
#include "int_mulo_impl.inc"
|
2011-06-17 20:17:05 +00:00
|
|
|
|
2019-04-28 22:47:49 +00:00
|
|
|
// Returns: a * b
|
2011-06-17 20:17:05 +00:00
|
|
|
|
2019-04-28 22:47:49 +00:00
|
|
|
// Effects: sets *overflow to 1 if a * b overflows
|
2011-06-17 20:17:05 +00:00
|
|
|
|
2019-04-28 21:53:32 +00:00
|
|
|
COMPILER_RT_ABI si_int __mulosi4(si_int a, si_int b, int *overflow) {
|
2020-08-27 13:19:08 +03:00
|
|
|
return __muloXi4(a, b, overflow);
|
2011-06-17 20:17:05 +00:00
|
|
|
}
|