2009-08-08 04:30:09 +08:00
|
|
|
/* ===-- umodsi3.c - Implement __umodsi3 -----------------------------------===
|
|
|
|
*
|
2019-01-19 18:56:40 +08:00
|
|
|
* 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
|
2009-08-08 04:30:09 +08:00
|
|
|
*
|
|
|
|
* ===----------------------------------------------------------------------===
|
|
|
|
*
|
|
|
|
* This file implements __umodsi3 for the compiler_rt library.
|
|
|
|
*
|
|
|
|
* ===----------------------------------------------------------------------===
|
|
|
|
*/
|
2009-06-27 00:47:03 +08:00
|
|
|
|
|
|
|
#include "int_lib.h"
|
|
|
|
|
2009-08-08 04:30:09 +08:00
|
|
|
/* Returns: a % b */
|
2009-06-27 00:47:03 +08:00
|
|
|
|
2011-04-20 01:52:09 +08:00
|
|
|
COMPILER_RT_ABI su_int
|
2009-06-27 00:47:03 +08:00
|
|
|
__umodsi3(su_int a, su_int b)
|
|
|
|
{
|
2009-07-03 10:26:38 +08:00
|
|
|
return a - __udivsi3(a, b) * b;
|
2009-06-27 00:47:03 +08:00
|
|
|
}
|