aboutsummaryrefslogtreecommitdiff
path: root/lib/std/start.zig
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2024-10-03 08:34:19 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2024-11-03 09:29:30 +0100
commitc9e67e71c146d9a9c217d3f47e75258a1ffeedd9 (patch)
tree4c39477d16c9dc77dd53a254d11d601025fb3919 /lib/std/start.zig
parent4e843b4e2b8c7cd48ecbd80a59036f1f72a997ca (diff)
downloadzig-c9e67e71c146d9a9c217d3f47e75258a1ffeedd9.tar.gz
zig-c9e67e71c146d9a9c217d3f47e75258a1ffeedd9.zip
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.
Diffstat (limited to 'lib/std/start.zig')
-rw-r--r--lib/std/start.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/start.zig b/lib/std/start.zig
index c5664cbf0f..1d1e38654b 100644
--- a/lib/std/start.zig
+++ b/lib/std/start.zig
@@ -495,7 +495,7 @@ fn posixCallMainAndExit(argc_argv_ptr: [*]usize) callconv(.C) noreturn {
// ARMv6 targets (and earlier) have no support for TLS in hardware.
// FIXME: Elide the check for targets >= ARMv7 when the target feature API
// becomes less verbose (and more usable).
- if (comptime native_arch.isArmOrThumb()) {
+ if (comptime native_arch.isArm()) {
if (at_hwcap & std.os.linux.HWCAP.TLS == 0) {
// FIXME: Make __aeabi_read_tp call the kernel helper kuser_get_tls
// For the time being use a simple trap instead of a @panic call to