src/cpu/sparc/vm/templateTable_sparc.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8074457 Sdiff src/cpu/sparc/vm

src/cpu/sparc/vm/templateTable_sparc.cpp

Print this page




  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "interpreter/interpreter.hpp"
  27 #include "interpreter/interpreterRuntime.hpp"
  28 #include "interpreter/interp_masm.hpp"
  29 #include "interpreter/templateTable.hpp"
  30 #include "memory/universe.inline.hpp"
  31 #include "oops/methodData.hpp"
  32 #include "oops/objArrayKlass.hpp"
  33 #include "oops/oop.inline.hpp"
  34 #include "prims/methodHandles.hpp"
  35 #include "runtime/sharedRuntime.hpp"
  36 #include "runtime/stubRoutines.hpp"
  37 #include "runtime/synchronizer.hpp"
  38 #include "utilities/macros.hpp"
  39 
  40 #ifndef CC_INTERP
  41 #define __ _masm->
  42 
  43 // Misc helpers
  44 
  45 // Do an oop store like *(base + index + offset) = val
  46 // index can be noreg,
  47 static void do_oop_store(InterpreterMacroAssembler* _masm,
  48                          Register base,
  49                          Register index,
  50                          int offset,
  51                          Register val,
  52                          Register tmp,
  53                          BarrierSet::Name barrier,
  54                          bool precise) {
  55   assert(tmp != val && tmp != base && tmp != index, "register collision");
  56   assert(index == noreg || offset == 0, "only one offset");
  57   switch (barrier) {
  58 #if INCLUDE_ALL_GCS
  59     case BarrierSet::G1SATBCTLogging:
  60       {


3760   __ ld_ptr(G4_scratch, G3_scratch, G3_scratch);
3761   __ jmp(G3_scratch, G0);
3762   __ delayed()->nop();
3763   // Note: the Lbcp increment step is part of the individual wide bytecode implementations
3764 }
3765 
3766 
3767 //----------------------------------------------------------------------------------------------------
3768 // Multi arrays
3769 
3770 void TemplateTable::multianewarray() {
3771   transition(vtos, atos);
3772      // put ndims * wordSize into Lscratch
3773   __ ldub( Lbcp,     3,               Lscratch);
3774   __ sll(  Lscratch, Interpreter::logStackElementSize, Lscratch);
3775      // Lesp points past last_dim, so set to O1 to first_dim address
3776   __ add(  Lesp,     Lscratch,        O1);
3777      call_VM(Otos_i, CAST_FROM_FN_PTR(address, InterpreterRuntime::multianewarray), O1);
3778   __ add(  Lesp,     Lscratch,        Lesp); // pop all dimensions off the stack
3779 }
3780 #endif /* !CC_INTERP */


  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "interpreter/interpreter.hpp"
  27 #include "interpreter/interpreterRuntime.hpp"
  28 #include "interpreter/interp_masm.hpp"
  29 #include "interpreter/templateTable.hpp"
  30 #include "memory/universe.inline.hpp"
  31 #include "oops/methodData.hpp"
  32 #include "oops/objArrayKlass.hpp"
  33 #include "oops/oop.inline.hpp"
  34 #include "prims/methodHandles.hpp"
  35 #include "runtime/sharedRuntime.hpp"
  36 #include "runtime/stubRoutines.hpp"
  37 #include "runtime/synchronizer.hpp"
  38 #include "utilities/macros.hpp"
  39 

  40 #define __ _masm->
  41 
  42 // Misc helpers
  43 
  44 // Do an oop store like *(base + index + offset) = val
  45 // index can be noreg,
  46 static void do_oop_store(InterpreterMacroAssembler* _masm,
  47                          Register base,
  48                          Register index,
  49                          int offset,
  50                          Register val,
  51                          Register tmp,
  52                          BarrierSet::Name barrier,
  53                          bool precise) {
  54   assert(tmp != val && tmp != base && tmp != index, "register collision");
  55   assert(index == noreg || offset == 0, "only one offset");
  56   switch (barrier) {
  57 #if INCLUDE_ALL_GCS
  58     case BarrierSet::G1SATBCTLogging:
  59       {


3759   __ ld_ptr(G4_scratch, G3_scratch, G3_scratch);
3760   __ jmp(G3_scratch, G0);
3761   __ delayed()->nop();
3762   // Note: the Lbcp increment step is part of the individual wide bytecode implementations
3763 }
3764 
3765 
3766 //----------------------------------------------------------------------------------------------------
3767 // Multi arrays
3768 
3769 void TemplateTable::multianewarray() {
3770   transition(vtos, atos);
3771      // put ndims * wordSize into Lscratch
3772   __ ldub( Lbcp,     3,               Lscratch);
3773   __ sll(  Lscratch, Interpreter::logStackElementSize, Lscratch);
3774      // Lesp points past last_dim, so set to O1 to first_dim address
3775   __ add(  Lesp,     Lscratch,        O1);
3776      call_VM(Otos_i, CAST_FROM_FN_PTR(address, InterpreterRuntime::multianewarray), O1);
3777   __ add(  Lesp,     Lscratch,        Lesp); // pop all dimensions off the stack
3778 }

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