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