| author | |
| committer | |
| log | 79460d4a3eef8eb927b02a7eda8bc9999a766672 |
| tree | 8ce2cfb123bf590e8c522860ad04c13b6e6d9aa9 |
| parent | 05937b362a8206f7eca193a28617049371f11b26 |
251 files changed, 826 insertions(+), 822 deletions(-)
doc/langref/export_builtin.zig+1-1| ... | ... | @@ -2,6 +2,6 @@ comptime { |
| 2 | 2 | @export(&internalName, .{ .name = "foo", .linkage = .strong }); |
| 3 | 3 | } |
| 4 | 4 | |
| 5 | fn internalName() callconv(.C) void {} | |
| 5 | fn internalName() callconv(.c) void {} | |
| 6 | 6 | |
| 7 | 7 | // obj |
doc/langref/test_defining_variadic_function.zig+1-1| ... | ... | @@ -2,7 +2,7 @@ const std = @import("std"); |
| 2 | 2 | const testing = std.testing; |
| 3 | 3 | const builtin = @import("builtin"); |
| 4 | 4 | |
| 5 | fn add(count: c_int, ...) callconv(.C) c_int { | |
| 5 | fn add(count: c_int, ...) callconv(.c) c_int { | |
| 6 | 6 | var ap = @cVaStart(); |
| 7 | 7 | defer @cVaEnd(&ap); |
| 8 | 8 | var i: usize = 0; |
doc/langref/test_functions.zig+1-1| ... | ... | @@ -35,7 +35,7 @@ fn abort() noreturn { |
| 35 | 35 | |
| 36 | 36 | // The naked calling convention makes a function not have any function prologue or epilogue. |
| 37 | 37 | // This can be useful when integrating with assembly. |
| 38 | fn _start() callconv(.Naked) noreturn { | |
| 38 | fn _start() callconv(.naked) noreturn { | |
| 39 | 39 | abort(); |
| 40 | 40 | } |
| 41 | 41 |
doc/langref/test_opaque.zig+1-1| ... | ... | @@ -2,7 +2,7 @@ const Derp = opaque {}; |
| 2 | 2 | const Wat = opaque {}; |
| 3 | 3 | |
| 4 | 4 | extern fn bar(d: *Derp) void; |
| 5 | fn foo(w: *Wat) callconv(.C) void { | |
| 5 | fn foo(w: *Wat) callconv(.c) void { | |
| 6 | 6 | bar(w); |
| 7 | 7 | } |
| 8 | 8 |
lib/c.zig+9-9| ... | ... | @@ -54,11 +54,11 @@ pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, _: ? |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | extern fn main(argc: c_int, argv: [*:null]?[*:0]u8) c_int; |
| 57 | fn wasm_start() callconv(.C) void { | |
| 57 | fn wasm_start() callconv(.c) void { | |
| 58 | 58 | _ = main(0, undefined); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | fn strcpy(dest: [*:0]u8, src: [*:0]const u8) callconv(.C) [*:0]u8 { | |
| 61 | fn strcpy(dest: [*:0]u8, src: [*:0]const u8) callconv(.c) [*:0]u8 { | |
| 62 | 62 | var i: usize = 0; |
| 63 | 63 | while (src[i] != 0) : (i += 1) { |
| 64 | 64 | dest[i] = src[i]; |
| ... | ... | @@ -76,7 +76,7 @@ test "strcpy" { |
| 76 | 76 | try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0)); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | fn strncpy(dest: [*:0]u8, src: [*:0]const u8, n: usize) callconv(.C) [*:0]u8 { | |
| 79 | fn strncpy(dest: [*:0]u8, src: [*:0]const u8, n: usize) callconv(.c) [*:0]u8 { | |
| 80 | 80 | var i: usize = 0; |
| 81 | 81 | while (i < n and src[i] != 0) : (i += 1) { |
| 82 | 82 | dest[i] = src[i]; |
| ... | ... | @@ -96,7 +96,7 @@ test "strncpy" { |
| 96 | 96 | try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0)); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | fn strcat(dest: [*:0]u8, src: [*:0]const u8) callconv(.C) [*:0]u8 { | |
| 99 | fn strcat(dest: [*:0]u8, src: [*:0]const u8) callconv(.c) [*:0]u8 { | |
| 100 | 100 | var dest_end: usize = 0; |
| 101 | 101 | while (dest[dest_end] != 0) : (dest_end += 1) {} |
| 102 | 102 | |
| ... | ... | @@ -119,7 +119,7 @@ test "strcat" { |
| 119 | 119 | try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0)); |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | fn strncat(dest: [*:0]u8, src: [*:0]const u8, avail: usize) callconv(.C) [*:0]u8 { | |
| 122 | fn strncat(dest: [*:0]u8, src: [*:0]const u8, avail: usize) callconv(.c) [*:0]u8 { | |
| 123 | 123 | var dest_end: usize = 0; |
| 124 | 124 | while (dest[dest_end] != 0) : (dest_end += 1) {} |
| 125 | 125 | |
| ... | ... | @@ -142,7 +142,7 @@ test "strncat" { |
| 142 | 142 | try std.testing.expectEqualSlices(u8, "foobarbaz", std.mem.sliceTo(&s1, 0)); |
| 143 | 143 | } |
| 144 | 144 | |
| 145 | fn strcmp(s1: [*:0]const u8, s2: [*:0]const u8) callconv(.C) c_int { | |
| 145 | fn strcmp(s1: [*:0]const u8, s2: [*:0]const u8) callconv(.c) c_int { | |
| 146 | 146 | return switch (std.mem.orderZ(u8, s1, s2)) { |
| 147 | 147 | .lt => -1, |
| 148 | 148 | .eq => 0, |
| ... | ... | @@ -150,11 +150,11 @@ fn strcmp(s1: [*:0]const u8, s2: [*:0]const u8) callconv(.C) c_int { |
| 150 | 150 | }; |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | fn strlen(s: [*:0]const u8) callconv(.C) usize { | |
| 153 | fn strlen(s: [*:0]const u8) callconv(.c) usize { | |
| 154 | 154 | return std.mem.len(s); |
| 155 | 155 | } |
| 156 | 156 | |
| 157 | fn strncmp(_l: [*:0]const u8, _r: [*:0]const u8, _n: usize) callconv(.C) c_int { | |
| 157 | fn strncmp(_l: [*:0]const u8, _r: [*:0]const u8, _n: usize) callconv(.c) c_int { | |
| 158 | 158 | if (_n == 0) return 0; |
| 159 | 159 | var l = _l; |
| 160 | 160 | var r = _r; |
| ... | ... | @@ -167,7 +167,7 @@ fn strncmp(_l: [*:0]const u8, _r: [*:0]const u8, _n: usize) callconv(.C) c_int { |
| 167 | 167 | return @as(c_int, l[0]) - @as(c_int, r[0]); |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | fn strerror(errnum: c_int) callconv(.C) [*:0]const u8 { | |
| 170 | fn strerror(errnum: c_int) callconv(.c) [*:0]const u8 { | |
| 171 | 171 | _ = errnum; |
| 172 | 172 | return "TODO strerror implementation"; |
| 173 | 173 | } |
lib/compiler/test_runner.zig+2-2| ... | ... | @@ -350,7 +350,7 @@ var is_fuzz_test: bool = undefined; |
| 350 | 350 | extern fn fuzzer_set_name(name_ptr: [*]const u8, name_len: usize) void; |
| 351 | 351 | extern fn fuzzer_init(cache_dir: FuzzerSlice) void; |
| 352 | 352 | extern fn fuzzer_init_corpus_elem(input_ptr: [*]const u8, input_len: usize) void; |
| 353 | extern fn fuzzer_start(testOne: *const fn ([*]const u8, usize) callconv(.C) void) void; | |
| 353 | extern fn fuzzer_start(testOne: *const fn ([*]const u8, usize) callconv(.c) void) void; | |
| 354 | 354 | extern fn fuzzer_coverage_id() u64; |
| 355 | 355 | |
| 356 | 356 | pub fn fuzz( |
| ... | ... | @@ -382,7 +382,7 @@ pub fn fuzz( |
| 382 | 382 | const global = struct { |
| 383 | 383 | var ctx: @TypeOf(context) = undefined; |
| 384 | 384 | |
| 385 | fn fuzzer_one(input_ptr: [*]const u8, input_len: usize) callconv(.C) void { | |
| 385 | fn fuzzer_one(input_ptr: [*]const u8, input_len: usize) callconv(.c) void { | |
| 386 | 386 | @disableInstrumentation(); |
| 387 | 387 | testing.allocator_instance = .{}; |
| 388 | 388 | defer if (testing.allocator_instance.deinit() == .leak) std.process.exit(1); |
lib/compiler_rt/aarch64_outline_atomics.zig+100-100| ... | ... | @@ -10,7 +10,7 @@ const always_has_lse = std.Target.aarch64.featureSetHas(builtin.cpu.features, .l |
| 10 | 10 | /// which ARM is concerned would have too much overhead. |
| 11 | 11 | var __aarch64_have_lse_atomics: u8 = @intFromBool(always_has_lse); |
| 12 | 12 | |
| 13 | fn __aarch64_cas1_relax() align(16) callconv(.Naked) void { | |
| 13 | fn __aarch64_cas1_relax() align(16) callconv(.naked) void { | |
| 14 | 14 | @setRuntimeSafety(false); |
| 15 | 15 | asm volatile ( |
| 16 | 16 | \\ cbz w16, 8f |
| ... | ... | @@ -32,7 +32,7 @@ fn __aarch64_cas1_relax() align(16) callconv(.Naked) void { |
| 32 | 32 | ); |
| 33 | 33 | unreachable; |
| 34 | 34 | } |
| 35 | fn __aarch64_swp1_relax() align(16) callconv(.Naked) void { | |
| 35 | fn __aarch64_swp1_relax() align(16) callconv(.naked) void { | |
| 36 | 36 | @setRuntimeSafety(false); |
| 37 | 37 | asm volatile ( |
| 38 | 38 | \\ cbz w16, 8f |
| ... | ... | @@ -52,7 +52,7 @@ fn __aarch64_swp1_relax() align(16) callconv(.Naked) void { |
| 52 | 52 | ); |
| 53 | 53 | unreachable; |
| 54 | 54 | } |
| 55 | fn __aarch64_ldadd1_relax() align(16) callconv(.Naked) void { | |
| 55 | fn __aarch64_ldadd1_relax() align(16) callconv(.naked) void { | |
| 56 | 56 | @setRuntimeSafety(false); |
| 57 | 57 | asm volatile ( |
| 58 | 58 | \\ cbz w16, 8f |
| ... | ... | @@ -73,7 +73,7 @@ fn __aarch64_ldadd1_relax() align(16) callconv(.Naked) void { |
| 73 | 73 | ); |
| 74 | 74 | unreachable; |
| 75 | 75 | } |
| 76 | fn __aarch64_ldclr1_relax() align(16) callconv(.Naked) void { | |
| 76 | fn __aarch64_ldclr1_relax() align(16) callconv(.naked) void { | |
| 77 | 77 | @setRuntimeSafety(false); |
| 78 | 78 | asm volatile ( |
| 79 | 79 | \\ cbz w16, 8f |
| ... | ... | @@ -94,7 +94,7 @@ fn __aarch64_ldclr1_relax() align(16) callconv(.Naked) void { |
| 94 | 94 | ); |
| 95 | 95 | unreachable; |
| 96 | 96 | } |
| 97 | fn __aarch64_ldeor1_relax() align(16) callconv(.Naked) void { | |
| 97 | fn __aarch64_ldeor1_relax() align(16) callconv(.naked) void { | |
| 98 | 98 | @setRuntimeSafety(false); |
| 99 | 99 | asm volatile ( |
| 100 | 100 | \\ cbz w16, 8f |
| ... | ... | @@ -115,7 +115,7 @@ fn __aarch64_ldeor1_relax() align(16) callconv(.Naked) void { |
| 115 | 115 | ); |
| 116 | 116 | unreachable; |
| 117 | 117 | } |
| 118 | fn __aarch64_ldset1_relax() align(16) callconv(.Naked) void { | |
| 118 | fn __aarch64_ldset1_relax() align(16) callconv(.naked) void { | |
| 119 | 119 | @setRuntimeSafety(false); |
| 120 | 120 | asm volatile ( |
| 121 | 121 | \\ cbz w16, 8f |
| ... | ... | @@ -136,7 +136,7 @@ fn __aarch64_ldset1_relax() align(16) callconv(.Naked) void { |
| 136 | 136 | ); |
| 137 | 137 | unreachable; |
| 138 | 138 | } |
| 139 | fn __aarch64_cas1_acq() align(16) callconv(.Naked) void { | |
| 139 | fn __aarch64_cas1_acq() align(16) callconv(.naked) void { | |
| 140 | 140 | @setRuntimeSafety(false); |
| 141 | 141 | asm volatile ( |
| 142 | 142 | \\ cbz w16, 8f |
| ... | ... | @@ -158,7 +158,7 @@ fn __aarch64_cas1_acq() align(16) callconv(.Naked) void { |
| 158 | 158 | ); |
| 159 | 159 | unreachable; |
| 160 | 160 | } |
| 161 | fn __aarch64_swp1_acq() align(16) callconv(.Naked) void { | |
| 161 | fn __aarch64_swp1_acq() align(16) callconv(.naked) void { | |
| 162 | 162 | @setRuntimeSafety(false); |
| 163 | 163 | asm volatile ( |
| 164 | 164 | \\ cbz w16, 8f |
| ... | ... | @@ -178,7 +178,7 @@ fn __aarch64_swp1_acq() align(16) callconv(.Naked) void { |
| 178 | 178 | ); |
| 179 | 179 | unreachable; |
| 180 | 180 | } |
| 181 | fn __aarch64_ldadd1_acq() align(16) callconv(.Naked) void { | |
| 181 | fn __aarch64_ldadd1_acq() align(16) callconv(.naked) void { | |
| 182 | 182 | @setRuntimeSafety(false); |
| 183 | 183 | asm volatile ( |
| 184 | 184 | \\ cbz w16, 8f |
| ... | ... | @@ -199,7 +199,7 @@ fn __aarch64_ldadd1_acq() align(16) callconv(.Naked) void { |
| 199 | 199 | ); |
| 200 | 200 | unreachable; |
| 201 | 201 | } |
| 202 | fn __aarch64_ldclr1_acq() align(16) callconv(.Naked) void { | |
| 202 | fn __aarch64_ldclr1_acq() align(16) callconv(.naked) void { | |
| 203 | 203 | @setRuntimeSafety(false); |
| 204 | 204 | asm volatile ( |
| 205 | 205 | \\ cbz w16, 8f |
| ... | ... | @@ -220,7 +220,7 @@ fn __aarch64_ldclr1_acq() align(16) callconv(.Naked) void { |
| 220 | 220 | ); |
| 221 | 221 | unreachable; |
| 222 | 222 | } |
| 223 | fn __aarch64_ldeor1_acq() align(16) callconv(.Naked) void { | |
| 223 | fn __aarch64_ldeor1_acq() align(16) callconv(.naked) void { | |
| 224 | 224 | @setRuntimeSafety(false); |
| 225 | 225 | asm volatile ( |
| 226 | 226 | \\ cbz w16, 8f |
| ... | ... | @@ -241,7 +241,7 @@ fn __aarch64_ldeor1_acq() align(16) callconv(.Naked) void { |
| 241 | 241 | ); |
| 242 | 242 | unreachable; |
| 243 | 243 | } |
| 244 | fn __aarch64_ldset1_acq() align(16) callconv(.Naked) void { | |
| 244 | fn __aarch64_ldset1_acq() align(16) callconv(.naked) void { | |
| 245 | 245 | @setRuntimeSafety(false); |
| 246 | 246 | asm volatile ( |
| 247 | 247 | \\ cbz w16, 8f |
| ... | ... | @@ -262,7 +262,7 @@ fn __aarch64_ldset1_acq() align(16) callconv(.Naked) void { |
| 262 | 262 | ); |
| 263 | 263 | unreachable; |
| 264 | 264 | } |
| 265 | fn __aarch64_cas1_rel() align(16) callconv(.Naked) void { | |
| 265 | fn __aarch64_cas1_rel() align(16) callconv(.naked) void { | |
| 266 | 266 | @setRuntimeSafety(false); |
| 267 | 267 | asm volatile ( |
| 268 | 268 | \\ cbz w16, 8f |
| ... | ... | @@ -284,7 +284,7 @@ fn __aarch64_cas1_rel() align(16) callconv(.Naked) void { |
| 284 | 284 | ); |
| 285 | 285 | unreachable; |
| 286 | 286 | } |
| 287 | fn __aarch64_swp1_rel() align(16) callconv(.Naked) void { | |
| 287 | fn __aarch64_swp1_rel() align(16) callconv(.naked) void { | |
| 288 | 288 | @setRuntimeSafety(false); |
| 289 | 289 | asm volatile ( |
| 290 | 290 | \\ cbz w16, 8f |
| ... | ... | @@ -304,7 +304,7 @@ fn __aarch64_swp1_rel() align(16) callconv(.Naked) void { |
| 304 | 304 | ); |
| 305 | 305 | unreachable; |
| 306 | 306 | } |
| 307 | fn __aarch64_ldadd1_rel() align(16) callconv(.Naked) void { | |
| 307 | fn __aarch64_ldadd1_rel() align(16) callconv(.naked) void { | |
| 308 | 308 | @setRuntimeSafety(false); |
| 309 | 309 | asm volatile ( |
| 310 | 310 | \\ cbz w16, 8f |
| ... | ... | @@ -325,7 +325,7 @@ fn __aarch64_ldadd1_rel() align(16) callconv(.Naked) void { |
| 325 | 325 | ); |
| 326 | 326 | unreachable; |
| 327 | 327 | } |
| 328 | fn __aarch64_ldclr1_rel() align(16) callconv(.Naked) void { | |
| 328 | fn __aarch64_ldclr1_rel() align(16) callconv(.naked) void { | |
| 329 | 329 | @setRuntimeSafety(false); |
| 330 | 330 | asm volatile ( |
| 331 | 331 | \\ cbz w16, 8f |
| ... | ... | @@ -346,7 +346,7 @@ fn __aarch64_ldclr1_rel() align(16) callconv(.Naked) void { |
| 346 | 346 | ); |
| 347 | 347 | unreachable; |
| 348 | 348 | } |
| 349 | fn __aarch64_ldeor1_rel() align(16) callconv(.Naked) void { | |
| 349 | fn __aarch64_ldeor1_rel() align(16) callconv(.naked) void { | |
| 350 | 350 | @setRuntimeSafety(false); |
| 351 | 351 | asm volatile ( |
| 352 | 352 | \\ cbz w16, 8f |
| ... | ... | @@ -367,7 +367,7 @@ fn __aarch64_ldeor1_rel() align(16) callconv(.Naked) void { |
| 367 | 367 | ); |
| 368 | 368 | unreachable; |
| 369 | 369 | } |
| 370 | fn __aarch64_ldset1_rel() align(16) callconv(.Naked) void { | |
| 370 | fn __aarch64_ldset1_rel() align(16) callconv(.naked) void { | |
| 371 | 371 | @setRuntimeSafety(false); |
| 372 | 372 | asm volatile ( |
| 373 | 373 | \\ cbz w16, 8f |
| ... | ... | @@ -388,7 +388,7 @@ fn __aarch64_ldset1_rel() align(16) callconv(.Naked) void { |
| 388 | 388 | ); |
| 389 | 389 | unreachable; |
| 390 | 390 | } |
| 391 | fn __aarch64_cas1_acq_rel() align(16) callconv(.Naked) void { | |
| 391 | fn __aarch64_cas1_acq_rel() align(16) callconv(.naked) void { | |
| 392 | 392 | @setRuntimeSafety(false); |
| 393 | 393 | asm volatile ( |
| 394 | 394 | \\ cbz w16, 8f |
| ... | ... | @@ -410,7 +410,7 @@ fn __aarch64_cas1_acq_rel() align(16) callconv(.Naked) void { |
| 410 | 410 | ); |
| 411 | 411 | unreachable; |
| 412 | 412 | } |
| 413 | fn __aarch64_swp1_acq_rel() align(16) callconv(.Naked) void { | |
| 413 | fn __aarch64_swp1_acq_rel() align(16) callconv(.naked) void { | |
| 414 | 414 | @setRuntimeSafety(false); |
| 415 | 415 | asm volatile ( |
| 416 | 416 | \\ cbz w16, 8f |
| ... | ... | @@ -430,7 +430,7 @@ fn __aarch64_swp1_acq_rel() align(16) callconv(.Naked) void { |
| 430 | 430 | ); |
| 431 | 431 | unreachable; |
| 432 | 432 | } |
| 433 | fn __aarch64_ldadd1_acq_rel() align(16) callconv(.Naked) void { | |
| 433 | fn __aarch64_ldadd1_acq_rel() align(16) callconv(.naked) void { | |
| 434 | 434 | @setRuntimeSafety(false); |
| 435 | 435 | asm volatile ( |
| 436 | 436 | \\ cbz w16, 8f |
| ... | ... | @@ -451,7 +451,7 @@ fn __aarch64_ldadd1_acq_rel() align(16) callconv(.Naked) void { |
| 451 | 451 | ); |
| 452 | 452 | unreachable; |
| 453 | 453 | } |
| 454 | fn __aarch64_ldclr1_acq_rel() align(16) callconv(.Naked) void { | |
| 454 | fn __aarch64_ldclr1_acq_rel() align(16) callconv(.naked) void { | |
| 455 | 455 | @setRuntimeSafety(false); |
| 456 | 456 | asm volatile ( |
| 457 | 457 | \\ cbz w16, 8f |
| ... | ... | @@ -472,7 +472,7 @@ fn __aarch64_ldclr1_acq_rel() align(16) callconv(.Naked) void { |
| 472 | 472 | ); |
| 473 | 473 | unreachable; |
| 474 | 474 | } |
| 475 | fn __aarch64_ldeor1_acq_rel() align(16) callconv(.Naked) void { | |
| 475 | fn __aarch64_ldeor1_acq_rel() align(16) callconv(.naked) void { | |
| 476 | 476 | @setRuntimeSafety(false); |
| 477 | 477 | asm volatile ( |
| 478 | 478 | \\ cbz w16, 8f |
| ... | ... | @@ -493,7 +493,7 @@ fn __aarch64_ldeor1_acq_rel() align(16) callconv(.Naked) void { |
| 493 | 493 | ); |
| 494 | 494 | unreachable; |
| 495 | 495 | } |
| 496 | fn __aarch64_ldset1_acq_rel() align(16) callconv(.Naked) void { | |
| 496 | fn __aarch64_ldset1_acq_rel() align(16) callconv(.naked) void { | |
| 497 | 497 | @setRuntimeSafety(false); |
| 498 | 498 | asm volatile ( |
| 499 | 499 | \\ cbz w16, 8f |
| ... | ... | @@ -514,7 +514,7 @@ fn __aarch64_ldset1_acq_rel() align(16) callconv(.Naked) void { |
| 514 | 514 | ); |
| 515 | 515 | unreachable; |
| 516 | 516 | } |
| 517 | fn __aarch64_cas2_relax() align(16) callconv(.Naked) void { | |
| 517 | fn __aarch64_cas2_relax() align(16) callconv(.naked) void { | |
| 518 | 518 | @setRuntimeSafety(false); |
| 519 | 519 | asm volatile ( |
| 520 | 520 | \\ cbz w16, 8f |
| ... | ... | @@ -536,7 +536,7 @@ fn __aarch64_cas2_relax() align(16) callconv(.Naked) void { |
| 536 | 536 | ); |
| 537 | 537 | unreachable; |
| 538 | 538 | } |
| 539 | fn __aarch64_swp2_relax() align(16) callconv(.Naked) void { | |
| 539 | fn __aarch64_swp2_relax() align(16) callconv(.naked) void { | |
| 540 | 540 | @setRuntimeSafety(false); |
| 541 | 541 | asm volatile ( |
| 542 | 542 | \\ cbz w16, 8f |
| ... | ... | @@ -556,7 +556,7 @@ fn __aarch64_swp2_relax() align(16) callconv(.Naked) void { |
| 556 | 556 | ); |
| 557 | 557 | unreachable; |
| 558 | 558 | } |
| 559 | fn __aarch64_ldadd2_relax() align(16) callconv(.Naked) void { | |
| 559 | fn __aarch64_ldadd2_relax() align(16) callconv(.naked) void { | |
| 560 | 560 | @setRuntimeSafety(false); |
| 561 | 561 | asm volatile ( |
| 562 | 562 | \\ cbz w16, 8f |
| ... | ... | @@ -577,7 +577,7 @@ fn __aarch64_ldadd2_relax() align(16) callconv(.Naked) void { |
| 577 | 577 | ); |
| 578 | 578 | unreachable; |
| 579 | 579 | } |
| 580 | fn __aarch64_ldclr2_relax() align(16) callconv(.Naked) void { | |
| 580 | fn __aarch64_ldclr2_relax() align(16) callconv(.naked) void { | |
| 581 | 581 | @setRuntimeSafety(false); |
| 582 | 582 | asm volatile ( |
| 583 | 583 | \\ cbz w16, 8f |
| ... | ... | @@ -598,7 +598,7 @@ fn __aarch64_ldclr2_relax() align(16) callconv(.Naked) void { |
| 598 | 598 | ); |
| 599 | 599 | unreachable; |
| 600 | 600 | } |
| 601 | fn __aarch64_ldeor2_relax() align(16) callconv(.Naked) void { | |
| 601 | fn __aarch64_ldeor2_relax() align(16) callconv(.naked) void { | |
| 602 | 602 | @setRuntimeSafety(false); |
| 603 | 603 | asm volatile ( |
| 604 | 604 | \\ cbz w16, 8f |
| ... | ... | @@ -619,7 +619,7 @@ fn __aarch64_ldeor2_relax() align(16) callconv(.Naked) void { |
| 619 | 619 | ); |
| 620 | 620 | unreachable; |
| 621 | 621 | } |
| 622 | fn __aarch64_ldset2_relax() align(16) callconv(.Naked) void { | |
| 622 | fn __aarch64_ldset2_relax() align(16) callconv(.naked) void { | |
| 623 | 623 | @setRuntimeSafety(false); |
| 624 | 624 | asm volatile ( |
| 625 | 625 | \\ cbz w16, 8f |
| ... | ... | @@ -640,7 +640,7 @@ fn __aarch64_ldset2_relax() align(16) callconv(.Naked) void { |
| 640 | 640 | ); |
| 641 | 641 | unreachable; |
| 642 | 642 | } |
| 643 | fn __aarch64_cas2_acq() align(16) callconv(.Naked) void { | |
| 643 | fn __aarch64_cas2_acq() align(16) callconv(.naked) void { | |
| 644 | 644 | @setRuntimeSafety(false); |
| 645 | 645 | asm volatile ( |
| 646 | 646 | \\ cbz w16, 8f |
| ... | ... | @@ -662,7 +662,7 @@ fn __aarch64_cas2_acq() align(16) callconv(.Naked) void { |
| 662 | 662 | ); |
| 663 | 663 | unreachable; |
| 664 | 664 | } |
| 665 | fn __aarch64_swp2_acq() align(16) callconv(.Naked) void { | |
| 665 | fn __aarch64_swp2_acq() align(16) callconv(.naked) void { | |
| 666 | 666 | @setRuntimeSafety(false); |
| 667 | 667 | asm volatile ( |
| 668 | 668 | \\ cbz w16, 8f |
| ... | ... | @@ -682,7 +682,7 @@ fn __aarch64_swp2_acq() align(16) callconv(.Naked) void { |
| 682 | 682 | ); |
| 683 | 683 | unreachable; |
| 684 | 684 | } |
| 685 | fn __aarch64_ldadd2_acq() align(16) callconv(.Naked) void { | |
| 685 | fn __aarch64_ldadd2_acq() align(16) callconv(.naked) void { | |
| 686 | 686 | @setRuntimeSafety(false); |
| 687 | 687 | asm volatile ( |
| 688 | 688 | \\ cbz w16, 8f |
| ... | ... | @@ -703,7 +703,7 @@ fn __aarch64_ldadd2_acq() align(16) callconv(.Naked) void { |
| 703 | 703 | ); |
| 704 | 704 | unreachable; |
| 705 | 705 | } |
| 706 | fn __aarch64_ldclr2_acq() align(16) callconv(.Naked) void { | |
| 706 | fn __aarch64_ldclr2_acq() align(16) callconv(.naked) void { | |
| 707 | 707 | @setRuntimeSafety(false); |
| 708 | 708 | asm volatile ( |
| 709 | 709 | \\ cbz w16, 8f |
| ... | ... | @@ -724,7 +724,7 @@ fn __aarch64_ldclr2_acq() align(16) callconv(.Naked) void { |
| 724 | 724 | ); |
| 725 | 725 | unreachable; |
| 726 | 726 | } |
| 727 | fn __aarch64_ldeor2_acq() align(16) callconv(.Naked) void { | |
| 727 | fn __aarch64_ldeor2_acq() align(16) callconv(.naked) void { | |
| 728 | 728 | @setRuntimeSafety(false); |
| 729 | 729 | asm volatile ( |
| 730 | 730 | \\ cbz w16, 8f |
| ... | ... | @@ -745,7 +745,7 @@ fn __aarch64_ldeor2_acq() align(16) callconv(.Naked) void { |
| 745 | 745 | ); |
| 746 | 746 | unreachable; |
| 747 | 747 | } |
| 748 | fn __aarch64_ldset2_acq() align(16) callconv(.Naked) void { | |
| 748 | fn __aarch64_ldset2_acq() align(16) callconv(.naked) void { | |
| 749 | 749 | @setRuntimeSafety(false); |
| 750 | 750 | asm volatile ( |
| 751 | 751 | \\ cbz w16, 8f |
| ... | ... | @@ -766,7 +766,7 @@ fn __aarch64_ldset2_acq() align(16) callconv(.Naked) void { |
| 766 | 766 | ); |
| 767 | 767 | unreachable; |
| 768 | 768 | } |
| 769 | fn __aarch64_cas2_rel() align(16) callconv(.Naked) void { | |
| 769 | fn __aarch64_cas2_rel() align(16) callconv(.naked) void { | |
| 770 | 770 | @setRuntimeSafety(false); |
| 771 | 771 | asm volatile ( |
| 772 | 772 | \\ cbz w16, 8f |
| ... | ... | @@ -788,7 +788,7 @@ fn __aarch64_cas2_rel() align(16) callconv(.Naked) void { |
| 788 | 788 | ); |
| 789 | 789 | unreachable; |
| 790 | 790 | } |
| 791 | fn __aarch64_swp2_rel() align(16) callconv(.Naked) void { | |
| 791 | fn __aarch64_swp2_rel() align(16) callconv(.naked) void { | |
| 792 | 792 | @setRuntimeSafety(false); |
| 793 | 793 | asm volatile ( |
| 794 | 794 | \\ cbz w16, 8f |
| ... | ... | @@ -808,7 +808,7 @@ fn __aarch64_swp2_rel() align(16) callconv(.Naked) void { |
| 808 | 808 | ); |
| 809 | 809 | unreachable; |
| 810 | 810 | } |
| 811 | fn __aarch64_ldadd2_rel() align(16) callconv(.Naked) void { | |
| 811 | fn __aarch64_ldadd2_rel() align(16) callconv(.naked) void { | |
| 812 | 812 | @setRuntimeSafety(false); |
| 813 | 813 | asm volatile ( |
| 814 | 814 | \\ cbz w16, 8f |
| ... | ... | @@ -829,7 +829,7 @@ fn __aarch64_ldadd2_rel() align(16) callconv(.Naked) void { |
| 829 | 829 | ); |
| 830 | 830 | unreachable; |
| 831 | 831 | } |
| 832 | fn __aarch64_ldclr2_rel() align(16) callconv(.Naked) void { | |
| 832 | fn __aarch64_ldclr2_rel() align(16) callconv(.naked) void { | |
| 833 | 833 | @setRuntimeSafety(false); |
| 834 | 834 | asm volatile ( |
| 835 | 835 | \\ cbz w16, 8f |
| ... | ... | @@ -850,7 +850,7 @@ fn __aarch64_ldclr2_rel() align(16) callconv(.Naked) void { |
| 850 | 850 | ); |
| 851 | 851 | unreachable; |
| 852 | 852 | } |
| 853 | fn __aarch64_ldeor2_rel() align(16) callconv(.Naked) void { | |
| 853 | fn __aarch64_ldeor2_rel() align(16) callconv(.naked) void { | |
| 854 | 854 | @setRuntimeSafety(false); |
| 855 | 855 | asm volatile ( |
| 856 | 856 | \\ cbz w16, 8f |
| ... | ... | @@ -871,7 +871,7 @@ fn __aarch64_ldeor2_rel() align(16) callconv(.Naked) void { |
| 871 | 871 | ); |
| 872 | 872 | unreachable; |
| 873 | 873 | } |
| 874 | fn __aarch64_ldset2_rel() align(16) callconv(.Naked) void { | |
| 874 | fn __aarch64_ldset2_rel() align(16) callconv(.naked) void { | |
| 875 | 875 | @setRuntimeSafety(false); |
| 876 | 876 | asm volatile ( |
| 877 | 877 | \\ cbz w16, 8f |
| ... | ... | @@ -892,7 +892,7 @@ fn __aarch64_ldset2_rel() align(16) callconv(.Naked) void { |
| 892 | 892 | ); |
| 893 | 893 | unreachable; |
| 894 | 894 | } |
| 895 | fn __aarch64_cas2_acq_rel() align(16) callconv(.Naked) void { | |
| 895 | fn __aarch64_cas2_acq_rel() align(16) callconv(.naked) void { | |
| 896 | 896 | @setRuntimeSafety(false); |
| 897 | 897 | asm volatile ( |
| 898 | 898 | \\ cbz w16, 8f |
| ... | ... | @@ -914,7 +914,7 @@ fn __aarch64_cas2_acq_rel() align(16) callconv(.Naked) void { |
| 914 | 914 | ); |
| 915 | 915 | unreachable; |
| 916 | 916 | } |
| 917 | fn __aarch64_swp2_acq_rel() align(16) callconv(.Naked) void { | |
| 917 | fn __aarch64_swp2_acq_rel() align(16) callconv(.naked) void { | |
| 918 | 918 | @setRuntimeSafety(false); |
| 919 | 919 | asm volatile ( |
| 920 | 920 | \\ cbz w16, 8f |
| ... | ... | @@ -934,7 +934,7 @@ fn __aarch64_swp2_acq_rel() align(16) callconv(.Naked) void { |
| 934 | 934 | ); |
| 935 | 935 | unreachable; |
| 936 | 936 | } |
| 937 | fn __aarch64_ldadd2_acq_rel() align(16) callconv(.Naked) void { | |
| 937 | fn __aarch64_ldadd2_acq_rel() align(16) callconv(.naked) void { | |
| 938 | 938 | @setRuntimeSafety(false); |
| 939 | 939 | asm volatile ( |
| 940 | 940 | \\ cbz w16, 8f |
| ... | ... | @@ -955,7 +955,7 @@ fn __aarch64_ldadd2_acq_rel() align(16) callconv(.Naked) void { |
| 955 | 955 | ); |
| 956 | 956 | unreachable; |
| 957 | 957 | } |
| 958 | fn __aarch64_ldclr2_acq_rel() align(16) callconv(.Naked) void { | |
| 958 | fn __aarch64_ldclr2_acq_rel() align(16) callconv(.naked) void { | |
| 959 | 959 | @setRuntimeSafety(false); |
| 960 | 960 | asm volatile ( |
| 961 | 961 | \\ cbz w16, 8f |
| ... | ... | @@ -976,7 +976,7 @@ fn __aarch64_ldclr2_acq_rel() align(16) callconv(.Naked) void { |
| 976 | 976 | ); |
| 977 | 977 | unreachable; |
| 978 | 978 | } |
| 979 | fn __aarch64_ldeor2_acq_rel() align(16) callconv(.Naked) void { | |
| 979 | fn __aarch64_ldeor2_acq_rel() align(16) callconv(.naked) void { | |
| 980 | 980 | @setRuntimeSafety(false); |
| 981 | 981 | asm volatile ( |
| 982 | 982 | \\ cbz w16, 8f |
| ... | ... | @@ -997,7 +997,7 @@ fn __aarch64_ldeor2_acq_rel() align(16) callconv(.Naked) void { |
| 997 | 997 | ); |
| 998 | 998 | unreachable; |
| 999 | 999 | } |
| 1000 | fn __aarch64_ldset2_acq_rel() align(16) callconv(.Naked) void { | |
| 1000 | fn __aarch64_ldset2_acq_rel() align(16) callconv(.naked) void { | |
| 1001 | 1001 | @setRuntimeSafety(false); |
| 1002 | 1002 | asm volatile ( |
| 1003 | 1003 | \\ cbz w16, 8f |
| ... | ... | @@ -1018,7 +1018,7 @@ fn __aarch64_ldset2_acq_rel() align(16) callconv(.Naked) void { |
| 1018 | 1018 | ); |
| 1019 | 1019 | unreachable; |
| 1020 | 1020 | } |
| 1021 | fn __aarch64_cas4_relax() align(16) callconv(.Naked) void { | |
| 1021 | fn __aarch64_cas4_relax() align(16) callconv(.naked) void { | |
| 1022 | 1022 | @setRuntimeSafety(false); |
| 1023 | 1023 | asm volatile ( |
| 1024 | 1024 | \\ cbz w16, 8f |
| ... | ... | @@ -1040,7 +1040,7 @@ fn __aarch64_cas4_relax() align(16) callconv(.Naked) void { |
| 1040 | 1040 | ); |
| 1041 | 1041 | unreachable; |
| 1042 | 1042 | } |
| 1043 | fn __aarch64_swp4_relax() align(16) callconv(.Naked) void { | |
| 1043 | fn __aarch64_swp4_relax() align(16) callconv(.naked) void { | |
| 1044 | 1044 | @setRuntimeSafety(false); |
| 1045 | 1045 | asm volatile ( |
| 1046 | 1046 | \\ cbz w16, 8f |
| ... | ... | @@ -1060,7 +1060,7 @@ fn __aarch64_swp4_relax() align(16) callconv(.Naked) void { |
| 1060 | 1060 | ); |
| 1061 | 1061 | unreachable; |
| 1062 | 1062 | } |
| 1063 | fn __aarch64_ldadd4_relax() align(16) callconv(.Naked) void { | |
| 1063 | fn __aarch64_ldadd4_relax() align(16) callconv(.naked) void { | |
| 1064 | 1064 | @setRuntimeSafety(false); |
| 1065 | 1065 | asm volatile ( |
| 1066 | 1066 | \\ cbz w16, 8f |
| ... | ... | @@ -1081,7 +1081,7 @@ fn __aarch64_ldadd4_relax() align(16) callconv(.Naked) void { |
| 1081 | 1081 | ); |
| 1082 | 1082 | unreachable; |
| 1083 | 1083 | } |
| 1084 | fn __aarch64_ldclr4_relax() align(16) callconv(.Naked) void { | |
| 1084 | fn __aarch64_ldclr4_relax() align(16) callconv(.naked) void { | |
| 1085 | 1085 | @setRuntimeSafety(false); |
| 1086 | 1086 | asm volatile ( |
| 1087 | 1087 | \\ cbz w16, 8f |
| ... | ... | @@ -1102,7 +1102,7 @@ fn __aarch64_ldclr4_relax() align(16) callconv(.Naked) void { |
| 1102 | 1102 | ); |
| 1103 | 1103 | unreachable; |
| 1104 | 1104 | } |
| 1105 | fn __aarch64_ldeor4_relax() align(16) callconv(.Naked) void { | |
| 1105 | fn __aarch64_ldeor4_relax() align(16) callconv(.naked) void { | |
| 1106 | 1106 | @setRuntimeSafety(false); |
| 1107 | 1107 | asm volatile ( |
| 1108 | 1108 | \\ cbz w16, 8f |
| ... | ... | @@ -1123,7 +1123,7 @@ fn __aarch64_ldeor4_relax() align(16) callconv(.Naked) void { |
| 1123 | 1123 | ); |
| 1124 | 1124 | unreachable; |
| 1125 | 1125 | } |
| 1126 | fn __aarch64_ldset4_relax() align(16) callconv(.Naked) void { | |
| 1126 | fn __aarch64_ldset4_relax() align(16) callconv(.naked) void { | |
| 1127 | 1127 | @setRuntimeSafety(false); |
| 1128 | 1128 | asm volatile ( |
| 1129 | 1129 | \\ cbz w16, 8f |
| ... | ... | @@ -1144,7 +1144,7 @@ fn __aarch64_ldset4_relax() align(16) callconv(.Naked) void { |
| 1144 | 1144 | ); |
| 1145 | 1145 | unreachable; |
| 1146 | 1146 | } |
| 1147 | fn __aarch64_cas4_acq() align(16) callconv(.Naked) void { | |
| 1147 | fn __aarch64_cas4_acq() align(16) callconv(.naked) void { | |
| 1148 | 1148 | @setRuntimeSafety(false); |
| 1149 | 1149 | asm volatile ( |
| 1150 | 1150 | \\ cbz w16, 8f |
| ... | ... | @@ -1166,7 +1166,7 @@ fn __aarch64_cas4_acq() align(16) callconv(.Naked) void { |
| 1166 | 1166 | ); |
| 1167 | 1167 | unreachable; |
| 1168 | 1168 | } |
| 1169 | fn __aarch64_swp4_acq() align(16) callconv(.Naked) void { | |
| 1169 | fn __aarch64_swp4_acq() align(16) callconv(.naked) void { | |
| 1170 | 1170 | @setRuntimeSafety(false); |
| 1171 | 1171 | asm volatile ( |
| 1172 | 1172 | \\ cbz w16, 8f |
| ... | ... | @@ -1186,7 +1186,7 @@ fn __aarch64_swp4_acq() align(16) callconv(.Naked) void { |
| 1186 | 1186 | ); |
| 1187 | 1187 | unreachable; |
| 1188 | 1188 | } |
| 1189 | fn __aarch64_ldadd4_acq() align(16) callconv(.Naked) void { | |
| 1189 | fn __aarch64_ldadd4_acq() align(16) callconv(.naked) void { | |
| 1190 | 1190 | @setRuntimeSafety(false); |
| 1191 | 1191 | asm volatile ( |
| 1192 | 1192 | \\ cbz w16, 8f |
| ... | ... | @@ -1207,7 +1207,7 @@ fn __aarch64_ldadd4_acq() align(16) callconv(.Naked) void { |
| 1207 | 1207 | ); |
| 1208 | 1208 | unreachable; |
| 1209 | 1209 | } |
| 1210 | fn __aarch64_ldclr4_acq() align(16) callconv(.Naked) void { | |
| 1210 | fn __aarch64_ldclr4_acq() align(16) callconv(.naked) void { | |
| 1211 | 1211 | @setRuntimeSafety(false); |
| 1212 | 1212 | asm volatile ( |
| 1213 | 1213 | \\ cbz w16, 8f |
| ... | ... | @@ -1228,7 +1228,7 @@ fn __aarch64_ldclr4_acq() align(16) callconv(.Naked) void { |
| 1228 | 1228 | ); |
| 1229 | 1229 | unreachable; |
| 1230 | 1230 | } |
| 1231 | fn __aarch64_ldeor4_acq() align(16) callconv(.Naked) void { | |
| 1231 | fn __aarch64_ldeor4_acq() align(16) callconv(.naked) void { | |
| 1232 | 1232 | @setRuntimeSafety(false); |
| 1233 | 1233 | asm volatile ( |
| 1234 | 1234 | \\ cbz w16, 8f |
| ... | ... | @@ -1249,7 +1249,7 @@ fn __aarch64_ldeor4_acq() align(16) callconv(.Naked) void { |
| 1249 | 1249 | ); |
| 1250 | 1250 | unreachable; |
| 1251 | 1251 | } |
| 1252 | fn __aarch64_ldset4_acq() align(16) callconv(.Naked) void { | |
| 1252 | fn __aarch64_ldset4_acq() align(16) callconv(.naked) void { | |
| 1253 | 1253 | @setRuntimeSafety(false); |
| 1254 | 1254 | asm volatile ( |
| 1255 | 1255 | \\ cbz w16, 8f |
| ... | ... | @@ -1270,7 +1270,7 @@ fn __aarch64_ldset4_acq() align(16) callconv(.Naked) void { |
| 1270 | 1270 | ); |
| 1271 | 1271 | unreachable; |
| 1272 | 1272 | } |
| 1273 | fn __aarch64_cas4_rel() align(16) callconv(.Naked) void { | |
| 1273 | fn __aarch64_cas4_rel() align(16) callconv(.naked) void { | |
| 1274 | 1274 | @setRuntimeSafety(false); |
| 1275 | 1275 | asm volatile ( |
| 1276 | 1276 | \\ cbz w16, 8f |
| ... | ... | @@ -1292,7 +1292,7 @@ fn __aarch64_cas4_rel() align(16) callconv(.Naked) void { |
| 1292 | 1292 | ); |
| 1293 | 1293 | unreachable; |
| 1294 | 1294 | } |
| 1295 | fn __aarch64_swp4_rel() align(16) callconv(.Naked) void { | |
| 1295 | fn __aarch64_swp4_rel() align(16) callconv(.naked) void { | |
| 1296 | 1296 | @setRuntimeSafety(false); |
| 1297 | 1297 | asm volatile ( |
| 1298 | 1298 | \\ cbz w16, 8f |
| ... | ... | @@ -1312,7 +1312,7 @@ fn __aarch64_swp4_rel() align(16) callconv(.Naked) void { |
| 1312 | 1312 | ); |
| 1313 | 1313 | unreachable; |
| 1314 | 1314 | } |
| 1315 | fn __aarch64_ldadd4_rel() align(16) callconv(.Naked) void { | |
| 1315 | fn __aarch64_ldadd4_rel() align(16) callconv(.naked) void { | |
| 1316 | 1316 | @setRuntimeSafety(false); |
| 1317 | 1317 | asm volatile ( |
| 1318 | 1318 | \\ cbz w16, 8f |
| ... | ... | @@ -1333,7 +1333,7 @@ fn __aarch64_ldadd4_rel() align(16) callconv(.Naked) void { |
| 1333 | 1333 | ); |
| 1334 | 1334 | unreachable; |
| 1335 | 1335 | } |
| 1336 | fn __aarch64_ldclr4_rel() align(16) callconv(.Naked) void { | |
| 1336 | fn __aarch64_ldclr4_rel() align(16) callconv(.naked) void { | |
| 1337 | 1337 | @setRuntimeSafety(false); |
| 1338 | 1338 | asm volatile ( |
| 1339 | 1339 | \\ cbz w16, 8f |
| ... | ... | @@ -1354,7 +1354,7 @@ fn __aarch64_ldclr4_rel() align(16) callconv(.Naked) void { |
| 1354 | 1354 | ); |
| 1355 | 1355 | unreachable; |
| 1356 | 1356 | } |
| 1357 | fn __aarch64_ldeor4_rel() align(16) callconv(.Naked) void { | |
| 1357 | fn __aarch64_ldeor4_rel() align(16) callconv(.naked) void { | |
| 1358 | 1358 | @setRuntimeSafety(false); |
| 1359 | 1359 | asm volatile ( |
| 1360 | 1360 | \\ cbz w16, 8f |
| ... | ... | @@ -1375,7 +1375,7 @@ fn __aarch64_ldeor4_rel() align(16) callconv(.Naked) void { |
| 1375 | 1375 | ); |
| 1376 | 1376 | unreachable; |
| 1377 | 1377 | } |
| 1378 | fn __aarch64_ldset4_rel() align(16) callconv(.Naked) void { | |
| 1378 | fn __aarch64_ldset4_rel() align(16) callconv(.naked) void { | |
| 1379 | 1379 | @setRuntimeSafety(false); |
| 1380 | 1380 | asm volatile ( |
| 1381 | 1381 | \\ cbz w16, 8f |
| ... | ... | @@ -1396,7 +1396,7 @@ fn __aarch64_ldset4_rel() align(16) callconv(.Naked) void { |
| 1396 | 1396 | ); |
| 1397 | 1397 | unreachable; |
| 1398 | 1398 | } |
| 1399 | fn __aarch64_cas4_acq_rel() align(16) callconv(.Naked) void { | |
| 1399 | fn __aarch64_cas4_acq_rel() align(16) callconv(.naked) void { | |
| 1400 | 1400 | @setRuntimeSafety(false); |
| 1401 | 1401 | asm volatile ( |
| 1402 | 1402 | \\ cbz w16, 8f |
| ... | ... | @@ -1418,7 +1418,7 @@ fn __aarch64_cas4_acq_rel() align(16) callconv(.Naked) void { |
| 1418 | 1418 | ); |
| 1419 | 1419 | unreachable; |
| 1420 | 1420 | } |
| 1421 | fn __aarch64_swp4_acq_rel() align(16) callconv(.Naked) void { | |
| 1421 | fn __aarch64_swp4_acq_rel() align(16) callconv(.naked) void { | |
| 1422 | 1422 | @setRuntimeSafety(false); |
| 1423 | 1423 | asm volatile ( |
| 1424 | 1424 | \\ cbz w16, 8f |
| ... | ... | @@ -1438,7 +1438,7 @@ fn __aarch64_swp4_acq_rel() align(16) callconv(.Naked) void { |
| 1438 | 1438 | ); |
| 1439 | 1439 | unreachable; |
| 1440 | 1440 | } |
| 1441 | fn __aarch64_ldadd4_acq_rel() align(16) callconv(.Naked) void { | |
| 1441 | fn __aarch64_ldadd4_acq_rel() align(16) callconv(.naked) void { | |
| 1442 | 1442 | @setRuntimeSafety(false); |
| 1443 | 1443 | asm volatile ( |
| 1444 | 1444 | \\ cbz w16, 8f |
| ... | ... | @@ -1459,7 +1459,7 @@ fn __aarch64_ldadd4_acq_rel() align(16) callconv(.Naked) void { |
| 1459 | 1459 | ); |
| 1460 | 1460 | unreachable; |
| 1461 | 1461 | } |
| 1462 | fn __aarch64_ldclr4_acq_rel() align(16) callconv(.Naked) void { | |
| 1462 | fn __aarch64_ldclr4_acq_rel() align(16) callconv(.naked) void { | |
| 1463 | 1463 | @setRuntimeSafety(false); |
| 1464 | 1464 | asm volatile ( |
| 1465 | 1465 | \\ cbz w16, 8f |
| ... | ... | @@ -1480,7 +1480,7 @@ fn __aarch64_ldclr4_acq_rel() align(16) callconv(.Naked) void { |
| 1480 | 1480 | ); |
| 1481 | 1481 | unreachable; |
| 1482 | 1482 | } |
| 1483 | fn __aarch64_ldeor4_acq_rel() align(16) callconv(.Naked) void { | |
| 1483 | fn __aarch64_ldeor4_acq_rel() align(16) callconv(.naked) void { | |
| 1484 | 1484 | @setRuntimeSafety(false); |
| 1485 | 1485 | asm volatile ( |
| 1486 | 1486 | \\ cbz w16, 8f |
| ... | ... | @@ -1501,7 +1501,7 @@ fn __aarch64_ldeor4_acq_rel() align(16) callconv(.Naked) void { |
| 1501 | 1501 | ); |
| 1502 | 1502 | unreachable; |
| 1503 | 1503 | } |
| 1504 | fn __aarch64_ldset4_acq_rel() align(16) callconv(.Naked) void { | |
| 1504 | fn __aarch64_ldset4_acq_rel() align(16) callconv(.naked) void { | |
| 1505 | 1505 | @setRuntimeSafety(false); |
| 1506 | 1506 | asm volatile ( |
| 1507 | 1507 | \\ cbz w16, 8f |
| ... | ... | @@ -1522,7 +1522,7 @@ fn __aarch64_ldset4_acq_rel() align(16) callconv(.Naked) void { |
| 1522 | 1522 | ); |
| 1523 | 1523 | unreachable; |
| 1524 | 1524 | } |
| 1525 | fn __aarch64_cas8_relax() align(16) callconv(.Naked) void { | |
| 1525 | fn __aarch64_cas8_relax() align(16) callconv(.naked) void { | |
| 1526 | 1526 | @setRuntimeSafety(false); |
| 1527 | 1527 | asm volatile ( |
| 1528 | 1528 | \\ cbz w16, 8f |
| ... | ... | @@ -1544,7 +1544,7 @@ fn __aarch64_cas8_relax() align(16) callconv(.Naked) void { |
| 1544 | 1544 | ); |
| 1545 | 1545 | unreachable; |
| 1546 | 1546 | } |
| 1547 | fn __aarch64_swp8_relax() align(16) callconv(.Naked) void { | |
| 1547 | fn __aarch64_swp8_relax() align(16) callconv(.naked) void { | |
| 1548 | 1548 | @setRuntimeSafety(false); |
| 1549 | 1549 | asm volatile ( |
| 1550 | 1550 | \\ cbz w16, 8f |
| ... | ... | @@ -1564,7 +1564,7 @@ fn __aarch64_swp8_relax() align(16) callconv(.Naked) void { |
| 1564 | 1564 | ); |
| 1565 | 1565 | unreachable; |
| 1566 | 1566 | } |
| 1567 | fn __aarch64_ldadd8_relax() align(16) callconv(.Naked) void { | |
| 1567 | fn __aarch64_ldadd8_relax() align(16) callconv(.naked) void { | |
| 1568 | 1568 | @setRuntimeSafety(false); |
| 1569 | 1569 | asm volatile ( |
| 1570 | 1570 | \\ cbz w16, 8f |
| ... | ... | @@ -1585,7 +1585,7 @@ fn __aarch64_ldadd8_relax() align(16) callconv(.Naked) void { |
| 1585 | 1585 | ); |
| 1586 | 1586 | unreachable; |
| 1587 | 1587 | } |
| 1588 | fn __aarch64_ldclr8_relax() align(16) callconv(.Naked) void { | |
| 1588 | fn __aarch64_ldclr8_relax() align(16) callconv(.naked) void { | |
| 1589 | 1589 | @setRuntimeSafety(false); |
| 1590 | 1590 | asm volatile ( |
| 1591 | 1591 | \\ cbz w16, 8f |
| ... | ... | @@ -1606,7 +1606,7 @@ fn __aarch64_ldclr8_relax() align(16) callconv(.Naked) void { |
| 1606 | 1606 | ); |
| 1607 | 1607 | unreachable; |
| 1608 | 1608 | } |
| 1609 | fn __aarch64_ldeor8_relax() align(16) callconv(.Naked) void { | |
| 1609 | fn __aarch64_ldeor8_relax() align(16) callconv(.naked) void { | |
| 1610 | 1610 | @setRuntimeSafety(false); |
| 1611 | 1611 | asm volatile ( |
| 1612 | 1612 | \\ cbz w16, 8f |
| ... | ... | @@ -1627,7 +1627,7 @@ fn __aarch64_ldeor8_relax() align(16) callconv(.Naked) void { |
| 1627 | 1627 | ); |
| 1628 | 1628 | unreachable; |
| 1629 | 1629 | } |
| 1630 | fn __aarch64_ldset8_relax() align(16) callconv(.Naked) void { | |
| 1630 | fn __aarch64_ldset8_relax() align(16) callconv(.naked) void { | |
| 1631 | 1631 | @setRuntimeSafety(false); |
| 1632 | 1632 | asm volatile ( |
| 1633 | 1633 | \\ cbz w16, 8f |
| ... | ... | @@ -1648,7 +1648,7 @@ fn __aarch64_ldset8_relax() align(16) callconv(.Naked) void { |
| 1648 | 1648 | ); |
| 1649 | 1649 | unreachable; |
| 1650 | 1650 | } |
| 1651 | fn __aarch64_cas8_acq() align(16) callconv(.Naked) void { | |
| 1651 | fn __aarch64_cas8_acq() align(16) callconv(.naked) void { | |
| 1652 | 1652 | @setRuntimeSafety(false); |
| 1653 | 1653 | asm volatile ( |
| 1654 | 1654 | \\ cbz w16, 8f |
| ... | ... | @@ -1670,7 +1670,7 @@ fn __aarch64_cas8_acq() align(16) callconv(.Naked) void { |
| 1670 | 1670 | ); |
| 1671 | 1671 | unreachable; |
| 1672 | 1672 | } |
| 1673 | fn __aarch64_swp8_acq() align(16) callconv(.Naked) void { | |
| 1673 | fn __aarch64_swp8_acq() align(16) callconv(.naked) void { | |
| 1674 | 1674 | @setRuntimeSafety(false); |
| 1675 | 1675 | asm volatile ( |
| 1676 | 1676 | \\ cbz w16, 8f |
| ... | ... | @@ -1690,7 +1690,7 @@ fn __aarch64_swp8_acq() align(16) callconv(.Naked) void { |
| 1690 | 1690 | ); |
| 1691 | 1691 | unreachable; |
| 1692 | 1692 | } |
| 1693 | fn __aarch64_ldadd8_acq() align(16) callconv(.Naked) void { | |
| 1693 | fn __aarch64_ldadd8_acq() align(16) callconv(.naked) void { | |
| 1694 | 1694 | @setRuntimeSafety(false); |
| 1695 | 1695 | asm volatile ( |
| 1696 | 1696 | \\ cbz w16, 8f |
| ... | ... | @@ -1711,7 +1711,7 @@ fn __aarch64_ldadd8_acq() align(16) callconv(.Naked) void { |
| 1711 | 1711 | ); |
| 1712 | 1712 | unreachable; |
| 1713 | 1713 | } |
| 1714 | fn __aarch64_ldclr8_acq() align(16) callconv(.Naked) void { | |
| 1714 | fn __aarch64_ldclr8_acq() align(16) callconv(.naked) void { | |
| 1715 | 1715 | @setRuntimeSafety(false); |
| 1716 | 1716 | asm volatile ( |
| 1717 | 1717 | \\ cbz w16, 8f |
| ... | ... | @@ -1732,7 +1732,7 @@ fn __aarch64_ldclr8_acq() align(16) callconv(.Naked) void { |
| 1732 | 1732 | ); |
| 1733 | 1733 | unreachable; |
| 1734 | 1734 | } |
| 1735 | fn __aarch64_ldeor8_acq() align(16) callconv(.Naked) void { | |
| 1735 | fn __aarch64_ldeor8_acq() align(16) callconv(.naked) void { | |
| 1736 | 1736 | @setRuntimeSafety(false); |
| 1737 | 1737 | asm volatile ( |
| 1738 | 1738 | \\ cbz w16, 8f |
| ... | ... | @@ -1753,7 +1753,7 @@ fn __aarch64_ldeor8_acq() align(16) callconv(.Naked) void { |
| 1753 | 1753 | ); |
| 1754 | 1754 | unreachable; |
| 1755 | 1755 | } |
| 1756 | fn __aarch64_ldset8_acq() align(16) callconv(.Naked) void { | |
| 1756 | fn __aarch64_ldset8_acq() align(16) callconv(.naked) void { | |
| 1757 | 1757 | @setRuntimeSafety(false); |
| 1758 | 1758 | asm volatile ( |
| 1759 | 1759 | \\ cbz w16, 8f |
| ... | ... | @@ -1774,7 +1774,7 @@ fn __aarch64_ldset8_acq() align(16) callconv(.Naked) void { |
| 1774 | 1774 | ); |
| 1775 | 1775 | unreachable; |
| 1776 | 1776 | } |
| 1777 | fn __aarch64_cas8_rel() align(16) callconv(.Naked) void { | |
| 1777 | fn __aarch64_cas8_rel() align(16) callconv(.naked) void { | |
| 1778 | 1778 | @setRuntimeSafety(false); |
| 1779 | 1779 | asm volatile ( |
| 1780 | 1780 | \\ cbz w16, 8f |
| ... | ... | @@ -1796,7 +1796,7 @@ fn __aarch64_cas8_rel() align(16) callconv(.Naked) void { |
| 1796 | 1796 | ); |
| 1797 | 1797 | unreachable; |
| 1798 | 1798 | } |
| 1799 | fn __aarch64_swp8_rel() align(16) callconv(.Naked) void { | |
| 1799 | fn __aarch64_swp8_rel() align(16) callconv(.naked) void { | |
| 1800 | 1800 | @setRuntimeSafety(false); |
| 1801 | 1801 | asm volatile ( |
| 1802 | 1802 | \\ cbz w16, 8f |
| ... | ... | @@ -1816,7 +1816,7 @@ fn __aarch64_swp8_rel() align(16) callconv(.Naked) void { |
| 1816 | 1816 | ); |
| 1817 | 1817 | unreachable; |
| 1818 | 1818 | } |
| 1819 | fn __aarch64_ldadd8_rel() align(16) callconv(.Naked) void { | |
| 1819 | fn __aarch64_ldadd8_rel() align(16) callconv(.naked) void { | |
| 1820 | 1820 | @setRuntimeSafety(false); |
| 1821 | 1821 | asm volatile ( |
| 1822 | 1822 | \\ cbz w16, 8f |
| ... | ... | @@ -1837,7 +1837,7 @@ fn __aarch64_ldadd8_rel() align(16) callconv(.Naked) void { |
| 1837 | 1837 | ); |
| 1838 | 1838 | unreachable; |
| 1839 | 1839 | } |
| 1840 | fn __aarch64_ldclr8_rel() align(16) callconv(.Naked) void { | |
| 1840 | fn __aarch64_ldclr8_rel() align(16) callconv(.naked) void { | |
| 1841 | 1841 | @setRuntimeSafety(false); |
| 1842 | 1842 | asm volatile ( |
| 1843 | 1843 | \\ cbz w16, 8f |
| ... | ... | @@ -1858,7 +1858,7 @@ fn __aarch64_ldclr8_rel() align(16) callconv(.Naked) void { |
| 1858 | 1858 | ); |
| 1859 | 1859 | unreachable; |
| 1860 | 1860 | } |
| 1861 | fn __aarch64_ldeor8_rel() align(16) callconv(.Naked) void { | |
| 1861 | fn __aarch64_ldeor8_rel() align(16) callconv(.naked) void { | |
| 1862 | 1862 | @setRuntimeSafety(false); |
| 1863 | 1863 | asm volatile ( |
| 1864 | 1864 | \\ cbz w16, 8f |
| ... | ... | @@ -1879,7 +1879,7 @@ fn __aarch64_ldeor8_rel() align(16) callconv(.Naked) void { |
| 1879 | 1879 | ); |
| 1880 | 1880 | unreachable; |
| 1881 | 1881 | } |
| 1882 | fn __aarch64_ldset8_rel() align(16) callconv(.Naked) void { | |
| 1882 | fn __aarch64_ldset8_rel() align(16) callconv(.naked) void { | |
| 1883 | 1883 | @setRuntimeSafety(false); |
| 1884 | 1884 | asm volatile ( |
| 1885 | 1885 | \\ cbz w16, 8f |
| ... | ... | @@ -1900,7 +1900,7 @@ fn __aarch64_ldset8_rel() align(16) callconv(.Naked) void { |
| 1900 | 1900 | ); |
| 1901 | 1901 | unreachable; |
| 1902 | 1902 | } |
| 1903 | fn __aarch64_cas8_acq_rel() align(16) callconv(.Naked) void { | |
| 1903 | fn __aarch64_cas8_acq_rel() align(16) callconv(.naked) void { | |
| 1904 | 1904 | @setRuntimeSafety(false); |
| 1905 | 1905 | asm volatile ( |
| 1906 | 1906 | \\ cbz w16, 8f |
| ... | ... | @@ -1922,7 +1922,7 @@ fn __aarch64_cas8_acq_rel() align(16) callconv(.Naked) void { |
| 1922 | 1922 | ); |
| 1923 | 1923 | unreachable; |
| 1924 | 1924 | } |
| 1925 | fn __aarch64_swp8_acq_rel() align(16) callconv(.Naked) void { | |
| 1925 | fn __aarch64_swp8_acq_rel() align(16) callconv(.naked) void { | |
| 1926 | 1926 | @setRuntimeSafety(false); |
| 1927 | 1927 | asm volatile ( |
| 1928 | 1928 | \\ cbz w16, 8f |
| ... | ... | @@ -1942,7 +1942,7 @@ fn __aarch64_swp8_acq_rel() align(16) callconv(.Naked) void { |
| 1942 | 1942 | ); |
| 1943 | 1943 | unreachable; |
| 1944 | 1944 | } |
| 1945 | fn __aarch64_ldadd8_acq_rel() align(16) callconv(.Naked) void { | |
| 1945 | fn __aarch64_ldadd8_acq_rel() align(16) callconv(.naked) void { | |
| 1946 | 1946 | @setRuntimeSafety(false); |
| 1947 | 1947 | asm volatile ( |
| 1948 | 1948 | \\ cbz w16, 8f |
| ... | ... | @@ -1963,7 +1963,7 @@ fn __aarch64_ldadd8_acq_rel() align(16) callconv(.Naked) void { |
| 1963 | 1963 | ); |
| 1964 | 1964 | unreachable; |
| 1965 | 1965 | } |
| 1966 | fn __aarch64_ldclr8_acq_rel() align(16) callconv(.Naked) void { | |
| 1966 | fn __aarch64_ldclr8_acq_rel() align(16) callconv(.naked) void { | |
| 1967 | 1967 | @setRuntimeSafety(false); |
| 1968 | 1968 | asm volatile ( |
| 1969 | 1969 | \\ cbz w16, 8f |
| ... | ... | @@ -1984,7 +1984,7 @@ fn __aarch64_ldclr8_acq_rel() align(16) callconv(.Naked) void { |
| 1984 | 1984 | ); |
| 1985 | 1985 | unreachable; |
| 1986 | 1986 | } |
| 1987 | fn __aarch64_ldeor8_acq_rel() align(16) callconv(.Naked) void { | |
| 1987 | fn __aarch64_ldeor8_acq_rel() align(16) callconv(.naked) void { | |
| 1988 | 1988 | @setRuntimeSafety(false); |
| 1989 | 1989 | asm volatile ( |
| 1990 | 1990 | \\ cbz w16, 8f |
| ... | ... | @@ -2005,7 +2005,7 @@ fn __aarch64_ldeor8_acq_rel() align(16) callconv(.Naked) void { |
| 2005 | 2005 | ); |
| 2006 | 2006 | unreachable; |
| 2007 | 2007 | } |
| 2008 | fn __aarch64_ldset8_acq_rel() align(16) callconv(.Naked) void { | |
| 2008 | fn __aarch64_ldset8_acq_rel() align(16) callconv(.naked) void { | |
| 2009 | 2009 | @setRuntimeSafety(false); |
| 2010 | 2010 | asm volatile ( |
| 2011 | 2011 | \\ cbz w16, 8f |
| ... | ... | @@ -2026,7 +2026,7 @@ fn __aarch64_ldset8_acq_rel() align(16) callconv(.Naked) void { |
| 2026 | 2026 | ); |
| 2027 | 2027 | unreachable; |
| 2028 | 2028 | } |
| 2029 | fn __aarch64_cas16_relax() align(16) callconv(.Naked) void { | |
| 2029 | fn __aarch64_cas16_relax() align(16) callconv(.naked) void { | |
| 2030 | 2030 | @setRuntimeSafety(false); |
| 2031 | 2031 | asm volatile ( |
| 2032 | 2032 | \\ cbz w16, 8f |
| ... | ... | @@ -2050,7 +2050,7 @@ fn __aarch64_cas16_relax() align(16) callconv(.Naked) void { |
| 2050 | 2050 | ); |
| 2051 | 2051 | unreachable; |
| 2052 | 2052 | } |
| 2053 | fn __aarch64_cas16_acq() align(16) callconv(.Naked) void { | |
| 2053 | fn __aarch64_cas16_acq() align(16) callconv(.naked) void { | |
| 2054 | 2054 | @setRuntimeSafety(false); |
| 2055 | 2055 | asm volatile ( |
| 2056 | 2056 | \\ cbz w16, 8f |
| ... | ... | @@ -2074,7 +2074,7 @@ fn __aarch64_cas16_acq() align(16) callconv(.Naked) void { |
| 2074 | 2074 | ); |
| 2075 | 2075 | unreachable; |
| 2076 | 2076 | } |
| 2077 | fn __aarch64_cas16_rel() align(16) callconv(.Naked) void { | |
| 2077 | fn __aarch64_cas16_rel() align(16) callconv(.naked) void { | |
| 2078 | 2078 | @setRuntimeSafety(false); |
| 2079 | 2079 | asm volatile ( |
| 2080 | 2080 | \\ cbz w16, 8f |
| ... | ... | @@ -2098,7 +2098,7 @@ fn __aarch64_cas16_rel() align(16) callconv(.Naked) void { |
| 2098 | 2098 | ); |
| 2099 | 2099 | unreachable; |
| 2100 | 2100 | } |
| 2101 | fn __aarch64_cas16_acq_rel() align(16) callconv(.Naked) void { | |
| 2101 | fn __aarch64_cas16_acq_rel() align(16) callconv(.naked) void { | |
| 2102 | 2102 | @setRuntimeSafety(false); |
| 2103 | 2103 | asm volatile ( |
| 2104 | 2104 | \\ cbz w16, 8f |
lib/compiler_rt/absvdi2.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__absvdi2, .{ .name = "__absvdi2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | pub fn __absvdi2(a: i64) callconv(.C) i64 { | |
| 10 | pub fn __absvdi2(a: i64) callconv(.c) i64 { | |
| 11 | 11 | return absv(i64, a); |
| 12 | 12 | } |
lib/compiler_rt/absvsi2.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__absvsi2, .{ .name = "__absvsi2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | pub fn __absvsi2(a: i32) callconv(.C) i32 { | |
| 10 | pub fn __absvsi2(a: i32) callconv(.c) i32 { | |
| 11 | 11 | return absv(i32, a); |
| 12 | 12 | } |
lib/compiler_rt/absvti2.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__absvti2, .{ .name = "__absvti2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | pub fn __absvti2(a: i128) callconv(.C) i128 { | |
| 10 | pub fn __absvti2(a: i128) callconv(.c) i128 { | |
| 11 | 11 | return absv(i128, a); |
| 12 | 12 | } |
lib/compiler_rt/adddf3.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | fn __adddf3(a: f64, b: f64) callconv(.C) f64 { | |
| 14 | fn __adddf3(a: f64, b: f64) callconv(.c) f64 { | |
| 15 | 15 | return addf3(f64, a, b); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_dadd(a: f64, b: f64) callconv(.AAPCS) f64 { | |
| 18 | fn __aeabi_dadd(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 { | |
| 19 | 19 | return addf3(f64, a, b); |
| 20 | 20 | } |
lib/compiler_rt/addhf3.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__addhf3, .{ .name = "__addhf3", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __addhf3(a: f16, b: f16) callconv(.C) f16 { | |
| 10 | fn __addhf3(a: f16, b: f16) callconv(.c) f16 { | |
| 11 | 11 | return addf3(f16, a, b); |
| 12 | 12 | } |
lib/compiler_rt/addo.zig+3-3| ... | ... | @@ -31,13 +31,13 @@ inline fn addoXi4_generic(comptime ST: type, a: ST, b: ST, overflow: *c_int) ST |
| 31 | 31 | return sum; |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | pub fn __addosi4(a: i32, b: i32, overflow: *c_int) callconv(.C) i32 { | |
| 34 | pub fn __addosi4(a: i32, b: i32, overflow: *c_int) callconv(.c) i32 { | |
| 35 | 35 | return addoXi4_generic(i32, a, b, overflow); |
| 36 | 36 | } |
| 37 | pub fn __addodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 { | |
| 37 | pub fn __addodi4(a: i64, b: i64, overflow: *c_int) callconv(.c) i64 { | |
| 38 | 38 | return addoXi4_generic(i64, a, b, overflow); |
| 39 | 39 | } |
| 40 | pub fn __addoti4(a: i128, b: i128, overflow: *c_int) callconv(.C) i128 { | |
| 40 | pub fn __addoti4(a: i128, b: i128, overflow: *c_int) callconv(.c) i128 { | |
| 41 | 41 | return addoXi4_generic(i128, a, b, overflow); |
| 42 | 42 | } |
| 43 | 43 |
lib/compiler_rt/addsf3.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | fn __addsf3(a: f32, b: f32) callconv(.C) f32 { | |
| 14 | fn __addsf3(a: f32, b: f32) callconv(.c) f32 { | |
| 15 | 15 | return addf3(f32, a, b); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_fadd(a: f32, b: f32) callconv(.AAPCS) f32 { | |
| 18 | fn __aeabi_fadd(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 { | |
| 19 | 19 | return addf3(f32, a, b); |
| 20 | 20 | } |
lib/compiler_rt/addtf3.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | @export(&__addtf3, .{ .name = "__addtf3", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __addtf3(a: f128, b: f128) callconv(.C) f128 { | |
| 15 | pub fn __addtf3(a: f128, b: f128) callconv(.c) f128 { | |
| 16 | 16 | return addf3(f128, a, b); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_add(c: *f128, a: *f128, b: *f128) callconv(.C) void { | |
| 19 | fn _Qp_add(c: *f128, a: *f128, b: *f128) callconv(.c) void { | |
| 20 | 20 | c.* = addf3(f128, a.*, b.*); |
| 21 | 21 | } |
lib/compiler_rt/addxf3.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__addxf3, .{ .name = "__addxf3", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | pub fn __addxf3(a: f80, b: f80) callconv(.C) f80 { | |
| 10 | pub fn __addxf3(a: f80, b: f80) callconv(.c) f80 { | |
| 11 | 11 | return addf3(f80, a, b); |
| 12 | 12 | } |
lib/compiler_rt/arm.zig+22-22| ... | ... | @@ -57,67 +57,67 @@ extern fn memset(dest: ?[*]u8, c: i32, n: usize) ?[*]u8; |
| 57 | 57 | extern fn memcpy(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize) ?[*]u8; |
| 58 | 58 | extern fn memmove(dest: ?[*]u8, src: ?[*]const u8, n: usize) ?[*]u8; |
| 59 | 59 | |
| 60 | pub fn __aeabi_memcpy(dest: [*]u8, src: [*]u8, n: usize) callconv(.AAPCS) void { | |
| 60 | pub fn __aeabi_memcpy(dest: [*]u8, src: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void { | |
| 61 | 61 | @setRuntimeSafety(false); |
| 62 | 62 | _ = memcpy(dest, src, n); |
| 63 | 63 | } |
| 64 | pub fn __aeabi_memcpy4(dest: [*]u8, src: [*]u8, n: usize) callconv(.AAPCS) void { | |
| 64 | pub fn __aeabi_memcpy4(dest: [*]u8, src: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void { | |
| 65 | 65 | @setRuntimeSafety(false); |
| 66 | 66 | _ = memcpy(dest, src, n); |
| 67 | 67 | } |
| 68 | pub fn __aeabi_memcpy8(dest: [*]u8, src: [*]u8, n: usize) callconv(.AAPCS) void { | |
| 68 | pub fn __aeabi_memcpy8(dest: [*]u8, src: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void { | |
| 69 | 69 | @setRuntimeSafety(false); |
| 70 | 70 | _ = memcpy(dest, src, n); |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | pub fn __aeabi_memmove(dest: [*]u8, src: [*]u8, n: usize) callconv(.AAPCS) void { | |
| 73 | pub fn __aeabi_memmove(dest: [*]u8, src: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void { | |
| 74 | 74 | @setRuntimeSafety(false); |
| 75 | 75 | _ = memmove(dest, src, n); |
| 76 | 76 | } |
| 77 | pub fn __aeabi_memmove4(dest: [*]u8, src: [*]u8, n: usize) callconv(.AAPCS) void { | |
| 77 | pub fn __aeabi_memmove4(dest: [*]u8, src: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void { | |
| 78 | 78 | @setRuntimeSafety(false); |
| 79 | 79 | _ = memmove(dest, src, n); |
| 80 | 80 | } |
| 81 | pub fn __aeabi_memmove8(dest: [*]u8, src: [*]u8, n: usize) callconv(.AAPCS) void { | |
| 81 | pub fn __aeabi_memmove8(dest: [*]u8, src: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void { | |
| 82 | 82 | @setRuntimeSafety(false); |
| 83 | 83 | _ = memmove(dest, src, n); |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | pub fn __aeabi_memset(dest: [*]u8, n: usize, c: i32) callconv(.AAPCS) void { | |
| 86 | pub fn __aeabi_memset(dest: [*]u8, n: usize, c: i32) callconv(.{ .arm_aapcs = .{} }) void { | |
| 87 | 87 | @setRuntimeSafety(false); |
| 88 | 88 | // This is dentical to the standard `memset` definition but with the last |
| 89 | 89 | // two arguments swapped |
| 90 | 90 | _ = memset(dest, c, n); |
| 91 | 91 | } |
| 92 | pub fn __aeabi_memset4(dest: [*]u8, n: usize, c: i32) callconv(.AAPCS) void { | |
| 92 | pub fn __aeabi_memset4(dest: [*]u8, n: usize, c: i32) callconv(.{ .arm_aapcs = .{} }) void { | |
| 93 | 93 | @setRuntimeSafety(false); |
| 94 | 94 | _ = memset(dest, c, n); |
| 95 | 95 | } |
| 96 | pub fn __aeabi_memset8(dest: [*]u8, n: usize, c: i32) callconv(.AAPCS) void { | |
| 96 | pub fn __aeabi_memset8(dest: [*]u8, n: usize, c: i32) callconv(.{ .arm_aapcs = .{} }) void { | |
| 97 | 97 | @setRuntimeSafety(false); |
| 98 | 98 | _ = memset(dest, c, n); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | pub fn __aeabi_memclr(dest: [*]u8, n: usize) callconv(.AAPCS) void { | |
| 101 | pub fn __aeabi_memclr(dest: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void { | |
| 102 | 102 | @setRuntimeSafety(false); |
| 103 | 103 | _ = memset(dest, 0, n); |
| 104 | 104 | } |
| 105 | pub fn __aeabi_memclr4(dest: [*]u8, n: usize) callconv(.AAPCS) void { | |
| 105 | pub fn __aeabi_memclr4(dest: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void { | |
| 106 | 106 | @setRuntimeSafety(false); |
| 107 | 107 | _ = memset(dest, 0, n); |
| 108 | 108 | } |
| 109 | pub fn __aeabi_memclr8(dest: [*]u8, n: usize) callconv(.AAPCS) void { | |
| 109 | pub fn __aeabi_memclr8(dest: [*]u8, n: usize) callconv(.{ .arm_aapcs = .{} }) void { | |
| 110 | 110 | @setRuntimeSafety(false); |
| 111 | 111 | _ = memset(dest, 0, n); |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 | // Dummy functions to avoid errors during the linking phase |
| 115 | pub fn __aeabi_unwind_cpp_pr0() callconv(.AAPCS) void {} | |
| 116 | pub fn __aeabi_unwind_cpp_pr1() callconv(.AAPCS) void {} | |
| 117 | pub fn __aeabi_unwind_cpp_pr2() callconv(.AAPCS) void {} | |
| 115 | pub fn __aeabi_unwind_cpp_pr0() callconv(.{ .arm_aapcs = .{} }) void {} | |
| 116 | pub fn __aeabi_unwind_cpp_pr1() callconv(.{ .arm_aapcs = .{} }) void {} | |
| 117 | pub fn __aeabi_unwind_cpp_pr2() callconv(.{ .arm_aapcs = .{} }) void {} | |
| 118 | 118 | |
| 119 | 119 | // This function can only clobber r0 according to the ABI |
| 120 | pub fn __aeabi_read_tp() callconv(.Naked) void { | |
| 120 | pub fn __aeabi_read_tp() callconv(.naked) void { | |
| 121 | 121 | @setRuntimeSafety(false); |
| 122 | 122 | asm volatile ( |
| 123 | 123 | \\ mrc p15, 0, r0, c13, c0, 3 |
| ... | ... | @@ -129,7 +129,7 @@ pub fn __aeabi_read_tp() callconv(.Naked) void { |
| 129 | 129 | // The following functions are wrapped in an asm block to ensure the required |
| 130 | 130 | // calling convention is always respected |
| 131 | 131 | |
| 132 | pub fn __aeabi_uidivmod() callconv(.Naked) void { | |
| 132 | pub fn __aeabi_uidivmod() callconv(.naked) void { | |
| 133 | 133 | @setRuntimeSafety(false); |
| 134 | 134 | // Divide r0 by r1; the quotient goes in r0, the remainder in r1 |
| 135 | 135 | asm volatile ( |
| ... | ... | @@ -147,7 +147,7 @@ pub fn __aeabi_uidivmod() callconv(.Naked) void { |
| 147 | 147 | unreachable; |
| 148 | 148 | } |
| 149 | 149 | |
| 150 | pub fn __aeabi_uldivmod() callconv(.Naked) void { | |
| 150 | pub fn __aeabi_uldivmod() callconv(.naked) void { | |
| 151 | 151 | @setRuntimeSafety(false); |
| 152 | 152 | // Divide r1:r0 by r3:r2; the quotient goes in r1:r0, the remainder in r3:r2 |
| 153 | 153 | asm volatile ( |
| ... | ... | @@ -167,7 +167,7 @@ pub fn __aeabi_uldivmod() callconv(.Naked) void { |
| 167 | 167 | unreachable; |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | pub fn __aeabi_idivmod() callconv(.Naked) void { | |
| 170 | pub fn __aeabi_idivmod() callconv(.naked) void { | |
| 171 | 171 | @setRuntimeSafety(false); |
| 172 | 172 | // Divide r0 by r1; the quotient goes in r0, the remainder in r1 |
| 173 | 173 | asm volatile ( |
| ... | ... | @@ -185,7 +185,7 @@ pub fn __aeabi_idivmod() callconv(.Naked) void { |
| 185 | 185 | unreachable; |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | pub fn __aeabi_ldivmod() callconv(.Naked) void { | |
| 188 | pub fn __aeabi_ldivmod() callconv(.naked) void { | |
| 189 | 189 | @setRuntimeSafety(false); |
| 190 | 190 | // Divide r1:r0 by r3:r2; the quotient goes in r1:r0, the remainder in r3:r2 |
| 191 | 191 | asm volatile ( |
| ... | ... | @@ -207,12 +207,12 @@ pub fn __aeabi_ldivmod() callconv(.Naked) void { |
| 207 | 207 | |
| 208 | 208 | // Float Arithmetic |
| 209 | 209 | |
| 210 | fn __aeabi_frsub(a: f32, b: f32) callconv(.AAPCS) f32 { | |
| 210 | fn __aeabi_frsub(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 { | |
| 211 | 211 | const neg_a: f32 = @bitCast(@as(u32, @bitCast(a)) ^ (@as(u32, 1) << 31)); |
| 212 | 212 | return b + neg_a; |
| 213 | 213 | } |
| 214 | 214 | |
| 215 | fn __aeabi_drsub(a: f64, b: f64) callconv(.AAPCS) f64 { | |
| 215 | fn __aeabi_drsub(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 { | |
| 216 | 216 | const neg_a: f64 = @bitCast(@as(u64, @bitCast(a)) ^ (@as(u64, 1) << 63)); |
| 217 | 217 | return b + neg_a; |
| 218 | 218 | } |
lib/compiler_rt/atomics.zig+64-64| ... | ... | @@ -117,21 +117,21 @@ var spinlocks: SpinlockTable = SpinlockTable{}; |
| 117 | 117 | // Generic version of GCC atomic builtin functions. |
| 118 | 118 | // Those work on any object no matter the pointer alignment nor its size. |
| 119 | 119 | |
| 120 | fn __atomic_load(size: u32, src: [*]u8, dest: [*]u8, model: i32) callconv(.C) void { | |
| 120 | fn __atomic_load(size: u32, src: [*]u8, dest: [*]u8, model: i32) callconv(.c) void { | |
| 121 | 121 | _ = model; |
| 122 | 122 | var sl = spinlocks.get(@intFromPtr(src)); |
| 123 | 123 | defer sl.release(); |
| 124 | 124 | @memcpy(dest[0..size], src); |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | fn __atomic_store(size: u32, dest: [*]u8, src: [*]u8, model: i32) callconv(.C) void { | |
| 127 | fn __atomic_store(size: u32, dest: [*]u8, src: [*]u8, model: i32) callconv(.c) void { | |
| 128 | 128 | _ = model; |
| 129 | 129 | var sl = spinlocks.get(@intFromPtr(dest)); |
| 130 | 130 | defer sl.release(); |
| 131 | 131 | @memcpy(dest[0..size], src); |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | fn __atomic_exchange(size: u32, ptr: [*]u8, val: [*]u8, old: [*]u8, model: i32) callconv(.C) void { | |
| 134 | fn __atomic_exchange(size: u32, ptr: [*]u8, val: [*]u8, old: [*]u8, model: i32) callconv(.c) void { | |
| 135 | 135 | _ = model; |
| 136 | 136 | var sl = spinlocks.get(@intFromPtr(ptr)); |
| 137 | 137 | defer sl.release(); |
| ... | ... | @@ -146,7 +146,7 @@ fn __atomic_compare_exchange( |
| 146 | 146 | desired: [*]u8, |
| 147 | 147 | success: i32, |
| 148 | 148 | failure: i32, |
| 149 | ) callconv(.C) i32 { | |
| 149 | ) callconv(.c) i32 { | |
| 150 | 150 | _ = success; |
| 151 | 151 | _ = failure; |
| 152 | 152 | var sl = spinlocks.get(@intFromPtr(ptr)); |
| ... | ... | @@ -176,23 +176,23 @@ inline fn atomic_load_N(comptime T: type, src: *T, model: i32) T { |
| 176 | 176 | } |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | fn __atomic_load_1(src: *u8, model: i32) callconv(.C) u8 { | |
| 179 | fn __atomic_load_1(src: *u8, model: i32) callconv(.c) u8 { | |
| 180 | 180 | return atomic_load_N(u8, src, model); |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | fn __atomic_load_2(src: *u16, model: i32) callconv(.C) u16 { | |
| 183 | fn __atomic_load_2(src: *u16, model: i32) callconv(.c) u16 { | |
| 184 | 184 | return atomic_load_N(u16, src, model); |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | fn __atomic_load_4(src: *u32, model: i32) callconv(.C) u32 { | |
| 187 | fn __atomic_load_4(src: *u32, model: i32) callconv(.c) u32 { | |
| 188 | 188 | return atomic_load_N(u32, src, model); |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | fn __atomic_load_8(src: *u64, model: i32) callconv(.C) u64 { | |
| 191 | fn __atomic_load_8(src: *u64, model: i32) callconv(.c) u64 { | |
| 192 | 192 | return atomic_load_N(u64, src, model); |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | fn __atomic_load_16(src: *u128, model: i32) callconv(.C) u128 { | |
| 195 | fn __atomic_load_16(src: *u128, model: i32) callconv(.c) u128 { | |
| 196 | 196 | return atomic_load_N(u128, src, model); |
| 197 | 197 | } |
| 198 | 198 | |
| ... | ... | @@ -207,23 +207,23 @@ inline fn atomic_store_N(comptime T: type, dst: *T, value: T, model: i32) void { |
| 207 | 207 | } |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | fn __atomic_store_1(dst: *u8, value: u8, model: i32) callconv(.C) void { | |
| 210 | fn __atomic_store_1(dst: *u8, value: u8, model: i32) callconv(.c) void { | |
| 211 | 211 | return atomic_store_N(u8, dst, value, model); |
| 212 | 212 | } |
| 213 | 213 | |
| 214 | fn __atomic_store_2(dst: *u16, value: u16, model: i32) callconv(.C) void { | |
| 214 | fn __atomic_store_2(dst: *u16, value: u16, model: i32) callconv(.c) void { | |
| 215 | 215 | return atomic_store_N(u16, dst, value, model); |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | fn __atomic_store_4(dst: *u32, value: u32, model: i32) callconv(.C) void { | |
| 218 | fn __atomic_store_4(dst: *u32, value: u32, model: i32) callconv(.c) void { | |
| 219 | 219 | return atomic_store_N(u32, dst, value, model); |
| 220 | 220 | } |
| 221 | 221 | |
| 222 | fn __atomic_store_8(dst: *u64, value: u64, model: i32) callconv(.C) void { | |
| 222 | fn __atomic_store_8(dst: *u64, value: u64, model: i32) callconv(.c) void { | |
| 223 | 223 | return atomic_store_N(u64, dst, value, model); |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | fn __atomic_store_16(dst: *u128, value: u128, model: i32) callconv(.C) void { | |
| 226 | fn __atomic_store_16(dst: *u128, value: u128, model: i32) callconv(.c) void { | |
| 227 | 227 | return atomic_store_N(u128, dst, value, model); |
| 228 | 228 | } |
| 229 | 229 | |
| ... | ... | @@ -274,23 +274,23 @@ inline fn atomic_exchange_N(comptime T: type, ptr: *T, val: T, model: i32) T { |
| 274 | 274 | } |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | fn __atomic_exchange_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 { | |
| 277 | fn __atomic_exchange_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 { | |
| 278 | 278 | return atomic_exchange_N(u8, ptr, val, model); |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | fn __atomic_exchange_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 { | |
| 281 | fn __atomic_exchange_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 { | |
| 282 | 282 | return atomic_exchange_N(u16, ptr, val, model); |
| 283 | 283 | } |
| 284 | 284 | |
| 285 | fn __atomic_exchange_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 { | |
| 285 | fn __atomic_exchange_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 { | |
| 286 | 286 | return atomic_exchange_N(u32, ptr, val, model); |
| 287 | 287 | } |
| 288 | 288 | |
| 289 | fn __atomic_exchange_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 { | |
| 289 | fn __atomic_exchange_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 { | |
| 290 | 290 | return atomic_exchange_N(u64, ptr, val, model); |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | fn __atomic_exchange_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 { | |
| 293 | fn __atomic_exchange_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 { | |
| 294 | 294 | return atomic_exchange_N(u128, ptr, val, model); |
| 295 | 295 | } |
| 296 | 296 | |
| ... | ... | @@ -323,23 +323,23 @@ inline fn atomic_compare_exchange_N( |
| 323 | 323 | } |
| 324 | 324 | } |
| 325 | 325 | |
| 326 | fn __atomic_compare_exchange_1(ptr: *u8, expected: *u8, desired: u8, success: i32, failure: i32) callconv(.C) i32 { | |
| 326 | fn __atomic_compare_exchange_1(ptr: *u8, expected: *u8, desired: u8, success: i32, failure: i32) callconv(.c) i32 { | |
| 327 | 327 | return atomic_compare_exchange_N(u8, ptr, expected, desired, success, failure); |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | fn __atomic_compare_exchange_2(ptr: *u16, expected: *u16, desired: u16, success: i32, failure: i32) callconv(.C) i32 { | |
| 330 | fn __atomic_compare_exchange_2(ptr: *u16, expected: *u16, desired: u16, success: i32, failure: i32) callconv(.c) i32 { | |
| 331 | 331 | return atomic_compare_exchange_N(u16, ptr, expected, desired, success, failure); |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | fn __atomic_compare_exchange_4(ptr: *u32, expected: *u32, desired: u32, success: i32, failure: i32) callconv(.C) i32 { | |
| 334 | fn __atomic_compare_exchange_4(ptr: *u32, expected: *u32, desired: u32, success: i32, failure: i32) callconv(.c) i32 { | |
| 335 | 335 | return atomic_compare_exchange_N(u32, ptr, expected, desired, success, failure); |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | fn __atomic_compare_exchange_8(ptr: *u64, expected: *u64, desired: u64, success: i32, failure: i32) callconv(.C) i32 { | |
| 338 | fn __atomic_compare_exchange_8(ptr: *u64, expected: *u64, desired: u64, success: i32, failure: i32) callconv(.c) i32 { | |
| 339 | 339 | return atomic_compare_exchange_N(u64, ptr, expected, desired, success, failure); |
| 340 | 340 | } |
| 341 | 341 | |
| 342 | fn __atomic_compare_exchange_16(ptr: *u128, expected: *u128, desired: u128, success: i32, failure: i32) callconv(.C) i32 { | |
| 342 | fn __atomic_compare_exchange_16(ptr: *u128, expected: *u128, desired: u128, success: i32, failure: i32) callconv(.c) i32 { | |
| 343 | 343 | return atomic_compare_exchange_N(u128, ptr, expected, desired, success, failure); |
| 344 | 344 | } |
| 345 | 345 | |
| ... | ... | @@ -376,163 +376,163 @@ inline fn fetch_op_N(comptime T: type, comptime op: std.builtin.AtomicRmwOp, ptr |
| 376 | 376 | return @atomicRmw(T, ptr, op, val, .seq_cst); |
| 377 | 377 | } |
| 378 | 378 | |
| 379 | fn __atomic_fetch_add_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 { | |
| 379 | fn __atomic_fetch_add_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 { | |
| 380 | 380 | return fetch_op_N(u8, .Add, ptr, val, model); |
| 381 | 381 | } |
| 382 | 382 | |
| 383 | fn __atomic_fetch_add_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 { | |
| 383 | fn __atomic_fetch_add_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 { | |
| 384 | 384 | return fetch_op_N(u16, .Add, ptr, val, model); |
| 385 | 385 | } |
| 386 | 386 | |
| 387 | fn __atomic_fetch_add_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 { | |
| 387 | fn __atomic_fetch_add_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 { | |
| 388 | 388 | return fetch_op_N(u32, .Add, ptr, val, model); |
| 389 | 389 | } |
| 390 | 390 | |
| 391 | fn __atomic_fetch_add_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 { | |
| 391 | fn __atomic_fetch_add_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 { | |
| 392 | 392 | return fetch_op_N(u64, .Add, ptr, val, model); |
| 393 | 393 | } |
| 394 | 394 | |
| 395 | fn __atomic_fetch_add_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 { | |
| 395 | fn __atomic_fetch_add_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 { | |
| 396 | 396 | return fetch_op_N(u128, .Add, ptr, val, model); |
| 397 | 397 | } |
| 398 | 398 | |
| 399 | fn __atomic_fetch_sub_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 { | |
| 399 | fn __atomic_fetch_sub_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 { | |
| 400 | 400 | return fetch_op_N(u8, .Sub, ptr, val, model); |
| 401 | 401 | } |
| 402 | 402 | |
| 403 | fn __atomic_fetch_sub_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 { | |
| 403 | fn __atomic_fetch_sub_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 { | |
| 404 | 404 | return fetch_op_N(u16, .Sub, ptr, val, model); |
| 405 | 405 | } |
| 406 | 406 | |
| 407 | fn __atomic_fetch_sub_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 { | |
| 407 | fn __atomic_fetch_sub_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 { | |
| 408 | 408 | return fetch_op_N(u32, .Sub, ptr, val, model); |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | fn __atomic_fetch_sub_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 { | |
| 411 | fn __atomic_fetch_sub_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 { | |
| 412 | 412 | return fetch_op_N(u64, .Sub, ptr, val, model); |
| 413 | 413 | } |
| 414 | 414 | |
| 415 | fn __atomic_fetch_sub_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 { | |
| 415 | fn __atomic_fetch_sub_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 { | |
| 416 | 416 | return fetch_op_N(u128, .Sub, ptr, val, model); |
| 417 | 417 | } |
| 418 | 418 | |
| 419 | fn __atomic_fetch_and_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 { | |
| 419 | fn __atomic_fetch_and_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 { | |
| 420 | 420 | return fetch_op_N(u8, .And, ptr, val, model); |
| 421 | 421 | } |
| 422 | 422 | |
| 423 | fn __atomic_fetch_and_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 { | |
| 423 | fn __atomic_fetch_and_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 { | |
| 424 | 424 | return fetch_op_N(u16, .And, ptr, val, model); |
| 425 | 425 | } |
| 426 | 426 | |
| 427 | fn __atomic_fetch_and_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 { | |
| 427 | fn __atomic_fetch_and_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 { | |
| 428 | 428 | return fetch_op_N(u32, .And, ptr, val, model); |
| 429 | 429 | } |
| 430 | 430 | |
| 431 | fn __atomic_fetch_and_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 { | |
| 431 | fn __atomic_fetch_and_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 { | |
| 432 | 432 | return fetch_op_N(u64, .And, ptr, val, model); |
| 433 | 433 | } |
| 434 | 434 | |
| 435 | fn __atomic_fetch_and_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 { | |
| 435 | fn __atomic_fetch_and_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 { | |
| 436 | 436 | return fetch_op_N(u128, .And, ptr, val, model); |
| 437 | 437 | } |
| 438 | 438 | |
| 439 | fn __atomic_fetch_or_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 { | |
| 439 | fn __atomic_fetch_or_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 { | |
| 440 | 440 | return fetch_op_N(u8, .Or, ptr, val, model); |
| 441 | 441 | } |
| 442 | 442 | |
| 443 | fn __atomic_fetch_or_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 { | |
| 443 | fn __atomic_fetch_or_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 { | |
| 444 | 444 | return fetch_op_N(u16, .Or, ptr, val, model); |
| 445 | 445 | } |
| 446 | 446 | |
| 447 | fn __atomic_fetch_or_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 { | |
| 447 | fn __atomic_fetch_or_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 { | |
| 448 | 448 | return fetch_op_N(u32, .Or, ptr, val, model); |
| 449 | 449 | } |
| 450 | 450 | |
| 451 | fn __atomic_fetch_or_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 { | |
| 451 | fn __atomic_fetch_or_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 { | |
| 452 | 452 | return fetch_op_N(u64, .Or, ptr, val, model); |
| 453 | 453 | } |
| 454 | 454 | |
| 455 | fn __atomic_fetch_or_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 { | |
| 455 | fn __atomic_fetch_or_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 { | |
| 456 | 456 | return fetch_op_N(u128, .Or, ptr, val, model); |
| 457 | 457 | } |
| 458 | 458 | |
| 459 | fn __atomic_fetch_xor_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 { | |
| 459 | fn __atomic_fetch_xor_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 { | |
| 460 | 460 | return fetch_op_N(u8, .Xor, ptr, val, model); |
| 461 | 461 | } |
| 462 | 462 | |
| 463 | fn __atomic_fetch_xor_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 { | |
| 463 | fn __atomic_fetch_xor_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 { | |
| 464 | 464 | return fetch_op_N(u16, .Xor, ptr, val, model); |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | fn __atomic_fetch_xor_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 { | |
| 467 | fn __atomic_fetch_xor_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 { | |
| 468 | 468 | return fetch_op_N(u32, .Xor, ptr, val, model); |
| 469 | 469 | } |
| 470 | 470 | |
| 471 | fn __atomic_fetch_xor_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 { | |
| 471 | fn __atomic_fetch_xor_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 { | |
| 472 | 472 | return fetch_op_N(u64, .Xor, ptr, val, model); |
| 473 | 473 | } |
| 474 | 474 | |
| 475 | fn __atomic_fetch_xor_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 { | |
| 475 | fn __atomic_fetch_xor_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 { | |
| 476 | 476 | return fetch_op_N(u128, .Xor, ptr, val, model); |
| 477 | 477 | } |
| 478 | 478 | |
| 479 | fn __atomic_fetch_nand_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 { | |
| 479 | fn __atomic_fetch_nand_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 { | |
| 480 | 480 | return fetch_op_N(u8, .Nand, ptr, val, model); |
| 481 | 481 | } |
| 482 | 482 | |
| 483 | fn __atomic_fetch_nand_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 { | |
| 483 | fn __atomic_fetch_nand_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 { | |
| 484 | 484 | return fetch_op_N(u16, .Nand, ptr, val, model); |
| 485 | 485 | } |
| 486 | 486 | |
| 487 | fn __atomic_fetch_nand_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 { | |
| 487 | fn __atomic_fetch_nand_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 { | |
| 488 | 488 | return fetch_op_N(u32, .Nand, ptr, val, model); |
| 489 | 489 | } |
| 490 | 490 | |
| 491 | fn __atomic_fetch_nand_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 { | |
| 491 | fn __atomic_fetch_nand_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 { | |
| 492 | 492 | return fetch_op_N(u64, .Nand, ptr, val, model); |
| 493 | 493 | } |
| 494 | 494 | |
| 495 | fn __atomic_fetch_nand_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 { | |
| 495 | fn __atomic_fetch_nand_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 { | |
| 496 | 496 | return fetch_op_N(u128, .Nand, ptr, val, model); |
| 497 | 497 | } |
| 498 | 498 | |
| 499 | fn __atomic_fetch_umax_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 { | |
| 499 | fn __atomic_fetch_umax_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 { | |
| 500 | 500 | return fetch_op_N(u8, .Max, ptr, val, model); |
| 501 | 501 | } |
| 502 | 502 | |
| 503 | fn __atomic_fetch_umax_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 { | |
| 503 | fn __atomic_fetch_umax_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 { | |
| 504 | 504 | return fetch_op_N(u16, .Max, ptr, val, model); |
| 505 | 505 | } |
| 506 | 506 | |
| 507 | fn __atomic_fetch_umax_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 { | |
| 507 | fn __atomic_fetch_umax_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 { | |
| 508 | 508 | return fetch_op_N(u32, .Max, ptr, val, model); |
| 509 | 509 | } |
| 510 | 510 | |
| 511 | fn __atomic_fetch_umax_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 { | |
| 511 | fn __atomic_fetch_umax_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 { | |
| 512 | 512 | return fetch_op_N(u64, .Max, ptr, val, model); |
| 513 | 513 | } |
| 514 | 514 | |
| 515 | fn __atomic_fetch_umax_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 { | |
| 515 | fn __atomic_fetch_umax_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 { | |
| 516 | 516 | return fetch_op_N(u128, .Max, ptr, val, model); |
| 517 | 517 | } |
| 518 | 518 | |
| 519 | fn __atomic_fetch_umin_1(ptr: *u8, val: u8, model: i32) callconv(.C) u8 { | |
| 519 | fn __atomic_fetch_umin_1(ptr: *u8, val: u8, model: i32) callconv(.c) u8 { | |
| 520 | 520 | return fetch_op_N(u8, .Min, ptr, val, model); |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | fn __atomic_fetch_umin_2(ptr: *u16, val: u16, model: i32) callconv(.C) u16 { | |
| 523 | fn __atomic_fetch_umin_2(ptr: *u16, val: u16, model: i32) callconv(.c) u16 { | |
| 524 | 524 | return fetch_op_N(u16, .Min, ptr, val, model); |
| 525 | 525 | } |
| 526 | 526 | |
| 527 | fn __atomic_fetch_umin_4(ptr: *u32, val: u32, model: i32) callconv(.C) u32 { | |
| 527 | fn __atomic_fetch_umin_4(ptr: *u32, val: u32, model: i32) callconv(.c) u32 { | |
| 528 | 528 | return fetch_op_N(u32, .Min, ptr, val, model); |
| 529 | 529 | } |
| 530 | 530 | |
| 531 | fn __atomic_fetch_umin_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 { | |
| 531 | fn __atomic_fetch_umin_8(ptr: *u64, val: u64, model: i32) callconv(.c) u64 { | |
| 532 | 532 | return fetch_op_N(u64, .Min, ptr, val, model); |
| 533 | 533 | } |
| 534 | 534 | |
| 535 | fn __atomic_fetch_umin_16(ptr: *u128, val: u128, model: i32) callconv(.C) u128 { | |
| 535 | fn __atomic_fetch_umin_16(ptr: *u128, val: u128, model: i32) callconv(.c) u128 { | |
| 536 | 536 | return fetch_op_N(u128, .Min, ptr, val, model); |
| 537 | 537 | } |
| 538 | 538 |
lib/compiler_rt/aulldiv.zig+2-2| ... | ... | @@ -15,7 +15,7 @@ comptime { |
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | pub fn _alldiv(a: i64, b: i64) callconv(.Stdcall) i64 { | |
| 18 | pub fn _alldiv(a: i64, b: i64) callconv(.{ .x86_stdcall = .{} }) i64 { | |
| 19 | 19 | const s_a = a >> (64 - 1); |
| 20 | 20 | const s_b = b >> (64 - 1); |
| 21 | 21 | |
| ... | ... | @@ -27,7 +27,7 @@ pub fn _alldiv(a: i64, b: i64) callconv(.Stdcall) i64 { |
| 27 | 27 | return (@as(i64, @bitCast(r)) ^ s) -% s; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | pub fn _aulldiv() callconv(.Naked) void { | |
| 30 | pub fn _aulldiv() callconv(.naked) void { | |
| 31 | 31 | @setRuntimeSafety(false); |
| 32 | 32 | |
| 33 | 33 | // The stack layout is: |
lib/compiler_rt/aullrem.zig+2-2| ... | ... | @@ -15,7 +15,7 @@ comptime { |
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | pub fn _allrem(a: i64, b: i64) callconv(.Stdcall) i64 { | |
| 18 | pub fn _allrem(a: i64, b: i64) callconv(.{ .x86_stdcall = .{} }) i64 { | |
| 19 | 19 | const s_a = a >> (64 - 1); |
| 20 | 20 | const s_b = b >> (64 - 1); |
| 21 | 21 | |
| ... | ... | @@ -27,7 +27,7 @@ pub fn _allrem(a: i64, b: i64) callconv(.Stdcall) i64 { |
| 27 | 27 | return (@as(i64, @bitCast(r)) ^ s) -% s; |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | pub fn _aullrem() callconv(.Naked) void { | |
| 30 | pub fn _aullrem() callconv(.naked) void { | |
| 31 | 31 | @setRuntimeSafety(false); |
| 32 | 32 | |
| 33 | 33 | // The stack layout is: |
lib/compiler_rt/bcmp.zig+1-1| ... | ... | @@ -5,7 +5,7 @@ comptime { |
| 5 | 5 | @export(&bcmp, .{ .name = "bcmp", .linkage = common.linkage, .visibility = common.visibility }); |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | pub fn bcmp(vl: [*]allowzero const u8, vr: [*]allowzero const u8, n: usize) callconv(.C) c_int { | |
| 8 | pub fn bcmp(vl: [*]allowzero const u8, vr: [*]allowzero const u8, n: usize) callconv(.c) c_int { | |
| 9 | 9 | @setRuntimeSafety(false); |
| 10 | 10 | |
| 11 | 11 | var index: usize = 0; |
lib/compiler_rt/bitreverse.zig+3-3| ... | ... | @@ -46,15 +46,15 @@ inline fn bitreverseXi2(comptime T: type, a: T) T { |
| 46 | 46 | } |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | pub fn __bitreversesi2(a: u32) callconv(.C) u32 { | |
| 49 | pub fn __bitreversesi2(a: u32) callconv(.c) u32 { | |
| 50 | 50 | return bitreverseXi2(u32, a); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | pub fn __bitreversedi2(a: u64) callconv(.C) u64 { | |
| 53 | pub fn __bitreversedi2(a: u64) callconv(.c) u64 { | |
| 54 | 54 | return bitreverseXi2(u64, a); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | pub fn __bitreverseti2(a: u128) callconv(.C) u128 { | |
| 57 | pub fn __bitreverseti2(a: u128) callconv(.c) u128 { | |
| 58 | 58 | return bitreverseXi2(u128, a); |
| 59 | 59 | } |
| 60 | 60 |
lib/compiler_rt/bswap.zig+3-3| ... | ... | @@ -66,15 +66,15 @@ inline fn bswapXi2(comptime T: type, a: T) T { |
| 66 | 66 | } |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | pub fn __bswapsi2(a: u32) callconv(.C) u32 { | |
| 69 | pub fn __bswapsi2(a: u32) callconv(.c) u32 { | |
| 70 | 70 | return bswapXi2(u32, a); |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | pub fn __bswapdi2(a: u64) callconv(.C) u64 { | |
| 73 | pub fn __bswapdi2(a: u64) callconv(.c) u64 { | |
| 74 | 74 | return bswapXi2(u64, a); |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | pub fn __bswapti2(a: u128) callconv(.C) u128 { | |
| 77 | pub fn __bswapti2(a: u128) callconv(.c) u128 { | |
| 78 | 78 | return bswapXi2(u128, a); |
| 79 | 79 | } |
| 80 | 80 |
lib/compiler_rt/ceil.zig+6-6| ... | ... | @@ -26,12 +26,12 @@ comptime { |
| 26 | 26 | @export(&ceill, .{ .name = "ceill", .linkage = common.linkage, .visibility = common.visibility }); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | pub fn __ceilh(x: f16) callconv(.C) f16 { | |
| 29 | pub fn __ceilh(x: f16) callconv(.c) f16 { | |
| 30 | 30 | // TODO: more efficient implementation |
| 31 | 31 | return @floatCast(ceilf(x)); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | pub fn ceilf(x: f32) callconv(.C) f32 { | |
| 34 | pub fn ceilf(x: f32) callconv(.c) f32 { | |
| 35 | 35 | var u: u32 = @bitCast(x); |
| 36 | 36 | const e = @as(i32, @intCast((u >> 23) & 0xFF)) - 0x7F; |
| 37 | 37 | var m: u32 = undefined; |
| ... | ... | @@ -64,7 +64,7 @@ pub fn ceilf(x: f32) callconv(.C) f32 { |
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | pub fn ceil(x: f64) callconv(.C) f64 { | |
| 67 | pub fn ceil(x: f64) callconv(.c) f64 { | |
| 68 | 68 | const f64_toint = 1.0 / math.floatEps(f64); |
| 69 | 69 | |
| 70 | 70 | const u: u64 = @bitCast(x); |
| ... | ... | @@ -95,12 +95,12 @@ pub fn ceil(x: f64) callconv(.C) f64 { |
| 95 | 95 | } |
| 96 | 96 | } |
| 97 | 97 | |
| 98 | pub fn __ceilx(x: f80) callconv(.C) f80 { | |
| 98 | pub fn __ceilx(x: f80) callconv(.c) f80 { | |
| 99 | 99 | // TODO: more efficient implementation |
| 100 | 100 | return @floatCast(ceilq(x)); |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | pub fn ceilq(x: f128) callconv(.C) f128 { | |
| 103 | pub fn ceilq(x: f128) callconv(.c) f128 { | |
| 104 | 104 | const f128_toint = 1.0 / math.floatEps(f128); |
| 105 | 105 | |
| 106 | 106 | const u: u128 = @bitCast(x); |
| ... | ... | @@ -129,7 +129,7 @@ pub fn ceilq(x: f128) callconv(.C) f128 { |
| 129 | 129 | } |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | pub fn ceill(x: c_longdouble) callconv(.C) c_longdouble { | |
| 132 | pub fn ceill(x: c_longdouble) callconv(.c) c_longdouble { | |
| 133 | 133 | switch (@typeInfo(c_longdouble).float.bits) { |
| 134 | 134 | 16 => return __ceilh(x), |
| 135 | 135 | 32 => return ceilf(x), |
lib/compiler_rt/clear_cache.zig+1-1| ... | ... | @@ -15,7 +15,7 @@ comptime { |
| 15 | 15 | _ = &clear_cache; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn clear_cache(start: usize, end: usize) callconv(.C) void { | |
| 18 | fn clear_cache(start: usize, end: usize) callconv(.c) void { | |
| 19 | 19 | const x86 = switch (arch) { |
| 20 | 20 | .x86, .x86_64 => true, |
| 21 | 21 | else => false, |
lib/compiler_rt/clzsi2_test.zig+1-1| ... | ... | @@ -4,7 +4,7 @@ const testing = @import("std").testing; |
| 4 | 4 | |
| 5 | 5 | fn test__clzsi2(a: u32, expected: i32) !void { |
| 6 | 6 | const nakedClzsi2 = clz.__clzsi2; |
| 7 | const actualClzsi2 = @as(*const fn (a: i32) callconv(.C) i32, @ptrCast(&nakedClzsi2)); | |
| 7 | const actualClzsi2 = @as(*const fn (a: i32) callconv(.c) i32, @ptrCast(&nakedClzsi2)); | |
| 8 | 8 | const x: i32 = @bitCast(a); |
| 9 | 9 | const result = actualClzsi2(x); |
| 10 | 10 | try testing.expectEqual(expected, result); |
lib/compiler_rt/cmp.zig+6-6| ... | ... | @@ -34,27 +34,27 @@ inline fn XcmpXi2(comptime T: type, a: T, b: T) i32 { |
| 34 | 34 | return cmp1 - cmp2 + 1; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | pub fn __cmpsi2(a: i32, b: i32) callconv(.C) i32 { | |
| 37 | pub fn __cmpsi2(a: i32, b: i32) callconv(.c) i32 { | |
| 38 | 38 | return XcmpXi2(i32, a, b); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | pub fn __cmpdi2(a: i64, b: i64) callconv(.C) i32 { | |
| 41 | pub fn __cmpdi2(a: i64, b: i64) callconv(.c) i32 { | |
| 42 | 42 | return XcmpXi2(i64, a, b); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | pub fn __cmpti2(a: i128, b: i128) callconv(.C) i32 { | |
| 45 | pub fn __cmpti2(a: i128, b: i128) callconv(.c) i32 { | |
| 46 | 46 | return XcmpXi2(i128, a, b); |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | pub fn __ucmpsi2(a: u32, b: u32) callconv(.C) i32 { | |
| 49 | pub fn __ucmpsi2(a: u32, b: u32) callconv(.c) i32 { | |
| 50 | 50 | return XcmpXi2(u32, a, b); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | pub fn __ucmpdi2(a: u64, b: u64) callconv(.C) i32 { | |
| 53 | pub fn __ucmpdi2(a: u64, b: u64) callconv(.c) i32 { | |
| 54 | 54 | return XcmpXi2(u64, a, b); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | pub fn __ucmpti2(a: u128, b: u128) callconv(.C) i32 { | |
| 57 | pub fn __ucmpti2(a: u128, b: u128) callconv(.c) i32 { | |
| 58 | 58 | return XcmpXi2(u128, a, b); |
| 59 | 59 | } |
| 60 | 60 |
lib/compiler_rt/cmpdf2.zig+8-8| ... | ... | @@ -25,44 +25,44 @@ comptime { |
| 25 | 25 | /// |
| 26 | 26 | /// Note that this matches the definition of `__ledf2`, `__eqdf2`, `__nedf2`, `__cmpdf2`, |
| 27 | 27 | /// and `__ltdf2`. |
| 28 | fn __cmpdf2(a: f64, b: f64) callconv(.C) i32 { | |
| 28 | fn __cmpdf2(a: f64, b: f64) callconv(.c) i32 { | |
| 29 | 29 | return @intFromEnum(comparef.cmpf2(f64, comparef.LE, a, b)); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /// "These functions return a value less than or equal to zero if neither argument is NaN, |
| 33 | 33 | /// and a is less than or equal to b." |
| 34 | pub fn __ledf2(a: f64, b: f64) callconv(.C) i32 { | |
| 34 | pub fn __ledf2(a: f64, b: f64) callconv(.c) i32 { | |
| 35 | 35 | return __cmpdf2(a, b); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /// "These functions return zero if neither argument is NaN, and a and b are equal." |
| 39 | 39 | /// Note that due to some kind of historical accident, __eqdf2 and __nedf2 are defined |
| 40 | 40 | /// to have the same return value. |
| 41 | pub fn __eqdf2(a: f64, b: f64) callconv(.C) i32 { | |
| 41 | pub fn __eqdf2(a: f64, b: f64) callconv(.c) i32 { | |
| 42 | 42 | return __cmpdf2(a, b); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal." |
| 46 | 46 | /// Note that due to some kind of historical accident, __eqdf2 and __nedf2 are defined |
| 47 | 47 | /// to have the same return value. |
| 48 | pub fn __nedf2(a: f64, b: f64) callconv(.C) i32 { | |
| 48 | pub fn __nedf2(a: f64, b: f64) callconv(.c) i32 { | |
| 49 | 49 | return __cmpdf2(a, b); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /// "These functions return a value less than zero if neither argument is NaN, and a |
| 53 | 53 | /// is strictly less than b." |
| 54 | pub fn __ltdf2(a: f64, b: f64) callconv(.C) i32 { | |
| 54 | pub fn __ltdf2(a: f64, b: f64) callconv(.c) i32 { | |
| 55 | 55 | return __cmpdf2(a, b); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | fn __aeabi_dcmpeq(a: f64, b: f64) callconv(.AAPCS) i32 { | |
| 58 | fn __aeabi_dcmpeq(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 59 | 59 | return @intFromBool(comparef.cmpf2(f64, comparef.LE, a, b) == .Equal); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | fn __aeabi_dcmplt(a: f64, b: f64) callconv(.AAPCS) i32 { | |
| 62 | fn __aeabi_dcmplt(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 63 | 63 | return @intFromBool(comparef.cmpf2(f64, comparef.LE, a, b) == .Less); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | fn __aeabi_dcmple(a: f64, b: f64) callconv(.AAPCS) i32 { | |
| 66 | fn __aeabi_dcmple(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 67 | 67 | return @intFromBool(comparef.cmpf2(f64, comparef.LE, a, b) != .Greater); |
| 68 | 68 | } |
lib/compiler_rt/cmphf2.zig+5-5| ... | ... | @@ -19,32 +19,32 @@ comptime { |
| 19 | 19 | /// |
| 20 | 20 | /// Note that this matches the definition of `__lehf2`, `__eqhf2`, `__nehf2`, `__cmphf2`, |
| 21 | 21 | /// and `__lthf2`. |
| 22 | fn __cmphf2(a: f16, b: f16) callconv(.C) i32 { | |
| 22 | fn __cmphf2(a: f16, b: f16) callconv(.c) i32 { | |
| 23 | 23 | return @intFromEnum(comparef.cmpf2(f16, comparef.LE, a, b)); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /// "These functions return a value less than or equal to zero if neither argument is NaN, |
| 27 | 27 | /// and a is less than or equal to b." |
| 28 | pub fn __lehf2(a: f16, b: f16) callconv(.C) i32 { | |
| 28 | pub fn __lehf2(a: f16, b: f16) callconv(.c) i32 { | |
| 29 | 29 | return __cmphf2(a, b); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /// "These functions return zero if neither argument is NaN, and a and b are equal." |
| 33 | 33 | /// Note that due to some kind of historical accident, __eqhf2 and __nehf2 are defined |
| 34 | 34 | /// to have the same return value. |
| 35 | pub fn __eqhf2(a: f16, b: f16) callconv(.C) i32 { | |
| 35 | pub fn __eqhf2(a: f16, b: f16) callconv(.c) i32 { | |
| 36 | 36 | return __cmphf2(a, b); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal." |
| 40 | 40 | /// Note that due to some kind of historical accident, __eqhf2 and __nehf2 are defined |
| 41 | 41 | /// to have the same return value. |
| 42 | pub fn __nehf2(a: f16, b: f16) callconv(.C) i32 { | |
| 42 | pub fn __nehf2(a: f16, b: f16) callconv(.c) i32 { | |
| 43 | 43 | return __cmphf2(a, b); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /// "These functions return a value less than zero if neither argument is NaN, and a |
| 47 | 47 | /// is strictly less than b." |
| 48 | pub fn __lthf2(a: f16, b: f16) callconv(.C) i32 { | |
| 48 | pub fn __lthf2(a: f16, b: f16) callconv(.c) i32 { | |
| 49 | 49 | return __cmphf2(a, b); |
| 50 | 50 | } |
lib/compiler_rt/cmpsf2.zig+8-8| ... | ... | @@ -25,44 +25,44 @@ comptime { |
| 25 | 25 | /// |
| 26 | 26 | /// Note that this matches the definition of `__lesf2`, `__eqsf2`, `__nesf2`, `__cmpsf2`, |
| 27 | 27 | /// and `__ltsf2`. |
| 28 | fn __cmpsf2(a: f32, b: f32) callconv(.C) i32 { | |
| 28 | fn __cmpsf2(a: f32, b: f32) callconv(.c) i32 { | |
| 29 | 29 | return @intFromEnum(comparef.cmpf2(f32, comparef.LE, a, b)); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /// "These functions return a value less than or equal to zero if neither argument is NaN, |
| 33 | 33 | /// and a is less than or equal to b." |
| 34 | pub fn __lesf2(a: f32, b: f32) callconv(.C) i32 { | |
| 34 | pub fn __lesf2(a: f32, b: f32) callconv(.c) i32 { | |
| 35 | 35 | return __cmpsf2(a, b); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /// "These functions return zero if neither argument is NaN, and a and b are equal." |
| 39 | 39 | /// Note that due to some kind of historical accident, __eqsf2 and __nesf2 are defined |
| 40 | 40 | /// to have the same return value. |
| 41 | pub fn __eqsf2(a: f32, b: f32) callconv(.C) i32 { | |
| 41 | pub fn __eqsf2(a: f32, b: f32) callconv(.c) i32 { | |
| 42 | 42 | return __cmpsf2(a, b); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | /// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal." |
| 46 | 46 | /// Note that due to some kind of historical accident, __eqsf2 and __nesf2 are defined |
| 47 | 47 | /// to have the same return value. |
| 48 | pub fn __nesf2(a: f32, b: f32) callconv(.C) i32 { | |
| 48 | pub fn __nesf2(a: f32, b: f32) callconv(.c) i32 { | |
| 49 | 49 | return __cmpsf2(a, b); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /// "These functions return a value less than zero if neither argument is NaN, and a |
| 53 | 53 | /// is strictly less than b." |
| 54 | pub fn __ltsf2(a: f32, b: f32) callconv(.C) i32 { | |
| 54 | pub fn __ltsf2(a: f32, b: f32) callconv(.c) i32 { | |
| 55 | 55 | return __cmpsf2(a, b); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | fn __aeabi_fcmpeq(a: f32, b: f32) callconv(.AAPCS) i32 { | |
| 58 | fn __aeabi_fcmpeq(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 59 | 59 | return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) == .Equal); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | fn __aeabi_fcmplt(a: f32, b: f32) callconv(.AAPCS) i32 { | |
| 62 | fn __aeabi_fcmplt(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 63 | 63 | return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) == .Less); |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | fn __aeabi_fcmple(a: f32, b: f32) callconv(.AAPCS) i32 { | |
| 66 | fn __aeabi_fcmple(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 67 | 67 | return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) != .Greater); |
| 68 | 68 | } |
lib/compiler_rt/cmptf2.zig+12-12| ... | ... | @@ -33,33 +33,33 @@ comptime { |
| 33 | 33 | /// |
| 34 | 34 | /// Note that this matches the definition of `__letf2`, `__eqtf2`, `__netf2`, `__cmptf2`, |
| 35 | 35 | /// and `__lttf2`. |
| 36 | fn __cmptf2(a: f128, b: f128) callconv(.C) i32 { | |
| 36 | fn __cmptf2(a: f128, b: f128) callconv(.c) i32 { | |
| 37 | 37 | return @intFromEnum(comparef.cmpf2(f128, comparef.LE, a, b)); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | 40 | /// "These functions return a value less than or equal to zero if neither argument is NaN, |
| 41 | 41 | /// and a is less than or equal to b." |
| 42 | fn __letf2(a: f128, b: f128) callconv(.C) i32 { | |
| 42 | fn __letf2(a: f128, b: f128) callconv(.c) i32 { | |
| 43 | 43 | return __cmptf2(a, b); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /// "These functions return zero if neither argument is NaN, and a and b are equal." |
| 47 | 47 | /// Note that due to some kind of historical accident, __eqtf2 and __netf2 are defined |
| 48 | 48 | /// to have the same return value. |
| 49 | fn __eqtf2(a: f128, b: f128) callconv(.C) i32 { | |
| 49 | fn __eqtf2(a: f128, b: f128) callconv(.c) i32 { | |
| 50 | 50 | return __cmptf2(a, b); |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal." |
| 54 | 54 | /// Note that due to some kind of historical accident, __eqtf2 and __netf2 are defined |
| 55 | 55 | /// to have the same return value. |
| 56 | fn __netf2(a: f128, b: f128) callconv(.C) i32 { | |
| 56 | fn __netf2(a: f128, b: f128) callconv(.c) i32 { | |
| 57 | 57 | return __cmptf2(a, b); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /// "These functions return a value less than zero if neither argument is NaN, and a |
| 61 | 61 | /// is strictly less than b." |
| 62 | fn __lttf2(a: f128, b: f128) callconv(.C) i32 { | |
| 62 | fn __lttf2(a: f128, b: f128) callconv(.c) i32 { | |
| 63 | 63 | return __cmptf2(a, b); |
| 64 | 64 | } |
| 65 | 65 | |
| ... | ... | @@ -70,34 +70,34 @@ const SparcFCMP = enum(i32) { |
| 70 | 70 | Unordered = 3, |
| 71 | 71 | }; |
| 72 | 72 | |
| 73 | fn _Qp_cmp(a: *const f128, b: *const f128) callconv(.C) i32 { | |
| 73 | fn _Qp_cmp(a: *const f128, b: *const f128) callconv(.c) i32 { | |
| 74 | 74 | return @intFromEnum(comparef.cmpf2(f128, SparcFCMP, a.*, b.*)); |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | fn _Qp_feq(a: *const f128, b: *const f128) callconv(.C) bool { | |
| 77 | fn _Qp_feq(a: *const f128, b: *const f128) callconv(.c) bool { | |
| 78 | 78 | return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) == .Equal; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | fn _Qp_fne(a: *const f128, b: *const f128) callconv(.C) bool { | |
| 81 | fn _Qp_fne(a: *const f128, b: *const f128) callconv(.c) bool { | |
| 82 | 82 | return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) != .Equal; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | fn _Qp_flt(a: *const f128, b: *const f128) callconv(.C) bool { | |
| 85 | fn _Qp_flt(a: *const f128, b: *const f128) callconv(.c) bool { | |
| 86 | 86 | return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) == .Less; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | fn _Qp_fgt(a: *const f128, b: *const f128) callconv(.C) bool { | |
| 89 | fn _Qp_fgt(a: *const f128, b: *const f128) callconv(.c) bool { | |
| 90 | 90 | return @as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b))) == .Greater; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | fn _Qp_fge(a: *const f128, b: *const f128) callconv(.C) bool { | |
| 93 | fn _Qp_fge(a: *const f128, b: *const f128) callconv(.c) bool { | |
| 94 | 94 | return switch (@as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b)))) { |
| 95 | 95 | .Equal, .Greater => true, |
| 96 | 96 | .Less, .Unordered => false, |
| 97 | 97 | }; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | fn _Qp_fle(a: *const f128, b: *const f128) callconv(.C) bool { | |
| 100 | fn _Qp_fle(a: *const f128, b: *const f128) callconv(.c) bool { | |
| 101 | 101 | return switch (@as(SparcFCMP, @enumFromInt(_Qp_cmp(a, b)))) { |
| 102 | 102 | .Equal, .Less => true, |
| 103 | 103 | .Greater, .Unordered => false, |
lib/compiler_rt/cmpxf2.zig+5-5| ... | ... | @@ -19,32 +19,32 @@ comptime { |
| 19 | 19 | /// |
| 20 | 20 | /// Note that this matches the definition of `__lexf2`, `__eqxf2`, `__nexf2`, `__cmpxf2`, |
| 21 | 21 | /// and `__ltxf2`. |
| 22 | fn __cmpxf2(a: f80, b: f80) callconv(.C) i32 { | |
| 22 | fn __cmpxf2(a: f80, b: f80) callconv(.c) i32 { | |
| 23 | 23 | return @intFromEnum(comparef.cmp_f80(comparef.LE, a, b)); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /// "These functions return a value less than or equal to zero if neither argument is NaN, |
| 27 | 27 | /// and a is less than or equal to b." |
| 28 | fn __lexf2(a: f80, b: f80) callconv(.C) i32 { | |
| 28 | fn __lexf2(a: f80, b: f80) callconv(.c) i32 { | |
| 29 | 29 | return __cmpxf2(a, b); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /// "These functions return zero if neither argument is NaN, and a and b are equal." |
| 33 | 33 | /// Note that due to some kind of historical accident, __eqxf2 and __nexf2 are defined |
| 34 | 34 | /// to have the same return value. |
| 35 | fn __eqxf2(a: f80, b: f80) callconv(.C) i32 { | |
| 35 | fn __eqxf2(a: f80, b: f80) callconv(.c) i32 { | |
| 36 | 36 | return __cmpxf2(a, b); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | /// "These functions return a nonzero value if either argument is NaN, or if a and b are unequal." |
| 40 | 40 | /// Note that due to some kind of historical accident, __eqxf2 and __nexf2 are defined |
| 41 | 41 | /// to have the same return value. |
| 42 | fn __nexf2(a: f80, b: f80) callconv(.C) i32 { | |
| 42 | fn __nexf2(a: f80, b: f80) callconv(.c) i32 { | |
| 43 | 43 | return __cmpxf2(a, b); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /// "These functions return a value less than zero if neither argument is NaN, and a |
| 47 | 47 | /// is strictly less than b." |
| 48 | fn __ltxf2(a: f80, b: f80) callconv(.C) i32 { | |
| 48 | fn __ltxf2(a: f80, b: f80) callconv(.c) i32 { | |
| 49 | 49 | return __cmpxf2(a, b); |
| 50 | 50 | } |
lib/compiler_rt/cos.zig+6-6| ... | ... | @@ -22,12 +22,12 @@ comptime { |
| 22 | 22 | @export(&cosl, .{ .name = "cosl", .linkage = common.linkage, .visibility = common.visibility }); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | pub fn __cosh(a: f16) callconv(.C) f16 { | |
| 25 | pub fn __cosh(a: f16) callconv(.c) f16 { | |
| 26 | 26 | // TODO: more efficient implementation |
| 27 | 27 | return @floatCast(cosf(a)); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | pub fn cosf(x: f32) callconv(.C) f32 { | |
| 30 | pub fn cosf(x: f32) callconv(.c) f32 { | |
| 31 | 31 | // Small multiples of pi/2 rounded to double precision. |
| 32 | 32 | const c1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18 |
| 33 | 33 | const c2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18 |
| ... | ... | @@ -84,7 +84,7 @@ pub fn cosf(x: f32) callconv(.C) f32 { |
| 84 | 84 | }; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | pub fn cos(x: f64) callconv(.C) f64 { | |
| 87 | pub fn cos(x: f64) callconv(.c) f64 { | |
| 88 | 88 | var ix = @as(u64, @bitCast(x)) >> 32; |
| 89 | 89 | ix &= 0x7fffffff; |
| 90 | 90 | |
| ... | ... | @@ -113,17 +113,17 @@ pub fn cos(x: f64) callconv(.C) f64 { |
| 113 | 113 | }; |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | pub fn __cosx(a: f80) callconv(.C) f80 { | |
| 116 | pub fn __cosx(a: f80) callconv(.c) f80 { | |
| 117 | 117 | // TODO: more efficient implementation |
| 118 | 118 | return @floatCast(cosq(a)); |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | pub fn cosq(a: f128) callconv(.C) f128 { | |
| 121 | pub fn cosq(a: f128) callconv(.c) f128 { | |
| 122 | 122 | // TODO: more correct implementation |
| 123 | 123 | return cos(@floatCast(a)); |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | pub fn cosl(x: c_longdouble) callconv(.C) c_longdouble { | |
| 126 | pub fn cosl(x: c_longdouble) callconv(.c) c_longdouble { | |
| 127 | 127 | switch (@typeInfo(c_longdouble).float.bits) { |
| 128 | 128 | 16 => return __cosh(x), |
| 129 | 129 | 32 => return cosf(x), |
lib/compiler_rt/count0bits.zig+11-11| ... | ... | @@ -52,7 +52,7 @@ inline fn clzXi2(comptime T: type, a: T) i32 { |
| 52 | 52 | return @intCast(n - @as(T, @bitCast(x))); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | fn __clzsi2_thumb1() callconv(.Naked) void { | |
| 55 | fn __clzsi2_thumb1() callconv(.naked) void { | |
| 56 | 56 | @setRuntimeSafety(false); |
| 57 | 57 | |
| 58 | 58 | // Similar to the generic version with the last two rounds replaced by a LUT |
| ... | ... | @@ -86,7 +86,7 @@ fn __clzsi2_thumb1() callconv(.Naked) void { |
| 86 | 86 | unreachable; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | fn __clzsi2_arm32() callconv(.Naked) void { | |
| 89 | fn __clzsi2_arm32() callconv(.naked) void { | |
| 90 | 90 | @setRuntimeSafety(false); |
| 91 | 91 | |
| 92 | 92 | asm volatile ( |
| ... | ... | @@ -135,7 +135,7 @@ fn __clzsi2_arm32() callconv(.Naked) void { |
| 135 | 135 | unreachable; |
| 136 | 136 | } |
| 137 | 137 | |
| 138 | fn clzsi2_generic(a: i32) callconv(.C) i32 { | |
| 138 | fn clzsi2_generic(a: i32) callconv(.c) i32 { | |
| 139 | 139 | return clzXi2(i32, a); |
| 140 | 140 | } |
| 141 | 141 | |
| ... | ... | @@ -159,11 +159,11 @@ pub const __clzsi2 = switch (builtin.cpu.arch) { |
| 159 | 159 | else => clzsi2_generic, |
| 160 | 160 | }; |
| 161 | 161 | |
| 162 | pub fn __clzdi2(a: i64) callconv(.C) i32 { | |
| 162 | pub fn __clzdi2(a: i64) callconv(.c) i32 { | |
| 163 | 163 | return clzXi2(i64, a); |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | pub fn __clzti2(a: i128) callconv(.C) i32 { | |
| 166 | pub fn __clzti2(a: i128) callconv(.c) i32 { | |
| 167 | 167 | return clzXi2(i128, a); |
| 168 | 168 | } |
| 169 | 169 | |
| ... | ... | @@ -190,15 +190,15 @@ inline fn ctzXi2(comptime T: type, a: T) i32 { |
| 190 | 190 | return @intCast(n - @as(T, @bitCast((x & 1)))); |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | pub fn __ctzsi2(a: i32) callconv(.C) i32 { | |
| 193 | pub fn __ctzsi2(a: i32) callconv(.c) i32 { | |
| 194 | 194 | return ctzXi2(i32, a); |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | pub fn __ctzdi2(a: i64) callconv(.C) i32 { | |
| 197 | pub fn __ctzdi2(a: i64) callconv(.c) i32 { | |
| 198 | 198 | return ctzXi2(i64, a); |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | pub fn __ctzti2(a: i128) callconv(.C) i32 { | |
| 201 | pub fn __ctzti2(a: i128) callconv(.c) i32 { | |
| 202 | 202 | return ctzXi2(i128, a); |
| 203 | 203 | } |
| 204 | 204 | |
| ... | ... | @@ -222,15 +222,15 @@ inline fn ffsXi2(comptime T: type, a: T) i32 { |
| 222 | 222 | return @as(i32, @intCast(n - @as(T, @bitCast((x & 1))))) + 1; |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | pub fn __ffssi2(a: i32) callconv(.C) i32 { | |
| 225 | pub fn __ffssi2(a: i32) callconv(.c) i32 { | |
| 226 | 226 | return ffsXi2(i32, a); |
| 227 | 227 | } |
| 228 | 228 | |
| 229 | pub fn __ffsdi2(a: i64) callconv(.C) i32 { | |
| 229 | pub fn __ffsdi2(a: i64) callconv(.c) i32 { | |
| 230 | 230 | return ffsXi2(i64, a); |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | pub fn __ffsti2(a: i128) callconv(.C) i32 { | |
| 233 | pub fn __ffsti2(a: i128) callconv(.c) i32 { | |
| 234 | 234 | return ffsXi2(i128, a); |
| 235 | 235 | } |
| 236 | 236 |
lib/compiler_rt/divc3_test.zig+1-1| ... | ... | @@ -17,7 +17,7 @@ test "divc3" { |
| 17 | 17 | try testDiv(f128, __divtc3); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | fn testDiv(comptime T: type, comptime f: fn (T, T, T, T) callconv(.C) Complex(T)) !void { | |
| 20 | fn testDiv(comptime T: type, comptime f: fn (T, T, T, T) callconv(.c) Complex(T)) !void { | |
| 21 | 21 | { |
| 22 | 22 | const a: T = 1.0; |
| 23 | 23 | const b: T = 0.0; |
lib/compiler_rt/divdc3.zig+1-1| ... | ... | @@ -8,6 +8,6 @@ comptime { |
| 8 | 8 | } |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | pub fn __divdc3(a: f64, b: f64, c: f64, d: f64) callconv(.C) Complex(f64) { | |
| 11 | pub fn __divdc3(a: f64, b: f64, c: f64, d: f64) callconv(.c) Complex(f64) { | |
| 12 | 12 | return divc3.divc3(f64, a, b, c, d); |
| 13 | 13 | } |
lib/compiler_rt/divdf3.zig+2-2| ... | ... | @@ -21,11 +21,11 @@ comptime { |
| 21 | 21 | } |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | pub fn __divdf3(a: f64, b: f64) callconv(.C) f64 { | |
| 24 | pub fn __divdf3(a: f64, b: f64) callconv(.c) f64 { | |
| 25 | 25 | return div(a, b); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | fn __aeabi_ddiv(a: f64, b: f64) callconv(.AAPCS) f64 { | |
| 28 | fn __aeabi_ddiv(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 { | |
| 29 | 29 | return div(a, b); |
| 30 | 30 | } |
| 31 | 31 |
lib/compiler_rt/divhc3.zig+1-1| ... | ... | @@ -8,6 +8,6 @@ comptime { |
| 8 | 8 | } |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | pub fn __divhc3(a: f16, b: f16, c: f16, d: f16) callconv(.C) Complex(f16) { | |
| 11 | pub fn __divhc3(a: f16, b: f16, c: f16, d: f16) callconv(.c) Complex(f16) { | |
| 12 | 12 | return divc3.divc3(f16, a, b, c, d); |
| 13 | 13 | } |
lib/compiler_rt/divhf3.zig+1-1| ... | ... | @@ -5,7 +5,7 @@ comptime { |
| 5 | 5 | @export(&__divhf3, .{ .name = "__divhf3", .linkage = common.linkage, .visibility = common.visibility }); |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | pub fn __divhf3(a: f16, b: f16) callconv(.C) f16 { | |
| 8 | pub fn __divhf3(a: f16, b: f16) callconv(.c) f16 { | |
| 9 | 9 | // TODO: more efficient implementation |
| 10 | 10 | return @floatCast(divsf3.__divsf3(a, b)); |
| 11 | 11 | } |
lib/compiler_rt/divmodei4.zig+2-2| ... | ... | @@ -33,7 +33,7 @@ fn divmod(q: ?[]u32, r: ?[]u32, u: []u32, v: []u32) !void { |
| 33 | 33 | if (r) |x| if (u_sign < 0) neg(x); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | pub fn __divei4(r_q: [*]u32, u_p: [*]u32, v_p: [*]u32, bits: usize) callconv(.C) void { | |
| 36 | pub fn __divei4(r_q: [*]u32, u_p: [*]u32, v_p: [*]u32, bits: usize) callconv(.c) void { | |
| 37 | 37 | @setRuntimeSafety(builtin.is_test); |
| 38 | 38 | const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable]; |
| 39 | 39 | const v = v_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable]; |
| ... | ... | @@ -41,7 +41,7 @@ pub fn __divei4(r_q: [*]u32, u_p: [*]u32, v_p: [*]u32, bits: usize) callconv(.C) |
| 41 | 41 | @call(.always_inline, divmod, .{ q, null, u, v }) catch unreachable; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | pub fn __modei4(r_p: [*]u32, u_p: [*]u32, v_p: [*]u32, bits: usize) callconv(.C) void { | |
| 44 | pub fn __modei4(r_p: [*]u32, u_p: [*]u32, v_p: [*]u32, bits: usize) callconv(.c) void { | |
| 45 | 45 | @setRuntimeSafety(builtin.is_test); |
| 46 | 46 | const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable]; |
| 47 | 47 | const v = v_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable]; |
lib/compiler_rt/divsc3.zig+1-1| ... | ... | @@ -8,6 +8,6 @@ comptime { |
| 8 | 8 | } |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | pub fn __divsc3(a: f32, b: f32, c: f32, d: f32) callconv(.C) Complex(f32) { | |
| 11 | pub fn __divsc3(a: f32, b: f32, c: f32, d: f32) callconv(.c) Complex(f32) { | |
| 12 | 12 | return divc3.divc3(f32, a, b, c, d); |
| 13 | 13 | } |
lib/compiler_rt/divsf3.zig+2-2| ... | ... | @@ -19,11 +19,11 @@ comptime { |
| 19 | 19 | } |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | pub fn __divsf3(a: f32, b: f32) callconv(.C) f32 { | |
| 22 | pub fn __divsf3(a: f32, b: f32) callconv(.c) f32 { | |
| 23 | 23 | return div(a, b); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | fn __aeabi_fdiv(a: f32, b: f32) callconv(.AAPCS) f32 { | |
| 26 | fn __aeabi_fdiv(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 { | |
| 27 | 27 | return div(a, b); |
| 28 | 28 | } |
| 29 | 29 |
lib/compiler_rt/divtc3.zig+1-1| ... | ... | @@ -10,6 +10,6 @@ comptime { |
| 10 | 10 | } |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | pub fn __divtc3(a: f128, b: f128, c: f128, d: f128) callconv(.C) Complex(f128) { | |
| 13 | pub fn __divtc3(a: f128, b: f128, c: f128, d: f128) callconv(.c) Complex(f128) { | |
| 14 | 14 | return divc3.divc3(f128, a, b, c, d); |
| 15 | 15 | } |
lib/compiler_rt/divtf3.zig+2-2| ... | ... | @@ -16,11 +16,11 @@ comptime { |
| 16 | 16 | @export(&__divtf3, .{ .name = "__divtf3", .linkage = common.linkage, .visibility = common.visibility }); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | pub fn __divtf3(a: f128, b: f128) callconv(.C) f128 { | |
| 19 | pub fn __divtf3(a: f128, b: f128) callconv(.c) f128 { | |
| 20 | 20 | return div(a, b); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | fn _Qp_div(c: *f128, a: *const f128, b: *const f128) callconv(.C) void { | |
| 23 | fn _Qp_div(c: *f128, a: *const f128, b: *const f128) callconv(.c) void { | |
| 24 | 24 | c.* = div(a.*, b.*); |
| 25 | 25 | } |
| 26 | 26 |
lib/compiler_rt/divti3.zig+2-2| ... | ... | @@ -14,13 +14,13 @@ comptime { |
| 14 | 14 | } |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | pub fn __divti3(a: i128, b: i128) callconv(.C) i128 { | |
| 17 | pub fn __divti3(a: i128, b: i128) callconv(.c) i128 { | |
| 18 | 18 | return div(a, b); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | const v128 = @Vector(2, u64); |
| 22 | 22 | |
| 23 | fn __divti3_windows_x86_64(a: v128, b: v128) callconv(.C) v128 { | |
| 23 | fn __divti3_windows_x86_64(a: v128, b: v128) callconv(.c) v128 { | |
| 24 | 24 | return @bitCast(div(@bitCast(a), @bitCast(b))); |
| 25 | 25 | } |
| 26 | 26 |
lib/compiler_rt/divxc3.zig+1-1| ... | ... | @@ -8,6 +8,6 @@ comptime { |
| 8 | 8 | } |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | pub fn __divxc3(a: f80, b: f80, c: f80, d: f80) callconv(.C) Complex(f80) { | |
| 11 | pub fn __divxc3(a: f80, b: f80, c: f80, d: f80) callconv(.c) Complex(f80) { | |
| 12 | 12 | return divc3.divc3(f80, a, b, c, d); |
| 13 | 13 | } |
lib/compiler_rt/divxf3.zig+1-1| ... | ... | @@ -12,7 +12,7 @@ comptime { |
| 12 | 12 | @export(&__divxf3, .{ .name = "__divxf3", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __divxf3(a: f80, b: f80) callconv(.C) f80 { | |
| 15 | pub fn __divxf3(a: f80, b: f80) callconv(.c) f80 { | |
| 16 | 16 | const T = f80; |
| 17 | 17 | const Z = std.meta.Int(.unsigned, @bitSizeOf(T)); |
| 18 | 18 |
lib/compiler_rt/emutls.zig+2-2| ... | ... | @@ -24,7 +24,7 @@ comptime { |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /// public entrypoint for generated code using EmulatedTLS |
| 27 | pub fn __emutls_get_address(control: *emutls_control) callconv(.C) *anyopaque { | |
| 27 | pub fn __emutls_get_address(control: *emutls_control) callconv(.c) *anyopaque { | |
| 28 | 28 | return control.getPointer(); |
| 29 | 29 | } |
| 30 | 30 | |
| ... | ... | @@ -191,7 +191,7 @@ const current_thread_storage = struct { |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | /// Invoked by pthread specific destructor. the passed argument is the ObjectArray pointer. |
| 194 | fn deinit(arrayPtr: *anyopaque) callconv(.C) void { | |
| 194 | fn deinit(arrayPtr: *anyopaque) callconv(.c) void { | |
| 195 | 195 | var array: *ObjectArray = @ptrCast(@alignCast(arrayPtr)); |
| 196 | 196 | array.deinit(); |
| 197 | 197 | } |
lib/compiler_rt/exp.zig+6-6| ... | ... | @@ -26,12 +26,12 @@ comptime { |
| 26 | 26 | @export(&expl, .{ .name = "expl", .linkage = common.linkage, .visibility = common.visibility }); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | pub fn __exph(a: f16) callconv(.C) f16 { | |
| 29 | pub fn __exph(a: f16) callconv(.c) f16 { | |
| 30 | 30 | // TODO: more efficient implementation |
| 31 | 31 | return @floatCast(expf(a)); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | pub fn expf(x_: f32) callconv(.C) f32 { | |
| 34 | pub fn expf(x_: f32) callconv(.c) f32 { | |
| 35 | 35 | const half = [_]f32{ 0.5, -0.5 }; |
| 36 | 36 | const ln2hi = 6.9314575195e-1; |
| 37 | 37 | const ln2lo = 1.4286067653e-6; |
| ... | ... | @@ -106,7 +106,7 @@ pub fn expf(x_: f32) callconv(.C) f32 { |
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | pub fn exp(x_: f64) callconv(.C) f64 { | |
| 109 | pub fn exp(x_: f64) callconv(.c) f64 { | |
| 110 | 110 | const half = [_]f64{ 0.5, -0.5 }; |
| 111 | 111 | const ln2hi: f64 = 6.93147180369123816490e-01; |
| 112 | 112 | const ln2lo: f64 = 1.90821492927058770002e-10; |
| ... | ... | @@ -190,17 +190,17 @@ pub fn exp(x_: f64) callconv(.C) f64 { |
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | pub fn __expx(a: f80) callconv(.C) f80 { | |
| 193 | pub fn __expx(a: f80) callconv(.c) f80 { | |
| 194 | 194 | // TODO: more efficient implementation |
| 195 | 195 | return @floatCast(expq(a)); |
| 196 | 196 | } |
| 197 | 197 | |
| 198 | pub fn expq(a: f128) callconv(.C) f128 { | |
| 198 | pub fn expq(a: f128) callconv(.c) f128 { | |
| 199 | 199 | // TODO: more correct implementation |
| 200 | 200 | return exp(@floatCast(a)); |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | pub fn expl(x: c_longdouble) callconv(.C) c_longdouble { | |
| 203 | pub fn expl(x: c_longdouble) callconv(.c) c_longdouble { | |
| 204 | 204 | switch (@typeInfo(c_longdouble).float.bits) { |
| 205 | 205 | 16 => return __exph(x), |
| 206 | 206 | 32 => return expf(x), |
lib/compiler_rt/exp2.zig+6-6| ... | ... | @@ -26,12 +26,12 @@ comptime { |
| 26 | 26 | @export(&exp2l, .{ .name = "exp2l", .linkage = common.linkage, .visibility = common.visibility }); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | pub fn __exp2h(x: f16) callconv(.C) f16 { | |
| 29 | pub fn __exp2h(x: f16) callconv(.c) f16 { | |
| 30 | 30 | // TODO: more efficient implementation |
| 31 | 31 | return @floatCast(exp2f(x)); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | pub fn exp2f(x: f32) callconv(.C) f32 { | |
| 34 | pub fn exp2f(x: f32) callconv(.c) f32 { | |
| 35 | 35 | const tblsiz: u32 = @intCast(exp2ft.len); |
| 36 | 36 | const redux: f32 = 0x1.8p23 / @as(f32, @floatFromInt(tblsiz)); |
| 37 | 37 | const P1: f32 = 0x1.62e430p-1; |
| ... | ... | @@ -88,7 +88,7 @@ pub fn exp2f(x: f32) callconv(.C) f32 { |
| 88 | 88 | return @floatCast(r * uk); |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | pub fn exp2(x: f64) callconv(.C) f64 { | |
| 91 | pub fn exp2(x: f64) callconv(.c) f64 { | |
| 92 | 92 | const tblsiz: u32 = @intCast(exp2dt.len / 2); |
| 93 | 93 | const redux: f64 = 0x1.8p52 / @as(f64, @floatFromInt(tblsiz)); |
| 94 | 94 | const P1: f64 = 0x1.62e42fefa39efp-1; |
| ... | ... | @@ -157,17 +157,17 @@ pub fn exp2(x: f64) callconv(.C) f64 { |
| 157 | 157 | return math.scalbn(r, ik); |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | pub fn __exp2x(x: f80) callconv(.C) f80 { | |
| 160 | pub fn __exp2x(x: f80) callconv(.c) f80 { | |
| 161 | 161 | // TODO: more efficient implementation |
| 162 | 162 | return @floatCast(exp2q(x)); |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | pub fn exp2q(x: f128) callconv(.C) f128 { | |
| 165 | pub fn exp2q(x: f128) callconv(.c) f128 { | |
| 166 | 166 | // TODO: more correct implementation |
| 167 | 167 | return exp2(@floatCast(x)); |
| 168 | 168 | } |
| 169 | 169 | |
| 170 | pub fn exp2l(x: c_longdouble) callconv(.C) c_longdouble { | |
| 170 | pub fn exp2l(x: c_longdouble) callconv(.c) c_longdouble { | |
| 171 | 171 | switch (@typeInfo(c_longdouble).float.bits) { |
| 172 | 172 | 16 => return __exp2h(x), |
| 173 | 173 | 32 => return exp2f(x), |
lib/compiler_rt/extenddftf2.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | @export(&__extenddftf2, .{ .name = "__extenddftf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __extenddftf2(a: f64) callconv(.C) f128 { | |
| 15 | pub fn __extenddftf2(a: f64) callconv(.c) f128 { | |
| 16 | 16 | return extendf(f128, f64, @as(u64, @bitCast(a))); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_dtoq(c: *f128, a: f64) callconv(.C) void { | |
| 19 | fn _Qp_dtoq(c: *f128, a: f64) callconv(.c) void { | |
| 20 | 20 | c.* = extendf(f128, f64, @as(u64, @bitCast(a))); |
| 21 | 21 | } |
lib/compiler_rt/extenddfxf2.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__extenddfxf2, .{ .name = "__extenddfxf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | pub fn __extenddfxf2(a: f64) callconv(.C) f80 { | |
| 10 | pub fn __extenddfxf2(a: f64) callconv(.c) f80 { | |
| 11 | 11 | return extend_f80(f64, @as(u64, @bitCast(a))); |
| 12 | 12 | } |
lib/compiler_rt/extendhfdf2.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__extendhfdf2, .{ .name = "__extendhfdf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | pub fn __extendhfdf2(a: common.F16T(f64)) callconv(.C) f64 { | |
| 10 | pub fn __extendhfdf2(a: common.F16T(f64)) callconv(.c) f64 { | |
| 11 | 11 | return extendf(f64, f16, @as(u16, @bitCast(a))); |
| 12 | 12 | } |
lib/compiler_rt/extendhfsf2.zig+3-3| ... | ... | @@ -12,14 +12,14 @@ comptime { |
| 12 | 12 | @export(&__extendhfsf2, .{ .name = "__extendhfsf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __extendhfsf2(a: common.F16T(f32)) callconv(.C) f32 { | |
| 15 | pub fn __extendhfsf2(a: common.F16T(f32)) callconv(.c) f32 { | |
| 16 | 16 | return extendf(f32, f16, @as(u16, @bitCast(a))); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __gnu_h2f_ieee(a: common.F16T(f32)) callconv(.C) f32 { | |
| 19 | fn __gnu_h2f_ieee(a: common.F16T(f32)) callconv(.c) f32 { | |
| 20 | 20 | return extendf(f32, f16, @as(u16, @bitCast(a))); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | fn __aeabi_h2f(a: u16) callconv(.AAPCS) f32 { | |
| 23 | fn __aeabi_h2f(a: u16) callconv(.{ .arm_aapcs = .{} }) f32 { | |
| 24 | 24 | return extendf(f32, f16, @as(u16, @bitCast(a))); |
| 25 | 25 | } |
lib/compiler_rt/extendhftf2.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__extendhftf2, .{ .name = "__extendhftf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | pub fn __extendhftf2(a: common.F16T(f128)) callconv(.C) f128 { | |
| 10 | pub fn __extendhftf2(a: common.F16T(f128)) callconv(.c) f128 { | |
| 11 | 11 | return extendf(f128, f16, @as(u16, @bitCast(a))); |
| 12 | 12 | } |
lib/compiler_rt/extendhfxf2.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__extendhfxf2, .{ .name = "__extendhfxf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __extendhfxf2(a: common.F16T(f80)) callconv(.C) f80 { | |
| 10 | fn __extendhfxf2(a: common.F16T(f80)) callconv(.c) f80 { | |
| 11 | 11 | return extend_f80(f16, @as(u16, @bitCast(a))); |
| 12 | 12 | } |
lib/compiler_rt/extendsfdf2.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | fn __extendsfdf2(a: f32) callconv(.C) f64 { | |
| 14 | fn __extendsfdf2(a: f32) callconv(.c) f64 { | |
| 15 | 15 | return extendf(f64, f32, @as(u32, @bitCast(a))); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_f2d(a: f32) callconv(.AAPCS) f64 { | |
| 18 | fn __aeabi_f2d(a: f32) callconv(.{ .arm_aapcs = .{} }) f64 { | |
| 19 | 19 | return extendf(f64, f32, @as(u32, @bitCast(a))); |
| 20 | 20 | } |
lib/compiler_rt/extendsftf2.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | @export(&__extendsftf2, .{ .name = "__extendsftf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __extendsftf2(a: f32) callconv(.C) f128 { | |
| 15 | pub fn __extendsftf2(a: f32) callconv(.c) f128 { | |
| 16 | 16 | return extendf(f128, f32, @as(u32, @bitCast(a))); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_stoq(c: *f128, a: f32) callconv(.C) void { | |
| 19 | fn _Qp_stoq(c: *f128, a: f32) callconv(.c) void { | |
| 20 | 20 | c.* = extendf(f128, f32, @as(u32, @bitCast(a))); |
| 21 | 21 | } |
lib/compiler_rt/extendsfxf2.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__extendsfxf2, .{ .name = "__extendsfxf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __extendsfxf2(a: f32) callconv(.C) f80 { | |
| 10 | fn __extendsfxf2(a: f32) callconv(.c) f80 { | |
| 11 | 11 | return extend_f80(f32, @as(u32, @bitCast(a))); |
| 12 | 12 | } |
lib/compiler_rt/extendxftf2.zig+1-1| ... | ... | @@ -7,7 +7,7 @@ comptime { |
| 7 | 7 | @export(&__extendxftf2, .{ .name = "__extendxftf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __extendxftf2(a: f80) callconv(.C) f128 { | |
| 10 | fn __extendxftf2(a: f80) callconv(.c) f128 { | |
| 11 | 11 | const src_int_bit: u64 = 0x8000000000000000; |
| 12 | 12 | const src_sig_mask = ~src_int_bit; |
| 13 | 13 | const src_sig_bits = std.math.floatMantissaBits(f80) - 1; // -1 for the integer bit |
lib/compiler_rt/fabs.zig+6-6| ... | ... | @@ -17,27 +17,27 @@ comptime { |
| 17 | 17 | @export(&fabsl, .{ .name = "fabsl", .linkage = common.linkage, .visibility = common.visibility }); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | pub fn __fabsh(a: f16) callconv(.C) f16 { | |
| 20 | pub fn __fabsh(a: f16) callconv(.c) f16 { | |
| 21 | 21 | return generic_fabs(a); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | pub fn fabsf(a: f32) callconv(.C) f32 { | |
| 24 | pub fn fabsf(a: f32) callconv(.c) f32 { | |
| 25 | 25 | return generic_fabs(a); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | pub fn fabs(a: f64) callconv(.C) f64 { | |
| 28 | pub fn fabs(a: f64) callconv(.c) f64 { | |
| 29 | 29 | return generic_fabs(a); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | pub fn __fabsx(a: f80) callconv(.C) f80 { | |
| 32 | pub fn __fabsx(a: f80) callconv(.c) f80 { | |
| 33 | 33 | return generic_fabs(a); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | pub fn fabsq(a: f128) callconv(.C) f128 { | |
| 36 | pub fn fabsq(a: f128) callconv(.c) f128 { | |
| 37 | 37 | return generic_fabs(a); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | pub fn fabsl(x: c_longdouble) callconv(.C) c_longdouble { | |
| 40 | pub fn fabsl(x: c_longdouble) callconv(.c) c_longdouble { | |
| 41 | 41 | switch (@typeInfo(c_longdouble).float.bits) { |
| 42 | 42 | 16 => return __fabsh(x), |
| 43 | 43 | 32 => return fabsf(x), |
lib/compiler_rt/fixdfdi.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __fixdfdi(a: f64) callconv(.C) i64 { | |
| 15 | pub fn __fixdfdi(a: f64) callconv(.c) i64 { | |
| 16 | 16 | return intFromFloat(i64, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __aeabi_d2lz(a: f64) callconv(.AAPCS) i64 { | |
| 19 | fn __aeabi_d2lz(a: f64) callconv(.{ .arm_aapcs = .{} }) i64 { | |
| 20 | 20 | return intFromFloat(i64, a); |
| 21 | 21 | } |
lib/compiler_rt/fixdfsi.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | pub fn __fixdfsi(a: f64) callconv(.C) i32 { | |
| 14 | pub fn __fixdfsi(a: f64) callconv(.c) i32 { | |
| 15 | 15 | return intFromFloat(i32, a); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_d2iz(a: f64) callconv(.AAPCS) i32 { | |
| 18 | fn __aeabi_d2iz(a: f64) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 19 | 19 | return intFromFloat(i32, a); |
| 20 | 20 | } |
lib/compiler_rt/fixdfti.zig+2-2| ... | ... | @@ -15,12 +15,12 @@ comptime { |
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | pub fn __fixdfti(a: f64) callconv(.C) i128 { | |
| 18 | pub fn __fixdfti(a: f64) callconv(.c) i128 { | |
| 19 | 19 | return intFromFloat(i128, a); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | const v2u64 = @Vector(2, u64); |
| 23 | 23 | |
| 24 | fn __fixdfti_windows_x86_64(a: f64) callconv(.C) v2u64 { | |
| 24 | fn __fixdfti_windows_x86_64(a: f64) callconv(.c) v2u64 { | |
| 25 | 25 | return @bitCast(intFromFloat(i128, a)); |
| 26 | 26 | } |
lib/compiler_rt/fixhfdi.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__fixhfdi, .{ .name = "__fixhfdi", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __fixhfdi(a: f16) callconv(.C) i64 { | |
| 10 | fn __fixhfdi(a: f16) callconv(.c) i64 { | |
| 11 | 11 | return intFromFloat(i64, a); |
| 12 | 12 | } |
lib/compiler_rt/fixhfsi.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__fixhfsi, .{ .name = "__fixhfsi", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __fixhfsi(a: f16) callconv(.C) i32 { | |
| 10 | fn __fixhfsi(a: f16) callconv(.c) i32 { | |
| 11 | 11 | return intFromFloat(i32, a); |
| 12 | 12 | } |
lib/compiler_rt/fixhfti.zig+2-2| ... | ... | @@ -12,12 +12,12 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __fixhfti(a: f16) callconv(.C) i128 { | |
| 15 | pub fn __fixhfti(a: f16) callconv(.c) i128 { | |
| 16 | 16 | return intFromFloat(i128, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | const v2u64 = @Vector(2, u64); |
| 20 | 20 | |
| 21 | fn __fixhfti_windows_x86_64(a: f16) callconv(.C) v2u64 { | |
| 21 | fn __fixhfti_windows_x86_64(a: f16) callconv(.c) v2u64 { | |
| 22 | 22 | return @bitCast(intFromFloat(i128, a)); |
| 23 | 23 | } |
lib/compiler_rt/fixsfdi.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __fixsfdi(a: f32) callconv(.C) i64 { | |
| 15 | pub fn __fixsfdi(a: f32) callconv(.c) i64 { | |
| 16 | 16 | return intFromFloat(i64, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __aeabi_f2lz(a: f32) callconv(.AAPCS) i64 { | |
| 19 | fn __aeabi_f2lz(a: f32) callconv(.{ .arm_aapcs = .{} }) i64 { | |
| 20 | 20 | return intFromFloat(i64, a); |
| 21 | 21 | } |
lib/compiler_rt/fixsfsi.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | pub fn __fixsfsi(a: f32) callconv(.C) i32 { | |
| 14 | pub fn __fixsfsi(a: f32) callconv(.c) i32 { | |
| 15 | 15 | return intFromFloat(i32, a); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_f2iz(a: f32) callconv(.AAPCS) i32 { | |
| 18 | fn __aeabi_f2iz(a: f32) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 19 | 19 | return intFromFloat(i32, a); |
| 20 | 20 | } |
lib/compiler_rt/fixsfti.zig+2-2| ... | ... | @@ -15,12 +15,12 @@ comptime { |
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | pub fn __fixsfti(a: f32) callconv(.C) i128 { | |
| 18 | pub fn __fixsfti(a: f32) callconv(.c) i128 { | |
| 19 | 19 | return intFromFloat(i128, a); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | const v2u64 = @Vector(2, u64); |
| 23 | 23 | |
| 24 | fn __fixsfti_windows_x86_64(a: f32) callconv(.C) v2u64 { | |
| 24 | fn __fixsfti_windows_x86_64(a: f32) callconv(.c) v2u64 { | |
| 25 | 25 | return @bitCast(intFromFloat(i128, a)); |
| 26 | 26 | } |
lib/compiler_rt/fixtfdi.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | @export(&__fixtfdi, .{ .name = "__fixtfdi", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __fixtfdi(a: f128) callconv(.C) i64 { | |
| 15 | pub fn __fixtfdi(a: f128) callconv(.c) i64 { | |
| 16 | 16 | return intFromFloat(i64, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_qtox(a: *const f128) callconv(.C) i64 { | |
| 19 | fn _Qp_qtox(a: *const f128) callconv(.c) i64 { | |
| 20 | 20 | return intFromFloat(i64, a.*); |
| 21 | 21 | } |
lib/compiler_rt/fixtfsi.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | @export(&__fixtfsi, .{ .name = "__fixtfsi", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __fixtfsi(a: f128) callconv(.C) i32 { | |
| 15 | pub fn __fixtfsi(a: f128) callconv(.c) i32 { | |
| 16 | 16 | return intFromFloat(i32, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_qtoi(a: *const f128) callconv(.C) i32 { | |
| 19 | fn _Qp_qtoi(a: *const f128) callconv(.c) i32 { | |
| 20 | 20 | return intFromFloat(i32, a.*); |
| 21 | 21 | } |
lib/compiler_rt/fixtfti.zig+2-2| ... | ... | @@ -14,12 +14,12 @@ comptime { |
| 14 | 14 | } |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | pub fn __fixtfti(a: f128) callconv(.C) i128 { | |
| 17 | pub fn __fixtfti(a: f128) callconv(.c) i128 { | |
| 18 | 18 | return intFromFloat(i128, a); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | const v2u64 = @Vector(2, u64); |
| 22 | 22 | |
| 23 | fn __fixtfti_windows_x86_64(a: f128) callconv(.C) v2u64 { | |
| 23 | fn __fixtfti_windows_x86_64(a: f128) callconv(.c) v2u64 { | |
| 24 | 24 | return @bitCast(intFromFloat(i128, a)); |
| 25 | 25 | } |
lib/compiler_rt/fixunsdfdi.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __fixunsdfdi(a: f64) callconv(.C) u64 { | |
| 15 | pub fn __fixunsdfdi(a: f64) callconv(.c) u64 { | |
| 16 | 16 | return intFromFloat(u64, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __aeabi_d2ulz(a: f64) callconv(.AAPCS) u64 { | |
| 19 | fn __aeabi_d2ulz(a: f64) callconv(.{ .arm_aapcs = .{} }) u64 { | |
| 20 | 20 | return intFromFloat(u64, a); |
| 21 | 21 | } |
lib/compiler_rt/fixunsdfsi.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | pub fn __fixunsdfsi(a: f64) callconv(.C) u32 { | |
| 14 | pub fn __fixunsdfsi(a: f64) callconv(.c) u32 { | |
| 15 | 15 | return intFromFloat(u32, a); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_d2uiz(a: f64) callconv(.AAPCS) u32 { | |
| 18 | fn __aeabi_d2uiz(a: f64) callconv(.{ .arm_aapcs = .{} }) u32 { | |
| 19 | 19 | return intFromFloat(u32, a); |
| 20 | 20 | } |
lib/compiler_rt/fixunsdfti.zig+2-2| ... | ... | @@ -15,12 +15,12 @@ comptime { |
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | pub fn __fixunsdfti(a: f64) callconv(.C) u128 { | |
| 18 | pub fn __fixunsdfti(a: f64) callconv(.c) u128 { | |
| 19 | 19 | return intFromFloat(u128, a); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | const v2u64 = @Vector(2, u64); |
| 23 | 23 | |
| 24 | fn __fixunsdfti_windows_x86_64(a: f64) callconv(.C) v2u64 { | |
| 24 | fn __fixunsdfti_windows_x86_64(a: f64) callconv(.c) v2u64 { | |
| 25 | 25 | return @bitCast(intFromFloat(u128, a)); |
| 26 | 26 | } |
lib/compiler_rt/fixunshfdi.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__fixunshfdi, .{ .name = "__fixunshfdi", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __fixunshfdi(a: f16) callconv(.C) u64 { | |
| 10 | fn __fixunshfdi(a: f16) callconv(.c) u64 { | |
| 11 | 11 | return intFromFloat(u64, a); |
| 12 | 12 | } |
lib/compiler_rt/fixunshfsi.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__fixunshfsi, .{ .name = "__fixunshfsi", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __fixunshfsi(a: f16) callconv(.C) u32 { | |
| 10 | fn __fixunshfsi(a: f16) callconv(.c) u32 { | |
| 11 | 11 | return intFromFloat(u32, a); |
| 12 | 12 | } |
lib/compiler_rt/fixunshfti.zig+2-2| ... | ... | @@ -12,12 +12,12 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __fixunshfti(a: f16) callconv(.C) u128 { | |
| 15 | pub fn __fixunshfti(a: f16) callconv(.c) u128 { | |
| 16 | 16 | return intFromFloat(u128, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | const v2u64 = @Vector(2, u64); |
| 20 | 20 | |
| 21 | fn __fixunshfti_windows_x86_64(a: f16) callconv(.C) v2u64 { | |
| 21 | fn __fixunshfti_windows_x86_64(a: f16) callconv(.c) v2u64 { | |
| 22 | 22 | return @bitCast(intFromFloat(u128, a)); |
| 23 | 23 | } |
lib/compiler_rt/fixunssfdi.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __fixunssfdi(a: f32) callconv(.C) u64 { | |
| 15 | pub fn __fixunssfdi(a: f32) callconv(.c) u64 { | |
| 16 | 16 | return intFromFloat(u64, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __aeabi_f2ulz(a: f32) callconv(.AAPCS) u64 { | |
| 19 | fn __aeabi_f2ulz(a: f32) callconv(.{ .arm_aapcs = .{} }) u64 { | |
| 20 | 20 | return intFromFloat(u64, a); |
| 21 | 21 | } |
lib/compiler_rt/fixunssfsi.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | pub fn __fixunssfsi(a: f32) callconv(.C) u32 { | |
| 14 | pub fn __fixunssfsi(a: f32) callconv(.c) u32 { | |
| 15 | 15 | return intFromFloat(u32, a); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_f2uiz(a: f32) callconv(.AAPCS) u32 { | |
| 18 | fn __aeabi_f2uiz(a: f32) callconv(.{ .arm_aapcs = .{} }) u32 { | |
| 19 | 19 | return intFromFloat(u32, a); |
| 20 | 20 | } |
lib/compiler_rt/fixunssfti.zig+2-2| ... | ... | @@ -15,12 +15,12 @@ comptime { |
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | pub fn __fixunssfti(a: f32) callconv(.C) u128 { | |
| 18 | pub fn __fixunssfti(a: f32) callconv(.c) u128 { | |
| 19 | 19 | return intFromFloat(u128, a); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | 22 | const v2u64 = @Vector(2, u64); |
| 23 | 23 | |
| 24 | fn __fixunssfti_windows_x86_64(a: f32) callconv(.C) v2u64 { | |
| 24 | fn __fixunssfti_windows_x86_64(a: f32) callconv(.c) v2u64 { | |
| 25 | 25 | return @bitCast(intFromFloat(u128, a)); |
| 26 | 26 | } |
lib/compiler_rt/fixunstfdi.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | @export(&__fixunstfdi, .{ .name = "__fixunstfdi", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __fixunstfdi(a: f128) callconv(.C) u64 { | |
| 15 | pub fn __fixunstfdi(a: f128) callconv(.c) u64 { | |
| 16 | 16 | return intFromFloat(u64, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_qtoux(a: *const f128) callconv(.C) u64 { | |
| 19 | fn _Qp_qtoux(a: *const f128) callconv(.c) u64 { | |
| 20 | 20 | return intFromFloat(u64, a.*); |
| 21 | 21 | } |
lib/compiler_rt/fixunstfsi.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | @export(&__fixunstfsi, .{ .name = "__fixunstfsi", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __fixunstfsi(a: f128) callconv(.C) u32 { | |
| 15 | pub fn __fixunstfsi(a: f128) callconv(.c) u32 { | |
| 16 | 16 | return intFromFloat(u32, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_qtoui(a: *const f128) callconv(.C) u32 { | |
| 19 | fn _Qp_qtoui(a: *const f128) callconv(.c) u32 { | |
| 20 | 20 | return intFromFloat(u32, a.*); |
| 21 | 21 | } |
lib/compiler_rt/fixunstfti.zig+2-2| ... | ... | @@ -14,12 +14,12 @@ comptime { |
| 14 | 14 | } |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | pub fn __fixunstfti(a: f128) callconv(.C) u128 { | |
| 17 | pub fn __fixunstfti(a: f128) callconv(.c) u128 { | |
| 18 | 18 | return intFromFloat(u128, a); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | 21 | const v2u64 = @Vector(2, u64); |
| 22 | 22 | |
| 23 | fn __fixunstfti_windows_x86_64(a: f128) callconv(.C) v2u64 { | |
| 23 | fn __fixunstfti_windows_x86_64(a: f128) callconv(.c) v2u64 { | |
| 24 | 24 | return @bitCast(intFromFloat(u128, a)); |
| 25 | 25 | } |
lib/compiler_rt/fixunsxfdi.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__fixunsxfdi, .{ .name = "__fixunsxfdi", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __fixunsxfdi(a: f80) callconv(.C) u64 { | |
| 10 | fn __fixunsxfdi(a: f80) callconv(.c) u64 { | |
| 11 | 11 | return intFromFloat(u64, a); |
| 12 | 12 | } |
lib/compiler_rt/fixunsxfsi.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__fixunsxfsi, .{ .name = "__fixunsxfsi", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __fixunsxfsi(a: f80) callconv(.C) u32 { | |
| 10 | fn __fixunsxfsi(a: f80) callconv(.c) u32 { | |
| 11 | 11 | return intFromFloat(u32, a); |
| 12 | 12 | } |
lib/compiler_rt/fixunsxfti.zig+2-2| ... | ... | @@ -12,12 +12,12 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __fixunsxfti(a: f80) callconv(.C) u128 { | |
| 15 | pub fn __fixunsxfti(a: f80) callconv(.c) u128 { | |
| 16 | 16 | return intFromFloat(u128, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | const v2u64 = @Vector(2, u64); |
| 20 | 20 | |
| 21 | fn __fixunsxfti_windows_x86_64(a: f80) callconv(.C) v2u64 { | |
| 21 | fn __fixunsxfti_windows_x86_64(a: f80) callconv(.c) v2u64 { | |
| 22 | 22 | return @bitCast(intFromFloat(u128, a)); |
| 23 | 23 | } |
lib/compiler_rt/fixxfdi.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__fixxfdi, .{ .name = "__fixxfdi", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __fixxfdi(a: f80) callconv(.C) i64 { | |
| 10 | fn __fixxfdi(a: f80) callconv(.c) i64 { | |
| 11 | 11 | return intFromFloat(i64, a); |
| 12 | 12 | } |
lib/compiler_rt/fixxfsi.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__fixxfsi, .{ .name = "__fixxfsi", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __fixxfsi(a: f80) callconv(.C) i32 { | |
| 10 | fn __fixxfsi(a: f80) callconv(.c) i32 { | |
| 11 | 11 | return intFromFloat(i32, a); |
| 12 | 12 | } |
lib/compiler_rt/fixxfti.zig+2-2| ... | ... | @@ -12,12 +12,12 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __fixxfti(a: f80) callconv(.C) i128 { | |
| 15 | pub fn __fixxfti(a: f80) callconv(.c) i128 { | |
| 16 | 16 | return intFromFloat(i128, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | const v2u64 = @Vector(2, u64); |
| 20 | 20 | |
| 21 | fn __fixxfti_windows_x86_64(a: f80) callconv(.C) v2u64 { | |
| 21 | fn __fixxfti_windows_x86_64(a: f80) callconv(.c) v2u64 { | |
| 22 | 22 | return @bitCast(intFromFloat(i128, a)); |
| 23 | 23 | } |
lib/compiler_rt/floatdidf.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __floatdidf(a: i64) callconv(.C) f64 { | |
| 15 | pub fn __floatdidf(a: i64) callconv(.c) f64 { | |
| 16 | 16 | return floatFromInt(f64, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __aeabi_l2d(a: i64) callconv(.AAPCS) f64 { | |
| 19 | fn __aeabi_l2d(a: i64) callconv(.{ .arm_aapcs = .{} }) f64 { | |
| 20 | 20 | return floatFromInt(f64, a); |
| 21 | 21 | } |
lib/compiler_rt/floatdihf.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__floatdihf, .{ .name = "__floatdihf", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __floatdihf(a: i64) callconv(.C) f16 { | |
| 10 | fn __floatdihf(a: i64) callconv(.c) f16 { | |
| 11 | 11 | return floatFromInt(f16, a); |
| 12 | 12 | } |
lib/compiler_rt/floatdisf.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __floatdisf(a: i64) callconv(.C) f32 { | |
| 15 | pub fn __floatdisf(a: i64) callconv(.c) f32 { | |
| 16 | 16 | return floatFromInt(f32, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __aeabi_l2f(a: i64) callconv(.AAPCS) f32 { | |
| 19 | fn __aeabi_l2f(a: i64) callconv(.{ .arm_aapcs = .{} }) f32 { | |
| 20 | 20 | return floatFromInt(f32, a); |
| 21 | 21 | } |
lib/compiler_rt/floatditf.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | @export(&__floatditf, .{ .name = "__floatditf", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __floatditf(a: i64) callconv(.C) f128 { | |
| 15 | pub fn __floatditf(a: i64) callconv(.c) f128 { | |
| 16 | 16 | return floatFromInt(f128, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_xtoq(c: *f128, a: i64) callconv(.C) void { | |
| 19 | fn _Qp_xtoq(c: *f128, a: i64) callconv(.c) void { | |
| 20 | 20 | c.* = floatFromInt(f128, a); |
| 21 | 21 | } |
lib/compiler_rt/floatdixf.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__floatdixf, .{ .name = "__floatdixf", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __floatdixf(a: i64) callconv(.C) f80 { | |
| 10 | fn __floatdixf(a: i64) callconv(.c) f80 { | |
| 11 | 11 | return floatFromInt(f80, a); |
| 12 | 12 | } |
lib/compiler_rt/floatsidf.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | pub fn __floatsidf(a: i32) callconv(.C) f64 { | |
| 14 | pub fn __floatsidf(a: i32) callconv(.c) f64 { | |
| 15 | 15 | return floatFromInt(f64, a); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_i2d(a: i32) callconv(.AAPCS) f64 { | |
| 18 | fn __aeabi_i2d(a: i32) callconv(.{ .arm_aapcs = .{} }) f64 { | |
| 19 | 19 | return floatFromInt(f64, a); |
| 20 | 20 | } |
lib/compiler_rt/floatsihf.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__floatsihf, .{ .name = "__floatsihf", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __floatsihf(a: i32) callconv(.C) f16 { | |
| 10 | fn __floatsihf(a: i32) callconv(.c) f16 { | |
| 11 | 11 | return floatFromInt(f16, a); |
| 12 | 12 | } |
lib/compiler_rt/floatsisf.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | pub fn __floatsisf(a: i32) callconv(.C) f32 { | |
| 14 | pub fn __floatsisf(a: i32) callconv(.c) f32 { | |
| 15 | 15 | return floatFromInt(f32, a); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_i2f(a: i32) callconv(.AAPCS) f32 { | |
| 18 | fn __aeabi_i2f(a: i32) callconv(.{ .arm_aapcs = .{} }) f32 { | |
| 19 | 19 | return floatFromInt(f32, a); |
| 20 | 20 | } |
lib/compiler_rt/floatsitf.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | @export(&__floatsitf, .{ .name = "__floatsitf", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __floatsitf(a: i32) callconv(.C) f128 { | |
| 15 | pub fn __floatsitf(a: i32) callconv(.c) f128 { | |
| 16 | 16 | return floatFromInt(f128, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_itoq(c: *f128, a: i32) callconv(.C) void { | |
| 19 | fn _Qp_itoq(c: *f128, a: i32) callconv(.c) void { | |
| 20 | 20 | c.* = floatFromInt(f128, a); |
| 21 | 21 | } |
lib/compiler_rt/floatsixf.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__floatsixf, .{ .name = "__floatsixf", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __floatsixf(a: i32) callconv(.C) f80 { | |
| 10 | fn __floatsixf(a: i32) callconv(.c) f80 { | |
| 11 | 11 | return floatFromInt(f80, a); |
| 12 | 12 | } |
lib/compiler_rt/floattidf.zig+2-2| ... | ... | @@ -15,10 +15,10 @@ comptime { |
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | pub fn __floattidf(a: i128) callconv(.C) f64 { | |
| 18 | pub fn __floattidf(a: i128) callconv(.c) f64 { | |
| 19 | 19 | return floatFromInt(f64, a); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | fn __floattidf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f64 { | |
| 22 | fn __floattidf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f64 { | |
| 23 | 23 | return floatFromInt(f64, @as(i128, @bitCast(a))); |
| 24 | 24 | } |
lib/compiler_rt/floattihf.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __floattihf(a: i128) callconv(.C) f16 { | |
| 15 | pub fn __floattihf(a: i128) callconv(.c) f16 { | |
| 16 | 16 | return floatFromInt(f16, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __floattihf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f16 { | |
| 19 | fn __floattihf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f16 { | |
| 20 | 20 | return floatFromInt(f16, @as(i128, @bitCast(a))); |
| 21 | 21 | } |
lib/compiler_rt/floattisf.zig+2-2| ... | ... | @@ -15,10 +15,10 @@ comptime { |
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | pub fn __floattisf(a: i128) callconv(.C) f32 { | |
| 18 | pub fn __floattisf(a: i128) callconv(.c) f32 { | |
| 19 | 19 | return floatFromInt(f32, a); |
| 20 | 20 | } |
| 21 | 21 | |
| 22 | fn __floattisf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f32 { | |
| 22 | fn __floattisf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f32 { | |
| 23 | 23 | return floatFromInt(f32, @as(i128, @bitCast(a))); |
| 24 | 24 | } |
lib/compiler_rt/floattitf.zig+2-2| ... | ... | @@ -14,10 +14,10 @@ comptime { |
| 14 | 14 | } |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | pub fn __floattitf(a: i128) callconv(.C) f128 { | |
| 17 | pub fn __floattitf(a: i128) callconv(.c) f128 { | |
| 18 | 18 | return floatFromInt(f128, a); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | fn __floattitf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f128 { | |
| 21 | fn __floattitf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f128 { | |
| 22 | 22 | return floatFromInt(f128, @as(i128, @bitCast(a))); |
| 23 | 23 | } |
lib/compiler_rt/floattixf.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __floattixf(a: i128) callconv(.C) f80 { | |
| 15 | pub fn __floattixf(a: i128) callconv(.c) f80 { | |
| 16 | 16 | return floatFromInt(f80, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __floattixf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f80 { | |
| 19 | fn __floattixf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f80 { | |
| 20 | 20 | return floatFromInt(f80, @as(i128, @bitCast(a))); |
| 21 | 21 | } |
lib/compiler_rt/floatundidf.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __floatundidf(a: u64) callconv(.C) f64 { | |
| 15 | pub fn __floatundidf(a: u64) callconv(.c) f64 { | |
| 16 | 16 | return floatFromInt(f64, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __aeabi_ul2d(a: u64) callconv(.AAPCS) f64 { | |
| 19 | fn __aeabi_ul2d(a: u64) callconv(.{ .arm_aapcs = .{} }) f64 { | |
| 20 | 20 | return floatFromInt(f64, a); |
| 21 | 21 | } |
lib/compiler_rt/floatundihf.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__floatundihf, .{ .name = "__floatundihf", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __floatundihf(a: u64) callconv(.C) f16 { | |
| 10 | fn __floatundihf(a: u64) callconv(.c) f16 { | |
| 11 | 11 | return floatFromInt(f16, a); |
| 12 | 12 | } |
lib/compiler_rt/floatundisf.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __floatundisf(a: u64) callconv(.C) f32 { | |
| 15 | pub fn __floatundisf(a: u64) callconv(.c) f32 { | |
| 16 | 16 | return floatFromInt(f32, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __aeabi_ul2f(a: u64) callconv(.AAPCS) f32 { | |
| 19 | fn __aeabi_ul2f(a: u64) callconv(.{ .arm_aapcs = .{} }) f32 { | |
| 20 | 20 | return floatFromInt(f32, a); |
| 21 | 21 | } |
lib/compiler_rt/floatunditf.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | @export(&__floatunditf, .{ .name = "__floatunditf", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __floatunditf(a: u64) callconv(.C) f128 { | |
| 15 | pub fn __floatunditf(a: u64) callconv(.c) f128 { | |
| 16 | 16 | return floatFromInt(f128, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_uxtoq(c: *f128, a: u64) callconv(.C) void { | |
| 19 | fn _Qp_uxtoq(c: *f128, a: u64) callconv(.c) void { | |
| 20 | 20 | c.* = floatFromInt(f128, a); |
| 21 | 21 | } |
lib/compiler_rt/floatundixf.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__floatundixf, .{ .name = "__floatundixf", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __floatundixf(a: u64) callconv(.C) f80 { | |
| 10 | fn __floatundixf(a: u64) callconv(.c) f80 { | |
| 11 | 11 | return floatFromInt(f80, a); |
| 12 | 12 | } |
lib/compiler_rt/floatunsidf.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | pub fn __floatunsidf(a: u32) callconv(.C) f64 { | |
| 14 | pub fn __floatunsidf(a: u32) callconv(.c) f64 { | |
| 15 | 15 | return floatFromInt(f64, a); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_ui2d(a: u32) callconv(.AAPCS) f64 { | |
| 18 | fn __aeabi_ui2d(a: u32) callconv(.{ .arm_aapcs = .{} }) f64 { | |
| 19 | 19 | return floatFromInt(f64, a); |
| 20 | 20 | } |
lib/compiler_rt/floatunsihf.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__floatunsihf, .{ .name = "__floatunsihf", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | pub fn __floatunsihf(a: u32) callconv(.C) f16 { | |
| 10 | pub fn __floatunsihf(a: u32) callconv(.c) f16 { | |
| 11 | 11 | return floatFromInt(f16, a); |
| 12 | 12 | } |
lib/compiler_rt/floatunsisf.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | pub fn __floatunsisf(a: u32) callconv(.C) f32 { | |
| 14 | pub fn __floatunsisf(a: u32) callconv(.c) f32 { | |
| 15 | 15 | return floatFromInt(f32, a); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_ui2f(a: u32) callconv(.AAPCS) f32 { | |
| 18 | fn __aeabi_ui2f(a: u32) callconv(.{ .arm_aapcs = .{} }) f32 { | |
| 19 | 19 | return floatFromInt(f32, a); |
| 20 | 20 | } |
lib/compiler_rt/floatunsitf.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | @export(&__floatunsitf, .{ .name = "__floatunsitf", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __floatunsitf(a: u32) callconv(.C) f128 { | |
| 15 | pub fn __floatunsitf(a: u32) callconv(.c) f128 { | |
| 16 | 16 | return floatFromInt(f128, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_uitoq(c: *f128, a: u32) callconv(.C) void { | |
| 19 | fn _Qp_uitoq(c: *f128, a: u32) callconv(.c) void { | |
| 20 | 20 | c.* = floatFromInt(f128, a); |
| 21 | 21 | } |
lib/compiler_rt/floatunsixf.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__floatunsixf, .{ .name = "__floatunsixf", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __floatunsixf(a: u32) callconv(.C) f80 { | |
| 10 | fn __floatunsixf(a: u32) callconv(.c) f80 { | |
| 11 | 11 | return floatFromInt(f80, a); |
| 12 | 12 | } |
lib/compiler_rt/floatuntidf.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __floatuntidf(a: u128) callconv(.C) f64 { | |
| 15 | pub fn __floatuntidf(a: u128) callconv(.c) f64 { | |
| 16 | 16 | return floatFromInt(f64, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __floatuntidf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f64 { | |
| 19 | fn __floatuntidf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f64 { | |
| 20 | 20 | return floatFromInt(f64, @as(u128, @bitCast(a))); |
| 21 | 21 | } |
lib/compiler_rt/floatuntihf.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __floatuntihf(a: u128) callconv(.C) f16 { | |
| 15 | pub fn __floatuntihf(a: u128) callconv(.c) f16 { | |
| 16 | 16 | return floatFromInt(f16, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __floatuntihf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f16 { | |
| 19 | fn __floatuntihf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f16 { | |
| 20 | 20 | return floatFromInt(f16, @as(u128, @bitCast(a))); |
| 21 | 21 | } |
lib/compiler_rt/floatuntisf.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __floatuntisf(a: u128) callconv(.C) f32 { | |
| 15 | pub fn __floatuntisf(a: u128) callconv(.c) f32 { | |
| 16 | 16 | return floatFromInt(f32, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __floatuntisf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f32 { | |
| 19 | fn __floatuntisf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f32 { | |
| 20 | 20 | return floatFromInt(f32, @as(u128, @bitCast(a))); |
| 21 | 21 | } |
lib/compiler_rt/floatuntitf.zig+2-2| ... | ... | @@ -14,10 +14,10 @@ comptime { |
| 14 | 14 | } |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | pub fn __floatuntitf(a: u128) callconv(.C) f128 { | |
| 17 | pub fn __floatuntitf(a: u128) callconv(.c) f128 { | |
| 18 | 18 | return floatFromInt(f128, a); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | fn __floatuntitf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f128 { | |
| 21 | fn __floatuntitf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f128 { | |
| 22 | 22 | return floatFromInt(f128, @as(u128, @bitCast(a))); |
| 23 | 23 | } |
lib/compiler_rt/floatuntixf.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | } |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __floatuntixf(a: u128) callconv(.C) f80 { | |
| 15 | pub fn __floatuntixf(a: u128) callconv(.c) f80 { | |
| 16 | 16 | return floatFromInt(f80, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __floatuntixf_windows_x86_64(a: @Vector(2, u64)) callconv(.C) f80 { | |
| 19 | fn __floatuntixf_windows_x86_64(a: @Vector(2, u64)) callconv(.c) f80 { | |
| 20 | 20 | return floatFromInt(f80, @as(u128, @bitCast(a))); |
| 21 | 21 | } |
lib/compiler_rt/floor.zig+6-6| ... | ... | @@ -26,7 +26,7 @@ comptime { |
| 26 | 26 | @export(&floorl, .{ .name = "floorl", .linkage = common.linkage, .visibility = common.visibility }); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | pub fn __floorh(x: f16) callconv(.C) f16 { | |
| 29 | pub fn __floorh(x: f16) callconv(.c) f16 { | |
| 30 | 30 | var u: u16 = @bitCast(x); |
| 31 | 31 | const e = @as(i16, @intCast((u >> 10) & 31)) - 15; |
| 32 | 32 | var m: u16 = undefined; |
| ... | ... | @@ -60,7 +60,7 @@ pub fn __floorh(x: f16) callconv(.C) f16 { |
| 60 | 60 | } |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | pub fn floorf(x: f32) callconv(.C) f32 { | |
| 63 | pub fn floorf(x: f32) callconv(.c) f32 { | |
| 64 | 64 | var u: u32 = @bitCast(x); |
| 65 | 65 | const e = @as(i32, @intCast((u >> 23) & 0xFF)) - 0x7F; |
| 66 | 66 | var m: u32 = undefined; |
| ... | ... | @@ -94,7 +94,7 @@ pub fn floorf(x: f32) callconv(.C) f32 { |
| 94 | 94 | } |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | pub fn floor(x: f64) callconv(.C) f64 { | |
| 97 | pub fn floor(x: f64) callconv(.c) f64 { | |
| 98 | 98 | const f64_toint = 1.0 / math.floatEps(f64); |
| 99 | 99 | |
| 100 | 100 | const u: u64 = @bitCast(x); |
| ... | ... | @@ -125,12 +125,12 @@ pub fn floor(x: f64) callconv(.C) f64 { |
| 125 | 125 | } |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | pub fn __floorx(x: f80) callconv(.C) f80 { | |
| 128 | pub fn __floorx(x: f80) callconv(.c) f80 { | |
| 129 | 129 | // TODO: more efficient implementation |
| 130 | 130 | return @floatCast(floorq(x)); |
| 131 | 131 | } |
| 132 | 132 | |
| 133 | pub fn floorq(x: f128) callconv(.C) f128 { | |
| 133 | pub fn floorq(x: f128) callconv(.c) f128 { | |
| 134 | 134 | const f128_toint = 1.0 / math.floatEps(f128); |
| 135 | 135 | |
| 136 | 136 | const u: u128 = @bitCast(x); |
| ... | ... | @@ -159,7 +159,7 @@ pub fn floorq(x: f128) callconv(.C) f128 { |
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | pub fn floorl(x: c_longdouble) callconv(.C) c_longdouble { | |
| 162 | pub fn floorl(x: c_longdouble) callconv(.c) c_longdouble { | |
| 163 | 163 | switch (@typeInfo(c_longdouble).float.bits) { |
| 164 | 164 | 16 => return __floorh(x), |
| 165 | 165 | 32 => return floorf(x), |
lib/compiler_rt/fma.zig+6-6| ... | ... | @@ -24,12 +24,12 @@ comptime { |
| 24 | 24 | @export(&fmal, .{ .name = "fmal", .linkage = common.linkage, .visibility = common.visibility }); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | pub fn __fmah(x: f16, y: f16, z: f16) callconv(.C) f16 { | |
| 27 | pub fn __fmah(x: f16, y: f16, z: f16) callconv(.c) f16 { | |
| 28 | 28 | // TODO: more efficient implementation |
| 29 | 29 | return @floatCast(fmaf(x, y, z)); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | pub fn fmaf(x: f32, y: f32, z: f32) callconv(.C) f32 { | |
| 32 | pub fn fmaf(x: f32, y: f32, z: f32) callconv(.c) f32 { | |
| 33 | 33 | const xy = @as(f64, x) * y; |
| 34 | 34 | const xy_z = xy + z; |
| 35 | 35 | const u = @as(u64, @bitCast(xy_z)); |
| ... | ... | @@ -44,7 +44,7 @@ pub fn fmaf(x: f32, y: f32, z: f32) callconv(.C) f32 { |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | 46 | /// NOTE: Upstream fma.c has been rewritten completely to raise fp exceptions more accurately. |
| 47 | pub fn fma(x: f64, y: f64, z: f64) callconv(.C) f64 { | |
| 47 | pub fn fma(x: f64, y: f64, z: f64) callconv(.c) f64 { | |
| 48 | 48 | if (!math.isFinite(x) or !math.isFinite(y)) { |
| 49 | 49 | return x * y + z; |
| 50 | 50 | } |
| ... | ... | @@ -91,7 +91,7 @@ pub fn fma(x: f64, y: f64, z: f64) callconv(.C) f64 { |
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | pub fn __fmax(a: f80, b: f80, c: f80) callconv(.C) f80 { | |
| 94 | pub fn __fmax(a: f80, b: f80, c: f80) callconv(.c) f80 { | |
| 95 | 95 | // TODO: more efficient implementation |
| 96 | 96 | return @floatCast(fmaq(a, b, c)); |
| 97 | 97 | } |
| ... | ... | @@ -103,7 +103,7 @@ pub fn __fmax(a: f80, b: f80, c: f80) callconv(.C) f80 { |
| 103 | 103 | /// |
| 104 | 104 | /// Dekker, T. A Floating-Point Technique for Extending the |
| 105 | 105 | /// Available Precision. Numer. Math. 18, 224-242 (1971). |
| 106 | pub fn fmaq(x: f128, y: f128, z: f128) callconv(.C) f128 { | |
| 106 | pub fn fmaq(x: f128, y: f128, z: f128) callconv(.c) f128 { | |
| 107 | 107 | if (!math.isFinite(x) or !math.isFinite(y)) { |
| 108 | 108 | return x * y + z; |
| 109 | 109 | } |
| ... | ... | @@ -150,7 +150,7 @@ pub fn fmaq(x: f128, y: f128, z: f128) callconv(.C) f128 { |
| 150 | 150 | } |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | pub fn fmal(x: c_longdouble, y: c_longdouble, z: c_longdouble) callconv(.C) c_longdouble { | |
| 153 | pub fn fmal(x: c_longdouble, y: c_longdouble, z: c_longdouble) callconv(.c) c_longdouble { | |
| 154 | 154 | switch (@typeInfo(c_longdouble).float.bits) { |
| 155 | 155 | 16 => return __fmah(x, y, z), |
| 156 | 156 | 32 => return fmaf(x, y, z), |
lib/compiler_rt/fmax.zig+6-6| ... | ... | @@ -18,27 +18,27 @@ comptime { |
| 18 | 18 | @export(&fmaxl, .{ .name = "fmaxl", .linkage = common.linkage, .visibility = common.visibility }); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | pub fn __fmaxh(x: f16, y: f16) callconv(.C) f16 { | |
| 21 | pub fn __fmaxh(x: f16, y: f16) callconv(.c) f16 { | |
| 22 | 22 | return generic_fmax(f16, x, y); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | pub fn fmaxf(x: f32, y: f32) callconv(.C) f32 { | |
| 25 | pub fn fmaxf(x: f32, y: f32) callconv(.c) f32 { | |
| 26 | 26 | return generic_fmax(f32, x, y); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | pub fn fmax(x: f64, y: f64) callconv(.C) f64 { | |
| 29 | pub fn fmax(x: f64, y: f64) callconv(.c) f64 { | |
| 30 | 30 | return generic_fmax(f64, x, y); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | pub fn __fmaxx(x: f80, y: f80) callconv(.C) f80 { | |
| 33 | pub fn __fmaxx(x: f80, y: f80) callconv(.c) f80 { | |
| 34 | 34 | return generic_fmax(f80, x, y); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | pub fn fmaxq(x: f128, y: f128) callconv(.C) f128 { | |
| 37 | pub fn fmaxq(x: f128, y: f128) callconv(.c) f128 { | |
| 38 | 38 | return generic_fmax(f128, x, y); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | pub fn fmaxl(x: c_longdouble, y: c_longdouble) callconv(.C) c_longdouble { | |
| 41 | pub fn fmaxl(x: c_longdouble, y: c_longdouble) callconv(.c) c_longdouble { | |
| 42 | 42 | switch (@typeInfo(c_longdouble).float.bits) { |
| 43 | 43 | 16 => return __fmaxh(x, y), |
| 44 | 44 | 32 => return fmaxf(x, y), |
lib/compiler_rt/fmin.zig+6-6| ... | ... | @@ -18,27 +18,27 @@ comptime { |
| 18 | 18 | @export(&fminl, .{ .name = "fminl", .linkage = common.linkage, .visibility = common.visibility }); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | pub fn __fminh(x: f16, y: f16) callconv(.C) f16 { | |
| 21 | pub fn __fminh(x: f16, y: f16) callconv(.c) f16 { | |
| 22 | 22 | return generic_fmin(f16, x, y); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | pub fn fminf(x: f32, y: f32) callconv(.C) f32 { | |
| 25 | pub fn fminf(x: f32, y: f32) callconv(.c) f32 { | |
| 26 | 26 | return generic_fmin(f32, x, y); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | pub fn fmin(x: f64, y: f64) callconv(.C) f64 { | |
| 29 | pub fn fmin(x: f64, y: f64) callconv(.c) f64 { | |
| 30 | 30 | return generic_fmin(f64, x, y); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | pub fn __fminx(x: f80, y: f80) callconv(.C) f80 { | |
| 33 | pub fn __fminx(x: f80, y: f80) callconv(.c) f80 { | |
| 34 | 34 | return generic_fmin(f80, x, y); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | pub fn fminq(x: f128, y: f128) callconv(.C) f128 { | |
| 37 | pub fn fminq(x: f128, y: f128) callconv(.c) f128 { | |
| 38 | 38 | return generic_fmin(f128, x, y); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | pub fn fminl(x: c_longdouble, y: c_longdouble) callconv(.C) c_longdouble { | |
| 41 | pub fn fminl(x: c_longdouble, y: c_longdouble) callconv(.c) c_longdouble { | |
| 42 | 42 | switch (@typeInfo(c_longdouble).float.bits) { |
| 43 | 43 | 16 => return __fminh(x, y), |
| 44 | 44 | 32 => return fminf(x, y), |
lib/compiler_rt/fmod.zig+6-6| ... | ... | @@ -20,22 +20,22 @@ comptime { |
| 20 | 20 | @export(&fmodl, .{ .name = "fmodl", .linkage = common.linkage, .visibility = common.visibility }); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | pub fn __fmodh(x: f16, y: f16) callconv(.C) f16 { | |
| 23 | pub fn __fmodh(x: f16, y: f16) callconv(.c) f16 { | |
| 24 | 24 | // TODO: more efficient implementation |
| 25 | 25 | return @floatCast(fmodf(x, y)); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | pub fn fmodf(x: f32, y: f32) callconv(.C) f32 { | |
| 28 | pub fn fmodf(x: f32, y: f32) callconv(.c) f32 { | |
| 29 | 29 | return generic_fmod(f32, x, y); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | pub fn fmod(x: f64, y: f64) callconv(.C) f64 { | |
| 32 | pub fn fmod(x: f64, y: f64) callconv(.c) f64 { | |
| 33 | 33 | return generic_fmod(f64, x, y); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /// fmodx - floating modulo large, returns the remainder of division for f80 types |
| 37 | 37 | /// Logic and flow heavily inspired by MUSL fmodl for 113 mantissa digits |
| 38 | pub fn __fmodx(a: f80, b: f80) callconv(.C) f80 { | |
| 38 | pub fn __fmodx(a: f80, b: f80) callconv(.c) f80 { | |
| 39 | 39 | const T = f80; |
| 40 | 40 | const Z = std.meta.Int(.unsigned, @bitSizeOf(T)); |
| 41 | 41 | |
| ... | ... | @@ -133,7 +133,7 @@ pub fn __fmodx(a: f80, b: f80) callconv(.C) f80 { |
| 133 | 133 | |
| 134 | 134 | /// fmodq - floating modulo large, returns the remainder of division for f128 types |
| 135 | 135 | /// Logic and flow heavily inspired by MUSL fmodl for 113 mantissa digits |
| 136 | pub fn fmodq(a: f128, b: f128) callconv(.C) f128 { | |
| 136 | pub fn fmodq(a: f128, b: f128) callconv(.c) f128 { | |
| 137 | 137 | var amod = a; |
| 138 | 138 | var bmod = b; |
| 139 | 139 | const aPtr_u64: [*]u64 = @ptrCast(&amod); |
| ... | ... | @@ -250,7 +250,7 @@ pub fn fmodq(a: f128, b: f128) callconv(.C) f128 { |
| 250 | 250 | return amod; |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | pub fn fmodl(a: c_longdouble, b: c_longdouble) callconv(.C) c_longdouble { | |
| 253 | pub fn fmodl(a: c_longdouble, b: c_longdouble) callconv(.c) c_longdouble { | |
| 254 | 254 | switch (@typeInfo(c_longdouble).float.bits) { |
| 255 | 255 | 16 => return __fmodh(a, b), |
| 256 | 256 | 32 => return fmodf(a, b), |
lib/compiler_rt/gedf2.zig+4-4| ... | ... | @@ -17,20 +17,20 @@ comptime { |
| 17 | 17 | |
| 18 | 18 | /// "These functions return a value greater than or equal to zero if neither |
| 19 | 19 | /// argument is NaN, and a is greater than or equal to b." |
| 20 | pub fn __gedf2(a: f64, b: f64) callconv(.C) i32 { | |
| 20 | pub fn __gedf2(a: f64, b: f64) callconv(.c) i32 { | |
| 21 | 21 | return @intFromEnum(comparef.cmpf2(f64, comparef.GE, a, b)); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | /// "These functions return a value greater than zero if neither argument is NaN, |
| 25 | 25 | /// and a is strictly greater than b." |
| 26 | pub fn __gtdf2(a: f64, b: f64) callconv(.C) i32 { | |
| 26 | pub fn __gtdf2(a: f64, b: f64) callconv(.c) i32 { | |
| 27 | 27 | return __gedf2(a, b); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | fn __aeabi_dcmpge(a: f64, b: f64) callconv(.AAPCS) i32 { | |
| 30 | fn __aeabi_dcmpge(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 31 | 31 | return @intFromBool(comparef.cmpf2(f64, comparef.GE, a, b) != .Less); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | fn __aeabi_dcmpgt(a: f64, b: f64) callconv(.AAPCS) i32 { | |
| 34 | fn __aeabi_dcmpgt(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 35 | 35 | return @intFromBool(comparef.cmpf2(f64, comparef.GE, a, b) == .Greater); |
| 36 | 36 | } |
lib/compiler_rt/gehf2.zig+2-2| ... | ... | @@ -12,12 +12,12 @@ comptime { |
| 12 | 12 | |
| 13 | 13 | /// "These functions return a value greater than or equal to zero if neither |
| 14 | 14 | /// argument is NaN, and a is greater than or equal to b." |
| 15 | pub fn __gehf2(a: f16, b: f16) callconv(.C) i32 { | |
| 15 | pub fn __gehf2(a: f16, b: f16) callconv(.c) i32 { | |
| 16 | 16 | return @intFromEnum(comparef.cmpf2(f16, comparef.GE, a, b)); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | 19 | /// "These functions return a value greater than zero if neither argument is NaN, |
| 20 | 20 | /// and a is strictly greater than b." |
| 21 | pub fn __gthf2(a: f16, b: f16) callconv(.C) i32 { | |
| 21 | pub fn __gthf2(a: f16, b: f16) callconv(.c) i32 { | |
| 22 | 22 | return __gehf2(a, b); |
| 23 | 23 | } |
lib/compiler_rt/gesf2.zig+4-4| ... | ... | @@ -17,20 +17,20 @@ comptime { |
| 17 | 17 | |
| 18 | 18 | /// "These functions return a value greater than or equal to zero if neither |
| 19 | 19 | /// argument is NaN, and a is greater than or equal to b." |
| 20 | pub fn __gesf2(a: f32, b: f32) callconv(.C) i32 { | |
| 20 | pub fn __gesf2(a: f32, b: f32) callconv(.c) i32 { | |
| 21 | 21 | return @intFromEnum(comparef.cmpf2(f32, comparef.GE, a, b)); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | /// "These functions return a value greater than zero if neither argument is NaN, |
| 25 | 25 | /// and a is strictly greater than b." |
| 26 | pub fn __gtsf2(a: f32, b: f32) callconv(.C) i32 { | |
| 26 | pub fn __gtsf2(a: f32, b: f32) callconv(.c) i32 { | |
| 27 | 27 | return __gesf2(a, b); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | fn __aeabi_fcmpge(a: f32, b: f32) callconv(.AAPCS) i32 { | |
| 30 | fn __aeabi_fcmpge(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 31 | 31 | return @intFromBool(comparef.cmpf2(f32, comparef.GE, a, b) != .Less); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | fn __aeabi_fcmpgt(a: f32, b: f32) callconv(.AAPCS) i32 { | |
| 34 | fn __aeabi_fcmpgt(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 35 | 35 | return @intFromBool(comparef.cmpf2(f32, comparef.LE, a, b) == .Greater); |
| 36 | 36 | } |
lib/compiler_rt/getf2.zig+2-2| ... | ... | @@ -19,12 +19,12 @@ comptime { |
| 19 | 19 | |
| 20 | 20 | /// "These functions return a value greater than or equal to zero if neither |
| 21 | 21 | /// argument is NaN, and a is greater than or equal to b." |
| 22 | fn __getf2(a: f128, b: f128) callconv(.C) i32 { | |
| 22 | fn __getf2(a: f128, b: f128) callconv(.c) i32 { | |
| 23 | 23 | return @intFromEnum(comparef.cmpf2(f128, comparef.GE, a, b)); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /// "These functions return a value greater than zero if neither argument is NaN, |
| 27 | 27 | /// and a is strictly greater than b." |
| 28 | fn __gttf2(a: f128, b: f128) callconv(.C) i32 { | |
| 28 | fn __gttf2(a: f128, b: f128) callconv(.c) i32 { | |
| 29 | 29 | return __getf2(a, b); |
| 30 | 30 | } |
lib/compiler_rt/gexf2.zig+2-2| ... | ... | @@ -8,10 +8,10 @@ comptime { |
| 8 | 8 | @export(&__gtxf2, .{ .name = "__gtxf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | fn __gexf2(a: f80, b: f80) callconv(.C) i32 { | |
| 11 | fn __gexf2(a: f80, b: f80) callconv(.c) i32 { | |
| 12 | 12 | return @intFromEnum(comparef.cmp_f80(comparef.GE, a, b)); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | fn __gtxf2(a: f80, b: f80) callconv(.C) i32 { | |
| 15 | fn __gtxf2(a: f80, b: f80) callconv(.c) i32 { | |
| 16 | 16 | return __gexf2(a, b); |
| 17 | 17 | } |
lib/compiler_rt/int.zig+15-15| ... | ... | @@ -34,7 +34,7 @@ comptime { |
| 34 | 34 | @export(&__udivmodsi4, .{ .name = "__udivmodsi4", .linkage = common.linkage, .visibility = common.visibility }); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | pub fn __divmodti4(a: i128, b: i128, rem: *i128) callconv(.C) i128 { | |
| 37 | pub fn __divmodti4(a: i128, b: i128, rem: *i128) callconv(.c) i128 { | |
| 38 | 38 | const d = __divti3(a, b); |
| 39 | 39 | rem.* = a -% (d * b); |
| 40 | 40 | return d; |
| ... | ... | @@ -67,7 +67,7 @@ fn test_one_divmodti4(a: i128, b: i128, expected_q: i128, expected_r: i128) !voi |
| 67 | 67 | try testing.expect(q == expected_q and r == expected_r); |
| 68 | 68 | } |
| 69 | 69 | |
| 70 | pub fn __divmoddi4(a: i64, b: i64, rem: *i64) callconv(.C) i64 { | |
| 70 | pub fn __divmoddi4(a: i64, b: i64, rem: *i64) callconv(.c) i64 { | |
| 71 | 71 | const d = __divdi3(a, b); |
| 72 | 72 | rem.* = a -% (d * b); |
| 73 | 73 | return d; |
| ... | ... | @@ -101,7 +101,7 @@ test "test_divmoddi4" { |
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | pub fn __udivmoddi4(a: u64, b: u64, maybe_rem: ?*u64) callconv(.C) u64 { | |
| 104 | pub fn __udivmoddi4(a: u64, b: u64, maybe_rem: ?*u64) callconv(.c) u64 { | |
| 105 | 105 | return udivmod(u64, a, b, maybe_rem); |
| 106 | 106 | } |
| 107 | 107 | |
| ... | ... | @@ -109,7 +109,7 @@ test "test_udivmoddi4" { |
| 109 | 109 | _ = @import("udivmoddi4_test.zig"); |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | pub fn __divdi3(a: i64, b: i64) callconv(.C) i64 { | |
| 112 | pub fn __divdi3(a: i64, b: i64) callconv(.c) i64 { | |
| 113 | 113 | // Set aside the sign of the quotient. |
| 114 | 114 | const sign: u64 = @bitCast((a ^ b) >> 63); |
| 115 | 115 | // Take absolute value of a and b via abs(x) = (x^(x >> 63)) - (x >> 63). |
| ... | ... | @@ -146,7 +146,7 @@ fn test_one_divdi3(a: i64, b: i64, expected_q: i64) !void { |
| 146 | 146 | try testing.expect(q == expected_q); |
| 147 | 147 | } |
| 148 | 148 | |
| 149 | pub fn __moddi3(a: i64, b: i64) callconv(.C) i64 { | |
| 149 | pub fn __moddi3(a: i64, b: i64) callconv(.c) i64 { | |
| 150 | 150 | // Take absolute value of a and b via abs(x) = (x^(x >> 63)) - (x >> 63). |
| 151 | 151 | const abs_a = (a ^ (a >> 63)) -% (a >> 63); |
| 152 | 152 | const abs_b = (b ^ (b >> 63)) -% (b >> 63); |
| ... | ... | @@ -184,11 +184,11 @@ fn test_one_moddi3(a: i64, b: i64, expected_r: i64) !void { |
| 184 | 184 | try testing.expect(r == expected_r); |
| 185 | 185 | } |
| 186 | 186 | |
| 187 | pub fn __udivdi3(a: u64, b: u64) callconv(.C) u64 { | |
| 187 | pub fn __udivdi3(a: u64, b: u64) callconv(.c) u64 { | |
| 188 | 188 | return __udivmoddi4(a, b, null); |
| 189 | 189 | } |
| 190 | 190 | |
| 191 | pub fn __umoddi3(a: u64, b: u64) callconv(.C) u64 { | |
| 191 | pub fn __umoddi3(a: u64, b: u64) callconv(.c) u64 { | |
| 192 | 192 | var r: u64 = undefined; |
| 193 | 193 | _ = __udivmoddi4(a, b, &r); |
| 194 | 194 | return r; |
| ... | ... | @@ -207,7 +207,7 @@ fn test_one_umoddi3(a: u64, b: u64, expected_r: u64) !void { |
| 207 | 207 | try testing.expect(r == expected_r); |
| 208 | 208 | } |
| 209 | 209 | |
| 210 | pub fn __divmodsi4(a: i32, b: i32, rem: *i32) callconv(.C) i32 { | |
| 210 | pub fn __divmodsi4(a: i32, b: i32, rem: *i32) callconv(.c) i32 { | |
| 211 | 211 | const d = __divsi3(a, b); |
| 212 | 212 | rem.* = a -% (d * b); |
| 213 | 213 | return d; |
| ... | ... | @@ -241,17 +241,17 @@ test "test_divmodsi4" { |
| 241 | 241 | } |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | pub fn __udivmodsi4(a: u32, b: u32, rem: *u32) callconv(.C) u32 { | |
| 244 | pub fn __udivmodsi4(a: u32, b: u32, rem: *u32) callconv(.c) u32 { | |
| 245 | 245 | const d = __udivsi3(a, b); |
| 246 | 246 | rem.* = @bitCast(@as(i32, @bitCast(a)) -% (@as(i32, @bitCast(d)) * @as(i32, @bitCast(b)))); |
| 247 | 247 | return d; |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | pub fn __divsi3(n: i32, d: i32) callconv(.C) i32 { | |
| 250 | pub fn __divsi3(n: i32, d: i32) callconv(.c) i32 { | |
| 251 | 251 | return div_i32(n, d); |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | fn __aeabi_idiv(n: i32, d: i32) callconv(.AAPCS) i32 { | |
| 254 | fn __aeabi_idiv(n: i32, d: i32) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 255 | 255 | return div_i32(n, d); |
| 256 | 256 | } |
| 257 | 257 | |
| ... | ... | @@ -292,11 +292,11 @@ fn test_one_divsi3(a: i32, b: i32, expected_q: i32) !void { |
| 292 | 292 | try testing.expect(q == expected_q); |
| 293 | 293 | } |
| 294 | 294 | |
| 295 | pub fn __udivsi3(n: u32, d: u32) callconv(.C) u32 { | |
| 295 | pub fn __udivsi3(n: u32, d: u32) callconv(.c) u32 { | |
| 296 | 296 | return div_u32(n, d); |
| 297 | 297 | } |
| 298 | 298 | |
| 299 | fn __aeabi_uidiv(n: u32, d: u32) callconv(.AAPCS) u32 { | |
| 299 | fn __aeabi_uidiv(n: u32, d: u32) callconv(.{ .arm_aapcs = .{} }) u32 { | |
| 300 | 300 | return div_u32(n, d); |
| 301 | 301 | } |
| 302 | 302 | |
| ... | ... | @@ -485,7 +485,7 @@ fn test_one_udivsi3(a: u32, b: u32, expected_q: u32) !void { |
| 485 | 485 | try testing.expect(q == expected_q); |
| 486 | 486 | } |
| 487 | 487 | |
| 488 | pub fn __modsi3(n: i32, d: i32) callconv(.C) i32 { | |
| 488 | pub fn __modsi3(n: i32, d: i32) callconv(.c) i32 { | |
| 489 | 489 | return n -% __divsi3(n, d) * d; |
| 490 | 490 | } |
| 491 | 491 | |
| ... | ... | @@ -514,7 +514,7 @@ fn test_one_modsi3(a: i32, b: i32, expected_r: i32) !void { |
| 514 | 514 | try testing.expect(r == expected_r); |
| 515 | 515 | } |
| 516 | 516 | |
| 517 | pub fn __umodsi3(n: u32, d: u32) callconv(.C) u32 { | |
| 517 | pub fn __umodsi3(n: u32, d: u32) callconv(.c) u32 { | |
| 518 | 518 | return n -% __udivsi3(n, d) * d; |
| 519 | 519 | } |
| 520 | 520 |
lib/compiler_rt/log.zig+6-6| ... | ... | @@ -25,12 +25,12 @@ comptime { |
| 25 | 25 | @export(&logl, .{ .name = "logl", .linkage = common.linkage, .visibility = common.visibility }); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | pub fn __logh(a: f16) callconv(.C) f16 { | |
| 28 | pub fn __logh(a: f16) callconv(.c) f16 { | |
| 29 | 29 | // TODO: more efficient implementation |
| 30 | 30 | return @floatCast(logf(a)); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | pub fn logf(x_: f32) callconv(.C) f32 { | |
| 33 | pub fn logf(x_: f32) callconv(.c) f32 { | |
| 34 | 34 | const ln2_hi: f32 = 6.9313812256e-01; |
| 35 | 35 | const ln2_lo: f32 = 9.0580006145e-06; |
| 36 | 36 | const Lg1: f32 = 0xaaaaaa.0p-24; |
| ... | ... | @@ -82,7 +82,7 @@ pub fn logf(x_: f32) callconv(.C) f32 { |
| 82 | 82 | return s * (hfsq + R) + dk * ln2_lo - hfsq + f + dk * ln2_hi; |
| 83 | 83 | } |
| 84 | 84 | |
| 85 | pub fn log(x_: f64) callconv(.C) f64 { | |
| 85 | pub fn log(x_: f64) callconv(.c) f64 { | |
| 86 | 86 | const ln2_hi: f64 = 6.93147180369123816490e-01; |
| 87 | 87 | const ln2_lo: f64 = 1.90821492927058770002e-10; |
| 88 | 88 | const Lg1: f64 = 6.666666666666735130e-01; |
| ... | ... | @@ -138,17 +138,17 @@ pub fn log(x_: f64) callconv(.C) f64 { |
| 138 | 138 | return s * (hfsq + R) + dk * ln2_lo - hfsq + f + dk * ln2_hi; |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | pub fn __logx(a: f80) callconv(.C) f80 { | |
| 141 | pub fn __logx(a: f80) callconv(.c) f80 { | |
| 142 | 142 | // TODO: more efficient implementation |
| 143 | 143 | return @floatCast(logq(a)); |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | pub fn logq(a: f128) callconv(.C) f128 { | |
| 146 | pub fn logq(a: f128) callconv(.c) f128 { | |
| 147 | 147 | // TODO: more correct implementation |
| 148 | 148 | return log(@floatCast(a)); |
| 149 | 149 | } |
| 150 | 150 | |
| 151 | pub fn logl(x: c_longdouble) callconv(.C) c_longdouble { | |
| 151 | pub fn logl(x: c_longdouble) callconv(.c) c_longdouble { | |
| 152 | 152 | switch (@typeInfo(c_longdouble).float.bits) { |
| 153 | 153 | 16 => return __logh(x), |
| 154 | 154 | 32 => return logf(x), |
lib/compiler_rt/log10.zig+6-6| ... | ... | @@ -26,12 +26,12 @@ comptime { |
| 26 | 26 | @export(&log10l, .{ .name = "log10l", .linkage = common.linkage, .visibility = common.visibility }); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | pub fn __log10h(a: f16) callconv(.C) f16 { | |
| 29 | pub fn __log10h(a: f16) callconv(.c) f16 { | |
| 30 | 30 | // TODO: more efficient implementation |
| 31 | 31 | return @floatCast(log10f(a)); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | pub fn log10f(x_: f32) callconv(.C) f32 { | |
| 34 | pub fn log10f(x_: f32) callconv(.c) f32 { | |
| 35 | 35 | const ivln10hi: f32 = 4.3432617188e-01; |
| 36 | 36 | const ivln10lo: f32 = -3.1689971365e-05; |
| 37 | 37 | const log10_2hi: f32 = 3.0102920532e-01; |
| ... | ... | @@ -91,7 +91,7 @@ pub fn log10f(x_: f32) callconv(.C) f32 { |
| 91 | 91 | return dk * log10_2lo + (lo + hi) * ivln10lo + lo * ivln10hi + hi * ivln10hi + dk * log10_2hi; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | pub fn log10(x_: f64) callconv(.C) f64 { | |
| 94 | pub fn log10(x_: f64) callconv(.c) f64 { | |
| 95 | 95 | const ivln10hi: f64 = 4.34294481878168880939e-01; |
| 96 | 96 | const ivln10lo: f64 = 2.50829467116452752298e-11; |
| 97 | 97 | const log10_2hi: f64 = 3.01029995663611771306e-01; |
| ... | ... | @@ -166,17 +166,17 @@ pub fn log10(x_: f64) callconv(.C) f64 { |
| 166 | 166 | return val_lo + val_hi; |
| 167 | 167 | } |
| 168 | 168 | |
| 169 | pub fn __log10x(a: f80) callconv(.C) f80 { | |
| 169 | pub fn __log10x(a: f80) callconv(.c) f80 { | |
| 170 | 170 | // TODO: more efficient implementation |
| 171 | 171 | return @floatCast(log10q(a)); |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | pub fn log10q(a: f128) callconv(.C) f128 { | |
| 174 | pub fn log10q(a: f128) callconv(.c) f128 { | |
| 175 | 175 | // TODO: more correct implementation |
| 176 | 176 | return log10(@floatCast(a)); |
| 177 | 177 | } |
| 178 | 178 | |
| 179 | pub fn log10l(x: c_longdouble) callconv(.C) c_longdouble { | |
| 179 | pub fn log10l(x: c_longdouble) callconv(.c) c_longdouble { | |
| 180 | 180 | switch (@typeInfo(c_longdouble).float.bits) { |
| 181 | 181 | 16 => return __log10h(x), |
| 182 | 182 | 32 => return log10f(x), |
lib/compiler_rt/log2.zig+6-6| ... | ... | @@ -26,12 +26,12 @@ comptime { |
| 26 | 26 | @export(&log2l, .{ .name = "log2l", .linkage = common.linkage, .visibility = common.visibility }); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | pub fn __log2h(a: f16) callconv(.C) f16 { | |
| 29 | pub fn __log2h(a: f16) callconv(.c) f16 { | |
| 30 | 30 | // TODO: more efficient implementation |
| 31 | 31 | return @floatCast(log2f(a)); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | pub fn log2f(x_: f32) callconv(.C) f32 { | |
| 34 | pub fn log2f(x_: f32) callconv(.c) f32 { | |
| 35 | 35 | const ivln2hi: f32 = 1.4428710938e+00; |
| 36 | 36 | const ivln2lo: f32 = -1.7605285393e-04; |
| 37 | 37 | const Lg1: f32 = 0xaaaaaa.0p-24; |
| ... | ... | @@ -87,7 +87,7 @@ pub fn log2f(x_: f32) callconv(.C) f32 { |
| 87 | 87 | return (lo + hi) * ivln2lo + lo * ivln2hi + hi * ivln2hi + @as(f32, @floatFromInt(k)); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | pub fn log2(x_: f64) callconv(.C) f64 { | |
| 90 | pub fn log2(x_: f64) callconv(.c) f64 { | |
| 91 | 91 | const ivln2hi: f64 = 1.44269504072144627571e+00; |
| 92 | 92 | const ivln2lo: f64 = 1.67517131648865118353e-10; |
| 93 | 93 | const Lg1: f64 = 6.666666666666735130e-01; |
| ... | ... | @@ -158,17 +158,17 @@ pub fn log2(x_: f64) callconv(.C) f64 { |
| 158 | 158 | return val_lo + val_hi; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | pub fn __log2x(a: f80) callconv(.C) f80 { | |
| 161 | pub fn __log2x(a: f80) callconv(.c) f80 { | |
| 162 | 162 | // TODO: more efficient implementation |
| 163 | 163 | return @floatCast(log2q(a)); |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | pub fn log2q(a: f128) callconv(.C) f128 { | |
| 166 | pub fn log2q(a: f128) callconv(.c) f128 { | |
| 167 | 167 | // TODO: more correct implementation |
| 168 | 168 | return log2(@floatCast(a)); |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | pub fn log2l(x: c_longdouble) callconv(.C) c_longdouble { | |
| 171 | pub fn log2l(x: c_longdouble) callconv(.c) c_longdouble { | |
| 172 | 172 | switch (@typeInfo(c_longdouble).float.bits) { |
| 173 | 173 | 16 => return __log2h(x), |
| 174 | 174 | 32 => return log2f(x), |
lib/compiler_rt/memcmp.zig+1-1| ... | ... | @@ -5,7 +5,7 @@ comptime { |
| 5 | 5 | @export(&memcmp, .{ .name = "memcmp", .linkage = common.linkage, .visibility = common.visibility }); |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | pub fn memcmp(vl: [*]const u8, vr: [*]const u8, n: usize) callconv(.C) c_int { | |
| 8 | pub fn memcmp(vl: [*]const u8, vr: [*]const u8, n: usize) callconv(.c) c_int { | |
| 9 | 9 | var i: usize = 0; |
| 10 | 10 | while (i < n) : (i += 1) { |
| 11 | 11 | const compared = @as(c_int, vl[i]) -% @as(c_int, vr[i]); |
lib/compiler_rt/memcpy.zig+2-2| ... | ... | @@ -24,7 +24,7 @@ comptime { |
| 24 | 24 | assert(std.math.isPowerOfTwo(@sizeOf(Element))); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | fn memcpySmall(noalias dest: ?[*]u8, noalias src: ?[*]const u8, len: usize) callconv(.C) ?[*]u8 { | |
| 27 | fn memcpySmall(noalias dest: ?[*]u8, noalias src: ?[*]const u8, len: usize) callconv(.c) ?[*]u8 { | |
| 28 | 28 | @setRuntimeSafety(false); |
| 29 | 29 | |
| 30 | 30 | for (0..len) |i| { |
| ... | ... | @@ -34,7 +34,7 @@ fn memcpySmall(noalias dest: ?[*]u8, noalias src: ?[*]const u8, len: usize) call |
| 34 | 34 | return dest; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | fn memcpyFast(noalias dest: ?[*]u8, noalias src: ?[*]const u8, len: usize) callconv(.C) ?[*]u8 { | |
| 37 | fn memcpyFast(noalias dest: ?[*]u8, noalias src: ?[*]const u8, len: usize) callconv(.c) ?[*]u8 { | |
| 38 | 38 | @setRuntimeSafety(false); |
| 39 | 39 | |
| 40 | 40 | const small_limit = 2 * @sizeOf(Element); |
lib/compiler_rt/memmove.zig+2-2| ... | ... | @@ -21,7 +21,7 @@ comptime { |
| 21 | 21 | } |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | fn memmoveSmall(opt_dest: ?[*]u8, opt_src: ?[*]const u8, len: usize) callconv(.C) ?[*]u8 { | |
| 24 | fn memmoveSmall(opt_dest: ?[*]u8, opt_src: ?[*]const u8, len: usize) callconv(.c) ?[*]u8 { | |
| 25 | 25 | const dest = opt_dest.?; |
| 26 | 26 | const src = opt_src.?; |
| 27 | 27 | |
| ... | ... | @@ -38,7 +38,7 @@ fn memmoveSmall(opt_dest: ?[*]u8, opt_src: ?[*]const u8, len: usize) callconv(.C |
| 38 | 38 | return dest; |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | fn memmoveFast(dest: ?[*]u8, src: ?[*]u8, len: usize) callconv(.C) ?[*]u8 { | |
| 41 | fn memmoveFast(dest: ?[*]u8, src: ?[*]u8, len: usize) callconv(.c) ?[*]u8 { | |
| 42 | 42 | @setRuntimeSafety(builtin.is_test); |
| 43 | 43 | const small_limit = @max(2 * @sizeOf(Element), @sizeOf(Element)); |
| 44 | 44 |
lib/compiler_rt/memset.zig+2-2| ... | ... | @@ -9,7 +9,7 @@ comptime { |
| 9 | 9 | } |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | pub fn memset(dest: ?[*]u8, c: u8, len: usize) callconv(.C) ?[*]u8 { | |
| 12 | pub fn memset(dest: ?[*]u8, c: u8, len: usize) callconv(.c) ?[*]u8 { | |
| 13 | 13 | @setRuntimeSafety(false); |
| 14 | 14 | |
| 15 | 15 | if (len != 0) { |
| ... | ... | @@ -26,7 +26,7 @@ pub fn memset(dest: ?[*]u8, c: u8, len: usize) callconv(.C) ?[*]u8 { |
| 26 | 26 | return dest; |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | pub fn __memset(dest: ?[*]u8, c: u8, n: usize, dest_n: usize) callconv(.C) ?[*]u8 { | |
| 29 | pub fn __memset(dest: ?[*]u8, c: u8, n: usize, dest_n: usize) callconv(.c) ?[*]u8 { | |
| 30 | 30 | if (dest_n < n) |
| 31 | 31 | @panic("buffer overflow"); |
| 32 | 32 | return memset(dest, c, n); |
lib/compiler_rt/modti3.zig+2-2| ... | ... | @@ -17,13 +17,13 @@ comptime { |
| 17 | 17 | } |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | pub fn __modti3(a: i128, b: i128) callconv(.C) i128 { | |
| 20 | pub fn __modti3(a: i128, b: i128) callconv(.c) i128 { | |
| 21 | 21 | return mod(a, b); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | const v2u64 = @Vector(2, u64); |
| 25 | 25 | |
| 26 | fn __modti3_windows_x86_64(a: v2u64, b: v2u64) callconv(.C) v2u64 { | |
| 26 | fn __modti3_windows_x86_64(a: v2u64, b: v2u64) callconv(.c) v2u64 { | |
| 27 | 27 | return @bitCast(mod(@as(i128, @bitCast(a)), @as(i128, @bitCast(b)))); |
| 28 | 28 | } |
| 29 | 29 |
lib/compiler_rt/mulXi3.zig+5-5| ... | ... | @@ -20,7 +20,7 @@ comptime { |
| 20 | 20 | } |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | pub fn __mulsi3(a: i32, b: i32) callconv(.C) i32 { | |
| 23 | pub fn __mulsi3(a: i32, b: i32) callconv(.c) i32 { | |
| 24 | 24 | var ua: u32 = @bitCast(a); |
| 25 | 25 | var ub: u32 = @bitCast(b); |
| 26 | 26 | var r: u32 = 0; |
| ... | ... | @@ -34,11 +34,11 @@ pub fn __mulsi3(a: i32, b: i32) callconv(.C) i32 { |
| 34 | 34 | return @bitCast(r); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | pub fn __muldi3(a: i64, b: i64) callconv(.C) i64 { | |
| 37 | pub fn __muldi3(a: i64, b: i64) callconv(.c) i64 { | |
| 38 | 38 | return mulX(i64, a, b); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | fn __aeabi_lmul(a: i64, b: i64) callconv(.AAPCS) i64 { | |
| 41 | fn __aeabi_lmul(a: i64, b: i64) callconv(.{ .arm_aapcs = .{} }) i64 { | |
| 42 | 42 | return mulX(i64, a, b); |
| 43 | 43 | } |
| 44 | 44 | |
| ... | ... | @@ -86,13 +86,13 @@ fn muldXi(comptime T: type, a: T, b: T) DoubleInt(T) { |
| 86 | 86 | return r.all; |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | pub fn __multi3(a: i128, b: i128) callconv(.C) i128 { | |
| 89 | pub fn __multi3(a: i128, b: i128) callconv(.c) i128 { | |
| 90 | 90 | return mulX(i128, a, b); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | const v2u64 = @Vector(2, u64); |
| 94 | 94 | |
| 95 | fn __multi3_windows_x86_64(a: v2u64, b: v2u64) callconv(.C) v2u64 { | |
| 95 | fn __multi3_windows_x86_64(a: v2u64, b: v2u64) callconv(.c) v2u64 { | |
| 96 | 96 | return @bitCast(mulX(i128, @as(i128, @bitCast(a)), @as(i128, @bitCast(b)))); |
| 97 | 97 | } |
| 98 | 98 |
lib/compiler_rt/mulc3_test.zig+1-1| ... | ... | @@ -17,7 +17,7 @@ test "mulc3" { |
| 17 | 17 | try testMul(f128, __multc3); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | fn testMul(comptime T: type, comptime f: fn (T, T, T, T) callconv(.C) Complex(T)) !void { | |
| 20 | fn testMul(comptime T: type, comptime f: fn (T, T, T, T) callconv(.c) Complex(T)) !void { | |
| 21 | 21 | { |
| 22 | 22 | const a: T = 1.0; |
| 23 | 23 | const b: T = 0.0; |
lib/compiler_rt/muldc3.zig+1-1| ... | ... | @@ -9,6 +9,6 @@ comptime { |
| 9 | 9 | } |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | pub fn __muldc3(a: f64, b: f64, c: f64, d: f64) callconv(.C) mulc3.Complex(f64) { | |
| 12 | pub fn __muldc3(a: f64, b: f64, c: f64, d: f64) callconv(.c) mulc3.Complex(f64) { | |
| 13 | 13 | return mulc3.mulc3(f64, a, b, c, d); |
| 14 | 14 | } |
lib/compiler_rt/muldf3.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | pub fn __muldf3(a: f64, b: f64) callconv(.C) f64 { | |
| 14 | pub fn __muldf3(a: f64, b: f64) callconv(.c) f64 { | |
| 15 | 15 | return mulf3(f64, a, b); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_dmul(a: f64, b: f64) callconv(.AAPCS) f64 { | |
| 18 | fn __aeabi_dmul(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 { | |
| 19 | 19 | return mulf3(f64, a, b); |
| 20 | 20 | } |
lib/compiler_rt/mulhc3.zig+1-1| ... | ... | @@ -9,6 +9,6 @@ comptime { |
| 9 | 9 | } |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | pub fn __mulhc3(a: f16, b: f16, c: f16, d: f16) callconv(.C) mulc3.Complex(f16) { | |
| 12 | pub fn __mulhc3(a: f16, b: f16, c: f16, d: f16) callconv(.c) mulc3.Complex(f16) { | |
| 13 | 13 | return mulc3.mulc3(f16, a, b, c, d); |
| 14 | 14 | } |
lib/compiler_rt/mulhf3.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__mulhf3, .{ .name = "__mulhf3", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | pub fn __mulhf3(a: f16, b: f16) callconv(.C) f16 { | |
| 10 | pub fn __mulhf3(a: f16, b: f16) callconv(.c) f16 { | |
| 11 | 11 | return mulf3(f16, a, b); |
| 12 | 12 | } |
lib/compiler_rt/mulo.zig+3-3| ... | ... | @@ -48,7 +48,7 @@ inline fn muloXi4_genericFast(comptime ST: type, a: ST, b: ST, overflow: *c_int) |
| 48 | 48 | return @as(ST, @truncate(res)); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | pub fn __mulosi4(a: i32, b: i32, overflow: *c_int) callconv(.C) i32 { | |
| 51 | pub fn __mulosi4(a: i32, b: i32, overflow: *c_int) callconv(.c) i32 { | |
| 52 | 52 | if (2 * @bitSizeOf(i32) <= @bitSizeOf(usize)) { |
| 53 | 53 | return muloXi4_genericFast(i32, a, b, overflow); |
| 54 | 54 | } else { |
| ... | ... | @@ -56,7 +56,7 @@ pub fn __mulosi4(a: i32, b: i32, overflow: *c_int) callconv(.C) i32 { |
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | pub fn __mulodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 { | |
| 59 | pub fn __mulodi4(a: i64, b: i64, overflow: *c_int) callconv(.c) i64 { | |
| 60 | 60 | if (2 * @bitSizeOf(i64) <= @bitSizeOf(usize)) { |
| 61 | 61 | return muloXi4_genericFast(i64, a, b, overflow); |
| 62 | 62 | } else { |
| ... | ... | @@ -64,7 +64,7 @@ pub fn __mulodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 { |
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | pub fn __muloti4(a: i128, b: i128, overflow: *c_int) callconv(.C) i128 { | |
| 67 | pub fn __muloti4(a: i128, b: i128, overflow: *c_int) callconv(.c) i128 { | |
| 68 | 68 | if (2 * @bitSizeOf(i128) <= @bitSizeOf(usize)) { |
| 69 | 69 | return muloXi4_genericFast(i128, a, b, overflow); |
| 70 | 70 | } else { |
lib/compiler_rt/mulsc3.zig+1-1| ... | ... | @@ -9,6 +9,6 @@ comptime { |
| 9 | 9 | } |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | pub fn __mulsc3(a: f32, b: f32, c: f32, d: f32) callconv(.C) mulc3.Complex(f32) { | |
| 12 | pub fn __mulsc3(a: f32, b: f32, c: f32, d: f32) callconv(.c) mulc3.Complex(f32) { | |
| 13 | 13 | return mulc3.mulc3(f32, a, b, c, d); |
| 14 | 14 | } |
lib/compiler_rt/mulsf3.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | pub fn __mulsf3(a: f32, b: f32) callconv(.C) f32 { | |
| 14 | pub fn __mulsf3(a: f32, b: f32) callconv(.c) f32 { | |
| 15 | 15 | return mulf3(f32, a, b); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_fmul(a: f32, b: f32) callconv(.AAPCS) f32 { | |
| 18 | fn __aeabi_fmul(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 { | |
| 19 | 19 | return mulf3(f32, a, b); |
| 20 | 20 | } |
lib/compiler_rt/multc3.zig+1-1| ... | ... | @@ -11,6 +11,6 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | pub fn __multc3(a: f128, b: f128, c: f128, d: f128) callconv(.C) mulc3.Complex(f128) { | |
| 14 | pub fn __multc3(a: f128, b: f128, c: f128, d: f128) callconv(.c) mulc3.Complex(f128) { | |
| 15 | 15 | return mulc3.mulc3(f128, a, b, c, d); |
| 16 | 16 | } |
lib/compiler_rt/multf3.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | @export(&__multf3, .{ .name = "__multf3", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __multf3(a: f128, b: f128) callconv(.C) f128 { | |
| 15 | pub fn __multf3(a: f128, b: f128) callconv(.c) f128 { | |
| 16 | 16 | return mulf3(f128, a, b); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_mul(c: *f128, a: *const f128, b: *const f128) callconv(.C) void { | |
| 19 | fn _Qp_mul(c: *f128, a: *const f128, b: *const f128) callconv(.c) void { | |
| 20 | 20 | c.* = mulf3(f128, a.*, b.*); |
| 21 | 21 | } |
lib/compiler_rt/mulxc3.zig+1-1| ... | ... | @@ -9,6 +9,6 @@ comptime { |
| 9 | 9 | } |
| 10 | 10 | } |
| 11 | 11 | |
| 12 | pub fn __mulxc3(a: f80, b: f80, c: f80, d: f80) callconv(.C) mulc3.Complex(f80) { | |
| 12 | pub fn __mulxc3(a: f80, b: f80, c: f80, d: f80) callconv(.c) mulc3.Complex(f80) { | |
| 13 | 13 | return mulc3.mulc3(f80, a, b, c, d); |
| 14 | 14 | } |
lib/compiler_rt/mulxf3.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__mulxf3, .{ .name = "__mulxf3", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | pub fn __mulxf3(a: f80, b: f80) callconv(.C) f80 { | |
| 10 | pub fn __mulxf3(a: f80, b: f80) callconv(.c) f80 { | |
| 11 | 11 | return mulf3(f80, a, b); |
| 12 | 12 | } |
lib/compiler_rt/negXi2.zig+3-3| ... | ... | @@ -18,15 +18,15 @@ comptime { |
| 18 | 18 | @export(&__negti2, .{ .name = "__negti2", .linkage = common.linkage, .visibility = common.visibility }); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | pub fn __negsi2(a: i32) callconv(.C) i32 { | |
| 21 | pub fn __negsi2(a: i32) callconv(.c) i32 { | |
| 22 | 22 | return negXi2(i32, a); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | pub fn __negdi2(a: i64) callconv(.C) i64 { | |
| 25 | pub fn __negdi2(a: i64) callconv(.c) i64 { | |
| 26 | 26 | return negXi2(i64, a); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | pub fn __negti2(a: i128) callconv(.C) i128 { | |
| 29 | pub fn __negti2(a: i128) callconv(.c) i128 { | |
| 30 | 30 | return negXi2(i128, a); |
| 31 | 31 | } |
| 32 | 32 |
lib/compiler_rt/negdf2.zig+2-2| ... | ... | @@ -10,10 +10,10 @@ comptime { |
| 10 | 10 | } |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | fn __negdf2(a: f64) callconv(.C) f64 { | |
| 13 | fn __negdf2(a: f64) callconv(.c) f64 { | |
| 14 | 14 | return common.fneg(a); |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | fn __aeabi_dneg(a: f64) callconv(.AAPCS) f64 { | |
| 17 | fn __aeabi_dneg(a: f64) callconv(.{ .arm_aapcs = .{} }) f64 { | |
| 18 | 18 | return common.fneg(a); |
| 19 | 19 | } |
lib/compiler_rt/neghf2.zig+1-1| ... | ... | @@ -6,6 +6,6 @@ comptime { |
| 6 | 6 | @export(&__neghf2, .{ .name = "__neghf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | fn __neghf2(a: f16) callconv(.C) f16 { | |
| 9 | fn __neghf2(a: f16) callconv(.c) f16 { | |
| 10 | 10 | return common.fneg(a); |
| 11 | 11 | } |
lib/compiler_rt/negsf2.zig+2-2| ... | ... | @@ -10,10 +10,10 @@ comptime { |
| 10 | 10 | } |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | fn __negsf2(a: f32) callconv(.C) f32 { | |
| 13 | fn __negsf2(a: f32) callconv(.c) f32 { | |
| 14 | 14 | return common.fneg(a); |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | fn __aeabi_fneg(a: f32) callconv(.AAPCS) f32 { | |
| 17 | fn __aeabi_fneg(a: f32) callconv(.{ .arm_aapcs = .{} }) f32 { | |
| 18 | 18 | return common.fneg(a); |
| 19 | 19 | } |
lib/compiler_rt/negtf2.zig+1-1| ... | ... | @@ -8,6 +8,6 @@ comptime { |
| 8 | 8 | @export(&__negtf2, .{ .name = "__negtf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | fn __negtf2(a: f128) callconv(.C) f128 { | |
| 11 | fn __negtf2(a: f128) callconv(.c) f128 { | |
| 12 | 12 | return common.fneg(a); |
| 13 | 13 | } |
lib/compiler_rt/negv.zig+3-3| ... | ... | @@ -13,15 +13,15 @@ comptime { |
| 13 | 13 | @export(&__negvti2, .{ .name = "__negvti2", .linkage = common.linkage, .visibility = common.visibility }); |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | pub fn __negvsi2(a: i32) callconv(.C) i32 { | |
| 16 | pub fn __negvsi2(a: i32) callconv(.c) i32 { | |
| 17 | 17 | return negvXi(i32, a); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | pub fn __negvdi2(a: i64) callconv(.C) i64 { | |
| 20 | pub fn __negvdi2(a: i64) callconv(.c) i64 { | |
| 21 | 21 | return negvXi(i64, a); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | pub fn __negvti2(a: i128) callconv(.C) i128 { | |
| 24 | pub fn __negvti2(a: i128) callconv(.c) i128 { | |
| 25 | 25 | return negvXi(i128, a); |
| 26 | 26 | } |
| 27 | 27 |
lib/compiler_rt/negxf2.zig+1-1| ... | ... | @@ -6,6 +6,6 @@ comptime { |
| 6 | 6 | @export(&__negxf2, .{ .name = "__negxf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | fn __negxf2(a: f80) callconv(.C) f80 { | |
| 9 | fn __negxf2(a: f80) callconv(.c) f80 { | |
| 10 | 10 | return common.fneg(a); |
| 11 | 11 | } |
lib/compiler_rt/os_version_check.zig+1-1| ... | ... | @@ -34,7 +34,7 @@ const __isPlatformVersionAtLeast = if (have_availability_version_check) struct { |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | // Darwin-only |
| 37 | fn __isPlatformVersionAtLeast(platform: u32, major: u32, minor: u32, subminor: u32) callconv(.C) i32 { | |
| 37 | fn __isPlatformVersionAtLeast(platform: u32, major: u32, minor: u32, subminor: u32) callconv(.c) i32 { | |
| 38 | 38 | const build_version = dyld_build_version_t{ |
| 39 | 39 | .platform = platform, |
| 40 | 40 | .version = constructVersion(major, minor, subminor), |
lib/compiler_rt/parity.zig+3-3| ... | ... | @@ -13,15 +13,15 @@ comptime { |
| 13 | 13 | @export(&__parityti2, .{ .name = "__parityti2", .linkage = common.linkage, .visibility = common.visibility }); |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | pub fn __paritysi2(a: i32) callconv(.C) i32 { | |
| 16 | pub fn __paritysi2(a: i32) callconv(.c) i32 { | |
| 17 | 17 | return parityXi2(i32, a); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | pub fn __paritydi2(a: i64) callconv(.C) i32 { | |
| 20 | pub fn __paritydi2(a: i64) callconv(.c) i32 { | |
| 21 | 21 | return parityXi2(i64, a); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | pub fn __parityti2(a: i128) callconv(.C) i32 { | |
| 24 | pub fn __parityti2(a: i128) callconv(.c) i32 { | |
| 25 | 25 | return parityXi2(i128, a); |
| 26 | 26 | } |
| 27 | 27 |
lib/compiler_rt/popcount.zig+3-3| ... | ... | @@ -18,15 +18,15 @@ comptime { |
| 18 | 18 | @export(&__popcountti2, .{ .name = "__popcountti2", .linkage = common.linkage, .visibility = common.visibility }); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | pub fn __popcountsi2(a: i32) callconv(.C) i32 { | |
| 21 | pub fn __popcountsi2(a: i32) callconv(.c) i32 { | |
| 22 | 22 | return popcountXi2(i32, a); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | pub fn __popcountdi2(a: i64) callconv(.C) i32 { | |
| 25 | pub fn __popcountdi2(a: i64) callconv(.c) i32 { | |
| 26 | 26 | return popcountXi2(i64, a); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | pub fn __popcountti2(a: i128) callconv(.C) i32 { | |
| 29 | pub fn __popcountti2(a: i128) callconv(.c) i32 { | |
| 30 | 30 | return popcountXi2(i128, a); |
| 31 | 31 | } |
| 32 | 32 |
lib/compiler_rt/powiXf2.zig+5-5| ... | ... | @@ -35,23 +35,23 @@ inline fn powiXf2(comptime FT: type, a: FT, b: i32) FT { |
| 35 | 35 | return if (is_recip) 1 / r else r; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | pub fn __powihf2(a: f16, b: i32) callconv(.C) f16 { | |
| 38 | pub fn __powihf2(a: f16, b: i32) callconv(.c) f16 { | |
| 39 | 39 | return powiXf2(f16, a, b); |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | pub fn __powisf2(a: f32, b: i32) callconv(.C) f32 { | |
| 42 | pub fn __powisf2(a: f32, b: i32) callconv(.c) f32 { | |
| 43 | 43 | return powiXf2(f32, a, b); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | pub fn __powidf2(a: f64, b: i32) callconv(.C) f64 { | |
| 46 | pub fn __powidf2(a: f64, b: i32) callconv(.c) f64 { | |
| 47 | 47 | return powiXf2(f64, a, b); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | pub fn __powitf2(a: f128, b: i32) callconv(.C) f128 { | |
| 50 | pub fn __powitf2(a: f128, b: i32) callconv(.c) f128 { | |
| 51 | 51 | return powiXf2(f128, a, b); |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | pub fn __powixf2(a: f80, b: i32) callconv(.C) f80 { | |
| 54 | pub fn __powixf2(a: f80, b: i32) callconv(.c) f80 { | |
| 55 | 55 | return powiXf2(f80, a, b); |
| 56 | 56 | } |
| 57 | 57 |
lib/compiler_rt/round.zig+6-6| ... | ... | @@ -26,12 +26,12 @@ comptime { |
| 26 | 26 | @export(&roundl, .{ .name = "roundl", .linkage = common.linkage, .visibility = common.visibility }); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | pub fn __roundh(x: f16) callconv(.C) f16 { | |
| 29 | pub fn __roundh(x: f16) callconv(.c) f16 { | |
| 30 | 30 | // TODO: more efficient implementation |
| 31 | 31 | return @floatCast(roundf(x)); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | pub fn roundf(x_: f32) callconv(.C) f32 { | |
| 34 | pub fn roundf(x_: f32) callconv(.c) f32 { | |
| 35 | 35 | const f32_toint = 1.0 / math.floatEps(f32); |
| 36 | 36 | |
| 37 | 37 | var x = x_; |
| ... | ... | @@ -66,7 +66,7 @@ pub fn roundf(x_: f32) callconv(.C) f32 { |
| 66 | 66 | } |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | pub fn round(x_: f64) callconv(.C) f64 { | |
| 69 | pub fn round(x_: f64) callconv(.c) f64 { | |
| 70 | 70 | const f64_toint = 1.0 / math.floatEps(f64); |
| 71 | 71 | |
| 72 | 72 | var x = x_; |
| ... | ... | @@ -101,12 +101,12 @@ pub fn round(x_: f64) callconv(.C) f64 { |
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | pub fn __roundx(x: f80) callconv(.C) f80 { | |
| 104 | pub fn __roundx(x: f80) callconv(.c) f80 { | |
| 105 | 105 | // TODO: more efficient implementation |
| 106 | 106 | return @floatCast(roundq(x)); |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | pub fn roundq(x_: f128) callconv(.C) f128 { | |
| 109 | pub fn roundq(x_: f128) callconv(.c) f128 { | |
| 110 | 110 | const f128_toint = 1.0 / math.floatEps(f128); |
| 111 | 111 | |
| 112 | 112 | var x = x_; |
| ... | ... | @@ -141,7 +141,7 @@ pub fn roundq(x_: f128) callconv(.C) f128 { |
| 141 | 141 | } |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | pub fn roundl(x: c_longdouble) callconv(.C) c_longdouble { | |
| 144 | pub fn roundl(x: c_longdouble) callconv(.c) c_longdouble { | |
| 145 | 145 | switch (@typeInfo(c_longdouble).float.bits) { |
| 146 | 146 | 16 => return __roundh(x), |
| 147 | 147 | 32 => return roundf(x), |
lib/compiler_rt/shift.zig+12-12| ... | ... | @@ -93,48 +93,48 @@ inline fn lshrXi3(comptime T: type, a: T, b: i32) T { |
| 93 | 93 | return output.all; |
| 94 | 94 | } |
| 95 | 95 | |
| 96 | pub fn __ashlsi3(a: i32, b: i32) callconv(.C) i32 { | |
| 96 | pub fn __ashlsi3(a: i32, b: i32) callconv(.c) i32 { | |
| 97 | 97 | return ashlXi3(i32, a, b); |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | pub fn __ashrsi3(a: i32, b: i32) callconv(.C) i32 { | |
| 100 | pub fn __ashrsi3(a: i32, b: i32) callconv(.c) i32 { | |
| 101 | 101 | return ashrXi3(i32, a, b); |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | pub fn __lshrsi3(a: i32, b: i32) callconv(.C) i32 { | |
| 104 | pub fn __lshrsi3(a: i32, b: i32) callconv(.c) i32 { | |
| 105 | 105 | return lshrXi3(i32, a, b); |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | pub fn __ashldi3(a: i64, b: i32) callconv(.C) i64 { | |
| 108 | pub fn __ashldi3(a: i64, b: i32) callconv(.c) i64 { | |
| 109 | 109 | return ashlXi3(i64, a, b); |
| 110 | 110 | } |
| 111 | fn __aeabi_llsl(a: i64, b: i32) callconv(.AAPCS) i64 { | |
| 111 | fn __aeabi_llsl(a: i64, b: i32) callconv(.{ .arm_aapcs = .{} }) i64 { | |
| 112 | 112 | return ashlXi3(i64, a, b); |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | pub fn __ashlti3(a: i128, b: i32) callconv(.C) i128 { | |
| 115 | pub fn __ashlti3(a: i128, b: i32) callconv(.c) i128 { | |
| 116 | 116 | return ashlXi3(i128, a, b); |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | pub fn __ashrdi3(a: i64, b: i32) callconv(.C) i64 { | |
| 119 | pub fn __ashrdi3(a: i64, b: i32) callconv(.c) i64 { | |
| 120 | 120 | return ashrXi3(i64, a, b); |
| 121 | 121 | } |
| 122 | fn __aeabi_lasr(a: i64, b: i32) callconv(.AAPCS) i64 { | |
| 122 | fn __aeabi_lasr(a: i64, b: i32) callconv(.{ .arm_aapcs = .{} }) i64 { | |
| 123 | 123 | return ashrXi3(i64, a, b); |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | pub fn __ashrti3(a: i128, b: i32) callconv(.C) i128 { | |
| 126 | pub fn __ashrti3(a: i128, b: i32) callconv(.c) i128 { | |
| 127 | 127 | return ashrXi3(i128, a, b); |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | pub fn __lshrdi3(a: i64, b: i32) callconv(.C) i64 { | |
| 130 | pub fn __lshrdi3(a: i64, b: i32) callconv(.c) i64 { | |
| 131 | 131 | return lshrXi3(i64, a, b); |
| 132 | 132 | } |
| 133 | fn __aeabi_llsr(a: i64, b: i32) callconv(.AAPCS) i64 { | |
| 133 | fn __aeabi_llsr(a: i64, b: i32) callconv(.{ .arm_aapcs = .{} }) i64 { | |
| 134 | 134 | return lshrXi3(i64, a, b); |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | pub fn __lshrti3(a: i128, b: i32) callconv(.C) i128 { | |
| 137 | pub fn __lshrti3(a: i128, b: i32) callconv(.c) i128 { | |
| 138 | 138 | return lshrXi3(i128, a, b); |
| 139 | 139 | } |
| 140 | 140 |
lib/compiler_rt/sin.zig+6-6| ... | ... | @@ -30,12 +30,12 @@ comptime { |
| 30 | 30 | @export(&sinl, .{ .name = "sinl", .linkage = common.linkage, .visibility = common.visibility }); |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | pub fn __sinh(x: f16) callconv(.C) f16 { | |
| 33 | pub fn __sinh(x: f16) callconv(.c) f16 { | |
| 34 | 34 | // TODO: more efficient implementation |
| 35 | 35 | return @floatCast(sinf(x)); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | pub fn sinf(x: f32) callconv(.C) f32 { | |
| 38 | pub fn sinf(x: f32) callconv(.c) f32 { | |
| 39 | 39 | // Small multiples of pi/2 rounded to double precision. |
| 40 | 40 | const s1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18 |
| 41 | 41 | const s2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18 |
| ... | ... | @@ -90,7 +90,7 @@ pub fn sinf(x: f32) callconv(.C) f32 { |
| 90 | 90 | }; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | pub fn sin(x: f64) callconv(.C) f64 { | |
| 93 | pub fn sin(x: f64) callconv(.c) f64 { | |
| 94 | 94 | var ix = @as(u64, @bitCast(x)) >> 32; |
| 95 | 95 | ix &= 0x7fffffff; |
| 96 | 96 | |
| ... | ... | @@ -119,17 +119,17 @@ pub fn sin(x: f64) callconv(.C) f64 { |
| 119 | 119 | }; |
| 120 | 120 | } |
| 121 | 121 | |
| 122 | pub fn __sinx(x: f80) callconv(.C) f80 { | |
| 122 | pub fn __sinx(x: f80) callconv(.c) f80 { | |
| 123 | 123 | // TODO: more efficient implementation |
| 124 | 124 | return @floatCast(sinq(x)); |
| 125 | 125 | } |
| 126 | 126 | |
| 127 | pub fn sinq(x: f128) callconv(.C) f128 { | |
| 127 | pub fn sinq(x: f128) callconv(.c) f128 { | |
| 128 | 128 | // TODO: more correct implementation |
| 129 | 129 | return sin(@floatCast(x)); |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | pub fn sinl(x: c_longdouble) callconv(.C) c_longdouble { | |
| 132 | pub fn sinl(x: c_longdouble) callconv(.c) c_longdouble { | |
| 133 | 133 | switch (@typeInfo(c_longdouble).float.bits) { |
| 134 | 134 | 16 => return __sinh(x), |
| 135 | 135 | 32 => return sinf(x), |
lib/compiler_rt/sincos.zig+6-6| ... | ... | @@ -22,7 +22,7 @@ comptime { |
| 22 | 22 | @export(&sincosl, .{ .name = "sincosl", .linkage = common.linkage, .visibility = common.visibility }); |
| 23 | 23 | } |
| 24 | 24 | |
| 25 | pub fn __sincosh(x: f16, r_sin: *f16, r_cos: *f16) callconv(.C) void { | |
| 25 | pub fn __sincosh(x: f16, r_sin: *f16, r_cos: *f16) callconv(.c) void { | |
| 26 | 26 | // TODO: more efficient implementation |
| 27 | 27 | var big_sin: f32 = undefined; |
| 28 | 28 | var big_cos: f32 = undefined; |
| ... | ... | @@ -31,7 +31,7 @@ pub fn __sincosh(x: f16, r_sin: *f16, r_cos: *f16) callconv(.C) void { |
| 31 | 31 | r_cos.* = @as(f16, @floatCast(big_cos)); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | pub fn sincosf(x: f32, r_sin: *f32, r_cos: *f32) callconv(.C) void { | |
| 34 | pub fn sincosf(x: f32, r_sin: *f32, r_cos: *f32) callconv(.c) void { | |
| 35 | 35 | const sc1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18 |
| 36 | 36 | const sc2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18 |
| 37 | 37 | const sc3pio2: f64 = 3.0 * math.pi / 2.0; // 0x4012D97C, 0x7F3321D2 |
| ... | ... | @@ -126,7 +126,7 @@ pub fn sincosf(x: f32, r_sin: *f32, r_cos: *f32) callconv(.C) void { |
| 126 | 126 | } |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | pub fn sincos(x: f64, r_sin: *f64, r_cos: *f64) callconv(.C) void { | |
| 129 | pub fn sincos(x: f64, r_sin: *f64, r_cos: *f64) callconv(.c) void { | |
| 130 | 130 | const ix = @as(u32, @truncate(@as(u64, @bitCast(x)) >> 32)) & 0x7fffffff; |
| 131 | 131 | |
| 132 | 132 | // |x| ~< pi/4 |
| ... | ... | @@ -177,7 +177,7 @@ pub fn sincos(x: f64, r_sin: *f64, r_cos: *f64) callconv(.C) void { |
| 177 | 177 | } |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | pub fn __sincosx(x: f80, r_sin: *f80, r_cos: *f80) callconv(.C) void { | |
| 180 | pub fn __sincosx(x: f80, r_sin: *f80, r_cos: *f80) callconv(.c) void { | |
| 181 | 181 | // TODO: more efficient implementation |
| 182 | 182 | //return sincos_generic(f80, x, r_sin, r_cos); |
| 183 | 183 | var big_sin: f128 = undefined; |
| ... | ... | @@ -187,7 +187,7 @@ pub fn __sincosx(x: f80, r_sin: *f80, r_cos: *f80) callconv(.C) void { |
| 187 | 187 | r_cos.* = @as(f80, @floatCast(big_cos)); |
| 188 | 188 | } |
| 189 | 189 | |
| 190 | pub fn sincosq(x: f128, r_sin: *f128, r_cos: *f128) callconv(.C) void { | |
| 190 | pub fn sincosq(x: f128, r_sin: *f128, r_cos: *f128) callconv(.c) void { | |
| 191 | 191 | // TODO: more correct implementation |
| 192 | 192 | //return sincos_generic(f128, x, r_sin, r_cos); |
| 193 | 193 | var small_sin: f64 = undefined; |
| ... | ... | @@ -197,7 +197,7 @@ pub fn sincosq(x: f128, r_sin: *f128, r_cos: *f128) callconv(.C) void { |
| 197 | 197 | r_cos.* = small_cos; |
| 198 | 198 | } |
| 199 | 199 | |
| 200 | pub fn sincosl(x: c_longdouble, r_sin: *c_longdouble, r_cos: *c_longdouble) callconv(.C) void { | |
| 200 | pub fn sincosl(x: c_longdouble, r_sin: *c_longdouble, r_cos: *c_longdouble) callconv(.c) void { | |
| 201 | 201 | switch (@typeInfo(c_longdouble).float.bits) { |
| 202 | 202 | 16 => return __sincosh(x, r_sin, r_cos), |
| 203 | 203 | 32 => return sincosf(x, r_sin, r_cos), |
lib/compiler_rt/sqrt.zig+6-6| ... | ... | @@ -18,12 +18,12 @@ comptime { |
| 18 | 18 | @export(&sqrtl, .{ .name = "sqrtl", .linkage = common.linkage, .visibility = common.visibility }); |
| 19 | 19 | } |
| 20 | 20 | |
| 21 | pub fn __sqrth(x: f16) callconv(.C) f16 { | |
| 21 | pub fn __sqrth(x: f16) callconv(.c) f16 { | |
| 22 | 22 | // TODO: more efficient implementation |
| 23 | 23 | return @floatCast(sqrtf(x)); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | pub fn sqrtf(x: f32) callconv(.C) f32 { | |
| 26 | pub fn sqrtf(x: f32) callconv(.c) f32 { | |
| 27 | 27 | const tiny: f32 = 1.0e-30; |
| 28 | 28 | const sign: i32 = @bitCast(@as(u32, 0x80000000)); |
| 29 | 29 | var ix: i32 = @bitCast(x); |
| ... | ... | @@ -102,7 +102,7 @@ pub fn sqrtf(x: f32) callconv(.C) f32 { |
| 102 | 102 | /// NOTE: The original code is full of implicit signed -> unsigned assumptions and u32 wraparound |
| 103 | 103 | /// behaviour. Most intermediate i32 values are changed to u32 where appropriate but there are |
| 104 | 104 | /// potentially some edge cases remaining that are not handled in the same way. |
| 105 | pub fn sqrt(x: f64) callconv(.C) f64 { | |
| 105 | pub fn sqrt(x: f64) callconv(.c) f64 { | |
| 106 | 106 | const tiny: f64 = 1.0e-300; |
| 107 | 107 | const sign: u32 = 0x80000000; |
| 108 | 108 | const u: u64 = @bitCast(x); |
| ... | ... | @@ -232,17 +232,17 @@ pub fn sqrt(x: f64) callconv(.C) f64 { |
| 232 | 232 | return @bitCast(uz); |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | pub fn __sqrtx(x: f80) callconv(.C) f80 { | |
| 235 | pub fn __sqrtx(x: f80) callconv(.c) f80 { | |
| 236 | 236 | // TODO: more efficient implementation |
| 237 | 237 | return @floatCast(sqrtq(x)); |
| 238 | 238 | } |
| 239 | 239 | |
| 240 | pub fn sqrtq(x: f128) callconv(.C) f128 { | |
| 240 | pub fn sqrtq(x: f128) callconv(.c) f128 { | |
| 241 | 241 | // TODO: more correct implementation |
| 242 | 242 | return sqrt(@floatCast(x)); |
| 243 | 243 | } |
| 244 | 244 | |
| 245 | pub fn sqrtl(x: c_longdouble) callconv(.C) c_longdouble { | |
| 245 | pub fn sqrtl(x: c_longdouble) callconv(.c) c_longdouble { | |
| 246 | 246 | switch (@typeInfo(c_longdouble).float.bits) { |
| 247 | 247 | 16 => return __sqrth(x), |
| 248 | 248 | 32 => return sqrtf(x), |
lib/compiler_rt/ssp.zig+12-12| ... | ... | @@ -16,9 +16,9 @@ const std = @import("std"); |
| 16 | 16 | const common = @import("./common.zig"); |
| 17 | 17 | const builtin = @import("builtin"); |
| 18 | 18 | |
| 19 | extern fn memset(dest: ?[*]u8, c: u8, n: usize) callconv(.C) ?[*]u8; | |
| 20 | extern fn memcpy(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize) callconv(.C) ?[*]u8; | |
| 21 | extern fn memmove(dest: ?[*]u8, src: ?[*]const u8, n: usize) callconv(.C) ?[*]u8; | |
| 19 | extern fn memset(dest: ?[*]u8, c: u8, n: usize) callconv(.c) ?[*]u8; | |
| 20 | extern fn memcpy(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize) callconv(.c) ?[*]u8; | |
| 21 | extern fn memmove(dest: ?[*]u8, src: ?[*]const u8, n: usize) callconv(.c) ?[*]u8; | |
| 22 | 22 | |
| 23 | 23 | comptime { |
| 24 | 24 | @export(&__stack_chk_fail, .{ .name = "__stack_chk_fail", .linkage = common.linkage, .visibility = common.visibility }); |
| ... | ... | @@ -33,11 +33,11 @@ comptime { |
| 33 | 33 | @export(&__memset_chk, .{ .name = "__memset_chk", .linkage = common.linkage, .visibility = common.visibility }); |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | fn __stack_chk_fail() callconv(.C) noreturn { | |
| 36 | fn __stack_chk_fail() callconv(.c) noreturn { | |
| 37 | 37 | @panic("stack smashing detected"); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | fn __chk_fail() callconv(.C) noreturn { | |
| 40 | fn __chk_fail() callconv(.c) noreturn { | |
| 41 | 41 | @panic("buffer overflow detected"); |
| 42 | 42 | } |
| 43 | 43 | |
| ... | ... | @@ -49,7 +49,7 @@ var __stack_chk_guard: usize = blk: { |
| 49 | 49 | break :blk @as(usize, @bitCast(buf)); |
| 50 | 50 | }; |
| 51 | 51 | |
| 52 | fn __strcpy_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.C) [*:0]u8 { | |
| 52 | fn __strcpy_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.c) [*:0]u8 { | |
| 53 | 53 | @setRuntimeSafety(false); |
| 54 | 54 | |
| 55 | 55 | var i: usize = 0; |
| ... | ... | @@ -64,7 +64,7 @@ fn __strcpy_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.C) [ |
| 64 | 64 | return dest; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | fn __strncpy_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) callconv(.C) [*:0]u8 { | |
| 67 | fn __strncpy_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) callconv(.c) [*:0]u8 { | |
| 68 | 68 | @setRuntimeSafety(false); |
| 69 | 69 | if (dest_n < n) __chk_fail(); |
| 70 | 70 | var i: usize = 0; |
| ... | ... | @@ -77,7 +77,7 @@ fn __strncpy_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) cal |
| 77 | 77 | return dest; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | fn __strcat_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.C) [*:0]u8 { | |
| 80 | fn __strcat_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.c) [*:0]u8 { | |
| 81 | 81 | @setRuntimeSafety(false); |
| 82 | 82 | |
| 83 | 83 | var avail = dest_n; |
| ... | ... | @@ -102,7 +102,7 @@ fn __strcat_chk(dest: [*:0]u8, src: [*:0]const u8, dest_n: usize) callconv(.C) [ |
| 102 | 102 | return dest; |
| 103 | 103 | } |
| 104 | 104 | |
| 105 | fn __strncat_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) callconv(.C) [*:0]u8 { | |
| 105 | fn __strncat_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) callconv(.c) [*:0]u8 { | |
| 106 | 106 | @setRuntimeSafety(false); |
| 107 | 107 | |
| 108 | 108 | var avail = dest_n; |
| ... | ... | @@ -127,17 +127,17 @@ fn __strncat_chk(dest: [*:0]u8, src: [*:0]const u8, n: usize, dest_n: usize) cal |
| 127 | 127 | return dest; |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | fn __memcpy_chk(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize, dest_n: usize) callconv(.C) ?[*]u8 { | |
| 130 | fn __memcpy_chk(noalias dest: ?[*]u8, noalias src: ?[*]const u8, n: usize, dest_n: usize) callconv(.c) ?[*]u8 { | |
| 131 | 131 | if (dest_n < n) __chk_fail(); |
| 132 | 132 | return memcpy(dest, src, n); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | fn __memmove_chk(dest: ?[*]u8, src: ?[*]const u8, n: usize, dest_n: usize) callconv(.C) ?[*]u8 { | |
| 135 | fn __memmove_chk(dest: ?[*]u8, src: ?[*]const u8, n: usize, dest_n: usize) callconv(.c) ?[*]u8 { | |
| 136 | 136 | if (dest_n < n) __chk_fail(); |
| 137 | 137 | return memmove(dest, src, n); |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | fn __memset_chk(dest: ?[*]u8, c: u8, n: usize, dest_n: usize) callconv(.C) ?[*]u8 { | |
| 140 | fn __memset_chk(dest: ?[*]u8, c: u8, n: usize, dest_n: usize) callconv(.c) ?[*]u8 { | |
| 141 | 141 | if (dest_n < n) __chk_fail(); |
| 142 | 142 | return memset(dest, c, n); |
| 143 | 143 | } |
lib/compiler_rt/stack_probe.zig+6-6| ... | ... | @@ -37,7 +37,7 @@ comptime { |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | // Zig's own stack-probe routine (available only on x86 and x86_64) |
| 40 | pub fn zig_probe_stack() callconv(.Naked) void { | |
| 40 | pub fn zig_probe_stack() callconv(.naked) void { | |
| 41 | 41 | @setRuntimeSafety(false); |
| 42 | 42 | |
| 43 | 43 | // Versions of the Linux kernel before 5.1 treat any access below SP as |
| ... | ... | @@ -245,11 +245,11 @@ fn win_probe_stack_adjust_sp() void { |
| 245 | 245 | // ___chkstk (__alloca) | yes | yes | |
| 246 | 246 | // ___chkstk_ms | no | no | |
| 247 | 247 | |
| 248 | pub fn _chkstk() callconv(.Naked) void { | |
| 248 | pub fn _chkstk() callconv(.naked) void { | |
| 249 | 249 | @setRuntimeSafety(false); |
| 250 | 250 | @call(.always_inline, win_probe_stack_adjust_sp, .{}); |
| 251 | 251 | } |
| 252 | pub fn __chkstk() callconv(.Naked) void { | |
| 252 | pub fn __chkstk() callconv(.naked) void { | |
| 253 | 253 | @setRuntimeSafety(false); |
| 254 | 254 | if (arch == .thumb or arch == .aarch64) { |
| 255 | 255 | @call(.always_inline, win_probe_stack_only, .{}); |
| ... | ... | @@ -259,15 +259,15 @@ pub fn __chkstk() callconv(.Naked) void { |
| 259 | 259 | else => unreachable, |
| 260 | 260 | } |
| 261 | 261 | } |
| 262 | pub fn ___chkstk() callconv(.Naked) void { | |
| 262 | pub fn ___chkstk() callconv(.naked) void { | |
| 263 | 263 | @setRuntimeSafety(false); |
| 264 | 264 | @call(.always_inline, win_probe_stack_adjust_sp, .{}); |
| 265 | 265 | } |
| 266 | pub fn __chkstk_ms() callconv(.Naked) void { | |
| 266 | pub fn __chkstk_ms() callconv(.naked) void { | |
| 267 | 267 | @setRuntimeSafety(false); |
| 268 | 268 | @call(.always_inline, win_probe_stack_only, .{}); |
| 269 | 269 | } |
| 270 | pub fn ___chkstk_ms() callconv(.Naked) void { | |
| 270 | pub fn ___chkstk_ms() callconv(.naked) void { | |
| 271 | 271 | @setRuntimeSafety(false); |
| 272 | 272 | @call(.always_inline, win_probe_stack_only, .{}); |
| 273 | 273 | } |
lib/compiler_rt/subdf3.zig+2-2| ... | ... | @@ -11,11 +11,11 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | fn __subdf3(a: f64, b: f64) callconv(.C) f64 { | |
| 14 | fn __subdf3(a: f64, b: f64) callconv(.c) f64 { | |
| 15 | 15 | return sub(a, b); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_dsub(a: f64, b: f64) callconv(.AAPCS) f64 { | |
| 18 | fn __aeabi_dsub(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 { | |
| 19 | 19 | return sub(a, b); |
| 20 | 20 | } |
| 21 | 21 |
lib/compiler_rt/subhf3.zig+1-1| ... | ... | @@ -7,7 +7,7 @@ comptime { |
| 7 | 7 | @export(&__subhf3, .{ .name = "__subhf3", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __subhf3(a: f16, b: f16) callconv(.C) f16 { | |
| 10 | fn __subhf3(a: f16, b: f16) callconv(.c) f16 { | |
| 11 | 11 | const neg_b = @as(f16, @bitCast(@as(u16, @bitCast(b)) ^ (@as(u16, 1) << 15))); |
| 12 | 12 | return addf3(f16, a, neg_b); |
| 13 | 13 | } |
lib/compiler_rt/subo.zig+3-3| ... | ... | @@ -15,13 +15,13 @@ comptime { |
| 15 | 15 | @export(&__suboti4, .{ .name = "__suboti4", .linkage = common.linkage, .visibility = common.visibility }); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | pub fn __subosi4(a: i32, b: i32, overflow: *c_int) callconv(.C) i32 { | |
| 18 | pub fn __subosi4(a: i32, b: i32, overflow: *c_int) callconv(.c) i32 { | |
| 19 | 19 | return suboXi4_generic(i32, a, b, overflow); |
| 20 | 20 | } |
| 21 | pub fn __subodi4(a: i64, b: i64, overflow: *c_int) callconv(.C) i64 { | |
| 21 | pub fn __subodi4(a: i64, b: i64, overflow: *c_int) callconv(.c) i64 { | |
| 22 | 22 | return suboXi4_generic(i64, a, b, overflow); |
| 23 | 23 | } |
| 24 | pub fn __suboti4(a: i128, b: i128, overflow: *c_int) callconv(.C) i128 { | |
| 24 | pub fn __suboti4(a: i128, b: i128, overflow: *c_int) callconv(.c) i128 { | |
| 25 | 25 | return suboXi4_generic(i128, a, b, overflow); |
| 26 | 26 | } |
| 27 | 27 |
lib/compiler_rt/subsf3.zig+2-2| ... | ... | @@ -11,11 +11,11 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | fn __subsf3(a: f32, b: f32) callconv(.C) f32 { | |
| 14 | fn __subsf3(a: f32, b: f32) callconv(.c) f32 { | |
| 15 | 15 | return sub(a, b); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_fsub(a: f32, b: f32) callconv(.AAPCS) f32 { | |
| 18 | fn __aeabi_fsub(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) f32 { | |
| 19 | 19 | return sub(a, b); |
| 20 | 20 | } |
| 21 | 21 |
lib/compiler_rt/subtf3.zig+2-2| ... | ... | @@ -12,11 +12,11 @@ comptime { |
| 12 | 12 | @export(&__subtf3, .{ .name = "__subtf3", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __subtf3(a: f128, b: f128) callconv(.C) f128 { | |
| 15 | pub fn __subtf3(a: f128, b: f128) callconv(.c) f128 { | |
| 16 | 16 | return sub(a, b); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_sub(c: *f128, a: *const f128, b: *const f128) callconv(.C) void { | |
| 19 | fn _Qp_sub(c: *f128, a: *const f128, b: *const f128) callconv(.c) void { | |
| 20 | 20 | c.* = sub(a.*, b.*); |
| 21 | 21 | } |
| 22 | 22 |
lib/compiler_rt/subxf3.zig+1-1| ... | ... | @@ -7,7 +7,7 @@ comptime { |
| 7 | 7 | @export(&__subxf3, .{ .name = "__subxf3", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __subxf3(a: f80, b: f80) callconv(.C) f80 { | |
| 10 | fn __subxf3(a: f80, b: f80) callconv(.c) f80 { | |
| 11 | 11 | var b_rep = std.math.F80.fromFloat(b); |
| 12 | 12 | b_rep.exp ^= 0x8000; |
| 13 | 13 | const neg_b = b_rep.toFloat(); |
lib/compiler_rt/tan.zig+6-6| ... | ... | @@ -32,12 +32,12 @@ comptime { |
| 32 | 32 | @export(&tanl, .{ .name = "tanl", .linkage = common.linkage, .visibility = common.visibility }); |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | pub fn __tanh(x: f16) callconv(.C) f16 { | |
| 35 | pub fn __tanh(x: f16) callconv(.c) f16 { | |
| 36 | 36 | // TODO: more efficient implementation |
| 37 | 37 | return @floatCast(tanf(x)); |
| 38 | 38 | } |
| 39 | 39 | |
| 40 | pub fn tanf(x: f32) callconv(.C) f32 { | |
| 40 | pub fn tanf(x: f32) callconv(.c) f32 { | |
| 41 | 41 | // Small multiples of pi/2 rounded to double precision. |
| 42 | 42 | const t1pio2: f64 = 1.0 * math.pi / 2.0; // 0x3FF921FB, 0x54442D18 |
| 43 | 43 | const t2pio2: f64 = 2.0 * math.pi / 2.0; // 0x400921FB, 0x54442D18 |
| ... | ... | @@ -81,7 +81,7 @@ pub fn tanf(x: f32) callconv(.C) f32 { |
| 81 | 81 | return kernel.__tandf(y, n & 1 != 0); |
| 82 | 82 | } |
| 83 | 83 | |
| 84 | pub fn tan(x: f64) callconv(.C) f64 { | |
| 84 | pub fn tan(x: f64) callconv(.c) f64 { | |
| 85 | 85 | var ix = @as(u64, @bitCast(x)) >> 32; |
| 86 | 86 | ix &= 0x7fffffff; |
| 87 | 87 | |
| ... | ... | @@ -105,17 +105,17 @@ pub fn tan(x: f64) callconv(.C) f64 { |
| 105 | 105 | return kernel.__tan(y[0], y[1], n & 1 != 0); |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | pub fn __tanx(x: f80) callconv(.C) f80 { | |
| 108 | pub fn __tanx(x: f80) callconv(.c) f80 { | |
| 109 | 109 | // TODO: more efficient implementation |
| 110 | 110 | return @floatCast(tanq(x)); |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | pub fn tanq(x: f128) callconv(.C) f128 { | |
| 113 | pub fn tanq(x: f128) callconv(.c) f128 { | |
| 114 | 114 | // TODO: more correct implementation |
| 115 | 115 | return tan(@floatCast(x)); |
| 116 | 116 | } |
| 117 | 117 | |
| 118 | pub fn tanl(x: c_longdouble) callconv(.C) c_longdouble { | |
| 118 | pub fn tanl(x: c_longdouble) callconv(.c) c_longdouble { | |
| 119 | 119 | switch (@typeInfo(c_longdouble).float.bits) { |
| 120 | 120 | 16 => return __tanh(x), |
| 121 | 121 | 32 => return tanf(x), |
lib/compiler_rt/trunc.zig+6-6| ... | ... | @@ -26,12 +26,12 @@ comptime { |
| 26 | 26 | @export(&truncl, .{ .name = "truncl", .linkage = common.linkage, .visibility = common.visibility }); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | pub fn __trunch(x: f16) callconv(.C) f16 { | |
| 29 | pub fn __trunch(x: f16) callconv(.c) f16 { | |
| 30 | 30 | // TODO: more efficient implementation |
| 31 | 31 | return @floatCast(truncf(x)); |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | pub fn truncf(x: f32) callconv(.C) f32 { | |
| 34 | pub fn truncf(x: f32) callconv(.c) f32 { | |
| 35 | 35 | const u: u32 = @bitCast(x); |
| 36 | 36 | var e = @as(i32, @intCast(((u >> 23) & 0xFF))) - 0x7F + 9; |
| 37 | 37 | var m: u32 = undefined; |
| ... | ... | @@ -52,7 +52,7 @@ pub fn truncf(x: f32) callconv(.C) f32 { |
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | pub fn trunc(x: f64) callconv(.C) f64 { | |
| 55 | pub fn trunc(x: f64) callconv(.c) f64 { | |
| 56 | 56 | const u: u64 = @bitCast(x); |
| 57 | 57 | var e = @as(i32, @intCast(((u >> 52) & 0x7FF))) - 0x3FF + 12; |
| 58 | 58 | var m: u64 = undefined; |
| ... | ... | @@ -73,12 +73,12 @@ pub fn trunc(x: f64) callconv(.C) f64 { |
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | pub fn __truncx(x: f80) callconv(.C) f80 { | |
| 76 | pub fn __truncx(x: f80) callconv(.c) f80 { | |
| 77 | 77 | // TODO: more efficient implementation |
| 78 | 78 | return @floatCast(truncq(x)); |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | pub fn truncq(x: f128) callconv(.C) f128 { | |
| 81 | pub fn truncq(x: f128) callconv(.c) f128 { | |
| 82 | 82 | const u: u128 = @bitCast(x); |
| 83 | 83 | var e = @as(i32, @intCast(((u >> 112) & 0x7FFF))) - 0x3FFF + 16; |
| 84 | 84 | var m: u128 = undefined; |
| ... | ... | @@ -99,7 +99,7 @@ pub fn truncq(x: f128) callconv(.C) f128 { |
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | pub fn truncl(x: c_longdouble) callconv(.C) c_longdouble { | |
| 102 | pub fn truncl(x: c_longdouble) callconv(.c) c_longdouble { | |
| 103 | 103 | switch (@typeInfo(c_longdouble).float.bits) { |
| 104 | 104 | 16 => return __trunch(x), |
| 105 | 105 | 32 => return truncf(x), |
lib/compiler_rt/truncdfhf2.zig+2-2| ... | ... | @@ -10,10 +10,10 @@ comptime { |
| 10 | 10 | @export(&__truncdfhf2, .{ .name = "__truncdfhf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | pub fn __truncdfhf2(a: f64) callconv(.C) common.F16T(f64) { | |
| 13 | pub fn __truncdfhf2(a: f64) callconv(.c) common.F16T(f64) { | |
| 14 | 14 | return @bitCast(truncf(f16, f64, a)); |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | fn __aeabi_d2h(a: f64) callconv(.AAPCS) u16 { | |
| 17 | fn __aeabi_d2h(a: f64) callconv(.{ .arm_aapcs = .{} }) u16 { | |
| 18 | 18 | return @bitCast(truncf(f16, f64, a)); |
| 19 | 19 | } |
lib/compiler_rt/truncdfsf2.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | pub fn __truncdfsf2(a: f64) callconv(.C) f32 { | |
| 14 | pub fn __truncdfsf2(a: f64) callconv(.c) f32 { | |
| 15 | 15 | return truncf(f32, f64, a); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_d2f(a: f64) callconv(.AAPCS) f32 { | |
| 18 | fn __aeabi_d2f(a: f64) callconv(.{ .arm_aapcs = .{} }) f32 { | |
| 19 | 19 | return truncf(f32, f64, a); |
| 20 | 20 | } |
lib/compiler_rt/truncsfhf2.zig+3-3| ... | ... | @@ -12,14 +12,14 @@ comptime { |
| 12 | 12 | @export(&__truncsfhf2, .{ .name = "__truncsfhf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __truncsfhf2(a: f32) callconv(.C) common.F16T(f32) { | |
| 15 | pub fn __truncsfhf2(a: f32) callconv(.c) common.F16T(f32) { | |
| 16 | 16 | return @bitCast(truncf(f16, f32, a)); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn __gnu_f2h_ieee(a: f32) callconv(.C) common.F16T(f32) { | |
| 19 | fn __gnu_f2h_ieee(a: f32) callconv(.c) common.F16T(f32) { | |
| 20 | 20 | return @bitCast(truncf(f16, f32, a)); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | fn __aeabi_f2h(a: f32) callconv(.AAPCS) u16 { | |
| 23 | fn __aeabi_f2h(a: f32) callconv(.{ .arm_aapcs = .{} }) u16 { | |
| 24 | 24 | return @bitCast(truncf(f16, f32, a)); |
| 25 | 25 | } |
lib/compiler_rt/trunctfdf2.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | @export(&__trunctfdf2, .{ .name = "__trunctfdf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __trunctfdf2(a: f128) callconv(.C) f64 { | |
| 15 | pub fn __trunctfdf2(a: f128) callconv(.c) f64 { | |
| 16 | 16 | return truncf(f64, f128, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_qtod(a: *const f128) callconv(.C) f64 { | |
| 19 | fn _Qp_qtod(a: *const f128) callconv(.c) f64 { | |
| 20 | 20 | return truncf(f64, f128, a.*); |
| 21 | 21 | } |
lib/compiler_rt/trunctfhf2.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__trunctfhf2, .{ .name = "__trunctfhf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | pub fn __trunctfhf2(a: f128) callconv(.C) common.F16T(f128) { | |
| 10 | pub fn __trunctfhf2(a: f128) callconv(.c) common.F16T(f128) { | |
| 11 | 11 | return @bitCast(truncf(f16, f128, a)); |
| 12 | 12 | } |
lib/compiler_rt/trunctfsf2.zig+2-2| ... | ... | @@ -12,10 +12,10 @@ comptime { |
| 12 | 12 | @export(&__trunctfsf2, .{ .name = "__trunctfsf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 13 | 13 | } |
| 14 | 14 | |
| 15 | pub fn __trunctfsf2(a: f128) callconv(.C) f32 { | |
| 15 | pub fn __trunctfsf2(a: f128) callconv(.c) f32 { | |
| 16 | 16 | return truncf(f32, f128, a); |
| 17 | 17 | } |
| 18 | 18 | |
| 19 | fn _Qp_qtos(a: *const f128) callconv(.C) f32 { | |
| 19 | fn _Qp_qtos(a: *const f128) callconv(.c) f32 { | |
| 20 | 20 | return truncf(f32, f128, a.*); |
| 21 | 21 | } |
lib/compiler_rt/trunctfxf2.zig+1-1| ... | ... | @@ -8,7 +8,7 @@ comptime { |
| 8 | 8 | @export(&__trunctfxf2, .{ .name = "__trunctfxf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 9 | 9 | } |
| 10 | 10 | |
| 11 | pub fn __trunctfxf2(a: f128) callconv(.C) f80 { | |
| 11 | pub fn __trunctfxf2(a: f128) callconv(.c) f80 { | |
| 12 | 12 | const src_sig_bits = math.floatMantissaBits(f128); |
| 13 | 13 | const dst_sig_bits = math.floatMantissaBits(f80) - 1; // -1 for the integer bit |
| 14 | 14 |
lib/compiler_rt/truncxfdf2.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__truncxfdf2, .{ .name = "__truncxfdf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __truncxfdf2(a: f80) callconv(.C) f64 { | |
| 10 | fn __truncxfdf2(a: f80) callconv(.c) f64 { | |
| 11 | 11 | return trunc_f80(f64, a); |
| 12 | 12 | } |
lib/compiler_rt/truncxfhf2.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__truncxfhf2, .{ .name = "__truncxfhf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __truncxfhf2(a: f80) callconv(.C) common.F16T(f80) { | |
| 10 | fn __truncxfhf2(a: f80) callconv(.c) common.F16T(f80) { | |
| 11 | 11 | return @bitCast(trunc_f80(f16, a)); |
| 12 | 12 | } |
lib/compiler_rt/truncxfsf2.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__truncxfsf2, .{ .name = "__truncxfsf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn __truncxfsf2(a: f80) callconv(.C) f32 { | |
| 10 | fn __truncxfsf2(a: f80) callconv(.c) f32 { | |
| 11 | 11 | return trunc_f80(f32, a); |
| 12 | 12 | } |
lib/compiler_rt/udivmodei4.zig+2-2| ... | ... | @@ -112,7 +112,7 @@ pub fn divmod(q: ?[]u32, r: ?[]u32, u: []const u32, v: []const u32) !void { |
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | 114 | |
| 115 | pub fn __udivei4(r_q: [*]u32, u_p: [*]const u32, v_p: [*]const u32, bits: usize) callconv(.C) void { | |
| 115 | pub fn __udivei4(r_q: [*]u32, u_p: [*]const u32, v_p: [*]const u32, bits: usize) callconv(.c) void { | |
| 116 | 116 | @setRuntimeSafety(builtin.is_test); |
| 117 | 117 | const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable]; |
| 118 | 118 | const v = v_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable]; |
| ... | ... | @@ -120,7 +120,7 @@ pub fn __udivei4(r_q: [*]u32, u_p: [*]const u32, v_p: [*]const u32, bits: usize) |
| 120 | 120 | @call(.always_inline, divmod, .{ q, null, u, v }) catch unreachable; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | pub fn __umodei4(r_p: [*]u32, u_p: [*]const u32, v_p: [*]const u32, bits: usize) callconv(.C) void { | |
| 123 | pub fn __umodei4(r_p: [*]u32, u_p: [*]const u32, v_p: [*]const u32, bits: usize) callconv(.c) void { | |
| 124 | 124 | @setRuntimeSafety(builtin.is_test); |
| 125 | 125 | const u = u_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable]; |
| 126 | 126 | const v = v_p[0 .. std.math.divCeil(usize, bits, 32) catch unreachable]; |
lib/compiler_rt/udivmodti4.zig+2-2| ... | ... | @@ -13,13 +13,13 @@ comptime { |
| 13 | 13 | } |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | pub fn __udivmodti4(a: u128, b: u128, maybe_rem: ?*u128) callconv(.C) u128 { | |
| 16 | pub fn __udivmodti4(a: u128, b: u128, maybe_rem: ?*u128) callconv(.c) u128 { | |
| 17 | 17 | return udivmod(u128, a, b, maybe_rem); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | const v2u64 = @Vector(2, u64); |
| 21 | 21 | |
| 22 | fn __udivmodti4_windows_x86_64(a: v2u64, b: v2u64, maybe_rem: ?*u128) callconv(.C) v2u64 { | |
| 22 | fn __udivmodti4_windows_x86_64(a: v2u64, b: v2u64, maybe_rem: ?*u128) callconv(.c) v2u64 { | |
| 23 | 23 | return @bitCast(udivmod(u128, @bitCast(a), @bitCast(b), maybe_rem)); |
| 24 | 24 | } |
| 25 | 25 |
lib/compiler_rt/udivti3.zig+2-2| ... | ... | @@ -13,12 +13,12 @@ comptime { |
| 13 | 13 | } |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | pub fn __udivti3(a: u128, b: u128) callconv(.C) u128 { | |
| 16 | pub fn __udivti3(a: u128, b: u128) callconv(.c) u128 { | |
| 17 | 17 | return udivmod(u128, a, b, null); |
| 18 | 18 | } |
| 19 | 19 | |
| 20 | 20 | const v2u64 = @Vector(2, u64); |
| 21 | 21 | |
| 22 | fn __udivti3_windows_x86_64(a: v2u64, b: v2u64) callconv(.C) v2u64 { | |
| 22 | fn __udivti3_windows_x86_64(a: v2u64, b: v2u64) callconv(.c) v2u64 { | |
| 23 | 23 | return @bitCast(udivmod(u128, @bitCast(a), @bitCast(b), null)); |
| 24 | 24 | } |
lib/compiler_rt/umodti3.zig+2-2| ... | ... | @@ -13,7 +13,7 @@ comptime { |
| 13 | 13 | } |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | pub fn __umodti3(a: u128, b: u128) callconv(.C) u128 { | |
| 16 | pub fn __umodti3(a: u128, b: u128) callconv(.c) u128 { | |
| 17 | 17 | var r: u128 = undefined; |
| 18 | 18 | _ = udivmod(u128, a, b, &r); |
| 19 | 19 | return r; |
| ... | ... | @@ -21,7 +21,7 @@ pub fn __umodti3(a: u128, b: u128) callconv(.C) u128 { |
| 21 | 21 | |
| 22 | 22 | const v2u64 = @Vector(2, u64); |
| 23 | 23 | |
| 24 | fn __umodti3_windows_x86_64(a: v2u64, b: v2u64) callconv(.C) v2u64 { | |
| 24 | fn __umodti3_windows_x86_64(a: v2u64, b: v2u64) callconv(.c) v2u64 { | |
| 25 | 25 | var r: u128 = undefined; |
| 26 | 26 | _ = udivmod(u128, @bitCast(a), @bitCast(b), &r); |
| 27 | 27 | return @bitCast(r); |
lib/compiler_rt/unorddf2.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | pub fn __unorddf2(a: f64, b: f64) callconv(.C) i32 { | |
| 14 | pub fn __unorddf2(a: f64, b: f64) callconv(.c) i32 { | |
| 15 | 15 | return comparef.unordcmp(f64, a, b); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_dcmpun(a: f64, b: f64) callconv(.AAPCS) i32 { | |
| 18 | fn __aeabi_dcmpun(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 19 | 19 | return comparef.unordcmp(f64, a, b); |
| 20 | 20 | } |
lib/compiler_rt/unordhf2.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__unordhf2, .{ .name = "__unordhf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | pub fn __unordhf2(a: f16, b: f16) callconv(.C) i32 { | |
| 10 | pub fn __unordhf2(a: f16, b: f16) callconv(.c) i32 { | |
| 11 | 11 | return comparef.unordcmp(f16, a, b); |
| 12 | 12 | } |
lib/compiler_rt/unordsf2.zig+2-2| ... | ... | @@ -11,10 +11,10 @@ comptime { |
| 11 | 11 | } |
| 12 | 12 | } |
| 13 | 13 | |
| 14 | pub fn __unordsf2(a: f32, b: f32) callconv(.C) i32 { | |
| 14 | pub fn __unordsf2(a: f32, b: f32) callconv(.c) i32 { | |
| 15 | 15 | return comparef.unordcmp(f32, a, b); |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | fn __aeabi_fcmpun(a: f32, b: f32) callconv(.AAPCS) i32 { | |
| 18 | fn __aeabi_fcmpun(a: f32, b: f32) callconv(.{ .arm_aapcs = .{} }) i32 { | |
| 19 | 19 | return comparef.unordcmp(f32, a, b); |
| 20 | 20 | } |
lib/compiler_rt/unordtf2.zig+1-1| ... | ... | @@ -13,6 +13,6 @@ comptime { |
| 13 | 13 | @export(&__unordtf2, .{ .name = "__unordtf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | fn __unordtf2(a: f128, b: f128) callconv(.C) i32 { | |
| 16 | fn __unordtf2(a: f128, b: f128) callconv(.c) i32 { | |
| 17 | 17 | return comparef.unordcmp(f128, a, b); |
| 18 | 18 | } |
lib/compiler_rt/unordxf2.zig+1-1| ... | ... | @@ -7,6 +7,6 @@ comptime { |
| 7 | 7 | @export(&__unordxf2, .{ .name = "__unordxf2", .linkage = common.linkage, .visibility = common.visibility }); |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | pub fn __unordxf2(a: f80, b: f80) callconv(.C) i32 { | |
| 10 | pub fn __unordxf2(a: f80, b: f80) callconv(.c) i32 { | |
| 11 | 11 | return comparef.unordcmp(f80, a, b); |
| 12 | 12 | } |
lib/fuzzer.zig+1-1| ... | ... | @@ -453,7 +453,7 @@ export fn fuzzer_coverage_id() u64 { |
| 453 | 453 | return fuzzer.coverage_id; |
| 454 | 454 | } |
| 455 | 455 | |
| 456 | var fuzzer_one: *const fn (input_ptr: [*]const u8, input_len: usize) callconv(.C) void = undefined; | |
| 456 | var fuzzer_one: *const fn (input_ptr: [*]const u8, input_len: usize) callconv(.c) void = undefined; | |
| 457 | 457 | |
| 458 | 458 | export fn fuzzer_start(testOne: @TypeOf(fuzzer_one)) void { |
| 459 | 459 | fuzzer_one = testOne; |
lib/std/os/linux/aarch64.zig+2-2| ... | ... | @@ -99,7 +99,7 @@ pub fn syscall6( |
| 99 | 99 | ); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | pub fn clone() callconv(.Naked) usize { | |
| 102 | pub fn clone() callconv(.naked) usize { | |
| 103 | 103 | // __clone(func, stack, flags, arg, ptid, tls, ctid) |
| 104 | 104 | // x0, x1, w2, x3, x4, x5, x6 |
| 105 | 105 | // |
| ... | ... | @@ -141,7 +141,7 @@ pub fn clone() callconv(.Naked) usize { |
| 141 | 141 | |
| 142 | 142 | pub const restore = restore_rt; |
| 143 | 143 | |
| 144 | pub fn restore_rt() callconv(.Naked) noreturn { | |
| 144 | pub fn restore_rt() callconv(.naked) noreturn { | |
| 145 | 145 | switch (@import("builtin").zig_backend) { |
| 146 | 146 | .stage2_c => asm volatile ( |
| 147 | 147 | \\ mov x8, %[number] |
lib/std/os/linux/arm.zig+3-3| ... | ... | @@ -98,7 +98,7 @@ pub fn syscall6( |
| 98 | 98 | ); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | pub fn clone() callconv(.Naked) usize { | |
| 101 | pub fn clone() callconv(.naked) usize { | |
| 102 | 102 | // __clone(func, stack, flags, arg, ptid, tls, ctid) |
| 103 | 103 | // r0, r1, r2, r3, +0, +4, +8 |
| 104 | 104 | // |
| ... | ... | @@ -134,7 +134,7 @@ pub fn clone() callconv(.Naked) usize { |
| 134 | 134 | ); |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | pub fn restore() callconv(.Naked) noreturn { | |
| 137 | pub fn restore() callconv(.naked) noreturn { | |
| 138 | 138 | switch (@import("builtin").zig_backend) { |
| 139 | 139 | .stage2_c => asm volatile ( |
| 140 | 140 | \\ mov r7, %[number] |
| ... | ... | @@ -152,7 +152,7 @@ pub fn restore() callconv(.Naked) noreturn { |
| 152 | 152 | } |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | pub fn restore_rt() callconv(.Naked) noreturn { | |
| 155 | pub fn restore_rt() callconv(.naked) noreturn { | |
| 156 | 156 | switch (@import("builtin").zig_backend) { |
| 157 | 157 | .stage2_c => asm volatile ( |
| 158 | 158 | \\ mov r7, %[number] |
lib/std/os/linux/hexagon.zig+2-2| ... | ... | @@ -96,7 +96,7 @@ pub fn syscall6( |
| 96 | 96 | ); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | pub fn clone() callconv(.Naked) usize { | |
| 99 | pub fn clone() callconv(.naked) usize { | |
| 100 | 100 | // __clone(func, stack, flags, arg, ptid, tls, ctid) |
| 101 | 101 | // r0, r1, r2, r3, r4, r5, +0 |
| 102 | 102 | // |
| ... | ... | @@ -137,7 +137,7 @@ pub fn clone() callconv(.Naked) usize { |
| 137 | 137 | |
| 138 | 138 | pub const restore = restore_rt; |
| 139 | 139 | |
| 140 | pub fn restore_rt() callconv(.Naked) noreturn { | |
| 140 | pub fn restore_rt() callconv(.naked) noreturn { | |
| 141 | 141 | asm volatile ( |
| 142 | 142 | \\ trap0(#0) |
| 143 | 143 | : |
lib/std/os/linux/loongarch64.zig+2-2| ... | ... | @@ -100,7 +100,7 @@ pub fn syscall6( |
| 100 | 100 | ); |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | pub fn clone() callconv(.Naked) usize { | |
| 103 | pub fn clone() callconv(.naked) usize { | |
| 104 | 104 | // __clone(func, stack, flags, arg, ptid, tls, ctid) |
| 105 | 105 | // a0, a1, a2, a3, a4, a5, a6 |
| 106 | 106 | // sys_clone(flags, stack, ptid, ctid, tls) |
| ... | ... | @@ -140,7 +140,7 @@ pub fn clone() callconv(.Naked) usize { |
| 140 | 140 | |
| 141 | 141 | pub const restore = restore_rt; |
| 142 | 142 | |
| 143 | pub fn restore_rt() callconv(.Naked) noreturn { | |
| 143 | pub fn restore_rt() callconv(.naked) noreturn { | |
| 144 | 144 | asm volatile ( |
| 145 | 145 | \\ or $a7, $zero, %[number] |
| 146 | 146 | \\ syscall 0 |
lib/std/os/linux/mips.zig+3-3| ... | ... | @@ -199,7 +199,7 @@ pub fn syscall7( |
| 199 | 199 | ); |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | pub fn clone() callconv(.Naked) usize { | |
| 202 | pub fn clone() callconv(.naked) usize { | |
| 203 | 203 | // __clone(func, stack, flags, arg, ptid, tls, ctid) |
| 204 | 204 | // 3, 4, 5, 6, 7, 8, 9 |
| 205 | 205 | // |
| ... | ... | @@ -250,7 +250,7 @@ pub fn clone() callconv(.Naked) usize { |
| 250 | 250 | ); |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | pub fn restore() callconv(.Naked) noreturn { | |
| 253 | pub fn restore() callconv(.naked) noreturn { | |
| 254 | 254 | asm volatile ( |
| 255 | 255 | \\ syscall |
| 256 | 256 | : |
| ... | ... | @@ -259,7 +259,7 @@ pub fn restore() callconv(.Naked) noreturn { |
| 259 | 259 | ); |
| 260 | 260 | } |
| 261 | 261 | |
| 262 | pub fn restore_rt() callconv(.Naked) noreturn { | |
| 262 | pub fn restore_rt() callconv(.naked) noreturn { | |
| 263 | 263 | asm volatile ( |
| 264 | 264 | \\ syscall |
| 265 | 265 | : |
lib/std/os/linux/mips64.zig+3-3| ... | ... | @@ -182,7 +182,7 @@ pub fn syscall7( |
| 182 | 182 | ); |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | pub fn clone() callconv(.Naked) usize { | |
| 185 | pub fn clone() callconv(.naked) usize { | |
| 186 | 186 | // __clone(func, stack, flags, arg, ptid, tls, ctid) |
| 187 | 187 | // 3, 4, 5, 6, 7, 8, 9 |
| 188 | 188 | // |
| ... | ... | @@ -229,7 +229,7 @@ pub fn clone() callconv(.Naked) usize { |
| 229 | 229 | ); |
| 230 | 230 | } |
| 231 | 231 | |
| 232 | pub fn restore() callconv(.Naked) noreturn { | |
| 232 | pub fn restore() callconv(.naked) noreturn { | |
| 233 | 233 | asm volatile ( |
| 234 | 234 | \\ syscall |
| 235 | 235 | : |
| ... | ... | @@ -238,7 +238,7 @@ pub fn restore() callconv(.Naked) noreturn { |
| 238 | 238 | ); |
| 239 | 239 | } |
| 240 | 240 | |
| 241 | pub fn restore_rt() callconv(.Naked) noreturn { | |
| 241 | pub fn restore_rt() callconv(.naked) noreturn { | |
| 242 | 242 | asm volatile ( |
| 243 | 243 | \\ syscall |
| 244 | 244 | : |
lib/std/os/linux/powerpc.zig+2-2| ... | ... | @@ -127,7 +127,7 @@ pub fn syscall6( |
| 127 | 127 | ); |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | pub fn clone() callconv(.Naked) usize { | |
| 130 | pub fn clone() callconv(.naked) usize { | |
| 131 | 131 | // __clone(func, stack, flags, arg, ptid, tls, ctid) |
| 132 | 132 | // 3, 4, 5, 6, 7, 8, 9 |
| 133 | 133 | // |
| ... | ... | @@ -199,7 +199,7 @@ pub fn clone() callconv(.Naked) usize { |
| 199 | 199 | |
| 200 | 200 | pub const restore = restore_rt; |
| 201 | 201 | |
| 202 | pub fn restore_rt() callconv(.Naked) noreturn { | |
| 202 | pub fn restore_rt() callconv(.naked) noreturn { | |
| 203 | 203 | asm volatile ( |
| 204 | 204 | \\ sc |
| 205 | 205 | : |
lib/std/os/linux/powerpc64.zig+2-2| ... | ... | @@ -127,7 +127,7 @@ pub fn syscall6( |
| 127 | 127 | ); |
| 128 | 128 | } |
| 129 | 129 | |
| 130 | pub fn clone() callconv(.Naked) usize { | |
| 130 | pub fn clone() callconv(.naked) usize { | |
| 131 | 131 | // __clone(func, stack, flags, arg, ptid, tls, ctid) |
| 132 | 132 | // 3, 4, 5, 6, 7, 8, 9 |
| 133 | 133 | // |
| ... | ... | @@ -184,7 +184,7 @@ pub fn clone() callconv(.Naked) usize { |
| 184 | 184 | |
| 185 | 185 | pub const restore = restore_rt; |
| 186 | 186 | |
| 187 | pub fn restore_rt() callconv(.Naked) noreturn { | |
| 187 | pub fn restore_rt() callconv(.naked) noreturn { | |
| 188 | 188 | asm volatile ( |
| 189 | 189 | \\ sc |
| 190 | 190 | : |
lib/std/os/linux/riscv32.zig+2-2| ... | ... | @@ -96,7 +96,7 @@ pub fn syscall6( |
| 96 | 96 | ); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | pub fn clone() callconv(.Naked) usize { | |
| 99 | pub fn clone() callconv(.naked) usize { | |
| 100 | 100 | // __clone(func, stack, flags, arg, ptid, tls, ctid) |
| 101 | 101 | // a0, a1, a2, a3, a4, a5, a6 |
| 102 | 102 | // |
| ... | ... | @@ -142,7 +142,7 @@ pub fn clone() callconv(.Naked) usize { |
| 142 | 142 | |
| 143 | 143 | pub const restore = restore_rt; |
| 144 | 144 | |
| 145 | pub fn restore_rt() callconv(.Naked) noreturn { | |
| 145 | pub fn restore_rt() callconv(.naked) noreturn { | |
| 146 | 146 | asm volatile ( |
| 147 | 147 | \\ ecall |
| 148 | 148 | : |
lib/std/os/linux/riscv64.zig+2-2| ... | ... | @@ -96,7 +96,7 @@ pub fn syscall6( |
| 96 | 96 | ); |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | pub fn clone() callconv(.Naked) usize { | |
| 99 | pub fn clone() callconv(.naked) usize { | |
| 100 | 100 | // __clone(func, stack, flags, arg, ptid, tls, ctid) |
| 101 | 101 | // a0, a1, a2, a3, a4, a5, a6 |
| 102 | 102 | // |
| ... | ... | @@ -142,7 +142,7 @@ pub fn clone() callconv(.Naked) usize { |
| 142 | 142 | |
| 143 | 143 | pub const restore = restore_rt; |
| 144 | 144 | |
| 145 | pub fn restore_rt() callconv(.Naked) noreturn { | |
| 145 | pub fn restore_rt() callconv(.naked) noreturn { | |
| 146 | 146 | asm volatile ( |
| 147 | 147 | \\ ecall |
| 148 | 148 | : |
lib/std/os/linux/s390x.zig+2-2| ... | ... | @@ -90,7 +90,7 @@ pub fn syscall6(number: SYS, arg1: usize, arg2: usize, arg3: usize, arg4: usize, |
| 90 | 90 | ); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | pub fn clone() callconv(.Naked) usize { | |
| 93 | pub fn clone() callconv(.naked) usize { | |
| 94 | 94 | asm volatile ( |
| 95 | 95 | \\# int clone( |
| 96 | 96 | \\# fn, a = r2 |
| ... | ... | @@ -156,7 +156,7 @@ pub fn clone() callconv(.Naked) usize { |
| 156 | 156 | |
| 157 | 157 | pub const restore = restore_rt; |
| 158 | 158 | |
| 159 | pub fn restore_rt() callconv(.Naked) noreturn { | |
| 159 | pub fn restore_rt() callconv(.naked) noreturn { | |
| 160 | 160 | asm volatile ( |
| 161 | 161 | \\svc 0 |
| 162 | 162 | : |
lib/std/os/linux/sparc64.zig+1-1| ... | ... | @@ -179,7 +179,7 @@ pub fn syscall6( |
| 179 | 179 | ); |
| 180 | 180 | } |
| 181 | 181 | |
| 182 | pub fn clone() callconv(.Naked) usize { | |
| 182 | pub fn clone() callconv(.naked) usize { | |
| 183 | 183 | // __clone(func, stack, flags, arg, ptid, tls, ctid) |
| 184 | 184 | // i0, i1, i2, i3, i4, i5, sp |
| 185 | 185 | // |
lib/std/os/linux/thumb.zig+2-2| ... | ... | @@ -143,7 +143,7 @@ pub fn syscall6( |
| 143 | 143 | |
| 144 | 144 | pub const clone = @import("arm.zig").clone; |
| 145 | 145 | |
| 146 | pub fn restore() callconv(.Naked) noreturn { | |
| 146 | pub fn restore() callconv(.naked) noreturn { | |
| 147 | 147 | asm volatile ( |
| 148 | 148 | \\ mov r7, %[number] |
| 149 | 149 | \\ svc #0 |
| ... | ... | @@ -152,7 +152,7 @@ pub fn restore() callconv(.Naked) noreturn { |
| 152 | 152 | ); |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | pub fn restore_rt() callconv(.Naked) noreturn { | |
| 155 | pub fn restore_rt() callconv(.naked) noreturn { | |
| 156 | 156 | asm volatile ( |
| 157 | 157 | \\ mov r7, %[number] |
| 158 | 158 | \\ svc #0 |
lib/std/os/linux/x86.zig+4-4| ... | ... | @@ -122,7 +122,7 @@ pub fn socketcall(call: usize, args: [*]const usize) usize { |
| 122 | 122 | ); |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | pub fn clone() callconv(.Naked) usize { | |
| 125 | pub fn clone() callconv(.naked) usize { | |
| 126 | 126 | // __clone(func, stack, flags, arg, ptid, tls, ctid) |
| 127 | 127 | // +8, +12, +16, +20, +24, +28, +32 |
| 128 | 128 | // |
| ... | ... | @@ -172,7 +172,7 @@ pub fn clone() callconv(.Naked) usize { |
| 172 | 172 | ); |
| 173 | 173 | } |
| 174 | 174 | |
| 175 | pub fn restore() callconv(.Naked) noreturn { | |
| 175 | pub fn restore() callconv(.naked) noreturn { | |
| 176 | 176 | switch (@import("builtin").zig_backend) { |
| 177 | 177 | .stage2_c => asm volatile ( |
| 178 | 178 | \\ movl %[number], %%eax |
| ... | ... | @@ -190,7 +190,7 @@ pub fn restore() callconv(.Naked) noreturn { |
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | pub fn restore_rt() callconv(.Naked) noreturn { | |
| 193 | pub fn restore_rt() callconv(.naked) noreturn { | |
| 194 | 194 | switch (@import("builtin").zig_backend) { |
| 195 | 195 | .stage2_c => asm volatile ( |
| 196 | 196 | \\ movl %[number], %%eax |
| ... | ... | @@ -405,7 +405,7 @@ noinline fn getContextReturnAddress() usize { |
| 405 | 405 | return @returnAddress(); |
| 406 | 406 | } |
| 407 | 407 | |
| 408 | pub fn getContextInternal() callconv(.Naked) usize { | |
| 408 | pub fn getContextInternal() callconv(.naked) usize { | |
| 409 | 409 | asm volatile ( |
| 410 | 410 | \\ movl $0, %[flags_offset:c](%%edx) |
| 411 | 411 | \\ movl $0, %[link_offset:c](%%edx) |
lib/std/os/linux/x86_64.zig+3-3| ... | ... | @@ -101,7 +101,7 @@ pub fn syscall6( |
| 101 | 101 | ); |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | pub fn clone() callconv(.Naked) usize { | |
| 104 | pub fn clone() callconv(.naked) usize { | |
| 105 | 105 | asm volatile ( |
| 106 | 106 | \\ movl $56,%%eax // SYS_clone |
| 107 | 107 | \\ movq %%rdi,%%r11 |
| ... | ... | @@ -137,7 +137,7 @@ pub fn clone() callconv(.Naked) usize { |
| 137 | 137 | |
| 138 | 138 | pub const restore = restore_rt; |
| 139 | 139 | |
| 140 | pub fn restore_rt() callconv(.Naked) noreturn { | |
| 140 | pub fn restore_rt() callconv(.naked) noreturn { | |
| 141 | 141 | switch (@import("builtin").zig_backend) { |
| 142 | 142 | .stage2_c => asm volatile ( |
| 143 | 143 | \\ movl %[number], %%eax |
| ... | ... | @@ -382,7 +382,7 @@ fn gpRegisterOffset(comptime reg_index: comptime_int) usize { |
| 382 | 382 | return @offsetOf(ucontext_t, "mcontext") + @offsetOf(mcontext_t, "gregs") + @sizeOf(usize) * reg_index; |
| 383 | 383 | } |
| 384 | 384 | |
| 385 | fn getContextInternal() callconv(.Naked) usize { | |
| 385 | fn getContextInternal() callconv(.naked) usize { | |
| 386 | 386 | // TODO: Read GS/FS registers? |
| 387 | 387 | asm volatile ( |
| 388 | 388 | \\ movq $0, %[flags_offset:c](%%rdi) |
lib/std/zig/parser_test.zig+4-4| ... | ... | @@ -1096,10 +1096,10 @@ test "zig fmt: block in slice expression" { |
| 1096 | 1096 | test "zig fmt: async function" { |
| 1097 | 1097 | try testCanonical( |
| 1098 | 1098 | \\pub const Server = struct { |
| 1099 | \\ handleRequestFn: fn (*Server, *const std.net.Address, File) callconv(.Async) void, | |
| 1099 | \\ handleRequestFn: fn (*Server, *const std.net.Address, File) callconv(.@"async") void, | |
| 1100 | 1100 | \\}; |
| 1101 | 1101 | \\test "hi" { |
| 1102 | \\ var ptr: fn (i32) callconv(.Async) void = @ptrCast(other); | |
| 1102 | \\ var ptr: fn (i32) callconv(.@"async") void = @ptrCast(other); | |
| 1103 | 1103 | \\} |
| 1104 | 1104 | \\ |
| 1105 | 1105 | ); |
| ... | ... | @@ -1259,7 +1259,7 @@ test "zig fmt: threadlocal" { |
| 1259 | 1259 | test "zig fmt: linksection" { |
| 1260 | 1260 | try testCanonical( |
| 1261 | 1261 | \\export var aoeu: u64 linksection(".text.derp") = 1234; |
| 1262 | \\export fn _start() linksection(".text.boot") callconv(.Naked) noreturn {} | |
| 1262 | \\export fn _start() linksection(".text.boot") callconv(.naked) noreturn {} | |
| 1263 | 1263 | \\ |
| 1264 | 1264 | ); |
| 1265 | 1265 | } |
| ... | ... | @@ -3926,7 +3926,7 @@ test "zig fmt: fn type" { |
| 3926 | 3926 | \\} |
| 3927 | 3927 | \\ |
| 3928 | 3928 | \\const a: fn (u8) u8 = undefined; |
| 3929 | \\const b: fn (u8) callconv(.Naked) u8 = undefined; | |
| 3929 | \\const b: fn (u8) callconv(.naked) u8 = undefined; | |
| 3930 | 3930 | \\const ap: fn (u8) u8 = a; |
| 3931 | 3931 | \\ |
| 3932 | 3932 | ); |
src/codegen/spirv/Assembler.zig+1-1| ... | ... | @@ -276,7 +276,7 @@ fn todo(self: *Assembler, comptime fmt: []const u8, args: anytype) Error { |
| 276 | 276 | fn processInstruction(self: *Assembler) !void { |
| 277 | 277 | const result: AsmValue = switch (self.inst.opcode) { |
| 278 | 278 | .OpEntryPoint => { |
| 279 | return self.fail(0, "cannot export entry points via OpEntryPoint, export the kernel using callconv(.Kernel)", .{}); | |
| 279 | return self.fail(0, "cannot export entry points via OpEntryPoint, export the kernel using callconv(.kernel)", .{}); | |
| 280 | 280 | }, |
| 281 | 281 | .OpCapability => { |
| 282 | 282 | try self.spv.addCapability(@enumFromInt(self.inst.operands.items[0].value)); |
src/link/NvPtx.zig+1-1| ... | ... | @@ -1,7 +1,7 @@ |
| 1 | 1 | //! NVidia PTX (Parallel Thread Execution) |
| 2 | 2 | //! https://docs.nvidia.com/cuda/parallel-thread-execution/index.html |
| 3 | 3 | //! 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)" | |
| 5 | 5 | |
| 6 | 6 | const NvPtx = @This(); |
| 7 | 7 |
test/behavior/async_fn.zig+27-27| ... | ... | @@ -137,13 +137,13 @@ test "@frameSize" { |
| 137 | 137 | const S = struct { |
| 138 | 138 | fn doTheTest() !void { |
| 139 | 139 | { |
| 140 | var ptr = @as(fn (i32) callconv(.Async) void, @ptrCast(other)); | |
| 140 | var ptr = @as(fn (i32) callconv(.@"async") void, @ptrCast(other)); | |
| 141 | 141 | _ = &ptr; |
| 142 | 142 | const size = @frameSize(ptr); |
| 143 | 143 | try expect(size == @sizeOf(@Frame(other))); |
| 144 | 144 | } |
| 145 | 145 | { |
| 146 | var ptr = @as(fn () callconv(.Async) void, @ptrCast(first)); | |
| 146 | var ptr = @as(fn () callconv(.@"async") void, @ptrCast(first)); | |
| 147 | 147 | _ = &ptr; |
| 148 | 148 | const size = @frameSize(ptr); |
| 149 | 149 | try expect(size == @sizeOf(@Frame(first))); |
| ... | ... | @@ -220,7 +220,7 @@ test "coroutine suspend with block" { |
| 220 | 220 | |
| 221 | 221 | var a_promise: anyframe = undefined; |
| 222 | 222 | var global_result = false; |
| 223 | fn testSuspendBlock() callconv(.Async) void { | |
| 223 | fn testSuspendBlock() callconv(.@"async") void { | |
| 224 | 224 | suspend { |
| 225 | 225 | comptime assert(@TypeOf(@frame()) == *@Frame(testSuspendBlock)) catch unreachable; |
| 226 | 226 | a_promise = @frame(); |
| ... | ... | @@ -249,14 +249,14 @@ test "coroutine await" { |
| 249 | 249 | try expect(await_final_result == 1234); |
| 250 | 250 | try expect(std.mem.eql(u8, &await_points, "abcdefghi")); |
| 251 | 251 | } |
| 252 | fn await_amain() callconv(.Async) void { | |
| 252 | fn await_amain() callconv(.@"async") void { | |
| 253 | 253 | await_seq('b'); |
| 254 | 254 | var p = async await_another(); |
| 255 | 255 | await_seq('e'); |
| 256 | 256 | await_final_result = await p; |
| 257 | 257 | await_seq('h'); |
| 258 | 258 | } |
| 259 | fn await_another() callconv(.Async) i32 { | |
| 259 | fn await_another() callconv(.@"async") i32 { | |
| 260 | 260 | await_seq('c'); |
| 261 | 261 | suspend { |
| 262 | 262 | await_seq('d'); |
| ... | ... | @@ -287,14 +287,14 @@ test "coroutine await early return" { |
| 287 | 287 | try expect(early_final_result == 1234); |
| 288 | 288 | try expect(std.mem.eql(u8, &early_points, "abcdef")); |
| 289 | 289 | } |
| 290 | fn early_amain() callconv(.Async) void { | |
| 290 | fn early_amain() callconv(.@"async") void { | |
| 291 | 291 | early_seq('b'); |
| 292 | 292 | var p = async early_another(); |
| 293 | 293 | early_seq('d'); |
| 294 | 294 | early_final_result = await p; |
| 295 | 295 | early_seq('e'); |
| 296 | 296 | } |
| 297 | fn early_another() callconv(.Async) i32 { | |
| 297 | fn early_another() callconv(.@"async") i32 { | |
| 298 | 298 | early_seq('c'); |
| 299 | 299 | return 1234; |
| 300 | 300 | } |
| ... | ... | @@ -313,7 +313,7 @@ test "async function with dot syntax" { |
| 313 | 313 | |
| 314 | 314 | const S = struct { |
| 315 | 315 | var y: i32 = 1; |
| 316 | fn foo() callconv(.Async) void { | |
| 316 | fn foo() callconv(.@"async") void { | |
| 317 | 317 | y += 1; |
| 318 | 318 | suspend {} |
| 319 | 319 | } |
| ... | ... | @@ -329,7 +329,7 @@ test "async fn pointer in a struct field" { |
| 329 | 329 | |
| 330 | 330 | var data: i32 = 1; |
| 331 | 331 | const Foo = struct { |
| 332 | bar: fn (*i32) callconv(.Async) void, | |
| 332 | bar: fn (*i32) callconv(.@"async") void, | |
| 333 | 333 | }; |
| 334 | 334 | var foo = Foo{ .bar = simpleAsyncFn2 }; |
| 335 | 335 | _ = &foo; |
| ... | ... | @@ -346,7 +346,7 @@ test "async fn pointer in a struct field" { |
| 346 | 346 | fn doTheAwait(f: anyframe->void) void { |
| 347 | 347 | await f; |
| 348 | 348 | } |
| 349 | fn simpleAsyncFn2(y: *i32) callconv(.Async) void { | |
| 349 | fn simpleAsyncFn2(y: *i32) callconv(.@"async") void { | |
| 350 | 350 | defer y.* += 2; |
| 351 | 351 | y.* += 1; |
| 352 | 352 | suspend {} |
| ... | ... | @@ -357,10 +357,10 @@ test "@asyncCall with return type" { |
| 357 | 357 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 358 | 358 | |
| 359 | 359 | const Foo = struct { |
| 360 | bar: fn () callconv(.Async) i32, | |
| 360 | bar: fn () callconv(.@"async") i32, | |
| 361 | 361 | |
| 362 | 362 | var global_frame: anyframe = undefined; |
| 363 | fn middle() callconv(.Async) i32 { | |
| 363 | fn middle() callconv(.@"async") i32 { | |
| 364 | 364 | return afunc(); |
| 365 | 365 | } |
| 366 | 366 | |
| ... | ... | @@ -396,7 +396,7 @@ test "async fn with inferred error set" { |
| 396 | 396 | resume global_frame; |
| 397 | 397 | try std.testing.expectError(error.Fail, result); |
| 398 | 398 | } |
| 399 | fn middle() callconv(.Async) !void { | |
| 399 | fn middle() callconv(.@"async") !void { | |
| 400 | 400 | var f = async middle2(); |
| 401 | 401 | return await f; |
| 402 | 402 | } |
| ... | ... | @@ -441,11 +441,11 @@ fn nonFailing() (anyframe->anyerror!void) { |
| 441 | 441 | Static.frame = async suspendThenFail(); |
| 442 | 442 | return &Static.frame; |
| 443 | 443 | } |
| 444 | fn suspendThenFail() callconv(.Async) anyerror!void { | |
| 444 | fn suspendThenFail() callconv(.@"async") anyerror!void { | |
| 445 | 445 | suspend {} |
| 446 | 446 | return error.Fail; |
| 447 | 447 | } |
| 448 | fn printTrace(p: anyframe->(anyerror!void)) callconv(.Async) void { | |
| 448 | fn printTrace(p: anyframe->(anyerror!void)) callconv(.@"async") void { | |
| 449 | 449 | (await p) catch |e| { |
| 450 | 450 | std.testing.expect(e == error.Fail) catch @panic("test failure"); |
| 451 | 451 | if (@errorReturnTrace()) |trace| { |
| ... | ... | @@ -466,7 +466,7 @@ test "break from suspend" { |
| 466 | 466 | _ = p; |
| 467 | 467 | try std.testing.expect(my_result == 2); |
| 468 | 468 | } |
| 469 | fn testBreakFromSuspend(my_result: *i32) callconv(.Async) void { | |
| 469 | fn testBreakFromSuspend(my_result: *i32) callconv(.@"async") void { | |
| 470 | 470 | suspend { |
| 471 | 471 | resume @frame(); |
| 472 | 472 | } |
| ... | ... | @@ -949,7 +949,7 @@ test "cast fn to async fn when it is inferred to be async" { |
| 949 | 949 | var ok = false; |
| 950 | 950 | |
| 951 | 951 | fn doTheTest() void { |
| 952 | var ptr: fn () callconv(.Async) i32 = undefined; | |
| 952 | var ptr: fn () callconv(.@"async") i32 = undefined; | |
| 953 | 953 | ptr = func; |
| 954 | 954 | var buf: [100]u8 align(16) = undefined; |
| 955 | 955 | var result: i32 = undefined; |
| ... | ... | @@ -980,7 +980,7 @@ test "cast fn to async fn when it is inferred to be async, awaited directly" { |
| 980 | 980 | var ok = false; |
| 981 | 981 | |
| 982 | 982 | fn doTheTest() void { |
| 983 | var ptr: fn () callconv(.Async) i32 = undefined; | |
| 983 | var ptr: fn () callconv(.@"async") i32 = undefined; | |
| 984 | 984 | ptr = func; |
| 985 | 985 | var buf: [100]u8 align(16) = undefined; |
| 986 | 986 | var result: i32 = undefined; |
| ... | ... | @@ -1093,7 +1093,7 @@ test "@asyncCall with comptime-known function, but not awaited directly" { |
| 1093 | 1093 | resume global_frame; |
| 1094 | 1094 | try std.testing.expectError(error.Fail, result); |
| 1095 | 1095 | } |
| 1096 | fn middle() callconv(.Async) !void { | |
| 1096 | fn middle() callconv(.@"async") !void { | |
| 1097 | 1097 | var f = async middle2(); |
| 1098 | 1098 | return await f; |
| 1099 | 1099 | } |
| ... | ... | @@ -1133,7 +1133,7 @@ test "@asyncCall using the result location inside the frame" { |
| 1133 | 1133 | if (builtin.os.tag == .wasi) return error.SkipZigTest; // TODO |
| 1134 | 1134 | |
| 1135 | 1135 | const S = struct { |
| 1136 | fn simple2(y: *i32) callconv(.Async) i32 { | |
| 1136 | fn simple2(y: *i32) callconv(.@"async") i32 { | |
| 1137 | 1137 | defer y.* += 2; |
| 1138 | 1138 | y.* += 1; |
| 1139 | 1139 | suspend {} |
| ... | ... | @@ -1145,7 +1145,7 @@ test "@asyncCall using the result location inside the frame" { |
| 1145 | 1145 | }; |
| 1146 | 1146 | var data: i32 = 1; |
| 1147 | 1147 | const Foo = struct { |
| 1148 | bar: fn (*i32) callconv(.Async) i32, | |
| 1148 | bar: fn (*i32) callconv(.@"async") i32, | |
| 1149 | 1149 | }; |
| 1150 | 1150 | var foo = Foo{ .bar = S.simple2 }; |
| 1151 | 1151 | _ = &foo; |
| ... | ... | @@ -1271,7 +1271,7 @@ test "await used in expression and awaiting fn with no suspend but async calling |
| 1271 | 1271 | const sum = (await f1) + (await f2); |
| 1272 | 1272 | expect(sum == 10) catch @panic("test failure"); |
| 1273 | 1273 | } |
| 1274 | fn add(a: i32, b: i32) callconv(.Async) i32 { | |
| 1274 | fn add(a: i32, b: i32) callconv(.@"async") i32 { | |
| 1275 | 1275 | return a + b; |
| 1276 | 1276 | } |
| 1277 | 1277 | }; |
| ... | ... | @@ -1289,7 +1289,7 @@ test "await used in expression after a fn call" { |
| 1289 | 1289 | sum = foo() + await f1; |
| 1290 | 1290 | expect(sum == 8) catch @panic("test failure"); |
| 1291 | 1291 | } |
| 1292 | fn add(a: i32, b: i32) callconv(.Async) i32 { | |
| 1292 | fn add(a: i32, b: i32) callconv(.@"async") i32 { | |
| 1293 | 1293 | return a + b; |
| 1294 | 1294 | } |
| 1295 | 1295 | fn foo() i32 { |
| ... | ... | @@ -1309,7 +1309,7 @@ test "async fn call used in expression after a fn call" { |
| 1309 | 1309 | sum = foo() + add(3, 4); |
| 1310 | 1310 | expect(sum == 8) catch @panic("test failure"); |
| 1311 | 1311 | } |
| 1312 | fn add(a: i32, b: i32) callconv(.Async) i32 { | |
| 1312 | fn add(a: i32, b: i32) callconv(.@"async") i32 { | |
| 1313 | 1313 | return a + b; |
| 1314 | 1314 | } |
| 1315 | 1315 | fn foo() i32 { |
| ... | ... | @@ -1598,7 +1598,7 @@ test "async function call resolves target fn frame, runtime func" { |
| 1598 | 1598 | fn foo() anyerror!void { |
| 1599 | 1599 | const stack_size = 1000; |
| 1600 | 1600 | var stack_frame: [stack_size]u8 align(std.Target.stack_align) = undefined; |
| 1601 | var func: fn () callconv(.Async) anyerror!void = bar; | |
| 1601 | var func: fn () callconv(.@"async") anyerror!void = bar; | |
| 1602 | 1602 | _ = &func; |
| 1603 | 1603 | return await @asyncCall(&stack_frame, {}, func, .{}); |
| 1604 | 1604 | } |
| ... | ... | @@ -1860,7 +1860,7 @@ test "@asyncCall with pass-by-value arguments" { |
| 1860 | 1860 | pub const ST = struct { f0: usize, f1: usize }; |
| 1861 | 1861 | pub const AT = [5]u8; |
| 1862 | 1862 | |
| 1863 | pub fn f(_fill0: u64, s: ST, _fill1: u64, a: AT, _fill2: u64) callconv(.Async) void { | |
| 1863 | pub fn f(_fill0: u64, s: ST, _fill1: u64, a: AT, _fill2: u64) callconv(.@"async") void { | |
| 1864 | 1864 | _ = s; |
| 1865 | 1865 | _ = a; |
| 1866 | 1866 | // Check that the array and struct arguments passed by value don't |
| ... | ... | @@ -1893,7 +1893,7 @@ test "@asyncCall with arguments having non-standard alignment" { |
| 1893 | 1893 | const F1: u64 = 0xf00df00df00df00d; |
| 1894 | 1894 | |
| 1895 | 1895 | const S = struct { |
| 1896 | pub fn f(_fill0: u32, s: struct { x: u64 align(16) }, _fill1: u64) callconv(.Async) void { | |
| 1896 | pub fn f(_fill0: u32, s: struct { x: u64 align(16) }, _fill1: u64) callconv(.@"async") void { | |
| 1897 | 1897 | _ = s; |
| 1898 | 1898 | // The compiler inserts extra alignment for s, check that the |
| 1899 | 1899 | // generated code picks the right slot for fill1. |
test/behavior/await_struct.zig+2-2| ... | ... | @@ -21,14 +21,14 @@ test "coroutine await struct" { |
| 21 | 21 | try expect(await_final_result.x == 1234); |
| 22 | 22 | try expect(std.mem.eql(u8, &await_points, "abcdefghi")); |
| 23 | 23 | } |
| 24 | fn await_amain() callconv(.Async) void { | |
| 24 | fn await_amain() callconv(.@"async") void { | |
| 25 | 25 | await_seq('b'); |
| 26 | 26 | var p = async await_another(); |
| 27 | 27 | await_seq('e'); |
| 28 | 28 | await_final_result = await p; |
| 29 | 29 | await_seq('h'); |
| 30 | 30 | } |
| 31 | fn await_another() callconv(.Async) Foo { | |
| 31 | fn await_another() callconv(.@"async") Foo { | |
| 32 | 32 | await_seq('c'); |
| 33 | 33 | suspend { |
| 34 | 34 | await_seq('d'); |
test/c_abi/main.zig+2-2| ... | ... | @@ -5694,7 +5694,7 @@ test "Stdcall ABI big union" { |
| 5694 | 5694 | stdcall_big_union(x); |
| 5695 | 5695 | } |
| 5696 | 5696 | |
| 5697 | extern fn c_explict_win64(ByRef) callconv(.Win64) ByRef; | |
| 5697 | extern fn c_explict_win64(ByRef) callconv(.{ .x86_64_win = .{} }) ByRef; | |
| 5698 | 5698 | test "explicit SysV calling convention" { |
| 5699 | 5699 | if (builtin.cpu.arch != .x86_64) return error.SkipZigTest; |
| 5700 | 5700 | |
| ... | ... | @@ -5702,7 +5702,7 @@ test "explicit SysV calling convention" { |
| 5702 | 5702 | try expect(res.val == 42); |
| 5703 | 5703 | } |
| 5704 | 5704 | |
| 5705 | extern fn c_explict_sys_v(ByRef) callconv(.SysV) ByRef; | |
| 5705 | extern fn c_explict_sys_v(ByRef) callconv(.{ .x86_64_sysv = .{} }) ByRef; | |
| 5706 | 5706 | test "explicit Win64 calling convention" { |
| 5707 | 5707 | if (builtin.cpu.arch != .x86_64) return error.SkipZigTest; |
| 5708 | 5708 |
test/cases/compile_errors/async/async_function_depends_on_its_own_frame.zig+1-1| ... | ... | @@ -1,7 +1,7 @@ |
| 1 | 1 | export fn entry() void { |
| 2 | 2 | _ = async amain(); |
| 3 | 3 | } |
| 4 | fn amain() callconv(.Async) void { | |
| 4 | fn amain() callconv(.@"async") void { | |
| 5 | 5 | var x: [@sizeOf(@Frame(amain))]u8 = undefined; |
| 6 | 6 | _ = &x; |
| 7 | 7 | } |
test/cases/compile_errors/async/async_function_indirectly_depends_on_its_own_frame.zig+1-1| ... | ... | @@ -1,7 +1,7 @@ |
| 1 | 1 | export fn entry() void { |
| 2 | 2 | _ = async amain(); |
| 3 | 3 | } |
| 4 | fn amain() callconv(.Async) void { | |
| 4 | fn amain() callconv(.@"async") void { | |
| 5 | 5 | other(); |
| 6 | 6 | } |
| 7 | 7 | fn other() void { |
test/cases/compile_errors/async/bad_alignment_in_asynccall.zig+2-2| ... | ... | @@ -1,10 +1,10 @@ |
| 1 | 1 | export fn entry() void { |
| 2 | var ptr: fn () callconv(.Async) void = func; | |
| 2 | var ptr: fn () callconv(.@"async") void = func; | |
| 3 | 3 | var bytes: [64]u8 = undefined; |
| 4 | 4 | _ = @asyncCall(&bytes, {}, ptr, .{}); |
| 5 | 5 | _ = &ptr; |
| 6 | 6 | } |
| 7 | fn func() callconv(.Async) void {} | |
| 7 | fn func() callconv(.@"async") void {} | |
| 8 | 8 | |
| 9 | 9 | // error |
| 10 | 10 | // backend=stage1 |
test/cases/compile_errors/async/exported_async_function.zig+1-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | export fn foo() callconv(.Async) void {} | |
| 1 | export fn foo() callconv(.@"async") void {} | |
| 2 | 2 | |
| 3 | 3 | // error |
| 4 | 4 | // backend=stage1 |
test/cases/compile_errors/async/returning_error_from_void_async_function.zig+1-1| ... | ... | @@ -1,7 +1,7 @@ |
| 1 | 1 | export fn entry() void { |
| 2 | 2 | _ = async amain(); |
| 3 | 3 | } |
| 4 | fn amain() callconv(.Async) void { | |
| 4 | fn amain() callconv(.@"async") void { | |
| 5 | 5 | return error.ShouldBeCompileError; |
| 6 | 6 | } |
| 7 | 7 |
test/cases/compile_errors/async/runtime-known_async_function_called.zig+1-1| ... | ... | @@ -6,7 +6,7 @@ fn amain() void { |
| 6 | 6 | _ = ptr(); |
| 7 | 7 | _ = &ptr; |
| 8 | 8 | } |
| 9 | fn afunc() callconv(.Async) void {} | |
| 9 | fn afunc() callconv(.@"async") void {} | |
| 10 | 10 | |
| 11 | 11 | // error |
| 12 | 12 | // backend=stage1 |
test/cases/compile_errors/async/runtime-known_function_called_with_async_keyword.zig+1-1| ... | ... | @@ -4,7 +4,7 @@ export fn entry() void { |
| 4 | 4 | _ = &ptr; |
| 5 | 5 | } |
| 6 | 6 | |
| 7 | fn afunc() callconv(.Async) void {} | |
| 7 | fn afunc() callconv(.@"async") void {} | |
| 8 | 8 | |
| 9 | 9 | // error |
| 10 | 10 | // backend=stage1 |
test/cases/compile_errors/call_from_naked_func.zig+4-4| ... | ... | @@ -1,16 +1,16 @@ |
| 1 | export fn runtimeCall() callconv(.Naked) void { | |
| 1 | export fn runtimeCall() callconv(.naked) void { | |
| 2 | 2 | f(); |
| 3 | 3 | } |
| 4 | 4 | |
| 5 | export fn runtimeBuiltinCall() callconv(.Naked) void { | |
| 5 | export fn runtimeBuiltinCall() callconv(.naked) void { | |
| 6 | 6 | @call(.auto, f, .{}); |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | export fn comptimeCall() callconv(.Naked) void { | |
| 9 | export fn comptimeCall() callconv(.naked) void { | |
| 10 | 10 | comptime f(); |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | export fn comptimeBuiltinCall() callconv(.Naked) void { | |
| 13 | export fn comptimeBuiltinCall() callconv(.naked) void { | |
| 14 | 14 | @call(.compile_time, f, .{}); |
| 15 | 15 | } |
| 16 | 16 |
test/cases/compile_errors/callconv_apcs_aapcs_aapcsvfp_on_unsupported_platform.zig+2-2| ... | ... | @@ -1,5 +1,5 @@ |
| 1 | export fn entry2() callconv(.AAPCS) void {} | |
| 2 | export fn entry3() callconv(.AAPCSVFP) void {} | |
| 1 | export fn entry2() callconv(.{ .arm_aapcs = .{} }) void {} | |
| 2 | export fn entry3() callconv(.{ .arm_aapcs_vfp = .{} }) void {} | |
| 3 | 3 | |
| 4 | 4 | // error |
| 5 | 5 | // target=x86_64-linux-none |
test/cases/compile_errors/callconv_interrupt_on_unsupported_platform.zig+6-2| ... | ... | @@ -1,7 +1,11 @@ |
| 1 | export fn entry() callconv(.Interrupt) void {} | |
| 1 | export fn entry1() callconv(.{ .x86_64_interrupt = .{} }) void {} | |
| 2 | export fn entry2() callconv(.{ .x86_interrupt = .{} }) void {} | |
| 3 | export fn entry3() callconv(.avr_interrupt) void {} | |
| 2 | 4 | |
| 3 | 5 | // error |
| 4 | 6 | // backend=stage2 |
| 5 | 7 | // target=aarch64-linux-none |
| 6 | 8 | // |
| 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 @@ |
| 1 | 1 | pub inline fn instanceRequestAdapter() void {} |
| 2 | 2 | |
| 3 | 3 | pub inline fn requestAdapter( |
| 4 | comptime callbackArg: fn () callconv(.Inline) void, | |
| 4 | comptime callbackArg: fn () callconv(.@"inline") void, | |
| 5 | 5 | ) void { |
| 6 | 6 | _ = &(struct { |
| 7 | 7 | pub fn callback() callconv(.c) void { |
test/cases/compile_errors/invalid_func_for_callconv.zig+7-7| ... | ... | @@ -1,12 +1,12 @@ |
| 1 | export fn interrupt_param1(_: u32) callconv(.Interrupt) void {} | |
| 2 | export fn interrupt_param2(_: *anyopaque, _: u32) callconv(.Interrupt) void {} | |
| 3 | export fn interrupt_param3(_: *anyopaque, _: u64, _: u32) callconv(.Interrupt) void {} | |
| 4 | export fn interrupt_ret(_: *anyopaque, _: u64) callconv(.Interrupt) u32 { | |
| 1 | export fn interrupt_param1(_: u32) callconv(.{ .x86_64_interrupt = .{} }) void {} | |
| 2 | export fn interrupt_param2(_: *anyopaque, _: u32) callconv(.{ .x86_64_interrupt = .{} }) void {} | |
| 3 | export fn interrupt_param3(_: *anyopaque, _: u64, _: u32) callconv(.{ .x86_64_interrupt = .{} }) void {} | |
| 4 | export fn interrupt_ret(_: *anyopaque, _: u64) callconv(.{ .x86_64_interrupt = .{} }) u32 { | |
| 5 | 5 | return 0; |
| 6 | 6 | } |
| 7 | 7 | |
| 8 | export fn signal_param(_: u32) callconv(.Signal) void {} | |
| 9 | export fn signal_ret() callconv(.Signal) noreturn {} | |
| 8 | export fn signal_param(_: u32) callconv(.avr_signal) void {} | |
| 9 | export fn signal_ret() callconv(.avr_signal) noreturn {} | |
| 10 | 10 | |
| 11 | 11 | // error |
| 12 | 12 | // target=x86_64-linux |
| ... | ... | @@ -14,6 +14,6 @@ export fn signal_ret() callconv(.Signal) noreturn {} |
| 14 | 14 | // :1:28: error: first parameter of function with 'x86_64_interrupt' calling convention must be a pointer type |
| 15 | 15 | // :2:43: error: second parameter of function with 'x86_64_interrupt' calling convention must be a 64-bit integer |
| 16 | 16 | // :3:51: error: 'x86_64_interrupt' calling convention supports up to 2 parameters, found 3 |
| 17 | // :4:69: error: function with calling convention 'x86_64_interrupt' must return 'void' or 'noreturn' | |
| 17 | // :4:87: error: function with calling convention 'x86_64_interrupt' must return 'void' or 'noreturn' | |
| 18 | 18 | // :8:24: error: parameters are not allowed with 'avr_signal' calling convention |
| 19 | 19 | // :9:34: error: calling convention 'avr_signal' only available on architectures 'avr' |
test/cases/compile_errors/return_from_naked_function.zig+1-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | fn foo() callconv(.Naked) void { | |
| 1 | fn foo() callconv(.naked) void { | |
| 2 | 2 | return; |
| 3 | 3 | } |
| 4 | 4 |
test/cases/compile_errors/stack_usage_in_naked_function.zig+4-4| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | export fn a() callconv(.Naked) noreturn { | |
| 1 | export fn a() callconv(.naked) noreturn { | |
| 2 | 2 | var x: u32 = 10; |
| 3 | 3 | _ = &x; |
| 4 | 4 | |
| ... | ... | @@ -6,7 +6,7 @@ export fn a() callconv(.Naked) noreturn { |
| 6 | 6 | _ = y; |
| 7 | 7 | } |
| 8 | 8 | |
| 9 | export fn b() callconv(.Naked) noreturn { | |
| 9 | export fn b() callconv(.naked) noreturn { | |
| 10 | 10 | var x = @as(u32, 10); |
| 11 | 11 | _ = &x; |
| 12 | 12 | |
| ... | ... | @@ -15,7 +15,7 @@ export fn b() callconv(.Naked) noreturn { |
| 15 | 15 | _ = &z; |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | export fn c() callconv(.Naked) noreturn { | |
| 18 | export fn c() callconv(.naked) noreturn { | |
| 19 | 19 | const Foo = struct { |
| 20 | 20 | y: u32, |
| 21 | 21 | }; |
| ... | ... | @@ -24,7 +24,7 @@ export fn c() callconv(.Naked) noreturn { |
| 24 | 24 | _ = &x; |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | export fn d() callconv(.Naked) noreturn { | |
| 27 | export fn d() callconv(.naked) noreturn { | |
| 28 | 28 | const Foo = struct { |
| 29 | 29 | inline fn bar() void { |
| 30 | 30 | var x: u32 = 10; |
test/cases/compile_errors/unreachable_in_naked_func.zig+3-3| ... | ... | @@ -1,13 +1,13 @@ |
| 1 | fn runtimeSafetyDefault() callconv(.Naked) void { | |
| 1 | fn runtimeSafetyDefault() callconv(.naked) void { | |
| 2 | 2 | unreachable; |
| 3 | 3 | } |
| 4 | 4 | |
| 5 | fn runtimeSafetyOn() callconv(.Naked) void { | |
| 5 | fn runtimeSafetyOn() callconv(.naked) void { | |
| 6 | 6 | @setRuntimeSafety(true); |
| 7 | 7 | unreachable; |
| 8 | 8 | } |
| 9 | 9 | |
| 10 | fn runtimeSafetyOff() callconv(.Naked) void { | |
| 10 | fn runtimeSafetyOff() callconv(.naked) void { | |
| 11 | 11 | @setRuntimeSafety(false); |
| 12 | 12 | unreachable; |
| 13 | 13 | } |
test/cases/safety/@asyncCall with too small a frame.zig	+1-1| ... | ... | @@ -18,7 +18,7 @@ pub fn main() !void { |
| 18 | 18 | _ = &frame; |
| 19 | 19 | return error.TestFailed; |
| 20 | 20 | } |
| 21 | fn other() callconv(.Async) void { | |
| 21 | fn other() callconv(.@"async") void { | |
| 22 | 22 | suspend {} |
| 23 | 23 | } |
| 24 | 24 | // run |
test/cases/safety/error return trace across suspend points.zig	+1-1| ... | ... | @@ -26,7 +26,7 @@ fn failing() anyerror!void { |
| 26 | 26 | return second(); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | fn second() callconv(.Async) anyerror!void { | |
| 29 | fn second() callconv(.@"async") anyerror!void { | |
| 30 | 30 | return error.Fail; |
| 31 | 31 | } |
| 32 | 32 |
test/link/elf.zig+1-1| ... | ... | @@ -931,7 +931,7 @@ fn testEmitStaticLib(b: *Build, opts: Options) *Step { |
| 931 | 931 | const obj3 = addObject(b, opts, .{ |
| 932 | 932 | .name = "a_very_long_file_name_so_that_it_ends_up_in_strtab", |
| 933 | 933 | .zig_source_bytes = |
| 934 | \\fn weakFoo() callconv(.C) usize { | |
| 934 | \\fn weakFoo() callconv(.c) usize { | |
| 935 | 935 | \\ return 42; |
| 936 | 936 | \\} |
| 937 | 937 | \\export var strongBar: usize = 100; |
test/link/glibc_compat/glibc_runtime_check.zig+1-1| ... | ... | @@ -95,7 +95,7 @@ fn checkStrlcpy_v2_38() !void { |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | // atexit is part of libc_nonshared, so ensure its linked in correctly |
| 98 | fn forceExit0Callback() callconv(.C) void { | |
| 98 | fn forceExit0Callback() callconv(.c) void { | |
| 99 | 99 | std.c.exit(0); // Override the main() exit code |
| 100 | 100 | } |
| 101 | 101 |
test/link/macho.zig+3-3| ... | ... | @@ -199,7 +199,7 @@ fn testDuplicateDefinitions(b: *Build, opts: Options) *Step { |
| 199 | 199 | \\var x: usize = 1; |
| 200 | 200 | \\export fn strong() void { x += 1; } |
| 201 | 201 | \\comptime { @export(&weakImpl, .{ .name = "weak", .linkage = .weak }); } |
| 202 | \\fn weakImpl() callconv(.C) void { x += 1; } | |
| 202 | \\fn weakImpl() callconv(.c) void { x += 1; } | |
| 203 | 203 | \\extern fn weak() void; |
| 204 | 204 | \\pub fn main() void { |
| 205 | 205 | \\ weak(); |
| ... | ... | @@ -937,7 +937,7 @@ fn testLinksection(b: *Build, opts: Options) *Step { |
| 937 | 937 | |
| 938 | 938 | const obj = addObject(b, opts, .{ .name = "main", .zig_source_bytes = |
| 939 | 939 | \\export var test_global: u32 linksection("__DATA,__TestGlobal") = undefined; |
| 940 | \\export fn testFn() linksection("__TEXT,__TestFn") callconv(.C) void { | |
| 940 | \\export fn testFn() linksection("__TEXT,__TestFn") callconv(.c) void { | |
| 941 | 941 | \\ TestGenericFn("A").f(); |
| 942 | 942 | \\} |
| 943 | 943 | \\fn TestGenericFn(comptime suffix: []const u8) type { |
| ... | ... | @@ -2667,7 +2667,7 @@ fn testUnresolvedError2(b: *Build, opts: Options) *Step { |
| 2667 | 2667 | const exe = addExecutable(b, opts, .{ .name = "main", .zig_source_bytes = |
| 2668 | 2668 | \\pub fn main() !void { |
| 2669 | 2669 | \\ const msg_send_fn = @extern( |
| 2670 | \\ *const fn () callconv(.C) usize, | |
| 2670 | \\ *const fn () callconv(.c) usize, | |
| 2671 | 2671 | \\ .{ .name = "objc_msgSend$initWithContentRect:styleMask:backing:defer:screen:" }, |
| 2672 | 2672 | \\ ); |
| 2673 | 2673 | \\ _ = @call( |
test/nvptx.zig+4-4| ... | ... | @@ -15,7 +15,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { |
| 15 | 15 | \\ return a + b; |
| 16 | 16 | \\} |
| 17 | 17 | \\ |
| 18 | \\pub export fn add_and_substract(a: i32, out: *i32) callconv(.Kernel) void { | |
| 18 | \\pub export fn add_and_substract(a: i32, out: *i32) callconv(.kernel) void { | |
| 19 | 19 | \\ const x = add(a, 7); |
| 20 | 20 | \\ var y = add(2, 0); |
| 21 | 21 | \\ y -= x; |
| ... | ... | @@ -34,7 +34,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { |
| 34 | 34 | \\ ); |
| 35 | 35 | \\} |
| 36 | 36 | \\ |
| 37 | \\pub export fn special_reg(a: []const i32, out: []i32) callconv(.Kernel) void { | |
| 37 | \\pub export fn special_reg(a: []const i32, out: []i32) callconv(.kernel) void { | |
| 38 | 38 | \\ const i = threadIdX(); |
| 39 | 39 | \\ out[i] = a[i] + 7; |
| 40 | 40 | \\} |
| ... | ... | @@ -47,7 +47,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { |
| 47 | 47 | case.addCompile( |
| 48 | 48 | \\var x: i32 addrspace(.global) = 0; |
| 49 | 49 | \\ |
| 50 | \\pub export fn increment(out: *i32) callconv(.Kernel) void { | |
| 50 | \\pub export fn increment(out: *i32) callconv(.kernel) void { | |
| 51 | 51 | \\ x += 1; |
| 52 | 52 | \\ out.* = x; |
| 53 | 53 | \\} |
| ... | ... | @@ -64,7 +64,7 @@ pub fn addCases(ctx: *Cases, b: *std.Build) !void { |
| 64 | 64 | \\} |
| 65 | 65 | \\ |
| 66 | 66 | \\ var _sdata: [1024]f32 addrspace(.shared) = undefined; |
| 67 | \\ pub export fn reduceSum(d_x: []const f32, out: *f32) callconv(.Kernel) void { | |
| 67 | \\ pub export fn reduceSum(d_x: []const f32, out: *f32) callconv(.kernel) void { | |
| 68 | 68 | \\ var sdata: *addrspace(.generic) [1024]f32 = @addrSpaceCast(&_sdata); |
| 69 | 69 | \\ const tid: u32 = threadIdX(); |
| 70 | 70 | \\ var sum = d_x[tid]; |
test/src/Debugger.zig+1-1| ... | ... | @@ -677,7 +677,7 @@ pub fn addTestsForTarget(db: *Debugger, target: Target) void { |
| 677 | 677 | \\ param6: u64, |
| 678 | 678 | \\ param7: u64, |
| 679 | 679 | \\ param8: u64, |
| 680 | \\) callconv(.C) void { | |
| 680 | \\) callconv(.c) void { | |
| 681 | 681 | \\ const local_comptime_val: u64 = global_const *% global_const; |
| 682 | 682 | \\ const local_comptime_ptr: struct { u64 } = .{ local_comptime_val *% local_comptime_val }; |
| 683 | 683 | \\ const local_const: u64 = global_var ^ global_threadlocal1 ^ global_threadlocal2 ^ |
test/standalone/extern/main.zig+2-2| ... | ... | @@ -1,8 +1,8 @@ |
| 1 | 1 | const assert = @import("std").debug.assert; |
| 2 | 2 | const testing = @import("std").testing; |
| 3 | 3 | |
| 4 | const updateHidden = @extern(*const fn (u32) callconv(.C) void, .{ .name = "updateHidden" }); | |
| 5 | const getHidden = @extern(*const fn () callconv(.C) u32, .{ .name = "getHidden" }); | |
| 4 | const updateHidden = @extern(*const fn (u32) callconv(.c) void, .{ .name = "updateHidden" }); | |
| 5 | const getHidden = @extern(*const fn () callconv(.c) u32, .{ .name = "getHidden" }); | |
| 6 | 6 | |
| 7 | 7 | const T = extern struct { x: u32 }; |
| 8 | 8 |
test/standalone/install_raw_hex/main.zig+1-1| ... | ... | @@ -1,3 +1,3 @@ |
| 1 | export fn _start() callconv(.C) noreturn { | |
| 1 | export fn _start() callconv(.c) noreturn { | |
| 2 | 2 | while (true) {} |
| 3 | 3 | } |
test/standalone/issue_12706/main.zig+1-1| ... | ... | @@ -3,7 +3,7 @@ extern fn testFnPtr(n: c_int, ...) void; |
| 3 | 3 | |
| 4 | 4 | const val: c_int = 123; |
| 5 | 5 | |
| 6 | fn func(a: c_int) callconv(.C) void { | |
| 6 | fn func(a: c_int) callconv(.c) void { | |
| 7 | 7 | std.debug.assert(a == val); |
| 8 | 8 | } |
| 9 | 9 |
test/standalone/issue_8550/main.zig+1-1| ... | ... | @@ -1,4 +1,4 @@ |
| 1 | export fn main(r0: u32, r1: u32, atags: u32) callconv(.C) noreturn { | |
| 1 | export fn main(r0: u32, r1: u32, atags: u32) callconv(.c) noreturn { | |
| 2 | 2 | _ = r0; |
| 3 | 3 | _ = r1; |
| 4 | 4 | _ = atags; |
test/standalone/load_dynamic_library/main.zig+1-1| ... | ... | @@ -11,7 +11,7 @@ pub fn main() !void { |
| 11 | 11 | var lib = try std.DynLib.open(dynlib_name); |
| 12 | 12 | defer lib.close(); |
| 13 | 13 | |
| 14 | const Add = *const fn (i32, i32) callconv(.C) i32; | |
| 14 | const Add = *const fn (i32, i32) callconv(.c) i32; | |
| 15 | 15 | const addFn = lib.lookup(Add, "add") orelse return error.SymbolNotFound; |
| 16 | 16 | |
| 17 | 17 | const result = addFn(12, 34); |
test/standalone/stack_iterator/shared_lib_unwind.zig+2-2| ... | ... | @@ -23,7 +23,7 @@ noinline fn frame3(expected: *[5]usize, unwound: *[5]usize) void { |
| 23 | 23 | frame4(expected, unwound); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | fn frame2(expected: *[5]usize, unwound: *[5]usize) callconv(.C) void { | |
| 26 | fn frame2(expected: *[5]usize, unwound: *[5]usize) callconv(.c) void { | |
| 27 | 27 | expected[2] = @returnAddress(); |
| 28 | 28 | frame3(expected, unwound); |
| 29 | 29 | } |
| ... | ... | @@ -31,7 +31,7 @@ fn frame2(expected: *[5]usize, unwound: *[5]usize) callconv(.C) void { |
| 31 | 31 | extern fn frame0( |
| 32 | 32 | expected: *[5]usize, |
| 33 | 33 | unwound: *[5]usize, |
| 34 | frame_2: *const fn (expected: *[5]usize, unwound: *[5]usize) callconv(.C) void, | |
| 34 | frame_2: *const fn (expected: *[5]usize, unwound: *[5]usize) callconv(.c) void, | |
| 35 | 35 | ) void; |
| 36 | 36 | |
| 37 | 37 | pub fn main() !void { |
test/standalone/stack_iterator/unwind_freestanding.zig+1-1| ... | ... | @@ -37,7 +37,7 @@ noinline fn frame0(expected: *[4]usize, unwound: *[4]usize) void { |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | 39 | // No-OS entrypoint |
| 40 | export fn _start() callconv(.C) noreturn { | |
| 40 | export fn _start() callconv(.c) noreturn { | |
| 41 | 41 | var expected: [4]usize = undefined; |
| 42 | 42 | var unwound: [4]usize = undefined; |
| 43 | 43 | frame0(&expected, &unwound); |
tools/gen_outline_atomics.zig+1-1| ... | ... | @@ -78,7 +78,7 @@ fn writeFunction( |
| 78 | 78 | }; |
| 79 | 79 | const fn_sig = try std.fmt.allocPrint( |
| 80 | 80 | arena, |
| 81 | "fn {[name]s}() align(16) callconv(.Naked) void {{", | |
| 81 | "fn {[name]s}() align(16) callconv(.naked) void {{", | |
| 82 | 82 | .{ .name = name }, |
| 83 | 83 | ); |
| 84 | 84 | try w.writeAll(fn_sig); |
tools/lldb_pretty_printers.py+2-2| ... | ... | @@ -599,8 +599,8 @@ type_tag_handlers = { |
| 599 | 599 | 'slice_const_u8_sentinel_0': lambda payload: '[:0]const u8', |
| 600 | 600 | 'fn_noreturn_no_args': lambda payload: 'fn() noreturn', |
| 601 | 601 | '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', | |
| 604 | 604 | 'single_const_pointer_to_comptime_int': lambda payload: '*const comptime_int', |
| 605 | 605 | 'manyptr_u8': lambda payload: '[*]u8', |
| 606 | 606 | 'manyptr_const_u8': lambda payload: '[*]const u8', |