Mercurial > hg > icedtea7
changeset 1899:7a7a1f3bff6c
Bump to b65 and upstream Zero.
2009-07-26 Andrew John Hughes <ahughes@redhat.com>
* patches/hotspot/default/icedtea-core-build.patch,
* patches/hotspot/default/icedtea-static-libstdc++.patch,
* patches/hotspot/default/icedtea-zero-build.patch,
* patches/icedtea-arch.patch,
* patches/icedtea-linker-options.patch,
* patches/icedtea-signature-iterator.patch,
* patches/icedtea-zero.patch,
* platform_zero.in,
* ports/hotspot/make/linux/makefiles/zero.make,
* ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp,
* ports/hotspot/src/cpu/zero/vm/bytecodes_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/bytes_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/codeBuffer_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/copy_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/debug_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/deoptimizerFrame_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/disassembler_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/dump_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/entry_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/frame_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/frame_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp,
* ports/hotspot/src/cpu/zero/vm/globals_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/icBuffer_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/icache_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/icache_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/javaFrameAnchor_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/jniFastGetField_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/jniTypes_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/jni_zero.h,
* ports/hotspot/src/cpu/zero/vm/methodHandles_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/nativeInst_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/nativeInst_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/registerMap_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/register_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/register_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/relocInfo_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/stack_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/vmStructs_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/vm_version_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/vmreg_zero.cpp,
* ports/hotspot/src/cpu/zero/vm/vmreg_zero.hpp,
* ports/hotspot/src/cpu/zero/vm/vmreg_zero.inline.hpp,
* ports/hotspot/src/cpu/zero/vm/vtableStubs_zero.cpp,
* ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp,
* ports/hotspot/src/os_cpu/linux_zero/vm/bytes_linux_zero.inline.hpp,
* ports/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp,
* ports/hotspot/src/os_cpu/linux_zero/vm/orderAccess_linux_zero.inline.hpp,
* ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp,
* ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp,
* ports/hotspot/src/os_cpu/linux_zero/vm/prefetch_linux_zero.inline.hpp,
* ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.cpp,
* ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.hpp,
* ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp,
* ports/hotspot/src/os_cpu/linux_zero/vm/vmStructs_linux_zero.hpp:
Removed. Zero now upstream.
* Makefile.am:
Bump to b65. Switch ICEDTEA_{CORE,ZERO}_BUILD to use true
not 'yes', and pass to build as CORE_BUILD and ZERO_BUILD.
Link files in cpu/zero/vm rather than zero directory (now
only used for Shark). Remove unneeded patches and duplicate
ports-ecj target.
* acinclude.m4: Don't generate platform_zero.
* patches/cacao/arch.patch: Moved from patches/icedtea-arch.patch
and recreated.
* patches/hotspot/default/icedtea-core-zero-build.patch:
Use CORE_BUILD not ICEDTEA_CORE_BUILD.
* patches/hotspot/default/icedtea-shark-build.patch:
Recreated. Depend on $(PLATFORM_FILE) to create platform_zero.
* patches/icedtea-core-build.patch,
* patches/icedtea-gcc-suffix.patch,
* patches/icedtea-libraries.patch,
* patches/icedtea-shark-build.patch,
* patches/icedtea-zero-build.patch:
Recreated.
* ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp:
Drop InlineSmallCode as in globals_zero.hpp upstream.
author | Andrew John Hughes <ahughes@redhat.com> |
---|---|
date | Sun, 26 Jul 2009 05:45:29 +0100 |
parents | c43b0d22e99b |
children | 4532857a1523 |
files | ChangeLog Makefile.am acinclude.m4 patches/cacao/arch.patch patches/hotspot/default/icedtea-core-build.patch patches/hotspot/default/icedtea-core-zero-build.patch patches/hotspot/default/icedtea-shark-build.patch patches/hotspot/default/icedtea-static-libstdc++.patch patches/hotspot/default/icedtea-zero-build.patch patches/icedtea-arch.patch patches/icedtea-core-build.patch patches/icedtea-gcc-suffix.patch patches/icedtea-libraries.patch patches/icedtea-linker-options.patch patches/icedtea-shark-build.patch patches/icedtea-signature-iterator.patch patches/icedtea-zero-build.patch patches/icedtea-zero.patch platform_zero.in ports/hotspot/make/linux/makefiles/zero.make ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp ports/hotspot/src/cpu/zero/vm/assembler_zero.inline.hpp ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.cpp ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp ports/hotspot/src/cpu/zero/vm/bytecodes_zero.cpp ports/hotspot/src/cpu/zero/vm/bytecodes_zero.hpp ports/hotspot/src/cpu/zero/vm/bytes_zero.hpp ports/hotspot/src/cpu/zero/vm/codeBuffer_zero.hpp ports/hotspot/src/cpu/zero/vm/copy_zero.hpp ports/hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.hpp ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp ports/hotspot/src/cpu/zero/vm/debug_zero.cpp ports/hotspot/src/cpu/zero/vm/deoptimizerFrame_zero.hpp ports/hotspot/src/cpu/zero/vm/depChecker_zero.cpp ports/hotspot/src/cpu/zero/vm/depChecker_zero.hpp ports/hotspot/src/cpu/zero/vm/disassembler_zero.cpp ports/hotspot/src/cpu/zero/vm/disassembler_zero.hpp ports/hotspot/src/cpu/zero/vm/dump_zero.cpp ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp ports/hotspot/src/cpu/zero/vm/entry_zero.hpp ports/hotspot/src/cpu/zero/vm/frame_zero.cpp ports/hotspot/src/cpu/zero/vm/frame_zero.hpp ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp ports/hotspot/src/cpu/zero/vm/globalDefinitions_zero.hpp ports/hotspot/src/cpu/zero/vm/globals_zero.hpp ports/hotspot/src/cpu/zero/vm/icBuffer_zero.cpp ports/hotspot/src/cpu/zero/vm/icache_zero.cpp ports/hotspot/src/cpu/zero/vm/icache_zero.hpp ports/hotspot/src/cpu/zero/vm/interp_masm_zero.cpp ports/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp ports/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.hpp ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp ports/hotspot/src/cpu/zero/vm/javaFrameAnchor_zero.hpp ports/hotspot/src/cpu/zero/vm/jniFastGetField_zero.cpp ports/hotspot/src/cpu/zero/vm/jniTypes_zero.hpp ports/hotspot/src/cpu/zero/vm/jni_zero.h ports/hotspot/src/cpu/zero/vm/methodHandles_zero.cpp ports/hotspot/src/cpu/zero/vm/nativeInst_zero.cpp ports/hotspot/src/cpu/zero/vm/nativeInst_zero.hpp ports/hotspot/src/cpu/zero/vm/registerMap_zero.hpp ports/hotspot/src/cpu/zero/vm/register_definitions_zero.cpp ports/hotspot/src/cpu/zero/vm/register_zero.cpp ports/hotspot/src/cpu/zero/vm/register_zero.hpp ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp ports/hotspot/src/cpu/zero/vm/relocInfo_zero.hpp ports/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp ports/hotspot/src/cpu/zero/vm/stack_zero.hpp ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.cpp ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.hpp ports/hotspot/src/cpu/zero/vm/templateInterpreterGenerator_zero.hpp ports/hotspot/src/cpu/zero/vm/templateInterpreter_zero.cpp ports/hotspot/src/cpu/zero/vm/templateInterpreter_zero.hpp ports/hotspot/src/cpu/zero/vm/templateTable_zero.cpp ports/hotspot/src/cpu/zero/vm/templateTable_zero.hpp ports/hotspot/src/cpu/zero/vm/vmStructs_zero.hpp ports/hotspot/src/cpu/zero/vm/vm_version_zero.cpp ports/hotspot/src/cpu/zero/vm/vm_version_zero.hpp ports/hotspot/src/cpu/zero/vm/vmreg_zero.cpp ports/hotspot/src/cpu/zero/vm/vmreg_zero.hpp ports/hotspot/src/cpu/zero/vm/vmreg_zero.inline.hpp ports/hotspot/src/cpu/zero/vm/vtableStubs_zero.cpp ports/hotspot/src/os_cpu/linux_zero/vm/assembler_linux_zero.cpp ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp ports/hotspot/src/os_cpu/linux_zero/vm/bytes_linux_zero.inline.hpp ports/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp ports/hotspot/src/os_cpu/linux_zero/vm/orderAccess_linux_zero.inline.hpp ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp ports/hotspot/src/os_cpu/linux_zero/vm/prefetch_linux_zero.inline.hpp ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.cpp ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.hpp ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.cpp ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp ports/hotspot/src/os_cpu/linux_zero/vm/vmStructs_linux_zero.hpp ports/hotspot/src/os_cpu/linux_zero/vm/vm_version_linux_zero.cpp |
diffstat | 88 files changed, 408 insertions(+), 8402 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jul 21 23:06:12 2009 +0100 +++ b/ChangeLog Sun Jul 26 05:45:29 2009 +0100 @@ -1,3 +1,104 @@ +2009-07-26 Andrew John Hughes <ahughes@redhat.com> + + * patches/hotspot/default/icedtea-core-build.patch, + * patches/hotspot/default/icedtea-static-libstdc++.patch, + * patches/hotspot/default/icedtea-zero-build.patch, + * patches/icedtea-arch.patch, + * patches/icedtea-linker-options.patch, + * patches/icedtea-signature-iterator.patch, + * patches/icedtea-zero.patch, + * platform_zero.in, + * ports/hotspot/make/linux/makefiles/zero.make, + * ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp, + * ports/hotspot/src/cpu/zero/vm/bytecodes_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/bytes_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/codeBuffer_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/copy_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/debug_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/deoptimizerFrame_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/disassembler_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/dump_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/entry_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/frame_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/frame_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp, + * ports/hotspot/src/cpu/zero/vm/globals_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/icBuffer_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/icache_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/icache_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/javaFrameAnchor_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/jniFastGetField_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/jniTypes_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/jni_zero.h, + * ports/hotspot/src/cpu/zero/vm/methodHandles_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/nativeInst_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/nativeInst_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/registerMap_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/register_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/register_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/relocInfo_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/stack_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/vmStructs_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/vm_version_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/vmreg_zero.cpp, + * ports/hotspot/src/cpu/zero/vm/vmreg_zero.hpp, + * ports/hotspot/src/cpu/zero/vm/vmreg_zero.inline.hpp, + * ports/hotspot/src/cpu/zero/vm/vtableStubs_zero.cpp, + * ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp, + * ports/hotspot/src/os_cpu/linux_zero/vm/bytes_linux_zero.inline.hpp, + * ports/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp, + * ports/hotspot/src/os_cpu/linux_zero/vm/orderAccess_linux_zero.inline.hpp, + * ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp, + * ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp, + * ports/hotspot/src/os_cpu/linux_zero/vm/prefetch_linux_zero.inline.hpp, + * ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.cpp, + * ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.hpp, + * ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp, + * ports/hotspot/src/os_cpu/linux_zero/vm/vmStructs_linux_zero.hpp: + Removed. Zero now upstream. + * Makefile.am: + Bump to b65. Switch ICEDTEA_{CORE,ZERO}_BUILD to use true + not 'yes', and pass to build as CORE_BUILD and ZERO_BUILD. + Link files in cpu/zero/vm rather than zero directory (now + only used for Shark). Remove unneeded patches and duplicate + ports-ecj target. + * acinclude.m4: Don't generate platform_zero. + * patches/cacao/arch.patch: Moved from patches/icedtea-arch.patch + and recreated. + * patches/hotspot/default/icedtea-core-zero-build.patch: + Use CORE_BUILD not ICEDTEA_CORE_BUILD. + * patches/hotspot/default/icedtea-shark-build.patch: + Recreated. Depend on $(PLATFORM_FILE) to create platform_zero. + * patches/icedtea-core-build.patch, + * patches/icedtea-gcc-suffix.patch, + * patches/icedtea-libraries.patch, + * patches/icedtea-shark-build.patch, + * patches/icedtea-zero-build.patch: + Recreated. + * ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp: + Drop InlineSmallCode as in globals_zero.hpp upstream. + 2009-07-21 Andrew John Hughes <ahughes@redhat.com> * acinclude.m4:
--- a/Makefile.am Tue Jul 21 23:06:12 2009 +0100 +++ b/Makefile.am Sun Jul 26 05:45:29 2009 +0100 @@ -1,20 +1,20 @@ -OPENJDK_VERSION = b64 +OPENJDK_VERSION = b65 -OPENJDK_CHANGESET = 269c1ec4435d -CORBA_CHANGESET = 047dd27fddb6 -JAXP_CHANGESET = a10eec7a1edf -JAXWS_CHANGESET = d1788e8fd315 -JDK_CHANGESET = d799a225c668 -LANGTOOLS_CHANGESET = d8f23a81d46f -HOTSPOT_CHANGESET = ba36394eb84b +OPENJDK_CHANGESET = 3f9b913a63a5 +CORBA_CHANGESET = 5bd83d1b2476 +JAXP_CHANGESET = 008c662e0ee9 +JAXWS_CHANGESET = 706c94322f68 +JDK_CHANGESET = 76242e1e7faf +LANGTOOLS_CHANGESET = 7e0056ded28c +HOTSPOT_CHANGESET = fa683fcb2628 -OPENJDK_MD5SUM = 377e7f1139d876175dd85629220213c9 -CORBA_MD5SUM = 203e6eb0231ae7848a501ee40fcc256d -JAXP_MD5SUM = b57ed800ab149e44d4d53525cf58e9a7 -JAXWS_MD5SUM = 768509b4a24dc8e3b060e68e71081f48 -JDK_MD5SUM = dab8727958b03ff1b7992a50545479c3 -LANGTOOLS_MD5SUM = bf1a06f7d30febfb332658b6d7ef5fa5 -HOTSPOT_MD5SUM = 1ffa3dd169e18e9679c56b13c04a0de9 +OPENJDK_MD5SUM = 1b83ab007193ac11ace81777a9cf8b34 +CORBA_MD5SUM = c751d1140d3a5f777655b9b7cde41c9f +JAXP_MD5SUM = 5832f64d5469985060f0c16fbcbce574 +JAXWS_MD5SUM = c23b0c5e2140feb224cc04d0f8bc2768 +JDK_MD5SUM = 013f095e5d95f8fe9afb07353670fbc7 +LANGTOOLS_MD5SUM = eca84cbe43c9f0314baa46917463b2cf +HOTSPOT_MD5SUM = db12c9a6a0a61a1d783cd132aef59ba6 CACAO_VERSION = 0.99.4 CACAO_MD5SUM = 63220327925ace13756ae334c55a3baa @@ -1517,12 +1517,12 @@ JDK_UPDATE_VERSION = 0 COMBINED_VERSION = $(JDK_UPDATE_VERSION)-$(OPENJDK_VERSION) if CORE_BUILD - ICEDTEA_CORE_BUILD = yes + ICEDTEA_CORE_BUILD = true else ICEDTEA_CORE_BUILD = endif if ZERO_BUILD - ICEDTEA_ZERO_BUILD = yes + ICEDTEA_ZERO_BUILD = true else ICEDTEA_ZERO_BUILD = endif @@ -1549,8 +1549,8 @@ "ENDORSED=-Djava.endorsed.dirs=$(ICEDTEA_ENDORSED_DIR)" \ "CLASSPATH=" \ "LD_LIBRARY_PATH=" \ - "ICEDTEA_CORE_BUILD=$(ICEDTEA_CORE_BUILD)" \ - "ICEDTEA_ZERO_BUILD=$(ICEDTEA_ZERO_BUILD)" \ + "CORE_BUILD=$(ICEDTEA_CORE_BUILD)" \ + "ZERO_BUILD=$(ICEDTEA_ZERO_BUILD)" \ "ICEDTEA_SHARK_BUILD=$(ICEDTEA_SHARK_BUILD)" \ "ZERO_LIBARCH=$(ZERO_LIBARCH)" \ "ZERO_BITSPERWORD=$(ZERO_BITSPERWORD)" \ @@ -1634,8 +1634,8 @@ "CLASSPATH=" \ "LD_LIBRARY_PATH=" \ "GENSRCDIR=$(abs_top_builddir)/generated" \ - "ICEDTEA_CORE_BUILD=$(ICEDTEA_CORE_BUILD)" \ - "ICEDTEA_ZERO_BUILD=$(ICEDTEA_ZERO_BUILD)" \ + "CORE_BUILD=$(ICEDTEA_CORE_BUILD)" \ + "ZERO_BUILD=$(ICEDTEA_ZERO_BUILD)" \ "ICEDTEA_SHARK_BUILD=$(ICEDTEA_SHARK_BUILD)" \ "ZERO_LIBARCH=$(ZERO_LIBARCH)" \ "ZERO_BITSPERWORD=$(ZERO_BITSPERWORD)" \ @@ -1973,12 +1973,11 @@ # Link ports sources into tree stamps/ports.stamp: stamps/extract.stamp for target in $(abs_top_srcdir)/ports/hotspot/make/*/makefiles/* \ - $(abs_top_srcdir)/ports/hotspot/src/*cpu/* \ + $(abs_top_srcdir)/ports/hotspot/src/cpu/zero/vm/* \ $(abs_top_srcdir)/ports/hotspot/src/share/vm/*; do \ link=$$(dirname $$target | sed 's/^.*ports/openjdk/'|sed "s#hotspot/build#hotspot/make#"); \ ln -sfv $$target $$link; \ done - ln -sf $(abs_top_builddir)/platform_zero openjdk/hotspot/make/linux if ! test "x$(ICEDTEA_CORE_BUILD)$(ICEDTEA_SHARK_BUILD)$(WITH_CACAO)" \ = "xno" ; then \ mkdir -p openjdk/jdk/src/solaris/bin/$(BUILD_ARCH_DIR) ; \ @@ -2021,11 +2020,7 @@ patches/icedtea-sunsrc.patch \ patches/icedtea-libraries.patch \ patches/icedtea-core-build.patch \ - patches/hotspot/$(HSBUILD)/icedtea-core-build.patch \ - patches/icedtea-linker-options.patch \ - patches/hotspot/$(HSBUILD)/icedtea-static-libstdc++.patch \ patches/icedtea-zero-build.patch \ - patches/hotspot/$(HSBUILD)/icedtea-zero-build.patch \ patches/icedtea-print-lsb-release.patch \ patches/icedtea-jpegclasses.patch \ patches/icedtea-uname.patch \ @@ -2049,7 +2044,7 @@ patches/icedtea-clean-crypto.patch \ patches/hotspot/$(HSBUILD)/icedtea-shark.patch \ $(GCC_PATCH) \ - patches/icedtea-arch.patch \ + patches/cacao/arch.patch \ patches/icedtea-signed-types.patch \ patches/icedtea-lc_ctype.patch \ patches/icedtea-xjc.patch \ @@ -2063,9 +2058,7 @@ patches/icedtea-pr261.patch \ patches/icedtea-doc-headers.patch \ patches/hotspot/$(HSBUILD)/icedtea-bytecodeInterpreter.patch \ - patches/icedtea-signature-iterator.patch \ patches/icedtea-test-atomic-operations.patch \ - patches/icedtea-zero.patch \ patches/icedtea-ia64-bugfix.patch \ patches/hotspot/$(HSBUILD)/icedtea-parisc-opt.patch \ patches/security/icedtea-6592792.patch \ @@ -2453,28 +2446,6 @@ rm -f stamps/clone-ecj.stamp rm -rf openjdk-ecj -# Link ports sources into tree -stamps/ports-ecj.stamp: stamps/clone-ecj.stamp - for target in $(abs_top_srcdir)/ports/hotspot/make/*/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/make#"); \ - ln -sfv $$target $$link; \ - done - ln -sf $(abs_top_builddir)/platform_zero openjdk-ecj/hotspot/make/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 ecj/gcj builds. ICEDTEA_ECJ_PATCHES = patches/ecj/icedtea.patch \ patches/ecj/icedtea-hotspot-$(HSBUILD).patch \ @@ -2897,7 +2868,7 @@ stamps/icedtea-ecj.stamp: stamps/bootstrap-directory-symlink-ecj.stamp \ stamps/hotspot-tools.stamp stamps/plugs.stamp stamps/netx-dist.stamp \ - stamps/liveconnect.stamp stamps/ports-ecj.stamp stamps/patch-ecj.stamp \ + stamps/liveconnect.stamp stamps/ports.stamp stamps/patch-ecj.stamp \ stamps/cacao.stamp $(ARCH_PREFIX) $(MAKE) \ $(ICEDTEA_ENV_ECJ) \ @@ -2922,7 +2893,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/ports.stamp stamps/patch-ecj.stamp $(ARCH_PREFIX) $(MAKE) \ $(ICEDTEA_ENV_ECJ) \ -C openjdk-ecj hotspot @@ -3737,8 +3708,6 @@ tools-class-files: stamps/tools-class-files.stamp -hotspot-ports-ecj: stamps/ports-ecj.stamp - clean: distclean-local jtreg: stamps/jtreg.stamp
--- a/acinclude.m4 Tue Jul 21 23:06:12 2009 +0100 +++ b/acinclude.m4 Sun Jul 26 05:45:29 2009 +0100 @@ -791,7 +791,6 @@ AC_SUBST(ZERO_ENDIANNESS) AC_SUBST(ZERO_ARCHDEF) AC_SUBST(ZERO_ARCHFLAG) - AC_CONFIG_FILES([platform_zero]) AC_CONFIG_FILES([jvm.cfg]) AC_CONFIG_FILES([ergo.c]) ])
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/arch.patch Sun Jul 26 05:45:29 2009 +0100 @@ -0,0 +1,191 @@ +diff -Nru openjdk.orig/corba/make/common/Defs-linux.gmk openjdk/corba/make/common/Defs-linux.gmk +--- openjdk.orig/corba/make/common/Defs-linux.gmk 2009-07-24 00:15:26.000000000 +0100 ++++ openjdk/corba/make/common/Defs-linux.gmk 2009-07-24 00:19:32.000000000 +0100 +@@ -92,9 +92,19 @@ + # We need this frame pointer to make it easy to walk the stacks. + # This should be the default on X86, but ia64 and amd64 may not have this + # as the default. ++CFLAGS_REQUIRED_alpha += -mieee -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_arm += -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_hppa += + CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_m68k += ++CFLAGS_REQUIRED_mips += ++CFLAGS_REQUIRED_mipsel += -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_ppc += -m32 ++CFLAGS_REQUIRED_ppc64 += -m64 ++CFLAGS_REQUIRED_s390 += ++CFLAGS_REQUIRED_s390x += -m64 + CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 + LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 + CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 +diff -Nru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk +--- openjdk.orig/jdk/make/common/Defs-linux.gmk 2009-07-24 00:15:28.000000000 +0100 ++++ openjdk/jdk/make/common/Defs-linux.gmk 2009-07-24 00:19:32.000000000 +0100 +@@ -109,9 +109,19 @@ + # We need this frame pointer to make it easy to walk the stacks. + # This should be the default on X86, but ia64 and amd64 may not have this + # as the default. ++CFLAGS_REQUIRED_alpha += -mieee -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_arm += -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_hppa += + CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_m68k += ++CFLAGS_REQUIRED_mips += ++CFLAGS_REQUIRED_mipsel += -D_LITTLE_ENDIAN ++CFLAGS_REQUIRED_ppc += -m32 ++CFLAGS_REQUIRED_ppc64 += -m64 ++CFLAGS_REQUIRED_s390 += ++CFLAGS_REQUIRED_s390x += -m64 + CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 + LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 + CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 +diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk +--- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk 2009-07-24 00:15:26.000000000 +0100 ++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2009-07-24 00:19:32.000000000 +0100 +@@ -71,6 +71,52 @@ + REQUIRED_CC_VER = 3.2 + REQUIRED_GCC_VER = 3.2.* + endif ++ ifeq ($(ARCH), alpha) ++ # alpha ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifeq ($(ARCH), amd64) ++ # amd64 ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifeq ($(ARCH), arm) ++ # arm ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifeq ($(ARCH), i586) ++ # i586 ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.1* ++ REQUIRED_GCC_VER_INT = 3.2.1-7a ++ endif ++ ifeq ($(ARCH), ia64) ++ # ia64 ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 2.9[56789].* ++ endif ++ ifneq ("$(findstring m68k,$(ARCH))", "") ++ # m68k ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifneq ("$(findstring mips,$(ARCH))", "") ++ # mips ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifneq ("$(findstring ppc,$(ARCH))", "") ++ # ppc or ppc64 ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif ++ ifneq ("$(findstring s390,$(ARCH))", "") ++ # s390 or s390x ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* ++ endif + # Option used to create a shared library + SHARED_LIBRARY_FLAG = -shared -mimpure-text + SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 ) +diff -Nru openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk openjdk/jdk/make/javax/sound/SoundDefs.gmk +--- openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk 2009-07-15 17:35:01.000000000 +0100 ++++ openjdk/jdk/make/javax/sound/SoundDefs.gmk 2009-07-24 00:19:32.000000000 +0100 +@@ -58,10 +58,54 @@ + ifeq ($(ZERO_BUILD), true) + CPPFLAGS += -DX_ARCH=X_ZERO + else ++ ifeq ($(ARCH), alpha) ++ CPPFLAGS += -DX_ARCH=X_ALPHA ++ endif # ARCH alpha ++ ++ ifeq ($(ARCH), amd64) ++ CPPFLAGS += -DX_ARCH=X_AMD64 ++ endif # ARCH amd64 ++ ++ ifeq ($(ARCH), arm) ++ CPPFLAGS += -DX_ARCH=X_ARM ++ endif # ARCH arm ++ + ifeq ($(ARCH), i586) + CPPFLAGS += -DX_ARCH=X_I586 + endif # ARCH i586 + ++ ifeq ($(ARCH), ia64) ++ CPPFLAGS += -DX_ARCH=X_IA64 ++ endif # ARCH ia64 ++ ++ ifeq ($(ARCH), m68k) ++ CPPFLAGS += -DX_ARCH=X_M68K ++ endif # ARCH m68k ++ ++ ifeq ($(ARCH), mips) ++ CPPFLAGS += -DX_ARCH=X_MIPS ++ endif # ARCH mips ++ ++ ifeq ($(ARCH), mipsel) ++ CPPFLAGS += -DX_ARCH=X_MIPSEL ++ endif # ARCH mipsel ++ ++ ifeq ($(ARCH), ppc) ++ CPPFLAGS += -DX_ARCH=X_PPC ++ endif # ARCH ppc ++ ++ ifeq ($(ARCH), ppc64) ++ CPPFLAGS += -DX_ARCH=X_PPC64 ++ endif # ARCH ppc64 ++ ++ ifeq ($(ARCH), s390) ++ CPPFLAGS += -DX_ARCH=X_S390 ++ endif # ARCH s390 ++ ++ ifeq ($(ARCH), s390x) ++ CPPFLAGS += -DX_ARCH=X_S390X ++ endif # ARCH s390x ++ + ifeq ($(ARCH), sparc) + CPPFLAGS += -DX_ARCH=X_SPARC + endif # ARCH sparc +diff -Nru openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h +--- openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2009-07-15 17:35:01.000000000 +0100 ++++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2009-07-24 00:19:32.000000000 +0100 +@@ -33,12 +33,21 @@ + #define X_LINUX 3 + + // types for X_ARCH +-#define X_I586 1 +-#define X_SPARC 2 +-#define X_SPARCV9 3 +-#define X_IA64 4 +-#define X_AMD64 5 +-#define X_ZERO 6 ++#define X_ALPHA 1 ++#define X_AMD64 2 ++#define X_ARM 3 ++#define X_I586 4 ++#define X_IA64 5 ++#define X_M68K 6 ++#define X_MIPS 7 ++#define X_MIPSEL 8 ++#define X_PPC 9 ++#define X_PPC64 10 ++#define X_S390 11 ++#define X_S390X 12 ++#define X_SPARC 13 ++#define X_SPARCV9 14 ++#define X_ZERO 15 + + // ********************************** + // Make sure you set X_PLATFORM and X_ARCH defines correctly.
--- a/patches/hotspot/default/icedtea-core-build.patch Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make ---- openjdk.orig/hotspot/make/linux/makefiles/defs.make 2008-05-27 22:28:29.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/defs.make 2008-06-22 03:10:05.000000000 +0100 -@@ -97,6 +97,7 @@ - EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so - EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so -+ifndef ICEDTEA_CORE_BUILD - ifeq ($(ARCH_DATA_MODEL), 32) - EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt -@@ -111,3 +112,4 @@ - EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar - endif - endif -+endif -diff -Nru openjdk.orig/hotspot/make/Makefile openjdk/hotspot/make/Makefile ---- openjdk.orig/hotspot/make/Makefile 2008-05-27 22:28:29.000000000 +0100 -+++ openjdk/hotspot/make/Makefile 2008-06-22 03:10:05.000000000 +0100 -@@ -91,6 +91,15 @@ - all_debug: jvmg jvmg1 jvmgkernel docs export_debug - all_optimized: optimized optimized1 optimizedkernel docs export_optimized - -+# Core (non-compiler) targets made available with this Makefile -+CORE_VM_TARGETS=productcore fastdebugcore optimizedcore jvmgcore -+ -+allcore: all_productcore all_fastdebugcore -+all_productcore: productcore docs export_product -+all_fastdebugcore: fastdebugcore docs export_fastdebug -+all_debugcore: jvmgcore docs export_debug -+all_optimizedcore: optimizedcore docs export_optimized -+ - # Do everything - world: all create_jdk - -@@ -113,6 +122,10 @@ - $(CD) $(GAMMADIR)/make; \ - $(MAKE) VM_TARGET=$@ generic_build2 $(ALT_OUT) - -+$(CORE_VM_TARGETS): -+ $(CD) $(GAMMADIR)/make; \ -+ $(MAKE) VM_TARGET=$@ generic_buildcore $(ALT_OUT) -+ - $(KERNEL_VM_TARGETS): - $(CD) $(GAMMADIR)/make; \ - $(MAKE) VM_TARGET=$@ generic_buildkernel $(ALT_OUT) -@@ -159,6 +172,12 @@ - $(MAKE_ARGS) $(VM_TARGET) - endif - -+generic_buildcore: -+ $(MKDIR) -p $(OUTPUTDIR) -+ $(CD) $(OUTPUTDIR); \ -+ $(MAKE) -f $(ABS_OS_MAKEFILE) \ -+ $(MAKE_ARGS) $(VM_TARGET) -+ - generic_buildkernel: - $(MKDIR) -p $(OUTPUTDIR) - ifeq ($(OSNAME),windows) -@@ -205,13 +224,21 @@ - XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt - DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs - C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1 -+ifdef ICEDTEA_CORE_BUILD -+C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_core -+else - C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 -+endif - KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel - C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) - C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR) - KERNEL_DIR=$(KERNEL_BASE_DIR)/$(VM_SUBDIR) - - # Misc files and generated files need to come from C1 or C2 area -+ifdef ICEDTEA_CORE_BUILD -+ MISC_DIR=$(C2_DIR) -+ GEN_DIR=$(C2_BASE_DIR)/generated -+else - ifeq ($(ARCH_DATA_MODEL), 32) - MISC_DIR=$(C1_DIR) - GEN_DIR=$(C1_BASE_DIR)/generated -@@ -219,6 +246,7 @@ - MISC_DIR=$(C2_DIR) - GEN_DIR=$(C2_BASE_DIR)/generated - endif -+endif - - # Bin files (windows) - ifeq ($(OSNAME),windows) -diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp openjdk/hotspot/src/share/vm/runtime/vm_version.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp 2008-05-27 22:28:30.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2008-06-22 03:10:05.000000000 +0100 -@@ -94,8 +94,12 @@ - #ifdef TIERED - #define VMTYPE "Server" - #else -- #define VMTYPE COMPILER1_PRESENT("Client") \ -- COMPILER2_PRESENT("Server") -+#if defined(COMPILER1) || defined(COMPILER2) -+ #define VMTYPE COMPILER1_PRESENT("Client") \ -+ COMPILER2_PRESENT("Server") -+#else -+ #define VMTYPE "Core" -+#endif // COMPILER1 || COMPILER2 - #endif // TIERED - #endif // KERNEL - -
--- a/patches/hotspot/default/icedtea-core-zero-build.patch Tue Jul 21 23:06:12 2009 +0100 +++ b/patches/hotspot/default/icedtea-core-zero-build.patch Sun Jul 26 05:45:29 2009 +0100 @@ -44,7 +44,7 @@ XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1 -+ifdef ICEDTEA_CORE_BUILD ++ifdef CORE_BUILD +C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_core +else C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 @@ -55,7 +55,7 @@ KERNEL_DIR=$(KERNEL_BASE_DIR)/$(VM_SUBDIR) # Misc files and generated files need to come from C1 or C2 area -+ifdef ICEDTEA_CORE_BUILD ++ifdef CORE_BUILD + MISC_DIR=$(C2_DIR) + GEN_DIR=$(C2_BASE_DIR)/generated +else @@ -93,7 +93,7 @@ EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so -+ifndef ICEDTEA_CORE_BUILD ++ifndef CORE_BUILD ifeq ($(ARCH_DATA_MODEL), 32) EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
--- a/patches/hotspot/default/icedtea-shark-build.patch Tue Jul 21 23:06:12 2009 +0100 +++ b/patches/hotspot/default/icedtea-shark-build.patch Sun Jul 26 05:45:29 2009 +0100 @@ -1,6 +1,6 @@ diff -Nru openjdk.orig/hotspot/make/linux/Makefile openjdk/hotspot/make/linux/Makefile ---- openjdk.orig/hotspot/make/linux/Makefile 2008-07-03 08:39:52.000000000 +0100 -+++ openjdk/hotspot/make/linux/Makefile 2008-07-13 00:59:03.000000000 +0100 +--- openjdk.orig/hotspot/make/linux/Makefile 2009-07-15 17:35:02.000000000 +0100 ++++ openjdk/hotspot/make/linux/Makefile 2009-07-24 00:10:26.000000000 +0100 @@ -158,6 +158,13 @@ # profiledcore core <os>_<arch>_core/profiled # productcore core <os>_<arch>_core/product @@ -37,18 +37,18 @@ checks: check_os_version check_j2se_version -@@ -245,6 +255,10 @@ +@@ -256,6 +266,10 @@ $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks $(BUILDTREE) VARIANT=core -+$(SUBDIRS_SHARK): $(BUILDTREE_MAKE) ++$(SUBDIRS_SHARK): $(BUILDTREE_MAKE) $(PLATFORM_FILE) + $(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks + $(BUILDTREE) VARIANT=shark + # Define INSTALL=y at command line to automatically copy JVM into JAVA_HOME $(TARGETS_C2): $(SUBDIRS_C2) -@@ -275,6 +289,12 @@ +@@ -286,6 +300,12 @@ cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install endif @@ -61,7 +61,7 @@ # Just build the tree, and nothing else: tree: $(SUBDIRS_C2) tree1: $(SUBDIRS_C1) -@@ -305,7 +325,7 @@ +@@ -316,7 +336,7 @@ #------------------------------------------------------------------------------- @@ -71,9 +71,9 @@ .PHONY: all compiler1 compiler2 core .PHONY: clean clean_compiler1 clean_compiler2 clean_core docs clean_docs diff -Nru openjdk.orig/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make ---- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make 2008-07-13 00:38:03.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/buildtree.make 2008-07-13 00:59:03.000000000 +0100 -@@ -215,8 +215,8 @@ +--- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make 2009-07-15 17:35:02.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/buildtree.make 2009-07-24 00:10:26.000000000 +0100 +@@ -219,8 +219,8 @@ ../shared_dirs.lst: $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm @echo Creating directory list $@ @@ -85,26 +85,26 @@ Makefile: $(BUILDTREE_MAKE) diff -Nru openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make ---- openjdk.orig/hotspot/make/linux/makefiles/defs.make 2008-07-13 00:38:03.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/defs.make 2008-07-13 00:59:03.000000000 +0100 -@@ -118,6 +118,7 @@ +--- openjdk.orig/hotspot/make/linux/makefiles/defs.make 2009-07-15 17:35:02.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/defs.make 2009-07-24 00:11:08.000000000 +0100 +@@ -110,6 +110,7 @@ EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so - ifndef ICEDTEA_CORE_BUILD + ifneq ($(CORE_BUILD), true) +ifndef ICEDTEA_SHARK_BUILD - ifeq ($(ARCH_DATA_MODEL), 32) - EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt -@@ -133,3 +134,4 @@ + ifeq ($(ARCH_DATA_MODEL), 32) + EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt +@@ -125,3 +126,4 @@ endif - endif + endif endif +endif diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make ---- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2008-07-13 00:38:03.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/gcc.make 2008-07-13 00:59:03.000000000 +0100 -@@ -64,6 +64,9 @@ - ifdef ICEDTEA_ZERO_BUILD +--- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2009-07-23 23:49:44.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make 2009-07-24 00:10:26.000000000 +0100 +@@ -59,6 +59,9 @@ + ifeq ($(ZERO_BUILD), true) CFLAGS += $(LIBFFI_CFLAGS) endif +ifdef ICEDTEA_SHARK_BUILD @@ -114,9 +114,9 @@ CFLAGS += -fno-rtti CFLAGS += -fno-exceptions diff -Nru openjdk.orig/hotspot/make/linux/makefiles/top.make openjdk/hotspot/make/linux/makefiles/top.make ---- openjdk.orig/hotspot/make/linux/makefiles/top.make 2008-07-03 08:39:53.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/top.make 2008-07-13 00:59:03.000000000 +0100 -@@ -73,6 +73,7 @@ +--- openjdk.orig/hotspot/make/linux/makefiles/top.make 2009-03-30 17:15:27.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/top.make 2009-07-24 00:10:26.000000000 +0100 +@@ -74,6 +74,7 @@ Include_DBs/COMPILER1 = $(Include_DBs/CORE) $(VM)/includeDB_compiler1 Include_DBs/COMPILER2 = $(Include_DBs/CORE) $(VM)/includeDB_compiler2 Include_DBs/TIERED = $(Include_DBs/CORE) $(VM)/includeDB_compiler1 $(VM)/includeDB_compiler2 @@ -125,9 +125,9 @@ Cached_plat = $(GENERATED)/platform.current diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make ---- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2008-07-13 00:38:03.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/vm.make 2008-07-13 00:59:03.000000000 +0100 -@@ -126,10 +126,14 @@ +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2009-07-23 23:49:43.000000000 +0100 ++++ openjdk/hotspot/make/linux/makefiles/vm.make 2009-07-24 00:10:26.000000000 +0100 +@@ -130,10 +130,14 @@ STATIC_CXX = true @@ -144,9 +144,9 @@ endif ifeq ($(LINK_INTO),AOUT) -@@ -157,6 +161,10 @@ - ifdef ICEDTEA_ZERO_BUILD - LIBS_VM += $(LIBFFI_LIBS) +@@ -161,6 +165,10 @@ + ifeq ($(ZERO_BUILD), true) + LIBS_VM += $(LIBFFI_LIBS) endif +ifdef ICEDTEA_SHARK_BUILD +LFLAGS_VM += $(LLVM_LDFLAGS) @@ -156,8 +156,8 @@ LINK_VM = $(LINK_LIB.c) diff -Nru openjdk.orig/hotspot/make/Makefile openjdk/hotspot/make/Makefile ---- openjdk.orig/hotspot/make/Makefile 2008-07-13 00:38:02.000000000 +0100 -+++ openjdk/hotspot/make/Makefile 2008-07-13 00:59:03.000000000 +0100 +--- openjdk.orig/hotspot/make/Makefile 2009-07-15 17:35:02.000000000 +0100 ++++ openjdk/hotspot/make/Makefile 2009-07-24 00:10:26.000000000 +0100 @@ -103,6 +103,15 @@ all_debugcore: jvmgcore docs export_debug all_optimizedcore: optimizedcore docs export_optimized @@ -199,7 +199,7 @@ $(MKDIR) -p $(OUTPUTDIR) ifeq ($(OSNAME),windows) @@ -230,8 +249,12 @@ - ifdef ICEDTEA_CORE_BUILD + ifeq ($(CORE_BUILD), true) C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_core else +ifdef ICEDTEA_SHARK_BUILD @@ -230,4 +230,3 @@ # Bin files (windows) ifeq ($(OSNAME),windows) -
--- a/patches/hotspot/default/icedtea-static-libstdc++.patch Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make ---- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2008-05-16 22:13:31.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/vm.make 2008-05-23 23:25:47.000000000 +0100 -@@ -124,6 +124,12 @@ - - STATIC_CXX = true - -+ifeq ($(ZERO_LIBARCH), ppc64) -+ STATIC_CXX = false -+else -+ STATIC_CXX = true -+endif -+ - ifeq ($(LINK_INTO),AOUT) - LIBJVM.o = - LIBJVM_MAPFILE =
--- a/patches/hotspot/default/icedtea-zero-build.patch Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ -diff -Nru openjdk.orig/hotspot/make/defs.make openjdk/hotspot/make/defs.make ---- openjdk.orig/hotspot/make/defs.make 2009-03-30 17:15:27.000000000 +0100 -+++ openjdk/hotspot/make/defs.make 2009-06-15 17:09:12.000000000 +0100 -@@ -192,13 +192,14 @@ - - # Use uname output for SRCARCH, but deal with platform differences. If ARCH - # is not explicitly listed below, it is treated as x86. -- SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64,$(ARCH))) -+ SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 zero,$(ARCH))) - ARCH/ = x86 - ARCH/sparc = sparc - ARCH/sparc64= sparc - ARCH/ia64 = ia64 - ARCH/amd64 = x86 - ARCH/x86_64 = x86 -+ ARCH/zero = zero - - # BUILDARCH is usually the same as SRCARCH, except for sparcv9 - BUILDARCH = $(SRCARCH) -@@ -222,8 +223,9 @@ - LIBARCH/sparc = sparc - LIBARCH/sparcv9 = sparcv9 - LIBARCH/ia64 = ia64 -+ LIBARCH/zero = $(ZERO_LIBARCH) - -- LP64_ARCH = sparcv9 amd64 ia64 -+ LP64_ARCH = sparcv9 amd64 ia64 zero - endif - - # Required make macro settings for all platforms -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/buildtree.make openjdk/hotspot/make/linux/makefiles/buildtree.make ---- openjdk.orig/hotspot/make/linux/makefiles/buildtree.make 2009-03-30 17:15:27.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/buildtree.make 2009-06-15 17:09:12.000000000 +0100 -@@ -321,6 +321,7 @@ - DATA_MODE/sparcv9 = 64 - DATA_MODE/amd64 = 64 - DATA_MODE/ia64 = 64 -+DATA_MODE/zero = $(ZERO_BITSPERWORD) - - JAVA_FLAG/32 = -d32 - JAVA_FLAG/64 = -d64 -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/defs.make openjdk/hotspot/make/linux/makefiles/defs.make ---- openjdk.orig/hotspot/make/linux/makefiles/defs.make 2009-06-15 17:03:36.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/defs.make 2009-06-15 17:09:12.000000000 +0100 -@@ -37,6 +37,18 @@ - ARCH_DATA_MODEL ?= 32 - endif - -+# zero -+ifdef ICEDTEA_ZERO_BUILD -+ ARCH_DATA_MODEL = $(ZERO_BITSPERWORD) -+ ifeq ($(ARCH_DATA_MODEL), 64) -+ MAKE_ARGS += LP64=1 -+ endif -+ PLATFORM = linux-zero -+ VM_PLATFORM = linux_zero -+ HS_ARCH = zero -+ ARCH = zero -+endif -+ - # ia64 - ifeq ($(ARCH), ia64) - ARCH_DATA_MODEL = 64 -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/gcc.make openjdk/hotspot/make/linux/makefiles/gcc.make ---- openjdk.orig/hotspot/make/linux/makefiles/gcc.make 2009-06-15 17:03:36.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/gcc.make 2009-06-15 17:09:12.000000000 +0100 -@@ -56,6 +56,9 @@ - VM_PICFLAG/AOUT = - VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) - -+ifdef ICEDTEA_ZERO_BUILD -+CFLAGS += $(LIBFFI_CFLAGS) -+endif - CFLAGS += $(VM_PICFLAG) - CFLAGS += -fno-rtti - CFLAGS += -fno-exceptions -@@ -68,6 +71,7 @@ - ARCHFLAG/ia64 = - ARCHFLAG/sparc = -m32 -mcpu=v9 - ARCHFLAG/sparcv9 = -m64 -mcpu=v9 -+ARCHFLAG/zero = $(ZERO_ARCHFLAG) - - CFLAGS += $(ARCHFLAG) - AOUT_FLAGS += $(ARCHFLAG) -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/sa.make openjdk/hotspot/make/linux/makefiles/sa.make ---- openjdk.orig/hotspot/make/linux/makefiles/sa.make 2009-03-30 17:15:27.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/sa.make 2009-06-15 17:09:12.000000000 +0100 -@@ -52,10 +52,10 @@ - SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties - - # if $(AGENT_DIR) does not exist, we don't build SA --# also, we don't build SA on Itanium. -+# also, we don't build SA on Itanium or zero. - - all: -- if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \ -+ if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "zero" ] ; then \ - $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \ - fi - -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/saproc.make openjdk/hotspot/make/linux/makefiles/saproc.make ---- openjdk.orig/hotspot/make/linux/makefiles/saproc.make 2009-06-15 14:57:37.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/saproc.make 2009-06-15 17:09:12.000000000 +0100 -@@ -49,10 +49,10 @@ - endif - - # if $(AGENT_DIR) does not exist, we don't build SA --# also, we don't build SA on Itanium. -+# also, we don't build SA on Itanium or zero. - - checkAndBuildSA: -- $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \ -+ $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "zero" ] ; then \ - $(MAKE) -f vm.make $(LIBSAPROC); \ - fi - -diff -Nru openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make ---- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2009-06-15 17:03:36.000000000 +0100 -+++ openjdk/hotspot/make/linux/makefiles/vm.make 2009-06-15 17:09:12.000000000 +0100 -@@ -158,6 +158,9 @@ - - LIBS_VM += $(LIBS) - endif -+ifdef ICEDTEA_ZERO_BUILD -+LIBS_VM += $(LIBFFI_LIBS) -+endif - - LINK_VM = $(LINK_LIB.c) -
--- a/patches/icedtea-arch.patch Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,191 +0,0 @@ -diff -Nru openjdk.orig/corba/make/common/Defs-linux.gmk openjdk/corba/make/common/Defs-linux.gmk ---- openjdk.orig/corba/make/common/Defs-linux.gmk 2009-04-15 16:23:02.000000000 +0100 -+++ openjdk/corba/make/common/Defs-linux.gmk 2009-04-15 16:38:16.000000000 +0100 -@@ -92,9 +92,19 @@ - # We need this frame pointer to make it easy to walk the stacks. - # This should be the default on X86, but ia64 and amd64 may not have this - # as the default. -+CFLAGS_REQUIRED_alpha += -mieee -D_LITTLE_ENDIAN - CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN -+CFLAGS_REQUIRED_arm += -D_LITTLE_ENDIAN -+CFLAGS_REQUIRED_hppa += - CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN - CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN -+CFLAGS_REQUIRED_m68k += -+CFLAGS_REQUIRED_mips += -+CFLAGS_REQUIRED_mipsel += -D_LITTLE_ENDIAN -+CFLAGS_REQUIRED_ppc += -m32 -+CFLAGS_REQUIRED_ppc64 += -m64 -+CFLAGS_REQUIRED_s390 += -+CFLAGS_REQUIRED_s390x += -m64 - CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 - LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 - CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 -diff -Nru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk ---- openjdk.orig/jdk/make/common/Defs-linux.gmk 2009-04-15 16:23:02.000000000 +0100 -+++ openjdk/jdk/make/common/Defs-linux.gmk 2009-04-15 16:38:16.000000000 +0100 -@@ -109,9 +109,19 @@ - # We need this frame pointer to make it easy to walk the stacks. - # This should be the default on X86, but ia64 and amd64 may not have this - # as the default. -+CFLAGS_REQUIRED_alpha += -mieee -D_LITTLE_ENDIAN - CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN -+CFLAGS_REQUIRED_arm += -D_LITTLE_ENDIAN -+CFLAGS_REQUIRED_hppa += - CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN - CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN -+CFLAGS_REQUIRED_m68k += -+CFLAGS_REQUIRED_mips += -+CFLAGS_REQUIRED_mipsel += -D_LITTLE_ENDIAN -+CFLAGS_REQUIRED_ppc += -m32 -+CFLAGS_REQUIRED_ppc64 += -m64 -+CFLAGS_REQUIRED_s390 += -+CFLAGS_REQUIRED_s390x += -m64 - CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 - LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 - CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 -diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk 2009-04-15 16:23:02.000000000 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2009-04-15 16:39:22.000000000 +0100 -@@ -71,6 +71,52 @@ - REQUIRED_CC_VER = 3.2 - REQUIRED_GCC_VER = 3.2.* - endif -+ ifeq ($(ARCH), alpha) -+ # alpha -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifeq ($(ARCH), amd64) -+ # amd64 -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifeq ($(ARCH), arm) -+ # arm -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifeq ($(ARCH), i586) -+ # i586 -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.1* -+ REQUIRED_GCC_VER_INT = 3.2.1-7a -+ endif -+ ifeq ($(ARCH), ia64) -+ # ia64 -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 2.9[56789].* -+ endif -+ ifneq ("$(findstring m68k,$(ARCH))", "") -+ # m68k -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifneq ("$(findstring mips,$(ARCH))", "") -+ # mips -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifneq ("$(findstring ppc,$(ARCH))", "") -+ # ppc or ppc64 -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif -+ ifneq ("$(findstring s390,$(ARCH))", "") -+ # s390 or s390x -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ endif - # Option used to create a shared library - SHARED_LIBRARY_FLAG = -shared -mimpure-text - SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 ) -diff -Nru openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk openjdk/jdk/make/javax/sound/SoundDefs.gmk ---- openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk 2009-04-15 16:23:02.000000000 +0100 -+++ openjdk/jdk/make/javax/sound/SoundDefs.gmk 2009-04-15 16:38:16.000000000 +0100 -@@ -58,10 +58,54 @@ - ifdef ICEDTEA_ZERO_BUILD - CPPFLAGS += -DX_ARCH=X_ZERO - else -+ ifeq ($(ARCH), alpha) -+ CPPFLAGS += -DX_ARCH=X_ALPHA -+ endif # ARCH alpha -+ -+ ifeq ($(ARCH), amd64) -+ CPPFLAGS += -DX_ARCH=X_AMD64 -+ endif # ARCH amd64 -+ -+ ifeq ($(ARCH), arm) -+ CPPFLAGS += -DX_ARCH=X_ARM -+ endif # ARCH arm -+ - ifeq ($(ARCH), i586) - CPPFLAGS += -DX_ARCH=X_I586 - endif # ARCH i586 - -+ ifeq ($(ARCH), ia64) -+ CPPFLAGS += -DX_ARCH=X_IA64 -+ endif # ARCH ia64 -+ -+ ifeq ($(ARCH), m68k) -+ CPPFLAGS += -DX_ARCH=X_M68K -+ endif # ARCH m68k -+ -+ ifeq ($(ARCH), mips) -+ CPPFLAGS += -DX_ARCH=X_MIPS -+ endif # ARCH mips -+ -+ ifeq ($(ARCH), mipsel) -+ CPPFLAGS += -DX_ARCH=X_MIPSEL -+ endif # ARCH mipsel -+ -+ ifeq ($(ARCH), ppc) -+ CPPFLAGS += -DX_ARCH=X_PPC -+ endif # ARCH ppc -+ -+ ifeq ($(ARCH), ppc64) -+ CPPFLAGS += -DX_ARCH=X_PPC64 -+ endif # ARCH ppc64 -+ -+ ifeq ($(ARCH), s390) -+ CPPFLAGS += -DX_ARCH=X_S390 -+ endif # ARCH s390 -+ -+ ifeq ($(ARCH), s390x) -+ CPPFLAGS += -DX_ARCH=X_S390X -+ endif # ARCH s390x -+ - ifeq ($(ARCH), sparc) - CPPFLAGS += -DX_ARCH=X_SPARC - endif # ARCH sparc -diff -Nru openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h ---- openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2009-04-15 16:23:02.000000000 +0100 -+++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2009-04-15 16:38:16.000000000 +0100 -@@ -33,12 +33,21 @@ - #define X_LINUX 3 - - // types for X_ARCH --#define X_I586 1 --#define X_SPARC 2 --#define X_SPARCV9 3 --#define X_IA64 4 --#define X_AMD64 5 --#define X_ZERO 6 -+#define X_ALPHA 1 -+#define X_AMD64 2 -+#define X_ARM 3 -+#define X_I586 4 -+#define X_IA64 5 -+#define X_M68K 6 -+#define X_MIPS 7 -+#define X_MIPSEL 8 -+#define X_PPC 9 -+#define X_PPC64 10 -+#define X_S390 11 -+#define X_S390X 12 -+#define X_SPARC 13 -+#define X_SPARCV9 14 -+#define X_ZERO 15 - - // ********************************** - // Make sure you set X_PLATFORM and X_ARCH defines correctly.
--- a/patches/icedtea-core-build.patch Tue Jul 21 23:06:12 2009 +0100 +++ b/patches/icedtea-core-build.patch Sun Jul 26 05:45:29 2009 +0100 @@ -1,7 +1,7 @@ diff -Nru openjdk.orig/corba/make/common/Defs-linux.gmk openjdk/corba/make/common/Defs-linux.gmk ---- openjdk.orig/corba/make/common/Defs-linux.gmk 2008-05-27 22:28:05.000000000 +0100 -+++ openjdk/corba/make/common/Defs-linux.gmk 2008-06-22 03:10:05.000000000 +0100 -@@ -250,7 +250,12 @@ +--- openjdk.orig/corba/make/common/Defs-linux.gmk 2009-07-15 17:35:01.000000000 +0100 ++++ openjdk/corba/make/common/Defs-linux.gmk 2009-07-23 17:41:01.000000000 +0100 +@@ -258,7 +258,12 @@ # -L to the -ljvm, this is because -ljava depends on -ljvm, whereas # the library itself should not. # @@ -16,9 +16,9 @@ JAVALIB = -L$(BOOTDIR)/jre/lib/$(LIBARCH) -ljava $(JVMLIB) diff -Nru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk ---- openjdk.orig/jdk/make/common/Defs-linux.gmk 2008-06-22 03:01:01.000000000 +0100 -+++ openjdk/jdk/make/common/Defs-linux.gmk 2008-06-22 03:10:05.000000000 +0100 -@@ -258,7 +258,12 @@ +--- openjdk.orig/jdk/make/common/Defs-linux.gmk 2009-07-15 17:35:01.000000000 +0100 ++++ openjdk/jdk/make/common/Defs-linux.gmk 2009-07-23 17:41:01.000000000 +0100 +@@ -282,7 +282,12 @@ # -L to the -ljvm, this is because -ljava depends on -ljvm, whereas # the library itself should not. # @@ -32,50 +32,3 @@ JVMLIB = -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm JAVALIB = -ljava $(JVMLIB) -diff -Nru openjdk.orig/jdk/make/java/redist/Makefile openjdk/jdk/make/java/redist/Makefile ---- openjdk.orig/jdk/make/java/redist/Makefile 2008-05-27 22:30:14.000000000 +0100 -+++ openjdk/jdk/make/java/redist/Makefile 2008-06-22 03:10:05.000000000 +0100 -@@ -95,10 +95,12 @@ - endif # INCLUDE_SA - - # Hotspot client is only available on 32-bit builds -+ifndef ICEDTEA_CORE_BUILD - ifeq ($(ARCH_DATA_MODEL), 32) - IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \ - $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt - endif -+endif - - ifeq ($(PLATFORM), windows) - # Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Windows -@@ -158,6 +160,7 @@ - IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME) - endif - -+ifndef ICEDTEA_CORE_BUILD - ifeq ($(ARCH_DATA_MODEL), 32) - - IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) -@@ -188,6 +191,8 @@ - - endif # 32bit - -+endif # ICEDTEA_CORE_BUILD -+ - # NOT Windows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ NOT Windows - - endif # PLATFORM -diff -Nru openjdk.orig/make/hotspot-rules.gmk openjdk/make/hotspot-rules.gmk ---- openjdk.orig/make/hotspot-rules.gmk 2008-05-27 22:27:57.000000000 +0100 -+++ openjdk/make/hotspot-rules.gmk 2008-06-22 03:10:05.000000000 +0100 -@@ -72,6 +72,10 @@ - HOTSPOT_TARGET = all_fastdebug - endif - -+ifdef ICEDTEA_CORE_BUILD -+ HOTSPOT_TARGET := $(HOTSPOT_TARGET)core -+endif -+ - HOTSPOT_BUILD_ARGUMENTS += $(COMMON_BUILD_ARGUMENTS) - HOTSPOT_BUILD_ARGUMENTS += ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR) - HOTSPOT_BUILD_ARGUMENTS += ALT_EXPORT_PATH=$(HOTSPOT_EXPORT_PATH)
--- a/patches/icedtea-gcc-suffix.patch Tue Jul 21 23:06:12 2009 +0100 +++ b/patches/icedtea-gcc-suffix.patch Sun Jul 26 05:45:29 2009 +0100 @@ -1,6 +1,6 @@ diff -Nru openjdk.orig/corba/make/common/shared/Compiler-gcc.gmk openjdk/corba/make/common/shared/Compiler-gcc.gmk ---- openjdk.orig/corba/make/common/shared/Compiler-gcc.gmk 2009-03-20 11:54:59.000000000 +0000 -+++ openjdk/corba/make/common/shared/Compiler-gcc.gmk 2009-04-14 17:54:35.000000000 +0100 +--- openjdk.orig/corba/make/common/shared/Compiler-gcc.gmk 2009-07-15 17:35:01.000000000 +0100 ++++ openjdk/corba/make/common/shared/Compiler-gcc.gmk 2009-07-23 16:16:30.000000000 +0100 @@ -58,17 +58,17 @@ ifeq ($(PLATFORM), linux) @@ -21,11 +21,11 @@ - CXX = $(COMPILER_PATH)g++ + CXX = $(COMPILER_PATH)g++$(GCC_SUFFIX) endif - ifneq ("$(findstring sparc,$(ARCH))", "") - # sparc or sparcv9 + ifeq ($(ZERO_BUILD), true) + # zero diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk 2009-04-14 15:55:52.000000000 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2009-04-14 17:54:35.000000000 +0100 +--- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk 2009-03-30 23:08:42.000000000 +0100 ++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2009-07-23 16:16:30.000000000 +0100 @@ -54,17 +54,17 @@ ifeq ($(PLATFORM), linux)
--- a/patches/icedtea-libraries.patch Tue Jul 21 23:06:12 2009 +0100 +++ b/patches/icedtea-libraries.patch Sun Jul 26 05:45:29 2009 +0100 @@ -1,6 +1,6 @@ diff -Nru openjdk.orig/jdk/make/com/sun/java/pack/Makefile openjdk/jdk/make/com/sun/java/pack/Makefile ---- openjdk.orig/jdk/make/com/sun/java/pack/Makefile 2009-03-30 17:23:03.000000000 +0100 -+++ openjdk/jdk/make/com/sun/java/pack/Makefile 2009-07-07 14:30:46.000000000 +0100 +--- openjdk.orig/jdk/make/com/sun/java/pack/Makefile 2009-07-14 09:14:34.000000000 +0100 ++++ openjdk/jdk/make/com/sun/java/pack/Makefile 2009-07-23 17:27:30.000000000 +0100 @@ -75,12 +75,10 @@ $(ZIPOBJDIR)/infutil.$(OBJECT_SUFFIX) \ $(ZIPOBJDIR)/inffast.$(OBJECT_SUFFIX) @@ -32,14 +32,14 @@ endif #LINUX endif #PLATFORM diff -Nru openjdk.orig/jdk/make/common/Program.gmk openjdk/jdk/make/common/Program.gmk ---- openjdk.orig/jdk/make/common/Program.gmk 2009-03-30 17:23:03.000000000 +0100 -+++ openjdk/jdk/make/common/Program.gmk 2009-07-07 14:30:46.000000000 +0100 +--- openjdk.orig/jdk/make/common/Program.gmk 2009-07-15 17:35:01.000000000 +0100 ++++ openjdk/jdk/make/common/Program.gmk 2009-07-23 17:28:45.000000000 +0100 @@ -85,7 +85,7 @@ endif endif ifeq ($(PLATFORM), linux) -- LDFLAGS += -z origin -+ LDFLAGS += -lz -z origin +- LDFLAGS += -Wl,-z -Wl,origin ++ LDFLAGS += -lz -Wl,-z -Wl,origin LDFLAGS += -Wl,--allow-shlib-undefined LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH)/jli @@ -52,8 +52,8 @@ # this may not be necessary... ifeq ($(PLATFORM), windows) diff -Nru openjdk.orig/jdk/make/java/jli/Makefile openjdk/jdk/make/java/jli/Makefile ---- openjdk.orig/jdk/make/java/jli/Makefile 2009-03-30 17:23:03.000000000 +0100 -+++ openjdk/jdk/make/java/jli/Makefile 2009-07-07 14:30:46.000000000 +0100 +--- openjdk.orig/jdk/make/java/jli/Makefile 2009-07-15 17:35:01.000000000 +0100 ++++ openjdk/jdk/make/java/jli/Makefile 2009-07-23 17:27:30.000000000 +0100 @@ -44,8 +44,6 @@ include $(BUILDDIR)/common/Defs.gmk @@ -63,7 +63,7 @@ LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin -@@ -66,15 +64,7 @@ +@@ -70,15 +68,7 @@ parse_manifest.c \ version_comp.c \ wildcard.c \ @@ -80,7 +80,7 @@ ifneq ($(PLATFORM), windows) -@@ -99,7 +89,7 @@ +@@ -103,7 +93,7 @@ # Note: its important to keep this order meaning -lc is the # last library otherwise it could cause compatibility issues # by pulling in SUNW_private symbols from libc @@ -89,7 +89,7 @@ ifeq ($(USE_PTHREADS),true) LDLIBS += -lpthread endif # USE_PTHREADS -@@ -123,7 +113,6 @@ +@@ -127,7 +117,6 @@ OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC) OTHER_INCLUDES += -I$(LAUNCHER_PLATFORM_SRC) @@ -97,7 +97,7 @@ # # Library to compile. -@@ -164,4 +153,4 @@ +@@ -168,4 +157,4 @@ # # Add to ambient vpath so we pick up the library files # @@ -105,7 +105,7 @@ +vpath %.c $(LAUNCHER_SHARE_SRC) $(LAUNCHER_PLATFORM_SRC) diff -Nru openjdk.orig/jdk/make/java/zip/FILES_c.gmk openjdk/jdk/make/java/zip/FILES_c.gmk --- openjdk.orig/jdk/make/java/zip/FILES_c.gmk 2009-05-08 16:10:43.000000000 +0100 -+++ openjdk/jdk/make/java/zip/FILES_c.gmk 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/make/java/zip/FILES_c.gmk 2009-07-23 17:27:30.000000000 +0100 @@ -29,15 +29,4 @@ Deflater.c \ Inflater.c \ @@ -124,7 +124,7 @@ zip_util.c diff -Nru openjdk.orig/jdk/make/java/zip/Makefile openjdk/jdk/make/java/zip/Makefile --- openjdk.orig/jdk/make/java/zip/Makefile 2009-03-30 17:23:03.000000000 +0100 -+++ openjdk/jdk/make/java/zip/Makefile 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/make/java/zip/Makefile 2009-07-23 17:27:30.000000000 +0100 @@ -30,8 +30,6 @@ PRODUCT = sun include $(BUILDDIR)/common/Defs.gmk @@ -154,7 +154,7 @@ +OTHER_LDLIBS = $(JVMLIB) -lz diff -Nru openjdk.orig/jdk/make/sun/jpeg/FILES_c.gmk openjdk/jdk/make/sun/jpeg/FILES_c.gmk --- openjdk.orig/jdk/make/sun/jpeg/FILES_c.gmk 2009-03-30 17:23:03.000000000 +0100 -+++ openjdk/jdk/make/sun/jpeg/FILES_c.gmk 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/make/sun/jpeg/FILES_c.gmk 2009-07-23 17:27:30.000000000 +0100 @@ -25,51 +25,7 @@ FILES_c = \ @@ -210,7 +210,7 @@ FILES_c += \ diff -Nru openjdk.orig/jdk/make/sun/jpeg/Makefile openjdk/jdk/make/sun/jpeg/Makefile --- openjdk.orig/jdk/make/sun/jpeg/Makefile 2009-03-30 17:23:03.000000000 +0100 -+++ openjdk/jdk/make/sun/jpeg/Makefile 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/make/sun/jpeg/Makefile 2009-07-23 17:27:30.000000000 +0100 @@ -67,6 +67,8 @@ include $(BUILDDIR)/common/Mapfile-vers.gmk include $(BUILDDIR)/common/Library.gmk @@ -222,7 +222,7 @@ # diff -Nru openjdk.orig/jdk/make/sun/splashscreen/FILES_c.gmk openjdk/jdk/make/sun/splashscreen/FILES_c.gmk --- openjdk.orig/jdk/make/sun/splashscreen/FILES_c.gmk 2009-03-30 17:23:03.000000000 +0100 -+++ openjdk/jdk/make/sun/splashscreen/FILES_c.gmk 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/make/sun/splashscreen/FILES_c.gmk 2009-07-23 17:27:30.000000000 +0100 @@ -30,81 +30,5 @@ splashscreen_impl.c \ splashscreen_jpeg.c \ @@ -308,7 +308,7 @@ diff -Nru openjdk.orig/jdk/make/sun/splashscreen/Makefile openjdk/jdk/make/sun/splashscreen/Makefile --- openjdk.orig/jdk/make/sun/splashscreen/Makefile 2009-03-30 17:23:03.000000000 +0100 -+++ openjdk/jdk/make/sun/splashscreen/Makefile 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/make/sun/splashscreen/Makefile 2009-07-23 17:27:30.000000000 +0100 @@ -59,12 +59,12 @@ # C Flags # @@ -341,7 +341,7 @@ # and use alternative implementations in C. diff -Nru openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h --- openjdk.orig/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2009-05-08 16:10:58.000000000 +0100 -+++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2009-07-23 17:27:30.000000000 +0100 @@ -89,11 +89,7 @@ // bytes and byte arrays @@ -356,7 +356,7 @@ typedef DWORDLONG julong; diff -Nru openjdk.orig/jdk/src/share/native/java/util/zip/Adler32.c openjdk/jdk/src/share/native/java/util/zip/Adler32.c --- openjdk.orig/jdk/src/share/native/java/util/zip/Adler32.c 2009-03-30 17:23:07.000000000 +0100 -+++ openjdk/jdk/src/share/native/java/util/zip/Adler32.c 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/src/share/native/java/util/zip/Adler32.c 2009-07-23 17:27:30.000000000 +0100 @@ -29,7 +29,7 @@ #include "jni.h" @@ -368,7 +368,7 @@ diff -Nru openjdk.orig/jdk/src/share/native/java/util/zip/CRC32.c openjdk/jdk/src/share/native/java/util/zip/CRC32.c --- openjdk.orig/jdk/src/share/native/java/util/zip/CRC32.c 2009-03-30 17:23:07.000000000 +0100 -+++ openjdk/jdk/src/share/native/java/util/zip/CRC32.c 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/src/share/native/java/util/zip/CRC32.c 2009-07-23 17:27:30.000000000 +0100 @@ -29,7 +29,7 @@ #include "jni.h" @@ -380,7 +380,7 @@ diff -Nru openjdk.orig/jdk/src/share/native/java/util/zip/Deflater.c openjdk/jdk/src/share/native/java/util/zip/Deflater.c --- openjdk.orig/jdk/src/share/native/java/util/zip/Deflater.c 2009-06-30 14:05:51.000000000 +0100 -+++ openjdk/jdk/src/share/native/java/util/zip/Deflater.c 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/src/share/native/java/util/zip/Deflater.c 2009-07-23 17:27:30.000000000 +0100 @@ -32,7 +32,7 @@ #include "jlong.h" #include "jni.h" @@ -392,7 +392,7 @@ diff -Nru openjdk.orig/jdk/src/share/native/java/util/zip/Inflater.c openjdk/jdk/src/share/native/java/util/zip/Inflater.c --- openjdk.orig/jdk/src/share/native/java/util/zip/Inflater.c 2009-06-30 14:05:51.000000000 +0100 -+++ openjdk/jdk/src/share/native/java/util/zip/Inflater.c 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/src/share/native/java/util/zip/Inflater.c 2009-07-23 17:27:30.000000000 +0100 @@ -35,7 +35,7 @@ #include "jni.h" #include "jvm.h" @@ -403,8 +403,8 @@ #define ThrowDataFormatException(env, msg) \ diff -Nru openjdk.orig/jdk/src/share/native/java/util/zip/zip_util.c openjdk/jdk/src/share/native/java/util/zip/zip_util.c ---- openjdk.orig/jdk/src/share/native/java/util/zip/zip_util.c 2009-05-08 16:10:59.000000000 +0100 -+++ openjdk/jdk/src/share/native/java/util/zip/zip_util.c 2009-07-07 14:30:46.000000000 +0100 +--- openjdk.orig/jdk/src/share/native/java/util/zip/zip_util.c 2009-07-14 09:14:42.000000000 +0100 ++++ openjdk/jdk/src/share/native/java/util/zip/zip_util.c 2009-07-23 17:27:30.000000000 +0100 @@ -44,7 +44,8 @@ #include "io_util.h" #include "io_util_md.h" @@ -417,7 +417,7 @@ #ifdef USE_MMAP diff -Nru openjdk.orig/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c --- openjdk.orig/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2009-07-06 14:52:43.000000000 +0100 -+++ openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c 2009-07-23 17:27:30.000000000 +0100 @@ -51,7 +51,9 @@ /* headers from the JPEG library */ @@ -20951,7 +20951,7 @@ -#endif /* JPEG_INTERNAL_OPTIONS */ diff -Nru openjdk.orig/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c --- openjdk.orig/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c 2009-03-30 17:23:07.000000000 +0100 -+++ openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c 2009-07-23 17:27:30.000000000 +0100 @@ -45,7 +45,9 @@ #undef boolean #undef FAR @@ -25491,7 +25491,7 @@ -Please send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net. diff -Nru openjdk.orig/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c --- openjdk.orig/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c 2009-05-08 16:10:59.000000000 +0100 -+++ openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_gif.c 2009-07-23 17:27:30.000000000 +0100 @@ -26,7 +26,7 @@ #include "splashscreen_impl.h" #include "splashscreen_gfx.h" @@ -25503,7 +25503,7 @@ #define GIF_USER_INPUT 0x02 diff -Nru openjdk.orig/jdk/src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c --- openjdk.orig/jdk/src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c 2009-03-30 17:23:07.000000000 +0100 -+++ openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_jpeg.c 2009-07-23 17:27:30.000000000 +0100 @@ -25,9 +25,8 @@ #include "splashscreen_impl.h" @@ -25535,7 +25535,7 @@ src = (stream_src_ptr) cinfo->src; diff -Nru openjdk.orig/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c --- openjdk.orig/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c 2009-04-14 16:51:17.000000000 +0100 -+++ openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c 2009-07-07 14:30:46.000000000 +0100 ++++ openjdk/jdk/src/share/native/sun/awt/splashscreen/splashscreen_png.c 2009-07-23 17:27:30.000000000 +0100 @@ -25,7 +25,7 @@ #include "splashscreen_impl.h"
--- a/patches/icedtea-linker-options.patch Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -diff -ru openjdk.orig/corba/make/common/Defs-linux.gmk openjdk/corba/make/common/Defs-linux.gmk ---- openjdk.orig/corba/make/common/Defs-linux.gmk 2007-11-08 13:45:46.000000000 +0000 -+++ openjdk/corba/make/common/Defs-linux.gmk 2007-11-08 13:44:13.000000000 +0000 -@@ -196,7 +196,7 @@ - - EXTRA_LIBS += -lc - --LDFLAGS_DEFS_OPTION = -z defs -+LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs - LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION) - - # -diff -ru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk ---- openjdk.orig/jdk/make/common/Defs-linux.gmk 2007-11-08 13:45:46.000000000 +0000 -+++ openjdk/jdk/make/common/Defs-linux.gmk 2007-11-08 13:43:52.000000000 +0000 -@@ -204,7 +204,7 @@ - - EXTRA_LIBS += -lc - --LDFLAGS_DEFS_OPTION = -z defs -+LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs - LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION) - - # -diff -ru openjdk.orig/jdk/make/common/Program.gmk openjdk/jdk/make/common/Program.gmk ---- openjdk.orig/jdk/make/common/Program.gmk 2007-11-08 13:45:46.000000000 +0000 -+++ openjdk/jdk/make/common/Program.gmk 2007-11-08 13:42:44.000000000 +0000 -@@ -85,7 +85,7 @@ - endif - endif - ifeq ($(PLATFORM), linux) -- LDFLAGS += -lz -z origin -+ LDFLAGS += -lz -Wl,-z -Wl,origin - LDFLAGS += -Wl,--allow-shlib-undefined - LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli - LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH)/jli -diff -ru openjdk.orig/jdk/make/java/instrument/Makefile openjdk/jdk/make/java/instrument/Makefile ---- openjdk.orig/jdk/make/java/instrument/Makefile 2007-11-08 13:45:46.000000000 +0000 -+++ openjdk/jdk/make/java/instrument/Makefile 2007-11-08 13:42:25.000000000 +0000 -@@ -109,7 +109,7 @@ - LDFLAGS += -R \$$ORIGIN/jli - endif - ifeq ($(PLATFORM), linux) -- LDFLAGS += -z origin -+ LDFLAGS += -Wl,-z -Wl,origin - LDFLAGS += -Wl,--allow-shlib-undefined - LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/jli - endif
--- a/patches/icedtea-shark-build.patch Tue Jul 21 23:06:12 2009 +0100 +++ b/patches/icedtea-shark-build.patch Sun Jul 26 05:45:29 2009 +0100 @@ -1,10 +1,10 @@ diff -Nru openjdk.orig/jdk/make/java/redist/Makefile openjdk/jdk/make/java/redist/Makefile ---- openjdk.orig/jdk/make/java/redist/Makefile 2008-07-13 00:38:02.000000000 +0100 -+++ openjdk/jdk/make/java/redist/Makefile 2008-07-13 00:59:03.000000000 +0100 +--- openjdk.orig/jdk/make/java/redist/Makefile 2009-07-15 17:35:01.000000000 +0100 ++++ openjdk/jdk/make/java/redist/Makefile 2009-07-23 23:45:17.000000000 +0100 @@ -96,11 +96,13 @@ - # Hotspot client is only available on 32-bit builds - ifndef ICEDTEA_CORE_BUILD + # Hotspot client is only available on 32-bit non-core builds + ifneq ($(CORE_BUILD), true) +ifndef ICEDTEA_SHARK_BUILD ifeq ($(ARCH_DATA_MODEL), 32) IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \ @@ -15,28 +15,28 @@ ifeq ($(PLATFORM), windows) # Windows vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Windows -@@ -161,6 +163,7 @@ +@@ -174,6 +176,7 @@ endif - ifndef ICEDTEA_CORE_BUILD + ifneq ($(CORE_BUILD), true) +ifndef ICEDTEA_SHARK_BUILD ifeq ($(ARCH_DATA_MODEL), 32) IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) -@@ -191,6 +194,8 @@ +@@ -204,6 +207,8 @@ endif # 32bit +endif # ICEDTEA_SHARK_BUILD + - endif # ICEDTEA_CORE_BUILD + endif # CORE_BUILD # NOT Windows ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ NOT Windows diff -Nru openjdk.orig/make/hotspot-rules.gmk openjdk/make/hotspot-rules.gmk ---- openjdk.orig/make/hotspot-rules.gmk 2008-07-13 00:38:02.000000000 +0100 -+++ openjdk/make/hotspot-rules.gmk 2008-07-13 00:59:03.000000000 +0100 +--- openjdk.orig/make/hotspot-rules.gmk 2009-07-15 17:35:01.000000000 +0100 ++++ openjdk/make/hotspot-rules.gmk 2009-07-23 23:44:12.000000000 +0100 @@ -75,6 +75,9 @@ - ifdef ICEDTEA_CORE_BUILD + ifeq ($(CORE_BUILD), true) HOTSPOT_TARGET := $(HOTSPOT_TARGET)core endif +ifdef ICEDTEA_SHARK_BUILD
--- a/patches/icedtea-signature-iterator.patch Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -diff -r ee6af95bc459 openjdk/hotspot/src/share/vm/interpreter/oopMapCache.cpp ---- openjdk/hotspot/src/share/vm/interpreter/oopMapCache.cpp Fri Nov 02 09:42:25 2007 +0000 -+++ openjdk/hotspot/src/share/vm/interpreter/oopMapCache.cpp Fri Nov 02 09:44:37 2007 +0000 -@@ -281,7 +281,7 @@ class MaskFillerForNative: public Native - public: - void pass_int() { /* ignore */ } - void pass_long() { /* ignore */ } --#ifdef _LP64 -+#if defined(_LP64) || defined(ZERO) - void pass_float() { /* ignore */ } - #endif - void pass_double() { /* ignore */ } -diff -r ee6af95bc459 openjdk/hotspot/src/share/vm/runtime/signature.hpp ---- openjdk/hotspot/src/share/vm/runtime/signature.hpp Fri Nov 02 09:42:25 2007 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/signature.hpp Fri Nov 02 09:48:28 2007 +0000 -@@ -275,11 +275,14 @@ class NativeSignatureIterator: public Si - - void do_bool () { pass_int(); _jni_offset++; _offset++; } - void do_char () { pass_int(); _jni_offset++; _offset++; } -+#if defined(_LP64) || defined(ZERO) -+ void do_float () { pass_float(); _jni_offset++; _offset++; } -+#else -+ void do_float () { pass_int(); _jni_offset++; _offset++; } -+#endif - #ifdef _LP64 -- void do_float () { pass_float(); _jni_offset++; _offset++; } - void do_double() { pass_double(); _jni_offset++; _offset += 2; } - #else -- void do_float () { pass_int(); _jni_offset++; _offset++; } - void do_double() { pass_double(); _jni_offset += 2; _offset += 2; } - #endif - void do_byte () { pass_int(); _jni_offset++; _offset++; } -@@ -303,8 +306,10 @@ class NativeSignatureIterator: public Si - virtual void pass_int() = 0; - virtual void pass_long() = 0; - virtual void pass_object() = 0; -+#if defined(_LP64) || defined(ZERO) -+ virtual void pass_float() = 0; -+#endif - #ifdef _LP64 -- virtual void pass_float() = 0; - virtual void pass_double() = 0; - #else - virtual void pass_double() { pass_long(); } // may be same as long
--- a/patches/icedtea-zero-build.patch Tue Jul 21 23:06:12 2009 +0100 +++ b/patches/icedtea-zero-build.patch Sun Jul 26 05:45:29 2009 +0100 @@ -1,115 +1,3 @@ -diff -Nru openjdk.orig/corba/make/common/Defs-linux.gmk openjdk/corba/make/common/Defs-linux.gmk ---- openjdk.orig/corba/make/common/Defs-linux.gmk 2009-04-14 18:31:10.000000000 +0100 -+++ openjdk/corba/make/common/Defs-linux.gmk 2009-04-14 20:29:27.000000000 +0100 -@@ -99,8 +99,16 @@ - LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 - CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 - LDFLAGS_COMMON_sparc += -m32 -mcpu=v9 --CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH)) --LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH)) -+ifdef ICEDTEA_ZERO_BUILD -+ CFLAGS_REQUIRED = $(ZERO_ARCHFLAG) -+ ifeq ($(ZERO_ENDIANNESS), little) -+ CFLAGS_REQUIRED += -D_LITTLE_ENDIAN -+ endif -+ LDFLAGS_COMMON += $(ZERO_ARCHFLAG) -+else -+ CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH)) -+ LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH)) -+endif - - # Add in platform specific optimizations for all opt levels - CC_HIGHEST_OPT += $(_OPT_$(ARCH)) -diff -Nru openjdk.orig/corba/make/common/shared/Compiler-gcc.gmk openjdk/corba/make/common/shared/Compiler-gcc.gmk ---- openjdk.orig/corba/make/common/shared/Compiler-gcc.gmk 2009-04-14 18:31:09.000000000 +0100 -+++ openjdk/corba/make/common/shared/Compiler-gcc.gmk 2009-04-14 20:29:27.000000000 +0100 -@@ -70,6 +70,11 @@ - else - CXX = $(COMPILER_PATH)g++$(GCC_SUFFIX) - endif -+ ifdef ICEDTEA_ZERO_BUILD -+ # zero -+ REQUIRED_CC_VER = 3.2 -+ REQUIRED_GCC_VER = 3.2.* -+ else - ifneq ("$(findstring sparc,$(ARCH))", "") - # sparc or sparcv9 - REQUIRED_CC_VER = 4.0 -@@ -93,6 +98,7 @@ - endif - endif - endif -+ endif - # Option used to create a shared library - SHARED_LIBRARY_FLAG = -shared -mimpure-text - SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 ) -diff -Nru openjdk.orig/corba/make/common/shared/Platform.gmk openjdk/corba/make/common/shared/Platform.gmk ---- openjdk.orig/corba/make/common/shared/Platform.gmk 2009-03-20 11:54:59.000000000 +0000 -+++ openjdk/corba/make/common/shared/Platform.gmk 2009-04-14 20:29:27.000000000 +0100 -@@ -202,6 +202,11 @@ - ARCH_FAMILY := $(ARCH) - - # Linux builds may be 32-bit or 64-bit data model. -+ ifdef ICEDTEA_ZERO_BUILD -+ ifndef ARCH_DATA_MODEL -+ ARCH_DATA_MODEL = $(ZERO_BITSPERWORD) -+ endif -+ endif - ifeq ($(ARCH), sparc) - # Linux sparc build can be either 32-bit or 64-bit. - # Default to 32, but allow explicit setting to 32 or 64. -diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp openjdk/hotspot/src/share/vm/runtime/vm_version.cpp ---- openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp 2009-04-14 18:31:10.000000000 +0100 -+++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2009-04-14 20:29:27.000000000 +0100 -@@ -98,7 +98,11 @@ - #define VMTYPE COMPILER1_PRESENT("Client") \ - COMPILER2_PRESENT("Server") - #else -+#ifdef ZERO -+ #define VMTYPE "Zero" -+#else - #define VMTYPE "Core" -+#endif // ZERO - #endif // COMPILER1 || COMPILER2 - #endif // TIERED - #endif // KERNEL -@@ -146,10 +150,14 @@ - WINDOWS_ONLY("windows") \ - SOLARIS_ONLY("solaris") - -+#ifdef ZERO -+#define CPU ZERO_LIBARCH -+#else - #define CPU IA32_ONLY("x86") \ - IA64_ONLY("ia64") \ - AMD64_ONLY("amd64") \ - SPARC_ONLY("sparc") -+#endif // ZERO - - const char *Abstract_VM_Version::vm_platform_string() { - return OS "-" CPU; -diff -Nru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk ---- openjdk.orig/jdk/make/common/Defs-linux.gmk 2009-04-14 18:31:10.000000000 +0100 -+++ openjdk/jdk/make/common/Defs-linux.gmk 2009-04-14 20:29:27.000000000 +0100 -@@ -116,8 +116,16 @@ - LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 - CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 - LDFLAGS_COMMON_sparc += -m32 -mcpu=v9 --CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH)) --LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH)) -+ifdef ICEDTEA_ZERO_BUILD -+ CFLAGS_REQUIRED = $(ZERO_ARCHFLAG) -+ ifeq ($(ZERO_ENDIANNESS), little) -+ CFLAGS_REQUIRED += -D_LITTLE_ENDIAN -+ endif -+ LDFLAGS_COMMON += $(ZERO_ARCHFLAG) -+else -+ CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH)) -+ LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH)) -+endif - - # If this is a --hash-style=gnu system, use --hash-style=both - # The gnu .hash section won't work on some Linux systems like SuSE 10. diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk --- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk 2009-04-14 18:31:09.000000000 +0100 +++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2009-04-14 20:32:47.000000000 +0100 @@ -117,7 +5,7 @@ else CXX = $(COMPILER_PATH)g++$(GCC_SUFFIX) endif -+ ifdef ICEDTEA_ZERO_BUILD ++ ifdef ZERO_BUILD + # zero + REQUIRED_CC_VER = 3.2 + REQUIRED_GCC_VER = 3.2.* @@ -125,73 +13,3 @@ # Option used to create a shared library SHARED_LIBRARY_FLAG = -shared -mimpure-text SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 ) -diff -Nru openjdk.orig/jdk/make/common/shared/Platform.gmk openjdk/jdk/make/common/shared/Platform.gmk ---- openjdk.orig/jdk/make/common/shared/Platform.gmk 2009-04-14 15:55:52.000000000 +0100 -+++ openjdk/jdk/make/common/shared/Platform.gmk 2009-04-14 20:29:27.000000000 +0100 -@@ -173,6 +173,11 @@ - ARCH_FAMILY := $(ARCH) - - # Linux builds may be 32-bit or 64-bit data model. -+ ifdef ICEDTEA_ZERO_BUILD -+ ifndef ARCH_DATA_MODEL -+ ARCH_DATA_MODEL = $(ZERO_BITSPERWORD) -+ endif -+ endif - ifeq ($(ARCH), sparc) - # Linux sparc build can be either 32-bit or 64-bit. - # Default to 32, but allow explicit setting to 32 or 64. -diff -Nru openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk openjdk/jdk/make/javax/sound/SoundDefs.gmk ---- openjdk.orig/jdk/make/javax/sound/SoundDefs.gmk 2009-03-20 11:58:37.000000000 +0000 -+++ openjdk/jdk/make/javax/sound/SoundDefs.gmk 2009-04-14 20:29:27.000000000 +0100 -@@ -55,21 +55,25 @@ - - endif # PLATFORM solaris - --ifeq ($(ARCH), i586) -- CPPFLAGS += -DX_ARCH=X_I586 --endif # ARCH i586 -- --ifeq ($(ARCH), sparc) -- CPPFLAGS += -DX_ARCH=X_SPARC --endif # ARCH sparc -- --ifeq ($(ARCH), sparcv9) -- CPPFLAGS += -DX_ARCH=X_SPARCV9 --endif # ARCH sparcv9 -- --ifeq ($(ARCH), amd64) -- CPPFLAGS += -DX_ARCH=X_AMD64 --endif # ARCH amd64 -+ifdef ICEDTEA_ZERO_BUILD -+ CPPFLAGS += -DX_ARCH=X_ZERO -+else -+ ifeq ($(ARCH), i586) -+ CPPFLAGS += -DX_ARCH=X_I586 -+ endif # ARCH i586 -+ -+ ifeq ($(ARCH), sparc) -+ CPPFLAGS += -DX_ARCH=X_SPARC -+ endif # ARCH sparc -+ -+ ifeq ($(ARCH), sparcv9) -+ CPPFLAGS += -DX_ARCH=X_SPARCV9 -+ endif # ARCH sparcv9 -+ -+ ifeq ($(ARCH), amd64) -+ CPPFLAGS += -DX_ARCH=X_AMD64 -+ endif # ARCH amd64 -+endif - - - # files needed for MIDI i/o -diff -Nru openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h ---- openjdk.orig/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2009-03-20 11:58:43.000000000 +0000 -+++ openjdk/jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2009-04-14 20:29:27.000000000 +0100 -@@ -38,6 +38,7 @@ - #define X_SPARCV9 3 - #define X_IA64 4 - #define X_AMD64 5 -+#define X_ZERO 6 - - // ********************************** - // Make sure you set X_PLATFORM and X_ARCH defines correctly.
--- a/patches/icedtea-zero.patch Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,212 +0,0 @@ ---- openjdk/hotspot/src/os/linux/vm/os_linux.cpp.orig 2008-12-03 19:33:43.000000000 +0000 -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2008-12-03 19:44:02.000000000 +0000 -@@ -176,7 +176,9 @@ - #endif - - // Cpu architecture string --#if defined(IA64) -+#if defined(ZERO) -+static char cpu_arch[] = ZERO_LIBARCH; -+#elif defined(IA64) - static char cpu_arch[] = "ia64"; - #elif defined(IA32) - static char cpu_arch[] = "i386"; -@@ -1712,7 +1714,14 @@ - {EM_SPARC32PLUS, EM_SPARC, ELFCLASS32, ELFDATA2MSB, (char*)"Sparc 32"}, - {EM_SPARCV9, EM_SPARCV9, ELFCLASS64, ELFDATA2MSB, (char*)"Sparc v9 64"}, - {EM_PPC, EM_PPC, ELFCLASS32, ELFDATA2MSB, (char*)"Power PC 32"}, -- {EM_PPC64, EM_PPC64, ELFCLASS64, ELFDATA2MSB, (char*)"Power PC 64"} -+ {EM_PPC64, EM_PPC64, ELFCLASS64, ELFDATA2MSB, (char*)"Power PC 64"}, -+ {EM_ARM, EM_ARM, ELFCLASS32, ELFDATA2LSB, (char*)"ARM"}, -+ {EM_S390, EM_S390, ELFCLASSNONE, ELFDATA2MSB, (char*)"IBM System/390"}, -+ {EM_ALPHA, EM_ALPHA, ELFCLASS64, ELFDATA2LSB, (char*)"Alpha"}, -+ {EM_MIPS_RS3_LE, EM_MIPS_RS3_LE, ELFCLASS32, ELFDATA2LSB, (char*)"MIPSel"}, -+ {EM_MIPS, EM_MIPS, ELFCLASS32, ELFDATA2MSB, (char*)"MIPS"}, -+ {EM_PARISC, EM_PARISC, ELFCLASS32, ELFDATA2MSB, (char*)"PARISC"}, -+ {EM_68K, EM_68K, ELFCLASS32, ELFDATA2MSB, (char*)"M68k"} - }; - - #if (defined IA32) -@@ -1729,9 +1738,23 @@ - static Elf32_Half running_arch_code=EM_PPC64; - #elif (defined __powerpc__) - static Elf32_Half running_arch_code=EM_PPC; -+ #elif (defined ARM) -+ static Elf32_Half running_arch_code=EM_ARM; -+ #elif (defined S390) -+ static Elf32_Half running_arch_code=EM_S390; -+ #elif (defined ALPHA) -+ static Elf32_Half running_arch_code=EM_ALPHA; -+ #elif (defined MIPSEL) -+ static Elf32_Half running_arch_code=EM_MIPS_RS3_LE; -+ #elif (defined PARISC) -+ static Elf32_Half running_arch_code=EM_PARISC; -+ #elif (defined MIPS) -+ static Elf32_Half running_arch_code=EM_MIPS; -+ #elif (defined M68K) -+ static Elf32_Half running_arch_code=EM_68K; - #else - #error Method os::dll_load requires that one of following is defined:\ -- IA32, AMD64, IA64, __sparc, __powerpc__ -+ IA32, AMD64, IA64, __sparc, __powerpc__, ARM, S390, ALPHA, MIPS, MIPSEL, PARISC, M68K - #endif - - // Identify compatability class for VM's architecture and library's architecture -@@ -1763,10 +1786,12 @@ - return NULL; - } - -+#ifndef S390 - if (lib_arch.elf_class != arch_array[running_arch_index].elf_class) { - ::snprintf(diag_msg_buf, diag_msg_max_length-1," (Possible cause: architecture word width mismatch)"); - return NULL; - } -+#endif // !S390 - - if (lib_arch.compat_class != arch_array[running_arch_index].compat_class) { - if ( lib_arch.name!=NULL ) { -@@ -2545,7 +2570,9 @@ - // format has been changed), we'll use the largest page size supported by - // the processor. - -+#ifndef ZERO - _large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M); -+#endif - - FILE *fp = fopen("/proc/meminfo", "r"); - if (fp) { ---- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp.orig 2008-11-20 08:41:04.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp 2008-12-03 19:40:11.000000000 +0000 -@@ -3031,9 +3031,9 @@ - tty->print_cr("&native_fresult: " INTPTR_FORMAT, (uintptr_t) &this->_native_fresult); - tty->print_cr("native_lresult: " INTPTR_FORMAT, (uintptr_t) this->_native_lresult); - #endif --#ifdef IA64 -+#if defined(IA64) && !defined(ZERO) - tty->print_cr("last_Java_fp: " INTPTR_FORMAT, (uintptr_t) this->_last_Java_fp); --#endif // IA64 -+#endif // IA64 && !ZERO - tty->print_cr("self_link: " INTPTR_FORMAT, (uintptr_t) this->_self_link); - } - ---- openjdk/hotspot/src/share/vm/runtime/jniHandles.hpp.orig 2008-11-20 08:41:06.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/jniHandles.hpp 2008-12-03 19:40:11.000000000 +0000 -@@ -126,9 +126,17 @@ - // Fill block with bad_handle values - void zap(); - -+#ifdef ZERO -+ protected: -+ friend class CppInterpreter; -+#endif // ZERO -+ - // No more handles in the both the current and following blocks - void clear() { _top = 0; } - -+#ifdef ZERO -+ private: -+#endif // ZERO - // Free list computation - void rebuild_free_list(); - ---- openjdk/hotspot/src/share/vm/runtime/icache.cpp.orig 2008-11-20 08:41:06.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/icache.cpp 2008-12-03 19:45:03.000000000 +0000 -@@ -78,6 +78,7 @@ - } - - void AbstractICache::invalidate_range(address start, int nbytes) { -+#ifndef ZERO - static bool firstTime = true; - if (firstTime) { - guarantee(start == CAST_FROM_FN_PTR(address, _flush_icache_stub), -@@ -97,6 +98,7 @@ - } - call_flush_stub(start, round_to(nbytes, ICache::line_size) >> - ICache::log2_line_size); -+#endif - } - - // For init.cpp ---- openjdk/hotspot/src/share/vm/runtime/mutex.hpp.orig 2008-11-20 08:41:06.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/runtime/mutex.hpp 2008-12-03 19:40:11.000000000 +0000 -@@ -61,18 +61,10 @@ - } ; - - // Endian-ness ... index of least-significant byte in SplitWord.Bytes[] --#ifdef AMD64 // little -+#ifdef VM_LITTLE_ENDIAN - #define _LSBINDEX 0 - #else --#if IA32 // little -- #define _LSBINDEX 0 --#else --#ifdef SPARC // big - #define _LSBINDEX (sizeof(intptr_t)-1) --#else -- #error "unknown architecture" --#endif --#endif - #endif - - class ParkEvent ; ---- openjdk/hotspot/src/share/vm/utilities/vmError.cpp.orig 2008-12-03 19:33:25.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp 2008-12-03 19:40:11.000000000 +0000 -@@ -25,6 +25,10 @@ - # include "incls/_precompiled.incl" - # include "incls/_vmError.cpp.incl" - -+# ifdef ZERO -+# include <stackPrinter_zero.hpp> -+# endif // ZERO -+ - // List of environment variables that should be reported in error log file. - const char *env_list[] = { - // All platforms -@@ -398,6 +403,7 @@ - st->cr(); - } - -+#ifndef ZERO - STEP(110, "(printing stack bounds)" ) - - if (_verbose) { -@@ -455,11 +461,16 @@ - st->cr(); - } - } -+#endif // !ZERO - - STEP(130, "(printing Java stack)" ) - - if (_verbose && _thread && _thread->is_Java_thread()) { - JavaThread* jt = (JavaThread*)_thread; -+#ifdef ZERO -+ st->print_cr("Java stack:"); -+ ZeroStackPrinter(st, buf, sizeof(buf)).print(jt); -+#else - if (jt->has_last_Java_frame()) { - st->print_cr("Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)"); - for(StackFrameStream sfs(jt); !sfs.is_done(); sfs.next()) { -@@ -467,6 +478,7 @@ - st->cr(); - } - } -+#endif // ZERO - } - - STEP(140, "(printing VM operation)" ) -@@ -478,6 +490,14 @@ - op->print_on_error(st); - st->cr(); - st->cr(); -+#ifdef ZERO -+ if (op->calling_thread()->is_Java_thread()) { -+ st->print_cr("Calling thread's Java stack:"); -+ ZeroStackPrinter(st, buf, sizeof(buf)).print( -+ (JavaThread *) op->calling_thread()); -+ st->cr(); -+ } -+#endif // ZERO - } - } -
--- a/platform_zero.in Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -os_family = linux - -arch = zero - -arch_model = zero - -os_arch = linux_zero - -os_arch_model = linux_zero - -lib_arch = zero - -compiler = gcc - -gnu_dis_arch = zero - -sysdefs = -DLINUX -D_GNU_SOURCE -DCC_INTERP -DZERO -D@ZERO_ARCHDEF@ -DZERO_LIBARCH=\"@ZERO_LIBARCH@\"
--- a/ports/hotspot/make/linux/makefiles/zero.make Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -# -# Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. -# Copyright 2007, 2008 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. -# -# - -# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) -# The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized -OPT_CFLAGS/sharedRuntimeTrans.o = $(OPT_CFLAGS/NOOPT) - -# Specify that the CPU is little endian, if necessary -ifeq ($(ZERO_ENDIANNESS), little) - CFLAGS += -DVM_LITTLE_ENDIAN -endif - -# Specify that the CPU is 64 bit, if necessary -ifeq ($(ZERO_BITSPERWORD), 64) - CFLAGS += -D_LP64=1 -endif - -OPT_CFLAGS/compactingPermGenGen.o = -O1
--- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008, 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/_assembler_zero.cpp.incl" - -int AbstractAssembler::code_fill_byte() -{ - return 0; -} - -void Assembler::pd_patch_instruction(address branch, address target) -{ - Unimplemented(); -} - -#ifndef PRODUCT -void Assembler::pd_print_patched_instruction(address branch) -{ - Unimplemented(); -} -#endif // PRODUCT - -void MacroAssembler::align(int modulus) -{ - while (offset() % modulus != 0) - emit_byte(AbstractAssembler::code_fill_byte()); -} - -void MacroAssembler::bang_stack_with_offset(int offset) -{ - Unimplemented(); -} - -void MacroAssembler::advance(int bytes) -{ - _code_pos += bytes; - 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); -} - -static void _UnimplementedStub() -{ - report_unimplemented(__FILE__, __LINE__); -} - -address UnimplementedStub() -{ - return (address) _UnimplementedStub; -} - -address UnimplementedEntry() -{ - return (address) _UnimplementedStub; -} - -static void _ShouldNotReachHereStub() -{ - report_should_not_reach_here(__FILE__, __LINE__); -} - -address ShouldNotReachHereStub() -{ - return (address) _ShouldNotReachHereStub; -}
--- a/ports/hotspot/src/cpu/zero/vm/assembler_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008, 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. - * - */ - -// In normal, CPU-specific ports of HotSpot these two classes are used -// for generating assembly language. We don't do any of this in zero, -// of course, but we do sneak entry points around in CodeBuffers so we -// generate those here. - -class Assembler : public AbstractAssembler { - public: - Assembler(CodeBuffer* code) : AbstractAssembler(code) {} - - void pd_patch_instruction(address branch, address target); -#ifndef PRODUCT - static void pd_print_patched_instruction(address branch); -#endif // PRODUCT -}; - -class MacroAssembler : public Assembler { - public: - MacroAssembler(CodeBuffer* code) : Assembler(code) {} - - 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); -}; - -#ifdef ASSERT -inline bool AbstractAssembler::pd_check_instruction_mark() -{ - Unimplemented(); -} -#endif - -address UnimplementedStub(); -address UnimplementedEntry(); -address ShouldNotReachHereStub(); - -// Nothing to do with the assembler (or lack of), -// just a real convenient place to include these. -#include <ffi.h> -#include <entry_zero.hpp> -#include <stack_zero.hpp>
--- a/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 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/_cppInterpreter_zero.cpp.incl" - -#ifdef CC_INTERP - -const char *BytecodeInterpreter::name_of_field_at_address(address addr) -{ -#define DO(member) {if (addr == (address) &(member)) return XSTR(member);} - DO(_thread); - DO(_bcp); - DO(_locals); - DO(_constants); - DO(_method); - DO(_mdx); - DO(_stack); - DO(_msg); - DO(_result); - DO(_prev_link); - DO(_oop_temp); - DO(_stack_base); - DO(_stack_limit); - DO(_monitor_base); - DO(_self_link); -#undef DO - if (addr > (address) &_result && addr < (address) (&_result + 1)) - return "_result)"; - return NULL; -} - -#endif // CC_INTERP
--- a/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,159 +0,0 @@ -/* - * Copyright 2002 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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. - * - */ - -// Platform specific for C++ based Interpreter - -#if defined(PPC) || defined(SPARC) || defined(IA64) -#define LOTS_OF_REGS // Use plenty of registers -#else -#undef LOTS_OF_REGS // Loser platforms -#endif - - private: - interpreterState _self_link; - - public: - inline void set_locals(intptr_t* new_locals) - { - _locals = new_locals; - } - inline void set_method(methodOop new_method) - { - _method = new_method; - } - inline interpreterState self_link() - { - return _self_link; - } - inline void set_self_link(interpreterState new_self_link) - { - _self_link = new_self_link; - } - inline interpreterState prev_link() - { - return _prev_link; - } - inline void set_prev_link(interpreterState new_prev_link) - { - _prev_link = new_prev_link; - } - inline void set_stack_limit(intptr_t* new_stack_limit) - { - _stack_limit = new_stack_limit; - } - inline void set_stack_base(intptr_t* new_stack_base) - { - _stack_base = new_stack_base; - } - inline void set_monitor_base(BasicObjectLock *new_monitor_base) - { - _monitor_base = new_monitor_base; - } - inline void set_thread(JavaThread* new_thread) - { - _thread = new_thread; - } - inline void set_constants(constantPoolCacheOop new_constants) - { - _constants = new_constants; - } - inline oop oop_temp() - { - return _oop_temp; - } - inline oop *oop_temp_addr() - { - return &_oop_temp; - } - inline void set_oop_temp(oop new_oop_temp) - { - _oop_temp = new_oop_temp; - } - inline address callee_entry_point() - { - return _result._to_call._callee_entry_point; - } - - public: - const char *name_of_field_at_address(address addr); - -// The frame manager handles this -#define SET_LAST_JAVA_FRAME() -#define RESET_LAST_JAVA_FRAME() - -// ZeroStack Implementation - -#undef STACK_INT -#undef STACK_FLOAT -#undef STACK_ADDR -#undef STACK_OBJECT -#undef STACK_DOUBLE -#undef STACK_LONG - -#define GET_STACK_SLOT(offset) (*((intptr_t*) &topOfStack[-(offset)])) -#define STACK_SLOT(offset) ((address) &topOfStack[-(offset)]) -#define STACK_ADDR(offset) (*((address *) &topOfStack[-(offset)])) -#define STACK_INT(offset) (*((jint*) &topOfStack[-(offset)])) -#define STACK_FLOAT(offset) (*((jfloat *) &topOfStack[-(offset)])) -#define STACK_OBJECT(offset) (*((oop *) &topOfStack [-(offset)])) -#define STACK_DOUBLE(offset) (((VMJavaVal64*) &topOfStack[-(offset)])->d) -#define STACK_LONG(offset) (((VMJavaVal64 *) &topOfStack[-(offset)])->l) - -#define SET_STACK_SLOT(value, offset) (*(intptr_t*)&topOfStack[-(offset)] = *(intptr_t*)(value)) -#define SET_STACK_ADDR(value, offset) (*((address *)&topOfStack[-(offset)]) = (value)) -#define SET_STACK_INT(value, offset) (*((jint *)&topOfStack[-(offset)]) = (value)) -#define SET_STACK_FLOAT(value, offset) (*((jfloat *)&topOfStack[-(offset)]) = (value)) -#define SET_STACK_OBJECT(value, offset) (*((oop *)&topOfStack[-(offset)]) = (value)) -#define SET_STACK_DOUBLE(value, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d = (value)) -#define SET_STACK_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->d = \ - ((VMJavaVal64*)(addr))->d) -#define SET_STACK_LONG(value, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->l = (value)) -#define SET_STACK_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&topOfStack[-(offset)])->l = \ - ((VMJavaVal64*)(addr))->l) -// JavaLocals implementation - -#define LOCALS_SLOT(offset) ((intptr_t*)&locals[-(offset)]) -#define LOCALS_ADDR(offset) ((address)locals[-(offset)]) -#define LOCALS_INT(offset) (*((jint*)&locals[-(offset)])) -#define LOCALS_FLOAT(offset) (*((jfloat*)&locals[-(offset)])) -#define LOCALS_OBJECT(offset) ((oop)locals[-(offset)]) -#define LOCALS_DOUBLE(offset) (((VMJavaVal64*)&locals[-((offset) + 1)])->d) -#define LOCALS_LONG(offset) (((VMJavaVal64*)&locals[-((offset) + 1)])->l) -#define LOCALS_LONG_AT(offset) (((address)&locals[-((offset) + 1)])) -#define LOCALS_DOUBLE_AT(offset) (((address)&locals[-((offset) + 1)])) - -#define SET_LOCALS_SLOT(value, offset) (*(intptr_t*)&locals[-(offset)] = *(intptr_t *)(value)) -#define SET_LOCALS_ADDR(value, offset) (*((address *)&locals[-(offset)]) = (value)) -#define SET_LOCALS_INT(value, offset) (*((jint *)&locals[-(offset)]) = (value)) -#define SET_LOCALS_FLOAT(value, offset) (*((jfloat *)&locals[-(offset)]) = (value)) -#define SET_LOCALS_OBJECT(value, offset) (*((oop *)&locals[-(offset)]) = (value)) -#define SET_LOCALS_DOUBLE(value, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = (value)) -#define SET_LOCALS_LONG(value, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = (value)) -#define SET_LOCALS_DOUBLE_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->d = \ - ((VMJavaVal64*)(addr))->d) -#define SET_LOCALS_LONG_FROM_ADDR(addr, offset) (((VMJavaVal64*)&locals[-((offset)+1)])->l = \ - ((VMJavaVal64*)(addr))->l) - -
--- a/ports/hotspot/src/cpu/zero/vm/bytecodeInterpreter_zero.inline.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,280 +0,0 @@ -/* - * Copyright 2002 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. - * - */ - -// Inline interpreter functions for zero - -inline jfloat BytecodeInterpreter::VMfloatAdd(jfloat op1, jfloat op2) { return op1 + op2; } -inline jfloat BytecodeInterpreter::VMfloatSub(jfloat op1, jfloat op2) { return op1 - op2; } -inline jfloat BytecodeInterpreter::VMfloatMul(jfloat op1, jfloat op2) { return op1 * op2; } -inline jfloat BytecodeInterpreter::VMfloatDiv(jfloat op1, jfloat op2) { return op1 / op2; } -inline jfloat BytecodeInterpreter::VMfloatRem(jfloat op1, jfloat op2) { return fmod(op1, op2); } - -inline jfloat BytecodeInterpreter::VMfloatNeg(jfloat op) { return -op; } - -inline int32_t BytecodeInterpreter::VMfloatCompare(jfloat op1, jfloat op2, int32_t direction) { - return ( op1 < op2 ? -1 : - op1 > op2 ? 1 : - op1 == op2 ? 0 : - (direction == -1 || direction == 1) ? direction : 0); - -} - -inline void BytecodeInterpreter::VMmemCopy64(uint32_t to[2], const uint32_t from[2]) { - *(uint64_t *) to = *(uint64_t *) from; -} - -inline jlong BytecodeInterpreter::VMlongAdd(jlong op1, jlong op2) { - return op1 + op2; -} - -inline jlong BytecodeInterpreter::VMlongAnd(jlong op1, jlong op2) { - return op1 & op2; -} - -inline jlong BytecodeInterpreter::VMlongDiv(jlong op1, jlong op2) { - /* it's possible we could catch this special case implicitly */ - if (op1 == (jlong) 0x8000000000000000LL && op2 == -1) return op1; - else return op1 / op2; -} - -inline jlong BytecodeInterpreter::VMlongMul(jlong op1, jlong op2) { - return op1 * op2; -} - -inline jlong BytecodeInterpreter::VMlongOr(jlong op1, jlong op2) { - return op1 | op2; -} - -inline jlong BytecodeInterpreter::VMlongSub(jlong op1, jlong op2) { - return op1 - op2; -} - -inline jlong BytecodeInterpreter::VMlongXor(jlong op1, jlong op2) { - return op1 ^ op2; -} - -inline jlong BytecodeInterpreter::VMlongRem(jlong op1, jlong op2) { - /* it's possible we could catch this special case implicitly */ - if (op1 == (jlong) 0x8000000000000000LL && op2 == -1) return 0; - else return op1 % op2; -} - -inline jlong BytecodeInterpreter::VMlongUshr(jlong op1, jint op2) { - return ((unsigned long long) op1) >> (op2 & 0x3F); -} - -inline jlong BytecodeInterpreter::VMlongShr(jlong op1, jint op2) { - return op1 >> (op2 & 0x3F); -} - -inline jlong BytecodeInterpreter::VMlongShl(jlong op1, jint op2) { - return op1 << (op2 & 0x3F); -} - -inline jlong BytecodeInterpreter::VMlongNeg(jlong op) { - return -op; -} - -inline jlong BytecodeInterpreter::VMlongNot(jlong op) { - return ~op; -} - -inline int32_t BytecodeInterpreter::VMlongLtz(jlong op) { - return (op <= 0); -} - -inline int32_t BytecodeInterpreter::VMlongGez(jlong op) { - return (op >= 0); -} - -inline int32_t BytecodeInterpreter::VMlongEqz(jlong op) { - return (op == 0); -} - -inline int32_t BytecodeInterpreter::VMlongEq(jlong op1, jlong op2) { - return (op1 == op2); -} - -inline int32_t BytecodeInterpreter::VMlongNe(jlong op1, jlong op2) { - return (op1 != op2); -} - -inline int32_t BytecodeInterpreter::VMlongGe(jlong op1, jlong op2) { - return (op1 >= op2); -} - -inline int32_t BytecodeInterpreter::VMlongLe(jlong op1, jlong op2) { - return (op1 <= op2); -} - -inline int32_t BytecodeInterpreter::VMlongLt(jlong op1, jlong op2) { - return (op1 < op2); -} - -inline int32_t BytecodeInterpreter::VMlongGt(jlong op1, jlong op2) { - return (op1 > op2); -} - -inline int32_t BytecodeInterpreter::VMlongCompare(jlong op1, jlong op2) { - return (VMlongLt(op1, op2) ? -1 : VMlongGt(op1, op2) ? 1 : 0); -} - -// Long conversions - -inline jdouble BytecodeInterpreter::VMlong2Double(jlong val) { - return (jdouble) val; -} - -inline jfloat BytecodeInterpreter::VMlong2Float(jlong val) { - return (jfloat) val; -} - -inline jint BytecodeInterpreter::VMlong2Int(jlong val) { - return (jint) val; -} - -// Double Arithmetic - -inline jdouble BytecodeInterpreter::VMdoubleAdd(jdouble op1, jdouble op2) { - return op1 + op2; -} - -inline jdouble BytecodeInterpreter::VMdoubleDiv(jdouble op1, jdouble op2) { - // Divide by zero... QQQ - return op1 / op2; -} - -inline jdouble BytecodeInterpreter::VMdoubleMul(jdouble op1, jdouble op2) { - return op1 * op2; -} - -inline jdouble BytecodeInterpreter::VMdoubleNeg(jdouble op) { - return -op; -} - -inline jdouble BytecodeInterpreter::VMdoubleRem(jdouble op1, jdouble op2) { - return fmod(op1, op2); -} - -inline jdouble BytecodeInterpreter::VMdoubleSub(jdouble op1, jdouble op2) { - return op1 - op2; -} - -inline int32_t BytecodeInterpreter::VMdoubleCompare(jdouble op1, jdouble op2, int32_t direction) { - return ( op1 < op2 ? -1 : - op1 > op2 ? 1 : - op1 == op2 ? 0 : - (direction == -1 || direction == 1) ? direction : 0); -} - -// Double Conversions - -inline jfloat BytecodeInterpreter::VMdouble2Float(jdouble val) { - return (jfloat) val; -} - -// Float Conversions - -inline jdouble BytecodeInterpreter::VMfloat2Double(jfloat op) { - return (jdouble) op; -} - -// Integer Arithmetic - -inline jint BytecodeInterpreter::VMintAdd(jint op1, jint op2) { - return op1 + op2; -} - -inline jint BytecodeInterpreter::VMintAnd(jint op1, jint op2) { - return op1 & op2; -} - -inline jint BytecodeInterpreter::VMintDiv(jint op1, jint op2) { - /* it's possible we could catch this special case implicitly */ - if (op1 == (jint) 0x80000000 && op2 == -1) return op1; - else return op1 / op2; -} - -inline jint BytecodeInterpreter::VMintMul(jint op1, jint op2) { - return op1 * op2; -} - -inline jint BytecodeInterpreter::VMintNeg(jint op) { - return -op; -} - -inline jint BytecodeInterpreter::VMintOr(jint op1, jint op2) { - return op1 | op2; -} - -inline jint BytecodeInterpreter::VMintRem(jint op1, jint op2) { - /* it's possible we could catch this special case implicitly */ - if (op1 == (jint) 0x80000000 && op2 == -1) return 0; - else return op1 % op2; -} - -inline jint BytecodeInterpreter::VMintShl(jint op1, jint op2) { - return op1 << (op2 & 0x1F); -} - -inline jint BytecodeInterpreter::VMintShr(jint op1, jint op2) { - return op1 >> (op2 & 0x1F); -} - -inline jint BytecodeInterpreter::VMintSub(jint op1, jint op2) { - return op1 - op2; -} - -inline jint BytecodeInterpreter::VMintUshr(jint op1, jint op2) { - return ((juint) op1) >> (op2 & 0x1F); -} - -inline jint BytecodeInterpreter::VMintXor(jint op1, jint op2) { - return op1 ^ op2; -} - -inline jdouble BytecodeInterpreter::VMint2Double(jint val) { - return (jdouble) val; -} - -inline jfloat BytecodeInterpreter::VMint2Float(jint val) { - return (jfloat) val; -} - -inline jlong BytecodeInterpreter::VMint2Long(jint val) { - return (jlong) val; -} - -inline jchar BytecodeInterpreter::VMint2Char(jint val) { - return (jchar) val; -} - -inline jshort BytecodeInterpreter::VMint2Short(jint val) { - return (jshort) val; -} - -inline jbyte BytecodeInterpreter::VMint2Byte(jint val) { - return (jbyte) val; -}
--- a/ports/hotspot/src/cpu/zero/vm/bytecodes_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* - * Copyright 2003 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. - * - */ - -#include "incls/_precompiled.incl" -#include "incls/_bytecodes_zero.cpp.incl" - -void Bytecodes::pd_initialize() -{ - // No zero specific initialization -}
--- a/ports/hotspot/src/cpu/zero/vm/bytes_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,307 +0,0 @@ -/* - * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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. - * - */ - -class Bytes: AllStatic { - public: - // Returns true if the byte ordering used by Java is different - // from the native byte ordering of the underlying machine. - static inline bool is_Java_byte_ordering_different() - { -#ifdef VM_LITTLE_ENDIAN - return true; -#else - return false; -#endif - } - - // Efficient reading and writing of unaligned unsigned data in - // platform-specific byte ordering. -#ifdef VM_LITTLE_ENDIAN - static inline u2 get_native_u2(address p){ - return (intptr_t(p) & 1) == 0 - ? *(u2*)p - : ( u2(p[1]) << 8 ) - | ( u2(p[0]) ); - } - - static inline u4 get_native_u4(address p) { - switch (intptr_t(p) & 3) { - case 0: return *(u4*)p; - - case 2: return ( u4( ((u2*)p)[1] ) << 16 ) - | ( u4( ((u2*)p)[0] ) ); - - default: return ( u4(p[3]) << 24 ) - | ( u4(p[2]) << 16 ) - | ( u4(p[1]) << 8 ) - | u4(p[0]); - } - } - - static inline u8 get_native_u8(address p) { - switch (intptr_t(p) & 7) { - case 0: return *(u8*)p; - - case 4: return ( u8( ((u4*)p)[1] ) << 32 ) - | ( u8( ((u4*)p)[0] ) ); - - case 2: return ( u8( ((u2*)p)[3] ) << 48 ) - | ( u8( ((u2*)p)[2] ) << 32 ) - | ( u8( ((u2*)p)[1] ) << 16 ) - | ( u8( ((u2*)p)[0] ) ); - - default: return ( u8(p[7]) << 56 ) - | ( u8(p[6]) << 48 ) - | ( u8(p[5]) << 40 ) - | ( u8(p[4]) << 32 ) - | ( u8(p[3]) << 24 ) - | ( u8(p[2]) << 16 ) - | ( u8(p[1]) << 8 ) - | u8(p[0]); - } - } - - static inline void put_native_u2(address p, u2 x) { - if ( (intptr_t(p) & 1) == 0 ) *(u2*)p = x; - else { - p[1] = x >> 8; - p[0] = x; - } - } - - static inline void put_native_u4(address p, u4 x) { - switch ( intptr_t(p) & 3 ) { - case 0: *(u4*)p = x; - break; - - case 2: ((u2*)p)[1] = x >> 16; - ((u2*)p)[0] = x; - break; - - default: ((u1*)p)[3] = x >> 24; - ((u1*)p)[2] = x >> 16; - ((u1*)p)[1] = x >> 8; - ((u1*)p)[0] = x; - break; - } - } - - static inline void put_native_u8(address p, u8 x) { - switch ( intptr_t(p) & 7 ) { - case 0: *(u8*)p = x; - break; - - case 4: ((u4*)p)[1] = x >> 32; - ((u4*)p)[0] = x; - break; - - case 2: ((u2*)p)[3] = x >> 48; - ((u2*)p)[2] = x >> 32; - ((u2*)p)[1] = x >> 16; - ((u2*)p)[0] = x; - break; - - default: ((u1*)p)[7] = x >> 56; - ((u1*)p)[6] = x >> 48; - ((u1*)p)[5] = x >> 40; - ((u1*)p)[4] = x >> 32; - ((u1*)p)[3] = x >> 24; - ((u1*)p)[2] = x >> 16; - ((u1*)p)[1] = x >> 8; - ((u1*)p)[0] = x; - } - } -#else - static inline u2 get_native_u2(address p){ - return (intptr_t(p) & 1) == 0 - ? *(u2*)p - : ( u2(p[0]) << 8 ) - | ( u2(p[1]) ); - } - - static inline u4 get_native_u4(address p) { - switch (intptr_t(p) & 3) { - case 0: return *(u4*)p; - - case 2: return ( u4( ((u2*)p)[0] ) << 16 ) - | ( u4( ((u2*)p)[1] ) ); - - default: return ( u4(p[0]) << 24 ) - | ( u4(p[1]) << 16 ) - | ( u4(p[2]) << 8 ) - | u4(p[3]); - } - } - - static inline u8 get_native_u8(address p) { - switch (intptr_t(p) & 7) { - case 0: return *(u8*)p; - - case 4: return ( u8( ((u4*)p)[0] ) << 32 ) - | ( u8( ((u4*)p)[1] ) ); - - case 2: return ( u8( ((u2*)p)[0] ) << 48 ) - | ( u8( ((u2*)p)[1] ) << 32 ) - | ( u8( ((u2*)p)[2] ) << 16 ) - | ( u8( ((u2*)p)[3] ) ); - - default: return ( u8(p[0]) << 56 ) - | ( u8(p[1]) << 48 ) - | ( u8(p[2]) << 40 ) - | ( u8(p[3]) << 32 ) - | ( u8(p[4]) << 24 ) - | ( u8(p[5]) << 16 ) - | ( u8(p[6]) << 8 ) - | u8(p[7]); - } - } - - static inline void put_native_u2(address p, u2 x) { - if ( (intptr_t(p) & 1) == 0 ) *(u2*)p = x; - else { - p[0] = x >> 8; - p[1] = x; - } - } - - static inline void put_native_u4(address p, u4 x) { - switch ( intptr_t(p) & 3 ) { - case 0: *(u4*)p = x; - break; - - case 2: ((u2*)p)[0] = x >> 16; - ((u2*)p)[1] = x; - break; - - default: ((u1*)p)[0] = x >> 24; - ((u1*)p)[1] = x >> 16; - ((u1*)p)[2] = x >> 8; - ((u1*)p)[3] = x; - break; - } - } - - static inline void put_native_u8(address p, u8 x) { - switch ( intptr_t(p) & 7 ) { - case 0: *(u8*)p = x; - break; - - case 4: ((u4*)p)[0] = x >> 32; - ((u4*)p)[1] = x; - break; - - case 2: ((u2*)p)[0] = x >> 48; - ((u2*)p)[1] = x >> 32; - ((u2*)p)[2] = x >> 16; - ((u2*)p)[3] = x; - break; - - default: ((u1*)p)[0] = x >> 56; - ((u1*)p)[1] = x >> 48; - ((u1*)p)[2] = x >> 40; - ((u1*)p)[3] = x >> 32; - ((u1*)p)[4] = x >> 24; - ((u1*)p)[5] = x >> 16; - ((u1*)p)[6] = x >> 8; - ((u1*)p)[7] = x; - } - } -#endif // VM_LITTLE_ENDIAN - - - // Efficient reading and writing of unaligned unsigned data in Java - // byte ordering (i.e. big-endian ordering). -#ifdef VM_LITTLE_ENDIAN - // Byte-order reversal is needed - static inline u2 get_Java_u2(address p) - { - return swap_u2(get_native_u2(p)); - } - static inline u4 get_Java_u4(address p) - { - return swap_u4(get_native_u4(p)); - } - static inline u8 get_Java_u8(address p) - { - return swap_u8(get_native_u8(p)); - } - - static inline void put_Java_u2(address p, u2 x) - { - put_native_u2(p, swap_u2(x)); - } - static inline void put_Java_u4(address p, u4 x) - { - put_native_u4(p, swap_u4(x)); - } - static inline void put_Java_u8(address p, u8 x) - { - put_native_u8(p, swap_u8(x)); - } - - // Efficient swapping of byte ordering - static inline u2 swap_u2(u2 x); - static inline u4 swap_u4(u4 x); - static inline u8 swap_u8(u8 x); -#else - // No byte-order reversal is needed - static inline u2 get_Java_u2(address p) - { - return get_native_u2(p); - } - static inline u4 get_Java_u4(address p) - { - return get_native_u4(p); - } - static inline u8 get_Java_u8(address p) - { - return get_native_u8(p); - } - - static inline void put_Java_u2(address p, u2 x) - { - put_native_u2(p, x); - } - static inline void put_Java_u4(address p, u4 x) - { - put_native_u4(p, x); - } - static inline void put_Java_u8(address p, u8 x) - { - put_native_u8(p, x); - } - - // No byte-order reversal is needed - static inline u2 swap_u2(u2 x) { return x; } - static inline u4 swap_u4(u4 x) { return x; } - static inline u8 swap_u8(u8 x) { return x; } -#endif // VM_LITTLE_ENDIAN -}; - -#ifdef VM_LITTLE_ENDIAN -// The following header contains the implementations of swap_u2, -// swap_u4, and swap_u8 -#include "incls/_bytes_pd.inline.hpp.incl" -#endif // VM_LITTLE_ENDIAN
--- a/ports/hotspot/src/cpu/zero/vm/codeBuffer_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* - * Copyright 2003-2005 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. - * - */ - -private: - void pd_initialize() {}
--- a/ports/hotspot/src/cpu/zero/vm/copy_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -/* - * Copyright 2003-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. - * - */ - -// Inline functions for memory copy and fill. - -static void pd_conjoint_words(HeapWord* from, HeapWord* to, size_t count) { - (void)memmove(to, from, count * HeapWordSize); -} - -static void pd_disjoint_words(HeapWord* from, HeapWord* to, size_t count) { - switch (count) { - case 8: to[7] = from[7]; - case 7: to[6] = from[6]; - case 6: to[5] = from[5]; - case 5: to[4] = from[4]; - case 4: to[3] = from[3]; - case 3: to[2] = from[2]; - case 2: to[1] = from[1]; - case 1: to[0] = from[0]; - case 0: break; - default: - (void)memcpy(to, from, count * HeapWordSize); - break; - } -} - -static void pd_disjoint_words_atomic(HeapWord* from, - HeapWord* to, - size_t count) { - switch (count) { - case 8: to[7] = from[7]; - case 7: to[6] = from[6]; - case 6: to[5] = from[5]; - case 5: to[4] = from[4]; - case 4: to[3] = from[3]; - case 3: to[2] = from[2]; - case 2: to[1] = from[1]; - case 1: to[0] = from[0]; - case 0: break; - default: - while (count-- > 0) { - *to++ = *from++; - } - break; - } -} - -static void pd_aligned_conjoint_words(HeapWord* from, - HeapWord* to, - size_t count) { - (void)memmove(to, from, count * HeapWordSize); -} - -static void pd_aligned_disjoint_words(HeapWord* from, - HeapWord* to, - size_t count) { - pd_disjoint_words(from, to, count); -} - -static void pd_conjoint_bytes(void* from, void* to, size_t count) { - (void)memmove(to, from, count); -} - -static void pd_conjoint_bytes_atomic(void* from, void* to, size_t count) { - (void)memmove(to, from, count); -} - -static void pd_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) { - _Copy_conjoint_jshorts_atomic(from, to, count); -} - -static void pd_conjoint_jints_atomic(jint* from, jint* to, size_t count) { - _Copy_conjoint_jints_atomic(from, to, count); -} - -static void pd_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) { - _Copy_conjoint_jlongs_atomic(from, to, count); -} - -static void pd_conjoint_oops_atomic(oop* from, oop* to, size_t count) { -#ifdef _LP64 - assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size"); - _Copy_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count); -#else - assert(BytesPerInt == BytesPerOop, "jints and oops must be the same size"); - _Copy_conjoint_jints_atomic((jint*)from, (jint*)to, count); -#endif // _LP64 -} - -static void pd_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) { - _Copy_arrayof_conjoint_bytes(from, to, count); -} - -static void pd_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) { - _Copy_arrayof_conjoint_jshorts(from, to, count); -} - -static void pd_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) { - _Copy_arrayof_conjoint_jints(from, to, count); -} - -static void pd_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) { - _Copy_arrayof_conjoint_jlongs(from, to, count); -} - -static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) { -#ifdef _LP64 - assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size"); - _Copy_arrayof_conjoint_jlongs(from, to, count); -#else - assert(BytesPerInt == BytesPerOop, "jints and oops must be the same size"); - _Copy_arrayof_conjoint_jints(from, to, count); -#endif // _LP64 -} - -static void pd_fill_to_words(HeapWord* tohw, size_t count, juint value) { -#ifdef _LP64 - julong* to = (julong*) tohw; - julong v = ((julong) value << 32) | value; -#else - juint* to = (juint*) tohw; - juint v = value; -#endif // _LP64 - - while (count-- > 0) { - *to++ = v; - } -} - -static void pd_fill_to_aligned_words(HeapWord* tohw, size_t count, juint value) { - pd_fill_to_words(tohw, count, value); -} - -static void pd_fill_to_bytes(void* to, size_t count, jubyte value) { - (void)memset(to, value, count); -} - -static void pd_zero_to_words(HeapWord* tohw, size_t count) { - pd_fill_to_words(tohw, count, 0); -} - -static void pd_zero_to_bytes(void* to, size_t count) { - (void)memset(to, 0, count); -}
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreterGenerator_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 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. - * - */ - - protected: - MacroAssembler* assembler() const - { - return _masm; - } - - protected: - address generate_entry(ZeroEntry::method_entry_t entry_point) - { - ZeroEntry *entry = (ZeroEntry *) assembler()->pc(); - assembler()->advance(sizeof(ZeroEntry)); - entry->set_entry_point(entry_point); - return (address) entry; - }
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,956 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008, 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/_cppInterpreter_zero.cpp.incl" - -#ifdef CC_INTERP - -#define fixup_after_potential_safepoint() \ - method = istate->method() - -#define CALL_VM_NOCHECK(func) \ - thread->set_last_Java_frame(); \ - func; \ - thread->reset_last_Java_frame(); \ - fixup_after_potential_safepoint() - -void CppInterpreter::normal_entry(methodOop method, intptr_t UNUSED, TRAPS) -{ - JavaThread *thread = (JavaThread *) THREAD; - ZeroStack *stack = thread->zero_stack(); - - // Adjust the caller's stack frame to accomodate any additional - // local variables we have contiguously with our parameters. - int extra_locals = method->max_locals() - method->size_of_parameters(); - if (extra_locals > 0) { - if (extra_locals > stack->available_words()) { - Unimplemented(); - } - for (int i = 0; i < extra_locals; i++) - stack->push(0); - } - - // Allocate and initialize our frame. - InterpreterFrame *frame = InterpreterFrame::build(stack, method, thread); - thread->push_zero_frame(frame); - - // Execute those bytecodes! - main_loop(0, THREAD); -} - -void CppInterpreter::main_loop(int recurse, TRAPS) -{ - JavaThread *thread = (JavaThread *) THREAD; - ZeroStack *stack = thread->zero_stack(); - - // If we are entering from a deopt we may need to call - // ourself a few times in order to get to our frame. - if (recurse) - main_loop(recurse - 1, THREAD); - - InterpreterFrame *frame = thread->top_zero_frame()->as_interpreter_frame(); - interpreterState istate = frame->interpreter_state(); - methodOop method = istate->method(); - - intptr_t *result = NULL; - int result_slots = 0; - - // Check we're not about to run out of stack - if (stack_overflow_imminent(thread)) { - CALL_VM_NOCHECK(InterpreterRuntime::throw_StackOverflowError(thread)); - goto unwind_and_return; - } - - while (true) { - // We can set up the frame anchor with everything we want at - // this point as we are thread_in_Java and no safepoints can - // occur until we go to vm mode. We do have to clear flags - // on return from vm but that is it. - thread->set_last_Java_frame(); - - // Call the interpreter - if (JvmtiExport::can_post_interpreter_events()) - BytecodeInterpreter::runWithChecks(istate); - else - BytecodeInterpreter::run(istate); - fixup_after_potential_safepoint(); - - // Clear the frame anchor - thread->reset_last_Java_frame(); - - // Examine the message from the interpreter to decide what to do - if (istate->msg() == BytecodeInterpreter::call_method) { - methodOop callee = istate->callee(); - - // Trim back the stack to put the parameters at the top - stack->set_sp(istate->stack() + 1); - - // Make the call - Interpreter::invoke_method(callee, istate->callee_entry_point(), THREAD); - fixup_after_potential_safepoint(); - - // Convert the result - istate->set_stack(stack->sp() - 1); - - // Restore the stack - stack->set_sp(istate->stack_limit() + 1); - - // Resume the interpreter - istate->set_msg(BytecodeInterpreter::method_resume); - } - else if (istate->msg() == BytecodeInterpreter::more_monitors) { - int monitor_words = frame::interpreter_frame_monitor_size(); - - // Allocate the space - if (monitor_words > stack->available_words()) { - Unimplemented(); - } - stack->alloc(monitor_words * wordSize); - - // Move the expression stack contents - for (intptr_t *p = istate->stack() + 1; p < istate->stack_base(); p++) - *(p - monitor_words) = *p; - - // Move the expression stack pointers - istate->set_stack_limit(istate->stack_limit() - monitor_words); - istate->set_stack(istate->stack() - monitor_words); - istate->set_stack_base(istate->stack_base() - monitor_words); - - // Zero the new monitor so the interpreter can find it. - ((BasicObjectLock *) istate->stack_base())->set_obj(NULL); - - // Resume the interpreter - istate->set_msg(BytecodeInterpreter::got_monitors); - } - else if (istate->msg() == BytecodeInterpreter::return_from_method) { - // Copy the result into the caller's frame - result_slots = type2size[method->result_type()]; - assert(result_slots >= 0 && result_slots <= 2, "what?"); - result = istate->stack() + result_slots; - break; - } - else if (istate->msg() == BytecodeInterpreter::throwing_exception) { - assert(HAS_PENDING_EXCEPTION, "should do"); - break; - } - else { - ShouldNotReachHere(); - } - } - - unwind_and_return: - - // Unwind the current frame - thread->pop_zero_frame(); - - // Pop our local variables - stack->set_sp(stack->sp() + method->max_locals()); - - // Push our result - for (int i = 0; i < result_slots; i++) - stack->push(result[-i]); -} - -void CppInterpreter::native_entry(methodOop method, intptr_t UNUSED, TRAPS) -{ - // Make sure method is native and not abstract - assert(method->is_native() && !method->is_abstract(), "should be"); - - JavaThread *thread = (JavaThread *) THREAD; - ZeroStack *stack = thread->zero_stack(); - - // Allocate and initialize our frame - InterpreterFrame *frame = InterpreterFrame::build(stack, method, thread); - thread->push_zero_frame(frame); - interpreterState istate = frame->interpreter_state(); - intptr_t *locals = istate->locals(); - - // Check we're not about to run out of stack - if (stack_overflow_imminent(thread)) { - CALL_VM_NOCHECK(InterpreterRuntime::throw_StackOverflowError(thread)); - goto unwind_and_return; - } - - // Lock if necessary - BasicObjectLock *monitor; - monitor = NULL; - if (method->is_synchronized()) { - monitor = (BasicObjectLock*) istate->stack_base(); - oop lockee = monitor->obj(); - markOop disp = lockee->mark()->set_unlocked(); - - monitor->lock()->set_displaced_header(disp); - if (Atomic::cmpxchg_ptr(monitor, lockee->mark_addr(), disp) != disp) { - if (thread->is_lock_owned((address) disp->clear_lock_bits())) { - monitor->lock()->set_displaced_header(NULL); - } - else { - CALL_VM_NOCHECK(InterpreterRuntime::monitorenter(thread, monitor)); - if (HAS_PENDING_EXCEPTION) - goto unwind_and_return; - } - } - } - - // Get the signature handler - InterpreterRuntime::SignatureHandler *handler; - { - address handlerAddr = method->signature_handler(); - if (handlerAddr == NULL) { - CALL_VM_NOCHECK(InterpreterRuntime::prepare_native_call(thread, method)); - if (HAS_PENDING_EXCEPTION) - goto unwind_and_return; - - handlerAddr = method->signature_handler(); - assert(handlerAddr != NULL, "eh?"); - } - if (handlerAddr == (address) InterpreterRuntime::slow_signature_handler) { - CALL_VM_NOCHECK(handlerAddr = - InterpreterRuntime::slow_signature_handler(thread, method, NULL,NULL)); - if (HAS_PENDING_EXCEPTION) - goto unwind_and_return; - } - handler = \ - InterpreterRuntime::SignatureHandler::from_handlerAddr(handlerAddr); - } - - // Get the native function entry point - address function; - function = method->native_function(); - assert(function != NULL, "should be set if signature handler is"); - - // Build the argument list - if (handler->argument_count() * 2 > stack->available_words()) { - Unimplemented(); - } - void **arguments; - { - arguments = - (void **) stack->alloc(handler->argument_count() * sizeof(void **)); - void **dst = arguments; - - void *env = thread->jni_environment(); - *(dst++) = &env; - - void *mirror = NULL; - if (method->is_static()) { - istate->set_oop_temp( - method->constants()->pool_holder()->klass_part()->java_mirror()); - mirror = istate->oop_temp_addr(); - *(dst++) = &mirror; - } - - intptr_t *src = locals; - for (int i = dst - arguments; i < handler->argument_count(); i++) { - ffi_type *type = handler->argument_type(i); - if (type == &ffi_type_pointer) { - if (*src) { - stack->push((intptr_t) src); - *(dst++) = stack->sp(); - } - else { - *(dst++) = src; - } - src--; - } - else if (type->size == 4) { - *(dst++) = src--; - } - else if (type->size == 8) { - src--; - *(dst++) = src--; - } - else { - ShouldNotReachHere(); - } - } - } - - // Set up the Java frame anchor - thread->set_last_Java_frame(); - - // Change the thread state to _thread_in_native - ThreadStateTransition::transition_from_java(thread, _thread_in_native); - - // Make the call - intptr_t result[4 - LogBytesPerWord]; - ffi_call(handler->cif(), (void (*)()) function, result, arguments); - - // Change the thread state back to _thread_in_Java. - // ThreadStateTransition::transition_from_native() cannot be used - // here because it does not check for asynchronous exceptions. - // We have to manage the transition ourself. - thread->set_thread_state(_thread_in_native_trans); - - // Make sure new state is visible in the GC thread - if (os::is_MP()) { - if (UseMembar) { - OrderAccess::fence(); - } - else { - InterfaceSupport::serialize_memory(thread); - } - } - - // Handle safepoint operations, pending suspend requests, - // and pending asynchronous exceptions. - if (SafepointSynchronize::do_call_back() || - thread->has_special_condition_for_native_trans()) { - JavaThread::check_special_condition_for_native_trans(thread); - CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops()); - } - - // Finally we can change the thread state to _thread_in_Java. - thread->set_thread_state(_thread_in_Java); - fixup_after_potential_safepoint(); - - // Clear the frame anchor - thread->reset_last_Java_frame(); - - // If the result was an oop then unbox it and store it in - // oop_temp where the garbage collector can see it before - // we release the handle it might be protected by. - if (handler->result_type() == &ffi_type_pointer) { - if (result[0]) - istate->set_oop_temp(*(oop *) result[0]); - else - istate->set_oop_temp(NULL); - } - - // Reset handle block - thread->active_handles()->clear(); - - // Unlock if necessary. It seems totally wrong that this - // is skipped in the event of an exception but apparently - // the template interpreter does this so we do too. - if (monitor && !HAS_PENDING_EXCEPTION) { - BasicLock *lock = monitor->lock(); - markOop header = lock->displaced_header(); - oop rcvr = monitor->obj(); - monitor->set_obj(NULL); - - if (header != NULL) { - if (Atomic::cmpxchg_ptr(header, rcvr->mark_addr(), lock) != lock) { - monitor->set_obj(rcvr); - { - HandleMark hm(thread); - CALL_VM_NOCHECK(InterpreterRuntime::monitorexit(thread, monitor)); - } - } - } - } - - unwind_and_return: - - // Unwind the current activation - thread->pop_zero_frame(); - - // Pop our parameters - stack->set_sp(stack->sp() + method->size_of_parameters()); - - // Push our result - if (!HAS_PENDING_EXCEPTION) { - stack->set_sp(stack->sp() - type2size[method->result_type()]); - - switch (method->result_type()) { - case T_VOID: - break; - - case T_BOOLEAN: -#ifndef VM_LITTLE_ENDIAN - result[0] <<= (BitsPerWord - BitsPerByte); -#endif - SET_LOCALS_INT(*(jboolean *) result != 0, 0); - break; - - case T_CHAR: -#ifndef VM_LITTLE_ENDIAN - result[0] <<= (BitsPerWord - BitsPerShort); -#endif - SET_LOCALS_INT(*(jchar *) result, 0); - break; - - case T_BYTE: -#ifndef VM_LITTLE_ENDIAN - result[0] <<= (BitsPerWord - BitsPerByte); -#endif - SET_LOCALS_INT(*(jbyte *) result, 0); - break; - - case T_SHORT: -#ifndef VM_LITTLE_ENDIAN - result[0] <<= (BitsPerWord - BitsPerShort); -#endif - SET_LOCALS_INT(*(jshort *) result, 0); - break; - - case T_INT: -#ifndef VM_LITTLE_ENDIAN - result[0] <<= (BitsPerWord - BitsPerInt); -#endif - SET_LOCALS_INT(*(jint *) result, 0); - break; - - case T_LONG: - SET_LOCALS_LONG(*(jlong *) result, 0); - break; - - case T_FLOAT: - SET_LOCALS_FLOAT(*(jfloat *) result, 0); - break; - - case T_DOUBLE: - SET_LOCALS_DOUBLE(*(jdouble *) result, 0); - break; - - case T_OBJECT: - case T_ARRAY: - SET_LOCALS_OBJECT(istate->oop_temp(), 0); - break; - - default: - ShouldNotReachHere(); - } - } -} - -void CppInterpreter::accessor_entry(methodOop method, intptr_t UNUSED, TRAPS) -{ - JavaThread *thread = (JavaThread *) THREAD; - ZeroStack *stack = thread->zero_stack(); - intptr_t *locals = stack->sp(); - - // Drop into the slow path if we need a safepoint check - if (SafepointSynchronize::do_call_back()) { - normal_entry(method, 0, THREAD); - return; - } - - // Load the object pointer and drop into the slow path - // if we have a NullPointerException - oop object = LOCALS_OBJECT(0); - if (object == NULL) { - normal_entry(method, 0, THREAD); - return; - } - - // Read the field index from the bytecode, which looks like this: - // 0: aload_0 - // 1: getfield - // 2: index - // 3: index - // 4: ireturn/areturn - // NB this is not raw bytecode: index is in machine order - u1 *code = method->code_base(); - assert(code[0] == Bytecodes::_aload_0 && - code[1] == Bytecodes::_getfield && - (code[4] == Bytecodes::_ireturn || - code[4] == Bytecodes::_areturn), "should do"); - u2 index = Bytes::get_native_u2(&code[2]); - - // Get the entry from the constant pool cache, and drop into - // the slow path if it has not been resolved - constantPoolCacheOop cache = method->constants()->cache(); - ConstantPoolCacheEntry* entry = cache->entry_at(index); - if (!entry->is_resolved(Bytecodes::_getfield)) { - normal_entry(method, 0, THREAD); - return; - } - - // Get the result and push it onto the stack - switch (entry->flag_state()) { - case ltos: - case dtos: - if (stack->available_words() < 1) { - Unimplemented(); - } - stack->alloc(wordSize); - break; - } - if (entry->is_volatile()) { - switch (entry->flag_state()) { - case ctos: - SET_LOCALS_INT(object->char_field_acquire(entry->f2()), 0); - break; - - case btos: - SET_LOCALS_INT(object->byte_field_acquire(entry->f2()), 0); - break; - - case stos: - SET_LOCALS_INT(object->short_field_acquire(entry->f2()), 0); - break; - - case itos: - SET_LOCALS_INT(object->int_field_acquire(entry->f2()), 0); - break; - - case ltos: - SET_LOCALS_LONG(object->long_field_acquire(entry->f2()), 0); - break; - - case ftos: - SET_LOCALS_FLOAT(object->float_field_acquire(entry->f2()), 0); - break; - - case dtos: - SET_LOCALS_DOUBLE(object->double_field_acquire(entry->f2()), 0); - break; - - case atos: - SET_LOCALS_OBJECT(object->obj_field_acquire(entry->f2()), 0); - break; - - default: - ShouldNotReachHere(); - } - } - else { - switch (entry->flag_state()) { - case ctos: - SET_LOCALS_INT(object->char_field(entry->f2()), 0); - break; - - case btos: - SET_LOCALS_INT(object->byte_field(entry->f2()), 0); - break; - - case stos: - SET_LOCALS_INT(object->short_field(entry->f2()), 0); - break; - - case itos: - SET_LOCALS_INT(object->int_field(entry->f2()), 0); - break; - - case ltos: - SET_LOCALS_LONG(object->long_field(entry->f2()), 0); - break; - - case ftos: - SET_LOCALS_FLOAT(object->float_field(entry->f2()), 0); - break; - - case dtos: - SET_LOCALS_DOUBLE(object->double_field(entry->f2()), 0); - break; - - case atos: - SET_LOCALS_OBJECT(object->obj_field(entry->f2()), 0); - break; - - default: - ShouldNotReachHere(); - } - } -} - -void CppInterpreter::empty_entry(methodOop method, intptr_t UNUSED, TRAPS) -{ - JavaThread *thread = (JavaThread *) THREAD; - ZeroStack *stack = thread->zero_stack(); - - // Drop into the slow path if we need a safepoint check - if (SafepointSynchronize::do_call_back()) { - normal_entry(method, 0, THREAD); - return; - } - - // Pop our parameters - stack->set_sp(stack->sp() + method->size_of_parameters()); -} - -bool CppInterpreter::stack_overflow_imminent(JavaThread *thread) -{ - // How is the ABI stack? - address stack_top = thread->stack_base() - thread->stack_size(); - int free_stack = os::current_stack_pointer() - stack_top; - if (free_stack < StackShadowPages * os::vm_page_size()) { - return true; - } - - // How is the Zero stack? - // Throwing a StackOverflowError involves a VM call, which means - // we need a frame on the stack. We should be checking here to - // ensure that methods we call have enough room to install the - // largest possible frame, but that's more than twice the size - // of the entire Zero stack we get by default, so we just check - // we have *some* space instead... - free_stack = thread->zero_stack()->available_words() * wordSize; - if (free_stack < StackShadowPages * os::vm_page_size()) { - return true; - } - - return false; -} - -InterpreterFrame *InterpreterFrame::build(ZeroStack* stack, - const methodOop method, - JavaThread* thread) -{ - int monitor_words = - method->is_synchronized() ? frame::interpreter_frame_monitor_size() : 0; - int stack_words = method->is_native() ? 0 : method->max_stack(); - - if (header_words + monitor_words + stack_words > stack->available_words()) { - Unimplemented(); - } - - intptr_t *locals; - if (method->is_native()) - locals = stack->sp() + (method->size_of_parameters() - 1); - else - locals = stack->sp() + (method->max_locals() - 1); - - stack->push(0); // next_frame, filled in later - intptr_t *fp = stack->sp(); - assert(fp - stack->sp() == next_frame_off, "should be"); - - stack->push(INTERPRETER_FRAME); - assert(fp - stack->sp() == frame_type_off, "should be"); - - interpreterState istate = - (interpreterState) stack->alloc(sizeof(BytecodeInterpreter)); - assert(fp - stack->sp() == istate_off, "should be"); - - istate->set_locals(locals); - istate->set_method(method); - istate->set_self_link(istate); - istate->set_prev_link(NULL); - istate->set_thread(thread); - istate->set_bcp(method->is_native() ? NULL : method->code_base()); - istate->set_constants(method->constants()->cache()); - istate->set_msg(BytecodeInterpreter::method_entry); - istate->set_oop_temp(NULL); - istate->set_mdx(NULL); - istate->set_callee(NULL); - - istate->set_monitor_base((BasicObjectLock *) stack->sp()); - if (method->is_synchronized()) { - BasicObjectLock *monitor = - (BasicObjectLock *) stack->alloc(monitor_words * wordSize); - oop object; - if (method->is_static()) - object = method->constants()->pool_holder()->klass_part()->java_mirror(); - else - object = (oop) locals[0]; - monitor->set_obj(object); - } - - istate->set_stack_base(stack->sp()); - istate->set_stack(stack->sp() - 1); - if (stack_words) - stack->alloc(stack_words * wordSize); - istate->set_stack_limit(stack->sp() - 1); - - return (InterpreterFrame *) fp; -} - -int AbstractInterpreter::BasicType_as_index(BasicType type) -{ - int i = 0; - switch (type) { - case T_BOOLEAN: i = 0; break; - case T_CHAR : i = 1; break; - case T_BYTE : i = 2; break; - case T_SHORT : i = 3; break; - case T_INT : i = 4; break; - case T_LONG : i = 5; break; - case T_VOID : i = 6; break; - case T_FLOAT : i = 7; break; - case T_DOUBLE : i = 8; break; - case T_OBJECT : i = 9; break; - case T_ARRAY : i = 9; break; - default : ShouldNotReachHere(); - } - assert(0 <= i && i < AbstractInterpreter::number_of_result_handlers, - "index out of bounds"); - return i; -} - -address InterpreterGenerator::generate_empty_entry() -{ - if (!UseFastEmptyMethods) - return NULL; - - return generate_entry(CppInterpreter::empty_entry); -} - -address InterpreterGenerator::generate_accessor_entry() -{ - if (!UseFastAccessorMethods) - return NULL; - - return generate_entry(CppInterpreter::accessor_entry); -} - -address InterpreterGenerator::generate_native_entry(bool synchronized) -{ - assert (synchronized == false, "should be"); - - return generate_entry(CppInterpreter::native_entry); -} - -address InterpreterGenerator::generate_normal_entry(bool synchronized) -{ - assert (synchronized == false, "should be"); - - return generate_entry(CppInterpreter::normal_entry); -} - -address AbstractInterpreterGenerator::generate_method_entry( - AbstractInterpreter::MethodKind kind) { - - address entry_point = NULL; - - switch (kind) { - case Interpreter::zerolocals: - case Interpreter::zerolocals_synchronized: - break; - - case Interpreter::native: - entry_point = ((InterpreterGenerator*)this)->generate_native_entry(false); - break; - - case Interpreter::native_synchronized: - entry_point = ((InterpreterGenerator*)this)->generate_native_entry(false); - break; - - case Interpreter::empty: - entry_point = ((InterpreterGenerator*)this)->generate_empty_entry(); - break; - - case Interpreter::accessor: - entry_point = ((InterpreterGenerator*)this)->generate_accessor_entry(); - break; - - case Interpreter::abstract: - 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: - case Interpreter::java_lang_math_abs: - case Interpreter::java_lang_math_log: - case Interpreter::java_lang_math_log10: - case Interpreter::java_lang_math_sqrt: - entry_point = ((InterpreterGenerator*)this)->generate_math_entry(kind); - break; - - default: - ShouldNotReachHere(); - } - - if (entry_point == NULL) - entry_point = ((InterpreterGenerator*)this)->generate_normal_entry(false); - - return entry_point; -} - -InterpreterGenerator::InterpreterGenerator(StubQueue* code) - : CppInterpreterGenerator(code) { - generate_all(); -} - -// Deoptimization helpers - -InterpreterFrame *InterpreterFrame::build(ZeroStack* stack, int size) -{ - int size_in_words = size >> LogBytesPerWord; - assert(size_in_words * wordSize == size, "unaligned"); - assert(size_in_words >= header_words, "too small"); - - if (size_in_words > stack->available_words()) { - Unimplemented(); - } - - stack->push(0); // next_frame, filled in later - intptr_t *fp = stack->sp(); - assert(fp - stack->sp() == next_frame_off, "should be"); - - stack->push(INTERPRETER_FRAME); - assert(fp - stack->sp() == frame_type_off, "should be"); - - interpreterState istate = - (interpreterState) stack->alloc(sizeof(BytecodeInterpreter)); - assert(fp - stack->sp() == istate_off, "should be"); - istate->set_self_link(NULL); // mark invalid - - stack->alloc((size_in_words - header_words) * wordSize); - - return (InterpreterFrame *) fp; -} - -int AbstractInterpreter::layout_activation(methodOop method, - int tempcount, - int popframe_extra_args, - int moncount, - int callee_param_count, - int callee_locals, - frame* caller, - frame* interpreter_frame, - bool is_top_frame) -{ - assert(popframe_extra_args == 0, "what to do?"); - assert(!is_top_frame || (!callee_locals && !callee_param_count), - "top frame should have no caller") - - // This code must exactly match what InterpreterFrame::build - // does (the full InterpreterFrame::build, that is, not the - // one that creates empty frames for the deoptimizer). - // - // If interpreter_frame is not NULL then it will be filled in. - // It's size is determined by a previous call to this method, - // so it should be correct. - // - // Note that tempcount is the current size of the expression - // stack. For top most frames we will allocate a full sized - // expression stack and not the trimmed version that non-top - // frames have. - - int header_words = InterpreterFrame::header_words; - int monitor_words = moncount * frame::interpreter_frame_monitor_size(); - int stack_words = is_top_frame ? method->max_stack() : tempcount; - int callee_extra_locals = callee_locals - callee_param_count; - - if (interpreter_frame) { - intptr_t *locals = interpreter_frame->sp() + method->max_locals(); - interpreterState istate = interpreter_frame->get_interpreterState(); - intptr_t *monitor_base = (intptr_t*) istate; - intptr_t *stack_base = monitor_base - monitor_words; - intptr_t *stack = stack_base - tempcount - 1; - - BytecodeInterpreter::layout_interpreterState(istate, - caller, - NULL, - method, - locals, - stack, - stack_base, - monitor_base, - NULL, - is_top_frame); - } - return header_words + monitor_words + stack_words + callee_extra_locals; -} - -void BytecodeInterpreter::layout_interpreterState(interpreterState istate, - frame* caller, - frame* current, - methodOop method, - intptr_t* locals, - intptr_t* stack, - intptr_t* stack_base, - intptr_t* monitor_base, - intptr_t* frame_bottom, - bool is_top_frame) -{ - istate->set_locals(locals); - istate->set_method(method); - istate->set_self_link(istate); - istate->set_prev_link(NULL); - // thread will be set by a hacky repurposing of frame::patch_pc() - // bcp will be set by vframeArrayElement::unpack_on_stack() - istate->set_constants(method->constants()->cache()); - istate->set_msg(BytecodeInterpreter::method_resume); - istate->set_bcp_advance(0); - istate->set_oop_temp(NULL); - istate->set_mdx(NULL); - if (caller->is_interpreted_frame()) { - interpreterState prev = caller->get_interpreterState(); - prev->set_callee(method); - if (*prev->bcp() == Bytecodes::_invokeinterface) - prev->set_bcp_advance(5); - else - prev->set_bcp_advance(3); - } - istate->set_callee(NULL); - istate->set_monitor_base((BasicObjectLock *) monitor_base); - istate->set_stack_base(stack_base); - istate->set_stack(stack); - istate->set_stack_limit(stack_base - method->max_stack() - 1); -} - -address CppInterpreter::return_entry(TosState state, int length) -{ - Unimplemented(); -} - -address CppInterpreter::deopt_entry(TosState state, int length) -{ - return NULL; -} - -// Helper for (runtime) stack overflow checks - -int AbstractInterpreter::size_top_interpreter_activation(methodOop method) -{ - return 0; -} - -// Helper for figuring out if frames are interpreter frames - -bool CppInterpreter::contains(address pc) -{ -#ifdef PRODUCT - ShouldNotCallThis(); -#else - return false; // make frame::print_value_on work -#endif // !PRODUCT -} - -// Result handlers and convertors - -address CppInterpreterGenerator::generate_result_handler_for( - BasicType type) { - assembler()->advance(1); - return ShouldNotReachHereStub(); -} - -address CppInterpreterGenerator::generate_tosca_to_stack_converter( - BasicType type) { - assembler()->advance(1); - return ShouldNotReachHereStub(); -} - -address CppInterpreterGenerator::generate_stack_to_stack_converter( - BasicType type) { - assembler()->advance(1); - return ShouldNotReachHereStub(); -} - -address CppInterpreterGenerator::generate_stack_to_native_abi_converter( - BasicType type) { - assembler()->advance(1); - return ShouldNotReachHereStub(); -} - -#endif // CC_INTERP
--- a/ports/hotspot/src/cpu/zero/vm/cppInterpreter_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* - * Copyright 1997-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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. - * - */ - - - protected: - // Size of interpreter code - const static int InterpreterCodeSize = 6 * K; - - public: - // Method entries - static void normal_entry(methodOop method, intptr_t UNUSED, TRAPS); - static void native_entry(methodOop method, intptr_t UNUSED, TRAPS); - static void accessor_entry(methodOop method, intptr_t UNUSED, TRAPS); - static void empty_entry(methodOop method, intptr_t UNUSED, TRAPS); - - public: - // Main loop of normal_entry - static void main_loop(int recurse, TRAPS); - - private: - // Stack overflow checks - static bool stack_overflow_imminent(JavaThread *thread);
--- a/ports/hotspot/src/cpu/zero/vm/debug_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* - * Copyright 2003-2007 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. - * - */ - -#include "incls/_precompiled.incl" -#include "incls/_debug_zero.cpp.incl" - -void pd_ps(frame f) -{ - Unimplemented(); -}
--- a/ports/hotspot/src/cpu/zero/vm/deoptimizerFrame_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 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. - * - */ - -// | ... | -// +--------------------+ ------------------ -// | frame_type | low addresses -// | next_frame | high addresses -// +--------------------+ ------------------ -// | ... | - -class DeoptimizerFrame : public ZeroFrame { - friend class ZeroStackPrinter; - - private: - DeoptimizerFrame() : ZeroFrame() - { - ShouldNotCallThis(); - } - - protected: - enum Layout { - header_words = jf_header_words - }; - - public: - static DeoptimizerFrame *build(ZeroStack* stack); -};
--- a/ports/hotspot/src/cpu/zero/vm/disassembler_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -/* - * Copyright 2003 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. - * - */ - -// The disassembler prints out zero code annotated -// with Java specific information. - - static int pd_instruction_alignment() { - Unimplemented(); - } - - static const char* pd_cpu_opts() { - Unimplemented(); - }
--- a/ports/hotspot/src/cpu/zero/vm/dump_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* - * Copyright 2004-2007 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. - * - */ - -#include "incls/_precompiled.incl" -#include "incls/_dump_zero.cpp.incl" - -void CompactingPermGenGen::generate_vtable_methods(void** vtbl_list, - void** vtable, - char** md_top, - char* md_end, - char** mc_top, - char* mc_end) -{ - Unimplemented(); -}
--- a/ports/hotspot/src/cpu/zero/vm/entryFrame_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 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. - * - */ - -// | ... | -// +--------------------+ ------------------ -// | parameter n-1 | low addresses -// | ... | -// | parameter 0 | -// | call_wrapper | -// | frame_type | -// | next_frame | high addresses -// +--------------------+ ------------------ -// | ... | - -class EntryFrame : public ZeroFrame { - friend class ZeroStackPrinter; - - private: - EntryFrame() : ZeroFrame() - { - ShouldNotCallThis(); - } - - protected: - enum Layout { - call_wrapper_off = jf_header_words, - header_words - }; - - public: - static EntryFrame *build(ZeroStack* stack, - const intptr_t* parameters, - int parameter_words, - JavaCallWrapper* call_wrapper); - public: - JavaCallWrapper *call_wrapper() const - { - return (JavaCallWrapper *) value_of_word(call_wrapper_off); - } -};
--- a/ports/hotspot/src/cpu/zero/vm/entry_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 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. - * - */ - -class ZeroEntry { - public: - ZeroEntry() - { - ShouldNotCallThis(); - } - - public: - typedef void (*method_entry_t)(methodOop method, intptr_t base_pc, TRAPS); - - private: - method_entry_t _entry_point; - - public: - method_entry_t entry_point() const - { - return _entry_point; - } - void set_entry_point(method_entry_t entry_point) - { - _entry_point = entry_point; - } - - public: - void invoke(methodOop method, TRAPS) const - { - entry_point()(method, (intptr_t) this, THREAD); - } - - public: - static ByteSize entry_point_offset() - { - return byte_offset_of(ZeroEntry, _entry_point); - } -};
--- a/ports/hotspot/src/cpu/zero/vm/frame_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,199 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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/_frame_zero.cpp.incl" - -#ifdef ASSERT -void RegisterMap::check_location_valid() -{ - Unimplemented(); -} -#endif - -bool frame::is_interpreted_frame() const -{ - return zeroframe()->is_interpreter_frame(); -} - -bool frame::is_deoptimizer_frame() const -{ - return zeroframe()->is_deoptimizer_frame(); -} - -frame frame::sender_for_entry_frame(RegisterMap *map) const -{ - assert(map != NULL, "map must be set"); - assert(!entry_frame_is_first(), "next Java fp must be non zero"); - assert(entry_frame_call_wrapper()->anchor()->last_Java_sp() == sender_sp(), - "sender should be next Java frame"); - map->clear(); - assert(map->include_argument_oops(), "should be set by clear"); - return frame(sender_sp()); -} - -frame frame::sender_for_interpreter_frame(RegisterMap *map) const -{ - return frame(sender_sp()); -} - -frame frame::sender_for_compiled_frame(RegisterMap *map) const -{ - return frame(sender_sp()); -} - -frame frame::sender_for_deoptimizer_frame(RegisterMap *map) const -{ - return frame(sender_sp()); -} - -frame frame::sender(RegisterMap* map) const -{ - // Default is not to follow arguments; the various - // sender_for_xxx methods update this accordingly. - map->set_include_argument_oops(false); - - if (is_entry_frame()) - return sender_for_entry_frame(map); - - if (is_interpreted_frame()) - return sender_for_interpreter_frame(map); - - assert(_cb == CodeCache::find_blob(pc()),"Must be the same"); - if (_cb != NULL) { - return sender_for_compiled_frame(map); - } - - if (is_deoptimizer_frame()) - return sender_for_deoptimizer_frame(map); - - Unimplemented(); -} - -#ifdef CC_INTERP -BasicObjectLock* frame::interpreter_frame_monitor_begin() const -{ - return get_interpreterState()->monitor_base(); -} - -BasicObjectLock* frame::interpreter_frame_monitor_end() const -{ - return (BasicObjectLock*) get_interpreterState()->stack_base(); -} -#endif // CC_INTERP - -void frame::patch_pc(Thread* thread, address pc) -{ - // We borrow this call to set the thread pointer in the interpreter - // state; the hook to set up deoptimized frames isn't supplied it. - assert(pc == NULL, "should be"); - get_interpreterState()->set_thread((JavaThread *) thread); -} - -bool frame::safe_for_sender(JavaThread *thread) -{ - Unimplemented(); -} - -void frame::pd_gc_epilog() -{ -} - -bool frame::is_interpreted_frame_valid(JavaThread *thread) const -{ - Unimplemented(); -} - -BasicType frame::interpreter_frame_result(oop* oop_result, - jvalue* value_result) -{ - assert(is_interpreted_frame(), "interpreted frame expected"); - methodOop method = interpreter_frame_method(); - BasicType type = method->result_type(); - intptr_t* tos_addr = (intptr_t *) interpreter_frame_tos_address(); - oop obj; - - switch (type) { - case T_VOID: - break; - case T_BOOLEAN: - value_result->z = *(jboolean *) tos_addr; - break; - case T_BYTE: - value_result->b = *(jbyte *) tos_addr; - break; - case T_CHAR: - value_result->c = *(jchar *) tos_addr; - break; - case T_SHORT: - value_result->s = *(jshort *) tos_addr; - break; - case T_INT: - value_result->i = *(jint *) tos_addr; - break; - case T_LONG: - value_result->j = *(jlong *) tos_addr; - break; - case T_FLOAT: - value_result->f = *(jfloat *) tos_addr; - break; - case T_DOUBLE: - value_result->d = *(jdouble *) tos_addr; - break; - - case T_OBJECT: - case T_ARRAY: - if (method->is_native()) { - obj = get_interpreterState()->oop_temp(); - } - else { - oop* obj_p = (oop *) tos_addr; - obj = (obj_p == NULL) ? (oop) NULL : *obj_p; - } - assert(obj == NULL || Universe::heap()->is_in(obj), "sanity check"); - *oop_result = obj; - break; - - default: - ShouldNotReachHere(); - } - - return type; -} - -int frame::frame_size() const -{ -#ifdef PRODUCT - ShouldNotCallThis(); -#else - return 0; // make javaVFrame::print_value work -#endif // PRODUCT -} - -intptr_t* frame::interpreter_frame_tos_at(jint offset) const -{ - int index = (Interpreter::expr_offset_in_bytes(offset) / wordSize); - return &interpreter_frame_tos_address()[index]; -}
--- a/ports/hotspot/src/cpu/zero/vm/frame_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008, 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. - * - */ - - // A frame represents a physical stack frame (an activation). Frames - // can be C or Java frames, and the Java frames can be interpreted or - // compiled. In contrast, vframes represent source-level activations, - // so that one physical frame can correspond to multiple source level - // frames because of inlining. A frame is comprised of {pc, sp} - - public: - enum { - pc_return_offset = 0 - }; - - public: - // Constructors - frame(intptr_t* sp); - - // accessors for the instance variables - intptr_t* fp() const - { - return (intptr_t *) -1; - } - -#ifdef CC_INTERP - inline interpreterState get_interpreterState() const; -#endif // CC_INTERP - - public: - const ZeroFrame *zeroframe() const - { - return (ZeroFrame *) sp(); - } - - const EntryFrame *zero_entryframe() const - { - return zeroframe()->as_entry_frame(); - } - const InterpreterFrame *zero_interpreterframe() const - { - return zeroframe()->as_interpreter_frame(); - } - const SharkFrame *zero_sharkframe() const - { - return zeroframe()->as_shark_frame(); - } - - public: - bool is_deoptimizer_frame() const; - - public: - frame sender_for_deoptimizer_frame(RegisterMap* map) const;
--- a/ports/hotspot/src/cpu/zero/vm/frame_zero.inline.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,175 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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 <entryFrame_zero.hpp> -#include <interpreterFrame_zero.hpp> -#include <sharkFrame_zero.hpp> -#include <deoptimizerFrame_zero.hpp> - -// Constructors - -inline frame::frame() -{ - _sp = NULL; - _pc = NULL; - _cb = NULL; - _deopt_state = unknown; -} - -inline frame::frame(intptr_t* sp) -{ - _sp = sp; - switch (zeroframe()->type()) { - case ZeroFrame::ENTRY_FRAME: - _pc = StubRoutines::call_stub_return_pc(); - _cb = NULL; - break; - - case ZeroFrame::INTERPRETER_FRAME: - _pc = NULL; - _cb = NULL; - break; - - case ZeroFrame::SHARK_FRAME: - _pc = zero_sharkframe()->pc(); - _cb = CodeCache::find_blob(pc()); - break; - - case ZeroFrame::DEOPTIMIZER_FRAME: - _pc = NULL; - _cb = NULL; - break; - - default: - ShouldNotReachHere(); - } - _deopt_state = not_deoptimized; -} - -// Accessors - -inline intptr_t* frame::sender_sp() const -{ - return (intptr_t *) zeroframe()->next(); -} - -inline intptr_t* frame::link() const -{ - Unimplemented(); -} - -#ifdef CC_INTERP -inline interpreterState frame::get_interpreterState() const -{ - return zero_interpreterframe()->interpreter_state(); -} - -inline intptr_t** frame::interpreter_frame_locals_addr() const -{ - return &(get_interpreterState()->_locals); -} - -inline intptr_t* frame::interpreter_frame_bcx_addr() const -{ - return (intptr_t*) &(get_interpreterState()->_bcp); -} - -inline constantPoolCacheOop* frame::interpreter_frame_cache_addr() const -{ - return &(get_interpreterState()->_constants); -} - -inline methodOop* frame::interpreter_frame_method_addr() const -{ - return &(get_interpreterState()->_method); -} - -inline intptr_t* frame::interpreter_frame_mdx_addr() const -{ - return (intptr_t*) &(get_interpreterState()->_mdx); -} - -inline intptr_t* frame::interpreter_frame_tos_address() const -{ - return get_interpreterState()->_stack + 1; -} -#endif // CC_INTERP - -inline int frame::interpreter_frame_monitor_size() -{ - return BasicObjectLock::size(); -} - -inline intptr_t* frame::interpreter_frame_expression_stack() const -{ - intptr_t* monitor_end = (intptr_t*) interpreter_frame_monitor_end(); - return monitor_end - 1; -} - -inline jint frame::interpreter_frame_expression_stack_direction() -{ - return -1; -} - -// Return a unique id for this frame. The id must have a value where -// we can distinguish identity and younger/older relationship. NULL -// represents an invalid (incomparable) frame. -inline intptr_t* frame::id() const -{ - return sp(); -} - -inline JavaCallWrapper* frame::entry_frame_call_wrapper() const -{ - return zero_entryframe()->call_wrapper(); -} - -inline void frame::set_saved_oop_result(RegisterMap* map, oop obj) -{ - Unimplemented(); -} - -inline oop frame::saved_oop_result(RegisterMap* map) const -{ - Unimplemented(); -} - -inline bool frame::is_older(intptr_t* id) const -{ - Unimplemented(); -} - -inline intptr_t* frame::entry_frame_argument_at(int offset) const -{ - Unimplemented(); -} - -inline intptr_t* frame::unextended_sp() const -{ - if (zeroframe()->is_shark_frame()) - return zero_sharkframe()->unextended_sp(); - else - return (intptr_t *) -1; -}
--- a/ports/hotspot/src/cpu/zero/vm/globals_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* - * Copyright 2000-2006 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008, 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. - * - */ - -// -// Set the default values for platform dependent flags used by the -// runtime system. See globals.hpp for details of what they do. -// - -define_pd_global(bool, ConvertSleepToYield, true); -define_pd_global(bool, ShareVtableStubs, true); -define_pd_global(bool, CountInterpCalls, true); -define_pd_global(bool, NeedsDeoptSuspend, false); - -define_pd_global(bool, ImplicitNullChecks, true); -define_pd_global(bool, UncommonNullCast, true); - -define_pd_global(intx, CodeEntryAlignment, 32); -define_pd_global(uintx, TLABSize, 0); -#ifdef _LP64 -define_pd_global(uintx, NewSize, ScaleForWordSize(2048 * K)); -#else -define_pd_global(uintx, NewSize, ScaleForWordSize(1024 * K)); -#endif // _LP64 -define_pd_global(intx, InlineFrequencyCount, 100); -define_pd_global(intx, PreInflateSpin, 10); - -define_pd_global(intx, StackYellowPages, 2); -define_pd_global(intx, StackRedPages, 1); -define_pd_global(intx, StackShadowPages, 3 LP64_ONLY(+3) DEBUG_ONLY(+3)); - -define_pd_global(bool, RewriteBytecodes, true); -define_pd_global(bool, RewriteFrequentPairs, true);
--- a/ports/hotspot/src/cpu/zero/vm/icBuffer_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* - * Copyright 2003-2006 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. - * - */ - -#include "incls/_precompiled.incl" -#include "incls/_icBuffer_zero.cpp.incl" - -int InlineCacheBuffer::ic_stub_code_size() -{ - // NB set this once the functions below are implemented - return 4; -} - -void InlineCacheBuffer::assemble_ic_buffer_code(address code_begin, - oop cached_oop, - address entry_point) { - // NB ic_stub_code_size() must return the size of the code we generate - Unimplemented(); -} - -address InlineCacheBuffer::ic_buffer_entry_point(address code_begin) -{ - // NB ic_stub_code_size() must return the size of the code we generate - Unimplemented(); -} - -oop InlineCacheBuffer::ic_buffer_cached_oop(address code_begin) -{ - // NB ic_stub_code_size() must return the size of the code we generate - Unimplemented(); -}
--- a/ports/hotspot/src/cpu/zero/vm/icache_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -/* - * Copyright 2003-2005 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. - * - */ - -#include "incls/_precompiled.incl" -#include "incls/_icache_zero.cpp.incl" - - -void ICacheStubGenerator::generate_icache_flush( - ICache::flush_icache_stub_t* flush_icache_stub) { - - StubCodeMark mark(this, "ICache", "flush_icache_stub"); - - *flush_icache_stub = (ICache::flush_icache_stub_t)UnimplementedStub(); -}
--- a/ports/hotspot/src/cpu/zero/vm/icache_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* - * Copyright 2003-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. - * - */ - -// Interface for updating the instruction cache. Whenever the VM -// modifies code, part of the processor instruction cache potentially -// has to be flushed. - -class ICache : public AbstractICache { - - // Use default implementation -};
--- a/ports/hotspot/src/cpu/zero/vm/interp_masm_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -/* - * Copyright 2003-2007 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. - * - */ - -// This file specializes the assember with interpreter-specific macros - -class InterpreterMacroAssembler : public MacroAssembler { - public: - InterpreterMacroAssembler(CodeBuffer* code) : MacroAssembler(code) {} - RegisterOrConstant delayed_value_impl(intptr_t* delayed_value_addr, Register tmp, int offset) { - Unimplemented(); - } -};
--- a/ports/hotspot/src/cpu/zero/vm/interpreterFrame_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 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. - * - */ - -#ifdef CC_INTERP -// | ... | -// +--------------------+ ------------------ -// | stack slot n-1 | low addresses -// | ... | -// | stack slot 0 | -// | monitor 0 (maybe) | -// | ... | -// | interpreter state | -// | ... | -// | frame_type | -// | next_frame | high addresses -// +--------------------+ ------------------ -// | ... | - -class InterpreterFrame : public ZeroFrame { - friend class ZeroStackPrinter; - friend class AbstractInterpreter; - - private: - InterpreterFrame() : ZeroFrame() - { - ShouldNotCallThis(); - } - - protected: - enum Layout { - istate_off = jf_header_words + - (align_size_up_(sizeof(BytecodeInterpreter), - wordSize) >> LogBytesPerWord) - 1, - header_words - }; - - public: - static InterpreterFrame *build(ZeroStack* stack, - const methodOop method, - JavaThread* thread); - static InterpreterFrame *build(ZeroStack* stack, int size); - - public: - interpreterState interpreter_state() const - { - return (interpreterState) addr_of_word(istate_off); - } -}; -#endif // CC_INTERP
--- a/ports/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* - * Copyright 1997-2007 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. - * - */ - - - // Generation of Interpreter - // - friend class AbstractInterpreterGenerator; - - private: - address generate_normal_entry(bool synchronized); - address generate_native_entry(bool synchronized); - address generate_abstract_entry(); - address generate_math_entry(AbstractInterpreter::MethodKind kind); - address generate_empty_entry(); - address generate_accessor_entry(); - address generate_method_handle_entry();
--- a/ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -/* - * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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/_interpreterRT_zero.cpp.incl" - -void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_int() -{ - push(T_INT); - _cif->nargs++; -} - -void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_long() -{ - push(T_LONG); - _cif->nargs++; -} - -void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_float() -{ - push(T_FLOAT); - _cif->nargs++; -} - -void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_double() -{ - push(T_DOUBLE); - _cif->nargs++; -} - -void InterpreterRuntime::SignatureHandlerGeneratorBase::pass_object() -{ - push(T_OBJECT); - _cif->nargs++; -} - -void InterpreterRuntime::SignatureHandlerGeneratorBase::push(BasicType type) -{ - ffi_type *ftype; - switch (type) { - case T_VOID: - ftype = &ffi_type_void; - break; - - case T_BOOLEAN: - ftype = &ffi_type_uint8; - break; - - case T_CHAR: - ftype = &ffi_type_uint16; - break; - - case T_BYTE: - ftype = &ffi_type_sint8; - break; - - case T_SHORT: - ftype = &ffi_type_sint16; - break; - - case T_INT: - ftype = &ffi_type_sint32; - break; - - case T_LONG: - ftype = &ffi_type_sint64; - break; - - case T_FLOAT: - ftype = &ffi_type_float; - break; - - case T_DOUBLE: - ftype = &ffi_type_double; - break; - - case T_OBJECT: - case T_ARRAY: - ftype = &ffi_type_pointer; - break; - - default: - ShouldNotReachHere(); - } - push((intptr_t) ftype); -} - -// For fast signature handlers the "signature handler" is generated -// into a temporary buffer. It is then copied to its final location, -// and pd_set_handler is called on it. We have this two stage thing -// to accomodate this. - -void InterpreterRuntime::SignatureHandlerGeneratorBase::generate( - uint64_t fingerprint) { - - // Build the argument types list - pass_object(); - if (method()->is_static()) - pass_object(); - iterate(fingerprint); - - // Tack on the result type - push(method()->result_type()); -} - -void InterpreterRuntime::SignatureHandler::finalize() -{ - ffi_status status = - ffi_prep_cif(cif(), - FFI_DEFAULT_ABI, - argument_count(), - result_type(), - argument_types()); - - assert(status == FFI_OK, "should be"); -} - -IRT_ENTRY(address, - InterpreterRuntime::slow_signature_handler(JavaThread* thread, - methodOop method, - intptr_t* unused1, - intptr_t* unused2)) - ZeroStack *stack = thread->zero_stack(); - - int required_words = - (align_size_up(sizeof(ffi_cif), wordSize) >> LogBytesPerWord) + - (method->is_static() ? 2 : 1) + method->size_of_parameters() + 1; - if (required_words > stack->available_words()) { - Unimplemented(); - } - - intptr_t *buf = (intptr_t *) stack->alloc(required_words * wordSize); - SlowSignatureHandlerGenerator sshg(methodHandle(thread, method), buf); - sshg.generate(UCONST64(-1)); - - SignatureHandler *handler = sshg.handler(); - handler->finalize(); - - return (address) handler; -IRT_END - -void SignatureHandlerLibrary::pd_set_handler(address handlerAddr) -{ - InterpreterRuntime::SignatureHandler *handler = - InterpreterRuntime::SignatureHandler::from_handlerAddr(handlerAddr); - - handler->finalize(); -}
--- a/ports/hotspot/src/cpu/zero/vm/interpreterRT_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,144 +0,0 @@ -/* - * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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. - * - */ - -class SignatureHandler -{ - public: - static SignatureHandler *from_handlerAddr(address handlerAddr) - { - return (SignatureHandler *) handlerAddr; - } - - public: - ffi_cif* cif() const - { - return (ffi_cif *) this; - } - - int argument_count() const - { - return cif()->nargs; - } - - ffi_type** argument_types() const - { - return (ffi_type**) (cif() + 1); - } - - ffi_type* argument_type(int i) const - { - return argument_types()[i]; - } - - ffi_type* result_type() const - { - return *(argument_types() + argument_count()); - } - - protected: - friend class InterpreterRuntime; - friend class SignatureHandlerLibrary; - - void finalize(); -}; - -class SignatureHandlerGeneratorBase : public NativeSignatureIterator -{ - private: - ffi_cif* _cif; - - protected: - SignatureHandlerGeneratorBase(methodHandle method, ffi_cif *cif) - : NativeSignatureIterator(method), _cif(cif) - { - _cif->nargs = 0; - } - - ffi_cif *cif() const - { - return _cif; - } - - public: - void generate(uint64_t fingerprint); - - private: - void pass_int(); - void pass_long(); - void pass_float(); - void pass_double(); - void pass_object(); - - private: - void push(BasicType type); - virtual void push(intptr_t value) = 0; -}; - -class SignatureHandlerGenerator : public SignatureHandlerGeneratorBase -{ - private: - CodeBuffer* _cb; - - public: - SignatureHandlerGenerator(methodHandle method, CodeBuffer* buffer) - : SignatureHandlerGeneratorBase(method, (ffi_cif *) buffer->code_end()), - _cb(buffer) - { - _cb->set_code_end((address) (cif() + 1)); - } - - private: - void push(intptr_t value) - { - intptr_t *dst = (intptr_t *) _cb->code_end(); - _cb->set_code_end((address) (dst + 1)); - *dst = value; - } -}; - -class SlowSignatureHandlerGenerator : public SignatureHandlerGeneratorBase -{ - private: - intptr_t *_dst; - - public: - SlowSignatureHandlerGenerator(methodHandle method, intptr_t* buf) - : SignatureHandlerGeneratorBase(method, (ffi_cif *) buf) - { - _dst = (intptr_t *) (cif() + 1); - } - - private: - void push(intptr_t value) - { - *(_dst++) = value; - } - - public: - SignatureHandler *handler() const - { - return (SignatureHandler *) cif(); - } -};
--- a/ports/hotspot/src/cpu/zero/vm/interpreter_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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/_interpreter_zero.cpp.incl" - -address AbstractInterpreterGenerator::generate_slow_signature_handler() -{ - _masm->advance(1); - return (address) InterpreterRuntime::slow_signature_handler; -} - -address InterpreterGenerator::generate_math_entry( - AbstractInterpreter::MethodKind kind) -{ - if (!InlineIntrinsics) - return NULL; - - Unimplemented(); -} - -address InterpreterGenerator::generate_abstract_entry() -{ - return UnimplementedEntry(); -} - -address InterpreterGenerator::generate_method_handle_entry() -{ - return UnimplementedEntry(); -} - -int AbstractInterpreter::size_activation(methodOop method, - int tempcount, - int popframe_extra_args, - int moncount, - int callee_param_count, - int callee_locals, - bool is_top_frame) -{ - return layout_activation(method, - tempcount, - popframe_extra_args, - moncount, - callee_param_count, - callee_locals, - (frame*) NULL, - (frame*) NULL, - is_top_frame); -} - -void Deoptimization::unwind_callee_save_values(frame* f, - vframeArray* vframe_array) -{ -}
--- a/ports/hotspot/src/cpu/zero/vm/interpreter_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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. - * - */ - - public: - static void invoke_method(methodOop method, address entry_point, TRAPS) - { - ((ZeroEntry *) entry_point)->invoke(method, THREAD); - } - - public: - static int expr_index_at(int i) - { - return stackElementWords() * i; - } - static int expr_tag_index_at(int i) - { - assert(TaggedStackInterpreter, "should not call this"); - Unimplemented(); - } - - static int expr_offset_in_bytes(int i) - { - return stackElementSize() * i; - } - static int expr_tag_offset_in_bytes(int i) - { - assert(TaggedStackInterpreter, "should not call this"); - Unimplemented(); - } - - static int local_index_at(int i) - { - assert(i <= 0, "local direction already negated"); - return stackElementWords() * i + (value_offset_in_bytes() / wordSize); - } - static int local_tag_index_at(int i) - { - assert(TaggedStackInterpreter, "should not call this"); - Unimplemented(); - }
--- a/ports/hotspot/src/cpu/zero/vm/javaFrameAnchor_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* - * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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. - * - */ - -public: - // Each arch must define reset, save, restore - // These are used by objects that only care about: - // 1 - initializing a new state (thread creation, javaCalls) - // 2 - saving a current state (javaCalls) - // 3 - restoring an old state (javaCalls) - - void clear() - { - // clearing _last_Java_sp must be first - _last_Java_sp = NULL; - // fence? - _last_Java_pc = NULL; - } - - void copy(JavaFrameAnchor* src) - { - // In order to make sure the transition state is valid for "this" - // We must clear _last_Java_sp before copying the rest of the new - // data - // - // Hack Alert: Temporary bugfix for 4717480/4721647 To act like - // previous version (pd_cache_state) don't NULL _last_Java_sp - // unless the value is changing - // - if (_last_Java_sp != src->_last_Java_sp) - _last_Java_sp = NULL; - - _last_Java_pc = src->_last_Java_pc; - // Must be last so profiler will always see valid frame if - // has_last_frame() is true - _last_Java_sp = src->_last_Java_sp; - } - - bool walkable() - { - return true; - } - - void make_walkable(JavaThread* thread) - { - // nothing to do - } - - intptr_t* last_Java_sp() const - { - return _last_Java_sp; - } - - void set_last_Java_sp(intptr_t* sp) - { - _last_Java_sp = sp; - }
--- a/ports/hotspot/src/cpu/zero/vm/jniFastGetField_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* - * Copyright 2004-2006 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. - * - */ - -#include "incls/_precompiled.incl" -#include "incls/_jniFastGetField_zero.cpp.incl" - -address JNI_FastGetField::generate_fast_get_boolean_field() -{ - return (address) -1; -} - -address JNI_FastGetField::generate_fast_get_byte_field() -{ - return (address) -1; -} - -address JNI_FastGetField::generate_fast_get_char_field() -{ - return (address) -1; -} - -address JNI_FastGetField::generate_fast_get_short_field() -{ - return (address) -1; -} - -address JNI_FastGetField::generate_fast_get_int_field() -{ - return (address) -1; -} - -address JNI_FastGetField::generate_fast_get_long_field() -{ - return (address) -1; -} - -address JNI_FastGetField::generate_fast_get_float_field() -{ - return (address) -1; -} - -address JNI_FastGetField::generate_fast_get_double_field() -{ - return (address) -1; -}
--- a/ports/hotspot/src/cpu/zero/vm/jniTypes_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* - * Copyright 1998-2002 Sun Microsystems, Inc. All Rights Reserved. - * 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. - * - */ - -// This file holds platform-dependent routines used to write primitive jni -// types to the array of arguments passed into JavaCalls::call - -class JNITypes : AllStatic { - // These functions write a java primitive type (in native format) - // to a java stack slot array to be passed as an argument to JavaCalls:calls. - // I.e., they are functionally 'push' operations if they have a 'pos' - // formal parameter. Note that jlong's and jdouble's are written - // _in reverse_ of the order in which they appear in the interpreter - // stack. This is because call stubs (see stubGenerator_zero.cpp) - // reverse the argument list constructed by JavaCallArguments (see - // javaCalls.hpp). - -private: - // Helper routines. - static inline void put_int2 (jint *from, jint *to) { to[0] = from[0]; to[1] = from[1]; } - static inline void put_int2 (jint *from, jint *to, int& pos) { put_int2 (from, (jint *)((intptr_t *)to + pos)); pos += 2; } - static inline void put_int2r(jint *from, jint *to) { to[0] = from[1]; to[1] = from[0]; } - static inline void put_int2r(jint *from, jint *to, int& pos) { put_int2r(from, (jint *)((intptr_t *)to + pos)); pos += 2; } - -public: - // Ints are stored in native format in one JavaCallArgument slot at *to. - static inline void put_int(jint from, intptr_t *to) { *(jint *)(to + 0 ) = from; } - static inline void put_int(jint from, intptr_t *to, int& pos) { *(jint *)(to + pos++) = from; } - static inline void put_int(jint *from, intptr_t *to, int& pos) { *(jint *)(to + pos++) = *from; } - -#ifdef _LP64 - // Longs are stored in native format in one JavaCallArgument slot at *(to+1). - static inline void put_long(jlong from, intptr_t *to) { *(jlong *)(to + 1 + 0) = from; } - static inline void put_long(jlong from, intptr_t *to, int& pos) { *(jlong *)(to + 1 + pos) = from; pos += 2; } - static inline void put_long(jlong *from, intptr_t *to, int& pos) { *(jlong *)(to + 1 + pos) = *from; pos += 2; } -#else - // Longs are stored in reversed native word format in two JavaCallArgument slots at *to. - // The high half is in *(to+1) and the low half in *to. - static inline void put_long(jlong from, intptr_t *to) { put_int2r((jint *)&from, (jint *)to); } - static inline void put_long(jlong from, intptr_t *to, int& pos) { put_int2r((jint *)&from, (jint *)to, pos); } - static inline void put_long(jlong *from, intptr_t *to, int& pos) { put_int2r((jint *) from, (jint *)to, pos); } -#endif - - // Oops are stored in native format in one JavaCallArgument slot at *to. - static inline void put_obj(oop from, intptr_t *to) { *(oop *)(to + 0 ) = from; } - static inline void put_obj(oop from, intptr_t *to, int& pos) { *(oop *)(to + pos++) = from; } - static inline void put_obj(oop *from, intptr_t *to, int& pos) { *(oop *)(to + pos++) = *from; } - - // Floats are stored in native format in one JavaCallArgument slot at *to. - static inline void put_float(jfloat from, intptr_t *to) { *(jfloat *)(to + 0 ) = from; } - static inline void put_float(jfloat from, intptr_t *to, int& pos) { *(jfloat *)(to + pos++) = from; } - static inline void put_float(jfloat *from, intptr_t *to, int& pos) { *(jfloat *)(to + pos++) = *from; } - -#ifdef _LP64 - // Doubles are stored in native word format in one JavaCallArgument slot at *(to+1). - static inline void put_double(jdouble from, intptr_t *to) { *(jdouble *)(to + 1 + 0) = from; } - static inline void put_double(jdouble from, intptr_t *to, int& pos) { *(jdouble *)(to + 1 + pos) = from; pos += 2; } - static inline void put_double(jdouble *from, intptr_t *to, int& pos) { *(jdouble *)(to + 1 + pos) = *from; pos += 2; } -#else - // Doubles are stored in reversed native word format in two JavaCallArgument slots at *to. - static inline void put_double(jdouble from, intptr_t *to) { put_int2r((jint *)&from, (jint *)to); } - static inline void put_double(jdouble from, intptr_t *to, int& pos) { put_int2r((jint *)&from, (jint *)to, pos); } - static inline void put_double(jdouble *from, intptr_t *to, int& pos) { put_int2r((jint *) from, (jint *)to, pos); } -#endif - - // The get_xxx routines, on the other hand, actually _do_ fetch - // java primitive types from the interpreter stack. - static inline jint get_int(intptr_t *from) { return *(jint *)from; } - -#ifdef _LP64 - static inline jlong get_long(intptr_t *from) { return *(jlong *)from; } -#else - static inline jlong get_long(intptr_t *from) { return ((jlong)(*( signed int *)((jint *)from )) << 32) | - ((jlong)(*(unsigned int *)((jint *)from + 1)) << 0); } -#endif - - static inline oop get_obj(intptr_t *from) { return *(oop *)from; } - static inline jfloat get_float(intptr_t *from) { return *(jfloat *)from; } - -#ifdef _LP64 - static inline jdouble get_double(intptr_t *from) { return *(jdouble *)from; } -#else - static inline jdouble get_double(intptr_t *from) { jlong jl = ((jlong)(*( signed int *)((jint *)from )) << 32) | - ((jlong)(*(unsigned int *)((jint *)from + 1)) << 0); - return *(jdouble *)&jl; } -#endif - -};
--- a/ports/hotspot/src/cpu/zero/vm/jni_zero.h Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* - * Copyright 1997-2004 Sun Microsystems, Inc. All Rights Reserved. - * 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. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * 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. - */ - -#define JNIEXPORT -#define JNIIMPORT -#define JNICALL - -typedef int jint; -typedef signed char jbyte; - -#ifdef _LP64 -typedef long jlong; -#else -typedef long long jlong; -#endif
--- a/ports/hotspot/src/cpu/zero/vm/methodHandles_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* - * 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"
--- a/ports/hotspot/src/cpu/zero/vm/nativeInst_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008 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/_nativeInst_zero.cpp.incl" - -// This method is called by nmethod::make_not_entrant_or_zombie to -// insert a jump to SharedRuntime::get_handle_wrong_method_stub() -// (dest) at the start of a compiled method (verified_entry) to avoid -// a race where a method is invoked while being made non-entrant. -// -// In Shark, verified_entry is a pointer to a SharkEntry. We can -// handle this simply by changing it's entry point to point at the -// interpreter. This only works because the interpreter and Shark -// calling conventions are the same. - -void NativeJump::patch_verified_entry(address entry, - address verified_entry, - address dest) -{ - assert(dest == SharedRuntime::get_handle_wrong_method_stub(), "should be"); - -#ifdef CC_INTERP - ((ZeroEntry*) verified_entry)->set_entry_point(CppInterpreter::normal_entry); -#else - Unimplemented(); -#endif // CC_INTERP -}
--- a/ports/hotspot/src/cpu/zero/vm/nativeInst_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,220 +0,0 @@ -/* - * Copyright 2003-2006 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. - * - */ - -// We have interfaces for the following instructions: -// - NativeInstruction -// - - NativeCall -// - - NativeMovConstReg -// - - NativeMovConstRegPatching -// - - NativeJump -// - - NativeIllegalOpCode -// - - NativeReturn -// - - NativeReturnX (return with argument) -// - - NativePushConst -// - - NativeTstRegMem - -// The base class for different kinds of native instruction abstractions. -// Provides the primitive operations to manipulate code relative to this. - -class NativeInstruction VALUE_OBJ_CLASS_SPEC -{ - public: - bool is_jump() - { - Unimplemented(); - } - - bool is_safepoint_poll() - { - Unimplemented(); - } -}; - -inline NativeInstruction* nativeInstruction_at(address address) -{ - Unimplemented(); -} - -class NativeCall : public NativeInstruction -{ - public: - enum zero_specific_constants { - instruction_size = 0 // not used within the interpreter - }; - - address instruction_address() const - { - Unimplemented(); - } - - address next_instruction_address() const - { - Unimplemented(); - } - - address return_address() const - { - Unimplemented(); - } - - address destination() const - { - Unimplemented(); - } - - void set_destination_mt_safe(address dest) - { - Unimplemented(); - } - - void verify_alignment() - { - Unimplemented(); - } - - void verify() - { - Unimplemented(); - } - - static bool is_call_before(address return_address) - { - Unimplemented(); - } -}; - -inline NativeCall* nativeCall_before(address return_address) -{ - Unimplemented(); -} - -inline NativeCall* nativeCall_at(address address) -{ - Unimplemented(); -} - -class NativeMovConstReg : public NativeInstruction -{ - public: - address next_instruction_address() const - { - Unimplemented(); - } - - intptr_t data() const - { - Unimplemented(); - } - - void set_data(intptr_t x) - { - Unimplemented(); - } -}; - -inline NativeMovConstReg* nativeMovConstReg_at(address address) -{ - Unimplemented(); -} - -class NativeMovRegMem : public NativeInstruction -{ - public: - int offset() const - { - Unimplemented(); - } - - void set_offset(intptr_t x) - { - Unimplemented(); - } - - void add_offset_in_bytes(int add_offset) - { - Unimplemented(); - } -}; - -inline NativeMovRegMem* nativeMovRegMem_at(address address) -{ - Unimplemented(); -} - -class NativeJump : public NativeInstruction -{ - public: - enum zero_specific_constants { - instruction_size = 0 // not used within the interpreter - }; - - address jump_destination() const - { - Unimplemented(); - } - - void set_jump_destination(address dest) - { - Unimplemented(); - } - - static void check_verified_entry_alignment(address entry, - address verified_entry) - { - } - - static void patch_verified_entry(address entry, - address verified_entry, - address dest); -}; - -inline NativeJump* nativeJump_at(address address) -{ - Unimplemented(); -} - -class NativeGeneralJump : public NativeInstruction -{ - public: - address jump_destination() const - { - Unimplemented(); - } - - static void insert_unconditional(address code_pos, address entry) - { - Unimplemented(); - } - - static void replace_mt_safe(address instr_addr, address code_buffer) - { - Unimplemented(); - } -}; - -inline NativeGeneralJump* nativeGeneralJump_at(address address) -{ - Unimplemented(); -}
--- a/ports/hotspot/src/cpu/zero/vm/registerMap_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * Copyright 1998-2007 Sun Microsystems, Inc. All Rights Reserved. - * 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. - * - */ - - // machine-dependent implemention for register maps - friend class frame; - - private: - // This is the hook for finding a register in an "well-known" location, - // such as a register block of a predetermined format. - // Since there is none, we just return NULL. - // See registerMap_sparc.hpp for an example of grabbing registers - // from register save areas of a standard layout. - address pd_location(VMReg reg) const {return NULL;} - - // no PD state to clear or copy: - void pd_clear() {} - void pd_initialize() {} - void pd_initialize_from(const RegisterMap* map) {}
--- a/ports/hotspot/src/cpu/zero/vm/register_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * Copyright 2000-2007 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. - * - */ - -#include "incls/_precompiled.incl" -#include "incls/_register_zero.cpp.incl" - -const int ConcreteRegisterImpl::max_gpr = RegisterImpl::number_of_registers; -const int ConcreteRegisterImpl::max_fpr = - ConcreteRegisterImpl::max_gpr + FloatRegisterImpl::number_of_registers; - -const char* RegisterImpl::name() const { - Unimplemented(); -} - -const char* FloatRegisterImpl::name() const { - Unimplemented(); -}
--- a/ports/hotspot/src/cpu/zero/vm/register_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -/* - * Copyright 2000-2007 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. - * - */ - -class VMRegImpl; -typedef VMRegImpl* VMReg; - -// Use Register as shortcut -class RegisterImpl; -typedef RegisterImpl* Register; - -inline Register as_Register(int encoding) { - return (Register)(intptr_t) encoding; -} - -// The implementation of integer registers for the zero architecture -class RegisterImpl : public AbstractRegisterImpl { - public: - enum { - number_of_registers = 0 - }; - - // construction - inline friend Register as_Register(int encoding); - VMReg as_VMReg(); - - // derived registers, offsets, and addresses - Register successor() const - { - return as_Register(encoding() + 1); - } - - // accessors - int encoding() const - { - assert(is_valid(), "invalid register"); - return (intptr_t)this; - } - bool is_valid() const - { - return 0 <= (intptr_t) this && (intptr_t)this < number_of_registers; - } - const char* name() const; -}; - -// Use FloatRegister as shortcut -class FloatRegisterImpl; -typedef FloatRegisterImpl* FloatRegister; - -inline FloatRegister as_FloatRegister(int encoding) { - return (FloatRegister)(intptr_t) encoding; -} - -// The implementation of floating point registers for the zero architecture -class FloatRegisterImpl : public AbstractRegisterImpl { - public: - enum { - number_of_registers = 0 - }; - - // construction - inline friend FloatRegister as_FloatRegister(int encoding); - VMReg as_VMReg(); - - // derived registers, offsets, and addresses - FloatRegister successor() const - { - return as_FloatRegister(encoding() + 1); - } - - // accessors - int encoding() const - { - assert(is_valid(), "invalid register"); - return (intptr_t)this; - } - bool is_valid() const - { - return 0 <= (intptr_t) this && (intptr_t)this < number_of_registers; - } - const char* name() const; -}; - -class ConcreteRegisterImpl : public AbstractRegisterImpl { - public: - enum { - number_of_registers = RegisterImpl::number_of_registers + - FloatRegisterImpl::number_of_registers - }; - - static const int max_gpr; - static const int max_fpr; -}; - -CONSTANT_REGISTER_DECLARATION(Register, noreg, (-1));
--- a/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -/* - * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 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/_relocInfo_zero.cpp.incl" - -void Relocation::pd_set_data_value(address x, intptr_t o) -{ - Unimplemented(); -} - -address Relocation::pd_call_destination(address orig_addr) -{ - Unimplemented(); -} - -void Relocation::pd_set_call_destination(address x) -{ - Unimplemented(); -} - -address Relocation::pd_get_address_from_code() -{ - Unimplemented(); -} - -address* Relocation::pd_address_in_code() -{ - // Relocations in Shark are just stored directly - return (address *) addr(); -} - -int Relocation::pd_breakpoint_size() -{ - Unimplemented(); -} - -void Relocation::pd_swap_in_breakpoint(address x, short* instrs, - int instrlen) -{ - Unimplemented(); -} - -void Relocation::pd_swap_out_breakpoint(address x, short* instrs, int instrlen) -{ - Unimplemented(); -} - -void poll_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer *dest) { - Unimplemented(); -} - -void poll_return_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) { - Unimplemented(); -}
--- a/ports/hotspot/src/cpu/zero/vm/relocInfo_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* - * Copyright 2003-2005 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. - * - */ - - // machine-dependent parts of class relocInfo - private: - enum - { - // these constants mean nothing without an assembler - offset_unit = 1, - format_width = 1 - };
--- a/ports/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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/_sharedRuntime_zero.cpp.incl" - -DeoptimizationBlob *SharedRuntime::_deopt_blob; -SafepointBlob *SharedRuntime::_polling_page_safepoint_handler_blob; -SafepointBlob *SharedRuntime::_polling_page_return_handler_blob; -RuntimeStub *SharedRuntime::_wrong_method_blob; -RuntimeStub *SharedRuntime::_ic_miss_blob; -RuntimeStub *SharedRuntime::_resolve_opt_virtual_call_blob; -RuntimeStub *SharedRuntime::_resolve_virtual_call_blob; -RuntimeStub *SharedRuntime::_resolve_static_call_blob; - -int SharedRuntime::java_calling_convention(const BasicType *sig_bt, - VMRegPair *regs, - int total_args_passed, - int is_outgoing) -{ - return 0; -} - -AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters( - MacroAssembler *masm, - int total_args_passed, - int comp_args_on_stack, - const BasicType *sig_bt, - const VMRegPair *regs) -{ - address i2c_entry = UnimplementedStub(); - address c2i_entry = UnimplementedStub(); - address c2i_unverified_entry = UnimplementedStub(); - return new AdapterHandlerEntry(i2c_entry, c2i_entry, c2i_unverified_entry); -} - -nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm, - methodHandle method, - int total_in_args, - int comp_args_on_stack, - BasicType *in_sig_bt, - VMRegPair *in_regs, - BasicType ret_type) -{ - Unimplemented(); -} - -int Deoptimization::last_frame_adjust(int callee_parameters, int callee_locals) -{ - return 0; -} - -uint SharedRuntime::out_preserve_stack_slots() -{ - Unimplemented(); -} - -static RuntimeStub* generate_empty_runtime_stub(const char* name) -{ - CodeBuffer buffer(name, 0, 0); - return RuntimeStub::new_runtime_stub(name, &buffer, 0, 0, NULL, false); -} - -static SafepointBlob* generate_empty_safepoint_blob() -{ - CodeBuffer buffer("handler_blob", 0, 0); - return SafepointBlob::create(&buffer, NULL, 0); -} - -void SharedRuntime::generate_stubs() -{ - _wrong_method_blob = - generate_empty_runtime_stub("wrong_method_stub"); - _ic_miss_blob = - generate_empty_runtime_stub("ic_miss_stub"); - _resolve_opt_virtual_call_blob = - generate_empty_runtime_stub("resolve_opt_virtual_call"); - _resolve_virtual_call_blob = - generate_empty_runtime_stub("resolve_virtual_call"); - _resolve_static_call_blob = - generate_empty_runtime_stub("resolve_static_call"); - - _polling_page_safepoint_handler_blob = - generate_empty_safepoint_blob(); - _polling_page_return_handler_blob = - generate_empty_safepoint_blob(); -} - -int SharedRuntime::c_calling_convention(const BasicType *sig_bt, - VMRegPair *regs, - int total_args_passed) -{ - Unimplemented(); -}
--- a/ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ b/ports/hotspot/src/cpu/zero/vm/shark_globals_zero.hpp Sun Jul 26 05:45:29 2009 +0100 @@ -61,6 +61,3 @@ define_pd_global(bool, NeverActAsServerClassMachine, true ); define_pd_global(uintx, DefaultMaxRAM, 1*G ); define_pd_global(bool, CICompileOSR, true ); - -/* Required for Shark on OpenJDK7 */ -define_pd_global(intx, InlineSmallCode, 1000);
--- a/ports/hotspot/src/cpu/zero/vm/stackPrinter_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,293 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008, 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 <interpreterRuntime.hpp> -#include <scopeDesc.hpp> - -class ZeroStackPrinter { - private: - outputStream* _st; - char* _buf; - int _buflen; - - public: - ZeroStackPrinter(outputStream *st, char *buf, int buflen) - : _st(st), _buf(buf), _buflen(buflen) {} - - void print(JavaThread *thread) - { - intptr_t *lo_addr = thread->zero_stack()->sp(); - if (!lo_addr) { - _st->print_cr(" stack not set up"); - return; - } - - intptr_t *hi_addr = (intptr_t *) thread->top_zero_frame(); - if (!hi_addr) { - _st->print_cr("no frames pushed"); - return; - } - assert(hi_addr >= lo_addr, "corrupted stack"); - - bool top_frame = true; - while (hi_addr) { - if (!top_frame) - _st->cr(); - ZeroFrame *frame = (ZeroFrame *) hi_addr; - for (intptr_t *addr = lo_addr; addr <= hi_addr; addr++) - print_word(frame, addr, top_frame); - lo_addr = hi_addr + 1; - hi_addr = *(intptr_t **) hi_addr; - top_frame = false; - } - } - - private: - void print_word(ZeroFrame *frame, intptr_t *addr, bool top_frame) - { - const char *field = NULL; - const char *value = NULL; - - int word = (intptr_t *) frame - addr; - switch (word) { - case ZeroFrame::next_frame_off: - field = "next_frame"; - break; - case ZeroFrame::frame_type_off: - field = "frame_type"; - switch (*addr) { - case ZeroFrame::ENTRY_FRAME: - value = "ENTRY_FRAME"; - break; - case ZeroFrame::INTERPRETER_FRAME: - value = "INTERPRETER_FRAME"; - break; - case ZeroFrame::SHARK_FRAME: - value = "SHARK_FRAME"; - break; - case ZeroFrame::DEOPTIMIZER_FRAME: - value = "DEOPTIMIZER_FRAME"; - break; - } - break; - } - - if (!field) { - if (frame->is_entry_frame()) { - if (word == EntryFrame::call_wrapper_off) { - field = "call_wrapper"; - } - else { - snprintf(_buf, _buflen, "local[%d]", word - 3); - field = _buf; - } - } - if (frame->is_interpreter_frame()) { - interpreterState istate = - ((InterpreterFrame *) frame)->interpreter_state(); - bool is_valid = istate->self_link() == istate; - - if (addr >= (intptr_t *) istate) { - field = istate->name_of_field_at_address((address) addr); - if (field) { - if (is_valid && !strcmp(field, "_method")) { - value = istate->method()->name_and_sig_as_C_string(_buf,_buflen); - field = "istate->_method"; - } - else if (is_valid && !strcmp(field, "_bcp") && istate->bcp()) { - snprintf(_buf, _buflen, "%p (bci %d)", istate->bcp(), - istate->method()->bci_from(istate->bcp())); - value = _buf; - field = "istate->_bcp"; - } - else { - snprintf(_buf, _buflen, "%sistate->%s", - field[strlen(field) - 1] == ')' ? "(": "", field); - field = _buf; - } - } - else if (addr == (intptr_t *) istate) { - field = "(vtable for istate)"; - } - } - else if (is_valid) { - intptr_t *monitor_base = (intptr_t *) istate->monitor_base(); - if (addr >= istate->stack_base() && addr < monitor_base) { - int monitor_size = frame::interpreter_frame_monitor_size(); - int last_index = - (monitor_base - istate->stack_base()) / monitor_size - 1; - int index = - last_index - (addr - istate->stack_base()) / monitor_size; - intptr_t monitor = (intptr_t) (istate->monitor_base() - 1 - index); - intptr_t offset = (intptr_t) addr - monitor; - - if (offset == BasicObjectLock::obj_offset_in_bytes()) { - snprintf(_buf, _buflen, "monitor[%d]->_obj", index); - field = _buf; - } - else if (offset == BasicObjectLock::lock_offset_in_bytes()) { - snprintf(_buf, _buflen, "monitor[%d]->_lock", index); - field = _buf; - } - } - else if (addr < istate->stack_base()) { - if (istate->method()->is_native()) { - address hA = istate->method()->signature_handler(); - if (hA != NULL) { - if (hA != (address)InterpreterRuntime::slow_signature_handler){ - InterpreterRuntime::SignatureHandler *handler = - InterpreterRuntime::SignatureHandler::from_handlerAddr(hA); - - intptr_t *params = - istate->stack_base() - handler->argument_count(); - - if (addr >= params) { - int param = addr - params; - const char *desc = ""; - if (param == 0) - desc = " (JNIEnv)"; - else if (param == 1) { - if (istate->method()->is_static()) - desc = " (mirror)"; - else - desc = " (this)"; - } - snprintf(_buf, _buflen, "parameter[%d]%s", param, desc); - field = _buf; - } - else { - for (int i = 0; i < handler->argument_count(); i++) { - if (params[i] == (intptr_t) addr) { - snprintf(_buf, _buflen, "unboxed parameter[%d]", i); - field = _buf; - break; - } - } - } - } - } - } - else { - snprintf(_buf, _buflen, "%s[" INTPTR_FORMAT "]", - top_frame ? "stack_word" : "local", - istate->stack_base() - addr - 1); - field = _buf; - } - } - } - } - if (frame->is_shark_frame()) { - SharkFrame *sf = frame->as_shark_frame(); - methodOop method = sf->method(); - - if (word == SharkFrame::pc_off) { - field = "pc"; - if (method->is_oop()) { - nmethod *code = method->code(); - address pc = sf->pc(); - if (code->pc_desc_at(pc)) { - SimpleScopeDesc ssd(code, pc); - snprintf(_buf, _buflen, "%p (bci %d)", pc, ssd.bci()); - value = _buf; - } - } - } - else if (word == SharkFrame::unextended_sp_off) { - field = "unextended_sp"; - } - else if (word == SharkFrame::method_off) { - field = "method"; - if (method->is_oop()) - value = method->name_and_sig_as_C_string(_buf, _buflen); - } - else if (word == SharkFrame::oop_tmp_off) { - field = "oop_tmp"; - } - else { - SharkFrame *sf = (SharkFrame *) frame; - intptr_t *monitor_base = - (intptr_t *) frame - SharkFrame::header_words + 1; - intptr_t *stack_base = - sf->unextended_sp() + sf->method()->max_stack(); - - if (addr >= stack_base && addr < monitor_base) { - int monitor_size = frame::interpreter_frame_monitor_size(); - int last_index = (monitor_base - stack_base) / monitor_size - 1; - int index = last_index - (addr - stack_base) / monitor_size; - intptr_t monitor = - (intptr_t) ((BasicObjectLock *) monitor_base - 1 - index); - intptr_t offset = (intptr_t) addr - monitor; - - if (offset == BasicObjectLock::obj_offset_in_bytes()) { - snprintf(_buf, _buflen, "monitor[%d]->_obj", index); - field = _buf; - } - else if (offset == BasicObjectLock::lock_offset_in_bytes()) { - snprintf(_buf, _buflen, "monitor[%d]->_lock", index); - field = _buf; - } - } - else { - snprintf(_buf, _buflen, "%s[" INTPTR_FORMAT "]", - top_frame ? "stack_word" : "local", - stack_base - addr - 1); - field = _buf; - } - } - } - } - - if (!field) { - snprintf(_buf, _buflen, "word[%d]", word); - field = _buf; - } - _st->print(" %p: %-21s = ", addr, field); - if (value) - _st->print_cr("%s", value); - else - _st->print_cr(PTR_FORMAT, *addr); - } -}; - -#ifndef PRODUCT -extern "C" { - void print_zero_threads() { - char buf[O_BUFLEN]; - ZeroStackPrinter zsp(tty, buf, sizeof(buf)); - - for (JavaThread *t = Threads::first(); t; t = t->next()) { - tty->print(PTR_FORMAT, t); - tty->print(" "); - t->print_on_error(tty, buf, sizeof(buf)); - tty->cr(); - tty->cr(); - - zsp.print(t); - if (t->next()) - tty->cr(); - } - } -} -#endif // !PRODUCT
--- a/ports/hotspot/src/cpu/zero/vm/stack_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,219 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008, 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. - * - */ - -class ZeroStack { - private: - intptr_t *_base; // the last available word - intptr_t *_top; // the word past the end of the stack - intptr_t *_sp; // the top word on the stack - - public: - ZeroStack() - : _base(NULL), _top(NULL), _sp(NULL) {} - - bool needs_setup() const - { - return _base == NULL; - } - - void setup(void *mem, size_t size) - { - assert(needs_setup(), "already set up"); - assert(!(size & WordAlignmentMask), "unaligned"); - - _base = (intptr_t *) mem; - _top = _base + (size >> LogBytesPerWord); - _sp = _top; - } - - void teardown() - { - assert(!needs_setup(), "not set up"); - assert(_sp == _top, "stuff on stack at teardown"); - - _base = NULL; - _top = NULL; - _sp = NULL; - } - - intptr_t *sp() const - { - return _sp; - } - - void set_sp(intptr_t *new_sp) - { - assert(_top >= new_sp && new_sp >= _base, "bad stack pointer"); - _sp = new_sp; - } - - int available_words() const - { - return _sp - _base; - } - - void push(intptr_t value) - { - assert(_sp > _base, "stack overflow"); - *(--_sp) = value; - } - - intptr_t pop() - { - assert(_sp < _top, "stack underflow"); - return *(_sp++); - } - - void *alloc(size_t size) - { - int count = align_size_up(size, wordSize) >> LogBytesPerWord; - assert(count <= available_words(), "stack overflow"); - return _sp -= count; - } - - public: - static ByteSize base_offset() - { - return byte_offset_of(ZeroStack, _base); - } - - static ByteSize top_offset() - { - return byte_offset_of(ZeroStack, _top); - } - - static ByteSize sp_offset() - { - return byte_offset_of(ZeroStack, _sp); - } -}; - - -class EntryFrame; -class InterpreterFrame; -class SharkFrame; -class DeoptimizerFrame; - -// -// | ... | -// +--------------------+ ------------------ -// | ... | low addresses -// | frame_type | -// | next_frame | high addresses -// +--------------------+ ------------------ -// | ... | - -class ZeroFrame { - friend class frame; - friend class ZeroStackPrinter; - - protected: - ZeroFrame() - { - ShouldNotCallThis(); - } - - enum Layout { - next_frame_off, - frame_type_off, - jf_header_words - }; - - enum FrameType { - ENTRY_FRAME = 0xCAFEBABE, - INTERPRETER_FRAME, - SHARK_FRAME, - DEOPTIMIZER_FRAME - }; - - protected: - intptr_t *addr_of_word(int offset) const - { - return (intptr_t *) this - offset; - } - - intptr_t value_of_word(int offset) const - { - return *addr_of_word(offset); - } - - public: - ZeroFrame *next() const - { - return (ZeroFrame *) value_of_word(next_frame_off); - } - - protected: - FrameType type() const - { - return (FrameType) value_of_word(frame_type_off); - } - - public: - bool is_entry_frame() const - { - return type() == ENTRY_FRAME; - } - - bool is_interpreter_frame() const - { - return type() == INTERPRETER_FRAME; - } - - bool is_shark_frame() const - { - return type() == SHARK_FRAME; - } - - bool is_deoptimizer_frame() const - { - return type() == DEOPTIMIZER_FRAME; - } - - public: - EntryFrame *as_entry_frame() const - { - assert(is_entry_frame(), "should be"); - return (EntryFrame *) this; - } - - InterpreterFrame *as_interpreter_frame() const - { - assert(is_interpreter_frame(), "should be"); - return (InterpreterFrame *) this; - } - - SharkFrame *as_shark_frame() const - { - assert(is_shark_frame(), "should be"); - return (SharkFrame *) this; - } - - DeoptimizerFrame *as_deoptimizer_frame() const - { - assert(is_deoptimizer_frame(), "should be"); - return (DeoptimizerFrame *) this; - } -};
--- a/ports/hotspot/src/cpu/zero/vm/stubGenerator_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,260 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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/_stubGenerator_zero.cpp.incl" - -// Declaration and definition of StubGenerator (no .hpp file). -// For a more detailed description of the stub routine structure -// see the comment in stubRoutines.hpp - -class StubGenerator: public StubCodeGenerator -{ - private: - // The call stub is used to call Java from C - static void call_stub( - JavaCallWrapper *call_wrapper, - intptr_t* result, - BasicType result_type, - methodOop method, - address entry_point, - intptr_t* parameters, - int parameter_words, - TRAPS) - { - JavaThread *thread = (JavaThread *) THREAD; - ZeroStack *stack = thread->zero_stack(); - - // Make sure we have no pending exceptions - assert(!HAS_PENDING_EXCEPTION, "call_stub called with pending exception"); - - // Set up the stack if necessary - bool stack_needs_teardown = false; - if (stack->needs_setup()) { - size_t stack_used = thread->stack_base() - (address) &stack_used; - size_t stack_free = thread->stack_size() - stack_used; - size_t zero_stack_size = align_size_down(stack_free / 2, wordSize); - - stack->setup(alloca(zero_stack_size), zero_stack_size); - stack_needs_teardown = true; - } - - // Allocate and initialize our frame - thread->push_zero_frame( - EntryFrame::build(stack, parameters, parameter_words, call_wrapper)); - - // Make the call - Interpreter::invoke_method(method, entry_point, THREAD); - - // Store result depending on type - if (!HAS_PENDING_EXCEPTION) { - switch (result_type) { - case T_INT: - *(jint *) result = *(jint *) stack->sp(); - break; - case T_LONG: - *(jlong *) result = *(jlong *) stack->sp(); - break; - case T_FLOAT: - *(jfloat *) result = *(jfloat *) stack->sp(); - break; - case T_DOUBLE: - *(jdouble *) result = *(jdouble *) stack->sp(); - break; - case T_OBJECT: - *(oop *) result = *(oop *) stack->sp(); - break; - default: - ShouldNotReachHere(); - } - } - - // Unwind our frame - thread->pop_zero_frame(); - - // Tear down the stack if necessary - if (stack_needs_teardown) - stack->teardown(); - } - - // These stubs get called from some dumb test routine. - // I'll write them properly when they're called from - // something that's actually doing something. - static void fake_arraycopy_stub(address src, address dst, int count) - { - assert(count == 0, "huh?"); - } - - void generate_arraycopy_stubs() - { - // Call the conjoint generation methods immediately after - // the disjoint ones so that short branches from the former - // to the latter can be generated. - StubRoutines::_jbyte_disjoint_arraycopy = (address) fake_arraycopy_stub; - StubRoutines::_jbyte_arraycopy = (address) fake_arraycopy_stub; - - StubRoutines::_jshort_disjoint_arraycopy = (address) fake_arraycopy_stub; - StubRoutines::_jshort_arraycopy = (address) fake_arraycopy_stub; - - StubRoutines::_jint_disjoint_arraycopy = (address) fake_arraycopy_stub; - StubRoutines::_jint_arraycopy = (address) fake_arraycopy_stub; - - StubRoutines::_jlong_disjoint_arraycopy = (address) fake_arraycopy_stub; - StubRoutines::_jlong_arraycopy = (address) fake_arraycopy_stub; - - StubRoutines::_oop_disjoint_arraycopy = UnimplementedStub(); - StubRoutines::_oop_arraycopy = UnimplementedStub(); - - StubRoutines::_checkcast_arraycopy = UnimplementedStub(); - StubRoutines::_unsafe_arraycopy = UnimplementedStub(); - StubRoutines::_generic_arraycopy = UnimplementedStub(); - - // We don't generate specialized code for HeapWord-aligned source - // arrays, so just use the code we've already generated - StubRoutines::_arrayof_jbyte_disjoint_arraycopy = - StubRoutines::_jbyte_disjoint_arraycopy; - StubRoutines::_arrayof_jbyte_arraycopy = - StubRoutines::_jbyte_arraycopy; - - StubRoutines::_arrayof_jshort_disjoint_arraycopy = - StubRoutines::_jshort_disjoint_arraycopy; - StubRoutines::_arrayof_jshort_arraycopy = - StubRoutines::_jshort_arraycopy; - - StubRoutines::_arrayof_jint_disjoint_arraycopy = - StubRoutines::_jint_disjoint_arraycopy; - StubRoutines::_arrayof_jint_arraycopy = - StubRoutines::_jint_arraycopy; - - StubRoutines::_arrayof_jlong_disjoint_arraycopy = - StubRoutines::_jlong_disjoint_arraycopy; - StubRoutines::_arrayof_jlong_arraycopy = - StubRoutines::_jlong_arraycopy; - - StubRoutines::_arrayof_oop_disjoint_arraycopy = - StubRoutines::_oop_disjoint_arraycopy; - StubRoutines::_arrayof_oop_arraycopy = - StubRoutines::_oop_arraycopy; - } - - void generate_initial() - { - // Generates all stubs and initializes the entry points - - // entry points that exist in all platforms Note: This is code - // that could be shared among different platforms - however the - // benefit seems to be smaller than the disadvantage of having a - // much more complicated generator structure. See also comment in - // stubRoutines.hpp. - - StubRoutines::_forward_exception_entry = UnimplementedStub(); - StubRoutines::_call_stub_entry = (address) call_stub; - StubRoutines::_catch_exception_entry = UnimplementedStub(); - - // atomic calls - StubRoutines::_atomic_xchg_entry = UnimplementedStub(); - StubRoutines::_atomic_xchg_ptr_entry = UnimplementedStub(); - StubRoutines::_atomic_cmpxchg_entry = UnimplementedStub(); - StubRoutines::_atomic_cmpxchg_ptr_entry = UnimplementedStub(); - StubRoutines::_atomic_cmpxchg_long_entry = UnimplementedStub(); - StubRoutines::_atomic_add_entry = UnimplementedStub(); - StubRoutines::_atomic_add_ptr_entry = UnimplementedStub(); - StubRoutines::_fence_entry = UnimplementedStub(); - - // amd64 does this here, sparc does it in generate_all() - StubRoutines::_handler_for_unsafe_access_entry = - UnimplementedStub(); - } - - void generate_all() - { - // Generates all stubs and initializes the entry points - - // These entry points require SharedInfo::stack0 to be set up in - // non-core builds and need to be relocatable, so they each - // fabricate a RuntimeStub internally. - StubRoutines::_throw_AbstractMethodError_entry = - UnimplementedStub(); - - StubRoutines::_throw_ArithmeticException_entry = - UnimplementedStub(); - - StubRoutines::_throw_NullPointerException_entry = - UnimplementedStub(); - - StubRoutines::_throw_NullPointerException_at_call_entry = - UnimplementedStub(); - - StubRoutines::_throw_StackOverflowError_entry = - UnimplementedStub(); - - // support for verify_oop (must happen after universe_init) - StubRoutines::_verify_oop_subroutine_entry = - UnimplementedStub(); - - // arraycopy stubs used by compilers - generate_arraycopy_stubs(); - } - - public: - StubGenerator(CodeBuffer* code, bool all) : StubCodeGenerator(code) - { - if (all) { - generate_all(); - } else { - generate_initial(); - } - } -}; - -void StubGenerator_generate(CodeBuffer* code, bool all) -{ - StubGenerator g(code, all); -} - -EntryFrame *EntryFrame::build(ZeroStack* stack, - const intptr_t* parameters, - int parameter_words, - JavaCallWrapper* call_wrapper) -{ - if (header_words + parameter_words > stack->available_words()) { - Unimplemented(); - } - - stack->push(0); // next_frame, filled in later - intptr_t *fp = stack->sp(); - assert(fp - stack->sp() == next_frame_off, "should be"); - - stack->push(ENTRY_FRAME); - assert(fp - stack->sp() == frame_type_off, "should be"); - - stack->push((intptr_t) call_wrapper); - assert(fp - stack->sp() == call_wrapper_off, "should be"); - - for (int i = 0; i < parameter_words; i++) - stack->push(parameters[i]); - - return (EntryFrame *) fp; -}
--- a/ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -/* - * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2008, 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/_stubRoutines_zero.cpp.incl" - -#ifdef IA32 -address StubRoutines::x86::_call_stub_compiled_return = NULL; -#endif // IA32
--- a/ports/hotspot/src/cpu/zero/vm/stubRoutines_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* - * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008, 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. - * - */ - - // This file holds the platform specific parts of the StubRoutines - // definition. See stubRoutines.hpp for a description on how to - // extend it. - - public: - static address call_stub_return_pc() - { - return (address) -1; - } - - static bool returns_to_call_stub(address return_pc) - { - return return_pc == call_stub_return_pc(); - } - - enum platform_dependent_constants - { - code_size1 = 0, // The assembler will fail with a guarantee - code_size2 = 0 // if these are too small. Simply increase - }; // them if that happens. - -#ifdef IA32 - class x86 - { - friend class VMStructs; - - private: - static address _call_stub_compiled_return; - }; -#endif // IA32
--- a/ports/hotspot/src/cpu/zero/vm/vmStructs_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* - * Copyright 2003-2007 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. - * - */ - -// These are the CPU-specific fields, types and integer -// constants required by the Serviceability Agent. This file is -// referenced by vmStructs.cpp. - -#define VM_STRUCTS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \ - - /* NOTE that we do not use the last_entry() macro here; it is used */ - /* in vmStructs_<os>_<cpu>.hpp's VM_STRUCTS_OS_CPU macro (and must */ - /* be present there) */ - -#define VM_TYPES_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type, last_entry) \ - - /* NOTE that we do not use the last_entry() macro here; it is used */ - /* in vmStructs_<os>_<cpu>.hpp's VM_TYPES_OS_CPU macro (and must */ - /* be present there) */ - -#define VM_INT_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \ - - /* NOTE that we do not use the last_entry() macro here; it is used */ - /* in vmStructs_<os>_<cpu>.hpp's VM_INT_CONSTANTS_OS_CPU macro (and must */ - /* be present there) */ - -#define VM_LONG_CONSTANTS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \ - - /* NOTE that we do not use the last_entry() macro here; it is used */ - /* in vmStructs_<os>_<cpu>.hpp's VM_LONG_CONSTANTS_OS_CPU macro (and must */ - /* be present there) */
--- a/ports/hotspot/src/cpu/zero/vm/vm_version_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* - * Copyright 2003-2006 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. - * - */ - -class VM_Version : public Abstract_VM_Version { - public: - static const char* cpu_features() - { - return ""; - } -};
--- a/ports/hotspot/src/cpu/zero/vm/vmreg_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* - * Copyright 2006-2007 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. - * - */ - -#include "incls/_precompiled.incl" -#include "incls/_vmreg_zero.cpp.incl" - -void VMRegImpl::set_regName() -{ - int i = 0; - Register reg = ::as_Register(0); - for ( ; i < ConcreteRegisterImpl::max_gpr ; ) { - regName[i++] = reg->name(); - reg = reg->successor(); - } - FloatRegister freg = ::as_FloatRegister(0); - for ( ; i < ConcreteRegisterImpl::max_fpr ; ) { - regName[i++] = freg->name(); - freg = freg->successor(); - } - assert(i == ConcreteRegisterImpl::number_of_registers, "fix this"); -} - -bool VMRegImpl::is_Register() -{ - return value() >= 0 && - value() < ConcreteRegisterImpl::max_gpr; -} - -bool VMRegImpl::is_FloatRegister() -{ - return value() >= ConcreteRegisterImpl::max_gpr && - value() < ConcreteRegisterImpl::max_fpr; -} - -Register VMRegImpl::as_Register() -{ - assert(is_Register(), "must be"); - return ::as_Register(value()); -} - -FloatRegister VMRegImpl::as_FloatRegister() -{ - assert(is_FloatRegister(), "must be" ); - return ::as_FloatRegister(value() - ConcreteRegisterImpl::max_gpr); -}
--- a/ports/hotspot/src/cpu/zero/vm/vmreg_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* - * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. - * 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. - * - */ - - bool is_Register(); - Register as_Register(); - - bool is_FloatRegister(); - FloatRegister as_FloatRegister();
--- a/ports/hotspot/src/cpu/zero/vm/vmreg_zero.inline.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* - * Copyright 2006-2007 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. - * - */ -inline VMReg RegisterImpl::as_VMReg() -{ - return VMRegImpl::as_VMReg(encoding()); -} -inline VMReg FloatRegisterImpl::as_VMReg() -{ - return VMRegImpl::as_VMReg(encoding() + ConcreteRegisterImpl::max_gpr); -}
--- a/ports/hotspot/src/cpu/zero/vm/vtableStubs_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* - * Copyright 2003-2006 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. - * - */ - -#include "incls/_precompiled.incl" -#include "incls/_vtableStubs_zero.cpp.incl" - -VtableStub* VtableStubs::create_vtable_stub(int vtable_index) -{ - Unimplemented(); -} - -VtableStub* VtableStubs::create_itable_stub(int vtable_index) -{ - Unimplemented(); -} - -int VtableStub::pd_code_size_limit(bool is_vtable_stub) -{ - Unimplemented(); -} - -int VtableStub::pd_code_alignment() -{ - Unimplemented(); -}
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,319 +0,0 @@ -/* - * Copyright 2003-2005 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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. - * - */ - -// Implementation of class atomic - -#ifdef M68K - -/* - * __m68k_cmpxchg - * - * Atomically store newval in *ptr if *ptr is equal to oldval for user space. - * Returns newval on success and oldval if no exchange happened. - * This implementation is processor specific and works on - * 68020 68030 68040 and 68060. - * - * It will not work on ColdFire, 68000 and 68010 since they lack the CAS - * instruction. - * Using a kernelhelper would be better for arch complete implementation. - * - */ - -static inline int __m68k_cmpxchg(int oldval, int newval, volatile int *ptr) -{ - int ret; - __asm __volatile ("cas%.l %0,%2,%1" - : "=d" (ret), "+m" (*(ptr)) - : "d" (newval), "0" (oldval)); - return ret; -} - -/* Perform an atomic compare and swap: if the current value of `*PTR' - is OLDVAL, then write NEWVAL into `*PTR'. Return the contents of - `*PTR' before the operation.*/ -static inline int m68k_compare_and_swap(volatile int *ptr, - int oldval, - int newval) -{ - for (;;) - { - int prev = *ptr; - if (prev != oldval) - return prev; - - if (__m68k_cmpxchg (prev, newval, ptr) == newval) - // Success. - return prev; - - // We failed even though prev == oldval. Try again. - } -} - -/* Atomically add an int to memory. */ -static inline int m68k_add_and_fetch(volatile int *ptr, int add_value) -{ - for (;;) - { - // Loop until success. - - int prev = *ptr; - - if (__m68k_cmpxchg (prev, prev + add_value, ptr) == prev + add_value) - return prev + add_value; - } -} - -/* Atomically write VALUE into `*PTR' and returns the previous - contents of `*PTR'. */ -static inline int m68k_lock_test_and_set(volatile int *ptr, int newval) -{ - for (;;) - { - // Loop until success. - int prev = *ptr; - - if (__m68k_cmpxchg (prev, newval, ptr) == prev) - return prev; - } -} -#endif // M68K - -#ifdef ARM - -/* - * __kernel_cmpxchg - * - * Atomically store newval in *ptr if *ptr is equal to oldval for user space. - * Return zero if *ptr was changed or non-zero if no exchange happened. - * The C flag is also set if *ptr was changed to allow for assembly - * optimization in the calling code. - * - */ - -typedef int (__kernel_cmpxchg_t)(int oldval, int newval, volatile int *ptr); -#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *) 0xffff0fc0) - - - -/* Perform an atomic compare and swap: if the current value of `*PTR' - is OLDVAL, then write NEWVAL into `*PTR'. Return the contents of - `*PTR' before the operation.*/ -static inline int arm_compare_and_swap(volatile int *ptr, - int oldval, - int newval) -{ - for (;;) - { - int prev = *ptr; - if (prev != oldval) - return prev; - - if (__kernel_cmpxchg (prev, newval, ptr) == 0) - // Success. - return prev; - - // We failed even though prev == oldval. Try again. - } -} - -/* Atomically add an int to memory. */ -static inline int arm_add_and_fetch(volatile int *ptr, int add_value) -{ - for (;;) - { - // Loop until a __kernel_cmpxchg succeeds. - - int prev = *ptr; - - if (__kernel_cmpxchg (prev, prev + add_value, ptr) == 0) - return prev + add_value; - } -} - -/* Atomically write VALUE into `*PTR' and returns the previous - contents of `*PTR'. */ -static inline int arm_lock_test_and_set(volatile int *ptr, int newval) -{ - for (;;) - { - // Loop until a __kernel_cmpxchg succeeds. - int prev = *ptr; - - if (__kernel_cmpxchg (prev, newval, ptr) == 0) - return prev; - } -} -#endif // ARM - -inline void Atomic::store(jint store_value, volatile jint* dest) -{ - *dest = store_value; -} - -inline void Atomic::store_ptr(intptr_t store_value, intptr_t* dest) -{ - *dest = store_value; -} - -inline jint Atomic::add(jint add_value, volatile jint* dest) -{ -#ifdef ARM - return arm_add_and_fetch(dest, add_value); -#else -#ifdef M68K - return m68k_add_and_fetch(dest, add_value); -#else - return __sync_add_and_fetch(dest, add_value); -#endif // M68K -#endif // ARM -} - -inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) -{ -#ifdef ARM - return arm_add_and_fetch(dest, add_value); -#else -#ifdef M68K - return m68k_add_and_fetch(dest, add_value); -#else - return __sync_add_and_fetch(dest, add_value); -#endif // M68K -#endif // ARM -} - -inline void* Atomic::add_ptr(intptr_t add_value, volatile void* dest) -{ - return (void *) add_ptr(add_value, (volatile intptr_t *) dest); -} - -inline void Atomic::inc(volatile jint* dest) -{ - add(1, dest); -} - -inline void Atomic::inc_ptr(volatile intptr_t* dest) -{ - add_ptr(1, dest); -} - -inline void Atomic::inc_ptr(volatile void* dest) -{ - add_ptr(1, dest); -} - -inline void Atomic::dec(volatile jint* dest) -{ - add(-1, dest); -} - -inline void Atomic::dec_ptr(volatile intptr_t* dest) -{ - add_ptr(-1, dest); -} - -inline void Atomic::dec_ptr(volatile void* dest) -{ - add_ptr(-1, dest); -} - -inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) -{ -#ifdef ARM - return arm_lock_test_and_set(dest, exchange_value); -#else -#ifdef M68K - return m68k_lock_test_and_set(dest, exchange_value); -#else - // __sync_lock_test_and_set is a bizarrely named atomic exchange - // operation. Note that some platforms only support this with the - // limitation that the only valid value to store is the immediate - // constant 1. There is a test for this in JNI_CreateJavaVM(). - return __sync_lock_test_and_set (dest, exchange_value); -#endif // M68K -#endif // ARM -} - -inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, - volatile intptr_t* dest) { -#ifdef ARM - return arm_lock_test_and_set(dest, exchange_value); -#else -#ifdef M68K - return m68k_lock_test_and_set(dest, exchange_value); -#else - return __sync_lock_test_and_set (dest, exchange_value); -#endif // M68K -#endif // ARM -} - -inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) -{ - return (void *) xchg_ptr((intptr_t) exchange_value, - (volatile intptr_t*) dest); -} - -inline jint Atomic::cmpxchg(jint exchange_value, - volatile jint* dest, - jint compare_value) { -#ifdef ARM - return arm_compare_and_swap(dest, compare_value, exchange_value); -#else -#ifdef M68K - return m68k_compare_and_swap(dest, compare_value, exchange_value); -#else - return __sync_val_compare_and_swap(dest, compare_value, exchange_value); -#endif // M68K -#endif // ARM -} - -inline jlong Atomic::cmpxchg(jlong exchange_value, - volatile jlong* dest, - jlong compare_value) { - - return __sync_val_compare_and_swap(dest, compare_value, exchange_value); -} - -inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, - volatile intptr_t* dest, - intptr_t compare_value) { -#ifdef ARM - return arm_compare_and_swap(dest, compare_value, exchange_value); -#else -#ifdef M68K - return m68k_compare_and_swap(dest, compare_value, exchange_value); -#else - return __sync_val_compare_and_swap(dest, compare_value, exchange_value); -#endif // M68K -#endif // ARM -} - -inline void* Atomic::cmpxchg_ptr(void* exchange_value, - volatile void* dest, - void* compare_value) { - - return (void *) cmpxchg_ptr((intptr_t) exchange_value, - (volatile intptr_t*) dest, - (intptr_t) compare_value); -}
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/bytes_linux_zero.inline.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. - * 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. - * - */ - -// Efficient swapping of data bytes from Java byte -// ordering to native byte ordering and vice versa. - -#include <byteswap.h> - -inline u2 Bytes::swap_u2(u2 x) -{ - return bswap_16(x); -} - -inline u4 Bytes::swap_u4(u4 x) -{ - return bswap_32(x); -} - -inline u8 Bytes::swap_u8(u8 x) -{ - return bswap_64(x); -}
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* - * Copyright 2000-2005 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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. - * - */ - -// -// Set the default values for platform dependent flags used by the -// runtime system. See globals.hpp for details of what they do. -// - -define_pd_global(bool, DontYieldALot, false); -#ifdef _LP64 -define_pd_global(intx, ThreadStackSize, 1536); -define_pd_global(intx, VMThreadStackSize, 1024); -#else -define_pd_global(intx, ThreadStackSize, 1024); -define_pd_global(intx, VMThreadStackSize, 512); -#endif // _LP64 -define_pd_global(intx, SurvivorRatio, 8); -define_pd_global(intx, CompilerThreadStackSize, 0); -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);
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/orderAccess_linux_zero.inline.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,176 +0,0 @@ -/* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008, 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. - * - */ - -#ifdef ARM - -/* - * ARM Kernel helper for memory barrier. - * Using __asm __volatile ("":::"memory") does not work reliable on ARM - * and gcc __sync_synchronize(); implementation does not use the kernel - * helper for all gcc versions so it is unreliable to use as well. - */ -typedef void (__kernel_dmb_t) (void); -#define __kernel_dmb (*(__kernel_dmb_t *) 0xffff0fa0) - -#define FULL_MEM_BARRIER __kernel_dmb() -#define READ_MEM_BARRIER __kernel_dmb() -#define WRITE_MEM_BARRIER __kernel_dmb() - -#else // ARM - -#define FULL_MEM_BARRIER __sync_synchronize() - -#ifdef PPC - -#define READ_MEM_BARRIER __asm __volatile ("isync":::"memory") -#ifdef __NO_LWSYNC__ -#define WRITE_MEM_BARRIER __asm __volatile ("sync":::"memory") -#else -#define WRITE_MEM_BARRIER __asm __volatile ("lwsync":::"memory") -#endif - -#else // PPC - -#define READ_MEM_BARRIER __asm __volatile ("":::"memory") -#define WRITE_MEM_BARRIER __asm __volatile ("":::"memory") - -#endif // PPC - -#endif // ARM - - -inline void OrderAccess::loadload() { acquire(); } -inline void OrderAccess::storestore() { release(); } -inline void OrderAccess::loadstore() { acquire(); } -inline void OrderAccess::storeload() { fence(); } - -inline void OrderAccess::acquire() -{ - READ_MEM_BARRIER; -} - -inline void OrderAccess::release() -{ - WRITE_MEM_BARRIER; -} - -inline void OrderAccess::fence() -{ - FULL_MEM_BARRIER; -} - -inline jbyte OrderAccess::load_acquire(volatile jbyte* p) { jbyte data = *p; acquire(); return data; } -inline jshort OrderAccess::load_acquire(volatile jshort* p) { jshort data = *p; acquire(); return data; } -inline jint OrderAccess::load_acquire(volatile jint* p) { jint data = *p; acquire(); return data; } -inline jlong OrderAccess::load_acquire(volatile jlong* p) -{ - jlong tmp; - os::atomic_copy64(p, &tmp); - acquire(); - return tmp; -} -inline jubyte OrderAccess::load_acquire(volatile jubyte* p) { jubyte data = *p; acquire(); return data; } -inline jushort OrderAccess::load_acquire(volatile jushort* p) { jushort data = *p; acquire(); return data; } -inline juint OrderAccess::load_acquire(volatile juint* p) { juint data = *p; acquire(); return data; } -inline julong OrderAccess::load_acquire(volatile julong* p) -{ - julong tmp; - os::atomic_copy64(p, &tmp); - acquire(); - return tmp; -} -inline jfloat OrderAccess::load_acquire(volatile jfloat* p) { jfloat data = *p; acquire(); return data; } -inline jdouble OrderAccess::load_acquire(volatile jdouble* p) -{ - jdouble tmp; - os::atomic_copy64(p, &tmp); - acquire(); - return tmp; -} - -inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) -{ - intptr_t data = *p; - acquire(); - return data; -} -inline void* OrderAccess::load_ptr_acquire(volatile void* p) -{ - void *data = *(void* volatile *)p; - acquire(); - return data; -} -inline void* OrderAccess::load_ptr_acquire(const volatile void* p) -{ - void *data = *(void* const volatile *)p; - acquire(); - return data; -} - -inline void OrderAccess::release_store(volatile jbyte* p, jbyte v) { release(); *p = v; } -inline void OrderAccess::release_store(volatile jshort* p, jshort v) { release(); *p = v; } -inline void OrderAccess::release_store(volatile jint* p, jint v) { release(); *p = v; } -inline void OrderAccess::release_store(volatile jlong* p, jlong v) -{ release(); os::atomic_copy64(&v, p); } -inline void OrderAccess::release_store(volatile jubyte* p, jubyte v) { release(); *p = v; } -inline void OrderAccess::release_store(volatile jushort* p, jushort v) { release(); *p = v; } -inline void OrderAccess::release_store(volatile juint* p, juint v) { release(); *p = v; } -inline void OrderAccess::release_store(volatile julong* p, julong v) -{ release(); os::atomic_copy64(&v, p); } -inline void OrderAccess::release_store(volatile jfloat* p, jfloat v) { release(); *p = v; } -inline void OrderAccess::release_store(volatile jdouble* p, jdouble v) -{ release(); os::atomic_copy64(&v, p); } - -inline void OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { release(); *p = v; } -inline void OrderAccess::release_store_ptr(volatile void* p, void* v) -{ release(); *(void* volatile *)p = v; } - -inline void OrderAccess::store_fence(jbyte* p, jbyte v) { *p = v; fence(); } -inline void OrderAccess::store_fence(jshort* p, jshort v) { *p = v; fence(); } -inline void OrderAccess::store_fence(jint* p, jint v) { *p = v; fence(); } -inline void OrderAccess::store_fence(jlong* p, jlong v) { os::atomic_copy64(&v, p); fence(); } -inline void OrderAccess::store_fence(jubyte* p, jubyte v) { *p = v; fence(); } -inline void OrderAccess::store_fence(jushort* p, jushort v) { *p = v; fence(); } -inline void OrderAccess::store_fence(juint* p, juint v) { *p = v; fence(); } -inline void OrderAccess::store_fence(julong* p, julong v) { os::atomic_copy64(&v, p); fence(); } -inline void OrderAccess::store_fence(jfloat* p, jfloat v) { *p = v; fence(); } -inline void OrderAccess::store_fence(jdouble* p, jdouble v) { os::atomic_copy64(&v, p); fence(); } - -inline void OrderAccess::store_ptr_fence(intptr_t* p, intptr_t v) { *p = v; fence(); } -inline void OrderAccess::store_ptr_fence(void** p, void* v) { *p = v; fence(); } - -inline void OrderAccess::release_store_fence(volatile jbyte* p, jbyte v) { release_store(p, v); fence(); } -inline void OrderAccess::release_store_fence(volatile jshort* p, jshort v) { release_store(p, v); fence(); } -inline void OrderAccess::release_store_fence(volatile jint* p, jint v) { release_store(p, v); fence(); } -inline void OrderAccess::release_store_fence(volatile jlong* p, jlong v) { release_store(p, v); fence(); } -inline void OrderAccess::release_store_fence(volatile jubyte* p, jubyte v) { release_store(p, v); fence(); } -inline void OrderAccess::release_store_fence(volatile jushort* p, jushort v) { release_store(p, v); fence(); } -inline void OrderAccess::release_store_fence(volatile juint* p, juint v) { release_store(p, v); fence(); } -inline void OrderAccess::release_store_fence(volatile julong* p, julong v) { release_store(p, v); fence(); } -inline void OrderAccess::release_store_fence(volatile jfloat* p, jfloat v) { release_store(p, v); fence(); } -inline void OrderAccess::release_store_fence(volatile jdouble* p, jdouble v) { release_store(p, v); fence(); } - -inline void OrderAccess::release_store_ptr_fence(volatile intptr_t* p, intptr_t v) { release_store_ptr(p, v); fence(); } -inline void OrderAccess::release_store_ptr_fence(volatile void* p, void* v) { release_store_ptr(p, v); fence(); }
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,467 +0,0 @@ -/* - * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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. - * - */ - -// do not include precompiled header file -#include "incls/_os_linux_zero.cpp.incl" - -address os::current_stack_pointer() -{ - address dummy = (address) &dummy; - return dummy; -} - -frame os::get_sender_for_C_frame(frame* fr) -{ - Unimplemented(); -} - -frame os::current_frame() -{ - Unimplemented(); -} - -char* os::non_memory_address_word() -{ - // Must never look like an address returned by reserve_memory, - // even in its subfields (as defined by the CPU immediate fields, - // if the CPU splits constants across multiple instructions). -#ifdef SPARC - // On SPARC, 0 != %hi(any real address), because there is no - // allocation in the first 1Kb of the virtual address space. - return (char *) 0; -#else - // This is the value for x86; works pretty well for PPC too. - return (char *) -1; -#endif // SPARC -} - -void os::initialize_thread() -{ - // Nothing to do. -} - -address os::Linux::ucontext_get_pc(ucontext_t* uc) -{ - Unimplemented(); -} - -ExtendedPC os::fetch_frame_from_context(void* ucVoid, - intptr_t** ret_sp, - intptr_t** ret_fp) { - Unimplemented(); -} - -frame os::fetch_frame_from_context(void* ucVoid) -{ - Unimplemented(); -} - -extern "C" int -JVM_handle_linux_signal(int sig, - siginfo_t* info, - void* ucVoid, - int abort_if_unrecognized) -{ - ucontext_t* uc = (ucontext_t*) ucVoid; - - Thread* t = ThreadLocalStorage::get_thread_slow(); - - SignalHandlerMark shm(t); - - // Note: it's not uncommon that JNI code uses signal/sigset to - // install then restore certain signal handler (e.g. to temporarily - // block SIGPIPE, or have a SIGILL handler when detecting CPU - // type). When that happens, JVM_handle_linux_signal() might be - // invoked with junk info/ucVoid. To avoid unnecessary crash when - // libjsig is not preloaded, try handle signals that do not require - // siginfo/ucontext first. - - if (sig == SIGPIPE || sig == SIGXFSZ) { - // allow chained handler to go first - if (os::Linux::chained_handler(sig, info, ucVoid)) { - return true; - } else { - if (PrintMiscellaneous && (WizardMode || Verbose)) { - char buf[64]; - warning("Ignoring %s - see bugs 4229104 or 646499219", - os::exception_name(sig, buf, sizeof(buf))); - } - return true; - } - } - - JavaThread* thread = NULL; - VMThread* vmthread = NULL; - if (os::Linux::signal_handlers_are_installed) { - if (t != NULL ){ - if(t->is_Java_thread()) { - thread = (JavaThread*)t; - } - else if(t->is_VM_thread()){ - vmthread = (VMThread *)t; - } - } - } - - if (info != NULL && thread != NULL) { - // Handle ALL stack overflow variations here - if (sig == SIGSEGV) { - address addr = (address) info->si_addr; - - // check if fault address is within thread stack - if (addr < thread->stack_base() && - addr >= thread->stack_base() - thread->stack_size()) { - // stack overflow - if (thread->in_stack_yellow_zone(addr)) { - thread->disable_stack_yellow_zone(); - Unimplemented(); - } - else if (thread->in_stack_red_zone(addr)) { - thread->disable_stack_red_zone(); - Unimplemented(); - } - else { - // Accessing stack address below sp may cause SEGV if - // current thread has MAP_GROWSDOWN stack. This should - // only happen when current thread was created by user - // code with MAP_GROWSDOWN flag and then attached to VM. - // See notes in os_linux.cpp. - if (thread->osthread()->expanding_stack() == 0) { - thread->osthread()->set_expanding_stack(); - if (os::Linux::manually_expand_stack(thread, addr)) { - thread->osthread()->clear_expanding_stack(); - return true; - } - thread->osthread()->clear_expanding_stack(); - } - else { - fatal("recursive segv. expanding stack."); - } - } - } - } - - /*if (thread->thread_state() == _thread_in_Java) { - Unimplemented(); - } - else*/ if (thread->thread_state() == _thread_in_vm && - sig == SIGBUS && thread->doing_unsafe_access()) { - Unimplemented(); - } - - // jni_fast_Get<Primitive>Field can trap at certain pc's if a GC - // kicks in and the heap gets shrunk before the field access. - /*if (sig == SIGSEGV || sig == SIGBUS) { - address addr = JNI_FastGetField::find_slowcase_pc(pc); - if (addr != (address)-1) { - stub = addr; - } - }*/ - - // Check to see if we caught the safepoint code in the process - // of write protecting the memory serialization page. It write - // enables the page immediately after protecting it so we can - // just return to retry the write. - if (sig == SIGSEGV && - os::is_memory_serialize_page(thread, (address) info->si_addr)) { - // Block current thread until permission is restored. - os::block_on_serialize_page_trap(); - return true; - } - } - - // signal-chaining - if (os::Linux::chained_handler(sig, info, ucVoid)) { - return true; - } - - if (!abort_if_unrecognized) { - // caller wants another chance, so give it to him - return false; - } - -#ifndef PRODUCT - if (sig == SIGSEGV) { - fatal("\n#" - "\n# /--------------------\\" - "\n# | segmentation fault |" - "\n# \\---\\ /--------------/" - "\n# /" - "\n# [-] |\\_/| " - "\n# (+)=C |o o|__ " - "\n# | | =-*-=__\\ " - "\n# OOO c_c_(___)"); - } -#endif // !PRODUCT - - const char *fmt = "caught unhandled signal %d"; - char buf[64]; - - sprintf(buf, fmt, sig); - fatal(buf); -} - -void os::Linux::init_thread_fpu_state(void) -{ - // Nothing to do -} - -int os::Linux::get_fpu_control_word() -{ - Unimplemented(); -} - -void os::Linux::set_fpu_control_word(int fpu) -{ - Unimplemented(); -} - -bool os::is_allocatable(size_t bytes) -{ - Unimplemented(); -} - -/////////////////////////////////////////////////////////////////////////////// -// thread stack - -size_t os::Linux::min_stack_allowed = 64 * K; - -bool os::Linux::supports_variable_stack_size() -{ - return true; -} - -size_t os::Linux::default_stack_size(os::ThreadType thr_type) -{ -#ifdef _LP64 - size_t s = (thr_type == os::compiler_thread ? 4 * M : 1 * M); -#else - size_t s = (thr_type == os::compiler_thread ? 2 * M : 512 * K); -#endif // _LP64 - return s; -} - -size_t os::Linux::default_guard_size(os::ThreadType thr_type) -{ - // Only enable glibc guard pages for non-Java threads - // (Java threads have HotSpot guard pages) - return (thr_type == java_thread ? 0 : page_size()); -} - -static void current_stack_region(address *bottom, size_t *size) -{ - pthread_attr_t attr; - int res = pthread_getattr_np(pthread_self(), &attr); - if (res != 0) { - if (res == ENOMEM) { - vm_exit_out_of_memory(0, "pthread_getattr_np"); - } - else { - fatal1("pthread_getattr_np failed with errno = %d", res); - } - } - - address stack_bottom; - size_t stack_bytes; - res = pthread_attr_getstack(&attr, (void **) &stack_bottom, &stack_bytes); - if (res != 0) { - fatal1("pthread_attr_getstack failed with errno = %d", res); - } - address stack_top = stack_bottom + stack_bytes; - - // The block of memory returned by pthread_attr_getstack() includes - // guard pages where present. We need to trim these off. - size_t page_bytes = os::Linux::page_size(); - assert(((intptr_t) stack_bottom & (page_bytes - 1)) == 0, "unaligned stack"); - - size_t guard_bytes; - res = pthread_attr_getguardsize(&attr, &guard_bytes); - if (res != 0) { - fatal1("pthread_attr_getguardsize failed with errno = %d", res); - } - int guard_pages = align_size_up(guard_bytes, page_bytes) / page_bytes; - assert(guard_bytes == guard_pages * page_bytes, "unaligned guard"); - -#ifdef IA64 - // IA64 has two stacks sharing the same area of memory, a normal - // stack growing downwards and a register stack growing upwards. - // Guard pages, if present, are in the centre. This code splits - // the stack in two even without guard pages, though in theory - // there's nothing to stop us allocating more to the normal stack - // or more to the register stack if one or the other were found - // to grow faster. - int total_pages = align_size_down(stack_bytes, page_bytes) / page_bytes; - stack_bottom += (total_pages - guard_pages) / 2 * page_bytes; -#endif // IA64 - - stack_bottom += guard_bytes; - - pthread_attr_destroy(&attr); - - // The initial thread has a growable stack, and the size reported - // by pthread_attr_getstack is the maximum size it could possibly - // be given what currently mapped. This can be huge, so we cap it. - if (os::Linux::is_initial_thread()) { - stack_bytes = stack_top - stack_bottom; - - if (stack_bytes > JavaThread::stack_size_at_create()) - stack_bytes = JavaThread::stack_size_at_create(); - - stack_bottom = stack_top - stack_bytes; - } - - assert(os::current_stack_pointer() >= stack_bottom, "should do"); - assert(os::current_stack_pointer() < stack_top, "should do"); - - *bottom = stack_bottom; - *size = stack_top - stack_bottom; -} - -address os::current_stack_base() -{ - address bottom; - size_t size; - current_stack_region(&bottom, &size); - return bottom + size; -} - -size_t os::current_stack_size() -{ - // stack size includes normal stack and HotSpot guard pages - address bottom; - size_t size; - current_stack_region(&bottom, &size); - return size; -} - -///////////////////////////////////////////////////////////////////////////// -// helper functions for fatal error handler - -void os::print_context(outputStream* st, void* context) -{ - Unimplemented(); -} - -///////////////////////////////////////////////////////////////////////////// -// Stubs for things that would be in linux_zero.s if it existed. -// You probably want to disassemble these monkeys to check they're ok. - -extern "C" { - int SpinPause() - { - } - - int SafeFetch32(int *adr, int errValue) - { - int value = errValue; - value = *adr; - return value; - } - intptr_t SafeFetchN(intptr_t *adr, intptr_t errValue) - { - intptr_t value = errValue; - value = *adr; - return value; - } - - void _Copy_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) - { - if (from > to) { - jshort *end = from + count; - while (from < end) - *(to++) = *(from++); - } - else if (from < to) { - jshort *end = from; - from += count - 1; - to += count - 1; - while (from >= end) - *(to--) = *(from--); - } - } - void _Copy_conjoint_jints_atomic(jint* from, jint* to, size_t count) - { - if (from > to) { - jint *end = from + count; - while (from < end) - *(to++) = *(from++); - } - else if (from < to) { - jint *end = from; - from += count - 1; - to += count - 1; - while (from >= end) - *(to--) = *(from--); - } - } - void _Copy_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) - { - if (from > to) { - jlong *end = from + count; - while (from < end) - os::atomic_copy64(from++, to++); - } - else if (from < to) { - jlong *end = from; - from += count - 1; - to += count - 1; - while (from >= end) - os::atomic_copy64(from--, to--); - } - } - - void _Copy_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) - { - Unimplemented(); - } - void _Copy_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, - size_t count) { - Unimplemented(); - } - void _Copy_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) - { - Unimplemented(); - } - void _Copy_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, - size_t count) { - Unimplemented(); - } -}; - -///////////////////////////////////////////////////////////////////////////// -// Implementations of atomic operations not supported by processors. -// -- http://gcc.gnu.org/onlinedocs/gcc-4.2.1/gcc/Atomic-Builtins.html - -#ifndef _LP64 -extern "C" { - long long unsigned int __sync_val_compare_and_swap_8( - volatile void *ptr, - long long unsigned int oldval, - long long unsigned int newval) - { - Unimplemented(); - } -}; -#endif // !_LP64
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* - * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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. - * - */ - - static void setup_fpu() {} - - static bool is_allocatable(size_t bytes); - - // Used to register dynamic code cache area with the OS - // Note: Currently only used in 64 bit Windows implementations - static bool register_code_area(char *low, char *high) { return true; } - - // Atomically copy 64 bits of data - static void atomic_copy64(volatile void *src, volatile void *dst) - { -#if defined(PPC) && !defined(_LP64) - double tmp; - asm volatile ("lfd %0, 0(%1)\n" - "stfd %0, 0(%2)\n" - : "=f"(tmp) - : "b"(src), "b"(dst)); -#else - *(jlong *) dst = *(jlong *) src; -#endif // PPC && !_LP64 - }
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/prefetch_linux_zero.inline.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* - * Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008 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. - * - */ - -inline void Prefetch::read(void* loc, intx interval) -{ -} - -inline void Prefetch::write(void* loc, intx interval) -{ -}
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.cpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* - * Copyright 2003 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. - * - */ - -#include "incls/_precompiled.incl" -#include "incls/_threadLS_linux_zero.cpp.incl" - -void ThreadLocalStorage::generate_code_for_get_thread() -{ - // nothing to do -} - -void ThreadLocalStorage::pd_init() -{ - // nothing to do -} - -void ThreadLocalStorage::pd_set_thread(Thread* thread) -{ - os::thread_local_storage_at_put(ThreadLocalStorage::thread_index(), thread); -}
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/threadLS_linux_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* - * Copyright 2003 Sun Microsystems, Inc. All Rights Reserved. - * 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. - * - */ - -// Processor dependent parts of ThreadLocalStorage - -public: - - static Thread* thread() - { - return (Thread*) os::thread_local_storage_at(thread_index()); - }
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/thread_linux_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,118 +0,0 @@ -/* - * Copyright 2000-2007 Sun Microsystems, Inc. All Rights Reserved. - * Copyright 2007, 2008, 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. - * - */ - - private: - ZeroStack _zero_stack; - ZeroFrame* _top_zero_frame; - - void pd_initialize() - { - _top_zero_frame = NULL; - } - - public: - ZeroStack *zero_stack() - { - return &_zero_stack; - } - - public: - ZeroFrame *top_zero_frame() - { - return _top_zero_frame; - } - void push_zero_frame(ZeroFrame *frame) - { - *(ZeroFrame **) frame = _top_zero_frame; - _top_zero_frame = frame; - } - void pop_zero_frame() - { - _zero_stack.set_sp((intptr_t *) _top_zero_frame + 1); - _top_zero_frame = *(ZeroFrame **) _top_zero_frame; - } - - public: - static ByteSize zero_stack_offset() - { - return byte_offset_of(JavaThread, _zero_stack); - } - static ByteSize top_zero_frame_offset() - { - return byte_offset_of(JavaThread, _top_zero_frame); - } - - public: - void record_base_of_stack_pointer() - { - assert(top_zero_frame() == NULL, "junk on stack prior to Java call"); - } - void set_base_of_stack_pointer(intptr_t* base_sp) - { - assert(base_sp == NULL, "should be"); - assert(top_zero_frame() == NULL, "junk on stack after Java call"); - } - - public: - void set_last_Java_frame() - { - JavaFrameAnchor *jfa = frame_anchor(); - jfa->set_last_Java_sp((intptr_t *) top_zero_frame()); - } - void reset_last_Java_frame() - { - JavaFrameAnchor *jfa = frame_anchor(); - jfa->set_last_Java_sp(NULL); - } - - private: - frame pd_last_frame() - { - assert(has_last_Java_frame(), "must have last_Java_sp() when suspended"); - return frame(last_Java_sp()); - } - - public: - // Check for pending suspend requests and pending asynchronous - // exceptions. There are separate accessors for these, but - // _suspend_flags is volatile so using them would be unsafe. - bool has_special_condition_for_native_trans() - { - return _suspend_flags != 0; - } - - public: - bool pd_get_top_frame_for_signal_handler(frame* fr_addr, - void* ucontext, - bool isInJava) - { - Unimplemented(); - } - - // These routines are only used on cpu architectures that - // have separate register stacks (Itanium). - static bool register_stack_overflow() { return false; } - static void enable_register_stack_guard() {} - static void disable_register_stack_guard() {}
--- a/ports/hotspot/src/os_cpu/linux_zero/vm/vmStructs_linux_zero.hpp Tue Jul 21 23:06:12 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* - * Copyright 2003-2007 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. - * - */ - -// These are the OS and CPU-specific fields, types and integer -// constants required by the Serviceability Agent. This file is -// referenced by vmStructs.cpp. - -#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \ - /* This must be the last entry, and must be present */ \ - last_entry() - - -#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type, last_entry) \ - /* This must be the last entry, and must be present */ \ - last_entry() - -#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \ - /* This must be the last entry, and must be present */ \ - last_entry() - -#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \ - /* This must be the last entry, and must be present */ \ - last_entry()