< prev index next >

src/hotspot/cpu/x86/stubGenerator_x86_64.hpp

Print this page

492   // Continuation point for throwing of implicit exceptions that are
493   // not handled in the current activation. Fabricates an exception
494   // oop and initiates normal exception dispatching in this
495   // frame. Since we need to preserve callee-saved values (currently
496   // only for C2, but done for C1 as well) we need a callee-saved oop
497   // map and therefore have to make these stubs into RuntimeStubs
498   // rather than BufferBlobs.  If the compiler needs all registers to
499   // be preserved between the fault point and the exception handler
500   // then it must assume responsibility for that in
501   // AbstractCompiler::continuation_for_implicit_null_exception or
502   // continuation_for_implicit_division_by_zero_exception. All other
503   // implicit exceptions (e.g., NullPointerException or
504   // AbstractMethodError on entry) are either at call sites or
505   // otherwise assume that stack unwinding will be initiated, so
506   // caller saved registers were assumed volatile in the compiler.
507   address generate_throw_exception(const char* name,
508                                    address runtime_entry,
509                                    Register arg1 = noreg,
510                                    Register arg2 = noreg);
511 



512   void create_control_words();
513 
514   // Initialization
515   void generate_initial();
516   void generate_phase1();
517   void generate_all();
518 
519  public:
520   StubGenerator(CodeBuffer* code, int phase) : StubCodeGenerator(code) {
521     DEBUG_ONLY( _regs_in_thread = false; )
522     if (phase == 0) {
523       generate_initial();
524     } else if (phase == 1) {
525       generate_phase1(); // stubs that must be available for the interpreter
526     } else {
527       generate_all();
528     }
529   }
530 };
531 

492   // Continuation point for throwing of implicit exceptions that are
493   // not handled in the current activation. Fabricates an exception
494   // oop and initiates normal exception dispatching in this
495   // frame. Since we need to preserve callee-saved values (currently
496   // only for C2, but done for C1 as well) we need a callee-saved oop
497   // map and therefore have to make these stubs into RuntimeStubs
498   // rather than BufferBlobs.  If the compiler needs all registers to
499   // be preserved between the fault point and the exception handler
500   // then it must assume responsibility for that in
501   // AbstractCompiler::continuation_for_implicit_null_exception or
502   // continuation_for_implicit_division_by_zero_exception. All other
503   // implicit exceptions (e.g., NullPointerException or
504   // AbstractMethodError on entry) are either at call sites or
505   // otherwise assume that stack unwinding will be initiated, so
506   // caller saved registers were assumed volatile in the compiler.
507   address generate_throw_exception(const char* name,
508                                    address runtime_entry,
509                                    Register arg1 = noreg,
510                                    Register arg2 = noreg);
511 
512   // interpreter or compiled code marshalling registers to/from inline type instance
513   address generate_return_value_stub(address destination, const char* name, bool has_res);
514 
515   void create_control_words();
516 
517   // Initialization
518   void generate_initial();
519   void generate_phase1();
520   void generate_all();
521 
522  public:
523   StubGenerator(CodeBuffer* code, int phase) : StubCodeGenerator(code) {
524     DEBUG_ONLY( _regs_in_thread = false; )
525     if (phase == 0) {
526       generate_initial();
527     } else if (phase == 1) {
528       generate_phase1(); // stubs that must be available for the interpreter
529     } else {
530       generate_all();
531     }
532   }
533 };
534 
< prev index next >