2009-08-07 20:30:09 +00:00
|
|
|
/* ===-- modsi3.c - Implement __modsi3 -------------------------------------===
|
|
|
|
*
|
|
|
|
* The LLVM Compiler Infrastructure
|
|
|
|
*
|
2010-11-16 22:13:33 +00:00
|
|
|
* This file is dual licensed under the MIT and the University of Illinois Open
|
|
|
|
* Source Licenses. See LICENSE.TXT for details.
|
2009-08-07 20:30:09 +00:00
|
|
|
*
|
|
|
|
* ===----------------------------------------------------------------------===
|
|
|
|
*
|
|
|
|
* This file implements __modsi3 for the compiler_rt library.
|
|
|
|
*
|
|
|
|
* ===----------------------------------------------------------------------===
|
|
|
|
*/
|
2009-06-26 16:47:03 +00:00
|
|
|
|
|
|
|
#include "int_lib.h"
|
|
|
|
|
2009-08-07 20:30:09 +00:00
|
|
|
/* Returns: a % b */
|
2009-06-26 16:47:03 +00:00
|
|
|
|
|
|
|
si_int
|
|
|
|
__modsi3(si_int a, si_int b)
|
|
|
|
{
|
|
|
|
return a - (a / b) * b;
|
|
|
|
}
|