changeset in /hg/icedtea: 2007-11-15 Gary Benson <gbenson at redh...

Gary Benson gbenson at redhat.com
Thu Nov 15 05:16:16 PST 2007


changeset 3e77d6bcbb20 in /hg/icedtea
details: http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=3e77d6bcbb20
description:
	2007-11-15  Gary Benson  <gbenson at redhat.com>

		* ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.hpp
		(Rstate): Moved declaration from assembler_ppc.hpp.
		(STATE): Moved definition from cppInterpreter_ppc.cpp.
		* ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.cpp
		(Rstate): Moved definition from register_definitions_ppc.cpp.
		* ports/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp
		(Rstate): Moved declaration to interp_masm_ppc.hpp.
		* ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp
		(STATE): Moved definition to interp_masm_ppc.hpp.
		* ports/hotspot/src/cpu/ppc/vm/register_definitions_ppc.cpp
		(Rstate): Moved definition to interp_masm_ppc.cpp.

		* ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.hpp
		(fixup_after_potential_safepoint): New method.
		* ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.cpp
		(fixup_after_potential_safepoint): Likewise.
		* ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp
		(generate_normal_entry, generate_native_entry):
		Replace method pointer reloads with calls to the above
		to make what is happening more obvious.
		(generate_native_entry): Add an extra fixup.
		* ports/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp
		(generate_slow_signature_handler): Add an extra fixup.

diffstat:

7 files changed, 57 insertions(+), 18 deletions(-)
ChangeLog                                                 |   26 +++++++++++++
ports/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp            |    3 -
ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp       |   11 +----
ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.cpp          |   19 ++++++++-
ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.hpp          |   11 +++++
ports/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp          |    1 
ports/hotspot/src/cpu/ppc/vm/register_definitions_ppc.cpp |    4 --

diffs (177 lines):

diff -r 815f3949a569 -r 3e77d6bcbb20 ChangeLog
--- a/ChangeLog	Thu Nov 15 06:06:41 2007 -0500
+++ b/ChangeLog	Thu Nov 15 08:16:11 2007 -0500
@@ -1,3 +1,29 @@ 2007-11-15  Gary Benson  <gbenson at redhat
+2007-11-15  Gary Benson  <gbenson at redhat.com>
+
+	* ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.hpp
+	(Rstate): Moved declaration from assembler_ppc.hpp.
+	(STATE): Moved definition from cppInterpreter_ppc.cpp.
+	* ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.cpp
+	(Rstate): Moved definition from register_definitions_ppc.cpp.
+	* ports/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp
+	(Rstate): Moved declaration to interp_masm_ppc.hpp.
+	* ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp
+	(STATE): Moved definition to interp_masm_ppc.hpp.
+	* ports/hotspot/src/cpu/ppc/vm/register_definitions_ppc.cpp
+	(Rstate): Moved definition to interp_masm_ppc.cpp.
+
+	* ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.hpp
+	(fixup_after_potential_safepoint): New method.
+	* ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.cpp
+	(fixup_after_potential_safepoint): Likewise.
+	* ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp
+	(generate_normal_entry, generate_native_entry):
+	Replace method pointer reloads with calls to the above
+	to make what is happening more obvious.
+	(generate_native_entry): Add an extra fixup.
+	* ports/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp
+	(generate_slow_signature_handler): Add an extra fixup.
+
 2007-11-15  Gary Benson  <gbenson at redhat.com>
 
 	* ports/hotspot/src/cpu/ppc/vm/icache_ppc.hpp
diff -r 815f3949a569 -r 3e77d6bcbb20 ports/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp
--- a/ports/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp	Thu Nov 15 06:06:41 2007 -0500
+++ b/ports/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp	Thu Nov 15 08:16:11 2007 -0500
@@ -30,9 +30,6 @@ REGISTER_DECLARATION(Register, Rmethod, 
 REGISTER_DECLARATION(Register, Rmethod, r31);
 REGISTER_DECLARATION(Register, Rlocals, r30);
 REGISTER_DECLARATION(Register, Rthread, r29);
-#ifdef CC_INTERP
-REGISTER_DECLARATION(Register, Rstate,  r28);
-#endif // CC_INTERP
 
 
 // Address is an abstraction used to represent a memory location
diff -r 815f3949a569 -r 3e77d6bcbb20 ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp
--- a/ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp	Thu Nov 15 06:06:41 2007 -0500
+++ b/ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp	Thu Nov 15 08:16:11 2007 -0500
@@ -39,8 +39,6 @@ extern "C" void RecursiveInterpreterActi
 }
 
 #define __ _masm->
-#define STATE(field_name) \
-  (Address(Rstate, byte_offset_of(BytecodeInterpreter, field_name)))
 
 // Non-volatile registers we use
 const Register          Rmonitor = r27;
@@ -526,6 +524,7 @@ address InterpreterGenerator::generate_n
   __ mr (r3, Rthread);
   __ mr (r4, Rmethod);
   __ call (CAST_FROM_FN_PTR(address, InterpreterRuntime::prepare_native_call));
