2810 if (!is_static) pop_and_check_object(obj);
2811 oopDesc::bs()->interpreter_write_barrier(_masm, obj);
2812 __ strd(v0, field);
2813 if (!is_static) {
2814 patch_bytecode(Bytecodes::_fast_dputfield, bc, r1, true, byte_no);
2815 }
2816 }
2817
2818 #ifdef ASSERT
2819 __ b(Done);
2820
2821 __ bind(notDouble);
2822 __ stop("Bad state");
2823 #endif
2824
2825 __ bind(Done);
2826
2827 {
2828 Label notVolatile;
2829 __ tbz(r5, ConstantPoolCacheEntry::is_volatile_shift, notVolatile);
2830 __ membar(MacroAssembler::StoreLoad);
2831 __ bind(notVolatile);
2832 }
2833 }
2834
2835 void TemplateTable::putfield(int byte_no)
2836 {
2837 putfield_or_static(byte_no, false);
2838 }
2839
2840 void TemplateTable::putstatic(int byte_no) {
2841 putfield_or_static(byte_no, true);
2842 }
2843
2844 void TemplateTable::jvmti_post_fast_field_mod()
2845 {
2846 if (JvmtiExport::can_post_field_modification()) {
2847 // Check to see if a field modification watch has been set before
2848 // we take the time to call into the VM.
2849 Label L2;
2850 __ lea(rscratch1, ExternalAddress((address)JvmtiExport::get_field_modification_count_addr()));
2949 __ strb(r0, field);
2950 break;
2951 case Bytecodes::_fast_sputfield:
2952 // fall through
2953 case Bytecodes::_fast_cputfield:
2954 __ strh(r0, field);
2955 break;
2956 case Bytecodes::_fast_fputfield:
2957 __ strs(v0, field);
2958 break;
2959 case Bytecodes::_fast_dputfield:
2960 __ strd(v0, field);
2961 break;
2962 default:
2963 ShouldNotReachHere();
2964 }
2965
2966 {
2967 Label notVolatile;
2968 __ tbz(r3, ConstantPoolCacheEntry::is_volatile_shift, notVolatile);
2969 __ membar(MacroAssembler::StoreLoad);
2970 __ bind(notVolatile);
2971 }
2972 }
2973
2974
2975 void TemplateTable::fast_accessfield(TosState state)
2976 {
2977 transition(atos, state);
2978 // Do the JVMTI work here to avoid disturbing the register state below
2979 if (JvmtiExport::can_post_field_access()) {
2980 // Check to see if a field access watch has been set before we
2981 // take the time to call into the VM.
2982 Label L1;
2983 __ lea(rscratch1, ExternalAddress((address) JvmtiExport::get_field_access_count_addr()));
2984 __ ldrw(r2, Address(rscratch1));
2985 __ cbzw(r2, L1);
2986 // access constant pool cache entry
2987 __ get_cache_entry_pointer_at_bcp(c_rarg2, rscratch2, 1);
2988 __ verify_oop(r0);
2989 __ push_ptr(r0); // save object pointer before call_VM() clobbers it
|
2810 if (!is_static) pop_and_check_object(obj);
2811 oopDesc::bs()->interpreter_write_barrier(_masm, obj);
2812 __ strd(v0, field);
2813 if (!is_static) {
2814 patch_bytecode(Bytecodes::_fast_dputfield, bc, r1, true, byte_no);
2815 }
2816 }
2817
2818 #ifdef ASSERT
2819 __ b(Done);
2820
2821 __ bind(notDouble);
2822 __ stop("Bad state");
2823 #endif
2824
2825 __ bind(Done);
2826
2827 {
2828 Label notVolatile;
2829 __ tbz(r5, ConstantPoolCacheEntry::is_volatile_shift, notVolatile);
2830 __ membar(MacroAssembler::StoreLoad | MacroAssembler::StoreStore);
2831 __ bind(notVolatile);
2832 }
2833 }
2834
2835 void TemplateTable::putfield(int byte_no)
2836 {
2837 putfield_or_static(byte_no, false);
2838 }
2839
2840 void TemplateTable::putstatic(int byte_no) {
2841 putfield_or_static(byte_no, true);
2842 }
2843
2844 void TemplateTable::jvmti_post_fast_field_mod()
2845 {
2846 if (JvmtiExport::can_post_field_modification()) {
2847 // Check to see if a field modification watch has been set before
2848 // we take the time to call into the VM.
2849 Label L2;
2850 __ lea(rscratch1, ExternalAddress((address)JvmtiExport::get_field_modification_count_addr()));
2949 __ strb(r0, field);
2950 break;
2951 case Bytecodes::_fast_sputfield:
2952 // fall through
2953 case Bytecodes::_fast_cputfield:
2954 __ strh(r0, field);
2955 break;
2956 case Bytecodes::_fast_fputfield:
2957 __ strs(v0, field);
2958 break;
2959 case Bytecodes::_fast_dputfield:
2960 __ strd(v0, field);
2961 break;
2962 default:
2963 ShouldNotReachHere();
2964 }
2965
2966 {
2967 Label notVolatile;
2968 __ tbz(r3, ConstantPoolCacheEntry::is_volatile_shift, notVolatile);
2969 __ membar(MacroAssembler::StoreLoad | MacroAssembler::StoreStore);
2970 __ bind(notVolatile);
2971 }
2972 }
2973
2974
2975 void TemplateTable::fast_accessfield(TosState state)
2976 {
2977 transition(atos, state);
2978 // Do the JVMTI work here to avoid disturbing the register state below
2979 if (JvmtiExport::can_post_field_access()) {
2980 // Check to see if a field access watch has been set before we
2981 // take the time to call into the VM.
2982 Label L1;
2983 __ lea(rscratch1, ExternalAddress((address) JvmtiExport::get_field_access_count_addr()));
2984 __ ldrw(r2, Address(rscratch1));
2985 __ cbzw(r2, L1);
2986 // access constant pool cache entry
2987 __ get_cache_entry_pointer_at_bcp(c_rarg2, rscratch2, 1);
2988 __ verify_oop(r0);
2989 __ push_ptr(r0); // save object pointer before call_VM() clobbers it
|