diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-01-18 10:47:02 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-01-18 10:47:02 -0700 |
| commit | f423b5949b8722d4b290f57c3d06d015e39217b0 (patch) | |
| tree | 8c9d05573e1d595c311e99643ffd68cce75aa92f /src/codegen/c.zig | |
| parent | 4938fb8f5ca9551b69036fdb644103ffc9ef49cf (diff) | |
| download | zig-f423b5949b8722d4b290f57c3d06d015e39217b0.tar.gz zig-f423b5949b8722d4b290f57c3d06d015e39217b0.zip | |
Revert "stage2: implement `@prefetch`"
This reverts commit d48e4245b68bf25c7f41804a5012ac157a5ee546.
I have no idea why this is failing Drone CI, but in a branch, reverting
this commit solved the problem.
Diffstat (limited to 'src/codegen/c.zig')
| -rw-r--r-- | src/codegen/c.zig | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/codegen/c.zig b/src/codegen/c.zig index 77e571bc21..3f3147ca80 100644 --- a/src/codegen/c.zig +++ b/src/codegen/c.zig @@ -1278,7 +1278,6 @@ fn genBody(f: *Function, body: []const Air.Inst.Index) error{ AnalysisFail, OutO .error_name => try airErrorName(f, inst), .splat => try airSplat(f, inst), .vector_init => try airVectorInit(f, inst), - .prefetch => try airPrefetch(f, inst), .int_to_float, .float_to_int, @@ -3090,18 +3089,6 @@ fn airVectorInit(f: *Function, inst: Air.Inst.Index) !CValue { return f.fail("TODO: C backend: implement airVectorInit", .{}); } -fn airPrefetch(f: *Function, inst: Air.Inst.Index) !CValue { - const prefetch = f.air.instructions.items(.data)[inst].prefetch; - const ptr = try f.resolveInst(prefetch.ptr); - const writer = f.object.writer(); - try writer.writeAll("zig_prefetch("); - try f.writeCValue(writer, ptr); - try writer.print(", {d}, {d});\n", .{ - @enumToInt(prefetch.rw), prefetch.locality, - }); - return CValue.none; -} - fn toMemoryOrder(order: std.builtin.AtomicOrder) [:0]const u8 { return switch (order) { .Unordered => "memory_order_relaxed", |
