|
39 | 39 | #include "c1/c1_Runtime1.hpp"
|
40 | 40 | #endif
|
41 | 41 |
|
42 |
| -// We use an illtrap for marking a method as not_entrant |
43 |
| -// Work around a C++ compiler bug which changes 'this' |
44 |
| -bool NativeInstruction::is_sigill_not_entrant_at(address addr) { |
45 |
| - if (!Assembler::is_illtrap(addr)) return false; |
46 |
| - CodeBlob* cb = CodeCache::find_blob(addr); |
47 |
| - if (cb == nullptr || !cb->is_nmethod()) return false; |
48 |
| - nmethod *nm = (nmethod *)cb; |
49 |
| - // This method is not_entrant iff the illtrap instruction is |
50 |
| - // located at the verified entry point. |
51 |
| - return nm->verified_entry_point() == addr; |
52 |
| -} |
53 |
| - |
54 | 42 | #ifdef ASSERT
|
55 | 43 | void NativeInstruction::verify() {
|
56 | 44 | // Make sure code pattern is actually an instruction address.
|
@@ -331,25 +319,6 @@ void NativeMovConstReg::verify() {
|
331 | 319 | }
|
332 | 320 | #endif // ASSERT
|
333 | 321 |
|
334 |
| -void NativeJump::patch_verified_entry(address entry, address verified_entry, address dest) { |
335 |
| - ResourceMark rm; |
336 |
| - int code_size = 1 * BytesPerInstWord; |
337 |
| - CodeBuffer cb(verified_entry, code_size + 1); |
338 |
| - MacroAssembler* a = new MacroAssembler(&cb); |
339 |
| -#ifdef COMPILER2 |
340 |
| - assert(dest == SharedRuntime::get_handle_wrong_method_stub(), "expected fixed destination of patch"); |
341 |
| -#endif |
342 |
| - // Patch this nmethod atomically. Always use illtrap/trap in debug build. |
343 |
| - if (DEBUG_ONLY(false &&) a->is_within_range_of_b(dest, a->pc())) { |
344 |
| - a->b(dest); |
345 |
| - } else { |
346 |
| - // The signal handler will continue at dest=OptoRuntime::handle_wrong_method_stub(). |
347 |
| - // We use an illtrap for marking a method as not_entrant. |
348 |
| - a->illtrap(); |
349 |
| - } |
350 |
| - ICache::ppc64_flush_icache_bytes(verified_entry, code_size); |
351 |
| -} |
352 |
| - |
353 | 322 | #ifdef ASSERT
|
354 | 323 | void NativeJump::verify() {
|
355 | 324 | address addr = addr_at(0);
|
@@ -462,9 +431,7 @@ bool NativeDeoptInstruction::is_deopt_at(address code_pos) {
|
462 | 431 | if (!Assembler::is_illtrap(code_pos)) return false;
|
463 | 432 | CodeBlob* cb = CodeCache::find_blob(code_pos);
|
464 | 433 | if (cb == nullptr || !cb->is_nmethod()) return false;
|
465 |
| - nmethod *nm = (nmethod *)cb; |
466 |
| - // see NativeInstruction::is_sigill_not_entrant_at() |
467 |
| - return nm->verified_entry_point() != code_pos; |
| 434 | + return true; |
468 | 435 | }
|
469 | 436 |
|
470 | 437 | // Inserts an instruction which is specified to cause a SIGILL at a given pc
|
|
0 commit comments