1147 __ ld_ptr( constMethod, RconstMethod );
1148 __ lduh( size_of_locals, O2 );
1149 __ lduh( size_of_parameters, O1 );
1150 __ sll( O2, LogBytesPerWord, O2);
1151 __ sll( O1, LogBytesPerWord, O1 );
1152 __ ld_ptr(XXX_STATE(_locals), L2_scratch);
1153 __ sub( L2_scratch, O2, O2 );
1154 __ sub( L2_scratch, O1, O1 );
1155
1156 __ bind( clear_loop );
1157 __ inc( O2, wordSize );
1158
1159 __ cmp( O2, O1 );
1160 __ br( Assembler::lessEqualUnsigned, true, Assembler::pt, clear_loop );
1161 __ delayed()->st_ptr( init_value, O2, 0 );
1162 }
1163 }
1164 }
1165 // Find preallocated monitor and lock method (C++ interpreter)
1166 //
1167 void InterpreterGenerator::lock_method(void) {
1168 // Lock the current method.
1169 // Destroys registers L2_scratch, L3_scratch, O0
1170 //
1171 // Find everything relative to Lstate
1172
1173 #ifdef ASSERT
1174 __ ld_ptr(STATE(_method), L2_scratch);
1175 __ ld(L2_scratch, in_bytes(Method::access_flags_offset()), O0);
1176
1177 { Label ok;
1178 __ btst(JVM_ACC_SYNCHRONIZED, O0);
1179 __ br( Assembler::notZero, false, Assembler::pt, ok);
1180 __ delayed()->nop();
1181 __ stop("method doesn't need synchronization");
1182 __ bind(ok);
1183 }
1184 #endif // ASSERT
1185
1186 // monitor is already allocated at stack base
1187 // and the lockee is already present
|
1147 __ ld_ptr( constMethod, RconstMethod );
1148 __ lduh( size_of_locals, O2 );
1149 __ lduh( size_of_parameters, O1 );
1150 __ sll( O2, LogBytesPerWord, O2);
1151 __ sll( O1, LogBytesPerWord, O1 );
1152 __ ld_ptr(XXX_STATE(_locals), L2_scratch);
1153 __ sub( L2_scratch, O2, O2 );
1154 __ sub( L2_scratch, O1, O1 );
1155
1156 __ bind( clear_loop );
1157 __ inc( O2, wordSize );
1158
1159 __ cmp( O2, O1 );
1160 __ br( Assembler::lessEqualUnsigned, true, Assembler::pt, clear_loop );
1161 __ delayed()->st_ptr( init_value, O2, 0 );
1162 }
1163 }
1164 }
1165 // Find preallocated monitor and lock method (C++ interpreter)
1166 //
1167 void CppInterpreterGenerator::lock_method() {
1168 // Lock the current method.
1169 // Destroys registers L2_scratch, L3_scratch, O0
1170 //
1171 // Find everything relative to Lstate
1172
1173 #ifdef ASSERT
1174 __ ld_ptr(STATE(_method), L2_scratch);
1175 __ ld(L2_scratch, in_bytes(Method::access_flags_offset()), O0);
1176
1177 { Label ok;
1178 __ btst(JVM_ACC_SYNCHRONIZED, O0);
1179 __ br( Assembler::notZero, false, Assembler::pt, ok);
1180 __ delayed()->nop();
1181 __ stop("method doesn't need synchronization");
1182 __ bind(ok);
1183 }
1184 #endif // ASSERT
1185
1186 // monitor is already allocated at stack base
1187 // and the lockee is already present
|