< prev index next >

src/hotspot/cpu/s390/stubGenerator_s390.cpp

Print this page




1291     generate_disjoint_copy(aligned, 8, false, false);
1292     return __ addr_at(start_off);
1293   }
1294 
1295 
1296   address generate_disjoint_oop_copy(bool aligned, const char * name, bool dest_uninitialized) {
1297     StubCodeMark mark(this, "StubRoutines", name);
1298     // This is the zarch specific stub generator for oop array copy.
1299     // Refer to generate_disjoint_copy for a list of prereqs and features.
1300     unsigned int start_off = __ offset();  // Remember stub start address (is rtn value).
1301     unsigned int size      = UseCompressedOops ? 4 : 8;
1302 
1303     DecoratorSet decorators = ARRAYCOPY_DISJOINT;
1304     if (dest_uninitialized) {
1305       decorators |= AS_DEST_NOT_INITIALIZED;
1306     }
1307     if (aligned) {
1308       decorators |= ARRAYCOPY_ALIGNED;
1309     }
1310 
1311     BarrierSetAssembler *bs = Universe::heap()->barrier_set()->barrier_set_assembler();
1312     bs->arraycopy_prologue(_masm, decorators, T_OBJECT, Z_ARG1, Z_ARG2, Z_ARG3);
1313 
1314     generate_disjoint_copy(aligned, size, true, true);
1315 
1316     bs->arraycopy_epilogue(_masm, decorators, T_OBJECT, Z_ARG2, Z_ARG3, true);
1317 
1318     return __ addr_at(start_off);
1319   }
1320 
1321 
1322   address generate_conjoint_byte_copy(bool aligned, const char * name) {
1323     StubCodeMark mark(this, "StubRoutines", name);
1324     // This is the zarch specific stub generator for overlapping byte array copy.
1325     // Refer to generate_conjoint_copy for a list of prereqs and features:
1326     unsigned int   start_off = __ offset();  // Remember stub start address (is rtn value).
1327     address nooverlap_target = aligned ? StubRoutines::arrayof_jbyte_disjoint_arraycopy()
1328                                        : StubRoutines::jbyte_disjoint_arraycopy();
1329 
1330     array_overlap_test(nooverlap_target, 0); // Branch away to nooverlap_target if disjoint.
1331     generate_conjoint_copy(aligned, 1, false);


1383     // This is the zarch specific stub generator for overlapping oop array copy.
1384     // Refer to generate_conjoint_copy for a list of prereqs and features.
1385     unsigned int start_off = __ offset();  // Remember stub start address (is rtn value).
1386     unsigned int size      = UseCompressedOops ? 4 : 8;
1387     unsigned int shift     = UseCompressedOops ? 2 : 3;
1388 
1389     address nooverlap_target = aligned ? StubRoutines::arrayof_oop_disjoint_arraycopy(dest_uninitialized)
1390                                        : StubRoutines::oop_disjoint_arraycopy(dest_uninitialized);
1391 
1392     // Branch to disjoint_copy (if applicable) before pre_barrier to avoid double pre_barrier.
1393     array_overlap_test(nooverlap_target, shift);  // Branch away to nooverlap_target if disjoint.
1394 
1395     DecoratorSet decorators = 0;
1396     if (dest_uninitialized) {
1397       decorators |= AS_DEST_NOT_INITIALIZED;
1398     }
1399     if (aligned) {
1400       decorators |= ARRAYCOPY_ALIGNED;
1401     }
1402 
1403     BarrierSetAssembler *bs = Universe::heap()->barrier_set()->barrier_set_assembler();
1404     bs->arraycopy_prologue(_masm, decorators, T_OBJECT, Z_ARG1, Z_ARG2, Z_ARG3);
1405 
1406     generate_conjoint_copy(aligned, size, true);  // Must preserve ARG2, ARG3.
1407 
1408     bs->arraycopy_epilogue(_masm, decorators, T_OBJECT, Z_ARG2, Z_ARG3, true);
1409 
1410     return __ addr_at(start_off);
1411   }
1412 
1413 
1414   void generate_arraycopy_stubs() {
1415 
1416     // Note: the disjoint stubs must be generated first, some of
1417     // the conjoint stubs use them.
1418     StubRoutines::_jbyte_disjoint_arraycopy      = generate_disjoint_byte_copy (false, "jbyte_disjoint_arraycopy");
1419     StubRoutines::_jshort_disjoint_arraycopy     = generate_disjoint_short_copy(false, "jshort_disjoint_arraycopy");
1420     StubRoutines::_jint_disjoint_arraycopy       = generate_disjoint_int_copy  (false, "jint_disjoint_arraycopy");
1421     StubRoutines::_jlong_disjoint_arraycopy      = generate_disjoint_long_copy (false, "jlong_disjoint_arraycopy");
1422     StubRoutines::_oop_disjoint_arraycopy        = generate_disjoint_oop_copy  (false, "oop_disjoint_arraycopy", false);
1423     StubRoutines::_oop_disjoint_arraycopy_uninit = generate_disjoint_oop_copy  (false, "oop_disjoint_arraycopy_uninit", true);




1291     generate_disjoint_copy(aligned, 8, false, false);
1292     return __ addr_at(start_off);
1293   }
1294 
1295 
1296   address generate_disjoint_oop_copy(bool aligned, const char * name, bool dest_uninitialized) {
1297     StubCodeMark mark(this, "StubRoutines", name);
1298     // This is the zarch specific stub generator for oop array copy.
1299     // Refer to generate_disjoint_copy for a list of prereqs and features.
1300     unsigned int start_off = __ offset();  // Remember stub start address (is rtn value).
1301     unsigned int size      = UseCompressedOops ? 4 : 8;
1302 
1303     DecoratorSet decorators = ARRAYCOPY_DISJOINT;
1304     if (dest_uninitialized) {
1305       decorators |= AS_DEST_NOT_INITIALIZED;
1306     }
1307     if (aligned) {
1308       decorators |= ARRAYCOPY_ALIGNED;
1309     }
1310 
1311     BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
1312     bs->arraycopy_prologue(_masm, decorators, T_OBJECT, Z_ARG1, Z_ARG2, Z_ARG3);
1313 
1314     generate_disjoint_copy(aligned, size, true, true);
1315 
1316     bs->arraycopy_epilogue(_masm, decorators, T_OBJECT, Z_ARG2, Z_ARG3, true);
1317 
1318     return __ addr_at(start_off);
1319   }
1320 
1321 
1322   address generate_conjoint_byte_copy(bool aligned, const char * name) {
1323     StubCodeMark mark(this, "StubRoutines", name);
1324     // This is the zarch specific stub generator for overlapping byte array copy.
1325     // Refer to generate_conjoint_copy for a list of prereqs and features:
1326     unsigned int   start_off = __ offset();  // Remember stub start address (is rtn value).
1327     address nooverlap_target = aligned ? StubRoutines::arrayof_jbyte_disjoint_arraycopy()
1328                                        : StubRoutines::jbyte_disjoint_arraycopy();
1329 
1330     array_overlap_test(nooverlap_target, 0); // Branch away to nooverlap_target if disjoint.
1331     generate_conjoint_copy(aligned, 1, false);


1383     // This is the zarch specific stub generator for overlapping oop array copy.
1384     // Refer to generate_conjoint_copy for a list of prereqs and features.
1385     unsigned int start_off = __ offset();  // Remember stub start address (is rtn value).
1386     unsigned int size      = UseCompressedOops ? 4 : 8;
1387     unsigned int shift     = UseCompressedOops ? 2 : 3;
1388 
1389     address nooverlap_target = aligned ? StubRoutines::arrayof_oop_disjoint_arraycopy(dest_uninitialized)
1390                                        : StubRoutines::oop_disjoint_arraycopy(dest_uninitialized);
1391 
1392     // Branch to disjoint_copy (if applicable) before pre_barrier to avoid double pre_barrier.
1393     array_overlap_test(nooverlap_target, shift);  // Branch away to nooverlap_target if disjoint.
1394 
1395     DecoratorSet decorators = 0;
1396     if (dest_uninitialized) {
1397       decorators |= AS_DEST_NOT_INITIALIZED;
1398     }
1399     if (aligned) {
1400       decorators |= ARRAYCOPY_ALIGNED;
1401     }
1402 
1403     BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
1404     bs->arraycopy_prologue(_masm, decorators, T_OBJECT, Z_ARG1, Z_ARG2, Z_ARG3);
1405 
1406     generate_conjoint_copy(aligned, size, true);  // Must preserve ARG2, ARG3.
1407 
1408     bs->arraycopy_epilogue(_masm, decorators, T_OBJECT, Z_ARG2, Z_ARG3, true);
1409 
1410     return __ addr_at(start_off);
1411   }
1412 
1413 
1414   void generate_arraycopy_stubs() {
1415 
1416     // Note: the disjoint stubs must be generated first, some of
1417     // the conjoint stubs use them.
1418     StubRoutines::_jbyte_disjoint_arraycopy      = generate_disjoint_byte_copy (false, "jbyte_disjoint_arraycopy");
1419     StubRoutines::_jshort_disjoint_arraycopy     = generate_disjoint_short_copy(false, "jshort_disjoint_arraycopy");
1420     StubRoutines::_jint_disjoint_arraycopy       = generate_disjoint_int_copy  (false, "jint_disjoint_arraycopy");
1421     StubRoutines::_jlong_disjoint_arraycopy      = generate_disjoint_long_copy (false, "jlong_disjoint_arraycopy");
1422     StubRoutines::_oop_disjoint_arraycopy        = generate_disjoint_oop_copy  (false, "oop_disjoint_arraycopy", false);
1423     StubRoutines::_oop_disjoint_arraycopy_uninit = generate_disjoint_oop_copy  (false, "oop_disjoint_arraycopy_uninit", true);


< prev index next >