83
84
85
86 // Compiled code entry points
87 address OptoRuntime::_new_instance_Java = NULL;
88 address OptoRuntime::_new_array_Java = NULL;
89 address OptoRuntime::_new_array_nozero_Java = NULL;
90 address OptoRuntime::_multianewarray2_Java = NULL;
91 address OptoRuntime::_multianewarray3_Java = NULL;
92 address OptoRuntime::_multianewarray4_Java = NULL;
93 address OptoRuntime::_multianewarray5_Java = NULL;
94 address OptoRuntime::_multianewarrayN_Java = NULL;
95 address OptoRuntime::_g1_wb_pre_Java = NULL;
96 address OptoRuntime::_g1_wb_post_Java = NULL;
97 address OptoRuntime::_vtable_must_compile_Java = NULL;
98 address OptoRuntime::_complete_monitor_locking_Java = NULL;
99 address OptoRuntime::_rethrow_Java = NULL;
100
101 address OptoRuntime::_slow_arraycopy_Java = NULL;
102 address OptoRuntime::_register_finalizer_Java = NULL;
103
104 # ifdef ENABLE_ZAP_DEAD_LOCALS
105 address OptoRuntime::_zap_dead_Java_locals_Java = NULL;
106 address OptoRuntime::_zap_dead_native_locals_Java = NULL;
107 # endif
108
109 ExceptionBlob* OptoRuntime::_exception_blob;
110
111 // This should be called in an assertion at the start of OptoRuntime routines
112 // which are entered from compiled code (all of them)
113 #ifdef ASSERT
114 static bool check_compiled_frame(JavaThread* thread) {
115 assert(thread->last_frame().is_runtime_frame(), "cannot call runtime directly from compiled code");
116 RegisterMap map(thread, false);
117 frame caller = thread->last_frame().sender(&map);
118 assert(caller.is_compiled_frame(), "not being called from compiled like code");
119 return true;
120 }
121 #endif // ASSERT
122
970 // create input type (domain)
971 int num_args = 5;
972 int argcnt = num_args;
973 const Type** fields = TypeTuple::fields(argcnt);
974 int argp = TypeFunc::Parms;
975 fields[argp++] = TypePtr::NOTNULL; // out
976 fields[argp++] = TypePtr::NOTNULL; // in
977 fields[argp++] = TypeInt::INT; // offset
978 fields[argp++] = TypeInt::INT; // len
979 fields[argp++] = TypeInt::INT; // k
980 assert(argp == TypeFunc::Parms+argcnt, "correct decoding");
981 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields);
982
983 // returning carry (int)
984 fields = TypeTuple::fields(1);
985 fields[TypeFunc::Parms+0] = TypeInt::INT;
986 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms+1, fields);
987 return TypeFunc::make(domain, range);
988 }
989
990
991
992 //------------- Interpreter state access for on stack replacement
993 const TypeFunc* OptoRuntime::osr_end_Type() {
994 // create input type (domain)
995 const Type **fields = TypeTuple::fields(1);
996 fields[TypeFunc::Parms+0] = TypeRawPtr::BOTTOM; // OSR temp buf
997 const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+1, fields);
998
999 // create result type
1000 fields = TypeTuple::fields(1);
1001 // fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL; // locked oop
1002 fields[TypeFunc::Parms+0] = NULL; // void
1003 const TypeTuple *range = TypeTuple::make(TypeFunc::Parms, fields);
1004 return TypeFunc::make(domain, range);
1005 }
1006
1007 //-------------- methodData update helpers
1008
1009 const TypeFunc* OptoRuntime::profile_receiver_type_Type() {
|
83
84
85
86 // Compiled code entry points
87 address OptoRuntime::_new_instance_Java = NULL;
88 address OptoRuntime::_new_array_Java = NULL;
89 address OptoRuntime::_new_array_nozero_Java = NULL;
90 address OptoRuntime::_multianewarray2_Java = NULL;
91 address OptoRuntime::_multianewarray3_Java = NULL;
92 address OptoRuntime::_multianewarray4_Java = NULL;
93 address OptoRuntime::_multianewarray5_Java = NULL;
94 address OptoRuntime::_multianewarrayN_Java = NULL;
95 address OptoRuntime::_g1_wb_pre_Java = NULL;
96 address OptoRuntime::_g1_wb_post_Java = NULL;
97 address OptoRuntime::_vtable_must_compile_Java = NULL;
98 address OptoRuntime::_complete_monitor_locking_Java = NULL;
99 address OptoRuntime::_rethrow_Java = NULL;
100
101 address OptoRuntime::_slow_arraycopy_Java = NULL;
102 address OptoRuntime::_register_finalizer_Java = NULL;
103 address OptoRuntime::_montgomeryMultiply_Java = NULL;
104 address OptoRuntime::_montgomerySquare_Java = NULL;
105
106 # ifdef ENABLE_ZAP_DEAD_LOCALS
107 address OptoRuntime::_zap_dead_Java_locals_Java = NULL;
108 address OptoRuntime::_zap_dead_native_locals_Java = NULL;
109 # endif
110
111 ExceptionBlob* OptoRuntime::_exception_blob;
112
113 // This should be called in an assertion at the start of OptoRuntime routines
114 // which are entered from compiled code (all of them)
115 #ifdef ASSERT
116 static bool check_compiled_frame(JavaThread* thread) {
117 assert(thread->last_frame().is_runtime_frame(), "cannot call runtime directly from compiled code");
118 RegisterMap map(thread, false);
119 frame caller = thread->last_frame().sender(&map);
120 assert(caller.is_compiled_frame(), "not being called from compiled like code");
121 return true;
122 }
123 #endif // ASSERT
124
972 // create input type (domain)
973 int num_args = 5;
974 int argcnt = num_args;
975 const Type** fields = TypeTuple::fields(argcnt);
976 int argp = TypeFunc::Parms;
977 fields[argp++] = TypePtr::NOTNULL; // out
978 fields[argp++] = TypePtr::NOTNULL; // in
979 fields[argp++] = TypeInt::INT; // offset
980 fields[argp++] = TypeInt::INT; // len
981 fields[argp++] = TypeInt::INT; // k
982 assert(argp == TypeFunc::Parms+argcnt, "correct decoding");
983 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields);
984
985 // returning carry (int)
986 fields = TypeTuple::fields(1);
987 fields[TypeFunc::Parms+0] = TypeInt::INT;
988 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms+1, fields);
989 return TypeFunc::make(domain, range);
990 }
991
992 const TypeFunc* OptoRuntime::montgomeryMultiply_Type() {
993 // create input type (domain)
994 int num_args = 8;
995 int argcnt = num_args;
996 const Type** fields = TypeTuple::fields(argcnt);
997 int argp = TypeFunc::Parms;
998 fields[argp++] = TypePtr::NOTNULL; // a
999 fields[argp++] = TypePtr::NOTNULL; // b
1000 fields[argp++] = TypePtr::NOTNULL; // n
1001 fields[argp++] = TypeInt::INT; // len
1002 fields[argp++] = TypeLong::LONG; // inv
1003 fields[argp++] = Type::HALF;
1004 fields[argp++] = TypePtr::NOTNULL; // scratch
1005 fields[argp++] = TypePtr::NOTNULL; // result
1006 assert(argp == TypeFunc::Parms+argcnt, "correct decoding");
1007 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields);
1008
1009 // result type needed
1010 fields = TypeTuple::fields(1);
1011 fields[TypeFunc::Parms+0] = TypePtr::NOTNULL;
1012
1013 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms, fields);
1014 return TypeFunc::make(domain, range);
1015 }
1016
1017 const TypeFunc* OptoRuntime::montgomerySquare_Type() {
1018 // create input type (domain)
1019 int num_args = 7;
1020 int argcnt = num_args;
1021 const Type** fields = TypeTuple::fields(argcnt);
1022 int argp = TypeFunc::Parms;
1023 fields[argp++] = TypePtr::NOTNULL; // a
1024 fields[argp++] = TypePtr::NOTNULL; // n
1025 fields[argp++] = TypeInt::INT; // len
1026 fields[argp++] = TypeLong::LONG; // inv
1027 fields[argp++] = Type::HALF;
1028 fields[argp++] = TypePtr::NOTNULL; // scratch
1029 fields[argp++] = TypePtr::NOTNULL; // result
1030 assert(argp == TypeFunc::Parms+argcnt, "correct decoding");
1031 const TypeTuple* domain = TypeTuple::make(TypeFunc::Parms+argcnt, fields);
1032
1033 // result type needed
1034 fields = TypeTuple::fields(1);
1035 fields[TypeFunc::Parms+0] = TypePtr::NOTNULL;
1036
1037 const TypeTuple* range = TypeTuple::make(TypeFunc::Parms, fields);
1038 return TypeFunc::make(domain, range);
1039 }
1040
1041
1042 //------------- Interpreter state access for on stack replacement
1043 const TypeFunc* OptoRuntime::osr_end_Type() {
1044 // create input type (domain)
1045 const Type **fields = TypeTuple::fields(1);
1046 fields[TypeFunc::Parms+0] = TypeRawPtr::BOTTOM; // OSR temp buf
1047 const TypeTuple *domain = TypeTuple::make(TypeFunc::Parms+1, fields);
1048
1049 // create result type
1050 fields = TypeTuple::fields(1);
1051 // fields[TypeFunc::Parms+0] = TypeInstPtr::NOTNULL; // locked oop
1052 fields[TypeFunc::Parms+0] = NULL; // void
1053 const TypeTuple *range = TypeTuple::make(TypeFunc::Parms, fields);
1054 return TypeFunc::make(domain, range);
1055 }
1056
1057 //-------------- methodData update helpers
1058
1059 const TypeFunc* OptoRuntime::profile_receiver_type_Type() {
|