# HG changeset patch # User aph # Date 1339165537 14400 # Node ID 07db9a656deaf199085beb7e4a2da9066eb4a4bd # Parent 49d7e3c4783a1d10bd59f9cdbf96a1a25cd788ff Fix call to handle_special_method(). Fix compareAndSwapLong. 2012-06-08 Andrew Haley * 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. diff -r 49d7e3c4783a -r 07db9a656dea src/cpu/zero/vm/thumb2.cpp --- 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();