Skip to content

Commit

Permalink
Merge pull request #18508 from Akira1Saitoh/AArch64FixStringHashCode
Browse files Browse the repository at this point in the history
AArch64: Fix String.hashCode() implementation
  • Loading branch information
knn-k authored Nov 22, 2023
2 parents d5e17dd + 38f5e41 commit f68b25e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions runtime/compiler/aarch64/codegen/J9TreeEvaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6097,6 +6097,12 @@ static TR::Register *inlineStringHashCode(TR::Node *node, bool isCompressed, TR:
TR_ARM64ScratchRegisterManager *srm = cg->generateScratchRegisterManager(12);
TR::Register *dataAddrReg = (arrayNode->getReferenceCount() > 1) ? srm->findOrCreateScratchRegister() : arrayReg;
TR::Register *lengthReg = (lengthNode->getReferenceCount() > 1) ? srm->findOrCreateScratchRegister() : savedLengthReg;

if (lengthNode->getReferenceCount() > 1)
{
generateMovInstruction(cg, node, lengthReg, savedLengthReg, false);
}

TR::Compilation *comp = cg->comp();
if (comp->getOptions()->enableDebugCounters())
{
Expand Down

0 comments on commit f68b25e

Please sign in to comment.