RFC: Change name of default HotSpot to 'default'

Andrew John Hughes gnu_andrew at member.fsf.org
Thu Feb 12 07:00:46 PST 2009


This patch renames the name of the default HotSpot patch
set to be 'default' rather than the specific version.  We
should of course document what that version is elsewhere.
I propose it either tracks 7 or we at least update to the latest
b14 release as there are some bug fixes (I'll do this in a
subsequent patch).

Ok to commit?

ChangeLog:

2009-02-12  Andrew John Hughes  <ahughes at redhat.com>

	* patches/hotspot/14.0b08/icedtea-6791168.patch,
	* patches/hotspot/14.0b08/icedtea-bytecodeInterpreter.patch,
	* patches/hotspot/14.0b08/icedtea-core-build.patch,
	* patches/hotspot/14.0b08/icedtea-debuginfo.patch,
	* patches/hotspot/14.0b08/icedtea-format.patch,
	* patches/hotspot/14.0b08/icedtea-gcc-4.3.patch,
	* patches/hotspot/14.0b08/icedtea-gcc-suffix.patch,
	* patches/hotspot/14.0b08/icedtea-headers.patch,
	* patches/hotspot/14.0b08/icedtea-includedb.patch,
	* patches/hotspot/14.0b08/icedtea-memory-limits.patch,
	* patches/hotspot/14.0b08/icedtea-no-precompiled.patch,
	* patches/hotspot/14.0b08/icedtea-params-cast-size_t.patch,
	* patches/hotspot/14.0b08/icedtea-parisc-opt.patch,
	* patches/hotspot/14.0b08/icedtea-shark-build.patch,
	* patches/hotspot/14.0b08/icedtea-shark.patch,
	* patches/hotspot/14.0b08/icedtea-sparc-buildfixes.patch,
	* patches/hotspot/14.0b08/icedtea-sparc-ptracefix.patch,
	* patches/hotspot/14.0b08/icedtea-sparc-trapsfix.patch,
	* patches/hotspot/14.0b08/icedtea-sparc64-linux.patch,
	* patches/hotspot/14.0b08/icedtea-static-libstdc++.patch,
	* patches/hotspot/14.0b08/icedtea-text-relocations.patch,
	* patches/hotspot/14.0b08/icedtea-use-idx_t.patch,
	* patches/hotspot/14.0b08/icedtea-version.patch,
	* patches/hotspot/14.0b08/icedtea-zero-build.patch: Moved...
	* acinclude.m4: Make 'default' the default.
	* hotspot.map: Change 14.0b08 to default.
	* patches/hotspot/default/icedtea-6791168.patch,
	* patches/hotspot/default/icedtea-bytecodeInterpreter.patch,
	* patches/hotspot/default/icedtea-core-build.patch,
	* patches/hotspot/default/icedtea-debuginfo.patch,
	* patches/hotspot/default/icedtea-format.patch,
	* patches/hotspot/default/icedtea-gcc-4.3.patch,
	* patches/hotspot/default/icedtea-gcc-suffix.patch,
	* patches/hotspot/default/icedtea-headers.patch,
	* patches/hotspot/default/icedtea-includedb.patch,
	* patches/hotspot/default/icedtea-memory-limits.patch,
	* patches/hotspot/default/icedtea-no-precompiled.patch,
	* patches/hotspot/default/icedtea-params-cast-size_t.patch,
	* patches/hotspot/default/icedtea-parisc-opt.patch,
	* patches/hotspot/default/icedtea-shark-build.patch,
	* patches/hotspot/default/icedtea-shark.patch,
	* patches/hotspot/default/icedtea-sparc-buildfixes.patch,
	* patches/hotspot/default/icedtea-sparc-ptracefix.patch,
	* patches/hotspot/default/icedtea-sparc-trapsfix.patch,
	* patches/hotspot/default/icedtea-sparc64-linux.patch,
	* patches/hotspot/default/icedtea-static-libstdc++.patch,
	* patches/hotspot/default/icedtea-text-relocations.patch,
	* patches/hotspot/default/icedtea-use-idx_t.patch,
	* patches/hotspot/default/icedtea-version.patch,
	* patches/hotspot/default/icedtea-zero-build.patch: to here.

