287 } |
287 } |
288 return NULL; |
288 return NULL; |
289 } |
289 } |
290 |
290 |
291 /** |
291 /** |
292 * Method entry for static native methods: |
292 * Method entry for static (non-native) methods: |
293 * int java.util.zip.CRC32C.updateBytes(int crc, byte[] b, int off, int end) |
293 * int java.util.zip.CRC32C.updateBytes(int crc, byte[] b, int off, int end) |
294 * int java.util.zip.CRC32C.updateByteBuffer(int crc, long address, int off, int end) |
294 * int java.util.zip.CRC32C.updateDirectByteBuffer(int crc, long address, int off, int end) |
295 */ |
295 */ |
296 address TemplateInterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) { |
296 address TemplateInterpreterGenerator::generate_CRC32C_updateBytes_entry(AbstractInterpreter::MethodKind kind) { |
297 if (UseCRC32CIntrinsics) { |
297 if (UseCRC32CIntrinsics) { |
298 address entry = __ pc(); |
298 address entry = __ pc(); |
299 // Load parameters |
299 // Load parameters |
304 const Register end = len; |
304 const Register end = len; |
305 |
305 |
306 // Arguments are reversed on java expression stack |
306 // Arguments are reversed on java expression stack |
307 // Calculate address of start element |
307 // Calculate address of start element |
308 if (kind == Interpreter::java_util_zip_CRC32C_updateDirectByteBuffer) { |
308 if (kind == Interpreter::java_util_zip_CRC32C_updateDirectByteBuffer) { |
309 __ movptr(buf, Address(rsp, 3 * wordSize)); // long buf |
309 __ movptr(buf, Address(rsp, 3 * wordSize)); // long address |
310 __ movl2ptr(off, Address(rsp, 2 * wordSize)); // offset |
310 __ movl2ptr(off, Address(rsp, 2 * wordSize)); // offset |
311 __ addq(buf, off); // + offset |
311 __ addq(buf, off); // + offset |
312 __ movl(crc, Address(rsp, 5 * wordSize)); // Initial CRC |
312 __ movl(crc, Address(rsp, 5 * wordSize)); // Initial CRC |
313 // Note on 5 * wordSize vs. 4 * wordSize: |
313 // Note on 5 * wordSize vs. 4 * wordSize: |
314 // * int java.util.zip.CRC32C.updateByteBuffer(int crc, long address, int off, int end) |
314 // * int java.util.zip.CRC32C.updateByteBuffer(int crc, long address, int off, int end) |