Age | Commit message (Collapse) | Author | Files | Lines |
|
Part of #93566.
|
|
Part of #93566.
|
|
rounding modes. (#97149)
This implements the sinpif function. An exhaustive test shows it's
correct for all rounding modes.
Issue: #94895
|
|
Summary:
Straightforward RPC implementation of the `remove` function for the GPU.
Copies over the string and calls `remove` on it, passing the result
back. This is required for building some `libc++` functionality.
|
|
Part of #95250.
|
|
Due to Clang 11 backend error ("Unsupported library call operation!").
See Buildbot failures:
- https://lab.llvm.org/buildbot/#/builders/104/builds/1105
- https://lab.llvm.org/buildbot/#/builders/71/builds/1100
|
|
Part of #93566.
|
|
Previously headergen had a mechanism to copy the contents of one file
inot another. This wasn't ever used properly, and isn't supported by the
new headergen design. We will investigate better ways to support
different syscall definitions in future.
|
|
This makes it easier to diff the different configurations.
|
|
See Buildbot failures:
- https://lab.llvm.org/buildbot/#/builders/104/builds/936
- https://lab.llvm.org/buildbot/#/builders/71/builds/932
- https://lab.llvm.org/buildbot/#/builders/131/builds/913
|
|
Part of #93566.
|
|
These are all supported on arm32 and riscv32.
|
|
rounding modes. (#96719)
Sharing the same algorithm as double precision sin:
https://github.com/llvm/llvm-project/pull/95736 and cos:
https://github.com/llvm/llvm-project/pull/96591
|
|
The opaque type jmp_buf should only be tested in fullbuild mode.
|
|
rounding modes. (#96591)
Sharing the same algorithm as double precision sin:
https://github.com/llvm/llvm-project/pull/95736
|
|
https://github.com/ARM-software/abi-aa/blob/main/aapcs32/aapcs32.rst#6212stack-constraints-at-a-public-interface
mentions that the stack on ARM32 is double word aligned.
Remove confused comments around ArgcType. argc is always an int, passed on the
stack, so we need to store a pointer to it (regardless of ILP32 or LP64).
|
|
Part of #93566.
|
|
rounding modes. (#95736)
- Algorithm:
- Step 1 - Range reduction: for a double precision input `x`, return `k`
and `u` such that
- k is an integer
- u = x - k * pi / 128, and |u| < pi/256
- Step 2 - Calculate `sin(u)` and `cos(u)` in double-double using Taylor
polynomials with errors < 2^-70 with FMA or < 2^-66 w/o FMA.
- Step 3 - Calculate `sin(x) = sin(k*pi/128) * cos(u) + cos(k*pi/128) *
sin(u)` using look-up table for `sin(k*pi/128)` and `cos(k*pi/128)`.
- Step 4 - Use Ziv's rounding test to decide if the result is correctly
rounded.
- Step 4' - If the Ziv's rounding test failed, redo step 1-3 using
128-bit precision.
- Currently, without FMA instructions, the large range reduction only
works correctly for the default rounding mode (FE_TONEAREST).
- Provide `LIBC_MATH` flag so that users can set `LIBC_MATH =
LIBC_MATH_SKIP_ACCURATE_PASS` to build the `sin` function without step 4
and 4'.
|
|
Necessary for arm32 cross full build.
|
|
baremetal. (#96372)
Downstream build issue reported:
https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8744479865106393873/overview
|
|
Part of #93566.
|
|
Rather than propgating a compile define, add an explicit cmake flag for
controlling the size. The default for baremetal is 100KB and the default
for others is 1GB.
|
|
|
|
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.
|