| author | |
| committer | |
| log | 57c530155f0c7754386c50fb9bc128198cab705c |
| tree | 7c2dbe6453ce2b911171944f281719aae6ca381e |
| parent | 2259d629d3d4e361f78e4d1b79425dfae912f05c |
4 files changed, 15 insertions(+), 2 deletions(-)
lib/compiler_rt.zig+1| ... | @@ -62,6 +62,7 @@ comptime { | ... | @@ -62,6 +62,7 @@ comptime { |
| 62 | _ = @import("compiler_rt/emutls.zig"); | 62 | _ = @import("compiler_rt/emutls.zig"); |
| 63 | _ = @import("compiler_rt/arm.zig"); | 63 | _ = @import("compiler_rt/arm.zig"); |
| 64 | _ = @import("compiler_rt/aulldiv.zig"); | 64 | _ = @import("compiler_rt/aulldiv.zig"); |
| 65 | _ = @import("compiler_rt/aullrem.zig"); | ||
| 65 | _ = @import("compiler_rt/sparc.zig"); | 66 | _ = @import("compiler_rt/sparc.zig"); |
| 66 | _ = @import("compiler_rt/clear_cache.zig"); | 67 | _ = @import("compiler_rt/clear_cache.zig"); |
| 67 | 68 |
lib/compiler_rt/aulldiv.zig-2| ... | @@ -10,8 +10,6 @@ comptime { | ... | @@ -10,8 +10,6 @@ comptime { |
| 10 | // Don't let LLVM apply the stdcall name mangling on those MSVC builtins | 10 | // Don't let LLVM apply the stdcall name mangling on those MSVC builtins |
| 11 | @export(_alldiv, .{ .name = "\x01__alldiv", .linkage = linkage }); | 11 | @export(_alldiv, .{ .name = "\x01__alldiv", .linkage = linkage }); |
| 12 | @export(_aulldiv, .{ .name = "\x01__aulldiv", .linkage = linkage }); | 12 | @export(_aulldiv, .{ .name = "\x01__aulldiv", .linkage = linkage }); |
| 13 | @export(_allrem, .{ .name = "\x01__allrem", .linkage = linkage }); | ||
| 14 | @export(_aullrem, .{ .name = "\x01__aullrem", .linkage = linkage }); | ||
| 15 | } | 13 | } |
| 16 | } | 14 | } |
| 17 | 15 |
lib/compiler_rt/aullrem.zig+13| ... | @@ -1,4 +1,17 @@ | ... | @@ -1,4 +1,17 @@ |
| 1 | const std = @import("std"); | ||
| 1 | const builtin = @import("builtin"); | 2 | const builtin = @import("builtin"); |
| 3 | const arch = builtin.cpu.arch; | ||
| 4 | const abi = builtin.abi; | ||
| 5 | const linkage: std.builtin.GlobalLinkage = if (builtin.is_test) .Internal else .Strong; | ||
| 6 | pub const panic = @import("common.zig").panic; | ||
| 7 | |||
| 8 | comptime { | ||
| 9 | if (arch == .i386 and abi == .msvc) { | ||
| 10 | // Don't let LLVM apply the stdcall name mangling on those MSVC builtins | ||
| 11 | @export(_allrem, .{ .name = "\x01__allrem", .linkage = linkage }); | ||
| 12 | @export(_aullrem, .{ .name = "\x01__aullrem", .linkage = linkage }); | ||
| 13 | } | ||
| 14 | } | ||
| 2 | 15 | ||
| 3 | pub fn _allrem(a: i64, b: i64) callconv(.Stdcall) i64 { | 16 | pub fn _allrem(a: i64, b: i64) callconv(.Stdcall) i64 { |
| 4 | @setRuntimeSafety(builtin.is_test); | 17 | @setRuntimeSafety(builtin.is_test); |
src/compiler_rt.zig+1| ... | @@ -227,6 +227,7 @@ const sources = &[_][]const u8{ | ... | @@ -227,6 +227,7 @@ const sources = &[_][]const u8{ |
| 227 | "compiler_rt/emutls.zig", | 227 | "compiler_rt/emutls.zig", |
| 228 | "compiler_rt/arm.zig", | 228 | "compiler_rt/arm.zig", |
| 229 | "compiler_rt/aulldiv.zig", | 229 | "compiler_rt/aulldiv.zig", |
| 230 | "compiler_rt/aullrem.zig", | ||
| 230 | "compiler_rt/sparc.zig", | 231 | "compiler_rt/sparc.zig", |
| 231 | "compiler_rt/clear_cache.zig", | 232 | "compiler_rt/clear_cache.zig", |
| 232 | }; | 233 | }; |