| ... | @@ -119,15 +119,6 @@ fn __atomic_compare_exchange( | ... | @@ -119,15 +119,6 @@ fn __atomic_compare_exchange( |
| 119 | return 0; | 119 | return 0; |
| 120 | } | 120 | } |
| 121 | | 121 | |
| 122 | comptime { | | |
| 123 | if (supports_atomic_ops) { | | |
| 124 | @export(__atomic_load, .{ .name = "__atomic_load", .linkage = linkage }); | | |
| 125 | @export(__atomic_store, .{ .name = "__atomic_store", .linkage = linkage }); | | |
| 126 | @export(__atomic_exchange, .{ .name = "__atomic_exchange", .linkage = linkage }); | | |
| 127 | @export(__atomic_compare_exchange, .{ .name = "__atomic_compare_exchange", .linkage = linkage }); | | |
| 128 | } | | |
| 129 | } | | |
| 130 | | | |
| 131 | // Specialized versions of the GCC atomic builtin functions. | 122 | // Specialized versions of the GCC atomic builtin functions. |
| 132 | // LLVM emits those iff the object size is known and the pointers are correctly | 123 | // LLVM emits those iff the object size is known and the pointers are correctly |
| 133 | // aligned. | 124 | // aligned. |
| ... | @@ -380,6 +371,11 @@ fn __atomic_fetch_nand_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 { | ... | @@ -380,6 +371,11 @@ fn __atomic_fetch_nand_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 { |
| 380 | | 371 | |
| 381 | comptime { | 372 | comptime { |
| 382 | if (supports_atomic_ops) { | 373 | if (supports_atomic_ops) { |
| | 374 | @export(__atomic_load, .{ .name = "__atomic_load", .linkage = linkage }); |
| | 375 | @export(__atomic_store, .{ .name = "__atomic_store", .linkage = linkage }); |
| | 376 | @export(__atomic_exchange, .{ .name = "__atomic_exchange", .linkage = linkage }); |
| | 377 | @export(__atomic_compare_exchange, .{ .name = "__atomic_compare_exchange", .linkage = linkage }); |
| | 378 | |
| 383 | @export(__atomic_fetch_add_1, .{ .name = "__atomic_fetch_add_1", .linkage = linkage }); | 379 | @export(__atomic_fetch_add_1, .{ .name = "__atomic_fetch_add_1", .linkage = linkage }); |
| 384 | @export(__atomic_fetch_add_2, .{ .name = "__atomic_fetch_add_2", .linkage = linkage }); | 380 | @export(__atomic_fetch_add_2, .{ .name = "__atomic_fetch_add_2", .linkage = linkage }); |
| 385 | @export(__atomic_fetch_add_4, .{ .name = "__atomic_fetch_add_4", .linkage = linkage }); | 381 | @export(__atomic_fetch_add_4, .{ .name = "__atomic_fetch_add_4", .linkage = linkage }); |