< prev index next >

src/cpu/aarch64/vm/c1_LIRAssembler_aarch64.cpp

Print this page
rev 12502 : 8172144: AArch64: Implement "JEP 270: Reserved Stack Areas for Critical Sections"
Reviewed-by: duke


 515   __ mov(rscratch1, r0);
 516   __ pop(0x3, sp);                 // r0 & r1
 517   __ leave();
 518   __ br(rscratch1);
 519   address polling_page(os::get_polling_page());
 520   assert(os::is_poll_address(polling_page), "should be");
 521   unsigned long off;
 522   __ adrp(rscratch1, Address(polling_page, rtype), off);
 523   __ bind(poll);
 524   if (info)
 525     add_debug_info_for_branch(info);  // This isn't just debug info:
 526                                       // it's the oop map
 527   else
 528     __ code_section()->relocate(pc(), rtype);
 529   __ ldrw(zr, Address(rscratch1, off));
 530   __ bind(nope);
 531 }
 532 
 533 void LIR_Assembler::return_op(LIR_Opr result) {
 534   assert(result->is_illegal() || !result->is_single_cpu() || result->as_register() == r0, "word returns are in r0,");

 535   // Pop the stack before the safepoint code
 536   __ remove_frame(initial_frame_size_in_bytes());





 537   address polling_page(os::get_polling_page());
 538   __ read_polling_page(rscratch1, polling_page, relocInfo::poll_return_type);
 539   __ ret(lr);
 540 }
 541 
 542 int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) {
 543   address polling_page(os::get_polling_page());
 544   guarantee(info != NULL, "Shouldn't be NULL");
 545   assert(os::is_poll_address(polling_page), "should be");
 546   unsigned long off;
 547   __ adrp(rscratch1, Address(polling_page, relocInfo::poll_type), off);
 548   assert(off == 0, "must be");
 549   add_debug_info_for_branch(info);  // This isn't just debug info:
 550   // it's the oop map
 551   __ read_polling_page(rscratch1, relocInfo::poll_type);
 552   return __ offset();
 553 }
 554 
 555 
 556 void LIR_Assembler::move_regs(Register from_reg, Register to_reg) {




 515   __ mov(rscratch1, r0);
 516   __ pop(0x3, sp);                 // r0 & r1
 517   __ leave();
 518   __ br(rscratch1);
 519   address polling_page(os::get_polling_page());
 520   assert(os::is_poll_address(polling_page), "should be");
 521   unsigned long off;
 522   __ adrp(rscratch1, Address(polling_page, rtype), off);
 523   __ bind(poll);
 524   if (info)
 525     add_debug_info_for_branch(info);  // This isn't just debug info:
 526                                       // it's the oop map
 527   else
 528     __ code_section()->relocate(pc(), rtype);
 529   __ ldrw(zr, Address(rscratch1, off));
 530   __ bind(nope);
 531 }
 532 
 533 void LIR_Assembler::return_op(LIR_Opr result) {
 534   assert(result->is_illegal() || !result->is_single_cpu() || result->as_register() == r0, "word returns are in r0,");
 535 
 536   // Pop the stack before the safepoint code
 537   __ remove_frame(initial_frame_size_in_bytes());
 538 
 539   if (StackReservedPages > 0 && compilation()->has_reserved_stack_access()) {
 540     __ reserved_stack_check();
 541   }
 542 
 543   address polling_page(os::get_polling_page());
 544   __ read_polling_page(rscratch1, polling_page, relocInfo::poll_return_type);
 545   __ ret(lr);
 546 }
 547 
 548 int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) {
 549   address polling_page(os::get_polling_page());
 550   guarantee(info != NULL, "Shouldn't be NULL");
 551   assert(os::is_poll_address(polling_page), "should be");
 552   unsigned long off;
 553   __ adrp(rscratch1, Address(polling_page, relocInfo::poll_type), off);
 554   assert(off == 0, "must be");
 555   add_debug_info_for_branch(info);  // This isn't just debug info:
 556   // it's the oop map
 557   __ read_polling_page(rscratch1, relocInfo::poll_type);
 558   return __ offset();
 559 }
 560 
 561 
 562 void LIR_Assembler::move_regs(Register from_reg, Register to_reg) {


< prev index next >