-
Notifications
You must be signed in to change notification settings - Fork 738
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
Conversation
2c6b6d3
to
49540a1
Compare
@@ -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()) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion, done.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>
Jenkins test sanity xlinux,win jdk8,jdk11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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