< prev index next >

src/hotspot/share/runtime/stubRoutines.cpp

Print this page




 152 address StubRoutines::_vectorizedMismatch = NULL;
 153 
 154 address StubRoutines::_dexp = NULL;
 155 address StubRoutines::_dlog = NULL;
 156 address StubRoutines::_dlog10 = NULL;
 157 address StubRoutines::_dpow = NULL;
 158 address StubRoutines::_dsin = NULL;
 159 address StubRoutines::_dcos = NULL;
 160 address StubRoutines::_dlibm_sin_cos_huge = NULL;
 161 address StubRoutines::_dlibm_reduce_pi04l = NULL;
 162 address StubRoutines::_dlibm_tan_cot_huge = NULL;
 163 address StubRoutines::_dtan = NULL;
 164 
 165 address StubRoutines::_safefetch32_entry                 = NULL;
 166 address StubRoutines::_safefetch32_fault_pc              = NULL;
 167 address StubRoutines::_safefetch32_continuation_pc       = NULL;
 168 address StubRoutines::_safefetchN_entry                  = NULL;
 169 address StubRoutines::_safefetchN_fault_pc               = NULL;
 170 address StubRoutines::_safefetchN_continuation_pc        = NULL;
 171 



 172 // Initialization
 173 //
 174 // Note: to break cycle with universe initialization, stubs are generated in two phases.
 175 // The first one generates stubs needed during universe init (e.g., _handle_must_compile_first_entry).
 176 // The second phase includes all other stubs (which may depend on universe being initialized.)
 177 
 178 extern void StubGenerator_generate(CodeBuffer* code, bool all); // only interface to generators
 179 
 180 void StubRoutines::initialize1() {
 181   if (_code1 == NULL) {
 182     ResourceMark rm;
 183     TraceTime timer("StubRoutines generation 1", TRACETIME_LOG(Info, startuptime));
 184     _code1 = BufferBlob::create("StubRoutines (1)", code_size1);
 185     if (_code1 == NULL) {
 186       vm_exit_out_of_memory(code_size1, OOM_MALLOC_ERROR, "CodeCache: no room for StubRoutines (1)");
 187     }
 188     CodeBuffer buffer(_code1);
 189     StubGenerator_generate(&buffer, false);
 190     // When new stubs added we need to make sure there is some space left
 191     // to catch situation when we should increase size again.


 464 #define RETURN_STUB(xxx_fill) { \
 465   name = #xxx_fill; \
 466   return StubRoutines::xxx_fill(); }
 467 
 468   switch (t) {
 469   case T_BYTE:
 470   case T_BOOLEAN:
 471     if (!aligned) RETURN_STUB(jbyte_fill);
 472     RETURN_STUB(arrayof_jbyte_fill);
 473   case T_CHAR:
 474   case T_SHORT:
 475     if (!aligned) RETURN_STUB(jshort_fill);
 476     RETURN_STUB(arrayof_jshort_fill);
 477   case T_INT:
 478   case T_FLOAT:
 479     if (!aligned) RETURN_STUB(jint_fill);
 480     RETURN_STUB(arrayof_jint_fill);
 481   case T_DOUBLE:
 482   case T_LONG:
 483   case T_ARRAY:

 484   case T_OBJECT:
 485   case T_NARROWOOP:
 486   case T_NARROWKLASS:
 487   case T_ADDRESS:
 488     // Currently unsupported
 489     return NULL;
 490 
 491   default:
 492     ShouldNotReachHere();
 493     return NULL;
 494   }
 495 
 496 #undef RETURN_STUB
 497 }
 498 
 499 // constants for computing the copy function
 500 enum {
 501   COPYFUNC_UNALIGNED = 0,
 502   COPYFUNC_ALIGNED = 1,                 // src, dest aligned to HeapWordSize
 503   COPYFUNC_CONJOINT = 0,




 152 address StubRoutines::_vectorizedMismatch = NULL;
 153 
 154 address StubRoutines::_dexp = NULL;
 155 address StubRoutines::_dlog = NULL;
 156 address StubRoutines::_dlog10 = NULL;
 157 address StubRoutines::_dpow = NULL;
 158 address StubRoutines::_dsin = NULL;
 159 address StubRoutines::_dcos = NULL;
 160 address StubRoutines::_dlibm_sin_cos_huge = NULL;
 161 address StubRoutines::_dlibm_reduce_pi04l = NULL;
 162 address StubRoutines::_dlibm_tan_cot_huge = NULL;
 163 address StubRoutines::_dtan = NULL;
 164 
 165 address StubRoutines::_safefetch32_entry                 = NULL;
 166 address StubRoutines::_safefetch32_fault_pc              = NULL;
 167 address StubRoutines::_safefetch32_continuation_pc       = NULL;
 168 address StubRoutines::_safefetchN_entry                  = NULL;
 169 address StubRoutines::_safefetchN_fault_pc               = NULL;
 170 address StubRoutines::_safefetchN_continuation_pc        = NULL;
 171 
 172 address StubRoutines::_load_value_type_fields_in_regs = NULL;
 173 address StubRoutines::_store_value_type_fields_to_buf = NULL;
 174 
 175 // Initialization
 176 //
 177 // Note: to break cycle with universe initialization, stubs are generated in two phases.
 178 // The first one generates stubs needed during universe init (e.g., _handle_must_compile_first_entry).
 179 // The second phase includes all other stubs (which may depend on universe being initialized.)
 180 
 181 extern void StubGenerator_generate(CodeBuffer* code, bool all); // only interface to generators
 182 
 183 void StubRoutines::initialize1() {
 184   if (_code1 == NULL) {
 185     ResourceMark rm;
 186     TraceTime timer("StubRoutines generation 1", TRACETIME_LOG(Info, startuptime));
 187     _code1 = BufferBlob::create("StubRoutines (1)", code_size1);
 188     if (_code1 == NULL) {
 189       vm_exit_out_of_memory(code_size1, OOM_MALLOC_ERROR, "CodeCache: no room for StubRoutines (1)");
 190     }
 191     CodeBuffer buffer(_code1);
 192     StubGenerator_generate(&buffer, false);
 193     // When new stubs added we need to make sure there is some space left
 194     // to catch situation when we should increase size again.


 467 #define RETURN_STUB(xxx_fill) { \
 468   name = #xxx_fill; \
 469   return StubRoutines::xxx_fill(); }
 470 
 471   switch (t) {
 472   case T_BYTE:
 473   case T_BOOLEAN:
 474     if (!aligned) RETURN_STUB(jbyte_fill);
 475     RETURN_STUB(arrayof_jbyte_fill);
 476   case T_CHAR:
 477   case T_SHORT:
 478     if (!aligned) RETURN_STUB(jshort_fill);
 479     RETURN_STUB(arrayof_jshort_fill);
 480   case T_INT:
 481   case T_FLOAT:
 482     if (!aligned) RETURN_STUB(jint_fill);
 483     RETURN_STUB(arrayof_jint_fill);
 484   case T_DOUBLE:
 485   case T_LONG:
 486   case T_ARRAY:
 487   case T_VALUETYPE:
 488   case T_OBJECT:
 489   case T_NARROWOOP:
 490   case T_NARROWKLASS:
 491   case T_ADDRESS:
 492     // Currently unsupported
 493     return NULL;
 494 
 495   default:
 496     ShouldNotReachHere();
 497     return NULL;
 498   }
 499 
 500 #undef RETURN_STUB
 501 }
 502 
 503 // constants for computing the copy function
 504 enum {
 505   COPYFUNC_UNALIGNED = 0,
 506   COPYFUNC_ALIGNED = 1,                 // src, dest aligned to HeapWordSize
 507   COPYFUNC_CONJOINT = 0,


< prev index next >