2357 } |
2357 } |
2358 |
2358 |
2359 /** |
2359 /** |
2360 * Arguments: |
2360 * Arguments: |
2361 * |
2361 * |
|
2362 * Inputs: |
|
2363 * c_rarg0 - int crc |
|
2364 * c_rarg1 - byte* buf |
|
2365 * c_rarg2 - int length |
|
2366 * c_rarg3 - int* table |
|
2367 * |
|
2368 * Ouput: |
|
2369 * rax - int crc result |
|
2370 */ |
|
2371 address generate_updateBytesCRC32C() { |
|
2372 assert(UseCRC32CIntrinsics, "what are we doing here?"); |
|
2373 |
|
2374 __ align(CodeEntryAlignment); |
|
2375 StubCodeMark mark(this, "StubRoutines", "updateBytesCRC32C"); |
|
2376 |
|
2377 address start = __ pc(); |
|
2378 |
|
2379 const Register crc = c_rarg0; // crc |
|
2380 const Register buf = c_rarg1; // source java byte array address |
|
2381 const Register len = c_rarg2; // length |
|
2382 const Register table0 = c_rarg3; // crc_table address |
|
2383 const Register table1 = c_rarg4; |
|
2384 const Register table2 = c_rarg5; |
|
2385 const Register table3 = c_rarg6; |
|
2386 const Register tmp3 = c_rarg7; |
|
2387 |
|
2388 BLOCK_COMMENT("Entry:"); |
|
2389 __ enter(); // required for proper stackwalking of RuntimeStub frame |
|
2390 |
|
2391 __ kernel_crc32c(crc, buf, len, |
|
2392 table0, table1, table2, table3, rscratch1, rscratch2, tmp3); |
|
2393 |
|
2394 __ leave(); // required for proper stackwalking of RuntimeStub frame |
|
2395 __ ret(lr); |
|
2396 |
|
2397 return start; |
|
2398 } |
|
2399 |
|
2400 /** |
|
2401 * Arguments: |
|
2402 * |
2362 * Input: |
2403 * Input: |
2363 * c_rarg0 - x address |
2404 * c_rarg0 - x address |
2364 * c_rarg1 - x length |
2405 * c_rarg1 - x length |
2365 * c_rarg2 - y address |
2406 * c_rarg2 - y address |
2366 * c_rarg3 - y lenth |
2407 * c_rarg3 - y lenth |
2577 if (UseSHA256Intrinsics) { |
2618 if (UseSHA256Intrinsics) { |
2578 StubRoutines::_sha256_implCompress = generate_sha256_implCompress(false, "sha256_implCompress"); |
2619 StubRoutines::_sha256_implCompress = generate_sha256_implCompress(false, "sha256_implCompress"); |
2579 StubRoutines::_sha256_implCompressMB = generate_sha256_implCompress(true, "sha256_implCompressMB"); |
2620 StubRoutines::_sha256_implCompressMB = generate_sha256_implCompress(true, "sha256_implCompressMB"); |
2580 } |
2621 } |
2581 |
2622 |
|
2623 if (UseCRC32CIntrinsics) { |
|
2624 StubRoutines::_updateBytesCRC32C = generate_updateBytesCRC32C(); |
|
2625 } |
|
2626 |
2582 // Safefetch stubs. |
2627 // Safefetch stubs. |
2583 generate_safefetch("SafeFetch32", sizeof(int), &StubRoutines::_safefetch32_entry, |
2628 generate_safefetch("SafeFetch32", sizeof(int), &StubRoutines::_safefetch32_entry, |
2584 &StubRoutines::_safefetch32_fault_pc, |
2629 &StubRoutines::_safefetch32_fault_pc, |
2585 &StubRoutines::_safefetch32_continuation_pc); |
2630 &StubRoutines::_safefetch32_continuation_pc); |
2586 generate_safefetch("SafeFetchN", sizeof(intptr_t), &StubRoutines::_safefetchN_entry, |
2631 generate_safefetch("SafeFetchN", sizeof(intptr_t), &StubRoutines::_safefetchN_entry, |