aboutsummaryrefslogtreecommitdiff
path: root/lib/compiler_rt.zig
AgeCommit message (Collapse)Author
2025-08-30compiler-rt: move strlen from libzigc to hereAlex Rønne Petersen
LLVM 21 has started recognizing strlen-like idioms and optimizing them to strlen calls, so we need this function provided in compiler-rt for libc-less compilations.
2025-07-26aarch64: implement more optional/error union/union supportJacob Young
2025-07-22aarch64: add new from scratch self-hosted backendJacob Young
2025-06-16compiler-rt: Export _fltused for UEFI.Alex Rønne Petersen
Closes #24148.
2025-06-03Merge pull request #24013 from alexrp/test-matrixAndrew Kelley
More target coverage in the module test matrix
2025-06-01compiler-rt: add __addvsi3, __subvsi3, __mulvsi3, and __subvdi3Hilger Baumstark
2025-05-29compiler-rt: Fix some exports for *-windows-none.Alex Rønne Petersen
2025-02-15x86_64: rewrite scalar and vector int `@divTrunc`Jacob Young
2025-02-09x86_64: implement conversions between scalar floats and intsJacob Young
Closes #22797
2025-01-20compiler-rt: move memmove back to memmove.zigdweiller
2025-01-17replace `compiler_rt` memcpy with a better versionDavid Rubin
2024-11-24compiler_rt: Add hexagon builtins (#22029)Brian Cain
Signed-off-by: Brian Cain <bcain@quicinc.com> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com> Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>
2024-10-23handle _fltused in compiler_rtAndrew Kelley
so we don't have to do an entire compilation unit for just this silly symbol
2024-06-16stage2-wasm: bit_reversePavel Verigo
2023-11-10move libssp into libcompiler_rtAndrew Kelley
closes #7265
2023-06-19all: zig fmt and rename "@XToY" to "@YFromX"Eric Joldasov
Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
2023-02-24compiler_rt: declutter int.zig, add mulXi3 tests (#14623)matu3ba
- Combine mulXi3 routines for follow-up cleanup. - DRY up Dwords and Twords - rename both to HalveInt and use instance * Justification: Not all processors have word size 32 bit. * remove test file from CMakeLists * DRY things.
2023-02-19compiler_rt: restructure compiler_rt.zig according to README.mdJan Philipp Hafer
Justifications - compiler_rt base routines are almost finished, so make 1:1 mapping of code and documentation. - Make adjustments to code + documentation simpler to prevent technical or documentation debt.
2023-02-12compiler_rt: add __powihf2, __powisf2, __powidf2, __powitf2, __powixf2Jan Philipp Hafer
Implementation and tests ported from LLVM release 80. Tests of __powihf2 created from __powisf2 tests with minor adjustments.
2022-12-22compiler-rt: implement __udivei4 and __umodei4 (#14023)Frank Denis
Allows dividing and formatting arbitrary-large unsigned integers.
2022-12-06compiler_rt: remove stack probe functions from c buildsJacob Young
2022-12-06interpret the WASI blob to produce zig2.c and compiler_rt.cAndrew Kelley
* synchronize zig1.c from zig-wasi external project * change the way argv works to avoid absolute paths * autodetect isatty * compiler_rt: disable some functions when object format is C * add missing flag from config.zig.in The next problem is that compiling compiler_rt.c with gcc gives "conflicting types" errors for `__eqhf2` and friends.
2022-11-21rename lse_atomics.zig to aarch64_outline_atomics.zigAndrew Kelley
2022-11-21simplify outline atomicsAndrew Kelley
* Rely on libSystem when targeting macOS. * Make tools/gen_outline_atomics.zig more idiomatic. * Remove the CPU detection / auxval checking from compiler_rt. This functionality belongs in a different component. Zig's compiler_rt must not rely on constructors. Instead it will export a symbol for setting the value, and start code can detect and activate it. * Remove the separate logic for inline assembly when the target does or does not have lse support. `.inst` works in both cases.
2022-11-21compiler_rt: add outlined lse atomics for aarch64Devin Singh
2022-10-22fix: correctly import memcmp.zig in compiler-rtLuuk de Gram
cmp.zig was accidently being referenced twice, rather than importing memcmp.zig. This means that its symbols were also not included in the generated compiler-rt output.
2022-10-17Merge pull request #11747 from Luukdegram/compiler-rtAndrew Kelley
compiler_rt: Move mem implementations from c.zig
2022-10-15compiler_rt: Move mem implementations from c.zigLuuk de Gram
This moves functions that LLVM generates calls to, to the compiler_rt implementation itself, rather than c.zig. This is a prerequisite for native backends to link with compiler-rt. This also allows native backends to generate calls to `memcpy` and the like.
2022-10-13compiler_rt: Add missing `f16` functionsCody Tapscott
This change also exposes some of the existing functions under both the PPC-style names symbols and the compiler-rt-style names, since Zig currently lowers softfloat calls to the latter.
2022-10-09compiler-rt: Implement mulXc3 and divXc3 functionsCody Tapscott
These are the standard complex multiplication/division functions required by the C standard (Annex G). Don't get me started on the standard's handling of complex-infinity...
2022-06-30stage2: lower float negation explicitlyAndrew Kelley
Rather than lowering float negation as `0.0 - x`. * Add AIR instruction for float negation. * Add compiler-rt functions for f128, f80 negation closes #11853
2022-06-22Add missing adddf3frmdstryr
``` LLD Link... ld.lld: error: undefined symbol: __aeabi_dadd >>> referenced by errol.zig:366 (/home/usr/projects/zig/build/lib/zig/std/fmt/errol.zig:366) ```
2022-06-17compiler-rt: move SPARC functions into appropriate compilation unitsAndrew Kelley
2022-06-17compiler-rt: break up functions even moreAndrew Kelley
The purpose of this branch is to switch to using an object file for each independent function, in order to make linking simpler - instead of relying on `-ffunction-sections` and `--gc-sections`, which involves the linker doing the work of linking everything and then undoing work via garbage collection, this will allow the linker to only include the compilation units that are depended on in the first place. This commit makes progress towards that goal.
2022-06-17compiler_rt: shuffle order of imports to mark relevant symbols for exportJakub Konka
2022-06-17compiler_rt: correctly export allrem and aullrem for i386-windows-msvcJakub Konka
2022-06-17compiler_rt: compile each unit separately for improved archivingJakub Konka
2022-05-16stage2: add runtime safety for unwrapping errorVeikka Tuominen
2022-05-08compiler_rt: avoid weak aliases on WindowsAndrew Kelley
When exporting math functions for Windows, we provide weak exports of 'l' variants rather than weak aliases. We still use aliases on other operating systems so that the 'l' variants have one less jump instruction in this case.
2022-05-07compiler-rt: avoid symbol collisions with Windows libcAndrew Kelley
closes #11600
2022-05-06flatten lib/std/special and improve "pkg inside another" logicAndrew Kelley
stage2: change logic for detecting whether the main package is inside the std package. Previously it relied on realpath() which is not portable. This uses resolve() which is how imports already work. * stage2: fix cleanup bug when creating Module * flatten lib/std/special/* to lib/* - this was motivated by making main_pkg_is_inside_std false for compiler_rt & friends. * rename "mini libc" to "universal libc"