Mercurial > hg > release > icedtea6-1.7
changeset 1746:a13ca3f99b51
Support Zero with HotSpot 16.
2009-10-27 Andrew John Hughes <ahughes@redhat.com>
* ports/hotspot/src/cpu/zero/vm/methodHandles_zero.cpp:
Empty class required by invokedynamic support.
* Makefile.am:
Copy files from ports rather than linking them,
allowing them to be patched. Remove duplicate
ports-ecj target. Apply
patches/hotspot/$(HSBUILD)/zero.patch when
building with an alternate HotSpot. This adds
the following changeset from IcedTea7 to the
copy of the Zero port in the openjdk directory:
2009-05-21 Andrew John Hughes <ahughes@redhat.com>
* ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp:
(delayed_value_impl(intptr_t,Register,int)): Add stub.
* ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp:
(delayed_value_impl(intptr_t,Register,int)): Declared.
* ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp:
Handle Interpreter::method_handle.
* ports/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp:
(delayed_value_impl(intptr_t,Register,int)): Add stub.
* ports/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp:
(generate_method_handle_entry()): Declared.
* ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp:
(generate_method_handle_entry()): Add stub.
* ports/hotspot/src/cpu/zero/vm/jni_zero.h:
Define jlong depending on whether _LP64 is defined,
as with format specifier in globalDefinitions.
* ports/hotspot/src/cpu/zero/vm/register_zero.hpp:
Declare noreg.
* ports/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp:
Define HeapBaseMinAddress as 2G (copied from x86_64).
author | Andrew John Hughes <ahughes@redhat.com> |
---|---|
date | Tue, 27 Oct 2009 18:47:05 +0000 |
parents | 7d2ae1d67c95 |
children | 783dd78750b3 |
files | ChangeLog Makefile.am patches/hotspot/default/zero.patch ports/hotspot/src/cpu/zero/vm/methodHandles_zero.cpp |
diffstat | 4 files changed, 176 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Oct 26 23:26:33 2009 +0000 +++ b/ChangeLog Tue Oct 27 18:47:05 2009 +0000 @@ -1,3 +1,38 @@ +2009-10-27 Andrew John Hughes <ahughes@redhat.com> + + * ports/hotspot/src/cpu/zero/vm/methodHandles_zero.cpp: + Empty class required by invokedynamic support. + * Makefile.am: + Copy files from ports rather than linking them, + allowing them to be patched. Remove duplicate + ports-ecj target. Apply + patches/hotspot/$(HSBUILD)/zero.patch when + building with an alternate HotSpot. This adds + the following changeset from IcedTea7 to the + copy of the Zero port in the openjdk directory: + + 2009-05-21 Andrew John Hughes <ahughes@redhat.com> + + * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp: + (delayed_value_impl(intptr_t,Register,int)): Add stub. + * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp: + (delayed_value_impl(intptr_t,Register,int)): Declared. + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp: + Handle Interpreter::method_handle. + * ports/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp: + (delayed_value_impl(intptr_t,Register,int)): Add stub. + * ports/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp: + (generate_method_handle_entry()): Declared. + * ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp: + (generate_method_handle_entry()): Add stub. + * ports/hotspot/src/cpu/zero/vm/jni_zero.h: + Define jlong depending on whether _LP64 is defined, + as with format specifier in globalDefinitions. + * ports/hotspot/src/cpu/zero/vm/register_zero.hpp: + Declare noreg. + * ports/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp: + Define HeapBaseMinAddress as 2G (copied from x86_64). + 2009-10-22 Andrew John Hughes <ahughes@redhat.com> * INSTALL:
--- a/Makefile.am Mon Oct 26 23:26:33 2009 +0000 +++ b/Makefile.am Tue Oct 27 18:47:05 2009 +0000 @@ -516,13 +516,13 @@ endif -# Link ports sources into tree +# Copy ports sources into tree stamps/ports.stamp: stamps/replace-hotspot.stamp for target in $(abs_top_srcdir)/ports/hotspot/build/*/makefiles/* \ $(abs_top_srcdir)/ports/hotspot/src/*cpu/* \ $(abs_top_srcdir)/ports/hotspot/src/share/vm/*; do \ link=$$(dirname $$target | sed 's/^.*ports/openjdk/'|sed "s#hotspot/build#hotspot/$(HOTSPOT_MAKE_DIR)#"); \ - ln -sfv $$target $$link; \ + cp -rv $$target $$link; \ done ln -sf $(abs_top_builddir)/platform_zero openjdk/hotspot/$(HOTSPOT_MAKE_DIR)/linux if ! test "x$(ICEDTEA_CORE_BUILD)$(ICEDTEA_SHARK_BUILD)$(WITH_CACAO)" \ @@ -659,7 +659,8 @@ endif if WITH_ALT_HSBUILD -ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch +ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \ + patches/hotspot/$(HSBUILD)/zero.patch else ICEDTEA_PATCHES += patches/hotspot/original/icedtea-6778662-lib64.patch \ patches/hotspot/original/icedtea-6778657-f2i-overflow.patch \ @@ -843,7 +844,7 @@ rm -f openjdk/jdk/src/share/classes/sun/applet/`basename $file` ; \ done ; -stamps/patch-fsg.stamp: stamps/replace-hotspot.stamp +stamps/patch-fsg.stamp: stamps/ports.stamp mkdir -p stamps ; \ rm -f stamps/patch-fsg.stamp.tmp ; \ touch stamps/patch-fsg.stamp.tmp ; \ @@ -914,28 +915,6 @@ rm -f stamps/extract-ecj.stamp rm -rf openjdk-ecj -# Link ports sources into tree -stamps/ports-ecj.stamp: stamps/extract-ecj.stamp - for target in $(abs_top_srcdir)/ports/hotspot/build/*/makefiles/* \ - $(abs_top_srcdir)/ports/hotspot/src/*cpu/* \ - $(abs_top_srcdir)/ports/hotspot/src/share/vm/*; do \ - link=$$(dirname $$target | sed 's/^.*ports/openjdk-ecj/'|sed "s#hotspot/build#hotspot/$(HOTSPOT_MAKE_DIR)#"); \ - ln -sfv $$target $$link; \ - done - ln -sf $(abs_top_builddir)/platform_zero openjdk-ecj/hotspot/$(HOTSPOT_MAKE_DIR)/linux - if ! test "x$(ICEDTEA_CORE_BUILD)$(ICEDTEA_SHARK_BUILD)$(WITH_CACAO)" \ - = "xno"; then \ - mkdir -p openjdk-ecj/jdk/src/solaris/bin/$(BUILD_ARCH_DIR); \ - ln -sf $(abs_top_builddir)/jvm.cfg \ - openjdk-ecj/jdk/src/solaris/bin/$(BUILD_ARCH_DIR)/jvm.cfg; \ - fi - if ! test "x$(ICEDTEA_ZERO_BUILD)$(WITH_CACAO)" = "xno"; then \ - ln -sf $(abs_top_builddir)/ergo.c \ - openjdk-ecj/jdk/src/solaris/bin/ergo_$(BUILD_ARCH_DIR).c; \ - fi - mkdir -p stamps - touch stamps/ports-ecj.stamp - # Patch OpenJDK for plug replacements and ecj. ICEDTEA_ECJ_PATCHES = patches/ecj/icedtea-ant.patch \ patches/ecj/icedtea.patch \ @@ -1346,7 +1325,7 @@ stamps/icedtea-ecj.stamp: stamps/bootstrap-directory-symlink-ecj.stamp \ stamps/hotspot-tools.stamp stamps/plugs.stamp \ - stamps/ports-ecj.stamp stamps/patch-ecj.stamp stamps/cacao.stamp \ + stamps/patch-ecj.stamp stamps/cacao.stamp \ $(ZERO_ASM_BC_ASM_COND) $(ARCH_PREFIX) $(MAKE) \ $(ICEDTEA_ENV_ECJ) \ @@ -1371,7 +1350,7 @@ hotspot-helper: stamps/bootstrap-directory-symlink-ecj.stamp \ stamps/hotspot-tools.stamp stamps/plugs.stamp \ - stamps/ports-ecj.stamp stamps/patch-ecj.stamp + stamps/patch-ecj.stamp $(ARCH_PREFIX) $(MAKE) \ $(ICEDTEA_ENV_ECJ) \ -C openjdk-ecj/ hotspot @@ -2144,8 +2123,6 @@ hotspot-ports: stamps/ports.stamp -hotspot-ports-ecj: stamps/ports-ecj.stamp - clean: distclean-local jtreg: stamps/jtreg.stamp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/default/zero.patch Tue Oct 27 18:47:05 2009 +0000 @@ -0,0 +1,107 @@ +diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp +--- openjdk.orig/hotspot/src/cpu/zero/vm/assembler_zero.cpp Mon Oct 26 23:26:33 2009 +0000 ++++ openjdk/hotspot/src/cpu/zero/vm/assembler_zero.cpp Tue Oct 27 15:06:00 2009 +0000 +@@ -54,6 +54,12 @@ + sync(); + } + ++RegisterOrConstant MacroAssembler::delayed_value_impl(intptr_t* delayed_value_addr, ++ Register tmpl, int offset) ++{ ++ Unimplemented(); ++} ++ + void MacroAssembler::store_oop(jobject obj) { + code_section()->relocate(pc(), oop_Relocation::spec_for_immediate()); + emit_address((address) obj); +diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp +--- openjdk.orig/hotspot/src/cpu/zero/vm/assembler_zero.hpp Mon Oct 26 23:26:33 2009 +0000 ++++ openjdk/hotspot/src/cpu/zero/vm/assembler_zero.hpp Tue Oct 27 15:06:00 2009 +0000 +@@ -47,7 +47,8 @@ + void align(int modulus); + void bang_stack_with_offset(int offset); + bool needs_explicit_null_check(intptr_t offset); +- ++ RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr, ++ Register tmp, int offset); + public: + void advance(int bytes); + void store_oop(jobject obj); +diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp +--- openjdk.orig/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Mon Oct 26 23:26:33 2009 +0000 ++++ openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Tue Oct 27 15:06:00 2009 +0000 +@@ -759,6 +759,10 @@ + entry_point = ((InterpreterGenerator*) this)->generate_abstract_entry(); + break; + ++ case Interpreter::method_handle: ++ entry_point = ((InterpreterGenerator*)this)->generate_method_handle_entry(); ++ break; ++ + case Interpreter::java_lang_math_sin: + case Interpreter::java_lang_math_cos: + case Interpreter::java_lang_math_tan: +diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/frame_zero.cpp +--- openjdk.orig/hotspot/src/cpu/zero/vm/frame_zero.cpp Mon Oct 26 23:26:33 2009 +0000 ++++ openjdk/hotspot/src/cpu/zero/vm/frame_zero.cpp Tue Oct 27 15:06:00 2009 +0000 +@@ -166,7 +166,7 @@ + return type; + } + +-int frame::frame_size() const { ++int frame::frame_size(RegisterMap* map) const { + #ifdef PRODUCT + ShouldNotCallThis(); + #else +diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp +--- openjdk.orig/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp Mon Oct 26 23:26:33 2009 +0000 ++++ openjdk/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp Tue Oct 27 15:06:00 2009 +0000 +@@ -28,4 +28,7 @@ + class InterpreterMacroAssembler : public MacroAssembler { + public: + InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code) {} ++ RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr, Register tmp, int offset) { ++ Unimplemented(); ++ } + }; +diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp +--- openjdk.orig/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp Mon Oct 26 23:26:33 2009 +0000 ++++ openjdk/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp Tue Oct 27 15:06:00 2009 +0000 +@@ -34,3 +34,4 @@ + address generate_math_entry(AbstractInterpreter::MethodKind kind); + address generate_empty_entry(); + address generate_accessor_entry(); ++ address generate_method_handle_entry(); +diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp +--- openjdk.orig/hotspot/src/cpu/zero/vm/interpreter_zero.cpp Mon Oct 26 23:26:33 2009 +0000 ++++ openjdk/hotspot/src/cpu/zero/vm/interpreter_zero.cpp Tue Oct 27 15:06:00 2009 +0000 +@@ -43,6 +43,11 @@ + return ShouldNotCallThisEntry(); + } + ++address InterpreterGenerator::generate_method_handle_entry() ++{ ++ return ShouldNotCallThisEntry(); ++} ++ + int AbstractInterpreter::size_activation(methodOop method, + int tempcount, + int popframe_extra_args, +diff -r 7d2ae1d67c95 ports/hotspot/src/cpu/zero/vm/register_zero.hpp +--- openjdk.orig/hotspot/src/cpu/zero/vm/register_zero.hpp Mon Oct 26 23:26:33 2009 +0000 ++++ openjdk/hotspot/src/cpu/zero/vm/register_zero.hpp Tue Oct 27 15:06:00 2009 +0000 +@@ -106,3 +106,5 @@ + static const int max_gpr; + static const int max_fpr; + }; ++ ++CONSTANT_REGISTER_DECLARATION(Register, noreg, (-1)); +diff -r 7d2ae1d67c95 ports/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp +--- openjdk.orig/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp Mon Oct 26 23:26:33 2009 +0000 ++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp Tue Oct 27 15:06:00 2009 +0000 +@@ -41,3 +41,5 @@ + define_pd_global(uintx, JVMInvokeMethodSlack, 8192); + + define_pd_global(bool, UseVectoredExceptions, false); ++// Only used on 64 bit platforms ++define_pd_global(uintx, HeapBaseMinAddress, 2*G);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ports/hotspot/src/cpu/zero/vm/methodHandles_zero.cpp Tue Oct 27 18:47:05 2009 +0000 @@ -0,0 +1,27 @@ +/* + * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 2009 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. + * + */ + +#include "incls/_precompiled.incl" +#include "incls/_methodHandles_zero.cpp.incl"