Skip to content

Commit

Permalink
Merge pull request #5208 from Akira1Saitoh/aarch64RegisterBitMask
Browse files Browse the repository at this point in the history
AArch64: Make registerBitMask function available to outside of code generator
  • Loading branch information
knn-k authored May 19, 2020
2 parents 656748a + c0d6ebf commit ee8a991
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 3 additions & 2 deletions compiler/aarch64/codegen/OMRCodeGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,8 @@ TR::Register *OMR::ARM64::CodeGenerator::gprClobberEvaluate(TR::Node *node)
}
}

static uint32_t registerBitMask(int32_t reg)
uint32_t
OMR::ARM64::CodeGenerator::registerBitMask(int32_t reg)
{
return 1 << (reg-1);
}
Expand Down Expand Up @@ -446,7 +447,7 @@ void OMR::ARM64::CodeGenerator::buildRegisterMapForInstruction(TR_GCStackMap *ma
atlas->addPinningArrayPtrForInternalPtrReg(virtReg->getPinningArrayPointer());
}
else if (virtReg->containsCollectedReference())
map->setRegisterBits(registerBitMask(i));
map->setRegisterBits(self()->registerBitMask(i));
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions compiler/aarch64/codegen/OMRCodeGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,14 @@ class OMR_EXTENSIBLE CodeGenerator : public OMR::CodeGenerator
*/
TR::Instruction *generateNop(TR::Node *node, TR::Instruction *preced = 0);

/**
* @brief Returns bit mask for real register
* @param[in] reg: real register number
*
* @return bit mask for real register
*/
static uint32_t registerBitMask(int32_t reg);

private:

enum // flags
Expand Down

0 comments on commit ee8a991

Please sign in to comment.