diff options
Diffstat (limited to 'lib/modsi3.c')
-rw-r--r-- | lib/modsi3.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/modsi3.c b/lib/modsi3.c new file mode 100644 index 000000000..d6dfe616d --- /dev/null +++ b/lib/modsi3.c @@ -0,0 +1,22 @@ +//===-- modsi3.c - Implement __modsi3 -------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file implements __modsi3 for the compiler_rt library. +// +//===----------------------------------------------------------------------===// + +#include "int_lib.h" + +// Returns: a % b + +si_int +__modsi3(si_int a, si_int b) +{ + return a - (a / b) * b; +} |