< prev index next >

src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp

Print this page




  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include "precompiled.hpp"
  27 #include "asm/macroAssembler.inline.hpp"
  28 #include "asm/assembler.hpp"
  29 #include "c1/c1_CodeStubs.hpp"
  30 #include "c1/c1_Compilation.hpp"
  31 #include "c1/c1_LIRAssembler.hpp"
  32 #include "c1/c1_MacroAssembler.hpp"
  33 #include "c1/c1_Runtime1.hpp"
  34 #include "c1/c1_ValueStack.hpp"
  35 #include "ci/ciArrayKlass.hpp"
  36 #include "ci/ciInstance.hpp"
  37 #include "code/compiledIC.hpp"
  38 #include "gc/shared/barrierSet.hpp"
  39 #include "gc/shared/cardTableBarrierSet.hpp"
  40 #include "gc/shared/collectedHeap.hpp"
  41 #include "nativeInst_aarch64.hpp"
  42 #include "oops/objArrayKlass.hpp"
  43 #include "runtime/frame.inline.hpp"
  44 #include "runtime/sharedRuntime.hpp"
  45 #include "vmreg_aarch64.inline.hpp"
  46 
  47 
  48 
  49 #ifndef PRODUCT
  50 #define COMMENT(x)   do { __ block_comment(x); } while (0)
  51 #else
  52 #define COMMENT(x)
  53 #endif
  54 
  55 NEEDS_CLEANUP // remove this definitions ?
  56 const Register IC_Klass    = rscratch2;   // where the IC klass is cached
  57 const Register SYNC_header = r0;   // synchronization header


2047 }
2048 
2049 
2050 /* Currently, vtable-dispatch is only enabled for sparc platforms */
2051 void LIR_Assembler::vtable_call(LIR_OpJavaCall* op) {
2052   ShouldNotReachHere();
2053 }
2054 
2055 
2056 void LIR_Assembler::emit_static_call_stub() {
2057   address call_pc = __ pc();
2058   address stub = __ start_a_stub(call_stub_size());
2059   if (stub == NULL) {
2060     bailout("static call stub overflow");
2061     return;
2062   }
2063 
2064   int start = __ offset();
2065 
2066   __ relocate(static_stub_Relocation::spec(call_pc));
2067   __ emit_static_call_stub();


2068 
2069   assert(__ offset() - start + CompiledStaticCall::to_trampoline_stub_size()
2070         <= call_stub_size(), "stub too big");
2071   __ end_a_stub();
2072 }
2073 
2074 
2075 void LIR_Assembler::throw_op(LIR_Opr exceptionPC, LIR_Opr exceptionOop, CodeEmitInfo* info) {
2076   assert(exceptionOop->as_register() == r0, "must match");
2077   assert(exceptionPC->as_register() == r3, "must match");
2078 
2079   // exception object is not added to oop map by LinearScan
2080   // (LinearScan assumes that no oops are in fixed registers)
2081   info->add_register_oop(exceptionOop);
2082   Runtime1::StubID unwind_id;
2083 
2084   // get current pc information
2085   // pc is only needed if the method has an exception handler, the unwind code does not need it.
2086   int pc_for_athrow_offset = __ offset();
2087   InternalAddress pc_for_athrow(__ pc());
2088   __ adr(exceptionPC->as_register(), pc_for_athrow);
2089   add_call_info(pc_for_athrow_offset, info); // for exception handler
2090 




  17  * 2 along with this work; if not, write to the Free Software Foundation,
  18  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  19  *
  20  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  21  * or visit www.oracle.com if you need additional information or have any
  22  * questions.
  23  *
  24  */
  25 
  26 #include "precompiled.hpp"
  27 #include "asm/macroAssembler.inline.hpp"
  28 #include "asm/assembler.hpp"
  29 #include "c1/c1_CodeStubs.hpp"
  30 #include "c1/c1_Compilation.hpp"
  31 #include "c1/c1_LIRAssembler.hpp"
  32 #include "c1/c1_MacroAssembler.hpp"
  33 #include "c1/c1_Runtime1.hpp"
  34 #include "c1/c1_ValueStack.hpp"
  35 #include "ci/ciArrayKlass.hpp"
  36 #include "ci/ciInstance.hpp"

  37 #include "gc/shared/barrierSet.hpp"
  38 #include "gc/shared/cardTableBarrierSet.hpp"
  39 #include "gc/shared/collectedHeap.hpp"
  40 #include "nativeInst_aarch64.hpp"
  41 #include "oops/objArrayKlass.hpp"
  42 #include "runtime/frame.inline.hpp"
  43 #include "runtime/sharedRuntime.hpp"
  44 #include "vmreg_aarch64.inline.hpp"
  45 
  46 
  47 
  48 #ifndef PRODUCT
  49 #define COMMENT(x)   do { __ block_comment(x); } while (0)
  50 #else
  51 #define COMMENT(x)
  52 #endif
  53 
  54 NEEDS_CLEANUP // remove this definitions ?
  55 const Register IC_Klass    = rscratch2;   // where the IC klass is cached
  56 const Register SYNC_header = r0;   // synchronization header


2046 }
2047 
2048 
2049 /* Currently, vtable-dispatch is only enabled for sparc platforms */
2050 void LIR_Assembler::vtable_call(LIR_OpJavaCall* op) {
2051   ShouldNotReachHere();
2052 }
2053 
2054 
2055 void LIR_Assembler::emit_static_call_stub() {
2056   address call_pc = __ pc();
2057   address stub = __ start_a_stub(call_stub_size());
2058   if (stub == NULL) {
2059     bailout("static call stub overflow");
2060     return;
2061   }
2062 
2063   int start = __ offset();
2064 
2065   __ relocate(static_stub_Relocation::spec(call_pc));
2066   __ mov_metadata(rmethod, (Metadata*)NULL);
2067   __ movptr(rscratch1, 0);
2068   __ br(rscratch1);
2069 
2070   assert(__ offset() - start <= call_stub_size(), "stub too big");

2071   __ end_a_stub();
2072 }
2073 
2074 
2075 void LIR_Assembler::throw_op(LIR_Opr exceptionPC, LIR_Opr exceptionOop, CodeEmitInfo* info) {
2076   assert(exceptionOop->as_register() == r0, "must match");
2077   assert(exceptionPC->as_register() == r3, "must match");
2078 
2079   // exception object is not added to oop map by LinearScan
2080   // (LinearScan assumes that no oops are in fixed registers)
2081   info->add_register_oop(exceptionOop);
2082   Runtime1::StubID unwind_id;
2083 
2084   // get current pc information
2085   // pc is only needed if the method has an exception handler, the unwind code does not need it.
2086   int pc_for_athrow_offset = __ offset();
2087   InternalAddress pc_for_athrow(__ pc());
2088   __ adr(exceptionPC->as_register(), pc_for_athrow);
2089   add_call_info(pc_for_athrow_offset, info); // for exception handler
2090 


< prev index next >