Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AArch64: Add class unload pic to class constant under ifacmp node #7206

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

Akira1Saitoh
Copy link
Contributor

Class unload pics must be added to class constants so that constants can be invalidated when they are unloaded. aconstEvaluator does add them on AArch64. However, ificmpHelper does not evaluate aconst node if the constant value can be encoded into the immediate field of the cmp instruction. This commit updates ificmpHelper to evaluate aconst node if class unload pic is required.

Related issue: eclipse-openj9/openj9#18195

@@ -155,6 +155,11 @@ static TR::Instruction *ificmpHelper(TR::Node *node, TR::ARM64ConditionCode cc,
TR::RegisterDependencyConditions *deps;
bool secondChildNeedsRelocation = cg->profiledPointersRequireRelocation() && (secondChild->getOpCodeValue() == TR::aconst) &&
(secondChild->isClassPointerConstant() || secondChild->isMethodPointerConstant());
TR_ResolvedMethod *method = comp->getCurrentMethod();
bool isSecondChildNeedsPicSite = (secondChild->getOpCodeValue() == TR::aconst) &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest changing the variable name to secondChildNeedsPicSite.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed the variable name as suggested.

Class unload pics must be added to class constants so that constants can be
invalidated when they are unloaded. aconstEvaluator does add them on AArch64.
However, ificmpHelper does not evaluate aconst node if the constant value can be
encoded into the immediate field of the cmp instruction.
This commit updates ificmpHelper to evaluate aconst node if class unload pic
is required.

Signed-off-by: Akira Saitoh <[email protected]>
@knn-k
Copy link
Contributor

knn-k commented Dec 14, 2023

Jenkins build aarch64,amac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants