Commit graph

20 commits

Author SHA1 Message Date
Alex Rønne Petersen
4972c987fd compiler-rt: export __aeabi_read_tp for arm-freebsd
FreeBSD normally provides this symbol in libc, but it's in the
FBSDprivate_1.0 namespace, so it doesn't get included in our abilists file.
Fortunately, the implementation is identical for Linux and FreeBSD, so we can
just provide it in compiler-rt.

It's interesting to note that the same is not true for NetBSD where the
implementation is more complex to support older Arm versions. But we do include
the symbol in our abilists file for NetBSD libc, so that's fine.

closes #25215
2025-09-11 23:28:26 +02:00
Andrew Kelley
76d04c1662 zig fmt 2025-07-16 10:27:39 -07:00
Linus Groh
79460d4a3e Remove uses of deprecated callconv aliases 2025-03-05 03:01:43 +00:00
Alex Rønne Petersen
673544b783
compiler-rt: Pass called functions into inline asm so the compiler sees the usage. 2025-01-25 14:54:02 +01:00
Alex Rønne Petersen
05a877a9a1
compiler-rt: More accurately export Windows Arm functions. 2025-01-25 13:49:21 +01:00
Alex Rønne Petersen
620f69c3b4
compiler-rt: Disable __aeabi_drsub test on armeb.
https://github.com/ziglang/zig/issues/22061
2024-12-13 03:13:14 +01:00
Alex Rønne Petersen
c9e67e71c1
std.Target: Replace isARM() with isArmOrThumb() and rename it to isArm().
The old isARM() function was a portability trap. With the name it had, it seemed
like the obviously correct function to use, but it didn't include Thumb. In the
vast majority of cases where someone wants to ask "is the target Arm?", Thumb
*should* be included.

There are exactly 3 cases in the codebase where we do actually need to exclude
Thumb, although one of those is in Aro and mirrors a check in Clang that is
itself likely a bug. These rare cases can just add an extra isThumb() check.
2024-11-03 09:29:30 +01:00
Alex Rønne Petersen
f02b93002c
compiler_rt: Export arm div helpers with correct names for thumb-linux-gnu. 2024-08-28 03:13:00 +02:00
mlugg
a3a737e9a6
lib,test,tools,doc: update usages of @export 2024-08-27 00:44:35 +01:00
matu3ba
f335d92b28
compiler_rt: arm frsub, drsub with tests (#17629)
Tests with +-0, numbers with accuracy 0.001, 0.000001, +-max for inf.
2023-10-21 02:12:02 -07:00
Jacob Young
228c956377 std: finish cleanup up asm
This also required implementing the necessary syntax in the x86_64 backend.
2023-07-31 03:49:21 -04:00
Zachary Raineri
d82b359010 Use builtin inference over @as where possible 2023-07-24 10:23:51 -07:00
mlugg
f26dda2117 all: migrate code to new cast builtin syntax
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-06-24 16:56:39 -07:00
frmdstryr
0ad692e76c
compiler_rt: fix ARM memset signatures 2023-05-11 11:33:47 +03:00
Jan Philipp Hafer
f618398b24 compiler_rt: document ARM status
This commit documents the status of Run-time ABI 2022Q3 for ARM excluding
C++ helper functions.
2023-04-26 15:32:05 -07:00
Luuk de Gram
30f2bb8464
compiler-rt: Set the symbol visibility
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-12-28 14:57:17 +01:00
Andrew Kelley
0556a2ba53 compiler-rt: finish cleanups
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-17 18:10:00 -07:00
Andrew Kelley
a8a7f15106 compiler-rt: use callconv(.AAPCS) on all __aeabi_ functions 2022-06-17 16:38:59 -07:00
Jakub Konka
80790be309 compiler_rt: compile each unit separately for improved archiving 2022-06-17 16:38:59 -07:00
Andrew Kelley
ec95e00e28 flatten lib/std/special and improve "pkg inside another" logic
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"
2022-05-06 22:41:00 -07:00
Renamed from lib/std/special/compiler_rt/arm.zig (Browse further)