From 637fe28e9094425afd830eb5fe984bcf532d5e4a Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 21 Feb 2023 15:41:41 +0300 Subject: [PATCH] Add comments --- ir_aarch64.dasc | 3 +++ ir_x86.dasc | 3 +++ 2 files changed, 6 insertions(+) diff --git a/ir_aarch64.dasc b/ir_aarch64.dasc index ef41841..9cf9f7d 100644 --- a/ir_aarch64.dasc +++ b/ir_aarch64.dasc @@ -3158,6 +3158,9 @@ static void ir_emit_rload(ir_ctx *ctx, ir_ref def, ir_insn *insn) ir_reg def_reg = IR_REG_NUM(ctx->regs[def][0]); if (def_reg == IR_REG_NONE) { + /* op3 is used as a flag that the value is already stored in memory. + * If op3 is set we don't have to store the value once again (in case of spilling) + */ if (!insn->op3) { ir_emit_store(ctx, type, def, src_reg); } diff --git a/ir_x86.dasc b/ir_x86.dasc index 30794d7..b8c0d3d 100644 --- a/ir_x86.dasc +++ b/ir_x86.dasc @@ -5354,6 +5354,9 @@ static void ir_emit_rload(ir_ctx *ctx, ir_ref def, ir_insn *insn) ir_reg def_reg = IR_REG_NUM(ctx->regs[def][0]); if (def_reg == IR_REG_NONE) { + /* op3 is used as a flag that the value is already stored in memory. + * If op3 is set we don't have to store the value once again (in case of spilling) + */ if (!insn->op3) { ir_emit_store(ctx, type, def, src_reg); }