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

Read Barrier Support for Atomic CAS on X86 #3111

Merged
merged 1 commit into from
Oct 4, 2018

Conversation

0dvictor
Copy link
Contributor

@0dvictor 0dvictor commented Oct 3, 2018

Updated inlinig logic of atomic compare and swap so that a read barrier can be inserted where necessary.

Part of Issue #3054

Signed-off-by: Victor Ding dvictor@ca.ibm.com

@@ -667,7 +667,7 @@ J9::CodeGenerator::lowerTreesPreChildrenVisit(TR::Node *parent, TR::TreeTop *tre
{
// J9
//
if (self()->comp()->useCompressedPointers())
if (self()->comp()->useCompressedPointers() && !TR::Compiler->target.cpu.isX86())
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this at least deserves a comment - ultimately is the plan for this block of code to die for all code generators?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion, done.

@andrewcraik
Copy link
Contributor

Jenkins test sanity xlinux,win jdk8,jdk11

if(node->isSafeForCGToFastPathUnsafeCall())
return inlineCompareAndSwapNative(node, (TR::Compiler->target.is64Bit() && !comp->useCompressedPointers()) ? 8 : 4, true, cg);
if (UseOldCompareAndSwapObject)
Copy link
Contributor

Choose a reason for hiding this comment

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

these two if blocks need {}s

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

Updated inlinig logic of atomic compare and swap so that a read barrier can be
inserted where necessary.

Signed-off-by: Victor Ding <dvictor@ca.ibm.com>
@andrewcraik
Copy link
Contributor

Jenkins test sanity xlinux,win jdk8,jdk11

Copy link
Contributor

@andrewcraik andrewcraik left a comment

Choose a reason for hiding this comment

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

LGTM

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

Successfully merging this pull request may close these issues.

3 participants