diff --git a/src/mir/Lowering.cpp b/src/mir/Lowering.cpp index 53c755d..a509514 100644 --- a/src/mir/Lowering.cpp +++ b/src/mir/Lowering.cpp @@ -7,7 +7,7 @@ #include "ir/IR.h" #include "utils/Log.h" -//#define DEBUG_Lower +#define DEBUG_Lower #ifdef DEBUG_Lower #include @@ -765,13 +765,13 @@ void LowerInstruction(const ir::Instruction& inst, MachineFunction& function, } // 加载当前索引到 x10 - EmitValueToReg(indices[idx_pos], PhysReg::X10, slots, block, function); + EmitValueToReg(indices[idx_pos], PhysReg::W10, slots, block, function); // 乘以步长 - block.Append(Opcode::MovImm, {Operand::Reg(PhysReg::X11), Operand::Imm(strides[i])}); - block.Append(Opcode::MulRR, {Operand::Reg(PhysReg::X10), - Operand::Reg(PhysReg::X10), - Operand::Reg(PhysReg::X11)}); + block.Append(Opcode::MovImm, {Operand::Reg(PhysReg::W11), Operand::Imm(strides[i])}); + block.Append(Opcode::MulRR, {Operand::Reg(PhysReg::W10), + Operand::Reg(PhysReg::W10), + Operand::Reg(PhysReg::W11)}); // 累加到偏移量 block.Append(Opcode::AddRR, {Operand::Reg(PhysReg::X9),