From f8dcb22b18f0b3aa47e3eb7a41c290d25fe6ab79 Mon Sep 17 00:00:00 2001 From: Akira Saitoh Date: Wed, 2 Sep 2020 23:20:31 +0900 Subject: [PATCH] AArch64: Use a method to kill temporary registers in register dependencies This commit changes JNI Linkage and Private Linkage classes to use `stopUsingDepRegs` helper method to properly kill temporary registers added to register dependencies. Signed-off-by: Akira Saitoh --- runtime/compiler/aarch64/codegen/ARM64JNILinkage.cpp | 2 ++ runtime/compiler/aarch64/codegen/ARM64PrivateLinkage.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/runtime/compiler/aarch64/codegen/ARM64JNILinkage.cpp b/runtime/compiler/aarch64/codegen/ARM64JNILinkage.cpp index 922b0ff6be0..1314c6cc046 100644 --- a/runtime/compiler/aarch64/codegen/ARM64JNILinkage.cpp +++ b/runtime/compiler/aarch64/codegen/ARM64JNILinkage.cpp @@ -946,5 +946,7 @@ TR::Register *J9::ARM64::JNILinkage::buildDirectDispatch(TR::Node *callNode) generateLabelInstruction(cg(), TR::InstOpCode::label, callNode, depLabel, postLabelDeps); callNode->setRegister(returnRegister); + + deps->stopUsingDepRegs(cg(), returnRegister); return returnRegister; } diff --git a/runtime/compiler/aarch64/codegen/ARM64PrivateLinkage.cpp b/runtime/compiler/aarch64/codegen/ARM64PrivateLinkage.cpp index e58abfe1ce1..54b5e24705c 100644 --- a/runtime/compiler/aarch64/codegen/ARM64PrivateLinkage.cpp +++ b/runtime/compiler/aarch64/codegen/ARM64PrivateLinkage.cpp @@ -1242,6 +1242,8 @@ TR::Register *J9::ARM64::PrivateLinkage::buildDirectDispatch(TR::Node *callNode) } callNode->setRegister(retReg); + + dependencies->stopUsingDepRegs(cg(), retReg); return retReg; } @@ -1439,6 +1441,8 @@ TR::Register *J9::ARM64::PrivateLinkage::buildIndirectDispatch(TR::Node *callNod } callNode->setRegister(retReg); + + dependencies->stopUsingDepRegs(cg(), retReg); return retReg; }