< prev index next >

src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp

Print this page
8248238: Adding Windows support to OpenJDK on AArch64

Summary: LP64 vs LLP64 changes to add Windows support

Contributed-by: Monica Beckwith <monica.beckwith@microsoft.com>, Ludovic Henry <luhenry@microsoft.com>
Reviewed-by:


 977     // rmethod: Method*
 978     // r13: senderSP must preserved for slow path
 979     // esp: args
 980 
 981     Label slow_path;
 982     // If we need a safepoint check, generate full interpreter entry.
 983     __ safepoint_poll(slow_path);
 984 
 985     // We don't generate local frame and don't align stack because
 986     // we call stub code and there is no safepoint on this path.
 987 
 988     // Load parameters
 989     const Register crc = c_rarg0;  // crc
 990     const Register val = c_rarg1;  // source java byte value
 991     const Register tbl = c_rarg2;  // scratch
 992 
 993     // Arguments are reversed on java expression stack
 994     __ ldrw(val, Address(esp, 0));              // byte value
 995     __ ldrw(crc, Address(esp, wordSize));       // Initial CRC
 996 
 997     unsigned long offset;
 998     __ adrp(tbl, ExternalAddress(StubRoutines::crc_table_addr()), offset);
 999     __ add(tbl, tbl, offset);
1000 
1001     __ mvnw(crc, crc); // ~crc
1002     __ update_byte_crc32(crc, val, tbl);
1003     __ mvnw(crc, crc); // ~crc
1004 
1005     // result in c_rarg0
1006 
1007     __ andr(sp, r13, -16);
1008     __ ret(lr);
1009 
1010     // generate a vanilla native entry as the slow path
1011     __ bind(slow_path);
1012     __ jump_to_entry(Interpreter::entry_for_kind(Interpreter::native));
1013     return entry;
1014   }
1015   return NULL;
1016 }
1017 




 977     // rmethod: Method*
 978     // r13: senderSP must preserved for slow path
 979     // esp: args
 980 
 981     Label slow_path;
 982     // If we need a safepoint check, generate full interpreter entry.
 983     __ safepoint_poll(slow_path);
 984 
 985     // We don't generate local frame and don't align stack because
 986     // we call stub code and there is no safepoint on this path.
 987 
 988     // Load parameters
 989     const Register crc = c_rarg0;  // crc
 990     const Register val = c_rarg1;  // source java byte value
 991     const Register tbl = c_rarg2;  // scratch
 992 
 993     // Arguments are reversed on java expression stack
 994     __ ldrw(val, Address(esp, 0));              // byte value
 995     __ ldrw(crc, Address(esp, wordSize));       // Initial CRC
 996 
 997     uint64_t offset;
 998     __ adrp(tbl, ExternalAddress(StubRoutines::crc_table_addr()), offset);
 999     __ add(tbl, tbl, offset);
1000 
1001     __ mvnw(crc, crc); // ~crc
1002     __ update_byte_crc32(crc, val, tbl);
1003     __ mvnw(crc, crc); // ~crc
1004 
1005     // result in c_rarg0
1006 
1007     __ andr(sp, r13, -16);
1008     __ ret(lr);
1009 
1010     // generate a vanilla native entry as the slow path
1011     __ bind(slow_path);
1012     __ jump_to_entry(Interpreter::entry_for_kind(Interpreter::native));
1013     return entry;
1014   }
1015   return NULL;
1016 }
1017 


< prev index next >