diff 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
line wrap: on
line diff
--- a/src/share/vm/opto/library_call.cpp	Fri May 15 18:14:44 2009 -0700
+++ b/src/share/vm/opto/library_call.cpp	Thu May 21 10:05:36 2009 -0700
@@ -2593,7 +2593,8 @@
   Node* p = basic_plus_adr(top()/*!oop*/, tls_ptr, in_bytes(JavaThread::osthread_offset()));
   Node* osthread = make_load(NULL, p, TypeRawPtr::NOTNULL, T_ADDRESS);
   p = basic_plus_adr(top()/*!oop*/, osthread, in_bytes(OSThread::interrupted_offset()));
-  Node* int_bit = make_load(NULL, p, TypeInt::BOOL, T_INT);
+  // Set the control input on the field _interrupted read to prevent it floating up.
+  Node* int_bit = make_load(control(), p, TypeInt::BOOL, T_INT);
   Node* cmp_bit = _gvn.transform( new (C, 3) CmpINode(int_bit, intcon(0)) );
   Node* bol_bit = _gvn.transform( new (C, 2) BoolNode(cmp_bit, BoolTest::ne) );