< prev index next >

src/hotspot/cpu/x86/c1_Runtime1_x86.cpp

Print this page

  71   // push java thread (becomes first argument of C function)
  72   get_thread(thread);
  73   push(thread);
  74 #endif // _LP64
  75 
  76   int call_offset = -1;
  77   if (!align_stack) {
  78     set_last_Java_frame(thread, noreg, rbp, NULL);
  79   } else {
  80     address the_pc = pc();
  81     call_offset = offset();
  82     set_last_Java_frame(thread, noreg, rbp, the_pc);
  83     andptr(rsp, -(StackAlignmentInBytes));    // Align stack
  84   }
  85 
  86   // do the call
  87   call(RuntimeAddress(entry));
  88   if (!align_stack) {
  89     call_offset = offset();
  90   }


  91   // verify callee-saved register
  92 #ifdef ASSERT
  93   guarantee(thread != rax, "change this code");
  94   push(rax);
  95   { Label L;
  96     get_thread(rax);
  97     cmpptr(thread, rax);
  98     jcc(Assembler::equal, L);
  99     int3();
 100     stop("StubAssembler::call_RT: rdi not callee saved?");
 101     bind(L);
 102   }
 103   pop(rax);
 104 #endif
 105   reset_last_Java_frame(thread, true);
 106 
 107   // discard thread and arguments
 108   NOT_LP64(addptr(rsp, num_rt_args()*BytesPerWord));
 109 
 110   // check for pending exceptions

  71   // push java thread (becomes first argument of C function)
  72   get_thread(thread);
  73   push(thread);
  74 #endif // _LP64
  75 
  76   int call_offset = -1;
  77   if (!align_stack) {
  78     set_last_Java_frame(thread, noreg, rbp, NULL);
  79   } else {
  80     address the_pc = pc();
  81     call_offset = offset();
  82     set_last_Java_frame(thread, noreg, rbp, the_pc);
  83     andptr(rsp, -(StackAlignmentInBytes));    // Align stack
  84   }
  85 
  86   // do the call
  87   call(RuntimeAddress(entry));
  88   if (!align_stack) {
  89     call_offset = offset();
  90   }
  91   oopmap_metadata(NULL);
  92 
  93   // verify callee-saved register
  94 #ifdef ASSERT
  95   guarantee(thread != rax, "change this code");
  96   push(rax);
  97   { Label L;
  98     get_thread(rax);
  99     cmpptr(thread, rax);
 100     jcc(Assembler::equal, L);
 101     int3();
 102     stop("StubAssembler::call_RT: rdi not callee saved?");
 103     bind(L);
 104   }
 105   pop(rax);
 106 #endif
 107   reset_last_Java_frame(thread, true);
 108 
 109   // discard thread and arguments
 110   NOT_LP64(addptr(rsp, num_rt_args()*BytesPerWord));
 111 
 112   // check for pending exceptions
< prev index next >