Age | Commit message (Collapse) | Author | Files | Lines |
|
functions (#95159)
Part of #93566.
|
|
Note: our baremetal arm configuration compiles this as
`--target=arm-none-eabi`, so this code is built in -marm mode. It could be
smaller with `--target=armv7-none-eabi -mthumb`. The assembler is valid ARMv5,
or THUMB2, but not THUMB(1).
|
|
Fixes #93711 .
This patch implements the ``fdopen`` function. Given that ``fdopen``
internally calls ``fcntl``, the implementation of ``fcntl`` has been
moved to the ``__support/OSUtil``, where it serves as an internal public
function.
|
|
(#95619)
This reverts commit eca988aa4420f33810f9830c80ff9f149b7928ff. The
underlying libc issue was fixed by PR#95576.
The original PR is #95436 , which adds printf, putchar and vprintf in
bareemetal entrypoints
|
|
|
|
This reverts commit b1de42a81d838bb0c6dea7d2436820a2456c730b, which
breaks libc build for baremetal targets.
|
|
Part of #93566.
|
|
We now have baremetal implementations of these entrypoints.
|
|
Reverts llvm/llvm-project#95419 and Reland #95358.
This PR is full of temporal fixes. After a discussion with @lntue, it is
better to avoid further changes to the cmake infrastructure for now as a
rework to the cmake utilities will be landed in the future.
|
|
Part of #95250.
|
|
|
|
|
|
Part of #93566.
|
|
Part of #93566.
|
|
See Buildbot failure:
https://lab.llvm.org/buildbot/#/builders/138/builds/67428.
|
|
(#94758)
Part of #93566.
|
|
Part of #93566.
|
|
Added remquof128 function. Closes #94312
|
|
This is an implementation of floating point multiplication:
It will consist of
- `double x double -> float`
|
|
See Buildbot failure:
https://lab.llvm.org/buildbot/#/builders/138/builds/67337.
|
|
Part of #93566.
|
|
- added at_quick_exit function
- used helper file exit_handler which reuses code from atexit
- atexit now calls helper functions from exit_handler
- test cases and dependencies are added
---------
Co-authored-by: Aaryan Shukla <aaryanshukla@google.com>
|
|
functions (#94510)
#93566
|
|
Summary:
This reverts commit 574ab7e7b759a400ecf54c1141b1433bb2415e93.
|
|
bug. (#94569)
The conversion between _Float16 and long double will crash clang-11 on
aarch64. This is fixed in clang-12: https://godbolt.org/z/8ceT9454c
|
|
|
|
This is a mostly-target-independent variadic function optimisation and
lowering pass. It is only enabled for AMDGPU in this initial commit.
The purpose is to make C style variadic functions a zero cost
abstraction. They are lowered to equivalent IR which is then amenable to
other optimisations. This is inherently slightly target specific but
much less so than one might expect - the C varargs interface heavily
constrains the ABI design divergence.
The pass is primarily tested from webassembly. This is because wasm has
a straightforward variadic lowering strategy which coincides exactly
with what this pass transforms code into and a struct passing convention
with few cases to check. Adding further targets conventions is
straightforward and elided from this patch primarily to simplify the
review. Implemented in other branches are Linux X86, AMD64, AArch64 and
NVPTX.
Testing for targets that have existing lowering for va_arg from clang is
most efficiently done by checking that clang | opt completely elides the
variadic syntax from test cases. The lowering produces a struct for each
call site which can be inspected to check the various alignment and
indirections are correct.
AMDGPU presently has no variadic support other than some ad hoc printf
handling. Combined with the pass being inactive on all other targets
landing this represents strict increase in capability with zero risk.
Testing and refining will continue post commit.
In addition to the compiler tests included here, a self contained x64
clang/musl toolchain was constructed using the "lowering" instead of the
systemv ABI and used to build various C programs like lua and libxml2.
|
|
functions (#94535)
#93566
|
|
Implements fmaxf16 and fminf16, which are two missing functions listed
here: #93566
|
|
#93566
|
|
#93566
|
|
#93566
|
|
functions (#94254)
https://github.com/llvm/llvm-project/issues/93566
|
|
math functions (#94218)
https://github.com/llvm/llvm-project/issues/93566
|
|
functions (#94001)
|
|
|
|
- In /libc/src/__support/ OSUtil, changed quick_exit to just exit, and
put in namespace
LIBC_NAMESPACE::internal.
- In /libc/src/stdlib added quick_exit
- Added test files for quick_exit
|
|
cc @lntue
|
|
functions (#93622)
New pull request for https://github.com/llvm/llvm-project/issues/89443
The previous PR was reverted after breaking fullbuild due to a missing
struct declaration, which I forgot to commit.
Reverts revert and adds the missing pthread_rwlockattr_getkind_np /
pthread_rwlockattr_setkind_np functions and tests respecitvely.
|
|
These are provided by newlib and many baremetal projects assume they're
available rather than providing their own implementation.
|
|
functions" (#91966)
Reverts llvm/llvm-project#90249
Fullbuild is broken:
https://lab.llvm.org/buildbot/#/builders/163/builds/56501
|
|
(#90249)
Closes #89443
I added the two missing functions and respective test cases. Let me know
if anything needs changing.
|
|
Fixes #84968.
Implements the `fcntl()` function defined in the `fcntl.h` header.
|
|
This PR implements a part of WG14 N2653:
- Define C23 char8_t
- Define C11 char16_t
- Define C11 char32_t
Missing goals are:
- The type of UTF-8 character literals is changed from unsigned char to
char8_t. (Since UTF-8 character literals already have type unsigned
char, this is not a semantic change).
- New mbrtoc8() and c8rtomb() functions declared in <uchar.h> enable
conversions between multibyte characters and UTF-8.
- A new ATOMIC_CHAR8_T_LOCK_FREE macro.
- A new atomic_char8_t typedef name.
|
|
Closes #84689.
Adding @lntue for review.
I was curious about the implementation of
`round_using_current_rounding_mode` used for the `nearbyint` functions.
It has one of the rounding modes as unreachable
([here](https://github.com/llvm/llvm-project/blob/main/libc/src/__support/FPUtil/NearestIntegerOperations.h#L243)),
and I was wondering if this was okay for the `nearbyint` functions.
---------
Co-authored-by: Michael Flanders <mkf727@cs.washington.edu>
|
|
|
|
Implement:
- pthread_rwlockattr_destroy
- pthread_rwlockattr_getpshared
- pthread_rwlockattr_init
- pthread_rwlockattr_setpshared
|
|
Implement:
- pthread_condattr_destroy
- pthread_condattr_getclock
- pthread_condattr_getpshared
- pthread_condattr_init
- pthread_condattr_setclock
- pthread_condattr_setpshared
Fixes: #88581
|
|
Provide C23 `fetestexceptflag` function according to 7.6.4.6 in the
latest [revision of the C
standard](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf)
from 2023-04-02.
Closes https://github.com/llvm/llvm-project/issues/87565.
|
|
{,u}fromfp{,x}* (#86692)" (#88567)
This reverts commit 8a071678a9091d536eae29912ca7be6238105956.
The test failure on 32-bit Arm should have been fixed by #86892.
cc @nickdesaulniers @lntue
|