changeset in /hg/icedtea6: 2008-09-12 Matthias Klose <doko at ubu...

doko at ubuntu.com doko at ubuntu.com
Sat Sep 13 00:34:10 PDT 2008


changeset c46e727121a8 in /hg/icedtea6
details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=c46e727121a8
description:
	2008-09-12  Matthias Klose  <doko at ubuntu.com>

	        * Makefile.am, HACKING: Update for b12 zero patch.
	        * patches/icedtea-hotspot-6b11-7b24.patch: Remove.
	        * patches/icedtea-hotspot-6b12-7b24.patch: New.

diffstat:

4 files changed, 56987 insertions(+), 2 deletions(-)
ChangeLog                               |    6 
HACKING                                 |    2 
Makefile.am                             |    2 
patches/icedtea-hotspot-6b12-7b24.patch |56979 +++++++++++++++++++++++++++++++

diffs (truncated from 57020 to 500 lines):

diff -r f2a1e7f88c53 -r c46e727121a8 ChangeLog
--- a/ChangeLog	Fri Sep 12 23:30:45 2008 +0100
+++ b/ChangeLog	Sat Sep 13 09:32:12 2008 +0200
@@ -1,3 +1,9 @@ 2008-09-12  Andrew John Hughes  <gnu_and
+2008-09-12  Matthias Klose  <doko at ubuntu.com>
+
+	* Makefile.am, HACKING: Update for b12 zero patch.
+	* patches/icedtea-hotspot-6b11-7b24.patch: Remove.
+	* patches/icedtea-hotspot-6b12-7b24.patch: New.
+
 2008-09-12  Andrew John Hughes  <gnu_andrew at member.fsf.org>
 
 	* Makefile.am:
diff -r f2a1e7f88c53 -r c46e727121a8 HACKING
--- a/HACKING	Fri Sep 12 23:30:45 2008 +0100
+++ b/HACKING	Sat Sep 13 09:32:12 2008 +0200
@@ -83,7 +83,7 @@ The following patches are only applied f
 * icedtea-bytecodeInterpreter.patch: Replace fast opcodes with opc_default.
 * icedtea-bytecodeInterpreterWithChecks.patch: Same as icedtea-xslfix.patch (OpenJDK6 only, S6707485).
 * icedtea-eclipse-hotspot-6614100-7b24.patch: Fix Eclipse crash (S6614100). Fixed in OpenJDK7 b29/hs13.
-* icedtea-hotspot-6b11-7b24.patch: Upgrade to HotSpot from OpenJDK b24 (OpenJDK6 only).
+* icedtea-hotspot-6b12-7b24.patch: Upgrade to HotSpot from OpenJDK b24 (OpenJDK6 only).
    - Never edit this patch.  It should be regenerated by unzipping the
      openjdk6 build you're using into openjdk6, and the openjdk7 build
      you want to use into openjdk, then running:
diff -r f2a1e7f88c53 -r c46e727121a8 Makefile.am
--- a/Makefile.am	Fri Sep 12 23:30:45 2008 +0100
+++ b/Makefile.am	Sat Sep 13 09:32:12 2008 +0200
@@ -415,7 +415,7 @@ endif
 # If ZERO_BUILD is set then we are building zero and need
 # to patch up to OpenJDK 7 HotSpot for the C++ interpreter.
 ZERO_PATCHES = \
-	patches/icedtea-hotspot-6b11-7b24.patch \
+	patches/icedtea-hotspot-6b12-7b24.patch \
 	patches/icedtea-hotspot7-build-fixes.patch \
 	patches/icedtea-bytecodeInterpreter.patch \
 	patches/icedtea-bytecodeInterpreterWithChecks.patch \
