< prev index next >

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

Print this page




2609       tty->print_cr("r17 = 0x%016lx", regs[17]);
2610       tty->print_cr("r18 = 0x%016lx", regs[18]);
2611       tty->print_cr("r19 = 0x%016lx", regs[19]);
2612       tty->print_cr("r20 = 0x%016lx", regs[20]);
2613       tty->print_cr("r21 = 0x%016lx", regs[21]);
2614       tty->print_cr("r22 = 0x%016lx", regs[22]);
2615       tty->print_cr("r23 = 0x%016lx", regs[23]);
2616       tty->print_cr("r24 = 0x%016lx", regs[24]);
2617       tty->print_cr("r25 = 0x%016lx", regs[25]);
2618       tty->print_cr("r26 = 0x%016lx", regs[26]);
2619       tty->print_cr("r27 = 0x%016lx", regs[27]);
2620       tty->print_cr("r28 = 0x%016lx", regs[28]);
2621       tty->print_cr("r30 = 0x%016lx", regs[30]);
2622       tty->print_cr("r31 = 0x%016lx", regs[31]);
2623       BREAKPOINT;
2624     }
2625   }
2626   fatal("DEBUG MESSAGE: %s", msg);
2627 }
2628 
2629 void MacroAssembler::push_call_clobbered_registers() {
2630   int step = 4 * wordSize;
2631   push(RegSet::range(r0, r18) - RegSet::of(rscratch1, rscratch2), sp);
2632   sub(sp, sp, step);
2633   mov(rscratch1, -step);
2634   // Push v0-v7, v16-v31.
2635   for (int i = 31; i>= 4; i -= 4) {
2636     if (i <= v7->encoding() || i >= v16->encoding())
2637       st1(as_FloatRegister(i-3), as_FloatRegister(i-2), as_FloatRegister(i-1),
2638           as_FloatRegister(i), T1D, Address(post(sp, rscratch1)));
2639   }
2640   st1(as_FloatRegister(0), as_FloatRegister(1), as_FloatRegister(2),
2641       as_FloatRegister(3), T1D, Address(sp));
2642 }
2643 
2644 void MacroAssembler::pop_call_clobbered_registers() {
2645   for (int i = 0; i < 32; i += 4) {
2646     if (i <= v7->encoding() || i >= v16->encoding())
2647       ld1(as_FloatRegister(i), as_FloatRegister(i+1), as_FloatRegister(i+2),
2648           as_FloatRegister(i+3), T1D, Address(post(sp, 4 * wordSize)));
2649   }
2650 
2651   pop(RegSet::range(r0, r18) - RegSet::of(rscratch1, rscratch2), sp);
2652 }
2653 
2654 void MacroAssembler::push_CPU_state(bool save_vectors) {
2655   int step = (save_vectors ? 8 : 4) * wordSize;
2656   push(0x3fffffff, sp);         // integer registers except lr & sp
2657   mov(rscratch1, -step);
2658   sub(sp, sp, step);
2659   for (int i = 28; i >= 4; i -= 4) {
2660     st1(as_FloatRegister(i), as_FloatRegister(i+1), as_FloatRegister(i+2),
2661         as_FloatRegister(i+3), save_vectors ? T2D : T1D, Address(post(sp, rscratch1)));
2662   }
2663   st1(v0, v1, v2, v3, save_vectors ? T2D : T1D, sp);
2664 }
2665 
2666 void MacroAssembler::pop_CPU_state(bool restore_vectors) {
2667   int step = (restore_vectors ? 8 : 4) * wordSize;
2668   for (int i = 0; i <= 28; i += 4)
2669     ld1(as_FloatRegister(i), as_FloatRegister(i+1), as_FloatRegister(i+2),
2670         as_FloatRegister(i+3), restore_vectors ? T2D : T1D, Address(post(sp, step)));
2671   pop(0x3fffffff, sp);         // integer registers except lr & sp




2609       tty->print_cr("r17 = 0x%016lx", regs[17]);
2610       tty->print_cr("r18 = 0x%016lx", regs[18]);
2611       tty->print_cr("r19 = 0x%016lx", regs[19]);
2612       tty->print_cr("r20 = 0x%016lx", regs[20]);
2613       tty->print_cr("r21 = 0x%016lx", regs[21]);
2614       tty->print_cr("r22 = 0x%016lx", regs[22]);
2615       tty->print_cr("r23 = 0x%016lx", regs[23]);
2616       tty->print_cr("r24 = 0x%016lx", regs[24]);
2617       tty->print_cr("r25 = 0x%016lx", regs[25]);
2618       tty->print_cr("r26 = 0x%016lx", regs[26]);
2619       tty->print_cr("r27 = 0x%016lx", regs[27]);
2620       tty->print_cr("r28 = 0x%016lx", regs[28]);
2621       tty->print_cr("r30 = 0x%016lx", regs[30]);
2622       tty->print_cr("r31 = 0x%016lx", regs[31]);
2623       BREAKPOINT;
2624     }
2625   }
2626   fatal("DEBUG MESSAGE: %s", msg);
2627 }
2628 
2629 void MacroAssembler::push_call_clobbered_registers_except(RegSet exclude) {
2630   int step = 4 * wordSize;
2631   push(RegSet::range(r0, r18) - RegSet::of(rscratch1, rscratch2) - exclude, sp);
2632   sub(sp, sp, step);
2633   mov(rscratch1, -step);
2634   // Push v0-v7, v16-v31.
2635   for (int i = 31; i>= 4; i -= 4) {
2636     if (i <= v7->encoding() || i >= v16->encoding())
2637       st1(as_FloatRegister(i-3), as_FloatRegister(i-2), as_FloatRegister(i-1),
2638           as_FloatRegister(i), T1D, Address(post(sp, rscratch1)));
2639   }
2640   st1(as_FloatRegister(0), as_FloatRegister(1), as_FloatRegister(2),
2641       as_FloatRegister(3), T1D, Address(sp));
2642 }
2643 
2644 void MacroAssembler::pop_call_clobbered_registers_except(RegSet exclude) {
2645   for (int i = 0; i < 32; i += 4) {
2646     if (i <= v7->encoding() || i >= v16->encoding())
2647       ld1(as_FloatRegister(i), as_FloatRegister(i+1), as_FloatRegister(i+2),
2648           as_FloatRegister(i+3), T1D, Address(post(sp, 4 * wordSize)));
2649   }
2650 
2651   pop(RegSet::range(r0, r18) - RegSet::of(rscratch1, rscratch2) - exclude, sp);
2652 }
2653 
2654 void MacroAssembler::push_CPU_state(bool save_vectors) {
2655   int step = (save_vectors ? 8 : 4) * wordSize;
2656   push(0x3fffffff, sp);         // integer registers except lr & sp
2657   mov(rscratch1, -step);
2658   sub(sp, sp, step);
2659   for (int i = 28; i >= 4; i -= 4) {
2660     st1(as_FloatRegister(i), as_FloatRegister(i+1), as_FloatRegister(i+2),
2661         as_FloatRegister(i+3), save_vectors ? T2D : T1D, Address(post(sp, rscratch1)));
2662   }
2663   st1(v0, v1, v2, v3, save_vectors ? T2D : T1D, sp);
2664 }
2665 
2666 void MacroAssembler::pop_CPU_state(bool restore_vectors) {
2667   int step = (restore_vectors ? 8 : 4) * wordSize;
2668   for (int i = 0; i <= 28; i += 4)
2669     ld1(as_FloatRegister(i), as_FloatRegister(i+1), as_FloatRegister(i+2),
2670         as_FloatRegister(i+3), restore_vectors ? T2D : T1D, Address(post(sp, step)));
2671   pop(0x3fffffff, sp);         // integer registers except lr & sp


< prev index next >