| ... | ... | @@ -3433,8 +3433,13 @@ fn airPtrSliceLenPtr(func: *Func, inst: Air.Inst.Index) !void { |
| 3433 | 3433 | |
| 3434 | 3434 | fn airPtrSlicePtrPtr(func: *Func, inst: Air.Inst.Index) !void { |
| 3435 | 3435 | const ty_op = func.air.instructions.items(.data)[@intFromEnum(inst)].ty_op; |
| 3436 | | const result: MCValue = if (func.liveness.isUnused(inst)) .unreach else return func.fail("TODO implement ptr_slice_ptr_ptr for {}", .{func.target.cpu.arch}); |
| 3437 | | return func.finishAir(inst, result, .{ ty_op.operand, .none, .none }); |
| 3436 | |
| 3437 | const opt_mcv = try func.resolveInst(ty_op.operand); |
| 3438 | const dst_mcv = if (func.reuseOperand(inst, ty_op.operand, 0, opt_mcv)) |
| 3439 | opt_mcv |
| 3440 | else |
| 3441 | try func.copyToNewRegister(inst, opt_mcv); |
| 3442 | return func.finishAir(inst, dst_mcv, .{ ty_op.operand, .none, .none }); |
| 3438 | 3443 | } |
| 3439 | 3444 | |
| 3440 | 3445 | fn airSliceElemVal(func: *Func, inst: Air.Inst.Index) !void { |