< prev index next >

src/hotspot/cpu/x86/c1_Runtime1_x86.cpp

Print this page
@@ -204,32 +204,34 @@
  // Implementation of StubFrame
  
  class StubFrame: public StackObj {
   private:
    StubAssembler* _sasm;
+   bool _use_pop_on_epilog;
  
   public:
-   StubFrame(StubAssembler* sasm, const char* name, bool must_gc_arguments);
+   StubFrame(StubAssembler* sasm, const char* name, bool must_gc_arguments, bool use_pop_on_epilog = false);
    void load_argument(int offset_in_words, Register reg);
  
    ~StubFrame();
  };
  
  void StubAssembler::prologue(const char* name, bool must_gc_arguments) {
    set_info(name, must_gc_arguments);
    enter();
  }
  
- void StubAssembler::epilogue() {
-   leave();
+ void StubAssembler::epilogue(bool use_pop) {
+   use_pop ? pop(rbp) : leave();
    ret(0);
  }
  
  #define __ _sasm->
  
- StubFrame::StubFrame(StubAssembler* sasm, const char* name, bool must_gc_arguments) {
+ StubFrame::StubFrame(StubAssembler* sasm, const char* name, bool must_gc_arguments, bool use_pop_on_epilog) {
    _sasm = sasm;
+   _use_pop_on_epilog = use_pop_on_epilog;
    __ prologue(name, must_gc_arguments);
  }
  
  // load parameters that were stored with LIR_Assembler::store_parameter
  // Note: offsets for store_parameter and load_argument must match

@@ -237,11 +239,11 @@
    __ load_parameter(offset_in_words, reg);
  }
  
  
  StubFrame::~StubFrame() {
-   __ epilogue();
+   __ epilogue(_use_pop_on_epilog);
  }
  
  #undef __
  
  

@@ -620,10 +622,13 @@
  
  void Runtime1::initialize_pd() {
    // nothing to do
  }
  
+ uint Runtime1::runtime_blob_current_thread_offset(frame f) {
+   return r15_off / 2;
+ }
  
  // Target: the entry point of the method that creates and posts the exception oop.
  // has_argument: true if the exception needs arguments (passed on the stack because
  //               registers must be preserved).
  OopMapSet* Runtime1::generate_exception_throw(StubAssembler* sasm, address target, bool has_argument) {

@@ -1297,11 +1302,11 @@
      case monitorenter_nofpu_id:
        save_fpu_registers = false;
        // fall through
      case monitorenter_id:
        {
-         StubFrame f(sasm, "monitorenter", dont_gc_arguments);
+         StubFrame f(sasm, "monitorenter", dont_gc_arguments, true /* use_pop_on_epilog */);
          OopMap* map = save_live_registers(sasm, 3, save_fpu_registers);
  
          // Called with store_parameter and not C abi
  
          f.load_argument(1, rax); // rax,: object
< prev index next >