From 336d00e69de9f155d37d7c8e2be348f91cb619ef Mon Sep 17 00:00:00 2001 From: Feng Ye Date: Mon, 15 Mar 2021 15:08:38 -0700 Subject: [PATCH] Special reg needed in spilling operand in GA --- src/mapleall/maple_be/src/cg/aarch64/aarch64_color_ra.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mapleall/maple_be/src/cg/aarch64/aarch64_color_ra.cpp b/src/mapleall/maple_be/src/cg/aarch64/aarch64_color_ra.cpp index 3a1b73bc66..e1dc165c6a 100644 --- a/src/mapleall/maple_be/src/cg/aarch64/aarch64_color_ra.cpp +++ b/src/mapleall/maple_be/src/cg/aarch64/aarch64_color_ra.cpp @@ -2465,7 +2465,7 @@ void GraphColorRegAllocator::SpillOperandForSpillPre(Insn &insn, const Operand & } if (a64CGFunc->IsImmediateOffsetOutOfRange(*static_cast(spillMem), k64)) { - regno_t pregNO = phyOpnd.GetRegisterNumber(); + regno_t pregNO = R17; spillMem = &a64CGFunc->SplitOffsetWithAddInstruction(*static_cast(spillMem), k64, static_cast(pregNO), false, &insn); } @@ -2500,7 +2500,7 @@ void GraphColorRegAllocator::SpillOperandForSpillPost(Insn &insn, const Operand bool isOutOfRange = false; if (a64CGFunc->IsImmediateOffsetOutOfRange(*static_cast(spillMem), k64)) { - regno_t pregNO = phyOpnd.GetRegisterNumber(); + regno_t pregNO = R17; spillMem = &a64CGFunc->SplitOffsetWithAddInstruction(*static_cast(spillMem), k64, static_cast(pregNO), true, &insn); isOutOfRange = true; -- Gitee