| ... | ... | @@ -3348,8 +3348,8 @@ fn genBodyInner(f: *Function, body: []const Air.Inst.Index) error{ AnalysisFail, |
| 3348 | 3348 | .atomic_load => try airAtomicLoad(f, inst), |
| 3349 | 3349 | .memset => try airMemset(f, inst, false), |
| 3350 | 3350 | .memset_safe => try airMemset(f, inst, true), |
| 3351 | | .memcpy => try airMemcpy(f, inst), |
| 3352 | | .memmove => try airMemmove(f, inst), |
| 3351 | .memcpy => try airMemcpy(f, inst, "memcpy("), |
| 3352 | .memmove => try airMemcpy(f, inst, "memmove("), |
| 3353 | 3353 | .set_union_tag => try airSetUnionTag(f, inst), |
| 3354 | 3354 | .get_union_tag => try airGetUnionTag(f, inst), |
| 3355 | 3355 | .clz => try airUnBuiltinCall(f, inst, air_datas[@intFromEnum(inst)].ty_op.operand, "clz", .bits), |
| ... | ... | @@ -6976,15 +6976,7 @@ fn airMemset(f: *Function, inst: Air.Inst.Index, safety: bool) !CValue { |
| 6976 | 6976 | return .none; |
| 6977 | 6977 | } |
| 6978 | 6978 | |
| 6979 | | fn airMemcpy(f: *Function, inst: Air.Inst.Index) !CValue { |
| 6980 | | return copyOp(f, inst, .memcpy); |
| 6981 | | } |
| 6982 | | |
| 6983 | | fn airMemmove(f: *Function, inst: Air.Inst.Index) !CValue { |
| 6984 | | return copyOp(f, inst, .memmove); |
| 6985 | | } |
| 6986 | | |
| 6987 | | fn copyOp(f: *Function, inst: Air.Inst.Index, op: enum { memcpy, memmove }) !CValue { |
| 6979 | fn airMemcpy(f: *Function, inst: Air.Inst.Index, function_paren: []const u8) !CValue { |
| 6988 | 6980 | const pt = f.object.dg.pt; |
| 6989 | 6981 | const zcu = pt.zcu; |
| 6990 | 6982 | const bin_op = f.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; |
| ... | ... | @@ -6999,10 +6991,6 @@ fn copyOp(f: *Function, inst: Air.Inst.Index, op: enum { memcpy, memmove }) !CVa |
| 6999 | 6991 | try writeArrayLen(f, writer, dest_ptr, dest_ty); |
| 7000 | 6992 | try writer.writeAll(" != 0) "); |
| 7001 | 6993 | } |
| 7002 | | const function_paren = switch (op) { |
| 7003 | | .memcpy => "memcpy(", |
| 7004 | | .memmove => "memmove(", |
| 7005 | | }; |
| 7006 | 6994 | try writer.writeAll(function_paren); |
| 7007 | 6995 | try writeSliceOrPtr(f, writer, dest_ptr, dest_ty); |
| 7008 | 6996 | try writer.writeAll(", "); |