611 void restore_cpu_control_state_after_jni();
612
613 // prints msg, dumps registers and stops execution
614 void stop(const char* msg);
615
616 // prints msg and continues
617 void warn(const char* msg);
618
619 // dumps registers and other state
620 void print_state();
621
622 static void debug32(int rdi, int rsi, int rbp, int rsp, int rbx, int rdx, int rcx, int rax, int eip, char* msg);
623 static void debug64(char* msg, int64_t pc, int64_t regs[]);
624 static void print_state32(int rdi, int rsi, int rbp, int rsp, int rbx, int rdx, int rcx, int rax, int eip);
625 static void print_state64(int64_t pc, int64_t regs[]);
626
627 void os_breakpoint();
628
629 void untested() { stop("untested"); }
630
631 void unimplemented(const char* what = "") { char* b = new char[1024]; jio_snprintf(b, 1024, "unimplemented: %s", what); stop(b); }
632
633 void should_not_reach_here() { stop("should not reach here"); }
634
635 void print_CPU_state();
636
637 // Stack overflow checking
638 void bang_stack_with_offset(int offset) {
639 // stack grows down, caller passes positive offset
640 assert(offset > 0, "must bang with negative offset");
641 movl(Address(rsp, (-offset)), rax);
642 }
643
644 // Writes to stack successive pages until offset reached to check for
645 // stack overflow + shadow pages. Also, clobbers tmp
646 void bang_stack_size(Register size, Register tmp);
647
648 // Check for reserved stack access in method being exited (for JIT)
649 void reserved_stack_check();
650
651 virtual RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr,
|
611 void restore_cpu_control_state_after_jni();
612
613 // prints msg, dumps registers and stops execution
614 void stop(const char* msg);
615
616 // prints msg and continues
617 void warn(const char* msg);
618
619 // dumps registers and other state
620 void print_state();
621
622 static void debug32(int rdi, int rsi, int rbp, int rsp, int rbx, int rdx, int rcx, int rax, int eip, char* msg);
623 static void debug64(char* msg, int64_t pc, int64_t regs[]);
624 static void print_state32(int rdi, int rsi, int rbp, int rsp, int rbx, int rdx, int rcx, int rax, int eip);
625 static void print_state64(int64_t pc, int64_t regs[]);
626
627 void os_breakpoint();
628
629 void untested() { stop("untested"); }
630
631 void unimplemented(const char* what = "");
632
633 void should_not_reach_here() { stop("should not reach here"); }
634
635 void print_CPU_state();
636
637 // Stack overflow checking
638 void bang_stack_with_offset(int offset) {
639 // stack grows down, caller passes positive offset
640 assert(offset > 0, "must bang with negative offset");
641 movl(Address(rsp, (-offset)), rax);
642 }
643
644 // Writes to stack successive pages until offset reached to check for
645 // stack overflow + shadow pages. Also, clobbers tmp
646 void bang_stack_size(Register size, Register tmp);
647
648 // Check for reserved stack access in method being exited (for JIT)
649 void reserved_stack_check();
650
651 virtual RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr,
|