< prev index next >
src/cpu/arm/vm/sharedRuntime_arm.cpp
Print this page
rev 12692 : 8176100: [REDO][REDO] G1 Needs pre barrier on dereference of weak JNI handles
Reviewed-by:
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -1730,33 +1730,27 @@
case T_LONG : // fall through
case T_VOID : // fall through
case T_FLOAT : // fall through
case T_DOUBLE : /* nothing to do */ break;
case T_OBJECT : // fall through
- case T_ARRAY : {
- Label L;
- __ cbz(R0, L);
- __ ldr(R0, Address(R0));
- __ verify_oop(R0);
- __ bind(L);
- break;
- }
+ case T_ARRAY : break; // See JNIHandles::resolve below
default:
ShouldNotReachHere();
}
#else
__ str_32(Rtemp, Address(LR, JNIHandleBlock::top_offset_in_bytes()));
if (CheckJNICalls) {
__ str(__ zero_register(Rtemp), Address(Rthread, JavaThread::pending_jni_exception_check_fn_offset()));
}
+#endif // AARCH64
- // Unhandle the result
+ // Unbox oop result, e.g. JNIHandles::resolve value in R0.
if (ret_type == T_OBJECT || ret_type == T_ARRAY) {
- __ cmp(R0, 0);
- __ ldr(R0, Address(R0), ne);
+ __ resolve_jobject(R0, // value
+ Rtemp, // tmp1
+ R1_tmp); // tmp2
}
-#endif // AARCH64
// Any exception pending?
__ ldr(Rtemp, Address(Rthread, Thread::pending_exception_offset()));
__ mov(SP, FP);
< prev index next >