< prev index next >

src/hotspot/cpu/ppc/interp_masm_ppc_64.cpp

Print this page
rev 56646 : 8231757: [ppc] Fix VerifyOops. Errors show since 8231058.
Summary: Also make the checks print the wrong value and where a failure occurred.


2296   lwz(backedge_count, be_counter_offset, Rcounters); // is unsigned int
2297   // Mask the backedge counter.
2298   andi(backedge_count, backedge_count, InvocationCounter::count_mask_value);
2299 
2300   // Load the invocation counter.
2301   lwz(invocation_count, inv_counter_offset, Rcounters); // is unsigned int
2302   // Add the delta to the invocation counter and store the result.
2303   addi(invocation_count, invocation_count, delta);
2304   // Store value.
2305   stw(invocation_count, inv_counter_offset, Rcounters);
2306 
2307   // Add invocation counter + backedge counter.
2308   add(iv_be_count, backedge_count, invocation_count);
2309 
2310   // Note that this macro must leave the backedge_count + invocation_count in
2311   // register iv_be_count!
2312   BLOCK_COMMENT("} Increment profiling counters");
2313 }
2314 
2315 void InterpreterMacroAssembler::verify_oop(Register reg, TosState state) {
2316   if (state == atos) { MacroAssembler::verify_oop(reg); }
2317 }
2318 
2319 // Local helper function for the verify_oop_or_return_address macro.
2320 static bool verify_return_address(Method* m, int bci) {
2321 #ifndef PRODUCT
2322   address pc = (address)(m->constMethod()) + in_bytes(ConstMethod::codes_offset()) + bci;
2323   // Assume it is a valid return address if it is inside m and is preceded by a jsr.
2324   if (!m->contains(pc))                                            return false;
2325   address jsr_pc;
2326   jsr_pc = pc - Bytecodes::length_for(Bytecodes::_jsr);
2327   if (*jsr_pc == Bytecodes::_jsr   && jsr_pc >= m->code_base())    return true;
2328   jsr_pc = pc - Bytecodes::length_for(Bytecodes::_jsr_w);
2329   if (*jsr_pc == Bytecodes::_jsr_w && jsr_pc >= m->code_base())    return true;
2330 #endif // PRODUCT
2331   return false;
2332 }
2333 
2334 void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) {
2335   if (VerifyFPU) {
2336     unimplemented("verfiyFPU");




2296   lwz(backedge_count, be_counter_offset, Rcounters); // is unsigned int
2297   // Mask the backedge counter.
2298   andi(backedge_count, backedge_count, InvocationCounter::count_mask_value);
2299 
2300   // Load the invocation counter.
2301   lwz(invocation_count, inv_counter_offset, Rcounters); // is unsigned int
2302   // Add the delta to the invocation counter and store the result.
2303   addi(invocation_count, invocation_count, delta);
2304   // Store value.
2305   stw(invocation_count, inv_counter_offset, Rcounters);
2306 
2307   // Add invocation counter + backedge counter.
2308   add(iv_be_count, backedge_count, invocation_count);
2309 
2310   // Note that this macro must leave the backedge_count + invocation_count in
2311   // register iv_be_count!
2312   BLOCK_COMMENT("} Increment profiling counters");
2313 }
2314 
2315 void InterpreterMacroAssembler::verify_oop(Register reg, TosState state) {
2316   if (state == atos) { MacroAssembler::verify_oop(reg, FILE_AND_LINE); }
2317 }
2318 
2319 // Local helper function for the verify_oop_or_return_address macro.
2320 static bool verify_return_address(Method* m, int bci) {
2321 #ifndef PRODUCT
2322   address pc = (address)(m->constMethod()) + in_bytes(ConstMethod::codes_offset()) + bci;
2323   // Assume it is a valid return address if it is inside m and is preceded by a jsr.
2324   if (!m->contains(pc))                                            return false;
2325   address jsr_pc;
2326   jsr_pc = pc - Bytecodes::length_for(Bytecodes::_jsr);
2327   if (*jsr_pc == Bytecodes::_jsr   && jsr_pc >= m->code_base())    return true;
2328   jsr_pc = pc - Bytecodes::length_for(Bytecodes::_jsr_w);
2329   if (*jsr_pc == Bytecodes::_jsr_w && jsr_pc >= m->code_base())    return true;
2330 #endif // PRODUCT
2331   return false;
2332 }
2333 
2334 void InterpreterMacroAssembler::verify_FPU(int stack_depth, TosState state) {
2335   if (VerifyFPU) {
2336     unimplemented("verfiyFPU");


< prev index next >