18 Commits

Author SHA1 Message Date
lntue
6d3b72aa6e
[libc] Pass config flags to unit tests. (#142085) 2025-05-30 10:00:14 -04:00
Krishna Pandey
5ff277462d
[libc][stdfix] Implement idivfx functions in LLVM libc (#133005)
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>
2025-04-25 07:58:16 -04:00
Ishaan Verma
735afc8ceb
[libc] Added type-generic macros for fixed-point functions (#129371)
Adds macros `absfx`, `countlsfx` and `roundfx` .
ref:  #129111
2025-03-09 00:11:34 -05:00
Krishna Pandey
f6bfa33cdb
[libc][stdfix] Implement fixed point bitsfx functions in llvm libc (#128413)
Fixes #113359

---------

Signed-off-by: krishna2803 <kpandey81930@gmail.com>
2025-02-27 13:05:27 -05:00
Krishna Pandey
1f51038036
[libc][stdfix] Implement countlsfx functions in libc. (#126597)
fixes #113357

---------

Signed-off-by: krishna2803 <kpandey81930@gmail.com>
2025-02-12 14:12:44 -05:00
Petr Hosek
6dbe542290
[libc] Use ${libc_opt_high_flag} instead of -O3 (#123233)
This is preferable since `${libc_opt_high_flag}` will be set correctly
for the compiler used.
2025-02-07 13:36:06 -08:00
Joseph Huber
7623d91784 Revert "[libc][stdfix] Fix buildbot failure because of a typo. (#126291)"
This reverts commit bada9220b87e73c0f4a498b82f883e17eda928d1.

Revert "[libc][stdfix] Implement fixed point `countlsfx` functions in llvm-libc (#125356)"

This reverts commit f2a1103b323492160d7d27a1575fbda709b49036.
2025-02-07 14:34:40 -06:00
Krishna Pandey
f2a1103b32
[libc][stdfix] Implement fixed point countlsfx functions in llvm-libc (#125356)
fixes #113357
2025-02-07 13:53:17 -05:00
Joseph Huber
db6b7a84e6
[libc][NFC] Strip all training whitespace and missing newlines (#124163) 2025-01-23 12:02:54 -06:00
William Tran-Viet
c11b6e80b6
[libc][stdfix] Implement fixed point fxbits functions in llvm-libc (#114912) 2024-11-11 12:54:16 -05:00
OverMighty
ba7d5ebe4b
[libc] Fix build breaks caused by f16sqrtf changes (#95459)
See Buildbot failures:

- https://lab.llvm.org/buildbot/#/builders/78/builds/13
- https://lab.llvm.org/buildbot/#/builders/182/builds/7
2024-06-13 15:48:36 -04:00
lntue
7dd4ce484c
[libc][stdfix] Fix overflow problem for fixed point sqrt when the inputs are close to max. (#90558)
Fixes https://github.com/llvm/llvm-project/issues/89668
2024-04-30 13:22:27 -04:00
lntue
51b7ef9375
[libc][NFC] Fix a typo in test/src/stdfix/RoundTest.h. (#84411) 2024-03-07 22:04:59 -05:00
lntue
14171b87a3
[libc][stdfix] Add exp function for short _Accum and _Accum types. (#84391) 2024-03-07 17:58:28 -05:00
lntue
ad33fe1281
[libc][stdfix] Add integer square root with fixed point output functions. (#83959)
Fix https://github.com/llvm/llvm-project/issues/83924.
2024-03-06 18:35:44 -05:00
lntue
ded4ea9752
[libc][stdfix] Add sqrt for fixed point types. (#83042) 2024-02-26 19:36:30 -05:00
lntue
f01ed3bc88
[libc][stdfix] Add round functions for fixed point types. (#81994) 2024-02-16 12:45:26 -05:00
lntue
2c45bda802
[libc][stdfix] Add abs functions for signed fixed point types. (#81823) 2024-02-15 18:09:40 -05:00