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

Gary Benson gbenson at redhat.com
Thu Nov 22 02:35:13 PST 2007


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

		* ports/hotspot/src/cpu/ppc/vm/globalDefinitions_ppc.hpp
		(StackAlignmentInBytes): New constant.
		* ports/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp
		(StackFrame::generate_prolog,
		MacroAssembler::maybe_extend_frame,
		MacroAssembler::dump_int): Use the above.
		* ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp
		(CppInterpreterGenerator::generate_compute_interpreter_state,
		AbstractInterpreter::size_top_interpreter_activation): Likewise.
		* ports/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp
		(generate_call_stub): Likewise.

diffstat:

5 files changed, 49 insertions(+), 7 deletions(-)
ChangeLog                                              |   14 ++++++++
ports/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp         |    8 +++-
ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp    |    6 +--
ports/hotspot/src/cpu/ppc/vm/globalDefinitions_ppc.hpp |   26 ++++++++++++++++
ports/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp     |    2 -

diffs (125 lines):

diff -r 94c2e42c06f5 -r 696dc5660f4f ChangeLog
--- a/ChangeLog	Thu Nov 22 03:25:43 2007 -0500
+++ b/ChangeLog	Thu Nov 22 05:35:08 2007 -0500
@@ -1,3 +1,17 @@ 2007-11-22  Gary Benson  <gbenson at redhat
+2007-11-22  Gary Benson  <gbenson at redhat.com>
+
+	* ports/hotspot/src/cpu/ppc/vm/globalDefinitions_ppc.hpp
+	(StackAlignmentInBytes): New constant.
+	* ports/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp
+	(StackFrame::generate_prolog,
+	MacroAssembler::maybe_extend_frame,
+	MacroAssembler::dump_int): Use the above.
+	* ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp
+	(CppInterpreterGenerator::generate_compute_interpreter_state,
+	AbstractInterpreter::size_top_interpreter_activation): Likewise.
+	* ports/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp
+	(generate_call_stub): Likewise.
+
 2007-11-22  Gary Benson  <gbenson at redhat.com>
 
 	* patches/icedtea-core-build.patch
diff -r 94c2e42c06f5 -r 696dc5660f4f ports/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp
--- a/ports/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp	Thu Nov 22 03:25:43 2007 -0500
+++ b/ports/hotspot/src/cpu/ppc/vm/assembler_ppc.cpp	Thu Nov 22 05:35:08 2007 -0500
@@ -826,7 +826,7 @@ void StackFrame::generate_prolog(MacroAs
   // Calculate the aligned frame size
   while (true) {
     _frame_size = unaligned_size();
-    if (_frame_size % 16 == 0)
+    if (_frame_size % StackAlignmentInBytes == 0)
       break;
     _locals++;
   }
@@ -1362,7 +1362,7 @@ void MacroAssembler::maybe_extend_frame(
   const Register padding     = available_bytes;
 
   sub(extra_bytes, required_bytes, available_bytes);
-  calc_padding_for_alignment(padding, extra_bytes, 16);
+  calc_padding_for_alignment(padding, extra_bytes, StackAlignmentInBytes);
   add(extra_bytes, extra_bytes, padding);
 
   // Extend the frame
@@ -1466,7 +1466,9 @@ void MacroAssembler::dump_int(const char
   prolog(frame);
   if (src == r1) {
     int framesize = frame.unaligned_size();
-    framesize += (16 - (framesize & 15)) & 15;
+    framesize += (StackAlignmentInBytes -
+                  (framesize & (StackAlignmentInBytes - 1))) &
+                 (StackAlignmentInBytes - 1);
     addi(r4, r1, framesize);
   }
   else if (src != r4) {
diff -r 94c2e42c06f5 -r 696dc5660f4f ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp
--- a/ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp	Thu Nov 22 03:25:43 2007 -0500
+++ b/ports/hotspot/src/cpu/ppc/vm/cppInterpreter_ppc.cpp	Thu Nov 22 05:35:08 2007 -0500
@@ -1101,7 +1101,7 @@ void CppInterpreterGenerator::generate_c
   __ bne (CRsync, not_synchronized_1);
   __ addi (frame_size, frame_size, monitor_size);
   __ bind (not_synchronized_1);
-  __ calc_padding_for_alignment (padding, frame_size, 16);
+  __ calc_padding_for_alignment (padding, frame_size, StackAlignmentInBytes);
   __ add (frame_size, frame_size, padding);
 
   // Save the link register and create the new frame
@@ -1345,7 +1345,7 @@ int AbstractInterpreter::size_top_interp
 
   int call_stub_frame = round_to(
     StubRoutines::call_stub_base_size() +
-    method->max_locals() * wordSize, 16);
+    method->max_locals() * wordSize, StackAlignmentInBytes);
 
   int interpreter_frame = round_to(
     frame.unaligned_size() +
@@ -1353,7 +1353,7 @@ int AbstractInterpreter::size_top_interp
     method->max_stack() * wordSize +
     (method->is_synchronized() ?
      frame::interpreter_frame_monitor_size() * wordSize : 0) +
-    sizeof(BytecodeInterpreter), 16);
+    sizeof(BytecodeInterpreter), StackAlignmentInBytes);
 
   return (call_stub_frame + interpreter_frame) / wordSize;
 }
diff -r 94c2e42c06f5 -r 696dc5660f4f ports/hotspot/src/cpu/ppc/vm/globalDefinitions_ppc.hpp
--- a/ports/hotspot/src/cpu/ppc/vm/globalDefinitions_ppc.hpp	Thu Nov 22 03:25:43 2007 -0500
+++ b/ports/hotspot/src/cpu/ppc/vm/globalDefinitions_ppc.hpp	Thu Nov 22 05:35:08 2007 -0500
@@ -0,0 +1,26 @@
+/*
+ * Copyright 1999-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright 2007 Red Hat, Inc.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ *
+ */
+
+const int StackAlignmentInBytes = 16;
diff -r 94c2e42c06f5 -r 696dc5660f4f ports/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp
--- a/ports/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp	Thu Nov 22 03:25:43 2007 -0500
+++ b/ports/hotspot/src/cpu/ppc/vm/stubGenerator_ppc.cpp	Thu Nov 22 05:35:08 2007 -0500
@@ -175,7 +175,7 @@ class StubGenerator: public StubCodeGene
     const Register padding    = r12;
 
     __ addi (frame_size, parameter_bytes, StubRoutines::call_stub_base_size());
-    __ calc_padding_for_alignment (padding, frame_size, 16);
+    __ calc_padding_for_alignment (padding, frame_size, StackAlignmentInBytes);
     __ add (frame_size, frame_size, padding);
 
     // Save the link register and create the new frame



More information about the distro-pkg-dev mailing list