changeset 2960:07db9a656dea

Fix call to handle_special_method(). Fix compareAndSwapLong. 2012-06-08 Andrew Haley <aph@redhat.com> * thumb2.cpp (Thumb2_codegen): Move call to handle_special_method() outside test. (handle_special_method: _compareAndSwapLong): Save/restore all locals, not just locals of ref type.
author aph
date Fri, 08 Jun 2012 10:25:37 -0400
parents 49d7e3c4783a
children 2eed594c7cdb
files src/cpu/zero/vm/thumb2.cpp
diffstat 1 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/zero/vm/thumb2.cpp	Fri Jun 08 09:11:52 2012 -0400
+++ b/src/cpu/zero/vm/thumb2.cpp	Fri Jun 08 10:25:37 2012 -0400
@@ -5000,7 +5000,7 @@
       unsigned expect_hi = POP(jstack);
 
       Thumb2_Flush(jinfo);
-      Thumb2_save_local_refs(jinfo, stackdepth - 4); // 4 args popped above
+      Thumb2_save_all_locals(jinfo, stackdepth - 4); // 4 args popped above
 
       // instance of java.lang.Unsafe:
       ldr_imm(jinfo->codebuf, ARM_LR, Rstack, 3 * wordSize, 1, 0);
@@ -5033,7 +5033,7 @@
       mov_imm(codebuf, result, 1);
       fullBarrier(codebuf);
 
-      Thumb2_restore_local_refs(jinfo, stackdepth - 4); // 4 args popped above
+      Thumb2_restore_all_locals(jinfo, stackdepth - 4); // 4 args popped above
       add_imm(codebuf, Rstack, Rstack, 4 * wordSize);
       PUSH(jstack, result);
     }
@@ -6145,11 +6145,13 @@
 	}
 
 	callee = opcode == opc_invokevirtual ? (methodOop)cache->f2() : (methodOop)cache->f1();
-	if ((opcode != opc_invokevirtual || cache->is_vfinal()) && callee->is_accessor()) {
-
+
+	if (opcode != opc_invokevirtual || cache->is_vfinal()) {
 	  if (handle_special_method(callee, jinfo, stackdepth))
 	    break;
-
+	}
+
+	if ((opcode != opc_invokevirtual || cache->is_vfinal()) && callee->is_accessor()) {
 	  u1 *code = callee->code_base();
 	  int index = GET_NATIVE_U2(&code[2]);
 	  constantPoolCacheOop callee_cache = callee->constants()->cache();