< prev index next >

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

Print this page




5803 
5804 // get_thread() can be called anywhere inside generated code so we
5805 // need to save whatever non-callee save context might get clobbered
5806 // by the call to JavaThread::aarch64_get_thread_helper() or, indeed,
5807 // the call setup code.
5808 //
5809 // aarch64_get_thread_helper() clobbers only r0, r1, and flags.
5810 //
5811 void MacroAssembler::get_thread(Register dst) {
5812   RegSet saved_regs = RegSet::range(r0, r1) + lr - dst;
5813   push(saved_regs, sp);
5814 
5815   mov(lr, CAST_FROM_FN_PTR(address, JavaThread::aarch64_get_thread_helper));
5816   blrt(lr, 1, 0, 1);
5817   if (dst != c_rarg0) {
5818     mov(dst, c_rarg0);
5819   }
5820 
5821   pop(saved_regs, sp);
5822 }




















5803 
5804 // get_thread() can be called anywhere inside generated code so we
5805 // need to save whatever non-callee save context might get clobbered
5806 // by the call to JavaThread::aarch64_get_thread_helper() or, indeed,
5807 // the call setup code.
5808 //
5809 // aarch64_get_thread_helper() clobbers only r0, r1, and flags.
5810 //
5811 void MacroAssembler::get_thread(Register dst) {
5812   RegSet saved_regs = RegSet::range(r0, r1) + lr - dst;
5813   push(saved_regs, sp);
5814 
5815   mov(lr, CAST_FROM_FN_PTR(address, JavaThread::aarch64_get_thread_helper));
5816   blrt(lr, 1, 0, 1);
5817   if (dst != c_rarg0) {
5818     mov(dst, c_rarg0);
5819   }
5820 
5821   pop(saved_regs, sp);
5822 }
5823 
5824 void MacroAssembler::cache_wb(Address line)
5825 {
5826   assert(line.getMode() == Address::base_plus_offset, "mode should be base_plus_offset");
5827   assert(line.index() == noreg, "index should be noreg");
5828   assert(line.offset() == 0, "offset should be 0");
5829   // would like to assert this
5830   // assert(line._ext.shift == 0, "shift should be zero");
5831   dc(Assembler::CVAC, line.base());
5832 }
5833 
5834 void MacroAssembler::cache_wbsync(bool is_pre)
5835 {
5836   // we only need a barrier post sync
5837   if (!is_pre) {
5838     membar(Assembler::AnyAny);
5839   }
5840 }
< prev index next >