aboutsummaryrefslogtreecommitdiff
path: root/lib/compiler_rt/int.zig
AgeCommit message (Collapse)Author
2025-07-22aarch64: add new from scratch self-hosted backendJacob Young
2025-03-05Remove uses of deprecated callconv aliasesLinus Groh
2025-02-22zig build fmtAndrew Kelley
2024-10-19compiler_rt: remove bogus testsmlugg
These only worked before because our lowering of the `AAPCS` calling convention was incorrect in a way which happened to match the ABI of these functions. The tests aren't actually very helpful -- there are already tests for `divmoddi4` etc -- so rather than using inline asm on the caller side to match the ABI, we just delete these two tests. We were for some reason missing a direct test for `__udivmodsi4`, so one has been added.
2024-08-27lib,test,tools,doc: update usages of @exportmlugg
2023-10-25x86_64: pass more testsJacob Young
* 128-bit integer multiplication with overflow * more instruction encodings used by std inline asm * implement the `try_ptr` air instruction * follow correct stack frame abi * enable full panic handler * enable stack traces
2023-10-22Revert "Revert "Merge pull request #17637 from jacobly0/x86_64-test-std""Jacob Young
This reverts commit 6f0198cadbe29294f2bf3153a27beebd64377566.
2023-10-22Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"Andrew Kelley
This reverts commit 0c99ba1eab63865592bb084feb271cd4e4b0357e, reversing changes made to 5f92b070bf284f1493b1b5d433dd3adde2f46727. This caused a CI failure when it landed in master branch due to a 128-bit `@byteSwap` in std.mem.
2023-10-21x86_64: fix bugs and disable erroring testsJacob Young
2023-10-20compiler_rt: add tests for arm routines (#17573)matu3ba
* __aeabi_ldivmod * __aeabi_uldivmod * __aeabi_idivmod * __aeabi_uidivmod
2023-09-19compiler_rt: fight off `@as` invasionJacob Young
Importantly, fixes incorrectly annotated types in `__aeabi_?2h`.
2023-06-24all: migrate code to new cast builtin syntaxmlugg
Most of this migration was performed automatically with `zig fmt`. There were a few exceptions which I had to manually fix: * `@alignCast` and `@addrSpaceCast` cannot be automatically rewritten * `@truncate`'s fixup is incorrect for vectors * Test cases are not formatted, and their error locations change
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-11compiler_rt: __divmodti4 for libgcc symbol compatibilitymatu3ba
- Copy and adjust __divmodsi4 tests for __divmoddi4 and __divmodti4. - Assuming d = a/b does not overflow (MIN/-1) or uses div by 0, then tmp = (d * b) = (a/b * b) = a does not overflow. => Remove wraparound for remainder in applicable routines.
2022-12-28compiler-rt: Set the symbol visibilityLuuk de Gram
When we're compiling compiler_rt for any WebAssembly target, we do not want to expose all the compiler-rt functions to the host runtime. By setting the visibility of all exports to `hidden`, we allow the linker to resolve the symbols during linktime, while not expose the functions to the host runtime. This also means the linker can properly garbage collect any compiler-rt function that does not get resolved. The symbol visibility for all target remains the same as before: `default`.
2022-08-22stage2+stage1: remove type parameter from bit builtinsVeikka Tuominen
Closes #12529 Closes #12511 Closes #6835
2022-06-17compiler-rt: finish cleanupsAndrew Kelley
Finishes cleanups that I started in other commits in this branch. * Use common.linkage for all exports instead of redoing the logic in each file. * Remove pointless `@setRuntimeSafety` calls. * Avoid redundantly exporting multiple versions of functions. For example, if PPC wants `ceilf128` then don't also export `ceilq`; similarly if ARM wants `__aeabi_ddiv` then don't also export `__divdf3`. * Use `inline` for helper functions instead of making inline calls at callsites.
2022-06-17compiler-rt: use callconv(.AAPCS) on all __aeabi_ functionsAndrew Kelley
2022-06-17compiler_rt: compile each unit separately for improved archivingJakub Konka
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"