aboutsummaryrefslogtreecommitdiff
path: root/lib/std/special/compiler_rt.zig
diff options
context:
space:
mode:
authorMichaƫl Larouche <michael.larouche@gmail.com>2020-01-11 17:10:00 -0500
committerAndrew Kelley <andrew@ziglang.org>2020-01-17 14:25:22 -0500
commitd9be6e5dc693fcbcb5f4c343a3d2b0b9fc786e25 (patch)
tree794a0599b570c38ec2714f1d11d2f8c8addc5240 /lib/std/special/compiler_rt.zig
parentd53e8a5751c3d3a65db775598cc1db88c4d92ba9 (diff)
downloadzig-d9be6e5dc693fcbcb5f4c343a3d2b0b9fc786e25.tar.gz
zig-d9be6e5dc693fcbcb5f4c343a3d2b0b9fc786e25.zip
Port clzsi2 from compiler_rt, required for using std.fmt.format on some ARM architecture.
Diffstat (limited to 'lib/std/special/compiler_rt.zig')
-rw-r--r--lib/std/special/compiler_rt.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/std/special/compiler_rt.zig b/lib/std/special/compiler_rt.zig
index cf255804aa..9b225dbad6 100644
--- a/lib/std/special/compiler_rt.zig
+++ b/lib/std/special/compiler_rt.zig
@@ -146,6 +146,8 @@ comptime {
@export(@import("compiler_rt/negXf2.zig").__negsf2, .{ .name = "__negsf2", .linkage = linkage });
@export(@import("compiler_rt/negXf2.zig").__negdf2, .{ .name = "__negdf2", .linkage = linkage });
+ @export(@import("compiler_rt/clzsi2.zig").__clzsi2, .{ .name = "__clzsi2", .linkage = linkage });
+
if (is_arm_arch and !is_arm_64 and !is_test) {
@export(@import("compiler_rt/arm.zig").__aeabi_unwind_cpp_pr0, .{ .name = "__aeabi_unwind_cpp_pr0", .linkage = linkage });
@export(@import("compiler_rt/arm.zig").__aeabi_unwind_cpp_pr1, .{ .name = "__aeabi_unwind_cpp_pr1", .linkage = linkage });
@@ -177,7 +179,9 @@ comptime {
@export(@import("compiler_rt/arm.zig").__aeabi_memclr, .{ .name = "__aeabi_memclr4", .linkage = linkage });
@export(@import("compiler_rt/arm.zig").__aeabi_memclr, .{ .name = "__aeabi_memclr8", .linkage = linkage });
- @export(@import("compiler_rt/arm.zig").__aeabi_read_tp, .{ .name = "__aeabi_read_tp", .linkage = linkage });
+ if (builtin.os == .linux) {
+ @export(@import("compiler_rt/arm.zig").__aeabi_read_tp, .{ .name = "__aeabi_read_tp", .linkage = linkage });
+ }
@export(@import("compiler_rt/extendXfYf2.zig").__aeabi_f2d, .{ .name = "__aeabi_f2d", .linkage = linkage });
@export(@import("compiler_rt/floatsiXf.zig").__aeabi_i2d, .{ .name = "__aeabi_i2d", .linkage = linkage });