3066 __ BIND(L_failed); |
3066 __ BIND(L_failed); |
3067 __ retl(); |
3067 __ retl(); |
3068 __ delayed()->sub(G0, 1, O0); // return -1 |
3068 __ delayed()->sub(G0, 1, O0); // return -1 |
3069 return start; |
3069 return start; |
3070 } |
3070 } |
|
3071 |
|
3072 // |
|
3073 // Generate stub for heap zeroing. |
|
3074 // "to" address is aligned to jlong (8 bytes). |
|
3075 // |
|
3076 // Arguments for generated stub: |
|
3077 // to: O0 |
|
3078 // count: O1 treated as signed (count of HeapWord) |
|
3079 // count could be 0 |
|
3080 // |
|
3081 address generate_zero_aligned_words(const char* name) { |
|
3082 __ align(CodeEntryAlignment); |
|
3083 StubCodeMark mark(this, "StubRoutines", name); |
|
3084 address start = __ pc(); |
|
3085 |
|
3086 const Register to = O0; // source array address |
|
3087 const Register count = O1; // HeapWords count |
|
3088 const Register temp = O2; // scratch |
|
3089 |
|
3090 Label Ldone; |
|
3091 __ sllx(count, LogHeapWordSize, count); // to bytes count |
|
3092 // Use BIS for zeroing |
|
3093 __ bis_zeroing(to, count, temp, Ldone); |
|
3094 __ bind(Ldone); |
|
3095 __ retl(); |
|
3096 __ delayed()->nop(); |
|
3097 return start; |
|
3098 } |
3071 |
3099 |
3072 void generate_arraycopy_stubs() { |
3100 void generate_arraycopy_stubs() { |
3073 address entry; |
3101 address entry; |
3074 address entry_jbyte_arraycopy; |
3102 address entry_jbyte_arraycopy; |
3075 address entry_jshort_arraycopy; |
3103 address entry_jshort_arraycopy; |
3193 StubRoutines::_jshort_fill = generate_fill(T_SHORT, false, "jshort_fill"); |
3221 StubRoutines::_jshort_fill = generate_fill(T_SHORT, false, "jshort_fill"); |
3194 StubRoutines::_jint_fill = generate_fill(T_INT, false, "jint_fill"); |
3222 StubRoutines::_jint_fill = generate_fill(T_INT, false, "jint_fill"); |
3195 StubRoutines::_arrayof_jbyte_fill = generate_fill(T_BYTE, true, "arrayof_jbyte_fill"); |
3223 StubRoutines::_arrayof_jbyte_fill = generate_fill(T_BYTE, true, "arrayof_jbyte_fill"); |
3196 StubRoutines::_arrayof_jshort_fill = generate_fill(T_SHORT, true, "arrayof_jshort_fill"); |
3224 StubRoutines::_arrayof_jshort_fill = generate_fill(T_SHORT, true, "arrayof_jshort_fill"); |
3197 StubRoutines::_arrayof_jint_fill = generate_fill(T_INT, true, "arrayof_jint_fill"); |
3225 StubRoutines::_arrayof_jint_fill = generate_fill(T_INT, true, "arrayof_jint_fill"); |
|
3226 |
|
3227 if (UseBlockZeroing) { |
|
3228 StubRoutines::_zero_aligned_words = generate_zero_aligned_words("zero_aligned_words"); |
|
3229 } |
3198 } |
3230 } |
3199 |
3231 |
3200 void generate_initial() { |
3232 void generate_initial() { |
3201 // Generates all stubs and initializes the entry points |
3233 // Generates all stubs and initializes the entry points |
3202 |
3234 |