equal
deleted
inserted
replaced
965 // r13: senderSP must preserved for slow path |
965 // r13: senderSP must preserved for slow path |
966 // esp: args |
966 // esp: args |
967 |
967 |
968 Label slow_path; |
968 Label slow_path; |
969 // If we need a safepoint check, generate full interpreter entry. |
969 // If we need a safepoint check, generate full interpreter entry. |
970 ExternalAddress state(SafepointSynchronize::address_of_state()); |
970 __ safepoint_poll(slow_path); |
971 unsigned long offset; |
|
972 __ adrp(rscratch1, ExternalAddress(SafepointSynchronize::address_of_state()), offset); |
|
973 __ ldrw(rscratch1, Address(rscratch1, offset)); |
|
974 assert(SafepointSynchronize::_not_synchronized == 0, "rewrite this code"); |
|
975 __ cbnz(rscratch1, slow_path); |
|
976 |
971 |
977 // We don't generate local frame and don't align stack because |
972 // We don't generate local frame and don't align stack because |
978 // we call stub code and there is no safepoint on this path. |
973 // we call stub code and there is no safepoint on this path. |
979 |
974 |
980 // Load parameters |
975 // Load parameters |
984 |
979 |
985 // Arguments are reversed on java expression stack |
980 // Arguments are reversed on java expression stack |
986 __ ldrw(val, Address(esp, 0)); // byte value |
981 __ ldrw(val, Address(esp, 0)); // byte value |
987 __ ldrw(crc, Address(esp, wordSize)); // Initial CRC |
982 __ ldrw(crc, Address(esp, wordSize)); // Initial CRC |
988 |
983 |
|
984 unsigned long offset; |
989 __ adrp(tbl, ExternalAddress(StubRoutines::crc_table_addr()), offset); |
985 __ adrp(tbl, ExternalAddress(StubRoutines::crc_table_addr()), offset); |
990 __ add(tbl, tbl, offset); |
986 __ add(tbl, tbl, offset); |
991 |
987 |
992 __ mvnw(crc, crc); // ~crc |
988 __ mvnw(crc, crc); // ~crc |
993 __ update_byte_crc32(crc, val, tbl); |
989 __ update_byte_crc32(crc, val, tbl); |
1018 // rmethod,: Method* |
1014 // rmethod,: Method* |
1019 // r13: senderSP must preserved for slow path |
1015 // r13: senderSP must preserved for slow path |
1020 |
1016 |
1021 Label slow_path; |
1017 Label slow_path; |
1022 // If we need a safepoint check, generate full interpreter entry. |
1018 // If we need a safepoint check, generate full interpreter entry. |
1023 ExternalAddress state(SafepointSynchronize::address_of_state()); |
1019 __ safepoint_poll(slow_path); |
1024 unsigned long offset; |
|
1025 __ adrp(rscratch1, ExternalAddress(SafepointSynchronize::address_of_state()), offset); |
|
1026 __ ldrw(rscratch1, Address(rscratch1, offset)); |
|
1027 assert(SafepointSynchronize::_not_synchronized == 0, "rewrite this code"); |
|
1028 __ cbnz(rscratch1, slow_path); |
|
1029 |
1020 |
1030 // We don't generate local frame and don't align stack because |
1021 // We don't generate local frame and don't align stack because |
1031 // we call stub code and there is no safepoint on this path. |
1022 // we call stub code and there is no safepoint on this path. |
1032 |
1023 |
1033 // Load parameters |
1024 // Load parameters |
1373 __ stlrw(rscratch1, rscratch2); |
1364 __ stlrw(rscratch1, rscratch2); |
1374 |
1365 |
1375 if (os::is_MP()) { |
1366 if (os::is_MP()) { |
1376 if (UseMembar) { |
1367 if (UseMembar) { |
1377 // Force this write out before the read below |
1368 // Force this write out before the read below |
1378 __ dsb(Assembler::SY); |
1369 __ dmb(Assembler::ISH); |
1379 } else { |
1370 } else { |
1380 // Write serialization page so VM thread can do a pseudo remote membar. |
1371 // Write serialization page so VM thread can do a pseudo remote membar. |
1381 // We use the current thread pointer to calculate a thread specific |
1372 // We use the current thread pointer to calculate a thread specific |
1382 // offset to write to within the page. This minimizes bus traffic |
1373 // offset to write to within the page. This minimizes bus traffic |
1383 // due to cache line collision. |
1374 // due to cache line collision. |
1385 } |
1376 } |
1386 } |
1377 } |
1387 |
1378 |
1388 // check for safepoint operation in progress and/or pending suspend requests |
1379 // check for safepoint operation in progress and/or pending suspend requests |
1389 { |
1380 { |
1390 Label Continue; |
1381 Label L, Continue; |
1391 { |
1382 __ safepoint_poll_acquire(L); |
1392 unsigned long offset; |
|
1393 __ adrp(rscratch2, SafepointSynchronize::address_of_state(), offset); |
|
1394 __ ldrw(rscratch2, Address(rscratch2, offset)); |
|
1395 } |
|
1396 assert(SafepointSynchronize::_not_synchronized == 0, |
|
1397 "SafepointSynchronize::_not_synchronized"); |
|
1398 Label L; |
|
1399 __ cbnz(rscratch2, L); |
|
1400 __ ldrw(rscratch2, Address(rthread, JavaThread::suspend_flags_offset())); |
1383 __ ldrw(rscratch2, Address(rthread, JavaThread::suspend_flags_offset())); |
1401 __ cbz(rscratch2, Continue); |
1384 __ cbz(rscratch2, Continue); |
1402 __ bind(L); |
1385 __ bind(L); |
1403 |
1386 |
1404 // Don't use call_VM as it will see a possible pending exception |
1387 // Don't use call_VM as it will see a possible pending exception |