564 inline void get_ctr_el0(Register reg)
565 {
566 mrs(0b011, 0b0000, 0b0000, 0b001, reg);
567 }
568
569 // idiv variant which deals with MINLONG as dividend and -1 as divisor
570 int corrected_idivl(Register result, Register ra, Register rb,
571 bool want_remainder, Register tmp = rscratch1);
572 int corrected_idivq(Register result, Register ra, Register rb,
573 bool want_remainder, Register tmp = rscratch1);
574
575 // Support for NULL-checks
576 //
577 // Generates code that causes a NULL OS exception if the content of reg is NULL.
578 // If the accessed location is M[reg + offset] and the offset is known, provide the
579 // offset. No explicit code generation is needed if the offset is within a certain
580 // range (0 <= offset <= page_size).
581
582 virtual void null_check(Register reg, int offset = -1);
583 static bool needs_explicit_null_check(intptr_t offset);
584
585 static address target_addr_for_insn(address insn_addr, unsigned insn);
586 static address target_addr_for_insn(address insn_addr) {
587 unsigned insn = *(unsigned*)insn_addr;
588 return target_addr_for_insn(insn_addr, insn);
589 }
590
591 // Required platform-specific helpers for Label::patch_instructions.
592 // They _shadow_ the declarations in AbstractAssembler, which are undefined.
593 static int pd_patch_instruction_size(address branch, address target);
594 static void pd_patch_instruction(address branch, address target, const char* file = NULL, int line = 0) {
595 pd_patch_instruction_size(branch, target);
596 }
597 static address pd_call_destination(address branch) {
598 return target_addr_for_insn(branch);
599 }
600 #ifndef PRODUCT
601 static void pd_print_patched_instruction(address branch);
602 #endif
|
564 inline void get_ctr_el0(Register reg)
565 {
566 mrs(0b011, 0b0000, 0b0000, 0b001, reg);
567 }
568
569 // idiv variant which deals with MINLONG as dividend and -1 as divisor
570 int corrected_idivl(Register result, Register ra, Register rb,
571 bool want_remainder, Register tmp = rscratch1);
572 int corrected_idivq(Register result, Register ra, Register rb,
573 bool want_remainder, Register tmp = rscratch1);
574
575 // Support for NULL-checks
576 //
577 // Generates code that causes a NULL OS exception if the content of reg is NULL.
578 // If the accessed location is M[reg + offset] and the offset is known, provide the
579 // offset. No explicit code generation is needed if the offset is within a certain
580 // range (0 <= offset <= page_size).
581
582 virtual void null_check(Register reg, int offset = -1);
583 static bool needs_explicit_null_check(intptr_t offset);
584 static bool uses_implicit_null_check(void* address);
585
586 static address target_addr_for_insn(address insn_addr, unsigned insn);
587 static address target_addr_for_insn(address insn_addr) {
588 unsigned insn = *(unsigned*)insn_addr;
589 return target_addr_for_insn(insn_addr, insn);
590 }
591
592 // Required platform-specific helpers for Label::patch_instructions.
593 // They _shadow_ the declarations in AbstractAssembler, which are undefined.
594 static int pd_patch_instruction_size(address branch, address target);
595 static void pd_patch_instruction(address branch, address target, const char* file = NULL, int line = 0) {
596 pd_patch_instruction_size(branch, target);
597 }
598 static address pd_call_destination(address branch) {
599 return target_addr_for_insn(branch);
600 }
601 #ifndef PRODUCT
602 static void pd_print_patched_instruction(address branch);
603 #endif
|