< prev index next >

src/share/vm/opto/library_call.cpp

Print this page
rev 11647 : 8161258: Simplify including platform files.
Summary: Include patform files with macros cpu_header() etc. Do various cleanups of macro usages. Remove _64/_32 from adlc generated files and platform .hpp files. Merge stubRoutines_x86*.hpp. Remove empty mutex_<os>* files.
Reviewed-by: dholmes, coleenp, kbarrett


3287   // (b) Interrupt bit on TLS must be false.
3288   Node* p = basic_plus_adr(top()/*!oop*/, tls_ptr, in_bytes(JavaThread::osthread_offset()));
3289   Node* osthread = make_load(NULL, p, TypeRawPtr::NOTNULL, T_ADDRESS, MemNode::unordered);
3290   p = basic_plus_adr(top()/*!oop*/, osthread, in_bytes(OSThread::interrupted_offset()));
3291 
3292   // Set the control input on the field _interrupted read to prevent it floating up.
3293   Node* int_bit = make_load(control(), p, TypeInt::BOOL, T_INT, MemNode::unordered);
3294   Node* cmp_bit = _gvn.transform(new CmpINode(int_bit, intcon(0)));
3295   Node* bol_bit = _gvn.transform(new BoolNode(cmp_bit, BoolTest::ne));
3296 
3297   IfNode* iff_bit = create_and_map_if(control(), bol_bit, PROB_UNLIKELY_MAG(3), COUNT_UNKNOWN);
3298 
3299   // First fast path:  if (!TLS._interrupted) return false;
3300   Node* false_bit = _gvn.transform(new IfFalseNode(iff_bit));
3301   result_rgn->init_req(no_int_result_path, false_bit);
3302   result_val->init_req(no_int_result_path, intcon(0));
3303 
3304   // drop through to next case
3305   set_control( _gvn.transform(new IfTrueNode(iff_bit)));
3306 
3307 #ifndef TARGET_OS_FAMILY_windows
3308   // (c) Or, if interrupt bit is set and clear_int is false, use 2nd fast path.
3309   Node* clr_arg = argument(1);
3310   Node* cmp_arg = _gvn.transform(new CmpINode(clr_arg, intcon(0)));
3311   Node* bol_arg = _gvn.transform(new BoolNode(cmp_arg, BoolTest::ne));
3312   IfNode* iff_arg = create_and_map_if(control(), bol_arg, PROB_FAIR, COUNT_UNKNOWN);
3313 
3314   // Second fast path:  ... else if (!clear_int) return true;
3315   Node* false_arg = _gvn.transform(new IfFalseNode(iff_arg));
3316   result_rgn->init_req(no_clear_result_path, false_arg);
3317   result_val->init_req(no_clear_result_path, intcon(1));
3318 
3319   // drop through to next case
3320   set_control( _gvn.transform(new IfTrueNode(iff_arg)));
3321 #else
3322   // To return true on Windows you must read the _interrupted field
3323   // and check the event state i.e. take the slow path.
3324 #endif // TARGET_OS_FAMILY_windows
3325 
3326   // (d) Otherwise, go to the slow path.
3327   slow_region->add_req(control());
3328   set_control( _gvn.transform(slow_region));
3329 
3330   if (stopped()) {
3331     // There is no slow path.
3332     result_rgn->init_req(slow_result_path, top());
3333     result_val->init_req(slow_result_path, top());
3334   } else {
3335     // non-virtual because it is a private non-static
3336     CallJavaNode* slow_call = generate_method_call(vmIntrinsics::_isInterrupted);
3337 
3338     Node* slow_val = set_results_for_java_call(slow_call);
3339     // this->control() comes from set_results_for_java_call
3340 
3341     Node* fast_io  = slow_call->in(TypeFunc::I_O);
3342     Node* fast_mem = slow_call->in(TypeFunc::Memory);
3343 
3344     // These two phis are pre-filled with copies of of the fast IO and Memory




3287   // (b) Interrupt bit on TLS must be false.
3288   Node* p = basic_plus_adr(top()/*!oop*/, tls_ptr, in_bytes(JavaThread::osthread_offset()));
3289   Node* osthread = make_load(NULL, p, TypeRawPtr::NOTNULL, T_ADDRESS, MemNode::unordered);
3290   p = basic_plus_adr(top()/*!oop*/, osthread, in_bytes(OSThread::interrupted_offset()));
3291 
3292   // Set the control input on the field _interrupted read to prevent it floating up.
3293   Node* int_bit = make_load(control(), p, TypeInt::BOOL, T_INT, MemNode::unordered);
3294   Node* cmp_bit = _gvn.transform(new CmpINode(int_bit, intcon(0)));
3295   Node* bol_bit = _gvn.transform(new BoolNode(cmp_bit, BoolTest::ne));
3296 
3297   IfNode* iff_bit = create_and_map_if(control(), bol_bit, PROB_UNLIKELY_MAG(3), COUNT_UNKNOWN);
3298 
3299   // First fast path:  if (!TLS._interrupted) return false;
3300   Node* false_bit = _gvn.transform(new IfFalseNode(iff_bit));
3301   result_rgn->init_req(no_int_result_path, false_bit);
3302   result_val->init_req(no_int_result_path, intcon(0));
3303 
3304   // drop through to next case
3305   set_control( _gvn.transform(new IfTrueNode(iff_bit)));
3306 
3307 #ifndef _WINDOWS
3308   // (c) Or, if interrupt bit is set and clear_int is false, use 2nd fast path.
3309   Node* clr_arg = argument(1);
3310   Node* cmp_arg = _gvn.transform(new CmpINode(clr_arg, intcon(0)));
3311   Node* bol_arg = _gvn.transform(new BoolNode(cmp_arg, BoolTest::ne));
3312   IfNode* iff_arg = create_and_map_if(control(), bol_arg, PROB_FAIR, COUNT_UNKNOWN);
3313 
3314   // Second fast path:  ... else if (!clear_int) return true;
3315   Node* false_arg = _gvn.transform(new IfFalseNode(iff_arg));
3316   result_rgn->init_req(no_clear_result_path, false_arg);
3317   result_val->init_req(no_clear_result_path, intcon(1));
3318 
3319   // drop through to next case
3320   set_control( _gvn.transform(new IfTrueNode(iff_arg)));
3321 #else
3322   // To return true on Windows you must read the _interrupted field
3323   // and check the event state i.e. take the slow path.
3324 #endif // _WINDOWS
3325 
3326   // (d) Otherwise, go to the slow path.
3327   slow_region->add_req(control());
3328   set_control( _gvn.transform(slow_region));
3329 
3330   if (stopped()) {
3331     // There is no slow path.
3332     result_rgn->init_req(slow_result_path, top());
3333     result_val->init_req(slow_result_path, top());
3334   } else {
3335     // non-virtual because it is a private non-static
3336     CallJavaNode* slow_call = generate_method_call(vmIntrinsics::_isInterrupted);
3337 
3338     Node* slow_val = set_results_for_java_call(slow_call);
3339     // this->control() comes from set_results_for_java_call
3340 
3341     Node* fast_io  = slow_call->in(TypeFunc::I_O);
3342     Node* fast_mem = slow_call->in(TypeFunc::Memory);
3343 
3344     // These two phis are pre-filled with copies of of the fast IO and Memory


< prev index next >