< prev index next >

src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp

Print this page

  25 
  26 #include "precompiled.hpp"
  27 #include "asm/macroAssembler.inline.hpp"
  28 #include "classfile/javaClasses.hpp"
  29 #include "compiler/disassembler.hpp"
  30 #include "compiler/compiler_globals.hpp"
  31 #include "gc/shared/barrierSetAssembler.hpp"
  32 #include "interpreter/bytecodeHistogram.hpp"
  33 #include "interpreter/interpreter.hpp"
  34 #include "interpreter/interpreterRuntime.hpp"
  35 #include "interpreter/interp_masm.hpp"
  36 #include "interpreter/templateInterpreterGenerator.hpp"
  37 #include "interpreter/templateTable.hpp"
  38 #include "interpreter/bytecodeTracer.hpp"
  39 #include "memory/resourceArea.hpp"
  40 #include "oops/arrayOop.hpp"
  41 #include "oops/method.hpp"
  42 #include "oops/methodCounters.hpp"
  43 #include "oops/methodData.hpp"
  44 #include "oops/oop.inline.hpp"

  45 #include "oops/resolvedIndyEntry.hpp"
  46 #include "oops/resolvedMethodEntry.hpp"
  47 #include "prims/jvmtiExport.hpp"
  48 #include "prims/jvmtiThreadState.hpp"
  49 #include "runtime/arguments.hpp"
  50 #include "runtime/deoptimization.hpp"
  51 #include "runtime/frame.inline.hpp"
  52 #include "runtime/globals.hpp"
  53 #include "runtime/jniHandles.hpp"
  54 #include "runtime/sharedRuntime.hpp"
  55 #include "runtime/stubRoutines.hpp"
  56 #include "runtime/synchronizer.hpp"
  57 #include "runtime/timer.hpp"
  58 #include "runtime/vframeArray.hpp"
  59 #include "utilities/checkedCast.hpp"
  60 #include "utilities/debug.hpp"
  61 #include "utilities/powerOfTwo.hpp"
  62 #include <sys/types.h>
  63 
  64 // Size of interpreter code.  Increase if too small.  Interpreter will

 451     } else {
 452       __ mov(c_rarg2, NULL_WORD);
 453     }
 454     __ call_VM(r0,
 455                CAST_FROM_FN_PTR(address, InterpreterRuntime::create_exception),
 456                c_rarg1, c_rarg2);
 457   }
 458   // throw exception
 459   __ b(address(Interpreter::throw_exception_entry()));
 460   return entry;
 461 }
 462 
 463 address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step, size_t index_size) {
 464   address entry = __ pc();
 465 
 466   // Restore stack bottom in case i2c adjusted stack
 467   __ ldr(rscratch1, Address(rfp, frame::interpreter_frame_last_sp_offset * wordSize));
 468   __ lea(esp, Address(rfp, rscratch1, Address::lsl(Interpreter::logStackElementSize)));
 469   // and null it as marker that esp is now tos until next java call
 470   __ str(zr, Address(rfp, frame::interpreter_frame_last_sp_offset * wordSize));





 471   __ restore_bcp();
 472   __ restore_locals();
 473   __ restore_constant_pool_cache();
 474   __ get_method(rmethod);
 475 
 476   if (state == atos) {
 477     Register obj = r0;
 478     Register mdp = r1;
 479     Register tmp = r2;
 480     __ profile_return_type(mdp, obj, tmp);
 481   }
 482 
 483   const Register cache = r1;
 484   const Register index = r2;
 485 
 486   if (index_size == sizeof(u4)) {
 487     __ load_resolved_indy_entry(cache, index);
 488     __ load_unsigned_short(cache, Address(cache, in_bytes(ResolvedIndyEntry::num_parameters_offset())));
 489     __ add(esp, esp, cache, Assembler::LSL, 3);
 490   } else {

  25 
  26 #include "precompiled.hpp"
  27 #include "asm/macroAssembler.inline.hpp"
  28 #include "classfile/javaClasses.hpp"
  29 #include "compiler/disassembler.hpp"
  30 #include "compiler/compiler_globals.hpp"
  31 #include "gc/shared/barrierSetAssembler.hpp"
  32 #include "interpreter/bytecodeHistogram.hpp"
  33 #include "interpreter/interpreter.hpp"
  34 #include "interpreter/interpreterRuntime.hpp"
  35 #include "interpreter/interp_masm.hpp"
  36 #include "interpreter/templateInterpreterGenerator.hpp"
  37 #include "interpreter/templateTable.hpp"
  38 #include "interpreter/bytecodeTracer.hpp"
  39 #include "memory/resourceArea.hpp"
  40 #include "oops/arrayOop.hpp"
  41 #include "oops/method.hpp"
  42 #include "oops/methodCounters.hpp"
  43 #include "oops/methodData.hpp"
  44 #include "oops/oop.inline.hpp"
  45 #include "oops/inlineKlass.hpp"
  46 #include "oops/resolvedIndyEntry.hpp"
  47 #include "oops/resolvedMethodEntry.hpp"
  48 #include "prims/jvmtiExport.hpp"
  49 #include "prims/jvmtiThreadState.hpp"
  50 #include "runtime/arguments.hpp"
  51 #include "runtime/deoptimization.hpp"
  52 #include "runtime/frame.inline.hpp"
  53 #include "runtime/globals.hpp"
  54 #include "runtime/jniHandles.hpp"
  55 #include "runtime/sharedRuntime.hpp"
  56 #include "runtime/stubRoutines.hpp"
  57 #include "runtime/synchronizer.hpp"
  58 #include "runtime/timer.hpp"
  59 #include "runtime/vframeArray.hpp"
  60 #include "utilities/checkedCast.hpp"
  61 #include "utilities/debug.hpp"
  62 #include "utilities/powerOfTwo.hpp"
  63 #include <sys/types.h>
  64 
  65 // Size of interpreter code.  Increase if too small.  Interpreter will

 452     } else {
 453       __ mov(c_rarg2, NULL_WORD);
 454     }
 455     __ call_VM(r0,
 456                CAST_FROM_FN_PTR(address, InterpreterRuntime::create_exception),
 457                c_rarg1, c_rarg2);
 458   }
 459   // throw exception
 460   __ b(address(Interpreter::throw_exception_entry()));
 461   return entry;
 462 }
 463 
 464 address TemplateInterpreterGenerator::generate_return_entry_for(TosState state, int step, size_t index_size) {
 465   address entry = __ pc();
 466 
 467   // Restore stack bottom in case i2c adjusted stack
 468   __ ldr(rscratch1, Address(rfp, frame::interpreter_frame_last_sp_offset * wordSize));
 469   __ lea(esp, Address(rfp, rscratch1, Address::lsl(Interpreter::logStackElementSize)));
 470   // and null it as marker that esp is now tos until next java call
 471   __ str(zr, Address(rfp, frame::interpreter_frame_last_sp_offset * wordSize));
 472 
 473   if (state == atos && InlineTypeReturnedAsFields) {
 474     __ store_inline_type_fields_to_buf(nullptr, true);
 475   }
 476 
 477   __ restore_bcp();
 478   __ restore_locals();
 479   __ restore_constant_pool_cache();
 480   __ get_method(rmethod);
 481 
 482   if (state == atos) {
 483     Register obj = r0;
 484     Register mdp = r1;
 485     Register tmp = r2;
 486     __ profile_return_type(mdp, obj, tmp);
 487   }
 488 
 489   const Register cache = r1;
 490   const Register index = r2;
 491 
 492   if (index_size == sizeof(u4)) {
 493     __ load_resolved_indy_entry(cache, index);
 494     __ load_unsigned_short(cache, Address(cache, in_bytes(ResolvedIndyEntry::num_parameters_offset())));
 495     __ add(esp, esp, cache, Assembler::LSL, 3);
 496   } else {
< prev index next >