174670e79SSiva Chandra Reddy //===-- Implementation of lldiv -------------------------------------------===// 274670e79SSiva Chandra Reddy // 374670e79SSiva Chandra Reddy // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 474670e79SSiva Chandra Reddy // See https://llvm.org/LICENSE.txt for license information. 574670e79SSiva Chandra Reddy // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 674670e79SSiva Chandra Reddy // 774670e79SSiva Chandra Reddy //===----------------------------------------------------------------------===// 874670e79SSiva Chandra Reddy 974670e79SSiva Chandra Reddy #include "src/stdlib/lldiv.h" 1074670e79SSiva Chandra Reddy #include "src/__support/common.h" 1174670e79SSiva Chandra Reddy #include "src/__support/integer_operations.h" 1274670e79SSiva Chandra Reddy 1374670e79SSiva Chandra Reddy namespace __llvm_libc { 1474670e79SSiva Chandra Reddy 1574670e79SSiva Chandra Reddy LLVM_LIBC_FUNCTION(lldiv_t, lldiv, (long long x, long long y)) { 1674670e79SSiva Chandra Reddy lldiv_t res; 17*1c92911eSMichael Jones integer_rem_quo(x, y, res.quot, res.rem); 1874670e79SSiva Chandra Reddy return res; 1974670e79SSiva Chandra Reddy } 2074670e79SSiva Chandra Reddy 2174670e79SSiva Chandra Reddy } // namespace __llvm_libc 22