606
607 __ load_const_optimized(Z_R1, StubRoutines::forward_exception_entry());
608 __ z_br(Z_R1);
609
610 RuntimeStub* stub =
611 RuntimeStub::new_runtime_stub(name, &code,
612 frame_complete_pc - start,
613 framesize_in_bytes/wordSize,
614 NULL /*oop_maps*/, false);
615
616 return stub->entry_point();
617 }
618
619 #undef __
620 #ifdef PRODUCT
621 #define __ _masm->
622 #else
623 #define __ (Verbose ? (_masm->block_comment(FILE_AND_LINE),_masm):_masm)->
624 #endif
625
626 //----------------------------------------------------------------------
627 // The following routine generates a subroutine to throw an asynchronous
628 // UnknownError when an unsafe access gets a fault that could not be
629 // reasonably prevented by the programmer. (Example: SIGBUS/OBJERR.)
630 //
631 // Arguments:
632 // trapping PC: ??
633 //
634 // Results:
635 // Posts an asynchronous exception, skips the trapping instruction.
636 //
637 address generate_handler_for_unsafe_access() {
638 StubCodeMark mark(this, "StubRoutines", "handler_for_unsafe_access");
639 {
640 address start = __ pc();
641 __ unimplemented("StubRoutines::handler_for_unsafe_access", 86);
642 return start;
643 }
644 }
645
646 // Support for uint StubRoutine::zarch::partial_subtype_check(Klass
647 // sub, Klass super);
648 //
649 // Arguments:
650 // ret : Z_RET, returned
651 // sub : Z_ARG2, argument, not changed
652 // super: Z_ARG3, argument, not changed
653 //
654 // raddr: Z_R14, blown by call
655 //
656 address generate_partial_subtype_check() {
657 StubCodeMark mark(this, "StubRoutines", "partial_subtype_check");
658 Label miss;
659
660 address start = __ pc();
661
662 const Register Rsubklass = Z_ARG2; // subklass
663 const Register Rsuperklass = Z_ARG3; // superklass
664
665 // No args, but tmp registers that are killed.
2443 if (UseCRC32Intrinsics) {
2444 // We have no CRC32 table on z/Architecture.
2445 StubRoutines::_crc_table_adr = (address)StubRoutines::zarch::_crc_table;
2446 StubRoutines::_updateBytesCRC32 = generate_CRC32_updateBytes("CRC32_updateBytes");
2447 }
2448
2449 // Comapct string intrinsics: Translate table for string inflate intrinsic. Used by trot instruction.
2450 StubRoutines::zarch::_trot_table_addr = (address)StubRoutines::zarch::_trot_table;
2451 }
2452
2453
2454 void generate_all() {
2455 // Generates all stubs and initializes the entry points.
2456
2457 StubRoutines::zarch::_partial_subtype_check = generate_partial_subtype_check();
2458
2459 // These entry points require SharedInfo::stack0 to be set up in non-core builds.
2460 StubRoutines::_throw_AbstractMethodError_entry = generate_throw_exception("AbstractMethodError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_AbstractMethodError), false);
2461 StubRoutines::_throw_IncompatibleClassChangeError_entry= generate_throw_exception("IncompatibleClassChangeError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_IncompatibleClassChangeError), false);
2462 StubRoutines::_throw_NullPointerException_at_call_entry= generate_throw_exception("NullPointerException at call throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_NullPointerException_at_call), false);
2463
2464 StubRoutines::zarch::_handler_for_unsafe_access_entry = generate_handler_for_unsafe_access();
2465
2466 // Support for verify_oop (must happen after universe_init).
2467 StubRoutines::_verify_oop_subroutine_entry = generate_verify_oop_subroutine();
2468
2469 // Arraycopy stubs used by compilers.
2470 generate_arraycopy_stubs();
2471
2472 // safefetch stubs
2473 generate_safefetch("SafeFetch32", sizeof(int), &StubRoutines::_safefetch32_entry, &StubRoutines::_safefetch32_fault_pc, &StubRoutines::_safefetch32_continuation_pc);
2474 generate_safefetch("SafeFetchN", sizeof(intptr_t), &StubRoutines::_safefetchN_entry, &StubRoutines::_safefetchN_fault_pc, &StubRoutines::_safefetchN_continuation_pc);
2475
2476 // Generate AES intrinsics code.
2477 if (UseAESIntrinsics) {
2478 StubRoutines::_aescrypt_encryptBlock = generate_AES_encryptBlock("AES_encryptBlock");
2479 StubRoutines::_aescrypt_decryptBlock = generate_AES_decryptBlock("AES_decryptBlock");
2480 StubRoutines::_cipherBlockChaining_encryptAESCrypt = generate_cipherBlockChaining_AES_encrypt("AES_encryptBlock_chaining");
2481 StubRoutines::_cipherBlockChaining_decryptAESCrypt = generate_cipherBlockChaining_AES_decrypt("AES_decryptBlock_chaining");
2482 }
2483
2484 // Generate SHA1/SHA256/SHA512 intrinsics code.
|
606
607 __ load_const_optimized(Z_R1, StubRoutines::forward_exception_entry());
608 __ z_br(Z_R1);
609
610 RuntimeStub* stub =
611 RuntimeStub::new_runtime_stub(name, &code,
612 frame_complete_pc - start,
613 framesize_in_bytes/wordSize,
614 NULL /*oop_maps*/, false);
615
616 return stub->entry_point();
617 }
618
619 #undef __
620 #ifdef PRODUCT
621 #define __ _masm->
622 #else
623 #define __ (Verbose ? (_masm->block_comment(FILE_AND_LINE),_masm):_masm)->
624 #endif
625
626 // Support for uint StubRoutine::zarch::partial_subtype_check(Klass
627 // sub, Klass super);
628 //
629 // Arguments:
630 // ret : Z_RET, returned
631 // sub : Z_ARG2, argument, not changed
632 // super: Z_ARG3, argument, not changed
633 //
634 // raddr: Z_R14, blown by call
635 //
636 address generate_partial_subtype_check() {
637 StubCodeMark mark(this, "StubRoutines", "partial_subtype_check");
638 Label miss;
639
640 address start = __ pc();
641
642 const Register Rsubklass = Z_ARG2; // subklass
643 const Register Rsuperklass = Z_ARG3; // superklass
644
645 // No args, but tmp registers that are killed.
2423 if (UseCRC32Intrinsics) {
2424 // We have no CRC32 table on z/Architecture.
2425 StubRoutines::_crc_table_adr = (address)StubRoutines::zarch::_crc_table;
2426 StubRoutines::_updateBytesCRC32 = generate_CRC32_updateBytes("CRC32_updateBytes");
2427 }
2428
2429 // Comapct string intrinsics: Translate table for string inflate intrinsic. Used by trot instruction.
2430 StubRoutines::zarch::_trot_table_addr = (address)StubRoutines::zarch::_trot_table;
2431 }
2432
2433
2434 void generate_all() {
2435 // Generates all stubs and initializes the entry points.
2436
2437 StubRoutines::zarch::_partial_subtype_check = generate_partial_subtype_check();
2438
2439 // These entry points require SharedInfo::stack0 to be set up in non-core builds.
2440 StubRoutines::_throw_AbstractMethodError_entry = generate_throw_exception("AbstractMethodError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_AbstractMethodError), false);
2441 StubRoutines::_throw_IncompatibleClassChangeError_entry= generate_throw_exception("IncompatibleClassChangeError throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_IncompatibleClassChangeError), false);
2442 StubRoutines::_throw_NullPointerException_at_call_entry= generate_throw_exception("NullPointerException at call throw_exception", CAST_FROM_FN_PTR(address, SharedRuntime::throw_NullPointerException_at_call), false);
2443
2444 // Support for verify_oop (must happen after universe_init).
2445 StubRoutines::_verify_oop_subroutine_entry = generate_verify_oop_subroutine();
2446
2447 // Arraycopy stubs used by compilers.
2448 generate_arraycopy_stubs();
2449
2450 // safefetch stubs
2451 generate_safefetch("SafeFetch32", sizeof(int), &StubRoutines::_safefetch32_entry, &StubRoutines::_safefetch32_fault_pc, &StubRoutines::_safefetch32_continuation_pc);
2452 generate_safefetch("SafeFetchN", sizeof(intptr_t), &StubRoutines::_safefetchN_entry, &StubRoutines::_safefetchN_fault_pc, &StubRoutines::_safefetchN_continuation_pc);
2453
2454 // Generate AES intrinsics code.
2455 if (UseAESIntrinsics) {
2456 StubRoutines::_aescrypt_encryptBlock = generate_AES_encryptBlock("AES_encryptBlock");
2457 StubRoutines::_aescrypt_decryptBlock = generate_AES_decryptBlock("AES_decryptBlock");
2458 StubRoutines::_cipherBlockChaining_encryptAESCrypt = generate_cipherBlockChaining_AES_encrypt("AES_encryptBlock_chaining");
2459 StubRoutines::_cipherBlockChaining_decryptAESCrypt = generate_cipherBlockChaining_AES_decrypt("AES_decryptBlock_chaining");
2460 }
2461
2462 // Generate SHA1/SHA256/SHA512 intrinsics code.
|