< prev index next >

src/hotspot/cpu/x86/stubGenerator_x86_64.cpp

Print this page

7397     __ enter(); // required for proper stackwalking of RuntimeStub frame
7398 
7399 #ifdef _WIN64
7400     __ push(rsi);
7401     __ push(rdi);
7402 #endif
7403     __ fast_tan(x0, x1, x2, x3, x4, x5, x6, x7, rax, rcx, rdx, tmp1, tmp2, tmp3, tmp4);
7404 
7405 #ifdef _WIN64
7406     __ pop(rdi);
7407     __ pop(rsi);
7408 #endif
7409 
7410     __ leave(); // required for proper stackwalking of RuntimeStub frame
7411     __ ret(0);
7412 
7413     return start;
7414 
7415   }
7416 








































7417 #undef __
7418 #define __ masm->
7419 
7420   // Continuation point for throwing of implicit exceptions that are
7421   // not handled in the current activation. Fabricates an exception
7422   // oop and initiates normal exception dispatching in this
7423   // frame. Since we need to preserve callee-saved values (currently
7424   // only for C2, but done for C1 as well) we need a callee-saved oop
7425   // map and therefore have to make these stubs into RuntimeStubs
7426   // rather than BufferBlobs.  If the compiler needs all registers to
7427   // be preserved between the fault point and the exception handler
7428   // then it must assume responsibility for that in
7429   // AbstractCompiler::continuation_for_implicit_null_exception or
7430   // continuation_for_implicit_division_by_zero_exception. All other
7431   // implicit exceptions (e.g., NullPointerException or
7432   // AbstractMethodError on entry) are either at call sites or
7433   // otherwise assume that stack unwinding will be initiated, so
7434   // caller saved registers were assumed volatile in the compiler.
7435   address generate_throw_exception(const char* name,
7436                                    address runtime_entry,

7615       }
7616       if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dlog)) {
7617         StubRoutines::_dlog = generate_libmLog();
7618       }
7619       if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dlog10)) {
7620         StubRoutines::_dlog10 = generate_libmLog10();
7621       }
7622       if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dpow)) {
7623         StubRoutines::_dpow = generate_libmPow();
7624       }
7625       if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dsin)) {
7626         StubRoutines::_dsin = generate_libmSin();
7627       }
7628       if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dcos)) {
7629         StubRoutines::_dcos = generate_libmCos();
7630       }
7631       if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dtan)) {
7632         StubRoutines::_dtan = generate_libmTan();
7633       }
7634     }




