RFR: 8166188: G1 Needs pre barrier on dereference of weak JNI handles

Kim Barrett kim.barrett at oracle.com
Wed Feb 8 03:02:31 UTC 2017


> On Feb 7, 2017, at 6:56 PM, dean.long at oracle.com wrote:
> 
> Hi Kim.  I took a look at the sharedRuntime_<arch> and templateInterpreterGenerator_<arch> for arm, sparc, and x86.
> 
> In sharedRuntime_arm.cpp, I suggest simplifying:
> 
> 1750 #ifdef AARCH64
> 1751     __ cbz(R0, done);                      // Use NULL as-is.
> 1752     STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u);
> 1753     __ tbz(R0, 0, not_weak);               // Test for jweak tag.
> 1754 #else // !AARCH64
> 
> 1755     __ cmp(R0, 0);
> 
> 1756     __ b(done, eq);                        // Use NULL as-is.
> 1757     __ tst(R0, JNIHandles::weak_tag_mask); // Test for jweak tag.
> 1758     __ b(not_weak, eq);
> 1759 #endif // !AARCH64
> to the equivalent:
> 
> 1751     __ cbz(R0, done);                      // Use NULL as-is.
> 1752     STATIC_ASSERT(JNIHandles::weak_tag_mask == 1u);
> 1753     __ tbz(R0, 0, not_weak);               // Test for jweak tag.
> as cbz and tbz expand to cmp/b and tst/b on arm32.  The others look good.

Nice!  That will make it much more readable.  Thanks.



More information about the ppc-aix-port-dev mailing list