diff -r f2a1e7f88c53 -r c46e727121a8 patches/icedtea-hotspot-6b12-7b24.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-hotspot-6b12-7b24.patch	Sat Sep 13 09:32:12 2008 +0200
@@ -0,0 +1,56979 @@
+diff -ruNb openjdk6/hotspot/src/share/tools/MakeDeps/BuildConfig.java openjdk/hotspot/src/share/tools/MakeDeps/BuildConfig.java
+--- openjdk6/hotspot/src/share/tools/MakeDeps/BuildConfig.java	2008-08-28 10:23:06.000000000 +0200
++++ openjdk/hotspot/src/share/tools/MakeDeps/BuildConfig.java	2007-12-14 08:57:02.000000000 +0100
+@@ -704,6 +704,3 @@
+ 	receiver.add(attr); receiver.add(value); 
+     }
+ }
+-
+-
+-
+diff -ruNb openjdk6/hotspot/src/share/tools/MakeDeps/Macro.java openjdk/hotspot/src/share/tools/MakeDeps/Macro.java
+--- openjdk6/hotspot/src/share/tools/MakeDeps/Macro.java	2008-08-28 10:23:06.000000000 +0200
++++ openjdk/hotspot/src/share/tools/MakeDeps/Macro.java	2007-12-14 08:57:02.000000000 +0100
+@@ -26,4 +26,3 @@
+     public String name;
+     public String contents;
+ }
+-
+diff -ruNb openjdk6/hotspot/src/share/tools/MakeDeps/Platform.java openjdk/hotspot/src/share/tools/MakeDeps/Platform.java
+--- openjdk6/hotspot/src/share/tools/MakeDeps/Platform.java	2008-08-28 10:23:06.000000000 +0200
++++ openjdk/hotspot/src/share/tools/MakeDeps/Platform.java	2007-12-14 08:57:02.000000000 +0100
+@@ -169,7 +169,7 @@
+ 
+     /** max is 31 on mac, so warn */
+     public int fileNameLengthLimit() {
+-	return 40;
++        return 45;
+     }
+ 
+     public int defaultGrandIncludeThreshold() {
+diff -ruNb openjdk6/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC6.java openjdk/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC6.java
+--- openjdk6/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC6.java	2008-08-28 10:23:06.000000000 +0200
++++ openjdk/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC6.java	2007-12-14 08:57:02.000000000 +0100
+@@ -236,7 +236,7 @@
+ 	       "                /nologo /base:\"0x8000000\" /subsystem:windows /dll" +
+ 	       "                /export:JNI_GetDefaultJavaVMInitArgs /export:JNI_CreateJavaVM /export:JNI_GetCreatedJavaVMs "+ 
+ 	       "                /export:jio_snprintf /export:jio_printf /export:jio_fprintf /export:jio_vfprintf "+
+-	       "                /export:jio_vsnprintf /export:JVM_EnqueueOperation ");
++               "                /export:jio_vsnprintf ");
+ 	rv.add("SUBTRACT LINK32 /pdb:none /map");
+ 
+ 	return rv;
+diff -ruNb openjdk6/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java openjdk/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java
+--- openjdk6/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java	2008-08-28 10:23:06.000000000 +0200
++++ openjdk/hotspot/src/share/tools/MakeDeps/WinGammaPlatformVC7.java	2007-12-14 08:57:02.000000000 +0100
+@@ -262,6 +262,8 @@
+ 
+ 	rv.add(new SpecificNameFilter("JVMTI Generated", new String[] {"^jvmti.+"}));
+ 	
++        rv.add(new SpecificNameFilter("C++ Interpreter Generated", new String[] {"^bytecodeInterpreterWithChecks.+"}));
++
+ 	rv.add(new SpecificNameFilter("Include DBs", new String[] {"^includeDB_.+"}));
+ 
+ 	// this one is to catch files not caught by other filters
+@@ -574,8 +576,7 @@
+ 		"/export:JNI_GetCreatedJavaVMs "+
+ 		"/export:jio_snprintf /export:jio_printf "+
+ 		"/export:jio_fprintf /export:jio_vfprintf "+
+-		"/export:jio_vsnprintf "+
+-		"/export:JVM_EnqueueOperation ");	
++                "/export:jio_vsnprintf ");
+ 	addAttr(rv, "AdditionalDependencies", "Wsock32.lib winmm.lib");
+ 	addAttr(rv, "OutputFile", outDll);
+         addAttr(rv, "LinkIncremental", "1");
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/adlc.hpp openjdk/hotspot/src/share/vm/adlc/adlc.hpp
+--- openjdk6/hotspot/src/share/vm/adlc/adlc.hpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/adlc.hpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_HDR
+-#pragma ident "@(#)adlc.hpp	1.28 07/05/05 17:04:59 JVM"
+-#endif
+ /*
+  * Copyright 1998-2006 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/adlparse.cpp openjdk/hotspot/src/share/vm/adlc/adlparse.cpp
+--- openjdk6/hotspot/src/share/vm/adlc/adlparse.cpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/adlparse.cpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_SRC
+-#pragma ident "@(#)adlparse.cpp	1.205 07/05/05 17:05:00 JVM"
+-#endif
+ /*
+  * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/adlparse.hpp openjdk/hotspot/src/share/vm/adlc/adlparse.hpp
+--- openjdk6/hotspot/src/share/vm/adlc/adlparse.hpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/adlparse.hpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_HDR
+-#pragma ident "@(#)adlparse.hpp	1.79 07/05/05 17:05:00 JVM"
+-#endif
+ /*
+  * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -273,5 +270,3 @@
+   static bool is_int_token(const char* token, int& intval);
+   static void trim(char* &token);  // trim leading & trailing spaces
+ };
+-
+-
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/archDesc.cpp openjdk/hotspot/src/share/vm/adlc/archDesc.cpp
+--- openjdk6/hotspot/src/share/vm/adlc/archDesc.cpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/archDesc.cpp	2007-12-14 08:57:02.000000000 +0100
+@@ -22,6 +22,7 @@
+ //  
+ //
+ 
++
+ // archDesc.cpp - Internal format for architecture definition
+ #include "adlc.hpp"
+ 
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/arena.cpp openjdk/hotspot/src/share/vm/adlc/arena.cpp
+--- openjdk6/hotspot/src/share/vm/adlc/arena.cpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/arena.cpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_SRC
+-#pragma ident "@(#)arena.cpp	1.16 07/05/05 17:05:00 JVM"
+-#endif
+ /*
+  * Copyright 1998-2002 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -173,4 +170,3 @@
+ void CHeapObj::operator delete(void* p){
+  free(p);
+ }
+-
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/arena.hpp openjdk/hotspot/src/share/vm/adlc/arena.hpp
+--- openjdk6/hotspot/src/share/vm/adlc/arena.hpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/arena.hpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_HDR
+-#pragma ident "@(#)arena.hpp	1.17 07/05/05 17:05:00 JVM"
+-#endif
+ /*
+  * Copyright 1998-2002 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -158,4 +155,3 @@
+   size_t size_in_bytes() const         {  return _size_in_bytes; }
+   void   set_size_in_bytes(size_t size)  { _size_in_bytes = size;   }
+ }; 
+-
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/dfa.cpp openjdk/hotspot/src/share/vm/adlc/dfa.cpp
+--- openjdk6/hotspot/src/share/vm/adlc/dfa.cpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/dfa.cpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_SRC
+-#pragma ident "@(#)dfa.cpp	1.83 07/05/05 17:04:59 JVM"
+-#endif
+ /*
+  * Copyright 1997-2004 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -1022,4 +1019,3 @@
+ void ProductionState::print() {
+   _production.print(print_key, print_production);
+ }
+-
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/dict2.cpp openjdk/hotspot/src/share/vm/adlc/dict2.cpp
+--- openjdk6/hotspot/src/share/vm/adlc/dict2.cpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/dict2.cpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_SRC
+-#pragma ident "@(#)dict2.cpp	1.19 07/05/05 17:04:59 JVM"
+-#endif
+ /*
+  * Copyright 1998-2002 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -354,5 +351,3 @@
+   }
+   _key = _value = NULL;
+ }
+-
+-
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/dict2.hpp openjdk/hotspot/src/share/vm/adlc/dict2.hpp
+--- openjdk6/hotspot/src/share/vm/adlc/dict2.hpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/dict2.hpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_HDR
+-#pragma ident "@(#)dict2.hpp	1.16 07/05/05 17:05:01 JVM"
+-#endif
+ /*
+  * Copyright 1998-2000 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -121,5 +118,3 @@
+ };
+ 
+ #endif // _DICT_
+-
+-
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/filebuff.cpp openjdk/hotspot/src/share/vm/adlc/filebuff.cpp
+--- openjdk6/hotspot/src/share/vm/adlc/filebuff.cpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/filebuff.cpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_SRC
+-#pragma ident "@(#)filebuff.cpp	1.30 07/05/05 17:05:01 JVM"
+-#endif
+ /*
+  * Copyright 1997-2002 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -297,4 +294,3 @@
+   va_end(args);
+   _AD._no_output = 1;
+ }
+-
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/filebuff.hpp openjdk/hotspot/src/share/vm/adlc/filebuff.hpp
+--- openjdk6/hotspot/src/share/vm/adlc/filebuff.hpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/filebuff.hpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_HDR
+-#pragma ident "@(#)filebuff.hpp	1.27 07/05/05 17:05:01 JVM"
+-#endif
+ /*
+  * Copyright 1997-2004 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/forms.cpp openjdk/hotspot/src/share/vm/adlc/forms.cpp
+--- openjdk6/hotspot/src/share/vm/adlc/forms.cpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/forms.cpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_SRC
+-#pragma ident "@(#)forms.cpp	1.161 07/05/05 17:04:59 JVM"
+-#endif
+ /*
+  * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -386,4 +383,3 @@
+ void SourceForm::output(FILE *fp) {
+   fprintf(fp,"\n//%s\n%s\n",classname(),(_code?_code:"")); 
+ } 
+-
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/forms.hpp openjdk/hotspot/src/share/vm/adlc/forms.hpp
+--- openjdk6/hotspot/src/share/vm/adlc/forms.hpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/forms.hpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_HDR
+-#pragma ident "@(#)forms.hpp	1.150 07/05/05 17:05:00 JVM"
+-#endif
+ /*
+  * Copyright 1997-2007 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -587,6 +584,3 @@
+   void print_asserts(FILE *fp);
+   void dump();
+ };
+-
+-
+-
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/formsopt.cpp openjdk/hotspot/src/share/vm/adlc/formsopt.cpp
+--- openjdk6/hotspot/src/share/vm/adlc/formsopt.cpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/formsopt.cpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_SRC
+-#pragma ident "@(#)formsopt.cpp	1.53 07/05/05 17:05:01 JVM"
+-#endif
+ /*
+  * Copyright 1998-2006 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -725,4 +722,3 @@
+ void PeepReplace::output(FILE *fp) {      // Write info to output files
+   fprintf(fp,"PeepReplace:\n");
+ }
+-
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/formsopt.hpp openjdk/hotspot/src/share/vm/adlc/formsopt.hpp
+--- openjdk6/hotspot/src/share/vm/adlc/formsopt.hpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/formsopt.hpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_HDR
+-#pragma ident "@(#)formsopt.hpp	1.54 07/05/05 17:05:01 JVM"
+-#endif
+ /*
+  * Copyright 1998-2006 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -549,4 +546,3 @@
+   void dump();
+   void output(FILE *fp);
+ };
+-
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/formssel.cpp openjdk/hotspot/src/share/vm/adlc/formssel.cpp
+--- openjdk6/hotspot/src/share/vm/adlc/formssel.cpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/formssel.cpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_SRC
+-#pragma ident "@(#)formssel.cpp	1.183 07/09/06 15:24:29 JVM"
+-#endif
+ /*
+  * Copyright 1998-2007 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -236,23 +233,58 @@
+   return _matrule ? _matrule->is_ideal_copy() : 0;
+ }
+ 
+-// Return 'true' if this instruction matches an ideal 'CosD' node
++// Return 'true' if this instruction is too complex to rematerialize.
+ int InstructForm::is_expensive() const {
+-  if (_matrule == NULL)  return 0;
+   // We can prove it is cheap if it has an empty encoding.
+   // This helps with platform-specific nops like ThreadLocal and RoundFloat.
++  if (is_empty_encoding())
++    return 0;
++
++  if (is_tls_instruction())
++    return 1;
++
++  if (_matrule == NULL)  return 0;
++
++  return _matrule->is_expensive();
++}
++
++// Has an empty encoding if _size is a constant zero or there
++// are no ins_encode tokens.
++int InstructForm::is_empty_encoding() const {
+   if (_insencode != NULL) {
+     _insencode->reset();
+     if (_insencode->encode_class_iter() == NULL) {
+-      return 0;
++      return 1;
+     }
+   }
+   if (_size != NULL && strcmp(_size, "0") == 0) {
++    return 1;
++  }
+     return 0;
++}
++
++int InstructForm::is_tls_instruction() const {
++  if (_ident != NULL &&
++      ( ! strcmp( _ident,"tlsLoadP") ||
++        ! strncmp(_ident,"tlsLoadP_",9)) ) {
++    return 1;
+   }
+-  return _matrule->is_expensive();
++
++  if (_matrule != NULL && _insencode != NULL) {
++    const char* opType = _matrule->_opType;
++    if (strcmp(opType, "Set")==0)
++      opType = _matrule->_rChild->_opType;
++    if (strcmp(opType,"ThreadLocal")==0) {
++      fprintf(stderr, "Warning: ThreadLocal instruction %s should be named 'tlsLoadP_*'\n",
++              (_ident == NULL ? "NULL" : _ident));
++      return 1;
++    }
++  }
++
++  return 0;
+ }
+ 
++
+ // Return 'true' if this instruction matches an ideal 'Copy*' node
+ bool InstructForm::is_ideal_unlock() const {
+   return _matrule ? _matrule->is_ideal_unlock() : false;
+@@ -492,6 +524,10 @@
+   if( _components.count() == 1 && _components[0]->is(Component::USE_DEF) ) 
+     rematerialize = true;
+ 
++  // Pseudo-constants (values easily available to the runtime)
++  if (is_empty_encoding() && is_tls_instruction())
++    rematerialize = true;
++
+   // 1-input, 1-output, such as copies or increments.
+   if( _components.count() == 2 && 
+       _components[0]->is(Component::DEF) && 
+@@ -1171,9 +1207,9 @@
+     // Output the format call for this operand
+     fprintf(fp,"opnd_array(%d)->",idx);
+     if (idx == 0) 
+-      fprintf(fp,"int_format(ra, this); // %s\n", rep_var);
++      fprintf(fp,"int_format(ra, this, st); // %s\n", rep_var);
+     else
+-      fprintf(fp,"ext_format(ra, this,idx%d); // %s\n", idx, rep_var );
++      fprintf(fp,"ext_format(ra, this,idx%d, st); // %s\n", idx, rep_var );
+   }
+ }
+ 
+@@ -2329,11 +2365,11 @@
+ 
+ void OperandForm::format_constant(FILE *fp, uint const_index, uint const_type) {
+   switch(const_type) {
+-  case Form::idealI: fprintf(fp,"tty->print(\"#%%d\", _c%d);\n", const_index); break;
+-  case Form::idealP: fprintf(fp,"_c%d->dump();\n",               const_index); break;
+-  case Form::idealL: fprintf(fp,"tty->print(\"#%%lld\", _c%d);\n", const_index); break;
+-  case Form::idealF: fprintf(fp,"tty->print(\"#%%f\", _c%d);\n", const_index); break;
+-  case Form::idealD: fprintf(fp,"tty->print(\"#%%f\", _c%d);\n", const_index); break;
++  case Form::idealI: fprintf(fp,"st->print(\"#%%d\", _c%d);\n", const_index); break;
++  case Form::idealP: fprintf(fp,"_c%d->dump_on(st);\n",         const_index); break;
++  case Form::idealL: fprintf(fp,"st->print(\"#%%lld\", _c%d);\n", const_index); break;
++  case Form::idealF: fprintf(fp,"st->print(\"#%%f\", _c%d);\n", const_index); break;
++  case Form::idealD: fprintf(fp,"st->print(\"#%%f\", _c%d);\n", const_index); break;
+   default:
+     assert( false, "ShouldNotReachHere()");
+   }
+@@ -3725,6 +3761,17 @@
+ int MatchRule::is_ideal_copy() const {
+   if( _rChild ) {
+     const char  *opType = _rChild->_opType;
++    if( strcmp(opType,"CastII")==0 )
++      return 1;
++    // Do not treat *CastPP this way, because it
++    // may transfer a raw pointer to an oop.
++    // If the register allocator were to coalesce this
++    // into a single LRG, the GC maps would be incorrect.
++    //if( strcmp(opType,"CastPP")==0 )
++    //  return 1;
++    //if( strcmp(opType,"CheckCastPP")==0 )
++    //  return 1;
++    //
+     // Do not treat CastX2P or CastP2X this way, because
+     // raw pointers and int types are treated differently
+     // when saving local & stack info for safepoints in 
+@@ -3773,7 +3820,6 @@
+         strcmp(opType,"ConvL2I")==0 ||
+         strcmp(opType,"RoundDouble")==0 ||
+         strcmp(opType,"RoundFloat")==0 ||
+-        strcmp(opType,"ThreadLocal")==0 ||
+         strcmp(opType,"ReverseBytesI")==0 ||
+         strcmp(opType,"ReverseBytesL")==0 ||
+         strcmp(opType,"Replicate16B")==0 ||
+@@ -3951,4 +3997,3 @@
+   fprintf(fp,"\nFormat Rule: \n%s", (_temp?_temp:""));
+   fprintf(fp,"\n");
+ }
+-
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/formssel.hpp openjdk/hotspot/src/share/vm/adlc/formssel.hpp
+--- openjdk6/hotspot/src/share/vm/adlc/formssel.hpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/formssel.hpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_HDR
+-#pragma ident "@(#)formssel.hpp	1.76 07/05/17 15:49:19 JVM"
+-#endif
+ /*
+  * Copyright 1998-2007 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -139,6 +136,8 @@
+   // ideal opcode enumeration
+   virtual const char *ideal_Opcode(FormDict &globals)  const; 
+   virtual int         is_expensive() const;     // node matches ideal 'CosD'
++  virtual int         is_empty_encoding() const; // _size=0 and/or _insencode empty
++  virtual int         is_tls_instruction() const; // tlsLoadP rule or ideal ThreadLocal
+   virtual int         is_ideal_copy() const;    // node matches ideal 'Copy*'
+   virtual bool        is_ideal_unlock() const;  // node matches ideal 'Unlock'
+   virtual bool        is_ideal_call_leaf() const; // node matches ideal 'CallLeaf'
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/output_c.cpp openjdk/hotspot/src/share/vm/adlc/output_c.cpp
+--- openjdk6/hotspot/src/share/vm/adlc/output_c.cpp	2008-08-28 10:23:07.000000000 +0200
++++ openjdk/hotspot/src/share/vm/adlc/output_c.cpp	2007-12-14 08:57:02.000000000 +0100
+@@ -1,6 +1,3 @@
+-#ifdef USE_PRAGMA_IDENT_SRC
+-#pragma ident "@(#)output_c.cpp	1.184 07/05/17 15:49:23 JVM"
+-#endif
+ /*
+  * Copyright 1998-2007 Sun Microsystems, Inc.  All Rights Reserved.
+  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+@@ -2199,7 +2196,7 @@
+   const char* reg_conversion(const char* rep_var) {
+     if (strcmp(rep_var,"$Register") == 0)      return "as_Register";
+     if (strcmp(rep_var,"$FloatRegister") == 0) return "as_FloatRegister";
+-#if defined(IA32)
++#if defined(IA32) || defined(AMD64)
+     if (strcmp(rep_var,"$XMMRegister") == 0)   return "as_XMMRegister";
+ #endif
+     return NULL;
+diff -ruNb openjdk6/hotspot/src/share/vm/adlc/output_h.cpp openjdk/hotspot/src/share/vm/adlc/output_h.cpp
+--- openjdk6/hotspot/src/share/vm/adlc/output_h.cpp	2008-08-28 10:23:07.000000000 +0200



More information about the distro-pkg-dev mailing list