+  __ fixup_after_potential_safepoint ();
   __ load (r0, Address(Rthread, Thread::pending_exception_offset()));
   __ compare (r0, 0);
   __ bne (return_to_caller);
@@ -633,10 +632,8 @@ address InterpreterGenerator::generate_n
   __ mr (r3, Rthread);
   __ call (CAST_FROM_FN_PTR(address,
        JavaThread::check_special_condition_for_native_trans));
+  __ fixup_after_potential_safepoint ();
   __ bind (no_block);
-
-  // The method pointer may have changed if there was a safepoint
-  __ load (Rmethod, STATE(_method));
 
   // Change the thread state
   __ load (r0, _thread_in_Java);
@@ -805,9 +802,7 @@ address InterpreterGenerator::generate_n
 
   __ mr (r3, Rstate);
   __ call (interpreter);
-
-  // The method pointer may have changed if there was a safepoint
-  __ load (Rmethod, STATE(_method));
+  __ fixup_after_potential_safepoint ();
 
   // Clear the frame anchor
   __ reset_last_Java_frame ();
diff -r 815f3949a569 -r 3e77d6bcbb20 ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.cpp
--- a/ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.cpp	Thu Nov 15 06:06:41 2007 -0500
+++ b/ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.cpp	Thu Nov 15 08:16:11 2007 -0500
@@ -26,7 +26,11 @@
 #include "incls/_precompiled.incl"
 #include "incls/_interp_masm_ppc.cpp.incl"
 
-// Lock object
+#ifdef CC_INTERP
+REGISTER_DEFINITION(Register, Rstate);
+#endif
+
+// Lock an object
 //
 // Arguments:
 //  monitor: BasicObjectLock to be used for locking
@@ -68,7 +72,7 @@ void InterpreterMacroAssembler::lock_obj
   bind(done);
 }
 
-// Unlocks an object. Throws an IllegalMonitorException if
+// Unlock an object. Throws an IllegalMonitorException if
 // object is not locked by current thread.
 //
 // Arguments:
@@ -119,3 +123,14 @@ void InterpreterMacroAssembler::unlock_o
   unimplemented(__FILE__, __LINE__);
   bind(done);
 }
+
+// Reload everything that might have changed after a safepoint
+
+void InterpreterMacroAssembler::fixup_after_potential_safepoint()
+{
+#ifdef CC_INTERP
+  load(Rmethod, STATE(_method));
+#else
+  Unimplemented();
+#endif
+}
diff -r 815f3949a569 -r 3e77d6bcbb20 ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.hpp
--- a/ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.hpp	Thu Nov 15 06:06:41 2007 -0500
+++ b/ports/hotspot/src/cpu/ppc/vm/interp_masm_ppc.hpp	Thu Nov 15 08:16:11 2007 -0500
@@ -25,6 +25,13 @@
 
 // This file specializes the assember with interpreter-specific macros
 
+#ifdef CC_INTERP
+REGISTER_DECLARATION(Register, Rstate, r28);
+
+#define STATE(field_name) \
+  (Address(Rstate, byte_offset_of(BytecodeInterpreter, field_name)))
+#endif // CC_INTERP
+
 class InterpreterMacroAssembler : public MacroAssembler {
  public:
   InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code) {}
@@ -32,5 +39,7 @@ class InterpreterMacroAssembler : public
   // Object locking
   void lock_object(Register entry);
   void unlock_object(Register entry);
+
+  // Safepoints
+  void fixup_after_potential_safepoint();
 };
-
diff -r 815f3949a569 -r 3e77d6bcbb20 ports/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp
--- a/ports/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp	Thu Nov 15 06:06:41 2007 -0500
+++ b/ports/hotspot/src/cpu/ppc/vm/interpreter_ppc.cpp	Thu Nov 15 08:16:11 2007 -0500
@@ -93,6 +93,7 @@ address AbstractInterpreterGenerator::ge
   __ prolog (frame);
   __ call (CAST_FROM_FN_PTR(address,
                             InterpreterRuntime::slow_signature_handler));
+  __ fixup_after_potential_safepoint ();
   __ epilog (frame);
 
   // Load the register images into the registers
diff -r 815f3949a569 -r 3e77d6bcbb20 ports/hotspot/src/cpu/ppc/vm/register_definitions_ppc.cpp
--- a/ports/hotspot/src/cpu/ppc/vm/register_definitions_ppc.cpp	Thu Nov 15 06:06:41 2007 -0500
+++ b/ports/hotspot/src/cpu/ppc/vm/register_definitions_ppc.cpp	Thu Nov 15 08:16:11 2007 -0500
@@ -109,7 +109,3 @@ REGISTER_DEFINITION(Register, Rmethod);
 REGISTER_DEFINITION(Register, Rmethod);
 REGISTER_DEFINITION(Register, Rlocals);
 REGISTER_DEFINITION(Register, Rthread);
-#ifdef CC_INTERP
-REGISTER_DEFINITION(Register, Rstate);
-#endif
-



More information about the distro-pkg-dev mailing list