10Sstevel@tonic-gate//===-- umodti3.c - Implement __umodti3 -----------------------------------===// 20Sstevel@tonic-gate// 30Sstevel@tonic-gate// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40Sstevel@tonic-gate// See https://llvm.org/LICENSE.txt for license information. 53285Sgovinda// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 63285Sgovinda// 70Sstevel@tonic-gate//===----------------------------------------------------------------------===// 80Sstevel@tonic-gate// 90Sstevel@tonic-gate// This file implements __umodti3 for the compiler_rt library. 100Sstevel@tonic-gate// 110Sstevel@tonic-gate//===----------------------------------------------------------------------===// 120Sstevel@tonic-gate 130Sstevel@tonic-gate#include "int_lib.h" 140Sstevel@tonic-gate 150Sstevel@tonic-gate#ifdef CRT_HAS_128BIT 160Sstevel@tonic-gate 170Sstevel@tonic-gate// Returns: a % b 180Sstevel@tonic-gate 190Sstevel@tonic-gateCOMPILER_RT_ABI tu_int __umodti3(tu_int a, tu_int b) { 200Sstevel@tonic-gate tu_int r; 210Sstevel@tonic-gate __udivmodti4(a, b, &r); 2211519SGarrett.Damore@Sun.COM return r; 230Sstevel@tonic-gate} 240Sstevel@tonic-gate 250Sstevel@tonic-gate#endif // CRT_HAS_128BIT 260Sstevel@tonic-gate