< prev index next >

src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp

Print this page
rev 48494 : 8195112: x86 (32 bit): implementation for Thread-local handshakes
Reviewed-by:


1131       // We use the current thread pointer to calculate a thread specific
1132       // offset to write to within the page. This minimizes bus traffic
1133       // due to cache line collision.
1134       __ serialize_memory(thread, rcx);
1135     }
1136   }
1137 
1138 #ifndef _LP64
1139   if (AlwaysRestoreFPU) {
1140     //  Make sure the control word is correct.
1141     __ fldcw(ExternalAddress(StubRoutines::addr_fpu_cntrl_wrd_std()));
1142   }
1143 #endif // _LP64
1144 
1145   // check for safepoint operation in progress and/or pending suspend requests
1146   {
1147     Label Continue;
1148     Label slow_path;
1149 
1150 #ifndef _LP64
1151     __ safepoint_poll(slow_path);
1152 #else
1153     __ safepoint_poll(slow_path, r15_thread, rscratch1);
1154 #endif
1155 
1156     __ cmpl(Address(thread, JavaThread::suspend_flags_offset()), 0);
1157     __ jcc(Assembler::equal, Continue);
1158     __ bind(slow_path);
1159 
1160     // Don't use call_VM as it will see a possible pending exception
1161     // and forward it and never return here preventing us from
1162     // clearing _last_native_pc down below.  Also can't use
1163     // call_VM_leaf either as it will check to see if r13 & r14 are
1164     // preserved and correspond to the bcp/locals pointers. So we do a
1165     // runtime call by hand.
1166     //
1167 #ifndef _LP64
1168     __ push(thread);
1169     __ call(RuntimeAddress(CAST_FROM_FN_PTR(address,
1170                                             JavaThread::check_special_condition_for_native_trans)));
1171     __ increment(rsp, wordSize);




1131       // We use the current thread pointer to calculate a thread specific
1132       // offset to write to within the page. This minimizes bus traffic
1133       // due to cache line collision.
1134       __ serialize_memory(thread, rcx);
1135     }
1136   }
1137 
1138 #ifndef _LP64
1139   if (AlwaysRestoreFPU) {
1140     //  Make sure the control word is correct.
1141     __ fldcw(ExternalAddress(StubRoutines::addr_fpu_cntrl_wrd_std()));
1142   }
1143 #endif // _LP64
1144 
1145   // check for safepoint operation in progress and/or pending suspend requests
1146   {
1147     Label Continue;
1148     Label slow_path;
1149 
1150 #ifndef _LP64
1151     __ safepoint_poll(slow_path, thread, noreg);
1152 #else
1153     __ safepoint_poll(slow_path, r15_thread, rscratch1);
1154 #endif
1155 
1156     __ cmpl(Address(thread, JavaThread::suspend_flags_offset()), 0);
1157     __ jcc(Assembler::equal, Continue);
1158     __ bind(slow_path);
1159 
1160     // Don't use call_VM as it will see a possible pending exception
1161     // and forward it and never return here preventing us from
1162     // clearing _last_native_pc down below.  Also can't use
1163     // call_VM_leaf either as it will check to see if r13 & r14 are
1164     // preserved and correspond to the bcp/locals pointers. So we do a
1165     // runtime call by hand.
1166     //
1167 #ifndef _LP64
1168     __ push(thread);
1169     __ call(RuntimeAddress(CAST_FROM_FN_PTR(address,
1170                                             JavaThread::check_special_condition_for_native_trans)));
1171     __ increment(rsp, wordSize);


< prev index next >