comparison src/share/vm/opto/library_call.cpp @ 787:aabd393cf1ee

6772683: Thread.isInterrupted() fails to return true on multiprocessor PC Summary: Set the control edge for the field _interrupted load in inline_native_isInterrupted(). Reviewed-by: never
author kvn
date Thu, 21 May 2009 10:05:36 -0700
parents 93c14e5562c4
children 8f5825e0aeaa
comparison
equal deleted inserted replaced
786:27d660246893 787:aabd393cf1ee
2591 2591
2592 // (b) Interrupt bit on TLS must be false. 2592 // (b) Interrupt bit on TLS must be false.
2593 Node* p = basic_plus_adr(top()/*!oop*/, tls_ptr, in_bytes(JavaThread::osthread_offset())); 2593 Node* p = basic_plus_adr(top()/*!oop*/, tls_ptr, in_bytes(JavaThread::osthread_offset()));
2594 Node* osthread = make_load(NULL, p, TypeRawPtr::NOTNULL, T_ADDRESS); 2594 Node* osthread = make_load(NULL, p, TypeRawPtr::NOTNULL, T_ADDRESS);
2595 p = basic_plus_adr(top()/*!oop*/, osthread, in_bytes(OSThread::interrupted_offset())); 2595 p = basic_plus_adr(top()/*!oop*/, osthread, in_bytes(OSThread::interrupted_offset()));
2596 Node* int_bit = make_load(NULL, p, TypeInt::BOOL, T_INT); 2596 // Set the control input on the field _interrupted read to prevent it floating up.
2597 Node* int_bit = make_load(control(), p, TypeInt::BOOL, T_INT);
2597 Node* cmp_bit = _gvn.transform( new (C, 3) CmpINode(int_bit, intcon(0)) ); 2598 Node* cmp_bit = _gvn.transform( new (C, 3) CmpINode(int_bit, intcon(0)) );
2598 Node* bol_bit = _gvn.transform( new (C, 2) BoolNode(cmp_bit, BoolTest::ne) ); 2599 Node* bol_bit = _gvn.transform( new (C, 2) BoolNode(cmp_bit, BoolTest::ne) );
2599 2600
2600 IfNode* iff_bit = create_and_map_if(control(), bol_bit, PROB_UNLIKELY_MAG(3), COUNT_UNKNOWN); 2601 IfNode* iff_bit = create_and_map_if(control(), bol_bit, PROB_UNLIKELY_MAG(3), COUNT_UNKNOWN);
2601 2602