7635   }
7636 
7637   void generate_all() {
7638     // Generates all stubs and initializes the entry points
7639 
7640     // These entry points require SharedInfo::stack0 to be set up in
7641     // non-core builds and need to be relocatable, so they each
7642     // fabricate a RuntimeStub internally.
7643     StubRoutines::_throw_AbstractMethodError_entry =
7644       generate_throw_exception("AbstractMethodError throw_exception",
7645                                CAST_FROM_FN_PTR(address,
7646                                                 SharedRuntime::
7647                                                 throw_AbstractMethodError));
7648 
7649     StubRoutines::_throw_IncompatibleClassChangeError_entry =
7650       generate_throw_exception("IncompatibleClassChangeError throw_exception",
7651                                CAST_FROM_FN_PTR(address,
7652                                                 SharedRuntime::
7653                                                 throw_IncompatibleClassChangeError));
7654 

7397     __ enter(); // required for proper stackwalking of RuntimeStub frame
7398 
7399 #ifdef _WIN64
7400     __ push(rsi);
7401     __ push(rdi);
7402 #endif
7403     __ fast_tan(x0, x1, x2, x3, x4, x5, x6, x7, rax, rcx, rdx, tmp1, tmp2, tmp3, tmp4);
7404 
7405 #ifdef _WIN64
7406     __ pop(rdi);
7407     __ pop(rsi);
7408 #endif
7409 
7410     __ leave(); // required for proper stackwalking of RuntimeStub frame
7411     __ ret(0);
7412 
7413     return start;
7414 
7415   }
7416 
7417   // Call stub to call runtime oopDesc::load_nklass_runtime().
7418   // rax: call argument (object)
7419   // rax: return object's narrowKlass
7420   // Preserves all caller-saved registers, except rax
7421 #ifdef _LP64
7422   address generate_load_nklass() {
7423     __ align(CodeEntryAlignment);
7424     StubCodeMark(this, "StubRoutines", "load_nklass");
7425     address start = __ pc();
7426     __ enter(); // save rbp
7427 
7428     __ andptr(rsp, -(StackAlignmentInBytes));    // Align stack
7429     __ push_FPU_state();
7430 
7431     __ push(rdi);
7432     __ push(rsi);
7433     __ push(rdx);
7434     __ push(rcx);
7435     __ push(r8);
7436     __ push(r9);
7437     __ push(r10);
7438     __ push(r11);
7439     __ call_VM_leaf(CAST_FROM_FN_PTR(address, oopDesc::load_nklass_runtime), rax);
7440     __ pop(r11);
7441     __ pop(r10);
7442     __ pop(r9);
7443     __ pop(r8);
7444     __ pop(rcx);
7445     __ pop(rdx);
7446     __ pop(rsi);
7447     __ pop(rdi);
7448 
7449     __ pop_FPU_state();
7450 
7451     __ leave();
7452     __ ret(0);
7453     return start;
7454   }
7455 #endif // _LP64
7456 
7457 #undef __
7458 #define __ masm->
7459 
7460   // Continuation point for throwing of implicit exceptions that are
7461   // not handled in the current activation. Fabricates an exception
7462   // oop and initiates normal exception dispatching in this
7463   // frame. Since we need to preserve callee-saved values (currently
7464   // only for C2, but done for C1 as well) we need a callee-saved oop
7465   // map and therefore have to make these stubs into RuntimeStubs
7466   // rather than BufferBlobs.  If the compiler needs all registers to
7467   // be preserved between the fault point and the exception handler
7468   // then it must assume responsibility for that in
7469   // AbstractCompiler::continuation_for_implicit_null_exception or
7470   // continuation_for_implicit_division_by_zero_exception. All other
7471   // implicit exceptions (e.g., NullPointerException or
7472   // AbstractMethodError on entry) are either at call sites or
7473   // otherwise assume that stack unwinding will be initiated, so
7474   // caller saved registers were assumed volatile in the compiler.
7475   address generate_throw_exception(const char* name,
7476                                    address runtime_entry,

7655       }
7656       if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dlog)) {
7657         StubRoutines::_dlog = generate_libmLog();
7658       }
7659       if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dlog10)) {
7660         StubRoutines::_dlog10 = generate_libmLog10();
7661       }
7662       if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dpow)) {
7663         StubRoutines::_dpow = generate_libmPow();
7664       }
7665       if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dsin)) {
7666         StubRoutines::_dsin = generate_libmSin();
7667       }
7668       if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dcos)) {
7669         StubRoutines::_dcos = generate_libmCos();
7670       }
7671       if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dtan)) {
7672         StubRoutines::_dtan = generate_libmTan();
7673       }
7674     }
7675 
7676 #ifdef _LP64
7677     StubRoutines::_load_nklass = generate_load_nklass();
7678 #endif
7679   }
7680 
7681   void generate_all() {
7682     // Generates all stubs and initializes the entry points
7683 
7684     // These entry points require SharedInfo::stack0 to be set up in
7685     // non-core builds and need to be relocatable, so they each
7686     // fabricate a RuntimeStub internally.
7687     StubRoutines::_throw_AbstractMethodError_entry =
7688       generate_throw_exception("AbstractMethodError throw_exception",
7689                                CAST_FROM_FN_PTR(address,
7690                                                 SharedRuntime::
7691                                                 throw_AbstractMethodError));
7692 
7693     StubRoutines::_throw_IncompatibleClassChangeError_entry =
7694       generate_throw_exception("IncompatibleClassChangeError throw_exception",
7695                                CAST_FROM_FN_PTR(address,
7696                                                 SharedRuntime::
7697                                                 throw_IncompatibleClassChangeError));
7698 
< prev index next >