| ... | ... | @@ -6070,17 +6070,15 @@ fn airAtomicRmw(f: *Function, inst: Air.Inst.Index) !CValue { |
| 6070 | 6070 | try writer.writeByte('('); |
| 6071 | 6071 | try f.writeCValue(writer, local, .Other); |
| 6072 | 6072 | try writer.writeAll(", ("); |
| 6073 | | switch (extra.op()) { |
| 6074 | | else => { |
| 6075 | | try writer.writeAll("zig_atomic("); |
| 6076 | | try f.renderType(writer, ty); |
| 6077 | | try writer.writeByte(')'); |
| 6078 | | }, |
| 6079 | | .Nand, .Min, .Max => { |
| 6080 | | // These are missing from stdatomic.h, so no atomic types for now. |
| 6081 | | try f.renderType(writer, ty); |
| 6082 | | }, |
| 6083 | | } |
| 6073 | const use_atomic = switch (extra.op()) { |
| 6074 | else => true, |
| 6075 | // These are missing from stdatomic.h, so no atomic types for now. |
| 6076 | .Nand => false, |
| 6077 | .Min, .Max => is_float, |
| 6078 | }; |
| 6079 | if (use_atomic) try writer.writeAll("zig_atomic("); |
| 6080 | try f.renderType(writer, ty); |
| 6081 | if (use_atomic) try writer.writeByte(')'); |
| 6084 | 6082 | if (ptr_ty.isVolatilePtr()) try writer.writeAll(" volatile"); |
| 6085 | 6083 | try writer.writeAll(" *)"); |
| 6086 | 6084 | try f.writeCValue(writer, ptr, .Other); |