# HG changeset patch # User doko@ubuntu.com # Date 1231846234 -3600 # Node ID c672bd2ca9782c6dc1837a901347861e31dc96a9 # Parent e34ba0ba2281d40e26fd7ce0a5ee992a22e568f4 2009-01-13 Matthias Klose * patches/hotspot/14.0b08/icedtea-hotspot-dispatch.patch: Remove, replaced by ... * patches/hotspot/14.0b08/icedtea-6791168.patch: New. * patches/hotspot/14.0b08/icedtea-includedb.patch: Update. * HACKING: Update for the above. * Makefile.am: Update for the above. diff -r e34ba0ba2281 -r c672bd2ca978 ChangeLog --- a/ChangeLog Mon Jan 12 17:29:21 2009 +0000 +++ b/ChangeLog Tue Jan 13 12:30:34 2009 +0100 @@ -1,3 +1,12 @@ +2009-01-13 Matthias Klose + + * patches/hotspot/14.0b08/icedtea-hotspot-dispatch.patch: Remove, + replaced by ... + * patches/hotspot/14.0b08/icedtea-6791168.patch: New. + * patches/hotspot/14.0b08/icedtea-includedb.patch: Update. + * HACKING: Update for the above. + * Makefile.am: Update for the above. + 2009-01-12 Andrew Haley * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::do_ldc): diff -r e34ba0ba2281 -r c672bd2ca978 HACKING --- a/HACKING Mon Jan 12 17:29:21 2009 +0000 +++ b/HACKING Tue Jan 13 12:30:34 2009 +0100 @@ -80,9 +80,9 @@ * icedtea-cc-interp-jvmti.patch: Disable some JVMTI capabilities which are unsupported or do not work with the C++ interpreter. * icedtea-a11y-property-change.patch: Dont fire PropertyChangeEvent if the property hasnt changed. * icedtea-demo-swingapplet.patch: Add missing html file needed to run the demo. -* icedtea-hotspot-dispatch.patch: Fix build failure with GCC-4.4 (PR 38725). +* icedtea-6791168.patch: Fix build failure with GCC-4.4 (PR 38725) and compiler warnings. * icedtea-no-precompiled.patch: Don't use precompiled header files in hotspot. -* icedtea-includedb.patch: Add missing include. +* icedtea-includedb.patch: Add missing include files. * icedtea-awt-window-size.patch: Fix X11 window size calculation (S6721088). The following patches are only applied to OpenJDK6 in IcedTea6: diff -r e34ba0ba2281 -r c672bd2ca978 Makefile.am --- a/Makefile.am Mon Jan 12 17:29:21 2009 +0000 +++ b/Makefile.am Tue Jan 13 12:30:34 2009 +0100 @@ -650,7 +650,7 @@ patches/icedtea-format-warnings.patch \ patches/icedtea-fortify-source.patch \ patches/hotspot/$(HSBUILD)/icedtea-sparc-buildfixes.patch \ - patches/hotspot/$(HSBUILD)/icedtea-hotspot-dispatch.patch \ + patches/hotspot/$(HSBUILD)/icedtea-6791168.patch \ patches/hotspot/$(HSBUILD)/icedtea-includedb.patch endif diff -r e34ba0ba2281 -r c672bd2ca978 patches/hotspot/14.0b08/icedtea-6791168.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/14.0b08/icedtea-6791168.patch Tue Jan 13 12:30:34 2009 +0100 @@ -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 e34ba0ba2281 -r c672bd2ca978 patches/hotspot/14.0b08/icedtea-hotspot-dispatch.patch --- a/patches/hotspot/14.0b08/icedtea-hotspot-dispatch.patch Mon Jan 12 17:29:21 2009 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ ---- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp.old 2009-01-06 16:16:57.000000000 -0700 -+++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp 2009-01-06 16:17:53.000000000 -0700 -@@ -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); \ diff -r e34ba0ba2281 -r c672bd2ca978 patches/hotspot/14.0b08/icedtea-includedb.patch --- a/patches/hotspot/14.0b08/icedtea-includedb.patch Mon Jan 12 17:29:21 2009 +0000 +++ b/patches/hotspot/14.0b08/icedtea-includedb.patch Tue Jan 13 12:30:34 2009 +0100 @@ -1,10 +1,97 @@ ---- openjdk/hotspot/src/share/vm/includeDB_core.orig 2008-11-21 17:11:18.000000000 -0700 -+++ openjdk/hotspot/src/share/vm/includeDB_core 2009-01-08 14:32:58.000000000 -0700 -@@ -1314,6 +1314,7 @@ - cppInterpreter_.cpp interpreterRuntime.hpp - cppInterpreter_.cpp interpreter.hpp - cppInterpreter_.cpp interpreterGenerator.hpp -+cppInterpreter_.cpp interfaceSupport.hpp - cppInterpreter_.cpp jvmtiExport.hpp - cppInterpreter_.cpp jvmtiThreadState.hpp - cppInterpreter_.cpp methodDataOop.hpp +--- 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_.hpp macros.hpp + + c2_init_.cpp compile.hpp ++c2_init_.cpp node.hpp + + c2compiler.cpp ad_.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_.cpp assembler_.inline.hpp + dump_.cpp compactingPermGenGen.hpp ++dump_.cpp generation.inline.hpp ++dump_.cpp space.inline.hpp + + forte.cpp collectedHeap.inline.hpp + forte.cpp debugInfoRec.hpp