Skip to content

Commit fd756fc

Browse files
author
Jan Philipp Hafer
committed
expose __clzdi2 and __clzti2 for linkage
1 parent 1660684 commit fd756fc

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/std/special/compiler_rt.zig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ comptime {
276276

277277
const __clzsi2 = @import("compiler_rt/clzsi2.zig").__clzsi2;
278278
@export(__clzsi2, .{ .name = "__clzsi2", .linkage = linkage });
279+
const __clzdi2 = @import("compiler_rt/clzdi2.zig").__clzdi2;
280+
@export(__clzdi2, .{ .name = "__clzdi2", .linkage = linkage });
281+
const __clzti2 = @import("compiler_rt/clzti2.zig").__clzti2;
282+
@export(__clzti2, .{ .name = "__clzti2", .linkage = linkage });
279283

280284
if (builtin.link_libc and os_tag == .openbsd) {
281285
const __emutls_get_address = @import("compiler_rt/emutls.zig").__emutls_get_address;

lib/std/special/compiler_rt/clzsi2_test.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ test "clzsi2" {
273273
try test__clzsi2(0xFD000000, 0);
274274
try test__clzsi2(0xFE000000, 0);
275275
try test__clzsi2(0xFF000000, 0);
276+
try test__clzsi2(0x00000000, 32);
276277
try test__clzsi2(0x00000001, 31);
277278
try test__clzsi2(0x00000002, 30);
278279
try test__clzsi2(0x00000004, 29);

0 commit comments

Comments
 (0)