This PR implements the following 8 functions along with the tests. ```c++ int idivr(fract, fract); long int idivlr(long fract, long fract); int idivk(accum, accum); long int idivlk(long accum, long accum); unsigned int idivur(unsigned fract, unsigned fract); unsigned long int idivulr(unsigned long fract, unsigned long fract); unsigned int idivuk(unsigned accum, unsigned accum); unsigned long int idivulk(unsigned long accum, unsigned long accum); ``` ref: https://www.iso.org/standard/51126.html Fixes #129125 --------- Signed-off-by: krishna2803 <kpandey81930@gmail.com>
15 lines
550 B
C++
15 lines
550 B
C++
//===-- Unittests for idivlr ----------------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "IdivTest.h"
|
|
|
|
#include "llvm-libc-macros/stdfix-macros.h" // long fract
|
|
#include "src/stdfix/idivlr.h"
|
|
|
|
LIST_IDIV_TESTS(lr, long fract, long int, LIBC_NAMESPACE::idivlr);
|