From ca9211ecdede9bdedb812b2243a4abdb8dacd1b9 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 7 Jan 2015 19:55:37 +0000 Subject: Import compiler-rt trunk r224034. https://llvm.org/svn/llvm-project/compiler-rt/trunk@224034 --- lib/builtins/umoddi3.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lib/builtins/umoddi3.c (limited to 'lib/builtins/umoddi3.c') diff --git a/lib/builtins/umoddi3.c b/lib/builtins/umoddi3.c new file mode 100644 index 0000000000000..d513f080a1e97 --- /dev/null +++ b/lib/builtins/umoddi3.c @@ -0,0 +1,25 @@ +/* ===-- umoddi3.c - Implement __umoddi3 -----------------------------------=== + * + * The LLVM Compiler Infrastructure + * + * This file is dual licensed under the MIT and the University of Illinois Open + * Source Licenses. See LICENSE.TXT for details. + * + * ===----------------------------------------------------------------------=== + * + * This file implements __umoddi3 for the compiler_rt library. + * + * ===----------------------------------------------------------------------=== + */ + +#include "int_lib.h" + +/* Returns: a % b */ + +COMPILER_RT_ABI du_int +__umoddi3(du_int a, du_int b) +{ + du_int r; + __udivmoddi4(a, b, &r); + return r; +} -- cgit v1.2.3