967 __ adrp(rscratch1, ExternalAddress(SafepointSynchronize::address_of_state()), offset); 968 __ ldrw(rscratch1, Address(rscratch1, offset)); 969 assert(SafepointSynchronize::_not_synchronized == 0, "rewrite this code"); 970 __ cbnz(rscratch1, slow_path); 971 972 // We don't generate local frame and don't align stack because 973 // we call stub code and there is no safepoint on this path. 974 975 // Load parameters 976 const Register crc = c_rarg0; // crc 977 const Register val = c_rarg1; // source java byte value 978 const Register tbl = c_rarg2; // scratch 979 980 // Arguments are reversed on java expression stack 981 __ ldrw(val, Address(esp, 0)); // byte value 982 __ ldrw(crc, Address(esp, wordSize)); // Initial CRC 983 984 __ adrp(tbl, ExternalAddress(StubRoutines::crc_table_addr()), offset); 985 __ add(tbl, tbl, offset); 986 987 __ ornw(crc, zr, crc); // ~crc 988 __ update_byte_crc32(crc, val, tbl); 989 __ ornw(crc, zr, crc); // ~crc 990 991 // result in c_rarg0 992 993 __ andr(sp, r13, -16); 994 __ ret(lr); 995 996 // generate a vanilla native entry as the slow path 997 __ bind(slow_path); 998 __ jump_to_entry(Interpreter::entry_for_kind(Interpreter::native)); 999 return entry; 1000 } 1001 return NULL; 1002 } 1003 1004 /** 1005 * Method entry for static native methods: 1006 * int java.util.zip.CRC32.updateBytes(int crc, byte[] b, int off, int len) 1007 * int java.util.zip.CRC32.updateByteBuffer(int crc, long buf, int off, int len) 1008 */ 1009 address TemplateInterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) { | 967 __ adrp(rscratch1, ExternalAddress(SafepointSynchronize::address_of_state()), offset); 968 __ ldrw(rscratch1, Address(rscratch1, offset)); 969 assert(SafepointSynchronize::_not_synchronized == 0, "rewrite this code"); 970 __ cbnz(rscratch1, slow_path); 971 972 // We don't generate local frame and don't align stack because 973 // we call stub code and there is no safepoint on this path. 974 975 // Load parameters 976 const Register crc = c_rarg0; // crc 977 const Register val = c_rarg1; // source java byte value 978 const Register tbl = c_rarg2; // scratch 979 980 // Arguments are reversed on java expression stack 981 __ ldrw(val, Address(esp, 0)); // byte value 982 __ ldrw(crc, Address(esp, wordSize)); // Initial CRC 983 984 __ adrp(tbl, ExternalAddress(StubRoutines::crc_table_addr()), offset); 985 __ add(tbl, tbl, offset); 986 987 __ mvnw(crc, crc); // ~crc 988 __ update_byte_crc32(crc, val, tbl); 989 __ mvnw(crc, crc); // ~crc 990 991 // result in c_rarg0 992 993 __ andr(sp, r13, -16); 994 __ ret(lr); 995 996 // generate a vanilla native entry as the slow path 997 __ bind(slow_path); 998 __ jump_to_entry(Interpreter::entry_for_kind(Interpreter::native)); 999 return entry; 1000 } 1001 return NULL; 1002 } 1003 1004 /** 1005 * Method entry for static native methods: 1006 * int java.util.zip.CRC32.updateBytes(int crc, byte[] b, int off, int len) 1007 * int java.util.zip.CRC32.updateByteBuffer(int crc, long buf, int off, int len) 1008 */ 1009 address TemplateInterpreterGenerator::generate_CRC32_updateBytes_entry(AbstractInterpreter::MethodKind kind) { |