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 {
22 @export(&internalName, .{ .name = "foo", .linkage = .strong });
33}
44
5fn internalName() callconv(.C) void {}
5fn internalName() callconv(.c) void {}
66
77// obj
doc/langref/test_defining_variadic_function.zig+1-1
......@@ -2,7 +2,7 @@ const std = @import("std");
22const testing = std.testing;
33const builtin = @import("builtin");
44
5fn add(count: c_int, ...) callconv(.C) c_int {
5fn add(count: c_int, ...) callconv(.c) c_int {
66 var ap = @cVaStart();
77 defer @cVaEnd(&ap);
88 var i: usize = 0;
doc/langref/test_functions.zig+1-1
......@@ -35,7 +35,7 @@ fn abort() noreturn {
3535
3636// The naked calling convention makes a function not have any function prologue or epilogue.
3737// This can be useful when integrating with assembly.
38fn _start() callconv(.Naked) noreturn {
38fn _start() callconv(.naked) noreturn {
3939 abort();
4040}
4141
doc/langref/test_opaque.zig+1-1
......@@ -2,7 +2,7 @@ const Derp = opaque {};
22const Wat = opaque {};
33
44extern fn bar(d: *Derp) void;
5fn foo(w: *Wat) callconv(.C) void {
5fn foo(w: *Wat) callconv(.c) void {
66 bar(w);
77}
88
lib/c.zig+9-9
......@@ -54,11 +54,11 @@ pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, _: ?
5454}
5555
5656extern fn main(argc: c_int, argv: [*:null]?[*:0]u8) c_int;
57fn wasm_start() callconv(.C) void {
57fn wasm_start() callconv(.c) void {
5858 _ = main(0, undefined);
5959}
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 {
6262 var i: usize = 0;
6363 while (src[i] != 0) : (i += 1) {
6464 dest[i] = src[i];
......@@ -76,7 +76,7 @@ test "strcpy" {
7676 try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));
7777}
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 {
8080 var i: usize = 0;
8181 while (i < n and src[i] != 0) : (i += 1) {
8282 dest[i] = src[i];
......@@ -96,7 +96,7 @@ test "strncpy" {
9696 try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));
9797}
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 {
100100 var dest_end: usize = 0;
101101 while (dest[dest_end] != 0) : (dest_end += 1) {}
102102
......@@ -119,7 +119,7 @@ test "strcat" {
119119 try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));
120120}
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 {
123123 var dest_end: usize = 0;
124124 while (dest[dest_end] != 0) : (dest_end += 1) {}
125125
......@@ -142,7 +142,7 @@ test "strncat" {
142142 try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0));
143143}
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 {
146146 return switch (std.mem.orderZ(u8, s1, s2)) {
147147 .lt => -1,
148148 .eq => 0,
......@@ -150,11 +150,11 @@ fn strcmp(s1: [*:0]const u8, s2: [*:0]const u8) callconv(.C) c_int {
150150 };
151151}
152152
153fn strlen(s: [*:0]const u8) callconv(.C) usize {
153fn strlen(s: [*:0]const u8) callconv(.c) usize {
154154 return std.mem.len(s);
155155}
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 {
158158 if (_n == 0) return 0;
159159 var l = _l;
160160 var r = _r;
......@@ -167,7 +167,7 @@ fn strncmp(_l: [*:0]const u8, _r: [*:0]const u8, _n: usize) callconv(.C) c_int {
167167 return @as(c_int, l[0]) - @as(c_int, r[0]);
168168}
169169
170fn strerror(errnum: c_int) callconv(.C) [*:0]const u8 {
170fn strerror(errnum: c_int) callconv(.c) [*:0]const u8 {
171171 _ = errnum;
172172 return "TODO strerror implementation";
173173}
lib/compiler/test_runner.zig+2-2
......@@ -350,7 +350,7 @@ var is_fuzz_test: bool = undefined;
350350extern fn fuzzer_set_name(name_ptr: [*]const u8, name_len: usize) void;
351351extern fn fuzzer_init(cache_dir: FuzzerSlice) void;
352352extern 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;
354354extern fn fuzzer_coverage_id() u64;
355355
356356pub fn fuzz(
......@@ -382,7 +382,7 @@ pub fn fuzz(
382382 const global = struct {
383383 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 {
386386 @disableInstrumentation();
387387 testing.allocator_instance = .{};
388388 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
1010/// which ARM is concerned would have too much overhead.
1111var __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 {
1414 @setRuntimeSafety(false);
1515 asm volatile (
1616 \\ cbz w16, 8f
......@@ -32,7 +32,7 @@ fn __aarch64_cas1_relax() align(16) callconv(.Naked) void {
3232 );
3333 unreachable;
3434}
35fn __aarch64_swp1_relax() align(16) callconv(.Naked) void {
35fn __aarch64_swp1_relax() align(16) callconv(.naked) void {
3636 @setRuntimeSafety(false);
3737 asm volatile (
3838 \\ cbz w16, 8f
......@@ -52,7 +52,7 @@ fn __aarch64_swp1_relax() align(16) callconv(.Naked) void {
5252 );
5353 unreachable;
5454}
55fn __aarch64_ldadd1_relax() align(16) callconv(.Naked) void {
55fn __aarch64_ldadd1_relax() align(16) callconv(.naked) void {
5656 @setRuntimeSafety(false);
5757 asm volatile (
5858 \\ cbz w16, 8f
......@@ -73,7 +73,7 @@ fn __aarch64_ldadd1_relax() align(16) callconv(.Naked) void {
7373 );
7474 unreachable;
7575}
76fn __aarch64_ldclr1_relax() align(16) callconv(.Naked) void {
76fn __aarch64_ldclr1_relax() align(16) callconv(.naked) void {
7777 @setRuntimeSafety(false);
7878 asm volatile (
7979 \\ cbz w16, 8f
......@@ -94,7 +94,7 @@ fn __aarch64_ldclr1_relax() align(16) callconv(.Naked) void {
9494 );
9595 unreachable;
9696}
97fn __aarch64_ldeor1_relax() align(16) callconv(.Naked) void {
97fn __aarch64_ldeor1_relax() align(16) callconv(.naked) void {
9898 @setRuntimeSafety(false);
9999 asm volatile (
100100 \\ cbz w16, 8f
......@@ -115,7 +115,7 @@ fn __aarch64_ldeor1_relax() align(16) callconv(.Naked) void {
115115 );
116116 unreachable;
117117}
118fn __aarch64_ldset1_relax() align(16) callconv(.Naked) void {
118fn __aarch64_ldset1_relax() align(16) callconv(.naked) void {
119119 @setRuntimeSafety(false);
120120 asm volatile (
121121 \\ cbz w16, 8f
......@@ -136,7 +136,7 @@ fn __aarch64_ldset1_relax() align(16) callconv(.Naked) void {
136136 );
137137 unreachable;
138138}
139fn __aarch64_cas1_acq() align(16) callconv(.Naked) void {
139fn __aarch64_cas1_acq() align(16) callconv(.naked) void {
140140 @setRuntimeSafety(false);
141141 asm volatile (
142142 \\ cbz w16, 8f
......@@ -158,7 +158,7 @@ fn __aarch64_cas1_acq() align(16) callconv(.Naked) void {
158158 );
159159 unreachable;
160160}
161fn __aarch64_swp1_acq() align(16) callconv(.Naked) void {
161fn __aarch64_swp1_acq() align(16) callconv(.naked) void {
162162 @setRuntimeSafety(false);
163163 asm volatile (
164164 \\ cbz w16, 8f
......@@ -178,7 +178,7 @@ fn __aarch64_swp1_acq() align(16) callconv(.Naked) void {
178178 );
179179 unreachable;
180180}
181fn __aarch64_ldadd1_acq() align(16) callconv(.Naked) void {
181fn __aarch64_ldadd1_acq() align(16) callconv(.naked) void {
182182 @setRuntimeSafety(false);
183183 asm volatile (
184184 \\ cbz w16, 8f
......@@ -199,7 +199,7 @@ fn __aarch64_ldadd1_acq() align(16) callconv(.Naked) void {
199199 );
200200 unreachable;
201201}
202fn __aarch64_ldclr1_acq() align(16) callconv(.Naked) void {
202fn __aarch64_ldclr1_acq() align(16) callconv(.naked) void {
203203 @setRuntimeSafety(false);
204204 asm volatile (
205205 \\ cbz w16, 8f
......@@ -220,7 +220,7 @@ fn __aarch64_ldclr1_acq() align(16) callconv(.Naked) void {
220220 );
221221 unreachable;
222222}
223fn __aarch64_ldeor1_acq() align(16) callconv(.Naked) void {
223fn __aarch64_ldeor1_acq() align(16) callconv(.naked) void {
224224 @setRuntimeSafety(false);
225225 asm volatile (
226226 \\ cbz w16, 8f
......@@ -241,7 +241,7 @@ fn __aarch64_ldeor1_acq() align(16) callconv(.Naked) void {
241241 );
242242 unreachable;
243243}
244fn __aarch64_ldset1_acq() align(16) callconv(.Naked) void {
244fn __aarch64_ldset1_acq() align(16) callconv(.naked) void {
245245 @setRuntimeSafety(false);
246246 asm volatile (
247247 \\ cbz w16, 8f
......@@ -262,7 +262,7 @@ fn __aarch64_ldset1_acq() align(16) callconv(.Naked) void {
262262 );
263263 unreachable;
264264}
265fn __aarch64_cas1_rel() align(16) callconv(.Naked) void {
265fn __aarch64_cas1_rel() align(16) callconv(.naked) void {
266266 @setRuntimeSafety(false);
267267 asm volatile (
268268 \\ cbz w16, 8f
......@@ -284,7 +284,7 @@ fn __aarch64_cas1_rel() align(16) callconv(.Naked) void {
284284 );
285285 unreachable;
286286}
287fn __aarch64_swp1_rel() align(16) callconv(.Naked) void {
287fn __aarch64_swp1_rel() align(16) callconv(.naked) void {
288288 @setRuntimeSafety(false);
289289 asm volatile (
290290 \\ cbz w16, 8f
......@@ -304,7 +304,7 @@ fn __aarch64_swp1_rel() align(16) callconv(.Naked) void {
304304 );
305305 unreachable;
306306}
307fn __aarch64_ldadd1_rel() align(16) callconv(.Naked) void {
307fn __aarch64_ldadd1_rel() align(16) callconv(.naked) void {
308308 @setRuntimeSafety(false);
309309 asm volatile (
310310 \\ cbz w16, 8f
......@@ -325,7 +325,7 @@ fn __aarch64_ldadd1_rel() align(16) callconv(.Naked) void {
325325 );
326326 unreachable;
327327}
328fn __aarch64_ldclr1_rel() align(16) callconv(.Naked) void {
328fn __aarch64_ldclr1_rel() align(16) callconv(.naked) void {
329329 @setRuntimeSafety(false);
330330 asm volatile (
331331 \\ cbz w16, 8f
......@@ -346,7 +346,7 @@ fn __aarch64_ldclr1_rel() align(16) callconv(.Naked) void {
346346 );
347347 unreachable;
348348}
349fn __aarch64_ldeor1_rel() align(16) callconv(.Naked) void {
349fn __aarch64_ldeor1_rel() align(16) callconv(.naked) void {
350350 @setRuntimeSafety(false);
351351 asm volatile (
352352 \\ cbz w16, 8f
......@@ -367,7 +367,7 @@ fn __aarch64_ldeor1_rel() align(16) callconv(.Naked) void {
367367 );
368368 unreachable;
369369}
370fn __aarch64_ldset1_rel() align(16) callconv(.Naked) void {
370fn __aarch64_ldset1_rel() align(16) callconv(.naked) void {
371371 @setRuntimeSafety(false);
372372 asm volatile (
373373 \\ cbz w16, 8f
......@@ -388,7 +388,7 @@ fn __aarch64_ldset1_rel() align(16) callconv(.Naked) void {
388388 );
389389 unreachable;
390390}
391fn __aarch64_cas1_acq_rel() align(16) callconv(.Naked) void {
391fn __aarch64_cas1_acq_rel() align(16) callconv(.naked) void {
392392 @setRuntimeSafety(false);
393393 asm volatile (
394394 \\ cbz w16, 8f
......@@ -410,7 +410,7 @@ fn __aarch64_cas1_acq_rel() align(16) callconv(.Naked) void {
410410 );
411411 unreachable;
412412}
413fn __aarch64_swp1_acq_rel() align(16) callconv(.Naked) void {
413fn __aarch64_swp1_acq_rel() align(16) callconv(.naked) void {
414414 @setRuntimeSafety(false);
415415 asm volatile (
416416 \\ cbz w16, 8f
......@@ -430,7 +430,7 @@ fn __aarch64_swp1_acq_rel() align(16) callconv(.Naked) void {
430430 );
431431 unreachable;
432432}
433fn __aarch64_ldadd1_acq_rel() align(16) callconv(.Naked) void {
433fn __aarch64_ldadd1_acq_rel() align(16) callconv(.naked) void {
434434 @setRuntimeSafety(false);
435435 asm volatile (
436436 \\ cbz w16, 8f
......@@ -451,7 +451,7 @@ fn __aarch64_ldadd1_acq_rel() align(16) callconv(.Naked) void {
451451 );
452452 unreachable;
453453}
454fn __aarch64_ldclr1_acq_rel() align(16) callconv(.Naked) void {
454fn __aarch64_ldclr1_acq_rel() align(16) callconv(.naked) void {
455455 @setRuntimeSafety(false);
456456 asm volatile (
457457 \\ cbz w16, 8f
......@@ -472,7 +472,7 @@ fn __aarch64_ldclr1_acq_rel() align(16) callconv(.Naked) void {
472472 );
473473 unreachable;
474474}
475fn __aarch64_ldeor1_acq_rel() align(16) callconv(.Naked) void {
475fn __aarch64_ldeor1_acq_rel() align(16) callconv(.naked) void {
476476 @setRuntimeSafety(false);
477477 asm volatile (
478478 \\ cbz w16, 8f
......@@ -493,7 +493,7 @@ fn __aarch64_ldeor1_acq_rel() align(16) callconv(.Naked) void {
493493 );
494494 unreachable;
495495}
496fn __aarch64_ldset1_acq_rel() align(16) callconv(.Naked) void {
496fn __aarch64_ldset1_acq_rel() align(16) callconv(.naked) void {
497497 @setRuntimeSafety(false);
498498 asm volatile (
499499 \\ cbz w16, 8f
......@@ -514,7 +514,7 @@ fn __aarch64_ldset1_acq_rel() align(16) callconv(.Naked) void {
514514 );
515515 unreachable;
516516}
517fn __aarch64_cas2_relax() align(16) callconv(.Naked) void {
517fn __aarch64_cas2_relax() align(16) callconv(.naked) void {
518518 @setRuntimeSafety(false);
519519 asm volatile (
520520 \\ cbz w16, 8f
......@@ -536,7 +536,7 @@ fn __aarch64_cas2_relax() align(16) callconv(.Naked) void {
536536 );
537537 unreachable;
538538}
539fn __aarch64_swp2_relax() align(16) callconv(.Naked) void {
539fn __aarch64_swp2_relax() align(16) callconv(.naked) void {
540540 @setRuntimeSafety(false);
541541 asm volatile (
542542 \\ cbz w16, 8f
......@@ -556,7 +556,7 @@ fn __aarch64_swp2_relax() align(16) callconv(.Naked) void {
556556 );
557557 unreachable;
558558}
559fn __aarch64_ldadd2_relax() align(16) callconv(.Naked) void {
559fn __aarch64_ldadd2_relax() align(16) callconv(.naked) void {
560560 @setRuntimeSafety(false);
561561 asm volatile (
562562 \\ cbz w16, 8f
......@@ -577,7 +577,7 @@ fn __aarch64_ldadd2_relax() align(16) callconv(.Naked) void {
577577 );
578578 unreachable;
579579}
580fn __aarch64_ldclr2_relax() align(16) callconv(.Naked) void {
580fn __aarch64_ldclr2_relax() align(16) callconv(.naked) void {
581581 @setRuntimeSafety(false);
582582 asm volatile (
583583 \\ cbz w16, 8f
......@@ -598,7 +598,7 @@ fn __aarch64_ldclr2_relax() align(16) callconv(.Naked) void {
598598 );
599599 unreachable;
600600}
601fn __aarch64_ldeor2_relax() align(16) callconv(.Naked) void {
601fn __aarch64_ldeor2_relax() align(16) callconv(.naked) void {
602602 @setRuntimeSafety(false);
603603 asm volatile (
604604 \\ cbz w16, 8f
......@@ -619,7 +619,7 @@ fn __aarch64_ldeor2_relax() align(16) callconv(.Naked) void {
619619 );
620620 unreachable;
621621}
622fn __aarch64_ldset2_relax() align(16) callconv(.Naked) void {
622fn __aarch64_ldset2_relax() align(16) callconv(.naked) void {
623623 @setRuntimeSafety(false);
624624 asm volatile (
625625 \\ cbz w16, 8f
......@@ -640,7 +640,7 @@ fn __aarch64_ldset2_relax() align(16) callconv(.Naked) void {
640640 );
641641 unreachable;
642642}
643fn __aarch64_cas2_acq() align(16) callconv(.Naked) void {
643fn __aarch64_cas2_acq() align(16) callconv(.naked) void {
644644 @setRuntimeSafety(false);
645645 asm volatile (
646646 \\ cbz w16, 8f
......@@ -662,7 +662,7 @@ fn __aarch64_cas2_acq() align(16) callconv(.Naked) void {
662662 );
663663 unreachable;
664664}
665fn __aarch64_swp2_acq() align(16) callconv(.Naked) void {
665fn __aarch64_swp2_acq() align(16) callconv(.naked) void {
666666 @setRuntimeSafety(false);
667667 asm volatile (
668668 \\ cbz w16, 8f
......@@ -682,7 +682,7 @@ fn __aarch64_swp2_acq() align(16) callconv(.Naked) void {
682682 );
683683 unreachable;
684684}
685fn __aarch64_ldadd2_acq() align(16) callconv(.Naked) void {
685fn __aarch64_ldadd2_acq() align(16) callconv(.naked) void {
686686 @setRuntimeSafety(false);
687687 asm volatile (
688688 \\ cbz w16, 8f
......@@ -703,7 +703,7 @@ fn __aarch64_ldadd2_acq() align(16) callconv(.Naked) void {
703703 );
704704 unreachable;
705705}
706fn __aarch64_ldclr2_acq() align(16) callconv(.Naked) void {
706fn __aarch64_ldclr2_acq() align(16) callconv(.naked) void {
707707 @setRuntimeSafety(false);
708708 asm volatile (
709709 \\ cbz w16, 8f
......@@ -724,7 +724,7 @@ fn __aarch64_ldclr2_acq() align(16) callconv(.Naked) void {
724724 );
725725 unreachable;
726726}
727fn __aarch64_ldeor2_acq() align(16) callconv(.Naked) void {
727fn __aarch64_ldeor2_acq() align(16) callconv(.naked) void {
728728 @setRuntimeSafety(false);
729729 asm volatile (
730730 \\ cbz w16, 8f
......@@ -745,7 +745,7 @@ fn __aarch64_ldeor2_acq() align(16) callconv(.Naked) void {
745745 );
746746 unreachable;
747747}
748fn __aarch64_ldset2_acq() align(16) callconv(.Naked) void {
748fn __aarch64_ldset2_acq() align(16) callconv(.naked) void {
749749 @setRuntimeSafety(false);
750750 asm volatile (
751751 \\ cbz w16, 8f
......@@ -766,7 +766,7 @@ fn __aarch64_ldset2_acq() align(16) callconv(.Naked) void {
766766 );
767767 unreachable;
768768}
769fn __aarch64_cas2_rel() align(16) callconv(.Naked) void {
769fn __aarch64_cas2_rel() align(16) callconv(.naked) void {
770770 @setRuntimeSafety(false);
771771 asm volatile (
772772 \\ cbz w16, 8f
......@@ -788,7 +788,7 @@ fn __aarch64_cas2_rel() align(16) callconv(.Naked) void {
788788 );
789789 unreachable;
790790}
791fn __aarch64_swp2_rel() align(16) callconv(.Naked) void {
791fn __aarch64_swp2_rel() align(16) callconv(.naked) void {
792792 @setRuntimeSafety(false);
793793 asm volatile (
794794 \\ cbz w16, 8f
......@@ -808,7 +808,7 @@ fn __aarch64_swp2_rel() align(16) callconv(.Naked) void {
808808 );
809809 unreachable;
810810}
811fn __aarch64_ldadd2_rel() align(16) callconv(.Naked) void {
811fn __aarch64_ldadd2_rel() align(16) callconv(.naked) void {
812812 @setRuntimeSafety(false);
813813 asm volatile (
814814 \\ cbz w16, 8f
......@@ -829,7 +829,7 @@ fn __aarch64_ldadd2_rel() align(16) callconv(.Naked) void {
829829 );
830830 unreachable;
831831}
832fn __aarch64_ldclr2_rel() align(16) callconv(.Naked) void {
832fn __aarch64_ldclr2_rel() align(16) callconv(.naked) void {
833833 @setRuntimeSafety(false);
834834 asm volatile (
835835 \\ cbz w16, 8f
......@@ -850,7 +850,7 @@ fn __aarch64_ldclr2_rel() align(16) callconv(.Naked) void {
850850 );
851851 unreachable;
852852}
853fn __aarch64_ldeor2_rel() align(16) callconv(.Naked) void {
853fn __aarch64_ldeor2_rel() align(16) callconv(.naked) void {
854854 @setRuntimeSafety(false);
855855 asm volatile (
856856 \\ cbz w16, 8f
......@@ -871,7 +871,7 @@ fn __aarch64_ldeor2_rel() align(16) callconv(.Naked) void {
871871 );
872872 unreachable;
873873}
874fn __aarch64_ldset2_rel() align(16) callconv(.Naked) void {
874fn __aarch64_ldset2_rel() align(16) callconv(.naked) void {
875875 @setRuntimeSafety(false);
876876 asm volatile (
877877 \\ cbz w16, 8f
......@@ -892,7 +892,7 @@ fn __aarch64_ldset2_rel() align(16) callconv(.Naked) void {
892892 );
893893 unreachable;
894894}
895fn __aarch64_cas2_acq_rel() align(16) callconv(.Naked) void {
895fn __aarch64_cas2_acq_rel() align(16) callconv(.naked) void {
896896 @setRuntimeSafety(false);
897897 asm volatile (
898898 \\ cbz w16, 8f
......@@ -914,7 +914,7 @@ fn __aarch64_cas2_acq_rel() align(16) callconv(.Naked) void {
914914 );
915915 unreachable;
916916}
917fn __aarch64_swp2_acq_rel() align(16) callconv(.Naked) void {
917fn __aarch64_swp2_acq_rel() align(16) callconv(.naked) void {
918918 @setRuntimeSafety(false);
919919 asm volatile (
920920 \\ cbz w16, 8f
......@@ -934,7 +934,7 @@ fn __aarch64_swp2_acq_rel() align(16) callconv(.Naked) void {
934934 );
935935 unreachable;
936936}
937fn __aarch64_ldadd2_acq_rel() align(16) callconv(.Naked) void {
937fn __aarch64_ldadd2_acq_rel() align(16) callconv(.naked) void {
938938 @setRuntimeSafety(false);
939939 asm volatile (
940940 \\ cbz w16, 8f
......@@ -955,7 +955,7 @@ fn __aarch64_ldadd2_acq_rel() align(16) callconv(.Naked) void {
955955 );
956956 unreachable;
957957}
958fn __aarch64_ldclr2_acq_rel() align(16) callconv(.Naked) void {
958fn __aarch64_ldclr2_acq_rel() align(16) callconv(.naked) void {
959959 @setRuntimeSafety(false);
960960 asm volatile (
961961 \\ cbz w16, 8f
......@@ -976,7 +976,7 @@ fn __aarch64_ldclr2_acq_rel() align(16) callconv(.Naked) void {
976976 );
977977 unreachable;
978978}
979fn __aarch64_ldeor2_acq_rel() align(16) callconv(.Naked) void {
979fn __aarch64_ldeor2_acq_rel() align(16) callconv(.naked) void {
980980 @setRuntimeSafety(false);
981981 asm volatile (
982982 \\ cbz w16, 8f
......@@ -997,7 +997,7 @@ fn __aarch64_ldeor2_acq_rel() align(16) callconv(.Naked) void {
997997 );
998998 unreachable;
999999}
1000fn __aarch64_ldset2_acq_rel() align(16) callconv(.Naked) void {
1000fn __aarch64_ldset2_acq_rel() align(16) callconv(.naked) void {
10011001 @setRuntimeSafety(false);
10021002 asm volatile (
10031003 \\ cbz w16, 8f
......@@ -1018,7 +1018,7 @@ fn __aarch64_ldset2_acq_rel() align(16) callconv(.Naked) void {
10181018 );
10191019 unreachable;
10201020}
1021fn __aarch64_cas4_relax() align(16) callconv(.Naked) void {
1021fn __aarch64_cas4_relax() align(16) callconv(.naked) void {
10221022 @setRuntimeSafety(false);
10231023 asm volatile (
10241024 \\ cbz w16, 8f
......@@ -1040,7 +1040,7 @@ fn __aarch64_cas4_relax() align(16) callconv(.Naked) void {
10401040 );
10411041 unreachable;
10421042}
1043fn __aarch64_swp4_relax() align(16) callconv(.Naked) void {
1043fn __aarch64_swp4_relax() align(16) callconv(.naked) void {
10441044 @setRuntimeSafety(false);
10451045 asm volatile (
10461046 \\ cbz w16, 8f
......@@ -1060,7 +1060,7 @@ fn __aarch64_swp4_relax() align(16) callconv(.Naked) void {
10601060 );
10611061 unreachable;
10621062}
1063fn __aarch64_ldadd4_relax() align(16) callconv(.Naked) void {
1063fn __aarch64_ldadd4_relax() align(16) callconv(.naked) void {
10641064 @setRuntimeSafety(false);
10651065 asm volatile (
10661066 \\ cbz w16, 8f
......@@ -1081,7 +1081,7 @@ fn __aarch64_ldadd4_relax() align(16) callconv(.Naked) void {
10811081 );
10821082 unreachable;
10831083}
1084fn __aarch64_ldclr4_relax() align(16) callconv(.Naked) void {
1084fn __aarch64_ldclr4_relax() align(16) callconv(.naked) void {
10851085 @setRuntimeSafety(false);
10861086 asm volatile (
10871087 \\ cbz w16, 8f
......@@ -1102,7 +1102,7 @@ fn __aarch64_ldclr4_relax() align(16) callconv(.Naked) void {
11021102 );
11031103 unreachable;
11041104}
1105fn __aarch64_ldeor4_relax() align(16) callconv(.Naked) void {
1105fn __aarch64_ldeor4_relax() align(16) callconv(.naked) void {
11061106 @setRuntimeSafety(false);
11071107 asm volatile (
11081108 \\ cbz w16, 8f
......@@ -1123,7 +1123,7 @@ fn __aarch64_ldeor4_relax() align(16) callconv(.Naked) void {
11231123 );
11241124 unreachable;
11251125}
1126fn __aarch64_ldset4_relax() align(16) callconv(.Naked) void {
1126fn __aarch64_ldset4_relax() align(16) callconv(.naked) void {
11271127 @setRuntimeSafety(false);
11281128 asm volatile (
11291129 \\ cbz w16, 8f
......@@ -1144,7 +1144,7 @@ fn __aarch64_ldset4_relax() align(16) callconv(.Naked) void {
11441144 );
11451145 unreachable;
11461146}
1147fn __aarch64_cas4_acq() align(16) callconv(.Naked) void {
1147fn __aarch64_cas4_acq() align(16) callconv(.naked) void {
11481148 @setRuntimeSafety(false);
11491149 asm volatile (
11501150 \\ cbz w16, 8f
......@@ -1166,7 +1166,7 @@ fn __aarch64_cas4_acq() align(16) callconv(.Naked) void {
11661166 );
11671167 unreachable;
11681168}
1169fn __aarch64_swp4_acq() align(16) callconv(.Naked) void {
1169fn __aarch64_swp4_acq() align(16) callconv(.naked) void {
11701170 @setRuntimeSafety(false);
11711171 asm volatile (
11721172 \\ cbz w16, 8f
......@@ -1186,7 +1186,7 @@ fn __aarch64_swp4_acq() align(16) callconv(.Naked) void {
11861186 );
11871187 unreachable;
11881188}
1189fn __aarch64_ldadd4_acq() align(16) callconv(.Naked) void {
1189fn __aarch64_ldadd4_acq() align(16) callconv(.naked) void {
11901190 @setRuntimeSafety(false);
11911191 asm volatile (
11921192 \\ cbz w16, 8f
......@@ -1207,7 +1207,7 @@ fn __aarch64_ldadd4_acq() align(16) callconv(.Naked) void {
12071207 );
12081208 unreachable;
12091209}
1210fn __aarch64_ldclr4_acq() align(16) callconv(.Naked) void {
1210fn __aarch64_ldclr4_acq() align(16) callconv(.naked) void {
12111211 @setRuntimeSafety(false);
12121212 asm volatile (
12131213 \\ cbz w16, 8f
......@@ -1228,7 +1228,7 @@ fn __aarch64_ldclr4_acq() align(16) callconv(.Naked) void {
12281228 );
12291229 unreachable;
12301230}
1231fn __aarch64_ldeor4_acq() align(16) callconv(.Naked) void {
1231fn __aarch64_ldeor4_acq() align(16) callconv(.naked) void {
12321232 @setRuntimeSafety(false);
12331233 asm volatile (
12341234 \\ cbz w16, 8f
......@@ -1249,7 +1249,7 @@ fn __aarch64_ldeor4_acq() align(16) callconv(.Naked) void {
12491249 );
12501250 unreachable;
12511251}
1252fn __aarch64_ldset4_acq() align(16) callconv(.Naked) void {
1252fn __aarch64_ldset4_acq() align(16) callconv(.naked) void {
12531253 @setRuntimeSafety(false);
12541254 asm volatile (
12551255 \\ cbz w16, 8f
......@@ -1270,7 +1270,7 @@ fn __aarch64_ldset4_acq() align(16) callconv(.Naked) void {
12701270 );
12711271 unreachable;
12721272}
1273fn __aarch64_cas4_rel() align(16) callconv(.Naked) void {
1273fn __aarch64_cas4_rel() align(16) callconv(.naked) void {
12741274 @setRuntimeSafety(false);
12751275 asm volatile (
12761276 \\ cbz w16, 8f
......@@ -1292,7 +1292,7 @@ fn __aarch64_cas4_rel() align(16) callconv(.Naked) void {
12921292 );
12931293 unreachable;
12941294}
1295fn __aarch64_swp4_rel() align(16) callconv(.Naked) void {
1295fn __aarch64_swp4_rel() align(16) callconv(.naked) void {
12961296 @setRuntimeSafety(false);
12971297 asm volatile (
12981298 \\ cbz w16, 8f
......@@ -1312,7 +1312,7 @@ fn __aarch64_swp4_rel() align(16) callconv(.Naked) void {
13121312 );
13131313 unreachable;
13141314}
1315fn __aarch64_ldadd4_rel() align(16) callconv(.Naked) void {
1315fn __aarch64_ldadd4_rel() align(16) callconv(.naked) void {
13161316 @setRuntimeSafety(false);
13171317 asm volatile (
13181318 \\ cbz w16, 8f
......@@ -1333,7 +1333,7 @@ fn __aarch64_ldadd4_rel() align(16) callconv(.Naked) void {
13331333 );
13341334 unreachable;
13351335}
1336fn __aarch64_ldclr4_rel() align(16) callconv(.Naked) void {
1336fn __aarch64_ldclr4_rel() align(16) callconv(.naked) void {
13371337 @setRuntimeSafety(false);
13381338 asm volatile (
13391339 \\ cbz w16, 8f
......@@ -1354,7 +1354,7 @@ fn __aarch64_ldclr4_rel() align(16) callconv(.Naked) void {
13541354 );
13551355 unreachable;
13561356}
1357fn __aarch64_ldeor4_rel() align(16) callconv(.Naked) void {
1357fn __aarch64_ldeor4_rel() align(16) callconv(.naked) void {
13581358 @setRuntimeSafety(false);
13591359 asm volatile (
13601360 \\ cbz w16, 8f
......@@ -1375,7 +1375,7 @@ fn __aarch64_ldeor4_rel() align(16) callconv(.Naked) void {
13751375 );
13761376 unreachable;
13771377}
1378fn __aarch64_ldset4_rel() align(16) callconv(.Naked) void {
1378fn __aarch64_ldset4_rel() align(16) callconv(.naked) void {
13791379 @setRuntimeSafety(false);
13801380 asm volatile (
13811381 \\ cbz w16, 8f
......@@ -1396,7 +1396,7 @@ fn __aarch64_ldset4_rel() align(16) callconv(.Naked) void {
13961396 );
13971397 unreachable;
13981398}
1399fn __aarch64_cas4_acq_rel() align(16) callconv(.Naked) void {
1399fn __aarch64_cas4_acq_rel() align(16) callconv(.naked) void {
14001400 @setRuntimeSafety(false);
14011401 asm volatile (
14021402 \\ cbz w16, 8f
......@@ -1418,7 +1418,7 @@ fn __aarch64_cas4_acq_rel() align(16) callconv(.Naked) void {
14181418 );
14191419 unreachable;
14201420}
1421fn __aarch64_swp4_acq_rel() align(16) callconv(.Naked) void {
1421fn __aarch64_swp4_acq_rel() align(16) callconv(.naked) void {
14221422 @setRuntimeSafety(false);
14231423 asm volatile (
14241424 \\ cbz w16, 8f
......@@ -1438,7 +1438,7 @@ fn __aarch64_swp4_acq_rel() align(16) callconv(.Naked) void {
14381438 );
14391439 unreachable;
14401440}
1441fn __aarch64_ldadd4_acq_rel() align(16) callconv(.Naked) void {
1441fn __aarch64_ldadd4_acq_rel() align(16) callconv(.naked) void {
14421442 @setRuntimeSafety(false);
14431443 asm volatile (
14441444 \\ cbz w16, 8f
......@@ -1459,7 +1459,7 @@ fn __aarch64_ldadd4_acq_rel() align(16) callconv(.Naked) void {
14591459 );
14601460 unreachable;
14611461}
1462fn __aarch64_ldclr4_acq_rel() align(16) callconv(.Naked) void {
1462fn __aarch64_ldclr4_acq_rel() align(16) callconv(.naked) void {
14631463 @setRuntimeSafety(false);
14641464 asm volatile (
14651465 \\ cbz w16, 8f
......@@ -1480,7 +1480,7 @@ fn __aarch64_ldclr4_acq_rel() align(16) callconv(.Naked) void {
14801480 );
14811481 unreachable;
14821482}
1483fn __aarch64_ldeor4_acq_rel() align(16) callconv(.Naked) void {
1483fn __aarch64_ldeor4_acq_rel() align(16) callconv(.naked) void {
14841484 @setRuntimeSafety(false);
14851485 asm volatile (
14861486 \\ cbz w16, 8f
......@@ -1501,7 +1501,7 @@ fn __aarch64_ldeor4_acq_rel() align(16) callconv(.Naked) void {
15011501 );
15021502 unreachable;
15031503}
1504fn __aarch64_ldset4_acq_rel() align(16) callconv(.Naked) void {
1504fn __aarch64_ldset4_acq_rel() align(16) callconv(.naked) void {
15051505 @setRuntimeSafety(false);
15061506 asm volatile (
15071507 \\ cbz w16, 8f
......@@ -1522,7 +1522,7 @@ fn __aarch64_ldset4_acq_rel() align(16) callconv(.Naked) void {
15221522 );
15231523 unreachable;
15241524}
1525fn __aarch64_cas8_relax() align(16) callconv(.Naked) void {
1525fn __aarch64_cas8_relax() align(16) callconv(.naked) void {
15261526 @setRuntimeSafety(false);
15271527 asm volatile (
15281528 \\ cbz w16, 8f
......@@ -1544,7 +1544,7 @@ fn __aarch64_cas8_relax() align(16) callconv(.Naked) void {
15441544 );
15451545 unreachable;
15461546}
1547fn __aarch64_swp8_relax() align(16) callconv(.Naked) void {
1547fn __aarch64_swp8_relax() align(16) callconv(.naked) void {
15481548 @setRuntimeSafety(false);
15491549 asm volatile (
15501550 \\ cbz w16, 8f
......@@ -1564,7 +1564,7 @@ fn __aarch64_swp8_relax() align(16) callconv(.Naked) void {
15641564 );
15651565 unreachable;
15661566}
1567fn __aarch64_ldadd8_relax() align(16) callconv(.Naked) void {
1567fn __aarch64_ldadd8_relax() align(16) callconv(.naked) void {
15681568 @setRuntimeSafety(false);
15691569 asm volatile (
15701570 \\ cbz w16, 8f
......@@ -1585,7 +1585,7 @@ fn __aarch64_ldadd8_relax() align(16) callconv(.Naked) void {
15851585 );
15861586 unreachable;
15871587}
1588fn __aarch64_ldclr8_relax() align(16) callconv(.Naked) void {
1588fn __aarch64_ldclr8_relax() align(16) callconv(.naked) void {
15891589 @setRuntimeSafety(false);
15901590 asm volatile (
15911591 \\ cbz w16, 8f
......@@ -1606,7 +1606,7 @@ fn __aarch64_ldclr8_relax() align(16) callconv(.Naked) void {
16061606 );
16071607 unreachable;
16081608}
1609fn __aarch64_ldeor8_relax() align(16) callconv(.Naked) void {
1609fn __aarch64_ldeor8_relax() align(16) callconv(.naked) void {
16101610 @setRuntimeSafety(false);
16111611 asm volatile (
16121612 \\ cbz w16, 8f
......@@ -1627,7 +1627,7 @@ fn __aarch64_ldeor8_relax() align(16) callconv(.Naked) void {
16271627 );
16281628 unreachable;
16291629}
1630fn __aarch64_ldset8_relax() align(16) callconv(.Naked) void {
1630fn __aarch64_ldset8_relax() align(16) callconv(.naked) void {
16311631 @setRuntimeSafety(false);
16321632 asm volatile (
16331633 \\ cbz w16, 8f
......@@ -1648,7 +1648,7 @@ fn __aarch64_ldset8_relax() align(16) callconv(.Naked) void {
16481648 );
16491649 unreachable;
16501650}
1651fn __aarch64_cas8_acq() align(16) callconv(.Naked) void {
1651fn __aarch64_cas8_acq() align(16) callconv(.naked) void {
16521652 @setRuntimeSafety(false);
16531653 asm volatile (
16541654 \\ cbz w16, 8f
......@@ -1670,7 +1670,7 @@ fn __aarch64_cas8_acq() align(16) callconv(.Naked) void {
16701670 );
16711671 unreachable;
16721672}
1673fn __aarch64_swp8_acq() align(16) callconv(.Naked) void {
1673fn __aarch64_swp8_acq() align(16) callconv(.naked) void {
16741674 @setRuntimeSafety(false);
16751675 asm volatile (
16761676 \\ cbz w16, 8f
......@@ -1690,7 +1690,7 @@ fn __aarch64_swp8_acq() align(16) callconv(.Naked) void {
16901690 );
16911691 unreachable;
16921692}
1693fn __aarch64_ldadd8_acq() align(16) callconv(.Naked) void {
1693fn __aarch64_ldadd8_acq() align(16) callconv(.naked) void {
16941694 @setRuntimeSafety(false);
16951695 asm volatile (
16961696 \\ cbz w16, 8f
......@@ -1711,7 +1711,7 @@ fn __aarch64_ldadd8_acq() align(16) callconv(.Naked) void {
17111711 );
17121712 unreachable;
17131713}
1714fn __aarch64_ldclr8_acq() align(16) callconv(.Naked) void {
1714fn __aarch64_ldclr8_acq() align(16) callconv(.naked) void {
17151715 @setRuntimeSafety(false);
17161716 asm volatile (
17171717 \\ cbz w16, 8f
......@@ -1732,7 +1732,7 @@ fn __aarch64_ldclr8_acq() align(16) callconv(.Naked) void {
17321732 );
17331733 unreachable;
17341734}
1735fn __aarch64_ldeor8_acq() align(16) callconv(.Naked) void {
1735fn __aarch64_ldeor8_acq() align(16) callconv(.naked) void {
17361736 @setRuntimeSafety(false);
17371737 asm volatile (
17381738 \\ cbz w16, 8f
......@@ -1753,7 +1753,7 @@ fn __aarch64_ldeor8_acq() align(16) callconv(.Naked) void {
17531753 );
17541754 unreachable;
17551755}
1756fn __aarch64_ldset8_acq() align(16) callconv(.Naked) void {
1756fn __aarch64_ldset8_acq() align(16) callconv(.naked) void {
17571757 @setRuntimeSafety(false);
17581758 asm volatile (
17591759 \\ cbz w16, 8f
......@@ -1774,7 +1774,7 @@ fn __aarch64_ldset8_acq() align(16) callconv(.Naked) void {
17741774 );
17751775 unreachable;
17761776}
1777fn __aarch64_cas8_rel() align(16) callconv(.Naked) void {
1777fn __aarch64_cas8_rel() align(16) callconv(.naked) void {
17781778 @setRuntimeSafety(false);
17791779 asm volatile (
17801780 \\ cbz w16, 8f
......@@ -1796,7 +1796,7 @@ fn __aarch64_cas8_rel() align(16) callconv(.Naked) void {
17961796 );
17971797 unreachable;
17981798}
1799fn __aarch64_swp8_rel() align(16) callconv(.Naked) void {
1799fn __aarch64_swp8_rel() align(16) callconv(.naked) void {
18001800 @setRuntimeSafety(false);
18011801 asm volatile (
18021802 \\ cbz w16, 8f
......@@ -1816,7 +1816,7 @@ fn __aarch64_swp8_rel() align(16) callconv(.Naked) void {
18161816 );
18171817 unreachable;
18181818}
1819fn __aarch64_ldadd8_rel() align(16) callconv(.Naked) void {
1819fn __aarch64_ldadd8_rel() align(16) callconv(.naked) void {
18201820 @setRuntimeSafety(false);
18211821 asm volatile (
18221822 \\ cbz w16, 8f
......@@ -1837,7 +1837,7 @@ fn __aarch64_ldadd8_rel() align(16) callconv(.Naked) void {
18371837 );
18381838 unreachable;
18391839}
1840fn __aarch64_ldclr8_rel() align(16) callconv(.Naked) void {
1840fn __aarch64_ldclr8_rel() align(16) callconv(.naked) void {
18411841 @setRuntimeSafety(false);
18421842 asm volatile (
18431843 \\ cbz w16, 8f
......@@ -1858,7 +1858,7 @@ fn __aarch64_ldclr8_rel() align(16) callconv(.Naked) void {
18581858 );
18591859 unreachable;
18601860}
1861fn __aarch64_ldeor8_rel() align(16) callconv(.Naked) void {
1861fn __aarch64_ldeor8_rel() align(16) callconv(.naked) void {
18621862 @setRuntimeSafety(false);
18631863 asm volatile (
18641864 \\ cbz w16, 8f
......@@ -1879,7 +1879,7 @@ fn __aarch64_ldeor8_rel() align(16) callconv(.Naked) void {
18791879 );
18801880 unreachable;
18811881}
1882fn __aarch64_ldset8_rel() align(16) callconv(.Naked) void {
1882fn __aarch64_ldset8_rel() align(16) callconv(.naked) void {
18831883 @setRuntimeSafety(false);
18841884 asm volatile (
18851885 \\ cbz w16, 8f
......@@ -1900,7 +1900,7 @@ fn __aarch64_ldset8_rel() align(16) callconv(.Naked) void {
19001900 );
19011901 unreachable;
19021902}
1903fn __aarch64_cas8_acq_rel() align(16) callconv(.Naked) void {
1903fn __aarch64_cas8_acq_rel() align(16) callconv(.naked) void {
19041904 @setRuntimeSafety(false);
19051905 asm volatile (
19061906 \\ cbz w16, 8f
......@@ -1922,7 +1922,7 @@ fn __aarch64_cas8_acq_rel() align(16) callconv(.Naked) void {
19221922 );
19231923 unreachable;
19241924}
1925fn __aarch64_swp8_acq_rel() align(16) callconv(.Naked) void {
1925fn __aarch64_swp8_acq_rel() align(16) callconv(.naked) void {
19261926 @setRuntimeSafety(false);
19271927 asm volatile (
19281928 \\ cbz w16, 8f
......@@ -1942,7 +1942,7 @@ fn __aarch64_swp8_acq_rel() align(16) callconv(.Naked) void {
19421942 );
19431943 unreachable;
19441944}
1945fn __aarch64_ldadd8_acq_rel() align(16) callconv(.Naked) void {
1945fn __aarch64_ldadd8_acq_rel() align(16) callconv(.naked) void {
19461946 @setRuntimeSafety(false);
19471947 asm volatile (
19481948 \\ cbz w16, 8f
......@@ -1963,7 +1963,7 @@ fn __aarch64_ldadd8_acq_rel() align(16) callconv(.Naked) void {
19631963 );
19641964 unreachable;
19651965}
1966fn __aarch64_ldclr8_acq_rel() align(16) callconv(.Naked) void {
1966fn __aarch64_ldclr8_acq_rel() align(16) callconv(.naked) void {
19671967 @setRuntimeSafety(false);
19681968 asm volatile (
19691969 \\ cbz w16, 8f
......@@ -1984,7 +1984,7 @@ fn __aarch64_ldclr8_acq_rel() align(16) callconv(.Naked) void {
19841984 );
19851985 unreachable;
19861986}
1987fn __aarch64_ldeor8_acq_rel() align(16) callconv(.Naked) void {
1987fn __aarch64_ldeor8_acq_rel() align(16) callconv(.naked) void {
19881988 @setRuntimeSafety(false);
19891989 asm volatile (
19901990 \\ cbz w16, 8f
......@@ -2005,7 +2005,7 @@ fn __aarch64_ldeor8_acq_rel() align(16) callconv(.Naked) void {
20052005 );
20062006 unreachable;
20072007}
2008fn __aarch64_ldset8_acq_rel() align(16) callconv(.Naked) void {
2008fn __aarch64_ldset8_acq_rel() align(16) callconv(.naked) void {
20092009 @setRuntimeSafety(false);
20102010 asm volatile (
20112011 \\ cbz w16, 8f
......@@ -2026,7 +2026,7 @@ fn __aarch64_ldset8_acq_rel() align(16) callconv(.Naked) void {
20262026 );
20272027 unreachable;
20282028}
2029fn __aarch64_cas16_relax() align(16) callconv(.Naked) void {
2029fn __aarch64_cas16_relax() align(16) callconv(.naked) void {
20302030 @setRuntimeSafety(false);
20312031 asm volatile (
20322032 \\ cbz w16, 8f
......@@ -2050,7 +2050,7 @@ fn __aarch64_cas16_relax() align(16) callconv(.Naked) void {
20502050 );
20512051 unreachable;
20522052}
2053fn __aarch64_cas16_acq() align(16) callconv(.Naked) void {
2053fn __aarch64_cas16_acq() align(16) callconv(.naked) void {
20542054 @setRuntimeSafety(false);
20552055 asm volatile (
20562056 \\ cbz w16, 8f
......@@ -2074,7 +2074,7 @@ fn __aarch64_cas16_acq() align(16) callconv(.Naked) void {
20742074 );
20752075 unreachable;
20762076}
2077fn __aarch64_cas16_rel() align(16) callconv(.Naked) void {
2077fn __aarch64_cas16_rel() align(16) callconv(.naked) void {
20782078 @setRuntimeSafety(false);
20792079 asm volatile (
20802080 \\ cbz w16, 8f
......@@ -2098,7 +2098,7 @@ fn __aarch64_cas16_rel() align(16) callconv(.Naked) void {
20982098 );
20992099 unreachable;
21002100}
2101fn __aarch64_cas16_acq_rel() align(16) callconv(.Naked) void {
2101fn __aarch64_cas16_acq_rel() align(16) callconv(.naked) void {
21022102 @setRuntimeSafety(false);
21032103 asm volatile (
21042104 \\ cbz w16, 8f
lib/compiler_rt/absvdi2.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__absvdi2, .{ .name = "__absvdi2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10pub fn __absvdi2(a: i64) callconv(.C) i64 {
10pub fn __absvdi2(a: i64) callconv(.c) i64 {
1111 return absv(i64, a);
1212}
lib/compiler_rt/absvsi2.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__absvsi2, .{ .name = "__absvsi2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10pub fn __absvsi2(a: i32) callconv(.C) i32 {
10pub fn __absvsi2(a: i32) callconv(.c) i32 {
1111 return absv(i32, a);
1212}
lib/compiler_rt/absvti2.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__absvti2, .{ .name = "__absvti2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10pub fn __absvti2(a: i128) callconv(.C) i128 {
10pub fn __absvti2(a: i128) callconv(.c) i128 {
1111 return absv(i128, a);
1212}
lib/compiler_rt/adddf3.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14fn __adddf3(a: f64, b: f64) callconv(.C) f64 {
14fn __adddf3(a: f64, b: f64) callconv(.c) f64 {
1515 return addf3(f64, a, b);
1616}
1717
18fn __aeabi_dadd(a: f64, b: f64) callconv(.AAPCS) f64 {
18fn __aeabi_dadd(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 {
1919 return addf3(f64, a, b);
2020}
lib/compiler_rt/addhf3.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__addhf3, .{ .name = "__addhf3", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __addhf3(a: f16, b: f16) callconv(.C) f16 {
10fn __addhf3(a: f16, b: f16) callconv(.c) f16 {
1111 return addf3(f16, a, b);
1212}
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
3131 return sum;
3232}
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 {
3535 return addoXi4_generic(i32, a, b, overflow);
3636}
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 {
3838 return addoXi4_generic(i64, a, b, overflow);
3939}
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 {
4141 return addoXi4_generic(i128, a, b, overflow);
4242}
4343
lib/compiler_rt/addsf3.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14fn __addsf3(a: f32, b: f32) callconv(.C) f32 {
14fn __addsf3(a: f32, b: f32) callconv(.c) f32 {
1515 return addf3(f32, a, b);
1616}
1717
18fn __aeabi_fadd(a: f32, b: f32) callconv(.AAPCS) f32 {
18fn __aeabi_fadd(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 {
1919 return addf3(f32, a, b);
2020}
lib/compiler_rt/addtf3.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 @export(&__addtf3, .{ .name = "__addtf3", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __addtf3(a: f128, b: f128) callconv(.C) f128 {
15pub fn __addtf3(a: f128, b: f128) callconv(.c) f128 {
1616 return addf3(f128, a, b);
1717}
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 {
2020 c.* = addf3(f128, a.*, b.*);
2121}
lib/compiler_rt/addxf3.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__addxf3, .{ .name = "__addxf3", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10pub fn __addxf3(a: f80, b: f80) callconv(.C) f80 {
10pub fn __addxf3(a: f80, b: f80) callconv(.c) f80 {
1111 return addf3(f80, a, b);
1212}
lib/compiler_rt/arm.zig+22-22
......@@ -57,67 +57,67 @@ extern fn memset(dest: ?[*]u8, c: i32, n: usize) ?[*]u8;
5757extern fn memcpy(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize) ?[*]u8;
5858extern 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 {
6161 @setRuntimeSafety(false);
6262 _ = memcpy(dest, src, n);
6363}
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 {
6565 @setRuntimeSafety(false);
6666 _ = memcpy(dest, src, n);
6767}
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 {
6969 @setRuntimeSafety(false);
7070 _ = memcpy(dest, src, n);
7171}
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 {
7474 @setRuntimeSafety(false);
7575 _ = memmove(dest, src, n);
7676}
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 {
7878 @setRuntimeSafety(false);
7979 _ = memmove(dest, src, n);
8080}
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 {
8282 @setRuntimeSafety(false);
8383 _ = memmove(dest, src, n);
8484}
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 {
8787 @setRuntimeSafety(false);
8888 // This is dentical to the standard `memset` definition but with the last
8989 // two arguments swapped
9090 _ = memset(dest, c, n);
9191}
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 {
9393 @setRuntimeSafety(false);
9494 _ = memset(dest, c, n);
9595}
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 {
9797 @setRuntimeSafety(false);
9898 _ = memset(dest, c, n);
9999}
100100
101pub fn __aeabi_memclr(dest: [*]u8, n: usize) callconv(.AAPCS) void {
101pub fn __aeabi_memclr(dest: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void {
102102 @setRuntimeSafety(false);
103103 _ = memset(dest, 0, n);
104104}
105pub fn __aeabi_memclr4(dest: [*]u8, n: usize) callconv(.AAPCS) void {
105pub fn __aeabi_memclr4(dest: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void {
106106 @setRuntimeSafety(false);
107107 _ = memset(dest, 0, n);
108108}
109pub fn __aeabi_memclr8(dest: [*]u8, n: usize) callconv(.AAPCS) void {
109pub fn __aeabi_memclr8(dest: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void {
110110 @setRuntimeSafety(false);
111111 _ = memset(dest, 0, n);
112112}
113113
114114// Dummy functions to avoid errors during the linking phase
115pub fn __aeabi_unwind_cpp_pr0() callconv(.AAPCS) void {}
116pub fn __aeabi_unwind_cpp_pr1() callconv(.AAPCS) void {}
117pub fn __aeabi_unwind_cpp_pr2() callconv(.AAPCS) void {}
115pub fn __aeabi_unwind_cpp_pr0() callconv(.{ .arm_aapcs = .{} }) void {}
116pub fn __aeabi_unwind_cpp_pr1() callconv(.{ .arm_aapcs = .{} }) void {}
117pub fn __aeabi_unwind_cpp_pr2() callconv(.{ .arm_aapcs = .{} }) void {}
118118
119119// 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 {
121121 @setRuntimeSafety(false);
122122 asm volatile (
123123 \\ mrc p15, 0, r0, c13, c0, 3
......@@ -129,7 +129,7 @@ pub fn __aeabi_read_tp() callconv(.Naked) void {
129129// The following functions are wrapped in an asm block to ensure the required
130130// calling convention is always respected
131131
132pub fn __aeabi_uidivmod() callconv(.Naked) void {
132pub fn __aeabi_uidivmod() callconv(.naked) void {
133133 @setRuntimeSafety(false);
134134 // Divide r0 by r1; the quotient goes in r0, the remainder in r1
135135 asm volatile (
......@@ -147,7 +147,7 @@ pub fn __aeabi_uidivmod() callconv(.Naked) void {
147147 unreachable;
148148}
149149
150pub fn __aeabi_uldivmod() callconv(.Naked) void {
150pub fn __aeabi_uldivmod() callconv(.naked) void {
151151 @setRuntimeSafety(false);
152152 // Divide r1:r0 by r3:r2; the quotient goes in r1:r0, the remainder in r3:r2
153153 asm volatile (
......@@ -167,7 +167,7 @@ pub fn __aeabi_uldivmod() callconv(.Naked) void {
167167 unreachable;
168168}
169169
170pub fn __aeabi_idivmod() callconv(.Naked) void {
170pub fn __aeabi_idivmod() callconv(.naked) void {
171171 @setRuntimeSafety(false);
172172 // Divide r0 by r1; the quotient goes in r0, the remainder in r1
173173 asm volatile (
......@@ -185,7 +185,7 @@ pub fn __aeabi_idivmod() callconv(.Naked) void {
185185 unreachable;
186186}
187187
188pub fn __aeabi_ldivmod() callconv(.Naked) void {
188pub fn __aeabi_ldivmod() callconv(.naked) void {
189189 @setRuntimeSafety(false);
190190 // Divide r1:r0 by r3:r2; the quotient goes in r1:r0, the remainder in r3:r2
191191 asm volatile (
......@@ -207,12 +207,12 @@ pub fn __aeabi_ldivmod() callconv(.Naked) void {
207207
208208// Float Arithmetic
209209
210fn __aeabi_frsub(a: f32, b: f32) callconv(.AAPCS) f32 {
210fn __aeabi_frsub(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 {
211211 const neg_a: f32 = @bitCast(@as(u32, @bitCast(a)) ^ (@as(u32, 1) << 31));
212212 return b + neg_a;
213213}
214214
215fn __aeabi_drsub(a: f64, b: f64) callconv(.AAPCS) f64 {
215fn __aeabi_drsub(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 {
216216 const neg_a: f64 = @bitCast(@as(u64, @bitCast(a)) ^ (@as(u64, 1) << 63));
217217 return b + neg_a;
218218}
lib/compiler_rt/atomics.zig+64-64
......@@ -117,21 +117,21 @@ var spinlocks: SpinlockTable = SpinlockTable{};
117117// Generic version of GCC atomic builtin functions.
118118// 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 {
121121 _ = model;
122122 var sl = spinlocks.get(@intFromPtr(src));
123123 defer sl.release();
124124 @memcpy(dest[0..size], src);
125125}
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 {
128128 _ = model;
129129 var sl = spinlocks.get(@intFromPtr(dest));
130130 defer sl.release();
131131 @memcpy(dest[0..size], src);
132132}
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 {
135135 _ = model;
136136 var sl = spinlocks.get(@intFromPtr(ptr));
137137 defer sl.release();
......@@ -146,7 +146,7 @@ fn __atomic_compare_exchange(
146146 desired: [*]u8,
147147 success: i32,
148148 failure: i32,
149) callconv(.C) i32 {
149) callconv(.c) i32 {
150150 _ = success;
151151 _ = failure;
152152 var sl = spinlocks.get(@intFromPtr(ptr));
......@@ -176,23 +176,23 @@ inline fn atomic_load_N(comptime T: type, src: *T, model: i32) T {
176176 }
177177}
178178
179fn __atomic_load_1(src: *u8, model: i32) callconv(.C) u8 {
179fn __atomic_load_1(src: *u8, model: i32) callconv(.c) u8 {
180180 return atomic_load_N(u8, src, model);
181181}
182182
183fn __atomic_load_2(src: *u16, model: i32) callconv(.C) u16 {
183fn __atomic_load_2(src: *u16, model: i32) callconv(.c) u16 {
184184 return atomic_load_N(u16, src, model);
185185}
186186
187fn __atomic_load_4(src: *u32, model: i32) callconv(.C) u32 {
187fn __atomic_load_4(src: *u32, model: i32) callconv(.c) u32 {
188188 return atomic_load_N(u32, src, model);
189189}
190190
191fn __atomic_load_8(src: *u64, model: i32) callconv(.C) u64 {
191fn __atomic_load_8(src: *u64, model: i32) callconv(.c) u64 {
192192 return atomic_load_N(u64, src, model);
193193}
194194
195fn __atomic_load_16(src: *u128, model: i32) callconv(.C) u128 {
195fn __atomic_load_16(src: *u128, model: i32) callconv(.c) u128 {
196196 return atomic_load_N(u128, src, model);
197197}
198198
......@@ -207,23 +207,23 @@ inline fn atomic_store_N(comptime T: type, dst: *T, value: T, model: i32) void {
207207 }
208208}
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 {
211211 return atomic_store_N(u8, dst, value, model);
212212}
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 {
215215 return atomic_store_N(u16, dst, value, model);
216216}
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 {
219219 return atomic_store_N(u32, dst, value, model);
220220}
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 {
223223 return atomic_store_N(u64, dst, value, model);
224224}
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 {
227227 return atomic_store_N(u128, dst, value, model);
228228}
229229
......@@ -274,23 +274,23 @@ inline fn atomic_exchange_N(comptime T: type, ptr: *T, val: T, model: i32) T {
274274 }
275275}
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 {
278278 return atomic_exchange_N(u8, ptr, val, model);
279279}
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 {
282282 return atomic_exchange_N(u16, ptr, val, model);
283283}
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 {
286286 return atomic_exchange_N(u32, ptr, val, model);
287287}
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 {
290290 return atomic_exchange_N(u64, ptr, val, model);
291291}
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 {
294294 return atomic_exchange_N(u128, ptr, val, model);
295295}
296296
......@@ -323,23 +323,23 @@ inline fn atomic_compare_exchange_N(
323323 }
324324}
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 {
327327 return atomic_compare_exchange_N(u8, ptr, expected, desired, success, failure);
328328}
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 {
331331 return atomic_compare_exchange_N(u16, ptr, expected, desired, success, failure);
332332}
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 {
335335 return atomic_compare_exchange_N(u32, ptr, expected, desired, success, failure);
336336}
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 {
339339 return atomic_compare_exchange_N(u64, ptr, expected, desired, success, failure);
340340}
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 {
343343 return atomic_compare_exchange_N(u128, ptr, expected, desired, success, failure);
344344}
345345
......@@ -376,163 +376,163 @@ inline fn fetch_op_N(comptime T: type, comptime op: std.builtin.AtomicRmwOp, ptr
376376 return @atomicRmw(T, ptr, op, val, .seq_cst);
377377}
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 {
380380 return fetch_op_N(u8, .Add, ptr, val, model);
381381}
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 {
384384 return fetch_op_N(u16, .Add, ptr, val, model);
385385}
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 {
388388 return fetch_op_N(u32, .Add, ptr, val, model);
389389}
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 {
392392 return fetch_op_N(u64, .Add, ptr, val, model);
393393}
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 {
396396 return fetch_op_N(u128, .Add, ptr, val, model);
397397}
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 {
400400 return fetch_op_N(u8, .Sub, ptr, val, model);
401401}
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 {
404404 return fetch_op_N(u16, .Sub, ptr, val, model);
405405}
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 {
408408 return fetch_op_N(u32, .Sub, ptr, val, model);
409409}
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 {
412412 return fetch_op_N(u64, .Sub, ptr, val, model);
413413}
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 {
416416 return fetch_op_N(u128, .Sub, ptr, val, model);
417417}
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 {
420420 return fetch_op_N(u8, .And, ptr, val, model);
421421}
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 {
424424 return fetch_op_N(u16, .And, ptr, val, model);
425425}
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 {
428428 return fetch_op_N(u32, .And, ptr, val, model);
429429}
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 {
432432 return fetch_op_N(u64, .And, ptr, val, model);
433433}
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 {
436436 return fetch_op_N(u128, .And, ptr, val, model);
437437}
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 {
440440 return fetch_op_N(u8, .Or, ptr, val, model);
441441}
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 {
444444 return fetch_op_N(u16, .Or, ptr, val, model);
445445}
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 {
448448 return fetch_op_N(u32, .Or, ptr, val, model);
449449}
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 {
452452 return fetch_op_N(u64, .Or, ptr, val, model);
453453}
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 {
456456 return fetch_op_N(u128, .Or, ptr, val, model);
457457}
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 {
460460 return fetch_op_N(u8, .Xor, ptr, val, model);
461461}
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 {
464464 return fetch_op_N(u16, .Xor, ptr, val, model);
465465}
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 {
468468 return fetch_op_N(u32, .Xor, ptr, val, model);
469469}
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 {
472472 return fetch_op_N(u64, .Xor, ptr, val, model);
473473}
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 {
476476 return fetch_op_N(u128, .Xor, ptr, val, model);
477477}
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 {
480480 return fetch_op_N(u8, .Nand, ptr, val, model);
481481}
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 {
484484 return fetch_op_N(u16, .Nand, ptr, val, model);
485485}
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 {
488488 return fetch_op_N(u32, .Nand, ptr, val, model);
489489}
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 {
492492 return fetch_op_N(u64, .Nand, ptr, val, model);
493493}
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 {
496496 return fetch_op_N(u128, .Nand, ptr, val, model);
497497}
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 {
500500 return fetch_op_N(u8, .Max, ptr, val, model);
501501}
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 {
504504 return fetch_op_N(u16, .Max, ptr, val, model);
505505}
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 {
508508 return fetch_op_N(u32, .Max, ptr, val, model);
509509}
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 {
512512 return fetch_op_N(u64, .Max, ptr, val, model);
513513}
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 {
516516 return fetch_op_N(u128, .Max, ptr, val, model);
517517}
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 {
520520 return fetch_op_N(u8, .Min, ptr, val, model);
521521}
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 {
524524 return fetch_op_N(u16, .Min, ptr, val, model);
525525}
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 {
528528 return fetch_op_N(u32, .Min, ptr, val, model);
529529}
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 {
532532 return fetch_op_N(u64, .Min, ptr, val, model);
533533}
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 {
536536 return fetch_op_N(u128, .Min, ptr, val, model);
537537}
538538
lib/compiler_rt/aulldiv.zig+2-2
......@@ -15,7 +15,7 @@ comptime {
1515 }
1616}
1717
18pub fn _alldiv(a: i64, b: i64) callconv(.Stdcall) i64 {
18pub fn _alldiv(a: i64, b: i64) callconv(.{ .x86_stdcall = .{} }) i64 {
1919 const s_a = a >> (64 - 1);
2020 const s_b = b >> (64 - 1);
2121
......@@ -27,7 +27,7 @@ pub fn _alldiv(a: i64, b: i64) callconv(.Stdcall) i64 {
2727 return (@as(i64, @bitCast(r)) ^ s) -% s;
2828}
2929
30pub fn _aulldiv() callconv(.Naked) void {
30pub fn _aulldiv() callconv(.naked) void {
3131 @setRuntimeSafety(false);
3232
3333 // The stack layout is:
lib/compiler_rt/aullrem.zig+2-2
......@@ -15,7 +15,7 @@ comptime {
1515 }
1616}
1717
18pub fn _allrem(a: i64, b: i64) callconv(.Stdcall) i64 {
18pub fn _allrem(a: i64, b: i64) callconv(.{ .x86_stdcall = .{} }) i64 {
1919 const s_a = a >> (64 - 1);
2020 const s_b = b >> (64 - 1);
2121
......@@ -27,7 +27,7 @@ pub fn _allrem(a: i64, b: i64) callconv(.Stdcall) i64 {
2727 return (@as(i64, @bitCast(r)) ^ s) -% s;
2828}
2929
30pub fn _aullrem() callconv(.Naked) void {
30pub fn _aullrem() callconv(.naked) void {
3131 @setRuntimeSafety(false);
3232
3333 // The stack layout is:
lib/compiler_rt/bcmp.zig+1-1
......@@ -5,7 +5,7 @@ comptime {
55 @export(&bcmp, .{ .name = "bcmp", .linkage = common.linkage, .visibility = common.visibility });
66}
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 {
99 @setRuntimeSafety(false);
1010
1111 var index: usize = 0;
lib/compiler_rt/bitreverse.zig+3-3
......@@ -46,15 +46,15 @@ inline fn bitreverseXi2(comptime T: type, a: T) T {
4646 }
4747}
4848
49pub fn __bitreversesi2(a: u32) callconv(.C) u32 {
49pub fn __bitreversesi2(a: u32) callconv(.c) u32 {
5050 return bitreverseXi2(u32, a);
5151}
5252
53pub fn __bitreversedi2(a: u64) callconv(.C) u64 {
53pub fn __bitreversedi2(a: u64) callconv(.c) u64 {
5454 return bitreverseXi2(u64, a);
5555}
5656
57pub fn __bitreverseti2(a: u128) callconv(.C) u128 {
57pub fn __bitreverseti2(a: u128) callconv(.c) u128 {
5858 return bitreverseXi2(u128, a);
5959}
6060
lib/compiler_rt/bswap.zig+3-3
......@@ -66,15 +66,15 @@ inline fn bswapXi2(comptime T: type, a: T) T {
6666 }
6767}
6868
69pub fn __bswapsi2(a: u32) callconv(.C) u32 {
69pub fn __bswapsi2(a: u32) callconv(.c) u32 {
7070 return bswapXi2(u32, a);
7171}
7272
73pub fn __bswapdi2(a: u64) callconv(.C) u64 {
73pub fn __bswapdi2(a: u64) callconv(.c) u64 {
7474 return bswapXi2(u64, a);
7575}
7676
77pub fn __bswapti2(a: u128) callconv(.C) u128 {
77pub fn __bswapti2(a: u128) callconv(.c) u128 {
7878 return bswapXi2(u128, a);
7979}
8080
lib/compiler_rt/ceil.zig+6-6
......@@ -26,12 +26,12 @@ comptime {
2626 @export(&ceill, .{ .name = "ceill", .linkage = common.linkage, .visibility = common.visibility });
2727}
2828
29pub fn __ceilh(x: f16) callconv(.C) f16 {
29pub fn __ceilh(x: f16) callconv(.c) f16 {
3030 // TODO: more efficient implementation
3131 return @floatCast(ceilf(x));
3232}
3333
34pub fn ceilf(x: f32) callconv(.C) f32 {
34pub fn ceilf(x: f32) callconv(.c) f32 {
3535 var u: u32 = @bitCast(x);
3636 const e = @as(i32, @intCast((u >> 23) & 0xFF)) - 0x7F;
3737 var m: u32 = undefined;
......@@ -64,7 +64,7 @@ pub fn ceilf(x: f32) callconv(.C) f32 {
6464 }
6565}
6666
67pub fn ceil(x: f64) callconv(.C) f64 {
67pub fn ceil(x: f64) callconv(.c) f64 {
6868 const f64_toint = 1.0 / math.floatEps(f64);
6969
7070 const u: u64 = @bitCast(x);
......@@ -95,12 +95,12 @@ pub fn ceil(x: f64) callconv(.C) f64 {
9595 }
9696}
9797
98pub fn __ceilx(x: f80) callconv(.C) f80 {
98pub fn __ceilx(x: f80) callconv(.c) f80 {
9999 // TODO: more efficient implementation
100100 return @floatCast(ceilq(x));
101101}
102102
103pub fn ceilq(x: f128) callconv(.C) f128 {
103pub fn ceilq(x: f128) callconv(.c) f128 {
104104 const f128_toint = 1.0 / math.floatEps(f128);
105105
106106 const u: u128 = @bitCast(x);
......@@ -129,7 +129,7 @@ pub fn ceilq(x: f128) callconv(.C) f128 {
129129 }
130130}
131131
132pub fn ceill(x: c_longdouble) callconv(.C) c_longdouble {
132pub fn ceill(x: c_longdouble) callconv(.c) c_longdouble {
133133 switch (@typeInfo(c_longdouble).float.bits) {
134134 16 => return __ceilh(x),
135135 32 => return ceilf(x),
lib/compiler_rt/clear_cache.zig+1-1
......@@ -15,7 +15,7 @@ comptime {
1515 _ = &clear_cache;
1616}
1717
18fn clear_cache(start: usize, end: usize) callconv(.C) void {
18fn clear_cache(start: usize, end: usize) callconv(.c) void {
1919 const x86 = switch (arch) {
2020 .x86, .x86_64 => true,
2121 else => false,
lib/compiler_rt/clzsi2_test.zig+1-1
......@@ -4,7 +4,7 @@ const testing = @import("std").testing;
44
55fn test__clzsi2(a: u32, expected: i32) !void {
66 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));
88 const x: i32 = @bitCast(a);
99 const result = actualClzsi2(x);
1010 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 {
3434 return cmp1 - cmp2 + 1;
3535}
3636
37pub fn __cmpsi2(a: i32, b: i32) callconv(.C) i32 {
37pub fn __cmpsi2(a: i32, b: i32) callconv(.c) i32 {
3838 return XcmpXi2(i32, a, b);
3939}
4040
41pub fn __cmpdi2(a: i64, b: i64) callconv(.C) i32 {
41pub fn __cmpdi2(a: i64, b: i64) callconv(.c) i32 {
4242 return XcmpXi2(i64, a, b);
4343}
4444
45pub fn __cmpti2(a: i128, b: i128) callconv(.C) i32 {
45pub fn __cmpti2(a: i128, b: i128) callconv(.c) i32 {
4646 return XcmpXi2(i128, a, b);
4747}
4848
49pub fn __ucmpsi2(a: u32, b: u32) callconv(.C) i32 {
49pub fn __ucmpsi2(a: u32, b: u32) callconv(.c) i32 {
5050 return XcmpXi2(u32, a, b);
5151}
5252
53pub fn __ucmpdi2(a: u64, b: u64) callconv(.C) i32 {
53pub fn __ucmpdi2(a: u64, b: u64) callconv(.c) i32 {
5454 return XcmpXi2(u64, a, b);
5555}
5656
57pub fn __ucmpti2(a: u128, b: u128) callconv(.C) i32 {
57pub fn __ucmpti2(a: u128, b: u128) callconv(.c) i32 {
5858 return XcmpXi2(u128, a, b);
5959}
6060
lib/compiler_rt/cmpdf2.zig+8-8
......@@ -25,44 +25,44 @@ comptime {
2525///
2626/// Note that this matches the definition of `__ledf2`, `__eqdf2`, `__nedf2`, `__cmpdf2`,
2727/// and `__ltdf2`.
28fn __cmpdf2(a: f64, b: f64) callconv(.C) i32 {
28fn __cmpdf2(a: f64, b: f64) callconv(.c) i32 {
2929 return @intFromEnum(comparef.cmpf2(f64, comparef.LE, a, b));
3030}
3131
3232/// "These functions return a value less than or equal to zero if neither argument is NaN,
3333/// 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 {
3535 return __cmpdf2(a, b);
3636}
3737
3838/// "These functions return zero if neither argument is NaN, and a and b are equal."
3939/// Note that due to some kind of historical accident, __eqdf2 and __nedf2 are defined
4040/// 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 {
4242 return __cmpdf2(a, b);
4343}
4444
4545/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."
4646/// Note that due to some kind of historical accident, __eqdf2 and __nedf2 are defined
4747/// 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 {
4949 return __cmpdf2(a, b);
5050}
5151
5252/// "These functions return a value less than zero if neither argument is NaN, and a
5353/// 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 {
5555 return __cmpdf2(a, b);
5656}
5757
58fn __aeabi_dcmpeq(a: f64, b: f64) callconv(.AAPCS) i32 {
58fn __aeabi_dcmpeq(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 {
5959 return @intFromBool(comparef.cmpf2(f64, comparef.LE, a, b) == .Equal);
6060}
6161
62fn __aeabi_dcmplt(a: f64, b: f64) callconv(.AAPCS) i32 {
62fn __aeabi_dcmplt(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 {
6363 return @intFromBool(comparef.cmpf2(f64, comparef.LE, a, b) == .Less);
6464}
6565
66fn __aeabi_dcmple(a: f64, b: f64) callconv(.AAPCS) i32 {
66fn __aeabi_dcmple(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 {
6767 return @intFromBool(comparef.cmpf2(f64, comparef.LE, a, b) != .Greater);
6868}
lib/compiler_rt/cmphf2.zig+5-5
......@@ -19,32 +19,32 @@ comptime {
1919///
2020/// Note that this matches the definition of `__lehf2`, `__eqhf2`, `__nehf2`, `__cmphf2`,
2121/// and `__lthf2`.
22fn __cmphf2(a: f16, b: f16) callconv(.C) i32 {
22fn __cmphf2(a: f16, b: f16) callconv(.c) i32 {
2323 return @intFromEnum(comparef.cmpf2(f16, comparef.LE, a, b));
2424}
2525
2626/// "These functions return a value less than or equal to zero if neither argument is NaN,
2727/// 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 {
2929 return __cmphf2(a, b);
3030}
3131
3232/// "These functions return zero if neither argument is NaN, and a and b are equal."
3333/// Note that due to some kind of historical accident, __eqhf2 and __nehf2 are defined
3434/// 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 {
3636 return __cmphf2(a, b);
3737}
3838
3939/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."
4040/// Note that due to some kind of historical accident, __eqhf2 and __nehf2 are defined
4141/// 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 {
4343 return __cmphf2(a, b);
4444}
4545
4646/// "These functions return a value less than zero if neither argument is NaN, and a
4747/// 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 {
4949 return __cmphf2(a, b);
5050}
lib/compiler_rt/cmpsf2.zig+8-8
......@@ -25,44 +25,44 @@ comptime {
2525///
2626/// Note that this matches the definition of `__lesf2`, `__eqsf2`, `__nesf2`, `__cmpsf2`,
2727/// and `__ltsf2`.
28fn __cmpsf2(a: f32, b: f32) callconv(.C) i32 {
28fn __cmpsf2(a: f32, b: f32) callconv(.c) i32 {
2929 return @intFromEnum(comparef.cmpf2(f32, comparef.LE, a, b));
3030}
3131
3232/// "These functions return a value less than or equal to zero if neither argument is NaN,
3333/// 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 {
3535 return __cmpsf2(a, b);
3636}
3737
3838/// "These functions return zero if neither argument is NaN, and a and b are equal."
3939/// Note that due to some kind of historical accident, __eqsf2 and __nesf2 are defined
4040/// 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 {
4242 return __cmpsf2(a, b);
4343}
4444
4545/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."
4646/// Note that due to some kind of historical accident, __eqsf2 and __nesf2 are defined
4747/// 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 {
4949 return __cmpsf2(a, b);
5050}
5151
5252/// "These functions return a value less than zero if neither argument is NaN, and a
5353/// 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 {
5555 return __cmpsf2(a, b);
5656}
5757
58fn __aeabi_fcmpeq(a: f32, b: f32) callconv(.AAPCS) i32 {
58fn __aeabi_fcmpeq(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 {
5959 return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) == .Equal);
6060}
6161
62fn __aeabi_fcmplt(a: f32, b: f32) callconv(.AAPCS) i32 {
62fn __aeabi_fcmplt(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 {
6363 return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) == .Less);
6464}
6565
66fn __aeabi_fcmple(a: f32, b: f32) callconv(.AAPCS) i32 {
66fn __aeabi_fcmple(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 {
6767 return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) != .Greater);
6868}
lib/compiler_rt/cmptf2.zig+12-12
......@@ -33,33 +33,33 @@ comptime {
3333///
3434/// Note that this matches the definition of `__letf2`, `__eqtf2`, `__netf2`, `__cmptf2`,
3535/// and `__lttf2`.
36fn __cmptf2(a: f128, b: f128) callconv(.C) i32 {
36fn __cmptf2(a: f128, b: f128) callconv(.c) i32 {
3737 return @intFromEnum(comparef.cmpf2(f128, comparef.LE, a, b));
3838}
3939
4040/// "These functions return a value less than or equal to zero if neither argument is NaN,
4141/// 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 {
4343 return __cmptf2(a, b);
4444}
4545
4646/// "These functions return zero if neither argument is NaN, and a and b are equal."
4747/// Note that due to some kind of historical accident, __eqtf2 and __netf2 are defined
4848/// to have the same return value.
49fn __eqtf2(a: f128, b: f128) callconv(.C) i32 {
49fn __eqtf2(a: f128, b: f128) callconv(.c) i32 {
5050 return __cmptf2(a, b);
5151}
5252
5353/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."
5454/// Note that due to some kind of historical accident, __eqtf2 and __netf2 are defined
5555/// to have the same return value.
56fn __netf2(a: f128, b: f128) callconv(.C) i32 {
56fn __netf2(a: f128, b: f128) callconv(.c) i32 {
5757 return __cmptf2(a, b);
5858}
5959
6060/// "These functions return a value less than zero if neither argument is NaN, and a
6161/// is strictly less than b."
62fn __lttf2(a: f128, b: f128) callconv(.C) i32 {
62fn __lttf2(a: f128, b: f128) callconv(.c) i32 {
6363 return __cmptf2(a, b);
6464}
6565
......@@ -70,34 +70,34 @@ const SparcFCMP = enum(i32) {
7070 Unordered = 3,
7171};
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 {
7474 return @intFromEnum(comparef.cmpf2(f128, SparcFCMP, a.*, b.*));
7575}
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 {
7878 return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) == .Equal;
7979}
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 {
8282 return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) != .Equal;
8383}
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 {
8686 return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) == .Less;
8787}
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 {
9090 return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) == .Greater;
9191}
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 {
9494 return switch (@as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b)))) {
9595 .Equal, .Greater => true,
9696 .Less, .Unordered => false,
9797 };
9898}
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 {
101101 return switch (@as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b)))) {
102102 .Equal, .Less => true,
103103 .Greater, .Unordered => false,
lib/compiler_rt/cmpxf2.zig+5-5
......@@ -19,32 +19,32 @@ comptime {
1919///
2020/// Note that this matches the definition of `__lexf2`, `__eqxf2`, `__nexf2`, `__cmpxf2`,
2121/// and `__ltxf2`.
22fn __cmpxf2(a: f80, b: f80) callconv(.C) i32 {
22fn __cmpxf2(a: f80, b: f80) callconv(.c) i32 {
2323 return @intFromEnum(comparef.cmp_f80(comparef.LE, a, b));
2424}
2525
2626/// "These functions return a value less than or equal to zero if neither argument is NaN,
2727/// 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 {
2929 return __cmpxf2(a, b);
3030}
3131
3232/// "These functions return zero if neither argument is NaN, and a and b are equal."
3333/// Note that due to some kind of historical accident, __eqxf2 and __nexf2 are defined
3434/// to have the same return value.
35fn __eqxf2(a: f80, b: f80) callconv(.C) i32 {
35fn __eqxf2(a: f80, b: f80) callconv(.c) i32 {
3636 return __cmpxf2(a, b);
3737}
3838
3939/// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal."
4040/// Note that due to some kind of historical accident, __eqxf2 and __nexf2 are defined
4141/// to have the same return value.
42fn __nexf2(a: f80, b: f80) callconv(.C) i32 {
42fn __nexf2(a: f80, b: f80) callconv(.c) i32 {
4343 return __cmpxf2(a, b);
4444}
4545
4646/// "These functions return a value less than zero if neither argument is NaN, and a
4747/// is strictly less than b."
48fn __ltxf2(a: f80, b: f80) callconv(.C) i32 {
48fn __ltxf2(a: f80, b: f80) callconv(.c) i32 {
4949 return __cmpxf2(a, b);
5050}
lib/compiler_rt/cos.zig+6-6
......@@ -22,12 +22,12 @@ comptime {
2222 @export(&cosl, .{ .name = "cosl", .linkage = common.linkage, .visibility = common.visibility });
2323}
2424
25pub fn __cosh(a: f16) callconv(.C) f16 {
25pub fn __cosh(a: f16) callconv(.c) f16 {
2626 // TODO: more efficient implementation
2727 return @floatCast(cosf(a));
2828}
2929
30pub fn cosf(x: f32) callconv(.C) f32 {
30pub fn cosf(x: f32) callconv(.c) f32 {
3131 // Small multiples of pi/2 rounded to double precision.
3232 const c1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18
3333 const c2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18
......@@ -84,7 +84,7 @@ pub fn cosf(x: f32) callconv(.C) f32 {
8484 };
8585}
8686
87pub fn cos(x: f64) callconv(.C) f64 {
87pub fn cos(x: f64) callconv(.c) f64 {
8888 var ix = @as(u64, @bitCast(x)) >> 32;
8989 ix &= 0x7fffffff;
9090
......@@ -113,17 +113,17 @@ pub fn cos(x: f64) callconv(.C) f64 {
113113 };
114114}
115115
116pub fn __cosx(a: f80) callconv(.C) f80 {
116pub fn __cosx(a: f80) callconv(.c) f80 {
117117 // TODO: more efficient implementation
118118 return @floatCast(cosq(a));
119119}
120120
121pub fn cosq(a: f128) callconv(.C) f128 {
121pub fn cosq(a: f128) callconv(.c) f128 {
122122 // TODO: more correct implementation
123123 return cos(@floatCast(a));
124124}
125125
126pub fn cosl(x: c_longdouble) callconv(.C) c_longdouble {
126pub fn cosl(x: c_longdouble) callconv(.c) c_longdouble {
127127 switch (@typeInfo(c_longdouble).float.bits) {
128128 16 => return __cosh(x),
129129 32 => return cosf(x),
lib/compiler_rt/count0bits.zig+11-11
......@@ -52,7 +52,7 @@ inline fn clzXi2(comptime T: type, a: T) i32 {
5252 return @intCast(n - @as(T, @bitCast(x)));
5353}
5454
55fn __clzsi2_thumb1() callconv(.Naked) void {
55fn __clzsi2_thumb1() callconv(.naked) void {
5656 @setRuntimeSafety(false);
5757
5858 // Similar to the generic version with the last two rounds replaced by a LUT
......@@ -86,7 +86,7 @@ fn __clzsi2_thumb1() callconv(.Naked) void {
8686 unreachable;
8787}
8888
89fn __clzsi2_arm32() callconv(.Naked) void {
89fn __clzsi2_arm32() callconv(.naked) void {
9090 @setRuntimeSafety(false);
9191
9292 asm volatile (
......@@ -135,7 +135,7 @@ fn __clzsi2_arm32() callconv(.Naked) void {
135135 unreachable;
136136}
137137
138fn clzsi2_generic(a: i32) callconv(.C) i32 {
138fn clzsi2_generic(a: i32) callconv(.c) i32 {
139139 return clzXi2(i32, a);
140140}
141141
......@@ -159,11 +159,11 @@ pub const __clzsi2 = switch (builtin.cpu.arch) {
159159 else => clzsi2_generic,
160160};
161161
162pub fn __clzdi2(a: i64) callconv(.C) i32 {
162pub fn __clzdi2(a: i64) callconv(.c) i32 {
163163 return clzXi2(i64, a);
164164}
165165
166pub fn __clzti2(a: i128) callconv(.C) i32 {
166pub fn __clzti2(a: i128) callconv(.c) i32 {
167167 return clzXi2(i128, a);
168168}
169169
......@@ -190,15 +190,15 @@ inline fn ctzXi2(comptime T: type, a: T) i32 {
190190 return @intCast(n - @as(T, @bitCast((x & 1))));
191191}
192192
193pub fn __ctzsi2(a: i32) callconv(.C) i32 {
193pub fn __ctzsi2(a: i32) callconv(.c) i32 {
194194 return ctzXi2(i32, a);
195195}
196196
197pub fn __ctzdi2(a: i64) callconv(.C) i32 {
197pub fn __ctzdi2(a: i64) callconv(.c) i32 {
198198 return ctzXi2(i64, a);
199199}
200200
201pub fn __ctzti2(a: i128) callconv(.C) i32 {
201pub fn __ctzti2(a: i128) callconv(.c) i32 {
202202 return ctzXi2(i128, a);
203203}
204204
......@@ -222,15 +222,15 @@ inline fn ffsXi2(comptime T: type, a: T) i32 {
222222 return @as(i32, @intCast(n - @as(T, @bitCast((x & 1))))) + 1;
223223}
224224
225pub fn __ffssi2(a: i32) callconv(.C) i32 {
225pub fn __ffssi2(a: i32) callconv(.c) i32 {
226226 return ffsXi2(i32, a);
227227}
228228
229pub fn __ffsdi2(a: i64) callconv(.C) i32 {
229pub fn __ffsdi2(a: i64) callconv(.c) i32 {
230230 return ffsXi2(i64, a);
231231}
232232
233pub fn __ffsti2(a: i128) callconv(.C) i32 {
233pub fn __ffsti2(a: i128) callconv(.c) i32 {
234234 return ffsXi2(i128, a);
235235}
236236
lib/compiler_rt/divc3_test.zig+1-1
......@@ -17,7 +17,7 @@ test "divc3" {
1717 try testDiv(f128, __divtc3);
1818}
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 {
2121 {
2222 const a: T = 1.0;
2323 const b: T = 0.0;
lib/compiler_rt/divdc3.zig+1-1
......@@ -8,6 +8,6 @@ comptime {
88 }
99}
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) {
1212 return divc3.divc3(f64, a, b, c, d);
1313}
lib/compiler_rt/divdf3.zig+2-2
......@@ -21,11 +21,11 @@ comptime {
2121 }
2222}
2323
24pub fn __divdf3(a: f64, b: f64) callconv(.C) f64 {
24pub fn __divdf3(a: f64, b: f64) callconv(.c) f64 {
2525 return div(a, b);
2626}
2727
28fn __aeabi_ddiv(a: f64, b: f64) callconv(.AAPCS) f64 {
28fn __aeabi_ddiv(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 {
2929 return div(a, b);
3030}
3131
lib/compiler_rt/divhc3.zig+1-1
......@@ -8,6 +8,6 @@ comptime {
88 }
99}
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) {
1212 return divc3.divc3(f16, a, b, c, d);
1313}
lib/compiler_rt/divhf3.zig+1-1
......@@ -5,7 +5,7 @@ comptime {
55 @export(&__divhf3, .{ .name = "__divhf3", .linkage = common.linkage, .visibility = common.visibility });
66}
77
8pub fn __divhf3(a: f16, b: f16) callconv(.C) f16 {
8pub fn __divhf3(a: f16, b: f16) callconv(.c) f16 {
99 // TODO: more efficient implementation
1010 return @floatCast(divsf3.__divsf3(a, b));
1111}
lib/compiler_rt/divmodei4.zig+2-2
......@@ -33,7 +33,7 @@ fn divmod(q: ?[]u32, r: ?[]u32, u: []u32, v: []u32) !void {
3333 if (r) |x| if (u_sign < 0) neg(x);
3434}
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 {
3737 @setRuntimeSafety(builtin.is_test);
3838 const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];
3939 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)
4141 @call(.always_inline, divmod, .{ q, null, u, v }) catch unreachable;
4242}
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 {
4545 @setRuntimeSafety(builtin.is_test);
4646 const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];
4747 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 {
88 }
99}
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) {
1212 return divc3.divc3(f32, a, b, c, d);
1313}
lib/compiler_rt/divsf3.zig+2-2
......@@ -19,11 +19,11 @@ comptime {
1919 }
2020}
2121
22pub fn __divsf3(a: f32, b: f32) callconv(.C) f32 {
22pub fn __divsf3(a: f32, b: f32) callconv(.c) f32 {
2323 return div(a, b);
2424}
2525
26fn __aeabi_fdiv(a: f32, b: f32) callconv(.AAPCS) f32 {
26fn __aeabi_fdiv(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 {
2727 return div(a, b);
2828}
2929
lib/compiler_rt/divtc3.zig+1-1
......@@ -10,6 +10,6 @@ comptime {
1010 }
1111}
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) {
1414 return divc3.divc3(f128, a, b, c, d);
1515}
lib/compiler_rt/divtf3.zig+2-2
......@@ -16,11 +16,11 @@ comptime {
1616 @export(&__divtf3, .{ .name = "__divtf3", .linkage = common.linkage, .visibility = common.visibility });
1717}
1818
19pub fn __divtf3(a: f128, b: f128) callconv(.C) f128 {
19pub fn __divtf3(a: f128, b: f128) callconv(.c) f128 {
2020 return div(a, b);
2121}
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 {
2424 c.* = div(a.*, b.*);
2525}
2626
lib/compiler_rt/divti3.zig+2-2
......@@ -14,13 +14,13 @@ comptime {
1414 }
1515}
1616
17pub fn __divti3(a: i128, b: i128) callconv(.C) i128 {
17pub fn __divti3(a: i128, b: i128) callconv(.c) i128 {
1818 return div(a, b);
1919}
2020
2121const 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 {
2424 return @bitCast(div(@bitCast(a), @bitCast(b)));
2525}
2626
lib/compiler_rt/divxc3.zig+1-1
......@@ -8,6 +8,6 @@ comptime {
88 }
99}
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) {
1212 return divc3.divc3(f80, a, b, c, d);
1313}
lib/compiler_rt/divxf3.zig+1-1
......@@ -12,7 +12,7 @@ comptime {
1212 @export(&__divxf3, .{ .name = "__divxf3", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __divxf3(a: f80, b: f80) callconv(.C) f80 {
15pub fn __divxf3(a: f80, b: f80) callconv(.c) f80 {
1616 const T = f80;
1717 const Z = std.meta.Int(.unsigned, @bitSizeOf(T));
1818
lib/compiler_rt/emutls.zig+2-2
......@@ -24,7 +24,7 @@ comptime {
2424}
2525
2626/// 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 {
2828 return control.getPointer();
2929}
3030
......@@ -191,7 +191,7 @@ const current_thread_storage = struct {
191191 }
192192
193193 /// 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 {
195195 var array: *ObjectArray = @ptrCast(@alignCast(arrayPtr));
196196 array.deinit();
197197 }
lib/compiler_rt/exp.zig+6-6
......@@ -26,12 +26,12 @@ comptime {
2626 @export(&expl, .{ .name = "expl", .linkage = common.linkage, .visibility = common.visibility });
2727}
2828
29pub fn __exph(a: f16) callconv(.C) f16 {
29pub fn __exph(a: f16) callconv(.c) f16 {
3030 // TODO: more efficient implementation
3131 return @floatCast(expf(a));
3232}
3333
34pub fn expf(x_: f32) callconv(.C) f32 {
34pub fn expf(x_: f32) callconv(.c) f32 {
3535 const half = [_]f32{ 0.5, -0.5 };
3636 const ln2hi = 6.9314575195e-1;
3737 const ln2lo = 1.4286067653e-6;
......@@ -106,7 +106,7 @@ pub fn expf(x_: f32) callconv(.C) f32 {
106106 }
107107}
108108
109pub fn exp(x_: f64) callconv(.C) f64 {
109pub fn exp(x_: f64) callconv(.c) f64 {
110110 const half = [_]f64{ 0.5, -0.5 };
111111 const ln2hi: f64 = 6.93147180369123816490e-01;
112112 const ln2lo: f64 = 1.90821492927058770002e-10;
......@@ -190,17 +190,17 @@ pub fn exp(x_: f64) callconv(.C) f64 {
190190 }
191191}
192192
193pub fn __expx(a: f80) callconv(.C) f80 {
193pub fn __expx(a: f80) callconv(.c) f80 {
194194 // TODO: more efficient implementation
195195 return @floatCast(expq(a));
196196}
197197
198pub fn expq(a: f128) callconv(.C) f128 {
198pub fn expq(a: f128) callconv(.c) f128 {
199199 // TODO: more correct implementation
200200 return exp(@floatCast(a));
201201}
202202
203pub fn expl(x: c_longdouble) callconv(.C) c_longdouble {
203pub fn expl(x: c_longdouble) callconv(.c) c_longdouble {
204204 switch (@typeInfo(c_longdouble).float.bits) {
205205 16 => return __exph(x),
206206 32 => return expf(x),
lib/compiler_rt/exp2.zig+6-6
......@@ -26,12 +26,12 @@ comptime {
2626 @export(&exp2l, .{ .name = "exp2l", .linkage = common.linkage, .visibility = common.visibility });
2727}
2828
29pub fn __exp2h(x: f16) callconv(.C) f16 {
29pub fn __exp2h(x: f16) callconv(.c) f16 {
3030 // TODO: more efficient implementation
3131 return @floatCast(exp2f(x));
3232}
3333
34pub fn exp2f(x: f32) callconv(.C) f32 {
34pub fn exp2f(x: f32) callconv(.c) f32 {
3535 const tblsiz: u32 = @intCast(exp2ft.len);
3636 const redux: f32 = 0x1.8p23 / @as(f32, @floatFromInt(tblsiz));
3737 const P1: f32 = 0x1.62e430p-1;
......@@ -88,7 +88,7 @@ pub fn exp2f(x: f32) callconv(.C) f32 {
8888 return @floatCast(r * uk);
8989}
9090
91pub fn exp2(x: f64) callconv(.C) f64 {
91pub fn exp2(x: f64) callconv(.c) f64 {
9292 const tblsiz: u32 = @intCast(exp2dt.len / 2);
9393 const redux: f64 = 0x1.8p52 / @as(f64, @floatFromInt(tblsiz));
9494 const P1: f64 = 0x1.62e42fefa39efp-1;
......@@ -157,17 +157,17 @@ pub fn exp2(x: f64) callconv(.C) f64 {
157157 return math.scalbn(r, ik);
158158}
159159
160pub fn __exp2x(x: f80) callconv(.C) f80 {
160pub fn __exp2x(x: f80) callconv(.c) f80 {
161161 // TODO: more efficient implementation
162162 return @floatCast(exp2q(x));
163163}
164164
165pub fn exp2q(x: f128) callconv(.C) f128 {
165pub fn exp2q(x: f128) callconv(.c) f128 {
166166 // TODO: more correct implementation
167167 return exp2(@floatCast(x));
168168}
169169
170pub fn exp2l(x: c_longdouble) callconv(.C) c_longdouble {
170pub fn exp2l(x: c_longdouble) callconv(.c) c_longdouble {
171171 switch (@typeInfo(c_longdouble).float.bits) {
172172 16 => return __exp2h(x),
173173 32 => return exp2f(x),
lib/compiler_rt/extenddftf2.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 @export(&__extenddftf2, .{ .name = "__extenddftf2", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __extenddftf2(a: f64) callconv(.C) f128 {
15pub fn __extenddftf2(a: f64) callconv(.c) f128 {
1616 return extendf(f128, f64, @as(u64, @bitCast(a)));
1717}
1818
19fn _Qp_dtoq(c: *f128, a: f64) callconv(.C) void {
19fn _Qp_dtoq(c: *f128, a: f64) callconv(.c) void {
2020 c.* = extendf(f128, f64, @as(u64, @bitCast(a)));
2121}
lib/compiler_rt/extenddfxf2.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__extenddfxf2, .{ .name = "__extenddfxf2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10pub fn __extenddfxf2(a: f64) callconv(.C) f80 {
10pub fn __extenddfxf2(a: f64) callconv(.c) f80 {
1111 return extend_f80(f64, @as(u64, @bitCast(a)));
1212}
lib/compiler_rt/extendhfdf2.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__extendhfdf2, .{ .name = "__extendhfdf2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10pub fn __extendhfdf2(a: common.F16T(f64)) callconv(.C) f64 {
10pub fn __extendhfdf2(a: common.F16T(f64)) callconv(.c) f64 {
1111 return extendf(f64, f16, @as(u16, @bitCast(a)));
1212}
lib/compiler_rt/extendhfsf2.zig+3-3
......@@ -12,14 +12,14 @@ comptime {
1212 @export(&__extendhfsf2, .{ .name = "__extendhfsf2", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __extendhfsf2(a: common.F16T(f32)) callconv(.C) f32 {
15pub fn __extendhfsf2(a: common.F16T(f32)) callconv(.c) f32 {
1616 return extendf(f32, f16, @as(u16, @bitCast(a)));
1717}
1818
19fn __gnu_h2f_ieee(a: common.F16T(f32)) callconv(.C) f32 {
19fn __gnu_h2f_ieee(a: common.F16T(f32)) callconv(.c) f32 {
2020 return extendf(f32, f16, @as(u16, @bitCast(a)));
2121}
2222
23fn __aeabi_h2f(a: u16) callconv(.AAPCS) f32 {
23fn __aeabi_h2f(a: u16) callconv(.{ .arm_aapcs = .{} }) f32 {
2424 return extendf(f32, f16, @as(u16, @bitCast(a)));
2525}
lib/compiler_rt/extendhftf2.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__extendhftf2, .{ .name = "__extendhftf2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10pub fn __extendhftf2(a: common.F16T(f128)) callconv(.C) f128 {
10pub fn __extendhftf2(a: common.F16T(f128)) callconv(.c) f128 {
1111 return extendf(f128, f16, @as(u16, @bitCast(a)));
1212}
lib/compiler_rt/extendhfxf2.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__extendhfxf2, .{ .name = "__extendhfxf2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __extendhfxf2(a: common.F16T(f80)) callconv(.C) f80 {
10fn __extendhfxf2(a: common.F16T(f80)) callconv(.c) f80 {
1111 return extend_f80(f16, @as(u16, @bitCast(a)));
1212}
lib/compiler_rt/extendsfdf2.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14fn __extendsfdf2(a: f32) callconv(.C) f64 {
14fn __extendsfdf2(a: f32) callconv(.c) f64 {
1515 return extendf(f64, f32, @as(u32, @bitCast(a)));
1616}
1717
18fn __aeabi_f2d(a: f32) callconv(.AAPCS) f64 {
18fn __aeabi_f2d(a: f32) callconv(.{ .arm_aapcs = .{} }) f64 {
1919 return extendf(f64, f32, @as(u32, @bitCast(a)));
2020}
lib/compiler_rt/extendsftf2.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 @export(&__extendsftf2, .{ .name = "__extendsftf2", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __extendsftf2(a: f32) callconv(.C) f128 {
15pub fn __extendsftf2(a: f32) callconv(.c) f128 {
1616 return extendf(f128, f32, @as(u32, @bitCast(a)));
1717}
1818
19fn _Qp_stoq(c: *f128, a: f32) callconv(.C) void {
19fn _Qp_stoq(c: *f128, a: f32) callconv(.c) void {
2020 c.* = extendf(f128, f32, @as(u32, @bitCast(a)));
2121}
lib/compiler_rt/extendsfxf2.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__extendsfxf2, .{ .name = "__extendsfxf2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __extendsfxf2(a: f32) callconv(.C) f80 {
10fn __extendsfxf2(a: f32) callconv(.c) f80 {
1111 return extend_f80(f32, @as(u32, @bitCast(a)));
1212}
lib/compiler_rt/extendxftf2.zig+1-1
......@@ -7,7 +7,7 @@ comptime {
77 @export(&__extendxftf2, .{ .name = "__extendxftf2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __extendxftf2(a: f80) callconv(.C) f128 {
10fn __extendxftf2(a: f80) callconv(.c) f128 {
1111 const src_int_bit: u64 = 0x8000000000000000;
1212 const src_sig_mask = ~src_int_bit;
1313 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 {
1717 @export(&fabsl, .{ .name = "fabsl", .linkage = common.linkage, .visibility = common.visibility });
1818}
1919
20pub fn __fabsh(a: f16) callconv(.C) f16 {
20pub fn __fabsh(a: f16) callconv(.c) f16 {
2121 return generic_fabs(a);
2222}
2323
24pub fn fabsf(a: f32) callconv(.C) f32 {
24pub fn fabsf(a: f32) callconv(.c) f32 {
2525 return generic_fabs(a);
2626}
2727
28pub fn fabs(a: f64) callconv(.C) f64 {
28pub fn fabs(a: f64) callconv(.c) f64 {
2929 return generic_fabs(a);
3030}
3131
32pub fn __fabsx(a: f80) callconv(.C) f80 {
32pub fn __fabsx(a: f80) callconv(.c) f80 {
3333 return generic_fabs(a);
3434}
3535
36pub fn fabsq(a: f128) callconv(.C) f128 {
36pub fn fabsq(a: f128) callconv(.c) f128 {
3737 return generic_fabs(a);
3838}
3939
40pub fn fabsl(x: c_longdouble) callconv(.C) c_longdouble {
40pub fn fabsl(x: c_longdouble) callconv(.c) c_longdouble {
4141 switch (@typeInfo(c_longdouble).float.bits) {
4242 16 => return __fabsh(x),
4343 32 => return fabsf(x),
lib/compiler_rt/fixdfdi.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 }
1313}
1414
15pub fn __fixdfdi(a: f64) callconv(.C) i64 {
15pub fn __fixdfdi(a: f64) callconv(.c) i64 {
1616 return intFromFloat(i64, a);
1717}
1818
19fn __aeabi_d2lz(a: f64) callconv(.AAPCS) i64 {
19fn __aeabi_d2lz(a: f64) callconv(.{ .arm_aapcs = .{} }) i64 {
2020 return intFromFloat(i64, a);
2121}
lib/compiler_rt/fixdfsi.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14pub fn __fixdfsi(a: f64) callconv(.C) i32 {
14pub fn __fixdfsi(a: f64) callconv(.c) i32 {
1515 return intFromFloat(i32, a);
1616}
1717
18fn __aeabi_d2iz(a: f64) callconv(.AAPCS) i32 {
18fn __aeabi_d2iz(a: f64) callconv(.{ .arm_aapcs = .{} }) i32 {
1919 return intFromFloat(i32, a);
2020}
lib/compiler_rt/fixdfti.zig+2-2
......@@ -15,12 +15,12 @@ comptime {
1515 }
1616}
1717
18pub fn __fixdfti(a: f64) callconv(.C) i128 {
18pub fn __fixdfti(a: f64) callconv(.c) i128 {
1919 return intFromFloat(i128, a);
2020}
2121
2222const 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 {
2525 return @bitCast(intFromFloat(i128, a));
2626}
lib/compiler_rt/fixhfdi.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__fixhfdi, .{ .name = "__fixhfdi", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __fixhfdi(a: f16) callconv(.C) i64 {
10fn __fixhfdi(a: f16) callconv(.c) i64 {
1111 return intFromFloat(i64, a);
1212}
lib/compiler_rt/fixhfsi.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__fixhfsi, .{ .name = "__fixhfsi", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __fixhfsi(a: f16) callconv(.C) i32 {
10fn __fixhfsi(a: f16) callconv(.c) i32 {
1111 return intFromFloat(i32, a);
1212}
lib/compiler_rt/fixhfti.zig+2-2
......@@ -12,12 +12,12 @@ comptime {
1212 }
1313}
1414
15pub fn __fixhfti(a: f16) callconv(.C) i128 {
15pub fn __fixhfti(a: f16) callconv(.c) i128 {
1616 return intFromFloat(i128, a);
1717}
1818
1919const 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 {
2222 return @bitCast(intFromFloat(i128, a));
2323}
lib/compiler_rt/fixsfdi.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 }
1313}
1414
15pub fn __fixsfdi(a: f32) callconv(.C) i64 {
15pub fn __fixsfdi(a: f32) callconv(.c) i64 {
1616 return intFromFloat(i64, a);
1717}
1818
19fn __aeabi_f2lz(a: f32) callconv(.AAPCS) i64 {
19fn __aeabi_f2lz(a: f32) callconv(.{ .arm_aapcs = .{} }) i64 {
2020 return intFromFloat(i64, a);
2121}
lib/compiler_rt/fixsfsi.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14pub fn __fixsfsi(a: f32) callconv(.C) i32 {
14pub fn __fixsfsi(a: f32) callconv(.c) i32 {
1515 return intFromFloat(i32, a);
1616}
1717
18fn __aeabi_f2iz(a: f32) callconv(.AAPCS) i32 {
18fn __aeabi_f2iz(a: f32) callconv(.{ .arm_aapcs = .{} }) i32 {
1919 return intFromFloat(i32, a);
2020}
lib/compiler_rt/fixsfti.zig+2-2
......@@ -15,12 +15,12 @@ comptime {
1515 }
1616}
1717
18pub fn __fixsfti(a: f32) callconv(.C) i128 {
18pub fn __fixsfti(a: f32) callconv(.c) i128 {
1919 return intFromFloat(i128, a);
2020}
2121
2222const 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 {
2525 return @bitCast(intFromFloat(i128, a));
2626}
lib/compiler_rt/fixtfdi.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 @export(&__fixtfdi, .{ .name = "__fixtfdi", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __fixtfdi(a: f128) callconv(.C) i64 {
15pub fn __fixtfdi(a: f128) callconv(.c) i64 {
1616 return intFromFloat(i64, a);
1717}
1818
19fn _Qp_qtox(a: *const f128) callconv(.C) i64 {
19fn _Qp_qtox(a: *const f128) callconv(.c) i64 {
2020 return intFromFloat(i64, a.*);
2121}
lib/compiler_rt/fixtfsi.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 @export(&__fixtfsi, .{ .name = "__fixtfsi", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __fixtfsi(a: f128) callconv(.C) i32 {
15pub fn __fixtfsi(a: f128) callconv(.c) i32 {
1616 return intFromFloat(i32, a);
1717}
1818
19fn _Qp_qtoi(a: *const f128) callconv(.C) i32 {
19fn _Qp_qtoi(a: *const f128) callconv(.c) i32 {
2020 return intFromFloat(i32, a.*);
2121}
lib/compiler_rt/fixtfti.zig+2-2
......@@ -14,12 +14,12 @@ comptime {
1414 }
1515}
1616
17pub fn __fixtfti(a: f128) callconv(.C) i128 {
17pub fn __fixtfti(a: f128) callconv(.c) i128 {
1818 return intFromFloat(i128, a);
1919}
2020
2121const 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 {
2424 return @bitCast(intFromFloat(i128, a));
2525}
lib/compiler_rt/fixunsdfdi.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 }
1313}
1414
15pub fn __fixunsdfdi(a: f64) callconv(.C) u64 {
15pub fn __fixunsdfdi(a: f64) callconv(.c) u64 {
1616 return intFromFloat(u64, a);
1717}
1818
19fn __aeabi_d2ulz(a: f64) callconv(.AAPCS) u64 {
19fn __aeabi_d2ulz(a: f64) callconv(.{ .arm_aapcs = .{} }) u64 {
2020 return intFromFloat(u64, a);
2121}
lib/compiler_rt/fixunsdfsi.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14pub fn __fixunsdfsi(a: f64) callconv(.C) u32 {
14pub fn __fixunsdfsi(a: f64) callconv(.c) u32 {
1515 return intFromFloat(u32, a);
1616}
1717
18fn __aeabi_d2uiz(a: f64) callconv(.AAPCS) u32 {
18fn __aeabi_d2uiz(a: f64) callconv(.{ .arm_aapcs = .{} }) u32 {
1919 return intFromFloat(u32, a);
2020}
lib/compiler_rt/fixunsdfti.zig+2-2
......@@ -15,12 +15,12 @@ comptime {
1515 }
1616}
1717
18pub fn __fixunsdfti(a: f64) callconv(.C) u128 {
18pub fn __fixunsdfti(a: f64) callconv(.c) u128 {
1919 return intFromFloat(u128, a);
2020}
2121
2222const 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 {
2525 return @bitCast(intFromFloat(u128, a));
2626}
lib/compiler_rt/fixunshfdi.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__fixunshfdi, .{ .name = "__fixunshfdi", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __fixunshfdi(a: f16) callconv(.C) u64 {
10fn __fixunshfdi(a: f16) callconv(.c) u64 {
1111 return intFromFloat(u64, a);
1212}
lib/compiler_rt/fixunshfsi.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__fixunshfsi, .{ .name = "__fixunshfsi", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __fixunshfsi(a: f16) callconv(.C) u32 {
10fn __fixunshfsi(a: f16) callconv(.c) u32 {
1111 return intFromFloat(u32, a);
1212}
lib/compiler_rt/fixunshfti.zig+2-2
......@@ -12,12 +12,12 @@ comptime {
1212 }
1313}
1414
15pub fn __fixunshfti(a: f16) callconv(.C) u128 {
15pub fn __fixunshfti(a: f16) callconv(.c) u128 {
1616 return intFromFloat(u128, a);
1717}
1818
1919const 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 {
2222 return @bitCast(intFromFloat(u128, a));
2323}
lib/compiler_rt/fixunssfdi.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 }
1313}
1414
15pub fn __fixunssfdi(a: f32) callconv(.C) u64 {
15pub fn __fixunssfdi(a: f32) callconv(.c) u64 {
1616 return intFromFloat(u64, a);
1717}
1818
19fn __aeabi_f2ulz(a: f32) callconv(.AAPCS) u64 {
19fn __aeabi_f2ulz(a: f32) callconv(.{ .arm_aapcs = .{} }) u64 {
2020 return intFromFloat(u64, a);
2121}
lib/compiler_rt/fixunssfsi.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14pub fn __fixunssfsi(a: f32) callconv(.C) u32 {
14pub fn __fixunssfsi(a: f32) callconv(.c) u32 {
1515 return intFromFloat(u32, a);
1616}
1717
18fn __aeabi_f2uiz(a: f32) callconv(.AAPCS) u32 {
18fn __aeabi_f2uiz(a: f32) callconv(.{ .arm_aapcs = .{} }) u32 {
1919 return intFromFloat(u32, a);
2020}
lib/compiler_rt/fixunssfti.zig+2-2
......@@ -15,12 +15,12 @@ comptime {
1515 }
1616}
1717
18pub fn __fixunssfti(a: f32) callconv(.C) u128 {
18pub fn __fixunssfti(a: f32) callconv(.c) u128 {
1919 return intFromFloat(u128, a);
2020}
2121
2222const 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 {
2525 return @bitCast(intFromFloat(u128, a));
2626}
lib/compiler_rt/fixunstfdi.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 @export(&__fixunstfdi, .{ .name = "__fixunstfdi", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __fixunstfdi(a: f128) callconv(.C) u64 {
15pub fn __fixunstfdi(a: f128) callconv(.c) u64 {
1616 return intFromFloat(u64, a);
1717}
1818
19fn _Qp_qtoux(a: *const f128) callconv(.C) u64 {
19fn _Qp_qtoux(a: *const f128) callconv(.c) u64 {
2020 return intFromFloat(u64, a.*);
2121}
lib/compiler_rt/fixunstfsi.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 @export(&__fixunstfsi, .{ .name = "__fixunstfsi", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __fixunstfsi(a: f128) callconv(.C) u32 {
15pub fn __fixunstfsi(a: f128) callconv(.c) u32 {
1616 return intFromFloat(u32, a);
1717}
1818
19fn _Qp_qtoui(a: *const f128) callconv(.C) u32 {
19fn _Qp_qtoui(a: *const f128) callconv(.c) u32 {
2020 return intFromFloat(u32, a.*);
2121}
lib/compiler_rt/fixunstfti.zig+2-2
......@@ -14,12 +14,12 @@ comptime {
1414 }
1515}
1616
17pub fn __fixunstfti(a: f128) callconv(.C) u128 {
17pub fn __fixunstfti(a: f128) callconv(.c) u128 {
1818 return intFromFloat(u128, a);
1919}
2020
2121const 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 {
2424 return @bitCast(intFromFloat(u128, a));
2525}
lib/compiler_rt/fixunsxfdi.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__fixunsxfdi, .{ .name = "__fixunsxfdi", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __fixunsxfdi(a: f80) callconv(.C) u64 {
10fn __fixunsxfdi(a: f80) callconv(.c) u64 {
1111 return intFromFloat(u64, a);
1212}
lib/compiler_rt/fixunsxfsi.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__fixunsxfsi, .{ .name = "__fixunsxfsi", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __fixunsxfsi(a: f80) callconv(.C) u32 {
10fn __fixunsxfsi(a: f80) callconv(.c) u32 {
1111 return intFromFloat(u32, a);
1212}
lib/compiler_rt/fixunsxfti.zig+2-2
......@@ -12,12 +12,12 @@ comptime {
1212 }
1313}
1414
15pub fn __fixunsxfti(a: f80) callconv(.C) u128 {
15pub fn __fixunsxfti(a: f80) callconv(.c) u128 {
1616 return intFromFloat(u128, a);
1717}
1818
1919const 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 {
2222 return @bitCast(intFromFloat(u128, a));
2323}
lib/compiler_rt/fixxfdi.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__fixxfdi, .{ .name = "__fixxfdi", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __fixxfdi(a: f80) callconv(.C) i64 {
10fn __fixxfdi(a: f80) callconv(.c) i64 {
1111 return intFromFloat(i64, a);
1212}
lib/compiler_rt/fixxfsi.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__fixxfsi, .{ .name = "__fixxfsi", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __fixxfsi(a: f80) callconv(.C) i32 {
10fn __fixxfsi(a: f80) callconv(.c) i32 {
1111 return intFromFloat(i32, a);
1212}
lib/compiler_rt/fixxfti.zig+2-2
......@@ -12,12 +12,12 @@ comptime {
1212 }
1313}
1414
15pub fn __fixxfti(a: f80) callconv(.C) i128 {
15pub fn __fixxfti(a: f80) callconv(.c) i128 {
1616 return intFromFloat(i128, a);
1717}
1818
1919const 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 {
2222 return @bitCast(intFromFloat(i128, a));
2323}
lib/compiler_rt/floatdidf.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 }
1313}
1414
15pub fn __floatdidf(a: i64) callconv(.C) f64 {
15pub fn __floatdidf(a: i64) callconv(.c) f64 {
1616 return floatFromInt(f64, a);
1717}
1818
19fn __aeabi_l2d(a: i64) callconv(.AAPCS) f64 {
19fn __aeabi_l2d(a: i64) callconv(.{ .arm_aapcs = .{} }) f64 {
2020 return floatFromInt(f64, a);
2121}
lib/compiler_rt/floatdihf.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__floatdihf, .{ .name = "__floatdihf", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __floatdihf(a: i64) callconv(.C) f16 {
10fn __floatdihf(a: i64) callconv(.c) f16 {
1111 return floatFromInt(f16, a);
1212}
lib/compiler_rt/floatdisf.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 }
1313}
1414
15pub fn __floatdisf(a: i64) callconv(.C) f32 {
15pub fn __floatdisf(a: i64) callconv(.c) f32 {
1616 return floatFromInt(f32, a);
1717}
1818
19fn __aeabi_l2f(a: i64) callconv(.AAPCS) f32 {
19fn __aeabi_l2f(a: i64) callconv(.{ .arm_aapcs = .{} }) f32 {
2020 return floatFromInt(f32, a);
2121}
lib/compiler_rt/floatditf.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 @export(&__floatditf, .{ .name = "__floatditf", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __floatditf(a: i64) callconv(.C) f128 {
15pub fn __floatditf(a: i64) callconv(.c) f128 {
1616 return floatFromInt(f128, a);
1717}
1818
19fn _Qp_xtoq(c: *f128, a: i64) callconv(.C) void {
19fn _Qp_xtoq(c: *f128, a: i64) callconv(.c) void {
2020 c.* = floatFromInt(f128, a);
2121}
lib/compiler_rt/floatdixf.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__floatdixf, .{ .name = "__floatdixf", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __floatdixf(a: i64) callconv(.C) f80 {
10fn __floatdixf(a: i64) callconv(.c) f80 {
1111 return floatFromInt(f80, a);
1212}
lib/compiler_rt/floatsidf.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14pub fn __floatsidf(a: i32) callconv(.C) f64 {
14pub fn __floatsidf(a: i32) callconv(.c) f64 {
1515 return floatFromInt(f64, a);
1616}
1717
18fn __aeabi_i2d(a: i32) callconv(.AAPCS) f64 {
18fn __aeabi_i2d(a: i32) callconv(.{ .arm_aapcs = .{} }) f64 {
1919 return floatFromInt(f64, a);
2020}
lib/compiler_rt/floatsihf.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__floatsihf, .{ .name = "__floatsihf", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __floatsihf(a: i32) callconv(.C) f16 {
10fn __floatsihf(a: i32) callconv(.c) f16 {
1111 return floatFromInt(f16, a);
1212}
lib/compiler_rt/floatsisf.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14pub fn __floatsisf(a: i32) callconv(.C) f32 {
14pub fn __floatsisf(a: i32) callconv(.c) f32 {
1515 return floatFromInt(f32, a);
1616}
1717
18fn __aeabi_i2f(a: i32) callconv(.AAPCS) f32 {
18fn __aeabi_i2f(a: i32) callconv(.{ .arm_aapcs = .{} }) f32 {
1919 return floatFromInt(f32, a);
2020}
lib/compiler_rt/floatsitf.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 @export(&__floatsitf, .{ .name = "__floatsitf", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __floatsitf(a: i32) callconv(.C) f128 {
15pub fn __floatsitf(a: i32) callconv(.c) f128 {
1616 return floatFromInt(f128, a);
1717}
1818
19fn _Qp_itoq(c: *f128, a: i32) callconv(.C) void {
19fn _Qp_itoq(c: *f128, a: i32) callconv(.c) void {
2020 c.* = floatFromInt(f128, a);
2121}
lib/compiler_rt/floatsixf.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__floatsixf, .{ .name = "__floatsixf", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __floatsixf(a: i32) callconv(.C) f80 {
10fn __floatsixf(a: i32) callconv(.c) f80 {
1111 return floatFromInt(f80, a);
1212}
lib/compiler_rt/floattidf.zig+2-2
......@@ -15,10 +15,10 @@ comptime {
1515 }
1616}
1717
18pub fn __floattidf(a: i128) callconv(.C) f64 {
18pub fn __floattidf(a: i128) callconv(.c) f64 {
1919 return floatFromInt(f64, a);
2020}
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 {
2323 return floatFromInt(f64, @as(i128, @bitCast(a)));
2424}
lib/compiler_rt/floattihf.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 }
1313}
1414
15pub fn __floattihf(a: i128) callconv(.C) f16 {
15pub fn __floattihf(a: i128) callconv(.c) f16 {
1616 return floatFromInt(f16, a);
1717}
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 {
2020 return floatFromInt(f16, @as(i128, @bitCast(a)));
2121}
lib/compiler_rt/floattisf.zig+2-2
......@@ -15,10 +15,10 @@ comptime {
1515 }
1616}
1717
18pub fn __floattisf(a: i128) callconv(.C) f32 {
18pub fn __floattisf(a: i128) callconv(.c) f32 {
1919 return floatFromInt(f32, a);
2020}
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 {
2323 return floatFromInt(f32, @as(i128, @bitCast(a)));
2424}
lib/compiler_rt/floattitf.zig+2-2
......@@ -14,10 +14,10 @@ comptime {
1414 }
1515}
1616
17pub fn __floattitf(a: i128) callconv(.C) f128 {
17pub fn __floattitf(a: i128) callconv(.c) f128 {
1818 return floatFromInt(f128, a);
1919}
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 {
2222 return floatFromInt(f128, @as(i128, @bitCast(a)));
2323}
lib/compiler_rt/floattixf.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 }
1313}
1414
15pub fn __floattixf(a: i128) callconv(.C) f80 {
15pub fn __floattixf(a: i128) callconv(.c) f80 {
1616 return floatFromInt(f80, a);
1717}
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 {
2020 return floatFromInt(f80, @as(i128, @bitCast(a)));
2121}
lib/compiler_rt/floatundidf.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 }
1313}
1414
15pub fn __floatundidf(a: u64) callconv(.C) f64 {
15pub fn __floatundidf(a: u64) callconv(.c) f64 {
1616 return floatFromInt(f64, a);
1717}
1818
19fn __aeabi_ul2d(a: u64) callconv(.AAPCS) f64 {
19fn __aeabi_ul2d(a: u64) callconv(.{ .arm_aapcs = .{} }) f64 {
2020 return floatFromInt(f64, a);
2121}
lib/compiler_rt/floatundihf.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__floatundihf, .{ .name = "__floatundihf", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __floatundihf(a: u64) callconv(.C) f16 {
10fn __floatundihf(a: u64) callconv(.c) f16 {
1111 return floatFromInt(f16, a);
1212}
lib/compiler_rt/floatundisf.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 }
1313}
1414
15pub fn __floatundisf(a: u64) callconv(.C) f32 {
15pub fn __floatundisf(a: u64) callconv(.c) f32 {
1616 return floatFromInt(f32, a);
1717}
1818
19fn __aeabi_ul2f(a: u64) callconv(.AAPCS) f32 {
19fn __aeabi_ul2f(a: u64) callconv(.{ .arm_aapcs = .{} }) f32 {
2020 return floatFromInt(f32, a);
2121}
lib/compiler_rt/floatunditf.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 @export(&__floatunditf, .{ .name = "__floatunditf", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __floatunditf(a: u64) callconv(.C) f128 {
15pub fn __floatunditf(a: u64) callconv(.c) f128 {
1616 return floatFromInt(f128, a);
1717}
1818
19fn _Qp_uxtoq(c: *f128, a: u64) callconv(.C) void {
19fn _Qp_uxtoq(c: *f128, a: u64) callconv(.c) void {
2020 c.* = floatFromInt(f128, a);
2121}
lib/compiler_rt/floatundixf.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__floatundixf, .{ .name = "__floatundixf", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __floatundixf(a: u64) callconv(.C) f80 {
10fn __floatundixf(a: u64) callconv(.c) f80 {
1111 return floatFromInt(f80, a);
1212}
lib/compiler_rt/floatunsidf.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14pub fn __floatunsidf(a: u32) callconv(.C) f64 {
14pub fn __floatunsidf(a: u32) callconv(.c) f64 {
1515 return floatFromInt(f64, a);
1616}
1717
18fn __aeabi_ui2d(a: u32) callconv(.AAPCS) f64 {
18fn __aeabi_ui2d(a: u32) callconv(.{ .arm_aapcs = .{} }) f64 {
1919 return floatFromInt(f64, a);
2020}
lib/compiler_rt/floatunsihf.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__floatunsihf, .{ .name = "__floatunsihf", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10pub fn __floatunsihf(a: u32) callconv(.C) f16 {
10pub fn __floatunsihf(a: u32) callconv(.c) f16 {
1111 return floatFromInt(f16, a);
1212}
lib/compiler_rt/floatunsisf.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14pub fn __floatunsisf(a: u32) callconv(.C) f32 {
14pub fn __floatunsisf(a: u32) callconv(.c) f32 {
1515 return floatFromInt(f32, a);
1616}
1717
18fn __aeabi_ui2f(a: u32) callconv(.AAPCS) f32 {
18fn __aeabi_ui2f(a: u32) callconv(.{ .arm_aapcs = .{} }) f32 {
1919 return floatFromInt(f32, a);
2020}
lib/compiler_rt/floatunsitf.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 @export(&__floatunsitf, .{ .name = "__floatunsitf", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __floatunsitf(a: u32) callconv(.C) f128 {
15pub fn __floatunsitf(a: u32) callconv(.c) f128 {
1616 return floatFromInt(f128, a);
1717}
1818
19fn _Qp_uitoq(c: *f128, a: u32) callconv(.C) void {
19fn _Qp_uitoq(c: *f128, a: u32) callconv(.c) void {
2020 c.* = floatFromInt(f128, a);
2121}
lib/compiler_rt/floatunsixf.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__floatunsixf, .{ .name = "__floatunsixf", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __floatunsixf(a: u32) callconv(.C) f80 {
10fn __floatunsixf(a: u32) callconv(.c) f80 {
1111 return floatFromInt(f80, a);
1212}
lib/compiler_rt/floatuntidf.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 }
1313}
1414
15pub fn __floatuntidf(a: u128) callconv(.C) f64 {
15pub fn __floatuntidf(a: u128) callconv(.c) f64 {
1616 return floatFromInt(f64, a);
1717}
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 {
2020 return floatFromInt(f64, @as(u128, @bitCast(a)));
2121}
lib/compiler_rt/floatuntihf.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 }
1313}
1414
15pub fn __floatuntihf(a: u128) callconv(.C) f16 {
15pub fn __floatuntihf(a: u128) callconv(.c) f16 {
1616 return floatFromInt(f16, a);
1717}
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 {
2020 return floatFromInt(f16, @as(u128, @bitCast(a)));
2121}
lib/compiler_rt/floatuntisf.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 }
1313}
1414
15pub fn __floatuntisf(a: u128) callconv(.C) f32 {
15pub fn __floatuntisf(a: u128) callconv(.c) f32 {
1616 return floatFromInt(f32, a);
1717}
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 {
2020 return floatFromInt(f32, @as(u128, @bitCast(a)));
2121}
lib/compiler_rt/floatuntitf.zig+2-2
......@@ -14,10 +14,10 @@ comptime {
1414 }
1515}
1616
17pub fn __floatuntitf(a: u128) callconv(.C) f128 {
17pub fn __floatuntitf(a: u128) callconv(.c) f128 {
1818 return floatFromInt(f128, a);
1919}
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 {
2222 return floatFromInt(f128, @as(u128, @bitCast(a)));
2323}
lib/compiler_rt/floatuntixf.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 }
1313}
1414
15pub fn __floatuntixf(a: u128) callconv(.C) f80 {
15pub fn __floatuntixf(a: u128) callconv(.c) f80 {
1616 return floatFromInt(f80, a);
1717}
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 {
2020 return floatFromInt(f80, @as(u128, @bitCast(a)));
2121}
lib/compiler_rt/floor.zig+6-6
......@@ -26,7 +26,7 @@ comptime {
2626 @export(&floorl, .{ .name = "floorl", .linkage = common.linkage, .visibility = common.visibility });
2727}
2828
29pub fn __floorh(x: f16) callconv(.C) f16 {
29pub fn __floorh(x: f16) callconv(.c) f16 {
3030 var u: u16 = @bitCast(x);
3131 const e = @as(i16, @intCast((u >> 10) & 31)) - 15;
3232 var m: u16 = undefined;
......@@ -60,7 +60,7 @@ pub fn __floorh(x: f16) callconv(.C) f16 {
6060 }
6161}
6262
63pub fn floorf(x: f32) callconv(.C) f32 {
63pub fn floorf(x: f32) callconv(.c) f32 {
6464 var u: u32 = @bitCast(x);
6565 const e = @as(i32, @intCast((u >> 23) & 0xFF)) - 0x7F;
6666 var m: u32 = undefined;
......@@ -94,7 +94,7 @@ pub fn floorf(x: f32) callconv(.C) f32 {
9494 }
9595}
9696
97pub fn floor(x: f64) callconv(.C) f64 {
97pub fn floor(x: f64) callconv(.c) f64 {
9898 const f64_toint = 1.0 / math.floatEps(f64);
9999
100100 const u: u64 = @bitCast(x);
......@@ -125,12 +125,12 @@ pub fn floor(x: f64) callconv(.C) f64 {
125125 }
126126}
127127
128pub fn __floorx(x: f80) callconv(.C) f80 {
128pub fn __floorx(x: f80) callconv(.c) f80 {
129129 // TODO: more efficient implementation
130130 return @floatCast(floorq(x));
131131}
132132
133pub fn floorq(x: f128) callconv(.C) f128 {
133pub fn floorq(x: f128) callconv(.c) f128 {
134134 const f128_toint = 1.0 / math.floatEps(f128);
135135
136136 const u: u128 = @bitCast(x);
......@@ -159,7 +159,7 @@ pub fn floorq(x: f128) callconv(.C) f128 {
159159 }
160160}
161161
162pub fn floorl(x: c_longdouble) callconv(.C) c_longdouble {
162pub fn floorl(x: c_longdouble) callconv(.c) c_longdouble {
163163 switch (@typeInfo(c_longdouble).float.bits) {
164164 16 => return __floorh(x),
165165 32 => return floorf(x),
lib/compiler_rt/fma.zig+6-6
......@@ -24,12 +24,12 @@ comptime {
2424 @export(&fmal, .{ .name = "fmal", .linkage = common.linkage, .visibility = common.visibility });
2525}
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 {
2828 // TODO: more efficient implementation
2929 return @floatCast(fmaf(x, y, z));
3030}
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 {
3333 const xy = @as(f64, x) * y;
3434 const xy_z = xy + z;
3535 const u = @as(u64, @bitCast(xy_z));
......@@ -44,7 +44,7 @@ pub fn fmaf(x: f32, y: f32, z: f32) callconv(.C) f32 {
4444}
4545
4646/// 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 {
4848 if (!math.isFinite(x) or !math.isFinite(y)) {
4949 return x * y + z;
5050 }
......@@ -91,7 +91,7 @@ pub fn fma(x: f64, y: f64, z: f64) callconv(.C) f64 {
9191 }
9292}
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 {
9595 // TODO: more efficient implementation
9696 return @floatCast(fmaq(a, b, c));
9797}
......@@ -103,7 +103,7 @@ pub fn __fmax(a: f80, b: f80, c: f80) callconv(.C) f80 {
103103///
104104/// Dekker, T. A Floating-Point Technique for Extending the
105105/// 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 {
107107 if (!math.isFinite(x) or !math.isFinite(y)) {
108108 return x * y + z;
109109 }
......@@ -150,7 +150,7 @@ pub fn fmaq(x: f128, y: f128, z: f128) callconv(.C) f128 {
150150 }
151151}
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 {
154154 switch (@typeInfo(c_longdouble).float.bits) {
155155 16 => return __fmah(x, y, z),
156156 32 => return fmaf(x, y, z),
lib/compiler_rt/fmax.zig+6-6
......@@ -18,27 +18,27 @@ comptime {
1818 @export(&fmaxl, .{ .name = "fmaxl", .linkage = common.linkage, .visibility = common.visibility });
1919}
2020
21pub fn __fmaxh(x: f16, y: f16) callconv(.C) f16 {
21pub fn __fmaxh(x: f16, y: f16) callconv(.c) f16 {
2222 return generic_fmax(f16, x, y);
2323}
2424
25pub fn fmaxf(x: f32, y: f32) callconv(.C) f32 {
25pub fn fmaxf(x: f32, y: f32) callconv(.c) f32 {
2626 return generic_fmax(f32, x, y);
2727}
2828
29pub fn fmax(x: f64, y: f64) callconv(.C) f64 {
29pub fn fmax(x: f64, y: f64) callconv(.c) f64 {
3030 return generic_fmax(f64, x, y);
3131}
3232
33pub fn __fmaxx(x: f80, y: f80) callconv(.C) f80 {
33pub fn __fmaxx(x: f80, y: f80) callconv(.c) f80 {
3434 return generic_fmax(f80, x, y);
3535}
3636
37pub fn fmaxq(x: f128, y: f128) callconv(.C) f128 {
37pub fn fmaxq(x: f128, y: f128) callconv(.c) f128 {
3838 return generic_fmax(f128, x, y);
3939}
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 {
4242 switch (@typeInfo(c_longdouble).float.bits) {
4343 16 => return __fmaxh(x, y),
4444 32 => return fmaxf(x, y),
lib/compiler_rt/fmin.zig+6-6
......@@ -18,27 +18,27 @@ comptime {
1818 @export(&fminl, .{ .name = "fminl", .linkage = common.linkage, .visibility = common.visibility });
1919}
2020
21pub fn __fminh(x: f16, y: f16) callconv(.C) f16 {
21pub fn __fminh(x: f16, y: f16) callconv(.c) f16 {
2222 return generic_fmin(f16, x, y);
2323}
2424
25pub fn fminf(x: f32, y: f32) callconv(.C) f32 {
25pub fn fminf(x: f32, y: f32) callconv(.c) f32 {
2626 return generic_fmin(f32, x, y);
2727}
2828
29pub fn fmin(x: f64, y: f64) callconv(.C) f64 {
29pub fn fmin(x: f64, y: f64) callconv(.c) f64 {
3030 return generic_fmin(f64, x, y);
3131}
3232
33pub fn __fminx(x: f80, y: f80) callconv(.C) f80 {
33pub fn __fminx(x: f80, y: f80) callconv(.c) f80 {
3434 return generic_fmin(f80, x, y);
3535}
3636
37pub fn fminq(x: f128, y: f128) callconv(.C) f128 {
37pub fn fminq(x: f128, y: f128) callconv(.c) f128 {
3838 return generic_fmin(f128, x, y);
3939}
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 {
4242 switch (@typeInfo(c_longdouble).float.bits) {
4343 16 => return __fminh(x, y),
4444 32 => return fminf(x, y),
lib/compiler_rt/fmod.zig+6-6
......@@ -20,22 +20,22 @@ comptime {
2020 @export(&fmodl, .{ .name = "fmodl", .linkage = common.linkage, .visibility = common.visibility });
2121}
2222
23pub fn __fmodh(x: f16, y: f16) callconv(.C) f16 {
23pub fn __fmodh(x: f16, y: f16) callconv(.c) f16 {
2424 // TODO: more efficient implementation
2525 return @floatCast(fmodf(x, y));
2626}
2727
28pub fn fmodf(x: f32, y: f32) callconv(.C) f32 {
28pub fn fmodf(x: f32, y: f32) callconv(.c) f32 {
2929 return generic_fmod(f32, x, y);
3030}
3131
32pub fn fmod(x: f64, y: f64) callconv(.C) f64 {
32pub fn fmod(x: f64, y: f64) callconv(.c) f64 {
3333 return generic_fmod(f64, x, y);
3434}
3535
3636/// fmodx - floating modulo large, returns the remainder of division for f80 types
3737/// 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 {
3939 const T = f80;
4040 const Z = std.meta.Int(.unsigned, @bitSizeOf(T));
4141
......@@ -133,7 +133,7 @@ pub fn __fmodx(a: f80, b: f80) callconv(.C) f80 {
133133
134134/// fmodq - floating modulo large, returns the remainder of division for f128 types
135135/// 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 {
137137 var amod = a;
138138 var bmod = b;
139139 const aPtr_u64: [*]u64 = @ptrCast(&amod);
......@@ -250,7 +250,7 @@ pub fn fmodq(a: f128, b: f128) callconv(.C) f128 {
250250 return amod;
251251}
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 {
254254 switch (@typeInfo(c_longdouble).float.bits) {
255255 16 => return __fmodh(a, b),
256256 32 => return fmodf(a, b),
lib/compiler_rt/gedf2.zig+4-4
......@@ -17,20 +17,20 @@ comptime {
1717
1818/// "These functions return a value greater than or equal to zero if neither
1919/// 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 {
2121 return @intFromEnum(comparef.cmpf2(f64, comparef.GE, a, b));
2222}
2323
2424/// "These functions return a value greater than zero if neither argument is NaN,
2525/// 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 {
2727 return __gedf2(a, b);
2828}
2929
30fn __aeabi_dcmpge(a: f64, b: f64) callconv(.AAPCS) i32 {
30fn __aeabi_dcmpge(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 {
3131 return @intFromBool(comparef.cmpf2(f64, comparef.GE, a, b) != .Less);
3232}
3333
34fn __aeabi_dcmpgt(a: f64, b: f64) callconv(.AAPCS) i32 {
34fn __aeabi_dcmpgt(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 {
3535 return @intFromBool(comparef.cmpf2(f64, comparef.GE, a, b) == .Greater);
3636}
lib/compiler_rt/gehf2.zig+2-2
......@@ -12,12 +12,12 @@ comptime {
1212
1313/// "These functions return a value greater than or equal to zero if neither
1414/// 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 {
1616 return @intFromEnum(comparef.cmpf2(f16, comparef.GE, a, b));
1717}
1818
1919/// "These functions return a value greater than zero if neither argument is NaN,
2020/// 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 {
2222 return __gehf2(a, b);
2323}
lib/compiler_rt/gesf2.zig+4-4
......@@ -17,20 +17,20 @@ comptime {
1717
1818/// "These functions return a value greater than or equal to zero if neither
1919/// 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 {
2121 return @intFromEnum(comparef.cmpf2(f32, comparef.GE, a, b));
2222}
2323
2424/// "These functions return a value greater than zero if neither argument is NaN,
2525/// 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 {
2727 return __gesf2(a, b);
2828}
2929
30fn __aeabi_fcmpge(a: f32, b: f32) callconv(.AAPCS) i32 {
30fn __aeabi_fcmpge(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 {
3131 return @intFromBool(comparef.cmpf2(f32, comparef.GE, a, b) != .Less);
3232}
3333
34fn __aeabi_fcmpgt(a: f32, b: f32) callconv(.AAPCS) i32 {
34fn __aeabi_fcmpgt(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 {
3535 return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) == .Greater);
3636}
lib/compiler_rt/getf2.zig+2-2
......@@ -19,12 +19,12 @@ comptime {
1919
2020/// "These functions return a value greater than or equal to zero if neither
2121/// 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 {
2323 return @intFromEnum(comparef.cmpf2(f128, comparef.GE, a, b));
2424}
2525
2626/// "These functions return a value greater than zero if neither argument is NaN,
2727/// 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 {
2929 return __getf2(a, b);
3030}
lib/compiler_rt/gexf2.zig+2-2
......@@ -8,10 +8,10 @@ comptime {
88 @export(&__gtxf2, .{ .name = "__gtxf2", .linkage = common.linkage, .visibility = common.visibility });
99}
1010
11fn __gexf2(a: f80, b: f80) callconv(.C) i32 {
11fn __gexf2(a: f80, b: f80) callconv(.c) i32 {
1212 return @intFromEnum(comparef.cmp_f80(comparef.GE, a, b));
1313}
1414
15fn __gtxf2(a: f80, b: f80) callconv(.C) i32 {
15fn __gtxf2(a: f80, b: f80) callconv(.c) i32 {
1616 return __gexf2(a, b);
1717}
lib/compiler_rt/int.zig+15-15
......@@ -34,7 +34,7 @@ comptime {
3434 @export(&__udivmodsi4, .{ .name = "__udivmodsi4", .linkage = common.linkage, .visibility = common.visibility });
3535}
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 {
3838 const d = __divti3(a, b);
3939 rem.* = a -% (d * b);
4040 return d;
......@@ -67,7 +67,7 @@ fn test_one_divmodti4(a: i128, b: i128, expected_q: i128, expected_r: i128) !voi
6767 try testing.expect(q == expected_q and r == expected_r);
6868}
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 {
7171 const d = __divdi3(a, b);
7272 rem.* = a -% (d * b);
7373 return d;
......@@ -101,7 +101,7 @@ test "test_divmoddi4" {
101101 }
102102}
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 {
105105 return udivmod(u64, a, b, maybe_rem);
106106}
107107
......@@ -109,7 +109,7 @@ test "test_udivmoddi4" {
109109 _ = @import("udivmoddi4_test.zig");
110110}
111111
112pub fn __divdi3(a: i64, b: i64) callconv(.C) i64 {
112pub fn __divdi3(a: i64, b: i64) callconv(.c) i64 {
113113 // Set aside the sign of the quotient.
114114 const sign: u64 = @bitCast((a ^ b) >> 63);
115115 // 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 {
146146 try testing.expect(q == expected_q);
147147}
148148
149pub fn __moddi3(a: i64, b: i64) callconv(.C) i64 {
149pub fn __moddi3(a: i64, b: i64) callconv(.c) i64 {
150150 // Take absolute value of a and b via abs(x) = (x^(x >> 63)) - (x >> 63).
151151 const abs_a = (a ^ (a >> 63)) -% (a >> 63);
152152 const abs_b = (b ^ (b >> 63)) -% (b >> 63);
......@@ -184,11 +184,11 @@ fn test_one_moddi3(a: i64, b: i64, expected_r: i64) !void {
184184 try testing.expect(r == expected_r);
185185}
186186
187pub fn __udivdi3(a: u64, b: u64) callconv(.C) u64 {
187pub fn __udivdi3(a: u64, b: u64) callconv(.c) u64 {
188188 return __udivmoddi4(a, b, null);
189189}
190190
191pub fn __umoddi3(a: u64, b: u64) callconv(.C) u64 {
191pub fn __umoddi3(a: u64, b: u64) callconv(.c) u64 {
192192 var r: u64 = undefined;
193193 _ = __udivmoddi4(a, b, &r);
194194 return r;
......@@ -207,7 +207,7 @@ fn test_one_umoddi3(a: u64, b: u64, expected_r: u64) !void {
207207 try testing.expect(r == expected_r);
208208}
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 {
211211 const d = __divsi3(a, b);
212212 rem.* = a -% (d * b);
213213 return d;
......@@ -241,17 +241,17 @@ test "test_divmodsi4" {
241241 }
242242}
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 {
245245 const d = __udivsi3(a, b);
246246 rem.* = @bitCast(@as(i32, @bitCast(a)) -% (@as(i32, @bitCast(d)) * @as(i32, @bitCast(b))));
247247 return d;
248248}
249249
250pub fn __divsi3(n: i32, d: i32) callconv(.C) i32 {
250pub fn __divsi3(n: i32, d: i32) callconv(.c) i32 {
251251 return div_i32(n, d);
252252}
253253
254fn __aeabi_idiv(n: i32, d: i32) callconv(.AAPCS) i32 {
254fn __aeabi_idiv(n: i32, d: i32) callconv(.{ .arm_aapcs = .{} }) i32 {
255255 return div_i32(n, d);
256256}
257257
......@@ -292,11 +292,11 @@ fn test_one_divsi3(a: i32, b: i32, expected_q: i32) !void {
292292 try testing.expect(q == expected_q);
293293}
294294
295pub fn __udivsi3(n: u32, d: u32) callconv(.C) u32 {
295pub fn __udivsi3(n: u32, d: u32) callconv(.c) u32 {
296296 return div_u32(n, d);
297297}
298298
299fn __aeabi_uidiv(n: u32, d: u32) callconv(.AAPCS) u32 {
299fn __aeabi_uidiv(n: u32, d: u32) callconv(.{ .arm_aapcs = .{} }) u32 {
300300 return div_u32(n, d);
301301}
302302
......@@ -485,7 +485,7 @@ fn test_one_udivsi3(a: u32, b: u32, expected_q: u32) !void {
485485 try testing.expect(q == expected_q);
486486}
487487
488pub fn __modsi3(n: i32, d: i32) callconv(.C) i32 {
488pub fn __modsi3(n: i32, d: i32) callconv(.c) i32 {
489489 return n -% __divsi3(n, d) * d;
490490}
491491
......@@ -514,7 +514,7 @@ fn test_one_modsi3(a: i32, b: i32, expected_r: i32) !void {
514514 try testing.expect(r == expected_r);
515515}
516516
517pub fn __umodsi3(n: u32, d: u32) callconv(.C) u32 {
517pub fn __umodsi3(n: u32, d: u32) callconv(.c) u32 {
518518 return n -% __udivsi3(n, d) * d;
519519}
520520
lib/compiler_rt/log.zig+6-6
......@@ -25,12 +25,12 @@ comptime {
2525 @export(&logl, .{ .name = "logl", .linkage = common.linkage, .visibility = common.visibility });
2626}
2727
28pub fn __logh(a: f16) callconv(.C) f16 {
28pub fn __logh(a: f16) callconv(.c) f16 {
2929 // TODO: more efficient implementation
3030 return @floatCast(logf(a));
3131}
3232
33pub fn logf(x_: f32) callconv(.C) f32 {
33pub fn logf(x_: f32) callconv(.c) f32 {
3434 const ln2_hi: f32 = 6.9313812256e-01;
3535 const ln2_lo: f32 = 9.0580006145e-06;
3636 const Lg1: f32 = 0xaaaaaa.0p-24;
......@@ -82,7 +82,7 @@ pub fn logf(x_: f32) callconv(.C) f32 {
8282 return s * (hfsq + R) + dk * ln2_lo - hfsq + f + dk * ln2_hi;
8383}
8484
85pub fn log(x_: f64) callconv(.C) f64 {
85pub fn log(x_: f64) callconv(.c) f64 {
8686 const ln2_hi: f64 = 6.93147180369123816490e-01;
8787 const ln2_lo: f64 = 1.90821492927058770002e-10;
8888 const Lg1: f64 = 6.666666666666735130e-01;
......@@ -138,17 +138,17 @@ pub fn log(x_: f64) callconv(.C) f64 {
138138 return s * (hfsq + R) + dk * ln2_lo - hfsq + f + dk * ln2_hi;
139139}
140140
141pub fn __logx(a: f80) callconv(.C) f80 {
141pub fn __logx(a: f80) callconv(.c) f80 {
142142 // TODO: more efficient implementation
143143 return @floatCast(logq(a));
144144}
145145
146pub fn logq(a: f128) callconv(.C) f128 {
146pub fn logq(a: f128) callconv(.c) f128 {
147147 // TODO: more correct implementation
148148 return log(@floatCast(a));
149149}
150150
151pub fn logl(x: c_longdouble) callconv(.C) c_longdouble {
151pub fn logl(x: c_longdouble) callconv(.c) c_longdouble {
152152 switch (@typeInfo(c_longdouble).float.bits) {
153153 16 => return __logh(x),
154154 32 => return logf(x),
lib/compiler_rt/log10.zig+6-6
......@@ -26,12 +26,12 @@ comptime {
2626 @export(&log10l, .{ .name = "log10l", .linkage = common.linkage, .visibility = common.visibility });
2727}
2828
29pub fn __log10h(a: f16) callconv(.C) f16 {
29pub fn __log10h(a: f16) callconv(.c) f16 {
3030 // TODO: more efficient implementation
3131 return @floatCast(log10f(a));
3232}
3333
34pub fn log10f(x_: f32) callconv(.C) f32 {
34pub fn log10f(x_: f32) callconv(.c) f32 {
3535 const ivln10hi: f32 = 4.3432617188e-01;
3636 const ivln10lo: f32 = -3.1689971365e-05;
3737 const log10_2hi: f32 = 3.0102920532e-01;
......@@ -91,7 +91,7 @@ pub fn log10f(x_: f32) callconv(.C) f32 {
9191 return dk * log10_2lo + (lo + hi) * ivln10lo + lo * ivln10hi + hi * ivln10hi + dk * log10_2hi;
9292}
9393
94pub fn log10(x_: f64) callconv(.C) f64 {
94pub fn log10(x_: f64) callconv(.c) f64 {
9595 const ivln10hi: f64 = 4.34294481878168880939e-01;
9696 const ivln10lo: f64 = 2.50829467116452752298e-11;
9797 const log10_2hi: f64 = 3.01029995663611771306e-01;
......@@ -166,17 +166,17 @@ pub fn log10(x_: f64) callconv(.C) f64 {
166166 return val_lo + val_hi;
167167}
168168
169pub fn __log10x(a: f80) callconv(.C) f80 {
169pub fn __log10x(a: f80) callconv(.c) f80 {
170170 // TODO: more efficient implementation
171171 return @floatCast(log10q(a));
172172}
173173
174pub fn log10q(a: f128) callconv(.C) f128 {
174pub fn log10q(a: f128) callconv(.c) f128 {
175175 // TODO: more correct implementation
176176 return log10(@floatCast(a));
177177}
178178
179pub fn log10l(x: c_longdouble) callconv(.C) c_longdouble {
179pub fn log10l(x: c_longdouble) callconv(.c) c_longdouble {
180180 switch (@typeInfo(c_longdouble).float.bits) {
181181 16 => return __log10h(x),
182182 32 => return log10f(x),
lib/compiler_rt/log2.zig+6-6
......@@ -26,12 +26,12 @@ comptime {
2626 @export(&log2l, .{ .name = "log2l", .linkage = common.linkage, .visibility = common.visibility });
2727}
2828
29pub fn __log2h(a: f16) callconv(.C) f16 {
29pub fn __log2h(a: f16) callconv(.c) f16 {
3030 // TODO: more efficient implementation
3131 return @floatCast(log2f(a));
3232}
3333
34pub fn log2f(x_: f32) callconv(.C) f32 {
34pub fn log2f(x_: f32) callconv(.c) f32 {
3535 const ivln2hi: f32 = 1.4428710938e+00;
3636 const ivln2lo: f32 = -1.7605285393e-04;
3737 const Lg1: f32 = 0xaaaaaa.0p-24;
......@@ -87,7 +87,7 @@ pub fn log2f(x_: f32) callconv(.C) f32 {
8787 return (lo + hi) * ivln2lo + lo * ivln2hi + hi * ivln2hi + @as(f32, @floatFromInt(k));
8888}
8989
90pub fn log2(x_: f64) callconv(.C) f64 {
90pub fn log2(x_: f64) callconv(.c) f64 {
9191 const ivln2hi: f64 = 1.44269504072144627571e+00;
9292 const ivln2lo: f64 = 1.67517131648865118353e-10;
9393 const Lg1: f64 = 6.666666666666735130e-01;
......@@ -158,17 +158,17 @@ pub fn log2(x_: f64) callconv(.C) f64 {
158158 return val_lo + val_hi;
159159}
160160
161pub fn __log2x(a: f80) callconv(.C) f80 {
161pub fn __log2x(a: f80) callconv(.c) f80 {
162162 // TODO: more efficient implementation
163163 return @floatCast(log2q(a));
164164}
165165
166pub fn log2q(a: f128) callconv(.C) f128 {
166pub fn log2q(a: f128) callconv(.c) f128 {
167167 // TODO: more correct implementation
168168 return log2(@floatCast(a));
169169}
170170
171pub fn log2l(x: c_longdouble) callconv(.C) c_longdouble {
171pub fn log2l(x: c_longdouble) callconv(.c) c_longdouble {
172172 switch (@typeInfo(c_longdouble).float.bits) {
173173 16 => return __log2h(x),
174174 32 => return log2f(x),
lib/compiler_rt/memcmp.zig+1-1
......@@ -5,7 +5,7 @@ comptime {
55 @export(&memcmp, .{ .name = "memcmp", .linkage = common.linkage, .visibility = common.visibility });
66}
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 {
99 var i: usize = 0;
1010 while (i < n) : (i += 1) {
1111 const compared = @as(c_int, vl[i]) -% @as(c_int, vr[i]);
lib/compiler_rt/memcpy.zig+2-2
......@@ -24,7 +24,7 @@ comptime {
2424 assert(std.math.isPowerOfTwo(@sizeOf(Element)));
2525}
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 {
2828 @setRuntimeSafety(false);
2929
3030 for (0..len) |i| {
......@@ -34,7 +34,7 @@ fn memcpySmall(noalias dest: ?[*]u8, noalias src: ?[*]const u8, len: usize) call
3434 return dest;
3535}
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 {
3838 @setRuntimeSafety(false);
3939
4040 const small_limit = 2 * @sizeOf(Element);
lib/compiler_rt/memmove.zig+2-2
......@@ -21,7 +21,7 @@ comptime {
2121 }
2222}
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 {
2525 const dest = opt_dest.?;
2626 const src = opt_src.?;
2727
......@@ -38,7 +38,7 @@ fn memmoveSmall(opt_dest: ?[*]u8, opt_src: ?[*]const u8, len: usize) callconv(.C
3838 return dest;
3939}
4040
41fn memmoveFast(dest: ?[*]u8, src: ?[*]u8, len: usize) callconv(.C) ?[*]u8 {
41fn memmoveFast(dest: ?[*]u8, src: ?[*]u8, len: usize) callconv(.c) ?[*]u8 {
4242 @setRuntimeSafety(builtin.is_test);
4343 const small_limit = @max(2 * @sizeOf(Element), @sizeOf(Element));
4444
lib/compiler_rt/memset.zig+2-2
......@@ -9,7 +9,7 @@ comptime {
99 }
1010}
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 {
1313 @setRuntimeSafety(false);
1414
1515 if (len != 0) {
......@@ -26,7 +26,7 @@ pub fn memset(dest: ?[*]u8, c: u8, len: usize) callconv(.C) ?[*]u8 {
2626 return dest;
2727}
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 {
3030 if (dest_n < n)
3131 @panic("buffer overflow");
3232 return memset(dest, c, n);
lib/compiler_rt/modti3.zig+2-2
......@@ -17,13 +17,13 @@ comptime {
1717 }
1818}
1919
20pub fn __modti3(a: i128, b: i128) callconv(.C) i128 {
20pub fn __modti3(a: i128, b: i128) callconv(.c) i128 {
2121 return mod(a, b);
2222}
2323
2424const 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 {
2727 return @bitCast(mod(@as(i128, @bitCast(a)), @as(i128, @bitCast(b))));
2828}
2929
lib/compiler_rt/mulXi3.zig+5-5
......@@ -20,7 +20,7 @@ comptime {
2020 }
2121}
2222
23pub fn __mulsi3(a: i32, b: i32) callconv(.C) i32 {
23pub fn __mulsi3(a: i32, b: i32) callconv(.c) i32 {
2424 var ua: u32 = @bitCast(a);
2525 var ub: u32 = @bitCast(b);
2626 var r: u32 = 0;
......@@ -34,11 +34,11 @@ pub fn __mulsi3(a: i32, b: i32) callconv(.C) i32 {
3434 return @bitCast(r);
3535}
3636
37pub fn __muldi3(a: i64, b: i64) callconv(.C) i64 {
37pub fn __muldi3(a: i64, b: i64) callconv(.c) i64 {
3838 return mulX(i64, a, b);
3939}
4040
41fn __aeabi_lmul(a: i64, b: i64) callconv(.AAPCS) i64 {
41fn __aeabi_lmul(a: i64, b: i64) callconv(.{ .arm_aapcs = .{} }) i64 {
4242 return mulX(i64, a, b);
4343}
4444
......@@ -86,13 +86,13 @@ fn muldXi(comptime T: type, a: T, b: T) DoubleInt(T) {
8686 return r.all;
8787}
8888
89pub fn __multi3(a: i128, b: i128) callconv(.C) i128 {
89pub fn __multi3(a: i128, b: i128) callconv(.c) i128 {
9090 return mulX(i128, a, b);
9191}
9292
9393const 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 {
9696 return @bitCast(mulX(i128, @as(i128, @bitCast(a)), @as(i128, @bitCast(b))));
9797}
9898
lib/compiler_rt/mulc3_test.zig+1-1
......@@ -17,7 +17,7 @@ test "mulc3" {
1717 try testMul(f128, __multc3);
1818}
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 {
2121 {
2222 const a: T = 1.0;
2323 const b: T = 0.0;
lib/compiler_rt/muldc3.zig+1-1
......@@ -9,6 +9,6 @@ comptime {
99 }
1010}
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) {
1313 return mulc3.mulc3(f64, a, b, c, d);
1414}
lib/compiler_rt/muldf3.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14pub fn __muldf3(a: f64, b: f64) callconv(.C) f64 {
14pub fn __muldf3(a: f64, b: f64) callconv(.c) f64 {
1515 return mulf3(f64, a, b);
1616}
1717
18fn __aeabi_dmul(a: f64, b: f64) callconv(.AAPCS) f64 {
18fn __aeabi_dmul(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 {
1919 return mulf3(f64, a, b);
2020}
lib/compiler_rt/mulhc3.zig+1-1
......@@ -9,6 +9,6 @@ comptime {
99 }
1010}
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) {
1313 return mulc3.mulc3(f16, a, b, c, d);
1414}
lib/compiler_rt/mulhf3.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__mulhf3, .{ .name = "__mulhf3", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10pub fn __mulhf3(a: f16, b: f16) callconv(.C) f16 {
10pub fn __mulhf3(a: f16, b: f16) callconv(.c) f16 {
1111 return mulf3(f16, a, b);
1212}
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)
4848 return @as(ST, @truncate(res));
4949}
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 {
5252 if (2 * @bitSizeOf(i32) <= @bitSizeOf(usize)) {
5353 return muloXi4_genericFast(i32, a, b, overflow);
5454 } else {
......@@ -56,7 +56,7 @@ pub fn __mulosi4(a: i32, b: i32, overflow: *c_int) callconv(.C) i32 {
5656 }
5757}
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 {
6060 if (2 * @bitSizeOf(i64) <= @bitSizeOf(usize)) {
6161 return muloXi4_genericFast(i64, a, b, overflow);
6262 } else {
......@@ -64,7 +64,7 @@ pub fn __mulodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 {
6464 }
6565}
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 {
6868 if (2 * @bitSizeOf(i128) <= @bitSizeOf(usize)) {
6969 return muloXi4_genericFast(i128, a, b, overflow);
7070 } else {
lib/compiler_rt/mulsc3.zig+1-1
......@@ -9,6 +9,6 @@ comptime {
99 }
1010}
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) {
1313 return mulc3.mulc3(f32, a, b, c, d);
1414}
lib/compiler_rt/mulsf3.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14pub fn __mulsf3(a: f32, b: f32) callconv(.C) f32 {
14pub fn __mulsf3(a: f32, b: f32) callconv(.c) f32 {
1515 return mulf3(f32, a, b);
1616}
1717
18fn __aeabi_fmul(a: f32, b: f32) callconv(.AAPCS) f32 {
18fn __aeabi_fmul(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 {
1919 return mulf3(f32, a, b);
2020}
lib/compiler_rt/multc3.zig+1-1
......@@ -11,6 +11,6 @@ comptime {
1111 }
1212}
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) {
1515 return mulc3.mulc3(f128, a, b, c, d);
1616}
lib/compiler_rt/multf3.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 @export(&__multf3, .{ .name = "__multf3", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __multf3(a: f128, b: f128) callconv(.C) f128 {
15pub fn __multf3(a: f128, b: f128) callconv(.c) f128 {
1616 return mulf3(f128, a, b);
1717}
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 {
2020 c.* = mulf3(f128, a.*, b.*);
2121}
lib/compiler_rt/mulxc3.zig+1-1
......@@ -9,6 +9,6 @@ comptime {
99 }
1010}
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) {
1313 return mulc3.mulc3(f80, a, b, c, d);
1414}
lib/compiler_rt/mulxf3.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__mulxf3, .{ .name = "__mulxf3", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10pub fn __mulxf3(a: f80, b: f80) callconv(.C) f80 {
10pub fn __mulxf3(a: f80, b: f80) callconv(.c) f80 {
1111 return mulf3(f80, a, b);
1212}
lib/compiler_rt/negXi2.zig+3-3
......@@ -18,15 +18,15 @@ comptime {
1818 @export(&__negti2, .{ .name = "__negti2", .linkage = common.linkage, .visibility = common.visibility });
1919}
2020
21pub fn __negsi2(a: i32) callconv(.C) i32 {
21pub fn __negsi2(a: i32) callconv(.c) i32 {
2222 return negXi2(i32, a);
2323}
2424
25pub fn __negdi2(a: i64) callconv(.C) i64 {
25pub fn __negdi2(a: i64) callconv(.c) i64 {
2626 return negXi2(i64, a);
2727}
2828
29pub fn __negti2(a: i128) callconv(.C) i128 {
29pub fn __negti2(a: i128) callconv(.c) i128 {
3030 return negXi2(i128, a);
3131}
3232
lib/compiler_rt/negdf2.zig+2-2
......@@ -10,10 +10,10 @@ comptime {
1010 }
1111}
1212
13fn __negdf2(a: f64) callconv(.C) f64 {
13fn __negdf2(a: f64) callconv(.c) f64 {
1414 return common.fneg(a);
1515}
1616
17fn __aeabi_dneg(a: f64) callconv(.AAPCS) f64 {
17fn __aeabi_dneg(a: f64) callconv(.{ .arm_aapcs = .{} }) f64 {
1818 return common.fneg(a);
1919}
lib/compiler_rt/neghf2.zig+1-1
......@@ -6,6 +6,6 @@ comptime {
66 @export(&__neghf2, .{ .name = "__neghf2", .linkage = common.linkage, .visibility = common.visibility });
77}
88
9fn __neghf2(a: f16) callconv(.C) f16 {
9fn __neghf2(a: f16) callconv(.c) f16 {
1010 return common.fneg(a);
1111}
lib/compiler_rt/negsf2.zig+2-2
......@@ -10,10 +10,10 @@ comptime {
1010 }
1111}
1212
13fn __negsf2(a: f32) callconv(.C) f32 {
13fn __negsf2(a: f32) callconv(.c) f32 {
1414 return common.fneg(a);
1515}
1616
17fn __aeabi_fneg(a: f32) callconv(.AAPCS) f32 {
17fn __aeabi_fneg(a: f32) callconv(.{ .arm_aapcs = .{} }) f32 {
1818 return common.fneg(a);
1919}
lib/compiler_rt/negtf2.zig+1-1
......@@ -8,6 +8,6 @@ comptime {
88 @export(&__negtf2, .{ .name = "__negtf2", .linkage = common.linkage, .visibility = common.visibility });
99}
1010
11fn __negtf2(a: f128) callconv(.C) f128 {
11fn __negtf2(a: f128) callconv(.c) f128 {
1212 return common.fneg(a);
1313}
lib/compiler_rt/negv.zig+3-3
......@@ -13,15 +13,15 @@ comptime {
1313 @export(&__negvti2, .{ .name = "__negvti2", .linkage = common.linkage, .visibility = common.visibility });
1414}
1515
16pub fn __negvsi2(a: i32) callconv(.C) i32 {
16pub fn __negvsi2(a: i32) callconv(.c) i32 {
1717 return negvXi(i32, a);
1818}
1919
20pub fn __negvdi2(a: i64) callconv(.C) i64 {
20pub fn __negvdi2(a: i64) callconv(.c) i64 {
2121 return negvXi(i64, a);
2222}
2323
24pub fn __negvti2(a: i128) callconv(.C) i128 {
24pub fn __negvti2(a: i128) callconv(.c) i128 {
2525 return negvXi(i128, a);
2626}
2727
lib/compiler_rt/negxf2.zig+1-1
......@@ -6,6 +6,6 @@ comptime {
66 @export(&__negxf2, .{ .name = "__negxf2", .linkage = common.linkage, .visibility = common.visibility });
77}
88
9fn __negxf2(a: f80) callconv(.C) f80 {
9fn __negxf2(a: f80) callconv(.c) f80 {
1010 return common.fneg(a);
1111}
lib/compiler_rt/os_version_check.zig+1-1
......@@ -34,7 +34,7 @@ const __isPlatformVersionAtLeast = if (have_availability_version_check) struct {
3434 }
3535
3636 // 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 {
3838 const build_version = dyld_build_version_t{
3939 .platform = platform,
4040 .version = constructVersion(major, minor, subminor),
lib/compiler_rt/parity.zig+3-3
......@@ -13,15 +13,15 @@ comptime {
1313 @export(&__parityti2, .{ .name = "__parityti2", .linkage = common.linkage, .visibility = common.visibility });
1414}
1515
16pub fn __paritysi2(a: i32) callconv(.C) i32 {
16pub fn __paritysi2(a: i32) callconv(.c) i32 {
1717 return parityXi2(i32, a);
1818}
1919
20pub fn __paritydi2(a: i64) callconv(.C) i32 {
20pub fn __paritydi2(a: i64) callconv(.c) i32 {
2121 return parityXi2(i64, a);
2222}
2323
24pub fn __parityti2(a: i128) callconv(.C) i32 {
24pub fn __parityti2(a: i128) callconv(.c) i32 {
2525 return parityXi2(i128, a);
2626}
2727
lib/compiler_rt/popcount.zig+3-3
......@@ -18,15 +18,15 @@ comptime {
1818 @export(&__popcountti2, .{ .name = "__popcountti2", .linkage = common.linkage, .visibility = common.visibility });
1919}
2020
21pub fn __popcountsi2(a: i32) callconv(.C) i32 {
21pub fn __popcountsi2(a: i32) callconv(.c) i32 {
2222 return popcountXi2(i32, a);
2323}
2424
25pub fn __popcountdi2(a: i64) callconv(.C) i32 {
25pub fn __popcountdi2(a: i64) callconv(.c) i32 {
2626 return popcountXi2(i64, a);
2727}
2828
29pub fn __popcountti2(a: i128) callconv(.C) i32 {
29pub fn __popcountti2(a: i128) callconv(.c) i32 {
3030 return popcountXi2(i128, a);
3131}
3232
lib/compiler_rt/powiXf2.zig+5-5
......@@ -35,23 +35,23 @@ inline fn powiXf2(comptime FT: type, a: FT, b: i32) FT {
3535 return if (is_recip) 1 / r else r;
3636}
3737
38pub fn __powihf2(a: f16, b: i32) callconv(.C) f16 {
38pub fn __powihf2(a: f16, b: i32) callconv(.c) f16 {
3939 return powiXf2(f16, a, b);
4040}
4141
42pub fn __powisf2(a: f32, b: i32) callconv(.C) f32 {
42pub fn __powisf2(a: f32, b: i32) callconv(.c) f32 {
4343 return powiXf2(f32, a, b);
4444}
4545
46pub fn __powidf2(a: f64, b: i32) callconv(.C) f64 {
46pub fn __powidf2(a: f64, b: i32) callconv(.c) f64 {
4747 return powiXf2(f64, a, b);
4848}
4949
50pub fn __powitf2(a: f128, b: i32) callconv(.C) f128 {
50pub fn __powitf2(a: f128, b: i32) callconv(.c) f128 {
5151 return powiXf2(f128, a, b);
5252}
5353
54pub fn __powixf2(a: f80, b: i32) callconv(.C) f80 {
54pub fn __powixf2(a: f80, b: i32) callconv(.c) f80 {
5555 return powiXf2(f80, a, b);
5656}
5757
lib/compiler_rt/round.zig+6-6
......@@ -26,12 +26,12 @@ comptime {
2626 @export(&roundl, .{ .name = "roundl", .linkage = common.linkage, .visibility = common.visibility });
2727}
2828
29pub fn __roundh(x: f16) callconv(.C) f16 {
29pub fn __roundh(x: f16) callconv(.c) f16 {
3030 // TODO: more efficient implementation
3131 return @floatCast(roundf(x));
3232}
3333
34pub fn roundf(x_: f32) callconv(.C) f32 {
34pub fn roundf(x_: f32) callconv(.c) f32 {
3535 const f32_toint = 1.0 / math.floatEps(f32);
3636
3737 var x = x_;
......@@ -66,7 +66,7 @@ pub fn roundf(x_: f32) callconv(.C) f32 {
6666 }
6767}
6868
69pub fn round(x_: f64) callconv(.C) f64 {
69pub fn round(x_: f64) callconv(.c) f64 {
7070 const f64_toint = 1.0 / math.floatEps(f64);
7171
7272 var x = x_;
......@@ -101,12 +101,12 @@ pub fn round(x_: f64) callconv(.C) f64 {
101101 }
102102}
103103
104pub fn __roundx(x: f80) callconv(.C) f80 {
104pub fn __roundx(x: f80) callconv(.c) f80 {
105105 // TODO: more efficient implementation
106106 return @floatCast(roundq(x));
107107}
108108
109pub fn roundq(x_: f128) callconv(.C) f128 {
109pub fn roundq(x_: f128) callconv(.c) f128 {
110110 const f128_toint = 1.0 / math.floatEps(f128);
111111
112112 var x = x_;
......@@ -141,7 +141,7 @@ pub fn roundq(x_: f128) callconv(.C) f128 {
141141 }
142142}
143143
144pub fn roundl(x: c_longdouble) callconv(.C) c_longdouble {
144pub fn roundl(x: c_longdouble) callconv(.c) c_longdouble {
145145 switch (@typeInfo(c_longdouble).float.bits) {
146146 16 => return __roundh(x),
147147 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 {
9393 return output.all;
9494}
9595
96pub fn __ashlsi3(a: i32, b: i32) callconv(.C) i32 {
96pub fn __ashlsi3(a: i32, b: i32) callconv(.c) i32 {
9797 return ashlXi3(i32, a, b);
9898}
9999
100pub fn __ashrsi3(a: i32, b: i32) callconv(.C) i32 {
100pub fn __ashrsi3(a: i32, b: i32) callconv(.c) i32 {
101101 return ashrXi3(i32, a, b);
102102}
103103
104pub fn __lshrsi3(a: i32, b: i32) callconv(.C) i32 {
104pub fn __lshrsi3(a: i32, b: i32) callconv(.c) i32 {
105105 return lshrXi3(i32, a, b);
106106}
107107
108pub fn __ashldi3(a: i64, b: i32) callconv(.C) i64 {
108pub fn __ashldi3(a: i64, b: i32) callconv(.c) i64 {
109109 return ashlXi3(i64, a, b);
110110}
111fn __aeabi_llsl(a: i64, b: i32) callconv(.AAPCS) i64 {
111fn __aeabi_llsl(a: i64, b: i32) callconv(.{ .arm_aapcs = .{} }) i64 {
112112 return ashlXi3(i64, a, b);
113113}
114114
115pub fn __ashlti3(a: i128, b: i32) callconv(.C) i128 {
115pub fn __ashlti3(a: i128, b: i32) callconv(.c) i128 {
116116 return ashlXi3(i128, a, b);
117117}
118118
119pub fn __ashrdi3(a: i64, b: i32) callconv(.C) i64 {
119pub fn __ashrdi3(a: i64, b: i32) callconv(.c) i64 {
120120 return ashrXi3(i64, a, b);
121121}
122fn __aeabi_lasr(a: i64, b: i32) callconv(.AAPCS) i64 {
122fn __aeabi_lasr(a: i64, b: i32) callconv(.{ .arm_aapcs = .{} }) i64 {
123123 return ashrXi3(i64, a, b);
124124}
125125
126pub fn __ashrti3(a: i128, b: i32) callconv(.C) i128 {
126pub fn __ashrti3(a: i128, b: i32) callconv(.c) i128 {
127127 return ashrXi3(i128, a, b);
128128}
129129
130pub fn __lshrdi3(a: i64, b: i32) callconv(.C) i64 {
130pub fn __lshrdi3(a: i64, b: i32) callconv(.c) i64 {
131131 return lshrXi3(i64, a, b);
132132}
133fn __aeabi_llsr(a: i64, b: i32) callconv(.AAPCS) i64 {
133fn __aeabi_llsr(a: i64, b: i32) callconv(.{ .arm_aapcs = .{} }) i64 {
134134 return lshrXi3(i64, a, b);
135135}
136136
137pub fn __lshrti3(a: i128, b: i32) callconv(.C) i128 {
137pub fn __lshrti3(a: i128, b: i32) callconv(.c) i128 {
138138 return lshrXi3(i128, a, b);
139139}
140140
lib/compiler_rt/sin.zig+6-6
......@@ -30,12 +30,12 @@ comptime {
3030 @export(&sinl, .{ .name = "sinl", .linkage = common.linkage, .visibility = common.visibility });
3131}
3232
33pub fn __sinh(x: f16) callconv(.C) f16 {
33pub fn __sinh(x: f16) callconv(.c) f16 {
3434 // TODO: more efficient implementation
3535 return @floatCast(sinf(x));
3636}
3737
38pub fn sinf(x: f32) callconv(.C) f32 {
38pub fn sinf(x: f32) callconv(.c) f32 {
3939 // Small multiples of pi/2 rounded to double precision.
4040 const s1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18
4141 const s2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18
......@@ -90,7 +90,7 @@ pub fn sinf(x: f32) callconv(.C) f32 {
9090 };
9191}
9292
93pub fn sin(x: f64) callconv(.C) f64 {
93pub fn sin(x: f64) callconv(.c) f64 {
9494 var ix = @as(u64, @bitCast(x)) >> 32;
9595 ix &= 0x7fffffff;
9696
......@@ -119,17 +119,17 @@ pub fn sin(x: f64) callconv(.C) f64 {
119119 };
120120}
121121
122pub fn __sinx(x: f80) callconv(.C) f80 {
122pub fn __sinx(x: f80) callconv(.c) f80 {
123123 // TODO: more efficient implementation
124124 return @floatCast(sinq(x));
125125}
126126
127pub fn sinq(x: f128) callconv(.C) f128 {
127pub fn sinq(x: f128) callconv(.c) f128 {
128128 // TODO: more correct implementation
129129 return sin(@floatCast(x));
130130}
131131
132pub fn sinl(x: c_longdouble) callconv(.C) c_longdouble {
132pub fn sinl(x: c_longdouble) callconv(.c) c_longdouble {
133133 switch (@typeInfo(c_longdouble).float.bits) {
134134 16 => return __sinh(x),
135135 32 => return sinf(x),
lib/compiler_rt/sincos.zig+6-6
......@@ -22,7 +22,7 @@ comptime {
2222 @export(&sincosl, .{ .name = "sincosl", .linkage = common.linkage, .visibility = common.visibility });
2323}
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 {
2626 // TODO: more efficient implementation
2727 var big_sin: f32 = undefined;
2828 var big_cos: f32 = undefined;
......@@ -31,7 +31,7 @@ pub fn __sincosh(x: f16, r_sin: *f16, r_cos: *f16) callconv(.C) void {
3131 r_cos.* = @as(f16, @floatCast(big_cos));
3232}
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 {
3535 const sc1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18
3636 const sc2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18
3737 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 {
126126 }
127127}
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 {
130130 const ix = @as(u32, @truncate(@as(u64, @bitCast(x)) >> 32)) & 0x7fffffff;
131131
132132 // |x| ~< pi/4
......@@ -177,7 +177,7 @@ pub fn sincos(x: f64, r_sin: *f64, r_cos: *f64) callconv(.C) void {
177177 }
178178}
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 {
181181 // TODO: more efficient implementation
182182 //return sincos_generic(f80, x, r_sin, r_cos);
183183 var big_sin: f128 = undefined;
......@@ -187,7 +187,7 @@ pub fn __sincosx(x: f80, r_sin: *f80, r_cos: *f80) callconv(.C) void {
187187 r_cos.* = @as(f80, @floatCast(big_cos));
188188}
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 {
191191 // TODO: more correct implementation
192192 //return sincos_generic(f128, x, r_sin, r_cos);
193193 var small_sin: f64 = undefined;
......@@ -197,7 +197,7 @@ pub fn sincosq(x: f128, r_sin: *f128, r_cos: *f128) callconv(.C) void {
197197 r_cos.* = small_cos;
198198}
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 {
201201 switch (@typeInfo(c_longdouble).float.bits) {
202202 16 => return __sincosh(x, r_sin, r_cos),
203203 32 => return sincosf(x, r_sin, r_cos),
lib/compiler_rt/sqrt.zig+6-6
......@@ -18,12 +18,12 @@ comptime {
1818 @export(&sqrtl, .{ .name = "sqrtl", .linkage = common.linkage, .visibility = common.visibility });
1919}
2020
21pub fn __sqrth(x: f16) callconv(.C) f16 {
21pub fn __sqrth(x: f16) callconv(.c) f16 {
2222 // TODO: more efficient implementation
2323 return @floatCast(sqrtf(x));
2424}
2525
26pub fn sqrtf(x: f32) callconv(.C) f32 {
26pub fn sqrtf(x: f32) callconv(.c) f32 {
2727 const tiny: f32 = 1.0e-30;
2828 const sign: i32 = @bitCast(@as(u32, 0x80000000));
2929 var ix: i32 = @bitCast(x);
......@@ -102,7 +102,7 @@ pub fn sqrtf(x: f32) callconv(.C) f32 {
102102/// NOTE: The original code is full of implicit signed -> unsigned assumptions and u32 wraparound
103103/// behaviour. Most intermediate i32 values are changed to u32 where appropriate but there are
104104/// 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 {
106106 const tiny: f64 = 1.0e-300;
107107 const sign: u32 = 0x80000000;
108108 const u: u64 = @bitCast(x);
......@@ -232,17 +232,17 @@ pub fn sqrt(x: f64) callconv(.C) f64 {
232232 return @bitCast(uz);
233233}
234234
235pub fn __sqrtx(x: f80) callconv(.C) f80 {
235pub fn __sqrtx(x: f80) callconv(.c) f80 {
236236 // TODO: more efficient implementation
237237 return @floatCast(sqrtq(x));
238238}
239239
240pub fn sqrtq(x: f128) callconv(.C) f128 {
240pub fn sqrtq(x: f128) callconv(.c) f128 {
241241 // TODO: more correct implementation
242242 return sqrt(@floatCast(x));
243243}
244244
245pub fn sqrtl(x: c_longdouble) callconv(.C) c_longdouble {
245pub fn sqrtl(x: c_longdouble) callconv(.c) c_longdouble {
246246 switch (@typeInfo(c_longdouble).float.bits) {
247247 16 => return __sqrth(x),
248248 32 => return sqrtf(x),
lib/compiler_rt/ssp.zig+12-12
......@@ -16,9 +16,9 @@ const std = @import("std");
1616const common = @import("./common.zig");
1717const builtin = @import("builtin");
1818
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;
21extern fn memmove(dest: ?[*]u8, src: ?[*]const 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;
21extern fn memmove(dest: ?[*]u8, src: ?[*]const u8, n: usize) callconv(.c) ?[*]u8;
2222
2323comptime {
2424 @export(&__stack_chk_fail, .{ .name = "__stack_chk_fail", .linkage = common.linkage, .visibility = common.visibility });
......@@ -33,11 +33,11 @@ comptime {
3333 @export(&__memset_chk, .{ .name = "__memset_chk", .linkage = common.linkage, .visibility = common.visibility });
3434}
3535
36fn __stack_chk_fail() callconv(.C) noreturn {
36fn __stack_chk_fail() callconv(.c) noreturn {
3737 @panic("stack smashing detected");
3838}
3939
40fn __chk_fail() callconv(.C) noreturn {
40fn __chk_fail() callconv(.c) noreturn {
4141 @panic("buffer overflow detected");
4242}
4343
......@@ -49,7 +49,7 @@ var __stack_chk_guard: usize = blk: {
4949 break :blk @as(usize, @bitCast(buf));
5050};
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 {
5353 @setRuntimeSafety(false);
5454
5555 var i: usize = 0;
......@@ -64,7 +64,7 @@ fn __strcpy_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.C) [
6464 return dest;
6565}
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 {
6868 @setRuntimeSafety(false);
6969 if (dest_n < n) __chk_fail();
7070 var i: usize = 0;
......@@ -77,7 +77,7 @@ fn __strncpy_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) cal
7777 return dest;
7878}
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 {
8181 @setRuntimeSafety(false);
8282
8383 var avail = dest_n;
......@@ -102,7 +102,7 @@ fn __strcat_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.C) [
102102 return dest;
103103}
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 {
106106 @setRuntimeSafety(false);
107107
108108 var avail = dest_n;
......@@ -127,17 +127,17 @@ fn __strncat_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) cal
127127 return dest;
128128}
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 {
131131 if (dest_n < n) __chk_fail();
132132 return memcpy(dest, src, n);
133133}
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 {
136136 if (dest_n < n) __chk_fail();
137137 return memmove(dest, src, n);
138138}
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 {
141141 if (dest_n < n) __chk_fail();
142142 return memset(dest, c, n);
143143}
lib/compiler_rt/stack_probe.zig+6-6
......@@ -37,7 +37,7 @@ comptime {
3737}
3838
3939// 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 {
4141 @setRuntimeSafety(false);
4242
4343 // 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 {
245245// ___chkstk (__alloca) | yes | yes |
246246// ___chkstk_ms | no | no |
247247
248pub fn _chkstk() callconv(.Naked) void {
248pub fn _chkstk() callconv(.naked) void {
249249 @setRuntimeSafety(false);
250250 @call(.always_inline, win_probe_stack_adjust_sp, .{});
251251}
252pub fn __chkstk() callconv(.Naked) void {
252pub fn __chkstk() callconv(.naked) void {
253253 @setRuntimeSafety(false);
254254 if (arch == .thumb or arch == .aarch64) {
255255 @call(.always_inline, win_probe_stack_only, .{});
......@@ -259,15 +259,15 @@ pub fn __chkstk() callconv(.Naked) void {
259259 else => unreachable,
260260 }
261261}
262pub fn ___chkstk() callconv(.Naked) void {
262pub fn ___chkstk() callconv(.naked) void {
263263 @setRuntimeSafety(false);
264264 @call(.always_inline, win_probe_stack_adjust_sp, .{});
265265}
266pub fn __chkstk_ms() callconv(.Naked) void {
266pub fn __chkstk_ms() callconv(.naked) void {
267267 @setRuntimeSafety(false);
268268 @call(.always_inline, win_probe_stack_only, .{});
269269}
270pub fn ___chkstk_ms() callconv(.Naked) void {
270pub fn ___chkstk_ms() callconv(.naked) void {
271271 @setRuntimeSafety(false);
272272 @call(.always_inline, win_probe_stack_only, .{});
273273}
lib/compiler_rt/subdf3.zig+2-2
......@@ -11,11 +11,11 @@ comptime {
1111 }
1212}
1313
14fn __subdf3(a: f64, b: f64) callconv(.C) f64 {
14fn __subdf3(a: f64, b: f64) callconv(.c) f64 {
1515 return sub(a, b);
1616}
1717
18fn __aeabi_dsub(a: f64, b: f64) callconv(.AAPCS) f64 {
18fn __aeabi_dsub(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 {
1919 return sub(a, b);
2020}
2121
lib/compiler_rt/subhf3.zig+1-1
......@@ -7,7 +7,7 @@ comptime {
77 @export(&__subhf3, .{ .name = "__subhf3", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __subhf3(a: f16, b: f16) callconv(.C) f16 {
10fn __subhf3(a: f16, b: f16) callconv(.c) f16 {
1111 const neg_b = @as(f16, @bitCast(@as(u16, @bitCast(b)) ^ (@as(u16, 1) << 15)));
1212 return addf3(f16, a, neg_b);
1313}
lib/compiler_rt/subo.zig+3-3
......@@ -15,13 +15,13 @@ comptime {
1515 @export(&__suboti4, .{ .name = "__suboti4", .linkage = common.linkage, .visibility = common.visibility });
1616}
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 {
1919 return suboXi4_generic(i32, a, b, overflow);
2020}
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 {
2222 return suboXi4_generic(i64, a, b, overflow);
2323}
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 {
2525 return suboXi4_generic(i128, a, b, overflow);
2626}
2727
lib/compiler_rt/subsf3.zig+2-2
......@@ -11,11 +11,11 @@ comptime {
1111 }
1212}
1313
14fn __subsf3(a: f32, b: f32) callconv(.C) f32 {
14fn __subsf3(a: f32, b: f32) callconv(.c) f32 {
1515 return sub(a, b);
1616}
1717
18fn __aeabi_fsub(a: f32, b: f32) callconv(.AAPCS) f32 {
18fn __aeabi_fsub(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 {
1919 return sub(a, b);
2020}
2121
lib/compiler_rt/subtf3.zig+2-2
......@@ -12,11 +12,11 @@ comptime {
1212 @export(&__subtf3, .{ .name = "__subtf3", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __subtf3(a: f128, b: f128) callconv(.C) f128 {
15pub fn __subtf3(a: f128, b: f128) callconv(.c) f128 {
1616 return sub(a, b);
1717}
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 {
2020 c.* = sub(a.*, b.*);
2121}
2222
lib/compiler_rt/subxf3.zig+1-1
......@@ -7,7 +7,7 @@ comptime {
77 @export(&__subxf3, .{ .name = "__subxf3", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __subxf3(a: f80, b: f80) callconv(.C) f80 {
10fn __subxf3(a: f80, b: f80) callconv(.c) f80 {
1111 var b_rep = std.math.F80.fromFloat(b);
1212 b_rep.exp ^= 0x8000;
1313 const neg_b = b_rep.toFloat();
lib/compiler_rt/tan.zig+6-6
......@@ -32,12 +32,12 @@ comptime {
3232 @export(&tanl, .{ .name = "tanl", .linkage = common.linkage, .visibility = common.visibility });
3333}
3434
35pub fn __tanh(x: f16) callconv(.C) f16 {
35pub fn __tanh(x: f16) callconv(.c) f16 {
3636 // TODO: more efficient implementation
3737 return @floatCast(tanf(x));
3838}
3939
40pub fn tanf(x: f32) callconv(.C) f32 {
40pub fn tanf(x: f32) callconv(.c) f32 {
4141 // Small multiples of pi/2 rounded to double precision.
4242 const t1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18
4343 const t2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18
......@@ -81,7 +81,7 @@ pub fn tanf(x: f32) callconv(.C) f32 {
8181 return kernel.__tandf(y, n & 1 != 0);
8282}
8383
84pub fn tan(x: f64) callconv(.C) f64 {
84pub fn tan(x: f64) callconv(.c) f64 {
8585 var ix = @as(u64, @bitCast(x)) >> 32;
8686 ix &= 0x7fffffff;
8787
......@@ -105,17 +105,17 @@ pub fn tan(x: f64) callconv(.C) f64 {
105105 return kernel.__tan(y[0], y[1], n & 1 != 0);
106106}
107107
108pub fn __tanx(x: f80) callconv(.C) f80 {
108pub fn __tanx(x: f80) callconv(.c) f80 {
109109 // TODO: more efficient implementation
110110 return @floatCast(tanq(x));
111111}
112112
113pub fn tanq(x: f128) callconv(.C) f128 {
113pub fn tanq(x: f128) callconv(.c) f128 {
114114 // TODO: more correct implementation
115115 return tan(@floatCast(x));
116116}
117117
118pub fn tanl(x: c_longdouble) callconv(.C) c_longdouble {
118pub fn tanl(x: c_longdouble) callconv(.c) c_longdouble {
119119 switch (@typeInfo(c_longdouble).float.bits) {
120120 16 => return __tanh(x),
121121 32 => return tanf(x),
lib/compiler_rt/trunc.zig+6-6
......@@ -26,12 +26,12 @@ comptime {
2626 @export(&truncl, .{ .name = "truncl", .linkage = common.linkage, .visibility = common.visibility });
2727}
2828
29pub fn __trunch(x: f16) callconv(.C) f16 {
29pub fn __trunch(x: f16) callconv(.c) f16 {
3030 // TODO: more efficient implementation
3131 return @floatCast(truncf(x));
3232}
3333
34pub fn truncf(x: f32) callconv(.C) f32 {
34pub fn truncf(x: f32) callconv(.c) f32 {
3535 const u: u32 = @bitCast(x);
3636 var e = @as(i32, @intCast(((u >> 23) & 0xFF))) - 0x7F + 9;
3737 var m: u32 = undefined;
......@@ -52,7 +52,7 @@ pub fn truncf(x: f32) callconv(.C) f32 {
5252 }
5353}
5454
55pub fn trunc(x: f64) callconv(.C) f64 {
55pub fn trunc(x: f64) callconv(.c) f64 {
5656 const u: u64 = @bitCast(x);
5757 var e = @as(i32, @intCast(((u >> 52) & 0x7FF))) - 0x3FF + 12;
5858 var m: u64 = undefined;
......@@ -73,12 +73,12 @@ pub fn trunc(x: f64) callconv(.C) f64 {
7373 }
7474}
7575
76pub fn __truncx(x: f80) callconv(.C) f80 {
76pub fn __truncx(x: f80) callconv(.c) f80 {
7777 // TODO: more efficient implementation
7878 return @floatCast(truncq(x));
7979}
8080
81pub fn truncq(x: f128) callconv(.C) f128 {
81pub fn truncq(x: f128) callconv(.c) f128 {
8282 const u: u128 = @bitCast(x);
8383 var e = @as(i32, @intCast(((u >> 112) & 0x7FFF))) - 0x3FFF + 16;
8484 var m: u128 = undefined;
......@@ -99,7 +99,7 @@ pub fn truncq(x: f128) callconv(.C) f128 {
9999 }
100100}
101101
102pub fn truncl(x: c_longdouble) callconv(.C) c_longdouble {
102pub fn truncl(x: c_longdouble) callconv(.c) c_longdouble {
103103 switch (@typeInfo(c_longdouble).float.bits) {
104104 16 => return __trunch(x),
105105 32 => return truncf(x),
lib/compiler_rt/truncdfhf2.zig+2-2
......@@ -10,10 +10,10 @@ comptime {
1010 @export(&__truncdfhf2, .{ .name = "__truncdfhf2", .linkage = common.linkage, .visibility = common.visibility });
1111}
1212
13pub fn __truncdfhf2(a: f64) callconv(.C) common.F16T(f64) {
13pub fn __truncdfhf2(a: f64) callconv(.c) common.F16T(f64) {
1414 return @bitCast(truncf(f16, f64, a));
1515}
1616
17fn __aeabi_d2h(a: f64) callconv(.AAPCS) u16 {
17fn __aeabi_d2h(a: f64) callconv(.{ .arm_aapcs = .{} }) u16 {
1818 return @bitCast(truncf(f16, f64, a));
1919}
lib/compiler_rt/truncdfsf2.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14pub fn __truncdfsf2(a: f64) callconv(.C) f32 {
14pub fn __truncdfsf2(a: f64) callconv(.c) f32 {
1515 return truncf(f32, f64, a);
1616}
1717
18fn __aeabi_d2f(a: f64) callconv(.AAPCS) f32 {
18fn __aeabi_d2f(a: f64) callconv(.{ .arm_aapcs = .{} }) f32 {
1919 return truncf(f32, f64, a);
2020}
lib/compiler_rt/truncsfhf2.zig+3-3
......@@ -12,14 +12,14 @@ comptime {
1212 @export(&__truncsfhf2, .{ .name = "__truncsfhf2", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __truncsfhf2(a: f32) callconv(.C) common.F16T(f32) {
15pub fn __truncsfhf2(a: f32) callconv(.c) common.F16T(f32) {
1616 return @bitCast(truncf(f16, f32, a));
1717}
1818
19fn __gnu_f2h_ieee(a: f32) callconv(.C) common.F16T(f32) {
19fn __gnu_f2h_ieee(a: f32) callconv(.c) common.F16T(f32) {
2020 return @bitCast(truncf(f16, f32, a));
2121}
2222
23fn __aeabi_f2h(a: f32) callconv(.AAPCS) u16 {
23fn __aeabi_f2h(a: f32) callconv(.{ .arm_aapcs = .{} }) u16 {
2424 return @bitCast(truncf(f16, f32, a));
2525}
lib/compiler_rt/trunctfdf2.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 @export(&__trunctfdf2, .{ .name = "__trunctfdf2", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __trunctfdf2(a: f128) callconv(.C) f64 {
15pub fn __trunctfdf2(a: f128) callconv(.c) f64 {
1616 return truncf(f64, f128, a);
1717}
1818
19fn _Qp_qtod(a: *const f128) callconv(.C) f64 {
19fn _Qp_qtod(a: *const f128) callconv(.c) f64 {
2020 return truncf(f64, f128, a.*);
2121}
lib/compiler_rt/trunctfhf2.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__trunctfhf2, .{ .name = "__trunctfhf2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10pub fn __trunctfhf2(a: f128) callconv(.C) common.F16T(f128) {
10pub fn __trunctfhf2(a: f128) callconv(.c) common.F16T(f128) {
1111 return @bitCast(truncf(f16, f128, a));
1212}
lib/compiler_rt/trunctfsf2.zig+2-2
......@@ -12,10 +12,10 @@ comptime {
1212 @export(&__trunctfsf2, .{ .name = "__trunctfsf2", .linkage = common.linkage, .visibility = common.visibility });
1313}
1414
15pub fn __trunctfsf2(a: f128) callconv(.C) f32 {
15pub fn __trunctfsf2(a: f128) callconv(.c) f32 {
1616 return truncf(f32, f128, a);
1717}
1818
19fn _Qp_qtos(a: *const f128) callconv(.C) f32 {
19fn _Qp_qtos(a: *const f128) callconv(.c) f32 {
2020 return truncf(f32, f128, a.*);
2121}
lib/compiler_rt/trunctfxf2.zig+1-1
......@@ -8,7 +8,7 @@ comptime {
88 @export(&__trunctfxf2, .{ .name = "__trunctfxf2", .linkage = common.linkage, .visibility = common.visibility });
99}
1010
11pub fn __trunctfxf2(a: f128) callconv(.C) f80 {
11pub fn __trunctfxf2(a: f128) callconv(.c) f80 {
1212 const src_sig_bits = math.floatMantissaBits(f128);
1313 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 {
77 @export(&__truncxfdf2, .{ .name = "__truncxfdf2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __truncxfdf2(a: f80) callconv(.C) f64 {
10fn __truncxfdf2(a: f80) callconv(.c) f64 {
1111 return trunc_f80(f64, a);
1212}
lib/compiler_rt/truncxfhf2.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__truncxfhf2, .{ .name = "__truncxfhf2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __truncxfhf2(a: f80) callconv(.C) common.F16T(f80) {
10fn __truncxfhf2(a: f80) callconv(.c) common.F16T(f80) {
1111 return @bitCast(trunc_f80(f16, a));
1212}
lib/compiler_rt/truncxfsf2.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__truncxfsf2, .{ .name = "__truncxfsf2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10fn __truncxfsf2(a: f80) callconv(.C) f32 {
10fn __truncxfsf2(a: f80) callconv(.c) f32 {
1111 return trunc_f80(f32, a);
1212}
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 {
112112 }
113113}
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 {
116116 @setRuntimeSafety(builtin.is_test);
117117 const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];
118118 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)
120120 @call(.always_inline, divmod, .{ q, null, u, v }) catch unreachable;
121121}
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 {
124124 @setRuntimeSafety(builtin.is_test);
125125 const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable];
126126 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 {
1313 }
1414}
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 {
1717 return udivmod(u128, a, b, maybe_rem);
1818}
1919
2020const 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 {
2323 return @bitCast(udivmod(u128, @bitCast(a), @bitCast(b), maybe_rem));
2424}
2525
lib/compiler_rt/udivti3.zig+2-2
......@@ -13,12 +13,12 @@ comptime {
1313 }
1414}
1515
16pub fn __udivti3(a: u128, b: u128) callconv(.C) u128 {
16pub fn __udivti3(a: u128, b: u128) callconv(.c) u128 {
1717 return udivmod(u128, a, b, null);
1818}
1919
2020const 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 {
2323 return @bitCast(udivmod(u128, @bitCast(a), @bitCast(b), null));
2424}
lib/compiler_rt/umodti3.zig+2-2
......@@ -13,7 +13,7 @@ comptime {
1313 }
1414}
1515
16pub fn __umodti3(a: u128, b: u128) callconv(.C) u128 {
16pub fn __umodti3(a: u128, b: u128) callconv(.c) u128 {
1717 var r: u128 = undefined;
1818 _ = udivmod(u128, a, b, &r);
1919 return r;
......@@ -21,7 +21,7 @@ pub fn __umodti3(a: u128, b: u128) callconv(.C) u128 {
2121
2222const 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 {
2525 var r: u128 = undefined;
2626 _ = udivmod(u128, @bitCast(a), @bitCast(b), &r);
2727 return @bitCast(r);
lib/compiler_rt/unorddf2.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14pub fn __unorddf2(a: f64, b: f64) callconv(.C) i32 {
14pub fn __unorddf2(a: f64, b: f64) callconv(.c) i32 {
1515 return comparef.unordcmp(f64, a, b);
1616}
1717
18fn __aeabi_dcmpun(a: f64, b: f64) callconv(.AAPCS) i32 {
18fn __aeabi_dcmpun(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 {
1919 return comparef.unordcmp(f64, a, b);
2020}
lib/compiler_rt/unordhf2.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__unordhf2, .{ .name = "__unordhf2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10pub fn __unordhf2(a: f16, b: f16) callconv(.C) i32 {
10pub fn __unordhf2(a: f16, b: f16) callconv(.c) i32 {
1111 return comparef.unordcmp(f16, a, b);
1212}
lib/compiler_rt/unordsf2.zig+2-2
......@@ -11,10 +11,10 @@ comptime {
1111 }
1212}
1313
14pub fn __unordsf2(a: f32, b: f32) callconv(.C) i32 {
14pub fn __unordsf2(a: f32, b: f32) callconv(.c) i32 {
1515 return comparef.unordcmp(f32, a, b);
1616}
1717
18fn __aeabi_fcmpun(a: f32, b: f32) callconv(.AAPCS) i32 {
18fn __aeabi_fcmpun(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 {
1919 return comparef.unordcmp(f32, a, b);
2020}
lib/compiler_rt/unordtf2.zig+1-1
......@@ -13,6 +13,6 @@ comptime {
1313 @export(&__unordtf2, .{ .name = "__unordtf2", .linkage = common.linkage, .visibility = common.visibility });
1414}
1515
16fn __unordtf2(a: f128, b: f128) callconv(.C) i32 {
16fn __unordtf2(a: f128, b: f128) callconv(.c) i32 {
1717 return comparef.unordcmp(f128, a, b);
1818}
lib/compiler_rt/unordxf2.zig+1-1
......@@ -7,6 +7,6 @@ comptime {
77 @export(&__unordxf2, .{ .name = "__unordxf2", .linkage = common.linkage, .visibility = common.visibility });
88}
99
10pub fn __unordxf2(a: f80, b: f80) callconv(.C) i32 {
10pub fn __unordxf2(a: f80, b: f80) callconv(.c) i32 {
1111 return comparef.unordcmp(f80, a, b);
1212}
lib/fuzzer.zig+1-1
......@@ -453,7 +453,7 @@ export fn fuzzer_coverage_id() u64 {
453453 return fuzzer.coverage_id;
454454}
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
458458export fn fuzzer_start(testOne: @TypeOf(fuzzer_one)) void {
459459 fuzzer_one = testOne;
lib/std/os/linux/aarch64.zig+2-2
......@@ -99,7 +99,7 @@ pub fn syscall6(
9999 );
100100}
101101
102pub fn clone() callconv(.Naked) usize {
102pub fn clone() callconv(.naked) usize {
103103 // __clone(func, stack, flags, arg, ptid, tls, ctid)
104104 // x0, x1, w2, x3, x4, x5, x6
105105 //
......@@ -141,7 +141,7 @@ pub fn clone() callconv(.Naked) usize {
141141
142142pub const restore = restore_rt;
143143
144pub fn restore_rt() callconv(.Naked) noreturn {
144pub fn restore_rt() callconv(.naked) noreturn {
145145 switch (@import("builtin").zig_backend) {
146146 .stage2_c => asm volatile (
147147 \\ mov x8, %[number]
lib/std/os/linux/arm.zig+3-3
......@@ -98,7 +98,7 @@ pub fn syscall6(
9898 );
9999}
100100
101pub fn clone() callconv(.Naked) usize {
101pub fn clone() callconv(.naked) usize {
102102 // __clone(func, stack, flags, arg, ptid, tls, ctid)
103103 // r0, r1, r2, r3, +0, +4, +8
104104 //
......@@ -134,7 +134,7 @@ pub fn clone() callconv(.Naked) usize {
134134 );
135135}
136136
137pub fn restore() callconv(.Naked) noreturn {
137pub fn restore() callconv(.naked) noreturn {
138138 switch (@import("builtin").zig_backend) {
139139 .stage2_c => asm volatile (
140140 \\ mov r7, %[number]
......@@ -152,7 +152,7 @@ pub fn restore() callconv(.Naked) noreturn {
152152 }
153153}
154154
155pub fn restore_rt() callconv(.Naked) noreturn {
155pub fn restore_rt() callconv(.naked) noreturn {
156156 switch (@import("builtin").zig_backend) {
157157 .stage2_c => asm volatile (
158158 \\ mov r7, %[number]
lib/std/os/linux/hexagon.zig+2-2
......@@ -96,7 +96,7 @@ pub fn syscall6(
9696 );
9797}
9898
99pub fn clone() callconv(.Naked) usize {
99pub fn clone() callconv(.naked) usize {
100100 // __clone(func, stack, flags, arg, ptid, tls, ctid)
101101 // r0, r1, r2, r3, r4, r5, +0
102102 //
......@@ -137,7 +137,7 @@ pub fn clone() callconv(.Naked) usize {
137137
138138pub const restore = restore_rt;
139139
140pub fn restore_rt() callconv(.Naked) noreturn {
140pub fn restore_rt() callconv(.naked) noreturn {
141141 asm volatile (
142142 \\ trap0(#0)
143143 :
lib/std/os/linux/loongarch64.zig+2-2
......@@ -100,7 +100,7 @@ pub fn syscall6(
100100 );
101101}
102102
103pub fn clone() callconv(.Naked) usize {
103pub fn clone() callconv(.naked) usize {
104104 // __clone(func, stack, flags, arg, ptid, tls, ctid)
105105 // a0, a1, a2, a3, a4, a5, a6
106106 // sys_clone(flags, stack, ptid, ctid, tls)
......@@ -140,7 +140,7 @@ pub fn clone() callconv(.Naked) usize {
140140
141141pub const restore = restore_rt;
142142
143pub fn restore_rt() callconv(.Naked) noreturn {
143pub fn restore_rt() callconv(.naked) noreturn {
144144 asm volatile (
145145 \\ or $a7, $zero, %[number]
146146 \\ syscall 0
lib/std/os/linux/mips.zig+3-3
......@@ -199,7 +199,7 @@ pub fn syscall7(
199199 );
200200}
201201
202pub fn clone() callconv(.Naked) usize {
202pub fn clone() callconv(.naked) usize {
203203 // __clone(func, stack, flags, arg, ptid, tls, ctid)
204204 // 3, 4, 5, 6, 7, 8, 9
205205 //
......@@ -250,7 +250,7 @@ pub fn clone() callconv(.Naked) usize {
250250 );
251251}
252252
253pub fn restore() callconv(.Naked) noreturn {
253pub fn restore() callconv(.naked) noreturn {
254254 asm volatile (
255255 \\ syscall
256256 :
......@@ -259,7 +259,7 @@ pub fn restore() callconv(.Naked) noreturn {
259259 );
260260}
261261
262pub fn restore_rt() callconv(.Naked) noreturn {
262pub fn restore_rt() callconv(.naked) noreturn {
263263 asm volatile (
264264 \\ syscall
265265 :
lib/std/os/linux/mips64.zig+3-3
......@@ -182,7 +182,7 @@ pub fn syscall7(
182182 );
183183}
184184
185pub fn clone() callconv(.Naked) usize {
185pub fn clone() callconv(.naked) usize {
186186 // __clone(func, stack, flags, arg, ptid, tls, ctid)
187187 // 3, 4, 5, 6, 7, 8, 9
188188 //
......@@ -229,7 +229,7 @@ pub fn clone() callconv(.Naked) usize {
229229 );
230230}
231231
232pub fn restore() callconv(.Naked) noreturn {
232pub fn restore() callconv(.naked) noreturn {
233233 asm volatile (
234234 \\ syscall
235235 :
......@@ -238,7 +238,7 @@ pub fn restore() callconv(.Naked) noreturn {
238238 );
239239}
240240
241pub fn restore_rt() callconv(.Naked) noreturn {
241pub fn restore_rt() callconv(.naked) noreturn {
242242 asm volatile (
243243 \\ syscall
244244 :
lib/std/os/linux/powerpc.zig+2-2
......@@ -127,7 +127,7 @@ pub fn syscall6(
127127 );
128128}
129129
130pub fn clone() callconv(.Naked) usize {
130pub fn clone() callconv(.naked) usize {
131131 // __clone(func, stack, flags, arg, ptid, tls, ctid)
132132 // 3, 4, 5, 6, 7, 8, 9
133133 //
......@@ -199,7 +199,7 @@ pub fn clone() callconv(.Naked) usize {
199199
200200pub const restore = restore_rt;
201201
202pub fn restore_rt() callconv(.Naked) noreturn {
202pub fn restore_rt() callconv(.naked) noreturn {
203203 asm volatile (
204204 \\ sc
205205 :
lib/std/os/linux/powerpc64.zig+2-2
......@@ -127,7 +127,7 @@ pub fn syscall6(
127127 );
128128}
129129
130pub fn clone() callconv(.Naked) usize {
130pub fn clone() callconv(.naked) usize {
131131 // __clone(func, stack, flags, arg, ptid, tls, ctid)
132132 // 3, 4, 5, 6, 7, 8, 9
133133 //
......@@ -184,7 +184,7 @@ pub fn clone() callconv(.Naked) usize {
184184
185185pub const restore = restore_rt;
186186
187pub fn restore_rt() callconv(.Naked) noreturn {
187pub fn restore_rt() callconv(.naked) noreturn {
188188 asm volatile (
189189 \\ sc
190190 :
lib/std/os/linux/riscv32.zig+2-2
......@@ -96,7 +96,7 @@ pub fn syscall6(
9696 );
9797}
9898
99pub fn clone() callconv(.Naked) usize {
99pub fn clone() callconv(.naked) usize {
100100 // __clone(func, stack, flags, arg, ptid, tls, ctid)
101101 // a0, a1, a2, a3, a4, a5, a6
102102 //
......@@ -142,7 +142,7 @@ pub fn clone() callconv(.Naked) usize {
142142
143143pub const restore = restore_rt;
144144
145pub fn restore_rt() callconv(.Naked) noreturn {
145pub fn restore_rt() callconv(.naked) noreturn {
146146 asm volatile (
147147 \\ ecall
148148 :
lib/std/os/linux/riscv64.zig+2-2
......@@ -96,7 +96,7 @@ pub fn syscall6(
9696 );
9797}
9898
99pub fn clone() callconv(.Naked) usize {
99pub fn clone() callconv(.naked) usize {
100100 // __clone(func, stack, flags, arg, ptid, tls, ctid)
101101 // a0, a1, a2, a3, a4, a5, a6
102102 //
......@@ -142,7 +142,7 @@ pub fn clone() callconv(.Naked) usize {
142142
143143pub const restore = restore_rt;
144144
145pub fn restore_rt() callconv(.Naked) noreturn {
145pub fn restore_rt() callconv(.naked) noreturn {
146146 asm volatile (
147147 \\ ecall
148148 :
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,
9090 );
9191}
9292
93pub fn clone() callconv(.Naked) usize {
93pub fn clone() callconv(.naked) usize {
9494 asm volatile (
9595 \\# int clone(
9696 \\# fn, a = r2
......@@ -156,7 +156,7 @@ pub fn clone() callconv(.Naked) usize {
156156
157157pub const restore = restore_rt;
158158
159pub fn restore_rt() callconv(.Naked) noreturn {
159pub fn restore_rt() callconv(.naked) noreturn {
160160 asm volatile (
161161 \\svc 0
162162 :
lib/std/os/linux/sparc64.zig+1-1
......@@ -179,7 +179,7 @@ pub fn syscall6(
179179 );
180180}
181181
182pub fn clone() callconv(.Naked) usize {
182pub fn clone() callconv(.naked) usize {
183183 // __clone(func, stack, flags, arg, ptid, tls, ctid)
184184 // i0, i1, i2, i3, i4, i5, sp
185185 //
lib/std/os/linux/thumb.zig+2-2
......@@ -143,7 +143,7 @@ pub fn syscall6(
143143
144144pub const clone = @import("arm.zig").clone;
145145
146pub fn restore() callconv(.Naked) noreturn {
146pub fn restore() callconv(.naked) noreturn {
147147 asm volatile (
148148 \\ mov r7, %[number]
149149 \\ svc #0
......@@ -152,7 +152,7 @@ pub fn restore() callconv(.Naked) noreturn {
152152 );
153153}
154154
155pub fn restore_rt() callconv(.Naked) noreturn {
155pub fn restore_rt() callconv(.naked) noreturn {
156156 asm volatile (
157157 \\ mov r7, %[number]
158158 \\ svc #0
lib/std/os/linux/x86.zig+4-4
......@@ -122,7 +122,7 @@ pub fn socketcall(call: usize, args: [*]const usize) usize {
122122 );
123123}
124124
125pub fn clone() callconv(.Naked) usize {
125pub fn clone() callconv(.naked) usize {
126126 // __clone(func, stack, flags, arg, ptid, tls, ctid)
127127 // +8, +12, +16, +20, +24, +28, +32
128128 //
......@@ -172,7 +172,7 @@ pub fn clone() callconv(.Naked) usize {
172172 );
173173}
174174
175pub fn restore() callconv(.Naked) noreturn {
175pub fn restore() callconv(.naked) noreturn {
176176 switch (@import("builtin").zig_backend) {
177177 .stage2_c => asm volatile (
178178 \\ movl %[number], %%eax
......@@ -190,7 +190,7 @@ pub fn restore() callconv(.Naked) noreturn {
190190 }
191191}
192192
193pub fn restore_rt() callconv(.Naked) noreturn {
193pub fn restore_rt() callconv(.naked) noreturn {
194194 switch (@import("builtin").zig_backend) {
195195 .stage2_c => asm volatile (
196196 \\ movl %[number], %%eax
......@@ -405,7 +405,7 @@ noinline fn getContextReturnAddress() usize {
405405 return @returnAddress();
406406}
407407
408pub fn getContextInternal() callconv(.Naked) usize {
408pub fn getContextInternal() callconv(.naked) usize {
409409 asm volatile (
410410 \\ movl $0, %[flags_offset:c](%%edx)
411411 \\ movl $0, %[link_offset:c](%%edx)
lib/std/os/linux/x86_64.zig+3-3
......@@ -101,7 +101,7 @@ pub fn syscall6(
101101 );
102102}
103103
104pub fn clone() callconv(.Naked) usize {
104pub fn clone() callconv(.naked) usize {
105105 asm volatile (
106106 \\ movl $56,%%eax // SYS_clone
107107 \\ movq %%rdi,%%r11
......@@ -137,7 +137,7 @@ pub fn clone() callconv(.Naked) usize {
137137
138138pub const restore = restore_rt;
139139
140pub fn restore_rt() callconv(.Naked) noreturn {
140pub fn restore_rt() callconv(.naked) noreturn {
141141 switch (@import("builtin").zig_backend) {
142142 .stage2_c => asm volatile (
143143 \\ movl %[number], %%eax
......@@ -382,7 +382,7 @@ fn gpRegisterOffset(comptime reg_index: comptime_int) usize {
382382 return @offsetOf(ucontext_t, "mcontext") + @offsetOf(mcontext_t, "gregs") + @sizeOf(usize) * reg_index;
383383}
384384
385fn getContextInternal() callconv(.Naked) usize {
385fn getContextInternal() callconv(.naked) usize {
386386 // TODO: Read GS/FS registers?
387387 asm volatile (
388388 \\ 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" {
10961096test "zig fmt: async function" {
10971097 try testCanonical(
10981098 \\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,
11001100 \\};
11011101 \\test "hi" {
1102 \\ var ptr: fn (i32) callconv(.Async) void = @ptrCast(other);
1102 \\ var ptr: fn (i32) callconv(.@"async") void = @ptrCast(other);
11031103 \\}
11041104 \\
11051105 );
......@@ -1259,7 +1259,7 @@ test "zig fmt: threadlocal" {
12591259test "zig fmt: linksection" {
12601260 try testCanonical(
12611261 \\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 {}
12631263 \\
12641264 );
12651265}
......@@ -3926,7 +3926,7 @@ test "zig fmt: fn type" {
39263926 \\}
39273927 \\
39283928 \\const a: fn (u8) u8 = undefined;
3929 \\const b: fn (u8) callconv(.Naked) u8 = undefined;
3929 \\const b: fn (u8) callconv(.naked) u8 = undefined;
39303930 \\const ap: fn (u8) u8 = a;
39313931 \\
39323932 );
src/codegen/spirv/Assembler.zig+1-1
......@@ -276,7 +276,7 @@ fn todo(self: *Assembler, comptime fmt: []const u8, args: anytype) Error {
276276fn processInstruction(self: *Assembler) !void {
277277 const result: AsmValue = switch (self.inst.opcode) {
278278 .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)", .{});
280280 },
281281 .OpCapability => {
282282 try self.spv.addCapability(@enumFromInt(self.inst.operands.items[0].value));
src/link/NvPtx.zig+1-1
......@@ -1,7 +1,7 @@
11//! NVidia PTX (Parallel Thread Execution)
22//! https://docs.nvidia.com/cuda/parallel-thread-execution/index.html
33//! 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
66const NvPtx = @This();
77
test/behavior/async_fn.zig+27-27
......@@ -137,13 +137,13 @@ test "@frameSize" {
137137 const S = struct {
138138 fn doTheTest() !void {
139139 {
140 var ptr = @as(fn (i32) callconv(.Async) void, @ptrCast(other));
140 var ptr = @as(fn (i32) callconv(.@"async") void, @ptrCast(other));
141141 _ = &ptr;
142142 const size = @frameSize(ptr);
143143 try expect(size == @sizeOf(@Frame(other)));
144144 }
145145 {
146 var ptr = @as(fn () callconv(.Async) void, @ptrCast(first));
146 var ptr = @as(fn () callconv(.@"async") void, @ptrCast(first));
147147 _ = &ptr;
148148 const size = @frameSize(ptr);
149149 try expect(size == @sizeOf(@Frame(first)));
......@@ -220,7 +220,7 @@ test "coroutine suspend with block" {
220220
221221var a_promise: anyframe = undefined;
222222var global_result = false;
223fn testSuspendBlock() callconv(.Async) void {
223fn testSuspendBlock() callconv(.@"async") void {
224224 suspend {
225225 comptime assert(@TypeOf(@frame()) == *@Frame(testSuspendBlock)) catch unreachable;
226226 a_promise = @frame();
......@@ -249,14 +249,14 @@ test "coroutine await" {
249249 try expect(await_final_result == 1234);
250250 try expect(std.mem.eql(u8, &await_points, "abcdefghi"));
251251}
252fn await_amain() callconv(.Async) void {
252fn await_amain() callconv(.@"async") void {
253253 await_seq('b');
254254 var p = async await_another();
255255 await_seq('e');
256256 await_final_result = await p;
257257 await_seq('h');
258258}
259fn await_another() callconv(.Async) i32 {
259fn await_another() callconv(.@"async") i32 {
260260 await_seq('c');
261261 suspend {
262262 await_seq('d');
......@@ -287,14 +287,14 @@ test "coroutine await early return" {
287287 try expect(early_final_result == 1234);
288288 try expect(std.mem.eql(u8, &early_points, "abcdef"));
289289}
290fn early_amain() callconv(.Async) void {
290fn early_amain() callconv(.@"async") void {
291291 early_seq('b');
292292 var p = async early_another();
293293 early_seq('d');
294294 early_final_result = await p;
295295 early_seq('e');
296296}
297fn early_another() callconv(.Async) i32 {
297fn early_another() callconv(.@"async") i32 {
298298 early_seq('c');
299299 return 1234;
300300}
......@@ -313,7 +313,7 @@ test "async function with dot syntax" {
313313
314314 const S = struct {
315315 var y: i32 = 1;
316 fn foo() callconv(.Async) void {
316 fn foo() callconv(.@"async") void {
317317 y += 1;
318318 suspend {}
319319 }
......@@ -329,7 +329,7 @@ test "async fn pointer in a struct field" {
329329
330330 var data: i32 = 1;
331331 const Foo = struct {
332 bar: fn (*i32) callconv(.Async) void,
332 bar: fn (*i32) callconv(.@"async") void,
333333 };
334334 var foo = Foo{ .bar = simpleAsyncFn2 };
335335 _ = &foo;
......@@ -346,7 +346,7 @@ test "async fn pointer in a struct field" {
346346fn doTheAwait(f: anyframe->void) void {
347347 await f;
348348}
349fn simpleAsyncFn2(y: *i32) callconv(.Async) void {
349fn simpleAsyncFn2(y: *i32) callconv(.@"async") void {
350350 defer y.* += 2;
351351 y.* += 1;
352352 suspend {}
......@@ -357,10 +357,10 @@ test "@asyncCall with return type" {
357357 if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO
358358
359359 const Foo = struct {
360 bar: fn () callconv(.Async) i32,
360 bar: fn () callconv(.@"async") i32,
361361
362362 var global_frame: anyframe = undefined;
363 fn middle() callconv(.Async) i32 {
363 fn middle() callconv(.@"async") i32 {
364364 return afunc();
365365 }
366366
......@@ -396,7 +396,7 @@ test "async fn with inferred error set" {
396396 resume global_frame;
397397 try std.testing.expectError(error.Fail, result);
398398 }
399 fn middle() callconv(.Async) !void {
399 fn middle() callconv(.@"async") !void {
400400 var f = async middle2();
401401 return await f;
402402 }
......@@ -441,11 +441,11 @@ fn nonFailing() (anyframe->anyerror!void) {
441441 Static.frame = async suspendThenFail();
442442 return &Static.frame;
443443}
444fn suspendThenFail() callconv(.Async) anyerror!void {
444fn suspendThenFail() callconv(.@"async") anyerror!void {
445445 suspend {}
446446 return error.Fail;
447447}
448fn printTrace(p: anyframe->(anyerror!void)) callconv(.Async) void {
448fn printTrace(p: anyframe->(anyerror!void)) callconv(.@"async") void {
449449 (await p) catch |e| {
450450 std.testing.expect(e == error.Fail) catch @panic("test failure");
451451 if (@errorReturnTrace()) |trace| {
......@@ -466,7 +466,7 @@ test "break from suspend" {
466466 _ = p;
467467 try std.testing.expect(my_result == 2);
468468}
469fn testBreakFromSuspend(my_result: *i32) callconv(.Async) void {
469fn testBreakFromSuspend(my_result: *i32) callconv(.@"async") void {
470470 suspend {
471471 resume @frame();
472472 }
......@@ -949,7 +949,7 @@ test "cast fn to async fn when it is inferred to be async" {
949949 var ok = false;
950950
951951 fn doTheTest() void {
952 var ptr: fn () callconv(.Async) i32 = undefined;
952 var ptr: fn () callconv(.@"async") i32 = undefined;
953953 ptr = func;
954954 var buf: [100]u8 align(16) = undefined;
955955 var result: i32 = undefined;
......@@ -980,7 +980,7 @@ test "cast fn to async fn when it is inferred to be async, awaited directly" {
980980 var ok = false;
981981
982982 fn doTheTest() void {
983 var ptr: fn () callconv(.Async) i32 = undefined;
983 var ptr: fn () callconv(.@"async") i32 = undefined;
984984 ptr = func;
985985 var buf: [100]u8 align(16) = undefined;
986986 var result: i32 = undefined;
......@@ -1093,7 +1093,7 @@ test "@asyncCall with comptime-known function, but not awaited directly" {
10931093 resume global_frame;
10941094 try std.testing.expectError(error.Fail, result);
10951095 }
1096 fn middle() callconv(.Async) !void {
1096 fn middle() callconv(.@"async") !void {
10971097 var f = async middle2();
10981098 return await f;
10991099 }
......@@ -1133,7 +1133,7 @@ test "@asyncCall using the result location inside the frame" {
11331133 if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO
11341134
11351135 const S = struct {
1136 fn simple2(y: *i32) callconv(.Async) i32 {
1136 fn simple2(y: *i32) callconv(.@"async") i32 {
11371137 defer y.* += 2;
11381138 y.* += 1;
11391139 suspend {}
......@@ -1145,7 +1145,7 @@ test "@asyncCall using the result location inside the frame" {
11451145 };
11461146 var data: i32 = 1;
11471147 const Foo = struct {
1148 bar: fn (*i32) callconv(.Async) i32,
1148 bar: fn (*i32) callconv(.@"async") i32,
11491149 };
11501150 var foo = Foo{ .bar = S.simple2 };
11511151 _ = &foo;
......@@ -1271,7 +1271,7 @@ test "await used in expression and awaiting fn with no suspend but async calling
12711271 const sum = (await f1) + (await f2);
12721272 expect(sum == 10) catch @panic("test failure");
12731273 }
1274 fn add(a: i32, b: i32) callconv(.Async) i32 {
1274 fn add(a: i32, b: i32) callconv(.@"async") i32 {
12751275 return a + b;
12761276 }
12771277 };
......@@ -1289,7 +1289,7 @@ test "await used in expression after a fn call" {
12891289 sum = foo() + await f1;
12901290 expect(sum == 8) catch @panic("test failure");
12911291 }
1292 fn add(a: i32, b: i32) callconv(.Async) i32 {
1292 fn add(a: i32, b: i32) callconv(.@"async") i32 {
12931293 return a + b;
12941294 }
12951295 fn foo() i32 {
......@@ -1309,7 +1309,7 @@ test "async fn call used in expression after a fn call" {
13091309 sum = foo() + add(3, 4);
13101310 expect(sum == 8) catch @panic("test failure");
13111311 }
1312 fn add(a: i32, b: i32) callconv(.Async) i32 {
1312 fn add(a: i32, b: i32) callconv(.@"async") i32 {
13131313 return a + b;
13141314 }
13151315 fn foo() i32 {
......@@ -1598,7 +1598,7 @@ test "async function call resolves target fn frame, runtime func" {
15981598 fn foo() anyerror!void {
15991599 const stack_size = 1000;
16001600 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;
16021602 _ = &func;
16031603 return await @asyncCall(&stack_frame, {}, func, .{});
16041604 }
......@@ -1860,7 +1860,7 @@ test "@asyncCall with pass-by-value arguments" {
18601860 pub const ST = struct { f0: usize, f1: usize };
18611861 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 {
18641864 _ = s;
18651865 _ = a;
18661866 // Check that the array and struct arguments passed by value don't
......@@ -1893,7 +1893,7 @@ test "@asyncCall with arguments having non-standard alignment" {
18931893 const F1: u64 = 0xf00df00df00df00d;
18941894
18951895 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 {
18971897 _ = s;
18981898 // The compiler inserts extra alignment for s, check that the
18991899 // generated code picks the right slot for fill1.
test/behavior/await_struct.zig+2-2
......@@ -21,14 +21,14 @@ test "coroutine await struct" {
2121 try expect(await_final_result.x == 1234);
2222 try expect(std.mem.eql(u8, &await_points, "abcdefghi"));
2323}
24fn await_amain() callconv(.Async) void {
24fn await_amain() callconv(.@"async") void {
2525 await_seq('b');
2626 var p = async await_another();
2727 await_seq('e');
2828 await_final_result = await p;
2929 await_seq('h');
3030}
31fn await_another() callconv(.Async) Foo {
31fn await_another() callconv(.@"async") Foo {
3232 await_seq('c');
3333 suspend {
3434 await_seq('d');
test/c_abi/main.zig+2-2
......@@ -5694,7 +5694,7 @@ test "Stdcall ABI big union" {
56945694 stdcall_big_union(x);
56955695}
56965696
5697extern fn c_explict_win64(ByRef) callconv(.Win64) ByRef;
5697extern fn c_explict_win64(ByRef) callconv(.{ .x86_64_win = .{} }) ByRef;
56985698test "explicit SysV calling convention" {
56995699 if (builtin.cpu.arch != .x86_64) return error.SkipZigTest;
57005700
......@@ -5702,7 +5702,7 @@ test "explicit SysV calling convention" {
57025702 try expect(res.val == 42);
57035703}
57045704
5705extern fn c_explict_sys_v(ByRef) callconv(.SysV) ByRef;
5705extern fn c_explict_sys_v(ByRef) callconv(.{ .x86_64_sysv = .{} }) ByRef;
57065706test "explicit Win64 calling convention" {
57075707 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 @@
11export fn entry() void {
22 _ = async amain();
33}
4fn amain() callconv(.Async) void {
4fn amain() callconv(.@"async") void {
55 var x: [@sizeOf(@Frame(amain))]u8 = undefined;
66 _ = &x;
77}
test/cases/compile_errors/async/async_function_indirectly_depends_on_its_own_frame.zig+1-1
......@@ -1,7 +1,7 @@
11export fn entry() void {
22 _ = async amain();
33}
4fn amain() callconv(.Async) void {
4fn amain() callconv(.@"async") void {
55 other();
66}
77fn other() void {
test/cases/compile_errors/async/bad_alignment_in_asynccall.zig+2-2
......@@ -1,10 +1,10 @@
11export fn entry() void {
2 var ptr: fn () callconv(.Async) void = func;
2 var ptr: fn () callconv(.@"async") void = func;
33 var bytes: [64]u8 = undefined;
44 _ = @asyncCall(&bytes, {}, ptr, .{});
55 _ = &ptr;
66}
7fn func() callconv(.Async) void {}
7fn func() callconv(.@"async") void {}
88
99// error
1010// backend=stage1
test/cases/compile_errors/async/exported_async_function.zig+1-1
......@@ -1,4 +1,4 @@
1export fn foo() callconv(.Async) void {}
1export fn foo() callconv(.@"async") void {}
22
33// error
44// backend=stage1
test/cases/compile_errors/async/returning_error_from_void_async_function.zig+1-1
......@@ -1,7 +1,7 @@
11export fn entry() void {
22 _ = async amain();
33}
4fn amain() callconv(.Async) void {
4fn amain() callconv(.@"async") void {
55 return error.ShouldBeCompileError;
66}
77
test/cases/compile_errors/async/runtime-known_async_function_called.zig+1-1
......@@ -6,7 +6,7 @@ fn amain() void {
66 _ = ptr();
77 _ = &ptr;
88}
9fn afunc() callconv(.Async) void {}
9fn afunc() callconv(.@"async") void {}
1010
1111// error
1212// 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 {
44 _ = &ptr;
55}
66
7fn afunc() callconv(.Async) void {}
7fn afunc() callconv(.@"async") void {}
88
99// error
1010// backend=stage1
test/cases/compile_errors/call_from_naked_func.zig+4-4
......@@ -1,16 +1,16 @@
1export fn runtimeCall() callconv(.Naked) void {
1export fn runtimeCall() callconv(.naked) void {
22 f();
33}
44
5export fn runtimeBuiltinCall() callconv(.Naked) void {
5export fn runtimeBuiltinCall() callconv(.naked) void {
66 @call(.auto, f, .{});
77}
88
9export fn comptimeCall() callconv(.Naked) void {
9export fn comptimeCall() callconv(.naked) void {
1010 comptime f();
1111}
1212
13export fn comptimeBuiltinCall() callconv(.Naked) void {
13export fn comptimeBuiltinCall() callconv(.naked) void {
1414 @call(.compile_time, f, .{});
1515}
1616
test/cases/compile_errors/callconv_apcs_aapcs_aapcsvfp_on_unsupported_platform.zig+2-2
......@@ -1,5 +1,5 @@
1export fn entry2() callconv(.AAPCS) void {}
2export fn entry3() callconv(.AAPCSVFP) void {}
1export fn entry2() callconv(.{ .arm_aapcs = .{} }) void {}
2export fn entry3() callconv(.{ .arm_aapcs_vfp = .{} }) void {}
33
44// error
55// target=x86_64-linux-none
test/cases/compile_errors/callconv_interrupt_on_unsupported_platform.zig+6-2
......@@ -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
35// error
46// backend=stage2
57// target=aarch64-linux-none
68//
7// :1:29: error: calling convention 'Interrupt' is only available on x86, x86_64, AVR, and MSP430, not aarch64
9// :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 @@
11pub inline fn instanceRequestAdapter() void {}
22
33pub inline fn requestAdapter(
4 comptime callbackArg: fn () callconv(.Inline) void,
4 comptime callbackArg: fn () callconv(.@"inline") void,
55) void {
66 _ = &(struct {
77 pub fn callback() callconv(.c) void {
test/cases/compile_errors/invalid_func_for_callconv.zig+7-7
......@@ -1,12 +1,12 @@
1export fn interrupt_param1(_: u32) callconv(.Interrupt) void {}
2export fn interrupt_param2(_: *anyopaque, _: u32) callconv(.Interrupt) void {}
3export fn interrupt_param3(_: *anyopaque, _: u64, _: u32) callconv(.Interrupt) void {}
4export fn interrupt_ret(_: *anyopaque, _: u64) callconv(.Interrupt) u32 {
1export fn interrupt_param1(_: u32) callconv(.{ .x86_64_interrupt = .{} }) void {}
2export fn interrupt_param2(_: *anyopaque, _: u32) callconv(.{ .x86_64_interrupt = .{} }) void {}
3export fn interrupt_param3(_: *anyopaque, _: u64, _: u32) callconv(.{ .x86_64_interrupt = .{} }) void {}
4export fn interrupt_ret(_: *anyopaque, _: u64) callconv(.{ .x86_64_interrupt = .{} }) u32 {
55 return 0;
66}
77
8export fn signal_param(_: u32) callconv(.Signal) void {}
9export fn signal_ret() callconv(.Signal) noreturn {}
8export fn signal_param(_: u32) callconv(.avr_signal) void {}
9export fn signal_ret() callconv(.avr_signal) noreturn {}
1010
1111// error
1212// target=x86_64-linux
......@@ -14,6 +14,6 @@ export fn signal_ret() callconv(.Signal) noreturn {}
1414// :1:28: error: first parameter of function with 'x86_64_interrupt' calling convention must be a pointer type
1515// :2:43: error: second parameter of function with 'x86_64_interrupt' calling convention must be a 64-bit integer
1616// :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'
1818// :8:24: error: parameters are not allowed with 'avr_signal' calling convention
1919// :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 @@
1fn foo() callconv(.Naked) void {
1fn foo() callconv(.naked) void {
22 return;
33}
44
test/cases/compile_errors/stack_usage_in_naked_function.zig+4-4
......@@ -1,4 +1,4 @@
1export fn a() callconv(.Naked) noreturn {
1export fn a() callconv(.naked) noreturn {
22 var x: u32 = 10;
33 _ = &x;
44
......@@ -6,7 +6,7 @@ export fn a() callconv(.Naked) noreturn {
66 _ = y;
77}
88
9export fn b() callconv(.Naked) noreturn {
9export fn b() callconv(.naked) noreturn {
1010 var x = @as(u32, 10);
1111 _ = &x;
1212
......@@ -15,7 +15,7 @@ export fn b() callconv(.Naked) noreturn {
1515 _ = &z;
1616}
1717
18export fn c() callconv(.Naked) noreturn {
18export fn c() callconv(.naked) noreturn {
1919 const Foo = struct {
2020 y: u32,
2121 };
......@@ -24,7 +24,7 @@ export fn c() callconv(.Naked) noreturn {
2424 _ = &x;
2525}
2626
27export fn d() callconv(.Naked) noreturn {
27export fn d() callconv(.naked) noreturn {
2828 const Foo = struct {
2929 inline fn bar() void {
3030 var x: u32 = 10;
test/cases/compile_errors/unreachable_in_naked_func.zig+3-3
......@@ -1,13 +1,13 @@
1fn runtimeSafetyDefault() callconv(.Naked) void {
1fn runtimeSafetyDefault() callconv(.naked) void {
22 unreachable;
33}
44
5fn runtimeSafetyOn() callconv(.Naked) void {
5fn runtimeSafetyOn() callconv(.naked) void {
66 @setRuntimeSafety(true);
77 unreachable;
88}
99
10fn runtimeSafetyOff() callconv(.Naked) void {
10fn runtimeSafetyOff() callconv(.naked) void {
1111 @setRuntimeSafety(false);
1212 unreachable;
1313}
test/cases/safety/@asyncCall with too small a frame.zig +1-1
......@@ -18,7 +18,7 @@ pub fn main() !void {
1818 _ = &frame;
1919 return error.TestFailed;
2020}
21fn other() callconv(.Async) void {
21fn other() callconv(.@"async") void {
2222 suspend {}
2323}
2424// run
test/cases/safety/error return trace across suspend points.zig +1-1
......@@ -26,7 +26,7 @@ fn failing() anyerror!void {
2626 return second();
2727}
2828
29fn second() callconv(.Async) anyerror!void {
29fn second() callconv(.@"async") anyerror!void {
3030 return error.Fail;
3131}
3232
test/link/elf.zig+1-1
......@@ -931,7 +931,7 @@ fn testEmitStaticLib(b: *Build, opts: Options) *Step {
931931 const obj3 = addObject(b, opts, .{
932932 .name = "a_very_long_file_name_so_that_it_ends_up_in_strtab",
933933 .zig_source_bytes =
934 \\fn weakFoo() callconv(.C) usize {
934 \\fn weakFoo() callconv(.c) usize {
935935 \\ return 42;
936936 \\}
937937 \\export var strongBar: usize = 100;
test/link/glibc_compat/glibc_runtime_check.zig+1-1
......@@ -95,7 +95,7 @@ fn checkStrlcpy_v2_38() !void {
9595}
9696
9797// atexit is part of libc_nonshared, so ensure its linked in correctly
98fn forceExit0Callback() callconv(.C) void {
98fn forceExit0Callback() callconv(.c) void {
9999 std.c.exit(0); // Override the main() exit code
100100}
101101
test/link/macho.zig+3-3
......@@ -199,7 +199,7 @@ fn testDuplicateDefinitions(b: *Build, opts: Options) *Step {
199199 \\var x: usize = 1;
200200 \\export fn strong() void { x += 1; }
201201 \\comptime { @export(&weakImpl, .{ .name = "weak", .linkage = .weak }); }
202 \\fn weakImpl() callconv(.C) void { x += 1; }
202 \\fn weakImpl() callconv(.c) void { x += 1; }
203203 \\extern fn weak() void;
204204 \\pub fn main() void {
205205 \\ weak();
......@@ -937,7 +937,7 @@ fn testLinksection(b: *Build, opts: Options) *Step {
937937
938938 const obj = addObject(b, opts, .{ .name = "main", .zig_source_bytes =
939939 \\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 {
941941 \\ TestGenericFn("A").f();
942942 \\}
943943 \\fn TestGenericFn(comptime suffix: []const u8) type {
......@@ -2667,7 +2667,7 @@ fn testUnresolvedError2(b: *Build, opts: Options) *Step {
26672667 const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes =
26682668 \\pub fn main() !void {
26692669 \\ const msg_send_fn = @extern(
2670 \\ *const fn () callconv(.C) usize,
2670 \\ *const fn () callconv(.c) usize,
26712671 \\ .{ .name = "objc_msgSend$initWithContentRect:styleMask:backing:defer:screen:" },
26722672 \\ );
26732673 \\ _ = @call(
test/nvptx.zig+4-4
......@@ -15,7 +15,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void {
1515 \\ return a + b;
1616 \\}
1717 \\
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 {
1919 \\ const x = add(a, 7);
2020 \\ var y = add(2, 0);
2121 \\ y -= x;
......@@ -34,7 +34,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void {
3434 \\ );
3535 \\}
3636 \\
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 {
3838 \\ const i = threadIdX();
3939 \\ out[i] = a[i] + 7;
4040 \\}
......@@ -47,7 +47,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void {
4747 case.addCompile(
4848 \\var x: i32 addrspace(.global) = 0;
4949 \\
50 \\pub export fn increment(out: *i32) callconv(.Kernel) void {
50 \\pub export fn increment(out: *i32) callconv(.kernel) void {
5151 \\ x += 1;
5252 \\ out.* = x;
5353 \\}
......@@ -64,7 +64,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void {
6464 \\}
6565 \\
6666 \\ 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 {
6868 \\ var sdata: *addrspace(.generic) [1024]f32 = @addrSpaceCast(&_sdata);
6969 \\ const tid: u32 = threadIdX();
7070 \\ var sum = d_x[tid];
test/src/Debugger.zig+1-1
......@@ -677,7 +677,7 @@ pub fn addTestsForTarget(db: *Debugger, target: Target) void {
677677 \\ param6: u64,
678678 \\ param7: u64,
679679 \\ param8: u64,
680 \\) callconv(.C) void {
680 \\) callconv(.c) void {
681681 \\ const local_comptime_val: u64 = global_const *% global_const;
682682 \\ const local_comptime_ptr: struct { u64 } = .{ local_comptime_val *% local_comptime_val };
683683 \\ const local_const: u64 = global_var ^ global_threadlocal1 ^ global_threadlocal2 ^
test/standalone/extern/main.zig+2-2
......@@ -1,8 +1,8 @@
11const assert = @import("std").debug.assert;
22const testing = @import("std").testing;
33
4const updateHidden = @extern(*const fn (u32) callconv(.C) void, .{ .name = "updateHidden" });
5const getHidden = @extern(*const fn () callconv(.C) u32, .{ .name = "getHidden" });
4const updateHidden = @extern(*const fn (u32) callconv(.c) void, .{ .name = "updateHidden" });
5const getHidden = @extern(*const fn () callconv(.c) u32, .{ .name = "getHidden" });
66
77const T = extern struct { x: u32 };
88
test/standalone/install_raw_hex/main.zig+1-1
......@@ -1,3 +1,3 @@
1export fn _start() callconv(.C) noreturn {
1export fn _start() callconv(.c) noreturn {
22 while (true) {}
33}
test/standalone/issue_12706/main.zig+1-1
......@@ -3,7 +3,7 @@ extern fn testFnPtr(n: c_int, ...) void;
33
44const val: c_int = 123;
55
6fn func(a: c_int) callconv(.C) void {
6fn func(a: c_int) callconv(.c) void {
77 std.debug.assert(a == val);
88}
99
test/standalone/issue_8550/main.zig+1-1
......@@ -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 {
22 _ = r0;
33 _ = r1;
44 _ = atags;
test/standalone/load_dynamic_library/main.zig+1-1
......@@ -11,7 +11,7 @@ pub fn main() !void {
1111 var lib = try std.DynLib.open(dynlib_name);
1212 defer lib.close();
1313
14 const Add = *const fn (i32, i32) callconv(.C) i32;
14 const Add = *const fn (i32, i32) callconv(.c) i32;
1515 const addFn = lib.lookup(Add, "add") orelse return error.SymbolNotFound;
1616
1717 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 {
2323 frame4(expected, unwound);
2424}
2525
26fn frame2(expected: *[5]usize, unwound: *[5]usize) callconv(.C) void {
26fn frame2(expected: *[5]usize, unwound: *[5]usize) callconv(.c) void {
2727 expected[2] = @returnAddress();
2828 frame3(expected, unwound);
2929}
......@@ -31,7 +31,7 @@ fn frame2(expected: *[5]usize, unwound: *[5]usize) callconv(.C) void {
3131extern fn frame0(
3232 expected: *[5]usize,
3333 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,
3535) void;
3636
3737pub 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 {
3737}
3838
3939// No-OS entrypoint
40export fn _start() callconv(.C) noreturn {
40export fn _start() callconv(.c) noreturn {
4141 var expected: [4]usize = undefined;
4242 var unwound: [4]usize = undefined;
4343 frame0(&expected, &unwound);
tools/gen_outline_atomics.zig+1-1
......@@ -78,7 +78,7 @@ fn writeFunction(
7878 };
7979 const fn_sig = try std.fmt.allocPrint(
8080 arena,
81 "fn {[name]s}() align(16) callconv(.Naked) void {{",
81 "fn {[name]s}() align(16) callconv(.naked) void {{",
8282 .{ .name = name },
8383 );
8484 try w.writeAll(fn_sig);
tools/lldb_pretty_printers.py+2-2
......@@ -599,8 +599,8 @@ type_tag_handlers = {
599599 'slice_const_u8_sentinel_0': lambda payload: '[:0]const u8',
600600 'fn_noreturn_no_args': lambda payload: 'fn() noreturn',
601601 'fn_void_no_args': lambda payload: 'fn() void',
602 'fn_naked_noreturn_no_args': lambda payload: 'fn() callconv(.Naked) noreturn',
603 'fn_ccc_void_no_args': lambda payload: 'fn() callconv(.C) void',
602 'fn_naked_noreturn_no_args': lambda payload: 'fn() callconv(.naked) noreturn',
603 'fn_ccc_void_no_args': lambda payload: 'fn() callconv(.c) void',
604604 'single_const_pointer_to_comptime_int': lambda payload: '*const comptime_int',
605605 'manyptr_u8': lambda payload: '[*]u8',
606606 'manyptr_const_u8': lambda payload: '[*]const u8',