< prev index next >

src/hotspot/cpu/arm/macroAssembler_arm.cpp

Print this page




2882     ldr_literal(PC, address_literal);
2883 #endif
2884     bind_literal(address_literal);
2885     bind(ret_addr);
2886   }
2887   return offset();
2888 }
2889 
2890 // ((OopHandle)result).resolve();
2891 void MacroAssembler::resolve_oop_handle(Register result) {
2892   // OopHandle::resolve is an indirection.
2893   ldr(result, Address(result, 0));
2894 }
2895 
2896 void MacroAssembler::load_mirror(Register mirror, Register method, Register tmp) {
2897   const int mirror_offset = in_bytes(Klass::java_mirror_offset());
2898   ldr(tmp, Address(method, Method::const_offset()));
2899   ldr(tmp, Address(tmp,  ConstMethod::constants_offset()));
2900   ldr(tmp, Address(tmp, ConstantPool::pool_holder_offset_in_bytes()));
2901   ldr(mirror, Address(tmp, mirror_offset));

2902 }
2903 
2904 
2905 ///////////////////////////////////////////////////////////////////////////////
2906 
2907 // Compressed pointers
2908 
2909 #ifdef AARCH64
2910 
2911 void MacroAssembler::load_klass(Register dst_klass, Register src_oop) {
2912   if (UseCompressedClassPointers) {
2913     ldr_w(dst_klass, Address(src_oop, oopDesc::klass_offset_in_bytes()));
2914     decode_klass_not_null(dst_klass);
2915   } else {
2916     ldr(dst_klass, Address(src_oop, oopDesc::klass_offset_in_bytes()));
2917   }
2918 }
2919 
2920 #else
2921 




2882     ldr_literal(PC, address_literal);
2883 #endif
2884     bind_literal(address_literal);
2885     bind(ret_addr);
2886   }
2887   return offset();
2888 }
2889 
2890 // ((OopHandle)result).resolve();
2891 void MacroAssembler::resolve_oop_handle(Register result) {
2892   // OopHandle::resolve is an indirection.
2893   ldr(result, Address(result, 0));
2894 }
2895 
2896 void MacroAssembler::load_mirror(Register mirror, Register method, Register tmp) {
2897   const int mirror_offset = in_bytes(Klass::java_mirror_offset());
2898   ldr(tmp, Address(method, Method::const_offset()));
2899   ldr(tmp, Address(tmp,  ConstMethod::constants_offset()));
2900   ldr(tmp, Address(tmp, ConstantPool::pool_holder_offset_in_bytes()));
2901   ldr(mirror, Address(tmp, mirror_offset));
2902   resolve_oop_handle(mirror);
2903 }
2904 
2905 
2906 ///////////////////////////////////////////////////////////////////////////////
2907 
2908 // Compressed pointers
2909 
2910 #ifdef AARCH64
2911 
2912 void MacroAssembler::load_klass(Register dst_klass, Register src_oop) {
2913   if (UseCompressedClassPointers) {
2914     ldr_w(dst_klass, Address(src_oop, oopDesc::klass_offset_in_bytes()));
2915     decode_klass_not_null(dst_klass);
2916   } else {
2917     ldr(dst_klass, Address(src_oop, oopDesc::klass_offset_in_bytes()));
2918   }
2919 }
2920 
2921 #else
2922 


< prev index next >