858
859 void reset_last_Java_frame(Register thread);
860
861 // thread in the default location (rthread)
862 void reset_last_Java_frame(bool clear_fp);
863
864 // Stores
865 void store_check(Register obj); // store check for obj - register is destroyed afterwards
866 void store_check(Register obj, Address dst); // same as above, dst is exact store location (reg. is destroyed)
867
868 void resolve_jobject(Register value, Register tmp1, Register tmp2);
869 void resolve_global_jobject(Register value, Register tmp1, Register tmp2);
870
871 // C 'boolean' to Java boolean: x == 0 ? 0 : 1
872 void c2bool(Register x);
873
874 void load_method_holder_cld(Register rresult, Register rmethod);
875 void load_method_holder(Register holder, Register method);
876
877 // oop manipulations
878 void load_klass(Register dst, Register src);
879 void store_klass(Register dst, Register src);
880 void cmp_klass(Register oop, Register trial_klass, Register tmp);
881
882 void resolve_weak_handle(Register result, Register tmp1, Register tmp2);
883 void resolve_oop_handle(Register result, Register tmp1, Register tmp2);
884 void load_mirror(Register dst, Register method, Register tmp1, Register tmp2);
885
886 void access_load_at(BasicType type, DecoratorSet decorators, Register dst, Address src,
887 Register tmp1, Register tmp2);
888
889 void access_store_at(BasicType type, DecoratorSet decorators, Address dst, Register val,
890 Register tmp1, Register tmp2, Register tmp3);
891
892 void load_heap_oop(Register dst, Address src, Register tmp1,
893 Register tmp2, DecoratorSet decorators = 0);
894
895 void load_heap_oop_not_null(Register dst, Address src, Register tmp1,
896 Register tmp2, DecoratorSet decorators = 0);
897 void store_heap_oop(Address dst, Register val, Register tmp1,
898 Register tmp2, Register tmp3, DecoratorSet decorators = 0);
899
900 // currently unimplemented
1622 int sve_vec_reg_size_in_bytes) {
1623 assert(sve_vec_reg_size_in_bytes % 16 == 0, "unexpected sve vector reg size");
1624 for (int i = 0; i < sve_vec_reg_size_in_bytes / 16; i++) {
1625 spill_copy128(src_offset, dst_offset);
1626 src_offset += 16;
1627 dst_offset += 16;
1628 }
1629 }
1630 void spill_copy_sve_predicate_stack_to_stack(int src_offset, int dst_offset,
1631 int sve_predicate_reg_size_in_bytes) {
1632 sve_ldr(ptrue, sve_spill_address(sve_predicate_reg_size_in_bytes, src_offset));
1633 sve_str(ptrue, sve_spill_address(sve_predicate_reg_size_in_bytes, dst_offset));
1634 reinitialize_ptrue();
1635 }
1636 void cache_wb(Address line);
1637 void cache_wbsync(bool is_pre);
1638
1639 // Code for java.lang.Thread::onSpinWait() intrinsic.
1640 void spin_wait();
1641
1642 void lightweight_lock(Register obj, Register t1, Register t2, Register t3, Label& slow);
1643 void lightweight_unlock(Register obj, Register t1, Register t2, Register t3, Label& slow);
1644
1645 private:
1646 // Check the current thread doesn't need a cross modify fence.
1647 void verify_cross_modify_fence_not_required() PRODUCT_RETURN;
1648
1649 };
1650
1651 #ifdef ASSERT
1652 inline bool AbstractAssembler::pd_check_instruction_mark() { return false; }
1653 #endif
1654
1655 /**
1656 * class SkipIfEqual:
1657 *
1658 * Instantiating this class will result in assembly code being output that will
1659 * jump around any code emitted between the creation of the instance and it's
1660 * automatic destruction at the end of a scope block, depending on the value of
1661 * the flag passed to the constructor, which will be checked at run-time.
1662 */
|
858
859 void reset_last_Java_frame(Register thread);
860
861 // thread in the default location (rthread)
862 void reset_last_Java_frame(bool clear_fp);
863
864 // Stores
865 void store_check(Register obj); // store check for obj - register is destroyed afterwards
866 void store_check(Register obj, Address dst); // same as above, dst is exact store location (reg. is destroyed)
867
868 void resolve_jobject(Register value, Register tmp1, Register tmp2);
869 void resolve_global_jobject(Register value, Register tmp1, Register tmp2);
870
871 // C 'boolean' to Java boolean: x == 0 ? 0 : 1
872 void c2bool(Register x);
873
874 void load_method_holder_cld(Register rresult, Register rmethod);
875 void load_method_holder(Register holder, Register method);
876
877 // oop manipulations
878 void load_nklass_compact(Register dst, Register src);
879 void load_klass(Register dst, Register src);
880 void store_klass(Register dst, Register src);
881 void cmp_klass(Register oop, Register trial_klass, Register tmp);
882 void cmp_klass(Register src, Register dst, Register tmp1, Register tmp2);
883
884 void resolve_weak_handle(Register result, Register tmp1, Register tmp2);
885 void resolve_oop_handle(Register result, Register tmp1, Register tmp2);
886 void load_mirror(Register dst, Register method, Register tmp1, Register tmp2);
887
888 void access_load_at(BasicType type, DecoratorSet decorators, Register dst, Address src,
889 Register tmp1, Register tmp2);
890
891 void access_store_at(BasicType type, DecoratorSet decorators, Address dst, Register val,
892 Register tmp1, Register tmp2, Register tmp3);
893
894 void load_heap_oop(Register dst, Address src, Register tmp1,
895 Register tmp2, DecoratorSet decorators = 0);
896
897 void load_heap_oop_not_null(Register dst, Address src, Register tmp1,
898 Register tmp2, DecoratorSet decorators = 0);
899 void store_heap_oop(Address dst, Register val, Register tmp1,
900 Register tmp2, Register tmp3, DecoratorSet decorators = 0);
901
902 // currently unimplemented
1624 int sve_vec_reg_size_in_bytes) {
1625 assert(sve_vec_reg_size_in_bytes % 16 == 0, "unexpected sve vector reg size");
1626 for (int i = 0; i < sve_vec_reg_size_in_bytes / 16; i++) {
1627 spill_copy128(src_offset, dst_offset);
1628 src_offset += 16;
1629 dst_offset += 16;
1630 }
1631 }
1632 void spill_copy_sve_predicate_stack_to_stack(int src_offset, int dst_offset,
1633 int sve_predicate_reg_size_in_bytes) {
1634 sve_ldr(ptrue, sve_spill_address(sve_predicate_reg_size_in_bytes, src_offset));
1635 sve_str(ptrue, sve_spill_address(sve_predicate_reg_size_in_bytes, dst_offset));
1636 reinitialize_ptrue();
1637 }
1638 void cache_wb(Address line);
1639 void cache_wbsync(bool is_pre);
1640
1641 // Code for java.lang.Thread::onSpinWait() intrinsic.
1642 void spin_wait();
1643
1644 void lightweight_lock(Register basic_lock, Register obj, Register t1, Register t2, Register t3, Label& slow);
1645 void lightweight_unlock(Register obj, Register t1, Register t2, Register t3, Label& slow);
1646
1647 private:
1648 // Check the current thread doesn't need a cross modify fence.
1649 void verify_cross_modify_fence_not_required() PRODUCT_RETURN;
1650
1651 };
1652
1653 #ifdef ASSERT
1654 inline bool AbstractAssembler::pd_check_instruction_mark() { return false; }
1655 #endif
1656
1657 /**
1658 * class SkipIfEqual:
1659 *
1660 * Instantiating this class will result in assembly code being output that will
1661 * jump around any code emitted between the creation of the instance and it's
1662 * automatic destruction at the end of a scope block, depending on the value of
1663 * the flag passed to the constructor, which will be checked at run-time.
1664 */
|