src/cpu/x86/vm/templateInterpreter_x86_64.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7118863 Sdiff src/cpu/x86/vm

src/cpu/x86/vm/templateInterpreter_x86_64.cpp

Print this page




 488   // synchronize method
 489   const Address access_flags(rbx, methodOopDesc::access_flags_offset());
 490   const Address monitor_block_top(
 491         rbp,
 492         frame::interpreter_frame_monitor_block_top_offset * wordSize);
 493   const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
 494 
 495 #ifdef ASSERT
 496   {
 497     Label L;
 498     __ movl(rax, access_flags);
 499     __ testl(rax, JVM_ACC_SYNCHRONIZED);
 500     __ jcc(Assembler::notZero, L);
 501     __ stop("method doesn't need synchronization");
 502     __ bind(L);
 503   }
 504 #endif // ASSERT
 505 
 506   // get synchronization object
 507   {
 508     const int mirror_offset = klassOopDesc::klass_part_offset_in_bytes() +
 509                               Klass::java_mirror_offset_in_bytes();
 510     Label done;
 511     __ movl(rax, access_flags);
 512     __ testl(rax, JVM_ACC_STATIC);
 513     // get receiver (assume this is frequent case)
 514     __ movptr(rax, Address(r14, Interpreter::local_offset_in_bytes(0)));
 515     __ jcc(Assembler::zero, done);
 516     __ movptr(rax, Address(rbx, methodOopDesc::constants_offset()));
 517     __ movptr(rax, Address(rax,
 518                            constantPoolOopDesc::pool_holder_offset_in_bytes()));
 519     __ movptr(rax, Address(rax, mirror_offset));
 520 
 521 #ifdef ASSERT
 522     {
 523       Label L;
 524       __ testptr(rax, rax);
 525       __ jcc(Assembler::notZero, L);
 526       __ stop("synchronization object is NULL");
 527       __ bind(L);
 528     }
 529 #endif // ASSERT


 989   assert(InterpreterRuntime::SignatureHandlerGenerator::temp() == rscratch1,
 990           "adjust this code");
 991 
 992   // The generated handlers do not touch RBX (the method oop).
 993   // However, large signatures cannot be cached and are generated
 994   // each time here.  The slow-path generator can do a GC on return,
 995   // so we must reload it after the call.
 996   __ call(t);
 997   __ get_method(method);        // slow path can do a GC, reload RBX
 998 
 999 
1000   // result handler is in rax
1001   // set result handler
1002   __ movptr(Address(rbp,
1003                     (frame::interpreter_frame_result_handler_offset) * wordSize),
1004             rax);
1005 
1006   // pass mirror handle if static call
1007   {
1008     Label L;
1009     const int mirror_offset = klassOopDesc::klass_part_offset_in_bytes() +
1010                               Klass::java_mirror_offset_in_bytes();
1011     __ movl(t, Address(method, methodOopDesc::access_flags_offset()));
1012     __ testl(t, JVM_ACC_STATIC);
1013     __ jcc(Assembler::zero, L);
1014     // get mirror
1015     __ movptr(t, Address(method, methodOopDesc::constants_offset()));
1016     __ movptr(t, Address(t, constantPoolOopDesc::pool_holder_offset_in_bytes()));
1017     __ movptr(t, Address(t, mirror_offset));
1018     // copy mirror into activation frame
1019     __ movptr(Address(rbp, frame::interpreter_frame_oop_temp_offset * wordSize),
1020             t);
1021     // pass handle to mirror
1022     __ lea(c_rarg1,
1023            Address(rbp, frame::interpreter_frame_oop_temp_offset * wordSize));
1024     __ bind(L);
1025   }
1026 
1027   // get native function entry point
1028   {
1029     Label L;
1030     __ movptr(rax, Address(method, methodOopDesc::native_function_offset()));




 488   // synchronize method
 489   const Address access_flags(rbx, methodOopDesc::access_flags_offset());
 490   const Address monitor_block_top(
 491         rbp,
 492         frame::interpreter_frame_monitor_block_top_offset * wordSize);
 493   const int entry_size = frame::interpreter_frame_monitor_size() * wordSize;
 494 
 495 #ifdef ASSERT
 496   {
 497     Label L;
 498     __ movl(rax, access_flags);
 499     __ testl(rax, JVM_ACC_SYNCHRONIZED);
 500     __ jcc(Assembler::notZero, L);
 501     __ stop("method doesn't need synchronization");
 502     __ bind(L);
 503   }
 504 #endif // ASSERT
 505 
 506   // get synchronization object
 507   {
 508     const int mirror_offset = in_bytes(Klass::java_mirror_offset());

 509     Label done;
 510     __ movl(rax, access_flags);
 511     __ testl(rax, JVM_ACC_STATIC);
 512     // get receiver (assume this is frequent case)
 513     __ movptr(rax, Address(r14, Interpreter::local_offset_in_bytes(0)));
 514     __ jcc(Assembler::zero, done);
 515     __ movptr(rax, Address(rbx, methodOopDesc::constants_offset()));
 516     __ movptr(rax, Address(rax,
 517                            constantPoolOopDesc::pool_holder_offset_in_bytes()));
 518     __ movptr(rax, Address(rax, mirror_offset));
 519 
 520 #ifdef ASSERT
 521     {
 522       Label L;
 523       __ testptr(rax, rax);
 524       __ jcc(Assembler::notZero, L);
 525       __ stop("synchronization object is NULL");
 526       __ bind(L);
 527     }
 528 #endif // ASSERT


 988   assert(InterpreterRuntime::SignatureHandlerGenerator::temp() == rscratch1,
 989           "adjust this code");
 990 
 991   // The generated handlers do not touch RBX (the method oop).
 992   // However, large signatures cannot be cached and are generated
 993   // each time here.  The slow-path generator can do a GC on return,
 994   // so we must reload it after the call.
 995   __ call(t);
 996   __ get_method(method);        // slow path can do a GC, reload RBX
 997 
 998 
 999   // result handler is in rax
1000   // set result handler
1001   __ movptr(Address(rbp,
1002                     (frame::interpreter_frame_result_handler_offset) * wordSize),
1003             rax);
1004 
1005   // pass mirror handle if static call
1006   {
1007     Label L;
1008     const int mirror_offset = in_bytes(Klass::java_mirror_offset());

1009     __ movl(t, Address(method, methodOopDesc::access_flags_offset()));
1010     __ testl(t, JVM_ACC_STATIC);
1011     __ jcc(Assembler::zero, L);
1012     // get mirror
1013     __ movptr(t, Address(method, methodOopDesc::constants_offset()));
1014     __ movptr(t, Address(t, constantPoolOopDesc::pool_holder_offset_in_bytes()));
1015     __ movptr(t, Address(t, mirror_offset));
1016     // copy mirror into activation frame
1017     __ movptr(Address(rbp, frame::interpreter_frame_oop_temp_offset * wordSize),
1018             t);
1019     // pass handle to mirror
1020     __ lea(c_rarg1,
1021            Address(rbp, frame::interpreter_frame_oop_temp_offset * wordSize));
1022     __ bind(L);
1023   }
1024 
1025   // get native function entry point
1026   {
1027     Label L;
1028     __ movptr(rax, Address(method, methodOopDesc::native_function_offset()));


src/cpu/x86/vm/templateInterpreter_x86_64.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File