-- 
Andrew :)

Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)

Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA  7927 142C 2591 94EF D9D8
-------------- next part --------------
diff -r 551c49cb2e2a acinclude.m4
--- a/acinclude.m4	Wed Feb 11 11:49:45 2009 -0500
+++ b/acinclude.m4	Thu Feb 12 14:56:16 2009 +0000
@@ -845,7 +845,7 @@
 
 AC_DEFUN([AC_CHECK_WITH_HOTSPOT_BUILD],
 [
-  DEFAULT_BUILD="14.0b08"
+  DEFAULT_BUILD="default"
   AC_MSG_CHECKING([which HotSpot build to use])
   AC_ARG_WITH([hotspot-build],
 	      [AS_HELP_STRING(--with-hotspot-build,the HotSpot build to use)],
diff -r 551c49cb2e2a hotspot.map
--- a/hotspot.map	Wed Feb 11 11:49:45 2009 -0500
+++ b/hotspot.map	Thu Feb 12 14:56:16 2009 +0000
@@ -1,2 +1,2 @@
 # version changeset md5sum
-14.0b08	f9d938ede196 c8f78d48ac83987bc2adebeebcd354e9
+default	f9d938ede196 c8f78d48ac83987bc2adebeebcd354e9
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-6791168.patch
--- a/patches/hotspot/14.0b08/icedtea-6791168.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,230 +0,0 @@
---- openjdk/hotspot/src/cpu/x86/vm/cppInterpreter_x86.cpp.orig	2009-01-13 10:15:42.000000000 +0000
-+++ openjdk/hotspot/src/cpu/x86/vm/cppInterpreter_x86.cpp	2009-01-13 10:17:05.000000000 +0000
-@@ -594,7 +594,7 @@
-   __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), rax);
- 
-   // for c++ interpreter can rsi really be munged?
--  __ lea(state, Address(rbp, -sizeof(BytecodeInterpreter)));                               // restore state
-+  __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter)));                               // restore state
-   __ movptr(rbx, Address(state, byte_offset_of(BytecodeInterpreter, _method)));            // restore method
-   __ movptr(rdi, Address(state, byte_offset_of(BytecodeInterpreter, _locals)));            // get locals pointer
- 
-@@ -658,7 +658,7 @@
-     const Address size_of_stack    (rbx, methodOopDesc::max_stack_offset());
-     // Always give one monitor to allow us to start interp if sync method.
-     // Any additional monitors need a check when moving the expression stack
--    const one_monitor = frame::interpreter_frame_monitor_size() * wordSize;
-+    const int one_monitor = frame::interpreter_frame_monitor_size() * wordSize;
-   __ load_unsigned_word(rax, size_of_stack);                            // get size of expression stack in words
-   __ lea(rax, Address(noreg, rax, Interpreter::stackElementScale(), one_monitor));
-   __ lea(rax, Address(rax, rdx, Interpreter::stackElementScale(), overhead_size));
-@@ -1829,7 +1829,7 @@
-   Label unwind_and_forward;
- 
-   // restore state pointer.
--  __ lea(state, Address(rbp,  -sizeof(BytecodeInterpreter)));
-+  __ lea(state, Address(rbp,  -(int)sizeof(BytecodeInterpreter)));
- 
-   __ movptr(rbx, STATE(_method));                       // get method
- #ifdef _LP64
-@@ -1877,14 +1877,14 @@
- 
-   // The FPU stack is clean if UseSSE >= 2 but must be cleaned in other cases
-   if (UseSSE < 2) {
--    __ lea(state, Address(rbp,  -sizeof(BytecodeInterpreter)));
-+    __ lea(state, Address(rbp,  -(int)sizeof(BytecodeInterpreter)));
-     __ movptr(rbx, STATE(_result._to_call._callee));                   // get method just executed
-     __ movl(rcx, Address(rbx, methodOopDesc::result_index_offset()));
-     __ cmpl(rcx, AbstractInterpreter::BasicType_as_index(T_FLOAT));    // Result stub address array index
-     __ jcc(Assembler::equal, do_float);
-     __ cmpl(rcx, AbstractInterpreter::BasicType_as_index(T_DOUBLE));    // Result stub address array index
-     __ jcc(Assembler::equal, do_double);
--#ifdef COMPILER2
-+#if !defined(_LP64) || defined(COMPILER1) || !defined(COMPILER2)
-     __ empty_FPU_stack();
- #endif // COMPILER2
-     __ jmp(done_conv);
-@@ -1928,7 +1928,7 @@
- 
-   // Restore rsi/r13 as compiled code may not preserve it
- 
--  __ lea(state, Address(rbp,  -sizeof(BytecodeInterpreter)));
-+  __ lea(state, Address(rbp,  -(int)sizeof(BytecodeInterpreter)));
- 
-   // restore stack to what we had when we left (in case i2c extended it)
- 
-@@ -1942,7 +1942,7 @@
- #else
-   __ movptr(rcx, STATE(_thread));                       // get thread
-   __ cmpptr(Address(rcx, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
--#endif / __LP64
-+#endif // _LP64
-   __ jcc(Assembler::notZero, return_with_exception);
- 
-   // get method just executed
---- openjdk/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp.orig	2009-01-13 10:15:42.000000000 +0000
-+++ openjdk/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp	2009-01-13 10:17:05.000000000 +0000
-@@ -139,7 +139,7 @@
- #ifdef CC_INTERP
- 
- inline interpreterState frame::get_interpreterState() const {
--  return ((interpreterState)addr_at( -sizeof(BytecodeInterpreter)/wordSize ));
-+  return ((interpreterState)addr_at( -((int)sizeof(BytecodeInterpreter))/wordSize ));
- }
- 
- inline intptr_t*    frame::sender_sp()        const {
---- openjdk/hotspot/src/cpu/x86/vm/assembler_x86.cpp.orig	2009-01-13 10:15:42.000000000 +0000
-+++ openjdk/hotspot/src/cpu/x86/vm/assembler_x86.cpp	2009-01-13 10:17:05.000000000 +0000
-@@ -6943,29 +6943,32 @@
- 
-   Label slow_case, done;
- 
--  // x ?<= pi/4
--  fld_d(ExternalAddress((address)&pi_4));
--  fld_s(1);                // Stack:  X  PI/4  X
--  fabs();                  // Stack: |X| PI/4  X
--  fcmp(tmp);
--  jcc(Assembler::above, slow_case);
--
--  // fastest case: -pi/4 <= x <= pi/4
--  switch(trig) {
--  case 's':
--    fsin();
--    break;
--  case 'c':
--    fcos();
--    break;
--  case 't':
--    ftan();
--    break;
--  default:
--    assert(false, "bad intrinsic");
--    break;
-+  ExternalAddress pi4_adr = (address)&pi_4;
-+  if (reachable(pi4_adr)) {
-+    // x ?<= pi/4
-+    fld_d(pi4_adr); // ExternalAddress((address)&pi_4));
-+    fld_s(1);                // Stack:  X  PI/4  X
-+    fabs();                  // Stack: |X| PI/4  X
-+    fcmp(tmp);
-+    jcc(Assembler::above, slow_case);
-+
-+    // fastest case: -pi/4 <= x <= pi/4
-+    switch(trig) {
-+    case 's':
-+      fsin();
-+      break;
-+    case 'c':
-+      fcos();
-+      break;
-+    case 't':
-+      ftan();
-+      break;
-+    default:
-+      assert(false, "bad intrinsic");
-+      break;
-+    }
-+    jmp(done);
-   }
--  jmp(done);
- 
-   // slow case: runtime call
-   bind(slow_case);
---- openjdk/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp.orig	2009-01-13 10:15:42.000000000 +0000
-+++ openjdk/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	2009-01-13 10:17:05.000000000 +0000
-@@ -2954,10 +2954,16 @@
-   __ pushptr(Address(rcx, 0));     // Save return address
-   __ enter();                      // Save old & set new rbp
-   __ subptr(rsp, rbx);             // Prolog
-+#ifdef CC_INTERP
-+  __ movptr(Address(rbp,
-+                  -(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))),
-+            sender_sp); // Make it walkable
-+#else // CC_INTERP
-   __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize),
-             sender_sp);            // Make it walkable
-   // This value is corrected by layout_activation_impl
-   __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD );
-+#endif // CC_INTERP
-   __ mov(sender_sp, rsp);          // Pass sender_sp to next frame
-   __ addptr(rsi, wordSize);        // Bump array pointer (sizes)
-   __ addptr(rcx, wordSize);        // Bump array pointer (pcs)
---- openjdk/hotspot/src/cpu/x86/vm/bytecodeInterpreter_x86.inline.hpp.orig	2009-01-13 10:15:42.000000000 +0000
-+++ openjdk/hotspot/src/cpu/x86/vm/bytecodeInterpreter_x86.inline.hpp	2009-01-13 10:17:05.000000000 +0000
-@@ -213,7 +213,7 @@
- 
- inline jint BytecodeInterpreter::VMintDiv(jint op1, jint op2) {
-   /* it's possible we could catch this special case implicitly */
--  if (op1 == 0x80000000 && op2 == -1) return op1;
-+  if ((juint)op1 == 0x80000000 && op2 == -1) return op1;
-   else return op1 / op2;
- }
- 
-@@ -231,7 +231,7 @@
- 
- inline jint BytecodeInterpreter::VMintRem(jint op1, jint op2) {
-   /* it's possible we could catch this special case implicitly */
--  if (op1 == 0x80000000 && op2 == -1) return 0;
-+  if ((juint)op1 == 0x80000000 && op2 == -1) return 0;
-   else return op1 % op2;
- }
- 
---- openjdk/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp.orig	2009-01-13 10:15:42.000000000 +0000
-+++ openjdk/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp	2009-01-13 10:17:05.000000000 +0000
-@@ -30,7 +30,7 @@
- 
- #ifdef CC_INTERP
- void InterpreterMacroAssembler::get_method(Register reg) {
--  movptr(reg, Address(rbp, -(sizeof(BytecodeInterpreter) + 2 * wordSize)));
-+  movptr(reg, Address(rbp, -((int)sizeof(BytecodeInterpreter) + 2 * wordSize)));
-   movptr(reg, Address(reg, byte_offset_of(BytecodeInterpreter, _method)));
- }
- #endif // CC_INTERP
---- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp.orig	2009-01-13 10:16:45.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp	2009-01-13 10:17:05.000000000 +0000
-@@ -163,7 +163,7 @@
- #ifdef USELABELS
- // Have to do this dispatch this way in C++ because otherwise gcc complains about crossing an
- // initialization (which is is the initialization of the table pointer...)
--#define DISPATCH(opcode) goto *dispatch_table[opcode]
-+#define DISPATCH(opcode) goto *(void*)dispatch_table[opcode]
- #define CONTINUE {                              \
-         opcode = *pc;                           \
-         DO_UPDATE_INSTRUCTION_COUNT(opcode);    \
-@@ -341,7 +341,7 @@
-  */
- #undef CHECK_NULL
- #define CHECK_NULL(obj_)                                                 \
--    if ((obj_) == 0) {                                                   \
-+    if ((obj_) == NULL) {                                                \
-         VM_JAVA_ERROR(vmSymbols::java_lang_NullPointerException(), "");  \
-     }
- 
-@@ -1362,7 +1362,7 @@
- 
- #define NULL_COMPARISON_NOT_OP(name)                                         \
-       CASE(_if##name): {                                                     \
--          int skip = (!(STACK_OBJECT(-1) == 0))                              \
-+          int skip = (!(STACK_OBJECT(-1) == NULL))                           \
-                       ? (int16_t)Bytes::get_Java_u2(pc + 1) : 3;             \
-           address branch_pc = pc;                                            \
-           UPDATE_PC_AND_TOS(skip, -1);                                       \
-@@ -1372,7 +1372,7 @@
- 
- #define NULL_COMPARISON_OP(name)                                             \
-       CASE(_if##name): {                                                     \
--          int skip = ((STACK_OBJECT(-1) == 0))                               \
-+          int skip = ((STACK_OBJECT(-1) == NULL))                            \
-                       ? (int16_t)Bytes::get_Java_u2(pc + 1) : 3;             \
-           address branch_pc = pc;                                            \
-           UPDATE_PC_AND_TOS(skip, -1);                                       \
---- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp.orig	2009-01-13 10:15:42.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	2009-01-13 10:17:05.000000000 +0000
-@@ -66,7 +66,6 @@
- friend class InterpreterGenerator;
- friend class InterpreterMacroAssembler;
- friend class frame;
--friend class SharedRuntime;
- friend class VMStructs;
- 
- public:
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-bytecodeInterpreter.patch
--- a/patches/hotspot/14.0b08/icedtea-bytecodeInterpreter.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp
---- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	2008-10-23 08:41:04.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	2008-10-30 15:48:48.000000000 +0000
-@@ -60,7 +60,6 @@
- };
- 
- class BytecodeInterpreter : StackObj {
--friend class SharedRuntime;
- friend class AbstractInterpreterGenerator;
- friend class CppInterpreterGenerator;
- friend class InterpreterGenerator;
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-core-build.patch
--- a/patches/hotspot/14.0b08/icedtea-core-build.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /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
- 
-
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-debuginfo.patch
--- a/patches/hotspot/14.0b08/icedtea-debuginfo.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-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-08-20 22:58:22.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2008-08-20 23:01:45.000000000 +0100
-@@ -62,6 +62,10 @@
- CFLAGS += -D_REENTRANT
- CFLAGS += -fcheck-new
- 
-+# Always generate full debuginfo on Linux.  It'll be in a separate
-+# debuginfo package when building RPMs.
-+CFLAGS += -g
-+
- ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
- ARCHFLAG/i486    = -m32 -march=i586
- ARCHFLAG/amd64   = -m64
-
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-format.patch
--- a/patches/hotspot/14.0b08/icedtea-format.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2009-02-03 18:08:09.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2009-02-03 18:32:59.000000000 +0000
-@@ -1361,7 +1361,7 @@
- 
-     // Feed the cache size setting into the JDK
-     char buffer[1024];
--    sprintf(buffer, "java.lang.Integer.IntegerCache.high=%d", AutoBoxCacheMax);
-+    sprintf(buffer, "java.lang.Integer.IntegerCache.high=" INTX_FORMAT, AutoBoxCacheMax);
-     add_property(buffer);
-   }
-   if (AggressiveOpts && FLAG_IS_DEFAULT(DoEscapeAnalysis)) {
-diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp openjdk/hotspot/src/share/vm/runtime/safepoint.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp	2009-01-29 15:03:07.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/safepoint.cpp	2009-02-03 18:30:55.000000000 +0000
-@@ -730,7 +730,7 @@
-   if (DieOnSafepointTimeout) {
-     char msg[1024];
-     VM_Operation *op = VMThread::vm_operation();
--    sprintf(msg, "Safepoint sync time longer than %d ms detected when executing %s.",
-+    sprintf(msg, "Safepoint sync time longer than " INTX_FORMAT " ms detected when executing %s.",
-             SafepointTimeoutDelay,
-             op != NULL ? op->name() : "no vm operation");
-     fatal(msg);
-diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/synchronizer.cpp openjdk/hotspot/src/share/vm/runtime/synchronizer.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/synchronizer.cpp	2009-01-29 15:03:07.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/synchronizer.cpp	2009-02-03 19:32:30.000000000 +0000
-@@ -424,7 +424,7 @@
- // asserts is that error message -- often something about negative array
- // indices -- is opaque.
- 
--#define CTASSERT(x) { int tag[1-(2*!(x))]; printf ("Tag @%X\n", tag); }
-+#define CTASSERT(x) { int tag[1-(2*!(x))]; printf ("Tag @%p\n", tag); }
- 
- void ObjectMonitor::ctAsserts() {
-   CTASSERT(offset_of (ObjectMonitor, _header) == 0);
-diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp openjdk/hotspot/src/share/vm/utilities/vmError.cpp
---- openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp	2009-02-03 19:10:58.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp	2009-02-03 19:29:15.000000000 +0000
-@@ -307,7 +307,7 @@
- 
-          strncpy(buf, file, buflen);
-          if (len + 10 < buflen) {
--           sprintf(buf + len, ":" SIZE_FORMAT, _lineno);
-+           sprintf(buf + len, ":%d", _lineno);
-          }
-          st->print(" (%s)", buf);
-        } else {
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-gcc-4.3.patch
--- a/patches/hotspot/14.0b08/icedtea-gcc-4.3.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-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-12-01 12:06:51.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2008-12-01 12:27:08.000000000 +0000
-@@ -98,7 +98,7 @@
- endif
- 
- # Compiler warnings are treated as errors
--WARNINGS_ARE_ERRORS = -Werror
-+# WARNINGS_ARE_ERRORS = -Werror
- 
- # Except for a few acceptable ones
- # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
-diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/gcc.make openjdk/hotspot/make/solaris/makefiles/gcc.make
---- openjdk.orig/hotspot/make/solaris/makefiles/gcc.make	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/make/solaris/makefiles/gcc.make	2008-12-01 12:25:10.000000000 +0000
-@@ -109,7 +109,8 @@
- 
- 
- # Compiler warnings are treated as errors 
--WARNINGS_ARE_ERRORS = -Werror 
-+# Commented out for now because of gcc 4.3 warnings OpenJDK isn't ready for
-+# WARNINGS_ARE_ERRORS = -Werror 
- # Enable these warnings. See 'info gcc' about details on these options
- ADDITIONAL_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare 
- CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ADDITIONAL_WARNINGS) 
-diff -Nru openjdk.orig/hotspot/src/share/vm/adlc/filebuff.cpp openjdk/hotspot/src/share/vm/adlc/filebuff.cpp
---- openjdk.orig/hotspot/src/share/vm/adlc/filebuff.cpp	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/adlc/filebuff.cpp	2008-12-01 12:25:10.000000000 +0000
-@@ -25,6 +25,8 @@
- // FILEBUFF.CPP - Routines for handling a parser file buffer
- #include "adlc.hpp"
- 
-+using namespace std;
-+
- //------------------------------FileBuff---------------------------------------
- // Create a new parsing buffer
- FileBuff::FileBuff( BufferedFile *fptr, ArchDesc& archDesc) : _fp(fptr), _AD(archDesc) {
-diff -Nru openjdk.orig/hotspot/src/share/vm/adlc/filebuff.hpp openjdk/hotspot/src/share/vm/adlc/filebuff.hpp
---- openjdk.orig/hotspot/src/share/vm/adlc/filebuff.hpp	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/adlc/filebuff.hpp	2008-12-01 12:25:10.000000000 +0000
-@@ -94,8 +94,11 @@
-   FileBuffRegion *copy();                   // Deep copy
-   FileBuffRegion *merge(FileBuffRegion*); // Merge 2 regions; delete input
- 
--//  void print(std::ostream&);
--//  friend std::ostream& operator<< (std::ostream&, FileBuffRegion&);
-+#if defined(__GNUC__) && __GNUC__ >= 3
-+  void print(std::ostream&);
-+  friend std::ostream& operator<< (std::ostream&, FileBuffRegion&);
-+#else
-   void print(ostream&);
-   friend ostream& operator<< (ostream&, FileBuffRegion&);
-+#endif
- };
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-gcc-suffix.patch
--- a/patches/hotspot/14.0b08/icedtea-gcc-suffix.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
---- openjdk/hotspot/agent/src/os/linux/Makefile~	2007-08-02 09:16:50.000000000 +0200
-+++ openjdk/hotspot/agent/src/os/linux/Makefile	2007-08-08 17:00:11.204338801 +0200
-@@ -23,7 +23,7 @@
- #
- 
- ARCH := $(shell if ([ `uname -m` = "ia64" ])  ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi )
--GCC      = gcc
-+GCC      = gcc$(GCC_SUFFIX)
- 
- JAVAH    = ${JAVA_HOME}/bin/javah
- 
---- openjdk/hotspot/make/linux/makefiles/gcc.make~	2007-08-08 16:13:12.281815996 +0200
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2007-08-08 16:36:52.573240769 +0200
-@@ -25,8 +25,8 @@
- #------------------------------------------------------------------------
- # CC, CPP & AS
- 
--CPP = g++
--CC  = gcc
-+CPP = g++$(GCC_SUFFIX)
-+CC  = gcc$(GCC_SUFFIX)
- AS  = $(CC) -c
- 
- # -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only
-
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-headers.patch
--- a/patches/hotspot/14.0b08/icedtea-headers.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-diff -Nru openjdk.orig/hotspot/make/linux/makefiles/jvmti.make openjdk/hotspot/make/linux/makefiles/jvmti.make
---- openjdk.orig/hotspot/make/linux/makefiles/jvmti.make	2008-05-23 20:51:14.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/jvmti.make	2008-05-23 20:54:13.000000000 +0100
-@@ -59,7 +59,7 @@
- 
- JvmtiGeneratedFiles = $(JvmtiGeneratedNames:%=$(JvmtiOutDir)/%)
- 
--XSLT = $(QUIETLY) $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiGen
-+XSLT = $(QUIETLY) $(REMOTE) $(RUN.JAVA) $(ENDORSED) -classpath $(JvmtiOutDir) jvmtiGen
- 
- .PHONY: all jvmtidocs clean cleanall
- 
-
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-includedb.patch
--- a/patches/hotspot/14.0b08/icedtea-includedb.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
---- openjdk/hotspot/src/share/vm/includeDB_compiler2.orig	2009-01-13 10:10:44.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/includeDB_compiler2	2009-01-13 10:11:17.000000000 +0000
-@@ -140,6 +140,7 @@
- c2_globals_<os_family>.hpp              macros.hpp
- 
- c2_init_<arch>.cpp                      compile.hpp
-+c2_init_<arch>.cpp                      node.hpp
- 
- c2compiler.cpp                          ad_<arch_model>.hpp
- c2compiler.cpp                          c2compiler.hpp
-@@ -839,6 +840,7 @@
- phase.cpp                               compile.hpp
- phase.cpp                               compileBroker.hpp
- phase.cpp                               nmethod.hpp
-+phase.cpp                               node.hpp
- phase.cpp                               phase.hpp
- 
- phase.hpp                               port.hpp
---- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1.orig	2009-01-13 10:10:44.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1	2009-01-13 10:11:17.000000000 +0000
-@@ -34,6 +34,7 @@
- collectionSetChooser.cpp		g1CollectedHeap.hpp
- collectionSetChooser.cpp		g1CollectorPolicy.hpp
- collectionSetChooser.cpp		collectionSetChooser.hpp
-+collectionSetChooser.cpp		space.inline.hpp
- 
- collectionSetChooser.hpp		heapRegion.hpp
- collectionSetChooser.hpp                growableArray.hpp
-@@ -44,6 +45,7 @@
- concurrentG1Refine.cpp			copy.hpp
- concurrentG1Refine.cpp			g1CollectedHeap.hpp
- concurrentG1Refine.cpp			g1RemSet.hpp
-+concurrentG1Refine.cpp			space.inline.hpp
- 
- concurrentG1Refine.hpp			globalDefinitions.hpp
- 
-@@ -264,7 +266,7 @@
- heapRegion.cpp                          iterator.hpp
- heapRegion.cpp                          oop.inline.hpp
- 
--heapRegion.hpp                          space.hpp
-+heapRegion.hpp                          space.inline.hpp
- heapRegion.hpp                          spaceDecorator.hpp
- heapRegion.hpp                          g1BlockOffsetTable.inline.hpp
- heapRegion.hpp                          watermark.hpp
---- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge.orig	2009-01-13 10:10:44.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge	2009-01-13 10:11:17.000000000 +0000
-@@ -306,6 +306,8 @@
- psPermGen.cpp                           psMarkSweepDecorator.hpp
- psPermGen.cpp                           psParallelCompact.hpp
- psPermGen.cpp                           psPermGen.hpp
-+psPermGen.cpp                           markOop.inline.hpp
-+psPermGen.cpp                           markSweep.inline.hpp
- 
- psPermGen.hpp                           psOldGen.hpp
- 
---- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep.orig	2009-01-13 10:10:44.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep	2009-01-13 10:11:17.000000000 +0000
-@@ -28,6 +28,7 @@
- binaryTreeDictionary.cpp                binaryTreeDictionary.hpp
- binaryTreeDictionary.cpp                globals.hpp
- binaryTreeDictionary.cpp                ostream.hpp
-+binaryTreeDictionary.cpp                space.inline.hpp
- binaryTreeDictionary.cpp                spaceDecorator.hpp
- 
- binaryTreeDictionary.hpp                freeBlockDictionary.hpp
---- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew.orig	2009-01-13 10:10:44.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew	2009-01-13 10:11:17.000000000 +0000
-@@ -29,6 +29,8 @@
- asParNewGeneration.cpp                  cmsAdaptiveSizePolicy.hpp
- asParNewGeneration.cpp                  cmsGCAdaptivePolicyCounters.hpp
- asParNewGeneration.cpp                  defNewGeneration.inline.hpp
-+asParNewGeneration.cpp                  markOop.inline.hpp
-+asParNewGeneration.cpp                  markSweep.inline.hpp
- asParNewGeneration.cpp                  oop.pcgc.inline.hpp
- asParNewGeneration.cpp                  parNewGeneration.hpp
- asParNewGeneration.cpp                  referencePolicy.hpp
-@@ -40,7 +42,7 @@
- parCardTableModRefBS.cpp                java.hpp
- parCardTableModRefBS.cpp                mutexLocker.hpp
- parCardTableModRefBS.cpp                sharedHeap.hpp
--parCardTableModRefBS.cpp                space.hpp
-+parCardTableModRefBS.cpp                space.inline.hpp
- parCardTableModRefBS.cpp                universe.hpp
- parCardTableModRefBS.cpp                virtualspace.hpp
- 
---- openjdk/hotspot/src/share/vm/includeDB_features.orig	2009-01-13 10:10:44.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/includeDB_features	2009-01-13 10:11:17.000000000 +0000
-@@ -59,6 +59,8 @@
- 
- dump_<arch_model>.cpp                   assembler_<arch>.inline.hpp
- dump_<arch_model>.cpp                   compactingPermGenGen.hpp
-+dump_<arch_model>.cpp                   generation.inline.hpp
-+dump_<arch_model>.cpp                   space.inline.hpp
- 
- forte.cpp                               collectedHeap.inline.hpp
- forte.cpp                               debugInfoRec.hpp
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-memory-limits.patch
--- a/patches/hotspot/14.0b08/icedtea-memory-limits.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,23 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp
---- openjdk.orig/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp      2008-05-23 22:30:44.000000000 +0100
-+++ openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp   2008-05-23 22:30:59.000000000 +0100
-@@ -98,7 +98,7 @@
-
- // Heap related flags
- define_pd_global(uintx, PermSize,    ScaleForWordSize(16*M));
--define_pd_global(uintx, MaxPermSize, ScaleForWordSize(64*M));
-+define_pd_global(uintx, MaxPermSize, ScaleForWordSize(128*M));
-
- // Ergonomics related flags
- define_pd_global(bool, NeverActAsServerClassMachine, false);
---- penjdk6/hotspot/src/share/vm/runtime/globals.hpp	2008-02-12 04:14:24.000000000 -0500
-+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	2008-02-14 16:34:00.000000000 -0500
-@@ -2606,7 +2606,7 @@
-           "an OS lock")                                                     \
-                                                                             \
-   /* gc parameters */                                                       \
--  product(uintx, MaxHeapSize, ScaleForWordSize(64*M),                       \
-+  product(uintx, MaxHeapSize, ScaleForWordSize(512*M),                       \
-           "Default maximum size for object heap (in bytes)")                \
-                                                                             \
-   product_pd(uintx, NewSize, 						    \
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-no-precompiled.patch
--- a/patches/hotspot/14.0b08/icedtea-no-precompiled.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
---- openjdk/hotspot/make/linux/makefiles/gcc.make.orig	2009-01-04 13:51:38.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2009-01-04 13:53:34.000000000 +0000
-@@ -34,13 +34,6 @@
- CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1)
- CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
- 
--# check for precompiled headers support
--ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
--USE_PRECOMPILED_HEADER=1
--PRECOMPILED_HEADER_DIR=.
--PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch
--endif
--
- 
- #------------------------------------------------------------------------
- # Compiler flags
---- openjdk/hotspot/make/solaris/makefiles/gcc.make.orig	2009-01-04 14:44:12.000000000 +0000
-+++ openjdk/hotspot/make/solaris/makefiles/gcc.make	2009-01-04 17:06:50.000000000 +0000
-@@ -45,13 +45,6 @@
- $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
- 
- 
--# check for precompiled headers support
--ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
--USE_PRECOMPILED_HEADER=1
--PRECOMPILED_HEADER_DIR=.
--PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch
--endif
--
- 
- #------------------------------------------------------------------------
- # Compiler flags
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-params-cast-size_t.patch
--- a/patches/hotspot/14.0b08/icedtea-params-cast-size_t.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2008-09-01 01:47:18.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2008-09-01 01:53:31.000000000 +0100
-@@ -938,7 +938,7 @@
-   if (free_percentage < desired_free_percentage) {
-     size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
-     assert(desired_capacity >= capacity(), "invalid expansion size");
--    expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
-+    expand_bytes = MAX2((long unsigned int) (desired_capacity - capacity()), (long unsigned int) MinHeapDeltaBytes);
-   }
-   if (expand_bytes > 0) {
-     if (PrintGCDetails && Verbose) {
-@@ -6044,7 +6044,7 @@
-     HeapWord* curAddr = _markBitMap.startWord();
-     while (curAddr < _markBitMap.endWord()) {
-       size_t remaining  = pointer_delta(_markBitMap.endWord(), curAddr);
--      MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
-+      MemRegion chunk(curAddr, MIN2((size_t) CMSBitMapYieldQuantum, remaining));
-       _markBitMap.clear_large_range(chunk);
-       if (ConcurrentMarkSweepThread::should_yield() &&
-           !foregroundGCIsActive() &&
-@@ -6332,7 +6332,7 @@
-     return;
-   }
-   // Double capacity if possible
--  size_t new_capacity = MIN2(_capacity*2, CMSMarkStackSizeMax);
-+  size_t new_capacity = MIN2((size_t) (_capacity*2), (size_t) CMSMarkStackSizeMax);
-   // Do not give up existing stack until we have managed to
-   // get the double capacity that we desired.
-   ReservedSpace rs(ReservedSpace::allocation_align_size_up(
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2008-08-14 08:40:10.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2008-09-01 01:49:59.000000000 +0100
-@@ -904,8 +904,8 @@
- void PSParallelCompact::initialize_dead_wood_limiter()
- {
-   const size_t max = 100;
--  _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
--  _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
-+  _dwl_mean = double(MIN2((size_t) ParallelOldDeadWoodLimiterMean, max)) / 100.0;
-+  _dwl_std_dev = double(MIN2((size_t) ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
-   _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
-   DEBUG_ONLY(_dwl_initialized = true;)
-   _dwl_adjustment = normal_distribution(1.0);
-diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp
---- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2008-08-14 08:40:10.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2008-09-01 01:52:42.000000000 +0100
-@@ -63,7 +63,7 @@
-   _last_used = current_live;
- 
-   // We have different alignment constraints than the rest of the heap.
--  const size_t alignment = MAX2(MinPermHeapExpansion,
-+  const size_t alignment = MAX2((size_t) MinPermHeapExpansion,
-                                 virtual_space()->alignment());
- 
-   // Compute the desired size:
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp	2008-08-14 08:40:10.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	2008-09-01 02:58:03.000000000 +0100
-@@ -287,7 +287,7 @@
-     // yield a size that is too small) and bound it by MaxNewSize above.
-     // Ergonomics plays here by previously calculating the desired
-     // NewSize and MaxNewSize.
--    max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize);
-+    max_new_size = MIN2(MAX2(max_new_size, (size_t) NewSize), (size_t) MaxNewSize);
-   }
-   assert(max_new_size > 0, "All paths should set max_new_size");
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
---- openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2008-08-14 08:40:11.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2008-09-01 01:49:59.000000000 +0100
-@@ -222,7 +222,7 @@
-   size_t init_sz;
- 
-   if (TLABSize > 0) {
--    init_sz = MIN2(TLABSize / HeapWordSize, max_size());
-+    init_sz = MIN2((size_t) (TLABSize / HeapWordSize), max_size());
-   } else if (global_stats() == NULL) {
-     // Startup issue - main thread initialized before heap initialized.
-     init_sz = min_size();
-diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
---- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2008-09-01 01:47:17.000000000 +0100
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2008-09-01 01:58:01.000000000 +0100
-@@ -1025,7 +1025,7 @@
-   // for "short" pauses ~ 4M*ParallelGCThreads
-   if (FLAG_IS_DEFAULT(MaxNewSize)) {  // MaxNewSize not set at command-line
-     if (!FLAG_IS_DEFAULT(NewSize)) {   // NewSize explicitly set at command-line
--      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
-+      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t) NewSize, preferred_max_new_size));
-     } else {
-       FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
-     }
-@@ -1038,7 +1038,7 @@
-   // Old to Young gen size so as to shift the collection load
-   // to the old generation concurrent collector
-   if (FLAG_IS_DEFAULT(NewRatio)) {
--    FLAG_SET_ERGO(intx, NewRatio, MAX2(NewRatio, new_ratio));
-+    FLAG_SET_ERGO(intx, NewRatio, MAX2((intx) NewRatio, new_ratio));
- 
-     size_t min_new  = align_size_up(ScaleForWordSize(min_new_default), os::vm_page_size());
-     size_t prev_initial_size = initial_heap_size();
-@@ -1067,8 +1067,8 @@
-       // Unless explicitly requested otherwise, make young gen
-       // at least min_new, and at most preferred_max_new_size.
-       if (FLAG_IS_DEFAULT(NewSize)) {
--        FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new));
--        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize));
-+        FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t) NewSize, min_new));
-+        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t) NewSize));
-         if(PrintGCDetails && Verbose) {
-           // Too early to use gclog_or_tty
-           tty->print_cr("Ergo set NewSize: " SIZE_FORMAT, NewSize);
-@@ -1079,7 +1079,7 @@
-       // later NewRatio will decide how it grows; see above.
-       if (FLAG_IS_DEFAULT(OldSize)) {
-         if (max_heap > NewSize) {
--          FLAG_SET_ERGO(uintx, OldSize, MIN2(3*NewSize,  max_heap - NewSize));
-+          FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t) (3*NewSize),  max_heap - (size_t) NewSize));
-           if(PrintGCDetails && Verbose) {
-             // Too early to use gclog_or_tty
-             tty->print_cr("Ergo set OldSize: " SIZE_FORMAT, OldSize);
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-parisc-opt.patch
--- a/patches/hotspot/14.0b08/icedtea-parisc-opt.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
---- openjdk/hotspot/make/linux/makefiles/product.make.orig	2008-12-10 19:02:31.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/product.make	2008-12-10 19:24:53.000000000 +0100
-@@ -25,6 +25,11 @@
- # Sets make macros for making optimized version of Gamma VM
- # (This is the "product", not the "release" version.)
- 
-+# work around an ICE in gcc-4.1 and gcc-4.3 on parisc-linux
-+ifeq ($(BUILDARCH)-$(ZERO_LIBARCH), zero-parisc)
-+  OPT_CFLAGS/codeBlob.o = $(OPT_CFLAGS/NOOPT)
-+endif
-+
- # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
- OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
- OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
---- openjdk/hotspot/make/linux/makefiles/optimized.make.orig	2008-12-10 19:02:22.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/optimized.make	2008-12-10 19:24:24.000000000 +0100
-@@ -25,6 +25,11 @@
- # Sets make macros for making optimized version of Gamma VM
- # (This is the "product", not the "release" version.)
- 
-+# work around an ICE in gcc-4.1 and gcc-4.3 on parisc-linux
-+ifeq ($(BUILDARCH)-$(ZERO_LIBARCH), zero-parisc)
-+  OPT_CFLAGS/codeBlob.o = $(OPT_CFLAGS/NOOPT)
-+endif
-+
- # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
- OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
- OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-shark-build.patch
--- a/patches/hotspot/14.0b08/icedtea-shark-build.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,233 +0,0 @@
-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
-@@ -158,6 +158,13 @@
- #       profiledcore    core            <os>_<arch>_core/profiled
- #       productcore     core            <os>_<arch>_core/product
- #
-+#       debugshark      shark           <os>_<arch>_shark/debug
-+#       fastdebugshark  shark           <os>_<arch>_shark/fastdebug
-+#       jvmgshark       shark           <os>_<arch>_shark/jvmg
-+#       optimizedshark  shark           <os>_<arch>_shark/optimized
-+#       profiledshark   shark           <os>_<arch>_shark/profiled
-+#       productshark    shark           <os>_<arch>_shark/product
-+#
- # What you get with each target:
- #
- # debug*     - "thin" libjvm_g - debug info linked into the gamma_g launcher
-@@ -176,11 +183,13 @@
- SUBDIRS_C2        = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS))
- SUBDIRS_TIERED    = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
- SUBDIRS_CORE      = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
-+SUBDIRS_SHARK     = $(addprefix $(OSNAME)_$(BUILDARCH)_shark/,$(TARGETS))
- 
- TARGETS_C2        = $(TARGETS)
- TARGETS_C1        = $(addsuffix 1,$(TARGETS))
- TARGETS_TIERED    = $(addsuffix tiered,$(TARGETS))
- TARGETS_CORE      = $(addsuffix core,$(TARGETS))
-+TARGETS_SHARK     = $(addsuffix shark,$(TARGETS))
- 
- BUILDTREE_MAKE    = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
- BUILDTREE_VARS    = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
-@@ -196,6 +205,7 @@
- 	@echo "  $(TARGETS_C2)"
- 	@echo "  $(TARGETS_C1)"
- 	@echo "  $(TARGETS_CORE)"
-+	@echo "  $(TARGETS_SHARK)"
- 
- checks: check_os_version check_j2se_version
- 
-@@ -245,6 +255,10 @@
- 	$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
- 	$(BUILDTREE) VARIANT=core
- 
-+$(SUBDIRS_SHARK): $(BUILDTREE_MAKE)
-+	$(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 @@
- 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
- endif
- 
-+$(TARGETS_SHARK):  $(SUBDIRS_SHARK)
-+	cd $(OSNAME)_$(BUILDARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS)
-+ifdef INSTALL
-+	cd $(OSNAME)_$(BUILDARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install
-+endif
-+
- # Just build the tree, and nothing else:
- tree:      $(SUBDIRS_C2)
- tree1:     $(SUBDIRS_C1)
-@@ -305,7 +325,7 @@
- 
- #-------------------------------------------------------------------------------
- 
--.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE)
-+.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_SHARK)
- .PHONY: tree tree1 treecore
- .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 @@
- 
- ../shared_dirs.lst:  $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
- 	@echo Creating directory list $@
--	$(QUIETLY) find $(GAMMADIR)/src/share/vm/* -prune \
--	-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
-+	$(QUIETLY) find -L $(GAMMADIR)/src/share/vm/* -prune \
-+	-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find -L {} \
-         \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@
- 
- 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 @@
- EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so
- EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so
- ifndef ICEDTEA_CORE_BUILD
-+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 @@
-     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
- CFLAGS += $(LIBFFI_CFLAGS)
- endif
-+ifdef ICEDTEA_SHARK_BUILD
-+CFLAGS += $(LLVM_CFLAGS)
-+endif
- CFLAGS += $(VM_PICFLAG)
- 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 @@
- 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
-+Include_DBs/SHARK       = $(Include_DBs/CORE) $(VM)/includeDB_shark
- Include_DBs = $(Include_DBs/$(TYPE))
- 
- 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 @@
- 
- STATIC_CXX = true
- 
--ifeq ($(ZERO_LIBARCH), ppc64)
-+ifdef ICEDTEA_SHARK_BUILD
-   STATIC_CXX = false
- else
--  STATIC_CXX = true
-+  ifeq ($(ZERO_LIBARCH), ppc64)
-+    STATIC_CXX = false
-+  else
-+    STATIC_CXX = true
-+  endif
- endif
- 
- ifeq ($(LINK_INTO),AOUT)
-@@ -157,6 +161,10 @@
- ifdef ICEDTEA_ZERO_BUILD
- LIBS_VM += $(LIBFFI_LIBS)
- endif
-+ifdef ICEDTEA_SHARK_BUILD
-+LFLAGS_VM += $(LLVM_LDFLAGS)
-+LIBS_VM   += $(LLVM_LIBS)
-+endif
- 
- 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
-@@ -103,6 +103,15 @@
- all_debugcore:     jvmgcore docs export_debug
- all_optimizedcore: optimizedcore docs export_optimized
- 
-+# Shark (C0) targets made available with this Makefile
-+SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark
-+
-+allshark:           all_productshark all_fastdebugshark
-+all_productshark:   productshark docs export_product
-+all_fastdebugshark: fastdebugshark docs export_fastdebug
-+all_debugshark:     jvmgshark docs export_debug
-+all_optimizedshark: optimizedshark docs export_optimized
-+
- # Do everything
- world:         all create_jdk
- 
-@@ -129,6 +138,10 @@
- 	$(CD) $(GAMMADIR)/make; \
- 	$(MAKE) VM_TARGET=$@ generic_buildcore $(ALT_OUT)
- 
-+$(SHARK_VM_TARGETS):
-+	$(CD) $(GAMMADIR)/make; \
-+	$(MAKE) VM_TARGET=$@ generic_buildshark $(ALT_OUT)
-+
- $(KERNEL_VM_TARGETS):
- 	$(CD) $(GAMMADIR)/make; \
- 	$(MAKE) VM_TARGET=$@ generic_buildkernel $(ALT_OUT)
-@@ -181,6 +194,12 @@
- 		$(MAKE) -f $(ABS_OS_MAKEFILE) \
- 			$(MAKE_ARGS) $(VM_TARGET)
- 
-+generic_buildshark:
-+	$(MKDIR) -p $(OUTPUTDIR)
-+	$(CD) $(OUTPUTDIR); \
-+		$(MAKE) -f $(ABS_OS_MAKEFILE) \
-+			$(MAKE_ARGS) $(VM_TARGET) 
-+
- generic_buildkernel:
- 	$(MKDIR) -p $(OUTPUTDIR)
- ifeq ($(OSNAME),windows)
-@@ -230,8 +249,12 @@
- ifdef ICEDTEA_CORE_BUILD
- C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_core
- else
-+ifdef ICEDTEA_SHARK_BUILD
-+C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_shark
-+else
- C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2
- endif
-+endif
- KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel
- C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR)
- C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR)
-@@ -242,6 +265,10 @@
-   MISC_DIR=$(C2_DIR)
-   GEN_DIR=$(C2_BASE_DIR)/generated
- else
-+ifdef ICEDTEA_SHARK_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
-@@ -250,6 +277,7 @@
-   GEN_DIR=$(C2_BASE_DIR)/generated
- endif
- endif
-+endif
- 
- # Bin files (windows)
- ifeq ($(OSNAME),windows)
-
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-shark.patch
--- a/patches/hotspot/14.0b08/icedtea-shark.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,366 +0,0 @@
---- openjdk/hotspot/src/share/vm/oops/methodOop.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/oops/methodOop.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -727,10 +727,14 @@
-   }
- 
-   OrderAccess::storestore();
-+#ifdef SHARK
-+  mh->_from_interpreted_entry = code->instructions_begin();
-+#else
-   mh->_from_compiled_entry = code->verified_entry_point();
-   OrderAccess::storestore();
-   // Instantly compiled code can execute.
-   mh->_from_interpreted_entry = mh->get_i2c_entry();
-+#endif // SHARK
- 
- }
- 
---- openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -44,6 +44,7 @@
-   friend class VMStructs;
-   friend class CardTableRS;
-   friend class CheckForUnmarkedOops; // Needs access to raw card bytes.
-+  friend class SharkBuilder;
- #ifndef PRODUCT
-   // For debugging.
-   friend class GuaranteeNotModClosure;
---- openjdk/hotspot/src/share/vm/runtime/globals.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/globals.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -176,6 +176,18 @@
-   #define C2_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{C2 notproduct}", DEFAULT },
- #endif
- 
-+#define SHARK_PRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark product}", DEFAULT },
-+#define SHARK_PD_PRODUCT_FLAG_STRUCT(type, name, doc)     { #type, XSTR(name), &name, "{Shark pd product}", DEFAULT },
-+#define SHARK_DIAGNOSTIC_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark diagnostic}", DEFAULT },
-+#ifdef PRODUCT
-+  #define SHARK_DEVELOP_FLAG_STRUCT(type, name, value, doc) /* flag is constant */
-+  #define SHARK_PD_DEVELOP_FLAG_STRUCT(type, name, doc)     /* flag is constant */
-+  #define SHARK_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc)
-+#else
-+  #define SHARK_DEVELOP_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark}", DEFAULT },
-+  #define SHARK_PD_DEVELOP_FLAG_STRUCT(type, name, doc)     { #type, XSTR(name), &name, "{Shark pd}", DEFAULT },
-+  #define SHARK_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark notproduct}", DEFAULT },
-+#endif
- 
- static Flag flagTable[] = {
-  RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_EXPERIMENTAL_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT, RUNTIME_MANAGEABLE_FLAG_STRUCT, RUNTIME_PRODUCT_RW_FLAG_STRUCT, RUNTIME_LP64_PRODUCT_FLAG_STRUCT)
-@@ -189,6 +201,9 @@
- #ifdef COMPILER2
-  C2_FLAGS(C2_DEVELOP_FLAG_STRUCT, C2_PD_DEVELOP_FLAG_STRUCT, C2_PRODUCT_FLAG_STRUCT, C2_PD_PRODUCT_FLAG_STRUCT, C2_DIAGNOSTIC_FLAG_STRUCT, C2_NOTPRODUCT_FLAG_STRUCT)
- #endif
-+#ifdef SHARK
-+ SHARK_FLAGS(SHARK_DEVELOP_FLAG_STRUCT, SHARK_PD_DEVELOP_FLAG_STRUCT, SHARK_PRODUCT_FLAG_STRUCT, SHARK_PD_PRODUCT_FLAG_STRUCT, SHARK_DIAGNOSTIC_FLAG_STRUCT, SHARK_NOTPRODUCT_FLAG_STRUCT)
-+#endif
-  {0, NULL, NULL}
- };
- 
---- openjdk/hotspot/src/share/vm/runtime/vframeArray.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/vframeArray.cpp	2008-12-03 14:33:49.000000000 +0000
-@@ -64,6 +64,11 @@
-       assert(monitor->owner() == NULL || (!monitor->owner()->is_unlocked() && !monitor->owner()->has_bias_pattern()), "object must be null or locked, and unbiased");
-       BasicObjectLock* dest = _monitors->at(index);
-       dest->set_obj(monitor->owner());
-+#ifdef SHARK
-+      // XXX This can be removed when Shark knows
-+      // which monitors are in use.
-+      if (monitor->owner())
-+#endif // SHARK
-       monitor->lock()->move_to(monitor->owner(), dest->lock());
-     }
-   }
-@@ -262,6 +267,11 @@
-     top = iframe()->previous_monitor_in_interpreter_frame(top);
-     BasicObjectLock* src = _monitors->at(index);
-     top->set_obj(src->obj());
-+#ifdef SHARK
-+    // XXX This can be removed when Shark knows
-+    // which monitors are in use.
-+    if (src->obj())
-+#endif // SHARK    
-     src->lock()->move_to(src->obj(), top->lock());
-   }
-   if (ProfileInterpreter) {
---- openjdk/hotspot/src/share/vm/runtime/vm_version.cpp.orig	2008-12-03 14:23:37.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -94,12 +94,16 @@
- #ifdef TIERED
-   #define VMTYPE "Server"
- #else
-+#ifdef SHARK
-+  #define VMTYPE "Shark"
-+#else
- #if defined(COMPILER1) || defined(COMPILER2)
--   #define VMTYPE COMPILER1_PRESENT("Client")   \
--                  COMPILER2_PRESENT("Server")
-+  #define VMTYPE COMPILER1_PRESENT("Client")   \
-+                 COMPILER2_PRESENT("Server")
- #else
-   #define VMTYPE "Core"
- #endif // COMPILER1 || COMPILER2
-+#endif // SHARK
- #endif // TIERED
- #endif // KERNEL
- 
---- openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -229,6 +229,7 @@
- 
-   }
- 
-+#ifndef SHARK
-   // Compute the caller frame based on the sender sp of stub_frame and stored frame sizes info.
-   CodeBlob* cb = stub_frame.cb();
-   // Verify we have the right vframeArray
-@@ -239,6 +240,10 @@
-   assert(cb->is_deoptimization_stub() || cb->is_uncommon_trap_stub(), "just checking");
-   Events::log("fetch unroll sp " INTPTR_FORMAT, unpack_sp);
- #endif
-+#else
-+  intptr_t* unpack_sp = stub_frame.sender(&dummy_map).unextended_sp();
-+#endif // !SHARK
-+  
-   // This is a guarantee instead of an assert because if vframe doesn't match
-   // we will unpack the wrong deoptimized frame and wind up in strange places
-   // where it will be very difficult to figure out what went wrong. Better
-@@ -349,7 +354,9 @@
- 
-   frame_pcs[0] = deopt_sender.raw_pc();
- 
-+#ifndef SHARK
-   assert(CodeCache::find_blob_unsafe(frame_pcs[0]) != NULL, "bad pc");
-+#endif // SHARK
- 
-   UnrollBlock* info = new UnrollBlock(array->frame_size() * BytesPerWord,
-                                       caller_adjustment * BytesPerWord,
-@@ -890,7 +897,20 @@
-   // stuff a C2I adapter we can properly fill in the callee-save
-   // register locations.
-   frame caller = fr.sender(reg_map);
-+#ifdef ZERO
-+  int frame_size;
-+  {
-+    // In zero, frame::sp() is the *end* of the frame, so
-+    // caller.sp() - fr.sp() is the size of the *caller*.
-+    RegisterMap dummy_map(thread, false);
-+    frame frame_1 = thread->last_frame();
-+    frame frame_2 = frame_1.sender(&dummy_map);
-+    assert(frame_2.sp() == fr.sp(), "should be");
-+    frame_size = frame_2.sp() - frame_1.sp();
-+  }
-+#else
-   int frame_size = caller.sp() - fr.sp();
-+#endif // ZERO
- 
-   frame sender = caller;
- 
-@@ -1057,7 +1077,7 @@
- JRT_END
- 
- 
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
- void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int index, TRAPS) {
-   // in case of an unresolved klass entry, load the class.
-   if (constant_pool->tag_at(index).is_unresolved_klass()) {
-@@ -1808,7 +1828,7 @@
-     if (xtty != NULL)  xtty->tail("statistics");
-   }
- }
--#else // COMPILER2
-+#else // COMPILER2 || SHARK
- 
- 
- // Stubs for C1 only system.
-@@ -1844,4 +1864,4 @@
-   return buf;
- }
- 
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
---- openjdk/hotspot/src/share/vm/runtime/globals.hpp.orig	2008-12-03 14:22:17.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -22,7 +22,7 @@
-  *
-  */
- 
--#if !defined(COMPILER1) && !defined(COMPILER2)
-+#if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK)
- define_pd_global(bool, BackgroundCompilation,        false);
- define_pd_global(bool, UseTLAB,                      false);
- define_pd_global(bool, CICompileOSR,                 false);
---- openjdk/hotspot/src/share/vm/code/nmethod.hpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/code/nmethod.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -318,6 +318,7 @@
- 
-   bool is_compiled_by_c1() const;
-   bool is_compiled_by_c2() const;
-+  bool is_compiled_by_shark() const;
- 
-   // boundaries for different parts
-   address code_begin         () const             { return _entry_point; }
---- openjdk/hotspot/src/share/vm/code/nmethod.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/code/nmethod.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -65,6 +65,11 @@
-   assert(compiler() != NULL, "must be");
-   return compiler()->is_c2();
- }
-+bool nmethod::is_compiled_by_shark() const {
-+  if (is_native_method()) return false;
-+  assert(compiler() != NULL, "must be");
-+  return compiler()->is_shark();
-+}
- 
- 
- 
-@@ -1567,6 +1572,7 @@
- // Method that knows how to preserve outgoing arguments at call. This method must be
- // called with a frame corresponding to a Java invoke
- void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) {
-+#ifndef SHARK
-   if (!method()->is_native()) {
-     SimpleScopeDesc ssd(this, fr.pc());
-     Bytecode_invoke* call = Bytecode_invoke_at(ssd.method(), ssd.bci());
-@@ -1574,6 +1580,7 @@
-     symbolOop signature = call->signature();
-     fr.oops_compiled_arguments_do(signature, is_static, reg_map, f);
-   }
-+#endif // !SHARK
- }
- 
- 
-@@ -2003,6 +2010,8 @@
-     tty->print("(c1) ");
-   } else if (is_compiled_by_c2()) {
-     tty->print("(c2) ");
-+  } else if (is_compiled_by_shark()) {
-+    tty->print("(shark) ");
-   } else {
-     tty->print("(nm) ");
-   }
---- openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -554,6 +554,14 @@
- #endif
- #endif // COMPILER2
- 
-+#ifdef SHARK
-+#if defined(COMPILER1) || defined(COMPILER2)
-+#error "Can't use COMPILER1 or COMPILER2 with shark"
-+#endif
-+  _compilers[0] = new SharkCompiler();
-+  _compilers[1] = _compilers[0];  
-+#endif
-+  
-   // Initialize the CompileTask free list
-   _task_free_list = NULL;
- 
---- openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -45,18 +45,26 @@
-   // Missing feature tests
-   virtual bool supports_native()                 { return true; }
-   virtual bool supports_osr   ()                 { return true; }
--#if defined(TIERED) || ( !defined(COMPILER1) && !defined(COMPILER2))
-+#if defined(TIERED) || ( !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK))
-   virtual bool is_c1   ()                        { return false; }
-   virtual bool is_c2   ()                        { return false; }
-+  virtual bool is_shark()                        { return false; }
- #else
- #ifdef COMPILER1
-   bool is_c1   ()                                { return true; }
-   bool is_c2   ()                                { return false; }
-+  bool is_shark()                                { return false; }
- #endif // COMPILER1
- #ifdef COMPILER2
-   bool is_c1   ()                                { return false; }
-   bool is_c2   ()                                { return true; }
-+  bool is_shark()                                { return false; }
- #endif // COMPILER2
-+#ifdef SHARK
-+  bool is_c1   ()                                { return false; }
-+  bool is_c2   ()                                { return false; }
-+  bool is_shark()                                { return true; }
-+#endif // SHARK  
- #endif // TIERED
- 
-   // Customization
---- openjdk/hotspot/src/share/vm/ci/ciMethod.hpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp	2008-12-03 14:33:48.000000000 +0000
-@@ -69,7 +69,7 @@
- 
-   // Optional liveness analyzer.
-   MethodLiveness* _liveness;
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   ciTypeFlow*     _flow;
- #endif
- 
---- openjdk/hotspot/src/share/vm/ci/ciMethod.cpp.orig	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp	2008-12-03 14:33:48.000000000 +0000
-@@ -56,9 +56,9 @@
-   _liveness           = NULL;
-   _bcea = NULL;
-   _method_blocks = NULL;
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   _flow               = NULL;
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
- 
-   if (JvmtiExport::can_hotswap_or_post_breakpoint() && _is_compilable) {
-     // 6328518 check hotswap conditions under the right lock.
-@@ -124,9 +124,9 @@
-   _bcea = NULL;
-   _method_blocks = NULL;
-   _method_data = NULL;
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   _flow = NULL;
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
- }
- 
- 
-@@ -294,34 +294,34 @@
- // ------------------------------------------------------------------
- // ciMethod::get_flow_analysis
- ciTypeFlow* ciMethod::get_flow_analysis() {
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   if (_flow == NULL) {
-     ciEnv* env = CURRENT_ENV;
-     _flow = new (env->arena()) ciTypeFlow(env, this);
-     _flow->do_flow();
-   }
-   return _flow;
--#else // COMPILER2
-+#else // COMPILER2 || SHARK
-   ShouldNotReachHere();
-   return NULL;
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
- }
- 
- 
- // ------------------------------------------------------------------
- // ciMethod::get_osr_flow_analysis
- ciTypeFlow* ciMethod::get_osr_flow_analysis(int osr_bci) {
--#ifdef COMPILER2
-+#if defined(COMPILER2) || defined(SHARK)
-   // OSR entry points are always place after a call bytecode of some sort
-   assert(osr_bci >= 0, "must supply valid OSR entry point");
-   ciEnv* env = CURRENT_ENV;
-   ciTypeFlow* flow = new (env->arena()) ciTypeFlow(env, this, osr_bci);
-   flow->do_flow();
-   return flow;
--#else // COMPILER2
-+#else // COMPILER2 || SHARK
-   ShouldNotReachHere();
-   return NULL;
--#endif // COMPILER2
-+#endif // COMPILER2 || SHARK
- }
- 
- // ------------------------------------------------------------------
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-sparc-buildfixes.patch
--- a/patches/hotspot/14.0b08/icedtea-sparc-buildfixes.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
---- openjdk/hotspot/make/linux/makefiles/gcc.make.orig	2008-12-04 20:29:08.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2008-12-04 20:32:54.000000000 +0000
-@@ -52,6 +52,10 @@
- PICFLAG = -fpic
- endif
- 
-+ifneq ($(filter sparc sparcv9,$(BUILDARCH)),)
-+PICFLAG = -fPIC
-+endif
-+
- VM_PICFLAG/LIBJVM = $(PICFLAG)
- VM_PICFLAG/AOUT   =
- VM_PICFLAG        = $(VM_PICFLAG/$(LINK_INTO))
---- openjdk/hotspot/make/linux/makefiles/defs.make.orig	2008-12-04 20:29:04.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/defs.make	2008-12-04 20:32:54.000000000 +0000
-@@ -59,7 +59,7 @@
- endif
- 
- # sparc
--ifeq ($(ARCH), sparc64)
-+ifneq (,$(filter $(ARCH), sparc sparc64))
-   ifeq ($(ARCH_DATA_MODEL), 64)
-     ARCH_DATA_MODEL  = 64
-     MAKE_ARGS        += LP64=1
---- openjdk/hotspot/src/cpu/sparc/vm/frame_sparc.hpp.orig	2008-12-04 20:32:19.000000000 +0000
-+++ openjdk/hotspot/src/cpu/sparc/vm/frame_sparc.hpp	2008-12-04 20:32:54.000000000 +0000
-@@ -264,7 +264,7 @@
- 
-  private:
- 
--  constantPoolCacheOop* frame::interpreter_frame_cpoolcache_addr() const;
-+  constantPoolCacheOop* interpreter_frame_cpoolcache_addr() const;
- 
- #ifndef CC_INTERP
- 
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-sparc-ptracefix.patch
--- a/patches/hotspot/14.0b08/icedtea-sparc-ptracefix.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-diff -up openjdk/hotspot/agent/src/os/linux/libproc.h.BAD openjdk/hotspot/agent/src/os/linux/libproc.h
---- openjdk/hotspot/agent/src/os/linux/libproc.h.BAD	2008-05-29 19:03:34.000000000 -0400
-+++ openjdk/hotspot/agent/src/os/linux/libproc.h	2008-05-29 19:01:45.000000000 -0400
-@@ -34,14 +34,25 @@
- 
- #if defined(sparc) || defined(sparcv9)
- /*
--  If _LP64 is defined ptrace.h should be taken from /usr/include/asm-sparc64
--  otherwise it should be from /usr/include/asm-sparc
--  These two files define pt_regs structure differently
-+  Taken from asm-sparc/ptrace.h and asm-sparc64/ptrace.h
- */ 
- #ifdef _LP64
--#include "asm-sparc64/ptrace.h"
-+struct pt_regs {
-+	unsigned long u_regs[16]; /* globals and ins */
-+	unsigned long tstate;
-+	unsigned long tpc;
-+	unsigned long tnpc;
-+	unsigned int y;
-+	unsigned int fprs;
-+};
- #else
--#include "asm-sparc/ptrace.h"
-+struct pt_regs {
-+	unsigned long psr;
-+	unsigned long pc;
-+	unsigned long npc;
-+	unsigned long y;
-+	unsigned long u_regs[16]; /* globals and ins */
-+};
- #endif
- 
- #endif //sparc or sparcv9
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-sparc-trapsfix.patch
--- a/patches/hotspot/14.0b08/icedtea-sparc-trapsfix.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp
---- openjdk.orig/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp	2008-08-04 08:40:18.000000000 +0100
-+++ openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp	2008-08-09 01:29:51.000000000 +0100
-@@ -25,7 +25,16 @@
- #include "incls/_precompiled.incl"
- #include "incls/_assembler_linux_sparc.cpp.incl"
- 
--#include <asm-sparc/traps.h>
-+/* Headers for 32bit sparc with a 32bit userland end up in asm/
-+ * Headers for 32bit sparc with a 64bit userland end up in asm-sparc/
-+ * There is no traps.h in asm-sparc64/
-+ */
-+
-+#if defined(__sparc__) && defined(__arch64__)
-+# include <asm-sparc/traps.h>
-+#else 
-+# include <asm/traps.h>
-+#endif
- 
- void MacroAssembler::read_ccr_trap(Register ccr_save) {
-   // No implementation
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-sparc64-linux.patch
--- a/patches/hotspot/14.0b08/icedtea-sparc64-linux.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +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-06-22 22:28:06.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/defs.make	2008-06-22 22:35:27.000000000 +0100
-@@ -73,6 +73,14 @@
-   HS_ARCH            = sparc
- endif
- 
-+# sparc
-+ifeq ($(ARCH), sparc)
-+  ARCH_DATA_MODEL  = 32
-+  PLATFORM         = linux-sparc
-+  VM_PLATFORM      = linux_sparc
-+  HS_ARCH          = sparc
-+endif
-+
- # x86_64
- ifeq ($(ARCH), x86_64) 
-   ifeq ($(ARCH_DATA_MODEL), 64)
-diff -Nru openjdk.orig/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp
---- openjdk.orig/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	2008-06-22 20:44:41.000000000 +0100
-+++ openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	2008-06-22 22:35:27.000000000 +0100
-@@ -1112,20 +1112,12 @@
- 
- void LIRGenerator::volatile_field_store(LIR_Opr value, LIR_Address* address,
-                                         CodeEmitInfo* info) {
--#ifdef _LP64
--  __ store(value, address, info);
--#else
-   __ volatile_store_mem_reg(value, address, info);
--#endif
- }
- 
- void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result,
-                                        CodeEmitInfo* info) {
--#ifdef _LP64
--  __ load(address, result, info);
--#else
-   __ volatile_load_mem_reg(address, result, info);
--#endif
- }
- 
- 
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-static-libstdc++.patch
--- a/patches/hotspot/14.0b08/icedtea-static-libstdc++.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /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           =
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-text-relocations.patch
--- a/patches/hotspot/14.0b08/icedtea-text-relocations.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-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-17 08:40:27.000000000 +0100
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2008-07-21 23:10:50.000000000 +0100
-@@ -46,7 +46,11 @@
- # Compiler flags
- 
- # position-independent code
-+ifneq ($(filter parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),)
- PICFLAG = -fPIC
-+else
-+PICFLAG = -fpic
-+endif
- 
- VM_PICFLAG/LIBJVM = $(PICFLAG)
- VM_PICFLAG/AOUT   =
---- rules.make.orig	2008-12-12 11:23:31.000000000 -0500
-+++ openjdk/hotspot/make/linux/makefiles/rules.make	2008-12-12 11:32:26.000000000 -0500
-@@ -138,20 +138,10 @@
- include $(GAMMADIR)/make/pic.make
- endif
- 
--# The non-PIC object files are only generated for 32 bit platforms.
--ifdef LP64
- %.o: %.cpp
- 	@echo Compiling $<
- 	$(QUIETLY) $(REMOVE_TARGET)
- 	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
--else
--%.o: %.cpp
--	@echo Compiling $<
--	$(QUIETLY) $(REMOVE_TARGET)
--	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
--	   $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
--	   $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
--endif
- 
- %.o: %.s
- 	@echo Assembling $<
---- rules.make.orig	2008-12-12 11:42:55.000000000 -0500
-+++ openjdk/hotspot/make/solaris/makefiles/rules.make	2008-12-12 11:44:01.000000000 -0500
-@@ -138,20 +138,10 @@
- include $(GAMMADIR)/make/pic.make
- endif
- 
--# Sun compiler for 64 bit Solaris does not support building non-PIC object files.
--ifdef LP64
- %.o: %.cpp
- 	@echo Compiling $<
- 	$(QUIETLY) $(REMOVE_TARGET)
- 	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
--else
--%.o: %.cpp
--	@echo Compiling $<
--	$(QUIETLY) $(REMOVE_TARGET)
--	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
--         $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
--         $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
--endif
- 
- %.o: %.s
- 	@echo Assembling $<
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-use-idx_t.patch
--- a/patches/hotspot/14.0b08/icedtea-use-idx_t.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-diff -Nru openjdk.orig/hotspot/src/share/vm/compiler/methodLiveness.cpp openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp
---- openjdk.orig/hotspot/src/share/vm/compiler/methodLiveness.cpp	2008-11-06 08:40:55.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp	2008-11-10 00:55:09.000000000 +0000
-@@ -567,15 +567,15 @@
- 
- 
- MethodLiveness::BasicBlock::BasicBlock(MethodLiveness *analyzer, int start, int limit) :
--         _gen((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _gen((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
--         _kill((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _kill((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
--         _entry((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _entry((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
--         _normal_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _normal_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
--         _exception_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-+         _exception_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
-                          analyzer->bit_map_size_bits()),
-          _last_bci(-1) {
-   _analyzer = analyzer;
-@@ -992,7 +992,7 @@
- }
- 
- MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* method, int bci) {
--  MethodLivenessResult answer(NEW_RESOURCE_ARRAY(uintptr_t, _analyzer->bit_map_size_words()),
-+  MethodLivenessResult answer(NEW_RESOURCE_ARRAY(size_t, _analyzer->bit_map_size_words()),
-                 _analyzer->bit_map_size_bits());
-   answer.set_is_valid();
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/bitMap.hpp openjdk/hotspot/src/share/vm/utilities/bitMap.hpp
---- openjdk.orig/hotspot/src/share/vm/utilities/bitMap.hpp	2008-11-06 08:40:58.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp	2008-11-10 00:57:20.000000000 +0000
-@@ -73,7 +73,7 @@
- 
-   // Set a word to a specified value or to all ones; clear a word.
-   void set_word  (idx_t word, bm_word_t val) { _map[word] = val; }
--  void set_word  (idx_t word)            { set_word(word, ~(uintptr_t)0); }
-+  void set_word  (idx_t word)            { set_word(word, ~(idx_t)0); }
-   void clear_word(idx_t word)            { _map[word] = 0; }
- 
-   // Utilities for ranges of bits.  Ranges are half-open [beg, end).
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-version.patch
--- a/patches/hotspot/14.0b08/icedtea-version.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +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-11-06 08:40:50.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/vm.make	2008-11-19 12:15:54.000000000 +0000
-@@ -86,6 +86,10 @@
-   ${JRE_VERSION}     \
-   ${VM_DISTRO}
- 
-+ifdef DISTRIBUTION_ID
-+CPPFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\""
-+endif
-+
- # CFLAGS_WARN holds compiler options to suppress/enable warnings.
- CFLAGS += $(CFLAGS_WARN/BYFILE)
- 
-diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp openjdk/hotspot/src/share/vm/utilities/vmError.cpp
---- openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp	2008-11-06 08:40:58.000000000 +0000
-+++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp	2008-11-19 12:15:54.000000000 +0000
-@@ -165,7 +165,8 @@
- 
- static void print_bug_submit_message(outputStream *out, Thread *thread) {
-   if (out == NULL) return;
--  out->print_raw_cr("# If you would like to submit a bug report, please visit:");
-+  out->print_raw_cr("# If you would like to submit a bug report, please include");
-+  out->print_raw_cr("# instructions how to reproduce the bug and visit:");
-   out->print_raw   ("#   ");
-   out->print_raw_cr(Arguments::java_vendor_url_bug());
-   // If the crash is in native code, encourage user to submit a bug to the
-@@ -339,6 +340,9 @@
-                    Abstract_VM_Version::vm_platform_string(),
-                    UseCompressedOops ? "compressed oops" : ""
-                  );
-+#ifdef DISTRIBUTION_ID
-+     st->print_cr("# Distribution: %s", DISTRIBUTION_ID);
-+#endif
- 
-   STEP(60, "(printing problematic frame)")
- 
---- arguments.cpp       2008-12-15 12:25:14.000000000 -0500
-+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp  2008-12-15 12:25:32.000000000 -0500
-@@ -25,7 +25,7 @@
- #include "incls/_precompiled.incl"
- #include "incls/_arguments.cpp.incl"
-
--#define DEFAULT_VENDOR_URL_BUG "http://java.sun.com/webapps/bugreport/crash.jsp"
-+#define DEFAULT_VENDOR_URL_BUG "http://icedtea.classpath.org/bugzilla"
- #define DEFAULT_JAVA_LAUNCHER  "generic"
-
- char**  Arguments::_jvm_flags_array             = NULL;
diff -r 551c49cb2e2a patches/hotspot/14.0b08/icedtea-zero-build.patch
--- a/patches/hotspot/14.0b08/icedtea-zero-build.patch	Wed Feb 11 11:49:45 2009 -0500
+++ /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	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/make/defs.make	2008-11-29 02:14:15.000000000 +0000
-@@ -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	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/buildtree.make	2008-11-29 02:14:15.000000000 +0000
-@@ -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	2008-11-29 01:55:52.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/defs.make	2008-11-29 02:14:15.000000000 +0000
-@@ -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	2008-11-29 01:55:52.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/gcc.make	2008-11-29 02:14:15.000000000 +0000
-@@ -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
-@@ -72,6 +75,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	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/sa.make	2008-11-29 02:14:15.000000000 +0000
-@@ -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	2008-11-22 00:11:18.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/saproc.make	2008-11-29 02:14:15.000000000 +0000
-@@ -44,10 +44,10 @@
- DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
- 
- # 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	2008-11-29 01:55:52.000000000 +0000
-+++ openjdk/hotspot/make/linux/makefiles/vm.make	2008-11-29 02:14:15.000000000 +0000
-@@ -158,6 +158,9 @@
- 
-   LIBS_VM                  += $(LIBS)
- endif
-+ifdef ICEDTEA_ZERO_BUILD
-+LIBS_VM += $(LIBFFI_LIBS)
-+endif
- 
- LINK_VM = $(LINK_LIB.c)
- 
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-6791168.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-6791168.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,230 @@
+--- openjdk/hotspot/src/cpu/x86/vm/cppInterpreter_x86.cpp.orig	2009-01-13 10:15:42.000000000 +0000
++++ openjdk/hotspot/src/cpu/x86/vm/cppInterpreter_x86.cpp	2009-01-13 10:17:05.000000000 +0000
+@@ -594,7 +594,7 @@
+   __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), rax);
+ 
+   // for c++ interpreter can rsi really be munged?
+-  __ lea(state, Address(rbp, -sizeof(BytecodeInterpreter)));                               // restore state
++  __ lea(state, Address(rbp, -(int)sizeof(BytecodeInterpreter)));                               // restore state
+   __ movptr(rbx, Address(state, byte_offset_of(BytecodeInterpreter, _method)));            // restore method
+   __ movptr(rdi, Address(state, byte_offset_of(BytecodeInterpreter, _locals)));            // get locals pointer
+ 
+@@ -658,7 +658,7 @@
+     const Address size_of_stack    (rbx, methodOopDesc::max_stack_offset());
+     // Always give one monitor to allow us to start interp if sync method.
+     // Any additional monitors need a check when moving the expression stack
+-    const one_monitor = frame::interpreter_frame_monitor_size() * wordSize;
++    const int one_monitor = frame::interpreter_frame_monitor_size() * wordSize;
+   __ load_unsigned_word(rax, size_of_stack);                            // get size of expression stack in words
+   __ lea(rax, Address(noreg, rax, Interpreter::stackElementScale(), one_monitor));
+   __ lea(rax, Address(rax, rdx, Interpreter::stackElementScale(), overhead_size));
+@@ -1829,7 +1829,7 @@
+   Label unwind_and_forward;
+ 
+   // restore state pointer.
+-  __ lea(state, Address(rbp,  -sizeof(BytecodeInterpreter)));
++  __ lea(state, Address(rbp,  -(int)sizeof(BytecodeInterpreter)));
+ 
+   __ movptr(rbx, STATE(_method));                       // get method
+ #ifdef _LP64
+@@ -1877,14 +1877,14 @@
+ 
+   // The FPU stack is clean if UseSSE >= 2 but must be cleaned in other cases
+   if (UseSSE < 2) {
+-    __ lea(state, Address(rbp,  -sizeof(BytecodeInterpreter)));
++    __ lea(state, Address(rbp,  -(int)sizeof(BytecodeInterpreter)));
+     __ movptr(rbx, STATE(_result._to_call._callee));                   // get method just executed
+     __ movl(rcx, Address(rbx, methodOopDesc::result_index_offset()));
+     __ cmpl(rcx, AbstractInterpreter::BasicType_as_index(T_FLOAT));    // Result stub address array index
+     __ jcc(Assembler::equal, do_float);
+     __ cmpl(rcx, AbstractInterpreter::BasicType_as_index(T_DOUBLE));    // Result stub address array index
+     __ jcc(Assembler::equal, do_double);
+-#ifdef COMPILER2
++#if !defined(_LP64) || defined(COMPILER1) || !defined(COMPILER2)
+     __ empty_FPU_stack();
+ #endif // COMPILER2
+     __ jmp(done_conv);
+@@ -1928,7 +1928,7 @@
+ 
+   // Restore rsi/r13 as compiled code may not preserve it
+ 
+-  __ lea(state, Address(rbp,  -sizeof(BytecodeInterpreter)));
++  __ lea(state, Address(rbp,  -(int)sizeof(BytecodeInterpreter)));
+ 
+   // restore stack to what we had when we left (in case i2c extended it)
+ 
+@@ -1942,7 +1942,7 @@
+ #else
+   __ movptr(rcx, STATE(_thread));                       // get thread
+   __ cmpptr(Address(rcx, Thread::pending_exception_offset()), (int32_t)NULL_WORD);
+-#endif / __LP64
++#endif // _LP64
+   __ jcc(Assembler::notZero, return_with_exception);
+ 
+   // get method just executed
+--- openjdk/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp.orig	2009-01-13 10:15:42.000000000 +0000
++++ openjdk/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp	2009-01-13 10:17:05.000000000 +0000
+@@ -139,7 +139,7 @@
+ #ifdef CC_INTERP
+ 
+ inline interpreterState frame::get_interpreterState() const {
+-  return ((interpreterState)addr_at( -sizeof(BytecodeInterpreter)/wordSize ));
++  return ((interpreterState)addr_at( -((int)sizeof(BytecodeInterpreter))/wordSize ));
+ }
+ 
+ inline intptr_t*    frame::sender_sp()        const {
+--- openjdk/hotspot/src/cpu/x86/vm/assembler_x86.cpp.orig	2009-01-13 10:15:42.000000000 +0000
++++ openjdk/hotspot/src/cpu/x86/vm/assembler_x86.cpp	2009-01-13 10:17:05.000000000 +0000
+@@ -6943,29 +6943,32 @@
+ 
+   Label slow_case, done;
+ 
+-  // x ?<= pi/4
+-  fld_d(ExternalAddress((address)&pi_4));
+-  fld_s(1);                // Stack:  X  PI/4  X
+-  fabs();                  // Stack: |X| PI/4  X
+-  fcmp(tmp);
+-  jcc(Assembler::above, slow_case);
+-
+-  // fastest case: -pi/4 <= x <= pi/4
+-  switch(trig) {
+-  case 's':
+-    fsin();
+-    break;
+-  case 'c':
+-    fcos();
+-    break;
+-  case 't':
+-    ftan();
+-    break;
+-  default:
+-    assert(false, "bad intrinsic");
+-    break;
++  ExternalAddress pi4_adr = (address)&pi_4;
++  if (reachable(pi4_adr)) {
++    // x ?<= pi/4
++    fld_d(pi4_adr); // ExternalAddress((address)&pi_4));
++    fld_s(1);                // Stack:  X  PI/4  X
++    fabs();                  // Stack: |X| PI/4  X
++    fcmp(tmp);
++    jcc(Assembler::above, slow_case);
++
++    // fastest case: -pi/4 <= x <= pi/4
++    switch(trig) {
++    case 's':
++      fsin();
++      break;
++    case 'c':
++      fcos();
++      break;
++    case 't':
++      ftan();
++      break;
++    default:
++      assert(false, "bad intrinsic");
++      break;
++    }
++    jmp(done);
+   }
+-  jmp(done);
+ 
+   // slow case: runtime call
+   bind(slow_case);
+--- openjdk/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp.orig	2009-01-13 10:15:42.000000000 +0000
++++ openjdk/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp	2009-01-13 10:17:05.000000000 +0000
+@@ -2954,10 +2954,16 @@
+   __ pushptr(Address(rcx, 0));     // Save return address
+   __ enter();                      // Save old & set new rbp
+   __ subptr(rsp, rbx);             // Prolog
++#ifdef CC_INTERP
++  __ movptr(Address(rbp,
++                  -(sizeof(BytecodeInterpreter)) + in_bytes(byte_offset_of(BytecodeInterpreter, _sender_sp))),
++            sender_sp); // Make it walkable
++#else // CC_INTERP
+   __ movptr(Address(rbp, frame::interpreter_frame_sender_sp_offset * wordSize),
+             sender_sp);            // Make it walkable
+   // This value is corrected by layout_activation_impl
+   __ movptr(Address(rbp, frame::interpreter_frame_last_sp_offset * wordSize), (int32_t)NULL_WORD );
++#endif // CC_INTERP
+   __ mov(sender_sp, rsp);          // Pass sender_sp to next frame
+   __ addptr(rsi, wordSize);        // Bump array pointer (sizes)
+   __ addptr(rcx, wordSize);        // Bump array pointer (pcs)
+--- openjdk/hotspot/src/cpu/x86/vm/bytecodeInterpreter_x86.inline.hpp.orig	2009-01-13 10:15:42.000000000 +0000
++++ openjdk/hotspot/src/cpu/x86/vm/bytecodeInterpreter_x86.inline.hpp	2009-01-13 10:17:05.000000000 +0000
+@@ -213,7 +213,7 @@
+ 
+ inline jint BytecodeInterpreter::VMintDiv(jint op1, jint op2) {
+   /* it's possible we could catch this special case implicitly */
+-  if (op1 == 0x80000000 && op2 == -1) return op1;
++  if ((juint)op1 == 0x80000000 && op2 == -1) return op1;
+   else return op1 / op2;
+ }
+ 
+@@ -231,7 +231,7 @@
+ 
+ inline jint BytecodeInterpreter::VMintRem(jint op1, jint op2) {
+   /* it's possible we could catch this special case implicitly */
+-  if (op1 == 0x80000000 && op2 == -1) return 0;
++  if ((juint)op1 == 0x80000000 && op2 == -1) return 0;
+   else return op1 % op2;
+ }
+ 
+--- openjdk/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp.orig	2009-01-13 10:15:42.000000000 +0000
++++ openjdk/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp	2009-01-13 10:17:05.000000000 +0000
+@@ -30,7 +30,7 @@
+ 
+ #ifdef CC_INTERP
+ void InterpreterMacroAssembler::get_method(Register reg) {
+-  movptr(reg, Address(rbp, -(sizeof(BytecodeInterpreter) + 2 * wordSize)));
++  movptr(reg, Address(rbp, -((int)sizeof(BytecodeInterpreter) + 2 * wordSize)));
+   movptr(reg, Address(reg, byte_offset_of(BytecodeInterpreter, _method)));
+ }
+ #endif // CC_INTERP
+--- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp.orig	2009-01-13 10:16:45.000000000 +0000
++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp	2009-01-13 10:17:05.000000000 +0000
+@@ -163,7 +163,7 @@
+ #ifdef USELABELS
+ // Have to do this dispatch this way in C++ because otherwise gcc complains about crossing an
+ // initialization (which is is the initialization of the table pointer...)
+-#define DISPATCH(opcode) goto *dispatch_table[opcode]
++#define DISPATCH(opcode) goto *(void*)dispatch_table[opcode]
+ #define CONTINUE {                              \
+         opcode = *pc;                           \
+         DO_UPDATE_INSTRUCTION_COUNT(opcode);    \
+@@ -341,7 +341,7 @@
+  */
+ #undef CHECK_NULL
+ #define CHECK_NULL(obj_)                                                 \
+-    if ((obj_) == 0) {                                                   \
++    if ((obj_) == NULL) {                                                \
+         VM_JAVA_ERROR(vmSymbols::java_lang_NullPointerException(), "");  \
+     }
+ 
+@@ -1362,7 +1362,7 @@
+ 
+ #define NULL_COMPARISON_NOT_OP(name)                                         \
+       CASE(_if##name): {                                                     \
+-          int skip = (!(STACK_OBJECT(-1) == 0))                              \
++          int skip = (!(STACK_OBJECT(-1) == NULL))                           \
+                       ? (int16_t)Bytes::get_Java_u2(pc + 1) : 3;             \
+           address branch_pc = pc;                                            \
+           UPDATE_PC_AND_TOS(skip, -1);                                       \
+@@ -1372,7 +1372,7 @@
+ 
+ #define NULL_COMPARISON_OP(name)                                             \
+       CASE(_if##name): {                                                     \
+-          int skip = ((STACK_OBJECT(-1) == 0))                               \
++          int skip = ((STACK_OBJECT(-1) == NULL))                            \
+                       ? (int16_t)Bytes::get_Java_u2(pc + 1) : 3;             \
+           address branch_pc = pc;                                            \
+           UPDATE_PC_AND_TOS(skip, -1);                                       \
+--- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp.orig	2009-01-13 10:15:42.000000000 +0000
++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	2009-01-13 10:17:05.000000000 +0000
+@@ -66,7 +66,6 @@
+ friend class InterpreterGenerator;
+ friend class InterpreterMacroAssembler;
+ friend class frame;
+-friend class SharedRuntime;
+ friend class VMStructs;
+ 
+ public:
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-bytecodeInterpreter.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-bytecodeInterpreter.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,11 @@
+diff -Nru openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp
+--- openjdk.orig/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	2008-10-23 08:41:04.000000000 +0100
++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp	2008-10-30 15:48:48.000000000 +0000
+@@ -60,7 +60,6 @@
+ };
+ 
+ class BytecodeInterpreter : StackObj {
+-friend class SharedRuntime;
+ friend class AbstractInterpreterGenerator;
+ friend class CppInterpreterGenerator;
+ friend class InterpreterGenerator;
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-core-build.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-core-build.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,108 @@
+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
+ 
+
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-debuginfo.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-debuginfo.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,15 @@
+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-08-20 22:58:22.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2008-08-20 23:01:45.000000000 +0100
+@@ -62,6 +62,10 @@
+ CFLAGS += -D_REENTRANT
+ CFLAGS += -fcheck-new
+ 
++# Always generate full debuginfo on Linux.  It'll be in a separate
++# debuginfo package when building RPMs.
++CFLAGS += -g
++
+ ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
+ ARCHFLAG/i486    = -m32 -march=i586
+ ARCHFLAG/amd64   = -m64
+
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-format.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-format.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,48 @@
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2009-02-03 18:08:09.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2009-02-03 18:32:59.000000000 +0000
+@@ -1361,7 +1361,7 @@
+ 
+     // Feed the cache size setting into the JDK
+     char buffer[1024];
+-    sprintf(buffer, "java.lang.Integer.IntegerCache.high=%d", AutoBoxCacheMax);
++    sprintf(buffer, "java.lang.Integer.IntegerCache.high=" INTX_FORMAT, AutoBoxCacheMax);
+     add_property(buffer);
+   }
+   if (AggressiveOpts && FLAG_IS_DEFAULT(DoEscapeAnalysis)) {
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp openjdk/hotspot/src/share/vm/runtime/safepoint.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/safepoint.cpp	2009-01-29 15:03:07.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/safepoint.cpp	2009-02-03 18:30:55.000000000 +0000
+@@ -730,7 +730,7 @@
+   if (DieOnSafepointTimeout) {
+     char msg[1024];
+     VM_Operation *op = VMThread::vm_operation();
+-    sprintf(msg, "Safepoint sync time longer than %d ms detected when executing %s.",
++    sprintf(msg, "Safepoint sync time longer than " INTX_FORMAT " ms detected when executing %s.",
+             SafepointTimeoutDelay,
+             op != NULL ? op->name() : "no vm operation");
+     fatal(msg);
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/synchronizer.cpp openjdk/hotspot/src/share/vm/runtime/synchronizer.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/synchronizer.cpp	2009-01-29 15:03:07.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/synchronizer.cpp	2009-02-03 19:32:30.000000000 +0000
+@@ -424,7 +424,7 @@
+ // asserts is that error message -- often something about negative array
+ // indices -- is opaque.
+ 
+-#define CTASSERT(x) { int tag[1-(2*!(x))]; printf ("Tag @%X\n", tag); }
++#define CTASSERT(x) { int tag[1-(2*!(x))]; printf ("Tag @%p\n", tag); }
+ 
+ void ObjectMonitor::ctAsserts() {
+   CTASSERT(offset_of (ObjectMonitor, _header) == 0);
+diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp openjdk/hotspot/src/share/vm/utilities/vmError.cpp
+--- openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp	2009-02-03 19:10:58.000000000 +0000
++++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp	2009-02-03 19:29:15.000000000 +0000
+@@ -307,7 +307,7 @@
+ 
+          strncpy(buf, file, buflen);
+          if (len + 10 < buflen) {
+-           sprintf(buf + len, ":" SIZE_FORMAT, _lineno);
++           sprintf(buf + len, ":%d", _lineno);
+          }
+          st->print(" (%s)", buf);
+        } else {
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-gcc-4.3.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-gcc-4.3.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,54 @@
+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-12-01 12:06:51.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2008-12-01 12:27:08.000000000 +0000
+@@ -98,7 +98,7 @@
+ endif
+ 
+ # Compiler warnings are treated as errors
+-WARNINGS_ARE_ERRORS = -Werror
++# WARNINGS_ARE_ERRORS = -Werror
+ 
+ # Except for a few acceptable ones
+ # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
+diff -Nru openjdk.orig/hotspot/make/solaris/makefiles/gcc.make openjdk/hotspot/make/solaris/makefiles/gcc.make
+--- openjdk.orig/hotspot/make/solaris/makefiles/gcc.make	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/make/solaris/makefiles/gcc.make	2008-12-01 12:25:10.000000000 +0000
+@@ -109,7 +109,8 @@
+ 
+ 
+ # Compiler warnings are treated as errors 
+-WARNINGS_ARE_ERRORS = -Werror 
++# Commented out for now because of gcc 4.3 warnings OpenJDK isn't ready for
++# WARNINGS_ARE_ERRORS = -Werror 
+ # Enable these warnings. See 'info gcc' about details on these options
+ ADDITIONAL_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare 
+ CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ADDITIONAL_WARNINGS) 
+diff -Nru openjdk.orig/hotspot/src/share/vm/adlc/filebuff.cpp openjdk/hotspot/src/share/vm/adlc/filebuff.cpp
+--- openjdk.orig/hotspot/src/share/vm/adlc/filebuff.cpp	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/adlc/filebuff.cpp	2008-12-01 12:25:10.000000000 +0000
+@@ -25,6 +25,8 @@
+ // FILEBUFF.CPP - Routines for handling a parser file buffer
+ #include "adlc.hpp"
+ 
++using namespace std;
++
+ //------------------------------FileBuff---------------------------------------
+ // Create a new parsing buffer
+ FileBuff::FileBuff( BufferedFile *fptr, ArchDesc& archDesc) : _fp(fptr), _AD(archDesc) {
+diff -Nru openjdk.orig/hotspot/src/share/vm/adlc/filebuff.hpp openjdk/hotspot/src/share/vm/adlc/filebuff.hpp
+--- openjdk.orig/hotspot/src/share/vm/adlc/filebuff.hpp	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/adlc/filebuff.hpp	2008-12-01 12:25:10.000000000 +0000
+@@ -94,8 +94,11 @@
+   FileBuffRegion *copy();                   // Deep copy
+   FileBuffRegion *merge(FileBuffRegion*); // Merge 2 regions; delete input
+ 
+-//  void print(std::ostream&);
+-//  friend std::ostream& operator<< (std::ostream&, FileBuffRegion&);
++#if defined(__GNUC__) && __GNUC__ >= 3
++  void print(std::ostream&);
++  friend std::ostream& operator<< (std::ostream&, FileBuffRegion&);
++#else
+   void print(ostream&);
+   friend ostream& operator<< (ostream&, FileBuffRegion&);
++#endif
+ };
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-gcc-suffix.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-gcc-suffix.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,25 @@
+--- openjdk/hotspot/agent/src/os/linux/Makefile~	2007-08-02 09:16:50.000000000 +0200
++++ openjdk/hotspot/agent/src/os/linux/Makefile	2007-08-08 17:00:11.204338801 +0200
+@@ -23,7 +23,7 @@
+ #
+ 
+ ARCH := $(shell if ([ `uname -m` = "ia64" ])  ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi )
+-GCC      = gcc
++GCC      = gcc$(GCC_SUFFIX)
+ 
+ JAVAH    = ${JAVA_HOME}/bin/javah
+ 
+--- openjdk/hotspot/make/linux/makefiles/gcc.make~	2007-08-08 16:13:12.281815996 +0200
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2007-08-08 16:36:52.573240769 +0200
+@@ -25,8 +25,8 @@
+ #------------------------------------------------------------------------
+ # CC, CPP & AS
+ 
+-CPP = g++
+-CC  = gcc
++CPP = g++$(GCC_SUFFIX)
++CC  = gcc$(GCC_SUFFIX)
+ AS  = $(CC) -c
+ 
+ # -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only
+
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-headers.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-headers.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,13 @@
+diff -Nru openjdk.orig/hotspot/make/linux/makefiles/jvmti.make openjdk/hotspot/make/linux/makefiles/jvmti.make
+--- openjdk.orig/hotspot/make/linux/makefiles/jvmti.make	2008-05-23 20:51:14.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/jvmti.make	2008-05-23 20:54:13.000000000 +0100
+@@ -59,7 +59,7 @@
+ 
+ JvmtiGeneratedFiles = $(JvmtiGeneratedNames:%=$(JvmtiOutDir)/%)
+ 
+-XSLT = $(QUIETLY) $(REMOTE) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiGen
++XSLT = $(QUIETLY) $(REMOTE) $(RUN.JAVA) $(ENDORSED) -classpath $(JvmtiOutDir) jvmtiGen
+ 
+ .PHONY: all jvmtidocs clean cleanall
+ 
+
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-includedb.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-includedb.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,97 @@
+--- openjdk/hotspot/src/share/vm/includeDB_compiler2.orig	2009-01-13 10:10:44.000000000 +0000
++++ openjdk/hotspot/src/share/vm/includeDB_compiler2	2009-01-13 10:11:17.000000000 +0000
+@@ -140,6 +140,7 @@
+ c2_globals_<os_family>.hpp              macros.hpp
+ 
+ c2_init_<arch>.cpp                      compile.hpp
++c2_init_<arch>.cpp                      node.hpp
+ 
+ c2compiler.cpp                          ad_<arch_model>.hpp
+ c2compiler.cpp                          c2compiler.hpp
+@@ -839,6 +840,7 @@
+ phase.cpp                               compile.hpp
+ phase.cpp                               compileBroker.hpp
+ phase.cpp                               nmethod.hpp
++phase.cpp                               node.hpp
+ phase.cpp                               phase.hpp
+ 
+ phase.hpp                               port.hpp
+--- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1.orig	2009-01-13 10:10:44.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_g1	2009-01-13 10:11:17.000000000 +0000
+@@ -34,6 +34,7 @@
+ collectionSetChooser.cpp		g1CollectedHeap.hpp
+ collectionSetChooser.cpp		g1CollectorPolicy.hpp
+ collectionSetChooser.cpp		collectionSetChooser.hpp
++collectionSetChooser.cpp		space.inline.hpp
+ 
+ collectionSetChooser.hpp		heapRegion.hpp
+ collectionSetChooser.hpp                growableArray.hpp
+@@ -44,6 +45,7 @@
+ concurrentG1Refine.cpp			copy.hpp
+ concurrentG1Refine.cpp			g1CollectedHeap.hpp
+ concurrentG1Refine.cpp			g1RemSet.hpp
++concurrentG1Refine.cpp			space.inline.hpp
+ 
+ concurrentG1Refine.hpp			globalDefinitions.hpp
+ 
+@@ -264,7 +266,7 @@
+ heapRegion.cpp                          iterator.hpp
+ heapRegion.cpp                          oop.inline.hpp
+ 
+-heapRegion.hpp                          space.hpp
++heapRegion.hpp                          space.inline.hpp
+ heapRegion.hpp                          spaceDecorator.hpp
+ heapRegion.hpp                          g1BlockOffsetTable.inline.hpp
+ heapRegion.hpp                          watermark.hpp
+--- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge.orig	2009-01-13 10:10:44.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parallelScavenge	2009-01-13 10:11:17.000000000 +0000
+@@ -306,6 +306,8 @@
+ psPermGen.cpp                           psMarkSweepDecorator.hpp
+ psPermGen.cpp                           psParallelCompact.hpp
+ psPermGen.cpp                           psPermGen.hpp
++psPermGen.cpp                           markOop.inline.hpp
++psPermGen.cpp                           markSweep.inline.hpp
+ 
+ psPermGen.hpp                           psOldGen.hpp
+ 
+--- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep.orig	2009-01-13 10:10:44.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_concurrentMarkSweep	2009-01-13 10:11:17.000000000 +0000
+@@ -28,6 +28,7 @@
+ binaryTreeDictionary.cpp                binaryTreeDictionary.hpp
+ binaryTreeDictionary.cpp                globals.hpp
+ binaryTreeDictionary.cpp                ostream.hpp
++binaryTreeDictionary.cpp                space.inline.hpp
+ binaryTreeDictionary.cpp                spaceDecorator.hpp
+ 
+ binaryTreeDictionary.hpp                freeBlockDictionary.hpp
+--- openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew.orig	2009-01-13 10:10:44.000000000 +0000
++++ openjdk/hotspot/src/share/vm/gc_implementation/includeDB_gc_parNew	2009-01-13 10:11:17.000000000 +0000
+@@ -29,6 +29,8 @@
+ asParNewGeneration.cpp                  cmsAdaptiveSizePolicy.hpp
+ asParNewGeneration.cpp                  cmsGCAdaptivePolicyCounters.hpp
+ asParNewGeneration.cpp                  defNewGeneration.inline.hpp
++asParNewGeneration.cpp                  markOop.inline.hpp
++asParNewGeneration.cpp                  markSweep.inline.hpp
+ asParNewGeneration.cpp                  oop.pcgc.inline.hpp
+ asParNewGeneration.cpp                  parNewGeneration.hpp
+ asParNewGeneration.cpp                  referencePolicy.hpp
+@@ -40,7 +42,7 @@
+ parCardTableModRefBS.cpp                java.hpp
+ parCardTableModRefBS.cpp                mutexLocker.hpp
+ parCardTableModRefBS.cpp                sharedHeap.hpp
+-parCardTableModRefBS.cpp                space.hpp
++parCardTableModRefBS.cpp                space.inline.hpp
+ parCardTableModRefBS.cpp                universe.hpp
+ parCardTableModRefBS.cpp                virtualspace.hpp
+ 
+--- openjdk/hotspot/src/share/vm/includeDB_features.orig	2009-01-13 10:10:44.000000000 +0000
++++ openjdk/hotspot/src/share/vm/includeDB_features	2009-01-13 10:11:17.000000000 +0000
+@@ -59,6 +59,8 @@
+ 
+ dump_<arch_model>.cpp                   assembler_<arch>.inline.hpp
+ dump_<arch_model>.cpp                   compactingPermGenGen.hpp
++dump_<arch_model>.cpp                   generation.inline.hpp
++dump_<arch_model>.cpp                   space.inline.hpp
+ 
+ forte.cpp                               collectedHeap.inline.hpp
+ forte.cpp                               debugInfoRec.hpp
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-memory-limits.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-memory-limits.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,23 @@
+diff -Nru openjdk.orig/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp
+--- openjdk.orig/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp      2008-05-23 22:30:44.000000000 +0100
++++ openjdk/hotspot/src/cpu/x86/vm/c2_globals_x86.hpp   2008-05-23 22:30:59.000000000 +0100
+@@ -98,7 +98,7 @@
+
+ // Heap related flags
+ define_pd_global(uintx, PermSize,    ScaleForWordSize(16*M));
+-define_pd_global(uintx, MaxPermSize, ScaleForWordSize(64*M));
++define_pd_global(uintx, MaxPermSize, ScaleForWordSize(128*M));
+
+ // Ergonomics related flags
+ define_pd_global(bool, NeverActAsServerClassMachine, false);
+--- penjdk6/hotspot/src/share/vm/runtime/globals.hpp	2008-02-12 04:14:24.000000000 -0500
++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	2008-02-14 16:34:00.000000000 -0500
+@@ -2606,7 +2606,7 @@
+           "an OS lock")                                                     \
+                                                                             \
+   /* gc parameters */                                                       \
+-  product(uintx, MaxHeapSize, ScaleForWordSize(64*M),                       \
++  product(uintx, MaxHeapSize, ScaleForWordSize(512*M),                       \
+           "Default maximum size for object heap (in bytes)")                \
+                                                                             \
+   product_pd(uintx, NewSize, 						    \
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-no-precompiled.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-no-precompiled.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,32 @@
+--- openjdk/hotspot/make/linux/makefiles/gcc.make.orig	2009-01-04 13:51:38.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2009-01-04 13:53:34.000000000 +0000
+@@ -34,13 +34,6 @@
+ CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1)
+ CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
+ 
+-# check for precompiled headers support
+-ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
+-USE_PRECOMPILED_HEADER=1
+-PRECOMPILED_HEADER_DIR=.
+-PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch
+-endif
+-
+ 
+ #------------------------------------------------------------------------
+ # Compiler flags
+--- openjdk/hotspot/make/solaris/makefiles/gcc.make.orig	2009-01-04 14:44:12.000000000 +0000
++++ openjdk/hotspot/make/solaris/makefiles/gcc.make	2009-01-04 17:06:50.000000000 +0000
+@@ -45,13 +45,6 @@
+ $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
+ 
+ 
+-# check for precompiled headers support
+-ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0"
+-USE_PRECOMPILED_HEADER=1
+-PRECOMPILED_HEADER_DIR=.
+-PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/incls/_precompiled.incl.gch
+-endif
+-
+ 
+ #------------------------------------------------------------------------
+ # Compiler flags
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-params-cast-size_t.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-params-cast-size_t.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,121 @@
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2008-09-01 01:47:18.000000000 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp	2008-09-01 01:53:31.000000000 +0100
+@@ -938,7 +938,7 @@
+   if (free_percentage < desired_free_percentage) {
+     size_t desired_capacity = (size_t)(used() / ((double) 1 - desired_free_percentage));
+     assert(desired_capacity >= capacity(), "invalid expansion size");
+-    expand_bytes = MAX2(desired_capacity - capacity(), MinHeapDeltaBytes);
++    expand_bytes = MAX2((long unsigned int) (desired_capacity - capacity()), (long unsigned int) MinHeapDeltaBytes);
+   }
+   if (expand_bytes > 0) {
+     if (PrintGCDetails && Verbose) {
+@@ -6044,7 +6044,7 @@
+     HeapWord* curAddr = _markBitMap.startWord();
+     while (curAddr < _markBitMap.endWord()) {
+       size_t remaining  = pointer_delta(_markBitMap.endWord(), curAddr);
+-      MemRegion chunk(curAddr, MIN2(CMSBitMapYieldQuantum, remaining));
++      MemRegion chunk(curAddr, MIN2((size_t) CMSBitMapYieldQuantum, remaining));
+       _markBitMap.clear_large_range(chunk);
+       if (ConcurrentMarkSweepThread::should_yield() &&
+           !foregroundGCIsActive() &&
+@@ -6332,7 +6332,7 @@
+     return;
+   }
+   // Double capacity if possible
+-  size_t new_capacity = MIN2(_capacity*2, CMSMarkStackSizeMax);
++  size_t new_capacity = MIN2((size_t) (_capacity*2), (size_t) CMSMarkStackSizeMax);
+   // Do not give up existing stack until we have managed to
+   // get the double capacity that we desired.
+   ReservedSpace rs(ReservedSpace::allocation_align_size_up(
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2008-08-14 08:40:10.000000000 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp	2008-09-01 01:49:59.000000000 +0100
+@@ -904,8 +904,8 @@
+ void PSParallelCompact::initialize_dead_wood_limiter()
+ {
+   const size_t max = 100;
+-  _dwl_mean = double(MIN2(ParallelOldDeadWoodLimiterMean, max)) / 100.0;
+-  _dwl_std_dev = double(MIN2(ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
++  _dwl_mean = double(MIN2((size_t) ParallelOldDeadWoodLimiterMean, max)) / 100.0;
++  _dwl_std_dev = double(MIN2((size_t) ParallelOldDeadWoodLimiterStdDev, max)) / 100.0;
+   _dwl_first_term = 1.0 / (sqrt(2.0 * M_PI) * _dwl_std_dev);
+   DEBUG_ONLY(_dwl_initialized = true;)
+   _dwl_adjustment = normal_distribution(1.0);
+diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp
+--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2008-08-14 08:40:10.000000000 +0100
++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPermGen.cpp	2008-09-01 01:52:42.000000000 +0100
+@@ -63,7 +63,7 @@
+   _last_used = current_live;
+ 
+   // We have different alignment constraints than the rest of the heap.
+-  const size_t alignment = MAX2(MinPermHeapExpansion,
++  const size_t alignment = MAX2((size_t) MinPermHeapExpansion,
+                                 virtual_space()->alignment());
+ 
+   // Compute the desired size:
+diff -Nru openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp
+--- openjdk.orig/hotspot/src/share/vm/memory/collectorPolicy.cpp	2008-08-14 08:40:10.000000000 +0100
++++ openjdk/hotspot/src/share/vm/memory/collectorPolicy.cpp	2008-09-01 02:58:03.000000000 +0100
+@@ -287,7 +287,7 @@
+     // yield a size that is too small) and bound it by MaxNewSize above.
+     // Ergonomics plays here by previously calculating the desired
+     // NewSize and MaxNewSize.
+-    max_new_size = MIN2(MAX2(max_new_size, NewSize), MaxNewSize);
++    max_new_size = MIN2(MAX2(max_new_size, (size_t) NewSize), (size_t) MaxNewSize);
+   }
+   assert(max_new_size > 0, "All paths should set max_new_size");
+ 
+diff -Nru openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp
+--- openjdk.orig/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2008-08-14 08:40:11.000000000 +0100
++++ openjdk/hotspot/src/share/vm/memory/threadLocalAllocBuffer.cpp	2008-09-01 01:49:59.000000000 +0100
+@@ -222,7 +222,7 @@
+   size_t init_sz;
+ 
+   if (TLABSize > 0) {
+-    init_sz = MIN2(TLABSize / HeapWordSize, max_size());
++    init_sz = MIN2((size_t) (TLABSize / HeapWordSize), max_size());
+   } else if (global_stats() == NULL) {
+     // Startup issue - main thread initialized before heap initialized.
+     init_sz = min_size();
+diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
+--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2008-09-01 01:47:17.000000000 +0100
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2008-09-01 01:58:01.000000000 +0100
+@@ -1025,7 +1025,7 @@
+   // for "short" pauses ~ 4M*ParallelGCThreads
+   if (FLAG_IS_DEFAULT(MaxNewSize)) {  // MaxNewSize not set at command-line
+     if (!FLAG_IS_DEFAULT(NewSize)) {   // NewSize explicitly set at command-line
+-      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2(NewSize, preferred_max_new_size));
++      FLAG_SET_ERGO(uintx, MaxNewSize, MAX2((size_t) NewSize, preferred_max_new_size));
+     } else {
+       FLAG_SET_ERGO(uintx, MaxNewSize, preferred_max_new_size);
+     }
+@@ -1038,7 +1038,7 @@
+   // Old to Young gen size so as to shift the collection load
+   // to the old generation concurrent collector
+   if (FLAG_IS_DEFAULT(NewRatio)) {
+-    FLAG_SET_ERGO(intx, NewRatio, MAX2(NewRatio, new_ratio));
++    FLAG_SET_ERGO(intx, NewRatio, MAX2((intx) NewRatio, new_ratio));
+ 
+     size_t min_new  = align_size_up(ScaleForWordSize(min_new_default), os::vm_page_size());
+     size_t prev_initial_size = initial_heap_size();
+@@ -1067,8 +1067,8 @@
+       // Unless explicitly requested otherwise, make young gen
+       // at least min_new, and at most preferred_max_new_size.
+       if (FLAG_IS_DEFAULT(NewSize)) {
+-        FLAG_SET_ERGO(uintx, NewSize, MAX2(NewSize, min_new));
+-        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, NewSize));
++        FLAG_SET_ERGO(uintx, NewSize, MAX2((size_t) NewSize, min_new));
++        FLAG_SET_ERGO(uintx, NewSize, MIN2(preferred_max_new_size, (size_t) NewSize));
+         if(PrintGCDetails && Verbose) {
+           // Too early to use gclog_or_tty
+           tty->print_cr("Ergo set NewSize: " SIZE_FORMAT, NewSize);
+@@ -1079,7 +1079,7 @@
+       // later NewRatio will decide how it grows; see above.
+       if (FLAG_IS_DEFAULT(OldSize)) {
+         if (max_heap > NewSize) {
+-          FLAG_SET_ERGO(uintx, OldSize, MIN2(3*NewSize,  max_heap - NewSize));
++          FLAG_SET_ERGO(uintx, OldSize, MIN2((size_t) (3*NewSize),  max_heap - (size_t) NewSize));
+           if(PrintGCDetails && Verbose) {
+             // Too early to use gclog_or_tty
+             tty->print_cr("Ergo set OldSize: " SIZE_FORMAT, OldSize);
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-parisc-opt.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-parisc-opt.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,28 @@
+--- openjdk/hotspot/make/linux/makefiles/product.make.orig	2008-12-10 19:02:31.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/product.make	2008-12-10 19:24:53.000000000 +0100
+@@ -25,6 +25,11 @@
+ # Sets make macros for making optimized version of Gamma VM
+ # (This is the "product", not the "release" version.)
+ 
++# work around an ICE in gcc-4.1 and gcc-4.3 on parisc-linux
++ifeq ($(BUILDARCH)-$(ZERO_LIBARCH), zero-parisc)
++  OPT_CFLAGS/codeBlob.o = $(OPT_CFLAGS/NOOPT)
++endif
++
+ # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
+ OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
+ OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
+--- openjdk/hotspot/make/linux/makefiles/optimized.make.orig	2008-12-10 19:02:22.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/optimized.make	2008-12-10 19:24:24.000000000 +0100
+@@ -25,6 +25,11 @@
+ # Sets make macros for making optimized version of Gamma VM
+ # (This is the "product", not the "release" version.)
+ 
++# work around an ICE in gcc-4.1 and gcc-4.3 on parisc-linux
++ifeq ($(BUILDARCH)-$(ZERO_LIBARCH), zero-parisc)
++  OPT_CFLAGS/codeBlob.o = $(OPT_CFLAGS/NOOPT)
++endif
++
+ # Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make
+ OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS)
+ OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@))
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-shark-build.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-shark-build.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,233 @@
+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
+@@ -158,6 +158,13 @@
+ #       profiledcore    core            <os>_<arch>_core/profiled
+ #       productcore     core            <os>_<arch>_core/product
+ #
++#       debugshark      shark           <os>_<arch>_shark/debug
++#       fastdebugshark  shark           <os>_<arch>_shark/fastdebug
++#       jvmgshark       shark           <os>_<arch>_shark/jvmg
++#       optimizedshark  shark           <os>_<arch>_shark/optimized
++#       profiledshark   shark           <os>_<arch>_shark/profiled
++#       productshark    shark           <os>_<arch>_shark/product
++#
+ # What you get with each target:
+ #
+ # debug*     - "thin" libjvm_g - debug info linked into the gamma_g launcher
+@@ -176,11 +183,13 @@
+ SUBDIRS_C2        = $(addprefix $(OSNAME)_$(BUILDARCH)_compiler2/,$(TARGETS))
+ SUBDIRS_TIERED    = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
+ SUBDIRS_CORE      = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
++SUBDIRS_SHARK     = $(addprefix $(OSNAME)_$(BUILDARCH)_shark/,$(TARGETS))
+ 
+ TARGETS_C2        = $(TARGETS)
+ TARGETS_C1        = $(addsuffix 1,$(TARGETS))
+ TARGETS_TIERED    = $(addsuffix tiered,$(TARGETS))
+ TARGETS_CORE      = $(addsuffix core,$(TARGETS))
++TARGETS_SHARK     = $(addsuffix shark,$(TARGETS))
+ 
+ BUILDTREE_MAKE    = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
+ BUILDTREE_VARS    = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) ARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
+@@ -196,6 +205,7 @@
+ 	@echo "  $(TARGETS_C2)"
+ 	@echo "  $(TARGETS_C1)"
+ 	@echo "  $(TARGETS_CORE)"
++	@echo "  $(TARGETS_SHARK)"
+ 
+ checks: check_os_version check_j2se_version
+ 
+@@ -245,6 +255,10 @@
+ 	$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
+ 	$(BUILDTREE) VARIANT=core
+ 
++$(SUBDIRS_SHARK): $(BUILDTREE_MAKE)
++	$(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 @@
+ 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
+ endif
+ 
++$(TARGETS_SHARK):  $(SUBDIRS_SHARK)
++	cd $(OSNAME)_$(BUILDARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS)
++ifdef INSTALL
++	cd $(OSNAME)_$(BUILDARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install
++endif
++
+ # Just build the tree, and nothing else:
+ tree:      $(SUBDIRS_C2)
+ tree1:     $(SUBDIRS_C1)
+@@ -305,7 +325,7 @@
+ 
+ #-------------------------------------------------------------------------------
+ 
+-.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE)
++.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_SHARK)
+ .PHONY: tree tree1 treecore
+ .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 @@
+ 
+ ../shared_dirs.lst:  $(BUILDTREE_MAKE) $(GAMMADIR)/src/share/vm
+ 	@echo Creating directory list $@
+-	$(QUIETLY) find $(GAMMADIR)/src/share/vm/* -prune \
+-	-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find {} \
++	$(QUIETLY) find -L $(GAMMADIR)/src/share/vm/* -prune \
++	-type d \! \( $(TOPLEVEL_EXCLUDE_DIRS) \) -exec find -L {} \
+         \( $(ALWAYS_EXCLUDE_DIRS) \) -prune -o -type d -print \; > $@
+ 
+ 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 @@
+ EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so
+ EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so
+ ifndef ICEDTEA_CORE_BUILD
++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 @@
+     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
+ CFLAGS += $(LIBFFI_CFLAGS)
+ endif
++ifdef ICEDTEA_SHARK_BUILD
++CFLAGS += $(LLVM_CFLAGS)
++endif
+ CFLAGS += $(VM_PICFLAG)
+ 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 @@
+ 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
++Include_DBs/SHARK       = $(Include_DBs/CORE) $(VM)/includeDB_shark
+ Include_DBs = $(Include_DBs/$(TYPE))
+ 
+ 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 @@
+ 
+ STATIC_CXX = true
+ 
+-ifeq ($(ZERO_LIBARCH), ppc64)
++ifdef ICEDTEA_SHARK_BUILD
+   STATIC_CXX = false
+ else
+-  STATIC_CXX = true
++  ifeq ($(ZERO_LIBARCH), ppc64)
++    STATIC_CXX = false
++  else
++    STATIC_CXX = true
++  endif
+ endif
+ 
+ ifeq ($(LINK_INTO),AOUT)
+@@ -157,6 +161,10 @@
+ ifdef ICEDTEA_ZERO_BUILD
+ LIBS_VM += $(LIBFFI_LIBS)
+ endif
++ifdef ICEDTEA_SHARK_BUILD
++LFLAGS_VM += $(LLVM_LDFLAGS)
++LIBS_VM   += $(LLVM_LIBS)
++endif
+ 
+ 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
+@@ -103,6 +103,15 @@
+ all_debugcore:     jvmgcore docs export_debug
+ all_optimizedcore: optimizedcore docs export_optimized
+ 
++# Shark (C0) targets made available with this Makefile
++SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark
++
++allshark:           all_productshark all_fastdebugshark
++all_productshark:   productshark docs export_product
++all_fastdebugshark: fastdebugshark docs export_fastdebug
++all_debugshark:     jvmgshark docs export_debug
++all_optimizedshark: optimizedshark docs export_optimized
++
+ # Do everything
+ world:         all create_jdk
+ 
+@@ -129,6 +138,10 @@
+ 	$(CD) $(GAMMADIR)/make; \
+ 	$(MAKE) VM_TARGET=$@ generic_buildcore $(ALT_OUT)
+ 
++$(SHARK_VM_TARGETS):
++	$(CD) $(GAMMADIR)/make; \
++	$(MAKE) VM_TARGET=$@ generic_buildshark $(ALT_OUT)
++
+ $(KERNEL_VM_TARGETS):
+ 	$(CD) $(GAMMADIR)/make; \
+ 	$(MAKE) VM_TARGET=$@ generic_buildkernel $(ALT_OUT)
+@@ -181,6 +194,12 @@
+ 		$(MAKE) -f $(ABS_OS_MAKEFILE) \
+ 			$(MAKE_ARGS) $(VM_TARGET)
+ 
++generic_buildshark:
++	$(MKDIR) -p $(OUTPUTDIR)
++	$(CD) $(OUTPUTDIR); \
++		$(MAKE) -f $(ABS_OS_MAKEFILE) \
++			$(MAKE_ARGS) $(VM_TARGET) 
++
+ generic_buildkernel:
+ 	$(MKDIR) -p $(OUTPUTDIR)
+ ifeq ($(OSNAME),windows)
+@@ -230,8 +249,12 @@
+ ifdef ICEDTEA_CORE_BUILD
+ C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_core
+ else
++ifdef ICEDTEA_SHARK_BUILD
++C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_shark
++else
+ C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2
+ endif
++endif
+ KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel
+ C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR)
+ C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR)
+@@ -242,6 +265,10 @@
+   MISC_DIR=$(C2_DIR)
+   GEN_DIR=$(C2_BASE_DIR)/generated
+ else
++ifdef ICEDTEA_SHARK_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
+@@ -250,6 +277,7 @@
+   GEN_DIR=$(C2_BASE_DIR)/generated
+ endif
+ endif
++endif
+ 
+ # Bin files (windows)
+ ifeq ($(OSNAME),windows)
+
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-shark.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-shark.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,366 @@
+--- openjdk/hotspot/src/share/vm/oops/methodOop.cpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/oops/methodOop.cpp	2008-12-03 14:33:48.000000000 +0000
+@@ -727,10 +727,14 @@
+   }
+ 
+   OrderAccess::storestore();
++#ifdef SHARK
++  mh->_from_interpreted_entry = code->instructions_begin();
++#else
+   mh->_from_compiled_entry = code->verified_entry_point();
+   OrderAccess::storestore();
+   // Instantly compiled code can execute.
+   mh->_from_interpreted_entry = mh->get_i2c_entry();
++#endif // SHARK
+ 
+ }
+ 
+--- openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.hpp	2008-12-03 14:33:48.000000000 +0000
+@@ -44,6 +44,7 @@
+   friend class VMStructs;
+   friend class CardTableRS;
+   friend class CheckForUnmarkedOops; // Needs access to raw card bytes.
++  friend class SharkBuilder;
+ #ifndef PRODUCT
+   // For debugging.
+   friend class GuaranteeNotModClosure;
+--- openjdk/hotspot/src/share/vm/runtime/globals.cpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/globals.cpp	2008-12-03 14:33:48.000000000 +0000
+@@ -176,6 +176,18 @@
+   #define C2_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{C2 notproduct}", DEFAULT },
+ #endif
+ 
++#define SHARK_PRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark product}", DEFAULT },
++#define SHARK_PD_PRODUCT_FLAG_STRUCT(type, name, doc)     { #type, XSTR(name), &name, "{Shark pd product}", DEFAULT },
++#define SHARK_DIAGNOSTIC_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark diagnostic}", DEFAULT },
++#ifdef PRODUCT
++  #define SHARK_DEVELOP_FLAG_STRUCT(type, name, value, doc) /* flag is constant */
++  #define SHARK_PD_DEVELOP_FLAG_STRUCT(type, name, doc)     /* flag is constant */
++  #define SHARK_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc)
++#else
++  #define SHARK_DEVELOP_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark}", DEFAULT },
++  #define SHARK_PD_DEVELOP_FLAG_STRUCT(type, name, doc)     { #type, XSTR(name), &name, "{Shark pd}", DEFAULT },
++  #define SHARK_NOTPRODUCT_FLAG_STRUCT(type, name, value, doc) { #type, XSTR(name), &name, "{Shark notproduct}", DEFAULT },
++#endif
+ 
+ static Flag flagTable[] = {
+  RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_STRUCT, RUNTIME_PD_DEVELOP_FLAG_STRUCT, RUNTIME_PRODUCT_FLAG_STRUCT, RUNTIME_PD_PRODUCT_FLAG_STRUCT, RUNTIME_DIAGNOSTIC_FLAG_STRUCT, RUNTIME_EXPERIMENTAL_FLAG_STRUCT, RUNTIME_NOTPRODUCT_FLAG_STRUCT, RUNTIME_MANAGEABLE_FLAG_STRUCT, RUNTIME_PRODUCT_RW_FLAG_STRUCT, RUNTIME_LP64_PRODUCT_FLAG_STRUCT)
+@@ -189,6 +201,9 @@
+ #ifdef COMPILER2
+  C2_FLAGS(C2_DEVELOP_FLAG_STRUCT, C2_PD_DEVELOP_FLAG_STRUCT, C2_PRODUCT_FLAG_STRUCT, C2_PD_PRODUCT_FLAG_STRUCT, C2_DIAGNOSTIC_FLAG_STRUCT, C2_NOTPRODUCT_FLAG_STRUCT)
+ #endif
++#ifdef SHARK
++ SHARK_FLAGS(SHARK_DEVELOP_FLAG_STRUCT, SHARK_PD_DEVELOP_FLAG_STRUCT, SHARK_PRODUCT_FLAG_STRUCT, SHARK_PD_PRODUCT_FLAG_STRUCT, SHARK_DIAGNOSTIC_FLAG_STRUCT, SHARK_NOTPRODUCT_FLAG_STRUCT)
++#endif
+  {0, NULL, NULL}
+ };
+ 
+--- openjdk/hotspot/src/share/vm/runtime/vframeArray.cpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/vframeArray.cpp	2008-12-03 14:33:49.000000000 +0000
+@@ -64,6 +64,11 @@
+       assert(monitor->owner() == NULL || (!monitor->owner()->is_unlocked() && !monitor->owner()->has_bias_pattern()), "object must be null or locked, and unbiased");
+       BasicObjectLock* dest = _monitors->at(index);
+       dest->set_obj(monitor->owner());
++#ifdef SHARK
++      // XXX This can be removed when Shark knows
++      // which monitors are in use.
++      if (monitor->owner())
++#endif // SHARK
+       monitor->lock()->move_to(monitor->owner(), dest->lock());
+     }
+   }
+@@ -262,6 +267,11 @@
+     top = iframe()->previous_monitor_in_interpreter_frame(top);
+     BasicObjectLock* src = _monitors->at(index);
+     top->set_obj(src->obj());
++#ifdef SHARK
++    // XXX This can be removed when Shark knows
++    // which monitors are in use.
++    if (src->obj())
++#endif // SHARK    
+     src->lock()->move_to(src->obj(), top->lock());
+   }
+   if (ProfileInterpreter) {
+--- openjdk/hotspot/src/share/vm/runtime/vm_version.cpp.orig	2008-12-03 14:23:37.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp	2008-12-03 14:33:48.000000000 +0000
+@@ -94,12 +94,16 @@
+ #ifdef TIERED
+   #define VMTYPE "Server"
+ #else
++#ifdef SHARK
++  #define VMTYPE "Shark"
++#else
+ #if defined(COMPILER1) || defined(COMPILER2)
+-   #define VMTYPE COMPILER1_PRESENT("Client")   \
+-                  COMPILER2_PRESENT("Server")
++  #define VMTYPE COMPILER1_PRESENT("Client")   \
++                 COMPILER2_PRESENT("Server")
+ #else
+   #define VMTYPE "Core"
+ #endif // COMPILER1 || COMPILER2
++#endif // SHARK
+ #endif // TIERED
+ #endif // KERNEL
+ 
+--- openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/deoptimization.cpp	2008-12-03 14:33:48.000000000 +0000
+@@ -229,6 +229,7 @@
+ 
+   }
+ 
++#ifndef SHARK
+   // Compute the caller frame based on the sender sp of stub_frame and stored frame sizes info.
+   CodeBlob* cb = stub_frame.cb();
+   // Verify we have the right vframeArray
+@@ -239,6 +240,10 @@
+   assert(cb->is_deoptimization_stub() || cb->is_uncommon_trap_stub(), "just checking");
+   Events::log("fetch unroll sp " INTPTR_FORMAT, unpack_sp);
+ #endif
++#else
++  intptr_t* unpack_sp = stub_frame.sender(&dummy_map).unextended_sp();
++#endif // !SHARK
++  
+   // This is a guarantee instead of an assert because if vframe doesn't match
+   // we will unpack the wrong deoptimized frame and wind up in strange places
+   // where it will be very difficult to figure out what went wrong. Better
+@@ -349,7 +354,9 @@
+ 
+   frame_pcs[0] = deopt_sender.raw_pc();
+ 
++#ifndef SHARK
+   assert(CodeCache::find_blob_unsafe(frame_pcs[0]) != NULL, "bad pc");
++#endif // SHARK
+ 
+   UnrollBlock* info = new UnrollBlock(array->frame_size() * BytesPerWord,
+                                       caller_adjustment * BytesPerWord,
+@@ -890,7 +897,20 @@
+   // stuff a C2I adapter we can properly fill in the callee-save
+   // register locations.
+   frame caller = fr.sender(reg_map);
++#ifdef ZERO
++  int frame_size;
++  {
++    // In zero, frame::sp() is the *end* of the frame, so
++    // caller.sp() - fr.sp() is the size of the *caller*.
++    RegisterMap dummy_map(thread, false);
++    frame frame_1 = thread->last_frame();
++    frame frame_2 = frame_1.sender(&dummy_map);
++    assert(frame_2.sp() == fr.sp(), "should be");
++    frame_size = frame_2.sp() - frame_1.sp();
++  }
++#else
+   int frame_size = caller.sp() - fr.sp();
++#endif // ZERO
+ 
+   frame sender = caller;
+ 
+@@ -1057,7 +1077,7 @@
+ JRT_END
+ 
+ 
+-#ifdef COMPILER2
++#if defined(COMPILER2) || defined(SHARK)
+ void Deoptimization::load_class_by_index(constantPoolHandle constant_pool, int index, TRAPS) {
+   // in case of an unresolved klass entry, load the class.
+   if (constant_pool->tag_at(index).is_unresolved_klass()) {
+@@ -1808,7 +1828,7 @@
+     if (xtty != NULL)  xtty->tail("statistics");
+   }
+ }
+-#else // COMPILER2
++#else // COMPILER2 || SHARK
+ 
+ 
+ // Stubs for C1 only system.
+@@ -1844,4 +1864,4 @@
+   return buf;
+ }
+ 
+-#endif // COMPILER2
++#endif // COMPILER2 || SHARK
+--- openjdk/hotspot/src/share/vm/runtime/globals.hpp.orig	2008-12-03 14:22:17.000000000 +0000
++++ openjdk/hotspot/src/share/vm/runtime/globals.hpp	2008-12-03 14:33:48.000000000 +0000
+@@ -22,7 +22,7 @@
+  *
+  */
+ 
+-#if !defined(COMPILER1) && !defined(COMPILER2)
++#if !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK)
+ define_pd_global(bool, BackgroundCompilation,        false);
+ define_pd_global(bool, UseTLAB,                      false);
+ define_pd_global(bool, CICompileOSR,                 false);
+--- openjdk/hotspot/src/share/vm/code/nmethod.hpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/code/nmethod.hpp	2008-12-03 14:33:48.000000000 +0000
+@@ -318,6 +318,7 @@
+ 
+   bool is_compiled_by_c1() const;
+   bool is_compiled_by_c2() const;
++  bool is_compiled_by_shark() const;
+ 
+   // boundaries for different parts
+   address code_begin         () const             { return _entry_point; }
+--- openjdk/hotspot/src/share/vm/code/nmethod.cpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/code/nmethod.cpp	2008-12-03 14:33:48.000000000 +0000
+@@ -65,6 +65,11 @@
+   assert(compiler() != NULL, "must be");
+   return compiler()->is_c2();
+ }
++bool nmethod::is_compiled_by_shark() const {
++  if (is_native_method()) return false;
++  assert(compiler() != NULL, "must be");
++  return compiler()->is_shark();
++}
+ 
+ 
+ 
+@@ -1567,6 +1572,7 @@
+ // Method that knows how to preserve outgoing arguments at call. This method must be
+ // called with a frame corresponding to a Java invoke
+ void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) {
++#ifndef SHARK
+   if (!method()->is_native()) {
+     SimpleScopeDesc ssd(this, fr.pc());
+     Bytecode_invoke* call = Bytecode_invoke_at(ssd.method(), ssd.bci());
+@@ -1574,6 +1580,7 @@
+     symbolOop signature = call->signature();
+     fr.oops_compiled_arguments_do(signature, is_static, reg_map, f);
+   }
++#endif // !SHARK
+ }
+ 
+ 
+@@ -2003,6 +2010,8 @@
+     tty->print("(c1) ");
+   } else if (is_compiled_by_c2()) {
+     tty->print("(c2) ");
++  } else if (is_compiled_by_shark()) {
++    tty->print("(shark) ");
+   } else {
+     tty->print("(nm) ");
+   }
+--- openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/compiler/compileBroker.cpp	2008-12-03 14:33:48.000000000 +0000
+@@ -554,6 +554,14 @@
+ #endif
+ #endif // COMPILER2
+ 
++#ifdef SHARK
++#if defined(COMPILER1) || defined(COMPILER2)
++#error "Can't use COMPILER1 or COMPILER2 with shark"
++#endif
++  _compilers[0] = new SharkCompiler();
++  _compilers[1] = _compilers[0];  
++#endif
++  
+   // Initialize the CompileTask free list
+   _task_free_list = NULL;
+ 
+--- openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/compiler/abstractCompiler.hpp	2008-12-03 14:33:48.000000000 +0000
+@@ -45,18 +45,26 @@
+   // Missing feature tests
+   virtual bool supports_native()                 { return true; }
+   virtual bool supports_osr   ()                 { return true; }
+-#if defined(TIERED) || ( !defined(COMPILER1) && !defined(COMPILER2))
++#if defined(TIERED) || ( !defined(COMPILER1) && !defined(COMPILER2) && !defined(SHARK))
+   virtual bool is_c1   ()                        { return false; }
+   virtual bool is_c2   ()                        { return false; }
++  virtual bool is_shark()                        { return false; }
+ #else
+ #ifdef COMPILER1
+   bool is_c1   ()                                { return true; }
+   bool is_c2   ()                                { return false; }
++  bool is_shark()                                { return false; }
+ #endif // COMPILER1
+ #ifdef COMPILER2
+   bool is_c1   ()                                { return false; }
+   bool is_c2   ()                                { return true; }
++  bool is_shark()                                { return false; }
+ #endif // COMPILER2
++#ifdef SHARK
++  bool is_c1   ()                                { return false; }
++  bool is_c2   ()                                { return false; }
++  bool is_shark()                                { return true; }
++#endif // SHARK  
+ #endif // TIERED
+ 
+   // Customization
+--- openjdk/hotspot/src/share/vm/ci/ciMethod.hpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/ci/ciMethod.hpp	2008-12-03 14:33:48.000000000 +0000
+@@ -69,7 +69,7 @@
+ 
+   // Optional liveness analyzer.
+   MethodLiveness* _liveness;
+-#ifdef COMPILER2
++#if defined(COMPILER2) || defined(SHARK)
+   ciTypeFlow*     _flow;
+ #endif
+ 
+--- openjdk/hotspot/src/share/vm/ci/ciMethod.cpp.orig	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/src/share/vm/ci/ciMethod.cpp	2008-12-03 14:33:48.000000000 +0000
+@@ -56,9 +56,9 @@
+   _liveness           = NULL;
+   _bcea = NULL;
+   _method_blocks = NULL;
+-#ifdef COMPILER2
++#if defined(COMPILER2) || defined(SHARK)
+   _flow               = NULL;
+-#endif // COMPILER2
++#endif // COMPILER2 || SHARK
+ 
+   if (JvmtiExport::can_hotswap_or_post_breakpoint() && _is_compilable) {
+     // 6328518 check hotswap conditions under the right lock.
+@@ -124,9 +124,9 @@
+   _bcea = NULL;
+   _method_blocks = NULL;
+   _method_data = NULL;
+-#ifdef COMPILER2
++#if defined(COMPILER2) || defined(SHARK)
+   _flow = NULL;
+-#endif // COMPILER2
++#endif // COMPILER2 || SHARK
+ }
+ 
+ 
+@@ -294,34 +294,34 @@
+ // ------------------------------------------------------------------
+ // ciMethod::get_flow_analysis
+ ciTypeFlow* ciMethod::get_flow_analysis() {
+-#ifdef COMPILER2
++#if defined(COMPILER2) || defined(SHARK)
+   if (_flow == NULL) {
+     ciEnv* env = CURRENT_ENV;
+     _flow = new (env->arena()) ciTypeFlow(env, this);
+     _flow->do_flow();
+   }
+   return _flow;
+-#else // COMPILER2
++#else // COMPILER2 || SHARK
+   ShouldNotReachHere();
+   return NULL;
+-#endif // COMPILER2
++#endif // COMPILER2 || SHARK
+ }
+ 
+ 
+ // ------------------------------------------------------------------
+ // ciMethod::get_osr_flow_analysis
+ ciTypeFlow* ciMethod::get_osr_flow_analysis(int osr_bci) {
+-#ifdef COMPILER2
++#if defined(COMPILER2) || defined(SHARK)
+   // OSR entry points are always place after a call bytecode of some sort
+   assert(osr_bci >= 0, "must supply valid OSR entry point");
+   ciEnv* env = CURRENT_ENV;
+   ciTypeFlow* flow = new (env->arena()) ciTypeFlow(env, this, osr_bci);
+   flow->do_flow();
+   return flow;
+-#else // COMPILER2
++#else // COMPILER2 || SHARK
+   ShouldNotReachHere();
+   return NULL;
+-#endif // COMPILER2
++#endif // COMPILER2 || SHARK
+ }
+ 
+ // ------------------------------------------------------------------
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-sparc-buildfixes.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-sparc-buildfixes.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,35 @@
+--- openjdk/hotspot/make/linux/makefiles/gcc.make.orig	2008-12-04 20:29:08.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2008-12-04 20:32:54.000000000 +0000
+@@ -52,6 +52,10 @@
+ PICFLAG = -fpic
+ endif
+ 
++ifneq ($(filter sparc sparcv9,$(BUILDARCH)),)
++PICFLAG = -fPIC
++endif
++
+ VM_PICFLAG/LIBJVM = $(PICFLAG)
+ VM_PICFLAG/AOUT   =
+ VM_PICFLAG        = $(VM_PICFLAG/$(LINK_INTO))
+--- openjdk/hotspot/make/linux/makefiles/defs.make.orig	2008-12-04 20:29:04.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/defs.make	2008-12-04 20:32:54.000000000 +0000
+@@ -59,7 +59,7 @@
+ endif
+ 
+ # sparc
+-ifeq ($(ARCH), sparc64)
++ifneq (,$(filter $(ARCH), sparc sparc64))
+   ifeq ($(ARCH_DATA_MODEL), 64)
+     ARCH_DATA_MODEL  = 64
+     MAKE_ARGS        += LP64=1
+--- openjdk/hotspot/src/cpu/sparc/vm/frame_sparc.hpp.orig	2008-12-04 20:32:19.000000000 +0000
++++ openjdk/hotspot/src/cpu/sparc/vm/frame_sparc.hpp	2008-12-04 20:32:54.000000000 +0000
+@@ -264,7 +264,7 @@
+ 
+  private:
+ 
+-  constantPoolCacheOop* frame::interpreter_frame_cpoolcache_addr() const;
++  constantPoolCacheOop* interpreter_frame_cpoolcache_addr() const;
+ 
+ #ifndef CC_INTERP
+ 
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-sparc-ptracefix.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-sparc-ptracefix.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,34 @@
+diff -up openjdk/hotspot/agent/src/os/linux/libproc.h.BAD openjdk/hotspot/agent/src/os/linux/libproc.h
+--- openjdk/hotspot/agent/src/os/linux/libproc.h.BAD	2008-05-29 19:03:34.000000000 -0400
++++ openjdk/hotspot/agent/src/os/linux/libproc.h	2008-05-29 19:01:45.000000000 -0400
+@@ -34,14 +34,25 @@
+ 
+ #if defined(sparc) || defined(sparcv9)
+ /*
+-  If _LP64 is defined ptrace.h should be taken from /usr/include/asm-sparc64
+-  otherwise it should be from /usr/include/asm-sparc
+-  These two files define pt_regs structure differently
++  Taken from asm-sparc/ptrace.h and asm-sparc64/ptrace.h
+ */ 
+ #ifdef _LP64
+-#include "asm-sparc64/ptrace.h"
++struct pt_regs {
++	unsigned long u_regs[16]; /* globals and ins */
++	unsigned long tstate;
++	unsigned long tpc;
++	unsigned long tnpc;
++	unsigned int y;
++	unsigned int fprs;
++};
+ #else
+-#include "asm-sparc/ptrace.h"
++struct pt_regs {
++	unsigned long psr;
++	unsigned long pc;
++	unsigned long npc;
++	unsigned long y;
++	unsigned long u_regs[16]; /* globals and ins */
++};
+ #endif
+ 
+ #endif //sparc or sparcv9
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-sparc-trapsfix.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-sparc-trapsfix.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,21 @@
+diff -Nru openjdk.orig/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp
+--- openjdk.orig/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp	2008-08-04 08:40:18.000000000 +0100
++++ openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp	2008-08-09 01:29:51.000000000 +0100
+@@ -25,7 +25,16 @@
+ #include "incls/_precompiled.incl"
+ #include "incls/_assembler_linux_sparc.cpp.incl"
+ 
+-#include <asm-sparc/traps.h>
++/* Headers for 32bit sparc with a 32bit userland end up in asm/
++ * Headers for 32bit sparc with a 64bit userland end up in asm-sparc/
++ * There is no traps.h in asm-sparc64/
++ */
++
++#if defined(__sparc__) && defined(__arch64__)
++# include <asm-sparc/traps.h>
++#else 
++# include <asm/traps.h>
++#endif
+ 
+ void MacroAssembler::read_ccr_trap(Register ccr_save) {
+   // No implementation
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-sparc64-linux.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-sparc64-linux.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,42 @@
+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-06-22 22:28:06.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/defs.make	2008-06-22 22:35:27.000000000 +0100
+@@ -73,6 +73,14 @@
+   HS_ARCH            = sparc
+ endif
+ 
++# sparc
++ifeq ($(ARCH), sparc)
++  ARCH_DATA_MODEL  = 32
++  PLATFORM         = linux-sparc
++  VM_PLATFORM      = linux_sparc
++  HS_ARCH          = sparc
++endif
++
+ # x86_64
+ ifeq ($(ARCH), x86_64) 
+   ifeq ($(ARCH_DATA_MODEL), 64)
+diff -Nru openjdk.orig/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp
+--- openjdk.orig/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	2008-06-22 20:44:41.000000000 +0100
++++ openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	2008-06-22 22:35:27.000000000 +0100
+@@ -1112,20 +1112,12 @@
+ 
+ void LIRGenerator::volatile_field_store(LIR_Opr value, LIR_Address* address,
+                                         CodeEmitInfo* info) {
+-#ifdef _LP64
+-  __ store(value, address, info);
+-#else
+   __ volatile_store_mem_reg(value, address, info);
+-#endif
+ }
+ 
+ void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result,
+                                        CodeEmitInfo* info) {
+-#ifdef _LP64
+-  __ load(address, result, info);
+-#else
+   __ volatile_load_mem_reg(address, result, info);
+-#endif
+ }
+ 
+ 
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-static-libstdc++.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-static-libstdc++.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,16 @@
+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           =
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-text-relocations.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-text-relocations.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,61 @@
+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-17 08:40:27.000000000 +0100
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2008-07-21 23:10:50.000000000 +0100
+@@ -46,7 +46,11 @@
+ # Compiler flags
+ 
+ # position-independent code
++ifneq ($(filter parisc ppc ppc64 s390 s390x sparc sparc64 sparcv9,$(ZERO_LIBARCH)),)
+ PICFLAG = -fPIC
++else
++PICFLAG = -fpic
++endif
+ 
+ VM_PICFLAG/LIBJVM = $(PICFLAG)
+ VM_PICFLAG/AOUT   =
+--- rules.make.orig	2008-12-12 11:23:31.000000000 -0500
++++ openjdk/hotspot/make/linux/makefiles/rules.make	2008-12-12 11:32:26.000000000 -0500
+@@ -138,20 +138,10 @@
+ include $(GAMMADIR)/make/pic.make
+ endif
+ 
+-# The non-PIC object files are only generated for 32 bit platforms.
+-ifdef LP64
+ %.o: %.cpp
+ 	@echo Compiling $<
+ 	$(QUIETLY) $(REMOVE_TARGET)
+ 	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
+-else
+-%.o: %.cpp
+-	@echo Compiling $<
+-	$(QUIETLY) $(REMOVE_TARGET)
+-	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
+-	   $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
+-	   $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
+-endif
+ 
+ %.o: %.s
+ 	@echo Assembling $<
+--- rules.make.orig	2008-12-12 11:42:55.000000000 -0500
++++ openjdk/hotspot/make/solaris/makefiles/rules.make	2008-12-12 11:44:01.000000000 -0500
+@@ -138,20 +138,10 @@
+ include $(GAMMADIR)/make/pic.make
+ endif
+ 
+-# Sun compiler for 64 bit Solaris does not support building non-PIC object files.
+-ifdef LP64
+ %.o: %.cpp
+ 	@echo Compiling $<
+ 	$(QUIETLY) $(REMOVE_TARGET)
+ 	$(QUIETLY) $(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
+-else
+-%.o: %.cpp
+-	@echo Compiling $<
+-	$(QUIETLY) $(REMOVE_TARGET)
+-	$(QUIETLY) $(if $(findstring $@, $(NONPIC_OBJ_FILES)), \
+-         $(subst $(VM_PICFLAG), ,$(COMPILE.CC)) -o $@ $< $(COMPILE_DONE), \
+-         $(COMPILE.CC) -o $@ $< $(COMPILE_DONE))
+-endif
+ 
+ %.o: %.s
+ 	@echo Assembling $<
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-use-idx_t.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-use-idx_t.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,45 @@
+diff -Nru openjdk.orig/hotspot/src/share/vm/compiler/methodLiveness.cpp openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp
+--- openjdk.orig/hotspot/src/share/vm/compiler/methodLiveness.cpp	2008-11-06 08:40:55.000000000 +0000
++++ openjdk/hotspot/src/share/vm/compiler/methodLiveness.cpp	2008-11-10 00:55:09.000000000 +0000
+@@ -567,15 +567,15 @@
+ 
+ 
+ MethodLiveness::BasicBlock::BasicBlock(MethodLiveness *analyzer, int start, int limit) :
+-         _gen((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
++         _gen((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+                          analyzer->bit_map_size_bits()),
+-         _kill((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
++         _kill((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+                          analyzer->bit_map_size_bits()),
+-         _entry((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
++         _entry((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+                          analyzer->bit_map_size_bits()),
+-         _normal_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
++         _normal_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+                          analyzer->bit_map_size_bits()),
+-         _exception_exit((uintptr_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
++         _exception_exit((size_t*)analyzer->arena()->Amalloc(BytesPerWord * analyzer->bit_map_size_words()),
+                          analyzer->bit_map_size_bits()),
+          _last_bci(-1) {
+   _analyzer = analyzer;
+@@ -992,7 +992,7 @@
+ }
+ 
+ MethodLivenessResult MethodLiveness::BasicBlock::get_liveness_at(ciMethod* method, int bci) {
+-  MethodLivenessResult answer(NEW_RESOURCE_ARRAY(uintptr_t, _analyzer->bit_map_size_words()),
++  MethodLivenessResult answer(NEW_RESOURCE_ARRAY(size_t, _analyzer->bit_map_size_words()),
+                 _analyzer->bit_map_size_bits());
+   answer.set_is_valid();
+ 
+diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/bitMap.hpp openjdk/hotspot/src/share/vm/utilities/bitMap.hpp
+--- openjdk.orig/hotspot/src/share/vm/utilities/bitMap.hpp	2008-11-06 08:40:58.000000000 +0000
++++ openjdk/hotspot/src/share/vm/utilities/bitMap.hpp	2008-11-10 00:57:20.000000000 +0000
+@@ -73,7 +73,7 @@
+ 
+   // Set a word to a specified value or to all ones; clear a word.
+   void set_word  (idx_t word, bm_word_t val) { _map[word] = val; }
+-  void set_word  (idx_t word)            { set_word(word, ~(uintptr_t)0); }
++  void set_word  (idx_t word)            { set_word(word, ~(idx_t)0); }
+   void clear_word(idx_t word)            { _map[word] = 0; }
+ 
+   // Utilities for ranges of bits.  Ranges are half-open [beg, end).
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-version.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-version.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,48 @@
+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-11-06 08:40:50.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/vm.make	2008-11-19 12:15:54.000000000 +0000
+@@ -86,6 +86,10 @@
+   ${JRE_VERSION}     \
+   ${VM_DISTRO}
+ 
++ifdef DISTRIBUTION_ID
++CPPFLAGS += -DDISTRIBUTION_ID="\"$(DISTRIBUTION_ID)\""
++endif
++
+ # CFLAGS_WARN holds compiler options to suppress/enable warnings.
+ CFLAGS += $(CFLAGS_WARN/BYFILE)
+ 
+diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp openjdk/hotspot/src/share/vm/utilities/vmError.cpp
+--- openjdk.orig/hotspot/src/share/vm/utilities/vmError.cpp	2008-11-06 08:40:58.000000000 +0000
++++ openjdk/hotspot/src/share/vm/utilities/vmError.cpp	2008-11-19 12:15:54.000000000 +0000
+@@ -165,7 +165,8 @@
+ 
+ static void print_bug_submit_message(outputStream *out, Thread *thread) {
+   if (out == NULL) return;
+-  out->print_raw_cr("# If you would like to submit a bug report, please visit:");
++  out->print_raw_cr("# If you would like to submit a bug report, please include");
++  out->print_raw_cr("# instructions how to reproduce the bug and visit:");
+   out->print_raw   ("#   ");
+   out->print_raw_cr(Arguments::java_vendor_url_bug());
+   // If the crash is in native code, encourage user to submit a bug to the
+@@ -339,6 +340,9 @@
+                    Abstract_VM_Version::vm_platform_string(),
+                    UseCompressedOops ? "compressed oops" : ""
+                  );
++#ifdef DISTRIBUTION_ID
++     st->print_cr("# Distribution: %s", DISTRIBUTION_ID);
++#endif
+ 
+   STEP(60, "(printing problematic frame)")
+ 
+--- arguments.cpp       2008-12-15 12:25:14.000000000 -0500
++++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp  2008-12-15 12:25:32.000000000 -0500
+@@ -25,7 +25,7 @@
+ #include "incls/_precompiled.incl"
+ #include "incls/_arguments.cpp.incl"
+
+-#define DEFAULT_VENDOR_URL_BUG "http://java.sun.com/webapps/bugreport/crash.jsp"
++#define DEFAULT_VENDOR_URL_BUG "http://icedtea.classpath.org/bugzilla"
+ #define DEFAULT_JAVA_LAUNCHER  "generic"
+
+ char**  Arguments::_jvm_flags_array             = NULL;
diff -r 551c49cb2e2a patches/hotspot/default/icedtea-zero-build.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/hotspot/default/icedtea-zero-build.patch	Thu Feb 12 14:56:16 2009 +0000
@@ -0,0 +1,129 @@
+diff -Nru openjdk.orig/hotspot/make/defs.make openjdk/hotspot/make/defs.make
+--- openjdk.orig/hotspot/make/defs.make	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/make/defs.make	2008-11-29 02:14:15.000000000 +0000
+@@ -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	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/buildtree.make	2008-11-29 02:14:15.000000000 +0000
+@@ -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	2008-11-29 01:55:52.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/defs.make	2008-11-29 02:14:15.000000000 +0000
+@@ -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	2008-11-29 01:55:52.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/gcc.make	2008-11-29 02:14:15.000000000 +0000
+@@ -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
+@@ -72,6 +75,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	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/sa.make	2008-11-29 02:14:15.000000000 +0000
+@@ -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	2008-11-22 00:11:18.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/saproc.make	2008-11-29 02:14:15.000000000 +0000
+@@ -44,10 +44,10 @@
+ DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
+ 
+ # 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	2008-11-29 01:55:52.000000000 +0000
++++ openjdk/hotspot/make/linux/makefiles/vm.make	2008-11-29 02:14:15.000000000 +0000
+@@ -158,6 +158,9 @@
+ 
+   LIBS_VM                  += $(LIBS)
+ endif
++ifdef ICEDTEA_ZERO_BUILD
++LIBS_VM += $(LIBFFI_LIBS)
++endif
+ 
+ LINK_VM = $(LINK_LIB.c)
+ 


More information about the distro-pkg-dev mailing list