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

Gary Benson gbenson at redhat.com
Wed Jan 16 07:09:29 PST 2008


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

		* ports/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp
		* ports/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp
		(bcctrl, bctrl): New methods.

		* ports/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp
		(call): Use bctrl instead of blrl to preserve the link stack.
		* ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp
		(generate_normal_entry, generate_native_entry,
		generate_convert_result): Likewise.
		* ports/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp
		(generate_call_stub): Likewise.

diffstat:

5 files changed, 36 insertions(+), 12 deletions(-)
ChangeLog                                           |   14 ++++++++++++++
ports/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp      |   12 ++++++++++--
ports/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp      |    2 ++
ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp |   16 ++++++++--------
ports/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp  |    4 ++--

diffs (137 lines):

diff -r f3622a4f4ebc -r 67c878c83dd2 ChangeLog
--- a/ChangeLog	Tue Nov 20 07:05:00 2007 -0500
+++ b/ChangeLog	Tue Nov 20 08:36:56 2007 -0500
@@ -1,3 +1,17 @@ 2007-11-20  Gary Benson  <gbenson at redhat
+2007-11-20  Gary Benson  <gbenson at redhat.com>
+
+	* ports/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp
+	* ports/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp
+	(bcctrl, bctrl): New methods.
+
+	* ports/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp
+	(call): Use bctrl instead of blrl to preserve the link stack.
+	* ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp
+	(generate_normal_entry, generate_native_entry,
+	generate_convert_result): Likewise.
+	* ports/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp
+	(generate_call_stub): Likewise.
+
 2007-11-20  Gary Benson  <gbenson at redhat.com>
 
 	* ports/hotspot/src/cpu/ppc/vm/register_ppc.hpp
diff -r f3622a4f4ebc -r 67c878c83dd2 ports/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp
--- a/ports/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp	Tue Nov 20 07:05:00 2007 -0500
+++ b/ports/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp	Tue Nov 20 08:36:56 2007 -0500
@@ -241,6 +241,10 @@ void Assembler::bc(int bo, int bi, addre
 {
   emit_instruction(16, bo, bi, branch_target(pc(), a, 14), false, false);
 }
+void Assembler::bcctrl(int bo, int bi)
+{
+  emit_instruction(19, bo, bi, 0, 528, true);
+}
 void Assembler::bcl(int bo, int bi, address a)
 {
   emit_instruction(16, bo, bi, branch_target(pc(), a, 14), false, true);
@@ -448,6 +452,10 @@ void Assembler::stdx(Register src, Regis
 
 // Standard mnemonics common to 32- and 64-bit implementations
 
+void Assembler::bctrl()
+{
+  bcctrl(20, 0);
+}
 void Assembler::bdnz(Label& l)
 {
   bc(16, 0, l);
@@ -989,8 +997,8 @@ void MacroAssembler::call(Register func)
   func = r0;
 #endif // PPC64
 
-  mtlr(func);
-  blrl();
+  mtctr(func);
+  bctrl();
 
 #ifdef PPC64
   ld (r2, Address(r1, 40));
diff -r f3622a4f4ebc -r 67c878c83dd2 ports/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp
--- a/ports/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp	Tue Nov 20 07:05:00 2007 -0500
+++ b/ports/hotspot/src/cpu/ppc/vm/assembler_ppc.hpp	Tue Nov 20 08:36:56 2007 -0500
@@ -114,6 +114,7 @@ class Assembler : public AbstractAssembl
   void andi_(Register dst, Register a, int b);
   void b(address a);
   void bc(int bo, int bi, address a);
+  void bcctrl(int bo, int bi);
   void bcl(int bo, int bi, address a);
   void bclr(int bo, int bi);
   void bclrl(int bo, int bi);
@@ -170,6 +171,7 @@ class Assembler : public AbstractAssembl
 #endif // PPC64
 
   // Standard mnemonics common to 32- and 64-bit implementations
+  void bctrl();
   void bdnz(Label& l);
   void beq(Label& l);
   void beqlr();
diff -r f3622a4f4ebc -r 67c878c83dd2 ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp
--- a/ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp	Tue Nov 20 07:05:00 2007 -0500
+++ b/ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp	Tue Nov 20 08:36:56 2007 -0500
@@ -553,8 +553,8 @@ address InterpreterGenerator::generate_n
 #endif
 
   // Call signature handler
-  __ mtlr (handler);
-  __ blrl ();
+  __ mtctr (handler);
+  __ bctrl ();
   __ mr (handler, r0);
 
   // Pass JNIEnv
@@ -686,8 +686,8 @@ address InterpreterGenerator::generate_n
   __ mr (r4, r4_save);
 #endif
   __ fmr (f1, f1_save);
-  __ mtlr (handler);
-  __ blrl ();
+  __ mtctr (handler);
+  __ bctrl ();
 
   // Unwind the current activation and return
   __ bind (return_to_caller);
@@ -846,8 +846,8 @@ address InterpreterGenerator::generate_n
 
   // Non-interpreted methods are dispatched normally -----------------
   __ bind (call_non_interpreted_method);
-  __ mtlr (r0);
-  __ blrl ();
+  __ mtctr (r0);
+  __ bctrl ();
 
   // Restore Rstate
   __ load (Rstate, Address(r1, StackFrame::back_chain_offset * wordSize));
@@ -1260,8 +1260,8 @@ void CppInterpreterGenerator::generate_c
   __ lwz (r0, Address(Rmethod, methodOopDesc::result_index_offset()));
   __ shift_left (r0, r0, LogBytesPerWord);
   __ load_indexed (r0, r5, r0);
-  __ mtlr (r0);
-  __ blrl ();
+  __ mtctr (r0);
+  __ bctrl ();
 }
 
 // Remove the activation created by generate_compute_interpreter_state.
diff -r f3622a4f4ebc -r 67c878c83dd2 ports/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp
--- a/ports/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp	Tue Nov 20 07:05:00 2007 -0500
+++ b/ports/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp	Tue Nov 20 08:36:56 2007 -0500
@@ -265,8 +265,8 @@ class StubGenerator: public StubCodeGene
     __ mr (Rmethod, method);
     __ mr (Rlocals, locals);
     __ mr (Rthread, thread);
-    __ mtlr (entry_point);
-    __ blrl();
+    __ mtctr (entry_point);
+    __ bctrl();
 
     // This is used to identify call_stub stack frames
     return_address = __ pc();



More information about the distro-pkg-dev mailing list