authorgravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2025-03-03 18:01:47+00:00
committergravatar for mail@linusgroh.deLinus Groh <mail@linusgroh.de> 2025-03-05 03:01:43+00:00
log79460d4a3eef8eb927b02a7eda8bc9999a766672
tree8ce2cfb123bf590e8c522860ad04c13b6e6d9aa9
parent05937b362a8206f7eca193a28617049371f11b26

Remove uses of deprecated callconv aliases


251 files changed, 826 insertions(+), 822 deletions(-)

doc/langref/export_builtin.zig+1-1
...@@ -2,6 +2,6 @@ comptime {...@@ -2,6 +2,6 @@ comptime {
2 @export(&internalName, .{ .name = "foo", .linkage = .strong });2 @export(&internalName, .{ .name = "foo", .linkage = .strong });
3}3}
44
5fn internalName() callconv(.C) void {}5fn internalName() callconv(.c) void {}
66
7// obj7// obj
doc/langref/test_defining_variadic_function.zig+1-1
...@@ -2,7 +2,7 @@ const std = @import("std");...@@ -2,7 +2,7 @@ const std = @import("std");
2const testing = std.testing;2const testing = std.testing;
3const builtin = @import("builtin");3const builtin = @import("builtin");
44
5fn add(count: c_int, ...) callconv(.C) c_int {5fn add(count: c_int, ...) callconv(.c) c_int {
6 var ap = @cVaStart();6 var ap = @cVaStart();
7 defer @cVaEnd(&ap);7 defer @cVaEnd(&ap);
8 var i: usize = 0;8 var i: usize = 0;
doc/langref/test_functions.zig+1-1
...@@ -35,7 +35,7 @@ fn abort() noreturn {...@@ -35,7 +35,7 @@ fn abort() noreturn {
3535
36// The naked calling convention makes a function not have any function prologue or epilogue.36// The naked calling convention makes a function not have any function prologue or epilogue.
37// This can be useful when integrating with assembly.37// This can be useful when integrating with assembly.
38fn _start() callconv(.Naked) noreturn {38fn _start() callconv(.naked) noreturn {
39 abort();39 abort();
40}40}
4141
doc/langref/test_opaque.zig+1-1
...@@ -2,7 +2,7 @@ const Derp = opaque {};...@@ -2,7 +2,7 @@ const Derp = opaque {};
2const Wat = opaque {};2const Wat = opaque {};
33
4extern fn bar(d: *Derp) void;4extern fn bar(d: *Derp) void;
5fn foo(w: *Wat) callconv(.C) void {5fn foo(w: *Wat) callconv(.c) void {
6 bar(w);6 bar(w);
7}7}
88
lib/c.zig+9-9
...@@ -54,11 +54,11 @@ pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, _: ?...@@ -54,11 +54,11 @@ pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, _: ?
54}54}
5555
56extern fn main(argc: c_int, argv: [*:null]?[*:0]u8) c_int;56extern fn main(argc: c_int, argv: [*:null]?[*:0]u8) c_int;
57fn wasm_start() callconv(.C) void {57fn wasm_start() callconv(.c) void {
58 _ = main(0, undefined);58 _ = main(0, undefined);
59}59}
6060
61fn strcpy(dest: [*:0]u8, src: [*:0]const u8) callconv(.C) [*:0]u8 {61fn strcpy(dest: [*:0]u8, src: [*:0]const u8) callconv(.c) [*:0]u8 {
62 var i: usize = 0;62 var i: usize = 0;
63 while (src[i] != 0) : (i += 1) {63 while (src[i] != 0) : (i += 1) {
64 dest[i] = src[i];64 dest[i] = src[i];
...@@ -76,7 +76,7 @@ test "strcpy" {...@@ -76,7 +76,7 @@ test "strcpy" {
76 try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));76 try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));
77}77}
7878
79fn strncpy(dest: [*:0]u8, src: [*:0]const u8, n: usize) callconv(.C) [*:0]u8 {79fn strncpy(dest: [*:0]u8, src: [*:0]const u8, n: usize) callconv(.c) [*:0]u8 {
80 var i: usize = 0;80 var i: usize = 0;
81 while (i < n and src[i] != 0) : (i += 1) {81 while (i < n and src[i] != 0) : (i += 1) {
82 dest[i] = src[i];82 dest[i] = src[i];
...@@ -96,7 +96,7 @@ test "strncpy" {...@@ -96,7 +96,7 @@ test "strncpy" {
96 try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));96 try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));
97}97}
9898
99fn strcat(dest: [*:0]u8, src: [*:0]const u8) callconv(.C) [*:0]u8 {99fn strcat(dest: [*:0]u8, src: [*:0]const u8) callconv(.c) [*:0]u8 {
100 var dest_end: usize = 0;100 var dest_end: usize = 0;
101 while (dest[dest_end] != 0) : (dest_end += 1) {}101 while (dest[dest_end] != 0) : (dest_end += 1) {}
102102
...@@ -119,7 +119,7 @@ test "strcat" {...@@ -119,7 +119,7 @@ test "strcat" {
119 try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));119 try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));
120}120}
121121
122fn strncat(dest: [*:0]u8, src: [*:0]const u8, avail: usize) callconv(.C) [*:0]u8 {122fn strncat(dest: [*:0]u8, src: [*:0]const u8, avail: usize) callconv(.c) [*:0]u8 {
123 var dest_end: usize = 0;123 var dest_end: usize = 0;
124 while (dest[dest_end] != 0) : (dest_end += 1) {}124 while (dest[dest_end] != 0) : (dest_end += 1) {}
125125
...@@ -142,7 +142,7 @@ test "strncat" {...@@ -142,7 +142,7 @@ test "strncat" {
142 try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));142 try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));
143}143}
144144
145fn strcmp(s1: [*:0]const u8, s2: [*:0]const u8) callconv(.C) c_int {145fn strcmp(s1: [*:0]const u8, s2: [*:0]const u8) callconv(.c) c_int {
146 return switch (std.mem.orderZ(u8, s1, s2)) {146 return switch (std.mem.orderZ(u8, s1, s2)) {
147 .lt => -1,147 .lt => -1,
148 .eq => 0,148 .eq => 0,
...@@ -150,11 +150,11 @@ fn strcmp(s1: [*:0]const u8, s2: [*:0]const u8) callconv(.C) c_int {...@@ -150,11 +150,11 @@ fn strcmp(s1: [*:0]const u8, s2: [*:0]const u8) callconv(.C) c_int {
150 };150 };
151}151}
152152
153fn strlen(s: [*:0]const u8) callconv(.C) usize {153fn strlen(s: [*:0]const u8) callconv(.c) usize {
154 return std.mem.len(s);154 return std.mem.len(s);
155}155}
156156
157fn strncmp(_l: [*:0]const u8, _r: [*:0]const u8, _n: usize) callconv(.C) c_int {157fn strncmp(_l: [*:0]const u8, _r: [*:0]const u8, _n: usize) callconv(.c) c_int {
158 if (_n == 0) return 0;158 if (_n == 0) return 0;
159 var l = _l;159 var l = _l;
160 var r = _r;160 var r = _r;
...@@ -167,7 +167,7 @@ fn strncmp(_l: [*:0]const u8, _r: [*:0]const u8, _n: usize) callconv(.C) c_int {...@@ -167,7 +167,7 @@ fn strncmp(_l: [*:0]const u8, _r: [*:0]const u8, _n: usize) callconv(.C) c_int {
167 return @as(c_int, l[0]) - @as(c_int, r[0]);167 return @as(c_int, l[0]) - @as(c_int, r[0]);
168}168}
169169
170fn strerror(errnum: c_int) callconv(.C) [*:0]const u8 {170fn strerror(errnum: c_int) callconv(.c) [*:0]const u8 {
171 _ = errnum;171 _ = errnum;
172 return "TODO strerror implementation";172 return "TODO strerror implementation";
173}173}
lib/compiler/test_runner.zig+2-2
...@@ -350,7 +350,7 @@ var is_fuzz_test: bool = undefined;...@@ -350,7 +350,7 @@ var is_fuzz_test: bool = undefined;
350extern fn fuzzer_set_name(name_ptr: [*]const u8, name_len: usize) void;350extern fn fuzzer_set_name(name_ptr: [*]const u8, name_len: usize) void;
351extern fn fuzzer_init(cache_dir: FuzzerSlice) void;351extern fn fuzzer_init(cache_dir: FuzzerSlice) void;
352extern fn fuzzer_init_corpus_elem(input_ptr: [*]const u8, input_len: usize) void;352extern fn fuzzer_init_corpus_elem(input_ptr: [*]const u8, input_len: usize) void;
353extern fn fuzzer_start(testOne: *const fn ([*]const u8, usize) callconv(.C) void) void;353extern fn fuzzer_start(testOne: *const fn ([*]const u8, usize) callconv(.c) void) void;
354extern fn fuzzer_coverage_id() u64;354extern fn fuzzer_coverage_id() u64;
355355
356pub fn fuzz(356pub fn fuzz(
...@@ -382,7 +382,7 @@ pub fn fuzz(...@@ -382,7 +382,7 @@ pub fn fuzz(
382 const global = struct {382 const global = struct {
383 var ctx: @TypeOf(context) = undefined;383 var ctx: @TypeOf(context) = undefined;
384384
385 fn fuzzer_one(input_ptr: [*]const u8, input_len: usize) callconv(.C) void {385 fn fuzzer_one(input_ptr: [*]const u8, input_len: usize) callconv(.c) void {
386 @disableInstrumentation();386 @disableInstrumentation();
387 testing.allocator_instance = .{};387 testing.allocator_instance = .{};
388 defer if (testing.allocator_instance.deinit() == .leak) std.process.exit(1);388 defer if (testing.allocator_instance.deinit() == .leak) std.process.exit(1);
lib/compiler_rt/aarch64_outline_atomics.zig+100-100
...@@ -10,7 +10,7 @@ const always_has_lse = std.Target.aarch64.featureSetHas(builtin.cpu.features, .l...@@ -10,7 +10,7 @@ const always_has_lse = std.Target.aarch64.featureSetHas(builtin.cpu.features, .l
10/// which ARM is concerned would have too much overhead.10/// which ARM is concerned would have too much overhead.
11var __aarch64_have_lse_atomics: u8 = @intFromBool(always_has_lse);11var __aarch64_have_lse_atomics: u8 = @intFromBool(always_has_lse);
1212
13fn __aarch64_cas1_relax() align(16) callconv(.Naked) void {13fn __aarch64_cas1_relax() align(16) callconv(.naked) void {
14 @setRuntimeSafety(false);14 @setRuntimeSafety(false);
15 asm volatile (15 asm volatile (
16 \\ cbz w16, 8f16 \\ cbz w16, 8f
...@@ -32,7 +32,7 @@ fn __aarch64_cas1_relax() align(16) callconv(.Naked) void {...@@ -32,7 +32,7 @@ fn __aarch64_cas1_relax() align(16) callconv(.Naked) void {
32 );32 );
33 unreachable;33 unreachable;
34}34}
35fn __aarch64_swp1_relax() align(16) callconv(.Naked) void {35fn __aarch64_swp1_relax() align(16) callconv(.naked) void {
36 @setRuntimeSafety(false);36 @setRuntimeSafety(false);
37 asm volatile (37 asm volatile (
38 \\ cbz w16, 8f38 \\ cbz w16, 8f
...@@ -52,7 +52,7 @@ fn __aarch64_swp1_relax() align(16) callconv(.Naked) void {...@@ -52,7 +52,7 @@ fn __aarch64_swp1_relax() align(16) callconv(.Naked) void {
52 );52 );
53 unreachable;53 unreachable;
54}54}
55fn __aarch64_ldadd1_relax() align(16) callconv(.Naked) void {55fn __aarch64_ldadd1_relax() align(16) callconv(.naked) void {
56 @setRuntimeSafety(false);56 @setRuntimeSafety(false);
57 asm volatile (57 asm volatile (
58 \\ cbz w16, 8f58 \\ cbz w16, 8f
...@@ -73,7 +73,7 @@ fn __aarch64_ldadd1_relax() align(16) callconv(.Naked) void {...@@ -73,7 +73,7 @@ fn __aarch64_ldadd1_relax() align(16) callconv(.Naked) void {
73 );73 );
74 unreachable;74 unreachable;
75}75}
76fn __aarch64_ldclr1_relax() align(16) callconv(.Naked) void {76fn __aarch64_ldclr1_relax() align(16) callconv(.naked) void {
77 @setRuntimeSafety(false);77 @setRuntimeSafety(false);
78 asm volatile (78 asm volatile (
79 \\ cbz w16, 8f79 \\ cbz w16, 8f
...@@ -94,7 +94,7 @@ fn __aarch64_ldclr1_relax() align(16) callconv(.Naked) void {...@@ -94,7 +94,7 @@ fn __aarch64_ldclr1_relax() align(16) callconv(.Naked) void {
94 );94 );
95 unreachable;95 unreachable;
96}96}
97fn __aarch64_ldeor1_relax() align(16) callconv(.Naked) void {97fn __aarch64_ldeor1_relax() align(16) callconv(.naked) void {
98 @setRuntimeSafety(false);98 @setRuntimeSafety(false);
99 asm volatile (99 asm volatile (
100 \\ cbz w16, 8f100 \\ cbz w16, 8f
...@@ -115,7 +115,7 @@ fn __aarch64_ldeor1_relax() align(16) callconv(.Naked) void {...@@ -115,7 +115,7 @@ fn __aarch64_ldeor1_relax() align(16) callconv(.Naked) void {
115 );115 );
116 unreachable;116 unreachable;
117}117}
118fn __aarch64_ldset1_relax() align(16) callconv(.Naked) void {118fn __aarch64_ldset1_relax() align(16) callconv(.naked) void {
119 @setRuntimeSafety(false);119 @setRuntimeSafety(false);
120 asm volatile (120 asm volatile (
121 \\ cbz w16, 8f121 \\ cbz w16, 8f
...@@ -136,7 +136,7 @@ fn __aarch64_ldset1_relax() align(16) callconv(.Naked) void {...@@ -136,7 +136,7 @@ fn __aarch64_ldset1_relax() align(16) callconv(.Naked) void {
136 );136 );
137 unreachable;137 unreachable;
138}138}
139fn __aarch64_cas1_acq() align(16) callconv(.Naked) void {139fn __aarch64_cas1_acq() align(16) callconv(.naked) void {
140 @setRuntimeSafety(false);140 @setRuntimeSafety(false);
141 asm volatile (141 asm volatile (
142 \\ cbz w16, 8f142 \\ cbz w16, 8f
...@@ -158,7 +158,7 @@ fn __aarch64_cas1_acq() align(16) callconv(.Naked) void {...@@ -158,7 +158,7 @@ fn __aarch64_cas1_acq() align(16) callconv(.Naked) void {
158 );158 );
159 unreachable;159 unreachable;
160}160}
161fn __aarch64_swp1_acq() align(16) callconv(.Naked) void {161fn __aarch64_swp1_acq() align(16) callconv(.naked) void {
162 @setRuntimeSafety(false);162 @setRuntimeSafety(false);
163 asm volatile (163 asm volatile (
164 \\ cbz w16, 8f164 \\ cbz w16, 8f
...@@ -178,7 +178,7 @@ fn __aarch64_swp1_acq() align(16) callconv(.Naked) void {...@@ -178,7 +178,7 @@ fn __aarch64_swp1_acq() align(16) callconv(.Naked) void {
178 );178 );
179 unreachable;179 unreachable;
180}180}
181fn __aarch64_ldadd1_acq() align(16) callconv(.Naked) void {181fn __aarch64_ldadd1_acq() align(16) callconv(.naked) void {
182 @setRuntimeSafety(false);182 @setRuntimeSafety(false);
183 asm volatile (183 asm volatile (
184 \\ cbz w16, 8f184 \\ cbz w16, 8f
...@@ -199,7 +199,7 @@ fn __aarch64_ldadd1_acq() align(16) callconv(.Naked) void {...@@ -199,7 +199,7 @@ fn __aarch64_ldadd1_acq() align(16) callconv(.Naked) void {
199 );199 );
200 unreachable;200 unreachable;
201}201}
202fn __aarch64_ldclr1_acq() align(16) callconv(.Naked) void {202fn __aarch64_ldclr1_acq() align(16) callconv(.naked) void {
203 @setRuntimeSafety(false);203 @setRuntimeSafety(false);
204 asm volatile (204 asm volatile (
205 \\ cbz w16, 8f205 \\ cbz w16, 8f
...@@ -220,7 +220,7 @@ fn __aarch64_ldclr1_acq() align(16) callconv(.Naked) void {...@@ -220,7 +220,7 @@ fn __aarch64_ldclr1_acq() align(16) callconv(.Naked) void {
220 );220 );
221 unreachable;221 unreachable;
222}222}
223fn __aarch64_ldeor1_acq() align(16) callconv(.Naked) void {223fn __aarch64_ldeor1_acq() align(16) callconv(.naked) void {
224 @setRuntimeSafety(false);224 @setRuntimeSafety(false);
225 asm volatile (225 asm volatile (
226 \\ cbz w16, 8f226 \\ cbz w16, 8f
...@@ -241,7 +241,7 @@ fn __aarch64_ldeor1_acq() align(16) callconv(.Naked) void {...@@ -241,7 +241,7 @@ fn __aarch64_ldeor1_acq() align(16) callconv(.Naked) void {
241 );241 );
242 unreachable;242 unreachable;
243}243}
244fn __aarch64_ldset1_acq() align(16) callconv(.Naked) void {244fn __aarch64_ldset1_acq() align(16) callconv(.naked) void {
245 @setRuntimeSafety(false);245 @setRuntimeSafety(false);
246 asm volatile (246 asm volatile (
247 \\ cbz w16, 8f247 \\ cbz w16, 8f
...@@ -262,7 +262,7 @@ fn __aarch64_ldset1_acq() align(16) callconv(.Naked) void {...@@ -262,7 +262,7 @@ fn __aarch64_ldset1_acq() align(16) callconv(.Naked) void {
262 );262 );
263 unreachable;263 unreachable;
264}264}
265fn __aarch64_cas1_rel() align(16) callconv(.Naked) void {265fn __aarch64_cas1_rel() align(16) callconv(.naked) void {
266 @setRuntimeSafety(false);266 @setRuntimeSafety(false);
267 asm volatile (267 asm volatile (
268 \\ cbz w16, 8f268 \\ cbz w16, 8f
...@@ -284,7 +284,7 @@ fn __aarch64_cas1_rel() align(16) callconv(.Naked) void {...@@ -284,7 +284,7 @@ fn __aarch64_cas1_rel() align(16) callconv(.Naked) void {
284 );284 );
285 unreachable;285 unreachable;
286}286}
287fn __aarch64_swp1_rel() align(16) callconv(.Naked) void {287fn __aarch64_swp1_rel() align(16) callconv(.naked) void {
288 @setRuntimeSafety(false);288 @setRuntimeSafety(false);
289 asm volatile (289 asm volatile (
290 \\ cbz w16, 8f290 \\ cbz w16, 8f
...@@ -304,7 +304,7 @@ fn __aarch64_swp1_rel() align(16) callconv(.Naked) void {...@@ -304,7 +304,7 @@ fn __aarch64_swp1_rel() align(16) callconv(.Naked) void {
304 );304 );
305 unreachable;305 unreachable;
306}306}
307fn __aarch64_ldadd1_rel() align(16) callconv(.Naked) void {307fn __aarch64_ldadd1_rel() align(16) callconv(.naked) void {
308 @setRuntimeSafety(false);308 @setRuntimeSafety(false);
309 asm volatile (309 asm volatile (
310 \\ cbz w16, 8f310 \\ cbz w16, 8f
...@@ -325,7 +325,7 @@ fn __aarch64_ldadd1_rel() align(16) callconv(.Naked) void {...@@ -325,7 +325,7 @@ fn __aarch64_ldadd1_rel() align(16) callconv(.Naked) void {
325 );325 );
326 unreachable;326 unreachable;
327}327}
328fn __aarch64_ldclr1_rel() align(16) callconv(.Naked) void {328fn __aarch64_ldclr1_rel() align(16) callconv(.naked) void {
329 @setRuntimeSafety(false);329 @setRuntimeSafety(false);
330 asm volatile (330 asm volatile (
331 \\ cbz w16, 8f331 \\ cbz w16, 8f
...@@ -346,7 +346,7 @@ fn __aarch64_ldclr1_rel() align(16) callconv(.Naked) void {...@@ -346,7 +346,7 @@ fn __aarch64_ldclr1_rel() align(16) callconv(.Naked) void {
346 );346 );
347 unreachable;347 unreachable;
348}348}
349fn __aarch64_ldeor1_rel() align(16) callconv(.Naked) void {349fn __aarch64_ldeor1_rel() align(16) callconv(.naked) void {
350 @setRuntimeSafety(false);350 @setRuntimeSafety(false);
351 asm volatile (351 asm volatile (
352 \\ cbz w16, 8f352 \\ cbz w16, 8f
...@@ -367,7 +367,7 @@ fn __aarch64_ldeor1_rel() align(16) callconv(.Naked) void {...@@ -367,7 +367,7 @@ fn __aarch64_ldeor1_rel() align(16) callconv(.Naked) void {
367 );367 );
368 unreachable;368 unreachable;
369}369}
370fn __aarch64_ldset1_rel() align(16) callconv(.Naked) void {370fn __aarch64_ldset1_rel() align(16) callconv(.naked) void {
371 @setRuntimeSafety(false);371 @setRuntimeSafety(false);
372 asm volatile (372 asm volatile (
373 \\ cbz w16, 8f373 \\ cbz w16, 8f
...@@ -388,7 +388,7 @@ fn __aarch64_ldset1_rel() align(16) callconv(.Naked) void {...@@ -388,7 +388,7 @@ fn __aarch64_ldset1_rel() align(16) callconv(.Naked) void {
388 );388 );
389 unreachable;389 unreachable;
390}390}
391fn __aarch64_cas1_acq_rel() align(16) callconv(.Naked) void {391fn __aarch64_cas1_acq_rel() align(16) callconv(.naked) void {
392 @setRuntimeSafety(false);392 @setRuntimeSafety(false);
393 asm volatile (393 asm volatile (
394 \\ cbz w16, 8f394 \\ cbz w16, 8f
...@@ -410,7 +410,7 @@ fn __aarch64_cas1_acq_rel() align(16) callconv(.Naked) void {...@@ -410,7 +410,7 @@ fn __aarch64_cas1_acq_rel() align(16) callconv(.Naked) void {
410 );410 );
411 unreachable;411 unreachable;
412}412}
413fn __aarch64_swp1_acq_rel() align(16) callconv(.Naked) void {413fn __aarch64_swp1_acq_rel() align(16) callconv(.naked) void {
414 @setRuntimeSafety(false);414 @setRuntimeSafety(false);
415 asm volatile (415 asm volatile (
416 \\ cbz w16, 8f416 \\ cbz w16, 8f
...@@ -430,7 +430,7 @@ fn __aarch64_swp1_acq_rel() align(16) callconv(.Naked) void {...@@ -430,7 +430,7 @@ fn __aarch64_swp1_acq_rel() align(16) callconv(.Naked) void {
430 );430 );
431 unreachable;431 unreachable;
432}432}
433fn __aarch64_ldadd1_acq_rel() align(16) callconv(.Naked) void {433fn __aarch64_ldadd1_acq_rel() align(16) callconv(.naked) void {
434 @setRuntimeSafety(false);434 @setRuntimeSafety(false);
435 asm volatile (435 asm volatile (
436 \\ cbz w16, 8f436 \\ cbz w16, 8f
...@@ -451,7 +451,7 @@ fn __aarch64_ldadd1_acq_rel() align(16) callconv(.Naked) void {...@@ -451,7 +451,7 @@ fn __aarch64_ldadd1_acq_rel() align(16) callconv(.Naked) void {
451 );451 );
452 unreachable;452 unreachable;
453}453}
454fn __aarch64_ldclr1_acq_rel() align(16) callconv(.Naked) void {454fn __aarch64_ldclr1_acq_rel() align(16) callconv(.naked) void {
455 @setRuntimeSafety(false);455 @setRuntimeSafety(false);
456 asm volatile (456 asm volatile (
457 \\ cbz w16, 8f457 \\ cbz w16, 8f
...@@ -472,7 +472,7 @@ fn __aarch64_ldclr1_acq_rel() align(16) callconv(.Naked) void {...@@ -472,7 +472,7 @@ fn __aarch64_ldclr1_acq_rel() align(16) callconv(.Naked) void {
472 );472 );
473 unreachable;473 unreachable;
474}474}
475fn __aarch64_ldeor1_acq_rel() align(16) callconv(.Naked) void {475fn __aarch64_ldeor1_acq_rel() align(16) callconv(.naked) void {
476 @setRuntimeSafety(false);476 @setRuntimeSafety(false);
477 asm volatile (477 asm volatile (
478 \\ cbz w16, 8f478 \\ cbz w16, 8f
...@@ -493,7 +493,7 @@ fn __aarch64_ldeor1_acq_rel() align(16) callconv(.Naked) void {...@@ -493,7 +493,7 @@ fn __aarch64_ldeor1_acq_rel() align(16) callconv(.Naked) void {
493 );493 );
494 unreachable;494 unreachable;
495}495}
496fn __aarch64_ldset1_acq_rel() align(16) callconv(.Naked) void {496fn __aarch64_ldset1_acq_rel() align(16) callconv(.naked) void {
497 @setRuntimeSafety(false);497 @setRuntimeSafety(false);
498 asm volatile (498 asm volatile (
499 \\ cbz w16, 8f499 \\ cbz w16, 8f
...@@ -514,7 +514,7 @@ fn __aarch64_ldset1_acq_rel() align(16) callconv(.Naked) void {...@@ -514,7 +514,7 @@ fn __aarch64_ldset1_acq_rel() align(16) callconv(.Naked) void {
514 );514 );
515 unreachable;515 unreachable;
516}516}
517fn __aarch64_cas2_relax() align(16) callconv(.Naked) void {517fn __aarch64_cas2_relax() align(16) callconv(.naked) void {
518 @setRuntimeSafety(false);518 @setRuntimeSafety(false);
519 asm volatile (519 asm volatile (
520 \\ cbz w16, 8f520 \\ cbz w16, 8f
...@@ -536,7 +536,7 @@ fn __aarch64_cas2_relax() align(16) callconv(.Naked) void {...@@ -536,7 +536,7 @@ fn __aarch64_cas2_relax() align(16) callconv(.Naked) void {
536 );536 );
537 unreachable;537 unreachable;
538}538}
539fn __aarch64_swp2_relax() align(16) callconv(.Naked) void {539fn __aarch64_swp2_relax() align(16) callconv(.naked) void {
540 @setRuntimeSafety(false);540 @setRuntimeSafety(false);
541 asm volatile (541 asm volatile (
542 \\ cbz w16, 8f542 \\ cbz w16, 8f
...@@ -556,7 +556,7 @@ fn __aarch64_swp2_relax() align(16) callconv(.Naked) void {...@@ -556,7 +556,7 @@ fn __aarch64_swp2_relax() align(16) callconv(.Naked) void {
556 );556 );
557 unreachable;557 unreachable;
558}558}
559fn __aarch64_ldadd2_relax() align(16) callconv(.Naked) void {559fn __aarch64_ldadd2_relax() align(16) callconv(.naked) void {
560 @setRuntimeSafety(false);560 @setRuntimeSafety(false);
561 asm volatile (561 asm volatile (
562 \\ cbz w16, 8f562 \\ cbz w16, 8f
...@@ -577,7 +577,7 @@ fn __aarch64_ldadd2_relax() align(16) callconv(.Naked) void {...@@ -577,7 +577,7 @@ fn __aarch64_ldadd2_relax() align(16) callconv(.Naked) void {
577 );577 );
578 unreachable;578 unreachable;
579}579}
580fn __aarch64_ldclr2_relax() align(16) callconv(.Naked) void {580fn __aarch64_ldclr2_relax() align(16) callconv(.naked) void {
581 @setRuntimeSafety(false);581 @setRuntimeSafety(false);
582 asm volatile (582 asm volatile (
583 \\ cbz w16, 8f583 \\ cbz w16, 8f
...@@ -598,7 +598,7 @@ fn __aarch64_ldclr2_relax() align(16) callconv(.Naked) void {...@@ -598,7 +598,7 @@ fn __aarch64_ldclr2_relax() align(16) callconv(.Naked) void {
598 );598 );
599 unreachable;599 unreachable;
600}600}
601fn __aarch64_ldeor2_relax() align(16) callconv(.Naked) void {601fn __aarch64_ldeor2_relax() align(16) callconv(.naked) void {
602 @setRuntimeSafety(false);602 @setRuntimeSafety(false);
603 asm volatile (603 asm volatile (
604 \\ cbz w16, 8f604 \\ cbz w16, 8f
...@@ -619,7 +619,7 @@ fn __aarch64_ldeor2_relax() align(16) callconv(.Naked) void {...@@ -619,7 +619,7 @@ fn __aarch64_ldeor2_relax() align(16) callconv(.Naked) void {
619 );619 );
620 unreachable;620 unreachable;
621}621}
622fn __aarch64_ldset2_relax() align(16) callconv(.Naked) void {622fn __aarch64_ldset2_relax() align(16) callconv(.naked) void {
623 @setRuntimeSafety(false);623 @setRuntimeSafety(false);
624 asm volatile (624 asm volatile (
625 \\ cbz w16, 8f625 \\ cbz w16, 8f
...@@ -640,7 +640,7 @@ fn __aarch64_ldset2_relax() align(16) callconv(.Naked) void {...@@ -640,7 +640,7 @@ fn __aarch64_ldset2_relax() align(16) callconv(.Naked) void {
640 );640 );
641 unreachable;641 unreachable;
642}642}
643fn __aarch64_cas2_acq() align(16) callconv(.Naked) void {643fn __aarch64_cas2_acq() align(16) callconv(.naked) void {
644 @setRuntimeSafety(false);644 @setRuntimeSafety(false);
645 asm volatile (645 asm volatile (
646 \\ cbz w16, 8f646 \\ cbz w16, 8f
...@@ -662,7 +662,7 @@ fn __aarch64_cas2_acq() align(16) callconv(.Naked) void {...@@ -662,7 +662,7 @@ fn __aarch64_cas2_acq() align(16) callconv(.Naked) void {
662 );662 );
663 unreachable;663 unreachable;
664}664}
665fn __aarch64_swp2_acq() align(16) callconv(.Naked) void {665fn __aarch64_swp2_acq() align(16) callconv(.naked) void {
666 @setRuntimeSafety(false);666 @setRuntimeSafety(false);
667 asm volatile (667 asm volatile (
668 \\ cbz w16, 8f668 \\ cbz w16, 8f
...@@ -682,7 +682,7 @@ fn __aarch64_swp2_acq() align(16) callconv(.Naked) void {...@@ -682,7 +682,7 @@ fn __aarch64_swp2_acq() align(16) callconv(.Naked) void {
682 );682 );
683 unreachable;683 unreachable;
684}684}
685fn __aarch64_ldadd2_acq() align(16) callconv(.Naked) void {685fn __aarch64_ldadd2_acq() align(16) callconv(.naked) void {
686 @setRuntimeSafety(false);686 @setRuntimeSafety(false);
687 asm volatile (687 asm volatile (
688 \\ cbz w16, 8f688 \\ cbz w16, 8f
...@@ -703,7 +703,7 @@ fn __aarch64_ldadd2_acq() align(16) callconv(.Naked) void {...@@ -703,7 +703,7 @@ fn __aarch64_ldadd2_acq() align(16) callconv(.Naked) void {
703 );703 );
704 unreachable;704 unreachable;
705}705}
706fn __aarch64_ldclr2_acq() align(16) callconv(.Naked) void {706fn __aarch64_ldclr2_acq() align(16) callconv(.naked) void {
707 @setRuntimeSafety(false);707 @setRuntimeSafety(false);
708 asm volatile (708 asm volatile (
709 \\ cbz w16, 8f709 \\ cbz w16, 8f
...@@ -724,7 +724,7 @@ fn __aarch64_ldclr2_acq() align(16) callconv(.Naked) void {...@@ -724,7 +724,7 @@ fn __aarch64_ldclr2_acq() align(16) callconv(.Naked) void {
724 );724 );
725 unreachable;725 unreachable;
726}726}
727fn __aarch64_ldeor2_acq() align(16) callconv(.Naked) void {727fn __aarch64_ldeor2_acq() align(16) callconv(.naked) void {
728 @setRuntimeSafety(false);728 @setRuntimeSafety(false);
729 asm volatile (729 asm volatile (
730 \\ cbz w16, 8f730 \\ cbz w16, 8f
...@@ -745,7 +745,7 @@ fn __aarch64_ldeor2_acq() align(16) callconv(.Naked) void {...@@ -745,7 +745,7 @@ fn __aarch64_ldeor2_acq() align(16) callconv(.Naked) void {
745 );745 );
746 unreachable;746 unreachable;
747}747}
748fn __aarch64_ldset2_acq() align(16) callconv(.Naked) void {748fn __aarch64_ldset2_acq() align(16) callconv(.naked) void {
749 @setRuntimeSafety(false);749 @setRuntimeSafety(false);
750 asm volatile (750 asm volatile (
751 \\ cbz w16, 8f751 \\ cbz w16, 8f
...@@ -766,7 +766,7 @@ fn __aarch64_ldset2_acq() align(16) callconv(.Naked) void {...@@ -766,7 +766,7 @@ fn __aarch64_ldset2_acq() align(16) callconv(.Naked) void {
766 );766 );
767 unreachable;767 unreachable;
768}768}
769fn __aarch64_cas2_rel() align(16) callconv(.Naked) void {769fn __aarch64_cas2_rel() align(16) callconv(.naked) void {
770 @setRuntimeSafety(false);770 @setRuntimeSafety(false);
771 asm volatile (771 asm volatile (
772 \\ cbz w16, 8f772 \\ cbz w16, 8f
...@@ -788,7 +788,7 @@ fn __aarch64_cas2_rel() align(16) callconv(.Naked) void {...@@ -788,7 +788,7 @@ fn __aarch64_cas2_rel() align(16) callconv(.Naked) void {
788 );788 );
789 unreachable;789 unreachable;
790}790}
791fn __aarch64_swp2_rel() align(16) callconv(.Naked) void {791fn __aarch64_swp2_rel() align(16) callconv(.naked) void {
792 @setRuntimeSafety(false);792 @setRuntimeSafety(false);
793 asm volatile (793 asm volatile (
794 \\ cbz w16, 8f794 \\ cbz w16, 8f
...@@ -808,7 +808,7 @@ fn __aarch64_swp2_rel() align(16) callconv(.Naked) void {...@@ -808,7 +808,7 @@ fn __aarch64_swp2_rel() align(16) callconv(.Naked) void {
808 );808 );
809 unreachable;809 unreachable;
810}810}
811fn __aarch64_ldadd2_rel() align(16) callconv(.Naked) void {811fn __aarch64_ldadd2_rel() align(16) callconv(.naked) void {
812 @setRuntimeSafety(false);812 @setRuntimeSafety(false);
813 asm volatile (813 asm volatile (
814 \\ cbz w16, 8f814 \\ cbz w16, 8f
...@@ -829,7 +829,7 @@ fn __aarch64_ldadd2_rel() align(16) callconv(.Naked) void {...@@ -829,7 +829,7 @@ fn __aarch64_ldadd2_rel() align(16) callconv(.Naked) void {
829 );829 );
830 unreachable;830 unreachable;
831}831}
832fn __aarch64_ldclr2_rel() align(16) callconv(.Naked) void {832fn __aarch64_ldclr2_rel() align(16) callconv(.naked) void {
833 @setRuntimeSafety(false);833 @setRuntimeSafety(false);
834 asm volatile (834 asm volatile (
835 \\ cbz w16, 8f835 \\ cbz w16, 8f
...@@ -850,7 +850,7 @@ fn __aarch64_ldclr2_rel() align(16) callconv(.Naked) void {...@@ -850,7 +850,7 @@ fn __aarch64_ldclr2_rel() align(16) callconv(.Naked) void {
850 );850 );
851 unreachable;851 unreachable;
852}852}
853fn __aarch64_ldeor2_rel() align(16) callconv(.Naked) void {853fn __aarch64_ldeor2_rel() align(16) callconv(.naked) void {
854 @setRuntimeSafety(false);854 @setRuntimeSafety(false);
855 asm volatile (855 asm volatile (
856 \\ cbz w16, 8f856 \\ cbz w16, 8f
...@@ -871,7 +871,7 @@ fn __aarch64_ldeor2_rel() align(16) callconv(.Naked) void {...@@ -871,7 +871,7 @@ fn __aarch64_ldeor2_rel() align(16) callconv(.Naked) void {
871 );871 );
872 unreachable;872 unreachable;
873}873}
874fn __aarch64_ldset2_rel() align(16) callconv(.Naked) void {874fn __aarch64_ldset2_rel() align(16) callconv(.naked) void {
875 @setRuntimeSafety(false);875 @setRuntimeSafety(false);
876 asm volatile (876 asm volatile (
877 \\ cbz w16, 8f877 \\ cbz w16, 8f
...@@ -892,7 +892,7 @@ fn __aarch64_ldset2_rel() align(16) callconv(.Naked) void {...@@ -892,7 +892,7 @@ fn __aarch64_ldset2_rel() align(16) callconv(.Naked) void {
892 );892 );
893 unreachable;893 unreachable;
894}894}
895fn __aarch64_cas2_acq_rel() align(16) callconv(.Naked) void {895fn __aarch64_cas2_acq_rel() align(16) callconv(.naked) void {
896 @setRuntimeSafety(false);896 @setRuntimeSafety(false);
897 asm volatile (897 asm volatile (
898 \\ cbz w16, 8f898 \\ cbz w16, 8f
...@@ -914,7 +914,7 @@ fn __aarch64_cas2_acq_rel() align(16) callconv(.Naked) void {...@@ -914,7 +914,7 @@ fn __aarch64_cas2_acq_rel() align(16) callconv(.Naked) void {
914 );914 );
915 unreachable;915 unreachable;
916}916}
917fn __aarch64_swp2_acq_rel() align(16) callconv(.Naked) void {917fn __aarch64_swp2_acq_rel() align(16) callconv(.naked) void {
918 @setRuntimeSafety(false);918 @setRuntimeSafety(false);
919 asm volatile (919 asm volatile (
920 \\ cbz w16, 8f920 \\ cbz w16, 8f
...@@ -934,7 +934,7 @@ fn __aarch64_swp2_acq_rel() align(16) callconv(.Naked) void {...@@ -934,7 +934,7 @@ fn __aarch64_swp2_acq_rel() align(16) callconv(.Naked) void {
934 );934 );
935 unreachable;935 unreachable;
936}936}
937fn __aarch64_ldadd2_acq_rel() align(16) callconv(.Naked) void {937fn __aarch64_ldadd2_acq_rel() align(16) callconv(.naked) void {
938 @setRuntimeSafety(false);938 @setRuntimeSafety(false);
939 asm volatile (939 asm volatile (
940 \\ cbz w16, 8f940 \\ cbz w16, 8f
...@@ -955,7 +955,7 @@ fn __aarch64_ldadd2_acq_rel() align(16) callconv(.Naked) void {...@@ -955,7 +955,7 @@ fn __aarch64_ldadd2_acq_rel() align(16) callconv(.Naked) void {
955 );955 );
956 unreachable;956 unreachable;
957}957}
958fn __aarch64_ldclr2_acq_rel() align(16) callconv(.Naked) void {958fn __aarch64_ldclr2_acq_rel() align(16) callconv(.naked) void {
959 @setRuntimeSafety(false);959 @setRuntimeSafety(false);
960 asm volatile (960 asm volatile (
961 \\ cbz w16, 8f961 \\ cbz w16, 8f
...@@ -976,7 +976,7 @@ fn __aarch64_ldclr2_acq_rel() align(16) callconv(.Naked) void {...@@ -976,7 +976,7 @@ fn __aarch64_ldclr2_acq_rel() align(16) callconv(.Naked) void {
976 );976 );
977 unreachable;977 unreachable;
978}978}
979fn __aarch64_ldeor2_acq_rel() align(16) callconv(.Naked) void {979fn __aarch64_ldeor2_acq_rel() align(16) callconv(.naked) void {
980 @setRuntimeSafety(false);980 @setRuntimeSafety(false);
981 asm volatile (981 asm volatile (
982 \\ cbz w16, 8f982 \\ cbz w16, 8f
...@@ -997,7 +997,7 @@ fn __aarch64_ldeor2_acq_rel() align(16) callconv(.Naked) void {...@@ -997,7 +997,7 @@ fn __aarch64_ldeor2_acq_rel() align(16) callconv(.Naked) void {
997 );997 );
998 unreachable;998 unreachable;
999}999}
1000fn __aarch64_ldset2_acq_rel() align(16) callconv(.Naked) void {1000fn __aarch64_ldset2_acq_rel() align(16) callconv(.naked) void {
1001 @setRuntimeSafety(false);1001 @setRuntimeSafety(false);
1002 asm volatile (1002 asm volatile (
1003 \\ cbz w16, 8f1003 \\ cbz w16, 8f
...@@ -1018,7 +1018,7 @@ fn __aarch64_ldset2_acq_rel() align(16) callconv(.Naked) void {...@@ -1018,7 +1018,7 @@ fn __aarch64_ldset2_acq_rel() align(16) callconv(.Naked) void {
1018 );1018 );
1019 unreachable;1019 unreachable;
1020}1020}
1021fn __aarch64_cas4_relax() align(16) callconv(.Naked) void {1021fn __aarch64_cas4_relax() align(16) callconv(.naked) void {
1022 @setRuntimeSafety(false);1022 @setRuntimeSafety(false);
1023 asm volatile (1023 asm volatile (
1024 \\ cbz w16, 8f1024 \\ cbz w16, 8f
...@@ -1040,7 +1040,7 @@ fn __aarch64_cas4_relax() align(16) callconv(.Naked) void {...@@ -1040,7 +1040,7 @@ fn __aarch64_cas4_relax() align(16) callconv(.Naked) void {
1040 );1040 );
1041 unreachable;1041 unreachable;
1042}1042}
1043fn __aarch64_swp4_relax() align(16) callconv(.Naked) void {1043fn __aarch64_swp4_relax() align(16) callconv(.naked) void {
1044 @setRuntimeSafety(false);1044 @setRuntimeSafety(false);
1045 asm volatile (1045 asm volatile (
1046 \\ cbz w16, 8f1046 \\ cbz w16, 8f
...@@ -1060,7 +1060,7 @@ fn __aarch64_swp4_relax() align(16) callconv(.Naked) void {...@@ -1060,7 +1060,7 @@ fn __aarch64_swp4_relax() align(16) callconv(.Naked) void {
1060 );1060 );
1061 unreachable;1061 unreachable;
1062}1062}
1063fn __aarch64_ldadd4_relax() align(16) callconv(.Naked) void {1063fn __aarch64_ldadd4_relax() align(16) callconv(.naked) void {
1064 @setRuntimeSafety(false);1064 @setRuntimeSafety(false);
1065 asm volatile (1065 asm volatile (
1066 \\ cbz w16, 8f1066 \\ cbz w16, 8f
...@@ -1081,7 +1081,7 @@ fn __aarch64_ldadd4_relax() align(16) callconv(.Naked) void {...@@ -1081,7 +1081,7 @@ fn __aarch64_ldadd4_relax() align(16) callconv(.Naked) void {
1081 );1081 );
1082 unreachable;1082 unreachable;
1083}1083}
1084fn __aarch64_ldclr4_relax() align(16) callconv(.Naked) void {1084fn __aarch64_ldclr4_relax() align(16) callconv(.naked) void {
1085 @setRuntimeSafety(false);1085 @setRuntimeSafety(false);
1086 asm volatile (1086 asm volatile (
1087 \\ cbz w16, 8f1087 \\ cbz w16, 8f
...@@ -1102,7 +1102,7 @@ fn __aarch64_ldclr4_relax() align(16) callconv(.Naked) void {...@@ -1102,7 +1102,7 @@ fn __aarch64_ldclr4_relax() align(16) callconv(.Naked) void {
1102 );1102 );
1103 unreachable;1103 unreachable;
1104}1104}
1105fn __aarch64_ldeor4_relax() align(16) callconv(.Naked) void {1105fn __aarch64_ldeor4_relax() align(16) callconv(.naked) void {
1106 @setRuntimeSafety(false);1106 @setRuntimeSafety(false);
1107 asm volatile (1107 asm volatile (
1108 \\ cbz w16, 8f1108 \\ cbz w16, 8f
...@@ -1123,7 +1123,7 @@ fn __aarch64_ldeor4_relax() align(16) callconv(.Naked) void {...@@ -1123,7 +1123,7 @@ fn __aarch64_ldeor4_relax() align(16) callconv(.Naked) void {
1123 );1123 );
1124 unreachable;1124 unreachable;
1125}1125}
1126fn __aarch64_ldset4_relax() align(16) callconv(.Naked) void {1126fn __aarch64_ldset4_relax() align(16) callconv(.naked) void {
1127 @setRuntimeSafety(false);1127 @setRuntimeSafety(false);
1128 asm volatile (1128 asm volatile (
1129 \\ cbz w16, 8f1129 \\ cbz w16, 8f
...@@ -1144,7 +1144,7 @@ fn __aarch64_ldset4_relax() align(16) callconv(.Naked) void {...@@ -1144,7 +1144,7 @@ fn __aarch64_ldset4_relax() align(16) callconv(.Naked) void {
1144 );1144 );
1145 unreachable;1145 unreachable;
1146}1146}
1147fn __aarch64_cas4_acq() align(16) callconv(.Naked) void {1147fn __aarch64_cas4_acq() align(16) callconv(.naked) void {
1148 @setRuntimeSafety(false);1148 @setRuntimeSafety(false);
1149 asm volatile (1149 asm volatile (
1150 \\ cbz w16, 8f1150 \\ cbz w16, 8f
...@@ -1166,7 +1166,7 @@ fn __aarch64_cas4_acq() align(16) callconv(.Naked) void {...@@ -1166,7 +1166,7 @@ fn __aarch64_cas4_acq() align(16) callconv(.Naked) void {
1166 );1166 );
1167 unreachable;1167 unreachable;
1168}1168}
1169fn __aarch64_swp4_acq() align(16) callconv(.Naked) void {1169fn __aarch64_swp4_acq() align(16) callconv(.naked) void {
1170 @setRuntimeSafety(false);1170 @setRuntimeSafety(false);
1171 asm volatile (1171 asm volatile (
1172 \\ cbz w16, 8f1172 \\ cbz w16, 8f
...@@ -1186,7 +1186,7 @@ fn __aarch64_swp4_acq() align(16) callconv(.Naked) void {...@@ -1186,7 +1186,7 @@ fn __aarch64_swp4_acq() align(16) callconv(.Naked) void {
1186 );1186 );
1187 unreachable;1187 unreachable;
1188}1188}
1189fn __aarch64_ldadd4_acq() align(16) callconv(.Naked) void {1189fn __aarch64_ldadd4_acq() align(16) callconv(.naked) void {
1190 @setRuntimeSafety(false);1190 @setRuntimeSafety(false);
1191 asm volatile (1191 asm volatile (
1192 \\ cbz w16, 8f1192 \\ cbz w16, 8f
...@@ -1207,7 +1207,7 @@ fn __aarch64_ldadd4_acq() align(16) callconv(.Naked) void {...@@ -1207,7 +1207,7 @@ fn __aarch64_ldadd4_acq() align(16) callconv(.Naked) void {
1207 );1207 );
1208 unreachable;1208 unreachable;
1209}1209}
1210fn __aarch64_ldclr4_acq() align(16) callconv(.Naked) void {1210fn __aarch64_ldclr4_acq() align(16) callconv(.naked) void {
1211 @setRuntimeSafety(false);1211 @setRuntimeSafety(false);
1212 asm volatile (1212 asm volatile (
1213 \\ cbz w16, 8f1213 \\ cbz w16, 8f
...@@ -1228,7 +1228,7 @@ fn __aarch64_ldclr4_acq() align(16) callconv(.Naked) void {...@@ -1228,7 +1228,7 @@ fn __aarch64_ldclr4_acq() align(16) callconv(.Naked) void {
1228 );1228 );
1229 unreachable;1229 unreachable;
1230}1230}
1231fn __aarch64_ldeor4_acq() align(16) callconv(.Naked) void {1231fn __aarch64_ldeor4_acq() align(16) callconv(.naked) void {
1232 @setRuntimeSafety(false);1232 @setRuntimeSafety(false);
1233 asm volatile (1233 asm volatile (
1234 \\ cbz w16, 8f1234 \\ cbz w16, 8f
...@@ -1249,7 +1249,7 @@ fn __aarch64_ldeor4_acq() align(16) callconv(.Naked) void {...@@ -1249,7 +1249,7 @@ fn __aarch64_ldeor4_acq() align(16) callconv(.Naked) void {
1249 );1249 );
1250 unreachable;1250 unreachable;
1251}1251}
1252fn __aarch64_ldset4_acq() align(16) callconv(.Naked) void {1252fn __aarch64_ldset4_acq() align(16) callconv(.naked) void {
1253 @setRuntimeSafety(false);1253 @setRuntimeSafety(false);
1254 asm volatile (1254 asm volatile (
1255 \\ cbz w16, 8f1255 \\ cbz w16, 8f
...@@ -1270,7 +1270,7 @@ fn __aarch64_ldset4_acq() align(16) callconv(.Naked) void {...@@ -1270,7 +1270,7 @@ fn __aarch64_ldset4_acq() align(16) callconv(.Naked) void {
1270 );1270 );
1271 unreachable;1271 unreachable;
1272}1272}
1273fn __aarch64_cas4_rel() align(16) callconv(.Naked) void {1273fn __aarch64_cas4_rel() align(16) callconv(.naked) void {
1274 @setRuntimeSafety(false);1274 @setRuntimeSafety(false);
1275 asm volatile (1275 asm volatile (
1276 \\ cbz w16, 8f1276 \\ cbz w16, 8f
...@@ -1292,7 +1292,7 @@ fn __aarch64_cas4_rel() align(16) callconv(.Naked) void {...@@ -1292,7 +1292,7 @@ fn __aarch64_cas4_rel() align(16) callconv(.Naked) void {
1292 );1292 );
1293 unreachable;1293 unreachable;
1294}1294}
1295fn __aarch64_swp4_rel() align(16) callconv(.Naked) void {1295fn __aarch64_swp4_rel() align(16) callconv(.naked) void {
1296 @setRuntimeSafety(false);1296 @setRuntimeSafety(false);
1297 asm volatile (1297 asm volatile (
1298 \\ cbz w16, 8f1298 \\ cbz w16, 8f
...@@ -1312,7 +1312,7 @@ fn __aarch64_swp4_rel() align(16) callconv(.Naked) void {...@@ -1312,7 +1312,7 @@ fn __aarch64_swp4_rel() align(16) callconv(.Naked) void {
1312 );1312 );
1313 unreachable;1313 unreachable;
1314}1314}
1315fn __aarch64_ldadd4_rel() align(16) callconv(.Naked) void {1315fn __aarch64_ldadd4_rel() align(16) callconv(.naked) void {
1316 @setRuntimeSafety(false);1316 @setRuntimeSafety(false);
1317 asm volatile (1317 asm volatile (
1318 \\ cbz w16, 8f1318 \\ cbz w16, 8f
...@@ -1333,7 +1333,7 @@ fn __aarch64_ldadd4_rel() align(16) callconv(.Naked) void {...@@ -1333,7 +1333,7 @@ fn __aarch64_ldadd4_rel() align(16) callconv(.Naked) void {
1333 );1333 );
1334 unreachable;1334 unreachable;
1335}1335}
1336fn __aarch64_ldclr4_rel() align(16) callconv(.Naked) void {1336fn __aarch64_ldclr4_rel() align(16) callconv(.naked) void {
1337 @setRuntimeSafety(false);1337 @setRuntimeSafety(false);
1338 asm volatile (1338 asm volatile (
1339 \\ cbz w16, 8f1339 \\ cbz w16, 8f
...@@ -1354,7 +1354,7 @@ fn __aarch64_ldclr4_rel() align(16) callconv(.Naked) void {...@@ -1354,7 +1354,7 @@ fn __aarch64_ldclr4_rel() align(16) callconv(.Naked) void {
1354 );1354 );
1355 unreachable;1355 unreachable;
1356}1356}
1357fn __aarch64_ldeor4_rel() align(16) callconv(.Naked) void {1357fn __aarch64_ldeor4_rel() align(16) callconv(.naked) void {
1358 @setRuntimeSafety(false);1358 @setRuntimeSafety(false);
1359 asm volatile (1359 asm volatile (
1360 \\ cbz w16, 8f1360 \\ cbz w16, 8f
...@@ -1375,7 +1375,7 @@ fn __aarch64_ldeor4_rel() align(16) callconv(.Naked) void {...@@ -1375,7 +1375,7 @@ fn __aarch64_ldeor4_rel() align(16) callconv(.Naked) void {
1375 );1375 );
1376 unreachable;1376 unreachable;
1377}1377}
1378fn __aarch64_ldset4_rel() align(16) callconv(.Naked) void {1378fn __aarch64_ldset4_rel() align(16) callconv(.naked) void {
1379 @setRuntimeSafety(false);1379 @setRuntimeSafety(false);
1380 asm volatile (1380 asm volatile (
1381 \\ cbz w16, 8f1381 \\ cbz w16, 8f
...@@ -1396,7 +1396,7 @@ fn __aarch64_ldset4_rel() align(16) callconv(.Naked) void {...@@ -1396,7 +1396,7 @@ fn __aarch64_ldset4_rel() align(16) callconv(.Naked) void {
1396 );1396 );
1397 unreachable;1397 unreachable;
1398}1398}
1399fn __aarch64_cas4_acq_rel() align(16) callconv(.Naked) void {1399fn __aarch64_cas4_acq_rel() align(16) callconv(.naked) void {
1400 @setRuntimeSafety(false);1400 @setRuntimeSafety(false);
1401 asm volatile (1401 asm volatile (
1402 \\ cbz w16, 8f1402 \\ cbz w16, 8f
...@@ -1418,7 +1418,7 @@ fn __aarch64_cas4_acq_rel() align(16) callconv(.Naked) void {...@@ -1418,7 +1418,7 @@ fn __aarch64_cas4_acq_rel() align(16) callconv(.Naked) void {
1418 );1418 );
1419 unreachable;1419 unreachable;
1420}1420}
1421fn __aarch64_swp4_acq_rel() align(16) callconv(.Naked) void {1421fn __aarch64_swp4_acq_rel() align(16) callconv(.naked) void {
1422 @setRuntimeSafety(false);1422 @setRuntimeSafety(false);
1423 asm volatile (1423 asm volatile (
1424 \\ cbz w16, 8f1424 \\ cbz w16, 8f
...@@ -1438,7 +1438,7 @@ fn __aarch64_swp4_acq_rel() align(16) callconv(.Naked) void {...@@ -1438,7 +1438,7 @@ fn __aarch64_swp4_acq_rel() align(16) callconv(.Naked) void {
1438 );1438 );
1439 unreachable;1439 unreachable;
1440}1440}
1441fn __aarch64_ldadd4_acq_rel() align(16) callconv(.Naked) void {1441fn __aarch64_ldadd4_acq_rel() align(16) callconv(.naked) void {
1442 @setRuntimeSafety(false);1442 @setRuntimeSafety(false);
1443 asm volatile (1443 asm volatile (
1444 \\ cbz w16, 8f1444 \\ cbz w16, 8f
...@@ -1459,7 +1459,7 @@ fn __aarch64_ldadd4_acq_rel() align(16) callconv(.Naked) void {...@@ -1459,7 +1459,7 @@ fn __aarch64_ldadd4_acq_rel() align(16) callconv(.Naked) void {
1459 );1459 );
1460 unreachable;1460 unreachable;
1461}1461}
1462fn __aarch64_ldclr4_acq_rel() align(16) callconv(.Naked) void {1462fn __aarch64_ldclr4_acq_rel() align(16) callconv(.naked) void {
1463 @setRuntimeSafety(false);1463 @setRuntimeSafety(false);
1464 asm volatile (1464 asm volatile (
1465 \\ cbz w16, 8f1465 \\ cbz w16, 8f
...@@ -1480,7 +1480,7 @@ fn __aarch64_ldclr4_acq_rel() align(16) callconv(.Naked) void {...@@ -1480,7 +1480,7 @@ fn __aarch64_ldclr4_acq_rel() align(16) callconv(.Naked) void {
1480 );1480 );
1481 unreachable;1481 unreachable;
1482}1482}
1483fn __aarch64_ldeor4_acq_rel() align(16) callconv(.Naked) void {1483fn __aarch64_ldeor4_acq_rel() align(16) callconv(.naked) void {
1484 @setRuntimeSafety(false);1484 @setRuntimeSafety(false);
1485 asm volatile (1485 asm volatile (
1486 \\ cbz w16, 8f1486 \\ cbz w16, 8f
...@@ -1501,7 +1501,7 @@ fn __aarch64_ldeor4_acq_rel() align(16) callconv(.Naked) void {...@@ -1501,7 +1501,7 @@ fn __aarch64_ldeor4_acq_rel() align(16) callconv(.Naked) void {
1501 );1501 );
1502 unreachable;1502 unreachable;
1503}1503}
1504fn __aarch64_ldset4_acq_rel() align(16) callconv(.Naked) void {1504fn __aarch64_ldset4_acq_rel() align(16) callconv(.naked) void {
1505 @setRuntimeSafety(false);1505 @setRuntimeSafety(false);
1506 asm volatile (1506 asm volatile (
1507 \\ cbz w16, 8f1507 \\ cbz w16, 8f
...@@ -1522,7 +1522,7 @@ fn __aarch64_ldset4_acq_rel() align(16) callconv(.Naked) void {...@@ -1522,7 +1522,7 @@ fn __aarch64_ldset4_acq_rel() align(16) callconv(.Naked) void {
1522 );1522 );
1523 unreachable;1523 unreachable;
1524}1524}
1525fn __aarch64_cas8_relax() align(16) callconv(.Naked) void {1525fn __aarch64_cas8_relax() align(16) callconv(.naked) void {
1526 @setRuntimeSafety(false);1526 @setRuntimeSafety(false);
1527 asm volatile (1527 asm volatile (
1528 \\ cbz w16, 8f1528 \\ cbz w16, 8f
...@@ -1544,7 +1544,7 @@ fn __aarch64_cas8_relax() align(16) callconv(.Naked) void {...@@ -1544,7 +1544,7 @@ fn __aarch64_cas8_relax() align(16) callconv(.Naked) void {
1544 );1544 );
1545 unreachable;1545 unreachable;
1546}1546}
1547fn __aarch64_swp8_relax() align(16) callconv(.Naked) void {1547fn __aarch64_swp8_relax() align(16) callconv(.naked) void {
1548 @setRuntimeSafety(false);1548 @setRuntimeSafety(false);
1549 asm volatile (1549 asm volatile (
1550 \\ cbz w16, 8f1550 \\ cbz w16, 8f
...@@ -1564,7 +1564,7 @@ fn __aarch64_swp8_relax() align(16) callconv(.Naked) void {...@@ -1564,7 +1564,7 @@ fn __aarch64_swp8_relax() align(16) callconv(.Naked) void {
1564 );1564 );
1565 unreachable;1565 unreachable;
1566}1566}
1567fn __aarch64_ldadd8_relax() align(16) callconv(.Naked) void {1567fn __aarch64_ldadd8_relax() align(16) callconv(.naked) void {
1568 @setRuntimeSafety(false);1568 @setRuntimeSafety(false);
1569 asm volatile (1569 asm volatile (
1570 \\ cbz w16, 8f1570 \\ cbz w16, 8f
...@@ -1585,7 +1585,7 @@ fn __aarch64_ldadd8_relax() align(16) callconv(.Naked) void {...@@ -1585,7 +1585,7 @@ fn __aarch64_ldadd8_relax() align(16) callconv(.Naked) void {
1585 );1585 );
1586 unreachable;1586 unreachable;
1587}1587}
1588fn __aarch64_ldclr8_relax() align(16) callconv(.Naked) void {1588fn __aarch64_ldclr8_relax() align(16) callconv(.naked) void {
1589 @setRuntimeSafety(false);1589 @setRuntimeSafety(false);
1590 asm volatile (1590 asm volatile (
1591 \\ cbz w16, 8f1591 \\ cbz w16, 8f
...@@ -1606,7 +1606,7 @@ fn __aarch64_ldclr8_relax() align(16) callconv(.Naked) void {...@@ -1606,7 +1606,7 @@ fn __aarch64_ldclr8_relax() align(16) callconv(.Naked) void {
1606 );1606 );
1607 unreachable;1607 unreachable;
1608}1608}
1609fn __aarch64_ldeor8_relax() align(16) callconv(.Naked) void {1609fn __aarch64_ldeor8_relax() align(16) callconv(.naked) void {
1610 @setRuntimeSafety(false);1610 @setRuntimeSafety(false);
1611 asm volatile (1611 asm volatile (
1612 \\ cbz w16, 8f1612 \\ cbz w16, 8f
...@@ -1627,7 +1627,7 @@ fn __aarch64_ldeor8_relax() align(16) callconv(.Naked) void {...@@ -1627,7 +1627,7 @@ fn __aarch64_ldeor8_relax() align(16) callconv(.Naked) void {
1627 );1627 );
1628 unreachable;1628 unreachable;
1629}1629}
1630fn __aarch64_ldset8_relax() align(16) callconv(.Naked) void {1630fn __aarch64_ldset8_relax() align(16) callconv(.naked) void {
1631 @setRuntimeSafety(false);1631 @setRuntimeSafety(false);
1632 asm volatile (1632 asm volatile (
1633 \\ cbz w16, 8f1633 \\ cbz w16, 8f
...@@ -1648,7 +1648,7 @@ fn __aarch64_ldset8_relax() align(16) callconv(.Naked) void {...@@ -1648,7 +1648,7 @@ fn __aarch64_ldset8_relax() align(16) callconv(.Naked) void {
1648 );1648 );
1649 unreachable;1649 unreachable;
1650}1650}
1651fn __aarch64_cas8_acq() align(16) callconv(.Naked) void {1651fn __aarch64_cas8_acq() align(16) callconv(.naked) void {
1652 @setRuntimeSafety(false);1652 @setRuntimeSafety(false);
1653 asm volatile (1653 asm volatile (
1654 \\ cbz w16, 8f1654 \\ cbz w16, 8f
...@@ -1670,7 +1670,7 @@ fn __aarch64_cas8_acq() align(16) callconv(.Naked) void {...@@ -1670,7 +1670,7 @@ fn __aarch64_cas8_acq() align(16) callconv(.Naked) void {
1670 );1670 );
1671 unreachable;1671 unreachable;
1672}1672}
1673fn __aarch64_swp8_acq() align(16) callconv(.Naked) void {1673fn __aarch64_swp8_acq() align(16) callconv(.naked) void {
1674 @setRuntimeSafety(false);1674 @setRuntimeSafety(false);
1675 asm volatile (1675 asm volatile (
1676 \\ cbz w16, 8f1676 \\ cbz w16, 8f
...@@ -1690,7 +1690,7 @@ fn __aarch64_swp8_acq() align(16) callconv(.Naked) void {...@@ -1690,7 +1690,7 @@ fn __aarch64_swp8_acq() align(16) callconv(.Naked) void {
1690 );1690 );
1691 unreachable;1691 unreachable;
1692}1692}
1693fn __aarch64_ldadd8_acq() align(16) callconv(.Naked) void {1693fn __aarch64_ldadd8_acq() align(16) callconv(.naked) void {
1694 @setRuntimeSafety(false);1694 @setRuntimeSafety(false);
1695 asm volatile (1695 asm volatile (
1696 \\ cbz w16, 8f1696 \\ cbz w16, 8f
...@@ -1711,7 +1711,7 @@ fn __aarch64_ldadd8_acq() align(16) callconv(.Naked) void {...@@ -1711,7 +1711,7 @@ fn __aarch64_ldadd8_acq() align(16) callconv(.Naked) void {
1711 );1711 );
1712 unreachable;1712 unreachable;
1713}1713}
1714fn __aarch64_ldclr8_acq() align(16) callconv(.Naked) void {1714fn __aarch64_ldclr8_acq() align(16) callconv(.naked) void {
1715 @setRuntimeSafety(false);1715 @setRuntimeSafety(false);
1716 asm volatile (1716 asm volatile (
1717 \\ cbz w16, 8f1717 \\ cbz w16, 8f
...@@ -1732,7 +1732,7 @@ fn __aarch64_ldclr8_acq() align(16) callconv(.Naked) void {...@@ -1732,7 +1732,7 @@ fn __aarch64_ldclr8_acq() align(16) callconv(.Naked) void {
1732 );1732 );
1733 unreachable;1733 unreachable;
1734}1734}
1735fn __aarch64_ldeor8_acq() align(16) callconv(.Naked) void {1735fn __aarch64_ldeor8_acq() align(16) callconv(.naked) void {
1736 @setRuntimeSafety(false);1736 @setRuntimeSafety(false);
1737 asm volatile (1737 asm volatile (
1738 \\ cbz w16, 8f1738 \\ cbz w16, 8f
...@@ -1753,7 +1753,7 @@ fn __aarch64_ldeor8_acq() align(16) callconv(.Naked) void {...@@ -1753,7 +1753,7 @@ fn __aarch64_ldeor8_acq() align(16) callconv(.Naked) void {
1753 );1753 );
1754 unreachable;1754 unreachable;
1755}1755}
1756fn __aarch64_ldset8_acq() align(16) callconv(.Naked) void {1756fn __aarch64_ldset8_acq() align(16) callconv(.naked) void {
1757 @setRuntimeSafety(false);1757 @setRuntimeSafety(false);
1758 asm volatile (1758 asm volatile (
1759 \\ cbz w16, 8f1759 \\ cbz w16, 8f
...@@ -1774,7 +1774,7 @@ fn __aarch64_ldset8_acq() align(16) callconv(.Naked) void {...@@ -1774,7 +1774,7 @@ fn __aarch64_ldset8_acq() align(16) callconv(.Naked) void {
1774 );1774 );
1775 unreachable;1775 unreachable;
1776}1776}
1777fn __aarch64_cas8_rel() align(16) callconv(.Naked) void {1777fn __aarch64_cas8_rel() align(16) callconv(.naked) void {
1778 @setRuntimeSafety(false);1778 @setRuntimeSafety(false);
1779 asm volatile (1779 asm volatile (
1780 \\ cbz w16, 8f1780 \\ cbz w16, 8f
...@@ -1796,7 +1796,7 @@ fn __aarch64_cas8_rel() align(16) callconv(.Naked) void {...@@ -1796,7 +1796,7 @@ fn __aarch64_cas8_rel() align(16) callconv(.Naked) void {
1796 );1796 );
1797 unreachable;1797 unreachable;
1798}1798}
1799fn __aarch64_swp8_rel() align(16) callconv(.Naked) void {1799fn __aarch64_swp8_rel() align(16) callconv(.naked) void {
1800 @setRuntimeSafety(false);1800 @setRuntimeSafety(false);
1801 asm volatile (1801 asm volatile (
1802 \\ cbz w16, 8f1802 \\ cbz w16, 8f
...@@ -1816,7 +1816,7 @@ fn __aarch64_swp8_rel() align(16) callconv(.Naked) void {...@@ -1816,7 +1816,7 @@ fn __aarch64_swp8_rel() align(16) callconv(.Naked) void {
1816 );1816 );
1817 unreachable;1817 unreachable;
1818}1818}
1819fn __aarch64_ldadd8_rel() align(16) callconv(.Naked) void {1819fn __aarch64_ldadd8_rel() align(16) callconv(.naked) void {
1820 @setRuntimeSafety(false);1820 @setRuntimeSafety(false);
1821 asm volatile (1821 asm volatile (
1822 \\ cbz w16, 8f1822 \\ cbz w16, 8f
...@@ -1837,7 +1837,7 @@ fn __aarch64_ldadd8_rel() align(16) callconv(.Naked) void {...@@ -1837,7 +1837,7 @@ fn __aarch64_ldadd8_rel() align(16) callconv(.Naked) void {
1837 );1837 );
1838 unreachable;1838 unreachable;
1839}1839}
1840fn __aarch64_ldclr8_rel() align(16) callconv(.Naked) void {1840fn __aarch64_ldclr8_rel() align(16) callconv(.naked) void {
1841 @setRuntimeSafety(false);1841 @setRuntimeSafety(false);
1842 asm volatile (1842 asm volatile (
1843 \\ cbz w16, 8f1843 \\ cbz w16, 8f
...@@ -1858,7 +1858,7 @@ fn __aarch64_ldclr8_rel() align(16) callconv(.Naked) void {...@@ -1858,7 +1858,7 @@ fn __aarch64_ldclr8_rel() align(16) callconv(.Naked) void {
1858 );1858 );
1859 unreachable;1859 unreachable;
1860}1860}
1861fn __aarch64_ldeor8_rel() align(16) callconv(.Naked) void {1861fn __aarch64_ldeor8_rel() align(16) callconv(.naked) void {
1862 @setRuntimeSafety(false);1862 @setRuntimeSafety(false);
1863 asm volatile (1863 asm volatile (
1864 \\ cbz w16, 8f1864 \\ cbz w16, 8f
...@@ -1879,7 +1879,7 @@ fn __aarch64_ldeor8_rel() align(16) callconv(.Naked) void {...@@ -1879,7 +1879,7 @@ fn __aarch64_ldeor8_rel() align(16) callconv(.Naked) void {
1879 );1879 );
1880 unreachable;1880 unreachable;
1881}1881}
1882fn __aarch64_ldset8_rel() align(16) callconv(.Naked) void {1882fn __aarch64_ldset8_rel() align(16) callconv(.naked) void {
1883 @setRuntimeSafety(false);1883 @setRuntimeSafety(false);
1884 asm volatile (1884 asm volatile (
1885 \\ cbz w16, 8f1885 \\ cbz w16, 8f
...@@ -1900,7 +1900,7 @@ fn __aarch64_ldset8_rel() align(16) callconv(.Naked) void {...@@ -1900,7 +1900,7 @@ fn __aarch64_ldset8_rel() align(16) callconv(.Naked) void {
1900 );1900 );
1901 unreachable;1901 unreachable;
1902}1902}
1903fn __aarch64_cas8_acq_rel() align(16) callconv(.Naked) void {1903fn __aarch64_cas8_acq_rel() align(16) callconv(.naked) void {
1904 @setRuntimeSafety(false);1904 @setRuntimeSafety(false);
1905 asm volatile (1905 asm volatile (
1906 \\ cbz w16, 8f1906 \\ cbz w16, 8f
...@@ -1922,7 +1922,7 @@ fn __aarch64_cas8_acq_rel() align(16) callconv(.Naked) void {...@@ -1922,7 +1922,7 @@ fn __aarch64_cas8_acq_rel() align(16) callconv(.Naked) void {
1922 );1922 );
1923 unreachable;1923 unreachable;
1924}1924}
1925fn __aarch64_swp8_acq_rel() align(16) callconv(.Naked) void {1925fn __aarch64_swp8_acq_rel() align(16) callconv(.naked) void {
1926 @setRuntimeSafety(false);1926 @setRuntimeSafety(false);
1927 asm volatile (1927 asm volatile (
1928 \\ cbz w16, 8f1928 \\ cbz w16, 8f
...@@ -1942,7 +1942,7 @@ fn __aarch64_swp8_acq_rel() align(16) callconv(.Naked) void {...@@ -1942,7 +1942,7 @@ fn __aarch64_swp8_acq_rel() align(16) callconv(.Naked) void {
1942 );1942 );
1943 unreachable;1943 unreachable;
1944}1944}
1945fn __aarch64_ldadd8_acq_rel() align(16) callconv(.Naked) void {1945fn __aarch64_ldadd8_acq_rel() align(16) callconv(.naked) void {
1946 @setRuntimeSafety(false);1946 @setRuntimeSafety(false);
1947 asm volatile (1947 asm volatile (
1948 \\ cbz w16, 8f1948 \\ cbz w16, 8f
...@@ -1963,7 +1963,7 @@ fn __aarch64_ldadd8_acq_rel() align(16) callconv(.Naked) void {...@@ -1963,7 +1963,7 @@ fn __aarch64_ldadd8_acq_rel() align(16) callconv(.Naked) void {
1963 );1963 );
1964 unreachable;1964 unreachable;
1965}1965}
1966fn __aarch64_ldclr8_acq_rel() align(16) callconv(.Naked) void {1966fn __aarch64_ldclr8_acq_rel() align(16) callconv(.naked) void {
1967 @setRuntimeSafety(false);1967 @setRuntimeSafety(false);
1968 asm volatile (1968 asm volatile (
1969 \\ cbz w16, 8f1969 \\ cbz w16, 8f
...@@ -1984,7 +1984,7 @@ fn __aarch64_ldclr8_acq_rel() align(16) callconv(.Naked) void {...@@ -1984,7 +1984,7 @@ fn __aarch64_ldclr8_acq_rel() align(16) callconv(.Naked) void {
1984 );1984 );
1985 unreachable;1985 unreachable;
1986}1986}
1987fn __aarch64_ldeor8_acq_rel() align(16) callconv(.Naked) void {1987fn __aarch64_ldeor8_acq_rel() align(16) callconv(.naked) void {
1988 @setRuntimeSafety(false);1988 @setRuntimeSafety(false);
1989 asm volatile (1989 asm volatile (
1990 \\ cbz w16, 8f1990 \\ cbz w16, 8f
...@@ -2005,7 +2005,7 @@ fn __aarch64_ldeor8_acq_rel() align(16) callconv(.Naked) void {...@@ -2005,7 +2005,7 @@ fn __aarch64_ldeor8_acq_rel() align(16) callconv(.Naked) void {
2005 );2005 );
2006 unreachable;2006 unreachable;
2007}2007}
2008fn __aarch64_ldset8_acq_rel() align(16) callconv(.Naked) void {2008fn __aarch64_ldset8_acq_rel() align(16) callconv(.naked) void {
2009 @setRuntimeSafety(false);2009 @setRuntimeSafety(false);
2010 asm volatile (2010 asm volatile (
2011 \\ cbz w16, 8f2011 \\ cbz w16, 8f
...@@ -2026,7 +2026,7 @@ fn __aarch64_ldset8_acq_rel() align(16) callconv(.Naked) void {...@@ -2026,7 +2026,7 @@ fn __aarch64_ldset8_acq_rel() align(16) callconv(.Naked) void {
2026 );2026 );
2027 unreachable;2027 unreachable;
2028}2028}
2029fn __aarch64_cas16_relax() align(16) callconv(.Naked) void {2029fn __aarch64_cas16_relax() align(16) callconv(.naked) void {
2030 @setRuntimeSafety(false);2030 @setRuntimeSafety(false);
2031 asm volatile (2031 asm volatile (
2032 \\ cbz w16, 8f2032 \\ cbz w16, 8f
...@@ -2050,7 +2050,7 @@ fn __aarch64_cas16_relax() align(16) callconv(.Naked) void {...@@ -2050,7 +2050,7 @@ fn __aarch64_cas16_relax() align(16) callconv(.Naked) void {
2050 );2050 );
2051 unreachable;2051 unreachable;
2052}2052}
2053fn __aarch64_cas16_acq() align(16) callconv(.Naked) void {2053fn __aarch64_cas16_acq() align(16) callconv(.naked) void {
2054 @setRuntimeSafety(false);2054 @setRuntimeSafety(false);
2055 asm volatile (2055 asm volatile (
2056 \\ cbz w16, 8f2056 \\ cbz w16, 8f
...@@ -2074,7 +2074,7 @@ fn __aarch64_cas16_acq() align(16) callconv(.Naked) void {...@@ -2074,7 +2074,7 @@ fn __aarch64_cas16_acq() align(16) callconv(.Naked) void {
2074 );2074 );
2075 unreachable;2075 unreachable;
2076}2076}
2077fn __aarch64_cas16_rel() align(16) callconv(.Naked) void {2077fn __aarch64_cas16_rel() align(16) callconv(.naked) void {
2078 @setRuntimeSafety(false);2078 @setRuntimeSafety(false);
2079 asm volatile (2079 asm volatile (
2080 \\ cbz w16, 8f2080 \\ cbz w16, 8f
...@@ -2098,7 +2098,7 @@ fn __aarch64_cas16_rel() align(16) callconv(.Naked) void {...@@ -2098,7 +2098,7 @@ fn __aarch64_cas16_rel() align(16) callconv(.Naked) void {
2098 );2098 );
2099 unreachable;2099 unreachable;
2100}2100}
2101fn __aarch64_cas16_acq_rel() align(16) callconv(.Naked) void {2101fn __aarch64_cas16_acq_rel() align(16) callconv(.naked) void {
2102 @setRuntimeSafety(false);2102 @setRuntimeSafety(false);
2103 asm volatile (2103 asm volatile (
2104 \\ cbz w16, 8f2104 \\ cbz w16, 8f
lib/compiler_rt/absvdi2.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__absvdi2, .{ .name = "__absvdi2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__absvdi2, .{ .name = "__absvdi2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10pub fn __absvdi2(a: i64) callconv(.C) i64 {10pub fn __absvdi2(a: i64) callconv(.c) i64 {
11 return absv(i64, a);11 return absv(i64, a);
12}12}
lib/compiler_rt/absvsi2.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__absvsi2, .{ .name = "__absvsi2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__absvsi2, .{ .name = "__absvsi2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10pub fn __absvsi2(a: i32) callconv(.C) i32 {10pub fn __absvsi2(a: i32) callconv(.c) i32 {
11 return absv(i32, a);11 return absv(i32, a);
12}12}
lib/compiler_rt/absvti2.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__absvti2, .{ .name = "__absvti2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__absvti2, .{ .name = "__absvti2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10pub fn __absvti2(a: i128) callconv(.C) i128 {10pub fn __absvti2(a: i128) callconv(.c) i128 {
11 return absv(i128, a);11 return absv(i128, a);
12}12}
lib/compiler_rt/adddf3.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14fn __adddf3(a: f64, b: f64) callconv(.C) f64 {14fn __adddf3(a: f64, b: f64) callconv(.c) f64 {
15 return addf3(f64, a, b);15 return addf3(f64, a, b);
16}16}
1717
18fn __aeabi_dadd(a: f64, b: f64) callconv(.AAPCS) f64 {18fn __aeabi_dadd(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 {
19 return addf3(f64, a, b);19 return addf3(f64, a, b);
20}20}
lib/compiler_rt/addhf3.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__addhf3, .{ .name = "__addhf3", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__addhf3, .{ .name = "__addhf3", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __addhf3(a: f16, b: f16) callconv(.C) f16 {10fn __addhf3(a: f16, b: f16) callconv(.c) f16 {
11 return addf3(f16, a, b);11 return addf3(f16, a, b);
12}12}
lib/compiler_rt/addo.zig+3-3
...@@ -31,13 +31,13 @@ inline fn addoXi4_generic(comptime ST: type, a: ST, b: ST, overflow: *c_int) ST...@@ -31,13 +31,13 @@ inline fn addoXi4_generic(comptime ST: type, a: ST, b: ST, overflow: *c_int) ST
31 return sum;31 return sum;
32}32}
3333
34pub fn __addosi4(a: i32, b: i32, overflow: *c_int) callconv(.C) i32 {34pub fn __addosi4(a: i32, b: i32, overflow: *c_int) callconv(.c) i32 {
35 return addoXi4_generic(i32, a, b, overflow);35 return addoXi4_generic(i32, a, b, overflow);
36}36}
37pub fn __addodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 {37pub fn __addodi4(a: i64, b: i64, overflow: *c_int) callconv(.c) i64 {
38 return addoXi4_generic(i64, a, b, overflow);38 return addoXi4_generic(i64, a, b, overflow);
39}39}
40pub fn __addoti4(a: i128, b: i128, overflow: *c_int) callconv(.C) i128 {40pub fn __addoti4(a: i128, b: i128, overflow: *c_int) callconv(.c) i128 {
41 return addoXi4_generic(i128, a, b, overflow);41 return addoXi4_generic(i128, a, b, overflow);
42}42}
4343
lib/compiler_rt/addsf3.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14fn __addsf3(a: f32, b: f32) callconv(.C) f32 {14fn __addsf3(a: f32, b: f32) callconv(.c) f32 {
15 return addf3(f32, a, b);15 return addf3(f32, a, b);
16}16}
1717
18fn __aeabi_fadd(a: f32, b: f32) callconv(.AAPCS) f32 {18fn __aeabi_fadd(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 {
19 return addf3(f32, a, b);19 return addf3(f32, a, b);
20}20}
lib/compiler_rt/addtf3.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 @export(&__addtf3, .{ .name = "__addtf3", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__addtf3, .{ .name = "__addtf3", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __addtf3(a: f128, b: f128) callconv(.C) f128 {15pub fn __addtf3(a: f128, b: f128) callconv(.c) f128 {
16 return addf3(f128, a, b);16 return addf3(f128, a, b);
17}17}
1818
19fn _Qp_add(c: *f128, a: *f128, b: *f128) callconv(.C) void {19fn _Qp_add(c: *f128, a: *f128, b: *f128) callconv(.c) void {
20 c.* = addf3(f128, a.*, b.*);20 c.* = addf3(f128, a.*, b.*);
21}21}
lib/compiler_rt/addxf3.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__addxf3, .{ .name = "__addxf3", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__addxf3, .{ .name = "__addxf3", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10pub fn __addxf3(a: f80, b: f80) callconv(.C) f80 {10pub fn __addxf3(a: f80, b: f80) callconv(.c) f80 {
11 return addf3(f80, a, b);11 return addf3(f80, a, b);
12}12}
lib/compiler_rt/arm.zig+22-22
...@@ -57,67 +57,67 @@ extern fn memset(dest: ?[*]u8, c: i32, n: usize) ?[*]u8;...@@ -57,67 +57,67 @@ extern fn memset(dest: ?[*]u8, c: i32, n: usize) ?[*]u8;
57extern fn memcpy(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize) ?[*]u8;57extern fn memcpy(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize) ?[*]u8;
58extern fn memmove(dest: ?[*]u8, src: ?[*]const u8, n: usize) ?[*]u8;58extern fn memmove(dest: ?[*]u8, src: ?[*]const u8, n: usize) ?[*]u8;
5959
60pub fn __aeabi_memcpy(dest: [*]u8, src: [*]u8, n: usize) callconv(.AAPCS) void {60pub fn __aeabi_memcpy(dest: [*]u8, src: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void {
61 @setRuntimeSafety(false);61 @setRuntimeSafety(false);
62 _ = memcpy(dest, src, n);62 _ = memcpy(dest, src, n);
63}63}
64pub fn __aeabi_memcpy4(dest: [*]u8, src: [*]u8, n: usize) callconv(.AAPCS) void {64pub fn __aeabi_memcpy4(dest: [*]u8, src: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void {
65 @setRuntimeSafety(false);65 @setRuntimeSafety(false);
66 _ = memcpy(dest, src, n);66 _ = memcpy(dest, src, n);
67}67}
68pub fn __aeabi_memcpy8(dest: [*]u8, src: [*]u8, n: usize) callconv(.AAPCS) void {68pub fn __aeabi_memcpy8(dest: [*]u8, src: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void {
69 @setRuntimeSafety(false);69 @setRuntimeSafety(false);
70 _ = memcpy(dest, src, n);70 _ = memcpy(dest, src, n);
71}71}
7272
73pub fn __aeabi_memmove(dest: [*]u8, src: [*]u8, n: usize) callconv(.AAPCS) void {73pub fn __aeabi_memmove(dest: [*]u8, src: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void {
74 @setRuntimeSafety(false);74 @setRuntimeSafety(false);
75 _ = memmove(dest, src, n);75 _ = memmove(dest, src, n);
76}76}
77pub fn __aeabi_memmove4(dest: [*]u8, src: [*]u8, n: usize) callconv(.AAPCS) void {77pub fn __aeabi_memmove4(dest: [*]u8, src: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void {
78 @setRuntimeSafety(false);78 @setRuntimeSafety(false);
79 _ = memmove(dest, src, n);79 _ = memmove(dest, src, n);
80}80}
81pub fn __aeabi_memmove8(dest: [*]u8, src: [*]u8, n: usize) callconv(.AAPCS) void {81pub fn __aeabi_memmove8(dest: [*]u8, src: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void {
82 @setRuntimeSafety(false);82 @setRuntimeSafety(false);
83 _ = memmove(dest, src, n);83 _ = memmove(dest, src, n);
84}84}
8585
86pub fn __aeabi_memset(dest: [*]u8, n: usize, c: i32) callconv(.AAPCS) void {86pub fn __aeabi_memset(dest: [*]u8, n: usize, c: i32) callconv(.{ .arm_aapcs = .{} }) void {
87 @setRuntimeSafety(false);87 @setRuntimeSafety(false);
88 // This is dentical to the standard `memset` definition but with the last88 // This is dentical to the standard `memset` definition but with the last
89 // two arguments swapped89 // two arguments swapped
90 _ = memset(dest, c, n);90 _ = memset(dest, c, n);
91}91}
92pub fn __aeabi_memset4(dest: [*]u8, n: usize, c: i32) callconv(.AAPCS) void {92pub fn __aeabi_memset4(dest: [*]u8, n: usize, c: i32) callconv(.{ .arm_aapcs = .{} }) void {
93 @setRuntimeSafety(false);93 @setRuntimeSafety(false);
94 _ = memset(dest, c, n);94 _ = memset(dest, c, n);
95}95}
96pub fn __aeabi_memset8(dest: [*]u8, n: usize, c: i32) callconv(.AAPCS) void {96pub fn __aeabi_memset8(dest: [*]u8, n: usize, c: i32) callconv(.{ .arm_aapcs = .{} }) void {
97 @setRuntimeSafety(false);97 @setRuntimeSafety(false);
98 _ = memset(dest, c, n);98 _ = memset(dest, c, n);
99}99}
100100
101pub fn __aeabi_memclr(dest: [*]u8, n: usize) callconv(.AAPCS) void {101pub fn __aeabi_memclr(dest: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void {
102 @setRuntimeSafety(false);102 @setRuntimeSafety(false);
103 _ = memset(dest, 0, n);103 _ = memset(dest, 0, n);
104}104}
105pub fn __aeabi_memclr4(dest: [*]u8, n: usize) callconv(.AAPCS) void {105pub fn __aeabi_memclr4(dest: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void {
106 @setRuntimeSafety(false);106 @setRuntimeSafety(false);
107 _ = memset(dest, 0, n);107 _ = memset(dest, 0, n);
108}108}
109pub fn __aeabi_memclr8(dest: [*]u8, n: usize) callconv(.AAPCS) void {109pub fn __aeabi_memclr8(dest: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void {
110 @setRuntimeSafety(false);110 @setRuntimeSafety(false);
111 _ = memset(dest, 0, n);111 _ = memset(dest, 0, n);
112}112}
113113
114// Dummy functions to avoid errors during the linking phase114// Dummy functions to avoid errors during the linking phase
115pub fn __aeabi_unwind_cpp_pr0() callconv(.AAPCS) void {}115pub fn __aeabi_unwind_cpp_pr0() callconv(.{ .arm_aapcs = .{} }) void {}
116pub fn __aeabi_unwind_cpp_pr1() callconv(.AAPCS) void {}116pub fn __aeabi_unwind_cpp_pr1() callconv(.{ .arm_aapcs = .{} }) void {}
117pub fn __aeabi_unwind_cpp_pr2() callconv(.AAPCS) void {}117pub fn __aeabi_unwind_cpp_pr2() callconv(.{ .arm_aapcs = .{} }) void {}
118118
119// This function can only clobber r0 according to the ABI119// This function can only clobber r0 according to the ABI
120pub fn __aeabi_read_tp() callconv(.Naked) void {120pub fn __aeabi_read_tp() callconv(.naked) void {
121 @setRuntimeSafety(false);121 @setRuntimeSafety(false);
122 asm volatile (122 asm volatile (
123 \\ mrc p15, 0, r0, c13, c0, 3123 \\ mrc p15, 0, r0, c13, c0, 3
...@@ -129,7 +129,7 @@ pub fn __aeabi_read_tp() callconv(.Naked) void {...@@ -129,7 +129,7 @@ pub fn __aeabi_read_tp() callconv(.Naked) void {
129// The following functions are wrapped in an asm block to ensure the required129// The following functions are wrapped in an asm block to ensure the required
130// calling convention is always respected130// calling convention is always respected
131131
132pub fn __aeabi_uidivmod() callconv(.Naked) void {132pub fn __aeabi_uidivmod() callconv(.naked) void {
133 @setRuntimeSafety(false);133 @setRuntimeSafety(false);
134 // Divide r0 by r1; the quotient goes in r0, the remainder in r1134 // Divide r0 by r1; the quotient goes in r0, the remainder in r1
135 asm volatile (135 asm volatile (
...@@ -147,7 +147,7 @@ pub fn __aeabi_uidivmod() callconv(.Naked) void {...@@ -147,7 +147,7 @@ pub fn __aeabi_uidivmod() callconv(.Naked) void {
147 unreachable;147 unreachable;
148}148}
149149
150pub fn __aeabi_uldivmod() callconv(.Naked) void {150pub fn __aeabi_uldivmod() callconv(.naked) void {
151 @setRuntimeSafety(false);151 @setRuntimeSafety(false);
152 // Divide r1:r0 by r3:r2; the quotient goes in r1:r0, the remainder in r3:r2152 // Divide r1:r0 by r3:r2; the quotient goes in r1:r0, the remainder in r3:r2
153 asm volatile (153 asm volatile (
...@@ -167,7 +167,7 @@ pub fn __aeabi_uldivmod() callconv(.Naked) void {...@@ -167,7 +167,7 @@ pub fn __aeabi_uldivmod() callconv(.Naked) void {
167 unreachable;167 unreachable;
168}168}
169169
170pub fn __aeabi_idivmod() callconv(.Naked) void {170pub fn __aeabi_idivmod() callconv(.naked) void {
171 @setRuntimeSafety(false);171 @setRuntimeSafety(false);
172 // Divide r0 by r1; the quotient goes in r0, the remainder in r1172 // Divide r0 by r1; the quotient goes in r0, the remainder in r1
173 asm volatile (173 asm volatile (
...@@ -185,7 +185,7 @@ pub fn __aeabi_idivmod() callconv(.Naked) void {...@@ -185,7 +185,7 @@ pub fn __aeabi_idivmod() callconv(.Naked) void {
185 unreachable;185 unreachable;
186}186}
187187
188pub fn __aeabi_ldivmod() callconv(.Naked) void {188pub fn __aeabi_ldivmod() callconv(.naked) void {
189 @setRuntimeSafety(false);189 @setRuntimeSafety(false);
190 // Divide r1:r0 by r3:r2; the quotient goes in r1:r0, the remainder in r3:r2190 // Divide r1:r0 by r3:r2; the quotient goes in r1:r0, the remainder in r3:r2
191 asm volatile (191 asm volatile (
...@@ -207,12 +207,12 @@ pub fn __aeabi_ldivmod() callconv(.Naked) void {...@@ -207,12 +207,12 @@ pub fn __aeabi_ldivmod() callconv(.Naked) void {
207207
208// Float Arithmetic208// Float Arithmetic
209209
210fn __aeabi_frsub(a: f32, b: f32) callconv(.AAPCS) f32 {210fn __aeabi_frsub(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 {
211 const neg_a: f32 = @bitCast(@as(u32, @bitCast(a)) ^ (@as(u32, 1) << 31));211 const neg_a: f32 = @bitCast(@as(u32, @bitCast(a)) ^ (@as(u32, 1) << 31));
212 return b + neg_a;212 return b + neg_a;
213}213}
214214
215fn __aeabi_drsub(a: f64, b: f64) callconv(.AAPCS) f64 {215fn __aeabi_drsub(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 {
216 const neg_a: f64 = @bitCast(@as(u64, @bitCast(a)) ^ (@as(u64, 1) << 63));216 const neg_a: f64 = @bitCast(@as(u64, @bitCast(a)) ^ (@as(u64, 1) << 63));
217 return b + neg_a;217 return b + neg_a;
218}218}
lib/compiler_rt/atomics.zig+64-64
...@@ -117,21 +117,21 @@ var spinlocks: SpinlockTable = SpinlockTable{};...@@ -117,21 +117,21 @@ var spinlocks: SpinlockTable = SpinlockTable{};
117// Generic version of GCC atomic builtin functions.117// Generic version of GCC atomic builtin functions.
118// Those work on any object no matter the pointer alignment nor its size.118// Those work on any object no matter the pointer alignment nor its size.
119119
120fn __atomic_load(size: u32, src: [*]u8, dest: [*]u8, model: i32) callconv(.C) void {120fn __atomic_load(size: u32, src: [*]u8, dest: [*]u8, model: i32) callconv(.c) void {
121 _ = model;121 _ = model;
122 var sl = spinlocks.get(@intFromPtr(src));122 var sl = spinlocks.get(@intFromPtr(src));
123 defer sl.release();123 defer sl.release();
124 @memcpy(dest[0..size], src);124 @memcpy(dest[0..size], src);
125}125}
126126
127fn __atomic_store(size: u32, dest: [*]u8, src: [*]u8, model: i32) callconv(.C) void {127fn __atomic_store(size: u32, dest: [*]u8, src: [*]u8, model: i32) callconv(.c) void {
128 _ = model;128 _ = model;
129 var sl = spinlocks.get(@intFromPtr(dest));129 var sl = spinlocks.get(@intFromPtr(dest));
130 defer sl.release();130 defer sl.release();
131 @memcpy(dest[0..size], src);131 @memcpy(dest[0..size], src);
132}132}
133133
134fn __atomic_exchange(size: u32, ptr: [*]u8, val: [*]u8, old: [*]u8, model: i32) callconv(.C) void {134fn __atomic_exchange(size: u32, ptr: [*]u8, val: [*]u8, old: [*]u8, model: i32) callconv(.c) void {
135 _ = model;135 _ = model;
136 var sl = spinlocks.get(@intFromPtr(ptr));136 var sl = spinlocks.get(@intFromPtr(ptr));
137 defer sl.release();137 defer sl.release();
...@@ -146,7 +146,7 @@ fn __atomic_compare_exchange(...@@ -146,7 +146,7 @@ fn __atomic_compare_exchange(
146 desired: [*]u8,146 desired: [*]u8,
147 success: i32,147 success: i32,
148 failure: i32,148 failure: i32,
149) callconv(.C) i32 {149) callconv(.c) i32 {
150 _ = success;150 _ = success;
151 _ = failure;151 _ = failure;
152 var sl = spinlocks.get(@intFromPtr(ptr));152 var sl = spinlocks.get(@intFromPtr(ptr));
...@@ -176,23 +176,23 @@ inline fn atomic_load_N(comptime T: type, src: *T, model: i32) T {...@@ -176,23 +176,23 @@ inline fn atomic_load_N(comptime T: type, src: *T, model: i32) T {
176 }176 }
177}177}
178178
179fn __atomic_load_1(src: *u8, model: i32) callconv(.C) u8 {179fn __atomic_load_1(src: *u8, model: i32) callconv(.c) u8 {
180 return atomic_load_N(u8, src, model);180 return atomic_load_N(u8, src, model);
181}181}
182182
183fn __atomic_load_2(src: *u16, model: i32) callconv(.C) u16 {183fn __atomic_load_2(src: *u16, model: i32) callconv(.c) u16 {
184 return atomic_load_N(u16, src, model);184 return atomic_load_N(u16, src, model);
185}185}
186186
187fn __atomic_load_4(src: *u32, model: i32) callconv(.C) u32 {187fn __atomic_load_4(src: *u32, model: i32) callconv(.c) u32 {
188 return atomic_load_N(u32, src, model);188 return atomic_load_N(u32, src, model);
189}189}
190190
191fn __atomic_load_8(src: *u64, model: i32) callconv(.C) u64 {191fn __atomic_load_8(src: *u64, model: i32) callconv(.c) u64 {
192 return atomic_load_N(u64, src, model);192 return atomic_load_N(u64, src, model);
193}193}
194194
195fn __atomic_load_16(src: *u128, model: i32) callconv(.C) u128 {195fn __atomic_load_16(src: *u128, model: i32) callconv(.c) u128 {
196 return atomic_load_N(u128, src, model);196 return atomic_load_N(u128, src, model);
197}197}
198198
...@@ -207,23 +207,23 @@ inline fn atomic_store_N(comptime T: type, dst: *T, value: T, model: i32) void {...@@ -207,23 +207,23 @@ inline fn atomic_store_N(comptime T: type, dst: *T, value: T, model: i32) void {
207 }207 }
208}208}
209209
210fn __atomic_store_1(dst: *u8, value: u8, model: i32) callconv(.C) void {210fn __atomic_store_1(dst: *u8, value: u8, model: i32) callconv(.c) void {
211 return atomic_store_N(u8, dst, value, model);211 return atomic_store_N(u8, dst, value, model);
212}212}
213213
214fn __atomic_store_2(dst: *u16, value: u16, model: i32) callconv(.C) void {214fn __atomic_store_2(dst: *u16, value: u16, model: i32) callconv(.c) void {
215 return atomic_store_N(u16, dst, value, model);215 return atomic_store_N(u16, dst, value, model);
216}216}
217217
218fn __atomic_store_4(dst: *u32, value: u32, model: i32) callconv(.C) void {218fn __atomic_store_4(dst: *u32, value: u32, model: i32) callconv(.c) void {
219 return atomic_store_N(u32, dst, value, model);219 return atomic_store_N(u32, dst, value, model);
220}220}
221221
222fn __atomic_store_8(dst: *u64, value: u64, model: i32) callconv(.C) void {222fn __atomic_store_8(dst: *u64, value: u64, model: i32) callconv(.c) void {
223 return atomic_store_N(u64, dst, value, model);223 return atomic_store_N(u64, dst, value, model);
224}224}
225225
226fn __atomic_store_16(dst: *u128, value: u128, model: i32) callconv(.C) void {226fn __atomic_store_16(dst: *u128, value: u128, model: i32) callconv(.c) void {
227 return atomic_store_N(u128, dst, value, model);227 return atomic_store_N(u128, dst, value, model);
228}228}
229229
...@@ -274,23 +274,23 @@ inline fn atomic_exchange_N(comptime T: type, ptr: *T, val: T, model: i32) T {...@@ -274,23 +274,23 @@ inline fn atomic_exchange_N(comptime T: type, ptr: *T, val: T, model: i32) T {
274 }274 }
275}275}
276276
277fn __atomic_exchange_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 {277fn __atomic_exchange_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 {
278 return atomic_exchange_N(u8, ptr, val, model);278 return atomic_exchange_N(u8, ptr, val, model);
279}279}
280280
281fn __atomic_exchange_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 {281fn __atomic_exchange_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 {
282 return atomic_exchange_N(u16, ptr, val, model);282 return atomic_exchange_N(u16, ptr, val, model);
283}283}
284284
285fn __atomic_exchange_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 {285fn __atomic_exchange_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 {
286 return atomic_exchange_N(u32, ptr, val, model);286 return atomic_exchange_N(u32, ptr, val, model);
287}287}
288288
289fn __atomic_exchange_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 {289fn __atomic_exchange_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 {
290 return atomic_exchange_N(u64, ptr, val, model);290 return atomic_exchange_N(u64, ptr, val, model);
291}291}
292292
293fn __atomic_exchange_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 {293fn __atomic_exchange_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 {
294 return atomic_exchange_N(u128, ptr, val, model);294 return atomic_exchange_N(u128, ptr, val, model);
295}295}
296296
...@@ -323,23 +323,23 @@ inline fn atomic_compare_exchange_N(...@@ -323,23 +323,23 @@ inline fn atomic_compare_exchange_N(
323 }323 }
324}324}
325325
326fn __atomic_compare_exchange_1(ptr: *u8, expected: *u8, desired: u8, success: i32, failure: i32) callconv(.C) i32 {326fn __atomic_compare_exchange_1(ptr: *u8, expected: *u8, desired: u8, success: i32, failure: i32) callconv(.c) i32 {
327 return atomic_compare_exchange_N(u8, ptr, expected, desired, success, failure);327 return atomic_compare_exchange_N(u8, ptr, expected, desired, success, failure);
328}328}
329329
330fn __atomic_compare_exchange_2(ptr: *u16, expected: *u16, desired: u16, success: i32, failure: i32) callconv(.C) i32 {330fn __atomic_compare_exchange_2(ptr: *u16, expected: *u16, desired: u16, success: i32, failure: i32) callconv(.c) i32 {
331 return atomic_compare_exchange_N(u16, ptr, expected, desired, success, failure);331 return atomic_compare_exchange_N(u16, ptr, expected, desired, success, failure);
332}332}
333333
334fn __atomic_compare_exchange_4(ptr: *u32, expected: *u32, desired: u32, success: i32, failure: i32) callconv(.C) i32 {334fn __atomic_compare_exchange_4(ptr: *u32, expected: *u32, desired: u32, success: i32, failure: i32) callconv(.c) i32 {
335 return atomic_compare_exchange_N(u32, ptr, expected, desired, success, failure);335 return atomic_compare_exchange_N(u32, ptr, expected, desired, success, failure);
336}336}
337337
338fn __atomic_compare_exchange_8(ptr: *u64, expected: *u64, desired: u64, success: i32, failure: i32) callconv(.C) i32 {338fn __atomic_compare_exchange_8(ptr: *u64, expected: *u64, desired: u64, success: i32, failure: i32) callconv(.c) i32 {
339 return atomic_compare_exchange_N(u64, ptr, expected, desired, success, failure);339 return atomic_compare_exchange_N(u64, ptr, expected, desired, success, failure);
340}340}
341341
342fn __atomic_compare_exchange_16(ptr: *u128, expected: *u128, desired: u128, success: i32, failure: i32) callconv(.C) i32 {342fn __atomic_compare_exchange_16(ptr: *u128, expected: *u128, desired: u128, success: i32, failure: i32) callconv(.c) i32 {
343 return atomic_compare_exchange_N(u128, ptr, expected, desired, success, failure);343 return atomic_compare_exchange_N(u128, ptr, expected, desired, success, failure);
344}344}
345345
...@@ -376,163 +376,163 @@ inline fn fetch_op_N(comptime T: type, comptime op: std.builtin.AtomicRmwOp, ptr...@@ -376,163 +376,163 @@ inline fn fetch_op_N(comptime T: type, comptime op: std.builtin.AtomicRmwOp, ptr
376 return @atomicRmw(T, ptr, op, val, .seq_cst);376 return @atomicRmw(T, ptr, op, val, .seq_cst);
377}377}
378378
379fn __atomic_fetch_add_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 {379fn __atomic_fetch_add_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 {
380 return fetch_op_N(u8, .Add, ptr, val, model);380 return fetch_op_N(u8, .Add, ptr, val, model);
381}381}
382382
383fn __atomic_fetch_add_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 {383fn __atomic_fetch_add_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 {
384 return fetch_op_N(u16, .Add, ptr, val, model);384 return fetch_op_N(u16, .Add, ptr, val, model);
385}385}
386386
387fn __atomic_fetch_add_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 {387fn __atomic_fetch_add_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 {
388 return fetch_op_N(u32, .Add, ptr, val, model);388 return fetch_op_N(u32, .Add, ptr, val, model);
389}389}
390390
391fn __atomic_fetch_add_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 {391fn __atomic_fetch_add_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 {
392 return fetch_op_N(u64, .Add, ptr, val, model);392 return fetch_op_N(u64, .Add, ptr, val, model);
393}393}
394394
395fn __atomic_fetch_add_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 {395fn __atomic_fetch_add_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 {
396 return fetch_op_N(u128, .Add, ptr, val, model);396 return fetch_op_N(u128, .Add, ptr, val, model);
397}397}
398398
399fn __atomic_fetch_sub_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 {399fn __atomic_fetch_sub_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 {
400 return fetch_op_N(u8, .Sub, ptr, val, model);400 return fetch_op_N(u8, .Sub, ptr, val, model);
401}401}
402402
403fn __atomic_fetch_sub_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 {403fn __atomic_fetch_sub_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 {
404 return fetch_op_N(u16, .Sub, ptr, val, model);404 return fetch_op_N(u16, .Sub, ptr, val, model);
405}405}
406406
407fn __atomic_fetch_sub_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 {407fn __atomic_fetch_sub_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 {
408 return fetch_op_N(u32, .Sub, ptr, val, model);408 return fetch_op_N(u32, .Sub, ptr, val, model);
409}409}
410410
411fn __atomic_fetch_sub_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 {411fn __atomic_fetch_sub_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 {
412 return fetch_op_N(u64, .Sub, ptr, val, model);412 return fetch_op_N(u64, .Sub, ptr, val, model);
413}413}
414414
415fn __atomic_fetch_sub_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 {415fn __atomic_fetch_sub_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 {
416 return fetch_op_N(u128, .Sub, ptr, val, model);416 return fetch_op_N(u128, .Sub, ptr, val, model);
417}417}
418418
419fn __atomic_fetch_and_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 {419fn __atomic_fetch_and_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 {
420 return fetch_op_N(u8, .And, ptr, val, model);420 return fetch_op_N(u8, .And, ptr, val, model);
421}421}
422422
423fn __atomic_fetch_and_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 {423fn __atomic_fetch_and_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 {
424 return fetch_op_N(u16, .And, ptr, val, model);424 return fetch_op_N(u16, .And, ptr, val, model);
425}425}
426426
427fn __atomic_fetch_and_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 {427fn __atomic_fetch_and_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 {
428 return fetch_op_N(u32, .And, ptr, val, model);428 return fetch_op_N(u32, .And, ptr, val, model);
429}429}
430430
431fn __atomic_fetch_and_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 {431fn __atomic_fetch_and_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 {
432 return fetch_op_N(u64, .And, ptr, val, model);432 return fetch_op_N(u64, .And, ptr, val, model);
433}433}
434434
435fn __atomic_fetch_and_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 {435fn __atomic_fetch_and_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 {
436 return fetch_op_N(u128, .And, ptr, val, model);436 return fetch_op_N(u128, .And, ptr, val, model);
437}437}
438438
439fn __atomic_fetch_or_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 {439fn __atomic_fetch_or_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 {
440 return fetch_op_N(u8, .Or, ptr, val, model);440 return fetch_op_N(u8, .Or, ptr, val, model);
441}441}
442442
443fn __atomic_fetch_or_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 {443fn __atomic_fetch_or_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 {
444 return fetch_op_N(u16, .Or, ptr, val, model);444 return fetch_op_N(u16, .Or, ptr, val, model);
445}445}
446446
447fn __atomic_fetch_or_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 {447fn __atomic_fetch_or_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 {
448 return fetch_op_N(u32, .Or, ptr, val, model);448 return fetch_op_N(u32, .Or, ptr, val, model);
449}449}
450450
451fn __atomic_fetch_or_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 {451fn __atomic_fetch_or_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 {
452 return fetch_op_N(u64, .Or, ptr, val, model);452 return fetch_op_N(u64, .Or, ptr, val, model);
453}453}
454454
455fn __atomic_fetch_or_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 {455fn __atomic_fetch_or_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 {
456 return fetch_op_N(u128, .Or, ptr, val, model);456 return fetch_op_N(u128, .Or, ptr, val, model);
457}457}
458458
459fn __atomic_fetch_xor_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 {459fn __atomic_fetch_xor_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 {
460 return fetch_op_N(u8, .Xor, ptr, val, model);460 return fetch_op_N(u8, .Xor, ptr, val, model);
461}461}
462462
463fn __atomic_fetch_xor_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 {463fn __atomic_fetch_xor_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 {
464 return fetch_op_N(u16, .Xor, ptr, val, model);464 return fetch_op_N(u16, .Xor, ptr, val, model);
465}465}
466466
467fn __atomic_fetch_xor_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 {467fn __atomic_fetch_xor_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 {
468 return fetch_op_N(u32, .Xor, ptr, val, model);468 return fetch_op_N(u32, .Xor, ptr, val, model);
469}469}
470470
471fn __atomic_fetch_xor_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 {471fn __atomic_fetch_xor_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 {
472 return fetch_op_N(u64, .Xor, ptr, val, model);472 return fetch_op_N(u64, .Xor, ptr, val, model);
473}473}
474474
475fn __atomic_fetch_xor_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 {475fn __atomic_fetch_xor_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 {
476 return fetch_op_N(u128, .Xor, ptr, val, model);476 return fetch_op_N(u128, .Xor, ptr, val, model);
477}477}
478478
479fn __atomic_fetch_nand_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 {479fn __atomic_fetch_nand_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 {
480 return fetch_op_N(u8, .Nand, ptr, val, model);480 return fetch_op_N(u8, .Nand, ptr, val, model);
481}481}
482482
483fn __atomic_fetch_nand_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 {483fn __atomic_fetch_nand_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 {
484 return fetch_op_N(u16, .Nand, ptr, val, model);484 return fetch_op_N(u16, .Nand, ptr, val, model);
485}485}
486486
487fn __atomic_fetch_nand_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 {487fn __atomic_fetch_nand_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 {
488 return fetch_op_N(u32, .Nand, ptr, val, model);488 return fetch_op_N(u32, .Nand, ptr, val, model);
489}489}
490490
491fn __atomic_fetch_nand_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 {491fn __atomic_fetch_nand_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 {
492 return fetch_op_N(u64, .Nand, ptr, val, model);492 return fetch_op_N(u64, .Nand, ptr, val, model);
493}493}
494494
495fn __atomic_fetch_nand_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 {495fn __atomic_fetch_nand_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 {
496 return fetch_op_N(u128, .Nand, ptr, val, model);496 return fetch_op_N(u128, .Nand, ptr, val, model);
497}497}
498498
499fn __atomic_fetch_umax_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 {499fn __atomic_fetch_umax_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 {
500 return fetch_op_N(u8, .Max, ptr, val, model);500 return fetch_op_N(u8, .Max, ptr, val, model);
501}501}
502502
503fn __atomic_fetch_umax_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 {503fn __atomic_fetch_umax_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 {
504 return fetch_op_N(u16, .Max, ptr, val, model);504 return fetch_op_N(u16, .Max, ptr, val, model);
505}505}
506506
507fn __atomic_fetch_umax_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 {507fn __atomic_fetch_umax_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 {
508 return fetch_op_N(u32, .Max, ptr, val, model);508 return fetch_op_N(u32, .Max, ptr, val, model);
509}509}
510510
511fn __atomic_fetch_umax_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 {511fn __atomic_fetch_umax_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 {
512 return fetch_op_N(u64, .Max, ptr, val, model);512 return fetch_op_N(u64, .Max, ptr, val, model);
513}513}
514514
515fn __atomic_fetch_umax_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 {515fn __atomic_fetch_umax_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 {
516 return fetch_op_N(u128, .Max, ptr, val, model);516 return fetch_op_N(u128, .Max, ptr, val, model);
517}517}
518518
519fn __atomic_fetch_umin_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 {519fn __atomic_fetch_umin_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 {
520 return fetch_op_N(u8, .Min, ptr, val, model);520 return fetch_op_N(u8, .Min, ptr, val, model);
521}521}
522522
523fn __atomic_fetch_umin_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 {523fn __atomic_fetch_umin_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 {
524 return fetch_op_N(u16, .Min, ptr, val, model);524 return fetch_op_N(u16, .Min, ptr, val, model);
525}525}
526526
527fn __atomic_fetch_umin_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 {527fn __atomic_fetch_umin_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 {
528 return fetch_op_N(u32, .Min, ptr, val, model);528 return fetch_op_N(u32, .Min, ptr, val, model);
529}529}
530530
531fn __atomic_fetch_umin_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 {531fn __atomic_fetch_umin_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 {
532 return fetch_op_N(u64, .Min, ptr, val, model);532 return fetch_op_N(u64, .Min, ptr, val, model);
533}533}
534534
535fn __atomic_fetch_umin_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 {535fn __atomic_fetch_umin_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 {
536 return fetch_op_N(u128, .Min, ptr, val, model);536 return fetch_op_N(u128, .Min, ptr, val, model);
537}537}
538538
lib/compiler_rt/aulldiv.zig+2-2
...@@ -15,7 +15,7 @@ comptime {...@@ -15,7 +15,7 @@ comptime {
15 }15 }
16}16}
1717
18pub fn _alldiv(a: i64, b: i64) callconv(.Stdcall) i64 {18pub fn _alldiv(a: i64, b: i64) callconv(.{ .x86_stdcall = .{} }) i64 {
19 const s_a = a >> (64 - 1);19 const s_a = a >> (64 - 1);
20 const s_b = b >> (64 - 1);20 const s_b = b >> (64 - 1);
2121
...@@ -27,7 +27,7 @@ pub fn _alldiv(a: i64, b: i64) callconv(.Stdcall) i64 {...@@ -27,7 +27,7 @@ pub fn _alldiv(a: i64, b: i64) callconv(.Stdcall) i64 {
27 return (@as(i64, @bitCast(r)) ^ s) -% s;27 return (@as(i64, @bitCast(r)) ^ s) -% s;
28}28}
2929
30pub fn _aulldiv() callconv(.Naked) void {30pub fn _aulldiv() callconv(.naked) void {
31 @setRuntimeSafety(false);31 @setRuntimeSafety(false);
3232
33 // The stack layout is:33 // The stack layout is:
lib/compiler_rt/aullrem.zig+2-2
...@@ -15,7 +15,7 @@ comptime {...@@ -15,7 +15,7 @@ comptime {
15 }15 }
16}16}
1717
18pub fn _allrem(a: i64, b: i64) callconv(.Stdcall) i64 {18pub fn _allrem(a: i64, b: i64) callconv(.{ .x86_stdcall = .{} }) i64 {
19 const s_a = a >> (64 - 1);19 const s_a = a >> (64 - 1);
20 const s_b = b >> (64 - 1);20 const s_b = b >> (64 - 1);
2121
...@@ -27,7 +27,7 @@ pub fn _allrem(a: i64, b: i64) callconv(.Stdcall) i64 {...@@ -27,7 +27,7 @@ pub fn _allrem(a: i64, b: i64) callconv(.Stdcall) i64 {
27 return (@as(i64, @bitCast(r)) ^ s) -% s;27 return (@as(i64, @bitCast(r)) ^ s) -% s;
28}28}
2929
30pub fn _aullrem() callconv(.Naked) void {30pub fn _aullrem() callconv(.naked) void {
31 @setRuntimeSafety(false);31 @setRuntimeSafety(false);
3232
33 // The stack layout is:33 // The stack layout is:
lib/compiler_rt/bcmp.zig+1-1
...@@ -5,7 +5,7 @@ comptime {...@@ -5,7 +5,7 @@ comptime {
5 @export(&bcmp, .{ .name = "bcmp", .linkage = common.linkage, .visibility = common.visibility });5 @export(&bcmp, .{ .name = "bcmp", .linkage = common.linkage, .visibility = common.visibility });
6}6}
77
8pub fn bcmp(vl: [*]allowzero const u8, vr: [*]allowzero const u8, n: usize) callconv(.C) c_int {8pub fn bcmp(vl: [*]allowzero const u8, vr: [*]allowzero const u8, n: usize) callconv(.c) c_int {
9 @setRuntimeSafety(false);9 @setRuntimeSafety(false);
1010
11 var index: usize = 0;11 var index: usize = 0;
lib/compiler_rt/bitreverse.zig+3-3
...@@ -46,15 +46,15 @@ inline fn bitreverseXi2(comptime T: type, a: T) T {...@@ -46,15 +46,15 @@ inline fn bitreverseXi2(comptime T: type, a: T) T {
46 }46 }
47}47}
4848
49pub fn __bitreversesi2(a: u32) callconv(.C) u32 {49pub fn __bitreversesi2(a: u32) callconv(.c) u32 {
50 return bitreverseXi2(u32, a);50 return bitreverseXi2(u32, a);
51}51}
5252
53pub fn __bitreversedi2(a: u64) callconv(.C) u64 {53pub fn __bitreversedi2(a: u64) callconv(.c) u64 {
54 return bitreverseXi2(u64, a);54 return bitreverseXi2(u64, a);
55}55}
5656
57pub fn __bitreverseti2(a: u128) callconv(.C) u128 {57pub fn __bitreverseti2(a: u128) callconv(.c) u128 {
58 return bitreverseXi2(u128, a);58 return bitreverseXi2(u128, a);
59}59}
6060
lib/compiler_rt/bswap.zig+3-3
...@@ -66,15 +66,15 @@ inline fn bswapXi2(comptime T: type, a: T) T {...@@ -66,15 +66,15 @@ inline fn bswapXi2(comptime T: type, a: T) T {
66 }66 }
67}67}
6868
69pub fn __bswapsi2(a: u32) callconv(.C) u32 {69pub fn __bswapsi2(a: u32) callconv(.c) u32 {
70 return bswapXi2(u32, a);70 return bswapXi2(u32, a);
71}71}
7272
73pub fn __bswapdi2(a: u64) callconv(.C) u64 {73pub fn __bswapdi2(a: u64) callconv(.c) u64 {
74 return bswapXi2(u64, a);74 return bswapXi2(u64, a);
75}75}
7676
77pub fn __bswapti2(a: u128) callconv(.C) u128 {77pub fn __bswapti2(a: u128) callconv(.c) u128 {
78 return bswapXi2(u128, a);78 return bswapXi2(u128, a);
79}79}
8080
lib/compiler_rt/ceil.zig+6-6
...@@ -26,12 +26,12 @@ comptime {...@@ -26,12 +26,12 @@ comptime {
26 @export(&ceill, .{ .name = "ceill", .linkage = common.linkage, .visibility = common.visibility });26 @export(&ceill, .{ .name = "ceill", .linkage = common.linkage, .visibility = common.visibility });
27}27}
2828
29pub fn __ceilh(x: f16) callconv(.C) f16 {29pub fn __ceilh(x: f16) callconv(.c) f16 {
30 // TODO: more efficient implementation30 // TODO: more efficient implementation
31 return @floatCast(ceilf(x));31 return @floatCast(ceilf(x));
32}32}
3333
34pub fn ceilf(x: f32) callconv(.C) f32 {34pub fn ceilf(x: f32) callconv(.c) f32 {
35 var u: u32 = @bitCast(x);35 var u: u32 = @bitCast(x);
36 const e = @as(i32, @intCast((u >> 23) & 0xFF)) - 0x7F;36 const e = @as(i32, @intCast((u >> 23) & 0xFF)) - 0x7F;
37 var m: u32 = undefined;37 var m: u32 = undefined;
...@@ -64,7 +64,7 @@ pub fn ceilf(x: f32) callconv(.C) f32 {...@@ -64,7 +64,7 @@ pub fn ceilf(x: f32) callconv(.C) f32 {
64 }64 }
65}65}
6666
67pub fn ceil(x: f64) callconv(.C) f64 {67pub fn ceil(x: f64) callconv(.c) f64 {
68 const f64_toint = 1.0 / math.floatEps(f64);68 const f64_toint = 1.0 / math.floatEps(f64);
6969
70 const u: u64 = @bitCast(x);70 const u: u64 = @bitCast(x);
...@@ -95,12 +95,12 @@ pub fn ceil(x: f64) callconv(.C) f64 {...@@ -95,12 +95,12 @@ pub fn ceil(x: f64) callconv(.C) f64 {
95 }95 }
96}96}
9797
98pub fn __ceilx(x: f80) callconv(.C) f80 {98pub fn __ceilx(x: f80) callconv(.c) f80 {
99 // TODO: more efficient implementation99 // TODO: more efficient implementation
100 return @floatCast(ceilq(x));100 return @floatCast(ceilq(x));
101}101}
102102
103pub fn ceilq(x: f128) callconv(.C) f128 {103pub fn ceilq(x: f128) callconv(.c) f128 {
104 const f128_toint = 1.0 / math.floatEps(f128);104 const f128_toint = 1.0 / math.floatEps(f128);
105105
106 const u: u128 = @bitCast(x);106 const u: u128 = @bitCast(x);
...@@ -129,7 +129,7 @@ pub fn ceilq(x: f128) callconv(.C) f128 {...@@ -129,7 +129,7 @@ pub fn ceilq(x: f128) callconv(.C) f128 {
129 }129 }
130}130}
131131
132pub fn ceill(x: c_longdouble) callconv(.C) c_longdouble {132pub fn ceill(x: c_longdouble) callconv(.c) c_longdouble {
133 switch (@typeInfo(c_longdouble).float.bits) {133 switch (@typeInfo(c_longdouble).float.bits) {
134 16 => return __ceilh(x),134 16 => return __ceilh(x),
135 32 => return ceilf(x),135 32 => return ceilf(x),
lib/compiler_rt/clear_cache.zig+1-1
...@@ -15,7 +15,7 @@ comptime {...@@ -15,7 +15,7 @@ comptime {
15 _ = &clear_cache;15 _ = &clear_cache;
16}16}
1717
18fn clear_cache(start: usize, end: usize) callconv(.C) void {18fn clear_cache(start: usize, end: usize) callconv(.c) void {
19 const x86 = switch (arch) {19 const x86 = switch (arch) {
20 .x86, .x86_64 => true,20 .x86, .x86_64 => true,
21 else => false,21 else => false,
lib/compiler_rt/clzsi2_test.zig+1-1
...@@ -4,7 +4,7 @@ const testing = @import("std").testing;...@@ -4,7 +4,7 @@ const testing = @import("std").testing;
44
5fn test__clzsi2(a: u32, expected: i32) !void {5fn test__clzsi2(a: u32, expected: i32) !void {
6 const nakedClzsi2 = clz.__clzsi2;6 const nakedClzsi2 = clz.__clzsi2;
7 const actualClzsi2 = @as(*const fn (a: i32) callconv(.C) i32, @ptrCast(&nakedClzsi2));7 const actualClzsi2 = @as(*const fn (a: i32) callconv(.c) i32, @ptrCast(&nakedClzsi2));
8 const x: i32 = @bitCast(a);8 const x: i32 = @bitCast(a);
9 const result = actualClzsi2(x);9 const result = actualClzsi2(x);
10 try testing.expectEqual(expected, result);10 try testing.expectEqual(expected, result);
lib/compiler_rt/cmp.zig+6-6
...@@ -34,27 +34,27 @@ inline fn XcmpXi2(comptime T: type, a: T, b: T) i32 {...@@ -34,27 +34,27 @@ inline fn XcmpXi2(comptime T: type, a: T, b: T) i32 {
34 return cmp1 - cmp2 + 1;34 return cmp1 - cmp2 + 1;
35}35}
3636
37pub fn __cmpsi2(a: i32, b: i32) callconv(.C) i32 {37pub fn __cmpsi2(a: i32, b: i32) callconv(.c) i32 {
38 return XcmpXi2(i32, a, b);38 return XcmpXi2(i32, a, b);
39}39}
4040
41pub fn __cmpdi2(a: i64, b: i64) callconv(.C) i32 {41pub fn __cmpdi2(a: i64, b: i64) callconv(.c) i32 {
42 return XcmpXi2(i64, a, b);42 return XcmpXi2(i64, a, b);
43}43}
4444
45pub fn __cmpti2(a: i128, b: i128) callconv(.C) i32 {45pub fn __cmpti2(a: i128, b: i128) callconv(.c) i32 {
46 return XcmpXi2(i128, a, b);46 return XcmpXi2(i128, a, b);
47}47}
4848
49pub fn __ucmpsi2(a: u32, b: u32) callconv(.C) i32 {49pub fn __ucmpsi2(a: u32, b: u32) callconv(.c) i32 {
50 return XcmpXi2(u32, a, b);50 return XcmpXi2(u32, a, b);
51}51}
5252
53pub fn __ucmpdi2(a: u64, b: u64) callconv(.C) i32 {53pub fn __ucmpdi2(a: u64, b: u64) callconv(.c) i32 {
54 return XcmpXi2(u64, a, b);54 return XcmpXi2(u64, a, b);
55}55}
5656
57pub fn __ucmpti2(a: u128, b: u128) callconv(.C) i32 {57pub fn __ucmpti2(a: u128, b: u128) callconv(.c) i32 {
58 return XcmpXi2(u128, a, b);58 return XcmpXi2(u128, a, b);
59}59}
6060
lib/compiler_rt/cmpdf2.zig+8-8
...@@ -25,44 +25,44 @@ comptime {...@@ -25,44 +25,44 @@ comptime {
25///25///
26/// Note that this matches the definition of `__ledf2`, `__eqdf2`, `__nedf2`, `__cmpdf2`,26/// Note that this matches the definition of `__ledf2`, `__eqdf2`, `__nedf2`, `__cmpdf2`,
27/// and `__ltdf2`.27/// and `__ltdf2`.
28fn __cmpdf2(a: f64, b: f64) callconv(.C) i32 {28fn __cmpdf2(a: f64, b: f64) callconv(.c) i32 {
29 return @intFromEnum(comparef.cmpf2(f64, comparef.LE, a, b));29 return @intFromEnum(comparef.cmpf2(f64, comparef.LE, a, b));
30}30}
3131
32/// "These functions return a value less than or equal to zero if neither argument is NaN,32/// "These functions return a value less than or equal to zero if neither argument is NaN,
33/// and a is less than or equal to b."33/// and a is less than or equal to b."
34pub fn __ledf2(a: f64, b: f64) callconv(.C) i32 {34pub fn __ledf2(a: f64, b: f64) callconv(.c) i32 {
35 return __cmpdf2(a, b);35 return __cmpdf2(a, b);
36}36}
3737
38/// "These functions return zero if neither argument is NaN, and a and b are equal."38/// "These functions return zero if neither argument is NaN, and a and b are equal."
39/// Note that due to some kind of historical accident, __eqdf2 and __nedf2 are defined39/// Note that due to some kind of historical accident, __eqdf2 and __nedf2 are defined
40/// to have the same return value.40/// to have the same return value.
41pub fn __eqdf2(a: f64, b: f64) callconv(.C) i32 {41pub fn __eqdf2(a: f64, b: f64) callconv(.c) i32 {
42 return __cmpdf2(a, b);42 return __cmpdf2(a, b);
43}43}
4444
45/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."45/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."
46/// Note that due to some kind of historical accident, __eqdf2 and __nedf2 are defined46/// Note that due to some kind of historical accident, __eqdf2 and __nedf2 are defined
47/// to have the same return value.47/// to have the same return value.
48pub fn __nedf2(a: f64, b: f64) callconv(.C) i32 {48pub fn __nedf2(a: f64, b: f64) callconv(.c) i32 {
49 return __cmpdf2(a, b);49 return __cmpdf2(a, b);
50}50}
5151
52/// "These functions return a value less than zero if neither argument is NaN, and a52/// "These functions return a value less than zero if neither argument is NaN, and a
53/// is strictly less than b."53/// is strictly less than b."
54pub fn __ltdf2(a: f64, b: f64) callconv(.C) i32 {54pub fn __ltdf2(a: f64, b: f64) callconv(.c) i32 {
55 return __cmpdf2(a, b);55 return __cmpdf2(a, b);
56}56}
5757
58fn __aeabi_dcmpeq(a: f64, b: f64) callconv(.AAPCS) i32 {58fn __aeabi_dcmpeq(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 {
59 return @intFromBool(comparef.cmpf2(f64, comparef.LE, a, b) == .Equal);59 return @intFromBool(comparef.cmpf2(f64, comparef.LE, a, b) == .Equal);
60}60}
6161
62fn __aeabi_dcmplt(a: f64, b: f64) callconv(.AAPCS) i32 {62fn __aeabi_dcmplt(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 {
63 return @intFromBool(comparef.cmpf2(f64, comparef.LE, a, b) == .Less);63 return @intFromBool(comparef.cmpf2(f64, comparef.LE, a, b) == .Less);
64}64}
6565
66fn __aeabi_dcmple(a: f64, b: f64) callconv(.AAPCS) i32 {66fn __aeabi_dcmple(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 {
67 return @intFromBool(comparef.cmpf2(f64, comparef.LE, a, b) != .Greater);67 return @intFromBool(comparef.cmpf2(f64, comparef.LE, a, b) != .Greater);
68}68}
lib/compiler_rt/cmphf2.zig+5-5
...@@ -19,32 +19,32 @@ comptime {...@@ -19,32 +19,32 @@ comptime {
19///19///
20/// Note that this matches the definition of `__lehf2`, `__eqhf2`, `__nehf2`, `__cmphf2`,20/// Note that this matches the definition of `__lehf2`, `__eqhf2`, `__nehf2`, `__cmphf2`,
21/// and `__lthf2`.21/// and `__lthf2`.
22fn __cmphf2(a: f16, b: f16) callconv(.C) i32 {22fn __cmphf2(a: f16, b: f16) callconv(.c) i32 {
23 return @intFromEnum(comparef.cmpf2(f16, comparef.LE, a, b));23 return @intFromEnum(comparef.cmpf2(f16, comparef.LE, a, b));
24}24}
2525
26/// "These functions return a value less than or equal to zero if neither argument is NaN,26/// "These functions return a value less than or equal to zero if neither argument is NaN,
27/// and a is less than or equal to b."27/// and a is less than or equal to b."
28pub fn __lehf2(a: f16, b: f16) callconv(.C) i32 {28pub fn __lehf2(a: f16, b: f16) callconv(.c) i32 {
29 return __cmphf2(a, b);29 return __cmphf2(a, b);
30}30}
3131
32/// "These functions return zero if neither argument is NaN, and a and b are equal."32/// "These functions return zero if neither argument is NaN, and a and b are equal."
33/// Note that due to some kind of historical accident, __eqhf2 and __nehf2 are defined33/// Note that due to some kind of historical accident, __eqhf2 and __nehf2 are defined
34/// to have the same return value.34/// to have the same return value.
35pub fn __eqhf2(a: f16, b: f16) callconv(.C) i32 {35pub fn __eqhf2(a: f16, b: f16) callconv(.c) i32 {
36 return __cmphf2(a, b);36 return __cmphf2(a, b);
37}37}
3838
39/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."39/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."
40/// Note that due to some kind of historical accident, __eqhf2 and __nehf2 are defined40/// Note that due to some kind of historical accident, __eqhf2 and __nehf2 are defined
41/// to have the same return value.41/// to have the same return value.
42pub fn __nehf2(a: f16, b: f16) callconv(.C) i32 {42pub fn __nehf2(a: f16, b: f16) callconv(.c) i32 {
43 return __cmphf2(a, b);43 return __cmphf2(a, b);
44}44}
4545
46/// "These functions return a value less than zero if neither argument is NaN, and a46/// "These functions return a value less than zero if neither argument is NaN, and a
47/// is strictly less than b."47/// is strictly less than b."
48pub fn __lthf2(a: f16, b: f16) callconv(.C) i32 {48pub fn __lthf2(a: f16, b: f16) callconv(.c) i32 {
49 return __cmphf2(a, b);49 return __cmphf2(a, b);
50}50}
lib/compiler_rt/cmpsf2.zig+8-8
...@@ -25,44 +25,44 @@ comptime {...@@ -25,44 +25,44 @@ comptime {
25///25///
26/// Note that this matches the definition of `__lesf2`, `__eqsf2`, `__nesf2`, `__cmpsf2`,26/// Note that this matches the definition of `__lesf2`, `__eqsf2`, `__nesf2`, `__cmpsf2`,
27/// and `__ltsf2`.27/// and `__ltsf2`.
28fn __cmpsf2(a: f32, b: f32) callconv(.C) i32 {28fn __cmpsf2(a: f32, b: f32) callconv(.c) i32 {
29 return @intFromEnum(comparef.cmpf2(f32, comparef.LE, a, b));29 return @intFromEnum(comparef.cmpf2(f32, comparef.LE, a, b));
30}30}
3131
32/// "These functions return a value less than or equal to zero if neither argument is NaN,32/// "These functions return a value less than or equal to zero if neither argument is NaN,
33/// and a is less than or equal to b."33/// and a is less than or equal to b."
34pub fn __lesf2(a: f32, b: f32) callconv(.C) i32 {34pub fn __lesf2(a: f32, b: f32) callconv(.c) i32 {
35 return __cmpsf2(a, b);35 return __cmpsf2(a, b);
36}36}
3737
38/// "These functions return zero if neither argument is NaN, and a and b are equal."38/// "These functions return zero if neither argument is NaN, and a and b are equal."
39/// Note that due to some kind of historical accident, __eqsf2 and __nesf2 are defined39/// Note that due to some kind of historical accident, __eqsf2 and __nesf2 are defined
40/// to have the same return value.40/// to have the same return value.
41pub fn __eqsf2(a: f32, b: f32) callconv(.C) i32 {41pub fn __eqsf2(a: f32, b: f32) callconv(.c) i32 {
42 return __cmpsf2(a, b);42 return __cmpsf2(a, b);
43}43}
4444
45/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."45/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."
46/// Note that due to some kind of historical accident, __eqsf2 and __nesf2 are defined46/// Note that due to some kind of historical accident, __eqsf2 and __nesf2 are defined
47/// to have the same return value.47/// to have the same return value.
48pub fn __nesf2(a: f32, b: f32) callconv(.C) i32 {48pub fn __nesf2(a: f32, b: f32) callconv(.c) i32 {
49 return __cmpsf2(a, b);49 return __cmpsf2(a, b);
50}50}
5151
52/// "These functions return a value less than zero if neither argument is NaN, and a52/// "These functions return a value less than zero if neither argument is NaN, and a
53/// is strictly less than b."53/// is strictly less than b."
54pub fn __ltsf2(a: f32, b: f32) callconv(.C) i32 {54pub fn __ltsf2(a: f32, b: f32) callconv(.c) i32 {
55 return __cmpsf2(a, b);55 return __cmpsf2(a, b);
56}56}
5757
58fn __aeabi_fcmpeq(a: f32, b: f32) callconv(.AAPCS) i32 {58fn __aeabi_fcmpeq(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 {
59 return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) == .Equal);59 return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) == .Equal);
60}60}
6161
62fn __aeabi_fcmplt(a: f32, b: f32) callconv(.AAPCS) i32 {62fn __aeabi_fcmplt(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 {
63 return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) == .Less);63 return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) == .Less);
64}64}
6565
66fn __aeabi_fcmple(a: f32, b: f32) callconv(.AAPCS) i32 {66fn __aeabi_fcmple(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 {
67 return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) != .Greater);67 return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) != .Greater);
68}68}
lib/compiler_rt/cmptf2.zig+12-12
...@@ -33,33 +33,33 @@ comptime {...@@ -33,33 +33,33 @@ comptime {
33///33///
34/// Note that this matches the definition of `__letf2`, `__eqtf2`, `__netf2`, `__cmptf2`,34/// Note that this matches the definition of `__letf2`, `__eqtf2`, `__netf2`, `__cmptf2`,
35/// and `__lttf2`.35/// and `__lttf2`.
36fn __cmptf2(a: f128, b: f128) callconv(.C) i32 {36fn __cmptf2(a: f128, b: f128) callconv(.c) i32 {
37 return @intFromEnum(comparef.cmpf2(f128, comparef.LE, a, b));37 return @intFromEnum(comparef.cmpf2(f128, comparef.LE, a, b));
38}38}
3939
40/// "These functions return a value less than or equal to zero if neither argument is NaN,40/// "These functions return a value less than or equal to zero if neither argument is NaN,
41/// and a is less than or equal to b."41/// and a is less than or equal to b."
42fn __letf2(a: f128, b: f128) callconv(.C) i32 {42fn __letf2(a: f128, b: f128) callconv(.c) i32 {
43 return __cmptf2(a, b);43 return __cmptf2(a, b);
44}44}
4545
46/// "These functions return zero if neither argument is NaN, and a and b are equal."46/// "These functions return zero if neither argument is NaN, and a and b are equal."
47/// Note that due to some kind of historical accident, __eqtf2 and __netf2 are defined47/// Note that due to some kind of historical accident, __eqtf2 and __netf2 are defined
48/// to have the same return value.48/// to have the same return value.
49fn __eqtf2(a: f128, b: f128) callconv(.C) i32 {49fn __eqtf2(a: f128, b: f128) callconv(.c) i32 {
50 return __cmptf2(a, b);50 return __cmptf2(a, b);
51}51}
5252
53/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."53/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."
54/// Note that due to some kind of historical accident, __eqtf2 and __netf2 are defined54/// Note that due to some kind of historical accident, __eqtf2 and __netf2 are defined
55/// to have the same return value.55/// to have the same return value.
56fn __netf2(a: f128, b: f128) callconv(.C) i32 {56fn __netf2(a: f128, b: f128) callconv(.c) i32 {
57 return __cmptf2(a, b);57 return __cmptf2(a, b);
58}58}
5959
60/// "These functions return a value less than zero if neither argument is NaN, and a60/// "These functions return a value less than zero if neither argument is NaN, and a
61/// is strictly less than b."61/// is strictly less than b."
62fn __lttf2(a: f128, b: f128) callconv(.C) i32 {62fn __lttf2(a: f128, b: f128) callconv(.c) i32 {
63 return __cmptf2(a, b);63 return __cmptf2(a, b);
64}64}
6565
...@@ -70,34 +70,34 @@ const SparcFCMP = enum(i32) {...@@ -70,34 +70,34 @@ const SparcFCMP = enum(i32) {
70 Unordered = 3,70 Unordered = 3,
71};71};
7272
73fn _Qp_cmp(a: *const f128, b: *const f128) callconv(.C) i32 {73fn _Qp_cmp(a: *const f128, b: *const f128) callconv(.c) i32 {
74 return @intFromEnum(comparef.cmpf2(f128, SparcFCMP, a.*, b.*));74 return @intFromEnum(comparef.cmpf2(f128, SparcFCMP, a.*, b.*));
75}75}
7676
77fn _Qp_feq(a: *const f128, b: *const f128) callconv(.C) bool {77fn _Qp_feq(a: *const f128, b: *const f128) callconv(.c) bool {
78 return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) == .Equal;78 return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) == .Equal;
79}79}
8080
81fn _Qp_fne(a: *const f128, b: *const f128) callconv(.C) bool {81fn _Qp_fne(a: *const f128, b: *const f128) callconv(.c) bool {
82 return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) != .Equal;82 return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) != .Equal;
83}83}
8484
85fn _Qp_flt(a: *const f128, b: *const f128) callconv(.C) bool {85fn _Qp_flt(a: *const f128, b: *const f128) callconv(.c) bool {
86 return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) == .Less;86 return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) == .Less;
87}87}
8888
89fn _Qp_fgt(a: *const f128, b: *const f128) callconv(.C) bool {89fn _Qp_fgt(a: *const f128, b: *const f128) callconv(.c) bool {
90 return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) == .Greater;90 return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) == .Greater;
91}91}
9292
93fn _Qp_fge(a: *const f128, b: *const f128) callconv(.C) bool {93fn _Qp_fge(a: *const f128, b: *const f128) callconv(.c) bool {
94 return switch (@as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b)))) {94 return switch (@as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b)))) {
95 .Equal, .Greater => true,95 .Equal, .Greater => true,
96 .Less, .Unordered => false,96 .Less, .Unordered => false,
97 };97 };
98}98}
9999
100fn _Qp_fle(a: *const f128, b: *const f128) callconv(.C) bool {100fn _Qp_fle(a: *const f128, b: *const f128) callconv(.c) bool {
101 return switch (@as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b)))) {101 return switch (@as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b)))) {
102 .Equal, .Less => true,102 .Equal, .Less => true,
103 .Greater, .Unordered => false,103 .Greater, .Unordered => false,
lib/compiler_rt/cmpxf2.zig+5-5
...@@ -19,32 +19,32 @@ comptime {...@@ -19,32 +19,32 @@ comptime {
19///19///
20/// Note that this matches the definition of `__lexf2`, `__eqxf2`, `__nexf2`, `__cmpxf2`,20/// Note that this matches the definition of `__lexf2`, `__eqxf2`, `__nexf2`, `__cmpxf2`,
21/// and `__ltxf2`.21/// and `__ltxf2`.
22fn __cmpxf2(a: f80, b: f80) callconv(.C) i32 {22fn __cmpxf2(a: f80, b: f80) callconv(.c) i32 {
23 return @intFromEnum(comparef.cmp_f80(comparef.LE, a, b));23 return @intFromEnum(comparef.cmp_f80(comparef.LE, a, b));
24}24}
2525
26/// "These functions return a value less than or equal to zero if neither argument is NaN,26/// "These functions return a value less than or equal to zero if neither argument is NaN,
27/// and a is less than or equal to b."27/// and a is less than or equal to b."
28fn __lexf2(a: f80, b: f80) callconv(.C) i32 {28fn __lexf2(a: f80, b: f80) callconv(.c) i32 {
29 return __cmpxf2(a, b);29 return __cmpxf2(a, b);
30}30}
3131
32/// "These functions return zero if neither argument is NaN, and a and b are equal."32/// "These functions return zero if neither argument is NaN, and a and b are equal."
33/// Note that due to some kind of historical accident, __eqxf2 and __nexf2 are defined33/// Note that due to some kind of historical accident, __eqxf2 and __nexf2 are defined
34/// to have the same return value.34/// to have the same return value.
35fn __eqxf2(a: f80, b: f80) callconv(.C) i32 {35fn __eqxf2(a: f80, b: f80) callconv(.c) i32 {
36 return __cmpxf2(a, b);36 return __cmpxf2(a, b);
37}37}
3838
39/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."39/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."
40/// Note that due to some kind of historical accident, __eqxf2 and __nexf2 are defined40/// Note that due to some kind of historical accident, __eqxf2 and __nexf2 are defined
41/// to have the same return value.41/// to have the same return value.
42fn __nexf2(a: f80, b: f80) callconv(.C) i32 {42fn __nexf2(a: f80, b: f80) callconv(.c) i32 {
43 return __cmpxf2(a, b);43 return __cmpxf2(a, b);
44}44}
4545
46/// "These functions return a value less than zero if neither argument is NaN, and a46/// "These functions return a value less than zero if neither argument is NaN, and a
47/// is strictly less than b."47/// is strictly less than b."
48fn __ltxf2(a: f80, b: f80) callconv(.C) i32 {48fn __ltxf2(a: f80, b: f80) callconv(.c) i32 {
49 return __cmpxf2(a, b);49 return __cmpxf2(a, b);
50}50}
lib/compiler_rt/cos.zig+6-6
...@@ -22,12 +22,12 @@ comptime {...@@ -22,12 +22,12 @@ comptime {
22 @export(&cosl, .{ .name = "cosl", .linkage = common.linkage, .visibility = common.visibility });22 @export(&cosl, .{ .name = "cosl", .linkage = common.linkage, .visibility = common.visibility });
23}23}
2424
25pub fn __cosh(a: f16) callconv(.C) f16 {25pub fn __cosh(a: f16) callconv(.c) f16 {
26 // TODO: more efficient implementation26 // TODO: more efficient implementation
27 return @floatCast(cosf(a));27 return @floatCast(cosf(a));
28}28}
2929
30pub fn cosf(x: f32) callconv(.C) f32 {30pub fn cosf(x: f32) callconv(.c) f32 {
31 // Small multiples of pi/2 rounded to double precision.31 // Small multiples of pi/2 rounded to double precision.
32 const c1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D1832 const c1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18
33 const c2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D1833 const c2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18
...@@ -84,7 +84,7 @@ pub fn cosf(x: f32) callconv(.C) f32 {...@@ -84,7 +84,7 @@ pub fn cosf(x: f32) callconv(.C) f32 {
84 };84 };
85}85}
8686
87pub fn cos(x: f64) callconv(.C) f64 {87pub fn cos(x: f64) callconv(.c) f64 {
88 var ix = @as(u64, @bitCast(x)) >> 32;88 var ix = @as(u64, @bitCast(x)) >> 32;
89 ix &= 0x7fffffff;89 ix &= 0x7fffffff;
9090
...@@ -113,17 +113,17 @@ pub fn cos(x: f64) callconv(.C) f64 {...@@ -113,17 +113,17 @@ pub fn cos(x: f64) callconv(.C) f64 {
113 };113 };
114}114}
115115
116pub fn __cosx(a: f80) callconv(.C) f80 {116pub fn __cosx(a: f80) callconv(.c) f80 {
117 // TODO: more efficient implementation117 // TODO: more efficient implementation
118 return @floatCast(cosq(a));118 return @floatCast(cosq(a));
119}119}
120120
121pub fn cosq(a: f128) callconv(.C) f128 {121pub fn cosq(a: f128) callconv(.c) f128 {
122 // TODO: more correct implementation122 // TODO: more correct implementation
123 return cos(@floatCast(a));123 return cos(@floatCast(a));
124}124}
125125
126pub fn cosl(x: c_longdouble) callconv(.C) c_longdouble {126pub fn cosl(x: c_longdouble) callconv(.c) c_longdouble {
127 switch (@typeInfo(c_longdouble).float.bits) {127 switch (@typeInfo(c_longdouble).float.bits) {
128 16 => return __cosh(x),128 16 => return __cosh(x),
129 32 => return cosf(x),129 32 => return cosf(x),
lib/compiler_rt/count0bits.zig+11-11
...@@ -52,7 +52,7 @@ inline fn clzXi2(comptime T: type, a: T) i32 {...@@ -52,7 +52,7 @@ inline fn clzXi2(comptime T: type, a: T) i32 {
52 return @intCast(n - @as(T, @bitCast(x)));52 return @intCast(n - @as(T, @bitCast(x)));
53}53}
5454
55fn __clzsi2_thumb1() callconv(.Naked) void {55fn __clzsi2_thumb1() callconv(.naked) void {
56 @setRuntimeSafety(false);56 @setRuntimeSafety(false);
5757
58 // Similar to the generic version with the last two rounds replaced by a LUT58 // Similar to the generic version with the last two rounds replaced by a LUT
...@@ -86,7 +86,7 @@ fn __clzsi2_thumb1() callconv(.Naked) void {...@@ -86,7 +86,7 @@ fn __clzsi2_thumb1() callconv(.Naked) void {
86 unreachable;86 unreachable;
87}87}
8888
89fn __clzsi2_arm32() callconv(.Naked) void {89fn __clzsi2_arm32() callconv(.naked) void {
90 @setRuntimeSafety(false);90 @setRuntimeSafety(false);
9191
92 asm volatile (92 asm volatile (
...@@ -135,7 +135,7 @@ fn __clzsi2_arm32() callconv(.Naked) void {...@@ -135,7 +135,7 @@ fn __clzsi2_arm32() callconv(.Naked) void {
135 unreachable;135 unreachable;
136}136}
137137
138fn clzsi2_generic(a: i32) callconv(.C) i32 {138fn clzsi2_generic(a: i32) callconv(.c) i32 {
139 return clzXi2(i32, a);139 return clzXi2(i32, a);
140}140}
141141
...@@ -159,11 +159,11 @@ pub const __clzsi2 = switch (builtin.cpu.arch) {...@@ -159,11 +159,11 @@ pub const __clzsi2 = switch (builtin.cpu.arch) {
159 else => clzsi2_generic,159 else => clzsi2_generic,
160};160};
161161
162pub fn __clzdi2(a: i64) callconv(.C) i32 {162pub fn __clzdi2(a: i64) callconv(.c) i32 {
163 return clzXi2(i64, a);163 return clzXi2(i64, a);
164}164}
165165
166pub fn __clzti2(a: i128) callconv(.C) i32 {166pub fn __clzti2(a: i128) callconv(.c) i32 {
167 return clzXi2(i128, a);167 return clzXi2(i128, a);
168}168}
169169
...@@ -190,15 +190,15 @@ inline fn ctzXi2(comptime T: type, a: T) i32 {...@@ -190,15 +190,15 @@ inline fn ctzXi2(comptime T: type, a: T) i32 {
190 return @intCast(n - @as(T, @bitCast((x & 1))));190 return @intCast(n - @as(T, @bitCast((x & 1))));
191}191}
192192
193pub fn __ctzsi2(a: i32) callconv(.C) i32 {193pub fn __ctzsi2(a: i32) callconv(.c) i32 {
194 return ctzXi2(i32, a);194 return ctzXi2(i32, a);
195}195}
196196
197pub fn __ctzdi2(a: i64) callconv(.C) i32 {197pub fn __ctzdi2(a: i64) callconv(.c) i32 {
198 return ctzXi2(i64, a);198 return ctzXi2(i64, a);
199}199}
200200
201pub fn __ctzti2(a: i128) callconv(.C) i32 {201pub fn __ctzti2(a: i128) callconv(.c) i32 {
202 return ctzXi2(i128, a);202 return ctzXi2(i128, a);
203}203}
204204
...@@ -222,15 +222,15 @@ inline fn ffsXi2(comptime T: type, a: T) i32 {...@@ -222,15 +222,15 @@ inline fn ffsXi2(comptime T: type, a: T) i32 {
222 return @as(i32, @intCast(n - @as(T, @bitCast((x & 1))))) + 1;222 return @as(i32, @intCast(n - @as(T, @bitCast((x & 1))))) + 1;
223}223}
224224
225pub fn __ffssi2(a: i32) callconv(.C) i32 {225pub fn __ffssi2(a: i32) callconv(.c) i32 {
226 return ffsXi2(i32, a);226 return ffsXi2(i32, a);
227}227}
228228
229pub fn __ffsdi2(a: i64) callconv(.C) i32 {229pub fn __ffsdi2(a: i64) callconv(.c) i32 {
230 return ffsXi2(i64, a);230 return ffsXi2(i64, a);
231}231}
232232
233pub fn __ffsti2(a: i128) callconv(.C) i32 {233pub fn __ffsti2(a: i128) callconv(.c) i32 {
234 return ffsXi2(i128, a);234 return ffsXi2(i128, a);
235}235}
236236
lib/compiler_rt/divc3_test.zig+1-1
...@@ -17,7 +17,7 @@ test "divc3" {...@@ -17,7 +17,7 @@ test "divc3" {
17 try testDiv(f128, __divtc3);17 try testDiv(f128, __divtc3);
18}18}
1919
20fn testDiv(comptime T: type, comptime f: fn (T, T, T, T) callconv(.C) Complex(T)) !void {20fn testDiv(comptime T: type, comptime f: fn (T, T, T, T) callconv(.c) Complex(T)) !void {
21 {21 {
22 const a: T = 1.0;22 const a: T = 1.0;
23 const b: T = 0.0;23 const b: T = 0.0;
lib/compiler_rt/divdc3.zig+1-1
...@@ -8,6 +8,6 @@ comptime {...@@ -8,6 +8,6 @@ comptime {
8 }8 }
9}9}
1010
11pub fn __divdc3(a: f64, b: f64, c: f64, d: f64) callconv(.C) Complex(f64) {11pub fn __divdc3(a: f64, b: f64, c: f64, d: f64) callconv(.c) Complex(f64) {
12 return divc3.divc3(f64, a, b, c, d);12 return divc3.divc3(f64, a, b, c, d);
13}13}
lib/compiler_rt/divdf3.zig+2-2
...@@ -21,11 +21,11 @@ comptime {...@@ -21,11 +21,11 @@ comptime {
21 }21 }
22}22}
2323
24pub fn __divdf3(a: f64, b: f64) callconv(.C) f64 {24pub fn __divdf3(a: f64, b: f64) callconv(.c) f64 {
25 return div(a, b);25 return div(a, b);
26}26}
2727
28fn __aeabi_ddiv(a: f64, b: f64) callconv(.AAPCS) f64 {28fn __aeabi_ddiv(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 {
29 return div(a, b);29 return div(a, b);
30}30}
3131
lib/compiler_rt/divhc3.zig+1-1
...@@ -8,6 +8,6 @@ comptime {...@@ -8,6 +8,6 @@ comptime {
8 }8 }
9}9}
1010
11pub fn __divhc3(a: f16, b: f16, c: f16, d: f16) callconv(.C) Complex(f16) {11pub fn __divhc3(a: f16, b: f16, c: f16, d: f16) callconv(.c) Complex(f16) {
12 return divc3.divc3(f16, a, b, c, d);12 return divc3.divc3(f16, a, b, c, d);
13}13}
lib/compiler_rt/divhf3.zig+1-1
...@@ -5,7 +5,7 @@ comptime {...@@ -5,7 +5,7 @@ comptime {
5 @export(&__divhf3, .{ .name = "__divhf3", .linkage = common.linkage, .visibility = common.visibility });5 @export(&__divhf3, .{ .name = "__divhf3", .linkage = common.linkage, .visibility = common.visibility });
6}6}
77
8pub fn __divhf3(a: f16, b: f16) callconv(.C) f16 {8pub fn __divhf3(a: f16, b: f16) callconv(.c) f16 {
9 // TODO: more efficient implementation9 // TODO: more efficient implementation
10 return @floatCast(divsf3.__divsf3(a, b));10 return @floatCast(divsf3.__divsf3(a, b));
11}11}
lib/compiler_rt/divmodei4.zig+2-2
...@@ -33,7 +33,7 @@ fn divmod(q: ?[]u32, r: ?[]u32, u: []u32, v: []u32) !void {...@@ -33,7 +33,7 @@ fn divmod(q: ?[]u32, r: ?[]u32, u: []u32, v: []u32) !void {
33 if (r) |x| if (u_sign < 0) neg(x);33 if (r) |x| if (u_sign < 0) neg(x);
34}34}
3535
36pub fn __divei4(r_q: [*]u32, u_p: [*]u32, v_p: [*]u32, bits: usize) callconv(.C) void {36pub fn __divei4(r_q: [*]u32, u_p: [*]u32, v_p: [*]u32, bits: usize) callconv(.c) void {
37 @setRuntimeSafety(builtin.is_test);37 @setRuntimeSafety(builtin.is_test);
38 const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];38 const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];
39 const v = v_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];39 const v = v_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];
...@@ -41,7 +41,7 @@ pub fn __divei4(r_q: [*]u32, u_p: [*]u32, v_p: [*]u32, bits: usize) callconv(.C)...@@ -41,7 +41,7 @@ pub fn __divei4(r_q: [*]u32, u_p: [*]u32, v_p: [*]u32, bits: usize) callconv(.C)
41 @call(.always_inline, divmod, .{ q, null, u, v }) catch unreachable;41 @call(.always_inline, divmod, .{ q, null, u, v }) catch unreachable;
42}42}
4343
44pub fn __modei4(r_p: [*]u32, u_p: [*]u32, v_p: [*]u32, bits: usize) callconv(.C) void {44pub fn __modei4(r_p: [*]u32, u_p: [*]u32, v_p: [*]u32, bits: usize) callconv(.c) void {
45 @setRuntimeSafety(builtin.is_test);45 @setRuntimeSafety(builtin.is_test);
46 const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];46 const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];
47 const v = v_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];47 const v = v_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];
lib/compiler_rt/divsc3.zig+1-1
...@@ -8,6 +8,6 @@ comptime {...@@ -8,6 +8,6 @@ comptime {
8 }8 }
9}9}
1010
11pub fn __divsc3(a: f32, b: f32, c: f32, d: f32) callconv(.C) Complex(f32) {11pub fn __divsc3(a: f32, b: f32, c: f32, d: f32) callconv(.c) Complex(f32) {
12 return divc3.divc3(f32, a, b, c, d);12 return divc3.divc3(f32, a, b, c, d);
13}13}
lib/compiler_rt/divsf3.zig+2-2
...@@ -19,11 +19,11 @@ comptime {...@@ -19,11 +19,11 @@ comptime {
19 }19 }
20}20}
2121
22pub fn __divsf3(a: f32, b: f32) callconv(.C) f32 {22pub fn __divsf3(a: f32, b: f32) callconv(.c) f32 {
23 return div(a, b);23 return div(a, b);
24}24}
2525
26fn __aeabi_fdiv(a: f32, b: f32) callconv(.AAPCS) f32 {26fn __aeabi_fdiv(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 {
27 return div(a, b);27 return div(a, b);
28}28}
2929
lib/compiler_rt/divtc3.zig+1-1
...@@ -10,6 +10,6 @@ comptime {...@@ -10,6 +10,6 @@ comptime {
10 }10 }
11}11}
1212
13pub fn __divtc3(a: f128, b: f128, c: f128, d: f128) callconv(.C) Complex(f128) {13pub fn __divtc3(a: f128, b: f128, c: f128, d: f128) callconv(.c) Complex(f128) {
14 return divc3.divc3(f128, a, b, c, d);14 return divc3.divc3(f128, a, b, c, d);
15}15}
lib/compiler_rt/divtf3.zig+2-2
...@@ -16,11 +16,11 @@ comptime {...@@ -16,11 +16,11 @@ comptime {
16 @export(&__divtf3, .{ .name = "__divtf3", .linkage = common.linkage, .visibility = common.visibility });16 @export(&__divtf3, .{ .name = "__divtf3", .linkage = common.linkage, .visibility = common.visibility });
17}17}
1818
19pub fn __divtf3(a: f128, b: f128) callconv(.C) f128 {19pub fn __divtf3(a: f128, b: f128) callconv(.c) f128 {
20 return div(a, b);20 return div(a, b);
21}21}
2222
23fn _Qp_div(c: *f128, a: *const f128, b: *const f128) callconv(.C) void {23fn _Qp_div(c: *f128, a: *const f128, b: *const f128) callconv(.c) void {
24 c.* = div(a.*, b.*);24 c.* = div(a.*, b.*);
25}25}
2626
lib/compiler_rt/divti3.zig+2-2
...@@ -14,13 +14,13 @@ comptime {...@@ -14,13 +14,13 @@ comptime {
14 }14 }
15}15}
1616
17pub fn __divti3(a: i128, b: i128) callconv(.C) i128 {17pub fn __divti3(a: i128, b: i128) callconv(.c) i128 {
18 return div(a, b);18 return div(a, b);
19}19}
2020
21const v128 = @Vector(2, u64);21const v128 = @Vector(2, u64);
2222
23fn __divti3_windows_x86_64(a: v128, b: v128) callconv(.C) v128 {23fn __divti3_windows_x86_64(a: v128, b: v128) callconv(.c) v128 {
24 return @bitCast(div(@bitCast(a), @bitCast(b)));24 return @bitCast(div(@bitCast(a), @bitCast(b)));
25}25}
2626
lib/compiler_rt/divxc3.zig+1-1
...@@ -8,6 +8,6 @@ comptime {...@@ -8,6 +8,6 @@ comptime {
8 }8 }
9}9}
1010
11pub fn __divxc3(a: f80, b: f80, c: f80, d: f80) callconv(.C) Complex(f80) {11pub fn __divxc3(a: f80, b: f80, c: f80, d: f80) callconv(.c) Complex(f80) {
12 return divc3.divc3(f80, a, b, c, d);12 return divc3.divc3(f80, a, b, c, d);
13}13}
lib/compiler_rt/divxf3.zig+1-1
...@@ -12,7 +12,7 @@ comptime {...@@ -12,7 +12,7 @@ comptime {
12 @export(&__divxf3, .{ .name = "__divxf3", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__divxf3, .{ .name = "__divxf3", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __divxf3(a: f80, b: f80) callconv(.C) f80 {15pub fn __divxf3(a: f80, b: f80) callconv(.c) f80 {
16 const T = f80;16 const T = f80;
17 const Z = std.meta.Int(.unsigned, @bitSizeOf(T));17 const Z = std.meta.Int(.unsigned, @bitSizeOf(T));
1818
lib/compiler_rt/emutls.zig+2-2
...@@ -24,7 +24,7 @@ comptime {...@@ -24,7 +24,7 @@ comptime {
24}24}
2525
26/// public entrypoint for generated code using EmulatedTLS26/// public entrypoint for generated code using EmulatedTLS
27pub fn __emutls_get_address(control: *emutls_control) callconv(.C) *anyopaque {27pub fn __emutls_get_address(control: *emutls_control) callconv(.c) *anyopaque {
28 return control.getPointer();28 return control.getPointer();
29}29}
3030
...@@ -191,7 +191,7 @@ const current_thread_storage = struct {...@@ -191,7 +191,7 @@ const current_thread_storage = struct {
191 }191 }
192192
193 /// Invoked by pthread specific destructor. the passed argument is the ObjectArray pointer.193 /// Invoked by pthread specific destructor. the passed argument is the ObjectArray pointer.
194 fn deinit(arrayPtr: *anyopaque) callconv(.C) void {194 fn deinit(arrayPtr: *anyopaque) callconv(.c) void {
195 var array: *ObjectArray = @ptrCast(@alignCast(arrayPtr));195 var array: *ObjectArray = @ptrCast(@alignCast(arrayPtr));
196 array.deinit();196 array.deinit();
197 }197 }
lib/compiler_rt/exp.zig+6-6
...@@ -26,12 +26,12 @@ comptime {...@@ -26,12 +26,12 @@ comptime {
26 @export(&expl, .{ .name = "expl", .linkage = common.linkage, .visibility = common.visibility });26 @export(&expl, .{ .name = "expl", .linkage = common.linkage, .visibility = common.visibility });
27}27}
2828
29pub fn __exph(a: f16) callconv(.C) f16 {29pub fn __exph(a: f16) callconv(.c) f16 {
30 // TODO: more efficient implementation30 // TODO: more efficient implementation
31 return @floatCast(expf(a));31 return @floatCast(expf(a));
32}32}
3333
34pub fn expf(x_: f32) callconv(.C) f32 {34pub fn expf(x_: f32) callconv(.c) f32 {
35 const half = [_]f32{ 0.5, -0.5 };35 const half = [_]f32{ 0.5, -0.5 };
36 const ln2hi = 6.9314575195e-1;36 const ln2hi = 6.9314575195e-1;
37 const ln2lo = 1.4286067653e-6;37 const ln2lo = 1.4286067653e-6;
...@@ -106,7 +106,7 @@ pub fn expf(x_: f32) callconv(.C) f32 {...@@ -106,7 +106,7 @@ pub fn expf(x_: f32) callconv(.C) f32 {
106 }106 }
107}107}
108108
109pub fn exp(x_: f64) callconv(.C) f64 {109pub fn exp(x_: f64) callconv(.c) f64 {
110 const half = [_]f64{ 0.5, -0.5 };110 const half = [_]f64{ 0.5, -0.5 };
111 const ln2hi: f64 = 6.93147180369123816490e-01;111 const ln2hi: f64 = 6.93147180369123816490e-01;
112 const ln2lo: f64 = 1.90821492927058770002e-10;112 const ln2lo: f64 = 1.90821492927058770002e-10;
...@@ -190,17 +190,17 @@ pub fn exp(x_: f64) callconv(.C) f64 {...@@ -190,17 +190,17 @@ pub fn exp(x_: f64) callconv(.C) f64 {
190 }190 }
191}191}
192192
193pub fn __expx(a: f80) callconv(.C) f80 {193pub fn __expx(a: f80) callconv(.c) f80 {
194 // TODO: more efficient implementation194 // TODO: more efficient implementation
195 return @floatCast(expq(a));195 return @floatCast(expq(a));
196}196}
197197
198pub fn expq(a: f128) callconv(.C) f128 {198pub fn expq(a: f128) callconv(.c) f128 {
199 // TODO: more correct implementation199 // TODO: more correct implementation
200 return exp(@floatCast(a));200 return exp(@floatCast(a));
201}201}
202202
203pub fn expl(x: c_longdouble) callconv(.C) c_longdouble {203pub fn expl(x: c_longdouble) callconv(.c) c_longdouble {
204 switch (@typeInfo(c_longdouble).float.bits) {204 switch (@typeInfo(c_longdouble).float.bits) {
205 16 => return __exph(x),205 16 => return __exph(x),
206 32 => return expf(x),206 32 => return expf(x),
lib/compiler_rt/exp2.zig+6-6
...@@ -26,12 +26,12 @@ comptime {...@@ -26,12 +26,12 @@ comptime {
26 @export(&exp2l, .{ .name = "exp2l", .linkage = common.linkage, .visibility = common.visibility });26 @export(&exp2l, .{ .name = "exp2l", .linkage = common.linkage, .visibility = common.visibility });
27}27}
2828
29pub fn __exp2h(x: f16) callconv(.C) f16 {29pub fn __exp2h(x: f16) callconv(.c) f16 {
30 // TODO: more efficient implementation30 // TODO: more efficient implementation
31 return @floatCast(exp2f(x));31 return @floatCast(exp2f(x));
32}32}
3333
34pub fn exp2f(x: f32) callconv(.C) f32 {34pub fn exp2f(x: f32) callconv(.c) f32 {
35 const tblsiz: u32 = @intCast(exp2ft.len);35 const tblsiz: u32 = @intCast(exp2ft.len);
36 const redux: f32 = 0x1.8p23 / @as(f32, @floatFromInt(tblsiz));36 const redux: f32 = 0x1.8p23 / @as(f32, @floatFromInt(tblsiz));
37 const P1: f32 = 0x1.62e430p-1;37 const P1: f32 = 0x1.62e430p-1;
...@@ -88,7 +88,7 @@ pub fn exp2f(x: f32) callconv(.C) f32 {...@@ -88,7 +88,7 @@ pub fn exp2f(x: f32) callconv(.C) f32 {
88 return @floatCast(r * uk);88 return @floatCast(r * uk);
89}89}
9090
91pub fn exp2(x: f64) callconv(.C) f64 {91pub fn exp2(x: f64) callconv(.c) f64 {
92 const tblsiz: u32 = @intCast(exp2dt.len / 2);92 const tblsiz: u32 = @intCast(exp2dt.len / 2);
93 const redux: f64 = 0x1.8p52 / @as(f64, @floatFromInt(tblsiz));93 const redux: f64 = 0x1.8p52 / @as(f64, @floatFromInt(tblsiz));
94 const P1: f64 = 0x1.62e42fefa39efp-1;94 const P1: f64 = 0x1.62e42fefa39efp-1;
...@@ -157,17 +157,17 @@ pub fn exp2(x: f64) callconv(.C) f64 {...@@ -157,17 +157,17 @@ pub fn exp2(x: f64) callconv(.C) f64 {
157 return math.scalbn(r, ik);157 return math.scalbn(r, ik);
158}158}
159159
160pub fn __exp2x(x: f80) callconv(.C) f80 {160pub fn __exp2x(x: f80) callconv(.c) f80 {
161 // TODO: more efficient implementation161 // TODO: more efficient implementation
162 return @floatCast(exp2q(x));162 return @floatCast(exp2q(x));
163}163}
164164
165pub fn exp2q(x: f128) callconv(.C) f128 {165pub fn exp2q(x: f128) callconv(.c) f128 {
166 // TODO: more correct implementation166 // TODO: more correct implementation
167 return exp2(@floatCast(x));167 return exp2(@floatCast(x));
168}168}
169169
170pub fn exp2l(x: c_longdouble) callconv(.C) c_longdouble {170pub fn exp2l(x: c_longdouble) callconv(.c) c_longdouble {
171 switch (@typeInfo(c_longdouble).float.bits) {171 switch (@typeInfo(c_longdouble).float.bits) {
172 16 => return __exp2h(x),172 16 => return __exp2h(x),
173 32 => return exp2f(x),173 32 => return exp2f(x),
lib/compiler_rt/extenddftf2.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 @export(&__extenddftf2, .{ .name = "__extenddftf2", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__extenddftf2, .{ .name = "__extenddftf2", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __extenddftf2(a: f64) callconv(.C) f128 {15pub fn __extenddftf2(a: f64) callconv(.c) f128 {
16 return extendf(f128, f64, @as(u64, @bitCast(a)));16 return extendf(f128, f64, @as(u64, @bitCast(a)));
17}17}
1818
19fn _Qp_dtoq(c: *f128, a: f64) callconv(.C) void {19fn _Qp_dtoq(c: *f128, a: f64) callconv(.c) void {
20 c.* = extendf(f128, f64, @as(u64, @bitCast(a)));20 c.* = extendf(f128, f64, @as(u64, @bitCast(a)));
21}21}
lib/compiler_rt/extenddfxf2.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__extenddfxf2, .{ .name = "__extenddfxf2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__extenddfxf2, .{ .name = "__extenddfxf2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10pub fn __extenddfxf2(a: f64) callconv(.C) f80 {10pub fn __extenddfxf2(a: f64) callconv(.c) f80 {
11 return extend_f80(f64, @as(u64, @bitCast(a)));11 return extend_f80(f64, @as(u64, @bitCast(a)));
12}12}
lib/compiler_rt/extendhfdf2.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__extendhfdf2, .{ .name = "__extendhfdf2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__extendhfdf2, .{ .name = "__extendhfdf2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10pub fn __extendhfdf2(a: common.F16T(f64)) callconv(.C) f64 {10pub fn __extendhfdf2(a: common.F16T(f64)) callconv(.c) f64 {
11 return extendf(f64, f16, @as(u16, @bitCast(a)));11 return extendf(f64, f16, @as(u16, @bitCast(a)));
12}12}
lib/compiler_rt/extendhfsf2.zig+3-3
...@@ -12,14 +12,14 @@ comptime {...@@ -12,14 +12,14 @@ comptime {
12 @export(&__extendhfsf2, .{ .name = "__extendhfsf2", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__extendhfsf2, .{ .name = "__extendhfsf2", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __extendhfsf2(a: common.F16T(f32)) callconv(.C) f32 {15pub fn __extendhfsf2(a: common.F16T(f32)) callconv(.c) f32 {
16 return extendf(f32, f16, @as(u16, @bitCast(a)));16 return extendf(f32, f16, @as(u16, @bitCast(a)));
17}17}
1818
19fn __gnu_h2f_ieee(a: common.F16T(f32)) callconv(.C) f32 {19fn __gnu_h2f_ieee(a: common.F16T(f32)) callconv(.c) f32 {
20 return extendf(f32, f16, @as(u16, @bitCast(a)));20 return extendf(f32, f16, @as(u16, @bitCast(a)));
21}21}
2222
23fn __aeabi_h2f(a: u16) callconv(.AAPCS) f32 {23fn __aeabi_h2f(a: u16) callconv(.{ .arm_aapcs = .{} }) f32 {
24 return extendf(f32, f16, @as(u16, @bitCast(a)));24 return extendf(f32, f16, @as(u16, @bitCast(a)));
25}25}
lib/compiler_rt/extendhftf2.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__extendhftf2, .{ .name = "__extendhftf2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__extendhftf2, .{ .name = "__extendhftf2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10pub fn __extendhftf2(a: common.F16T(f128)) callconv(.C) f128 {10pub fn __extendhftf2(a: common.F16T(f128)) callconv(.c) f128 {
11 return extendf(f128, f16, @as(u16, @bitCast(a)));11 return extendf(f128, f16, @as(u16, @bitCast(a)));
12}12}
lib/compiler_rt/extendhfxf2.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__extendhfxf2, .{ .name = "__extendhfxf2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__extendhfxf2, .{ .name = "__extendhfxf2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __extendhfxf2(a: common.F16T(f80)) callconv(.C) f80 {10fn __extendhfxf2(a: common.F16T(f80)) callconv(.c) f80 {
11 return extend_f80(f16, @as(u16, @bitCast(a)));11 return extend_f80(f16, @as(u16, @bitCast(a)));
12}12}
lib/compiler_rt/extendsfdf2.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14fn __extendsfdf2(a: f32) callconv(.C) f64 {14fn __extendsfdf2(a: f32) callconv(.c) f64 {
15 return extendf(f64, f32, @as(u32, @bitCast(a)));15 return extendf(f64, f32, @as(u32, @bitCast(a)));
16}16}
1717
18fn __aeabi_f2d(a: f32) callconv(.AAPCS) f64 {18fn __aeabi_f2d(a: f32) callconv(.{ .arm_aapcs = .{} }) f64 {
19 return extendf(f64, f32, @as(u32, @bitCast(a)));19 return extendf(f64, f32, @as(u32, @bitCast(a)));
20}20}
lib/compiler_rt/extendsftf2.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 @export(&__extendsftf2, .{ .name = "__extendsftf2", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__extendsftf2, .{ .name = "__extendsftf2", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __extendsftf2(a: f32) callconv(.C) f128 {15pub fn __extendsftf2(a: f32) callconv(.c) f128 {
16 return extendf(f128, f32, @as(u32, @bitCast(a)));16 return extendf(f128, f32, @as(u32, @bitCast(a)));
17}17}
1818
19fn _Qp_stoq(c: *f128, a: f32) callconv(.C) void {19fn _Qp_stoq(c: *f128, a: f32) callconv(.c) void {
20 c.* = extendf(f128, f32, @as(u32, @bitCast(a)));20 c.* = extendf(f128, f32, @as(u32, @bitCast(a)));
21}21}
lib/compiler_rt/extendsfxf2.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__extendsfxf2, .{ .name = "__extendsfxf2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__extendsfxf2, .{ .name = "__extendsfxf2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __extendsfxf2(a: f32) callconv(.C) f80 {10fn __extendsfxf2(a: f32) callconv(.c) f80 {
11 return extend_f80(f32, @as(u32, @bitCast(a)));11 return extend_f80(f32, @as(u32, @bitCast(a)));
12}12}
lib/compiler_rt/extendxftf2.zig+1-1
...@@ -7,7 +7,7 @@ comptime {...@@ -7,7 +7,7 @@ comptime {
7 @export(&__extendxftf2, .{ .name = "__extendxftf2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__extendxftf2, .{ .name = "__extendxftf2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __extendxftf2(a: f80) callconv(.C) f128 {10fn __extendxftf2(a: f80) callconv(.c) f128 {
11 const src_int_bit: u64 = 0x8000000000000000;11 const src_int_bit: u64 = 0x8000000000000000;
12 const src_sig_mask = ~src_int_bit;12 const src_sig_mask = ~src_int_bit;
13 const src_sig_bits = std.math.floatMantissaBits(f80) - 1; // -1 for the integer bit13 const src_sig_bits = std.math.floatMantissaBits(f80) - 1; // -1 for the integer bit
lib/compiler_rt/fabs.zig+6-6
...@@ -17,27 +17,27 @@ comptime {...@@ -17,27 +17,27 @@ comptime {
17 @export(&fabsl, .{ .name = "fabsl", .linkage = common.linkage, .visibility = common.visibility });17 @export(&fabsl, .{ .name = "fabsl", .linkage = common.linkage, .visibility = common.visibility });
18}18}
1919
20pub fn __fabsh(a: f16) callconv(.C) f16 {20pub fn __fabsh(a: f16) callconv(.c) f16 {
21 return generic_fabs(a);21 return generic_fabs(a);
22}22}
2323
24pub fn fabsf(a: f32) callconv(.C) f32 {24pub fn fabsf(a: f32) callconv(.c) f32 {
25 return generic_fabs(a);25 return generic_fabs(a);
26}26}
2727
28pub fn fabs(a: f64) callconv(.C) f64 {28pub fn fabs(a: f64) callconv(.c) f64 {
29 return generic_fabs(a);29 return generic_fabs(a);
30}30}
3131
32pub fn __fabsx(a: f80) callconv(.C) f80 {32pub fn __fabsx(a: f80) callconv(.c) f80 {
33 return generic_fabs(a);33 return generic_fabs(a);
34}34}
3535
36pub fn fabsq(a: f128) callconv(.C) f128 {36pub fn fabsq(a: f128) callconv(.c) f128 {
37 return generic_fabs(a);37 return generic_fabs(a);
38}38}
3939
40pub fn fabsl(x: c_longdouble) callconv(.C) c_longdouble {40pub fn fabsl(x: c_longdouble) callconv(.c) c_longdouble {
41 switch (@typeInfo(c_longdouble).float.bits) {41 switch (@typeInfo(c_longdouble).float.bits) {
42 16 => return __fabsh(x),42 16 => return __fabsh(x),
43 32 => return fabsf(x),43 32 => return fabsf(x),
lib/compiler_rt/fixdfdi.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __fixdfdi(a: f64) callconv(.C) i64 {15pub fn __fixdfdi(a: f64) callconv(.c) i64 {
16 return intFromFloat(i64, a);16 return intFromFloat(i64, a);
17}17}
1818
19fn __aeabi_d2lz(a: f64) callconv(.AAPCS) i64 {19fn __aeabi_d2lz(a: f64) callconv(.{ .arm_aapcs = .{} }) i64 {
20 return intFromFloat(i64, a);20 return intFromFloat(i64, a);
21}21}
lib/compiler_rt/fixdfsi.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14pub fn __fixdfsi(a: f64) callconv(.C) i32 {14pub fn __fixdfsi(a: f64) callconv(.c) i32 {
15 return intFromFloat(i32, a);15 return intFromFloat(i32, a);
16}16}
1717
18fn __aeabi_d2iz(a: f64) callconv(.AAPCS) i32 {18fn __aeabi_d2iz(a: f64) callconv(.{ .arm_aapcs = .{} }) i32 {
19 return intFromFloat(i32, a);19 return intFromFloat(i32, a);
20}20}
lib/compiler_rt/fixdfti.zig+2-2
...@@ -15,12 +15,12 @@ comptime {...@@ -15,12 +15,12 @@ comptime {
15 }15 }
16}16}
1717
18pub fn __fixdfti(a: f64) callconv(.C) i128 {18pub fn __fixdfti(a: f64) callconv(.c) i128 {
19 return intFromFloat(i128, a);19 return intFromFloat(i128, a);
20}20}
2121
22const v2u64 = @Vector(2, u64);22const v2u64 = @Vector(2, u64);
2323
24fn __fixdfti_windows_x86_64(a: f64) callconv(.C) v2u64 {24fn __fixdfti_windows_x86_64(a: f64) callconv(.c) v2u64 {
25 return @bitCast(intFromFloat(i128, a));25 return @bitCast(intFromFloat(i128, a));
26}26}
lib/compiler_rt/fixhfdi.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__fixhfdi, .{ .name = "__fixhfdi", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__fixhfdi, .{ .name = "__fixhfdi", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __fixhfdi(a: f16) callconv(.C) i64 {10fn __fixhfdi(a: f16) callconv(.c) i64 {
11 return intFromFloat(i64, a);11 return intFromFloat(i64, a);
12}12}
lib/compiler_rt/fixhfsi.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__fixhfsi, .{ .name = "__fixhfsi", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__fixhfsi, .{ .name = "__fixhfsi", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __fixhfsi(a: f16) callconv(.C) i32 {10fn __fixhfsi(a: f16) callconv(.c) i32 {
11 return intFromFloat(i32, a);11 return intFromFloat(i32, a);
12}12}
lib/compiler_rt/fixhfti.zig+2-2
...@@ -12,12 +12,12 @@ comptime {...@@ -12,12 +12,12 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __fixhfti(a: f16) callconv(.C) i128 {15pub fn __fixhfti(a: f16) callconv(.c) i128 {
16 return intFromFloat(i128, a);16 return intFromFloat(i128, a);
17}17}
1818
19const v2u64 = @Vector(2, u64);19const v2u64 = @Vector(2, u64);
2020
21fn __fixhfti_windows_x86_64(a: f16) callconv(.C) v2u64 {21fn __fixhfti_windows_x86_64(a: f16) callconv(.c) v2u64 {
22 return @bitCast(intFromFloat(i128, a));22 return @bitCast(intFromFloat(i128, a));
23}23}
lib/compiler_rt/fixsfdi.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __fixsfdi(a: f32) callconv(.C) i64 {15pub fn __fixsfdi(a: f32) callconv(.c) i64 {
16 return intFromFloat(i64, a);16 return intFromFloat(i64, a);
17}17}
1818
19fn __aeabi_f2lz(a: f32) callconv(.AAPCS) i64 {19fn __aeabi_f2lz(a: f32) callconv(.{ .arm_aapcs = .{} }) i64 {
20 return intFromFloat(i64, a);20 return intFromFloat(i64, a);
21}21}
lib/compiler_rt/fixsfsi.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14pub fn __fixsfsi(a: f32) callconv(.C) i32 {14pub fn __fixsfsi(a: f32) callconv(.c) i32 {
15 return intFromFloat(i32, a);15 return intFromFloat(i32, a);
16}16}
1717
18fn __aeabi_f2iz(a: f32) callconv(.AAPCS) i32 {18fn __aeabi_f2iz(a: f32) callconv(.{ .arm_aapcs = .{} }) i32 {
19 return intFromFloat(i32, a);19 return intFromFloat(i32, a);
20}20}
lib/compiler_rt/fixsfti.zig+2-2
...@@ -15,12 +15,12 @@ comptime {...@@ -15,12 +15,12 @@ comptime {
15 }15 }
16}16}
1717
18pub fn __fixsfti(a: f32) callconv(.C) i128 {18pub fn __fixsfti(a: f32) callconv(.c) i128 {
19 return intFromFloat(i128, a);19 return intFromFloat(i128, a);
20}20}
2121
22const v2u64 = @Vector(2, u64);22const v2u64 = @Vector(2, u64);
2323
24fn __fixsfti_windows_x86_64(a: f32) callconv(.C) v2u64 {24fn __fixsfti_windows_x86_64(a: f32) callconv(.c) v2u64 {
25 return @bitCast(intFromFloat(i128, a));25 return @bitCast(intFromFloat(i128, a));
26}26}
lib/compiler_rt/fixtfdi.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 @export(&__fixtfdi, .{ .name = "__fixtfdi", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__fixtfdi, .{ .name = "__fixtfdi", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __fixtfdi(a: f128) callconv(.C) i64 {15pub fn __fixtfdi(a: f128) callconv(.c) i64 {
16 return intFromFloat(i64, a);16 return intFromFloat(i64, a);
17}17}
1818
19fn _Qp_qtox(a: *const f128) callconv(.C) i64 {19fn _Qp_qtox(a: *const f128) callconv(.c) i64 {
20 return intFromFloat(i64, a.*);20 return intFromFloat(i64, a.*);
21}21}
lib/compiler_rt/fixtfsi.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 @export(&__fixtfsi, .{ .name = "__fixtfsi", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__fixtfsi, .{ .name = "__fixtfsi", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __fixtfsi(a: f128) callconv(.C) i32 {15pub fn __fixtfsi(a: f128) callconv(.c) i32 {
16 return intFromFloat(i32, a);16 return intFromFloat(i32, a);
17}17}
1818
19fn _Qp_qtoi(a: *const f128) callconv(.C) i32 {19fn _Qp_qtoi(a: *const f128) callconv(.c) i32 {
20 return intFromFloat(i32, a.*);20 return intFromFloat(i32, a.*);
21}21}
lib/compiler_rt/fixtfti.zig+2-2
...@@ -14,12 +14,12 @@ comptime {...@@ -14,12 +14,12 @@ comptime {
14 }14 }
15}15}
1616
17pub fn __fixtfti(a: f128) callconv(.C) i128 {17pub fn __fixtfti(a: f128) callconv(.c) i128 {
18 return intFromFloat(i128, a);18 return intFromFloat(i128, a);
19}19}
2020
21const v2u64 = @Vector(2, u64);21const v2u64 = @Vector(2, u64);
2222
23fn __fixtfti_windows_x86_64(a: f128) callconv(.C) v2u64 {23fn __fixtfti_windows_x86_64(a: f128) callconv(.c) v2u64 {
24 return @bitCast(intFromFloat(i128, a));24 return @bitCast(intFromFloat(i128, a));
25}25}
lib/compiler_rt/fixunsdfdi.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __fixunsdfdi(a: f64) callconv(.C) u64 {15pub fn __fixunsdfdi(a: f64) callconv(.c) u64 {
16 return intFromFloat(u64, a);16 return intFromFloat(u64, a);
17}17}
1818
19fn __aeabi_d2ulz(a: f64) callconv(.AAPCS) u64 {19fn __aeabi_d2ulz(a: f64) callconv(.{ .arm_aapcs = .{} }) u64 {
20 return intFromFloat(u64, a);20 return intFromFloat(u64, a);
21}21}
lib/compiler_rt/fixunsdfsi.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14pub fn __fixunsdfsi(a: f64) callconv(.C) u32 {14pub fn __fixunsdfsi(a: f64) callconv(.c) u32 {
15 return intFromFloat(u32, a);15 return intFromFloat(u32, a);
16}16}
1717
18fn __aeabi_d2uiz(a: f64) callconv(.AAPCS) u32 {18fn __aeabi_d2uiz(a: f64) callconv(.{ .arm_aapcs = .{} }) u32 {
19 return intFromFloat(u32, a);19 return intFromFloat(u32, a);
20}20}
lib/compiler_rt/fixunsdfti.zig+2-2
...@@ -15,12 +15,12 @@ comptime {...@@ -15,12 +15,12 @@ comptime {
15 }15 }
16}16}
1717
18pub fn __fixunsdfti(a: f64) callconv(.C) u128 {18pub fn __fixunsdfti(a: f64) callconv(.c) u128 {
19 return intFromFloat(u128, a);19 return intFromFloat(u128, a);
20}20}
2121
22const v2u64 = @Vector(2, u64);22const v2u64 = @Vector(2, u64);
2323
24fn __fixunsdfti_windows_x86_64(a: f64) callconv(.C) v2u64 {24fn __fixunsdfti_windows_x86_64(a: f64) callconv(.c) v2u64 {
25 return @bitCast(intFromFloat(u128, a));25 return @bitCast(intFromFloat(u128, a));
26}26}
lib/compiler_rt/fixunshfdi.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__fixunshfdi, .{ .name = "__fixunshfdi", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__fixunshfdi, .{ .name = "__fixunshfdi", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __fixunshfdi(a: f16) callconv(.C) u64 {10fn __fixunshfdi(a: f16) callconv(.c) u64 {
11 return intFromFloat(u64, a);11 return intFromFloat(u64, a);
12}12}
lib/compiler_rt/fixunshfsi.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__fixunshfsi, .{ .name = "__fixunshfsi", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__fixunshfsi, .{ .name = "__fixunshfsi", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __fixunshfsi(a: f16) callconv(.C) u32 {10fn __fixunshfsi(a: f16) callconv(.c) u32 {
11 return intFromFloat(u32, a);11 return intFromFloat(u32, a);
12}12}
lib/compiler_rt/fixunshfti.zig+2-2
...@@ -12,12 +12,12 @@ comptime {...@@ -12,12 +12,12 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __fixunshfti(a: f16) callconv(.C) u128 {15pub fn __fixunshfti(a: f16) callconv(.c) u128 {
16 return intFromFloat(u128, a);16 return intFromFloat(u128, a);
17}17}
1818
19const v2u64 = @Vector(2, u64);19const v2u64 = @Vector(2, u64);
2020
21fn __fixunshfti_windows_x86_64(a: f16) callconv(.C) v2u64 {21fn __fixunshfti_windows_x86_64(a: f16) callconv(.c) v2u64 {
22 return @bitCast(intFromFloat(u128, a));22 return @bitCast(intFromFloat(u128, a));
23}23}
lib/compiler_rt/fixunssfdi.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __fixunssfdi(a: f32) callconv(.C) u64 {15pub fn __fixunssfdi(a: f32) callconv(.c) u64 {
16 return intFromFloat(u64, a);16 return intFromFloat(u64, a);
17}17}
1818
19fn __aeabi_f2ulz(a: f32) callconv(.AAPCS) u64 {19fn __aeabi_f2ulz(a: f32) callconv(.{ .arm_aapcs = .{} }) u64 {
20 return intFromFloat(u64, a);20 return intFromFloat(u64, a);
21}21}
lib/compiler_rt/fixunssfsi.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14pub fn __fixunssfsi(a: f32) callconv(.C) u32 {14pub fn __fixunssfsi(a: f32) callconv(.c) u32 {
15 return intFromFloat(u32, a);15 return intFromFloat(u32, a);
16}16}
1717
18fn __aeabi_f2uiz(a: f32) callconv(.AAPCS) u32 {18fn __aeabi_f2uiz(a: f32) callconv(.{ .arm_aapcs = .{} }) u32 {
19 return intFromFloat(u32, a);19 return intFromFloat(u32, a);
20}20}
lib/compiler_rt/fixunssfti.zig+2-2
...@@ -15,12 +15,12 @@ comptime {...@@ -15,12 +15,12 @@ comptime {
15 }15 }
16}16}
1717
18pub fn __fixunssfti(a: f32) callconv(.C) u128 {18pub fn __fixunssfti(a: f32) callconv(.c) u128 {
19 return intFromFloat(u128, a);19 return intFromFloat(u128, a);
20}20}
2121
22const v2u64 = @Vector(2, u64);22const v2u64 = @Vector(2, u64);
2323
24fn __fixunssfti_windows_x86_64(a: f32) callconv(.C) v2u64 {24fn __fixunssfti_windows_x86_64(a: f32) callconv(.c) v2u64 {
25 return @bitCast(intFromFloat(u128, a));25 return @bitCast(intFromFloat(u128, a));
26}26}
lib/compiler_rt/fixunstfdi.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 @export(&__fixunstfdi, .{ .name = "__fixunstfdi", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__fixunstfdi, .{ .name = "__fixunstfdi", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __fixunstfdi(a: f128) callconv(.C) u64 {15pub fn __fixunstfdi(a: f128) callconv(.c) u64 {
16 return intFromFloat(u64, a);16 return intFromFloat(u64, a);
17}17}
1818
19fn _Qp_qtoux(a: *const f128) callconv(.C) u64 {19fn _Qp_qtoux(a: *const f128) callconv(.c) u64 {
20 return intFromFloat(u64, a.*);20 return intFromFloat(u64, a.*);
21}21}
lib/compiler_rt/fixunstfsi.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 @export(&__fixunstfsi, .{ .name = "__fixunstfsi", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__fixunstfsi, .{ .name = "__fixunstfsi", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __fixunstfsi(a: f128) callconv(.C) u32 {15pub fn __fixunstfsi(a: f128) callconv(.c) u32 {
16 return intFromFloat(u32, a);16 return intFromFloat(u32, a);
17}17}
1818
19fn _Qp_qtoui(a: *const f128) callconv(.C) u32 {19fn _Qp_qtoui(a: *const f128) callconv(.c) u32 {
20 return intFromFloat(u32, a.*);20 return intFromFloat(u32, a.*);
21}21}
lib/compiler_rt/fixunstfti.zig+2-2
...@@ -14,12 +14,12 @@ comptime {...@@ -14,12 +14,12 @@ comptime {
14 }14 }
15}15}
1616
17pub fn __fixunstfti(a: f128) callconv(.C) u128 {17pub fn __fixunstfti(a: f128) callconv(.c) u128 {
18 return intFromFloat(u128, a);18 return intFromFloat(u128, a);
19}19}
2020
21const v2u64 = @Vector(2, u64);21const v2u64 = @Vector(2, u64);
2222
23fn __fixunstfti_windows_x86_64(a: f128) callconv(.C) v2u64 {23fn __fixunstfti_windows_x86_64(a: f128) callconv(.c) v2u64 {
24 return @bitCast(intFromFloat(u128, a));24 return @bitCast(intFromFloat(u128, a));
25}25}
lib/compiler_rt/fixunsxfdi.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__fixunsxfdi, .{ .name = "__fixunsxfdi", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__fixunsxfdi, .{ .name = "__fixunsxfdi", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __fixunsxfdi(a: f80) callconv(.C) u64 {10fn __fixunsxfdi(a: f80) callconv(.c) u64 {
11 return intFromFloat(u64, a);11 return intFromFloat(u64, a);
12}12}
lib/compiler_rt/fixunsxfsi.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__fixunsxfsi, .{ .name = "__fixunsxfsi", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__fixunsxfsi, .{ .name = "__fixunsxfsi", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __fixunsxfsi(a: f80) callconv(.C) u32 {10fn __fixunsxfsi(a: f80) callconv(.c) u32 {
11 return intFromFloat(u32, a);11 return intFromFloat(u32, a);
12}12}
lib/compiler_rt/fixunsxfti.zig+2-2
...@@ -12,12 +12,12 @@ comptime {...@@ -12,12 +12,12 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __fixunsxfti(a: f80) callconv(.C) u128 {15pub fn __fixunsxfti(a: f80) callconv(.c) u128 {
16 return intFromFloat(u128, a);16 return intFromFloat(u128, a);
17}17}
1818
19const v2u64 = @Vector(2, u64);19const v2u64 = @Vector(2, u64);
2020
21fn __fixunsxfti_windows_x86_64(a: f80) callconv(.C) v2u64 {21fn __fixunsxfti_windows_x86_64(a: f80) callconv(.c) v2u64 {
22 return @bitCast(intFromFloat(u128, a));22 return @bitCast(intFromFloat(u128, a));
23}23}
lib/compiler_rt/fixxfdi.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__fixxfdi, .{ .name = "__fixxfdi", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__fixxfdi, .{ .name = "__fixxfdi", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __fixxfdi(a: f80) callconv(.C) i64 {10fn __fixxfdi(a: f80) callconv(.c) i64 {
11 return intFromFloat(i64, a);11 return intFromFloat(i64, a);
12}12}
lib/compiler_rt/fixxfsi.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__fixxfsi, .{ .name = "__fixxfsi", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__fixxfsi, .{ .name = "__fixxfsi", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __fixxfsi(a: f80) callconv(.C) i32 {10fn __fixxfsi(a: f80) callconv(.c) i32 {
11 return intFromFloat(i32, a);11 return intFromFloat(i32, a);
12}12}
lib/compiler_rt/fixxfti.zig+2-2
...@@ -12,12 +12,12 @@ comptime {...@@ -12,12 +12,12 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __fixxfti(a: f80) callconv(.C) i128 {15pub fn __fixxfti(a: f80) callconv(.c) i128 {
16 return intFromFloat(i128, a);16 return intFromFloat(i128, a);
17}17}
1818
19const v2u64 = @Vector(2, u64);19const v2u64 = @Vector(2, u64);
2020
21fn __fixxfti_windows_x86_64(a: f80) callconv(.C) v2u64 {21fn __fixxfti_windows_x86_64(a: f80) callconv(.c) v2u64 {
22 return @bitCast(intFromFloat(i128, a));22 return @bitCast(intFromFloat(i128, a));
23}23}
lib/compiler_rt/floatdidf.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __floatdidf(a: i64) callconv(.C) f64 {15pub fn __floatdidf(a: i64) callconv(.c) f64 {
16 return floatFromInt(f64, a);16 return floatFromInt(f64, a);
17}17}
1818
19fn __aeabi_l2d(a: i64) callconv(.AAPCS) f64 {19fn __aeabi_l2d(a: i64) callconv(.{ .arm_aapcs = .{} }) f64 {
20 return floatFromInt(f64, a);20 return floatFromInt(f64, a);
21}21}
lib/compiler_rt/floatdihf.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__floatdihf, .{ .name = "__floatdihf", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__floatdihf, .{ .name = "__floatdihf", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __floatdihf(a: i64) callconv(.C) f16 {10fn __floatdihf(a: i64) callconv(.c) f16 {
11 return floatFromInt(f16, a);11 return floatFromInt(f16, a);
12}12}
lib/compiler_rt/floatdisf.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __floatdisf(a: i64) callconv(.C) f32 {15pub fn __floatdisf(a: i64) callconv(.c) f32 {
16 return floatFromInt(f32, a);16 return floatFromInt(f32, a);
17}17}
1818
19fn __aeabi_l2f(a: i64) callconv(.AAPCS) f32 {19fn __aeabi_l2f(a: i64) callconv(.{ .arm_aapcs = .{} }) f32 {
20 return floatFromInt(f32, a);20 return floatFromInt(f32, a);
21}21}
lib/compiler_rt/floatditf.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 @export(&__floatditf, .{ .name = "__floatditf", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__floatditf, .{ .name = "__floatditf", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __floatditf(a: i64) callconv(.C) f128 {15pub fn __floatditf(a: i64) callconv(.c) f128 {
16 return floatFromInt(f128, a);16 return floatFromInt(f128, a);
17}17}
1818
19fn _Qp_xtoq(c: *f128, a: i64) callconv(.C) void {19fn _Qp_xtoq(c: *f128, a: i64) callconv(.c) void {
20 c.* = floatFromInt(f128, a);20 c.* = floatFromInt(f128, a);
21}21}
lib/compiler_rt/floatdixf.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__floatdixf, .{ .name = "__floatdixf", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__floatdixf, .{ .name = "__floatdixf", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __floatdixf(a: i64) callconv(.C) f80 {10fn __floatdixf(a: i64) callconv(.c) f80 {
11 return floatFromInt(f80, a);11 return floatFromInt(f80, a);
12}12}
lib/compiler_rt/floatsidf.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14pub fn __floatsidf(a: i32) callconv(.C) f64 {14pub fn __floatsidf(a: i32) callconv(.c) f64 {
15 return floatFromInt(f64, a);15 return floatFromInt(f64, a);
16}16}
1717
18fn __aeabi_i2d(a: i32) callconv(.AAPCS) f64 {18fn __aeabi_i2d(a: i32) callconv(.{ .arm_aapcs = .{} }) f64 {
19 return floatFromInt(f64, a);19 return floatFromInt(f64, a);
20}20}
lib/compiler_rt/floatsihf.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__floatsihf, .{ .name = "__floatsihf", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__floatsihf, .{ .name = "__floatsihf", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __floatsihf(a: i32) callconv(.C) f16 {10fn __floatsihf(a: i32) callconv(.c) f16 {
11 return floatFromInt(f16, a);11 return floatFromInt(f16, a);
12}12}
lib/compiler_rt/floatsisf.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14pub fn __floatsisf(a: i32) callconv(.C) f32 {14pub fn __floatsisf(a: i32) callconv(.c) f32 {
15 return floatFromInt(f32, a);15 return floatFromInt(f32, a);
16}16}
1717
18fn __aeabi_i2f(a: i32) callconv(.AAPCS) f32 {18fn __aeabi_i2f(a: i32) callconv(.{ .arm_aapcs = .{} }) f32 {
19 return floatFromInt(f32, a);19 return floatFromInt(f32, a);
20}20}
lib/compiler_rt/floatsitf.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 @export(&__floatsitf, .{ .name = "__floatsitf", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__floatsitf, .{ .name = "__floatsitf", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __floatsitf(a: i32) callconv(.C) f128 {15pub fn __floatsitf(a: i32) callconv(.c) f128 {
16 return floatFromInt(f128, a);16 return floatFromInt(f128, a);
17}17}
1818
19fn _Qp_itoq(c: *f128, a: i32) callconv(.C) void {19fn _Qp_itoq(c: *f128, a: i32) callconv(.c) void {
20 c.* = floatFromInt(f128, a);20 c.* = floatFromInt(f128, a);
21}21}
lib/compiler_rt/floatsixf.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__floatsixf, .{ .name = "__floatsixf", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__floatsixf, .{ .name = "__floatsixf", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __floatsixf(a: i32) callconv(.C) f80 {10fn __floatsixf(a: i32) callconv(.c) f80 {
11 return floatFromInt(f80, a);11 return floatFromInt(f80, a);
12}12}
lib/compiler_rt/floattidf.zig+2-2
...@@ -15,10 +15,10 @@ comptime {...@@ -15,10 +15,10 @@ comptime {
15 }15 }
16}16}
1717
18pub fn __floattidf(a: i128) callconv(.C) f64 {18pub fn __floattidf(a: i128) callconv(.c) f64 {
19 return floatFromInt(f64, a);19 return floatFromInt(f64, a);
20}20}
2121
22fn __floattidf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f64 {22fn __floattidf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f64 {
23 return floatFromInt(f64, @as(i128, @bitCast(a)));23 return floatFromInt(f64, @as(i128, @bitCast(a)));
24}24}
lib/compiler_rt/floattihf.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __floattihf(a: i128) callconv(.C) f16 {15pub fn __floattihf(a: i128) callconv(.c) f16 {
16 return floatFromInt(f16, a);16 return floatFromInt(f16, a);
17}17}
1818
19fn __floattihf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f16 {19fn __floattihf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f16 {
20 return floatFromInt(f16, @as(i128, @bitCast(a)));20 return floatFromInt(f16, @as(i128, @bitCast(a)));
21}21}
lib/compiler_rt/floattisf.zig+2-2
...@@ -15,10 +15,10 @@ comptime {...@@ -15,10 +15,10 @@ comptime {
15 }15 }
16}16}
1717
18pub fn __floattisf(a: i128) callconv(.C) f32 {18pub fn __floattisf(a: i128) callconv(.c) f32 {
19 return floatFromInt(f32, a);19 return floatFromInt(f32, a);
20}20}
2121
22fn __floattisf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f32 {22fn __floattisf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f32 {
23 return floatFromInt(f32, @as(i128, @bitCast(a)));23 return floatFromInt(f32, @as(i128, @bitCast(a)));
24}24}
lib/compiler_rt/floattitf.zig+2-2
...@@ -14,10 +14,10 @@ comptime {...@@ -14,10 +14,10 @@ comptime {
14 }14 }
15}15}
1616
17pub fn __floattitf(a: i128) callconv(.C) f128 {17pub fn __floattitf(a: i128) callconv(.c) f128 {
18 return floatFromInt(f128, a);18 return floatFromInt(f128, a);
19}19}
2020
21fn __floattitf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f128 {21fn __floattitf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f128 {
22 return floatFromInt(f128, @as(i128, @bitCast(a)));22 return floatFromInt(f128, @as(i128, @bitCast(a)));
23}23}
lib/compiler_rt/floattixf.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __floattixf(a: i128) callconv(.C) f80 {15pub fn __floattixf(a: i128) callconv(.c) f80 {
16 return floatFromInt(f80, a);16 return floatFromInt(f80, a);
17}17}
1818
19fn __floattixf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f80 {19fn __floattixf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f80 {
20 return floatFromInt(f80, @as(i128, @bitCast(a)));20 return floatFromInt(f80, @as(i128, @bitCast(a)));
21}21}
lib/compiler_rt/floatundidf.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __floatundidf(a: u64) callconv(.C) f64 {15pub fn __floatundidf(a: u64) callconv(.c) f64 {
16 return floatFromInt(f64, a);16 return floatFromInt(f64, a);
17}17}
1818
19fn __aeabi_ul2d(a: u64) callconv(.AAPCS) f64 {19fn __aeabi_ul2d(a: u64) callconv(.{ .arm_aapcs = .{} }) f64 {
20 return floatFromInt(f64, a);20 return floatFromInt(f64, a);
21}21}
lib/compiler_rt/floatundihf.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__floatundihf, .{ .name = "__floatundihf", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__floatundihf, .{ .name = "__floatundihf", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __floatundihf(a: u64) callconv(.C) f16 {10fn __floatundihf(a: u64) callconv(.c) f16 {
11 return floatFromInt(f16, a);11 return floatFromInt(f16, a);
12}12}
lib/compiler_rt/floatundisf.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __floatundisf(a: u64) callconv(.C) f32 {15pub fn __floatundisf(a: u64) callconv(.c) f32 {
16 return floatFromInt(f32, a);16 return floatFromInt(f32, a);
17}17}
1818
19fn __aeabi_ul2f(a: u64) callconv(.AAPCS) f32 {19fn __aeabi_ul2f(a: u64) callconv(.{ .arm_aapcs = .{} }) f32 {
20 return floatFromInt(f32, a);20 return floatFromInt(f32, a);
21}21}
lib/compiler_rt/floatunditf.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 @export(&__floatunditf, .{ .name = "__floatunditf", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__floatunditf, .{ .name = "__floatunditf", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __floatunditf(a: u64) callconv(.C) f128 {15pub fn __floatunditf(a: u64) callconv(.c) f128 {
16 return floatFromInt(f128, a);16 return floatFromInt(f128, a);
17}17}
1818
19fn _Qp_uxtoq(c: *f128, a: u64) callconv(.C) void {19fn _Qp_uxtoq(c: *f128, a: u64) callconv(.c) void {
20 c.* = floatFromInt(f128, a);20 c.* = floatFromInt(f128, a);
21}21}
lib/compiler_rt/floatundixf.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__floatundixf, .{ .name = "__floatundixf", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__floatundixf, .{ .name = "__floatundixf", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __floatundixf(a: u64) callconv(.C) f80 {10fn __floatundixf(a: u64) callconv(.c) f80 {
11 return floatFromInt(f80, a);11 return floatFromInt(f80, a);
12}12}
lib/compiler_rt/floatunsidf.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14pub fn __floatunsidf(a: u32) callconv(.C) f64 {14pub fn __floatunsidf(a: u32) callconv(.c) f64 {
15 return floatFromInt(f64, a);15 return floatFromInt(f64, a);
16}16}
1717
18fn __aeabi_ui2d(a: u32) callconv(.AAPCS) f64 {18fn __aeabi_ui2d(a: u32) callconv(.{ .arm_aapcs = .{} }) f64 {
19 return floatFromInt(f64, a);19 return floatFromInt(f64, a);
20}20}
lib/compiler_rt/floatunsihf.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__floatunsihf, .{ .name = "__floatunsihf", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__floatunsihf, .{ .name = "__floatunsihf", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10pub fn __floatunsihf(a: u32) callconv(.C) f16 {10pub fn __floatunsihf(a: u32) callconv(.c) f16 {
11 return floatFromInt(f16, a);11 return floatFromInt(f16, a);
12}12}
lib/compiler_rt/floatunsisf.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14pub fn __floatunsisf(a: u32) callconv(.C) f32 {14pub fn __floatunsisf(a: u32) callconv(.c) f32 {
15 return floatFromInt(f32, a);15 return floatFromInt(f32, a);
16}16}
1717
18fn __aeabi_ui2f(a: u32) callconv(.AAPCS) f32 {18fn __aeabi_ui2f(a: u32) callconv(.{ .arm_aapcs = .{} }) f32 {
19 return floatFromInt(f32, a);19 return floatFromInt(f32, a);
20}20}
lib/compiler_rt/floatunsitf.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 @export(&__floatunsitf, .{ .name = "__floatunsitf", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__floatunsitf, .{ .name = "__floatunsitf", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __floatunsitf(a: u32) callconv(.C) f128 {15pub fn __floatunsitf(a: u32) callconv(.c) f128 {
16 return floatFromInt(f128, a);16 return floatFromInt(f128, a);
17}17}
1818
19fn _Qp_uitoq(c: *f128, a: u32) callconv(.C) void {19fn _Qp_uitoq(c: *f128, a: u32) callconv(.c) void {
20 c.* = floatFromInt(f128, a);20 c.* = floatFromInt(f128, a);
21}21}
lib/compiler_rt/floatunsixf.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__floatunsixf, .{ .name = "__floatunsixf", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__floatunsixf, .{ .name = "__floatunsixf", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __floatunsixf(a: u32) callconv(.C) f80 {10fn __floatunsixf(a: u32) callconv(.c) f80 {
11 return floatFromInt(f80, a);11 return floatFromInt(f80, a);
12}12}
lib/compiler_rt/floatuntidf.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __floatuntidf(a: u128) callconv(.C) f64 {15pub fn __floatuntidf(a: u128) callconv(.c) f64 {
16 return floatFromInt(f64, a);16 return floatFromInt(f64, a);
17}17}
1818
19fn __floatuntidf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f64 {19fn __floatuntidf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f64 {
20 return floatFromInt(f64, @as(u128, @bitCast(a)));20 return floatFromInt(f64, @as(u128, @bitCast(a)));
21}21}
lib/compiler_rt/floatuntihf.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __floatuntihf(a: u128) callconv(.C) f16 {15pub fn __floatuntihf(a: u128) callconv(.c) f16 {
16 return floatFromInt(f16, a);16 return floatFromInt(f16, a);
17}17}
1818
19fn __floatuntihf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f16 {19fn __floatuntihf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f16 {
20 return floatFromInt(f16, @as(u128, @bitCast(a)));20 return floatFromInt(f16, @as(u128, @bitCast(a)));
21}21}
lib/compiler_rt/floatuntisf.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __floatuntisf(a: u128) callconv(.C) f32 {15pub fn __floatuntisf(a: u128) callconv(.c) f32 {
16 return floatFromInt(f32, a);16 return floatFromInt(f32, a);
17}17}
1818
19fn __floatuntisf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f32 {19fn __floatuntisf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f32 {
20 return floatFromInt(f32, @as(u128, @bitCast(a)));20 return floatFromInt(f32, @as(u128, @bitCast(a)));
21}21}
lib/compiler_rt/floatuntitf.zig+2-2
...@@ -14,10 +14,10 @@ comptime {...@@ -14,10 +14,10 @@ comptime {
14 }14 }
15}15}
1616
17pub fn __floatuntitf(a: u128) callconv(.C) f128 {17pub fn __floatuntitf(a: u128) callconv(.c) f128 {
18 return floatFromInt(f128, a);18 return floatFromInt(f128, a);
19}19}
2020
21fn __floatuntitf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f128 {21fn __floatuntitf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f128 {
22 return floatFromInt(f128, @as(u128, @bitCast(a)));22 return floatFromInt(f128, @as(u128, @bitCast(a)));
23}23}
lib/compiler_rt/floatuntixf.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 }12 }
13}13}
1414
15pub fn __floatuntixf(a: u128) callconv(.C) f80 {15pub fn __floatuntixf(a: u128) callconv(.c) f80 {
16 return floatFromInt(f80, a);16 return floatFromInt(f80, a);
17}17}
1818
19fn __floatuntixf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f80 {19fn __floatuntixf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f80 {
20 return floatFromInt(f80, @as(u128, @bitCast(a)));20 return floatFromInt(f80, @as(u128, @bitCast(a)));
21}21}
lib/compiler_rt/floor.zig+6-6
...@@ -26,7 +26,7 @@ comptime {...@@ -26,7 +26,7 @@ comptime {
26 @export(&floorl, .{ .name = "floorl", .linkage = common.linkage, .visibility = common.visibility });26 @export(&floorl, .{ .name = "floorl", .linkage = common.linkage, .visibility = common.visibility });
27}27}
2828
29pub fn __floorh(x: f16) callconv(.C) f16 {29pub fn __floorh(x: f16) callconv(.c) f16 {
30 var u: u16 = @bitCast(x);30 var u: u16 = @bitCast(x);
31 const e = @as(i16, @intCast((u >> 10) & 31)) - 15;31 const e = @as(i16, @intCast((u >> 10) & 31)) - 15;
32 var m: u16 = undefined;32 var m: u16 = undefined;
...@@ -60,7 +60,7 @@ pub fn __floorh(x: f16) callconv(.C) f16 {...@@ -60,7 +60,7 @@ pub fn __floorh(x: f16) callconv(.C) f16 {
60 }60 }
61}61}
6262
63pub fn floorf(x: f32) callconv(.C) f32 {63pub fn floorf(x: f32) callconv(.c) f32 {
64 var u: u32 = @bitCast(x);64 var u: u32 = @bitCast(x);
65 const e = @as(i32, @intCast((u >> 23) & 0xFF)) - 0x7F;65 const e = @as(i32, @intCast((u >> 23) & 0xFF)) - 0x7F;
66 var m: u32 = undefined;66 var m: u32 = undefined;
...@@ -94,7 +94,7 @@ pub fn floorf(x: f32) callconv(.C) f32 {...@@ -94,7 +94,7 @@ pub fn floorf(x: f32) callconv(.C) f32 {
94 }94 }
95}95}
9696
97pub fn floor(x: f64) callconv(.C) f64 {97pub fn floor(x: f64) callconv(.c) f64 {
98 const f64_toint = 1.0 / math.floatEps(f64);98 const f64_toint = 1.0 / math.floatEps(f64);
9999
100 const u: u64 = @bitCast(x);100 const u: u64 = @bitCast(x);
...@@ -125,12 +125,12 @@ pub fn floor(x: f64) callconv(.C) f64 {...@@ -125,12 +125,12 @@ pub fn floor(x: f64) callconv(.C) f64 {
125 }125 }
126}126}
127127
128pub fn __floorx(x: f80) callconv(.C) f80 {128pub fn __floorx(x: f80) callconv(.c) f80 {
129 // TODO: more efficient implementation129 // TODO: more efficient implementation
130 return @floatCast(floorq(x));130 return @floatCast(floorq(x));
131}131}
132132
133pub fn floorq(x: f128) callconv(.C) f128 {133pub fn floorq(x: f128) callconv(.c) f128 {
134 const f128_toint = 1.0 / math.floatEps(f128);134 const f128_toint = 1.0 / math.floatEps(f128);
135135
136 const u: u128 = @bitCast(x);136 const u: u128 = @bitCast(x);
...@@ -159,7 +159,7 @@ pub fn floorq(x: f128) callconv(.C) f128 {...@@ -159,7 +159,7 @@ pub fn floorq(x: f128) callconv(.C) f128 {
159 }159 }
160}160}
161161
162pub fn floorl(x: c_longdouble) callconv(.C) c_longdouble {162pub fn floorl(x: c_longdouble) callconv(.c) c_longdouble {
163 switch (@typeInfo(c_longdouble).float.bits) {163 switch (@typeInfo(c_longdouble).float.bits) {
164 16 => return __floorh(x),164 16 => return __floorh(x),
165 32 => return floorf(x),165 32 => return floorf(x),
lib/compiler_rt/fma.zig+6-6
...@@ -24,12 +24,12 @@ comptime {...@@ -24,12 +24,12 @@ comptime {
24 @export(&fmal, .{ .name = "fmal", .linkage = common.linkage, .visibility = common.visibility });24 @export(&fmal, .{ .name = "fmal", .linkage = common.linkage, .visibility = common.visibility });
25}25}
2626
27pub fn __fmah(x: f16, y: f16, z: f16) callconv(.C) f16 {27pub fn __fmah(x: f16, y: f16, z: f16) callconv(.c) f16 {
28 // TODO: more efficient implementation28 // TODO: more efficient implementation
29 return @floatCast(fmaf(x, y, z));29 return @floatCast(fmaf(x, y, z));
30}30}
3131
32pub fn fmaf(x: f32, y: f32, z: f32) callconv(.C) f32 {32pub fn fmaf(x: f32, y: f32, z: f32) callconv(.c) f32 {
33 const xy = @as(f64, x) * y;33 const xy = @as(f64, x) * y;
34 const xy_z = xy + z;34 const xy_z = xy + z;
35 const u = @as(u64, @bitCast(xy_z));35 const u = @as(u64, @bitCast(xy_z));
...@@ -44,7 +44,7 @@ pub fn fmaf(x: f32, y: f32, z: f32) callconv(.C) f32 {...@@ -44,7 +44,7 @@ pub fn fmaf(x: f32, y: f32, z: f32) callconv(.C) f32 {
44}44}
4545
46/// NOTE: Upstream fma.c has been rewritten completely to raise fp exceptions more accurately.46/// NOTE: Upstream fma.c has been rewritten completely to raise fp exceptions more accurately.
47pub fn fma(x: f64, y: f64, z: f64) callconv(.C) f64 {47pub fn fma(x: f64, y: f64, z: f64) callconv(.c) f64 {
48 if (!math.isFinite(x) or !math.isFinite(y)) {48 if (!math.isFinite(x) or !math.isFinite(y)) {
49 return x * y + z;49 return x * y + z;
50 }50 }
...@@ -91,7 +91,7 @@ pub fn fma(x: f64, y: f64, z: f64) callconv(.C) f64 {...@@ -91,7 +91,7 @@ pub fn fma(x: f64, y: f64, z: f64) callconv(.C) f64 {
91 }91 }
92}92}
9393
94pub fn __fmax(a: f80, b: f80, c: f80) callconv(.C) f80 {94pub fn __fmax(a: f80, b: f80, c: f80) callconv(.c) f80 {
95 // TODO: more efficient implementation95 // TODO: more efficient implementation
96 return @floatCast(fmaq(a, b, c));96 return @floatCast(fmaq(a, b, c));
97}97}
...@@ -103,7 +103,7 @@ pub fn __fmax(a: f80, b: f80, c: f80) callconv(.C) f80 {...@@ -103,7 +103,7 @@ pub fn __fmax(a: f80, b: f80, c: f80) callconv(.C) f80 {
103///103///
104/// Dekker, T. A Floating-Point Technique for Extending the104/// Dekker, T. A Floating-Point Technique for Extending the
105/// Available Precision. Numer. Math. 18, 224-242 (1971).105/// Available Precision. Numer. Math. 18, 224-242 (1971).
106pub fn fmaq(x: f128, y: f128, z: f128) callconv(.C) f128 {106pub fn fmaq(x: f128, y: f128, z: f128) callconv(.c) f128 {
107 if (!math.isFinite(x) or !math.isFinite(y)) {107 if (!math.isFinite(x) or !math.isFinite(y)) {
108 return x * y + z;108 return x * y + z;
109 }109 }
...@@ -150,7 +150,7 @@ pub fn fmaq(x: f128, y: f128, z: f128) callconv(.C) f128 {...@@ -150,7 +150,7 @@ pub fn fmaq(x: f128, y: f128, z: f128) callconv(.C) f128 {
150 }150 }
151}151}
152152
153pub fn fmal(x: c_longdouble, y: c_longdouble, z: c_longdouble) callconv(.C) c_longdouble {153pub fn fmal(x: c_longdouble, y: c_longdouble, z: c_longdouble) callconv(.c) c_longdouble {
154 switch (@typeInfo(c_longdouble).float.bits) {154 switch (@typeInfo(c_longdouble).float.bits) {
155 16 => return __fmah(x, y, z),155 16 => return __fmah(x, y, z),
156 32 => return fmaf(x, y, z),156 32 => return fmaf(x, y, z),
lib/compiler_rt/fmax.zig+6-6
...@@ -18,27 +18,27 @@ comptime {...@@ -18,27 +18,27 @@ comptime {
18 @export(&fmaxl, .{ .name = "fmaxl", .linkage = common.linkage, .visibility = common.visibility });18 @export(&fmaxl, .{ .name = "fmaxl", .linkage = common.linkage, .visibility = common.visibility });
19}19}
2020
21pub fn __fmaxh(x: f16, y: f16) callconv(.C) f16 {21pub fn __fmaxh(x: f16, y: f16) callconv(.c) f16 {
22 return generic_fmax(f16, x, y);22 return generic_fmax(f16, x, y);
23}23}
2424
25pub fn fmaxf(x: f32, y: f32) callconv(.C) f32 {25pub fn fmaxf(x: f32, y: f32) callconv(.c) f32 {
26 return generic_fmax(f32, x, y);26 return generic_fmax(f32, x, y);
27}27}
2828
29pub fn fmax(x: f64, y: f64) callconv(.C) f64 {29pub fn fmax(x: f64, y: f64) callconv(.c) f64 {
30 return generic_fmax(f64, x, y);30 return generic_fmax(f64, x, y);
31}31}
3232
33pub fn __fmaxx(x: f80, y: f80) callconv(.C) f80 {33pub fn __fmaxx(x: f80, y: f80) callconv(.c) f80 {
34 return generic_fmax(f80, x, y);34 return generic_fmax(f80, x, y);
35}35}
3636
37pub fn fmaxq(x: f128, y: f128) callconv(.C) f128 {37pub fn fmaxq(x: f128, y: f128) callconv(.c) f128 {
38 return generic_fmax(f128, x, y);38 return generic_fmax(f128, x, y);
39}39}
4040
41pub fn fmaxl(x: c_longdouble, y: c_longdouble) callconv(.C) c_longdouble {41pub fn fmaxl(x: c_longdouble, y: c_longdouble) callconv(.c) c_longdouble {
42 switch (@typeInfo(c_longdouble).float.bits) {42 switch (@typeInfo(c_longdouble).float.bits) {
43 16 => return __fmaxh(x, y),43 16 => return __fmaxh(x, y),
44 32 => return fmaxf(x, y),44 32 => return fmaxf(x, y),
lib/compiler_rt/fmin.zig+6-6
...@@ -18,27 +18,27 @@ comptime {...@@ -18,27 +18,27 @@ comptime {
18 @export(&fminl, .{ .name = "fminl", .linkage = common.linkage, .visibility = common.visibility });18 @export(&fminl, .{ .name = "fminl", .linkage = common.linkage, .visibility = common.visibility });
19}19}
2020
21pub fn __fminh(x: f16, y: f16) callconv(.C) f16 {21pub fn __fminh(x: f16, y: f16) callconv(.c) f16 {
22 return generic_fmin(f16, x, y);22 return generic_fmin(f16, x, y);
23}23}
2424
25pub fn fminf(x: f32, y: f32) callconv(.C) f32 {25pub fn fminf(x: f32, y: f32) callconv(.c) f32 {
26 return generic_fmin(f32, x, y);26 return generic_fmin(f32, x, y);
27}27}
2828
29pub fn fmin(x: f64, y: f64) callconv(.C) f64 {29pub fn fmin(x: f64, y: f64) callconv(.c) f64 {
30 return generic_fmin(f64, x, y);30 return generic_fmin(f64, x, y);
31}31}
3232
33pub fn __fminx(x: f80, y: f80) callconv(.C) f80 {33pub fn __fminx(x: f80, y: f80) callconv(.c) f80 {
34 return generic_fmin(f80, x, y);34 return generic_fmin(f80, x, y);
35}35}
3636
37pub fn fminq(x: f128, y: f128) callconv(.C) f128 {37pub fn fminq(x: f128, y: f128) callconv(.c) f128 {
38 return generic_fmin(f128, x, y);38 return generic_fmin(f128, x, y);
39}39}
4040
41pub fn fminl(x: c_longdouble, y: c_longdouble) callconv(.C) c_longdouble {41pub fn fminl(x: c_longdouble, y: c_longdouble) callconv(.c) c_longdouble {
42 switch (@typeInfo(c_longdouble).float.bits) {42 switch (@typeInfo(c_longdouble).float.bits) {
43 16 => return __fminh(x, y),43 16 => return __fminh(x, y),
44 32 => return fminf(x, y),44 32 => return fminf(x, y),
lib/compiler_rt/fmod.zig+6-6
...@@ -20,22 +20,22 @@ comptime {...@@ -20,22 +20,22 @@ comptime {
20 @export(&fmodl, .{ .name = "fmodl", .linkage = common.linkage, .visibility = common.visibility });20 @export(&fmodl, .{ .name = "fmodl", .linkage = common.linkage, .visibility = common.visibility });
21}21}
2222
23pub fn __fmodh(x: f16, y: f16) callconv(.C) f16 {23pub fn __fmodh(x: f16, y: f16) callconv(.c) f16 {
24 // TODO: more efficient implementation24 // TODO: more efficient implementation
25 return @floatCast(fmodf(x, y));25 return @floatCast(fmodf(x, y));
26}26}
2727
28pub fn fmodf(x: f32, y: f32) callconv(.C) f32 {28pub fn fmodf(x: f32, y: f32) callconv(.c) f32 {
29 return generic_fmod(f32, x, y);29 return generic_fmod(f32, x, y);
30}30}
3131
32pub fn fmod(x: f64, y: f64) callconv(.C) f64 {32pub fn fmod(x: f64, y: f64) callconv(.c) f64 {
33 return generic_fmod(f64, x, y);33 return generic_fmod(f64, x, y);
34}34}
3535
36/// fmodx - floating modulo large, returns the remainder of division for f80 types36/// fmodx - floating modulo large, returns the remainder of division for f80 types
37/// Logic and flow heavily inspired by MUSL fmodl for 113 mantissa digits37/// Logic and flow heavily inspired by MUSL fmodl for 113 mantissa digits
38pub fn __fmodx(a: f80, b: f80) callconv(.C) f80 {38pub fn __fmodx(a: f80, b: f80) callconv(.c) f80 {
39 const T = f80;39 const T = f80;
40 const Z = std.meta.Int(.unsigned, @bitSizeOf(T));40 const Z = std.meta.Int(.unsigned, @bitSizeOf(T));
4141
...@@ -133,7 +133,7 @@ pub fn __fmodx(a: f80, b: f80) callconv(.C) f80 {...@@ -133,7 +133,7 @@ pub fn __fmodx(a: f80, b: f80) callconv(.C) f80 {
133133
134/// fmodq - floating modulo large, returns the remainder of division for f128 types134/// fmodq - floating modulo large, returns the remainder of division for f128 types
135/// Logic and flow heavily inspired by MUSL fmodl for 113 mantissa digits135/// Logic and flow heavily inspired by MUSL fmodl for 113 mantissa digits
136pub fn fmodq(a: f128, b: f128) callconv(.C) f128 {136pub fn fmodq(a: f128, b: f128) callconv(.c) f128 {
137 var amod = a;137 var amod = a;
138 var bmod = b;138 var bmod = b;
139 const aPtr_u64: [*]u64 = @ptrCast(&amod);139 const aPtr_u64: [*]u64 = @ptrCast(&amod);
...@@ -250,7 +250,7 @@ pub fn fmodq(a: f128, b: f128) callconv(.C) f128 {...@@ -250,7 +250,7 @@ pub fn fmodq(a: f128, b: f128) callconv(.C) f128 {
250 return amod;250 return amod;
251}251}
252252
253pub fn fmodl(a: c_longdouble, b: c_longdouble) callconv(.C) c_longdouble {253pub fn fmodl(a: c_longdouble, b: c_longdouble) callconv(.c) c_longdouble {
254 switch (@typeInfo(c_longdouble).float.bits) {254 switch (@typeInfo(c_longdouble).float.bits) {
255 16 => return __fmodh(a, b),255 16 => return __fmodh(a, b),
256 32 => return fmodf(a, b),256 32 => return fmodf(a, b),
lib/compiler_rt/gedf2.zig+4-4
...@@ -17,20 +17,20 @@ comptime {...@@ -17,20 +17,20 @@ comptime {
1717
18/// "These functions return a value greater than or equal to zero if neither18/// "These functions return a value greater than or equal to zero if neither
19/// argument is NaN, and a is greater than or equal to b."19/// argument is NaN, and a is greater than or equal to b."
20pub fn __gedf2(a: f64, b: f64) callconv(.C) i32 {20pub fn __gedf2(a: f64, b: f64) callconv(.c) i32 {
21 return @intFromEnum(comparef.cmpf2(f64, comparef.GE, a, b));21 return @intFromEnum(comparef.cmpf2(f64, comparef.GE, a, b));
22}22}
2323
24/// "These functions return a value greater than zero if neither argument is NaN,24/// "These functions return a value greater than zero if neither argument is NaN,
25/// and a is strictly greater than b."25/// and a is strictly greater than b."
26pub fn __gtdf2(a: f64, b: f64) callconv(.C) i32 {26pub fn __gtdf2(a: f64, b: f64) callconv(.c) i32 {
27 return __gedf2(a, b);27 return __gedf2(a, b);
28}28}
2929
30fn __aeabi_dcmpge(a: f64, b: f64) callconv(.AAPCS) i32 {30fn __aeabi_dcmpge(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 {
31 return @intFromBool(comparef.cmpf2(f64, comparef.GE, a, b) != .Less);31 return @intFromBool(comparef.cmpf2(f64, comparef.GE, a, b) != .Less);
32}32}
3333
34fn __aeabi_dcmpgt(a: f64, b: f64) callconv(.AAPCS) i32 {34fn __aeabi_dcmpgt(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 {
35 return @intFromBool(comparef.cmpf2(f64, comparef.GE, a, b) == .Greater);35 return @intFromBool(comparef.cmpf2(f64, comparef.GE, a, b) == .Greater);
36}36}
lib/compiler_rt/gehf2.zig+2-2
...@@ -12,12 +12,12 @@ comptime {...@@ -12,12 +12,12 @@ comptime {
1212
13/// "These functions return a value greater than or equal to zero if neither13/// "These functions return a value greater than or equal to zero if neither
14/// argument is NaN, and a is greater than or equal to b."14/// argument is NaN, and a is greater than or equal to b."
15pub fn __gehf2(a: f16, b: f16) callconv(.C) i32 {15pub fn __gehf2(a: f16, b: f16) callconv(.c) i32 {
16 return @intFromEnum(comparef.cmpf2(f16, comparef.GE, a, b));16 return @intFromEnum(comparef.cmpf2(f16, comparef.GE, a, b));
17}17}
1818
19/// "These functions return a value greater than zero if neither argument is NaN,19/// "These functions return a value greater than zero if neither argument is NaN,
20/// and a is strictly greater than b."20/// and a is strictly greater than b."
21pub fn __gthf2(a: f16, b: f16) callconv(.C) i32 {21pub fn __gthf2(a: f16, b: f16) callconv(.c) i32 {
22 return __gehf2(a, b);22 return __gehf2(a, b);
23}23}
lib/compiler_rt/gesf2.zig+4-4
...@@ -17,20 +17,20 @@ comptime {...@@ -17,20 +17,20 @@ comptime {
1717
18/// "These functions return a value greater than or equal to zero if neither18/// "These functions return a value greater than or equal to zero if neither
19/// argument is NaN, and a is greater than or equal to b."19/// argument is NaN, and a is greater than or equal to b."
20pub fn __gesf2(a: f32, b: f32) callconv(.C) i32 {20pub fn __gesf2(a: f32, b: f32) callconv(.c) i32 {
21 return @intFromEnum(comparef.cmpf2(f32, comparef.GE, a, b));21 return @intFromEnum(comparef.cmpf2(f32, comparef.GE, a, b));
22}22}
2323
24/// "These functions return a value greater than zero if neither argument is NaN,24/// "These functions return a value greater than zero if neither argument is NaN,
25/// and a is strictly greater than b."25/// and a is strictly greater than b."
26pub fn __gtsf2(a: f32, b: f32) callconv(.C) i32 {26pub fn __gtsf2(a: f32, b: f32) callconv(.c) i32 {
27 return __gesf2(a, b);27 return __gesf2(a, b);
28}28}
2929
30fn __aeabi_fcmpge(a: f32, b: f32) callconv(.AAPCS) i32 {30fn __aeabi_fcmpge(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 {
31 return @intFromBool(comparef.cmpf2(f32, comparef.GE, a, b) != .Less);31 return @intFromBool(comparef.cmpf2(f32, comparef.GE, a, b) != .Less);
32}32}
3333
34fn __aeabi_fcmpgt(a: f32, b: f32) callconv(.AAPCS) i32 {34fn __aeabi_fcmpgt(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 {
35 return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) == .Greater);35 return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) == .Greater);
36}36}
lib/compiler_rt/getf2.zig+2-2
...@@ -19,12 +19,12 @@ comptime {...@@ -19,12 +19,12 @@ comptime {
1919
20/// "These functions return a value greater than or equal to zero if neither20/// "These functions return a value greater than or equal to zero if neither
21/// argument is NaN, and a is greater than or equal to b."21/// argument is NaN, and a is greater than or equal to b."
22fn __getf2(a: f128, b: f128) callconv(.C) i32 {22fn __getf2(a: f128, b: f128) callconv(.c) i32 {
23 return @intFromEnum(comparef.cmpf2(f128, comparef.GE, a, b));23 return @intFromEnum(comparef.cmpf2(f128, comparef.GE, a, b));
24}24}
2525
26/// "These functions return a value greater than zero if neither argument is NaN,26/// "These functions return a value greater than zero if neither argument is NaN,
27/// and a is strictly greater than b."27/// and a is strictly greater than b."
28fn __gttf2(a: f128, b: f128) callconv(.C) i32 {28fn __gttf2(a: f128, b: f128) callconv(.c) i32 {
29 return __getf2(a, b);29 return __getf2(a, b);
30}30}
lib/compiler_rt/gexf2.zig+2-2
...@@ -8,10 +8,10 @@ comptime {...@@ -8,10 +8,10 @@ comptime {
8 @export(&__gtxf2, .{ .name = "__gtxf2", .linkage = common.linkage, .visibility = common.visibility });8 @export(&__gtxf2, .{ .name = "__gtxf2", .linkage = common.linkage, .visibility = common.visibility });
9}9}
1010
11fn __gexf2(a: f80, b: f80) callconv(.C) i32 {11fn __gexf2(a: f80, b: f80) callconv(.c) i32 {
12 return @intFromEnum(comparef.cmp_f80(comparef.GE, a, b));12 return @intFromEnum(comparef.cmp_f80(comparef.GE, a, b));
13}13}
1414
15fn __gtxf2(a: f80, b: f80) callconv(.C) i32 {15fn __gtxf2(a: f80, b: f80) callconv(.c) i32 {
16 return __gexf2(a, b);16 return __gexf2(a, b);
17}17}
lib/compiler_rt/int.zig+15-15
...@@ -34,7 +34,7 @@ comptime {...@@ -34,7 +34,7 @@ comptime {
34 @export(&__udivmodsi4, .{ .name = "__udivmodsi4", .linkage = common.linkage, .visibility = common.visibility });34 @export(&__udivmodsi4, .{ .name = "__udivmodsi4", .linkage = common.linkage, .visibility = common.visibility });
35}35}
3636
37pub fn __divmodti4(a: i128, b: i128, rem: *i128) callconv(.C) i128 {37pub fn __divmodti4(a: i128, b: i128, rem: *i128) callconv(.c) i128 {
38 const d = __divti3(a, b);38 const d = __divti3(a, b);
39 rem.* = a -% (d * b);39 rem.* = a -% (d * b);
40 return d;40 return d;
...@@ -67,7 +67,7 @@ fn test_one_divmodti4(a: i128, b: i128, expected_q: i128, expected_r: i128) !voi...@@ -67,7 +67,7 @@ fn test_one_divmodti4(a: i128, b: i128, expected_q: i128, expected_r: i128) !voi
67 try testing.expect(q == expected_q and r == expected_r);67 try testing.expect(q == expected_q and r == expected_r);
68}68}
6969
70pub fn __divmoddi4(a: i64, b: i64, rem: *i64) callconv(.C) i64 {70pub fn __divmoddi4(a: i64, b: i64, rem: *i64) callconv(.c) i64 {
71 const d = __divdi3(a, b);71 const d = __divdi3(a, b);
72 rem.* = a -% (d * b);72 rem.* = a -% (d * b);
73 return d;73 return d;
...@@ -101,7 +101,7 @@ test "test_divmoddi4" {...@@ -101,7 +101,7 @@ test "test_divmoddi4" {
101 }101 }
102}102}
103103
104pub fn __udivmoddi4(a: u64, b: u64, maybe_rem: ?*u64) callconv(.C) u64 {104pub fn __udivmoddi4(a: u64, b: u64, maybe_rem: ?*u64) callconv(.c) u64 {
105 return udivmod(u64, a, b, maybe_rem);105 return udivmod(u64, a, b, maybe_rem);
106}106}
107107
...@@ -109,7 +109,7 @@ test "test_udivmoddi4" {...@@ -109,7 +109,7 @@ test "test_udivmoddi4" {
109 _ = @import("udivmoddi4_test.zig");109 _ = @import("udivmoddi4_test.zig");
110}110}
111111
112pub fn __divdi3(a: i64, b: i64) callconv(.C) i64 {112pub fn __divdi3(a: i64, b: i64) callconv(.c) i64 {
113 // Set aside the sign of the quotient.113 // Set aside the sign of the quotient.
114 const sign: u64 = @bitCast((a ^ b) >> 63);114 const sign: u64 = @bitCast((a ^ b) >> 63);
115 // Take absolute value of a and b via abs(x) = (x^(x >> 63)) - (x >> 63).115 // Take absolute value of a and b via abs(x) = (x^(x >> 63)) - (x >> 63).
...@@ -146,7 +146,7 @@ fn test_one_divdi3(a: i64, b: i64, expected_q: i64) !void {...@@ -146,7 +146,7 @@ fn test_one_divdi3(a: i64, b: i64, expected_q: i64) !void {
146 try testing.expect(q == expected_q);146 try testing.expect(q == expected_q);
147}147}
148148
149pub fn __moddi3(a: i64, b: i64) callconv(.C) i64 {149pub fn __moddi3(a: i64, b: i64) callconv(.c) i64 {
150 // Take absolute value of a and b via abs(x) = (x^(x >> 63)) - (x >> 63).150 // Take absolute value of a and b via abs(x) = (x^(x >> 63)) - (x >> 63).
151 const abs_a = (a ^ (a >> 63)) -% (a >> 63);151 const abs_a = (a ^ (a >> 63)) -% (a >> 63);
152 const abs_b = (b ^ (b >> 63)) -% (b >> 63);152 const abs_b = (b ^ (b >> 63)) -% (b >> 63);
...@@ -184,11 +184,11 @@ fn test_one_moddi3(a: i64, b: i64, expected_r: i64) !void {...@@ -184,11 +184,11 @@ fn test_one_moddi3(a: i64, b: i64, expected_r: i64) !void {
184 try testing.expect(r == expected_r);184 try testing.expect(r == expected_r);
185}185}
186186
187pub fn __udivdi3(a: u64, b: u64) callconv(.C) u64 {187pub fn __udivdi3(a: u64, b: u64) callconv(.c) u64 {
188 return __udivmoddi4(a, b, null);188 return __udivmoddi4(a, b, null);
189}189}
190190
191pub fn __umoddi3(a: u64, b: u64) callconv(.C) u64 {191pub fn __umoddi3(a: u64, b: u64) callconv(.c) u64 {
192 var r: u64 = undefined;192 var r: u64 = undefined;
193 _ = __udivmoddi4(a, b, &r);193 _ = __udivmoddi4(a, b, &r);
194 return r;194 return r;
...@@ -207,7 +207,7 @@ fn test_one_umoddi3(a: u64, b: u64, expected_r: u64) !void {...@@ -207,7 +207,7 @@ fn test_one_umoddi3(a: u64, b: u64, expected_r: u64) !void {
207 try testing.expect(r == expected_r);207 try testing.expect(r == expected_r);
208}208}
209209
210pub fn __divmodsi4(a: i32, b: i32, rem: *i32) callconv(.C) i32 {210pub fn __divmodsi4(a: i32, b: i32, rem: *i32) callconv(.c) i32 {
211 const d = __divsi3(a, b);211 const d = __divsi3(a, b);
212 rem.* = a -% (d * b);212 rem.* = a -% (d * b);
213 return d;213 return d;
...@@ -241,17 +241,17 @@ test "test_divmodsi4" {...@@ -241,17 +241,17 @@ test "test_divmodsi4" {
241 }241 }
242}242}
243243
244pub fn __udivmodsi4(a: u32, b: u32, rem: *u32) callconv(.C) u32 {244pub fn __udivmodsi4(a: u32, b: u32, rem: *u32) callconv(.c) u32 {
245 const d = __udivsi3(a, b);245 const d = __udivsi3(a, b);
246 rem.* = @bitCast(@as(i32, @bitCast(a)) -% (@as(i32, @bitCast(d)) * @as(i32, @bitCast(b))));246 rem.* = @bitCast(@as(i32, @bitCast(a)) -% (@as(i32, @bitCast(d)) * @as(i32, @bitCast(b))));
247 return d;247 return d;
248}248}
249249
250pub fn __divsi3(n: i32, d: i32) callconv(.C) i32 {250pub fn __divsi3(n: i32, d: i32) callconv(.c) i32 {
251 return div_i32(n, d);251 return div_i32(n, d);
252}252}
253253
254fn __aeabi_idiv(n: i32, d: i32) callconv(.AAPCS) i32 {254fn __aeabi_idiv(n: i32, d: i32) callconv(.{ .arm_aapcs = .{} }) i32 {
255 return div_i32(n, d);255 return div_i32(n, d);
256}256}
257257
...@@ -292,11 +292,11 @@ fn test_one_divsi3(a: i32, b: i32, expected_q: i32) !void {...@@ -292,11 +292,11 @@ fn test_one_divsi3(a: i32, b: i32, expected_q: i32) !void {
292 try testing.expect(q == expected_q);292 try testing.expect(q == expected_q);
293}293}
294294
295pub fn __udivsi3(n: u32, d: u32) callconv(.C) u32 {295pub fn __udivsi3(n: u32, d: u32) callconv(.c) u32 {
296 return div_u32(n, d);296 return div_u32(n, d);
297}297}
298298
299fn __aeabi_uidiv(n: u32, d: u32) callconv(.AAPCS) u32 {299fn __aeabi_uidiv(n: u32, d: u32) callconv(.{ .arm_aapcs = .{} }) u32 {
300 return div_u32(n, d);300 return div_u32(n, d);
301}301}
302302
...@@ -485,7 +485,7 @@ fn test_one_udivsi3(a: u32, b: u32, expected_q: u32) !void {...@@ -485,7 +485,7 @@ fn test_one_udivsi3(a: u32, b: u32, expected_q: u32) !void {
485 try testing.expect(q == expected_q);485 try testing.expect(q == expected_q);
486}486}
487487
488pub fn __modsi3(n: i32, d: i32) callconv(.C) i32 {488pub fn __modsi3(n: i32, d: i32) callconv(.c) i32 {
489 return n -% __divsi3(n, d) * d;489 return n -% __divsi3(n, d) * d;
490}490}
491491
...@@ -514,7 +514,7 @@ fn test_one_modsi3(a: i32, b: i32, expected_r: i32) !void {...@@ -514,7 +514,7 @@ fn test_one_modsi3(a: i32, b: i32, expected_r: i32) !void {
514 try testing.expect(r == expected_r);514 try testing.expect(r == expected_r);
515}515}
516516
517pub fn __umodsi3(n: u32, d: u32) callconv(.C) u32 {517pub fn __umodsi3(n: u32, d: u32) callconv(.c) u32 {
518 return n -% __udivsi3(n, d) * d;518 return n -% __udivsi3(n, d) * d;
519}519}
520520
lib/compiler_rt/log.zig+6-6
...@@ -25,12 +25,12 @@ comptime {...@@ -25,12 +25,12 @@ comptime {
25 @export(&logl, .{ .name = "logl", .linkage = common.linkage, .visibility = common.visibility });25 @export(&logl, .{ .name = "logl", .linkage = common.linkage, .visibility = common.visibility });
26}26}
2727
28pub fn __logh(a: f16) callconv(.C) f16 {28pub fn __logh(a: f16) callconv(.c) f16 {
29 // TODO: more efficient implementation29 // TODO: more efficient implementation
30 return @floatCast(logf(a));30 return @floatCast(logf(a));
31}31}
3232
33pub fn logf(x_: f32) callconv(.C) f32 {33pub fn logf(x_: f32) callconv(.c) f32 {
34 const ln2_hi: f32 = 6.9313812256e-01;34 const ln2_hi: f32 = 6.9313812256e-01;
35 const ln2_lo: f32 = 9.0580006145e-06;35 const ln2_lo: f32 = 9.0580006145e-06;
36 const Lg1: f32 = 0xaaaaaa.0p-24;36 const Lg1: f32 = 0xaaaaaa.0p-24;
...@@ -82,7 +82,7 @@ pub fn logf(x_: f32) callconv(.C) f32 {...@@ -82,7 +82,7 @@ pub fn logf(x_: f32) callconv(.C) f32 {
82 return s * (hfsq + R) + dk * ln2_lo - hfsq + f + dk * ln2_hi;82 return s * (hfsq + R) + dk * ln2_lo - hfsq + f + dk * ln2_hi;
83}83}
8484
85pub fn log(x_: f64) callconv(.C) f64 {85pub fn log(x_: f64) callconv(.c) f64 {
86 const ln2_hi: f64 = 6.93147180369123816490e-01;86 const ln2_hi: f64 = 6.93147180369123816490e-01;
87 const ln2_lo: f64 = 1.90821492927058770002e-10;87 const ln2_lo: f64 = 1.90821492927058770002e-10;
88 const Lg1: f64 = 6.666666666666735130e-01;88 const Lg1: f64 = 6.666666666666735130e-01;
...@@ -138,17 +138,17 @@ pub fn log(x_: f64) callconv(.C) f64 {...@@ -138,17 +138,17 @@ pub fn log(x_: f64) callconv(.C) f64 {
138 return s * (hfsq + R) + dk * ln2_lo - hfsq + f + dk * ln2_hi;138 return s * (hfsq + R) + dk * ln2_lo - hfsq + f + dk * ln2_hi;
139}139}
140140
141pub fn __logx(a: f80) callconv(.C) f80 {141pub fn __logx(a: f80) callconv(.c) f80 {
142 // TODO: more efficient implementation142 // TODO: more efficient implementation
143 return @floatCast(logq(a));143 return @floatCast(logq(a));
144}144}
145145
146pub fn logq(a: f128) callconv(.C) f128 {146pub fn logq(a: f128) callconv(.c) f128 {
147 // TODO: more correct implementation147 // TODO: more correct implementation
148 return log(@floatCast(a));148 return log(@floatCast(a));
149}149}
150150
151pub fn logl(x: c_longdouble) callconv(.C) c_longdouble {151pub fn logl(x: c_longdouble) callconv(.c) c_longdouble {
152 switch (@typeInfo(c_longdouble).float.bits) {152 switch (@typeInfo(c_longdouble).float.bits) {
153 16 => return __logh(x),153 16 => return __logh(x),
154 32 => return logf(x),154 32 => return logf(x),
lib/compiler_rt/log10.zig+6-6
...@@ -26,12 +26,12 @@ comptime {...@@ -26,12 +26,12 @@ comptime {
26 @export(&log10l, .{ .name = "log10l", .linkage = common.linkage, .visibility = common.visibility });26 @export(&log10l, .{ .name = "log10l", .linkage = common.linkage, .visibility = common.visibility });
27}27}
2828
29pub fn __log10h(a: f16) callconv(.C) f16 {29pub fn __log10h(a: f16) callconv(.c) f16 {
30 // TODO: more efficient implementation30 // TODO: more efficient implementation
31 return @floatCast(log10f(a));31 return @floatCast(log10f(a));
32}32}
3333
34pub fn log10f(x_: f32) callconv(.C) f32 {34pub fn log10f(x_: f32) callconv(.c) f32 {
35 const ivln10hi: f32 = 4.3432617188e-01;35 const ivln10hi: f32 = 4.3432617188e-01;
36 const ivln10lo: f32 = -3.1689971365e-05;36 const ivln10lo: f32 = -3.1689971365e-05;
37 const log10_2hi: f32 = 3.0102920532e-01;37 const log10_2hi: f32 = 3.0102920532e-01;
...@@ -91,7 +91,7 @@ pub fn log10f(x_: f32) callconv(.C) f32 {...@@ -91,7 +91,7 @@ pub fn log10f(x_: f32) callconv(.C) f32 {
91 return dk * log10_2lo + (lo + hi) * ivln10lo + lo * ivln10hi + hi * ivln10hi + dk * log10_2hi;91 return dk * log10_2lo + (lo + hi) * ivln10lo + lo * ivln10hi + hi * ivln10hi + dk * log10_2hi;
92}92}
9393
94pub fn log10(x_: f64) callconv(.C) f64 {94pub fn log10(x_: f64) callconv(.c) f64 {
95 const ivln10hi: f64 = 4.34294481878168880939e-01;95 const ivln10hi: f64 = 4.34294481878168880939e-01;
96 const ivln10lo: f64 = 2.50829467116452752298e-11;96 const ivln10lo: f64 = 2.50829467116452752298e-11;
97 const log10_2hi: f64 = 3.01029995663611771306e-01;97 const log10_2hi: f64 = 3.01029995663611771306e-01;
...@@ -166,17 +166,17 @@ pub fn log10(x_: f64) callconv(.C) f64 {...@@ -166,17 +166,17 @@ pub fn log10(x_: f64) callconv(.C) f64 {
166 return val_lo + val_hi;166 return val_lo + val_hi;
167}167}
168168
169pub fn __log10x(a: f80) callconv(.C) f80 {169pub fn __log10x(a: f80) callconv(.c) f80 {
170 // TODO: more efficient implementation170 // TODO: more efficient implementation
171 return @floatCast(log10q(a));171 return @floatCast(log10q(a));
172}172}
173173
174pub fn log10q(a: f128) callconv(.C) f128 {174pub fn log10q(a: f128) callconv(.c) f128 {
175 // TODO: more correct implementation175 // TODO: more correct implementation
176 return log10(@floatCast(a));176 return log10(@floatCast(a));
177}177}
178178
179pub fn log10l(x: c_longdouble) callconv(.C) c_longdouble {179pub fn log10l(x: c_longdouble) callconv(.c) c_longdouble {
180 switch (@typeInfo(c_longdouble).float.bits) {180 switch (@typeInfo(c_longdouble).float.bits) {
181 16 => return __log10h(x),181 16 => return __log10h(x),
182 32 => return log10f(x),182 32 => return log10f(x),
lib/compiler_rt/log2.zig+6-6
...@@ -26,12 +26,12 @@ comptime {...@@ -26,12 +26,12 @@ comptime {
26 @export(&log2l, .{ .name = "log2l", .linkage = common.linkage, .visibility = common.visibility });26 @export(&log2l, .{ .name = "log2l", .linkage = common.linkage, .visibility = common.visibility });
27}27}
2828
29pub fn __log2h(a: f16) callconv(.C) f16 {29pub fn __log2h(a: f16) callconv(.c) f16 {
30 // TODO: more efficient implementation30 // TODO: more efficient implementation
31 return @floatCast(log2f(a));31 return @floatCast(log2f(a));
32}32}
3333
34pub fn log2f(x_: f32) callconv(.C) f32 {34pub fn log2f(x_: f32) callconv(.c) f32 {
35 const ivln2hi: f32 = 1.4428710938e+00;35 const ivln2hi: f32 = 1.4428710938e+00;
36 const ivln2lo: f32 = -1.7605285393e-04;36 const ivln2lo: f32 = -1.7605285393e-04;
37 const Lg1: f32 = 0xaaaaaa.0p-24;37 const Lg1: f32 = 0xaaaaaa.0p-24;
...@@ -87,7 +87,7 @@ pub fn log2f(x_: f32) callconv(.C) f32 {...@@ -87,7 +87,7 @@ pub fn log2f(x_: f32) callconv(.C) f32 {
87 return (lo + hi) * ivln2lo + lo * ivln2hi + hi * ivln2hi + @as(f32, @floatFromInt(k));87 return (lo + hi) * ivln2lo + lo * ivln2hi + hi * ivln2hi + @as(f32, @floatFromInt(k));
88}88}
8989
90pub fn log2(x_: f64) callconv(.C) f64 {90pub fn log2(x_: f64) callconv(.c) f64 {
91 const ivln2hi: f64 = 1.44269504072144627571e+00;91 const ivln2hi: f64 = 1.44269504072144627571e+00;
92 const ivln2lo: f64 = 1.67517131648865118353e-10;92 const ivln2lo: f64 = 1.67517131648865118353e-10;
93 const Lg1: f64 = 6.666666666666735130e-01;93 const Lg1: f64 = 6.666666666666735130e-01;
...@@ -158,17 +158,17 @@ pub fn log2(x_: f64) callconv(.C) f64 {...@@ -158,17 +158,17 @@ pub fn log2(x_: f64) callconv(.C) f64 {
158 return val_lo + val_hi;158 return val_lo + val_hi;
159}159}
160160
161pub fn __log2x(a: f80) callconv(.C) f80 {161pub fn __log2x(a: f80) callconv(.c) f80 {
162 // TODO: more efficient implementation162 // TODO: more efficient implementation
163 return @floatCast(log2q(a));163 return @floatCast(log2q(a));
164}164}
165165
166pub fn log2q(a: f128) callconv(.C) f128 {166pub fn log2q(a: f128) callconv(.c) f128 {
167 // TODO: more correct implementation167 // TODO: more correct implementation
168 return log2(@floatCast(a));168 return log2(@floatCast(a));
169}169}
170170
171pub fn log2l(x: c_longdouble) callconv(.C) c_longdouble {171pub fn log2l(x: c_longdouble) callconv(.c) c_longdouble {
172 switch (@typeInfo(c_longdouble).float.bits) {172 switch (@typeInfo(c_longdouble).float.bits) {
173 16 => return __log2h(x),173 16 => return __log2h(x),
174 32 => return log2f(x),174 32 => return log2f(x),
lib/compiler_rt/memcmp.zig+1-1
...@@ -5,7 +5,7 @@ comptime {...@@ -5,7 +5,7 @@ comptime {
5 @export(&memcmp, .{ .name = "memcmp", .linkage = common.linkage, .visibility = common.visibility });5 @export(&memcmp, .{ .name = "memcmp", .linkage = common.linkage, .visibility = common.visibility });
6}6}
77
8pub fn memcmp(vl: [*]const u8, vr: [*]const u8, n: usize) callconv(.C) c_int {8pub fn memcmp(vl: [*]const u8, vr: [*]const u8, n: usize) callconv(.c) c_int {
9 var i: usize = 0;9 var i: usize = 0;
10 while (i < n) : (i += 1) {10 while (i < n) : (i += 1) {
11 const compared = @as(c_int, vl[i]) -% @as(c_int, vr[i]);11 const compared = @as(c_int, vl[i]) -% @as(c_int, vr[i]);
lib/compiler_rt/memcpy.zig+2-2
...@@ -24,7 +24,7 @@ comptime {...@@ -24,7 +24,7 @@ comptime {
24 assert(std.math.isPowerOfTwo(@sizeOf(Element)));24 assert(std.math.isPowerOfTwo(@sizeOf(Element)));
25}25}
2626
27fn memcpySmall(noalias dest: ?[*]u8, noalias src: ?[*]const u8, len: usize) callconv(.C) ?[*]u8 {27fn memcpySmall(noalias dest: ?[*]u8, noalias src: ?[*]const u8, len: usize) callconv(.c) ?[*]u8 {
28 @setRuntimeSafety(false);28 @setRuntimeSafety(false);
2929
30 for (0..len) |i| {30 for (0..len) |i| {
...@@ -34,7 +34,7 @@ fn memcpySmall(noalias dest: ?[*]u8, noalias src: ?[*]const u8, len: usize) call...@@ -34,7 +34,7 @@ fn memcpySmall(noalias dest: ?[*]u8, noalias src: ?[*]const u8, len: usize) call
34 return dest;34 return dest;
35}35}
3636
37fn memcpyFast(noalias dest: ?[*]u8, noalias src: ?[*]const u8, len: usize) callconv(.C) ?[*]u8 {37fn memcpyFast(noalias dest: ?[*]u8, noalias src: ?[*]const u8, len: usize) callconv(.c) ?[*]u8 {
38 @setRuntimeSafety(false);38 @setRuntimeSafety(false);
3939
40 const small_limit = 2 * @sizeOf(Element);40 const small_limit = 2 * @sizeOf(Element);
lib/compiler_rt/memmove.zig+2-2
...@@ -21,7 +21,7 @@ comptime {...@@ -21,7 +21,7 @@ comptime {
21 }21 }
22}22}
2323
24fn memmoveSmall(opt_dest: ?[*]u8, opt_src: ?[*]const u8, len: usize) callconv(.C) ?[*]u8 {24fn memmoveSmall(opt_dest: ?[*]u8, opt_src: ?[*]const u8, len: usize) callconv(.c) ?[*]u8 {
25 const dest = opt_dest.?;25 const dest = opt_dest.?;
26 const src = opt_src.?;26 const src = opt_src.?;
2727
...@@ -38,7 +38,7 @@ fn memmoveSmall(opt_dest: ?[*]u8, opt_src: ?[*]const u8, len: usize) callconv(.C...@@ -38,7 +38,7 @@ fn memmoveSmall(opt_dest: ?[*]u8, opt_src: ?[*]const u8, len: usize) callconv(.C
38 return dest;38 return dest;
39}39}
4040
41fn memmoveFast(dest: ?[*]u8, src: ?[*]u8, len: usize) callconv(.C) ?[*]u8 {41fn memmoveFast(dest: ?[*]u8, src: ?[*]u8, len: usize) callconv(.c) ?[*]u8 {
42 @setRuntimeSafety(builtin.is_test);42 @setRuntimeSafety(builtin.is_test);
43 const small_limit = @max(2 * @sizeOf(Element), @sizeOf(Element));43 const small_limit = @max(2 * @sizeOf(Element), @sizeOf(Element));
4444
lib/compiler_rt/memset.zig+2-2
...@@ -9,7 +9,7 @@ comptime {...@@ -9,7 +9,7 @@ comptime {
9 }9 }
10}10}
1111
12pub fn memset(dest: ?[*]u8, c: u8, len: usize) callconv(.C) ?[*]u8 {12pub fn memset(dest: ?[*]u8, c: u8, len: usize) callconv(.c) ?[*]u8 {
13 @setRuntimeSafety(false);13 @setRuntimeSafety(false);
1414
15 if (len != 0) {15 if (len != 0) {
...@@ -26,7 +26,7 @@ pub fn memset(dest: ?[*]u8, c: u8, len: usize) callconv(.C) ?[*]u8 {...@@ -26,7 +26,7 @@ pub fn memset(dest: ?[*]u8, c: u8, len: usize) callconv(.C) ?[*]u8 {
26 return dest;26 return dest;
27}27}
2828
29pub fn __memset(dest: ?[*]u8, c: u8, n: usize, dest_n: usize) callconv(.C) ?[*]u8 {29pub fn __memset(dest: ?[*]u8, c: u8, n: usize, dest_n: usize) callconv(.c) ?[*]u8 {
30 if (dest_n < n)30 if (dest_n < n)
31 @panic("buffer overflow");31 @panic("buffer overflow");
32 return memset(dest, c, n);32 return memset(dest, c, n);
lib/compiler_rt/modti3.zig+2-2
...@@ -17,13 +17,13 @@ comptime {...@@ -17,13 +17,13 @@ comptime {
17 }17 }
18}18}
1919
20pub fn __modti3(a: i128, b: i128) callconv(.C) i128 {20pub fn __modti3(a: i128, b: i128) callconv(.c) i128 {
21 return mod(a, b);21 return mod(a, b);
22}22}
2323
24const v2u64 = @Vector(2, u64);24const v2u64 = @Vector(2, u64);
2525
26fn __modti3_windows_x86_64(a: v2u64, b: v2u64) callconv(.C) v2u64 {26fn __modti3_windows_x86_64(a: v2u64, b: v2u64) callconv(.c) v2u64 {
27 return @bitCast(mod(@as(i128, @bitCast(a)), @as(i128, @bitCast(b))));27 return @bitCast(mod(@as(i128, @bitCast(a)), @as(i128, @bitCast(b))));
28}28}
2929
lib/compiler_rt/mulXi3.zig+5-5
...@@ -20,7 +20,7 @@ comptime {...@@ -20,7 +20,7 @@ comptime {
20 }20 }
21}21}
2222
23pub fn __mulsi3(a: i32, b: i32) callconv(.C) i32 {23pub fn __mulsi3(a: i32, b: i32) callconv(.c) i32 {
24 var ua: u32 = @bitCast(a);24 var ua: u32 = @bitCast(a);
25 var ub: u32 = @bitCast(b);25 var ub: u32 = @bitCast(b);
26 var r: u32 = 0;26 var r: u32 = 0;
...@@ -34,11 +34,11 @@ pub fn __mulsi3(a: i32, b: i32) callconv(.C) i32 {...@@ -34,11 +34,11 @@ pub fn __mulsi3(a: i32, b: i32) callconv(.C) i32 {
34 return @bitCast(r);34 return @bitCast(r);
35}35}
3636
37pub fn __muldi3(a: i64, b: i64) callconv(.C) i64 {37pub fn __muldi3(a: i64, b: i64) callconv(.c) i64 {
38 return mulX(i64, a, b);38 return mulX(i64, a, b);
39}39}
4040
41fn __aeabi_lmul(a: i64, b: i64) callconv(.AAPCS) i64 {41fn __aeabi_lmul(a: i64, b: i64) callconv(.{ .arm_aapcs = .{} }) i64 {
42 return mulX(i64, a, b);42 return mulX(i64, a, b);
43}43}
4444
...@@ -86,13 +86,13 @@ fn muldXi(comptime T: type, a: T, b: T) DoubleInt(T) {...@@ -86,13 +86,13 @@ fn muldXi(comptime T: type, a: T, b: T) DoubleInt(T) {
86 return r.all;86 return r.all;
87}87}
8888
89pub fn __multi3(a: i128, b: i128) callconv(.C) i128 {89pub fn __multi3(a: i128, b: i128) callconv(.c) i128 {
90 return mulX(i128, a, b);90 return mulX(i128, a, b);
91}91}
9292
93const v2u64 = @Vector(2, u64);93const v2u64 = @Vector(2, u64);
9494
95fn __multi3_windows_x86_64(a: v2u64, b: v2u64) callconv(.C) v2u64 {95fn __multi3_windows_x86_64(a: v2u64, b: v2u64) callconv(.c) v2u64 {
96 return @bitCast(mulX(i128, @as(i128, @bitCast(a)), @as(i128, @bitCast(b))));96 return @bitCast(mulX(i128, @as(i128, @bitCast(a)), @as(i128, @bitCast(b))));
97}97}
9898
lib/compiler_rt/mulc3_test.zig+1-1
...@@ -17,7 +17,7 @@ test "mulc3" {...@@ -17,7 +17,7 @@ test "mulc3" {
17 try testMul(f128, __multc3);17 try testMul(f128, __multc3);
18}18}
1919
20fn testMul(comptime T: type, comptime f: fn (T, T, T, T) callconv(.C) Complex(T)) !void {20fn testMul(comptime T: type, comptime f: fn (T, T, T, T) callconv(.c) Complex(T)) !void {
21 {21 {
22 const a: T = 1.0;22 const a: T = 1.0;
23 const b: T = 0.0;23 const b: T = 0.0;
lib/compiler_rt/muldc3.zig+1-1
...@@ -9,6 +9,6 @@ comptime {...@@ -9,6 +9,6 @@ comptime {
9 }9 }
10}10}
1111
12pub fn __muldc3(a: f64, b: f64, c: f64, d: f64) callconv(.C) mulc3.Complex(f64) {12pub fn __muldc3(a: f64, b: f64, c: f64, d: f64) callconv(.c) mulc3.Complex(f64) {
13 return mulc3.mulc3(f64, a, b, c, d);13 return mulc3.mulc3(f64, a, b, c, d);
14}14}
lib/compiler_rt/muldf3.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14pub fn __muldf3(a: f64, b: f64) callconv(.C) f64 {14pub fn __muldf3(a: f64, b: f64) callconv(.c) f64 {
15 return mulf3(f64, a, b);15 return mulf3(f64, a, b);
16}16}
1717
18fn __aeabi_dmul(a: f64, b: f64) callconv(.AAPCS) f64 {18fn __aeabi_dmul(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 {
19 return mulf3(f64, a, b);19 return mulf3(f64, a, b);
20}20}
lib/compiler_rt/mulhc3.zig+1-1
...@@ -9,6 +9,6 @@ comptime {...@@ -9,6 +9,6 @@ comptime {
9 }9 }
10}10}
1111
12pub fn __mulhc3(a: f16, b: f16, c: f16, d: f16) callconv(.C) mulc3.Complex(f16) {12pub fn __mulhc3(a: f16, b: f16, c: f16, d: f16) callconv(.c) mulc3.Complex(f16) {
13 return mulc3.mulc3(f16, a, b, c, d);13 return mulc3.mulc3(f16, a, b, c, d);
14}14}
lib/compiler_rt/mulhf3.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__mulhf3, .{ .name = "__mulhf3", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__mulhf3, .{ .name = "__mulhf3", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10pub fn __mulhf3(a: f16, b: f16) callconv(.C) f16 {10pub fn __mulhf3(a: f16, b: f16) callconv(.c) f16 {
11 return mulf3(f16, a, b);11 return mulf3(f16, a, b);
12}12}
lib/compiler_rt/mulo.zig+3-3
...@@ -48,7 +48,7 @@ inline fn muloXi4_genericFast(comptime ST: type, a: ST, b: ST, overflow: *c_int)...@@ -48,7 +48,7 @@ inline fn muloXi4_genericFast(comptime ST: type, a: ST, b: ST, overflow: *c_int)
48 return @as(ST, @truncate(res));48 return @as(ST, @truncate(res));
49}49}
5050
51pub fn __mulosi4(a: i32, b: i32, overflow: *c_int) callconv(.C) i32 {51pub fn __mulosi4(a: i32, b: i32, overflow: *c_int) callconv(.c) i32 {
52 if (2 * @bitSizeOf(i32) <= @bitSizeOf(usize)) {52 if (2 * @bitSizeOf(i32) <= @bitSizeOf(usize)) {
53 return muloXi4_genericFast(i32, a, b, overflow);53 return muloXi4_genericFast(i32, a, b, overflow);
54 } else {54 } else {
...@@ -56,7 +56,7 @@ pub fn __mulosi4(a: i32, b: i32, overflow: *c_int) callconv(.C) i32 {...@@ -56,7 +56,7 @@ pub fn __mulosi4(a: i32, b: i32, overflow: *c_int) callconv(.C) i32 {
56 }56 }
57}57}
5858
59pub fn __mulodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 {59pub fn __mulodi4(a: i64, b: i64, overflow: *c_int) callconv(.c) i64 {
60 if (2 * @bitSizeOf(i64) <= @bitSizeOf(usize)) {60 if (2 * @bitSizeOf(i64) <= @bitSizeOf(usize)) {
61 return muloXi4_genericFast(i64, a, b, overflow);61 return muloXi4_genericFast(i64, a, b, overflow);
62 } else {62 } else {
...@@ -64,7 +64,7 @@ pub fn __mulodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 {...@@ -64,7 +64,7 @@ pub fn __mulodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 {
64 }64 }
65}65}
6666
67pub fn __muloti4(a: i128, b: i128, overflow: *c_int) callconv(.C) i128 {67pub fn __muloti4(a: i128, b: i128, overflow: *c_int) callconv(.c) i128 {
68 if (2 * @bitSizeOf(i128) <= @bitSizeOf(usize)) {68 if (2 * @bitSizeOf(i128) <= @bitSizeOf(usize)) {
69 return muloXi4_genericFast(i128, a, b, overflow);69 return muloXi4_genericFast(i128, a, b, overflow);
70 } else {70 } else {
lib/compiler_rt/mulsc3.zig+1-1
...@@ -9,6 +9,6 @@ comptime {...@@ -9,6 +9,6 @@ comptime {
9 }9 }
10}10}
1111
12pub fn __mulsc3(a: f32, b: f32, c: f32, d: f32) callconv(.C) mulc3.Complex(f32) {12pub fn __mulsc3(a: f32, b: f32, c: f32, d: f32) callconv(.c) mulc3.Complex(f32) {
13 return mulc3.mulc3(f32, a, b, c, d);13 return mulc3.mulc3(f32, a, b, c, d);
14}14}
lib/compiler_rt/mulsf3.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14pub fn __mulsf3(a: f32, b: f32) callconv(.C) f32 {14pub fn __mulsf3(a: f32, b: f32) callconv(.c) f32 {
15 return mulf3(f32, a, b);15 return mulf3(f32, a, b);
16}16}
1717
18fn __aeabi_fmul(a: f32, b: f32) callconv(.AAPCS) f32 {18fn __aeabi_fmul(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 {
19 return mulf3(f32, a, b);19 return mulf3(f32, a, b);
20}20}
lib/compiler_rt/multc3.zig+1-1
...@@ -11,6 +11,6 @@ comptime {...@@ -11,6 +11,6 @@ comptime {
11 }11 }
12}12}
1313
14pub fn __multc3(a: f128, b: f128, c: f128, d: f128) callconv(.C) mulc3.Complex(f128) {14pub fn __multc3(a: f128, b: f128, c: f128, d: f128) callconv(.c) mulc3.Complex(f128) {
15 return mulc3.mulc3(f128, a, b, c, d);15 return mulc3.mulc3(f128, a, b, c, d);
16}16}
lib/compiler_rt/multf3.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 @export(&__multf3, .{ .name = "__multf3", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__multf3, .{ .name = "__multf3", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __multf3(a: f128, b: f128) callconv(.C) f128 {15pub fn __multf3(a: f128, b: f128) callconv(.c) f128 {
16 return mulf3(f128, a, b);16 return mulf3(f128, a, b);
17}17}
1818
19fn _Qp_mul(c: *f128, a: *const f128, b: *const f128) callconv(.C) void {19fn _Qp_mul(c: *f128, a: *const f128, b: *const f128) callconv(.c) void {
20 c.* = mulf3(f128, a.*, b.*);20 c.* = mulf3(f128, a.*, b.*);
21}21}
lib/compiler_rt/mulxc3.zig+1-1
...@@ -9,6 +9,6 @@ comptime {...@@ -9,6 +9,6 @@ comptime {
9 }9 }
10}10}
1111
12pub fn __mulxc3(a: f80, b: f80, c: f80, d: f80) callconv(.C) mulc3.Complex(f80) {12pub fn __mulxc3(a: f80, b: f80, c: f80, d: f80) callconv(.c) mulc3.Complex(f80) {
13 return mulc3.mulc3(f80, a, b, c, d);13 return mulc3.mulc3(f80, a, b, c, d);
14}14}
lib/compiler_rt/mulxf3.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__mulxf3, .{ .name = "__mulxf3", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__mulxf3, .{ .name = "__mulxf3", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10pub fn __mulxf3(a: f80, b: f80) callconv(.C) f80 {10pub fn __mulxf3(a: f80, b: f80) callconv(.c) f80 {
11 return mulf3(f80, a, b);11 return mulf3(f80, a, b);
12}12}
lib/compiler_rt/negXi2.zig+3-3
...@@ -18,15 +18,15 @@ comptime {...@@ -18,15 +18,15 @@ comptime {
18 @export(&__negti2, .{ .name = "__negti2", .linkage = common.linkage, .visibility = common.visibility });18 @export(&__negti2, .{ .name = "__negti2", .linkage = common.linkage, .visibility = common.visibility });
19}19}
2020
21pub fn __negsi2(a: i32) callconv(.C) i32 {21pub fn __negsi2(a: i32) callconv(.c) i32 {
22 return negXi2(i32, a);22 return negXi2(i32, a);
23}23}
2424
25pub fn __negdi2(a: i64) callconv(.C) i64 {25pub fn __negdi2(a: i64) callconv(.c) i64 {
26 return negXi2(i64, a);26 return negXi2(i64, a);
27}27}
2828
29pub fn __negti2(a: i128) callconv(.C) i128 {29pub fn __negti2(a: i128) callconv(.c) i128 {
30 return negXi2(i128, a);30 return negXi2(i128, a);
31}31}
3232
lib/compiler_rt/negdf2.zig+2-2
...@@ -10,10 +10,10 @@ comptime {...@@ -10,10 +10,10 @@ comptime {
10 }10 }
11}11}
1212
13fn __negdf2(a: f64) callconv(.C) f64 {13fn __negdf2(a: f64) callconv(.c) f64 {
14 return common.fneg(a);14 return common.fneg(a);
15}15}
1616
17fn __aeabi_dneg(a: f64) callconv(.AAPCS) f64 {17fn __aeabi_dneg(a: f64) callconv(.{ .arm_aapcs = .{} }) f64 {
18 return common.fneg(a);18 return common.fneg(a);
19}19}
lib/compiler_rt/neghf2.zig+1-1
...@@ -6,6 +6,6 @@ comptime {...@@ -6,6 +6,6 @@ comptime {
6 @export(&__neghf2, .{ .name = "__neghf2", .linkage = common.linkage, .visibility = common.visibility });6 @export(&__neghf2, .{ .name = "__neghf2", .linkage = common.linkage, .visibility = common.visibility });
7}7}
88
9fn __neghf2(a: f16) callconv(.C) f16 {9fn __neghf2(a: f16) callconv(.c) f16 {
10 return common.fneg(a);10 return common.fneg(a);
11}11}
lib/compiler_rt/negsf2.zig+2-2
...@@ -10,10 +10,10 @@ comptime {...@@ -10,10 +10,10 @@ comptime {
10 }10 }
11}11}
1212
13fn __negsf2(a: f32) callconv(.C) f32 {13fn __negsf2(a: f32) callconv(.c) f32 {
14 return common.fneg(a);14 return common.fneg(a);
15}15}
1616
17fn __aeabi_fneg(a: f32) callconv(.AAPCS) f32 {17fn __aeabi_fneg(a: f32) callconv(.{ .arm_aapcs = .{} }) f32 {
18 return common.fneg(a);18 return common.fneg(a);
19}19}
lib/compiler_rt/negtf2.zig+1-1
...@@ -8,6 +8,6 @@ comptime {...@@ -8,6 +8,6 @@ comptime {
8 @export(&__negtf2, .{ .name = "__negtf2", .linkage = common.linkage, .visibility = common.visibility });8 @export(&__negtf2, .{ .name = "__negtf2", .linkage = common.linkage, .visibility = common.visibility });
9}9}
1010
11fn __negtf2(a: f128) callconv(.C) f128 {11fn __negtf2(a: f128) callconv(.c) f128 {
12 return common.fneg(a);12 return common.fneg(a);
13}13}
lib/compiler_rt/negv.zig+3-3
...@@ -13,15 +13,15 @@ comptime {...@@ -13,15 +13,15 @@ comptime {
13 @export(&__negvti2, .{ .name = "__negvti2", .linkage = common.linkage, .visibility = common.visibility });13 @export(&__negvti2, .{ .name = "__negvti2", .linkage = common.linkage, .visibility = common.visibility });
14}14}
1515
16pub fn __negvsi2(a: i32) callconv(.C) i32 {16pub fn __negvsi2(a: i32) callconv(.c) i32 {
17 return negvXi(i32, a);17 return negvXi(i32, a);
18}18}
1919
20pub fn __negvdi2(a: i64) callconv(.C) i64 {20pub fn __negvdi2(a: i64) callconv(.c) i64 {
21 return negvXi(i64, a);21 return negvXi(i64, a);
22}22}
2323
24pub fn __negvti2(a: i128) callconv(.C) i128 {24pub fn __negvti2(a: i128) callconv(.c) i128 {
25 return negvXi(i128, a);25 return negvXi(i128, a);
26}26}
2727
lib/compiler_rt/negxf2.zig+1-1
...@@ -6,6 +6,6 @@ comptime {...@@ -6,6 +6,6 @@ comptime {
6 @export(&__negxf2, .{ .name = "__negxf2", .linkage = common.linkage, .visibility = common.visibility });6 @export(&__negxf2, .{ .name = "__negxf2", .linkage = common.linkage, .visibility = common.visibility });
7}7}
88
9fn __negxf2(a: f80) callconv(.C) f80 {9fn __negxf2(a: f80) callconv(.c) f80 {
10 return common.fneg(a);10 return common.fneg(a);
11}11}
lib/compiler_rt/os_version_check.zig+1-1
...@@ -34,7 +34,7 @@ const __isPlatformVersionAtLeast = if (have_availability_version_check) struct {...@@ -34,7 +34,7 @@ const __isPlatformVersionAtLeast = if (have_availability_version_check) struct {
34 }34 }
3535
36 // Darwin-only36 // Darwin-only
37 fn __isPlatformVersionAtLeast(platform: u32, major: u32, minor: u32, subminor: u32) callconv(.C) i32 {37 fn __isPlatformVersionAtLeast(platform: u32, major: u32, minor: u32, subminor: u32) callconv(.c) i32 {
38 const build_version = dyld_build_version_t{38 const build_version = dyld_build_version_t{
39 .platform = platform,39 .platform = platform,
40 .version = constructVersion(major, minor, subminor),40 .version = constructVersion(major, minor, subminor),
lib/compiler_rt/parity.zig+3-3
...@@ -13,15 +13,15 @@ comptime {...@@ -13,15 +13,15 @@ comptime {
13 @export(&__parityti2, .{ .name = "__parityti2", .linkage = common.linkage, .visibility = common.visibility });13 @export(&__parityti2, .{ .name = "__parityti2", .linkage = common.linkage, .visibility = common.visibility });
14}14}
1515
16pub fn __paritysi2(a: i32) callconv(.C) i32 {16pub fn __paritysi2(a: i32) callconv(.c) i32 {
17 return parityXi2(i32, a);17 return parityXi2(i32, a);
18}18}
1919
20pub fn __paritydi2(a: i64) callconv(.C) i32 {20pub fn __paritydi2(a: i64) callconv(.c) i32 {
21 return parityXi2(i64, a);21 return parityXi2(i64, a);
22}22}
2323
24pub fn __parityti2(a: i128) callconv(.C) i32 {24pub fn __parityti2(a: i128) callconv(.c) i32 {
25 return parityXi2(i128, a);25 return parityXi2(i128, a);
26}26}
2727
lib/compiler_rt/popcount.zig+3-3
...@@ -18,15 +18,15 @@ comptime {...@@ -18,15 +18,15 @@ comptime {
18 @export(&__popcountti2, .{ .name = "__popcountti2", .linkage = common.linkage, .visibility = common.visibility });18 @export(&__popcountti2, .{ .name = "__popcountti2", .linkage = common.linkage, .visibility = common.visibility });
19}19}
2020
21pub fn __popcountsi2(a: i32) callconv(.C) i32 {21pub fn __popcountsi2(a: i32) callconv(.c) i32 {
22 return popcountXi2(i32, a);22 return popcountXi2(i32, a);
23}23}
2424
25pub fn __popcountdi2(a: i64) callconv(.C) i32 {25pub fn __popcountdi2(a: i64) callconv(.c) i32 {
26 return popcountXi2(i64, a);26 return popcountXi2(i64, a);
27}27}
2828
29pub fn __popcountti2(a: i128) callconv(.C) i32 {29pub fn __popcountti2(a: i128) callconv(.c) i32 {
30 return popcountXi2(i128, a);30 return popcountXi2(i128, a);
31}31}
3232
lib/compiler_rt/powiXf2.zig+5-5
...@@ -35,23 +35,23 @@ inline fn powiXf2(comptime FT: type, a: FT, b: i32) FT {...@@ -35,23 +35,23 @@ inline fn powiXf2(comptime FT: type, a: FT, b: i32) FT {
35 return if (is_recip) 1 / r else r;35 return if (is_recip) 1 / r else r;
36}36}
3737
38pub fn __powihf2(a: f16, b: i32) callconv(.C) f16 {38pub fn __powihf2(a: f16, b: i32) callconv(.c) f16 {
39 return powiXf2(f16, a, b);39 return powiXf2(f16, a, b);
40}40}
4141
42pub fn __powisf2(a: f32, b: i32) callconv(.C) f32 {42pub fn __powisf2(a: f32, b: i32) callconv(.c) f32 {
43 return powiXf2(f32, a, b);43 return powiXf2(f32, a, b);
44}44}
4545
46pub fn __powidf2(a: f64, b: i32) callconv(.C) f64 {46pub fn __powidf2(a: f64, b: i32) callconv(.c) f64 {
47 return powiXf2(f64, a, b);47 return powiXf2(f64, a, b);
48}48}
4949
50pub fn __powitf2(a: f128, b: i32) callconv(.C) f128 {50pub fn __powitf2(a: f128, b: i32) callconv(.c) f128 {
51 return powiXf2(f128, a, b);51 return powiXf2(f128, a, b);
52}52}
5353
54pub fn __powixf2(a: f80, b: i32) callconv(.C) f80 {54pub fn __powixf2(a: f80, b: i32) callconv(.c) f80 {
55 return powiXf2(f80, a, b);55 return powiXf2(f80, a, b);
56}56}
5757
lib/compiler_rt/round.zig+6-6
...@@ -26,12 +26,12 @@ comptime {...@@ -26,12 +26,12 @@ comptime {
26 @export(&roundl, .{ .name = "roundl", .linkage = common.linkage, .visibility = common.visibility });26 @export(&roundl, .{ .name = "roundl", .linkage = common.linkage, .visibility = common.visibility });
27}27}
2828
29pub fn __roundh(x: f16) callconv(.C) f16 {29pub fn __roundh(x: f16) callconv(.c) f16 {
30 // TODO: more efficient implementation30 // TODO: more efficient implementation
31 return @floatCast(roundf(x));31 return @floatCast(roundf(x));
32}32}
3333
34pub fn roundf(x_: f32) callconv(.C) f32 {34pub fn roundf(x_: f32) callconv(.c) f32 {
35 const f32_toint = 1.0 / math.floatEps(f32);35 const f32_toint = 1.0 / math.floatEps(f32);
3636
37 var x = x_;37 var x = x_;
...@@ -66,7 +66,7 @@ pub fn roundf(x_: f32) callconv(.C) f32 {...@@ -66,7 +66,7 @@ pub fn roundf(x_: f32) callconv(.C) f32 {
66 }66 }
67}67}
6868
69pub fn round(x_: f64) callconv(.C) f64 {69pub fn round(x_: f64) callconv(.c) f64 {
70 const f64_toint = 1.0 / math.floatEps(f64);70 const f64_toint = 1.0 / math.floatEps(f64);
7171
72 var x = x_;72 var x = x_;
...@@ -101,12 +101,12 @@ pub fn round(x_: f64) callconv(.C) f64 {...@@ -101,12 +101,12 @@ pub fn round(x_: f64) callconv(.C) f64 {
101 }101 }
102}102}
103103
104pub fn __roundx(x: f80) callconv(.C) f80 {104pub fn __roundx(x: f80) callconv(.c) f80 {
105 // TODO: more efficient implementation105 // TODO: more efficient implementation
106 return @floatCast(roundq(x));106 return @floatCast(roundq(x));
107}107}
108108
109pub fn roundq(x_: f128) callconv(.C) f128 {109pub fn roundq(x_: f128) callconv(.c) f128 {
110 const f128_toint = 1.0 / math.floatEps(f128);110 const f128_toint = 1.0 / math.floatEps(f128);
111111
112 var x = x_;112 var x = x_;
...@@ -141,7 +141,7 @@ pub fn roundq(x_: f128) callconv(.C) f128 {...@@ -141,7 +141,7 @@ pub fn roundq(x_: f128) callconv(.C) f128 {
141 }141 }
142}142}
143143
144pub fn roundl(x: c_longdouble) callconv(.C) c_longdouble {144pub fn roundl(x: c_longdouble) callconv(.c) c_longdouble {
145 switch (@typeInfo(c_longdouble).float.bits) {145 switch (@typeInfo(c_longdouble).float.bits) {
146 16 => return __roundh(x),146 16 => return __roundh(x),
147 32 => return roundf(x),147 32 => return roundf(x),
lib/compiler_rt/shift.zig+12-12
...@@ -93,48 +93,48 @@ inline fn lshrXi3(comptime T: type, a: T, b: i32) T {...@@ -93,48 +93,48 @@ inline fn lshrXi3(comptime T: type, a: T, b: i32) T {
93 return output.all;93 return output.all;
94}94}
9595
96pub fn __ashlsi3(a: i32, b: i32) callconv(.C) i32 {96pub fn __ashlsi3(a: i32, b: i32) callconv(.c) i32 {
97 return ashlXi3(i32, a, b);97 return ashlXi3(i32, a, b);
98}98}
9999
100pub fn __ashrsi3(a: i32, b: i32) callconv(.C) i32 {100pub fn __ashrsi3(a: i32, b: i32) callconv(.c) i32 {
101 return ashrXi3(i32, a, b);101 return ashrXi3(i32, a, b);
102}102}
103103
104pub fn __lshrsi3(a: i32, b: i32) callconv(.C) i32 {104pub fn __lshrsi3(a: i32, b: i32) callconv(.c) i32 {
105 return lshrXi3(i32, a, b);105 return lshrXi3(i32, a, b);
106}106}
107107
108pub fn __ashldi3(a: i64, b: i32) callconv(.C) i64 {108pub fn __ashldi3(a: i64, b: i32) callconv(.c) i64 {
109 return ashlXi3(i64, a, b);109 return ashlXi3(i64, a, b);
110}110}
111fn __aeabi_llsl(a: i64, b: i32) callconv(.AAPCS) i64 {111fn __aeabi_llsl(a: i64, b: i32) callconv(.{ .arm_aapcs = .{} }) i64 {
112 return ashlXi3(i64, a, b);112 return ashlXi3(i64, a, b);
113}113}
114114
115pub fn __ashlti3(a: i128, b: i32) callconv(.C) i128 {115pub fn __ashlti3(a: i128, b: i32) callconv(.c) i128 {
116 return ashlXi3(i128, a, b);116 return ashlXi3(i128, a, b);
117}117}
118118
119pub fn __ashrdi3(a: i64, b: i32) callconv(.C) i64 {119pub fn __ashrdi3(a: i64, b: i32) callconv(.c) i64 {
120 return ashrXi3(i64, a, b);120 return ashrXi3(i64, a, b);
121}121}
122fn __aeabi_lasr(a: i64, b: i32) callconv(.AAPCS) i64 {122fn __aeabi_lasr(a: i64, b: i32) callconv(.{ .arm_aapcs = .{} }) i64 {
123 return ashrXi3(i64, a, b);123 return ashrXi3(i64, a, b);
124}124}
125125
126pub fn __ashrti3(a: i128, b: i32) callconv(.C) i128 {126pub fn __ashrti3(a: i128, b: i32) callconv(.c) i128 {
127 return ashrXi3(i128, a, b);127 return ashrXi3(i128, a, b);
128}128}
129129
130pub fn __lshrdi3(a: i64, b: i32) callconv(.C) i64 {130pub fn __lshrdi3(a: i64, b: i32) callconv(.c) i64 {
131 return lshrXi3(i64, a, b);131 return lshrXi3(i64, a, b);
132}132}
133fn __aeabi_llsr(a: i64, b: i32) callconv(.AAPCS) i64 {133fn __aeabi_llsr(a: i64, b: i32) callconv(.{ .arm_aapcs = .{} }) i64 {
134 return lshrXi3(i64, a, b);134 return lshrXi3(i64, a, b);
135}135}
136136
137pub fn __lshrti3(a: i128, b: i32) callconv(.C) i128 {137pub fn __lshrti3(a: i128, b: i32) callconv(.c) i128 {
138 return lshrXi3(i128, a, b);138 return lshrXi3(i128, a, b);
139}139}
140140
lib/compiler_rt/sin.zig+6-6
...@@ -30,12 +30,12 @@ comptime {...@@ -30,12 +30,12 @@ comptime {
30 @export(&sinl, .{ .name = "sinl", .linkage = common.linkage, .visibility = common.visibility });30 @export(&sinl, .{ .name = "sinl", .linkage = common.linkage, .visibility = common.visibility });
31}31}
3232
33pub fn __sinh(x: f16) callconv(.C) f16 {33pub fn __sinh(x: f16) callconv(.c) f16 {
34 // TODO: more efficient implementation34 // TODO: more efficient implementation
35 return @floatCast(sinf(x));35 return @floatCast(sinf(x));
36}36}
3737
38pub fn sinf(x: f32) callconv(.C) f32 {38pub fn sinf(x: f32) callconv(.c) f32 {
39 // Small multiples of pi/2 rounded to double precision.39 // Small multiples of pi/2 rounded to double precision.
40 const s1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D1840 const s1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18
41 const s2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D1841 const s2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18
...@@ -90,7 +90,7 @@ pub fn sinf(x: f32) callconv(.C) f32 {...@@ -90,7 +90,7 @@ pub fn sinf(x: f32) callconv(.C) f32 {
90 };90 };
91}91}
9292
93pub fn sin(x: f64) callconv(.C) f64 {93pub fn sin(x: f64) callconv(.c) f64 {
94 var ix = @as(u64, @bitCast(x)) >> 32;94 var ix = @as(u64, @bitCast(x)) >> 32;
95 ix &= 0x7fffffff;95 ix &= 0x7fffffff;
9696
...@@ -119,17 +119,17 @@ pub fn sin(x: f64) callconv(.C) f64 {...@@ -119,17 +119,17 @@ pub fn sin(x: f64) callconv(.C) f64 {
119 };119 };
120}120}
121121
122pub fn __sinx(x: f80) callconv(.C) f80 {122pub fn __sinx(x: f80) callconv(.c) f80 {
123 // TODO: more efficient implementation123 // TODO: more efficient implementation
124 return @floatCast(sinq(x));124 return @floatCast(sinq(x));
125}125}
126126
127pub fn sinq(x: f128) callconv(.C) f128 {127pub fn sinq(x: f128) callconv(.c) f128 {
128 // TODO: more correct implementation128 // TODO: more correct implementation
129 return sin(@floatCast(x));129 return sin(@floatCast(x));
130}130}
131131
132pub fn sinl(x: c_longdouble) callconv(.C) c_longdouble {132pub fn sinl(x: c_longdouble) callconv(.c) c_longdouble {
133 switch (@typeInfo(c_longdouble).float.bits) {133 switch (@typeInfo(c_longdouble).float.bits) {
134 16 => return __sinh(x),134 16 => return __sinh(x),
135 32 => return sinf(x),135 32 => return sinf(x),
lib/compiler_rt/sincos.zig+6-6
...@@ -22,7 +22,7 @@ comptime {...@@ -22,7 +22,7 @@ comptime {
22 @export(&sincosl, .{ .name = "sincosl", .linkage = common.linkage, .visibility = common.visibility });22 @export(&sincosl, .{ .name = "sincosl", .linkage = common.linkage, .visibility = common.visibility });
23}23}
2424
25pub fn __sincosh(x: f16, r_sin: *f16, r_cos: *f16) callconv(.C) void {25pub fn __sincosh(x: f16, r_sin: *f16, r_cos: *f16) callconv(.c) void {
26 // TODO: more efficient implementation26 // TODO: more efficient implementation
27 var big_sin: f32 = undefined;27 var big_sin: f32 = undefined;
28 var big_cos: f32 = undefined;28 var big_cos: f32 = undefined;
...@@ -31,7 +31,7 @@ pub fn __sincosh(x: f16, r_sin: *f16, r_cos: *f16) callconv(.C) void {...@@ -31,7 +31,7 @@ pub fn __sincosh(x: f16, r_sin: *f16, r_cos: *f16) callconv(.C) void {
31 r_cos.* = @as(f16, @floatCast(big_cos));31 r_cos.* = @as(f16, @floatCast(big_cos));
32}32}
3333
34pub fn sincosf(x: f32, r_sin: *f32, r_cos: *f32) callconv(.C) void {34pub fn sincosf(x: f32, r_sin: *f32, r_cos: *f32) callconv(.c) void {
35 const sc1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D1835 const sc1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18
36 const sc2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D1836 const sc2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18
37 const sc3pio2: f64 = 3.0 * math.pi / 2.0; // 0x4012D97C, 0x7F3321D237 const sc3pio2: f64 = 3.0 * math.pi / 2.0; // 0x4012D97C, 0x7F3321D2
...@@ -126,7 +126,7 @@ pub fn sincosf(x: f32, r_sin: *f32, r_cos: *f32) callconv(.C) void {...@@ -126,7 +126,7 @@ pub fn sincosf(x: f32, r_sin: *f32, r_cos: *f32) callconv(.C) void {
126 }126 }
127}127}
128128
129pub fn sincos(x: f64, r_sin: *f64, r_cos: *f64) callconv(.C) void {129pub fn sincos(x: f64, r_sin: *f64, r_cos: *f64) callconv(.c) void {
130 const ix = @as(u32, @truncate(@as(u64, @bitCast(x)) >> 32)) & 0x7fffffff;130 const ix = @as(u32, @truncate(@as(u64, @bitCast(x)) >> 32)) & 0x7fffffff;
131131
132 // |x| ~< pi/4132 // |x| ~< pi/4
...@@ -177,7 +177,7 @@ pub fn sincos(x: f64, r_sin: *f64, r_cos: *f64) callconv(.C) void {...@@ -177,7 +177,7 @@ pub fn sincos(x: f64, r_sin: *f64, r_cos: *f64) callconv(.C) void {
177 }177 }
178}178}
179179
180pub fn __sincosx(x: f80, r_sin: *f80, r_cos: *f80) callconv(.C) void {180pub fn __sincosx(x: f80, r_sin: *f80, r_cos: *f80) callconv(.c) void {
181 // TODO: more efficient implementation181 // TODO: more efficient implementation
182 //return sincos_generic(f80, x, r_sin, r_cos);182 //return sincos_generic(f80, x, r_sin, r_cos);
183 var big_sin: f128 = undefined;183 var big_sin: f128 = undefined;
...@@ -187,7 +187,7 @@ pub fn __sincosx(x: f80, r_sin: *f80, r_cos: *f80) callconv(.C) void {...@@ -187,7 +187,7 @@ pub fn __sincosx(x: f80, r_sin: *f80, r_cos: *f80) callconv(.C) void {
187 r_cos.* = @as(f80, @floatCast(big_cos));187 r_cos.* = @as(f80, @floatCast(big_cos));
188}188}
189189
190pub fn sincosq(x: f128, r_sin: *f128, r_cos: *f128) callconv(.C) void {190pub fn sincosq(x: f128, r_sin: *f128, r_cos: *f128) callconv(.c) void {
191 // TODO: more correct implementation191 // TODO: more correct implementation
192 //return sincos_generic(f128, x, r_sin, r_cos);192 //return sincos_generic(f128, x, r_sin, r_cos);
193 var small_sin: f64 = undefined;193 var small_sin: f64 = undefined;
...@@ -197,7 +197,7 @@ pub fn sincosq(x: f128, r_sin: *f128, r_cos: *f128) callconv(.C) void {...@@ -197,7 +197,7 @@ pub fn sincosq(x: f128, r_sin: *f128, r_cos: *f128) callconv(.C) void {
197 r_cos.* = small_cos;197 r_cos.* = small_cos;
198}198}
199199
200pub fn sincosl(x: c_longdouble, r_sin: *c_longdouble, r_cos: *c_longdouble) callconv(.C) void {200pub fn sincosl(x: c_longdouble, r_sin: *c_longdouble, r_cos: *c_longdouble) callconv(.c) void {
201 switch (@typeInfo(c_longdouble).float.bits) {201 switch (@typeInfo(c_longdouble).float.bits) {
202 16 => return __sincosh(x, r_sin, r_cos),202 16 => return __sincosh(x, r_sin, r_cos),
203 32 => return sincosf(x, r_sin, r_cos),203 32 => return sincosf(x, r_sin, r_cos),
lib/compiler_rt/sqrt.zig+6-6
...@@ -18,12 +18,12 @@ comptime {...@@ -18,12 +18,12 @@ comptime {
18 @export(&sqrtl, .{ .name = "sqrtl", .linkage = common.linkage, .visibility = common.visibility });18 @export(&sqrtl, .{ .name = "sqrtl", .linkage = common.linkage, .visibility = common.visibility });
19}19}
2020
21pub fn __sqrth(x: f16) callconv(.C) f16 {21pub fn __sqrth(x: f16) callconv(.c) f16 {
22 // TODO: more efficient implementation22 // TODO: more efficient implementation
23 return @floatCast(sqrtf(x));23 return @floatCast(sqrtf(x));
24}24}
2525
26pub fn sqrtf(x: f32) callconv(.C) f32 {26pub fn sqrtf(x: f32) callconv(.c) f32 {
27 const tiny: f32 = 1.0e-30;27 const tiny: f32 = 1.0e-30;
28 const sign: i32 = @bitCast(@as(u32, 0x80000000));28 const sign: i32 = @bitCast(@as(u32, 0x80000000));
29 var ix: i32 = @bitCast(x);29 var ix: i32 = @bitCast(x);
...@@ -102,7 +102,7 @@ pub fn sqrtf(x: f32) callconv(.C) f32 {...@@ -102,7 +102,7 @@ pub fn sqrtf(x: f32) callconv(.C) f32 {
102/// NOTE: The original code is full of implicit signed -> unsigned assumptions and u32 wraparound102/// NOTE: The original code is full of implicit signed -> unsigned assumptions and u32 wraparound
103/// behaviour. Most intermediate i32 values are changed to u32 where appropriate but there are103/// behaviour. Most intermediate i32 values are changed to u32 where appropriate but there are
104/// potentially some edge cases remaining that are not handled in the same way.104/// potentially some edge cases remaining that are not handled in the same way.
105pub fn sqrt(x: f64) callconv(.C) f64 {105pub fn sqrt(x: f64) callconv(.c) f64 {
106 const tiny: f64 = 1.0e-300;106 const tiny: f64 = 1.0e-300;
107 const sign: u32 = 0x80000000;107 const sign: u32 = 0x80000000;
108 const u: u64 = @bitCast(x);108 const u: u64 = @bitCast(x);
...@@ -232,17 +232,17 @@ pub fn sqrt(x: f64) callconv(.C) f64 {...@@ -232,17 +232,17 @@ pub fn sqrt(x: f64) callconv(.C) f64 {
232 return @bitCast(uz);232 return @bitCast(uz);
233}233}
234234
235pub fn __sqrtx(x: f80) callconv(.C) f80 {235pub fn __sqrtx(x: f80) callconv(.c) f80 {
236 // TODO: more efficient implementation236 // TODO: more efficient implementation
237 return @floatCast(sqrtq(x));237 return @floatCast(sqrtq(x));
238}238}
239239
240pub fn sqrtq(x: f128) callconv(.C) f128 {240pub fn sqrtq(x: f128) callconv(.c) f128 {
241 // TODO: more correct implementation241 // TODO: more correct implementation
242 return sqrt(@floatCast(x));242 return sqrt(@floatCast(x));
243}243}
244244
245pub fn sqrtl(x: c_longdouble) callconv(.C) c_longdouble {245pub fn sqrtl(x: c_longdouble) callconv(.c) c_longdouble {
246 switch (@typeInfo(c_longdouble).float.bits) {246 switch (@typeInfo(c_longdouble).float.bits) {
247 16 => return __sqrth(x),247 16 => return __sqrth(x),
248 32 => return sqrtf(x),248 32 => return sqrtf(x),
lib/compiler_rt/ssp.zig+12-12
...@@ -16,9 +16,9 @@ const std = @import("std");...@@ -16,9 +16,9 @@ const std = @import("std");
16const common = @import("./common.zig");16const common = @import("./common.zig");
17const builtin = @import("builtin");17const builtin = @import("builtin");
1818
19extern fn memset(dest: ?[*]u8, c: u8, n: usize) callconv(.C) ?[*]u8;19extern fn memset(dest: ?[*]u8, c: u8, n: usize) callconv(.c) ?[*]u8;
20extern fn memcpy(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize) callconv(.C) ?[*]u8;20extern fn memcpy(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize) callconv(.c) ?[*]u8;
21extern fn memmove(dest: ?[*]u8, src: ?[*]const u8, n: usize) callconv(.C) ?[*]u8;21extern fn memmove(dest: ?[*]u8, src: ?[*]const u8, n: usize) callconv(.c) ?[*]u8;
2222
23comptime {23comptime {
24 @export(&__stack_chk_fail, .{ .name = "__stack_chk_fail", .linkage = common.linkage, .visibility = common.visibility });24 @export(&__stack_chk_fail, .{ .name = "__stack_chk_fail", .linkage = common.linkage, .visibility = common.visibility });
...@@ -33,11 +33,11 @@ comptime {...@@ -33,11 +33,11 @@ comptime {
33 @export(&__memset_chk, .{ .name = "__memset_chk", .linkage = common.linkage, .visibility = common.visibility });33 @export(&__memset_chk, .{ .name = "__memset_chk", .linkage = common.linkage, .visibility = common.visibility });
34}34}
3535
36fn __stack_chk_fail() callconv(.C) noreturn {36fn __stack_chk_fail() callconv(.c) noreturn {
37 @panic("stack smashing detected");37 @panic("stack smashing detected");
38}38}
3939
40fn __chk_fail() callconv(.C) noreturn {40fn __chk_fail() callconv(.c) noreturn {
41 @panic("buffer overflow detected");41 @panic("buffer overflow detected");
42}42}
4343
...@@ -49,7 +49,7 @@ var __stack_chk_guard: usize = blk: {...@@ -49,7 +49,7 @@ var __stack_chk_guard: usize = blk: {
49 break :blk @as(usize, @bitCast(buf));49 break :blk @as(usize, @bitCast(buf));
50};50};
5151
52fn __strcpy_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.C) [*:0]u8 {52fn __strcpy_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.c) [*:0]u8 {
53 @setRuntimeSafety(false);53 @setRuntimeSafety(false);
5454
55 var i: usize = 0;55 var i: usize = 0;
...@@ -64,7 +64,7 @@ fn __strcpy_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.C) [...@@ -64,7 +64,7 @@ fn __strcpy_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.C) [
64 return dest;64 return dest;
65}65}
6666
67fn __strncpy_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) callconv(.C) [*:0]u8 {67fn __strncpy_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) callconv(.c) [*:0]u8 {
68 @setRuntimeSafety(false);68 @setRuntimeSafety(false);
69 if (dest_n < n) __chk_fail();69 if (dest_n < n) __chk_fail();
70 var i: usize = 0;70 var i: usize = 0;
...@@ -77,7 +77,7 @@ fn __strncpy_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) cal...@@ -77,7 +77,7 @@ fn __strncpy_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) cal
77 return dest;77 return dest;
78}78}
7979
80fn __strcat_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.C) [*:0]u8 {80fn __strcat_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.c) [*:0]u8 {
81 @setRuntimeSafety(false);81 @setRuntimeSafety(false);
8282
83 var avail = dest_n;83 var avail = dest_n;
...@@ -102,7 +102,7 @@ fn __strcat_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.C) [...@@ -102,7 +102,7 @@ fn __strcat_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.C) [
102 return dest;102 return dest;
103}103}
104104
105fn __strncat_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) callconv(.C) [*:0]u8 {105fn __strncat_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) callconv(.c) [*:0]u8 {
106 @setRuntimeSafety(false);106 @setRuntimeSafety(false);
107107
108 var avail = dest_n;108 var avail = dest_n;
...@@ -127,17 +127,17 @@ fn __strncat_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) cal...@@ -127,17 +127,17 @@ fn __strncat_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) cal
127 return dest;127 return dest;
128}128}
129129
130fn __memcpy_chk(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize, dest_n: usize) callconv(.C) ?[*]u8 {130fn __memcpy_chk(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize, dest_n: usize) callconv(.c) ?[*]u8 {
131 if (dest_n < n) __chk_fail();131 if (dest_n < n) __chk_fail();
132 return memcpy(dest, src, n);132 return memcpy(dest, src, n);
133}133}
134134
135fn __memmove_chk(dest: ?[*]u8, src: ?[*]const u8, n: usize, dest_n: usize) callconv(.C) ?[*]u8 {135fn __memmove_chk(dest: ?[*]u8, src: ?[*]const u8, n: usize, dest_n: usize) callconv(.c) ?[*]u8 {
136 if (dest_n < n) __chk_fail();136 if (dest_n < n) __chk_fail();
137 return memmove(dest, src, n);137 return memmove(dest, src, n);
138}138}
139139
140fn __memset_chk(dest: ?[*]u8, c: u8, n: usize, dest_n: usize) callconv(.C) ?[*]u8 {140fn __memset_chk(dest: ?[*]u8, c: u8, n: usize, dest_n: usize) callconv(.c) ?[*]u8 {
141 if (dest_n < n) __chk_fail();141 if (dest_n < n) __chk_fail();
142 return memset(dest, c, n);142 return memset(dest, c, n);
143}143}
lib/compiler_rt/stack_probe.zig+6-6
...@@ -37,7 +37,7 @@ comptime {...@@ -37,7 +37,7 @@ comptime {
37}37}
3838
39// Zig's own stack-probe routine (available only on x86 and x86_64)39// Zig's own stack-probe routine (available only on x86 and x86_64)
40pub fn zig_probe_stack() callconv(.Naked) void {40pub fn zig_probe_stack() callconv(.naked) void {
41 @setRuntimeSafety(false);41 @setRuntimeSafety(false);
4242
43 // Versions of the Linux kernel before 5.1 treat any access below SP as43 // Versions of the Linux kernel before 5.1 treat any access below SP as
...@@ -245,11 +245,11 @@ fn win_probe_stack_adjust_sp() void {...@@ -245,11 +245,11 @@ fn win_probe_stack_adjust_sp() void {
245// ___chkstk (__alloca) | yes | yes |245// ___chkstk (__alloca) | yes | yes |
246// ___chkstk_ms | no | no |246// ___chkstk_ms | no | no |
247247
248pub fn _chkstk() callconv(.Naked) void {248pub fn _chkstk() callconv(.naked) void {
249 @setRuntimeSafety(false);249 @setRuntimeSafety(false);
250 @call(.always_inline, win_probe_stack_adjust_sp, .{});250 @call(.always_inline, win_probe_stack_adjust_sp, .{});
251}251}
252pub fn __chkstk() callconv(.Naked) void {252pub fn __chkstk() callconv(.naked) void {
253 @setRuntimeSafety(false);253 @setRuntimeSafety(false);
254 if (arch == .thumb or arch == .aarch64) {254 if (arch == .thumb or arch == .aarch64) {
255 @call(.always_inline, win_probe_stack_only, .{});255 @call(.always_inline, win_probe_stack_only, .{});
...@@ -259,15 +259,15 @@ pub fn __chkstk() callconv(.Naked) void {...@@ -259,15 +259,15 @@ pub fn __chkstk() callconv(.Naked) void {
259 else => unreachable,259 else => unreachable,
260 }260 }
261}261}
262pub fn ___chkstk() callconv(.Naked) void {262pub fn ___chkstk() callconv(.naked) void {
263 @setRuntimeSafety(false);263 @setRuntimeSafety(false);
264 @call(.always_inline, win_probe_stack_adjust_sp, .{});264 @call(.always_inline, win_probe_stack_adjust_sp, .{});
265}265}
266pub fn __chkstk_ms() callconv(.Naked) void {266pub fn __chkstk_ms() callconv(.naked) void {
267 @setRuntimeSafety(false);267 @setRuntimeSafety(false);
268 @call(.always_inline, win_probe_stack_only, .{});268 @call(.always_inline, win_probe_stack_only, .{});
269}269}
270pub fn ___chkstk_ms() callconv(.Naked) void {270pub fn ___chkstk_ms() callconv(.naked) void {
271 @setRuntimeSafety(false);271 @setRuntimeSafety(false);
272 @call(.always_inline, win_probe_stack_only, .{});272 @call(.always_inline, win_probe_stack_only, .{});
273}273}
lib/compiler_rt/subdf3.zig+2-2
...@@ -11,11 +11,11 @@ comptime {...@@ -11,11 +11,11 @@ comptime {
11 }11 }
12}12}
1313
14fn __subdf3(a: f64, b: f64) callconv(.C) f64 {14fn __subdf3(a: f64, b: f64) callconv(.c) f64 {
15 return sub(a, b);15 return sub(a, b);
16}16}
1717
18fn __aeabi_dsub(a: f64, b: f64) callconv(.AAPCS) f64 {18fn __aeabi_dsub(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 {
19 return sub(a, b);19 return sub(a, b);
20}20}
2121
lib/compiler_rt/subhf3.zig+1-1
...@@ -7,7 +7,7 @@ comptime {...@@ -7,7 +7,7 @@ comptime {
7 @export(&__subhf3, .{ .name = "__subhf3", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__subhf3, .{ .name = "__subhf3", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __subhf3(a: f16, b: f16) callconv(.C) f16 {10fn __subhf3(a: f16, b: f16) callconv(.c) f16 {
11 const neg_b = @as(f16, @bitCast(@as(u16, @bitCast(b)) ^ (@as(u16, 1) << 15)));11 const neg_b = @as(f16, @bitCast(@as(u16, @bitCast(b)) ^ (@as(u16, 1) << 15)));
12 return addf3(f16, a, neg_b);12 return addf3(f16, a, neg_b);
13}13}
lib/compiler_rt/subo.zig+3-3
...@@ -15,13 +15,13 @@ comptime {...@@ -15,13 +15,13 @@ comptime {
15 @export(&__suboti4, .{ .name = "__suboti4", .linkage = common.linkage, .visibility = common.visibility });15 @export(&__suboti4, .{ .name = "__suboti4", .linkage = common.linkage, .visibility = common.visibility });
16}16}
1717
18pub fn __subosi4(a: i32, b: i32, overflow: *c_int) callconv(.C) i32 {18pub fn __subosi4(a: i32, b: i32, overflow: *c_int) callconv(.c) i32 {
19 return suboXi4_generic(i32, a, b, overflow);19 return suboXi4_generic(i32, a, b, overflow);
20}20}
21pub fn __subodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 {21pub fn __subodi4(a: i64, b: i64, overflow: *c_int) callconv(.c) i64 {
22 return suboXi4_generic(i64, a, b, overflow);22 return suboXi4_generic(i64, a, b, overflow);
23}23}
24pub fn __suboti4(a: i128, b: i128, overflow: *c_int) callconv(.C) i128 {24pub fn __suboti4(a: i128, b: i128, overflow: *c_int) callconv(.c) i128 {
25 return suboXi4_generic(i128, a, b, overflow);25 return suboXi4_generic(i128, a, b, overflow);
26}26}
2727
lib/compiler_rt/subsf3.zig+2-2
...@@ -11,11 +11,11 @@ comptime {...@@ -11,11 +11,11 @@ comptime {
11 }11 }
12}12}
1313
14fn __subsf3(a: f32, b: f32) callconv(.C) f32 {14fn __subsf3(a: f32, b: f32) callconv(.c) f32 {
15 return sub(a, b);15 return sub(a, b);
16}16}
1717
18fn __aeabi_fsub(a: f32, b: f32) callconv(.AAPCS) f32 {18fn __aeabi_fsub(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 {
19 return sub(a, b);19 return sub(a, b);
20}20}
2121
lib/compiler_rt/subtf3.zig+2-2
...@@ -12,11 +12,11 @@ comptime {...@@ -12,11 +12,11 @@ comptime {
12 @export(&__subtf3, .{ .name = "__subtf3", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__subtf3, .{ .name = "__subtf3", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __subtf3(a: f128, b: f128) callconv(.C) f128 {15pub fn __subtf3(a: f128, b: f128) callconv(.c) f128 {
16 return sub(a, b);16 return sub(a, b);
17}17}
1818
19fn _Qp_sub(c: *f128, a: *const f128, b: *const f128) callconv(.C) void {19fn _Qp_sub(c: *f128, a: *const f128, b: *const f128) callconv(.c) void {
20 c.* = sub(a.*, b.*);20 c.* = sub(a.*, b.*);
21}21}
2222
lib/compiler_rt/subxf3.zig+1-1
...@@ -7,7 +7,7 @@ comptime {...@@ -7,7 +7,7 @@ comptime {
7 @export(&__subxf3, .{ .name = "__subxf3", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__subxf3, .{ .name = "__subxf3", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __subxf3(a: f80, b: f80) callconv(.C) f80 {10fn __subxf3(a: f80, b: f80) callconv(.c) f80 {
11 var b_rep = std.math.F80.fromFloat(b);11 var b_rep = std.math.F80.fromFloat(b);
12 b_rep.exp ^= 0x8000;12 b_rep.exp ^= 0x8000;
13 const neg_b = b_rep.toFloat();13 const neg_b = b_rep.toFloat();
lib/compiler_rt/tan.zig+6-6
...@@ -32,12 +32,12 @@ comptime {...@@ -32,12 +32,12 @@ comptime {
32 @export(&tanl, .{ .name = "tanl", .linkage = common.linkage, .visibility = common.visibility });32 @export(&tanl, .{ .name = "tanl", .linkage = common.linkage, .visibility = common.visibility });
33}33}
3434
35pub fn __tanh(x: f16) callconv(.C) f16 {35pub fn __tanh(x: f16) callconv(.c) f16 {
36 // TODO: more efficient implementation36 // TODO: more efficient implementation
37 return @floatCast(tanf(x));37 return @floatCast(tanf(x));
38}38}
3939
40pub fn tanf(x: f32) callconv(.C) f32 {40pub fn tanf(x: f32) callconv(.c) f32 {
41 // Small multiples of pi/2 rounded to double precision.41 // Small multiples of pi/2 rounded to double precision.
42 const t1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D1842 const t1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18
43 const t2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D1843 const t2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18
...@@ -81,7 +81,7 @@ pub fn tanf(x: f32) callconv(.C) f32 {...@@ -81,7 +81,7 @@ pub fn tanf(x: f32) callconv(.C) f32 {
81 return kernel.__tandf(y, n & 1 != 0);81 return kernel.__tandf(y, n & 1 != 0);
82}82}
8383
84pub fn tan(x: f64) callconv(.C) f64 {84pub fn tan(x: f64) callconv(.c) f64 {
85 var ix = @as(u64, @bitCast(x)) >> 32;85 var ix = @as(u64, @bitCast(x)) >> 32;
86 ix &= 0x7fffffff;86 ix &= 0x7fffffff;
8787
...@@ -105,17 +105,17 @@ pub fn tan(x: f64) callconv(.C) f64 {...@@ -105,17 +105,17 @@ pub fn tan(x: f64) callconv(.C) f64 {
105 return kernel.__tan(y[0], y[1], n & 1 != 0);105 return kernel.__tan(y[0], y[1], n & 1 != 0);
106}106}
107107
108pub fn __tanx(x: f80) callconv(.C) f80 {108pub fn __tanx(x: f80) callconv(.c) f80 {
109 // TODO: more efficient implementation109 // TODO: more efficient implementation
110 return @floatCast(tanq(x));110 return @floatCast(tanq(x));
111}111}
112112
113pub fn tanq(x: f128) callconv(.C) f128 {113pub fn tanq(x: f128) callconv(.c) f128 {
114 // TODO: more correct implementation114 // TODO: more correct implementation
115 return tan(@floatCast(x));115 return tan(@floatCast(x));
116}116}
117117
118pub fn tanl(x: c_longdouble) callconv(.C) c_longdouble {118pub fn tanl(x: c_longdouble) callconv(.c) c_longdouble {
119 switch (@typeInfo(c_longdouble).float.bits) {119 switch (@typeInfo(c_longdouble).float.bits) {
120 16 => return __tanh(x),120 16 => return __tanh(x),
121 32 => return tanf(x),121 32 => return tanf(x),
lib/compiler_rt/trunc.zig+6-6
...@@ -26,12 +26,12 @@ comptime {...@@ -26,12 +26,12 @@ comptime {
26 @export(&truncl, .{ .name = "truncl", .linkage = common.linkage, .visibility = common.visibility });26 @export(&truncl, .{ .name = "truncl", .linkage = common.linkage, .visibility = common.visibility });
27}27}
2828
29pub fn __trunch(x: f16) callconv(.C) f16 {29pub fn __trunch(x: f16) callconv(.c) f16 {
30 // TODO: more efficient implementation30 // TODO: more efficient implementation
31 return @floatCast(truncf(x));31 return @floatCast(truncf(x));
32}32}
3333
34pub fn truncf(x: f32) callconv(.C) f32 {34pub fn truncf(x: f32) callconv(.c) f32 {
35 const u: u32 = @bitCast(x);35 const u: u32 = @bitCast(x);
36 var e = @as(i32, @intCast(((u >> 23) & 0xFF))) - 0x7F + 9;36 var e = @as(i32, @intCast(((u >> 23) & 0xFF))) - 0x7F + 9;
37 var m: u32 = undefined;37 var m: u32 = undefined;
...@@ -52,7 +52,7 @@ pub fn truncf(x: f32) callconv(.C) f32 {...@@ -52,7 +52,7 @@ pub fn truncf(x: f32) callconv(.C) f32 {
52 }52 }
53}53}
5454
55pub fn trunc(x: f64) callconv(.C) f64 {55pub fn trunc(x: f64) callconv(.c) f64 {
56 const u: u64 = @bitCast(x);56 const u: u64 = @bitCast(x);
57 var e = @as(i32, @intCast(((u >> 52) & 0x7FF))) - 0x3FF + 12;57 var e = @as(i32, @intCast(((u >> 52) & 0x7FF))) - 0x3FF + 12;
58 var m: u64 = undefined;58 var m: u64 = undefined;
...@@ -73,12 +73,12 @@ pub fn trunc(x: f64) callconv(.C) f64 {...@@ -73,12 +73,12 @@ pub fn trunc(x: f64) callconv(.C) f64 {
73 }73 }
74}74}
7575
76pub fn __truncx(x: f80) callconv(.C) f80 {76pub fn __truncx(x: f80) callconv(.c) f80 {
77 // TODO: more efficient implementation77 // TODO: more efficient implementation
78 return @floatCast(truncq(x));78 return @floatCast(truncq(x));
79}79}
8080
81pub fn truncq(x: f128) callconv(.C) f128 {81pub fn truncq(x: f128) callconv(.c) f128 {
82 const u: u128 = @bitCast(x);82 const u: u128 = @bitCast(x);
83 var e = @as(i32, @intCast(((u >> 112) & 0x7FFF))) - 0x3FFF + 16;83 var e = @as(i32, @intCast(((u >> 112) & 0x7FFF))) - 0x3FFF + 16;
84 var m: u128 = undefined;84 var m: u128 = undefined;
...@@ -99,7 +99,7 @@ pub fn truncq(x: f128) callconv(.C) f128 {...@@ -99,7 +99,7 @@ pub fn truncq(x: f128) callconv(.C) f128 {
99 }99 }
100}100}
101101
102pub fn truncl(x: c_longdouble) callconv(.C) c_longdouble {102pub fn truncl(x: c_longdouble) callconv(.c) c_longdouble {
103 switch (@typeInfo(c_longdouble).float.bits) {103 switch (@typeInfo(c_longdouble).float.bits) {
104 16 => return __trunch(x),104 16 => return __trunch(x),
105 32 => return truncf(x),105 32 => return truncf(x),
lib/compiler_rt/truncdfhf2.zig+2-2
...@@ -10,10 +10,10 @@ comptime {...@@ -10,10 +10,10 @@ comptime {
10 @export(&__truncdfhf2, .{ .name = "__truncdfhf2", .linkage = common.linkage, .visibility = common.visibility });10 @export(&__truncdfhf2, .{ .name = "__truncdfhf2", .linkage = common.linkage, .visibility = common.visibility });
11}11}
1212
13pub fn __truncdfhf2(a: f64) callconv(.C) common.F16T(f64) {13pub fn __truncdfhf2(a: f64) callconv(.c) common.F16T(f64) {
14 return @bitCast(truncf(f16, f64, a));14 return @bitCast(truncf(f16, f64, a));
15}15}
1616
17fn __aeabi_d2h(a: f64) callconv(.AAPCS) u16 {17fn __aeabi_d2h(a: f64) callconv(.{ .arm_aapcs = .{} }) u16 {
18 return @bitCast(truncf(f16, f64, a));18 return @bitCast(truncf(f16, f64, a));
19}19}
lib/compiler_rt/truncdfsf2.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14pub fn __truncdfsf2(a: f64) callconv(.C) f32 {14pub fn __truncdfsf2(a: f64) callconv(.c) f32 {
15 return truncf(f32, f64, a);15 return truncf(f32, f64, a);
16}16}
1717
18fn __aeabi_d2f(a: f64) callconv(.AAPCS) f32 {18fn __aeabi_d2f(a: f64) callconv(.{ .arm_aapcs = .{} }) f32 {
19 return truncf(f32, f64, a);19 return truncf(f32, f64, a);
20}20}
lib/compiler_rt/truncsfhf2.zig+3-3
...@@ -12,14 +12,14 @@ comptime {...@@ -12,14 +12,14 @@ comptime {
12 @export(&__truncsfhf2, .{ .name = "__truncsfhf2", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__truncsfhf2, .{ .name = "__truncsfhf2", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __truncsfhf2(a: f32) callconv(.C) common.F16T(f32) {15pub fn __truncsfhf2(a: f32) callconv(.c) common.F16T(f32) {
16 return @bitCast(truncf(f16, f32, a));16 return @bitCast(truncf(f16, f32, a));
17}17}
1818
19fn __gnu_f2h_ieee(a: f32) callconv(.C) common.F16T(f32) {19fn __gnu_f2h_ieee(a: f32) callconv(.c) common.F16T(f32) {
20 return @bitCast(truncf(f16, f32, a));20 return @bitCast(truncf(f16, f32, a));
21}21}
2222
23fn __aeabi_f2h(a: f32) callconv(.AAPCS) u16 {23fn __aeabi_f2h(a: f32) callconv(.{ .arm_aapcs = .{} }) u16 {
24 return @bitCast(truncf(f16, f32, a));24 return @bitCast(truncf(f16, f32, a));
25}25}
lib/compiler_rt/trunctfdf2.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 @export(&__trunctfdf2, .{ .name = "__trunctfdf2", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__trunctfdf2, .{ .name = "__trunctfdf2", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __trunctfdf2(a: f128) callconv(.C) f64 {15pub fn __trunctfdf2(a: f128) callconv(.c) f64 {
16 return truncf(f64, f128, a);16 return truncf(f64, f128, a);
17}17}
1818
19fn _Qp_qtod(a: *const f128) callconv(.C) f64 {19fn _Qp_qtod(a: *const f128) callconv(.c) f64 {
20 return truncf(f64, f128, a.*);20 return truncf(f64, f128, a.*);
21}21}
lib/compiler_rt/trunctfhf2.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__trunctfhf2, .{ .name = "__trunctfhf2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__trunctfhf2, .{ .name = "__trunctfhf2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10pub fn __trunctfhf2(a: f128) callconv(.C) common.F16T(f128) {10pub fn __trunctfhf2(a: f128) callconv(.c) common.F16T(f128) {
11 return @bitCast(truncf(f16, f128, a));11 return @bitCast(truncf(f16, f128, a));
12}12}
lib/compiler_rt/trunctfsf2.zig+2-2
...@@ -12,10 +12,10 @@ comptime {...@@ -12,10 +12,10 @@ comptime {
12 @export(&__trunctfsf2, .{ .name = "__trunctfsf2", .linkage = common.linkage, .visibility = common.visibility });12 @export(&__trunctfsf2, .{ .name = "__trunctfsf2", .linkage = common.linkage, .visibility = common.visibility });
13}13}
1414
15pub fn __trunctfsf2(a: f128) callconv(.C) f32 {15pub fn __trunctfsf2(a: f128) callconv(.c) f32 {
16 return truncf(f32, f128, a);16 return truncf(f32, f128, a);
17}17}
1818
19fn _Qp_qtos(a: *const f128) callconv(.C) f32 {19fn _Qp_qtos(a: *const f128) callconv(.c) f32 {
20 return truncf(f32, f128, a.*);20 return truncf(f32, f128, a.*);
21}21}
lib/compiler_rt/trunctfxf2.zig+1-1
...@@ -8,7 +8,7 @@ comptime {...@@ -8,7 +8,7 @@ comptime {
8 @export(&__trunctfxf2, .{ .name = "__trunctfxf2", .linkage = common.linkage, .visibility = common.visibility });8 @export(&__trunctfxf2, .{ .name = "__trunctfxf2", .linkage = common.linkage, .visibility = common.visibility });
9}9}
1010
11pub fn __trunctfxf2(a: f128) callconv(.C) f80 {11pub fn __trunctfxf2(a: f128) callconv(.c) f80 {
12 const src_sig_bits = math.floatMantissaBits(f128);12 const src_sig_bits = math.floatMantissaBits(f128);
13 const dst_sig_bits = math.floatMantissaBits(f80) - 1; // -1 for the integer bit13 const dst_sig_bits = math.floatMantissaBits(f80) - 1; // -1 for the integer bit
1414
lib/compiler_rt/truncxfdf2.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__truncxfdf2, .{ .name = "__truncxfdf2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__truncxfdf2, .{ .name = "__truncxfdf2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __truncxfdf2(a: f80) callconv(.C) f64 {10fn __truncxfdf2(a: f80) callconv(.c) f64 {
11 return trunc_f80(f64, a);11 return trunc_f80(f64, a);
12}12}
lib/compiler_rt/truncxfhf2.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__truncxfhf2, .{ .name = "__truncxfhf2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__truncxfhf2, .{ .name = "__truncxfhf2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __truncxfhf2(a: f80) callconv(.C) common.F16T(f80) {10fn __truncxfhf2(a: f80) callconv(.c) common.F16T(f80) {
11 return @bitCast(trunc_f80(f16, a));11 return @bitCast(trunc_f80(f16, a));
12}12}
lib/compiler_rt/truncxfsf2.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__truncxfsf2, .{ .name = "__truncxfsf2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__truncxfsf2, .{ .name = "__truncxfsf2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10fn __truncxfsf2(a: f80) callconv(.C) f32 {10fn __truncxfsf2(a: f80) callconv(.c) f32 {
11 return trunc_f80(f32, a);11 return trunc_f80(f32, a);
12}12}
lib/compiler_rt/udivmodei4.zig+2-2
...@@ -112,7 +112,7 @@ pub fn divmod(q: ?[]u32, r: ?[]u32, u: []const u32, v: []const u32) !void {...@@ -112,7 +112,7 @@ pub fn divmod(q: ?[]u32, r: ?[]u32, u: []const u32, v: []const u32) !void {
112 }112 }
113}113}
114114
115pub fn __udivei4(r_q: [*]u32, u_p: [*]const u32, v_p: [*]const u32, bits: usize) callconv(.C) void {115pub fn __udivei4(r_q: [*]u32, u_p: [*]const u32, v_p: [*]const u32, bits: usize) callconv(.c) void {
116 @setRuntimeSafety(builtin.is_test);116 @setRuntimeSafety(builtin.is_test);
117 const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];117 const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];
118 const v = v_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];118 const v = v_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];
...@@ -120,7 +120,7 @@ pub fn __udivei4(r_q: [*]u32, u_p: [*]const u32, v_p: [*]const u32, bits: usize)...@@ -120,7 +120,7 @@ pub fn __udivei4(r_q: [*]u32, u_p: [*]const u32, v_p: [*]const u32, bits: usize)
120 @call(.always_inline, divmod, .{ q, null, u, v }) catch unreachable;120 @call(.always_inline, divmod, .{ q, null, u, v }) catch unreachable;
121}121}
122122
123pub fn __umodei4(r_p: [*]u32, u_p: [*]const u32, v_p: [*]const u32, bits: usize) callconv(.C) void {123pub fn __umodei4(r_p: [*]u32, u_p: [*]const u32, v_p: [*]const u32, bits: usize) callconv(.c) void {
124 @setRuntimeSafety(builtin.is_test);124 @setRuntimeSafety(builtin.is_test);
125 const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];125 const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];
126 const v = v_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];126 const v = v_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];
lib/compiler_rt/udivmodti4.zig+2-2
...@@ -13,13 +13,13 @@ comptime {...@@ -13,13 +13,13 @@ comptime {
13 }13 }
14}14}
1515
16pub fn __udivmodti4(a: u128, b: u128, maybe_rem: ?*u128) callconv(.C) u128 {16pub fn __udivmodti4(a: u128, b: u128, maybe_rem: ?*u128) callconv(.c) u128 {
17 return udivmod(u128, a, b, maybe_rem);17 return udivmod(u128, a, b, maybe_rem);
18}18}
1919
20const v2u64 = @Vector(2, u64);20const v2u64 = @Vector(2, u64);
2121
22fn __udivmodti4_windows_x86_64(a: v2u64, b: v2u64, maybe_rem: ?*u128) callconv(.C) v2u64 {22fn __udivmodti4_windows_x86_64(a: v2u64, b: v2u64, maybe_rem: ?*u128) callconv(.c) v2u64 {
23 return @bitCast(udivmod(u128, @bitCast(a), @bitCast(b), maybe_rem));23 return @bitCast(udivmod(u128, @bitCast(a), @bitCast(b), maybe_rem));
24}24}
2525
lib/compiler_rt/udivti3.zig+2-2
...@@ -13,12 +13,12 @@ comptime {...@@ -13,12 +13,12 @@ comptime {
13 }13 }
14}14}
1515
16pub fn __udivti3(a: u128, b: u128) callconv(.C) u128 {16pub fn __udivti3(a: u128, b: u128) callconv(.c) u128 {
17 return udivmod(u128, a, b, null);17 return udivmod(u128, a, b, null);
18}18}
1919
20const v2u64 = @Vector(2, u64);20const v2u64 = @Vector(2, u64);
2121
22fn __udivti3_windows_x86_64(a: v2u64, b: v2u64) callconv(.C) v2u64 {22fn __udivti3_windows_x86_64(a: v2u64, b: v2u64) callconv(.c) v2u64 {
23 return @bitCast(udivmod(u128, @bitCast(a), @bitCast(b), null));23 return @bitCast(udivmod(u128, @bitCast(a), @bitCast(b), null));
24}24}
lib/compiler_rt/umodti3.zig+2-2
...@@ -13,7 +13,7 @@ comptime {...@@ -13,7 +13,7 @@ comptime {
13 }13 }
14}14}
1515
16pub fn __umodti3(a: u128, b: u128) callconv(.C) u128 {16pub fn __umodti3(a: u128, b: u128) callconv(.c) u128 {
17 var r: u128 = undefined;17 var r: u128 = undefined;
18 _ = udivmod(u128, a, b, &r);18 _ = udivmod(u128, a, b, &r);
19 return r;19 return r;
...@@ -21,7 +21,7 @@ pub fn __umodti3(a: u128, b: u128) callconv(.C) u128 {...@@ -21,7 +21,7 @@ pub fn __umodti3(a: u128, b: u128) callconv(.C) u128 {
2121
22const v2u64 = @Vector(2, u64);22const v2u64 = @Vector(2, u64);
2323
24fn __umodti3_windows_x86_64(a: v2u64, b: v2u64) callconv(.C) v2u64 {24fn __umodti3_windows_x86_64(a: v2u64, b: v2u64) callconv(.c) v2u64 {
25 var r: u128 = undefined;25 var r: u128 = undefined;
26 _ = udivmod(u128, @bitCast(a), @bitCast(b), &r);26 _ = udivmod(u128, @bitCast(a), @bitCast(b), &r);
27 return @bitCast(r);27 return @bitCast(r);
lib/compiler_rt/unorddf2.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14pub fn __unorddf2(a: f64, b: f64) callconv(.C) i32 {14pub fn __unorddf2(a: f64, b: f64) callconv(.c) i32 {
15 return comparef.unordcmp(f64, a, b);15 return comparef.unordcmp(f64, a, b);
16}16}
1717
18fn __aeabi_dcmpun(a: f64, b: f64) callconv(.AAPCS) i32 {18fn __aeabi_dcmpun(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 {
19 return comparef.unordcmp(f64, a, b);19 return comparef.unordcmp(f64, a, b);
20}20}
lib/compiler_rt/unordhf2.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__unordhf2, .{ .name = "__unordhf2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__unordhf2, .{ .name = "__unordhf2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10pub fn __unordhf2(a: f16, b: f16) callconv(.C) i32 {10pub fn __unordhf2(a: f16, b: f16) callconv(.c) i32 {
11 return comparef.unordcmp(f16, a, b);11 return comparef.unordcmp(f16, a, b);
12}12}
lib/compiler_rt/unordsf2.zig+2-2
...@@ -11,10 +11,10 @@ comptime {...@@ -11,10 +11,10 @@ comptime {
11 }11 }
12}12}
1313
14pub fn __unordsf2(a: f32, b: f32) callconv(.C) i32 {14pub fn __unordsf2(a: f32, b: f32) callconv(.c) i32 {
15 return comparef.unordcmp(f32, a, b);15 return comparef.unordcmp(f32, a, b);
16}16}
1717
18fn __aeabi_fcmpun(a: f32, b: f32) callconv(.AAPCS) i32 {18fn __aeabi_fcmpun(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 {
19 return comparef.unordcmp(f32, a, b);19 return comparef.unordcmp(f32, a, b);
20}20}
lib/compiler_rt/unordtf2.zig+1-1
...@@ -13,6 +13,6 @@ comptime {...@@ -13,6 +13,6 @@ comptime {
13 @export(&__unordtf2, .{ .name = "__unordtf2", .linkage = common.linkage, .visibility = common.visibility });13 @export(&__unordtf2, .{ .name = "__unordtf2", .linkage = common.linkage, .visibility = common.visibility });
14}14}
1515
16fn __unordtf2(a: f128, b: f128) callconv(.C) i32 {16fn __unordtf2(a: f128, b: f128) callconv(.c) i32 {
17 return comparef.unordcmp(f128, a, b);17 return comparef.unordcmp(f128, a, b);
18}18}
lib/compiler_rt/unordxf2.zig+1-1
...@@ -7,6 +7,6 @@ comptime {...@@ -7,6 +7,6 @@ comptime {
7 @export(&__unordxf2, .{ .name = "__unordxf2", .linkage = common.linkage, .visibility = common.visibility });7 @export(&__unordxf2, .{ .name = "__unordxf2", .linkage = common.linkage, .visibility = common.visibility });
8}8}
99
10pub fn __unordxf2(a: f80, b: f80) callconv(.C) i32 {10pub fn __unordxf2(a: f80, b: f80) callconv(.c) i32 {
11 return comparef.unordcmp(f80, a, b);11 return comparef.unordcmp(f80, a, b);
12}12}
lib/fuzzer.zig+1-1
...@@ -453,7 +453,7 @@ export fn fuzzer_coverage_id() u64 {...@@ -453,7 +453,7 @@ export fn fuzzer_coverage_id() u64 {
453 return fuzzer.coverage_id;453 return fuzzer.coverage_id;
454}454}
455455
456var fuzzer_one: *const fn (input_ptr: [*]const u8, input_len: usize) callconv(.C) void = undefined;456var fuzzer_one: *const fn (input_ptr: [*]const u8, input_len: usize) callconv(.c) void = undefined;
457457
458export fn fuzzer_start(testOne: @TypeOf(fuzzer_one)) void {458export fn fuzzer_start(testOne: @TypeOf(fuzzer_one)) void {
459 fuzzer_one = testOne;459 fuzzer_one = testOne;
lib/std/os/linux/aarch64.zig+2-2
...@@ -99,7 +99,7 @@ pub fn syscall6(...@@ -99,7 +99,7 @@ pub fn syscall6(
99 );99 );
100}100}
101101
102pub fn clone() callconv(.Naked) usize {102pub fn clone() callconv(.naked) usize {
103 // __clone(func, stack, flags, arg, ptid, tls, ctid)103 // __clone(func, stack, flags, arg, ptid, tls, ctid)
104 // x0, x1, w2, x3, x4, x5, x6104 // x0, x1, w2, x3, x4, x5, x6
105 //105 //
...@@ -141,7 +141,7 @@ pub fn clone() callconv(.Naked) usize {...@@ -141,7 +141,7 @@ pub fn clone() callconv(.Naked) usize {
141141
142pub const restore = restore_rt;142pub const restore = restore_rt;
143143
144pub fn restore_rt() callconv(.Naked) noreturn {144pub fn restore_rt() callconv(.naked) noreturn {
145 switch (@import("builtin").zig_backend) {145 switch (@import("builtin").zig_backend) {
146 .stage2_c => asm volatile (146 .stage2_c => asm volatile (
147 \\ mov x8, %[number]147 \\ mov x8, %[number]
lib/std/os/linux/arm.zig+3-3
...@@ -98,7 +98,7 @@ pub fn syscall6(...@@ -98,7 +98,7 @@ pub fn syscall6(
98 );98 );
99}99}
100100
101pub fn clone() callconv(.Naked) usize {101pub fn clone() callconv(.naked) usize {
102 // __clone(func, stack, flags, arg, ptid, tls, ctid)102 // __clone(func, stack, flags, arg, ptid, tls, ctid)
103 // r0, r1, r2, r3, +0, +4, +8103 // r0, r1, r2, r3, +0, +4, +8
104 //104 //
...@@ -134,7 +134,7 @@ pub fn clone() callconv(.Naked) usize {...@@ -134,7 +134,7 @@ pub fn clone() callconv(.Naked) usize {
134 );134 );
135}135}
136136
137pub fn restore() callconv(.Naked) noreturn {137pub fn restore() callconv(.naked) noreturn {
138 switch (@import("builtin").zig_backend) {138 switch (@import("builtin").zig_backend) {
139 .stage2_c => asm volatile (139 .stage2_c => asm volatile (
140 \\ mov r7, %[number]140 \\ mov r7, %[number]
...@@ -152,7 +152,7 @@ pub fn restore() callconv(.Naked) noreturn {...@@ -152,7 +152,7 @@ pub fn restore() callconv(.Naked) noreturn {
152 }152 }
153}153}
154154
155pub fn restore_rt() callconv(.Naked) noreturn {155pub fn restore_rt() callconv(.naked) noreturn {
156 switch (@import("builtin").zig_backend) {156 switch (@import("builtin").zig_backend) {
157 .stage2_c => asm volatile (157 .stage2_c => asm volatile (
158 \\ mov r7, %[number]158 \\ mov r7, %[number]
lib/std/os/linux/hexagon.zig+2-2
...@@ -96,7 +96,7 @@ pub fn syscall6(...@@ -96,7 +96,7 @@ pub fn syscall6(
96 );96 );
97}97}
9898
99pub fn clone() callconv(.Naked) usize {99pub fn clone() callconv(.naked) usize {
100 // __clone(func, stack, flags, arg, ptid, tls, ctid)100 // __clone(func, stack, flags, arg, ptid, tls, ctid)
101 // r0, r1, r2, r3, r4, r5, +0101 // r0, r1, r2, r3, r4, r5, +0
102 //102 //
...@@ -137,7 +137,7 @@ pub fn clone() callconv(.Naked) usize {...@@ -137,7 +137,7 @@ pub fn clone() callconv(.Naked) usize {
137137
138pub const restore = restore_rt;138pub const restore = restore_rt;
139139
140pub fn restore_rt() callconv(.Naked) noreturn {140pub fn restore_rt() callconv(.naked) noreturn {
141 asm volatile (141 asm volatile (
142 \\ trap0(#0)142 \\ trap0(#0)
143 :143 :
lib/std/os/linux/loongarch64.zig+2-2
...@@ -100,7 +100,7 @@ pub fn syscall6(...@@ -100,7 +100,7 @@ pub fn syscall6(
100 );100 );
101}101}
102102
103pub fn clone() callconv(.Naked) usize {103pub fn clone() callconv(.naked) usize {
104 // __clone(func, stack, flags, arg, ptid, tls, ctid)104 // __clone(func, stack, flags, arg, ptid, tls, ctid)
105 // a0, a1, a2, a3, a4, a5, a6105 // a0, a1, a2, a3, a4, a5, a6
106 // sys_clone(flags, stack, ptid, ctid, tls)106 // sys_clone(flags, stack, ptid, ctid, tls)
...@@ -140,7 +140,7 @@ pub fn clone() callconv(.Naked) usize {...@@ -140,7 +140,7 @@ pub fn clone() callconv(.Naked) usize {
140140
141pub const restore = restore_rt;141pub const restore = restore_rt;
142142
143pub fn restore_rt() callconv(.Naked) noreturn {143pub fn restore_rt() callconv(.naked) noreturn {
144 asm volatile (144 asm volatile (
145 \\ or $a7, $zero, %[number]145 \\ or $a7, $zero, %[number]
146 \\ syscall 0146 \\ syscall 0
lib/std/os/linux/mips.zig+3-3
...@@ -199,7 +199,7 @@ pub fn syscall7(...@@ -199,7 +199,7 @@ pub fn syscall7(
199 );199 );
200}200}
201201
202pub fn clone() callconv(.Naked) usize {202pub fn clone() callconv(.naked) usize {
203 // __clone(func, stack, flags, arg, ptid, tls, ctid)203 // __clone(func, stack, flags, arg, ptid, tls, ctid)
204 // 3, 4, 5, 6, 7, 8, 9204 // 3, 4, 5, 6, 7, 8, 9
205 //205 //
...@@ -250,7 +250,7 @@ pub fn clone() callconv(.Naked) usize {...@@ -250,7 +250,7 @@ pub fn clone() callconv(.Naked) usize {
250 );250 );
251}251}
252252
253pub fn restore() callconv(.Naked) noreturn {253pub fn restore() callconv(.naked) noreturn {
254 asm volatile (254 asm volatile (
255 \\ syscall255 \\ syscall
256 :256 :
...@@ -259,7 +259,7 @@ pub fn restore() callconv(.Naked) noreturn {...@@ -259,7 +259,7 @@ pub fn restore() callconv(.Naked) noreturn {
259 );259 );
260}260}
261261
262pub fn restore_rt() callconv(.Naked) noreturn {262pub fn restore_rt() callconv(.naked) noreturn {
263 asm volatile (263 asm volatile (
264 \\ syscall264 \\ syscall
265 :265 :
lib/std/os/linux/mips64.zig+3-3
...@@ -182,7 +182,7 @@ pub fn syscall7(...@@ -182,7 +182,7 @@ pub fn syscall7(
182 );182 );
183}183}
184184
185pub fn clone() callconv(.Naked) usize {185pub fn clone() callconv(.naked) usize {
186 // __clone(func, stack, flags, arg, ptid, tls, ctid)186 // __clone(func, stack, flags, arg, ptid, tls, ctid)
187 // 3, 4, 5, 6, 7, 8, 9187 // 3, 4, 5, 6, 7, 8, 9
188 //188 //
...@@ -229,7 +229,7 @@ pub fn clone() callconv(.Naked) usize {...@@ -229,7 +229,7 @@ pub fn clone() callconv(.Naked) usize {
229 );229 );
230}230}
231231
232pub fn restore() callconv(.Naked) noreturn {232pub fn restore() callconv(.naked) noreturn {
233 asm volatile (233 asm volatile (
234 \\ syscall234 \\ syscall
235 :235 :
...@@ -238,7 +238,7 @@ pub fn restore() callconv(.Naked) noreturn {...@@ -238,7 +238,7 @@ pub fn restore() callconv(.Naked) noreturn {
238 );238 );
239}239}
240240
241pub fn restore_rt() callconv(.Naked) noreturn {241pub fn restore_rt() callconv(.naked) noreturn {
242 asm volatile (242 asm volatile (
243 \\ syscall243 \\ syscall
244 :244 :
lib/std/os/linux/powerpc.zig+2-2
...@@ -127,7 +127,7 @@ pub fn syscall6(...@@ -127,7 +127,7 @@ pub fn syscall6(
127 );127 );
128}128}
129129
130pub fn clone() callconv(.Naked) usize {130pub fn clone() callconv(.naked) usize {
131 // __clone(func, stack, flags, arg, ptid, tls, ctid)131 // __clone(func, stack, flags, arg, ptid, tls, ctid)
132 // 3, 4, 5, 6, 7, 8, 9132 // 3, 4, 5, 6, 7, 8, 9
133 //133 //
...@@ -199,7 +199,7 @@ pub fn clone() callconv(.Naked) usize {...@@ -199,7 +199,7 @@ pub fn clone() callconv(.Naked) usize {
199199
200pub const restore = restore_rt;200pub const restore = restore_rt;
201201
202pub fn restore_rt() callconv(.Naked) noreturn {202pub fn restore_rt() callconv(.naked) noreturn {
203 asm volatile (203 asm volatile (
204 \\ sc204 \\ sc
205 :205 :
lib/std/os/linux/powerpc64.zig+2-2
...@@ -127,7 +127,7 @@ pub fn syscall6(...@@ -127,7 +127,7 @@ pub fn syscall6(
127 );127 );
128}128}
129129
130pub fn clone() callconv(.Naked) usize {130pub fn clone() callconv(.naked) usize {
131 // __clone(func, stack, flags, arg, ptid, tls, ctid)131 // __clone(func, stack, flags, arg, ptid, tls, ctid)
132 // 3, 4, 5, 6, 7, 8, 9132 // 3, 4, 5, 6, 7, 8, 9
133 //133 //
...@@ -184,7 +184,7 @@ pub fn clone() callconv(.Naked) usize {...@@ -184,7 +184,7 @@ pub fn clone() callconv(.Naked) usize {
184184
185pub const restore = restore_rt;185pub const restore = restore_rt;
186186
187pub fn restore_rt() callconv(.Naked) noreturn {187pub fn restore_rt() callconv(.naked) noreturn {
188 asm volatile (188 asm volatile (
189 \\ sc189 \\ sc
190 :190 :
lib/std/os/linux/riscv32.zig+2-2
...@@ -96,7 +96,7 @@ pub fn syscall6(...@@ -96,7 +96,7 @@ pub fn syscall6(
96 );96 );
97}97}
9898
99pub fn clone() callconv(.Naked) usize {99pub fn clone() callconv(.naked) usize {
100 // __clone(func, stack, flags, arg, ptid, tls, ctid)100 // __clone(func, stack, flags, arg, ptid, tls, ctid)
101 // a0, a1, a2, a3, a4, a5, a6101 // a0, a1, a2, a3, a4, a5, a6
102 //102 //
...@@ -142,7 +142,7 @@ pub fn clone() callconv(.Naked) usize {...@@ -142,7 +142,7 @@ pub fn clone() callconv(.Naked) usize {
142142
143pub const restore = restore_rt;143pub const restore = restore_rt;
144144
145pub fn restore_rt() callconv(.Naked) noreturn {145pub fn restore_rt() callconv(.naked) noreturn {
146 asm volatile (146 asm volatile (
147 \\ ecall147 \\ ecall
148 :148 :
lib/std/os/linux/riscv64.zig+2-2
...@@ -96,7 +96,7 @@ pub fn syscall6(...@@ -96,7 +96,7 @@ pub fn syscall6(
96 );96 );
97}97}
9898
99pub fn clone() callconv(.Naked) usize {99pub fn clone() callconv(.naked) usize {
100 // __clone(func, stack, flags, arg, ptid, tls, ctid)100 // __clone(func, stack, flags, arg, ptid, tls, ctid)
101 // a0, a1, a2, a3, a4, a5, a6101 // a0, a1, a2, a3, a4, a5, a6
102 //102 //
...@@ -142,7 +142,7 @@ pub fn clone() callconv(.Naked) usize {...@@ -142,7 +142,7 @@ pub fn clone() callconv(.Naked) usize {
142142
143pub const restore = restore_rt;143pub const restore = restore_rt;
144144
145pub fn restore_rt() callconv(.Naked) noreturn {145pub fn restore_rt() callconv(.naked) noreturn {
146 asm volatile (146 asm volatile (
147 \\ ecall147 \\ ecall
148 :148 :
lib/std/os/linux/s390x.zig+2-2
...@@ -90,7 +90,7 @@ pub fn syscall6(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize,...@@ -90,7 +90,7 @@ pub fn syscall6(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize,
90 );90 );
91}91}
9292
93pub fn clone() callconv(.Naked) usize {93pub fn clone() callconv(.naked) usize {
94 asm volatile (94 asm volatile (
95 \\# int clone(95 \\# int clone(
96 \\# fn, a = r296 \\# fn, a = r2
...@@ -156,7 +156,7 @@ pub fn clone() callconv(.Naked) usize {...@@ -156,7 +156,7 @@ pub fn clone() callconv(.Naked) usize {
156156
157pub const restore = restore_rt;157pub const restore = restore_rt;
158158
159pub fn restore_rt() callconv(.Naked) noreturn {159pub fn restore_rt() callconv(.naked) noreturn {
160 asm volatile (160 asm volatile (
161 \\svc 0161 \\svc 0
162 :162 :
lib/std/os/linux/sparc64.zig+1-1
...@@ -179,7 +179,7 @@ pub fn syscall6(...@@ -179,7 +179,7 @@ pub fn syscall6(
179 );179 );
180}180}
181181
182pub fn clone() callconv(.Naked) usize {182pub fn clone() callconv(.naked) usize {
183 // __clone(func, stack, flags, arg, ptid, tls, ctid)183 // __clone(func, stack, flags, arg, ptid, tls, ctid)
184 // i0, i1, i2, i3, i4, i5, sp184 // i0, i1, i2, i3, i4, i5, sp
185 //185 //
lib/std/os/linux/thumb.zig+2-2
...@@ -143,7 +143,7 @@ pub fn syscall6(...@@ -143,7 +143,7 @@ pub fn syscall6(
143143
144pub const clone = @import("arm.zig").clone;144pub const clone = @import("arm.zig").clone;
145145
146pub fn restore() callconv(.Naked) noreturn {146pub fn restore() callconv(.naked) noreturn {
147 asm volatile (147 asm volatile (
148 \\ mov r7, %[number]148 \\ mov r7, %[number]
149 \\ svc #0149 \\ svc #0
...@@ -152,7 +152,7 @@ pub fn restore() callconv(.Naked) noreturn {...@@ -152,7 +152,7 @@ pub fn restore() callconv(.Naked) noreturn {
152 );152 );
153}153}
154154
155pub fn restore_rt() callconv(.Naked) noreturn {155pub fn restore_rt() callconv(.naked) noreturn {
156 asm volatile (156 asm volatile (
157 \\ mov r7, %[number]157 \\ mov r7, %[number]
158 \\ svc #0158 \\ svc #0
lib/std/os/linux/x86.zig+4-4
...@@ -122,7 +122,7 @@ pub fn socketcall(call: usize, args: [*]const usize) usize {...@@ -122,7 +122,7 @@ pub fn socketcall(call: usize, args: [*]const usize) usize {
122 );122 );
123}123}
124124
125pub fn clone() callconv(.Naked) usize {125pub fn clone() callconv(.naked) usize {
126 // __clone(func, stack, flags, arg, ptid, tls, ctid)126 // __clone(func, stack, flags, arg, ptid, tls, ctid)
127 // +8, +12, +16, +20, +24, +28, +32127 // +8, +12, +16, +20, +24, +28, +32
128 //128 //
...@@ -172,7 +172,7 @@ pub fn clone() callconv(.Naked) usize {...@@ -172,7 +172,7 @@ pub fn clone() callconv(.Naked) usize {
172 );172 );
173}173}
174174
175pub fn restore() callconv(.Naked) noreturn {175pub fn restore() callconv(.naked) noreturn {
176 switch (@import("builtin").zig_backend) {176 switch (@import("builtin").zig_backend) {
177 .stage2_c => asm volatile (177 .stage2_c => asm volatile (
178 \\ movl %[number], %%eax178 \\ movl %[number], %%eax
...@@ -190,7 +190,7 @@ pub fn restore() callconv(.Naked) noreturn {...@@ -190,7 +190,7 @@ pub fn restore() callconv(.Naked) noreturn {
190 }190 }
191}191}
192192
193pub fn restore_rt() callconv(.Naked) noreturn {193pub fn restore_rt() callconv(.naked) noreturn {
194 switch (@import("builtin").zig_backend) {194 switch (@import("builtin").zig_backend) {
195 .stage2_c => asm volatile (195 .stage2_c => asm volatile (
196 \\ movl %[number], %%eax196 \\ movl %[number], %%eax
...@@ -405,7 +405,7 @@ noinline fn getContextReturnAddress() usize {...@@ -405,7 +405,7 @@ noinline fn getContextReturnAddress() usize {
405 return @returnAddress();405 return @returnAddress();
406}406}
407407
408pub fn getContextInternal() callconv(.Naked) usize {408pub fn getContextInternal() callconv(.naked) usize {
409 asm volatile (409 asm volatile (
410 \\ movl $0, %[flags_offset:c](%%edx)410 \\ movl $0, %[flags_offset:c](%%edx)
411 \\ movl $0, %[link_offset:c](%%edx)411 \\ movl $0, %[link_offset:c](%%edx)
lib/std/os/linux/x86_64.zig+3-3
...@@ -101,7 +101,7 @@ pub fn syscall6(...@@ -101,7 +101,7 @@ pub fn syscall6(
101 );101 );
102}102}
103103
104pub fn clone() callconv(.Naked) usize {104pub fn clone() callconv(.naked) usize {
105 asm volatile (105 asm volatile (
106 \\ movl $56,%%eax // SYS_clone106 \\ movl $56,%%eax // SYS_clone
107 \\ movq %%rdi,%%r11107 \\ movq %%rdi,%%r11
...@@ -137,7 +137,7 @@ pub fn clone() callconv(.Naked) usize {...@@ -137,7 +137,7 @@ pub fn clone() callconv(.Naked) usize {
137137
138pub const restore = restore_rt;138pub const restore = restore_rt;
139139
140pub fn restore_rt() callconv(.Naked) noreturn {140pub fn restore_rt() callconv(.naked) noreturn {
141 switch (@import("builtin").zig_backend) {141 switch (@import("builtin").zig_backend) {
142 .stage2_c => asm volatile (142 .stage2_c => asm volatile (
143 \\ movl %[number], %%eax143 \\ movl %[number], %%eax
...@@ -382,7 +382,7 @@ fn gpRegisterOffset(comptime reg_index: comptime_int) usize {...@@ -382,7 +382,7 @@ fn gpRegisterOffset(comptime reg_index: comptime_int) usize {
382 return @offsetOf(ucontext_t, "mcontext") + @offsetOf(mcontext_t, "gregs") + @sizeOf(usize) * reg_index;382 return @offsetOf(ucontext_t, "mcontext") + @offsetOf(mcontext_t, "gregs") + @sizeOf(usize) * reg_index;
383}383}
384384
385fn getContextInternal() callconv(.Naked) usize {385fn getContextInternal() callconv(.naked) usize {
386 // TODO: Read GS/FS registers?386 // TODO: Read GS/FS registers?
387 asm volatile (387 asm volatile (
388 \\ movq $0, %[flags_offset:c](%%rdi)388 \\ movq $0, %[flags_offset:c](%%rdi)
lib/std/zig/parser_test.zig+4-4
...@@ -1096,10 +1096,10 @@ test "zig fmt: block in slice expression" {...@@ -1096,10 +1096,10 @@ test "zig fmt: block in slice expression" {
1096test "zig fmt: async function" {1096test "zig fmt: async function" {
1097 try testCanonical(1097 try testCanonical(
1098 \\pub const Server = struct {1098 \\pub const Server = struct {
1099 \\ handleRequestFn: fn (*Server, *const std.net.Address, File) callconv(.Async) void,1099 \\ handleRequestFn: fn (*Server, *const std.net.Address, File) callconv(.@"async") void,
1100 \\};1100 \\};
1101 \\test "hi" {1101 \\test "hi" {
1102 \\ var ptr: fn (i32) callconv(.Async) void = @ptrCast(other);1102 \\ var ptr: fn (i32) callconv(.@"async") void = @ptrCast(other);
1103 \\}1103 \\}
1104 \\1104 \\
1105 );1105 );
...@@ -1259,7 +1259,7 @@ test "zig fmt: threadlocal" {...@@ -1259,7 +1259,7 @@ test "zig fmt: threadlocal" {
1259test "zig fmt: linksection" {1259test "zig fmt: linksection" {
1260 try testCanonical(1260 try testCanonical(
1261 \\export var aoeu: u64 linksection(".text.derp") = 1234;1261 \\export var aoeu: u64 linksection(".text.derp") = 1234;
1262 \\export fn _start() linksection(".text.boot") callconv(.Naked) noreturn {}1262 \\export fn _start() linksection(".text.boot") callconv(.naked) noreturn {}
1263 \\1263 \\
1264 );1264 );
1265}1265}
...@@ -3926,7 +3926,7 @@ test "zig fmt: fn type" {...@@ -3926,7 +3926,7 @@ test "zig fmt: fn type" {
3926 \\}3926 \\}
3927 \\3927 \\
3928 \\const a: fn (u8) u8 = undefined;3928 \\const a: fn (u8) u8 = undefined;
3929 \\const b: fn (u8) callconv(.Naked) u8 = undefined;3929 \\const b: fn (u8) callconv(.naked) u8 = undefined;
3930 \\const ap: fn (u8) u8 = a;3930 \\const ap: fn (u8) u8 = a;
3931 \\3931 \\
3932 );3932 );
src/codegen/spirv/Assembler.zig+1-1
...@@ -276,7 +276,7 @@ fn todo(self: *Assembler, comptime fmt: []const u8, args: anytype) Error {...@@ -276,7 +276,7 @@ fn todo(self: *Assembler, comptime fmt: []const u8, args: anytype) Error {
276fn processInstruction(self: *Assembler) !void {276fn processInstruction(self: *Assembler) !void {
277 const result: AsmValue = switch (self.inst.opcode) {277 const result: AsmValue = switch (self.inst.opcode) {
278 .OpEntryPoint => {278 .OpEntryPoint => {
279 return self.fail(0, "cannot export entry points via OpEntryPoint, export the kernel using callconv(.Kernel)", .{});279 return self.fail(0, "cannot export entry points via OpEntryPoint, export the kernel using callconv(.kernel)", .{});
280 },280 },
281 .OpCapability => {281 .OpCapability => {
282 try self.spv.addCapability(@enumFromInt(self.inst.operands.items[0].value));282 try self.spv.addCapability(@enumFromInt(self.inst.operands.items[0].value));
src/link/NvPtx.zig+1-1
...@@ -1,7 +1,7 @@...@@ -1,7 +1,7 @@
1//! NVidia PTX (Parallel Thread Execution)1//! NVidia PTX (Parallel Thread Execution)
2//! https://docs.nvidia.com/cuda/parallel-thread-execution/index.html2//! https://docs.nvidia.com/cuda/parallel-thread-execution/index.html
3//! For this we rely on the nvptx backend of LLVM3//! For this we rely on the nvptx backend of LLVM
4//! Kernel functions need to be marked both as "export" and "callconv(.Kernel)"4//! Kernel functions need to be marked both as "export" and "callconv(.kernel)"
55
6const NvPtx = @This();6const NvPtx = @This();
77
test/behavior/async_fn.zig+27-27
...@@ -137,13 +137,13 @@ test "@frameSize" {...@@ -137,13 +137,13 @@ test "@frameSize" {
137 const S = struct {137 const S = struct {
138 fn doTheTest() !void {138 fn doTheTest() !void {
139 {139 {
140 var ptr = @as(fn (i32) callconv(.Async) void, @ptrCast(other));140 var ptr = @as(fn (i32) callconv(.@"async") void, @ptrCast(other));
141 _ = &ptr;141 _ = &ptr;
142 const size = @frameSize(ptr);142 const size = @frameSize(ptr);
143 try expect(size == @sizeOf(@Frame(other)));143 try expect(size == @sizeOf(@Frame(other)));
144 }144 }
145 {145 {
146 var ptr = @as(fn () callconv(.Async) void, @ptrCast(first));146 var ptr = @as(fn () callconv(.@"async") void, @ptrCast(first));
147 _ = &ptr;147 _ = &ptr;
148 const size = @frameSize(ptr);148 const size = @frameSize(ptr);
149 try expect(size == @sizeOf(@Frame(first)));149 try expect(size == @sizeOf(@Frame(first)));
...@@ -220,7 +220,7 @@ test "coroutine suspend with block" {...@@ -220,7 +220,7 @@ test "coroutine suspend with block" {
220220
221var a_promise: anyframe = undefined;221var a_promise: anyframe = undefined;
222var global_result = false;222var global_result = false;
223fn testSuspendBlock() callconv(.Async) void {223fn testSuspendBlock() callconv(.@"async") void {
224 suspend {224 suspend {
225 comptime assert(@TypeOf(@frame()) == *@Frame(testSuspendBlock)) catch unreachable;225 comptime assert(@TypeOf(@frame()) == *@Frame(testSuspendBlock)) catch unreachable;
226 a_promise = @frame();226 a_promise = @frame();
...@@ -249,14 +249,14 @@ test "coroutine await" {...@@ -249,14 +249,14 @@ test "coroutine await" {
249 try expect(await_final_result == 1234);249 try expect(await_final_result == 1234);
250 try expect(std.mem.eql(u8, &await_points, "abcdefghi"));250 try expect(std.mem.eql(u8, &await_points, "abcdefghi"));
251}251}
252fn await_amain() callconv(.Async) void {252fn await_amain() callconv(.@"async") void {
253 await_seq('b');253 await_seq('b');
254 var p = async await_another();254 var p = async await_another();
255 await_seq('e');255 await_seq('e');
256 await_final_result = await p;256 await_final_result = await p;
257 await_seq('h');257 await_seq('h');
258}258}
259fn await_another() callconv(.Async) i32 {259fn await_another() callconv(.@"async") i32 {
260 await_seq('c');260 await_seq('c');
261 suspend {261 suspend {
262 await_seq('d');262 await_seq('d');
...@@ -287,14 +287,14 @@ test "coroutine await early return" {...@@ -287,14 +287,14 @@ test "coroutine await early return" {
287 try expect(early_final_result == 1234);287 try expect(early_final_result == 1234);
288 try expect(std.mem.eql(u8, &early_points, "abcdef"));288 try expect(std.mem.eql(u8, &early_points, "abcdef"));
289}289}
290fn early_amain() callconv(.Async) void {290fn early_amain() callconv(.@"async") void {
291 early_seq('b');291 early_seq('b');
292 var p = async early_another();292 var p = async early_another();
293 early_seq('d');293 early_seq('d');
294 early_final_result = await p;294 early_final_result = await p;
295 early_seq('e');295 early_seq('e');
296}296}
297fn early_another() callconv(.Async) i32 {297fn early_another() callconv(.@"async") i32 {
298 early_seq('c');298 early_seq('c');
299 return 1234;299 return 1234;
300}300}
...@@ -313,7 +313,7 @@ test "async function with dot syntax" {...@@ -313,7 +313,7 @@ test "async function with dot syntax" {
313313
314 const S = struct {314 const S = struct {
315 var y: i32 = 1;315 var y: i32 = 1;
316 fn foo() callconv(.Async) void {316 fn foo() callconv(.@"async") void {
317 y += 1;317 y += 1;
318 suspend {}318 suspend {}
319 }319 }
...@@ -329,7 +329,7 @@ test "async fn pointer in a struct field" {...@@ -329,7 +329,7 @@ test "async fn pointer in a struct field" {
329329
330 var data: i32 = 1;330 var data: i32 = 1;
331 const Foo = struct {331 const Foo = struct {
332 bar: fn (*i32) callconv(.Async) void,332 bar: fn (*i32) callconv(.@"async") void,
333 };333 };
334 var foo = Foo{ .bar = simpleAsyncFn2 };334 var foo = Foo{ .bar = simpleAsyncFn2 };
335 _ = &foo;335 _ = &foo;
...@@ -346,7 +346,7 @@ test "async fn pointer in a struct field" {...@@ -346,7 +346,7 @@ test "async fn pointer in a struct field" {
346fn doTheAwait(f: anyframe->void) void {346fn doTheAwait(f: anyframe->void) void {
347 await f;347 await f;
348}348}
349fn simpleAsyncFn2(y: *i32) callconv(.Async) void {349fn simpleAsyncFn2(y: *i32) callconv(.@"async") void {
350 defer y.* += 2;350 defer y.* += 2;
351 y.* += 1;351 y.* += 1;
352 suspend {}352 suspend {}
...@@ -357,10 +357,10 @@ test "@asyncCall with return type" {...@@ -357,10 +357,10 @@ test "@asyncCall with return type" {
357 if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO357 if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO
358358
359 const Foo = struct {359 const Foo = struct {
360 bar: fn () callconv(.Async) i32,360 bar: fn () callconv(.@"async") i32,
361361
362 var global_frame: anyframe = undefined;362 var global_frame: anyframe = undefined;
363 fn middle() callconv(.Async) i32 {363 fn middle() callconv(.@"async") i32 {
364 return afunc();364 return afunc();
365 }365 }
366366
...@@ -396,7 +396,7 @@ test "async fn with inferred error set" {...@@ -396,7 +396,7 @@ test "async fn with inferred error set" {
396 resume global_frame;396 resume global_frame;
397 try std.testing.expectError(error.Fail, result);397 try std.testing.expectError(error.Fail, result);
398 }398 }
399 fn middle() callconv(.Async) !void {399 fn middle() callconv(.@"async") !void {
400 var f = async middle2();400 var f = async middle2();
401 return await f;401 return await f;
402 }402 }
...@@ -441,11 +441,11 @@ fn nonFailing() (anyframe->anyerror!void) {...@@ -441,11 +441,11 @@ fn nonFailing() (anyframe->anyerror!void) {
441 Static.frame = async suspendThenFail();441 Static.frame = async suspendThenFail();
442 return &Static.frame;442 return &Static.frame;
443}443}
444fn suspendThenFail() callconv(.Async) anyerror!void {444fn suspendThenFail() callconv(.@"async") anyerror!void {
445 suspend {}445 suspend {}
446 return error.Fail;446 return error.Fail;
447}447}
448fn printTrace(p: anyframe->(anyerror!void)) callconv(.Async) void {448fn printTrace(p: anyframe->(anyerror!void)) callconv(.@"async") void {
449 (await p) catch |e| {449 (await p) catch |e| {
450 std.testing.expect(e == error.Fail) catch @panic("test failure");450 std.testing.expect(e == error.Fail) catch @panic("test failure");
451 if (@errorReturnTrace()) |trace| {451 if (@errorReturnTrace()) |trace| {
...@@ -466,7 +466,7 @@ test "break from suspend" {...@@ -466,7 +466,7 @@ test "break from suspend" {
466 _ = p;466 _ = p;
467 try std.testing.expect(my_result == 2);467 try std.testing.expect(my_result == 2);
468}468}
469fn testBreakFromSuspend(my_result: *i32) callconv(.Async) void {469fn testBreakFromSuspend(my_result: *i32) callconv(.@"async") void {
470 suspend {470 suspend {
471 resume @frame();471 resume @frame();
472 }472 }
...@@ -949,7 +949,7 @@ test "cast fn to async fn when it is inferred to be async" {...@@ -949,7 +949,7 @@ test "cast fn to async fn when it is inferred to be async" {
949 var ok = false;949 var ok = false;
950950
951 fn doTheTest() void {951 fn doTheTest() void {
952 var ptr: fn () callconv(.Async) i32 = undefined;952 var ptr: fn () callconv(.@"async") i32 = undefined;
953 ptr = func;953 ptr = func;
954 var buf: [100]u8 align(16) = undefined;954 var buf: [100]u8 align(16) = undefined;
955 var result: i32 = undefined;955 var result: i32 = undefined;
...@@ -980,7 +980,7 @@ test "cast fn to async fn when it is inferred to be async, awaited directly" {...@@ -980,7 +980,7 @@ test "cast fn to async fn when it is inferred to be async, awaited directly" {
980 var ok = false;980 var ok = false;
981981
982 fn doTheTest() void {982 fn doTheTest() void {
983 var ptr: fn () callconv(.Async) i32 = undefined;983 var ptr: fn () callconv(.@"async") i32 = undefined;
984 ptr = func;984 ptr = func;
985 var buf: [100]u8 align(16) = undefined;985 var buf: [100]u8 align(16) = undefined;
986 var result: i32 = undefined;986 var result: i32 = undefined;
...@@ -1093,7 +1093,7 @@ test "@asyncCall with comptime-known function, but not awaited directly" {...@@ -1093,7 +1093,7 @@ test "@asyncCall with comptime-known function, but not awaited directly" {
1093 resume global_frame;1093 resume global_frame;
1094 try std.testing.expectError(error.Fail, result);1094 try std.testing.expectError(error.Fail, result);
1095 }1095 }
1096 fn middle() callconv(.Async) !void {1096 fn middle() callconv(.@"async") !void {
1097 var f = async middle2();1097 var f = async middle2();
1098 return await f;1098 return await f;
1099 }1099 }
...@@ -1133,7 +1133,7 @@ test "@asyncCall using the result location inside the frame" {...@@ -1133,7 +1133,7 @@ test "@asyncCall using the result location inside the frame" {
1133 if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO1133 if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO
11341134
1135 const S = struct {1135 const S = struct {
1136 fn simple2(y: *i32) callconv(.Async) i32 {1136 fn simple2(y: *i32) callconv(.@"async") i32 {
1137 defer y.* += 2;1137 defer y.* += 2;
1138 y.* += 1;1138 y.* += 1;
1139 suspend {}1139 suspend {}
...@@ -1145,7 +1145,7 @@ test "@asyncCall using the result location inside the frame" {...@@ -1145,7 +1145,7 @@ test "@asyncCall using the result location inside the frame" {
1145 };1145 };
1146 var data: i32 = 1;1146 var data: i32 = 1;
1147 const Foo = struct {1147 const Foo = struct {
1148 bar: fn (*i32) callconv(.Async) i32,1148 bar: fn (*i32) callconv(.@"async") i32,
1149 };1149 };
1150 var foo = Foo{ .bar = S.simple2 };1150 var foo = Foo{ .bar = S.simple2 };
1151 _ = &foo;1151 _ = &foo;
...@@ -1271,7 +1271,7 @@ test "await used in expression and awaiting fn with no suspend but async calling...@@ -1271,7 +1271,7 @@ test "await used in expression and awaiting fn with no suspend but async calling
1271 const sum = (await f1) + (await f2);1271 const sum = (await f1) + (await f2);
1272 expect(sum == 10) catch @panic("test failure");1272 expect(sum == 10) catch @panic("test failure");
1273 }1273 }
1274 fn add(a: i32, b: i32) callconv(.Async) i32 {1274 fn add(a: i32, b: i32) callconv(.@"async") i32 {
1275 return a + b;1275 return a + b;
1276 }1276 }
1277 };1277 };
...@@ -1289,7 +1289,7 @@ test "await used in expression after a fn call" {...@@ -1289,7 +1289,7 @@ test "await used in expression after a fn call" {
1289 sum = foo() + await f1;1289 sum = foo() + await f1;
1290 expect(sum == 8) catch @panic("test failure");1290 expect(sum == 8) catch @panic("test failure");
1291 }1291 }
1292 fn add(a: i32, b: i32) callconv(.Async) i32 {1292 fn add(a: i32, b: i32) callconv(.@"async") i32 {
1293 return a + b;1293 return a + b;
1294 }1294 }
1295 fn foo() i32 {1295 fn foo() i32 {
...@@ -1309,7 +1309,7 @@ test "async fn call used in expression after a fn call" {...@@ -1309,7 +1309,7 @@ test "async fn call used in expression after a fn call" {
1309 sum = foo() + add(3, 4);1309 sum = foo() + add(3, 4);
1310 expect(sum == 8) catch @panic("test failure");1310 expect(sum == 8) catch @panic("test failure");
1311 }1311 }
1312 fn add(a: i32, b: i32) callconv(.Async) i32 {1312 fn add(a: i32, b: i32) callconv(.@"async") i32 {
1313 return a + b;1313 return a + b;
1314 }1314 }
1315 fn foo() i32 {1315 fn foo() i32 {
...@@ -1598,7 +1598,7 @@ test "async function call resolves target fn frame, runtime func" {...@@ -1598,7 +1598,7 @@ test "async function call resolves target fn frame, runtime func" {
1598 fn foo() anyerror!void {1598 fn foo() anyerror!void {
1599 const stack_size = 1000;1599 const stack_size = 1000;
1600 var stack_frame: [stack_size]u8 align(std.Target.stack_align) = undefined;1600 var stack_frame: [stack_size]u8 align(std.Target.stack_align) = undefined;
1601 var func: fn () callconv(.Async) anyerror!void = bar;1601 var func: fn () callconv(.@"async") anyerror!void = bar;
1602 _ = &func;1602 _ = &func;
1603 return await @asyncCall(&stack_frame, {}, func, .{});1603 return await @asyncCall(&stack_frame, {}, func, .{});
1604 }1604 }
...@@ -1860,7 +1860,7 @@ test "@asyncCall with pass-by-value arguments" {...@@ -1860,7 +1860,7 @@ test "@asyncCall with pass-by-value arguments" {
1860 pub const ST = struct { f0: usize, f1: usize };1860 pub const ST = struct { f0: usize, f1: usize };
1861 pub const AT = [5]u8;1861 pub const AT = [5]u8;
18621862
1863 pub fn f(_fill0: u64, s: ST, _fill1: u64, a: AT, _fill2: u64) callconv(.Async) void {1863 pub fn f(_fill0: u64, s: ST, _fill1: u64, a: AT, _fill2: u64) callconv(.@"async") void {
1864 _ = s;1864 _ = s;
1865 _ = a;1865 _ = a;
1866 // Check that the array and struct arguments passed by value don't1866 // Check that the array and struct arguments passed by value don't
...@@ -1893,7 +1893,7 @@ test "@asyncCall with arguments having non-standard alignment" {...@@ -1893,7 +1893,7 @@ test "@asyncCall with arguments having non-standard alignment" {
1893 const F1: u64 = 0xf00df00df00df00d;1893 const F1: u64 = 0xf00df00df00df00d;
18941894
1895 const S = struct {1895 const S = struct {
1896 pub fn f(_fill0: u32, s: struct { x: u64 align(16) }, _fill1: u64) callconv(.Async) void {1896 pub fn f(_fill0: u32, s: struct { x: u64 align(16) }, _fill1: u64) callconv(.@"async") void {
1897 _ = s;1897 _ = s;
1898 // The compiler inserts extra alignment for s, check that the1898 // The compiler inserts extra alignment for s, check that the
1899 // generated code picks the right slot for fill1.1899 // generated code picks the right slot for fill1.
test/behavior/await_struct.zig+2-2
...@@ -21,14 +21,14 @@ test "coroutine await struct" {...@@ -21,14 +21,14 @@ test "coroutine await struct" {
21 try expect(await_final_result.x == 1234);21 try expect(await_final_result.x == 1234);
22 try expect(std.mem.eql(u8, &await_points, "abcdefghi"));22 try expect(std.mem.eql(u8, &await_points, "abcdefghi"));
23}23}
24fn await_amain() callconv(.Async) void {24fn await_amain() callconv(.@"async") void {
25 await_seq('b');25 await_seq('b');
26 var p = async await_another();26 var p = async await_another();
27 await_seq('e');27 await_seq('e');
28 await_final_result = await p;28 await_final_result = await p;
29 await_seq('h');29 await_seq('h');
30}30}
31fn await_another() callconv(.Async) Foo {31fn await_another() callconv(.@"async") Foo {
32 await_seq('c');32 await_seq('c');
33 suspend {33 suspend {
34 await_seq('d');34 await_seq('d');
test/c_abi/main.zig+2-2
...@@ -5694,7 +5694,7 @@ test "Stdcall ABI big union" {...@@ -5694,7 +5694,7 @@ test "Stdcall ABI big union" {
5694 stdcall_big_union(x);5694 stdcall_big_union(x);
5695}5695}
56965696
5697extern fn c_explict_win64(ByRef) callconv(.Win64) ByRef;5697extern fn c_explict_win64(ByRef) callconv(.{ .x86_64_win = .{} }) ByRef;
5698test "explicit SysV calling convention" {5698test "explicit SysV calling convention" {
5699 if (builtin.cpu.arch != .x86_64) return error.SkipZigTest;5699 if (builtin.cpu.arch != .x86_64) return error.SkipZigTest;
57005700
...@@ -5702,7 +5702,7 @@ test "explicit SysV calling convention" {...@@ -5702,7 +5702,7 @@ test "explicit SysV calling convention" {
5702 try expect(res.val == 42);5702 try expect(res.val == 42);
5703}5703}
57045704
5705extern fn c_explict_sys_v(ByRef) callconv(.SysV) ByRef;5705extern fn c_explict_sys_v(ByRef) callconv(.{ .x86_64_sysv = .{} }) ByRef;
5706test "explicit Win64 calling convention" {5706test "explicit Win64 calling convention" {
5707 if (builtin.cpu.arch != .x86_64) return error.SkipZigTest;5707 if (builtin.cpu.arch != .x86_64) return error.SkipZigTest;
57085708
test/cases/compile_errors/async/async_function_depends_on_its_own_frame.zig+1-1
...@@ -1,7 +1,7 @@...@@ -1,7 +1,7 @@
1export fn entry() void {1export fn entry() void {
2 _ = async amain();2 _ = async amain();
3}3}
4fn amain() callconv(.Async) void {4fn amain() callconv(.@"async") void {
5 var x: [@sizeOf(@Frame(amain))]u8 = undefined;5 var x: [@sizeOf(@Frame(amain))]u8 = undefined;
6 _ = &x;6 _ = &x;
7}7}
test/cases/compile_errors/async/async_function_indirectly_depends_on_its_own_frame.zig+1-1
...@@ -1,7 +1,7 @@...@@ -1,7 +1,7 @@
1export fn entry() void {1export fn entry() void {
2 _ = async amain();2 _ = async amain();
3}3}
4fn amain() callconv(.Async) void {4fn amain() callconv(.@"async") void {
5 other();5 other();
6}6}
7fn other() void {7fn other() void {
test/cases/compile_errors/async/bad_alignment_in_asynccall.zig+2-2
...@@ -1,10 +1,10 @@...@@ -1,10 +1,10 @@
1export fn entry() void {1export fn entry() void {
2 var ptr: fn () callconv(.Async) void = func;2 var ptr: fn () callconv(.@"async") void = func;
3 var bytes: [64]u8 = undefined;3 var bytes: [64]u8 = undefined;
4 _ = @asyncCall(&bytes, {}, ptr, .{});4 _ = @asyncCall(&bytes, {}, ptr, .{});
5 _ = &ptr;5 _ = &ptr;
6}6}
7fn func() callconv(.Async) void {}7fn func() callconv(.@"async") void {}
88
9// error9// error
10// backend=stage110// backend=stage1
test/cases/compile_errors/async/exported_async_function.zig+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1export fn foo() callconv(.Async) void {}1export fn foo() callconv(.@"async") void {}
22
3// error3// error
4// backend=stage14// backend=stage1
test/cases/compile_errors/async/returning_error_from_void_async_function.zig+1-1
...@@ -1,7 +1,7 @@...@@ -1,7 +1,7 @@
1export fn entry() void {1export fn entry() void {
2 _ = async amain();2 _ = async amain();
3}3}
4fn amain() callconv(.Async) void {4fn amain() callconv(.@"async") void {
5 return error.ShouldBeCompileError;5 return error.ShouldBeCompileError;
6}6}
77
test/cases/compile_errors/async/runtime-known_async_function_called.zig+1-1
...@@ -6,7 +6,7 @@ fn amain() void {...@@ -6,7 +6,7 @@ fn amain() void {
6 _ = ptr();6 _ = ptr();
7 _ = &ptr;7 _ = &ptr;
8}8}
9fn afunc() callconv(.Async) void {}9fn afunc() callconv(.@"async") void {}
1010
11// error11// error
12// backend=stage112// backend=stage1
test/cases/compile_errors/async/runtime-known_function_called_with_async_keyword.zig+1-1
...@@ -4,7 +4,7 @@ export fn entry() void {...@@ -4,7 +4,7 @@ export fn entry() void {
4 _ = &ptr;4 _ = &ptr;
5}5}
66
7fn afunc() callconv(.Async) void {}7fn afunc() callconv(.@"async") void {}
88
9// error9// error
10// backend=stage110// backend=stage1
test/cases/compile_errors/call_from_naked_func.zig+4-4
...@@ -1,16 +1,16 @@...@@ -1,16 +1,16 @@
1export fn runtimeCall() callconv(.Naked) void {1export fn runtimeCall() callconv(.naked) void {
2 f();2 f();
3}3}
44
5export fn runtimeBuiltinCall() callconv(.Naked) void {5export fn runtimeBuiltinCall() callconv(.naked) void {
6 @call(.auto, f, .{});6 @call(.auto, f, .{});
7}7}
88
9export fn comptimeCall() callconv(.Naked) void {9export fn comptimeCall() callconv(.naked) void {
10 comptime f();10 comptime f();
11}11}
1212
13export fn comptimeBuiltinCall() callconv(.Naked) void {13export fn comptimeBuiltinCall() callconv(.naked) void {
14 @call(.compile_time, f, .{});14 @call(.compile_time, f, .{});
15}15}
1616
test/cases/compile_errors/callconv_apcs_aapcs_aapcsvfp_on_unsupported_platform.zig+2-2
...@@ -1,5 +1,5 @@...@@ -1,5 +1,5 @@
1export fn entry2() callconv(.AAPCS) void {}1export fn entry2() callconv(.{ .arm_aapcs = .{} }) void {}
2export fn entry3() callconv(.AAPCSVFP) void {}2export fn entry3() callconv(.{ .arm_aapcs_vfp = .{} }) void {}
33
4// error4// error
5// target=x86_64-linux-none5// target=x86_64-linux-none
test/cases/compile_errors/callconv_interrupt_on_unsupported_platform.zig+6-2
...@@ -1,7 +1,11 @@...@@ -1,7 +1,11 @@
1export fn entry() callconv(.Interrupt) void {}1export fn entry1() callconv(.{ .x86_64_interrupt = .{} }) void {}
2export fn entry2() callconv(.{ .x86_interrupt = .{} }) void {}
3export fn entry3() callconv(.avr_interrupt) void {}
24
3// error5// error
4// backend=stage26// backend=stage2
5// target=aarch64-linux-none7// target=aarch64-linux-none
6//8//
7// :1:29: error: calling convention 'Interrupt' is only available on x86, x86_64, AVR, and MSP430, not aarch649// :1:30: error: calling convention 'x86_64_interrupt' only available on architectures 'x86_64'
10// :1:30: error: calling convention 'x86_interrupt' only available on architectures 'x86'
11// :1:30: error: calling convention 'avr_interrupt' only available on architectures 'avr'
test/cases/compile_errors/closure_get_depends_on_failed_decl.zig+1-1
...@@ -1,7 +1,7 @@...@@ -1,7 +1,7 @@
1pub inline fn instanceRequestAdapter() void {}1pub inline fn instanceRequestAdapter() void {}
22
3pub inline fn requestAdapter(3pub inline fn requestAdapter(
4 comptime callbackArg: fn () callconv(.Inline) void,4 comptime callbackArg: fn () callconv(.@"inline") void,
5) void {5) void {
6 _ = &(struct {6 _ = &(struct {
7 pub fn callback() callconv(.c) void {7 pub fn callback() callconv(.c) void {
test/cases/compile_errors/invalid_func_for_callconv.zig+7-7
...@@ -1,12 +1,12 @@...@@ -1,12 +1,12 @@
1export fn interrupt_param1(_: u32) callconv(.Interrupt) void {}1export fn interrupt_param1(_: u32) callconv(.{ .x86_64_interrupt = .{} }) void {}
2export fn interrupt_param2(_: *anyopaque, _: u32) callconv(.Interrupt) void {}2export fn interrupt_param2(_: *anyopaque, _: u32) callconv(.{ .x86_64_interrupt = .{} }) void {}
3export fn interrupt_param3(_: *anyopaque, _: u64, _: u32) callconv(.Interrupt) void {}3export fn interrupt_param3(_: *anyopaque, _: u64, _: u32) callconv(.{ .x86_64_interrupt = .{} }) void {}
4export fn interrupt_ret(_: *anyopaque, _: u64) callconv(.Interrupt) u32 {4export fn interrupt_ret(_: *anyopaque, _: u64) callconv(.{ .x86_64_interrupt = .{} }) u32 {
5 return 0;5 return 0;
6}6}
77
8export fn signal_param(_: u32) callconv(.Signal) void {}8export fn signal_param(_: u32) callconv(.avr_signal) void {}
9export fn signal_ret() callconv(.Signal) noreturn {}9export fn signal_ret() callconv(.avr_signal) noreturn {}
1010
11// error11// error
12// target=x86_64-linux12// target=x86_64-linux
...@@ -14,6 +14,6 @@ export fn signal_ret() callconv(.Signal) noreturn {}...@@ -14,6 +14,6 @@ export fn signal_ret() callconv(.Signal) noreturn {}
14// :1:28: error: first parameter of function with 'x86_64_interrupt' calling convention must be a pointer type14// :1:28: error: first parameter of function with 'x86_64_interrupt' calling convention must be a pointer type
15// :2:43: error: second parameter of function with 'x86_64_interrupt' calling convention must be a 64-bit integer15// :2:43: error: second parameter of function with 'x86_64_interrupt' calling convention must be a 64-bit integer
16// :3:51: error: 'x86_64_interrupt' calling convention supports up to 2 parameters, found 316// :3:51: error: 'x86_64_interrupt' calling convention supports up to 2 parameters, found 3
17// :4:69: error: function with calling convention 'x86_64_interrupt' must return 'void' or 'noreturn'17// :4:87: error: function with calling convention 'x86_64_interrupt' must return 'void' or 'noreturn'
18// :8:24: error: parameters are not allowed with 'avr_signal' calling convention18// :8:24: error: parameters are not allowed with 'avr_signal' calling convention
19// :9:34: error: calling convention 'avr_signal' only available on architectures 'avr'19// :9:34: error: calling convention 'avr_signal' only available on architectures 'avr'
test/cases/compile_errors/return_from_naked_function.zig+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1fn foo() callconv(.Naked) void {1fn foo() callconv(.naked) void {
2 return;2 return;
3}3}
44
test/cases/compile_errors/stack_usage_in_naked_function.zig+4-4
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1export fn a() callconv(.Naked) noreturn {1export fn a() callconv(.naked) noreturn {
2 var x: u32 = 10;2 var x: u32 = 10;
3 _ = &x;3 _ = &x;
44
...@@ -6,7 +6,7 @@ export fn a() callconv(.Naked) noreturn {...@@ -6,7 +6,7 @@ export fn a() callconv(.Naked) noreturn {
6 _ = y;6 _ = y;
7}7}
88
9export fn b() callconv(.Naked) noreturn {9export fn b() callconv(.naked) noreturn {
10 var x = @as(u32, 10);10 var x = @as(u32, 10);
11 _ = &x;11 _ = &x;
1212
...@@ -15,7 +15,7 @@ export fn b() callconv(.Naked) noreturn {...@@ -15,7 +15,7 @@ export fn b() callconv(.Naked) noreturn {
15 _ = &z;15 _ = &z;
16}16}
1717
18export fn c() callconv(.Naked) noreturn {18export fn c() callconv(.naked) noreturn {
19 const Foo = struct {19 const Foo = struct {
20 y: u32,20 y: u32,
21 };21 };
...@@ -24,7 +24,7 @@ export fn c() callconv(.Naked) noreturn {...@@ -24,7 +24,7 @@ export fn c() callconv(.Naked) noreturn {
24 _ = &x;24 _ = &x;
25}25}
2626
27export fn d() callconv(.Naked) noreturn {27export fn d() callconv(.naked) noreturn {
28 const Foo = struct {28 const Foo = struct {
29 inline fn bar() void {29 inline fn bar() void {
30 var x: u32 = 10;30 var x: u32 = 10;
test/cases/compile_errors/unreachable_in_naked_func.zig+3-3
...@@ -1,13 +1,13 @@...@@ -1,13 +1,13 @@
1fn runtimeSafetyDefault() callconv(.Naked) void {1fn runtimeSafetyDefault() callconv(.naked) void {
2 unreachable;2 unreachable;
3}3}
44
5fn runtimeSafetyOn() callconv(.Naked) void {5fn runtimeSafetyOn() callconv(.naked) void {
6 @setRuntimeSafety(true);6 @setRuntimeSafety(true);
7 unreachable;7 unreachable;
8}8}
99
10fn runtimeSafetyOff() callconv(.Naked) void {10fn runtimeSafetyOff() callconv(.naked) void {
11 @setRuntimeSafety(false);11 @setRuntimeSafety(false);
12 unreachable;12 unreachable;
13}13}
test/cases/safety/@asyncCall with too small a frame.zig +1-1
...@@ -18,7 +18,7 @@ pub fn main() !void {...@@ -18,7 +18,7 @@ pub fn main() !void {
18 _ = &frame;18 _ = &frame;
19 return error.TestFailed;19 return error.TestFailed;
20}20}
21fn other() callconv(.Async) void {21fn other() callconv(.@"async") void {
22 suspend {}22 suspend {}
23}23}
24// run24// run
test/cases/safety/error return trace across suspend points.zig +1-1
...@@ -26,7 +26,7 @@ fn failing() anyerror!void {...@@ -26,7 +26,7 @@ fn failing() anyerror!void {
26 return second();26 return second();
27}27}
2828
29fn second() callconv(.Async) anyerror!void {29fn second() callconv(.@"async") anyerror!void {
30 return error.Fail;30 return error.Fail;
31}31}
3232
test/link/elf.zig+1-1
...@@ -931,7 +931,7 @@ fn testEmitStaticLib(b: *Build, opts: Options) *Step {...@@ -931,7 +931,7 @@ fn testEmitStaticLib(b: *Build, opts: Options) *Step {
931 const obj3 = addObject(b, opts, .{931 const obj3 = addObject(b, opts, .{
932 .name = "a_very_long_file_name_so_that_it_ends_up_in_strtab",932 .name = "a_very_long_file_name_so_that_it_ends_up_in_strtab",
933 .zig_source_bytes =933 .zig_source_bytes =
934 \\fn weakFoo() callconv(.C) usize {934 \\fn weakFoo() callconv(.c) usize {
935 \\ return 42;935 \\ return 42;
936 \\}936 \\}
937 \\export var strongBar: usize = 100;937 \\export var strongBar: usize = 100;
test/link/glibc_compat/glibc_runtime_check.zig+1-1
...@@ -95,7 +95,7 @@ fn checkStrlcpy_v2_38() !void {...@@ -95,7 +95,7 @@ fn checkStrlcpy_v2_38() !void {
95}95}
9696
97// atexit is part of libc_nonshared, so ensure its linked in correctly97// atexit is part of libc_nonshared, so ensure its linked in correctly
98fn forceExit0Callback() callconv(.C) void {98fn forceExit0Callback() callconv(.c) void {
99 std.c.exit(0); // Override the main() exit code99 std.c.exit(0); // Override the main() exit code
100}100}
101101
test/link/macho.zig+3-3
...@@ -199,7 +199,7 @@ fn testDuplicateDefinitions(b: *Build, opts: Options) *Step {...@@ -199,7 +199,7 @@ fn testDuplicateDefinitions(b: *Build, opts: Options) *Step {
199 \\var x: usize = 1;199 \\var x: usize = 1;
200 \\export fn strong() void { x += 1; }200 \\export fn strong() void { x += 1; }
201 \\comptime { @export(&weakImpl, .{ .name = "weak", .linkage = .weak }); }201 \\comptime { @export(&weakImpl, .{ .name = "weak", .linkage = .weak }); }
202 \\fn weakImpl() callconv(.C) void { x += 1; }202 \\fn weakImpl() callconv(.c) void { x += 1; }
203 \\extern fn weak() void;203 \\extern fn weak() void;
204 \\pub fn main() void {204 \\pub fn main() void {
205 \\ weak();205 \\ weak();
...@@ -937,7 +937,7 @@ fn testLinksection(b: *Build, opts: Options) *Step {...@@ -937,7 +937,7 @@ fn testLinksection(b: *Build, opts: Options) *Step {
937937
938 const obj = addObject(b, opts, .{ .name = "main", .zig_source_bytes = 938 const obj = addObject(b, opts, .{ .name = "main", .zig_source_bytes =
939 \\export var test_global: u32 linksection("__DATA,__TestGlobal") = undefined;939 \\export var test_global: u32 linksection("__DATA,__TestGlobal") = undefined;
940 \\export fn testFn() linksection("__TEXT,__TestFn") callconv(.C) void {940 \\export fn testFn() linksection("__TEXT,__TestFn") callconv(.c) void {
941 \\ TestGenericFn("A").f();941 \\ TestGenericFn("A").f();
942 \\}942 \\}
943 \\fn TestGenericFn(comptime suffix: []const u8) type {943 \\fn TestGenericFn(comptime suffix: []const u8) type {
...@@ -2667,7 +2667,7 @@ fn testUnresolvedError2(b: *Build, opts: Options) *Step {...@@ -2667,7 +2667,7 @@ fn testUnresolvedError2(b: *Build, opts: Options) *Step {
2667 const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes = 2667 const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes =
2668 \\pub fn main() !void {2668 \\pub fn main() !void {
2669 \\ const msg_send_fn = @extern(2669 \\ const msg_send_fn = @extern(
2670 \\ *const fn () callconv(.C) usize,2670 \\ *const fn () callconv(.c) usize,
2671 \\ .{ .name = "objc_msgSend$initWithContentRect:styleMask:backing:defer:screen:" },2671 \\ .{ .name = "objc_msgSend$initWithContentRect:styleMask:backing:defer:screen:" },
2672 \\ );2672 \\ );
2673 \\ _ = @call(2673 \\ _ = @call(
test/nvptx.zig+4-4
...@@ -15,7 +15,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void {...@@ -15,7 +15,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void {
15 \\ return a + b;15 \\ return a + b;
16 \\}16 \\}
17 \\17 \\
18 \\pub export fn add_and_substract(a: i32, out: *i32) callconv(.Kernel) void {18 \\pub export fn add_and_substract(a: i32, out: *i32) callconv(.kernel) void {
19 \\ const x = add(a, 7);19 \\ const x = add(a, 7);
20 \\ var y = add(2, 0);20 \\ var y = add(2, 0);
21 \\ y -= x;21 \\ y -= x;
...@@ -34,7 +34,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void {...@@ -34,7 +34,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void {
34 \\ );34 \\ );
35 \\}35 \\}
36 \\36 \\
37 \\pub export fn special_reg(a: []const i32, out: []i32) callconv(.Kernel) void {37 \\pub export fn special_reg(a: []const i32, out: []i32) callconv(.kernel) void {
38 \\ const i = threadIdX();38 \\ const i = threadIdX();
39 \\ out[i] = a[i] + 7;39 \\ out[i] = a[i] + 7;
40 \\}40 \\}
...@@ -47,7 +47,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void {...@@ -47,7 +47,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void {
47 case.addCompile(47 case.addCompile(
48 \\var x: i32 addrspace(.global) = 0;48 \\var x: i32 addrspace(.global) = 0;
49 \\49 \\
50 \\pub export fn increment(out: *i32) callconv(.Kernel) void {50 \\pub export fn increment(out: *i32) callconv(.kernel) void {
51 \\ x += 1;51 \\ x += 1;
52 \\ out.* = x;52 \\ out.* = x;
53 \\}53 \\}
...@@ -64,7 +64,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void {...@@ -64,7 +64,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void {
64 \\}64 \\}
65 \\65 \\
66 \\ var _sdata: [1024]f32 addrspace(.shared) = undefined;66 \\ var _sdata: [1024]f32 addrspace(.shared) = undefined;
67 \\ pub export fn reduceSum(d_x: []const f32, out: *f32) callconv(.Kernel) void {67 \\ pub export fn reduceSum(d_x: []const f32, out: *f32) callconv(.kernel) void {
68 \\ var sdata: *addrspace(.generic) [1024]f32 = @addrSpaceCast(&_sdata);68 \\ var sdata: *addrspace(.generic) [1024]f32 = @addrSpaceCast(&_sdata);
69 \\ const tid: u32 = threadIdX();69 \\ const tid: u32 = threadIdX();
70 \\ var sum = d_x[tid];70 \\ var sum = d_x[tid];
test/src/Debugger.zig+1-1
...@@ -677,7 +677,7 @@ pub fn addTestsForTarget(db: *Debugger, target: Target) void {...@@ -677,7 +677,7 @@ pub fn addTestsForTarget(db: *Debugger, target: Target) void {
677 \\ param6: u64,677 \\ param6: u64,
678 \\ param7: u64,678 \\ param7: u64,
679 \\ param8: u64,679 \\ param8: u64,
680 \\) callconv(.C) void {680 \\) callconv(.c) void {
681 \\ const local_comptime_val: u64 = global_const *% global_const;681 \\ const local_comptime_val: u64 = global_const *% global_const;
682 \\ const local_comptime_ptr: struct { u64 } = .{ local_comptime_val *% local_comptime_val };682 \\ const local_comptime_ptr: struct { u64 } = .{ local_comptime_val *% local_comptime_val };
683 \\ const local_const: u64 = global_var ^ global_threadlocal1 ^ global_threadlocal2 ^683 \\ const local_const: u64 = global_var ^ global_threadlocal1 ^ global_threadlocal2 ^
test/standalone/extern/main.zig+2-2
...@@ -1,8 +1,8 @@...@@ -1,8 +1,8 @@
1const assert = @import("std").debug.assert;1const assert = @import("std").debug.assert;
2const testing = @import("std").testing;2const testing = @import("std").testing;
33
4const updateHidden = @extern(*const fn (u32) callconv(.C) void, .{ .name = "updateHidden" });4const updateHidden = @extern(*const fn (u32) callconv(.c) void, .{ .name = "updateHidden" });
5const getHidden = @extern(*const fn () callconv(.C) u32, .{ .name = "getHidden" });5const getHidden = @extern(*const fn () callconv(.c) u32, .{ .name = "getHidden" });
66
7const T = extern struct { x: u32 };7const T = extern struct { x: u32 };
88
test/standalone/install_raw_hex/main.zig+1-1
...@@ -1,3 +1,3 @@...@@ -1,3 +1,3 @@
1export fn _start() callconv(.C) noreturn {1export fn _start() callconv(.c) noreturn {
2 while (true) {}2 while (true) {}
3}3}
test/standalone/issue_12706/main.zig+1-1
...@@ -3,7 +3,7 @@ extern fn testFnPtr(n: c_int, ...) void;...@@ -3,7 +3,7 @@ extern fn testFnPtr(n: c_int, ...) void;
33
4const val: c_int = 123;4const val: c_int = 123;
55
6fn func(a: c_int) callconv(.C) void {6fn func(a: c_int) callconv(.c) void {
7 std.debug.assert(a == val);7 std.debug.assert(a == val);
8}8}
99
test/standalone/issue_8550/main.zig+1-1
...@@ -1,4 +1,4 @@...@@ -1,4 +1,4 @@
1export fn main(r0: u32, r1: u32, atags: u32) callconv(.C) noreturn {1export fn main(r0: u32, r1: u32, atags: u32) callconv(.c) noreturn {
2 _ = r0;2 _ = r0;
3 _ = r1;3 _ = r1;
4 _ = atags;4 _ = atags;
test/standalone/load_dynamic_library/main.zig+1-1
...@@ -11,7 +11,7 @@ pub fn main() !void {...@@ -11,7 +11,7 @@ pub fn main() !void {
11 var lib = try std.DynLib.open(dynlib_name);11 var lib = try std.DynLib.open(dynlib_name);
12 defer lib.close();12 defer lib.close();
1313
14 const Add = *const fn (i32, i32) callconv(.C) i32;14 const Add = *const fn (i32, i32) callconv(.c) i32;
15 const addFn = lib.lookup(Add, "add") orelse return error.SymbolNotFound;15 const addFn = lib.lookup(Add, "add") orelse return error.SymbolNotFound;
1616
17 const result = addFn(12, 34);17 const result = addFn(12, 34);
test/standalone/stack_iterator/shared_lib_unwind.zig+2-2
...@@ -23,7 +23,7 @@ noinline fn frame3(expected: *[5]usize, unwound: *[5]usize) void {...@@ -23,7 +23,7 @@ noinline fn frame3(expected: *[5]usize, unwound: *[5]usize) void {
23 frame4(expected, unwound);23 frame4(expected, unwound);
24}24}
2525
26fn frame2(expected: *[5]usize, unwound: *[5]usize) callconv(.C) void {26fn frame2(expected: *[5]usize, unwound: *[5]usize) callconv(.c) void {
27 expected[2] = @returnAddress();27 expected[2] = @returnAddress();
28 frame3(expected, unwound);28 frame3(expected, unwound);
29}29}
...@@ -31,7 +31,7 @@ fn frame2(expected: *[5]usize, unwound: *[5]usize) callconv(.C) void {...@@ -31,7 +31,7 @@ fn frame2(expected: *[5]usize, unwound: *[5]usize) callconv(.C) void {
31extern fn frame0(31extern fn frame0(
32 expected: *[5]usize,32 expected: *[5]usize,
33 unwound: *[5]usize,33 unwound: *[5]usize,
34 frame_2: *const fn (expected: *[5]usize, unwound: *[5]usize) callconv(.C) void,34 frame_2: *const fn (expected: *[5]usize, unwound: *[5]usize) callconv(.c) void,
35) void;35) void;
3636
37pub fn main() !void {37pub fn main() !void {
test/standalone/stack_iterator/unwind_freestanding.zig+1-1
...@@ -37,7 +37,7 @@ noinline fn frame0(expected: *[4]usize, unwound: *[4]usize) void {...@@ -37,7 +37,7 @@ noinline fn frame0(expected: *[4]usize, unwound: *[4]usize) void {
37}37}
3838
39// No-OS entrypoint39// No-OS entrypoint
40export fn _start() callconv(.C) noreturn {40export fn _start() callconv(.c) noreturn {
41 var expected: [4]usize = undefined;41 var expected: [4]usize = undefined;
42 var unwound: [4]usize = undefined;42 var unwound: [4]usize = undefined;
43 frame0(&expected, &unwound);43 frame0(&expected, &unwound);
tools/gen_outline_atomics.zig+1-1
...@@ -78,7 +78,7 @@ fn writeFunction(...@@ -78,7 +78,7 @@ fn writeFunction(
78 };78 };
79 const fn_sig = try std.fmt.allocPrint(79 const fn_sig = try std.fmt.allocPrint(
80 arena,80 arena,
81 "fn {[name]s}() align(16) callconv(.Naked) void {{",81 "fn {[name]s}() align(16) callconv(.naked) void {{",
82 .{ .name = name },82 .{ .name = name },
83 );83 );
84 try w.writeAll(fn_sig);84 try w.writeAll(fn_sig);
tools/lldb_pretty_printers.py+2-2
...@@ -599,8 +599,8 @@ type_tag_handlers = {...@@ -599,8 +599,8 @@ type_tag_handlers = {
599 'slice_const_u8_sentinel_0': lambda payload: '[:0]const u8',599 'slice_const_u8_sentinel_0': lambda payload: '[:0]const u8',
600 'fn_noreturn_no_args': lambda payload: 'fn() noreturn',600 'fn_noreturn_no_args': lambda payload: 'fn() noreturn',
601 'fn_void_no_args': lambda payload: 'fn() void',601 'fn_void_no_args': lambda payload: 'fn() void',
602 'fn_naked_noreturn_no_args': lambda payload: 'fn() callconv(.Naked) noreturn',602 'fn_naked_noreturn_no_args': lambda payload: 'fn() callconv(.naked) noreturn',
603 'fn_ccc_void_no_args': lambda payload: 'fn() callconv(.C) void',603 'fn_ccc_void_no_args': lambda payload: 'fn() callconv(.c) void',
604 'single_const_pointer_to_comptime_int': lambda payload: '*const comptime_int',604 'single_const_pointer_to_comptime_int': lambda payload: '*const comptime_int',
605 'manyptr_u8': lambda payload: '[*]u8',605 'manyptr_u8': lambda payload: '[*]u8',
606 'manyptr_const_u8': lambda payload: '[*]const u8',606 'manyptr_const_u8': lambda payload: '[*]const u8',