2019-04-28 22:47:49 +00:00
|
|
|
//===-- muloti4.c - Implement __muloti4 -----------------------------------===//
|
|
|
|
//
|
|
|
|
// 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 __muloti4 for the compiler_rt library.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2011-06-17 20:17:05 +00:00
|
|
|
|
|
|
|
#include "int_lib.h"
|
|
|
|
|
2014-02-21 23:53:03 +00:00
|
|
|
#ifdef CRT_HAS_128BIT
|
2012-06-22 21:09:22 +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
|
|
|
|
2020-08-27 13:19:08 +03:00
|
|
|
#define fixint_t ti_int
|
2023-03-09 08:37:47 +01:00
|
|
|
#define fixuint_t tu_int
|
2020-08-27 13:19:08 +03:00
|
|
|
#include "int_mulo_impl.inc"
|
|
|
|
|
2019-04-28 21:53:32 +00:00
|
|
|
COMPILER_RT_ABI ti_int __muloti4(ti_int a, ti_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
|
|
|
}
|
|
|
|
|
2019-04-28 22:47:49 +00:00
|
|
|
#endif // CRT_HAS_128BIT
|