diff --git a/.hgtags b/.hgtags
index 78c11849563..fde585f8bbb 100644
--- a/.hgtags
+++ b/.hgtags
@@ -179,3 +179,6 @@ c7aa5cca1c01689a7b1a92411daf83684af05a33 jdk8-b53
 319f583f66db47395fa86127dd3ddb729eb7c64f jdk8-b55
 ffe6bce5a521be40146af2ac03c509b7bac30595 jdk8-b56
 2c21c080b11b93efb3851e39e1363e45da805943 jdk8-b57
+479d3302a26d7607ba271d66973e59ebf58825b6 jdk8-b58
+3bd874584fc01aae92fbc8827e2bd04d8b6ace04 jdk8-b59
+5e3adc681779037a2d33b7be6f75680619085492 jdk8-b60
diff --git a/.hgtags-top-repo b/.hgtags-top-repo
index 1f4c7f1203a..dba7899a1e6 100644
--- a/.hgtags-top-repo
+++ b/.hgtags-top-repo
@@ -179,3 +179,6 @@ c1a277c6022affbc6855bdfb039511e73fbe2395 jdk8-b54
 b85b44cced2406792cfb9baab1377ff03e7001d8 jdk8-b55
 76844579fa4b30929731115b237e477181a82394 jdk8-b56
 522dfac8ca4d07c0b74025d4ac3b6e5feefbb829 jdk8-b57
+9367024804874faf8e958adeb333682bab1c0c47 jdk8-b58
+dae9821589ccd2611bdf7084269b98e819091770 jdk8-b59
+e07f499b9dccb529ecf74172cf6ac11a195ec57a jdk8-b60
diff --git a/corba/.hgtags b/corba/.hgtags
index 07435fcbc5b..8f91b19e721 100644
--- a/corba/.hgtags
+++ b/corba/.hgtags
@@ -179,3 +179,6 @@ d20d9eb9f093adbf392918c703960ad24c93a331 jdk8-b50
 e8a0e84383d6fbd303ce44bd355fb25972b13286 jdk8-b55
 bf1bb47414e178beff67dc255fc3b97bf401f679 jdk8-b56
 f3ab4163ae012965fc8acdfc25ce0fece8d6906d jdk8-b57
+18462a19f7bd66d38015f61ea549a5e0c0c889a3 jdk8-b58
+d54dc53e223ed9ce7d5f4d2cd02ad9d5def3c2db jdk8-b59
+207ef43ba69ead6cbbab415d81834545e4d46747 jdk8-b60
diff --git a/corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java b/corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java
index 143beefc8e1..aa3c6bea2f5 100644
--- a/corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java
+++ b/corba/src/share/classes/sun/rmi/rmic/iiop/StubGenerator.java
@@ -1631,7 +1631,7 @@ public class StubGenerator extends sun.rmi.rmic.iiop.Generator {
 
         // Write data members...
         p.pln();
-        p.pln("private " + getName(theType) + " target = null;");
+        p.pln("volatile private " + getName(theType) + " target = null;");
         p.pln();
 
         // Write the ids...
@@ -1695,6 +1695,10 @@ public class StubGenerator extends sun.rmi.rmic.iiop.Generator {
 
         if (remoteMethods.length > 0) {
             p.plnI("try {");
+            p.pln(getName(theType) + " target = this.target;");
+            p.plnI("if (target == null) {");
+            p.pln("throw new java.io.IOException();");
+            p.pOln("}");
             p.plnI(idExtInputStream + " "+in+" = ");
             p.pln("(" + idExtInputStream + ") "+_in+";");
             p.pO();
diff --git a/hotspot/.hgtags b/hotspot/.hgtags
index af51d13d195..4f1b3692f38 100644
--- a/hotspot/.hgtags
+++ b/hotspot/.hgtags
@@ -279,3 +279,9 @@ af0c8a0808516317333dcf9af15567cdd52761ce jdk8-b55
 9b076bc3ab67d42d1d02144ef8dcd6006a7fc0d6 hs25-b01
 d70102c4cb73158902acaa6016f47c7bc14e0d67 jdk8-b57
 5f54277c67f755a377999bff904ab48aa63ddaf9 hs25-b02
+6bb378c50828e9d76fb2653d1712c66ea8fc47db jdk8-b58
+f2e12eb74117c917c0bb264694c02de4a6a15a10 hs25-b03
+8a1a6b9b4f20fd2f6a12441d638e51f19a82db19 jdk8-b59
+1cc7a2a11d00832e3d07f81f3744a6883422db7e hs25-b04
+3cfd05b2219a29649741a52637696f06acf24a4e jdk8-b60
+b261523fe66c40a02968f0aa7e73602491bb3386 hs25-b05
diff --git a/hotspot/agent/make/ClosureFinder.java b/hotspot/agent/make/ClosureFinder.java
deleted file mode 100644
index 939a68561b7..00000000000
--- a/hotspot/agent/make/ClosureFinder.java
+++ /dev/null
@@ -1,254 +0,0 @@
-/*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-import java.io.*;
-import java.util.*;
-
-
-/**
-<p> This class finds transitive closure of dependencies from a given
-root set of classes. If your project has lots of .class files and you
-want to ship only those .class files which are used (transitively)
-from a root set of classes, then you can use this utility.  </p> <p>
-How does it work?</p>
-
-<p> We walk through all constant pool entries of a given class and
-find all modified UTF-8 entries. Anything that looks like a class name is
-considered as a class and we search for that class in the given
-classpath. If we find a .class of that name, then we add that class to
-list.</p>
-
-<p> We could have used CONSTANT_ClassInfo type constants only. But
-that will miss classes used through Class.forName or xyz.class
-construct.  But, if you refer to a class name in some other string we
-would include it as dependency :(. But this is quite unlikely
-anyway. To look for exact Class.forName argument(s) would involve
-bytecode analysis. Also, we handle only simple reflection. If you
-accept name of a class from externally (for eg properties file or
-command line args for example, this utility will not be able to find
-that dependency. In such cases, include those classes in the root set.
-</p>
-*/
-
-public class ClosureFinder {
-    private Collection roots;            // root class names Collection<String>
-    private Map        visitedClasses;   // set of all dependencies as a Map
-    private String     classPath;        // classpath to look for .class files
-    private String[]   pathComponents;   // classpath components
-    private static final boolean isWindows = File.separatorChar != '/';
-
-    public ClosureFinder(Collection roots, String classPath) {
-        this.roots = roots;
-        this.classPath = classPath;
-        parseClassPath();
-    }
-
-    // parse classPath into pathComponents array
-    private void parseClassPath() {
-        List paths = new ArrayList();
-        StringTokenizer st = new StringTokenizer(classPath, File.pathSeparator);
-        while (st.hasMoreTokens())
-            paths.add(st.nextToken());
-
-        Object[] arr = paths.toArray();
-        pathComponents = new String[arr.length];
-        System.arraycopy(arr, 0, pathComponents, 0, arr.length);
-    }
-
-    // if output is aleady not computed, compute it now
-    // result is a map from class file name to base path where the .class was found
-    public Map find() {
-        if (visitedClasses == null) {
-            visitedClasses = new HashMap();
-            computeClosure();
-        }
-        return visitedClasses;
-    }
-
-    // compute closure for all given root classes
-    private void computeClosure() {
-        for (Iterator rootsItr = roots.iterator(); rootsItr.hasNext();) {
-            String name = (String) rootsItr.next();
-            name = name.substring(0, name.indexOf(".class"));
-            computeClosure(name);
-        }
-    }
-
-
-    // looks up for .class in pathComponents and returns
-    // base path if found, else returns null
-    private String lookupClassFile(String classNameAsPath) {
-        for (int i = 0; i < pathComponents.length; i++) {
-            File f =  new File(pathComponents[i] + File.separator +
-                               classNameAsPath + ".class");
-            if (f.exists()) {
-                if (isWindows) {
-                    String name = f.getName();
-                    // Windows reports special devices AUX,NUL,CON as files
-                    // under any directory. It does not care about file extention :-(
-                    if (name.compareToIgnoreCase("AUX.class") == 0 ||
-                        name.compareToIgnoreCase("NUL.class") == 0 ||
-                        name.compareToIgnoreCase("CON.class") == 0) {
-                        return null;
-                    }
-                }
-                return pathComponents[i];
-            }
-        }
-        return null;
-    }
-
-
-    // from JVM spec. 2'nd edition section 4.4
-    private static final int CONSTANT_Class = 7;
-    private static final int CONSTANT_FieldRef = 9;
-    private static final int CONSTANT_MethodRef = 10;
-    private static final int CONSTANT_InterfaceMethodRef = 11;
-    private static final int CONSTANT_String = 8;
-    private static final int CONSTANT_Integer = 3;
-    private static final int CONSTANT_Float = 4;
-    private static final int CONSTANT_Long = 5;
-    private static final int CONSTANT_Double = 6;
-    private static final int CONSTANT_NameAndType = 12;
-    private static final int CONSTANT_Utf8 = 1;
-
-    // whether a given string may be a class name?
-    private boolean mayBeClassName(String internalClassName) {
-        int len = internalClassName.length();
-        for (int s = 0; s < len; s++) {
-            char c = internalClassName.charAt(s);
-            if (!Character.isJavaIdentifierPart(c) && c != '/')
-                return false;
-        }
-        return true;
-    }
-
-    // compute closure for a given class
-    private void computeClosure(String className) {
-        if (visitedClasses.get(className) != null) return;
-        String basePath = lookupClassFile(className);
-        if (basePath != null) {
-            visitedClasses.put(className, basePath);
-            try {
-                File classFile = new File(basePath + File.separator + className + ".class");
-                FileInputStream fis = new FileInputStream(classFile);
-                DataInputStream dis = new DataInputStream(fis);
-                // look for .class signature
-                if (dis.readInt() != 0xcafebabe) {
-                    System.err.println(classFile.getAbsolutePath() + " is not a valid .class file");
-                    return;
-                }
-
-                // ignore major and minor version numbers
-                dis.readShort();
-                dis.readShort();
-
-                // read number of constant pool constants
-                int numConsts = (int) dis.readShort();
-                String[] strings = new String[numConsts];
-
-                // zero'th entry is unused
-                for (int cpIndex = 1; cpIndex < numConsts; cpIndex++) {
-                    int constType = (int) dis.readByte();
-                    switch (constType) {
-                    case CONSTANT_Class:
-                    case CONSTANT_String:
-                        dis.readShort(); // string name index;
-                        break;
-
-                    case CONSTANT_FieldRef:
-                    case CONSTANT_MethodRef:
-                    case CONSTANT_InterfaceMethodRef:
-                    case CONSTANT_NameAndType:
-                    case CONSTANT_Integer:
-                    case CONSTANT_Float:
-                        // all these are 4 byte constants
-                        dis.readInt();
-                        break;
-
-                    case CONSTANT_Long:
-                    case CONSTANT_Double:
-                        // 8 byte constants
-                        dis.readLong();
-                        // occupies 2 cp entries
-                        cpIndex++;
-                        break;
-
-
-                    case CONSTANT_Utf8: {
-                        strings[cpIndex] = dis.readUTF();
-                        break;
-                    }
-
-                    default:
-                        System.err.println("invalid constant pool entry");
-                        return;
-                    }
-                }
-
-            // now walk thru the string constants and look for class names
-            for (int s = 0; s < numConsts; s++) {
-                if (strings[s] != null && mayBeClassName(strings[s]))
-                    computeClosure(strings[s].replace('/', File.separatorChar));
-            }
-
-            } catch (IOException exp) {
-                // ignore for now
-            }
-
-        }
-    }
-
-    // a sample main that accepts roots classes in a file and classpath as args
-    public static void main(String[] args) {
-        if (args.length != 2) {
-            System.err.println("Usage: ClosureFinder <root class file> <class path>");
-            System.exit(1);
-        }
-
-        List roots = new ArrayList();
-        try {
-            FileInputStream fis = new FileInputStream(args[0]);
-            DataInputStream dis = new DataInputStream(fis);
-            String line = null;
-            while ((line = dis.readLine()) != null) {
-                if (isWindows) {
-                    line = line.replace('/', File.separatorChar);
-                }
-                roots.add(line);
-            }
-        } catch (IOException exp) {
-            System.err.println(exp.getMessage());
-            System.exit(2);
-        }
-
-        ClosureFinder cf = new ClosureFinder(roots, args[1]);
-        Map out = cf.find();
-        Iterator res = out.keySet().iterator();
-        for(; res.hasNext(); ) {
-            String className = (String) res.next();
-            System.out.println(className + ".class");
-        }
-    }
-}
diff --git a/hotspot/agent/make/Makefile b/hotspot/agent/make/Makefile
index fd5499367a0..c0183f17bc7 100644
--- a/hotspot/agent/make/Makefile
+++ b/hotspot/agent/make/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -41,10 +41,7 @@ endif
 PKGLIST = \
 sun.jvm.hotspot \
 sun.jvm.hotspot.asm \
-sun.jvm.hotspot.asm.amd64 \
-sun.jvm.hotspot.asm.ia64 \
 sun.jvm.hotspot.asm.sparc \
-sun.jvm.hotspot.asm.x86 \
 sun.jvm.hotspot.bugspot \
 sun.jvm.hotspot.bugspot.tree \
 sun.jvm.hotspot.c1 \
@@ -138,10 +135,7 @@ com.sun.java.swing.ui
 FILELIST = \
 sun/jvm/hotspot/*.java \
 sun/jvm/hotspot/asm/*.java \
-sun/jvm/hotspot/asm/amd64/*.java \
-sun/jvm/hotspot/asm/ia64/*.java \
 sun/jvm/hotspot/asm/sparc/*.java \
-sun/jvm/hotspot/asm/x86/*.java \
 sun/jvm/hotspot/bugspot/*.java \
 sun/jvm/hotspot/bugspot/tree/*.java \
 sun/jvm/hotspot/c1/*.java \
diff --git a/hotspot/agent/make/saenv.sh b/hotspot/agent/make/saenv.sh
index dcecd5187a8..ab9a0a431c4 100644
--- a/hotspot/agent/make/saenv.sh
+++ b/hotspot/agent/make/saenv.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/make/start-debug-server-proc.sh b/hotspot/agent/make/start-debug-server-proc.sh
index d538daf43f6..73152e3404d 100644
--- a/hotspot/agent/make/start-debug-server-proc.sh
+++ b/hotspot/agent/make/start-debug-server-proc.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/os/bsd/MacosxDebuggerLocal.m b/hotspot/agent/src/os/bsd/MacosxDebuggerLocal.m
index 04eaf9429cc..435262c4513 100644
--- a/hotspot/agent/src/os/bsd/MacosxDebuggerLocal.m
+++ b/hotspot/agent/src/os/bsd/MacosxDebuggerLocal.m
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,13 @@
 #import <mach/mach.h>
 #import <mach/mach_types.h>
 #import <sys/sysctl.h>
+#import <stdio.h>
+#import <stdarg.h>
 #import <stdlib.h>
+#import <strings.h>
+#import <dlfcn.h>
+#import <limits.h>
+#import <errno.h>
 
 jboolean debug = JNI_FALSE;
 
@@ -60,6 +66,9 @@ static task_t getTask(JNIEnv *env, jobject this_obj) {
 #define CHECK_EXCEPTION if ((*env)->ExceptionOccurred(env)) { return;}
 #define THROW_NEW_DEBUGGER_EXCEPTION_(str, value) { throw_new_debugger_exception(env, str); return value; }
 #define THROW_NEW_DEBUGGER_EXCEPTION(str) { throw_new_debugger_exception(env, str); return;}
+#define CHECK_EXCEPTION_CLEAR if ((*env)->ExceptionOccurred(env)) { (*env)->ExceptionClear(env); } 
+#define CHECK_EXCEPTION_CLEAR_VOID if ((*env)->ExceptionOccurred(env)) { (*env)->ExceptionClear(env); return; } 
+#define CHECK_EXCEPTION_CLEAR_(value) if ((*env)->ExceptionOccurred(env)) { (*env)->ExceptionClear(env); return value; } 
 
 static void throw_new_debugger_exception(JNIEnv* env, const char* errMsg) {
   (*env)->ThrowNew(env, (*env)->FindClass(env, "sun/jvm/hotspot/debugger/DebuggerException"), errMsg);
@@ -404,3 +413,164 @@ JNF_COCOA_ENTER(env);
   }
 JNF_COCOA_EXIT(env);
 }
+
+/*
+ * Class:     sun_jvm_hotspot_asm_Disassembler
+ * Method:    load_library
+ * Signature: (Ljava/lang/String;)L
+ */
+JNIEXPORT jlong JNICALL Java_sun_jvm_hotspot_asm_Disassembler_load_1library(JNIEnv * env,
+                                                                           jclass disclass,
+                                                                           jstring jrepath_s,
+                                                                           jstring libname_s) {
+  uintptr_t func = 0;
+  const char* error_message = NULL;
+  const char* java_home;
+  jboolean isCopy;
+  uintptr_t *handle = NULL;
+
+  const char * jrepath = (*env)->GetStringUTFChars(env, jrepath_s, &isCopy); // like $JAVA_HOME/jre/lib/sparc/
+  const char * libname = (*env)->GetStringUTFChars(env, libname_s, &isCopy);
+  char buffer[128];
+
+  /* Load the hsdis library */
+  void* hsdis_handle;
+  hsdis_handle = dlopen(libname, RTLD_LAZY | RTLD_GLOBAL);
+  if (hsdis_handle == NULL) {
+    snprintf(buffer, sizeof(buffer), "%s%s", jrepath, libname);
+    hsdis_handle = dlopen(buffer, RTLD_LAZY | RTLD_GLOBAL);
+  }
+  if (hsdis_handle != NULL) {
+    func = (uintptr_t)dlsym(hsdis_handle, "decode_instructions_virtual");
+  }
+  if (func == 0) {
+    error_message = dlerror();
+    fprintf(stderr, "%s\n", error_message);
+  }
+
+  (*env)->ReleaseStringUTFChars(env, libname_s, libname);
+  (*env)->ReleaseStringUTFChars(env, jrepath_s, jrepath);
+
+  if (func == 0) {
+    /* Couldn't find entry point.  error_message should contain some
+     * platform dependent error message.
+     */
+    THROW_NEW_DEBUGGER_EXCEPTION(error_message);
+  }
+  return (jlong)func;
+}
+
+/* signature of decode_instructions_virtual from hsdis.h */
+typedef void* (*decode_func)(uintptr_t start_va, uintptr_t end_va,
+                             unsigned char* start, uintptr_t length,
+                             void* (*event_callback)(void*, const char*, void*),
+                             void* event_stream,
+                             int (*printf_callback)(void*, const char*, ...),
+                             void* printf_stream,
+                             const char* options);
+
+/* container for call back state when decoding instructions */
+typedef struct {
+  JNIEnv* env;
+  jobject dis;
+  jobject visitor;
+  jmethodID handle_event;
+  jmethodID raw_print;
+  char buffer[4096];
+} decode_env;
+
+
+/* event callback binding to Disassembler.handleEvent */
+static void* event_to_env(void* env_pv, const char* event, void* arg) {
+  decode_env* denv = (decode_env*)env_pv;
+  JNIEnv* env = denv->env;
+  jstring event_string = (*env)->NewStringUTF(env, event);
+  jlong result = (*env)->CallLongMethod(env, denv->dis, denv->handle_event, denv->visitor,
+                                        event_string, (jlong) (uintptr_t)arg);
+  /* ignore exceptions for now */
+  CHECK_EXCEPTION_CLEAR_((void *)0);
+  return (void*)(uintptr_t)result;
+}
+
+/* printing callback binding to Disassembler.rawPrint */
+static int printf_to_env(void* env_pv, const char* format, ...) {
+  jstring output;
+  va_list ap;
+  int cnt;
+  decode_env* denv = (decode_env*)env_pv;
+  JNIEnv* env = denv->env;
+  size_t flen = strlen(format);
+  const char* raw = NULL;
+
+  if (flen == 0)  return 0;
+  if (flen < 2 ||
+      strchr(format, '%') == NULL) {
+    raw = format;
+  } else if (format[0] == '%' && format[1] == '%' &&
+             strchr(format+2, '%') == NULL) {
+    // happens a lot on machines with names like %foo
+    flen--;
+    raw = format+1;
+  }
+  if (raw != NULL) {
+    jstring output = (*env)->NewStringUTF(env, raw);
+    (*env)->CallVoidMethod(env, denv->dis, denv->raw_print, denv->visitor, output);
+    CHECK_EXCEPTION_CLEAR;
+    return (int) flen;
+  }
+  va_start(ap, format);
+  cnt = vsnprintf(denv->buffer, sizeof(denv->buffer), format, ap);
+  va_end(ap);
+
+  output = (*env)->NewStringUTF(env, denv->buffer);
+  (*env)->CallVoidMethod(env, denv->dis, denv->raw_print, denv->visitor, output);
+  CHECK_EXCEPTION_CLEAR;
+  return cnt;
+}
+
+/*
+ * Class:     sun_jvm_hotspot_asm_Disassembler
+ * Method:    decode
+ * Signature: (Lsun/jvm/hotspot/asm/InstructionVisitor;J[BLjava/lang/String;J)V
+ */
+JNIEXPORT void JNICALL Java_sun_jvm_hotspot_asm_Disassembler_decode(JNIEnv * env,
+                                                                    jobject dis,
+                                                                    jobject visitor,
+                                                                    jlong startPc,
+                                                                    jbyteArray code,
+                                                                    jstring options_s,
+                                                                    jlong decode_instructions_virtual) {
+  jboolean isCopy;
+  jbyte* start = (*env)->GetByteArrayElements(env, code, &isCopy);
+  jbyte* end = start + (*env)->GetArrayLength(env, code);
+  const char * options = (*env)->GetStringUTFChars(env, options_s, &isCopy);
+  jclass disclass = (*env)->GetObjectClass(env, dis);
+
+  decode_env denv;
+  denv.env = env;
+  denv.dis = dis;
+  denv.visitor = visitor;
+
+  /* find Disassembler.handleEvent callback */
+  denv.handle_event = (*env)->GetMethodID(env, disclass, "handleEvent",
+                                          "(Lsun/jvm/hotspot/asm/InstructionVisitor;Ljava/lang/String;J)J");
+  CHECK_EXCEPTION_CLEAR_VOID
+
+  /* find Disassembler.rawPrint callback */
+  denv.raw_print = (*env)->GetMethodID(env, disclass, "rawPrint",
+                                       "(Lsun/jvm/hotspot/asm/InstructionVisitor;Ljava/lang/String;)V");
+  CHECK_EXCEPTION_CLEAR_VOID
+
+  /* decode the buffer */
+  (*(decode_func)(uintptr_t)decode_instructions_virtual)(startPc,
+                                                         startPc + end - start,
+                                                         (unsigned char*)start,
+                                                         end - start,
+                                                         &event_to_env,  (void*) &denv,
+                                                         &printf_to_env, (void*) &denv,
+                                                         options);
+
+  /* cleanup */
+  (*env)->ReleaseByteArrayElements(env, code, start, JNI_ABORT);
+  (*env)->ReleaseStringUTFChars(env, options_s, options);
+}
diff --git a/hotspot/agent/src/os/linux/Makefile b/hotspot/agent/src/os/linux/Makefile
index b79effe952c..dfbb0b9ebd5 100644
--- a/hotspot/agent/src/os/linux/Makefile
+++ b/hotspot/agent/src/os/linux/Makefile
@@ -36,25 +36,33 @@ SOURCES  = salibelf.c   \
 
 INCLUDES = -I${JAVA_HOME}/include -I${JAVA_HOME}/include/linux 
 
-OBJS     = $(SOURCES:.c=.o)
+OBJS     = $(SOURCES:%.c=$(ARCH)/%.o) $(ARCH)/sadis.o
 
 LIBS     = -lthread_db
 
-CFLAGS   = -c -fPIC -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) -D_FILE_OFFSET_BITS=64
+CFLAGS   = -c -fPIC -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) -I$(ARCH)
 
 LIBSA = $(ARCH)/libsaproc.so
 
 all: $(LIBSA)
 
-LinuxDebuggerLocal.o: LinuxDebuggerLocal.c
-	$(JAVAH) -jni -classpath ../../../build/classes  \
+$(ARCH):
+       mkdir $(ARCH)
+
+$(ARCH)/LinuxDebuggerLocal.o: LinuxDebuggerLocal.c
+        $(JAVAH) -jni -classpath ../../../build/classes -d $(ARCH) \
 		sun.jvm.hotspot.debugger.x86.X86ThreadContext \
 		sun.jvm.hotspot.debugger.sparc.SPARCThreadContext \
 		sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext 
-	$(GCC) $(CFLAGS) $<
+        $(GCC) $(CFLAGS) $< -o $@
 
-.c.obj:
-	$(GCC) $(CFLAGS)
+$(ARCH)/sadis.o:  ../../share/native/sadis.c
+        $(JAVAH) -jni -classpath ../../../build/classes -d $(ARCH) \
+                sun.jvm.hotspot.asm.Disassembler
+        $(GCC) $(CFLAGS) $< -o $@
+ 
+$(ARCH)/%.o: %.c
+        $(GCC) $(CFLAGS) $< -o $@
 
 ifndef LDNOMAP
   LFLAGS_LIBSA = -Xlinker --version-script=mapfile
@@ -68,9 +76,8 @@ ifneq ($(_HAS_HASH_STYLE_GNU),)
 endif
 LFLAGS_LIBSA += $(LDFLAGS_HASH_STYLE)
 
-$(LIBSA): $(OBJS) mapfile
-	if [ ! -d $(ARCH) ] ; then mkdir $(ARCH) ; fi
-	$(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
+$(LIBSA): $(ARCH) $(OBJS) mapfile
+        $(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(OBJS) $(LIBS)
 
 test.o: test.c
 	$(GCC) -c -o test.o -g -D_GNU_SOURCE -D$(ARCH) $(INCLUDES) test.c
@@ -79,7 +86,4 @@ test: test.o
 	$(GCC) -o test test.o -L$(ARCH) -lsaproc $(LIBS)
 
 clean:
-	rm -rf $(LIBSA)
-	rm -rf $(OBJS)
-	rmdir $(ARCH)
-
+        rm -fr $(ARCH)
diff --git a/hotspot/agent/src/os/linux/mapfile b/hotspot/agent/src/os/linux/mapfile
index b71e43da9d8..d81696d4db4 100644
--- a/hotspot/agent/src/os/linux/mapfile
+++ b/hotspot/agent/src/os/linux/mapfile
@@ -1,7 +1,5 @@
 #
-
-#
-# Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -22,7 +20,6 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #  
-#
 
 # Define public interface.
 
@@ -40,6 +37,10 @@ SUNWprivate_1.1 {
 		Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_readBytesFromProcess0;
 		Java_sun_jvm_hotspot_debugger_linux_LinuxDebuggerLocal_getThreadIntegerRegisterSet0;
 	
+                # Disassembler interface
+                Java_sun_jvm_hotspot_asm_Disassembler_decode;
+                Java_sun_jvm_hotspot_asm_Disassembler_load_1library;
+
 		# proc_service.h functions - to be used by libthread_db
 		ps_getpid;
 		ps_pglobal_lookup;
diff --git a/hotspot/agent/src/os/solaris/proc/Makefile b/hotspot/agent/src/os/solaris/proc/Makefile
index f7319c08839..60ba88eb47b 100644
--- a/hotspot/agent/src/os/solaris/proc/Makefile
+++ b/hotspot/agent/src/os/solaris/proc/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
 #   sparcv9:  Build the 64 bit sparcv9 version in ./sparcv9
 #   i386:     Build the 32 bit i386 version in ./i386
 
-.PHONY: sparc sparcv9 i386
+.PHONY: sparc sparcv9 i386 amd64
 
 ARCH_ORIG = $(shell uname -p)
 
@@ -36,6 +36,8 @@ RM     := /usr/bin/rm
 MKDIRS := /usr/bin/mkdir -p
 
 CLASSES_DIR = ../../../../build/classes
+SAPROC_INCLUDES=-I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris
+SADIS=../../../share/native/sadis.c
 
 ifeq "$(ARCH_ORIG)" "i386"
  ALL_TARGET = i386 $(filter amd64,$(shell isalist))
@@ -43,6 +45,11 @@ else
  ALL_TARGET = sparc sparcv9
 endif
 
+CFLAGS/i386   =
+CFLAGS/amd64  = -xarch=amd64
+CFLAGS/sparc  = -xarch=v8
+CFLAGS/sparv9 = -xarch=v9
+
 all:: $(ALL_TARGET)
 
 javahomecheck::
@@ -51,34 +58,13 @@ javahomecheck::
 	  exit 1 ; \
         fi
 
-i386:: javahomecheck
+i386 amd64 sparc sparcv9:: javahomecheck
 	$(MKDIRS) $@
-	@javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
-	CC -G -KPIC -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \
-           -M mapfile -o $@/libsaproc.so -ldemangle
-	CC -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc 
-
-amd64:: javahomecheck
-	$(MKDIRS) $@
-	@javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
-	CC -G -KPIC -xarch=amd64 -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \
-           -M mapfile -o $@/libsaproc.so -ldemangle
-	CC -xarch=amd64 -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc 
-
-sparc:: javahomecheck
-	$(MKDIRS) $@
-	@javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
-	CC -G -KPIC -xarch=v8  -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \
-           -M mapfile -o $@/libsaproc.so -ldemangle
-	CC -xarch=v8 -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc 
-
-sparcv9:: javahomecheck
-	$(MKDIRS) $@
-	@javah -classpath $(CLASSES_DIR) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
-	CC -G -KPIC -xarch=v9 -I${JAVA_HOME}/include -I${JAVA_HOME}/include/solaris saproc.cpp \
-           -M mapfile -o $@/libsaproc.so -ldemangle
-	CC -xarch=v9 -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc 
+	@$(JAVA_HOME)/bin/javah -classpath $(CLASSES_DIR) -d $@ -jni sun.jvm.hotspot.asm.Disassembler sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
+	CC $(CFLAGS/$@) -c -g -Kpic ${SAPROC_INCLUDES} -I$@ saproc.cpp -o $@/saproc.o
+	cc $(CFLAGS/$@) -c -g -Kpic ${SAPROC_INCLUDES} -I$@ $(SADIS) -o $@/sadis.o
+	CC $(CFLAGS/$@) -g -G -Kpic $@/saproc.o $@/sadis.o -M mapfile -o $@/libsaproc.so -ldemangle
+	CC $(CFLAGS/$@) -o $@/libsaproc_audit.so -G -Kpic -z defs saproc_audit.cpp -lmapmalloc -ldl -lc 
 
 clean::
-	$(RM) -rf sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal.h
-	$(RM) -rf sparc sparcv9 i386
+	$(RM) -rf sparc sparcv9 i386 amd64
diff --git a/hotspot/agent/src/os/solaris/proc/mapfile b/hotspot/agent/src/os/solaris/proc/mapfile
index 5d43bc90580..2144c48ed0b 100644
--- a/hotspot/agent/src/os/solaris/proc/mapfile
+++ b/hotspot/agent/src/os/solaris/proc/mapfile
@@ -1,7 +1,5 @@
 #
-
-#
-# Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -22,10 +20,8 @@
 # or visit www.oracle.com if you need additional information or have any
 # questions.
 #  
-#
 
 # Define public interface.
-
 SUNWprivate_1.1 {
 	global:
 		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_attach0__Ljava_lang_String_2;
@@ -47,6 +43,9 @@ SUNWprivate_1.1 {
 		Java_sun_jvm_hotspot_debugger_proc_ProcDebuggerLocal_writeBytesToProcess0;
                 # this is needed by saproc_audit.c to redirect opens in libproc.so
                 libsaproc_open;
-local:
+                # Disassembler interface
+		Java_sun_jvm_hotspot_asm_Disassembler_decode;
+		Java_sun_jvm_hotspot_asm_Disassembler_load_1library;
+	local:
 	*;
 };
diff --git a/hotspot/agent/src/os/win32/windbg/Makefile b/hotspot/agent/src/os/win32/windbg/Makefile
index 773cd6f57a4..877913a478d 100644
--- a/hotspot/agent/src/os/win32/windbg/Makefile
+++ b/hotspot/agent/src/os/win32/windbg/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,8 @@ WINDBG_LIB32=$(WINDBG_HOME)/sdk/lib/i386
 WINDBG_LIB_IA64=$(WINDBG_HOME)/sdk/lib/ia64
 WINDBG_LIB_AMD64=$(WINDBG_HOME)/sdk/lib/amd64
 
+SADIS=../../../share/native/sadis.c
+
 # These do not need to be optimized (don't run a lot of code) and it
 # will be useful to have the assertion checks in place
 
@@ -57,23 +59,29 @@ ia64: ia64/$(SAWINDBGDLL)
 
 amd64: amd64/$(SAWINDBGDLL)
 
-i386/$(SAWINDBGDLL) : sawindbg.cpp
+i386/$(SAWINDBGDLL) : sawindbg.cpp $(SADIS)
 	@ mkdir -p i386
-	@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.x86.X86ThreadContext 
+	@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.x86.X86ThreadContext
+	@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.asm.Disassembler
 	@ $(CPP32) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS32) /Fp"i386/sawindbg.pch" /Fo"i386/" /Fd"i386/" /c sawindbg.cpp
-	$(LINK32) /out:$@ /DLL i386/sawindbg.obj $(LIBS32)
+	@ $(CPP32) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS32) /Fp"i386/sadis.pch" /Fo"i386/" /Fd"i386/" /c  $(SADIS)
+	$(LINK32) /out:$@ /DLL i386/sawindbg.obj i386/sadis.obj $(LIBS32) 
 
-ia64/$(SAWINDBGDLL) : sawindbg.cpp
+ia64/$(SAWINDBGDLL) : sawindbg.cpp $(SADIS)
 	@ mkdir -p ia64
 	@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.ia64.IA64ThreadContext
+	@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.asm.Disassembler
 	@ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"ia64/sawindbg.pch" /Fo"ia64/" /Fd"ia64/" /c sawindbg.cpp
-	$(LINK64) /out:$@ /DLL ia64/sawindbg.obj $(LIBS_IA64)
+	@ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"ia64/sadis.pch" /Fo"ia64/" /Fd"ia64/" /c $(SADIS)
+	$(LINK64) /out:$@ /DLL ia64/sawindbg.obj ia64/sadis.obj $(LIBS_IA64)
 
-amd64/$(SAWINDBGDLL) : sawindbg.cpp
+amd64/$(SAWINDBGDLL) : sawindbg.cpp $(SADIS)
 	@ mkdir -p amd64
 	@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext
+	@ $(JAVAH) -jni -classpath ../../../../build/classes sun.jvm.hotspot.asm.Disassembler
 	@ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"amd64/sawindbg.pch" /Fo"amd64/" /Fd"amd64/" /c sawindbg.cpp
-	$(LINK64) /out:$@ /DLL amd64/sawindbg.obj $(LIBS_AMD64)
+	@ $(CPP64) /I$(JAVA_HOME)/include /I$(JAVA_HOME)/include/win32 /I$(WINDBG_INCLUDE) $(CFLAGS64) /Fp"amd64/sadis.pch" /Fo"amd64/" /Fd"amd64/" /c $(SADIS)
+	$(LINK64) /out:$@ /DLL amd64/sawindbg.obj amd64/sadis.obj $(LIBS_AMD64)
 
 clean:
 	rm *.h
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java
index 1421037356f..c640e4ecc72 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/CommandProcessor.java
@@ -42,6 +42,7 @@ import sun.jvm.hotspot.memory.*;
 import sun.jvm.hotspot.oops.*;
 import sun.jvm.hotspot.opto.*;
 import sun.jvm.hotspot.ci.*;
+import sun.jvm.hotspot.asm.*;
 import sun.jvm.hotspot.runtime.*;
 import sun.jvm.hotspot.utilities.*;
 import sun.jvm.hotspot.utilities.soql.*;
@@ -564,6 +565,71 @@ public class CommandProcessor {
                 }
             }
         },
+        // decode raw address
+        new Command("dis", "dis address [length]", false) {
+            public void doit(Tokens t) {
+                int tokens = t.countTokens();
+                if (tokens != 1 && tokens != 2) {
+                    usage();
+                    return;
+                }
+                String name = t.nextToken();
+                Address addr = null;
+                int len = 0x10; // default length
+                try {
+                    addr = VM.getVM().getDebugger().parseAddress(name);
+                } catch (NumberFormatException e) {
+                   out.println(e);
+                   return;
+                }
+                if (tokens == 2) {
+                    try {
+                        len = Integer.parseInt(t.nextToken());
+                    } catch (NumberFormatException e) {
+                        out.println(e);
+                        return;
+                    }
+                }
+                HTMLGenerator generator = new HTMLGenerator(false);
+                out.println(generator.genHTMLForRawDisassembly(addr, len));
+            }
+
+        },
+        // decode codeblob or nmethod
+        new Command("disassemble", "disassemble address", false) {
+            public void doit(Tokens t) {
+                int tokens = t.countTokens();
+                if (tokens != 1) {
+                    usage();
+                    return;
+                }
+                String name = t.nextToken();
+                Address addr = null;
+                try {
+                    addr = VM.getVM().getDebugger().parseAddress(name);
+                } catch (NumberFormatException e) {
+                   out.println(e);
+                   return;
+                }
+
+                HTMLGenerator generator = new HTMLGenerator(false);
+                out.println(generator.genHTML(addr));
+            }
+        },
+        // print Java bytecode disassembly
+        new Command("jdis", "jdis address", false) {
+            public void doit(Tokens t) {
+                int tokens = t.countTokens();
+                if (tokens != 1) {
+                    usage();
+                    return;
+                }
+                Address a = VM.getVM().getDebugger().parseAddress(t.nextToken());
+                Method m = (Method)Metadata.instantiateWrapperFor(a);
+                HTMLGenerator html = new HTMLGenerator(false);
+                out.println(html.genHTML(m));
+            }
+        },
         new Command("revptrs", "revptrs address", false) {
             public void doit(Tokens t) {
                 int tokens = t.countTokens();
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java
index 2526a325aaa..bb718d9f78b 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java
@@ -43,10 +43,6 @@ import sun.jvm.hotspot.utilities.*;
  * highest-level factory for VM data structures. It makes it simple
  * to start up the debugging system. </P>
  *
- * <P> FIXME: need to add a way to configure the paths to dbx and the
- * DSO from the outside. However, this should work for now for
- * internal use. </P>
- *
  * <P> FIXME: especially with the addition of remote debugging, this
  * has turned into a mess; needs rethinking. </P>
  */
@@ -87,30 +83,7 @@ public class HotSpotAgent {
 
     private String[] jvmLibNames;
 
-    // FIXME: make these configurable, i.e., via a dotfile; also
-    // consider searching within the JDK from which this Java executable
-    // comes to find them
-    private static final String defaultDbxPathPrefix                = "/net/jano.sfbay/export/disk05/hotspot/sa";
-    private static final String defaultDbxSvcAgentDSOPathPrefix     = "/net/jano.sfbay/export/disk05/hotspot/sa";
-
     static void showUsage() {
-        System.out.println("    You can also pass these -D options to java to specify where to find dbx and the \n" +
-        "    Serviceability Agent plugin for dbx:");
-        System.out.println("       -DdbxPathName=<path-to-dbx-executable>\n" +
-        "             Default is derived from dbxPathPrefix");
-        System.out.println("    or");
-        System.out.println("       -DdbxPathPrefix=<xxx>\n" +
-        "             where xxx is the path name of a dir structure that contains:\n" +
-        "                   <os>/<arch>/bin/dbx\n" +
-        "             The default is " + defaultDbxPathPrefix);
-        System.out.println("    and");
-        System.out.println("       -DdbxSvcAgentDSOPathName=<path-to-dbx-serviceability-agent-module>\n" +
-        "             Default is determined from dbxSvcAgentDSOPathPrefix");
-        System.out.println("    or");
-        System.out.println("       -DdbxSvcAgentDSOPathPrefix=<xxx>\n" +
-        "             where xxx is the pathname of a dir structure that contains:\n" +
-        "                   <os>/<arch>/bin/lib/libsvc_agent_dbx.so\n" +
-        "             The default is " + defaultDbxSvcAgentDSOPathPrefix);
     }
 
     public HotSpotAgent() {
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/TestDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/TestDebugger.java
deleted file mode 100644
index a0b0a993654..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/TestDebugger.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.debugger.proc.*;
-
-// A test of the debugger backend. This should be used to connect to
-// the helloWorld.cpp program.
-
-public class TestDebugger {
-
-  private static void usage() {
-    System.out.println("usage: java TestDebugger [pid]");
-    System.out.println("pid must be the process ID of the helloWorld process");
-    System.exit(1);
-  }
-
-  public static void main(String[] args) {
-    try {
-      if (args.length != 1) {
-        usage();
-      }
-
-      int pid = 0;
-      try {
-        pid = Integer.parseInt(args[0]);
-      }
-      catch (NumberFormatException e) {
-        usage();
-      }
-
-      JVMDebugger debugger = new ProcDebuggerLocal(null, true);
-
-      try {
-        debugger.attach(pid);
-      }
-      catch (DebuggerException e) {
-        System.err.print("Error attaching to process ID " + pid + ": ");
-        if (e.getMessage() != null) {
-          System.err.print(e.getMessage());
-        }
-        System.err.println();
-        System.exit(1);
-      }
-
-      // HACK: configure debugger with primitive type sizes to get
-      // Java types going
-      debugger.configureJavaPrimitiveTypeSizes(1, 1, 2, 8, 4, 4, 8, 2);
-
-      // FIXME: figure out how to canonicalize and/or eliminate
-      // loadobject specification
-      String loadObjectName = "-";
-
-      //    long strAddr = debugger.lookup("helloWorld", "helloWorldString");
-      Address addr = debugger.lookup(loadObjectName, "helloWorldString");
-      if (addr == null) {
-        System.err.println("Error looking up symbol \"helloWorldString\" in context \"" +
-                           loadObjectName + "\"");
-        System.exit(1);
-      }
-
-      // This is a pointer which points to the start of storage.
-      // Dereference it.
-      addr = addr.getAddressAt(0);
-
-      // Read the number of bytes we know we need
-      int helloWorldLen = 13;
-      byte[] data = new byte[helloWorldLen];
-      for (int i = 0; i < helloWorldLen; ++i) {
-        data[i] = (byte) addr.getCIntegerAt(i, 1, false);
-      }
-
-      // Convert to characters
-      char[] chars = new char[data.length];
-      for (int i = 0; i < data.length; ++i) {
-        chars[i] = (char) data[i];
-      }
-      String helloWorldStr = new String(chars);
-
-      System.out.println("Successfully read string \"" + helloWorldStr + "\" from target process\n");
-
-      // Test all Java data types (see helloWorld.cpp)
-      byte   expectedByteValue   = (byte) 132;
-      short  expectedShortValue  = (short) 27890;
-      int    expectedIntValue    = 1020304050;
-      long   expectedLongValue   = 102030405060708090L;
-      float  expectedFloatValue  = 35.4F;
-      double expectedDoubleValue = 1.23456789;
-      byte   byteValue   = 0;
-      short  shortValue  = 0;
-      int    intValue    = 0;
-      long   longValue   = 0;
-      float  floatValue  = 0;
-      double doubleValue = 0;
-
-      addr = debugger.lookup(loadObjectName, "testByte");
-      if (addr == null) {
-        System.err.println("Error looking up symbol \"testByte\" in context \"" +
-                           loadObjectName + "\"");
-        System.exit(1);
-      }
-      byteValue = addr.getJByteAt(0);
-      if (byteValue != expectedByteValue) {
-        System.err.println("Error: unexpected byte value (got " +
-                           byteValue + ", expected " + expectedByteValue + ")");
-        System.exit(1);
-      }
-
-      addr = debugger.lookup(loadObjectName, "testShort");
-      if (addr == null) {
-        System.err.println("Error looking up symbol \"testShort\" in context \"" +
-                           loadObjectName + "\"");
-        System.exit(1);
-      }
-      shortValue = addr.getJShortAt(0);
-      if (shortValue != expectedShortValue) {
-        System.err.println("Error: unexpected short value (got " +
-                           shortValue + ", expected " + expectedShortValue + ")");
-        System.exit(1);
-      }
-
-      addr = debugger.lookup(loadObjectName, "testInt");
-      if (addr == null) {
-        System.err.println("Error looking up symbol \"testInt\" in context \"" +
-                           loadObjectName + "\"");
-        System.exit(1);
-      }
-      intValue = addr.getJIntAt(0);
-      if (intValue != expectedIntValue) {
-        System.err.println("Error: unexpected int value (got " +
-                           intValue + ", expected " + expectedIntValue + ")");
-        System.exit(1);
-      }
-
-      addr = debugger.lookup(loadObjectName, "testLong");
-      if (addr == null) {
-        System.err.println("Error looking up symbol \"testLong\" in context \"" +
-                           loadObjectName + "\"");
-        System.exit(1);
-      }
-      longValue = addr.getJLongAt(0);
-      if (longValue != expectedLongValue) {
-        System.err.println("Error: unexpected long value (got " +
-                           longValue + ", expected " + expectedLongValue + ")");
-        System.exit(1);
-      }
-
-      addr = debugger.lookup(loadObjectName, "testFloat");
-      if (addr == null) {
-        System.err.println("Error looking up symbol \"testFloat\" in context \"" +
-                           loadObjectName + "\"");
-        System.exit(1);
-      }
-      floatValue = addr.getJFloatAt(0);
-      if (floatValue != expectedFloatValue) {
-        System.err.println("Error: unexpected float value (got " +
-                           floatValue + ", expected " + expectedFloatValue + ")");
-        System.exit(1);
-      }
-
-      addr = debugger.lookup(loadObjectName, "testDouble");
-      if (addr == null) {
-        System.err.println("Error looking up symbol \"testDouble\" in context \"" +
-                           loadObjectName + "\"");
-        System.exit(1);
-      }
-      doubleValue = addr.getJDoubleAt(0);
-      if (doubleValue != expectedDoubleValue) {
-        System.err.println("Error: unexpected double value (got " +
-                           doubleValue + ", expected " + expectedDoubleValue + ")");
-        System.exit(1);
-      }
-
-      System.err.println("All tests passed successfully.");
-
-      debugger.detach();
-    }
-    catch (AddressException e) {
-      System.err.println("Error occurred during test:");
-      e.printStackTrace();
-      System.exit(1);
-    }
-  }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/AbstractInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/AbstractInstruction.java
deleted file mode 100644
index 7b30640771b..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/AbstractInstruction.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-public abstract class AbstractInstruction implements Instruction {
-   protected final String name;
-
-   public AbstractInstruction(String name) {
-      this.name = name;
-   }
-
-   public String getName() {
-      return name;
-   }
-
-   // some type testers
-   public boolean isIllegal() {
-      return false;
-   }
-
-   public boolean isArithmetic() {
-      return false;
-   }
-
-   public boolean isLogical() {
-      return false;
-   }
-
-   public boolean isShift() {
-      return false;
-   }
-
-   public boolean isMove() {
-      return false;
-   }
-
-   public boolean isBranch() {
-      return false;
-   }
-
-   public boolean isCall() {
-      return false;
-   }
-
-   public boolean isReturn() {
-      return false;
-   }
-
-   public boolean isLoad() {
-      return false;
-   }
-
-   public boolean isStore() {
-      return false;
-   }
-
-   public boolean isFloat() {
-      return false;
-   }
-
-   public boolean isTrap() {
-      return false;
-   }
-
-   public boolean isNoop() {
-      return false;
-   }
-
-   // convert the instruction as String given currentPc
-   // and SymbolFinder
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      return name;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ArithmeticInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ArithmeticInstruction.java
deleted file mode 100644
index aabce38afc4..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ArithmeticInstruction.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-public interface ArithmeticInstruction extends Instruction, RTLOperations {
-   public Operand[]  getArithmeticSources();
-   public Operand    getArithmeticDestination();
-   public int        getOperation(); // one of RTLOperations
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/BaseIndexScaleDispAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/BaseIndexScaleDispAddress.java
deleted file mode 100644
index a3c89223234..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/BaseIndexScaleDispAddress.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-// address is calculated as (base + (index * scale) + displacement)
-// optionally index is auto incremented or decremented
-
-public abstract class BaseIndexScaleDispAddress extends IndirectAddress {
-   private final Register base, index;
-   private final int      scale;
-   private final long     disp;
-   private boolean  isAutoIncr;
-   private boolean  isAutoDecr;
-
-   public BaseIndexScaleDispAddress(Register base, Register index, long disp, int scale) {
-      this.base = base;
-      this.index = index;
-      this.disp = disp;
-      this.scale = scale;
-   }
-
-   public BaseIndexScaleDispAddress(Register base, Register index, long disp) {
-      this(base, index, disp, 1);
-   }
-
-   public BaseIndexScaleDispAddress(Register base, Register index) {
-      this(base, index, 0L, 1);
-   }
-
-   public BaseIndexScaleDispAddress(Register base, long disp) {
-      this(base, null, disp, 1);
-   }
-
-   public Register getBase() {
-      return base;
-   }
-
-   public Register getIndex() {
-      return index;
-   }
-
-   public int      getScale() {
-      return scale;
-   }
-
-   public long     getDisplacement() {
-      return disp;
-   }
-
-   // is the index auto decremented or incremented?
-   public boolean  isAutoIncrement() {
-      return isAutoIncr;
-   }
-
-   public void setAutoIncrement(boolean value) {
-      isAutoIncr = value;
-   }
-
-   public boolean  isAutoDecrement() {
-      return isAutoDecr;
-   }
-
-   public void setAutoDecrement(boolean value) {
-      isAutoDecr = value;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/CPUHelper.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/CPUHelper.java
deleted file mode 100644
index 51e82e6b21a..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/CPUHelper.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-public interface CPUHelper {
-   public Disassembler createDisassembler(long startPc, byte[] code);
-   public Register getIntegerRegister(int num);
-   public Register getFloatRegister(int num);
-   public Register getStackPointer();
-   public Register getFramePointer();
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Disassembler.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Disassembler.java
index cc62b6db193..f6a279dee88 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Disassembler.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Disassembler.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,22 +24,134 @@
 
 package sun.jvm.hotspot.asm;
 
-public abstract class Disassembler {
-   protected long   startPc;
-   protected byte[] code;
+import java.io.PrintStream;
+import java.util.Observer;
+import java.util.Observable;
+import sun.jvm.hotspot.code.CodeBlob;
+import sun.jvm.hotspot.code.NMethod;
+import sun.jvm.hotspot.debugger.Address;
+import sun.jvm.hotspot.runtime.VM;
 
-   public Disassembler(long startPc, byte[] code) {
+public class Disassembler {
+   private static String options = "";
+   private static long decode_function;
+
+   protected long startPc;
+   protected byte[] code;
+   private CodeBlob blob;
+   private NMethod nmethod;
+
+   public static void decode(InstructionVisitor visitor, CodeBlob blob) {
+      decode(visitor, blob, blob.codeBegin(), blob.codeEnd());
+   }
+
+   public static void decode(InstructionVisitor visitor, CodeBlob blob, Address begin, Address end) {
+      int codeSize = (int)end.minus(begin);
+      long startPc = VM.getAddressValue(begin);
+      byte[] code = new byte[codeSize];
+      for (int i = 0; i < code.length; i++)
+         code[i] = begin.getJByteAt(i);
+      Disassembler dis = new Disassembler(startPc, code);
+      dis.decode(visitor);
+   }
+
+   private Disassembler(long startPc, byte[] code) {
       this.startPc = startPc;
       this.code = code;
+
+      // Lazily load hsdis
+      if (decode_function == 0) {
+         StringBuilder path = new StringBuilder(System.getProperty("java.home"));
+         String sep = System.getProperty("file.separator");
+         String os = System.getProperty("os.name");
+         String libname = "hsdis";
+         String arch = System.getProperty("os.arch");
+         if (os.lastIndexOf("Windows", 0) != -1) {
+            path.append(sep + "bin" + sep);
+            libname += ".dll";
+         } else if (os.lastIndexOf("SunOS", 0) != -1) {
+            if (arch.equals("x86") || arch.equals("i386")) {
+               path.append(sep + "lib" + sep + "i386" + sep);
+               libname +=  "-i386" + ".so";
+            } else if (arch.equals("amd64")) {
+               path.append(sep + "lib" + sep + "amd64" + sep);
+               libname +=  "-amd64" + ".so";
+            } else {
+               path.append(sep + "lib" + sep + arch + sep);
+               libname +=  "-" + arch + ".so";
+            }
+         } else if (os.lastIndexOf("Linux", 0) != -1) {
+            if (arch.equals("x86") || arch.equals("i386")) {
+               path.append(sep + "lib" + sep + "i386" + sep);
+               libname += "-i386.so";
+            } else if (arch.equals("amd64") || arch.equals("x86_64")) {
+               path.append(sep + "lib" + sep + "amd64" + sep);
+               libname +=  "-amd64.so";
+            } else {
+               path.append(sep + "lib" + sep + arch + sep);
+               libname +=  "-" + arch + ".so";
+            }
+         } else if (os.lastIndexOf("Mac OS X", 0) != -1) {
+            path.append(sep + "lib" + sep);
+            libname += "-amd64" + ".dylib";       // x86_64 => amd64
+         } else {
+            path.append(sep + "lib" + sep + "arch" + sep);
+            libname +=  "-" + arch + ".so";
+         }
+         decode_function = load_library(path.toString(), libname);
+      }
    }
 
-   public long getStartPC() {
-      return startPc;
+   private static native long load_library(String installed_jrepath, String hsdis_library_name);
+
+   private native void decode(InstructionVisitor visitor, long pc, byte[] code,
+                              String options, long decode_function);
+
+   private void decode(InstructionVisitor visitor) {
+      visitor.prologue();
+      decode(visitor, startPc, code, options, decode_function);
+      visitor.epilogue();
    }
 
-   public byte[] getCode() {
-      return code;
+   private boolean match(String event, String tag) {
+      if (!event.startsWith(tag))
+         return false;
+      int taglen = tag.length();
+      if (taglen == event.length()) return true;
+      char delim = event.charAt(taglen);
+      return delim == ' ' || delim == '/' || delim == '=';
    }
 
-   public abstract void decode(InstructionVisitor visitor);
+   // This is called from the native code to process various markers
+   // in the dissassembly.
+   private long handleEvent(InstructionVisitor visitor, String event, long arg) {
+      if (match(event, "insn")) {
+         try {
+            visitor.beginInstruction(arg);
+         } catch (Throwable e) {
+            e.printStackTrace();
+         }
+      } else if (match(event, "/insn")) {
+         try {
+            visitor.endInstruction(arg);
+         } catch (Throwable e) {
+            e.printStackTrace();
+         }
+      } else if (match(event, "addr")) {
+         if (arg != 0) {
+            visitor.printAddress(arg);
+         }
+         return arg;
+      } else if (match(event, "mach")) {
+         // output().printf("[Disassembling for mach='%s']\n", arg);
+      } else {
+         // ignore unrecognized markup
+      }
+      return 0;
+   }
+
+   // This called from the native code to perform printing
+   private  void rawPrint(InstructionVisitor visitor, String s) {
+      visitor.print(s);
+   }
 }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Immediate.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Immediate.java
deleted file mode 100644
index bb1378aab3b..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Immediate.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-// Immediate is a Number operand
-
-public class Immediate extends ImmediateOrRegister {
-   private final Number value;
-
-   public Immediate(Number value) {
-      this.value = value;
-   }
-
-   public Number getNumber() {
-      return value;
-   }
-
-   public boolean isImmediate() {
-      return true;
-   }
-
-   public String toString() {
-      return value.toString();
-   }
-
-   public int hashCode() {
-      return value.hashCode();
-   }
-
-   public boolean equals(Object obj) {
-      if (obj == null)
-         return false;
-
-      if (getClass() != obj.getClass())
-         return false;
-
-      Immediate other = (Immediate) obj;
-      return value.equals(other.value);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Instruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Instruction.java
deleted file mode 100644
index b26b7398957..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Instruction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-public interface Instruction {
-   public String getName();
-
-   // total size in bytes (operands + opcode).
-   // for eg. in sparc it is always 4 (= 32bits)
-   public int getSize();
-
-   // some type testers
-   public boolean isIllegal();
-   public boolean isArithmetic();
-   public boolean isLogical();
-   public boolean isShift();
-   public boolean isMove();
-   public boolean isBranch();
-   public boolean isCall();
-   public boolean isReturn();
-   public boolean isLoad();
-   public boolean isStore();
-   public boolean isFloat();
-   public boolean isTrap();
-   public boolean isNoop();
-
-   // convert the instruction as String given currentPc
-   // and SymbolFinder
-
-   public String asString(long currentPc, SymbolFinder symFinder);
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/InstructionVisitor.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/InstructionVisitor.java
index 37964cd9a7d..cf302bfa7dd 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/InstructionVisitor.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/InstructionVisitor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,9 @@ package sun.jvm.hotspot.asm;
 
 public interface InstructionVisitor {
    public void prologue();
-   public void visit(long currentPc, Instruction instr);
+   public void beginInstruction(long currentPc);
+   public void printAddress(long address);
+   public void print(String format);
+   public void endInstruction(long endPc);
    public void epilogue();
 }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/LoadInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/LoadInstruction.java
deleted file mode 100644
index ac6e0fe7a11..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/LoadInstruction.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-public interface LoadInstruction extends MemoryInstruction {
-   public Address  getLoadSource();
-   public Register[] getLoadDestinations();
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/LogicInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/LogicInstruction.java
deleted file mode 100644
index 8f5efa3f77d..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/LogicInstruction.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-public interface LogicInstruction extends Instruction, RTLOperations {
-   public Operand[]  getLogicSources();
-   public Operand    getLogicDestination();
-   public int        getOperation(); // one of RTLOperations
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/MemoryInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/MemoryInstruction.java
deleted file mode 100644
index 127700b007f..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/MemoryInstruction.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-public interface MemoryInstruction extends RTLDataTypes {
-   public int getDataType(); // one of the RTLDataTypes.
-   public boolean isConditional(); // conditional store like swap or v9 like non-faulting loads
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/MoveInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/MoveInstruction.java
deleted file mode 100644
index 7d3d515f87e..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/MoveInstruction.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-public interface MoveInstruction extends Instruction {
-   public ImmediateOrRegister  getMoveSource();
-   public Register getMoveDestination();
-   // for condition moves
-   public boolean  isConditional();
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/PCRelativeAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/PCRelativeAddress.java
deleted file mode 100644
index 25b0a91b67c..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/PCRelativeAddress.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-// address is specified as an offset from current PC
-
-public class PCRelativeAddress extends IndirectAddress {
-   private final long disp;
-
-   public PCRelativeAddress(long disp) {
-       this.disp = disp;
-   }
-
-   public String toString() {
-      return new Long(disp).toString();
-   }
-
-   public long getDisplacement() {
-      return disp;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/RTLDataTypes.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/RTLDataTypes.java
deleted file mode 100644
index 26785e80906..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/RTLDataTypes.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-public interface RTLDataTypes {
-
-   // HALF = 16 bits, WORD = 32 bits, DWORD = 64 bits and QWORD = 128 bits.
-
-   public static final int RTLDT_SIGNED_BYTE    = 0;
-   public static final int RTLDT_UNSIGNED_BYTE  = 1;
-   public static final int RTLDT_SIGNED_HALF    = 2;
-   public static final int RTLDT_UNSIGNED_HALF  = 3;
-   public static final int RTLDT_SIGNED_WORD    = 4;
-   public static final int RTLDT_UNSIGNED_WORD  = 5;
-   public static final int RTLDT_SIGNED_DWORD   = 6;
-   public static final int RTLDT_UNSIGNED_DWORD = 7;
-   public static final int RTLDT_SIGNED_QWORD   = 8;
-   public static final int RTLDT_UNSIGNED_QWORD = 9;
-
-   // float is 4 bytes, double is 8 bytes, extended double is 10 bytes
-   // and quad is 16 bytes.
-
-   public static final int RTLDT_FL_SINGLE     = 10;
-   public static final int RTLDT_FL_DOUBLE     = 11;
-   public static final int RTLDT_FL_EXT_DOUBLE = 12;
-   public static final int RTLDT_FL_QUAD       = 13;
-
-   public static final int RTLDT_STRING        = 14;
-
-   public static final int RTLDT_UNKNOWN       = Integer.MAX_VALUE;
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/RTLOperations.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/RTLOperations.java
deleted file mode 100644
index 80c278dcb5a..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/RTLOperations.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-public interface RTLOperations {
-
-   // arithmetic operations
-   public static final int RTLOP_ADD          = 0;
-   // with carry
-   public static final int RTLOP_ADDC         = 1;
-   public static final int RTLOP_SUB          = 2;
-   // with carry
-   public static final int RTLOP_SUBC         = 3;
-   public static final int RTLOP_SMUL         = 4;
-   public static final int RTLOP_UMUL         = 5;
-   public static final int RTLOP_SDIV         = 6;
-   public static final int RTLOP_UDIV         = 7;
-
-   public static final int RTLOP_MAX_ARITHMETIC = RTLOP_UDIV;
-
-   // logical operations
-   public static final int RTLOP_AND          = 8;
-   public static final int RTLOP_OR           = 9;
-   public static final int RTLOP_NOT          = 10;
-   public static final int RTLOP_NAND         = 11;
-   public static final int RTLOP_NOR          = 12;
-   public static final int RTLOP_XOR          = 13;
-   public static final int RTLOP_XNOR         = 14;
-
-   public static final int RTLOP_MAX_LOGICAL  = RTLOP_XNOR;
-
-   // shift operations
-   public static final int RTLOP_SRL          = 15;
-   public static final int RTLOP_SRA          = 16;
-   public static final int RTLOP_SLL          = 17;
-
-   public static final int RTLOP_MAX_SHIFT    = RTLOP_SLL;
-
-   public static final int RTLOP_UNKNOWN      = Integer.MAX_VALUE;
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ReturnInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ReturnInstruction.java
deleted file mode 100644
index 5093e928a81..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ReturnInstruction.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-public interface ReturnInstruction extends BranchInstruction {
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ShiftInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ShiftInstruction.java
deleted file mode 100644
index 197d169c410..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ShiftInstruction.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-public interface ShiftInstruction extends Instruction, RTLOperations {
-   public Operand getShiftSource();
-   public Operand  getShiftLength(); // number of bits to shift
-   public Operand getShiftDestination();
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/StoreInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/StoreInstruction.java
deleted file mode 100644
index dde9049d4f1..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/StoreInstruction.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm;
-
-public interface StoreInstruction extends MemoryInstruction {
-   public Register[]  getStoreSources();
-   public Address     getStoreDestination();
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/amd64/AMD64FloatRegisters.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/amd64/AMD64FloatRegisters.java
deleted file mode 100644
index 8588d4985db..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/amd64/AMD64FloatRegisters.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.amd64;
-
-import sun.jvm.hotspot.utilities.Assert;
-
-public class AMD64FloatRegisters {
-
-   public static int getNumRegisters() {
-      return NUM_REGIXMMERS;
-   }
-
-   public static AMD64FloatRegister getRegister(int regNum) {
-      if (Assert.ASSERTS_ENABLED) {
-         Assert.that(regNum > -1 && regNum < NUM_REGIXMMERS, "invalid float register number!");
-      }
-      return registers[regNum];
-   }
-
-   public static String getRegisterName(int i) {
-      return "XMM(" + i + ")";
-   }
-
-   public static final AMD64FloatRegister XMM0;
-   public static final AMD64FloatRegister XMM1;
-   public static final AMD64FloatRegister XMM2;
-   public static final AMD64FloatRegister XMM3;
-   public static final AMD64FloatRegister XMM4;
-   public static final AMD64FloatRegister XMM5;
-   public static final AMD64FloatRegister XMM6;
-   public static final AMD64FloatRegister XMM7;
-   public static final AMD64FloatRegister XMM8;
-   public static final AMD64FloatRegister XMM9;
-   public static final AMD64FloatRegister XMM10;
-   public static final AMD64FloatRegister XMM11;
-   public static final AMD64FloatRegister XMM12;
-   public static final AMD64FloatRegister XMM13;
-   public static final AMD64FloatRegister XMM14;
-   public static final AMD64FloatRegister XMM15;
-
-   public static final int NUM_REGIXMMERS = 16;
-
-   private static final AMD64FloatRegister[] registers;
-
-   static {
-      XMM0 = new AMD64FloatRegister(0);
-      XMM1 = new AMD64FloatRegister(1);
-      XMM2 = new AMD64FloatRegister(2);
-      XMM3 = new AMD64FloatRegister(3);
-      XMM4 = new AMD64FloatRegister(4);
-      XMM5 = new AMD64FloatRegister(5);
-      XMM6 = new AMD64FloatRegister(6);
-      XMM7 = new AMD64FloatRegister(7);
-      XMM8 = new AMD64FloatRegister(8);
-      XMM9 = new AMD64FloatRegister(9);
-      XMM10 = new AMD64FloatRegister(10);
-      XMM11 = new AMD64FloatRegister(11);
-      XMM12 = new AMD64FloatRegister(12);
-      XMM13 = new AMD64FloatRegister(13);
-      XMM14 = new AMD64FloatRegister(14);
-      XMM15 = new AMD64FloatRegister(15);
-
-      registers = new AMD64FloatRegister[] {
-                     XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7,
-                     XMM8, XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15
-                  };
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/amd64/AMD64Helper.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/amd64/AMD64Helper.java
deleted file mode 100644
index 98ce46b3686..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/amd64/AMD64Helper.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.amd64;
-
-import sun.jvm.hotspot.asm.*;
-
-
-public class AMD64Helper implements CPUHelper {
-   public Disassembler createDisassembler(long startPc, byte[] code) {
-      // FIXME: no disassembler yet
-      return null;
-   }
-
-   public Register getIntegerRegister(int num) {
-      return AMD64Registers.getRegister(num);
-   }
-
-   public Register getFloatRegister(int num) {
-      return AMD64FloatRegisters.getRegister(num);
-   }
-
-   public Register getStackPointer() {
-      return AMD64Registers.RSP;
-   }
-
-   public Register getFramePointer() {
-      return AMD64Registers.RBP;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/amd64/AMD64Register.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/amd64/AMD64Register.java
deleted file mode 100644
index f0b19baff65..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/amd64/AMD64Register.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.amd64;
-
-import sun.jvm.hotspot.asm.*;
-
-public class AMD64Register extends Register {
-   protected String name;
-   public AMD64Register(int num, String name) {
-     super(num);
-     this.name = name;
-   }
-   public int getNumberOfRegisters() {
-     return AMD64Registers.getNumberOfRegisters();
-   }
-   public String toString() {
-     return name;
-   }
-   public boolean isFramePointer() {
-     return number == 5; //rbp
-   }
-   public boolean isStackPointer() {
-     return number == 4; //rsp
-   }
-   public boolean isFloat() {
-     return false;
-   }
-   public boolean isSegmentPointer() {
-     return false;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/amd64/AMD64Registers.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/amd64/AMD64Registers.java
deleted file mode 100644
index 52b35ab8b66..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/amd64/AMD64Registers.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.amd64;
-
-import sun.jvm.hotspot.utilities.*;
-
-public class AMD64Registers {
-   public static final int NUM_REGISTERS = 16;
-
-   public static final AMD64Register RAX;
-   public static final AMD64Register RCX;
-   public static final AMD64Register RDX;
-   public static final AMD64Register RBX;
-   public static final AMD64Register RSP;
-   public static final AMD64Register RBP;
-   public static final AMD64Register RSI;
-   public static final AMD64Register RDI;
-   public static final AMD64Register R8;
-   public static final AMD64Register R9;
-   public static final AMD64Register R10;
-   public static final AMD64Register R11;
-   public static final AMD64Register R12;
-   public static final AMD64Register R13;
-   public static final AMD64Register R14;
-   public static final AMD64Register R15;
-
-   private static final AMD64Register[] registers;
-
-   static {
-      RAX = new AMD64Register(0, "rax");
-      RCX = new AMD64Register(1, "rcx");
-      RDX = new AMD64Register(2, "rdx");
-      RBX = new AMD64Register(3, "rbx");
-      RSP = new AMD64Register(4, "rsp");
-      RBP = new AMD64Register(5, "rbp");
-      RSI = new AMD64Register(6, "rsi");
-      RDI = new AMD64Register(7, "rdi");
-      R8  = new AMD64Register(8, "r8" );
-      R9  = new AMD64Register(9, "r9" );
-      R10 = new AMD64Register(10,"r10");
-      R11 = new AMD64Register(11,"r11");
-      R12 = new AMD64Register(12,"r12");
-      R13 = new AMD64Register(13,"r13");
-      R14 = new AMD64Register(14,"r14");
-      R15 = new AMD64Register(15,"r15");
-      registers = new AMD64Register[] {
-                     RAX, RCX, RDX, RBX, RSP, RBP, RSI, RDI,
-                     R8, R9, R10, R11, R12, R13, R14, R15
-                  };
-   }
-
-   public static int getNumberOfRegisters() {
-      return NUM_REGISTERS;
-   }
-
-   public static AMD64Register getRegister(int regNum) {
-      if (Assert.ASSERTS_ENABLED) {
-         Assert.that(regNum > -1 && regNum < NUM_REGISTERS, "invalid integer register number!");
-      }
-      return registers[regNum];
-   }
-
-   //Return the register name
-   public static String getRegisterName(int regNum) {
-      if (Assert.ASSERTS_ENABLED) {
-         Assert.that(regNum > -1 && regNum < NUM_REGISTERS, "invalid integer register number!");
-      }
-      return registers[regNum].toString();
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64FloatRegister.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64FloatRegister.java
deleted file mode 100644
index e7a42703d57..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64FloatRegister.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.ia64;
-
-import sun.jvm.hotspot.asm.Register;
-import sun.jvm.hotspot.utilities.Assert;
-
-public class IA64FloatRegister extends IA64Register {
-
-    public IA64FloatRegister(int number) {
-        super(number);
-    }
-
-    public int getNumber() {
-        return number;
-    }
-
-    public static final int SINGLE_PRECISION = 1;
-    public static final int DOUBLE_PRECISION = 2;
-    public static final int QUAD_PRECISION = 3;
-
-    public int getNumber(int width) {
-        return number;
-    }
-
-    private static final int nofRegisters = 128;
-    public int getNumberOfRegisters() {
-        return nofRegisters;
-    }
-
-    public boolean isFloat() {
-        return true;
-    }
-
-    public boolean isFramePointer() {
-        return false;
-    }
-
-    public boolean isStackPointer() {
-        return false;
-    }
-
-    public boolean isValid() {
-        return number >= 0 && number < nofRegisters;
-    }
-
-    public String toString() {
-        return IA64FloatRegisters.getRegisterName(number);
-    }
-
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64FloatRegisters.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64FloatRegisters.java
deleted file mode 100644
index 995eb0e18e7..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64FloatRegisters.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.ia64;
-
-import sun.jvm.hotspot.utilities.Assert;
-
-public class IA64FloatRegisters {
-    public static int getNumRegisters() {
-        return 128;
-    }
-
-    public static IA64FloatRegister getRegister(int i) {
-        Assert.that(i >= 0 && i < 128, "float register number is invalid");
-        return registers[i];
-    }
-
-    public static String getRegisterName(int i) {
-        return "%f" + i;
-    }
-
-    public static final IA64FloatRegister F0;
-    public static final IA64FloatRegister F1;
-    public static final IA64FloatRegister F2;
-    public static final IA64FloatRegister F3;
-    public static final IA64FloatRegister F4;
-    public static final IA64FloatRegister F5;
-    public static final IA64FloatRegister F6;
-    public static final IA64FloatRegister F7;
-    public static final IA64FloatRegister F8;
-    public static final IA64FloatRegister F9;
-    public static final IA64FloatRegister F10;
-    public static final IA64FloatRegister F11;
-    public static final IA64FloatRegister F12;
-    public static final IA64FloatRegister F13;
-    public static final IA64FloatRegister F14;
-    public static final IA64FloatRegister F15;
-    public static final IA64FloatRegister F16;
-    public static final IA64FloatRegister F17;
-    public static final IA64FloatRegister F18;
-    public static final IA64FloatRegister F19;
-    public static final IA64FloatRegister F20;
-    public static final IA64FloatRegister F21;
-    public static final IA64FloatRegister F22;
-    public static final IA64FloatRegister F23;
-    public static final IA64FloatRegister F24;
-    public static final IA64FloatRegister F25;
-    public static final IA64FloatRegister F26;
-    public static final IA64FloatRegister F27;
-    public static final IA64FloatRegister F28;
-    public static final IA64FloatRegister F29;
-    public static final IA64FloatRegister F30;
-    public static final IA64FloatRegister F31;
-    public static final IA64FloatRegister F32;
-    public static final IA64FloatRegister F33;
-    public static final IA64FloatRegister F34;
-    public static final IA64FloatRegister F35;
-    public static final IA64FloatRegister F36;
-    public static final IA64FloatRegister F37;
-    public static final IA64FloatRegister F38;
-    public static final IA64FloatRegister F39;
-    public static final IA64FloatRegister F40;
-    public static final IA64FloatRegister F41;
-    public static final IA64FloatRegister F42;
-    public static final IA64FloatRegister F43;
-    public static final IA64FloatRegister F44;
-    public static final IA64FloatRegister F45;
-    public static final IA64FloatRegister F46;
-    public static final IA64FloatRegister F47;
-    public static final IA64FloatRegister F48;
-    public static final IA64FloatRegister F49;
-    public static final IA64FloatRegister F50;
-    public static final IA64FloatRegister F51;
-    public static final IA64FloatRegister F52;
-    public static final IA64FloatRegister F53;
-    public static final IA64FloatRegister F54;
-    public static final IA64FloatRegister F55;
-    public static final IA64FloatRegister F56;
-    public static final IA64FloatRegister F57;
-    public static final IA64FloatRegister F58;
-    public static final IA64FloatRegister F59;
-    public static final IA64FloatRegister F60;
-    public static final IA64FloatRegister F61;
-    public static final IA64FloatRegister F62;
-    public static final IA64FloatRegister F63;
-    public static final IA64FloatRegister F64;
-    public static final IA64FloatRegister F65;
-    public static final IA64FloatRegister F66;
-    public static final IA64FloatRegister F67;
-    public static final IA64FloatRegister F68;
-    public static final IA64FloatRegister F69;
-    public static final IA64FloatRegister F70;
-    public static final IA64FloatRegister F71;
-    public static final IA64FloatRegister F72;
-    public static final IA64FloatRegister F73;
-    public static final IA64FloatRegister F74;
-    public static final IA64FloatRegister F75;
-    public static final IA64FloatRegister F76;
-    public static final IA64FloatRegister F77;
-    public static final IA64FloatRegister F78;
-    public static final IA64FloatRegister F79;
-    public static final IA64FloatRegister F80;
-    public static final IA64FloatRegister F81;
-    public static final IA64FloatRegister F82;
-    public static final IA64FloatRegister F83;
-    public static final IA64FloatRegister F84;
-    public static final IA64FloatRegister F85;
-    public static final IA64FloatRegister F86;
-    public static final IA64FloatRegister F87;
-    public static final IA64FloatRegister F88;
-    public static final IA64FloatRegister F89;
-    public static final IA64FloatRegister F90;
-    public static final IA64FloatRegister F91;
-    public static final IA64FloatRegister F92;
-    public static final IA64FloatRegister F93;
-    public static final IA64FloatRegister F94;
-    public static final IA64FloatRegister F95;
-    public static final IA64FloatRegister F96;
-    public static final IA64FloatRegister F97;
-    public static final IA64FloatRegister F98;
-    public static final IA64FloatRegister F99;
-    public static final IA64FloatRegister F100;
-    public static final IA64FloatRegister F101;
-    public static final IA64FloatRegister F102;
-    public static final IA64FloatRegister F103;
-    public static final IA64FloatRegister F104;
-    public static final IA64FloatRegister F105;
-    public static final IA64FloatRegister F106;
-    public static final IA64FloatRegister F107;
-    public static final IA64FloatRegister F108;
-    public static final IA64FloatRegister F109;
-    public static final IA64FloatRegister F110;
-    public static final IA64FloatRegister F111;
-    public static final IA64FloatRegister F112;
-    public static final IA64FloatRegister F113;
-    public static final IA64FloatRegister F114;
-    public static final IA64FloatRegister F115;
-    public static final IA64FloatRegister F116;
-    public static final IA64FloatRegister F117;
-    public static final IA64FloatRegister F118;
-    public static final IA64FloatRegister F119;
-    public static final IA64FloatRegister F120;
-    public static final IA64FloatRegister F121;
-    public static final IA64FloatRegister F122;
-    public static final IA64FloatRegister F123;
-    public static final IA64FloatRegister F124;
-    public static final IA64FloatRegister F125;
-    public static final IA64FloatRegister F126;
-    public static final IA64FloatRegister F127;
-    public static final int NUM_REGISTERS = 128;
-    private static final IA64FloatRegister registers[];
-
-    static {
-     F0 = new IA64FloatRegister(0);
-     F1 = new IA64FloatRegister(1);
-     F2 = new IA64FloatRegister(2);
-     F3 = new IA64FloatRegister(3);
-     F4 = new IA64FloatRegister(4);
-     F5 = new IA64FloatRegister(5);
-     F6 = new IA64FloatRegister(6);
-     F7 = new IA64FloatRegister(7);
-     F8 = new IA64FloatRegister(8);
-     F9 = new IA64FloatRegister(9);
-     F10 = new IA64FloatRegister(10);
-     F11 = new IA64FloatRegister(11);
-     F12 = new IA64FloatRegister(12);
-     F13 = new IA64FloatRegister(13);
-     F14 = new IA64FloatRegister(14);
-     F15 = new IA64FloatRegister(15);
-     F16 = new IA64FloatRegister(16);
-     F17 = new IA64FloatRegister(17);
-     F18 = new IA64FloatRegister(18);
-     F19 = new IA64FloatRegister(19);
-     F20 = new IA64FloatRegister(20);
-     F21 = new IA64FloatRegister(21);
-     F22 = new IA64FloatRegister(22);
-     F23 = new IA64FloatRegister(23);
-     F24 = new IA64FloatRegister(24);
-     F25 = new IA64FloatRegister(25);
-     F26 = new IA64FloatRegister(26);
-     F27 = new IA64FloatRegister(27);
-     F28 = new IA64FloatRegister(28);
-     F29 = new IA64FloatRegister(29);
-     F30 = new IA64FloatRegister(30);
-     F31 = new IA64FloatRegister(31);
-     F32 = new IA64FloatRegister(32);
-     F33 = new IA64FloatRegister(33);
-     F34 = new IA64FloatRegister(34);
-     F35 = new IA64FloatRegister(35);
-     F36 = new IA64FloatRegister(36);
-     F37 = new IA64FloatRegister(37);
-     F38 = new IA64FloatRegister(38);
-     F39 = new IA64FloatRegister(39);
-     F40 = new IA64FloatRegister(40);
-     F41 = new IA64FloatRegister(41);
-     F42 = new IA64FloatRegister(42);
-     F43 = new IA64FloatRegister(43);
-     F44 = new IA64FloatRegister(44);
-     F45 = new IA64FloatRegister(45);
-     F46 = new IA64FloatRegister(46);
-     F47 = new IA64FloatRegister(47);
-     F48 = new IA64FloatRegister(48);
-     F49 = new IA64FloatRegister(49);
-     F50 = new IA64FloatRegister(50);
-     F51 = new IA64FloatRegister(51);
-     F52 = new IA64FloatRegister(52);
-     F53 = new IA64FloatRegister(53);
-     F54 = new IA64FloatRegister(54);
-     F55 = new IA64FloatRegister(55);
-     F56 = new IA64FloatRegister(56);
-     F57 = new IA64FloatRegister(57);
-     F58 = new IA64FloatRegister(58);
-     F59 = new IA64FloatRegister(59);
-     F60 = new IA64FloatRegister(60);
-     F61 = new IA64FloatRegister(61);
-     F62 = new IA64FloatRegister(62);
-     F63 = new IA64FloatRegister(63);
-     F64 = new IA64FloatRegister(64);
-     F65 = new IA64FloatRegister(65);
-     F66 = new IA64FloatRegister(66);
-     F67 = new IA64FloatRegister(67);
-     F68 = new IA64FloatRegister(68);
-     F69 = new IA64FloatRegister(69);
-     F70 = new IA64FloatRegister(70);
-     F71 = new IA64FloatRegister(71);
-     F72 = new IA64FloatRegister(72);
-     F73 = new IA64FloatRegister(73);
-     F74 = new IA64FloatRegister(74);
-     F75 = new IA64FloatRegister(75);
-     F76 = new IA64FloatRegister(76);
-     F77 = new IA64FloatRegister(77);
-     F78 = new IA64FloatRegister(78);
-     F79 = new IA64FloatRegister(79);
-     F80 = new IA64FloatRegister(80);
-     F81 = new IA64FloatRegister(81);
-     F82 = new IA64FloatRegister(82);
-     F83 = new IA64FloatRegister(83);
-     F84 = new IA64FloatRegister(84);
-     F85 = new IA64FloatRegister(85);
-     F86 = new IA64FloatRegister(86);
-     F87 = new IA64FloatRegister(87);
-     F88 = new IA64FloatRegister(88);
-     F89 = new IA64FloatRegister(89);
-     F90 = new IA64FloatRegister(90);
-     F91 = new IA64FloatRegister(91);
-     F92 = new IA64FloatRegister(92);
-     F93 = new IA64FloatRegister(93);
-     F94 = new IA64FloatRegister(94);
-     F95 = new IA64FloatRegister(95);
-     F96 = new IA64FloatRegister(96);
-     F97 = new IA64FloatRegister(97);
-     F98 = new IA64FloatRegister(98);
-     F99 = new IA64FloatRegister(99);
-     F100 = new IA64FloatRegister(100);
-     F101 = new IA64FloatRegister(101);
-     F102 = new IA64FloatRegister(102);
-     F103 = new IA64FloatRegister(103);
-     F104 = new IA64FloatRegister(104);
-     F105 = new IA64FloatRegister(105);
-     F106 = new IA64FloatRegister(106);
-     F107 = new IA64FloatRegister(107);
-     F108 = new IA64FloatRegister(108);
-     F109 = new IA64FloatRegister(109);
-     F110 = new IA64FloatRegister(110);
-     F111 = new IA64FloatRegister(111);
-     F112 = new IA64FloatRegister(112);
-     F113 = new IA64FloatRegister(113);
-     F114 = new IA64FloatRegister(114);
-     F115 = new IA64FloatRegister(115);
-     F116 = new IA64FloatRegister(116);
-     F117 = new IA64FloatRegister(117);
-     F118 = new IA64FloatRegister(118);
-     F119 = new IA64FloatRegister(119);
-     F120 = new IA64FloatRegister(120);
-     F121 = new IA64FloatRegister(121);
-     F122 = new IA64FloatRegister(122);
-     F123 = new IA64FloatRegister(123);
-     F124 = new IA64FloatRegister(124);
-     F125 = new IA64FloatRegister(125);
-     F126 = new IA64FloatRegister(126);
-     F127 = new IA64FloatRegister(127);
-
-        registers = (new IA64FloatRegister[] {
-            F0, F1, F2, F3, F4, F5, F6, F7, F8, F9,
-            F10, F11, F12, F13, F14, F15, F16, F17, F18, F19,
-            F20, F21, F22, F23, F24, F25, F26, F27, F28, F29,
-            F30, F31, F32, F33, F34, F35, F36, F37, F38, F39,
-            F40, F41, F42, F43, F44, F45, F46, F47, F48, F49,
-            F50, F51, F52, F53, F54, F55, F56, F57, F58, F59,
-            F60, F61, F62, F63, F64, F65, F66, F67, F68, F69,
-            F70, F71, F72, F73, F74, F75, F76, F77, F78, F79,
-            F80, F81, F82, F83, F84, F85, F86, F87, F88, F89,
-            F90, F91, F92, F93, F94, F95, F96, F97, F98, F99,
-            F100, F101, F102, F103, F104, F105, F106, F107, F108, F109,
-            F110, F111, F112, F113, F114, F115, F116, F117, F118, F119,
-            F120, F121, F122, F123, F124, F125, F126, F127
-        });
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64Helper.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64Helper.java
deleted file mode 100644
index fc9bf69c2e8..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64Helper.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.ia64;
-
-import sun.jvm.hotspot.asm.*;
-
-public class IA64Helper implements CPUHelper {
-   public Disassembler createDisassembler(long startPc, byte[] code) {
-      // FIXME: IA64 disassembler not implemented
-      return null;
-   }
-
-   public Register getIntegerRegister(int num) {
-      // FIXME: IA64 disassembler not implemented
-      return null;
-   }
-
-   public Register getFloatRegister(int num) {
-      // FIXME: IA64 disassembler not implemented
-      return null;
-   }
-
-   public Register getStackPointer() {
-      // FIXME: IA64 disassembler not implemented
-      return null;
-   }
-
-   public Register getFramePointer() {
-      // FIXME: IA64 disassembler not implemented
-      return null;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64Register.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64Register.java
deleted file mode 100644
index 370930014ea..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64Register.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.ia64;
-
-import sun.jvm.hotspot.asm.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.utilities.*;
-
-public class IA64Register extends Register {
-
-  //
-  private static final int STACKED_BASE = 32;
-  private static final int STACKED_END = 127;
-
-  // We put application registers here too rather than separate types
-  private static final int APPL_BASE   = 128;
-
-  private static final int nofRegisters = 129;  // total number of registers
-
-  /** Constructor for an explicitly numbered register */
-  public IA64Register(int number) {
-    super(number);
-  }
-
-  public int getNumberOfRegisters() {
-    return nofRegisters;
-  }
-
-  public boolean isStacked() {
-    return (32 <= getNumber());
-  }
-
-  /** NOTE: this returns an offset in BYTES in this system! */
-  public long spOffsetInSavedWindow() {
-    return 0;
-  }
-
-  public String toString() {
-    return IA64Registers.getRegisterName(number);
-  }
-
-  public boolean isFramePointer() {
-    return number == APPL_BASE;
-  }
-
-  public boolean isStackPointer() {
-    return number == 12;
-  }
-
-  public boolean isFloat() {
-    return false;
-  }
-
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64Registers.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64Registers.java
deleted file mode 100644
index 258b8e1af81..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/ia64/IA64Registers.java
+++ /dev/null
@@ -1,353 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.ia64;
-
-import sun.jvm.hotspot.utilities.*;
-
-public class IA64Registers {
-
-    public static final IA64Register GR0;
-    public static final IA64Register GR1;
-    public static final IA64Register GR2;
-    public static final IA64Register GR3;
-    public static final IA64Register GR4;
-    public static final IA64Register GR5;
-    public static final IA64Register GR6;
-    public static final IA64Register GR7;
-    public static final IA64Register GR8;
-    public static final IA64Register GR9;
-    public static final IA64Register GR10;
-    public static final IA64Register GR11;
-    public static final IA64Register GR12;
-    public static final IA64Register GR13;
-    public static final IA64Register GR14;
-    public static final IA64Register GR15;
-    public static final IA64Register GR16;
-    public static final IA64Register GR17;
-    public static final IA64Register GR18;
-    public static final IA64Register GR19;
-    public static final IA64Register GR20;
-    public static final IA64Register GR21;
-    public static final IA64Register GR22;
-    public static final IA64Register GR23;
-    public static final IA64Register GR24;
-    public static final IA64Register GR25;
-    public static final IA64Register GR26;
-    public static final IA64Register GR27;
-    public static final IA64Register GR28;
-    public static final IA64Register GR29;
-    public static final IA64Register GR30;
-    public static final IA64Register GR31;
-    public static final IA64Register GR32;
-    public static final IA64Register GR33;
-    public static final IA64Register GR34;
-    public static final IA64Register GR35;
-    public static final IA64Register GR36;
-    public static final IA64Register GR37;
-    public static final IA64Register GR38;
-    public static final IA64Register GR39;
-    public static final IA64Register GR40;
-    public static final IA64Register GR41;
-    public static final IA64Register GR42;
-    public static final IA64Register GR43;
-    public static final IA64Register GR44;
-    public static final IA64Register GR45;
-    public static final IA64Register GR46;
-    public static final IA64Register GR47;
-    public static final IA64Register GR48;
-    public static final IA64Register GR49;
-    public static final IA64Register GR50;
-    public static final IA64Register GR51;
-    public static final IA64Register GR52;
-    public static final IA64Register GR53;
-    public static final IA64Register GR54;
-    public static final IA64Register GR55;
-    public static final IA64Register GR56;
-    public static final IA64Register GR57;
-    public static final IA64Register GR58;
-    public static final IA64Register GR59;
-    public static final IA64Register GR60;
-    public static final IA64Register GR61;
-    public static final IA64Register GR62;
-    public static final IA64Register GR63;
-    public static final IA64Register GR64;
-    public static final IA64Register GR65;
-    public static final IA64Register GR66;
-    public static final IA64Register GR67;
-    public static final IA64Register GR68;
-    public static final IA64Register GR69;
-    public static final IA64Register GR70;
-    public static final IA64Register GR71;
-    public static final IA64Register GR72;
-    public static final IA64Register GR73;
-    public static final IA64Register GR74;
-    public static final IA64Register GR75;
-    public static final IA64Register GR76;
-    public static final IA64Register GR77;
-    public static final IA64Register GR78;
-    public static final IA64Register GR79;
-    public static final IA64Register GR80;
-    public static final IA64Register GR81;
-    public static final IA64Register GR82;
-    public static final IA64Register GR83;
-    public static final IA64Register GR84;
-    public static final IA64Register GR85;
-    public static final IA64Register GR86;
-    public static final IA64Register GR87;
-    public static final IA64Register GR88;
-    public static final IA64Register GR89;
-    public static final IA64Register GR90;
-    public static final IA64Register GR91;
-    public static final IA64Register GR92;
-    public static final IA64Register GR93;
-    public static final IA64Register GR94;
-    public static final IA64Register GR95;
-    public static final IA64Register GR96;
-    public static final IA64Register GR97;
-    public static final IA64Register GR98;
-    public static final IA64Register GR99;
-    public static final IA64Register GR100;
-    public static final IA64Register GR101;
-    public static final IA64Register GR102;
-    public static final IA64Register GR103;
-    public static final IA64Register GR104;
-    public static final IA64Register GR105;
-    public static final IA64Register GR106;
-    public static final IA64Register GR107;
-    public static final IA64Register GR108;
-    public static final IA64Register GR109;
-    public static final IA64Register GR110;
-    public static final IA64Register GR111;
-    public static final IA64Register GR112;
-    public static final IA64Register GR113;
-    public static final IA64Register GR114;
-    public static final IA64Register GR115;
-    public static final IA64Register GR116;
-    public static final IA64Register GR117;
-    public static final IA64Register GR118;
-    public static final IA64Register GR119;
-    public static final IA64Register GR120;
-    public static final IA64Register GR121;
-    public static final IA64Register GR122;
-    public static final IA64Register GR123;
-    public static final IA64Register GR124;
-    public static final IA64Register GR125;
-    public static final IA64Register GR126;
-    public static final IA64Register GR127;
-
-    public static final IA64Register AR_BSP;
-
-    public static final int NUM_REGISTERS = 129;
-    private static final IA64Register registers[];
-
-    static {
-     GR0 = new IA64Register(0);
-     GR1 = new IA64Register(1);
-     GR2 = new IA64Register(2);
-     GR3 = new IA64Register(3);
-     GR4 = new IA64Register(4);
-     GR5 = new IA64Register(5);
-     GR6 = new IA64Register(6);
-     GR7 = new IA64Register(7);
-     GR8 = new IA64Register(8);
-     GR9 = new IA64Register(9);
-     GR10 = new IA64Register(10);
-     GR11 = new IA64Register(11);
-     GR12 = new IA64Register(12);
-     GR13 = new IA64Register(13);
-     GR14 = new IA64Register(14);
-     GR15 = new IA64Register(15);
-     GR16 = new IA64Register(16);
-     GR17 = new IA64Register(17);
-     GR18 = new IA64Register(18);
-     GR19 = new IA64Register(19);
-     GR20 = new IA64Register(20);
-     GR21 = new IA64Register(21);
-     GR22 = new IA64Register(22);
-     GR23 = new IA64Register(23);
-     GR24 = new IA64Register(24);
-     GR25 = new IA64Register(25);
-     GR26 = new IA64Register(26);
-     GR27 = new IA64Register(27);
-     GR28 = new IA64Register(28);
-     GR29 = new IA64Register(29);
-     GR30 = new IA64Register(30);
-     GR31 = new IA64Register(31);
-     GR32 = new IA64Register(32);
-     GR33 = new IA64Register(33);
-     GR34 = new IA64Register(34);
-     GR35 = new IA64Register(35);
-     GR36 = new IA64Register(36);
-     GR37 = new IA64Register(37);
-     GR38 = new IA64Register(38);
-     GR39 = new IA64Register(39);
-     GR40 = new IA64Register(40);
-     GR41 = new IA64Register(41);
-     GR42 = new IA64Register(42);
-     GR43 = new IA64Register(43);
-     GR44 = new IA64Register(44);
-     GR45 = new IA64Register(45);
-     GR46 = new IA64Register(46);
-     GR47 = new IA64Register(47);
-     GR48 = new IA64Register(48);
-     GR49 = new IA64Register(49);
-     GR50 = new IA64Register(50);
-     GR51 = new IA64Register(51);
-     GR52 = new IA64Register(52);
-     GR53 = new IA64Register(53);
-     GR54 = new IA64Register(54);
-     GR55 = new IA64Register(55);
-     GR56 = new IA64Register(56);
-     GR57 = new IA64Register(57);
-     GR58 = new IA64Register(58);
-     GR59 = new IA64Register(59);
-     GR60 = new IA64Register(60);
-     GR61 = new IA64Register(61);
-     GR62 = new IA64Register(62);
-     GR63 = new IA64Register(63);
-     GR64 = new IA64Register(64);
-     GR65 = new IA64Register(65);
-     GR66 = new IA64Register(66);
-     GR67 = new IA64Register(67);
-     GR68 = new IA64Register(68);
-     GR69 = new IA64Register(69);
-     GR70 = new IA64Register(70);
-     GR71 = new IA64Register(71);
-     GR72 = new IA64Register(72);
-     GR73 = new IA64Register(73);
-     GR74 = new IA64Register(74);
-     GR75 = new IA64Register(75);
-     GR76 = new IA64Register(76);
-     GR77 = new IA64Register(77);
-     GR78 = new IA64Register(78);
-     GR79 = new IA64Register(79);
-     GR80 = new IA64Register(80);
-     GR81 = new IA64Register(81);
-     GR82 = new IA64Register(82);
-     GR83 = new IA64Register(83);
-     GR84 = new IA64Register(84);
-     GR85 = new IA64Register(85);
-     GR86 = new IA64Register(86);
-     GR87 = new IA64Register(87);
-     GR88 = new IA64Register(88);
-     GR89 = new IA64Register(89);
-     GR90 = new IA64Register(90);
-     GR91 = new IA64Register(91);
-     GR92 = new IA64Register(92);
-     GR93 = new IA64Register(93);
-     GR94 = new IA64Register(94);
-     GR95 = new IA64Register(95);
-     GR96 = new IA64Register(96);
-     GR97 = new IA64Register(97);
-     GR98 = new IA64Register(98);
-     GR99 = new IA64Register(99);
-     GR100 = new IA64Register(100);
-     GR101 = new IA64Register(101);
-     GR102 = new IA64Register(102);
-     GR103 = new IA64Register(103);
-     GR104 = new IA64Register(104);
-     GR105 = new IA64Register(105);
-     GR106 = new IA64Register(106);
-     GR107 = new IA64Register(107);
-     GR108 = new IA64Register(108);
-     GR109 = new IA64Register(109);
-     GR110 = new IA64Register(110);
-     GR111 = new IA64Register(111);
-     GR112 = new IA64Register(112);
-     GR113 = new IA64Register(113);
-     GR114 = new IA64Register(114);
-     GR115 = new IA64Register(115);
-     GR116 = new IA64Register(116);
-     GR117 = new IA64Register(117);
-     GR118 = new IA64Register(118);
-     GR119 = new IA64Register(119);
-     GR120 = new IA64Register(120);
-     GR121 = new IA64Register(121);
-     GR122 = new IA64Register(122);
-     GR123 = new IA64Register(123);
-     GR124 = new IA64Register(124);
-     GR125 = new IA64Register(125);
-     GR126 = new IA64Register(126);
-     GR127 = new IA64Register(127);
-
-     AR_BSP = new IA64Register(128);
-
-        registers = (new IA64Register[] {
-            GR0, GR1, GR2, GR3, GR4, GR5, GR6, GR7, GR8, GR9,
-            GR10, GR11, GR12, GR13, GR14, GR15, GR16, GR17, GR18, GR19,
-            GR20, GR21, GR22, GR23, GR24, GR25, GR26, GR27, GR28, GR29,
-            GR30, GR31, GR32, GR33, GR34, GR35, GR36, GR37, GR38, GR39,
-            GR40, GR41, GR42, GR43, GR44, GR45, GR46, GR47, GR48, GR49,
-            GR50, GR51, GR52, GR53, GR54, GR55, GR56, GR57, GR58, GR59,
-            GR60, GR61, GR62, GR63, GR64, GR65, GR66, GR67, GR68, GR69,
-            GR70, GR71, GR72, GR73, GR74, GR75, GR76, GR77, GR78, GR79,
-            GR80, GR81, GR82, GR83, GR84, GR85, GR86, GR87, GR88, GR89,
-            GR90, GR91, GR92, GR93, GR94, GR95, GR96, GR97, GR98, GR99,
-            GR100, GR101, GR102, GR103, GR104, GR105, GR106, GR107, GR108, GR109,
-            GR110, GR111, GR112, GR113, GR114, GR115, GR116, GR117, GR118, GR119,
-            GR120, GR121, GR122, GR123, GR124, GR125, GR126, GR127, AR_BSP
-        });
-
-  }
-
-  public static final IA64Register FP = AR_BSP;
-  public static final IA64Register SP = GR12;
-
-
-  /** Prefer to use this instead of the constant above */
-  public static int getNumRegisters() {
-    return NUM_REGISTERS;
-  }
-
-
-  public static String getRegisterName(int regNum) {
-    if (regNum < 0 || regNum >= NUM_REGISTERS) {
-      return "[Illegal register " + regNum + "]";
-    }
-
-    if (Assert.ASSERTS_ENABLED) {
-      Assert.that(regNum > -1 && regNum < NUM_REGISTERS, "invalid integer register number!");
-    }
-
-    if (regNum == 128 ) {
-      return "BSP";
-    }
-
-    if (regNum == 12) {
-      return "SP";
-    }
-
-    return "R" + regNum;
-
-  }
-
-  public static IA64Register getRegister(int regNum) {
-    if (Assert.ASSERTS_ENABLED) {
-      Assert.that(regNum > -1 && regNum < NUM_REGISTERS, "invalid register number!");
-    }
-
-    return registers[regNum];
-  }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/AlternateSpaceLdstubDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/AlternateSpaceLdstubDecoder.java
deleted file mode 100644
index 9397151dfe6..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/AlternateSpaceLdstubDecoder.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class AlternateSpaceLdstubDecoder extends LdstubDecoder {
-    AlternateSpaceLdstubDecoder(int op3, String name, int dataType) {
-        super(op3, name, dataType);
-    }
-
-    Instruction decodeMemoryInstruction(int instruction,
-                                               SPARCRegisterIndirectAddress addr,
-                                               SPARCRegister rd,
-                                               SPARCInstructionFactory factory) {
-        setAddressSpace(instruction, addr);
-        return factory.newLdstubInstruction(name, addr, rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/AlternateSpaceLoadDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/AlternateSpaceLoadDecoder.java
deleted file mode 100644
index 5d7c7be1745..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/AlternateSpaceLoadDecoder.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class AlternateSpaceLoadDecoder extends LoadDecoder {
-    AlternateSpaceLoadDecoder(int op3, String name, int dataType) {
-        super(op3, name, dataType);
-    }
-
-    Instruction decodeMemoryInstruction(int instruction,
-                                     SPARCRegisterIndirectAddress addr,
-                                     SPARCRegister rd,
-                                     SPARCInstructionFactory factory) {
-        setAddressSpace(instruction, addr);
-        return factory.newLoadInstruction(name, op3, addr, rd, dataType);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/AlternateSpaceStoreDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/AlternateSpaceStoreDecoder.java
deleted file mode 100644
index 3c0535d27c7..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/AlternateSpaceStoreDecoder.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class AlternateSpaceStoreDecoder extends StoreDecoder {
-    AlternateSpaceStoreDecoder(int op3, String name, int dataType) {
-        super(op3, name, dataType);
-    }
-
-    protected Instruction decodeMemoryInstruction(int instruction,
-                                               SPARCRegisterIndirectAddress addr,
-                                               SPARCRegister rd,
-                                               SPARCInstructionFactory factory) {
-        setAddressSpace(instruction, addr);
-        return factory.newStoreInstruction(name, op3, addr, rd, dataType);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/AlternateSpaceSwapDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/AlternateSpaceSwapDecoder.java
deleted file mode 100644
index 9c9fcd5181a..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/AlternateSpaceSwapDecoder.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class AlternateSpaceSwapDecoder extends SwapDecoder {
-    AlternateSpaceSwapDecoder(int op3, String name, int dataType) {
-        super(op3, name, dataType);
-    }
-
-    Instruction decodeMemoryInstruction(int instruction,
-                                     SPARCRegisterIndirectAddress addr,
-                                     SPARCRegister rd,
-                                     SPARCInstructionFactory factory) {
-        setAddressSpace(instruction, addr);
-        return factory.newSwapInstruction(name, addr, rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/ArithmeticDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/ArithmeticDecoder.java
deleted file mode 100644
index 0e92383cf07..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/ArithmeticDecoder.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class ArithmeticDecoder extends Format3ADecoder {
-    ArithmeticDecoder(int op3, String name, int rtlOperation) {
-        super(op3, name, rtlOperation);
-    }
-
-    Instruction decodeFormat3AInstruction(int instruction,
-                                       SPARCRegister rs1,
-                                       ImmediateOrRegister operand2,
-                                       SPARCRegister rd,
-                                       SPARCInstructionFactory factory) {
-        return factory.newArithmeticInstruction(name, op3, rtlOperation, rs1, operand2, rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/BranchDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/BranchDecoder.java
deleted file mode 100644
index 06ec0e4ddca..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/BranchDecoder.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-abstract class BranchDecoder extends InstructionDecoder {
-
-    // format 2 - condition code names.
-    // Appendix F - Opcodes and Condition Codes - Page 231 - Table F-7.
-    static final String integerConditionNames[] = {
-        "bn", "be", "ble", "bl", "bleu", "bcs", "bneg", "bvs",
-        "ba", "bne", "bg", "bge", "bgu", "bcc", "bpos", "bvc"
-    };
-
-    static final String integerAnnuledConditionNames[] = {
-        "bn,a", "be,a", "ble,a", "bl,a", "bleu,a", "bcs,a", "bneg,a", "bvs,a",
-        "ba,a", "bne,a", "bg,a", "bge,a", "bgu,a", "bcc,a", "bpos,a", "bvc,a"
-    };
-
-    // format 2 - condition code names.
-    // Appendix F - Opcodes and Condition Codes - Page 231 - Table F-7.
-    static final String floatConditionNames[] = {
-        "fbn", "fbne", "fblg", "fbul", "fbl", "fbug", "fbg", "fbu",
-        "fba", "fbe",  "fbue", "fbge", "fbuge", "fble", "fbule", "fbo"
-    };
-
-    static final String floatAnnuledConditionNames[] = {
-        "fbn,a", "fbne,a", "fblg,a", "fbul,a", "fbl,a", "fbug,a", "fbg,a", "fbu,a",
-        "fba,a", "fbe,a",  "fbue,a", "fbge,a", "fbuge,a", "fble,a", "fbule,a", "fbo,a"
-    };
-
-    static boolean getAnnuledBit(int instruction) {
-        return (instruction & ANNUL_MASK) != 0;
-    }
-
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        boolean isAnnuled = getAnnuledBit(instruction);
-        int conditionCode = getConditionCode(instruction);
-        String conditionName = getConditionName(conditionCode, isAnnuled);
-        int offset = extractSignedIntFromNBits(instruction, 22);
-        // word align the offset by right shifting 2 bits
-        offset <<= 2;
-        PCRelativeAddress addr = new PCRelativeAddress(offset);
-        return factory.newBranchInstruction(conditionName, addr, isAnnuled, conditionCode);
-    }
-
-    abstract String getConditionName(int conditionCode, boolean isAnnuled);
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/CoprocessorBranchDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/CoprocessorBranchDecoder.java
deleted file mode 100644
index c28861b8061..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/CoprocessorBranchDecoder.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-// format 2 - condition code names.
-// Appendix F - Opcodes and Condition Codes - Page 231 - Table F-7.
-
-class CoprocessorBranchDecoder extends BranchDecoder {
-    private static final String coprocessorConditionNames[] = {
-        "cbn", "cb123", "cb12", "cb13", "cb1", "cb23", "cb2", "cb3",
-        "cba", "cb0",  "cb03", "cb02", "cb023", "cb01", "cb013", "cb012"
-    };
-
-    private static final String coprocessorAnnuledConditionNames[] = {
-        "cbn,a", "cb123,a", "cb12,a", "cb13,a", "cb1,a", "cb23,a", "cb2,a", "cb3,a",
-        "cba,a", "cb0,a",  "cb03,a", "cb02,a", "cb023,a", "cb01,a", "cb013,a", "cb012,a"
-    };
-
-    String getConditionName(int conditionCode, boolean isAnnuled) {
-        return isAnnuled ? coprocessorAnnuledConditionNames[conditionCode]
-                         : coprocessorConditionNames[conditionCode];
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/CoprocessorDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/CoprocessorDecoder.java
deleted file mode 100644
index f76a0931072..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/CoprocessorDecoder.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class CoprocessorDecoder extends InstructionDecoder {
-    private int op3;
-    CoprocessorDecoder(int op3) {
-        this.op3 = op3;
-    }
-
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        int rs1Num = getSourceRegister1(instruction);
-        int rs2Num = getSourceRegister2(instruction);
-        int rdNum = getDestinationRegister(instruction);
-
-        return factory.newCoprocessorInstruction(instruction, op3,
-                                     (instruction & OPC_MASK) >> OPF_START_BIT,
-                                     rs1Num, rs2Num, rdNum);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FP2RegisterDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FP2RegisterDecoder.java
deleted file mode 100644
index e0bfc9ed067..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FP2RegisterDecoder.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import sun.jvm.hotspot.utilities.Assert;
-
-class FP2RegisterDecoder extends FloatDecoder {
-
-    FP2RegisterDecoder(int opf, String name, int srcType, int resultType) {
-        super(opf, name, srcType, resultType);
-    }
-
-    Instruction decodeFloatInstruction(int instruction,
-                                       SPARCRegister rs1, SPARCRegister rs2,
-                                       SPARCRegister rd,
-                                       SPARCInstructionFactory factory) {
-        if (Assert.ASSERTS_ENABLED)
-            Assert.that(rs2.isFloat() && rd.isFloat(), "rs2, rd have to be float registers");
-
-        return factory.newFP2RegisterInstruction(name, opf, (SPARCFloatRegister)rs2, (SPARCFloatRegister)rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FPArithmeticDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FPArithmeticDecoder.java
deleted file mode 100644
index 46cf4fb3768..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FPArithmeticDecoder.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import sun.jvm.hotspot.utilities.Assert;
-
-class FPArithmeticDecoder extends FloatDecoder {
-    private final int rtlOperation;
-
-    FPArithmeticDecoder(int opf, String name, int rtlOperation,
-                        int src1Type, int src2Type, int resultType) {
-       super(opf, name, src1Type, src2Type, resultType);
-       this.rtlOperation = rtlOperation;
-    }
-
-    Instruction decodeFloatInstruction(int instruction,
-                       SPARCRegister rs1, SPARCRegister rs2,
-                       SPARCRegister rd,
-                       SPARCInstructionFactory factory) {
-        if (Assert.ASSERTS_ENABLED)
-            Assert.that(rs1.isFloat() && rs2.isFloat() && rd.isFloat(), "rs1, rs2 and rd must be floats");
-        return factory.newFPArithmeticInstruction(name, opf, rtlOperation,
-                                                 (SPARCFloatRegister)rs1,
-                                                 (SPARCFloatRegister)rs2,
-                                                 (SPARCFloatRegister)rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FPMoveDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FPMoveDecoder.java
deleted file mode 100644
index 09a80f37e95..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FPMoveDecoder.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import sun.jvm.hotspot.utilities.Assert;
-
-class FPMoveDecoder extends FloatDecoder {
-
-    FPMoveDecoder(int opf, String name, int srcType, int resultType) {
-        super(opf, name, srcType, resultType);
-    }
-
-    Instruction decodeFloatInstruction(int instruction,
-                                       SPARCRegister rs1, SPARCRegister rs2,
-                                       SPARCRegister rd,
-                                       SPARCInstructionFactory factory) {
-        if (Assert.ASSERTS_ENABLED)
-            Assert.that(rs2.isFloat() && rd.isFloat(), "rs2, rd have to be float registers");
-
-        return factory.newFPMoveInstruction(name, opf, (SPARCFloatRegister)rs2, (SPARCFloatRegister)rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FPopDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FPopDecoder.java
deleted file mode 100644
index 3265d5e640c..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FPopDecoder.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-abstract class FPopDecoder extends InstructionDecoder {
-    abstract InstructionDecoder getOpfDecoder(int opf);
-
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        int opf = getOpf(instruction);
-        InstructionDecoder decoder = getOpfDecoder(opf);
-        return (decoder == null) ? factory.newIllegalInstruction(instruction)
-                                 : decoder.decode(instruction, factory);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FloatBranchDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FloatBranchDecoder.java
deleted file mode 100644
index 1612425545b..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FloatBranchDecoder.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-class FloatBranchDecoder extends BranchDecoder {
-    String getConditionName(int conditionCode, boolean isAnnuled) {
-        return isAnnuled ? floatAnnuledConditionNames[conditionCode]
-                         : floatConditionNames[conditionCode];
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FloatDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FloatDecoder.java
deleted file mode 100644
index 656aca50f89..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FloatDecoder.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-abstract class FloatDecoder extends InstructionDecoder {
-    final int    opf;
-    final String name;
-    final int    numSources; // 1 or 2;
-    final int    src1Type;   // RTLDT_FL_SINGLE, _DOUBLE, _QUAD
-    final int    src2Type;   // RTLDT_FL_SINGLE, _DOUBLE, _QUAD
-    final int    resultType; // RTLDT_FL_SINGLE, _DOUBLE, _QUAD
-
-    FloatDecoder(int opf, String name, int src1Type, int src2Type, int resultType) {
-        this.opf = opf;
-        this.name = name;
-        numSources = 2;
-        this.src1Type = src1Type;
-        this.src2Type = src2Type;
-        this.resultType = resultType;
-    }
-
-    FloatDecoder(int opf, String name, int src2Type, int resultType) {
-        this.opf = opf;
-        this.name = name;
-        numSources = 1;
-        this.src1Type = RTLOP_UNKNOWN;
-        this.src2Type = src2Type;
-        this.resultType = resultType;
-    }
-
-    abstract Instruction decodeFloatInstruction(int instruction,
-                               SPARCRegister rs1, SPARCRegister rs2, SPARCRegister rd,
-                               SPARCInstructionFactory factory);
-
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        int rs1Num = getSourceRegister1(instruction);
-        int rs2Num = getSourceRegister2(instruction);
-        int rdNum = getDestinationRegister(instruction);
-
-        SPARCRegister rs1 = null;
-        if (numSources == 2) {
-           rs1 = RegisterDecoder.decode(src1Type, rs1Num);
-           if (rs1 == null) {
-              return factory.newIllegalInstruction(instruction);
-           }
-        }
-
-        SPARCRegister rd = RegisterDecoder.decode(resultType, rdNum);
-        SPARCRegister rs2 = RegisterDecoder.decode(src2Type, rs2Num);
-        if (rd == null || rs2 == null) {
-           return factory.newIllegalInstruction(instruction);
-        }
-
-        return decodeFloatInstruction(instruction, rs1, rs2, rd, factory);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/Format3ADecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/Format3ADecoder.java
deleted file mode 100644
index a72de3b190f..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/Format3ADecoder.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-abstract class Format3ADecoder extends InstructionDecoder
-                           implements /* imports */ RTLOperations {
-    final int op3;
-    final String name;
-    final int rtlOperation;
-
-    Format3ADecoder(int op3, String name, int rtlOperation) {
-        this.op3 = op3;
-        this.name = name;
-        this.rtlOperation = rtlOperation;
-    }
-
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCRegister rs1 = SPARCRegisters.getRegister(getSourceRegister1(instruction));
-        SPARCRegister rd = SPARCRegisters.getRegister(getDestinationRegister(instruction));
-        ImmediateOrRegister operand2 = getOperand2(instruction);
-        return decodeFormat3AInstruction(instruction, rs1, operand2, rd, factory);
-    }
-
-    abstract Instruction decodeFormat3AInstruction(int instruction,
-                                       SPARCRegister rs1,
-                                       ImmediateOrRegister operand2,
-                                       SPARCRegister rd,
-                                       SPARCInstructionFactory factory);
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/InstructionDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/InstructionDecoder.java
deleted file mode 100644
index 81bb262a7fc..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/InstructionDecoder.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-// basic instruction decoder class
-abstract class InstructionDecoder implements /* imports */ SPARCOpcodes , RTLDataTypes, RTLOperations {
-    // some general utility functions - for format 2, 3 & 3A instructions
-
-    static int extractSignedIntFromNBits(int value, int num_bits) {
-        return (value << (32 - num_bits)) >> (32 - num_bits);
-    }
-
-    // "rs1"
-    static int getSourceRegister1(int instruction) {
-        return (instruction & RS1_MASK) >>> RS1_START_BIT;
-    }
-
-    // "rs2"
-    static int getSourceRegister2(int instruction) {
-        return (instruction & RS2_MASK);
-    }
-
-    // "rd"
-    static int getDestinationRegister(int instruction) {
-        return (instruction & RD_MASK) >>> RD_START_BIT;
-    }
-
-    static int getConditionCode(int instruction) {
-        return (instruction & CONDITION_CODE_MASK) >>> CONDITION_CODE_START_BIT;
-    }
-
-    // "i" bit - used to indicate whether second component in an indirect
-    // address is immediate value or a register. (format 3 & 3A).
-
-    static boolean isIBitSet(int instruction) {
-        return (instruction & I_MASK) != 0;
-    }
-
-    static ImmediateOrRegister getOperand2(int instruction) {
-        boolean iBit = isIBitSet(instruction);
-        ImmediateOrRegister operand2 = null;
-        if (iBit) {
-           operand2 = new Immediate(new Short((short)extractSignedIntFromNBits(instruction, 13)));
-        } else {
-           operand2 = SPARCRegisters.getRegister(getSourceRegister2(instruction));
-        }
-        return operand2;
-    }
-
-    // "opf" - floating point operation code.
-    static int getOpf(int instruction) {
-        return (instruction & OPF_MASK) >>> OPF_START_BIT;
-    }
-
-    abstract Instruction decode(int instruction, SPARCInstructionFactory factory);
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/JmplDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/JmplDecoder.java
deleted file mode 100644
index a58f73b3d74..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/JmplDecoder.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class JmplDecoder extends MemoryInstructionDecoder {
-    JmplDecoder() {
-        super(JMPL, "jmpl", RTLDT_UNSIGNED_WORD);
-    }
-
-    Instruction decodeMemoryInstruction(int instruction, SPARCRegisterIndirectAddress addr,
-                       SPARCRegister rd,  SPARCInstructionFactory factory) {
-        // this may be most probably indirect call or ret or retl
-        Instruction instr = null;
-        if (rd == SPARCRegisters.O7) {
-            instr = factory.newIndirectCallInstruction(addr, rd);
-        } else if (rd == SPARCRegisters.G0) {
-            int disp = (int) addr.getDisplacement();
-            Register base = addr.getBase();
-            if (base == SPARCRegisters.I7 && disp == 8) {
-                instr = factory.newReturnInstruction(addr, rd, false /* not leaf */);
-            } else if (base == SPARCRegisters.O7 && disp == 8) {
-                instr = factory.newReturnInstruction(addr, rd, true /* leaf */);
-            } else {
-                instr = factory.newJmplInstruction(addr, rd);
-            }
-        } else {
-            instr = factory.newJmplInstruction(addr, rd);
-        }
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/LdstubDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/LdstubDecoder.java
deleted file mode 100644
index f5311dcd087..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/LdstubDecoder.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class LdstubDecoder extends MemoryInstructionDecoder {
-    LdstubDecoder(int op3, String name, int dataType) {
-        super(op3, name, dataType);
-    }
-
-    Instruction decodeMemoryInstruction(int instruction,
-                                     SPARCRegisterIndirectAddress addr,
-                                     SPARCRegister rd,
-                                     SPARCInstructionFactory factory) {
-        return factory.newLdstubInstruction(name, addr, rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/LoadDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/LoadDecoder.java
deleted file mode 100644
index 25a270a8742..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/LoadDecoder.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class LoadDecoder extends MemoryInstructionDecoder {
-    LoadDecoder(int op3, String name, int dataType) {
-        super(op3, name, dataType);
-    }
-
-    Instruction decodeMemoryInstruction(int instruction,
-                                     SPARCRegisterIndirectAddress addr,
-                                     SPARCRegister rd,
-                                     SPARCInstructionFactory factory) {
-        return factory.newLoadInstruction(name, op3, addr, rd, dataType);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/LogicDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/LogicDecoder.java
deleted file mode 100644
index ab9aa9da29d..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/LogicDecoder.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class LogicDecoder extends Format3ADecoder {
-    LogicDecoder(int op3, String name, int rtlOperation) {
-        super(op3, name, rtlOperation);
-    }
-
-    Instruction decodeFormat3AInstruction(int instruction,
-                                           SPARCRegister rs1,
-                                           ImmediateOrRegister operand2,
-                                           SPARCRegister rd,
-                                           SPARCInstructionFactory factory) {
-        Instruction instr = null;
-        if (op3 == OR && rs1 == SPARCRegisters.G0 && rd != SPARCRegisters.G0) {
-            instr = factory.newMoveInstruction(name, op3, operand2, rd);
-        } else {
-            instr = factory.newLogicInstruction(name, op3, rtlOperation, rs1, operand2, rd);
-        }
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/MemoryInstructionDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/MemoryInstructionDecoder.java
deleted file mode 100644
index b8c86ab3a99..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/MemoryInstructionDecoder.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-abstract class MemoryInstructionDecoder extends InstructionDecoder {
-    final int    op3;
-    final String name;
-    final int    dataType;
-
-    SPARCRegisterIndirectAddress newRegisterIndirectAddress(SPARCRegister rs1, SPARCRegister rs2) {
-        return new SPARCRegisterIndirectAddress(rs1, rs2);
-    }
-
-    SPARCRegisterIndirectAddress newRegisterIndirectAddress(SPARCRegister rs1, int offset) {
-        return new SPARCRegisterIndirectAddress(rs1, offset);
-    }
-
-    static void setAddressSpace(int instruction, SPARCRegisterIndirectAddress addr) {
-        int asi = (instruction & ASI_MASK) >>> ASI_START_BIT;
-        addr.setAddressSpace(asi);
-    }
-
-    SPARCRegisterIndirectAddress getRegisterIndirectAddress(int instruction) {
-        SPARCRegister rs1 = SPARCRegisters.getRegister(getSourceRegister1(instruction));
-        boolean iBit = isIBitSet(instruction);
-        SPARCRegisterIndirectAddress addr = null;
-        if (iBit) {
-            int simm13 = extractSignedIntFromNBits(instruction, 13);
-            addr = newRegisterIndirectAddress(rs1,simm13);
-        } else {
-            SPARCRegister rs2 = SPARCRegisters.getRegister(getSourceRegister2(instruction));
-            addr = newRegisterIndirectAddress(rs1,rs2);
-        }
-        return addr;
-    }
-
-    MemoryInstructionDecoder(int op3, String name, int dataType) {
-        this.op3 = op3;
-        this.name = name;
-        this.dataType = dataType;
-    }
-
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCRegisterIndirectAddress addr = getRegisterIndirectAddress(instruction);
-        SPARCRegister rd = getDestination(instruction);
-        boolean isV9Okay = (factory instanceof SPARCV9InstructionFactory);
-        if ( (rd == null) || (! isV9Okay && rd.isV9Only()) )
-            return factory.newIllegalInstruction(instruction);
-
-        return decodeMemoryInstruction(instruction, addr, rd, factory);
-    }
-
-    SPARCRegister getDestination(int instruction) {
-        int rdNum = getDestinationRegister(instruction);
-        SPARCRegister rd = RegisterDecoder.decode(dataType, rdNum);
-        return rd;
-    }
-
-    abstract Instruction decodeMemoryInstruction(int instruction,
-                                   SPARCRegisterIndirectAddress addr,
-                                   SPARCRegister rd, SPARCInstructionFactory factory);
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/ReadDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/ReadDecoder.java
deleted file mode 100644
index fcf99ff7501..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/ReadDecoder.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class ReadDecoder extends ReadWriteDecoder {
-    ReadDecoder(int specialRegNum) {
-        super(specialRegNum);
-    }
-
-    Instruction decodeReadWrite(int instruction, SPARCInstructionFactory factory,
-                                int rs1Num, int rdNum) {
-        Instruction instr = null;
-        int specialReg = specialRegNum;
-        if (rs1Num == 0)
-            specialReg = SPARCSpecialRegisters.Y;
-        if (rs1Num == 15 && rdNum == 0) {
-            instr = factory.newStbarInstruction();
-        } else {
-            instr = factory.newReadInstruction(specialReg, rs1Num,
-                                  SPARCRegisters.getRegister(rdNum));
-        }
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/ReadWriteDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/ReadWriteDecoder.java
deleted file mode 100644
index 05b75fc1081..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/ReadWriteDecoder.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-abstract class ReadWriteDecoder extends InstructionDecoder {
-    final int specialRegNum;
-
-    abstract Instruction decodeReadWrite(int instruction,
-                               SPARCInstructionFactory factory,
-                               int rs1Num, int rdNum);
-
-    ReadWriteDecoder(int specialRegNum) {
-        this.specialRegNum = specialRegNum;
-    }
-
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        Instruction instr = null;
-        int rs1Num = getSourceRegister1(instruction);
-        int rdNum = getDestinationRegister(instruction);
-        return decodeReadWrite(instruction, factory, rs1Num, rdNum);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/RegisterDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/RegisterDecoder.java
deleted file mode 100644
index ba36497bcc8..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/RegisterDecoder.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.RTLDataTypes;
-
-class RegisterDecoder implements /* imports */ RTLDataTypes {
-    // refer to page 40 - section 5.1.4.1 - Floating-point Register Number Encoding
-    private static SPARCFloatRegister decodeDouble(int num) {
-        // 6 bit double precision registers are encoded in 5 bits as
-        // b<4> b<3> b<2> b<1> b<5>.
-
-        boolean lsb = (0x1 & num) != 0;
-        if (lsb)
-            num |= 0x20;  // 10000b
-
-        if ((num % 2) != 0)
-            return null;
-
-        return SPARCFloatRegisters.getRegister(num);
-    }
-
-    private static SPARCFloatRegister decodeQuad(int num) {
-        // 6 bit quad precision registers are encoded in 5 bits as
-        // b<4> b<3> b<2> 0 b<5>
-
-        boolean lsb = (0x1 & num) != 0;
-        if (lsb)
-            num |= 0x20; // 10000b
-
-        if ((num % 4) != 0)
-            return null;
-
-        return SPARCFloatRegisters.getRegister(num);
-    }
-
-    static SPARCRegister decode(int dataType, int regNum) {
-        regNum &= 0x1F; // mask out all but lsb 5 bits
-        SPARCRegister result = null;
-        switch (dataType) {
-            case RTLDT_FL_SINGLE:
-                result = SPARCFloatRegisters.getRegister(regNum);
-                break;
-
-            case RTLDT_FL_DOUBLE:
-                result = decodeDouble(regNum);
-                break;
-
-            case RTLDT_FL_QUAD:
-                result = decodeQuad(regNum);
-                break;
-
-            case RTLDT_UNKNOWN:
-                result = null;
-                break;
-
-            default: // some integer register
-                result = SPARCRegisters.getRegister(regNum);
-                break;
-        }
-        return result;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/RestoreDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/RestoreDecoder.java
deleted file mode 100644
index 9edd88046b4..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/RestoreDecoder.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class RestoreDecoder extends Format3ADecoder {
-    RestoreDecoder() {
-        super(RESTORE, "restore", RTLOP_UNKNOWN);
-    }
-
-    Instruction decodeFormat3AInstruction(int instruction,
-                                           SPARCRegister rs1,
-                                           ImmediateOrRegister operand2,
-                                           SPARCRegister rd,
-                                           SPARCInstructionFactory factory) {
-        return factory.newRestoreInstruction(rs1, operand2, rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/RettDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/RettDecoder.java
deleted file mode 100644
index c5ae0d476f7..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/RettDecoder.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class RettDecoder extends MemoryInstructionDecoder {
-    RettDecoder() {
-        super(RETT, "rett", RTLDT_UNKNOWN);
-    }
-
-    Instruction decodeMemoryInstruction(int instruction, SPARCRegisterIndirectAddress addr,
-                      SPARCRegister rd, SPARCInstructionFactory factory) {
-        return factory.newRettInstruction(addr);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCArithmeticInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCArithmeticInstruction.java
deleted file mode 100644
index ad8a3d69cca..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCArithmeticInstruction.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCArithmeticInstruction extends SPARCFormat3AInstruction
-    implements ArithmeticInstruction {
-    final private int operation;
-
-    public SPARCArithmeticInstruction(String name, int opcode, int operation, SPARCRegister rs1,
-                                      ImmediateOrRegister operand2, SPARCRegister rd) {
-        super(name, opcode, rs1, operand2, rd);
-        this.operation = operation;
-    }
-
-    protected String getDescription() {
-        if (rd == rs1 && operand2.isImmediate()) {
-            int value = ((Immediate)operand2).getNumber().intValue();
-            StringBuffer buf = new StringBuffer();
-            switch (opcode) {
-                case ADD:
-                    buf.append("inc");
-                    break;
-                case ADDcc:
-                    buf.append("inccc");
-                    break;
-                case SUB:
-                    buf.append("dec");
-                    break;
-                case SUBcc:
-                    buf.append("deccc");
-                    break;
-                default:
-                    return super.getDescription();
-            }
-            buf.append(spaces);
-            if (value != 1) {
-                buf.append(getOperand2String()); buf.append(comma);
-            }
-            buf.append(rd.toString());
-            return buf.toString();
-        } else if (rd == SPARCRegisters.G0 && opcode == SUBcc) {
-            StringBuffer buf = new StringBuffer();
-            buf.append("cmp");
-            buf.append(spaces);
-            buf.append(rs1.toString());
-            buf.append(comma);
-            buf.append(getOperand2String());
-            return buf.toString();
-        } else if (rs1 == SPARCRegisters.G0 && opcode == SUB && operand2.isRegister()) {
-            StringBuffer buf = new StringBuffer();
-            buf.append("neg");
-            buf.append(spaces);
-            buf.append(operand2.toString());
-            if (operand2 != rd) {
-                buf.append(comma);
-                buf.append(rd.toString());
-            }
-            return buf.toString();
-        }
-
-        return super.getDescription();
-    }
-
-    public Operand getArithmeticDestination() {
-        return getDestinationRegister();
-    }
-
-    public Operand[] getArithmeticSources() {
-        return (new Operand[] { rs1, operand2 });
-    }
-
-    public int getOperation() {
-        return operation;
-    }
-
-    public boolean isArithmetic() {
-        return true;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCAtomicLoadStoreInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCAtomicLoadStoreInstruction.java
deleted file mode 100644
index 320d79a1495..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCAtomicLoadStoreInstruction.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public abstract class SPARCAtomicLoadStoreInstruction extends SPARCInstruction
-                        implements LoadInstruction, StoreInstruction {
-    final protected SPARCRegisterIndirectAddress addr;
-    final protected SPARCRegister rd;
-    final protected Register[] regs = new Register[1];
-    final protected String description;
-
-    public SPARCAtomicLoadStoreInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rd) {
-        super(name);
-        this.addr = addr;
-        this.rd = rd;
-        regs[0] = rd;
-        description = initDescription();
-    }
-
-    private String initDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(addr.toString());
-        buf.append(comma);
-        buf.append(rd.toString());
-        return buf.toString();
-    }
-
-    public Address getLoadSource() {
-        return addr;
-    }
-
-    public Address getStoreDestination() {
-        return addr;
-    }
-
-    public Register[] getLoadDestinations() {
-        return regs;
-    }
-
-    public Register[] getStoreSources() {
-        return regs;
-    }
-
-    public boolean isLoad() {
-        return true;
-    }
-
-    public boolean isStore() {
-        return true;
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return description;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCBranchInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCBranchInstruction.java
deleted file mode 100644
index aef30427325..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCBranchInstruction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCBranchInstruction extends SPARCInstruction
-    implements BranchInstruction {
-    final protected PCRelativeAddress addr;
-    final protected int conditionCode;
-    final protected boolean isAnnuled;
-
-    public SPARCBranchInstruction(String name, PCRelativeAddress addr, boolean isAnnuled, int conditionCode) {
-        super(name);
-        this.addr = addr;
-        this.conditionCode = conditionCode;
-        this.isAnnuled = isAnnuled;
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        long address = addr.getDisplacement() + currentPc;
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(symFinder.getSymbolFor(address));
-        return buf.toString();
-    }
-
-    public Address getBranchDestination() {
-        return addr;
-    }
-
-    public int getConditionCode() {
-        return conditionCode;
-    }
-
-    public boolean isAnnuledBranch() {
-        return isAnnuled;
-    }
-
-    public boolean isBranch() {
-        return true;
-    }
-
-    public boolean isConditional() {
-        return conditionCode != CONDITION_BN && conditionCode != CONDITION_BA;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCCallInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCCallInstruction.java
deleted file mode 100644
index ca26f51a36c..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCCallInstruction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCCallInstruction extends SPARCInstruction
-    implements CallInstruction {
-    final private PCRelativeAddress addr;
-
-    public SPARCCallInstruction(PCRelativeAddress addr) {
-        super("call");
-        this.addr = addr;
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        long address = addr.getDisplacement() + currentPc;
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(symFinder.getSymbolFor(address));
-        return buf.toString();
-    }
-
-    public Address getBranchDestination() {
-        return addr;
-    }
-
-    public boolean isCall() {
-        return true;
-    }
-
-    public boolean isConditional() {
-        return false;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCDisassembler.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCDisassembler.java
deleted file mode 100644
index 1fb8cbfefeb..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCDisassembler.java
+++ /dev/null
@@ -1,144 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import java.io.*;
-import java.util.*;
-
-public abstract class SPARCDisassembler extends Disassembler
-                    implements /* imports */ SPARCOpcodes, RTLDataTypes, RTLOperations {
-
-    // instruction cache - Map<Integer, Instruction>.
-    protected static Map instructionCache = new HashMap();
-    protected final SPARCInstructionFactory factory;
-
-    public SPARCDisassembler(long startPc, byte[] code, SPARCInstructionFactory factory) {
-        super(startPc, code);
-        this.factory = factory;
-    }
-
-    protected static InstructionDecoder illegalDecoder = new IllegalInstructionDecoder();
-    protected static InstructionDecoder callDecoder = new CallDecoder();
-
-    // direct call instruction
-    protected Instruction decodeFormat1Instruction(int instruction) {
-        return callDecoder.decode(instruction, factory);
-    }
-
-    protected abstract InstructionDecoder getFormat2Decoder(int op2);
-
-    protected Instruction decodeFormat2Instruction(int instruction) {
-        int op2 = (instruction & OP_2_MASK) >>> OP_2_START_BIT;
-        InstructionDecoder decoder = getFormat2Decoder(op2);
-        return decoder.decode(instruction, factory);
-    }
-
-    // "op3" - used in format 3 & 3A instructions - 6 bits width
-
-    protected static int getOp3(int instruction) {
-        return (instruction & OP_3_MASK) >>> OP_3_START_BIT;
-    }
-
-    // op3 opcodes is broken up into column and row. MSB 2 bits form column.
-    // LSB 4 bits form row number.
-
-    protected static int getOp3Row(int op3) {
-        return op3 & 0xF;
-    }
-
-    protected static int getOp3Column(int op3) {
-        return (op3 >>> 4) & 0x3;
-    }
-
-    protected abstract InstructionDecoder getFormat3Decoder(int row, int column);
-
-    // memory instructions
-    protected Instruction decodeFormat3Instruction(int instruction) {
-        int op3 = getOp3(instruction);
-        int row = getOp3Row(op3);
-        int column = getOp3Column(op3);
-        return getFormat3Decoder(row, column).decode(instruction, factory);
-    }
-
-    protected abstract InstructionDecoder getFormat3ADecoder(int row, int column);
-
-    // arithmetic, logic, shift and the rest
-    protected Instruction decodeFormat3AInstruction(int instruction) {
-        int op3 = getOp3(instruction);
-        int row = getOp3Row(op3);
-        int column = getOp3Column(op3);
-        return getFormat3ADecoder(row, column).decode(instruction, factory);
-    }
-
-    public void decode(InstructionVisitor visitor) {
-        visitor.prologue();
-        try {
-            DataInputStream dis = new DataInputStream(new ByteArrayInputStream(code));
-            int instruction = -1;
-            int format = -1;
-            Instruction instr = null;
-            int len = 0;
-
-            while (len < code.length) {
-                instr = null;
-                instruction =  dis.readInt();
-                // check whether we have this in cache.
-                instr = (Instruction) instructionCache.get(new Integer(instruction));
-                if (instr == null) {
-                    format = (instruction & FORMAT_MASK) >>> FORMAT_START_BIT;
-
-                    switch (format) {
-                        case FORMAT_2:  // 0
-                            instr = decodeFormat2Instruction(instruction);
-                            break;
-
-                        case FORMAT_1:  // 1
-                            instr = decodeFormat1Instruction(instruction);
-                            break;
-
-                        case FORMAT_3A: // 2
-                            instr = decodeFormat3AInstruction(instruction);
-                            break;
-
-                        case FORMAT_3:  // 3
-                            instr = decodeFormat3Instruction(instruction);
-                            break;
-                    }
-
-                    // add the new instruction to cache.
-                    instructionCache.put(new Integer(instruction), instr);
-                }
-
-                visitor.visit(startPc + len, instr);
-                len += 4;
-            }
-        } catch (IOException ioExp) {
-            // ignore, can't happen
-        } finally {
-            visitor.epilogue();
-        }
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFP2RegisterInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFP2RegisterInstruction.java
deleted file mode 100644
index bf40446856e..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFP2RegisterInstruction.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCFP2RegisterInstruction extends SPARCInstruction {
-    final SPARCFloatRegister rs;
-    final SPARCFloatRegister rd;
-    final int opf;
-
-    public SPARCFP2RegisterInstruction(String name, int opf, SPARCFloatRegister rs, SPARCFloatRegister rd) {
-        super(name);
-        this.rs = rs;
-        this.rd = rd;
-        this.opf = opf;
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return getDescription();
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(rs.toString());
-        buf.append(comma);
-        buf.append(rd.toString());
-
-        return buf.toString();
-    }
-
-    public boolean isFloat() {
-        return true;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFPArithmeticInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFPArithmeticInstruction.java
deleted file mode 100644
index cedf49afd1a..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFPArithmeticInstruction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCFPArithmeticInstruction extends SPARCFormat3AInstruction
-                    implements ArithmeticInstruction {
-    final private SPARCRegister rs2;
-    final private int rtlOperation;
-
-    public SPARCFPArithmeticInstruction(String name, int opcode, int rtlOperation,
-                                 SPARCRegister rs1, SPARCRegister rs2,
-                                 SPARCRegister rd) {
-        super(name, opcode, rs1, rs2, rd);
-        this.rs2 = rs2;
-        this.rtlOperation = rtlOperation;
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(rs1.toString());
-        buf.append(comma);
-        buf.append(rs2.toString());
-        buf.append(comma);
-        buf.append(rd.toString());
-        return buf.toString();
-    }
-
-    public int getOperation() {
-        return rtlOperation;
-    }
-
-    public Operand[] getArithmeticSources() {
-        return new Operand[] { rs1, rs2 };
-    }
-
-    public Operand getArithmeticDestination() {
-        return rd;
-    }
-
-    public boolean isFloat() {
-        return true;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFloatRegister.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFloatRegister.java
deleted file mode 100644
index 7b7f0c9c4f4..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFloatRegister.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.Register;
-import sun.jvm.hotspot.utilities.Assert;
-
-public class SPARCFloatRegister extends SPARCRegister {
-
-    public SPARCFloatRegister(int number) {
-        super(number);
-    }
-
-    public int getNumber() {
-        return number;
-    }
-
-    public static final int SINGLE_PRECISION = 1;
-    public static final int DOUBLE_PRECISION = 2;
-    public static final int QUAD_PRECISION = 3;
-
-    public int getNumber(int width) {
-        switch (width) {
-        case SINGLE_PRECISION:
-            Assert.that(number < 32, "bad single-prec fp register");
-            return number;
-
-        case DOUBLE_PRECISION:
-            Assert.that(number < 64 && (number & 1) == 0, "bad double-prec fp register");
-            return number & 0x1e | (number & 0x20) >> 5;
-
-        case QUAD_PRECISION:
-            Assert.that(number < 64 && (number & 3) == 0, "bad quad-prec fp register");
-            return number & 0x1c | (number & 0x20) >> 5;
-        }
-        throw new RuntimeException("Invalid floating point width supplied");
-    }
-
-    private static final int nofRegisters = 63;
-    public int getNumberOfRegisters() {
-        return nofRegisters;
-    }
-
-    public boolean isFloat() {
-        return true;
-    }
-
-    public boolean isFramePointer() {
-        return false;
-    }
-
-    public boolean isStackPointer() {
-        return false;
-    }
-
-    public boolean isV9Only() {
-        return number > 31;
-    }
-
-    public boolean isValid() {
-        return number >= 0 && number < nofRegisters;
-    }
-
-    public String toString() {
-        return SPARCFloatRegisters.getRegisterName(number);
-    }
-
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFloatRegisters.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFloatRegisters.java
deleted file mode 100644
index ab5a391824c..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFloatRegisters.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.utilities.Assert;
-
-public class SPARCFloatRegisters {
-    public static int getNumRegisters() {
-        return 64;
-    }
-
-    public static SPARCFloatRegister getRegister(int i) {
-        Assert.that(i >= 0 && i < 64, "float register number is invalid");
-        return registers[i];
-    }
-
-    public static String getRegisterName(int i) {
-        return "%f" + i;
-    }
-
-    public static final SPARCFloatRegister F0;
-    public static final SPARCFloatRegister F1;
-    public static final SPARCFloatRegister F2;
-    public static final SPARCFloatRegister F3;
-    public static final SPARCFloatRegister F4;
-    public static final SPARCFloatRegister F5;
-    public static final SPARCFloatRegister F6;
-    public static final SPARCFloatRegister F7;
-    public static final SPARCFloatRegister F8;
-    public static final SPARCFloatRegister F9;
-    public static final SPARCFloatRegister F10;
-    public static final SPARCFloatRegister F11;
-    public static final SPARCFloatRegister F12;
-    public static final SPARCFloatRegister F13;
-    public static final SPARCFloatRegister F14;
-    public static final SPARCFloatRegister F15;
-    public static final SPARCFloatRegister F16;
-    public static final SPARCFloatRegister F17;
-    public static final SPARCFloatRegister F18;
-    public static final SPARCFloatRegister F19;
-    public static final SPARCFloatRegister F20;
-    public static final SPARCFloatRegister F21;
-    public static final SPARCFloatRegister F22;
-    public static final SPARCFloatRegister F23;
-    public static final SPARCFloatRegister F24;
-    public static final SPARCFloatRegister F25;
-    public static final SPARCFloatRegister F26;
-    public static final SPARCFloatRegister F27;
-    public static final SPARCFloatRegister F28;
-    public static final SPARCFloatRegister F29;
-    public static final SPARCFloatRegister F30;
-    public static final SPARCFloatRegister F31;
-    public static final SPARCFloatRegister F32;
-    public static final SPARCFloatRegister F34;
-    public static final SPARCFloatRegister F36;
-    public static final SPARCFloatRegister F38;
-    public static final SPARCFloatRegister F40;
-    public static final SPARCFloatRegister F42;
-    public static final SPARCFloatRegister F44;
-    public static final SPARCFloatRegister F46;
-    public static final SPARCFloatRegister F48;
-    public static final SPARCFloatRegister F50;
-    public static final SPARCFloatRegister F52;
-    public static final SPARCFloatRegister F54;
-    public static final SPARCFloatRegister F56;
-    public static final SPARCFloatRegister F58;
-    public static final SPARCFloatRegister F60;
-    public static final SPARCFloatRegister F62;
-    public static final int NUM_REGISTERS = 64;
-    private static final SPARCFloatRegister registers[];
-
-    static {
-        F0 = new SPARCFloatRegister(0);
-        F1 = new SPARCFloatRegister(1);
-        F2 = new SPARCFloatRegister(2);
-        F3 = new SPARCFloatRegister(3);
-        F4 = new SPARCFloatRegister(4);
-        F5 = new SPARCFloatRegister(5);
-        F6 = new SPARCFloatRegister(6);
-        F7 = new SPARCFloatRegister(7);
-        F8 = new SPARCFloatRegister(8);
-        F9 = new SPARCFloatRegister(9);
-        F10 = new SPARCFloatRegister(10);
-        F11 = new SPARCFloatRegister(11);
-        F12 = new SPARCFloatRegister(12);
-        F13 = new SPARCFloatRegister(13);
-        F14 = new SPARCFloatRegister(14);
-        F15 = new SPARCFloatRegister(15);
-        F16 = new SPARCFloatRegister(16);
-        F17 = new SPARCFloatRegister(17);
-        F18 = new SPARCFloatRegister(18);
-        F19 = new SPARCFloatRegister(19);
-        F20 = new SPARCFloatRegister(20);
-        F21 = new SPARCFloatRegister(21);
-        F22 = new SPARCFloatRegister(22);
-        F23 = new SPARCFloatRegister(23);
-        F24 = new SPARCFloatRegister(24);
-        F25 = new SPARCFloatRegister(25);
-        F26 = new SPARCFloatRegister(26);
-        F27 = new SPARCFloatRegister(27);
-        F28 = new SPARCFloatRegister(28);
-        F29 = new SPARCFloatRegister(29);
-        F30 = new SPARCFloatRegister(30);
-        F31 = new SPARCFloatRegister(31);
-        F32 = new SPARCFloatRegister(32);
-        F34 = new SPARCFloatRegister(34);
-        F36 = new SPARCFloatRegister(36);
-        F38 = new SPARCFloatRegister(38);
-        F40 = new SPARCFloatRegister(40);
-        F42 = new SPARCFloatRegister(42);
-        F44 = new SPARCFloatRegister(44);
-        F46 = new SPARCFloatRegister(46);
-        F48 = new SPARCFloatRegister(48);
-        F50 = new SPARCFloatRegister(50);
-        F52 = new SPARCFloatRegister(52);
-        F54 = new SPARCFloatRegister(54);
-        F56 = new SPARCFloatRegister(56);
-        F58 = new SPARCFloatRegister(58);
-        F60 = new SPARCFloatRegister(60);
-        F62 = new SPARCFloatRegister(62);
-        registers = (new SPARCFloatRegister[] {
-            F0, F2, F3, F4, F5, F6, F7, F8, F9, F10,
-            F11, F12, F13, F14, F15, F16, F17, F18, F19, F20,
-            F21, F22, F23, F24, F25, F26, F27, F28, F29, F30,
-            F31, F32, null, F34, null, F36, null, F38, null, F40,
-            null, F42, null, F44, null, F46, null, F48, null, F50,
-            null, F52, null, F54, null, F56, null, F58, null, F60,
-            null, F62, null
-        });
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFlushInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFlushInstruction.java
deleted file mode 100644
index 107ecd64cb2..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFlushInstruction.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCFlushInstruction extends SPARCInstruction {
-    final protected SPARCRegisterIndirectAddress addr;
-    final String description;
-
-    public SPARCFlushInstruction(SPARCRegisterIndirectAddress addr) {
-        super("flush");
-        this.addr = addr;
-        description = initDescription();
-    }
-
-    private String initDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(addr.toString());
-        return buf.toString();
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return description;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFormat3AInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFormat3AInstruction.java
deleted file mode 100644
index 4348788e247..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFormat3AInstruction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public abstract class SPARCFormat3AInstruction extends SPARCInstruction {
-    final protected int opcode;
-    final protected SPARCRegister rs1;
-    final protected ImmediateOrRegister operand2;
-    final protected SPARCRegister rd;
-
-    public SPARCFormat3AInstruction(String name, int opcode, SPARCRegister rs1,
-                                    ImmediateOrRegister operand2, SPARCRegister rd) {
-        super(name);
-        this.opcode = opcode;
-        this.rs1 = rs1;
-        this.operand2 = operand2;
-        this.rd = rd;
-    }
-
-    protected String getOperand2String() {
-        StringBuffer buf = new StringBuffer();
-        if (operand2.isRegister()) {
-            buf.append(operand2.toString());
-        } else {
-            Number number = ((Immediate)operand2).getNumber();
-            buf.append("0x");
-            buf.append(Integer.toHexString(number.intValue()));
-        }
-        return buf.toString();
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(rs1.toString());
-        buf.append(comma);
-        buf.append(getOperand2String());
-        buf.append(comma);
-        buf.append(rd.toString());
-        return buf.toString();
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return getDescription();
-    }
-
-    public int getOpcode() {
-        return opcode;
-    }
-
-    public SPARCRegister getDestinationRegister() {
-        return rd;
-    }
-
-    public ImmediateOrRegister getOperand2() {
-        return operand2;
-    }
-
-    public SPARCRegister getSourceRegister1() {
-        return rs1;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCHelper.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCHelper.java
deleted file mode 100644
index 20af919309e..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCHelper.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCHelper implements CPUHelper {
-   public Disassembler createDisassembler(long startPc, byte[] code) {
-      return new SPARCV9Disassembler(startPc, code);
-   }
-
-   public Register getIntegerRegister(int num) {
-      return SPARCRegisters.getRegister(num);
-   }
-
-   public Register getFloatRegister(int num) {
-      return SPARCFloatRegisters.getRegister(num);
-   }
-
-   public Register getStackPointer() {
-      return SPARCRegisters.O7;
-   }
-
-   public Register getFramePointer() {
-      return SPARCRegisters.I7;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCIllegalInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCIllegalInstruction.java
deleted file mode 100644
index c5af3072a02..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCIllegalInstruction.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.SymbolFinder;
-
-public final class SPARCIllegalInstruction extends SPARCInstruction {
-    final private int instruction;
-    final private String description;
-
-    public SPARCIllegalInstruction(int instruction) {
-        super("illegal");
-        this.instruction = instruction;
-        description = "bad opcode - " + Integer.toHexString(instruction);
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return description;
-    }
-
-    public int getInstruction() {
-        return instruction;
-    }
-
-    public boolean isIllegal() {
-        return true;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCIndirectCallInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCIndirectCallInstruction.java
deleted file mode 100644
index 486eff02ad1..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCIndirectCallInstruction.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCIndirectCallInstruction extends SPARCJmplInstruction
-    implements CallInstruction {
-
-    public SPARCIndirectCallInstruction(SPARCRegisterIndirectAddress addr, SPARCRegister rd) {
-        super("call", addr, rd);
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        // remove '[' & ']' from jmp address
-        String addrStr = addr.toString();
-        buf.append(addrStr.substring(1, addrStr.length() - 1));
-        return buf.toString();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCInstructionFactory.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCInstructionFactory.java
deleted file mode 100644
index f2e3cb0d1a7..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCInstructionFactory.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public interface SPARCInstructionFactory {
-    public SPARCInstruction newCallInstruction(PCRelativeAddress addr);
-
-    public SPARCInstruction newNoopInstruction();
-
-    public SPARCInstruction newSethiInstruction(int imm22, SPARCRegister rd);
-
-    public SPARCInstruction newUnimpInstruction(int const22);
-
-    public SPARCInstruction newBranchInstruction(String name, PCRelativeAddress addr, boolean isAnnuled, int conditionCode);
-
-    public SPARCInstruction newSpecialLoadInstruction(String name, int specialReg, int cregNum,
-                                      SPARCRegisterIndirectAddress addr);
-
-    public SPARCInstruction newSpecialStoreInstruction(String name, int specialReg, int cregNum,
-                                      SPARCRegisterIndirectAddress addr);
-
-    public SPARCInstruction newLoadInstruction(String name, int opcode,
-                                  SPARCRegisterIndirectAddress addr, SPARCRegister rd,
-                                  int dataType);
-
-    public SPARCInstruction newStoreInstruction(String name, int opcode,
-                                  SPARCRegisterIndirectAddress addr, SPARCRegister rd,
-                                  int dataType);
-
-    public SPARCInstruction newStbarInstruction();
-
-    public SPARCInstruction newReadInstruction(int specialReg, int asrRegNum, SPARCRegister rd);
-
-    public SPARCInstruction newWriteInstruction(int specialReg, int asrRegNum, SPARCRegister rs1,
-                                             ImmediateOrRegister operand2);
-
-    public SPARCInstruction newIllegalInstruction(int instruction);
-
-    public SPARCInstruction newIndirectCallInstruction(SPARCRegisterIndirectAddress addr,
-                                  SPARCRegister rd);
-
-    public SPARCInstruction newReturnInstruction(SPARCRegisterIndirectAddress addr,
-                                  SPARCRegister rd, boolean isLeaf);
-
-    public SPARCInstruction newJmplInstruction(SPARCRegisterIndirectAddress addr,
-                                  SPARCRegister rd);
-
-    public SPARCInstruction newFP2RegisterInstruction(String name, int opf, SPARCFloatRegister rs, SPARCFloatRegister rd);
-
-    public SPARCInstruction newFPMoveInstruction(String name, int opf, SPARCFloatRegister rs, SPARCFloatRegister rd);
-
-    public SPARCInstruction newFPArithmeticInstruction(String name, int opf, int rtlOperation,
-                                                     SPARCFloatRegister rs1, SPARCFloatRegister rs2,
-                                                     SPARCFloatRegister rd);
-
-    public SPARCInstruction newFlushInstruction(SPARCRegisterIndirectAddress addr);
-
-    public SPARCInstruction newSaveInstruction(SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd);
-
-    public SPARCInstruction newRestoreInstruction(SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd);
-
-    public SPARCInstruction newTrapInstruction(String name, int conditionCode);
-
-    public SPARCInstruction newRettInstruction(SPARCRegisterIndirectAddress addr);
-
-    public SPARCInstruction newArithmeticInstruction(String name, int opcode, int rtlOperation,
-                                                     SPARCRegister rs1, ImmediateOrRegister operand2,
-                                                     SPARCRegister rd);
-
-    public SPARCInstruction newLogicInstruction(String name, int opcode, int rtlOperation,
-                                                SPARCRegister rs1, ImmediateOrRegister operand2,
-                                                SPARCRegister rd);
-
-    public SPARCInstruction newMoveInstruction(String name, int opcode,
-                                               ImmediateOrRegister operand2,
-                                               SPARCRegister rd);
-
-    public SPARCInstruction newShiftInstruction(String name, int opcode, int rtlOperation,
-                                                     SPARCRegister rs1, ImmediateOrRegister operand2,
-                                                     SPARCRegister rd);
-
-    public SPARCInstruction newCoprocessorInstruction(int instruction, int cpopcode, int opc,
-                                                     int rs1Num, int rs2Num, int rdNum);
-    public SPARCInstruction newSwapInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rd);
-    public SPARCInstruction newLdstubInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rd);
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCInstructionFactoryImpl.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCInstructionFactoryImpl.java
deleted file mode 100644
index 7c53ac6ce42..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCInstructionFactoryImpl.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCInstructionFactoryImpl implements SPARCInstructionFactory {
-    public SPARCInstruction newCallInstruction(PCRelativeAddress addr) {
-        return new SPARCCallInstruction(addr);
-    }
-
-    public SPARCInstruction newNoopInstruction() {
-        return new SPARCNoopInstruction();
-    }
-
-    public SPARCInstruction newSethiInstruction(int imm22, SPARCRegister rd) {
-        return new SPARCSethiInstruction(imm22, rd);
-    }
-
-    public SPARCInstruction newUnimpInstruction(int const22) {
-        return new SPARCUnimpInstruction(const22);
-    }
-
-    public SPARCInstruction newBranchInstruction(String name, PCRelativeAddress addr, boolean isAnnuled, int conditionCode) {
-        return new SPARCBranchInstruction(name, addr, isAnnuled, conditionCode);
-    }
-
-    public SPARCInstruction newSpecialLoadInstruction(String name, int specialReg, int cregNum,
-                                      SPARCRegisterIndirectAddress addr) {
-        return new SPARCSpecialLoadInstruction(name, specialReg, cregNum, addr);
-    }
-
-
-    public SPARCInstruction newSpecialStoreInstruction(String name, int specialReg, int cregNum,
-                                      SPARCRegisterIndirectAddress addr) {
-        return new SPARCSpecialStoreInstruction(name, specialReg, cregNum, addr);
-    }
-
-    public SPARCInstruction newLoadInstruction(String name, int opcode,
-                                  SPARCRegisterIndirectAddress addr, SPARCRegister rd,
-                                  int dataType) {
-        return new SPARCLoadInstruction(name, opcode, addr, rd, dataType);
-    }
-
-    public SPARCInstruction newStoreInstruction(String name, int opcode,
-                                  SPARCRegisterIndirectAddress addr, SPARCRegister rd,
-                                  int dataType) {
-        return new SPARCStoreInstruction(name, opcode, addr, rd, dataType);
-    }
-
-    public SPARCInstruction newStbarInstruction() {
-        return new SPARCStbarInstruction();
-    }
-
-    public SPARCInstruction newReadInstruction(int specialReg, int asrRegNum, SPARCRegister rd) {
-        return new SPARCReadInstruction(specialReg, asrRegNum, rd);
-    }
-
-    public SPARCInstruction newWriteInstruction(int specialReg, int asrRegNum, SPARCRegister rs1,
-                                             ImmediateOrRegister operand2) {
-        return new SPARCWriteInstruction(specialReg, asrRegNum, rs1,operand2);
-    }
-
-    public SPARCInstruction newIllegalInstruction(int instruction) {
-        return new SPARCIllegalInstruction(instruction);
-    }
-
-
-    public SPARCInstruction newIndirectCallInstruction(SPARCRegisterIndirectAddress addr,
-                                  SPARCRegister rd) {
-        return new SPARCIndirectCallInstruction(addr, rd);
-    }
-
-    public SPARCInstruction newReturnInstruction(SPARCRegisterIndirectAddress addr,
-                                  SPARCRegister rd, boolean isLeaf) {
-        return new SPARCReturnInstruction(addr, rd, isLeaf);
-    }
-
-    public SPARCInstruction newJmplInstruction(SPARCRegisterIndirectAddress addr,
-                                  SPARCRegister rd) {
-        return new SPARCJmplInstruction(addr, rd);
-    }
-
-    public SPARCInstruction newFPArithmeticInstruction(String name, int opf, int rtlOperation,
-                                  SPARCFloatRegister rs1, SPARCFloatRegister rs2,
-                                  SPARCFloatRegister rd) {
-        return new SPARCFPArithmeticInstruction(name, opf, rtlOperation, rs1, rs2, rd);
-    }
-
-    public SPARCInstruction newFPMoveInstruction(String name, int opf, SPARCFloatRegister rs, SPARCFloatRegister rd) {
-        return new SPARCFPMoveInstruction(name, opf, rs, rd);
-    }
-
-    public SPARCInstruction newFP2RegisterInstruction(String name, int opf, SPARCFloatRegister rs, SPARCFloatRegister rd) {
-        return new SPARCFP2RegisterInstruction(name, opf, rs, rd);
-    }
-
-    public SPARCInstruction newFlushInstruction(SPARCRegisterIndirectAddress addr) {
-        return new SPARCFlushInstruction(addr);
-    }
-
-    public SPARCInstruction newSaveInstruction(SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd) {
-        return new SPARCSaveInstruction(rs1, operand2, rd);
-    }
-
-    public SPARCInstruction newRestoreInstruction(SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd) {
-        return new SPARCRestoreInstruction(rs1, operand2, rd);
-    }
-
-    public SPARCInstruction newTrapInstruction(String name, int conditionCode) {
-        return new SPARCTrapInstruction(name, conditionCode);
-    }
-
-    public SPARCInstruction newRettInstruction(SPARCRegisterIndirectAddress addr) {
-        return new SPARCRettInstruction(addr);
-    }
-
-    public SPARCInstruction newArithmeticInstruction(String name, int opcode, int rtlOperation,
-                                                     SPARCRegister rs1, ImmediateOrRegister operand2,
-                                                     SPARCRegister rd) {
-        return new SPARCArithmeticInstruction(name, opcode, rtlOperation, rs1, operand2, rd);
-    }
-
-    public SPARCInstruction newLogicInstruction(String name, int opcode, int rtlOperation,
-                                                     SPARCRegister rs1, ImmediateOrRegister operand2,
-                                                     SPARCRegister rd) {
-        return new SPARCLogicInstruction(name, opcode, rtlOperation, rs1, operand2, rd);
-    }
-
-    public SPARCInstruction newMoveInstruction(String name, int opcode,
-                                               ImmediateOrRegister operand2,
-                                               SPARCRegister rd) {
-        return new SPARCMoveInstruction(name, opcode, operand2, rd);
-    }
-
-    public SPARCInstruction newShiftInstruction(String name, int opcode, int rtlOperation,
-                                                     SPARCRegister rs1, ImmediateOrRegister operand2,
-                                                     SPARCRegister rd) {
-        return new SPARCShiftInstruction(name, opcode, rtlOperation, rs1, operand2, rd);
-    }
-
-    public SPARCInstruction newCoprocessorInstruction(int instruction, int cpopcode, int opcode,
-                                                     int rs1Num, int rs2Num, int rd) {
-        return new SPARCIllegalInstruction(instruction);
-    }
-
-    public SPARCInstruction newSwapInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rd) {
-       return new SPARCSwapInstruction(name, addr, rd);
-    }
-
-    public SPARCInstruction newLdstubInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rd) {
-       return new SPARCLdstubInstruction(name, addr, rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCJmplInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCJmplInstruction.java
deleted file mode 100644
index 81dbb82d8aa..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCJmplInstruction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCJmplInstruction extends SPARCInstruction
-    implements BranchInstruction {
-    final protected SPARCRegisterIndirectAddress addr;
-    final protected SPARCRegister rd;
-
-    protected SPARCJmplInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rd) {
-        super(name);
-        this.addr = addr;
-        this.rd = rd;
-    }
-
-    public SPARCJmplInstruction(SPARCRegisterIndirectAddress addr, SPARCRegister rd) {
-        this("jmpl", addr, rd);
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        String addrStr = addr.toString();
-        // remove '[' & ']' from address
-        addrStr = addrStr.substring(1, addrStr.length() - 1);
-        if (rd == SPARCRegisters.G0) {
-            buf.append("jmp");
-            buf.append(spaces);
-            buf.append(addrStr);
-        } else {
-            buf.append(getName());
-            buf.append(spaces);
-            buf.append(addrStr);
-            buf.append(comma);
-            buf.append(rd.toString());
-        }
-
-        return buf.toString();
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return getDescription();
-    }
-
-    public Address getBranchDestination() {
-        return addr;
-    }
-
-    public SPARCRegister getReturnAddressRegister() {
-        return rd;
-    }
-
-    public boolean isAnnuledBranch() {
-        return false;
-    }
-
-    public boolean isBranch() {
-        return true;
-    }
-
-    public boolean isConditional() {
-        return false;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCLoadInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCLoadInstruction.java
deleted file mode 100644
index 6cb407bab25..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCLoadInstruction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCLoadInstruction extends SPARCMemoryInstruction
-    implements LoadInstruction {
-    final protected SPARCRegister register2; // used for double word load instructions
-    final protected Register[] loadDestinations;
-
-    public SPARCLoadInstruction(String name, int opcode, SPARCRegisterIndirectAddress address, SPARCRegister register, int dataType) {
-        super(name, opcode,address, register, dataType);
-        if (opcode == LDD || opcode == LDDA) {
-            int nextRegNum = (register.getNumber() + 1) % SPARCRegisters.NUM_REGISTERS;
-            register2 = SPARCRegisters.getRegister(nextRegNum);
-            loadDestinations = new Register[2];
-            loadDestinations[0] = register;
-            loadDestinations[1] = register2;
-        } else {
-            register2 = null;
-            loadDestinations = new Register[1];
-            loadDestinations[0] = register;
-        }
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(address.toString());
-        buf.append(comma);
-        buf.append(register.toString());
-        return buf.toString();
-    }
-
-    public Register[] getLoadDestinations() {
-        return loadDestinations;
-    }
-
-    public Address getLoadSource() {
-        return address;
-    }
-
-    public boolean isLoad() {
-        return true;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCLogicInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCLogicInstruction.java
deleted file mode 100644
index d6414a9850e..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCLogicInstruction.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCLogicInstruction extends SPARCFormat3AInstruction
-    implements LogicInstruction {
-    final private int operation;
-
-    public SPARCLogicInstruction(String name, int opcode, int operation, SPARCRegister rs1,
-                                 ImmediateOrRegister operand2, SPARCRegister rd) {
-        super(name, opcode, rs1, operand2, rd);
-        this.operation = operation;
-    }
-
-    protected String getDescription() {
-        SPARCRegister G0 = SPARCRegisters.G0;
-        if (opcode == ORcc && rd == G0 && rd == operand2) {
-            StringBuffer buf = new StringBuffer();
-            buf.append("tst");
-            buf.append(spaces);
-            buf.append(getOperand2String());
-            return buf.toString();
-        } else if (opcode == XNOR && G0 == operand2) {
-            StringBuffer buf = new StringBuffer();
-            buf.append("not");
-            buf.append(spaces);
-            buf.append(rs1.toString());
-            if (rs1 != rd) {
-                buf.append(comma);
-                buf.append(rd.toString());
-            }
-            return buf.toString();
-        } else if (opcode == ANDcc && rd == G0) {
-            StringBuffer buf = new StringBuffer();
-            buf.append("btst");
-            buf.append(spaces);
-            buf.append(getOperand2String());
-            buf.append(comma);
-            buf.append(rd.toString());
-            return buf.toString();
-        } else if (rs1 == rd) {
-            StringBuffer buf = new StringBuffer();
-            switch (opcode) {
-                case OR:
-                    buf.append("bset");
-                    break;
-                case ANDN:
-                    buf.append("bclr");
-                    break;
-                case XOR:
-                    buf.append("btog");
-                    break;
-                default:
-                    return super.getDescription();
-            }
-            buf.append(spaces);
-            buf.append(getOperand2String());
-            buf.append(comma);
-            buf.append(rd.toString());
-            return buf.toString();
-        } else {
-            return super.getDescription();
-        }
-    }
-
-    public Operand getLogicDestination() {
-        return getDestinationRegister();
-    }
-
-    public Operand[] getLogicSources() {
-        return (new Operand[] { rs1, operand2 });
-    }
-
-    public int getOperation() {
-        return operation;
-    }
-
-    public boolean isLogic() {
-        return true;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCMemoryInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCMemoryInstruction.java
deleted file mode 100644
index 4744c856d4f..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCMemoryInstruction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.MemoryInstruction;
-import sun.jvm.hotspot.asm.SymbolFinder;
-
-public abstract class SPARCMemoryInstruction extends SPARCInstruction
-    implements MemoryInstruction {
-    final protected SPARCRegisterIndirectAddress address;
-    final protected SPARCRegister register;
-    final protected int dataType;
-    final protected int opcode;
-
-    public SPARCMemoryInstruction(String name, int opcode, SPARCRegisterIndirectAddress address, SPARCRegister register, int dataType) {
-        super(name);
-        this.address = address;
-        this.register = register;
-        this.dataType = dataType;
-        this.opcode = opcode;
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(address.toString());
-        buf.append(comma);
-        buf.append(register.toString());
-        return buf.toString();
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return getDescription();
-    }
-
-    public int getDataType() {
-        return dataType;
-    }
-
-    public boolean isConditional() {
-        return false;
-    }
-
-    public int getOpcode() {
-        return opcode;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCMoveInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCMoveInstruction.java
deleted file mode 100644
index 8b7d3b7e485..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCMoveInstruction.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCMoveInstruction extends SPARCFormat3AInstruction
-    implements MoveInstruction, RTLOperations {
-
-    public SPARCMoveInstruction(String name, int opcode, ImmediateOrRegister operand2, SPARCRegister rd) {
-        super(name, opcode, null, operand2, rd);
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        if (operand2 == SPARCRegisters.G0) {
-            buf.append("clr");
-            buf.append(spaces);
-            buf.append(rd.toString());
-        } else {
-            buf.append("mov");
-            buf.append(spaces);
-            buf.append(getOperand2String());
-            buf.append(comma);
-            buf.append(rd.toString());
-        }
-
-        return buf.toString();
-    }
-
-    public Register getMoveDestination() {
-        return getDestinationRegister();
-    }
-
-    public ImmediateOrRegister getMoveSource() {
-        return operand2;
-    }
-
-    public boolean isConditional() {
-        return false;
-    }
-
-    public boolean isMove() {
-        return true;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCOpcodes.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCOpcodes.java
deleted file mode 100644
index 554d329fcea..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCOpcodes.java
+++ /dev/null
@@ -1,354 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-// Please refer to "The SPARC Architecture Manual - Version 8"
-
-public interface SPARCOpcodes {
-
-   // format type is coded in 2 bits - primary opcode - "op"
-   public static final int FORMAT_START_BIT = 30;
-   public static final int FORMAT_MASK = 3 << FORMAT_START_BIT;
-
-   // sparc instruction formats
-
-   // PC Relative CALL
-   public static final int FORMAT_1 = 1;
-
-   // Bicc, FBfcc, CBccc, SETHI
-   public static final int FORMAT_2 = 0;
-
-   // memory instructions
-   public static final int FORMAT_3 = 3;
-
-   // arithmetic, logical, shift and remaining
-   public static final int FORMAT_3A = 2;
-
-   // disp 30 - used in pc relative call
-   public static final int DISP_30_MASK = 0x3FFFFFFF;
-
-   // secondary opcode "op2" used in FORMAT_2 instructions - 3 bits.
-   public static final int OP_2_START_BIT = 22;
-   public static final int OP_2_MASK = 7 << OP_2_START_BIT;
-
-   // various "op2" masks
-   public static final int OP_2_UNIMP = 0;
-   public static final int OP_2_Bicc  = 2;
-   public static final int OP_2_SETHI = 4;
-   public static final int OP_2_FBfcc = 6;
-   public static final int OP_2_CBccc = 7;
-
-   // condition codes are encoded in 4 bits.
-   public static final int CONDITION_CODE_START_BIT = 25;
-   public static final int CONDITION_CODE_MASK = 0xF << CONDITION_CODE_START_BIT;
-
-   // branch condition codes
-   public static final int CONDITION_BN   = 0;
-   public static final int CONDITION_FBN  = CONDITION_BN;
-   public static final int CONDITION_CBN  = CONDITION_BN;
-   public static final int CONDITION_TN   = CONDITION_BN;
-
-   public static final int CONDITION_BE   = 1;
-   public static final int CONDITION_FBNE = CONDITION_BE;
-   public static final int CONDITION_CB123= CONDITION_BE;
-   public static final int CONDITION_TE   = CONDITION_BE;
-
-   public static final int CONDITION_BLE  = 2;
-   public static final int CONDITION_FBLG = CONDITION_BLE;
-   public static final int CONDITION_CB12 = CONDITION_BLE;
-   public static final int CONDITION_TLE  = CONDITION_BLE;
-
-   public static final int CONDITION_BL   = 3;
-   public static final int CONDITION_FBUL = CONDITION_BL;
-   public static final int CONDITION_CB13 = CONDITION_BL;
-   public static final int CONDITION_TL   = CONDITION_BL;
-
-   public static final int CONDITION_BLEU = 4;
-   public static final int CONDITION_FBL  = CONDITION_BLEU;
-   public static final int CONDITION_CB1  = CONDITION_BLEU;
-   public static final int CONDITION_TLEU = CONDITION_BLEU;
-
-   public static final int CONDITION_BCS  = 5;
-   public static final int CONDITION_FBUG = CONDITION_BCS;
-   public static final int CONDITION_CB23  = CONDITION_BCS;
-   public static final int CONDITION_TCS  = CONDITION_BCS;
-
-   public static final int CONDITION_BNEG = 6;
-   public static final int CONDITION_FBG  = CONDITION_BNEG;
-   public static final int CONDITION_CB2  = CONDITION_BNEG;
-   public static final int CONDITION_TNEG = CONDITION_BNEG;
-
-   public static final int CONDITION_BVS  = 7;
-   public static final int CONDITION_FBU  = CONDITION_BVS;
-   public static final int CONDITION_CB3  = CONDITION_BVS;
-   public static final int CONDITION_TVS  = CONDITION_BVS;
-
-   public static final int CONDITION_BA   = 8;
-   public static final int CONDITION_FBA  = CONDITION_BA;
-   public static final int CONDITION_CBA  = CONDITION_BA;
-   public static final int CONDITION_TA   = CONDITION_BA;
-
-   public static final int CONDITION_BNE  = 9;
-   public static final int CONDITION_FBE  = CONDITION_BNE;
-   public static final int CONDITION_CB0  = CONDITION_BNE;
-   public static final int CONDITION_TNE  = CONDITION_BNE;
-
-   public static final int CONDITION_BG   = 0xA;
-   public static final int CONDITION_FBUE = CONDITION_BG;
-   public static final int CONDITION_CB03 = CONDITION_BG;
-   public static final int CONDITION_TG   = CONDITION_BG;
-
-   public static final int CONDITION_BGE  = 0xB;
-   public static final int CONDITION_FBGE = CONDITION_BGE;
-   public static final int CONDITION_CB02 = CONDITION_BGE;
-   public static final int CONDITION_TGE  = CONDITION_BGE;
-
-   public static final int CONDITION_BGU  = 0xC;
-   public static final int CONDITION_FBUGE= CONDITION_BGU;
-   public static final int CONDITION_CB023= CONDITION_BGU;
-   public static final int CONDITION_TGU  = CONDITION_BGU;
-
-   public static final int CONDITION_BCC  = 0xD;
-   public static final int CONDITION_FBLE = CONDITION_BCC;
-   public static final int CONDITION_CB01 = CONDITION_BCC;
-   public static final int CONDITION_TCC  = CONDITION_BCC;
-
-   public static final int CONDITION_BPOS = 0xE;
-   public static final int CONDITION_FBULE= CONDITION_BPOS;
-   public static final int CONDITION_CB013= CONDITION_BPOS;
-   public static final int CONDITION_TPOS = CONDITION_BPOS;
-
-   public static final int CONDITION_BVC  = 0xF;
-   public static final int CONDITION_FBO  = CONDITION_BVC;
-   public static final int CONDITION_CB012= CONDITION_BVC;
-   public static final int CONDITION_TVC  = CONDITION_BVC;
-
-   // annul bit mask
-   public static final int ANNUL_MASK = 1 << 29;
-
-   // 22 bit displacement or immediate value - used in FORMAT_2 instructions.
-   public static final int DISP_22_MASK = 0x3FFFFF;
-   public static final int IMM_22_MASK  = DISP_22_MASK;
-
-   // second operand mask, called "i" bit
-   public static final int I_START_BIT = 13;
-   public static final int I_MASK = 1 << I_START_BIT;
-
-   // address space identifier - "asi" - 8 bits
-   public static final int ASI_START_BIT = 5;
-   public static final int ASI_MASK = 0xFF << ASI_START_BIT;
-
-   // signed immediate value 13 bits - "simm13"
-   public static final int SIMM_13_MASK = 0x1FFF;
-
-   // co-processor or floating point opcode field - "ocf/opf" - 9 bits
-   public static final int OPF_START_BIT = 5;
-   public static final int OPF_MASK = 0x1FF << OPF_START_BIT;
-   public static final int OPC_MASK = OPF_MASK;
-
-   // opcode part 3 - used in FORMAT_3 and FORMAT_3A instructions
-   // "op3" - 6 bits
-   public static final int OP_3_START_BIT = 19;
-   public static final int OP_3_MASK = 0x3F << OP_3_START_BIT;
-
-   // register masks
-   public static final int RD_START_BIT = 25;
-   public static final int RD_MASK  = 0x1F << RD_START_BIT; // "rd"
-   public static final int RS1_START_BIT = 14;
-   public static final int RS1_MASK = 0x1F << RS1_START_BIT; // "rs1"
-   public static final int RS2_MASK = 0x1F;       // "rs2"
-
-   // load/store instructions - op3 values - used with op=3 (FORMAT_3)
-   public static final int LD  = 0;
-   public static final int LDA = (1 << 4);
-   public static final int LDF = (2 << 4);
-   public static final int LDC = (3 << 4);
-
-   public static final int LDUB = 1;
-   public static final int LDUBA = (1 << 4) | 1;
-   public static final int LDFSR = (2 << 4) | 1;
-   public static final int LDCSR = (3 << 4) | 1;
-
-   public static final int LDUH  = 2;
-   public static final int LDUHA = (1 << 4) | 2;
-
-   public static final int LDD = 3;
-   public static final int LDDA = (1 << 4) | 3;
-   public static final int LDDF = (2 << 4) | 3;
-   public static final int LDDC = (3 << 4) | 3;
-
-   public static final int ST = 4;
-   public static final int STA = (1 << 4) | 4;
-   public static final int STF = (2 << 4) | 4;
-   public static final int STC = (3 << 4) | 4;
-
-   public static final int STB = 5;
-   public static final int STBA = (1 << 4) | 5;
-   public static final int STFSR = (2 << 4) | 5;
-   public static final int STCSR = (3 << 4) | 5;
-
-   public static final int STH = 6;
-   public static final int STHA = (1 << 4) | 6;
-   public static final int STDFQ = (2 << 4) | 6;
-   public static final int STDCQ = (3 << 4) | 6;
-
-   public static final int STD = 7;
-   public static final int STDA = (1 << 4) | 7;
-   public static final int STDF = (2 << 4) | 7;
-   public static final int STDC = (3 << 4) | 7;
-
-   public static final int LDSB = 9;
-   public static final int LDSBA = (1 << 4) | 9;
-
-   public static final int LDSH = 0xA;
-   public static final int LDSHA = (1 << 4) | 0xA;
-
-   public static final int LDSTUB = 0xD;
-   public static final int LDSTUBA = (1 << 4) | 0xD;
-
-   public static final int SWAP = 0xF;
-   public static final int SWAPA = (1 << 4) | 0xF;
-
-   // arithmetic, logic remaining - op3 with op=2 (FORMAT_3A)
-   public static final int ADD = 0;
-   public static final int ADDcc = (1 << 4);
-   public static final int TADDcc = (2 << 4);
-   public static final int WRASR  = (3 << 4);
-   public static final int WRY = WRASR;
-
-   public static final int AND = 1;
-   public static final int ANDcc = (1 << 4) | 1;
-   public static final int TSUBcc = (2 << 4) | 1;
-   public static final int WRPSR = (3 << 4) | 1;
-
-   public static final int OR = 2;
-   public static final int ORcc = (1 << 4) | 2;
-   public static final int TADDccTV = (2 << 4) | 2;
-   public static final int WRWIM = (3 << 4) | 2;
-
-   public static final int XOR = 3;
-   public static final int XORcc = (1 << 4) | 3;
-   public static final int TSUBccTV = (2 << 4) | 3;
-   public static final int WRTBR = (3 << 4) | 3;
-
-   public static final int SUB = 4;
-   public static final int SUBcc = (1 << 4) | 4;
-   public static final int MULScc = (2 << 4) | 4;
-   public static final int FPop1 = (3 << 4) | 4;
-
-   public static final int ANDN = 5;
-   public static final int ANDNcc = (1 << 4) | 5;
-   public static final int SLL = (2 << 4) | 5;
-   public static final int FPop2 = (3 << 4) | 5;
-
-   public static final int ORN = 6;
-   public static final int ORNcc = (1 << 4) | 6;
-   public static final int SRL = (2 << 4) | 6;
-   public static final int CPop1 = (3 << 4) | 6;
-
-   public static final int XNOR = 7;
-   public static final int XNORcc = (1 << 4) | 7;
-   public static final int SRA = (2 << 4) | 7;
-   public static final int CPop2 = (3 << 4) | 7;
-
-   public static final int ADDX = 8;
-   public static final int ADDXcc = (1 << 4) | 8;
-   public static final int RDASR = (2 << 4) | 8;
-   public static final int RDY = RDASR;
-   public static final int STBAR = RDASR;
-   public static final int JMPL = (3 << 4) | 8;
-
-   public static final int RDPSR = (2 << 4) | 9;
-   public static final int RETT = (3 << 4) | 9;
-
-   public static final int UMUL = 0xA;
-   public static final int UMULcc = (1 << 4) | 0xA;
-   public static final int RDWIM = (2 << 4) |  0xA;
-   public static final int Ticc  = (3 << 4) | 0xA;
-
-   public static final int SMUL = 0xB;
-   public static final int SMULcc = (1 << 4) | 0xB;
-   public static final int RDTBR = (2 << 4) | 0xB;
-   public static final int FLUSH = (3 << 4) | 0xB;
-
-   public static final int SUBX = 0xC;
-   public static final int SUBXcc = (1 << 4) | 0xC;
-   public static final int SAVE = (3 << 4) | 0xC;
-
-   public static final int RESTORE = (3 << 4) | 0xD;
-
-   public static final int UDIV = 0xE;
-   public static final int UDIVcc = (1 << 4) | 0xE;
-
-   public static final int SDIV = 0xF;
-   public static final int SDIVcc = (1 << 4) | 0xF;
-
-   // opf - 9 bits (op=2, op3=0x34=FPop1) - floating point arithmetic
-   public static final int FMOVs    = 0x01;
-   public static final int FNEGs    = 0x05;
-   public static final int FABSs    = 0x09;
-   public static final int FSQRTs   = 0x29;
-   public static final int FSQRTd   = 0x2A;
-   public static final int FSQRTq   = 0x2B;
-   public static final int FADDs    = 0x41;
-   public static final int FADDd    = 0x42;
-   public static final int FADDq    = 0x43;
-   public static final int FSUBs    = 0x45;
-   public static final int FSUBd    = 0x46;
-   public static final int FSUBq    = 0x47;
-   public static final int FMULs    = 0x49;
-   public static final int FMULd    = 0x4A;
-   public static final int FMULq    = 0x4B;
-   public static final int FDIVs    = 0x4D;
-   public static final int FDIVd    = 0x4E;
-   public static final int FDIVq    = 0x4F;
-   public static final int FsMULd   = 0x69;
-   public static final int FdMULq   = 0x6E;
-   public static final int FiTOs    = 0xC4;
-   public static final int FdTOs    = 0xC6;
-   public static final int FqTOs    = 0xC7;
-   public static final int FiTOd    = 0xC8;
-   public static final int FsTOd    = 0xC9;
-   public static final int FqTOd    = 0xCB;
-   public static final int FiTOq    = 0xCC;
-   public static final int FsTOq    = 0xCD;
-   public static final int FdTOq    = 0xCE;
-   public static final int FsTOi    = 0xD1;
-   public static final int FdTOi    = 0xD2;
-   public static final int FqTOi    = 0xD3;
-
-   // opf - 9 bits (op=2, op3=0x35=FPop2) - floating point comparisons
-   public static final int FCMPs    = 0x51;
-   public static final int FCMPd    = 0x52;
-   public static final int FCMPq    = 0x53;
-   public static final int FCMPEs   = 0x55;
-   public static final int FCMPEd   = 0x56;
-   public static final int FCMPEq   = 0x57;
-
-   // 5 bit shift count mask
-   public static final int SHIFT_COUNT_5_MASK = 0x1F;
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCReadInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCReadInstruction.java
deleted file mode 100644
index dc9d7b73f6c..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCReadInstruction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.SymbolFinder;
-import sun.jvm.hotspot.utilities.Assert;
-
-public class SPARCReadInstruction extends SPARCSpecialRegisterInstruction {
-    final private int specialReg;
-    final private int asrRegNum;
-    final private SPARCRegister rd;
-
-    public SPARCReadInstruction(int specialReg, int asrRegNum, SPARCRegister rd) {
-        super("rd");
-        this.specialReg = specialReg;
-        this.asrRegNum = asrRegNum;
-        this.rd = rd;
-    }
-
-    public int getSpecialRegister() {
-        return specialReg;
-    }
-
-    public int getAncillaryRegister() {
-        if (Assert.ASSERTS_ENABLED)
-            Assert.that(specialReg == ASR, "not an ancillary register");
-        return asrRegNum;
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        if(specialReg == ASR)
-            buf.append("%asr" + asrRegNum);
-        else
-            buf.append(getSpecialRegisterName(specialReg));
-        buf.append(comma);
-        buf.append(rd.toString());
-        return buf.toString();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCRegisterIndirectAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCRegisterIndirectAddress.java
deleted file mode 100644
index 66480c5a246..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCRegisterIndirectAddress.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.Address;
-import sun.jvm.hotspot.asm.BaseIndexScaleDispAddress;
-
-public class SPARCRegisterIndirectAddress extends BaseIndexScaleDispAddress {
-    protected int addressSpace = -1;
-
-    public SPARCRegisterIndirectAddress(SPARCRegister register, int offset) {
-        super(register, offset);
-    }
-
-    public SPARCRegisterIndirectAddress(SPARCRegister base, SPARCRegister index) {
-        super(base, index);
-    }
-
-    public int getAddressSpace() {
-        return addressSpace;
-    }
-
-    public void setAddressSpace(int addressSpace) {
-        this.addressSpace = addressSpace;
-    }
-
-    public String getAddressWithoutAsi() {
-        StringBuffer buf = new StringBuffer();
-        buf.append('[');
-        buf.append(getBase().toString());
-        sun.jvm.hotspot.asm.Register register = getIndex();
-        if (register != null) {
-            buf.append(" + ");
-            buf.append(register.toString());
-        } else {
-            long disp = getDisplacement();
-            if (disp < 0) {
-                buf.append(" - 0x");
-                disp = -disp;
-            } else {
-                buf.append(" + 0x");
-            }
-            buf.append(Long.toHexString(disp));
-        }
-        buf.append(']');
-        return buf.toString();
-    }
-
-    public String toString() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getAddressWithoutAsi());
-        if(addressSpace != -1)
-            buf.append((new Integer(addressSpace)).toString());
-        return buf.toString();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCRestoreInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCRestoreInstruction.java
deleted file mode 100644
index 270e2393781..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCRestoreInstruction.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCRestoreInstruction extends SPARCFormat3AInstruction {
-    final private boolean trivial;
-    public SPARCRestoreInstruction(SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd) {
-        super("restore", RESTORE, rs1, operand2, rd);
-        SPARCRegister G0 = SPARCRegisters.G0;
-        trivial = (rs1 == G0 && operand2 == G0 && rd == G0);
-    }
-
-    public boolean isTrivial() {
-        return trivial;
-    }
-
-    protected String getDescription() {
-        return (trivial) ? getName() : super.getDescription();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCRettInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCRettInstruction.java
deleted file mode 100644
index 1e5956b5e88..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCRettInstruction.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCRettInstruction extends SPARCInstruction
-    implements BranchInstruction {
-    final protected SPARCRegisterIndirectAddress addr;
-    final protected String description;
-
-    protected SPARCRettInstruction(String name, SPARCRegisterIndirectAddress addr) {
-        super(name);
-        this.addr = addr;
-        description = initDescription();
-    }
-
-    public SPARCRettInstruction(SPARCRegisterIndirectAddress addr) {
-        this("rett", addr);
-    }
-
-    private String initDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(addr.toString());
-        return buf.toString();
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return description;
-    }
-
-    public Address getBranchDestination() {
-        return addr;
-    }
-
-    public boolean isAnnuledBranch() {
-        return false;
-    }
-
-    public boolean isBranch() {
-        return true;
-    }
-
-    public boolean isConditional() {
-        return false;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSaveInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSaveInstruction.java
deleted file mode 100644
index 4e29e36ca15..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSaveInstruction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCSaveInstruction extends SPARCFormat3AInstruction {
-    final private boolean trivial;
-    public SPARCSaveInstruction(SPARCRegister rs1, ImmediateOrRegister operand2, SPARCRegister rd) {
-        super("save", SAVE, rs1, operand2, rd);
-        SPARCRegister G0 = SPARCRegisters.G0;
-        trivial = (rs1 == G0 && operand2 == G0 && rd == G0);
-    }
-
-    public boolean isTrivial() {
-        return trivial;
-    }
-
-    protected String getOperand2String() {
-        StringBuffer buf = new StringBuffer();
-        if (operand2.isRegister()) {
-            buf.append(operand2.toString());
-        } else {
-            Number number = ((Immediate)operand2).getNumber();
-            int value = number.intValue();
-            if (value < 0) {
-                buf.append("-0x");
-                value = -value;
-            } else {
-                buf.append("0x");
-            }
-
-            buf.append(Integer.toHexString(value));
-        }
-        return buf.toString();
-    }
-
-    protected String getDescription() {
-        return (trivial) ? getName() : super.getDescription();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSethiInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSethiInstruction.java
deleted file mode 100644
index 4faf2fc5093..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSethiInstruction.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCSethiInstruction extends SPARCInstruction
-    implements MoveInstruction {
-    final private SPARCRegister register;
-    final private ImmediateOrRegister value;
-    final private String description;
-
-    public SPARCSethiInstruction(int value, SPARCRegister register) {
-        super("sethi");
-        this.register = register;
-        value <<= 10;
-        this.value = new Immediate(new Integer(value));
-        description = initDescription(value);
-    }
-
-    private String initDescription(int val) {
-        if (val == 0 && register == SPARCRegisters.G0) {
-            return "nop";
-        } else {
-            StringBuffer buf = new StringBuffer();
-            buf.append(getName());
-            buf.append(spaces);
-            buf.append("%hi(0x");
-            buf.append(Integer.toHexString(val));
-            buf.append(')');
-            buf.append(comma);
-            buf.append(register.toString());
-            return buf.toString();
-        }
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return description;
-    }
-
-    public Register getMoveDestination() {
-        return register;
-    }
-
-    public ImmediateOrRegister getMoveSource() {
-        return value;
-    }
-
-    public boolean isConditional() {
-        return false;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCShiftInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCShiftInstruction.java
deleted file mode 100644
index 91955dbe554..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCShiftInstruction.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCShiftInstruction extends SPARCFormat3AInstruction
-    implements ShiftInstruction {
-    final private int operation;
-
-    public SPARCShiftInstruction(String name, int opcode, int operation, SPARCRegister rs1,
-                                 ImmediateOrRegister operand2, SPARCRegister rd) {
-        super(name, opcode, rs1, operand2, rd);
-        this.operation = operation;
-    }
-
-    public int getOperation() {
-        return operation;
-    }
-
-    public Operand getShiftDestination() {
-        return getDestinationRegister();
-    }
-
-    public Operand getShiftLength() {
-        return operand2;
-    }
-
-    public Operand getShiftSource() {
-        return rs1;
-    }
-
-    public boolean isShift() {
-        return true;
-    }
-
-    protected String getOperand2String() {
-        return operand2.toString();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSpecialLoadInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSpecialLoadInstruction.java
deleted file mode 100644
index 33472546705..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSpecialLoadInstruction.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import sun.jvm.hotspot.utilities.Assert;
-
-public class SPARCSpecialLoadInstruction
-                        extends SPARCSpecialRegisterInstruction
-                        implements /* imports */ SPARCSpecialRegisters {
-    final private int specialReg;
-    final private int cregNum;
-    final private SPARCRegisterIndirectAddress addr;
-
-    public SPARCSpecialLoadInstruction(String name, int specialReg, int cregNum,
-                                             SPARCRegisterIndirectAddress addr) {
-        super(name);
-        this.specialReg = specialReg;
-        this.cregNum = cregNum;
-        this.addr = addr;
-    }
-
-    public SPARCSpecialLoadInstruction(String name, int specialReg, SPARCRegisterIndirectAddress addr) {
-        this(name, specialReg, -1, addr);
-    }
-
-    public int getSpecialRegister() {
-        return specialReg;
-    }
-
-    public int getCoprocessorRegister() {
-        if (Assert.ASSERTS_ENABLED)
-            Assert.that(specialReg == CREG, "not a coprocesssor register");
-        return cregNum;
-    }
-
-    public Address getSource() {
-        return addr;
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(addr);
-        buf.append(comma);
-        if (specialReg == CREG) {
-           buf.append("creg" + cregNum);
-        } else {
-           buf.append(getSpecialRegisterName(specialReg));
-        }
-        return buf.toString();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSpecialRegisterInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSpecialRegisterInstruction.java
deleted file mode 100644
index 12190d87e12..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSpecialRegisterInstruction.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public abstract class SPARCSpecialRegisterInstruction
-                       extends SPARCInstruction
-                       implements /* import */ SPARCSpecialRegisters {
-    protected SPARCSpecialRegisterInstruction(String name) {
-        super(name);
-    }
-
-    protected abstract String getDescription();
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return getDescription();
-    }
-
-    protected static String[] specialRegNames = new String[] {
-       "%y",
-       "%psr",
-       "%wim",
-       "%tbr",
-       "%asr",
-       "%fsr",
-       "%csr",
-       "%fq",
-       "%cq"
-    };
-
-    protected static String getSpecialRegisterName(int index) {
-       return specialRegNames[index];
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSpecialRegisters.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSpecialRegisters.java
deleted file mode 100644
index 0df051eab75..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSpecialRegisters.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-public interface SPARCSpecialRegisters {
-    public static final int Y    = 0;
-    public static final int PSR  = 1;
-    public static final int WIM  = 2;
-    public static final int TBR  = 3;
-    public static final int ASR  = 4;
-    public static final int FSR  = 5;
-    public static final int CSR  = 6;
-    public static final int FQ   = 7;
-    public static final int CQ   = 8;
-    public static final int CREG = 9; // co-processor reg
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSpecialStoreInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSpecialStoreInstruction.java
deleted file mode 100644
index 3c453c2e76f..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSpecialStoreInstruction.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import sun.jvm.hotspot.utilities.Assert;
-
-public class SPARCSpecialStoreInstruction
-                        extends SPARCSpecialRegisterInstruction
-                        implements /* imports */ SPARCSpecialRegisters {
-    final private int specialReg;
-    final private int cregNum;
-    final private SPARCRegisterIndirectAddress addr;
-
-    public SPARCSpecialStoreInstruction(String name, int specialReg, int cregNum,
-                                             SPARCRegisterIndirectAddress addr) {
-        super(name);
-        this.specialReg = specialReg;
-        this.addr = addr;
-        this.cregNum = cregNum;
-    }
-
-    public SPARCSpecialStoreInstruction(String name, int specialReg,
-                                             SPARCRegisterIndirectAddress addr) {
-        this(name, specialReg, -1, addr);
-    }
-
-    public int getSpecialRegister() {
-        return specialReg;
-    }
-
-    public int getCoprocessorRegister() {
-        if (Assert.ASSERTS_ENABLED)
-            Assert.that(specialReg == CREG, "not a special register");
-        return cregNum;
-    }
-
-    public Address getDestination() {
-        return addr;
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer(getName());
-        buf.append(spaces);
-        if (specialReg == CREG) {
-            buf.append("creg" + cregNum);
-        } else {
-            buf.append(getSpecialRegisterName(specialReg));
-        }
-        buf.append(comma);
-        buf.append(addr.toString());
-        return buf.toString();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCStoreInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCStoreInstruction.java
deleted file mode 100644
index 1cefb5eba5d..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCStoreInstruction.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCStoreInstruction extends SPARCMemoryInstruction
-    implements StoreInstruction {
-    final protected SPARCRegister register2; // used by double word store instructions
-    final protected Register[] storeSources;
-
-    public SPARCStoreInstruction(String name, int opcode, SPARCRegisterIndirectAddress address, SPARCRegister register, int dataType) {
-        super(name, opcode, address, register, dataType);
-        if (opcode == STD || opcode == STDA) {
-            storeSources = new Register[2];
-            storeSources[0] = register;
-            int nextRegNum = (register.getNumber() + 1) % SPARCRegisters.NUM_REGISTERS;
-            register2 = SPARCRegisters.getRegister(nextRegNum);
-            storeSources[1] = register2;
-        } else {
-            storeSources = new Register[1];
-            storeSources[0] = register;
-            register2 = null;
-        }
-    }
-
-    private String defaultInitDescription(StringBuffer buf) {
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(register.toString());
-        buf.append(comma);
-        buf.append(address.toString());
-        return buf.toString();
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        if (register == SPARCRegisters.G0) {
-            switch (opcode) {
-                case ST:
-                    buf.append("clr");
-                    break;
-                case STH:
-                    buf.append("clrh");
-                    break;
-                case STB:
-                    buf.append("clrb");
-                    break;
-                default:
-                    return defaultInitDescription(buf);
-            }
-            buf.append(spaces);
-            buf.append(address.toString());
-            return buf.toString();
-        } else {
-            return defaultInitDescription(buf);
-        }
-    }
-
-    public int getDataType() {
-        return dataType;
-    }
-
-    public Address getStoreDestination() {
-        return address;
-    }
-
-    public Register[] getStoreSources() {
-        return storeSources;
-    }
-
-    public boolean isStore() {
-        return true;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCUnimpInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCUnimpInstruction.java
deleted file mode 100644
index 5648848a35f..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCUnimpInstruction.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCUnimpInstruction extends SPARCInstruction {
-    final private String description;
-    final private int const22;
-
-    protected SPARCUnimpInstruction(String name, int const22) {
-        super(name);
-        this.const22 = const22;
-        description = initDescription();
-    }
-
-    public SPARCUnimpInstruction(int const22) {
-        this("unimp", const22);
-    }
-
-    public int getConst22() {
-        return const22;
-    }
-
-    public boolean isIllegal() {
-        return true;
-    }
-
-    private String initDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append("0x");
-        buf.append(Integer.toHexString(const22));
-        return buf.toString();
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return description;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV8Disassembler.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV8Disassembler.java
deleted file mode 100644
index 813bba7c09c..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV8Disassembler.java
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import java.io.*;
-import java.util.*;
-
-// Please refer to "The SPARC Architecture Manual - Version 8"
-
-public class SPARCV8Disassembler extends SPARCDisassembler {
-
-    public SPARCV8Disassembler(long startPc, byte[] code, SPARCInstructionFactory factory) {
-        super(startPc, code, factory);
-    }
-
-    public SPARCV8Disassembler(long startPc, byte[] code) {
-        this(startPc, code, new SPARCInstructionFactoryImpl());
-    }
-
-    // decoders for format 2 instructions
-    private static InstructionDecoder format2Decoders[] = {
-        new UnimpDecoder(),
-        illegalDecoder,
-        new IntegerBranchDecoder(),
-        illegalDecoder,
-        new SethiDecoder(),
-        illegalDecoder,
-        new FloatBranchDecoder(),
-        new CoprocessorBranchDecoder()
-    };
-
-    protected InstructionDecoder getFormat2Decoder(int op2) {
-        return format2Decoders[op2];
-    }
-
-    // op3 decoder table for op=3 (FORMAT_3) instructions - (memory instructions)
-    // Appendix F - Opcodes and Condition Codes - Page 229 - Table F-4
-
-    private static final InstructionDecoder format3Decoders[][] = {
-        {
-          new LoadDecoder(LD, "ld", RTLDT_UNSIGNED_WORD), new AlternateSpaceLoadDecoder(LDA, "lda", RTLDT_UNSIGNED_WORD),
-          new LoadDecoder(LDF,"ld", RTLDT_FL_SINGLE),     new SpecialLoadDecoder(LDC,"ld", SPARCSpecialRegisters.CREG)
-        },
-        {
-          new LoadDecoder(LDUB, "ldub", RTLDT_UNSIGNED_BYTE),   new AlternateSpaceLoadDecoder(LDUBA, "lduba", RTLDT_UNSIGNED_BYTE),
-          new SpecialLoadDecoder(LDFSR, "ld", SPARCSpecialRegisters.FSR), new SpecialLoadDecoder(LDCSR, "ld", SPARCSpecialRegisters.CSR)
-        },
-        {
-          new LoadDecoder(LDUH, "lduh", RTLDT_UNSIGNED_HALF),  new AlternateSpaceLoadDecoder(LDUHA, "lduha", RTLDT_UNSIGNED_HALF),
-          illegalDecoder, illegalDecoder
-        },
-        {
-          new LoadDecoder(LDD, "ldd", RTLDT_UNSIGNED_DWORD), new AlternateSpaceLoadDecoder(LDDA, "ldda", RTLDT_UNSIGNED_DWORD),
-          new LoadDecoder(LDDF, "ldd", RTLDT_FL_DOUBLE),  new SpecialLoadDecoder(LDDC, "ldd", SPARCSpecialRegisters.CREG)
-        },
-        {
-          new StoreDecoder(ST, "st", RTLDT_UNSIGNED_WORD), new AlternateSpaceStoreDecoder(STA, "sta", RTLDT_UNSIGNED_WORD),
-          new StoreDecoder(STF, "st", RTLDT_FL_SINGLE),   new SpecialStoreDecoder(STC, "st", SPARCSpecialRegisters.CREG)
-        },
-        {
-          new StoreDecoder(STB, "stb", RTLDT_UNSIGNED_BYTE), new AlternateSpaceStoreDecoder(STBA, "stba", RTLDT_UNSIGNED_BYTE),
-          new SpecialStoreDecoder(STFSR, "st", SPARCSpecialRegisters.FSR), new SpecialStoreDecoder(STCSR, "st", SPARCSpecialRegisters.CSR),
-        },
-        {
-          new StoreDecoder(STH, "sth", RTLDT_UNSIGNED_HALF), new AlternateSpaceStoreDecoder(STHA, "stha", RTLDT_UNSIGNED_HALF),
-          new SpecialStoreDecoder(STDFQ, "std", SPARCSpecialRegisters.FQ), new SpecialStoreDecoder(STDCQ, "std", SPARCSpecialRegisters.CQ),
-        },
-        {
-          new StoreDecoder(STD, "std", RTLDT_UNSIGNED_DWORD),  new AlternateSpaceStoreDecoder(STDA, "stda", RTLDT_UNSIGNED_DWORD),
-          new StoreDecoder(STDF, "std", RTLDT_FL_DOUBLE),  new SpecialStoreDecoder(STDC, "std", SPARCSpecialRegisters.CREG)
-        },
-        {
-          illegalDecoder, illegalDecoder,
-          illegalDecoder, illegalDecoder
-        },
-        {
-          new LoadDecoder(LDSB, "ldsb", RTLDT_SIGNED_BYTE), new AlternateSpaceLoadDecoder(LDSBA, "ldsba", RTLDT_UNSIGNED_BYTE),
-          illegalDecoder, illegalDecoder
-        },
-        {
-          new LoadDecoder(LDSH, "ldsh", RTLDT_SIGNED_HALF), new AlternateSpaceLoadDecoder(LDSHA, "ldsha", RTLDT_UNSIGNED_HALF),
-          illegalDecoder, illegalDecoder
-        },
-        {
-          illegalDecoder, illegalDecoder,
-          illegalDecoder, illegalDecoder
-        },
-        {
-          illegalDecoder, illegalDecoder,
-          illegalDecoder, illegalDecoder
-        },
-        {
-          new LdstubDecoder(LDSTUB, "ldstub", RTLDT_UNSIGNED_BYTE), new AlternateSpaceLdstubDecoder(LDSTUBA, "ldstuba", RTLDT_UNSIGNED_BYTE),
-          illegalDecoder, illegalDecoder
-        },
-        {
-          illegalDecoder, illegalDecoder,
-          illegalDecoder, illegalDecoder
-        },
-        {
-          new SwapDecoder(SWAP, "swap", RTLDT_UNSIGNED_WORD), new AlternateSpaceSwapDecoder(SWAPA, "swapa", RTLDT_UNSIGNED_WORD),
-          illegalDecoder, illegalDecoder
-        },
-    };
-
-    protected InstructionDecoder getFormat3Decoder(int row, int column) {
-        return format3Decoders[row][column];
-    }
-
-    // op3 decoder table for op=2 (FORMAT_3A) instructions
-    // Appendix F - Opcodes and Condition Codes - Page 228 - Table F-3
-    protected static final InstructionDecoder format3ADecoders[][] = {
-        {
-          new ArithmeticDecoder(ADD, "add", RTLOP_ADD), new ArithmeticDecoder(ADDcc, "addcc", RTLOP_ADD),
-          new ArithmeticDecoder(TADDcc, "taddcc", RTLOP_ADD),  new WriteDecoder(SPARCSpecialRegisters.ASR)
-        },
-        {
-          new LogicDecoder(AND, "and", RTLOP_AND), new LogicDecoder(ANDcc, "andcc", RTLOP_AND),
-          new ArithmeticDecoder(TSUBcc, "tsubcc", RTLOP_ADD),  new WriteDecoder(SPARCSpecialRegisters.PSR)
-        },
-        {
-          new LogicDecoder(OR, "or", RTLOP_OR), new LogicDecoder(ORcc, "orcc", RTLOP_OR),
-          new ArithmeticDecoder(TADDccTV, "taddcctv", RTLOP_ADD),  new WriteDecoder(SPARCSpecialRegisters.WIM)
-        },
-        {
-          new LogicDecoder(XOR, "xor", RTLOP_XOR), new LogicDecoder(XORcc, "xorcc", RTLOP_XOR),
-          new ArithmeticDecoder(TSUBccTV, "tsubcctv", RTLOP_SUB),  new WriteDecoder(SPARCSpecialRegisters.TBR)
-        },
-        {
-          new ArithmeticDecoder(SUB, "sub", RTLOP_SUB),  new ArithmeticDecoder(SUBcc, "subcc", RTLOP_SUB),
-          new ArithmeticDecoder(MULScc, "mulscc", RTLOP_SMUL), new V8FPop1Decoder()
-        },
-        {
-          new LogicDecoder(ANDN, "andn", RTLOP_NAND), new LogicDecoder(ANDNcc, "andncc", RTLOP_NAND),
-          new ShiftDecoder(SLL, "sll", RTLOP_SLL), new V8FPop2Decoder()
-        },
-        {
-          new LogicDecoder(ORN, "orn", RTLOP_NOR), new LogicDecoder(ORNcc, "orncc", RTLOP_NOR),
-          new ShiftDecoder(SRL, "srl", RTLOP_SRL), new CoprocessorDecoder(CPop1)
-        },
-        {
-          new LogicDecoder(XNOR, "xnor", RTLOP_XNOR), new LogicDecoder(XNORcc, "xnorcc", RTLOP_XNOR),
-          new ShiftDecoder(SRA, "sra", RTLOP_SRA), new CoprocessorDecoder(CPop2)
-        },
-        {
-          new ArithmeticDecoder(ADDX, "addx", RTLOP_ADDC), new ArithmeticDecoder(ADDXcc, "addxcc", RTLOP_ADDC),
-          new ReadDecoder(SPARCSpecialRegisters.ASR), new JmplDecoder()
-        },
-        {
-          illegalDecoder, illegalDecoder,
-          new ReadDecoder(SPARCSpecialRegisters.PSR), new RettDecoder()
-        },
-        {
-          new ArithmeticDecoder(UMUL, "umul", RTLOP_UMUL), new ArithmeticDecoder(UMULcc, "umulcc", RTLOP_UMUL),
-          new ReadDecoder(SPARCSpecialRegisters.WIM), new TrapDecoder()
-        },
-        {
-          new ArithmeticDecoder(SMUL, "smul", RTLOP_SMUL), new ArithmeticDecoder(SMULcc, "smulcc", RTLOP_SMUL),
-          new ReadDecoder(SPARCSpecialRegisters.TBR), new FlushDecoder()
-        },
-        {
-          new ArithmeticDecoder(SUBX, "subx", RTLOP_SUBC), new ArithmeticDecoder(SUBXcc, "subxcc", RTLOP_SUBC),
-          illegalDecoder, new SaveDecoder()
-        },
-        {
-          illegalDecoder, illegalDecoder,
-          illegalDecoder, new RestoreDecoder()
-        },
-        {
-          new ArithmeticDecoder(UDIV, "udiv", RTLOP_UDIV),  new ArithmeticDecoder(UDIVcc, "udivcc", RTLOP_UDIV),
-          illegalDecoder, illegalDecoder
-        },
-        {
-          new ArithmeticDecoder(SDIV, "sdiv", RTLOP_SDIV), new ArithmeticDecoder(SDIVcc, "sdivcc", RTLOP_SDIV),
-          illegalDecoder, illegalDecoder
-        }
-    };
-
-    protected InstructionDecoder getFormat3ADecoder(int row, int column) {
-        return format3ADecoders[row][column];
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9BranchInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9BranchInstruction.java
deleted file mode 100644
index 8bd0f9edc32..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9BranchInstruction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9BranchInstruction extends SPARCBranchInstruction
-                    implements SPARCV9Instruction {
-    final private boolean predictTaken;
-    final private int conditionFlag; // icc, xcc or fccn - condition bits selected
-
-    public SPARCV9BranchInstruction(String name, PCRelativeAddress addr,
-              boolean isAnnuled, int conditionCode, boolean predictTaken, int conditionFlag) {
-        super((name += (predictTaken)? ",pt" : ",pn"), addr, isAnnuled, conditionCode);
-        this.predictTaken = predictTaken;
-        this.conditionFlag = conditionFlag;
-    }
-
-    public boolean getPredictTaken() {
-        return predictTaken;
-    }
-
-    public String getConditionFlagName() {
-        return SPARCV9ConditionFlags.getFlagName(conditionFlag);
-    }
-
-    public int getConditionFlag() {
-        return conditionFlag;
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        long address = addr.getDisplacement() + currentPc;
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-
-        // add conditionFlag bit used.
-        buf.append(getConditionFlagName());
-        buf.append(comma);
-        buf.append(symFinder.getSymbolFor(address));
-        return buf.toString();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9CasInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9CasInstruction.java
deleted file mode 100644
index 9836cc32b10..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9CasInstruction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9CasInstruction extends SPARCAtomicLoadStoreInstruction
-                    implements SPARCV9Instruction {
-    final private SPARCRegister rs2;
-    final private int dataType;
-
-    public SPARCV9CasInstruction(String name, SPARCRegisterIndirectAddress addr,
-                      SPARCRegister rs2, SPARCRegister rd, int dataType) {
-        super(name, addr, rd);
-        this.rs2 = rs2;
-        this.dataType = dataType;
-    }
-
-    public int getDataType() {
-        return dataType;
-    }
-
-    public boolean isConditional() {
-        return true;
-    }
-
-    public SPARCRegister getComparisonRegister() {
-        return rs2;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9ConditionFlags.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9ConditionFlags.java
deleted file mode 100644
index 9d15704dbfb..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9ConditionFlags.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-class SPARCV9ConditionFlags {
-    private static final String ccFlagNames[] = {
-        "%fcc0", "%fcc1", "%fcc2", "%fcc3", "%icc", null, "%xcc", null
-    };
-
-    public static String getFlagName(int index) {
-        return ccFlagNames[index];
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9Disassembler.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9Disassembler.java
deleted file mode 100644
index 1bf675ddf02..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9Disassembler.java
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-// Please refer to "The SPARC Architecture Manual - Version 9"
-
-public class SPARCV9Disassembler extends SPARCDisassembler
-                    implements /* imports */ SPARCV9Opcodes {
-    public SPARCV9Disassembler(long startPc, byte[] code, SPARCV9InstructionFactory factory) {
-        super(startPc, code, factory);
-    }
-
-    public SPARCV9Disassembler(long startPc, byte[] code) {
-        this(startPc, code, new SPARCV9InstructionFactoryImpl());
-    }
-
-    // decoders for format 2 instructions
-    private static InstructionDecoder format2Decoders[] = {
-        new UnimpDecoder(),
-        new V9IntegerBranchDecoder(),
-        new IntegerBranchDecoder(),
-        new V9IntRegisterBranchDecoder(),
-        new SethiDecoder(),
-        new V9FloatBranchDecoder(),
-        new FloatBranchDecoder(),
-        illegalDecoder
-    };
-
-    protected InstructionDecoder getFormat2Decoder(int op2) {
-        return format2Decoders[op2];
-    }
-
-    // op3 opcode table for op=3 (FORMAT_3) instructions - (memory instructions)
-    // E.2 Tables - Page 275 - Table 33.
-    private static final InstructionDecoder format3Decoders[][] = {
-        {
-          new LoadDecoder(LDUW, "ld" /* lduw */, RTLDT_UNSIGNED_WORD), new V9AlternateSpaceLoadDecoder(LDUWA, "lduwa", RTLDT_UNSIGNED_WORD),
-          new LoadDecoder(LDF,"ld", RTLDT_FL_SINGLE),  new V9AlternateSpaceLoadDecoder(LDFA, "lda", RTLDT_FL_SINGLE)
-        },
-        {
-          new LoadDecoder(LDUB, "ldub", RTLDT_UNSIGNED_BYTE),   new V9AlternateSpaceLoadDecoder(LDUBA, "lduba", RTLDT_UNSIGNED_BYTE),
-          new V9SpecialLoadDecoder(LDFSR), illegalDecoder
-        },
-        {
-          new LoadDecoder(LDUH, "lduh", RTLDT_UNSIGNED_HALF),  new V9AlternateSpaceLoadDecoder(LDUHA, "lduha", RTLDT_UNSIGNED_HALF),
-          new LoadDecoder(LDQF, "ldq", RTLDT_FL_QUAD), new V9AlternateSpaceLoadDecoder(LDQFA, "ldqa", RTLDT_FL_QUAD)
-        },
-        {
-          new LoadDecoder(LDD, "ldd", RTLDT_UNSIGNED_DWORD), new V9AlternateSpaceLoadDecoder(LDDA, "ldda", RTLDT_UNSIGNED_DWORD),
-          new LoadDecoder(LDDF, "ldd", RTLDT_FL_DOUBLE), new LoadDecoder(LDDFA, "ldda", RTLDT_FL_DOUBLE)
-        },
-        {
-          new StoreDecoder(STW, "st" /* stw, stuw, stsw */, RTLDT_UNSIGNED_WORD), new V9AlternateSpaceStoreDecoder(STWA, "stwa", RTLDT_UNSIGNED_WORD),
-          new StoreDecoder(STF, "st", RTLDT_FL_SINGLE), new StoreDecoder(STFA, "st", RTLDT_FL_SINGLE),
-        },
-        {
-          new StoreDecoder(STB, "stb", RTLDT_UNSIGNED_BYTE), new V9AlternateSpaceStoreDecoder(STBA, "stba", RTLDT_UNSIGNED_BYTE),
-          new V9SpecialStoreDecoder(STFSR), illegalDecoder
-        },
-        {
-          new StoreDecoder(STH, "sth", RTLDT_UNSIGNED_HALF), new V9AlternateSpaceStoreDecoder(STHA, "stha", RTLDT_UNSIGNED_HALF),
-          new StoreDecoder(STQF, "stq", RTLDT_FL_QUAD), new V9AlternateSpaceStoreDecoder(STQFA, "stqa", RTLDT_FL_QUAD),
-        },
-        {
-          new StoreDecoder(STD, "std", RTLDT_UNSIGNED_DWORD), new V9AlternateSpaceStoreDecoder(STDA, "stda", RTLDT_UNSIGNED_DWORD),
-          new StoreDecoder(STDF, "std", RTLDT_FL_DOUBLE), new V9AlternateSpaceStoreDecoder(STDFA, "stda", RTLDT_FL_DOUBLE)
-        },
-        {
-          new LoadDecoder(LDSW, "ldsw", RTLDT_SIGNED_WORD), new V9AlternateSpaceLoadDecoder(LDSWA, "ldswa", RTLDT_SIGNED_WORD),
-          illegalDecoder, illegalDecoder
-        },
-        {
-          new LoadDecoder(LDSB, "ldsb", RTLDT_SIGNED_BYTE), new V9AlternateSpaceLoadDecoder(LDSBA, "ldsba", RTLDT_UNSIGNED_BYTE),
-          illegalDecoder, illegalDecoder
-        },
-        {
-          new LoadDecoder(LDSH, "ldsh", RTLDT_SIGNED_HALF), new V9AlternateSpaceLoadDecoder(LDSHA, "ldsha", RTLDT_UNSIGNED_HALF),
-          illegalDecoder, illegalDecoder
-        },
-        {
-          new LoadDecoder(LDX, "ldx", RTLDT_UNSIGNED_DWORD), new V9AlternateSpaceLoadDecoder(LDXA, "ldxa", RTLDT_UNSIGNED_DWORD),
-          illegalDecoder, illegalDecoder
-        },
-        {
-          illegalDecoder, illegalDecoder,
-          illegalDecoder, new V9CasDecoder(CASA, "casa", RTLDT_UNSIGNED_WORD)
-        },
-        {
-          new LdstubDecoder(LDSTUB, "ldstub", RTLDT_UNSIGNED_BYTE), new V9AlternateSpaceLdstubDecoder(LDSTUBA, "ldstuba", RTLDT_UNSIGNED_BYTE),
-          new V9PrefetchDecoder(), new V9AlternateSpacePrefetchDecoder()
-        },
-        {
-          new StoreDecoder(STX, "stx", RTLDT_UNSIGNED_DWORD), new V9AlternateSpaceStoreDecoder(STXA, "stxa", RTLDT_UNSIGNED_DWORD),
-          illegalDecoder, new V9CasDecoder(CASXA, "casxa", RTLDT_UNSIGNED_DWORD)
-        },
-        {
-          new SwapDecoder(SWAP, "swap", RTLDT_UNSIGNED_WORD), new V9AlternateSpaceSwapDecoder(SWAPA, "swapa", RTLDT_UNSIGNED_WORD),
-          illegalDecoder, illegalDecoder
-        },
-    };
-
-    protected InstructionDecoder getFormat3Decoder(int row, int column) {
-        return format3Decoders[row][column];
-    }
-
-    // op3 decoder table for op=2 (FORMAT_3A) instructions
-    // E Opcode Maps - Page 274 - Table 32
-
-    protected static final InstructionDecoder format3ADecoders[][] = {
-        {
-          new ArithmeticDecoder(ADD, "add", RTLOP_ADD), new ArithmeticDecoder(ADDcc, "addcc", RTLOP_ADD),
-          new ArithmeticDecoder(TADDcc, "taddcc", RTLOP_ADD),  new V9WriteDecoder()
-        },
-        {
-          new LogicDecoder(AND, "and", RTLOP_AND), new LogicDecoder(ANDcc, "andcc", RTLOP_AND),
-          new ArithmeticDecoder(TSUBcc, "tsubcc", RTLOP_ADD),  new V9SavedRestoredDecoder()
-        },
-        {
-          new LogicDecoder(OR, "or", RTLOP_OR), new LogicDecoder(ORcc, "orcc", RTLOP_OR),
-          new ArithmeticDecoder(TADDccTV, "taddcctv", RTLOP_ADD),  new V9WrprDecoder()
-        },
-        {
-          new LogicDecoder(XOR, "xor", RTLOP_XOR), new LogicDecoder(XORcc, "xorcc", RTLOP_XOR),
-          new ArithmeticDecoder(TSUBccTV, "tsubcctv", RTLOP_SUB), illegalDecoder
-        },
-        {
-          new ArithmeticDecoder(SUB, "sub", RTLOP_SUB),  new ArithmeticDecoder(SUBcc, "subcc", RTLOP_SUB),
-          new ArithmeticDecoder(MULScc, "mulscc", RTLOP_SMUL), new V9FPop1Decoder()
-        },
-        {
-          new LogicDecoder(ANDN, "andn", RTLOP_NAND), new LogicDecoder(ANDNcc, "andncc", RTLOP_NAND),
-          new V9ShiftDecoder(SLL, "sll", RTLOP_SLL), new V9FPop2Decoder()
-        },
-        {
-          new LogicDecoder(ORN, "orn", RTLOP_NOR), new LogicDecoder(ORNcc, "orncc", RTLOP_NOR),
-          new V9ShiftDecoder(SRL, "srl", RTLOP_SRL), new CoprocessorDecoder(IMPDEP1)
-        },
-        {
-          new LogicDecoder(XNOR, "xnor", RTLOP_XNOR), new LogicDecoder(XNORcc, "xnorcc", RTLOP_XNOR),
-          new V9ShiftDecoder(SRA, "sra", RTLOP_SRA), new CoprocessorDecoder(IMPDEP2)
-        },
-        {
-          new ArithmeticDecoder(ADDC, "addc", RTLOP_ADDC), new ArithmeticDecoder(ADDCcc, "addccc", RTLOP_ADDC),
-          new V9ReadDecoder(), new JmplDecoder()
-        },
-        {
-          new ArithmeticDecoder(MULX, "mulx", RTLOP_UMUL), illegalDecoder,
-          illegalDecoder, new RettDecoder()
-        },
-        {
-          new ArithmeticDecoder(UMUL, "umul", RTLOP_UMUL), new ArithmeticDecoder(UMULcc, "umulcc", RTLOP_UMUL),
-          new V9RdprDecoder(), new TrapDecoder()
-        },
-        {
-          new ArithmeticDecoder(SMUL, "smul", RTLOP_SMUL), new ArithmeticDecoder(SMULcc, "smulcc", RTLOP_SMUL),
-          new V9FlushwDecoder(), new FlushDecoder()
-        },
-        {
-          new ArithmeticDecoder(SUBC, "subc", RTLOP_SUBC), new ArithmeticDecoder(SUBCcc, "subccc", RTLOP_SUBC),
-          new V9MOVccDecoder(), new SaveDecoder()
-        },
-        {
-          new ArithmeticDecoder(UDIVX, "udivx", RTLOP_UDIV), illegalDecoder,
-          new ArithmeticDecoder(SDIVX, "sdivx", RTLOP_SDIV), new RestoreDecoder()
-        },
-        {
-          new ArithmeticDecoder(UDIV, "udiv", RTLOP_UDIV),  new ArithmeticDecoder(UDIVcc, "udivcc", RTLOP_UDIV),
-          new V9PopcDecoder(), new V9DoneRetryDecoder()
-        },
-        {
-          new ArithmeticDecoder(SDIV, "sdiv", RTLOP_SDIV), new ArithmeticDecoder(SDIVcc, "sdivcc", RTLOP_SDIV),
-          new V9MOVrDecoder(), illegalDecoder
-        }
-    };
-
-    protected InstructionDecoder getFormat3ADecoder(int row, int column) {
-        return format3ADecoders[row][column];
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9FMOVccInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9FMOVccInstruction.java
deleted file mode 100644
index b173510a6df..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9FMOVccInstruction.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9FMOVccInstruction extends SPARCFPMoveInstruction
-    implements MoveInstruction {
-    final int conditionCode;
-    final int conditionFlag;
-
-    public SPARCV9FMOVccInstruction(String name, int opf, int conditionCode,
-                              int conditionFlag, SPARCFloatRegister rs,
-                              SPARCFloatRegister rd) {
-        super(name, opf, rs, rd);
-        this.conditionFlag = conditionFlag;
-        this.conditionCode = conditionCode;
-    }
-
-    public int getConditionCode() {
-        return conditionCode;
-    }
-
-    public int getConditionFlag() {
-        return conditionFlag;
-    }
-
-    public boolean isConditional() {
-        return false;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9FMOVrInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9FMOVrInstruction.java
deleted file mode 100644
index dd838e5094a..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9FMOVrInstruction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9FMOVrInstruction extends SPARCFPMoveInstruction
-                     implements SPARCV9Instruction {
-    final private int regConditionCode;
-    final private SPARCRegister rs1;
-
-    public SPARCV9FMOVrInstruction(String name, int opf, SPARCRegister rs1,
-                                   SPARCFloatRegister rs2, SPARCFloatRegister rd,
-                                   int regConditionCode) {
-        super(name, opf, rs2, rd);
-        this.regConditionCode = regConditionCode;
-        this.rs1 = rs1;
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(rs1.toString());
-        buf.append(comma);
-        buf.append(rs.toString());
-        buf.append(comma);
-        buf.append(rd.toString());
-        return buf.toString();
-    }
-
-    public int getRegisterConditionCode() {
-        return regConditionCode;
-    }
-
-    public boolean isConditional() {
-        return true;
-    }
-
-    public Register getConditionRegister() {
-        return rs1;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9IlltrapInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9IlltrapInstruction.java
deleted file mode 100644
index 371bb81fca5..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9IlltrapInstruction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9IlltrapInstruction extends SPARCUnimpInstruction
-                    implements SPARCV9Instruction {
-    public SPARCV9IlltrapInstruction(int const22) {
-        super("illtrap", const22);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9ImpdepInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9ImpdepInstruction.java
deleted file mode 100644
index 7a5325e7ed0..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9ImpdepInstruction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9ImpdepInstruction extends SPARCInstruction
-                    implements SPARCV9Instruction {
-    public SPARCV9ImpdepInstruction(String name) {
-        super(name);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9Instruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9Instruction.java
deleted file mode 100644
index 1c0dab49a83..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9Instruction.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-public interface SPARCV9Instruction extends SPARCV9Opcodes {
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9InstructionFactory.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9InstructionFactory.java
deleted file mode 100644
index 0e79e0a08b9..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9InstructionFactory.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public interface SPARCV9InstructionFactory extends SPARCInstructionFactory {
-    public SPARCInstruction newV9BranchInstruction(String name, PCRelativeAddress addr,
-              boolean isAnnuled, int conditionCode, boolean predictTaken, int conditionFlag);
-    public SPARCInstruction newV9RegisterBranchInstruction(String name, PCRelativeAddress addr,
-                               boolean isAnnuled, int regConditionCode, SPARCRegister conditionRegister,
-                               boolean predictTaken);
-    public SPARCInstruction newV9CasInstruction(String name, SPARCRegisterIndirectAddress addr,
-                               SPARCRegister rs2, SPARCRegister rd, int dataType);
-    public SPARCInstruction newV9PrefetchInstruction(String name, SPARCRegisterIndirectAddress addr,
-                               int prefetchFcn);
-    public SPARCInstruction newV9FlushwInstruction();
-    public SPARCInstruction newV9MOVccInstruction(String name, int conditionCode, int conditionFlag,
-                                   ImmediateOrRegister source, SPARCRegister rd);
-    public SPARCInstruction newV9MOVrInstruction(String name, SPARCRegister rs1,
-                                   ImmediateOrRegister operand2, SPARCRegister rd,
-                                   int regConditionCode);
-    public SPARCInstruction newV9RdprInstruction(int regNum, SPARCRegister rd);
-    public SPARCInstruction newV9WrprInstruction(SPARCRegister rs1, ImmediateOrRegister operand2, int regNum);
-    public SPARCInstruction newV9PopcInstruction(ImmediateOrRegister source, SPARCRegister rd);
-    public SPARCInstruction newV9DoneInstruction();
-    public SPARCInstruction newV9RetryInstruction();
-    public SPARCInstruction newV9SavedInstruction();
-    public SPARCInstruction newV9RestoredInstruction();
-    public SPARCInstruction newV9ReadInstruction(int specialRegNum, int asrRegNum, SPARCRegister rd);
-    public SPARCInstruction newV9WriteInstruction(int specialRegNum, int asrRegNum, SPARCRegister rs1,
-                                                  ImmediateOrRegister operand2);
-    public SPARCInstruction newV9MembarInstruction(int mmask, int cmask);
-    public SPARCInstruction newV9SirInstruction();
-    public SPARCInstruction newV9FMOVccInstruction(String name, int opf, int conditionCode,
-                              int conditionFlag, SPARCFloatRegister rs,
-                              SPARCFloatRegister rd);
-    public SPARCInstruction newV9FMOVrInstruction(String name, int opf,
-                                   SPARCRegister rs1, SPARCFloatRegister rs2,
-                                   SPARCFloatRegister rd, int regConditionCode);
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9InstructionFactoryImpl.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9InstructionFactoryImpl.java
deleted file mode 100644
index 4e27f118d9b..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9InstructionFactoryImpl.java
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9InstructionFactoryImpl extends SPARCInstructionFactoryImpl
-                      implements SPARCV9InstructionFactory {
-
-    public SPARCInstruction newUnimpInstruction(int const22) {
-        return new SPARCV9IlltrapInstruction(const22);
-    }
-
-    public SPARCInstruction newRettInstruction(SPARCRegisterIndirectAddress addr) {
-        return new SPARCV9ReturnInstruction(addr);
-    }
-
-    public SPARCInstruction newCoprocessorInstruction(int instruction, int cpopcode, int opc,
-                                                     int rs1Num, int rs2Num, int rdNum) {
-        return new SPARCV9ImpdepInstruction(cpopcode == SPARCOpcodes.CPop1? "impdep1" : "impdep2");
-    }
-
-    public SPARCInstruction newV9ReadInstruction(int specialRegNum, int asrRegNum, SPARCRegister rd) {
-        return new SPARCV9ReadInstruction(specialRegNum, asrRegNum, rd);
-    }
-
-    public SPARCInstruction newV9WriteInstruction(int specialRegNum, int asrRegNum, SPARCRegister rs1,
-                                                  ImmediateOrRegister operand2) {
-        return new SPARCV9WriteInstruction(specialRegNum, asrRegNum, rs1, operand2);
-    }
-
-    public SPARCInstruction newV9BranchInstruction(String name, PCRelativeAddress addr,
-              boolean isAnnuled, int conditionCode, boolean predictTaken, int conditionFlag) {
-        return new SPARCV9BranchInstruction(name, addr, isAnnuled, conditionCode,
-                       predictTaken, conditionFlag);
-    }
-
-    public SPARCInstruction newV9RegisterBranchInstruction(String name, PCRelativeAddress addr,
-                               boolean isAnnuled, int regConditionCode, SPARCRegister conditionRegister,
-                               boolean predictTaken) {
-        return new SPARCV9RegisterBranchInstruction(name, addr, isAnnuled, regConditionCode,
-                               conditionRegister, predictTaken);
-    }
-
-    public SPARCInstruction newV9CasInstruction(String name, SPARCRegisterIndirectAddress addr,
-                                              SPARCRegister rs2, SPARCRegister rd, int dataType) {
-        return new SPARCV9CasInstruction(name, addr, rs2, rd, dataType);
-    }
-
-    public SPARCInstruction newV9PrefetchInstruction(String name, SPARCRegisterIndirectAddress addr,
-                               int prefetchFcn) {
-        return new SPARCV9PrefetchInstruction(name, addr, prefetchFcn);
-    }
-
-    public SPARCInstruction newV9FlushwInstruction() {
-        return new SPARCV9FlushwInstruction();
-    }
-
-    public SPARCInstruction newV9MOVccInstruction(String name, int conditionCode, int conditionFlag,
-                                  ImmediateOrRegister source, SPARCRegister rd) {
-        return new SPARCV9MOVccInstruction(name, conditionCode, conditionFlag, source, rd);
-    }
-
-    public SPARCInstruction newV9MOVrInstruction(String name, SPARCRegister rs1,
-                                   ImmediateOrRegister operand2, SPARCRegister rd,
-                                   int regConditionCode) {
-        return new SPARCV9MOVrInstruction(name, rs1, operand2, rd, regConditionCode);
-    }
-
-    public SPARCInstruction newV9RdprInstruction(int regNum, SPARCRegister rd) {
-        return new SPARCV9RdprInstruction(regNum, rd);
-    }
-
-    public SPARCInstruction newV9WrprInstruction(SPARCRegister rs1, ImmediateOrRegister operand2, int regNum) {
-        return new SPARCV9WrprInstruction(rs1, operand2, regNum);
-    }
-
-    public SPARCInstruction newV9PopcInstruction(ImmediateOrRegister source, SPARCRegister rd) {
-        return new SPARCV9PopcInstruction(source, rd);
-    }
-
-    public SPARCInstruction newV9DoneInstruction() {
-        return new SPARCV9DoneInstruction();
-    }
-
-    public SPARCInstruction newV9RetryInstruction() {
-        return new SPARCV9RetryInstruction();
-    }
-
-    public SPARCInstruction newV9SavedInstruction() {
-        return new SPARCV9SavedInstruction();
-    }
-
-    public SPARCInstruction newV9RestoredInstruction() {
-        return new SPARCV9RestoredInstruction();
-    }
-
-    public SPARCInstruction newV9MembarInstruction(int mmask, int cmask) {
-        return new SPARCV9MembarInstruction(mmask, cmask);
-    }
-
-    public SPARCInstruction newV9SirInstruction() {
-        return new SPARCV9SirInstruction();
-    }
-
-    public SPARCInstruction newV9FMOVccInstruction(String name, int opf,
-                                           int conditionCode, int conditionFlag,
-                                           SPARCFloatRegister rs, SPARCFloatRegister rd) {
-        return new SPARCV9FMOVccInstruction(name, opf, conditionCode, conditionFlag, rs, rd);
-    }
-
-    public SPARCInstruction newV9FMOVrInstruction(String name, int opf,
-                                   SPARCRegister rs1, SPARCFloatRegister rs2,
-                                   SPARCFloatRegister rd, int regConditionCode) {
-        return new SPARCV9FMOVrInstruction(name, opf, rs1, rs2, rd, regConditionCode);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9MOVccInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9MOVccInstruction.java
deleted file mode 100644
index 711d584515a..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9MOVccInstruction.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9MOVccInstruction extends SPARCMoveInstruction
-                     implements SPARCV9Instruction {
-    final private int conditionFlag; // condition flag used icc, xcc, fccn etc.
-    final private int conditionCode;
-
-    public SPARCV9MOVccInstruction(String name, int conditionCode, int conditionFlag,
-                                   ImmediateOrRegister source, SPARCRegister rd) {
-        super(name, MOVcc, source, rd);
-        this.conditionCode = conditionCode;
-        this.conditionFlag = conditionFlag;
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(SPARCV9ConditionFlags.getFlagName(conditionFlag));
-        buf.append(comma);
-        buf.append(getOperand2String());
-        buf.append(comma);
-        buf.append(rd.toString());
-        return buf.toString();
-    }
-
-    public int getConditionCode() {
-        return conditionCode;
-    }
-
-    public int getConditionFlag() {
-        return conditionFlag;
-    }
-
-    public String getConditionFlagName() {
-        return SPARCV9ConditionFlags.getFlagName(conditionFlag);
-    }
-
-    public boolean isConditional() {
-        return true;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9MOVrInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9MOVrInstruction.java
deleted file mode 100644
index 32da90f653e..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9MOVrInstruction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9MOVrInstruction extends SPARCMoveInstruction
-                     implements SPARCV9Instruction {
-    final private int regConditionCode;
-    final private SPARCRegister rs1;
-
-    public SPARCV9MOVrInstruction(String name, SPARCRegister rs1,
-                                  ImmediateOrRegister operand2, SPARCRegister rd,
-                                  int regConditionCode) {
-        super(name, MOVr, operand2, rd);
-        this.regConditionCode = regConditionCode;
-        this.rs1 = rs1;
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(rs1.toString());
-        buf.append(comma);
-        buf.append(getOperand2String());
-        buf.append(comma);
-        buf.append(rd.toString());
-        return buf.toString();
-    }
-
-    public int getRegisterConditionCode() {
-        return regConditionCode;
-    }
-
-    public boolean isConditional() {
-        return true;
-    }
-
-    public Register getConditionRegister() {
-        return getSourceRegister1();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9MembarInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9MembarInstruction.java
deleted file mode 100644
index fa2da9ee131..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9MembarInstruction.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.SymbolFinder;
-import java.util.Vector;
-
-public class SPARCV9MembarInstruction extends SPARCInstruction
-                  implements SPARCV9Instruction {
-    final private int mmask;
-    final private int cmask;
-    final private String description;
-
-    public SPARCV9MembarInstruction(int mmask, int cmask) {
-        super("membar");
-        this.mmask = mmask & 0xF;
-        this.cmask = cmask & 0x7;
-        description = initDescription();
-    }
-
-    private String initDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-
-        Vector masks = new Vector();
-        if ((mmask & 0x1) != 0)
-            masks.add("#LoadLoad");
-        if ((mmask & 0x2) != 0)
-            masks.add("#StoreLoad");
-        if ((mmask & 0x4) != 0)
-            masks.add("#LoadStore");
-        if ((mmask & 0x8) != 0)
-            masks.add("#StoreStore");
-
-        if ((cmask & 0x1) != 0)
-            masks.add("#Lookaside");
-        if ((cmask & 0x2) != 0)
-            masks.add("#MemIssue");
-        if ((cmask & 0x4) != 0)
-            masks.add("#Sync");
-
-        // add all masks
-        Object[] tempMasks = masks.toArray();
-        for (int i=0; i < tempMasks.length - 1; i++) {
-            buf.append((String)tempMasks[i]);
-            buf.append("| ");
-        }
-        buf.append((String)tempMasks[tempMasks.length - 1]);
-
-        return buf.toString();
-    }
-
-    public int getMMask() {
-        return mmask;
-    }
-
-    public int getCMask() {
-        return cmask;
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return description;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9Opcodes.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9Opcodes.java
deleted file mode 100644
index fbcf1d94561..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9Opcodes.java
+++ /dev/null
@@ -1,365 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-// Please refer to "The SPARC Architecture Manual - Version 9"
-
-public interface SPARCV9Opcodes extends SPARCOpcodes {
-    // format 2, v9 specific "op2" values.
-
-    // branch on integer condition codes with prediction
-    public static final int OP_2_BPcc    = 1;
-
-    // branch on integer register contents with prediction
-    public static final int OP_2_BPr     = 3;
-
-    // branch on float condition codes with prediction
-    public static final int OP_2_FBPfcc  = 5;
-
-    // "rcond" - branch on register condition
-    public static final int BRANCH_RCOND_START_BIT  = 25;
-
-    // rcond is 3 bits length
-    public static final int BRANCH_RCOND_MASK = 7 << BRANCH_RCOND_START_BIT;
-
-    // "rcond" - as used in conditional moves
-    public static final int CMOVE_RCOND_START_BIT = 10;
-    public static final int CMOVE_RCOND_MASK = 7 << CMOVE_RCOND_START_BIT;
-
-    public static final int IMPDEP1 = CPop1;
-    public static final int IMPDEP2 = CPop2;
-
-    // various rcond values - used in BPr, MOVr and FMOVr
-
-    // reserved register condition
-    public static final int BRANCH_RCOND_RESERVED1 = 0; // 000
-
-    public static final int BRZ     = 1;
-    public static final int MOVRZ   = BRZ;
-    public static final int FMOVZ   = BRZ;
-
-    public static final int BRLEZ   = 2;
-    public static final int MOVRLEZ = BRLEZ;
-    public static final int FMOVLEZ = BRLEZ;
-
-    public static final int BRLZ    = 3;
-    public static final int MOVRLZ  = BRLZ;
-    public static final int FMOVLZ  = BRLZ;
-
-    // reserved register condition
-    public static final int BRANCH_RCOND_RESERVED2 = 4; // 100
-
-    public static final int BRNZ    = 5;
-    public static final int MOVRNZ  = BRNZ;
-    public static final int FMOVNZ  = BRNZ;
-
-    public static final int BRGZ    = 6;
-    public static final int MOVGZ   = BRGZ;
-    public static final int FMOVGZ  = BRGZ;
-
-    public static final int BRGEZ   = 7;
-    public static final int MOVRGEZ = BRGEZ;
-    public static final int FMOVGEZ = BRGEZ;
-
-    // "p" - prediction bit - predict branch taken or not taken
-    public static final int PREDICTION_START_BIT = 19;
-    public static final int PREDICTION_MASK = 1 << PREDICTION_START_BIT;
-
-    // branch pc relative displacement - hi 2 bits of disp16.
-    public static final int DISP_16_HI_START_BIT = 20;
-
-    // disp 16 hi is 2 bits length
-    public static final int DISP_16_HI_MASK = 3 << DISP_16_HI_START_BIT;
-
-    // disp 16 low 14 bits
-    public static final int DISP_16_LO_START_BIT = 0; // just for completion.
-    public static final int DISP_16_LO_MASK = 0x3FFF;
-    public static final int DISP_16_LO_NUMBITS = 14;
-
-    // disp 19 - integer branch with prediction - displacement
-    public static final int DISP_19_MASK = 0x7FFFF;
-
-    /*
-     * condition code selected for integer branches - cc1 & cc0.
-     * condition code selected for float branches - cc1 & cc0.
-     * opf_cc field - floating conditional moves - 3 bits.
-     * convert 2 bit codes as 3 bit codes always and use following codes
-     * uniformly.
-    */
-
-    // opf_cc - 3 bits
-    public static final int OPF_CC_START_BIT = 11;
-    public static final int OPF_CC_MASK = 7 << OPF_CC_START_BIT;
-
-    public static final int fcc0 = 0;  // 000
-    public static final int fcc1 = 1;  // 001
-    public static final int fcc2 = 2;  // 010
-    public static final int fcc3 = 3;  // 011
-    public static final int icc  = 4;  // 100
-    public static final int CFLAG_RESERVED1 = 5; // 101
-    public static final int xcc  = 6;  // 110
-    public static final int CFLAG_RESERVED2 = 7; // 111
-
-    // cc0, cc1 as in integer, float predicted branches
-    public static final int BPcc_CC_START_BIT = 20;
-    public static final int BPcc_CC_MASK = 3 << BPcc_CC_START_BIT;
-    public static final int FBPfcc_CC_START_BIT = BPcc_CC_START_BIT;
-    public static final int FBPfcc_CC_MASK = BPcc_CC_MASK;
-
-    // condition codes for integer branches with prediction - BPcc
-    public static final int CONDITION_BPN   = CONDITION_BN;
-    public static final int CONDITION_BPE   = CONDITION_BE;
-    public static final int CONDITION_BPLE  = CONDITION_BLE;
-    public static final int CONDITION_BPL   = CONDITION_BL;
-    public static final int CONDITION_BPLEU = CONDITION_BLEU;
-    public static final int CONDITION_BPCS  = CONDITION_BCS;
-    public static final int CONDITION_BPNEG = CONDITION_BNEG;
-    public static final int CONDITION_BPVS  = CONDITION_BVS;
-    public static final int CONDITION_BPA   = CONDITION_BA;
-    public static final int CONDITION_BPNE  = CONDITION_BNE;
-    public static final int CONDITION_BPG   = CONDITION_BG;
-    public static final int CONDITION_BPGE  = CONDITION_BGE;
-    public static final int CONDITION_BPGU  = CONDITION_BGU;
-    public static final int CONDITION_BPCC  = CONDITION_BCC;
-    public static final int CONDITION_BPPOS = CONDITION_BPOS;
-    public static final int CONDITION_BPVC  = CONDITION_BVC;
-
-    // condition codes for float branches with prediction
-    public static final int CONDITION_FBPN  = CONDITION_BN;
-    public static final int CONDITION_FBPNE = CONDITION_BE;
-    public static final int CONDITION_FBPLG = CONDITION_BLE;
-    public static final int CONDITION_FBPUL = CONDITION_BL;
-    public static final int CONDITION_FBPL  = CONDITION_BLEU;
-    public static final int CONDITION_FBPUG = CONDITION_BCS;
-    public static final int CONDITION_FBPG  = CONDITION_BNEG;
-    public static final int CONDITION_FBPU  = CONDITION_BVS;
-    public static final int CONDITION_FBPA  = CONDITION_BA;
-    public static final int CONDITION_FBPE  = CONDITION_BNE;
-    public static final int CONDITION_FBPUE = CONDITION_BG;
-    public static final int CONDITION_FBPGE = CONDITION_BGE;
-    public static final int CONDITION_FBPUGE= CONDITION_BGU;
-    public static final int CONDITION_FBPLE = CONDITION_BCC;
-    public static final int CONDITION_FBPULE= CONDITION_BPOS;
-    public static final int CONDITION_FBPO  = CONDITION_BVC;
-
-    // "cmask" - 3 bit mask used in membar for completion constraints
-    public static final int CMASK_START_BIT = 4;
-    public static final int CMASK_MASK = 7 << CMASK_START_BIT;
-
-    // "mmask" - 4 bit mask used in member for ordering instruction classes.
-    public static final int MMASK_START_BIT = 0;
-    public static final int MMASK_MASK = 0xF; // no need to shift
-
-    // v9 specific load/store instruction opcodes
-    // load/store instructions - op3 values - used with op=3 (FORMAT_3)
-
-    public static final int LDUW   = LD;
-    public static final int LDUWA  = LDA;
-
-    public static final int LDXFSR = LDFSR;
-
-    public static final int LDFA   = LDC;
-    public static final int LDQF   = (2 << 4) | 2;
-    public static final int LDQFA  = (3 << 4) | 2;
-    public static final int LDDFA  = LDDC;
-
-    public static final int STW    = ST;
-    public static final int STWA   = STA;
-    public static final int STFA   = STC;
-
-    public static final int STXFSR = STFSR;
-
-    public static final int STQF   = STDFQ;
-    public static final int STQFA  = STDCQ;
-    public static final int STDFA  = STDC;
-
-    public static final int LDSW   = 8;
-    public static final int LDSWA  = (1 << 4) | 8;
-
-    public static final int LDX    = 0xB;
-    public static final int LDXA   = (1 << 4) | 0xB;
-
-    public static final int PREFETCH  = (2 << 4) | 0xD;
-    public static final int PREFETCHA = (3 << 4) | 0xD;
-
-    public static final int CASA   = (3 << 4) | 0xC;
-
-    public static final int STX    = 0xE;
-    public static final int STXA   = (1 << 4) | 0xE;
-    public static final int CASXA  = (3 << 4) | 0xE;
-
-    // 6 bit immediate shift count mask
-    public static final int SHIFT_COUNT_6_MASK = 0x3F;
-
-    // X bit mask - used to differentiate b/w 32 bit and 64 bit shifts
-    public static final int X_MASK = 1 << 12;
-
-    // E Opcode maps - Page 274 - Table 32 - op3 (op=2) table
-    // v9 specific items
-    public static final int ADDC   = ADDX;
-    public static final int ADDCcc = ADDXcc;
-
-    public static final int SUBC   = SUBX;
-    public static final int SUBCcc = SUBXcc;
-
-    public static final int MULX   = 9;
-    public static final int UDIVX  = 0xD;
-
-    public static final int SLLX   = SLL;
-    public static final int SRLX   = SRL;
-    public static final int SRAX   = SRA;
-
-    // special register reads
-    public static final int RDCCR  = RDY;
-    public static final int RDASI  = RDY;
-    public static final int RDTICK = RDY;
-    public static final int RDPC   = RDY;
-    public static final int RDFPRS = RDY;
-    public static final int MEMBAR = RDY;
-    public static final int STMBAR = RDY;
-
-    public static final int RDPR   = (2 << 4) | 0xA;
-
-    public static final int FLUSHW = (2 << 4) | 0xB;
-
-    public static final int MOVcc  = (2 << 4) | 0xC;
-
-    public static final int SDIVX  = (2 << 4) | 0xD;
-
-    public static final int POPC   = (2 << 4) | 0xE;
-
-    public static final int MOVr   = (2 << 4) | 0xF;
-
-    // special regitser writes
-    public static final int WRCCR  = WRY;
-    public static final int WRASI  = WRY;
-    public static final int WRFPRS = WRY;
-    public static final int SIR    = WRY;
-
-    public static final int SAVED  = (3 << 4) | 0x1;
-    public static final int RESTORED = SAVED;
-
-    public static final int WRPR   = (3 << 4) | 0x2;
-
-    public static final int RETURN = RETT;
-
-    public static final int DONE   = (3 << 4) | 0xE;
-    public static final int RETRY  = DONE;
-
-    // various integer condition code move instructions
-    public static final int CONDITION_MOVN    = CONDITION_BN;
-    public static final int CONDITION_MOVE    = CONDITION_BE;
-    public static final int CONDITION_MOVLE   = CONDITION_BLE;
-    public static final int CONDITION_MOVL    = CONDITION_BL;
-    public static final int CONDITION_MOVLEU  = CONDITION_BLEU;
-    public static final int CONDITION_MOVCS   = CONDITION_BCS;
-    public static final int CONDITION_MOVNEG  = CONDITION_BNEG;
-    public static final int CONDITION_MOVVS   = CONDITION_BVS;
-    public static final int CONDITION_MOVA    = CONDITION_BA;
-    public static final int CONDITION_MOVNE   = CONDITION_BNE;
-    public static final int CONDITION_MOVG    = CONDITION_BG;
-    public static final int CONDITION_MOVGE   = CONDITION_BGE;
-    public static final int CONDITION_MOVGU   = CONDITION_BGU;
-    public static final int CONDITION_MOVCC   = CONDITION_BCC;
-    public static final int CONDITION_MOVPOS  = CONDITION_BPOS;
-    public static final int CONDITION_MOVVC   = CONDITION_BVC;
-
-    // cc0, cc1 & cc2 in conditional moves
-    public static final int CMOVE_CC_START_BIT  = 11;
-    public static final int CMOVE_CC0_CC1_MASK  = 3 << CMOVE_CC_START_BIT;
-    public static final int CMOVE_CC2_START_BIT = 18;
-    public static final int CMOVE_CC2_MASK      = 1 << CMOVE_CC2_START_BIT;
-
-    public static final int CMOVE_COND_START_BIT = 14;
-    // condition code is 4 bits
-    public static final int CMOVE_COND_MASK = 0xF << CMOVE_COND_START_BIT;
-
-    // opf[8:0] (op=2,op3=0x34=FPop1) - Table 34 - Page 276 - E Opcode Maps
-    // v9 specific opcodes only - remaining are in SPARCOpcodes.
-
-    public static final int FMOVd = 0x2;
-    public static final int FMOVq = 0x3;
-    public static final int FNEGd = 0x6;
-    public static final int FNEGq = 0x7;
-    public static final int FABSd = 0xA;
-    public static final int FABSq = 0xB;
-    public static final int FsTOx = (0x8 << 4) | 0x1;
-    public static final int FdTOx = (0x8 << 4) | 0x2;
-    public static final int FqTOx = (0x8 << 4) | 0x3;
-    public static final int FxTOs = (0x8 << 4) | 0x4;
-    public static final int FxTOd = (0x8 << 4) | 0x8;
-    public static final int FxTOq = (0x8 << 4) | 0xC;
-
-    // opf[8:0] (op=2, op3=0x35= FPop2) - Table 35 - Page 277 - E.2 Tables
-    // v9 specific opcodes only 0 remanining are in SPARCOpcodes.
-
-    // fp condition moves
-
-    public static final int FMOVs_fcc0 = 1;
-    public static final int FMOVs_fcc1 = 1 | (0x4 << 4);
-    public static final int FMOVs_fcc2 = 1 | (0x8 << 4);
-    public static final int FMOVs_fcc3 = 1 | (0xC << 4);
-    public static final int FMOVs_icc  = 1 | (0x10 << 4);
-    public static final int FMOVs_xcc  = 1 | (0x18 << 4);
-
-    public static final int FMOVd_fcc0 = 2;
-    public static final int FMOVd_fcc1 = 2 | (0x4 << 4);
-    public static final int FMOVd_fcc2 = 2 | (0x8 << 4);
-    public static final int FMOVd_fcc3 = 2 | (0xC << 4);
-    public static final int FMOVd_icc  = 2 | (0x10 << 4);
-    public static final int FMOVd_xcc  = 2 | (0x18 << 4);
-
-    public static final int FMOVq_fcc0 = 3;
-    public static final int FMOVq_fcc1 = 3 | (0x4 << 4);
-    public static final int FMOVq_fcc2 = 3 | (0x8 << 4);
-    public static final int FMOVq_fcc3 = 3 | (0xC << 4);
-    public static final int FMOVq_icc  = 3 | (0x10 << 4);
-    public static final int FMOVq_xcc  = 3 | (0x18 << 4);
-
-    // fp register condition moves
-
-    public static final int FMOVRsZ    = 5 | (0x2 << 4);
-    public static final int FMOVRsLEZ  = 5 | (0x4 << 4);
-    public static final int FMOVRsLZ   = 5 | (0x6 << 4);
-    public static final int FMOVRsNZ   = 5 | (0xA << 4);
-    public static final int FMOVRsGZ   = 5 | (0xC << 4);
-    public static final int FMOVRsGEZ  = 5 | (0xE << 4);
-
-    public static final int FMOVRdZ    = 6 | (0x2 << 4);
-    public static final int FMOVRdLEZ  = 6 | (0x4 << 4);
-    public static final int FMOVRdLZ   = 6 | (0x6 << 4);
-    public static final int FMOVRdNZ   = 6 | (0xA << 4);
-    public static final int FMOVRdGZ   = 6 | (0xC << 4);
-    public static final int FMOVRdGEZ  = 6 | (0xE << 4);
-
-    public static final int FMOVRqZ    = 7 | (0x2 << 4);
-    public static final int FMOVRqLEZ  = 7 | (0x4 << 4);
-    public static final int FMOVRqLZ   = 7 | (0x6 << 4);
-    public static final int FMOVRqNZ   = 7 | (0xA << 4);
-    public static final int FMOVRqGZ   = 7 | (0xC << 4);
-    public static final int FMOVRqGEZ  = 7 | (0xE << 4);
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9PopcInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9PopcInstruction.java
deleted file mode 100644
index 4ea25d22562..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9PopcInstruction.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9PopcInstruction extends SPARCFormat3AInstruction
-                  implements SPARCV9Instruction {
-    public SPARCV9PopcInstruction(ImmediateOrRegister source, SPARCRegister rd) {
-        super("popc", POPC, null, source, rd);
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(getOperand2String());
-        buf.append(comma);
-        buf.append(rd.toString());
-        return buf.toString();
-    }
-
-    public ImmediateOrRegister getSource() {
-        return operand2;
-    }
-
-    public SPARCRegister getDestination() {
-        return rd;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9PrefetchInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9PrefetchInstruction.java
deleted file mode 100644
index c52c426fe07..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9PrefetchInstruction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9PrefetchInstruction extends SPARCInstruction
-                    implements SPARCV9Instruction {
-    final private SPARCRegisterIndirectAddress addr;
-    final private int prefetchFcn;
-    final private String description;
-
-    public static final int PREFETCH_MANY_READS  = 0;
-    public static final int PREFETCH_ONE_READ    = 1;
-    public static final int PREFETCH_MANY_WRITES = 2;
-    public static final int PREFETCH_ONE_WRITE   = 3;
-    public static final int PREFETCH_PAGE        = 4;
-
-    public SPARCV9PrefetchInstruction(String name, SPARCRegisterIndirectAddress addr, int prefetchFcn) {
-        super(name);
-        this.addr = addr;
-        this.prefetchFcn = prefetchFcn;
-        description = initDescription();
-    }
-
-    private String initDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(addr.toString());
-        buf.append(comma);
-        buf.append(prefetchFcn);
-        return buf.toString();
-    }
-
-    public int getPrefetchFunction() {
-        return prefetchFcn;
-    }
-
-    public SPARCRegisterIndirectAddress getPrefetchAddress() {
-        return addr;
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return description;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9PrivilegedRegisterInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9PrivilegedRegisterInstruction.java
deleted file mode 100644
index 6f7e49883a4..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9PrivilegedRegisterInstruction.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public abstract class SPARCV9PrivilegedRegisterInstruction extends SPARCInstruction
-                          implements SPARCV9Instruction, /* imports */ SPARCV9PrivilegedRegisters {
-    protected static final String regNames[] = {
-        "%tpc", "%tnpc", "%tstate", "%tt", "%tick", "%tba", "%pstate", "%tl",
-        "%pil", "%cwp",  "%cansave", "%canrestore", "%cleanwin", "%otherwin", "%wstate", "%fq"
-    };
-
-    protected static String getPrivilegedRegisterName(int regNum) {
-        if ((regNum > 15 && regNum < 31) || regNum > 31)
-            return null;
-        return (regNum == 31)? "%ver" : regNames[regNum];
-    }
-
-    final protected int regNum;
-
-    protected abstract String getDescription();
-
-    protected SPARCV9PrivilegedRegisterInstruction(String name, int regNum) {
-        super(name);
-        this.regNum = regNum;
-    }
-
-    public int getPrivilegedRegisterNumber() {
-        return regNum;
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return getDescription();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9PrivilegedRegisters.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9PrivilegedRegisters.java
deleted file mode 100644
index 4b7674e2967..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9PrivilegedRegisters.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-public interface SPARCV9PrivilegedRegisters {
-    public static final int TPC         = 0;
-    public static final int TNPC        = 1;
-    public static final int TSTATE      = 2;
-    public static final int TT          = 3;
-    public static final int TICK        = 4;
-    public static final int TBA         = 5;
-    public static final int PSTATE      = 6;
-    public static final int TL          = 7;
-    public static final int PIL         = 8;
-    public static final int CWP         = 9;
-    public static final int CANSAVE     = 10;
-    public static final int CANRESTORE  = 11;
-    public static final int CLEANWIN    = 12;
-    public static final int OTHERWIN    = 13;
-    public static final int WSTATE      = 14;
-    public static final int FQ          = 15;
-    public static final int VER         = 31;
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RdprInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RdprInstruction.java
deleted file mode 100644
index 8164fb81f0f..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RdprInstruction.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-public class SPARCV9RdprInstruction extends SPARCV9PrivilegedRegisterInstruction {
-    final private SPARCRegister rd;
-
-    public SPARCV9RdprInstruction(int regNum, SPARCRegister rd) {
-        super("rdpr", regNum);
-        this.rd = rd;
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(getPrivilegedRegisterName(regNum));
-        buf.append(comma);
-        buf.append(rd.toString());
-        return buf.toString();
-    }
-
-    public SPARCRegister getDestination() {
-        return rd;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9ReadInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9ReadInstruction.java
deleted file mode 100644
index ae85d12426c..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9ReadInstruction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.SymbolFinder;
-import sun.jvm.hotspot.utilities.Assert;
-
-public class SPARCV9ReadInstruction extends SPARCV9SpecialRegisterInstruction {
-    final private int specialReg;
-    final private int asrRegNum;
-    final private SPARCRegister rd;
-
-    public SPARCV9ReadInstruction(int specialReg, int asrRegNum, SPARCRegister rd) {
-        super("rd");
-        this.specialReg = specialReg;
-        this.asrRegNum = asrRegNum;
-        this.rd = rd;
-    }
-
-    public int getSpecialRegister() {
-        return specialReg;
-    }
-
-    public int getAncillaryRegister() {
-        if (Assert.ASSERTS_ENABLED)
-            Assert.that(specialReg == ASR, "not an ancillary register");
-        return asrRegNum;
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        if(specialReg == ASR)
-            buf.append("%asr" + asrRegNum);
-        else
-            buf.append(getSpecialRegisterName(specialReg));
-        buf.append(comma);
-        buf.append(rd.toString());
-        return buf.toString();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RegisterBranchInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RegisterBranchInstruction.java
deleted file mode 100644
index 23ef498c057..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RegisterBranchInstruction.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9RegisterBranchInstruction extends SPARCInstruction
-    implements SPARCV9Instruction, BranchInstruction {
-    final protected PCRelativeAddress addr;
-    final protected boolean isAnnuled;
-    final protected int regConditionCode;
-    final protected SPARCRegister conditionRegister;
-    final protected boolean predictTaken;
-
-    public SPARCV9RegisterBranchInstruction(String name, PCRelativeAddress addr,
-                               boolean isAnnuled, int regConditionCode,
-                               SPARCRegister conditionRegister, boolean predictTaken) {
-        super(name);
-        this.addr = addr;
-        this.isAnnuled = isAnnuled;
-        this.regConditionCode = regConditionCode;
-        this.conditionRegister = conditionRegister;
-        this.predictTaken = predictTaken;
-    }
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        long address = addr.getDisplacement() + currentPc;
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(symFinder.getSymbolFor(address));
-        return buf.toString();
-    }
-
-    public boolean isBranch() {
-        return true;
-    }
-
-    public Address getBranchDestination() {
-        return addr;
-    }
-
-    public boolean isAnnuledBranch() {
-        return isAnnuled;
-    }
-
-    public boolean isConditional() {
-        return true;
-    }
-
-    public int getRegisterConditionCode() {
-        return regConditionCode;
-    }
-
-    public SPARCRegister getConditionRegister() {
-        return conditionRegister;
-    }
-
-    public boolean getPredictTaken() {
-        return predictTaken;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RegisterIndirectAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RegisterIndirectAddress.java
deleted file mode 100644
index e0e18e8956f..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RegisterIndirectAddress.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-public class SPARCV9RegisterIndirectAddress extends SPARCRegisterIndirectAddress {
-    protected boolean indirectAsi;
-
-    public SPARCV9RegisterIndirectAddress(SPARCRegister register, int offset) {
-        super(register, offset);
-    }
-
-    public SPARCV9RegisterIndirectAddress(SPARCRegister base, SPARCRegister index) {
-        super(base, index);
-    }
-
-    public boolean getIndirectAsi() {
-        return indirectAsi;
-    }
-
-    public void setIndirectAsi(boolean indirectAsi) {
-        this.indirectAsi = indirectAsi;
-    }
-
-    public String toString() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getAddressWithoutAsi());
-        if (indirectAsi) {
-            buf.append("%asi");
-        } else if (addressSpace != -1) {
-            buf.append(Integer.toString(addressSpace));
-        }
-        return buf.toString();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RetryInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RetryInstruction.java
deleted file mode 100644
index eedbfcc3158..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RetryInstruction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9RetryInstruction extends SPARCInstruction
-                    implements SPARCV9Instruction {
-    public SPARCV9RetryInstruction() {
-        super("retry");
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9ReturnInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9ReturnInstruction.java
deleted file mode 100644
index fb33fd8e868..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9ReturnInstruction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9ReturnInstruction extends SPARCRettInstruction
-                    implements SPARCV9Instruction {
-    public SPARCV9ReturnInstruction(SPARCRegisterIndirectAddress addr) {
-        super("return", addr);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9SavedInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9SavedInstruction.java
deleted file mode 100644
index 7c29cabe4fe..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9SavedInstruction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9SavedInstruction extends SPARCInstruction
-                    implements SPARCV9Instruction {
-    public SPARCV9SavedInstruction() {
-        super("saved");
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9SirInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9SirInstruction.java
deleted file mode 100644
index c1d8a5bf7ba..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9SirInstruction.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.SymbolFinder;
-
-public class SPARCV9SirInstruction extends SPARCInstruction
-                       implements SPARCV9Instruction {
-    public SPARCV9SirInstruction() {
-        super("sir");
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9SpecialRegisterInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9SpecialRegisterInstruction.java
deleted file mode 100644
index 049fe5b466f..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9SpecialRegisterInstruction.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public abstract class SPARCV9SpecialRegisterInstruction
-                       extends SPARCInstruction
-                       implements /* import */ SPARCV9SpecialRegisters, SPARCV9Instruction {
-    protected SPARCV9SpecialRegisterInstruction(String name) {
-        super(name);
-    }
-
-    protected abstract String getDescription();
-
-    public String asString(long currentPc, SymbolFinder symFinder) {
-        return getDescription();
-    }
-
-    protected static String[] specialRegNames = new String[] {
-       "%y",
-       null,
-       "%ccr",
-       "%asi",
-       "%tick",
-       "%pc",
-       "%fprs",
-       "%asr",
-    };
-
-    protected static String getSpecialRegisterName(int index) {
-       return specialRegNames[index];
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9SpecialRegisters.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9SpecialRegisters.java
deleted file mode 100644
index 47b42cbfb9a..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9SpecialRegisters.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-public interface SPARCV9SpecialRegisters {
-    public static final int Y    = 0;
-    public static final int CCR  = 2;
-    public static final int ASI  = 3;
-    public static final int TICK = 4;
-    public static final int PC   = 5;
-    public static final int FPRS = 6;
-    public static final int ASR  = 7;
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9WriteInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9WriteInstruction.java
deleted file mode 100644
index 6999dd74f6c..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9WriteInstruction.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import sun.jvm.hotspot.utilities.Assert;
-
-public class SPARCV9WriteInstruction extends SPARCV9SpecialRegisterInstruction {
-    final private int specialReg;
-    final private int asrRegNum;
-    final private SPARCRegister rs1;
-    final private ImmediateOrRegister operand2;
-
-    public SPARCV9WriteInstruction(int specialReg, int asrRegNum, SPARCRegister rs1, ImmediateOrRegister operand2)  {
-        super("wr");
-        this.specialReg = specialReg;
-        this.asrRegNum = asrRegNum;
-        this.rs1 = rs1;
-        this.operand2 = operand2;
-    }
-
-    public int getSpecialRegister() {
-        return specialReg;
-    }
-
-    public int getAncillaryRegister() {
-        if (Assert.ASSERTS_ENABLED)
-            Assert.that(specialReg == ASR, "not an ancillary register");
-        return asrRegNum;
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(rs1.toString());
-        buf.append(comma);
-        if (operand2.isRegister()) {
-            buf.append(operand2.toString());
-        } else {
-            Number number = ((Immediate)operand2).getNumber();
-            buf.append("0x");
-            buf.append(Integer.toHexString(number.intValue()));
-        }
-        buf.append(comma);
-
-        if(specialReg == ASR)
-            buf.append("%asr" + asrRegNum);
-        else
-            buf.append(getSpecialRegisterName(specialReg));
-        return buf.toString();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9WrprInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9WrprInstruction.java
deleted file mode 100644
index ecf5d1d1946..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9WrprInstruction.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9WrprInstruction extends SPARCV9PrivilegedRegisterInstruction {
-    final private SPARCRegister rs1;
-    final private ImmediateOrRegister operand2;
-
-    public SPARCV9WrprInstruction(SPARCRegister rs1, ImmediateOrRegister operand2,
-                                  int regNum) {
-        super("wrpr", regNum);
-        this.rs1 = rs1;
-        this.operand2 = operand2;
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(rs1.toString());
-        buf.append(comma);
-        if (operand2.isRegister()) {
-            buf.append(operand2.toString());
-        } else {
-            int value = ((Immediate)operand2).getNumber().intValue();
-            buf.append(Integer.toHexString(value));
-        }
-        buf.append(comma);
-        buf.append(getPrivilegedRegisterName(regNum));
-        return buf.toString();
-    }
-
-    public SPARCRegister getSourceRegister1() {
-        return rs1;
-    }
-
-    public ImmediateOrRegister getOperand2() {
-        return operand2;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCWriteInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCWriteInstruction.java
deleted file mode 100644
index 020ddd09161..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCWriteInstruction.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import sun.jvm.hotspot.utilities.Assert;
-
-public class SPARCWriteInstruction extends SPARCSpecialRegisterInstruction {
-    final private int specialReg;
-    final private int asrRegNum;
-    final private SPARCRegister rs1;
-    final private ImmediateOrRegister operand2;
-
-    public SPARCWriteInstruction(int specialReg, int asrRegNum, SPARCRegister rs1, ImmediateOrRegister operand2)  {
-        super("wr");
-        this.specialReg = specialReg;
-        this.asrRegNum = asrRegNum;
-        this.rs1 = rs1;
-        this.operand2 = operand2;
-    }
-
-    public int getSpecialRegister() {
-        return specialReg;
-    }
-
-    public int getAncillaryRegister() {
-        if (Assert.ASSERTS_ENABLED)
-            Assert.that(specialReg == ASR, "not an ancillary register");
-        return asrRegNum;
-    }
-
-    protected String getDescription() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getName());
-        buf.append(spaces);
-        buf.append(rs1.toString());
-        buf.append(comma);
-        if (operand2.isRegister()) {
-            buf.append(operand2.toString());
-        } else {
-            Number number = ((Immediate)operand2).getNumber();
-            buf.append("0x");
-            buf.append(Integer.toHexString(number.intValue()));
-        }
-        buf.append(comma);
-
-        if(specialReg == ASR)
-            buf.append("%asr" + asrRegNum);
-        else
-            buf.append(getSpecialRegisterName(specialReg));
-        return buf.toString();
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SaveDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SaveDecoder.java
deleted file mode 100644
index 3087c74d5c6..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SaveDecoder.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class SaveDecoder extends Format3ADecoder {
-    SaveDecoder() {
-        super(SAVE, "save", RTLOP_UNKNOWN);
-    }
-
-    Instruction decodeFormat3AInstruction(int instruction,
-                                       SPARCRegister rs1,
-                                       ImmediateOrRegister operand2,
-                                       SPARCRegister rd,
-                                       SPARCInstructionFactory factory) {
-        return factory.newSaveInstruction(rs1, operand2, rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SethiDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SethiDecoder.java
deleted file mode 100644
index 331c451e1b9..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SethiDecoder.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class SethiDecoder extends InstructionDecoder {
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        Instruction instr = null;
-        int rdNum = getDestinationRegister(instruction);
-        SPARCRegister rd = SPARCRegisters.getRegister(rdNum);
-        int imm22 = (instruction & DISP_22_MASK);
-        if (imm22 == 0 && rd == SPARCRegisters.G0) {
-            instr = factory.newNoopInstruction();
-        } else {
-            instr = factory.newSethiInstruction(imm22, rd);
-        }
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/ShiftDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/ShiftDecoder.java
deleted file mode 100644
index 84681c0f540..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/ShiftDecoder.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class ShiftDecoder extends InstructionDecoder {
-    final int op3;
-    final String name;
-    final int rtlOperation;
-
-    ShiftDecoder(int op3, String name, int rtlOperation) {
-        this.op3 = op3;
-        this.name = name;
-        this.rtlOperation = rtlOperation;
-    }
-
-    private ImmediateOrRegister getShiftLength(int instruction) {
-        boolean iBit = isIBitSet(instruction);
-        ImmediateOrRegister operand2 = null;
-        if (iBit) {
-            int value = instruction & SHIFT_COUNT_5_MASK;
-            operand2 = new Immediate(new Short((short)value));
-        } else {
-            operand2 = SPARCRegisters.getRegister(getSourceRegister2(instruction));
-        }
-        return operand2;
-    }
-
-    Instruction decode(int instruction,
-                       SPARCInstructionFactory factory) {
-        SPARCRegister rs1 = SPARCRegisters.getRegister(getSourceRegister1(instruction));
-        SPARCRegister rd = SPARCRegisters.getRegister(getDestinationRegister(instruction));
-        ImmediateOrRegister operand2 = getShiftLength(instruction);
-        return factory.newShiftInstruction(name, op3, rtlOperation, rs1, operand2, rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SpecialLoadDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SpecialLoadDecoder.java
deleted file mode 100644
index 1aed61f0f07..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SpecialLoadDecoder.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class SpecialLoadDecoder extends SpecialLoadStoreDecoder {
-    SpecialLoadDecoder(int op3, String name, int specialRegNum) {
-        super(op3, name, specialRegNum);
-    }
-
-    Instruction decodeSpecialLoadStoreInstruction(int cregNum,
-                                    SPARCRegisterIndirectAddress addr,
-                                    SPARCInstructionFactory factory) {
-        return factory.newSpecialLoadInstruction(name, specialRegNum, cregNum, addr);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SpecialLoadStoreDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SpecialLoadStoreDecoder.java
deleted file mode 100644
index 9b9793469ee..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SpecialLoadStoreDecoder.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-abstract class SpecialLoadStoreDecoder extends MemoryInstructionDecoder {
-    final int specialRegNum;
-
-    SpecialLoadStoreDecoder(int op3, String name, int specialRegNum) {
-        super(op3, name, RTLDT_UNKNOWN);
-        this.specialRegNum = specialRegNum;
-    }
-
-    final Instruction decodeMemoryInstruction(int instruction,
-                                      SPARCRegisterIndirectAddress addr,
-                                      SPARCRegister rd, SPARCInstructionFactory factory) {
-        int cregNum = getSourceRegister1(instruction);
-        return decodeSpecialLoadStoreInstruction(cregNum, addr, factory);
-    }
-
-    abstract Instruction decodeSpecialLoadStoreInstruction(int cregNum,
-                                      SPARCRegisterIndirectAddress addr,
-                                      SPARCInstructionFactory factory);
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SpecialStoreDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SpecialStoreDecoder.java
deleted file mode 100644
index e1a7d271a61..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SpecialStoreDecoder.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class SpecialStoreDecoder extends SpecialLoadStoreDecoder {
-    SpecialStoreDecoder(int op3, String name, int specialRegNum) {
-        super(op3, name, specialRegNum);
-    }
-
-    Instruction decodeSpecialLoadStoreInstruction(int cregNum,
-                                    SPARCRegisterIndirectAddress addr,
-                                    SPARCInstructionFactory factory) {
-        return factory.newSpecialStoreInstruction(name, specialRegNum, cregNum, addr);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/StoreDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/StoreDecoder.java
deleted file mode 100644
index 492aa155e9b..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/StoreDecoder.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class StoreDecoder extends MemoryInstructionDecoder {
-    StoreDecoder(int op3, String name, int dataType) {
-        super(op3, name, dataType);
-    }
-
-    Instruction decodeMemoryInstruction(int instruction,
-                                     SPARCRegisterIndirectAddress addr,
-                                     SPARCRegister rd,
-                                     SPARCInstructionFactory factory) {
-        return factory.newStoreInstruction(name, op3, addr, rd, dataType);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SwapDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SwapDecoder.java
deleted file mode 100644
index 349c4462c15..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SwapDecoder.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class SwapDecoder extends MemoryInstructionDecoder {
-    SwapDecoder(int op3, String name, int dataType) {
-        super(op3, name, dataType);
-    }
-
-    Instruction decodeMemoryInstruction(int instruction,
-                                     SPARCRegisterIndirectAddress addr,
-                                     SPARCRegister rd,
-                                     SPARCInstructionFactory factory) {
-        return factory.newSwapInstruction(name, addr, rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/TrapDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/TrapDecoder.java
deleted file mode 100644
index e71843ed939..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/TrapDecoder.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class TrapDecoder extends InstructionDecoder {
-    private static final String trapConditionNames[] = {
-        "tn", "te", "tle", "tl", "tleu", "tcs", "tneg", "tvs",
-        "ta", "tne", "tg", "tge", "tgu" , "tcc", "tpos", "tvc"
-    };
-
-    static String getTrapConditionName(int index) {
-        return trapConditionNames[index];
-    }
-
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        int conditionCode = getConditionCode(instruction);
-        return factory.newTrapInstruction(getTrapConditionName(conditionCode),
-                                                     conditionCode);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/UnimpDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/UnimpDecoder.java
deleted file mode 100644
index 07e98ac4057..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/UnimpDecoder.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class UnimpDecoder extends InstructionDecoder {
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        return factory.newUnimpInstruction(instruction & DISP_22_MASK);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V8FPop1Decoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V8FPop1Decoder.java
deleted file mode 100644
index a5a38405938..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V8FPop1Decoder.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import java.util.*;
-
-class V8FPop1Decoder extends FPopDecoder {
-    static Map opfDecoders = new HashMap(); // Map<Integer, InstructionDecoder>
-    static void addOpfDecoder(int fpOpcode, InstructionDecoder decoder) {
-        opfDecoders.put(new Integer(fpOpcode), decoder);
-    }
-
-    // opf (op=2, op3=0x34=FPop1) - Table F -5 - Page 230.
-    static {
-        addOpfDecoder(FMOVs, new FPMoveDecoder(FMOVs, "fmovs", RTLDT_FL_SINGLE, RTLDT_FL_SINGLE));
-        addOpfDecoder(FNEGs, new FP2RegisterDecoder(FNEGs, "fnegs", RTLDT_FL_SINGLE, RTLDT_FL_SINGLE));
-        addOpfDecoder(FABSs, new FP2RegisterDecoder(FABSs, "fabss", RTLDT_FL_SINGLE, RTLDT_FL_SINGLE));
-        addOpfDecoder(FSQRTs, new FP2RegisterDecoder(FSQRTs, "fsqrts", RTLDT_FL_SINGLE, RTLDT_FL_SINGLE));
-        addOpfDecoder(FSQRTd, new FP2RegisterDecoder(FSQRTd, "fsqrtd", RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE));
-        addOpfDecoder(FSQRTq, new FP2RegisterDecoder(FSQRTq, "fsqrtq", RTLDT_FL_QUAD, RTLDT_FL_QUAD));
-        addOpfDecoder(FADDs, new FPArithmeticDecoder(FADDs, "fadds", RTLOP_ADD, RTLDT_FL_SINGLE, RTLDT_FL_SINGLE, RTLDT_FL_SINGLE));
-        addOpfDecoder(FADDd, new FPArithmeticDecoder(FADDd, "faddd", RTLOP_ADD, RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE));
-        addOpfDecoder(FADDq, new FPArithmeticDecoder(FADDq, "faddq", RTLOP_ADD, RTLDT_FL_QUAD, RTLDT_FL_QUAD, RTLDT_FL_QUAD));
-        addOpfDecoder(FSUBs, new FPArithmeticDecoder(FSUBs, "fsubs", RTLOP_SUB, RTLDT_FL_SINGLE, RTLDT_FL_SINGLE, RTLDT_FL_SINGLE));
-        addOpfDecoder(FSUBd, new FPArithmeticDecoder(FSUBd, "fsubd", RTLOP_SUB, RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE));
-        addOpfDecoder(FSUBq, new FPArithmeticDecoder(FSUBq, "fsubq", RTLOP_SUB, RTLDT_FL_QUAD, RTLDT_FL_QUAD, RTLDT_FL_QUAD));
-        addOpfDecoder(FMULs, new FPArithmeticDecoder(FMULs, "fmuls", RTLOP_SMUL, RTLDT_FL_SINGLE, RTLDT_FL_SINGLE, RTLDT_FL_SINGLE));
-        addOpfDecoder(FMULd, new FPArithmeticDecoder(FMULd, "fmuld", RTLOP_SMUL, RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE));
-        addOpfDecoder(FMULq, new FPArithmeticDecoder(FMULq, "fmulq",RTLOP_SMUL,  RTLDT_FL_QUAD, RTLDT_FL_QUAD, RTLDT_FL_QUAD));
-        addOpfDecoder(FsMULd, new FPArithmeticDecoder(FsMULd, "fsmuld", RTLOP_SMUL, RTLDT_FL_SINGLE, RTLDT_FL_SINGLE, RTLDT_FL_DOUBLE));
-        addOpfDecoder(FdMULq, new FPArithmeticDecoder(FdMULq, "fdmulq",RTLOP_SMUL,  RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE, RTLDT_FL_QUAD));
-        addOpfDecoder(FDIVs, new FPArithmeticDecoder(FDIVs, "fdivs", RTLOP_SDIV, RTLDT_FL_SINGLE, RTLDT_FL_SINGLE, RTLDT_FL_SINGLE));
-        addOpfDecoder(FDIVd, new FPArithmeticDecoder(FDIVd, "fdivd",  RTLOP_SDIV,RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE));
-        addOpfDecoder(FDIVq, new FPArithmeticDecoder(FDIVq, "fdivq",  RTLOP_SDIV,RTLDT_FL_QUAD, RTLDT_FL_QUAD, RTLDT_FL_QUAD));
-        addOpfDecoder(FiTOs, new FP2RegisterDecoder(FiTOs, "fitos", RTLDT_FL_SINGLE, RTLDT_FL_SINGLE));
-        addOpfDecoder(FiTOd, new FP2RegisterDecoder(FiTOd, "fitod", RTLDT_FL_SINGLE, RTLDT_FL_DOUBLE));
-        addOpfDecoder(FiTOq, new FP2RegisterDecoder(FiTOq, "fitoq", RTLDT_FL_SINGLE, RTLDT_FL_QUAD));
-        addOpfDecoder(FsTOi, new FP2RegisterDecoder(FsTOi, "fstoi", RTLDT_FL_SINGLE, RTLDT_FL_SINGLE));
-        addOpfDecoder(FdTOi, new FP2RegisterDecoder(FdTOi, "fdtoi", RTLDT_FL_DOUBLE, RTLDT_FL_SINGLE));
-        addOpfDecoder(FqTOi, new FP2RegisterDecoder(FqTOi, "fqtoi", RTLDT_FL_QUAD, RTLDT_FL_SINGLE));
-        addOpfDecoder(FsTOd, new FP2RegisterDecoder(FsTOd, "fstod", RTLDT_FL_SINGLE, RTLDT_FL_DOUBLE));
-        addOpfDecoder(FsTOq, new FP2RegisterDecoder(FsTOq, "fstoq", RTLDT_FL_SINGLE, RTLDT_FL_QUAD));
-        addOpfDecoder(FdTOs, new FP2RegisterDecoder(FdTOs, "fdtos", RTLDT_FL_DOUBLE, RTLDT_FL_SINGLE));
-        addOpfDecoder(FdTOq, new FP2RegisterDecoder(FdTOq, "fdtoq", RTLDT_FL_DOUBLE, RTLDT_FL_QUAD));
-        addOpfDecoder(FqTOs, new FP2RegisterDecoder(FqTOs, "fqtos", RTLDT_FL_QUAD, RTLDT_FL_SINGLE));
-        addOpfDecoder(FqTOd, new FP2RegisterDecoder(FqTOd, "fqtod", RTLDT_FL_QUAD, RTLDT_FL_DOUBLE));
-    }
-
-    InstructionDecoder getOpfDecoder(int opf) {
-        return (InstructionDecoder) opfDecoders.get(new Integer(opf));
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V8FPop2Decoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V8FPop2Decoder.java
deleted file mode 100644
index e40fefbd8e8..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V8FPop2Decoder.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import java.util.*;
-
-class V8FPop2Decoder extends FPopDecoder {
-    static Map fpop2Decoders = new HashMap(); // Map<Integer, InstructionDecoder>
-    static void addFPop2Decoder(int fpOpcode, InstructionDecoder decoder) {
-        fpop2Decoders.put(new Integer(fpOpcode), decoder);
-    }
-
-    // opf (op=2, op3=0x35=FPop2 - Table F-6 page 231
-    static {
-        addFPop2Decoder(FCMPs, new FP2RegisterDecoder(FCMPs, "fcmps", RTLDT_FL_SINGLE, RTLDT_FL_SINGLE));
-        addFPop2Decoder(FCMPd, new FP2RegisterDecoder(FCMPd, "fcmpd", RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE));
-        addFPop2Decoder(FCMPq, new FP2RegisterDecoder(FCMPq, "fcmpq", RTLDT_FL_QUAD, RTLDT_FL_QUAD));
-        addFPop2Decoder(FCMPEs, new FP2RegisterDecoder(FCMPEs, "fcmpes", RTLDT_FL_SINGLE, RTLDT_FL_SINGLE));
-        addFPop2Decoder(FCMPEd, new FP2RegisterDecoder(FCMPEd, "fcmped", RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE));
-        addFPop2Decoder(FCMPEq, new FP2RegisterDecoder(FCMPEq, "fcmpeq", RTLDT_FL_QUAD, RTLDT_FL_QUAD));
-    }
-
-    InstructionDecoder getOpfDecoder(int opf) {
-        return (InstructionDecoder) fpop2Decoders.get(new Integer(opf));
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceDecoder.java
deleted file mode 100644
index 0b3a2864ffb..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceDecoder.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-abstract class V9AlternateSpaceDecoder extends MemoryInstructionDecoder
-                    implements V9InstructionDecoder {
-    V9AlternateSpaceDecoder(int op3, String name, int dataType) {
-        super(op3, name, dataType);
-    }
-
-    SPARCRegisterIndirectAddress newRegisterIndirectAddress(SPARCRegister rs1, SPARCRegister rs2) {
-        return new SPARCV9RegisterIndirectAddress(rs1, rs2);
-    }
-
-    SPARCRegisterIndirectAddress newRegisterIndirectAddress(SPARCRegister rs1, int offset) {
-        return new SPARCV9RegisterIndirectAddress(rs1, offset);
-    }
-
-    abstract Instruction decodeV9AsiLoadStore(int instruction,
-                                              SPARCV9RegisterIndirectAddress addr,
-                                              SPARCRegister rd,
-                                              SPARCV9InstructionFactory factory);
-
-    Instruction decodeMemoryInstruction(int instruction,
-                                   SPARCRegisterIndirectAddress addr,
-                                   SPARCRegister rd, SPARCInstructionFactory factory) {
-        SPARCV9RegisterIndirectAddress v9addr = (SPARCV9RegisterIndirectAddress) addr;
-        if (isIBitSet(instruction)) {
-            // indirect asi
-            v9addr.setIndirectAsi(true);
-        } else {
-            // immediate asi
-            int asi = (instruction & ASI_MASK) >>> ASI_START_BIT;
-            v9addr.setAddressSpace(asi);
-        }
-        return decodeV9AsiLoadStore(instruction, v9addr, rd,
-                                    (SPARCV9InstructionFactory) factory);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceLdstubDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceLdstubDecoder.java
deleted file mode 100644
index be49877d1bb..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceLdstubDecoder.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9AlternateSpaceLdstubDecoder extends V9AlternateSpaceDecoder {
-    V9AlternateSpaceLdstubDecoder(int op3, String name, int dataType) {
-        super(op3, name, dataType);
-    }
-
-    Instruction decodeV9AsiLoadStore(int instruction,
-                                     SPARCV9RegisterIndirectAddress addr,
-                                     SPARCRegister rd,
-                                     SPARCV9InstructionFactory factory) {
-        return factory.newLdstubInstruction(name, addr, rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceLoadDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceLoadDecoder.java
deleted file mode 100644
index 8aa2da4cc12..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceLoadDecoder.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9AlternateSpaceLoadDecoder extends V9AlternateSpaceDecoder {
-    V9AlternateSpaceLoadDecoder(int op3, String name, int dataType) {
-        super(op3, name, dataType);
-    }
-
-    Instruction decodeV9AsiLoadStore(int instruction,
-                                     SPARCV9RegisterIndirectAddress addr,
-                                     SPARCRegister rd,
-                                     SPARCV9InstructionFactory factory) {
-        return factory.newLoadInstruction(name, op3, addr, rd, dataType);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpacePrefetchDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpacePrefetchDecoder.java
deleted file mode 100644
index c5a7ec3b1ff..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpacePrefetchDecoder.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9AlternateSpacePrefetchDecoder extends V9AlternateSpaceDecoder {
-    V9AlternateSpacePrefetchDecoder() {
-      // Fake the destination with an integer type so we can get fcn from rd
-      super(PREFETCHA, "prefetcha", RTLDT_SIGNED_WORD);
-    }
-
-    Instruction decodeV9AsiLoadStore(int instruction,
-                                     SPARCV9RegisterIndirectAddress addr,
-                                     SPARCRegister rd,
-                                     SPARCV9InstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        return v9factory.newV9PrefetchInstruction(name, addr, rd.getNumber());
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceStoreDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceStoreDecoder.java
deleted file mode 100644
index 678c362f4b5..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceStoreDecoder.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9AlternateSpaceStoreDecoder extends V9AlternateSpaceDecoder {
-    V9AlternateSpaceStoreDecoder(int op3, String name, int dataType) {
-        super(op3, name, dataType);
-    }
-
-    Instruction decodeV9AsiLoadStore(int instruction,
-                                     SPARCV9RegisterIndirectAddress addr,
-                                     SPARCRegister rd,
-                                     SPARCV9InstructionFactory factory) {
-        return factory.newStoreInstruction(name, op3, addr, rd, dataType);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceSwapDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceSwapDecoder.java
deleted file mode 100644
index 9b1e4263d1d..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9AlternateSpaceSwapDecoder.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9AlternateSpaceSwapDecoder extends V9AlternateSpaceDecoder {
-    V9AlternateSpaceSwapDecoder(int op3, String name, int dataType) {
-        super(op3, name, dataType);
-    }
-
-    Instruction decodeV9AsiLoadStore(int instruction,
-                                     SPARCV9RegisterIndirectAddress addr,
-                                     SPARCRegister rd,
-                                     SPARCV9InstructionFactory factory) {
-        return factory.newSwapInstruction(name, addr, rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9BranchDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9BranchDecoder.java
deleted file mode 100644
index 23b1dcd0cd5..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9BranchDecoder.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-abstract class V9BranchDecoder extends BranchDecoder
-                       implements /* imports */ V9InstructionDecoder {
-    static boolean getPredictTaken(int instruction) {
-        return (PREDICTION_MASK & instruction) != 0;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9CCBranchDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9CCBranchDecoder.java
deleted file mode 100644
index 0b0146e5962..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9CCBranchDecoder.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-abstract class V9CCBranchDecoder extends V9BranchDecoder {
-    abstract int getConditionFlag(int instruction);
-
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        int conditionFlag = getConditionFlag(instruction);
-        boolean predictTaken = getPredictTaken(instruction);
-        int conditionCode = getConditionCode(instruction);
-        boolean annuled = getAnnuledBit(instruction);
-        String name = getConditionName(conditionCode, annuled);
-        // signed word aligned 19 bit
-        PCRelativeAddress addr = new PCRelativeAddress(extractSignedIntFromNBits(instruction, 19) << 2);
-        return v9factory.newV9BranchInstruction(name, addr, annuled, conditionCode,
-                                              predictTaken, conditionFlag);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9CMoveDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9CMoveDecoder.java
deleted file mode 100644
index 7daeac05a94..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9CMoveDecoder.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import sun.jvm.hotspot.utilities.Assert;
-
-abstract class V9CMoveDecoder extends InstructionDecoder
-                   implements V9InstructionDecoder {
-    static private final String iccConditionNames[] = {
-        "n", "e", "le", "l", "leu", "cs", "neg", "vs",
-        "a", "ne", "g", "ge", "gu", "cc", "pos", "vc"
-    };
-
-    static private final String fccConditionNames[] = {
-        "fn", "fne", "flg", "ful", "fl", "fug", "fg", "fu",
-        "fa", "fe",  "fue", "fge", "fuge", "fle", "fule", "fo"
-    };
-
-    static String getConditionName(int conditionCode, int conditionFlag) {
-        return (conditionFlag == icc || conditionFlag == xcc) ?
-                       iccConditionNames[conditionCode]
-                     : fccConditionNames[conditionCode];
-    }
-
-    static int getMoveConditionCode(int instruction) {
-        return (instruction & CMOVE_COND_MASK) >>> CMOVE_COND_START_BIT;
-    }
-
-    static int getRegisterConditionCode(int instruction) {
-        return (instruction & CMOVE_RCOND_MASK) >>> CMOVE_RCOND_START_BIT;
-    }
-
-    static ImmediateOrRegister getCMoveSource(int instruction, int numBits) {
-        ImmediateOrRegister source = null;
-        if (isIBitSet(instruction)) {
-            source = new Immediate(new Short((short) extractSignedIntFromNBits(instruction, numBits)));
-        } else {
-            source = SPARCRegisters.getRegister(getSourceRegister2(instruction));
-        }
-        return source;
-    }
-
-    static String getFloatTypeCode(int dataType) {
-        String result = null;
-        switch(dataType) {
-            case RTLDT_FL_SINGLE:
-                result = "s";
-                break;
-
-            case RTLDT_FL_DOUBLE:
-                result = "d";
-                break;
-
-            case RTLDT_FL_QUAD:
-                result = "q";
-                break;
-
-            default:
-                if (Assert.ASSERTS_ENABLED)
-                    Assert.that(false, "should not reach here");
-        }
-        return result;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9CasDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9CasDecoder.java
deleted file mode 100644
index 6b5e195b30d..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9CasDecoder.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9CasDecoder extends V9AlternateSpaceDecoder {
-    V9CasDecoder(int op3, String name, int dataType) {
-        super(op3, name, dataType);
-    }
-
-    Instruction decodeV9AsiLoadStore(int instruction,
-                                     SPARCV9RegisterIndirectAddress addr,
-                                     SPARCRegister rd,
-                                     SPARCV9InstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        SPARCRegister rs2 = SPARCRegisters.getRegister(getSourceRegister2(instruction));
-        return v9factory.newV9CasInstruction(name, addr, rs2, rd, dataType);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9DoneRetryDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9DoneRetryDecoder.java
deleted file mode 100644
index bff2580e157..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9DoneRetryDecoder.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9DoneRetryDecoder extends InstructionDecoder
-              implements V9InstructionDecoder {
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        Instruction instr = null;
-        int rdNum = getDestinationRegister(instruction);
-        // "rd" field is "fcn". Only values 0 and 1 are defined.
-        // see page 157 - A.11 Done and Retry
-        switch (rdNum) {
-            case 0:
-                instr = v9factory.newV9DoneInstruction();
-                break;
-            case 1:
-                instr = v9factory.newV9RetryInstruction();
-                break;
-            default:
-                instr = v9factory.newIllegalInstruction(instruction);
-                break;
-        }
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FMOVccDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FMOVccDecoder.java
deleted file mode 100644
index 19b472ff882..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FMOVccDecoder.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import sun.jvm.hotspot.utilities.Assert;
-
-class V9FMOVccDecoder extends V9CMoveDecoder implements /* imports */ RTLDataTypes {
-    private final int opf;
-    private final int dataType;
-
-    V9FMOVccDecoder(int opf, int dataType) {
-        this.opf = opf;
-        this.dataType = dataType;
-    }
-
-    private static String getFMoveCCName(int conditionCode, int conditionFlag, int dataType) {
-        StringBuffer buf = new StringBuffer("fmov");
-        buf.append(getFloatTypeCode(dataType));
-        buf.append(getConditionName(conditionCode, conditionFlag));
-        return buf.toString();
-    }
-
-    private static int getFMoveConditionFlag(int instruction) {
-        return (instruction & OPF_CC_MASK) >>> OPF_CC_START_BIT;
-    }
-
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        Instruction instr = null;
-        int conditionFlag = getFMoveConditionFlag(instruction);
-        if (conditionFlag == CFLAG_RESERVED1 || conditionFlag == CFLAG_RESERVED2) {
-            instr = v9factory.newIllegalInstruction(instruction);
-        } else {
-            int rdNum = getDestinationRegister(instruction);
-            int rs1Num = getSourceRegister1(instruction);
-            SPARCRegister rd = RegisterDecoder.decode(dataType, rdNum);
-            int conditionCode = getMoveConditionCode(instruction);
-            SPARCRegister rs = RegisterDecoder.decode(dataType, rs1Num);
-            String name = getFMoveCCName(conditionCode, conditionFlag, dataType);
-            instr = v9factory.newV9FMOVccInstruction(name,opf, conditionCode, conditionFlag,
-                               (SPARCFloatRegister)rs, (SPARCFloatRegister)rd);
-        }
-
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FMOVrDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FMOVrDecoder.java
deleted file mode 100644
index 3febc84c579..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FMOVrDecoder.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9FMOVrDecoder extends V9CMoveDecoder {
-    private final int opf;
-    private final String name;
-    private final int dataType;
-
-    V9FMOVrDecoder(int opf, String name, int dataType) {
-        this.opf = opf;
-        this.name = name;
-        this.dataType = dataType;
-    }
-
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        int regConditionCode = getRegisterConditionCode(instruction);
-        int rdNum = getDestinationRegister(instruction);
-        int rs1Num = getSourceRegister1(instruction);
-        int rs2Num = getSourceRegister2(instruction);
-        SPARCRegister rd = RegisterDecoder.decode(dataType, rdNum);
-        SPARCRegister rs2 = RegisterDecoder.decode(dataType, rs2Num);
-        SPARCRegister rs1 = SPARCRegisters.getRegister(rs1Num);
-        return v9factory.newV9FMOVrInstruction(name, opf, rs1, (SPARCFloatRegister)rs2,
-                              (SPARCFloatRegister)rd, regConditionCode);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FPop1Decoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FPop1Decoder.java
deleted file mode 100644
index db39073e04a..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FPop1Decoder.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import java.util.*;
-
-class V9FPop1Decoder extends FPopDecoder
-                     implements V9InstructionDecoder {
-    static Map v9opfDecoders = new HashMap(); // Map<Integer, InstructionDecoder>
-    static void addV9OpfDecoder(int fpOpcode, InstructionDecoder decoder) {
-        v9opfDecoders.put(new Integer(fpOpcode), decoder);
-    }
-
-    static {
-        addV9OpfDecoder(FMOVd, new FPMoveDecoder(FMOVd, "fmovd", RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE));
-        addV9OpfDecoder(FMOVq, new FPMoveDecoder(FMOVq, "fmovq", RTLDT_FL_QUAD, RTLDT_FL_QUAD));
-        addV9OpfDecoder(FNEGd, new FP2RegisterDecoder(FNEGd, "fnegd", RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE));
-        addV9OpfDecoder(FNEGq, new FP2RegisterDecoder(FNEGq, "fnegq", RTLDT_FL_QUAD, RTLDT_FL_QUAD));
-        addV9OpfDecoder(FABSd, new FP2RegisterDecoder(FABSd, "fabsd", RTLDT_FL_DOUBLE, RTLDT_FL_DOUBLE));
-        addV9OpfDecoder(FABSq, new FP2RegisterDecoder(FABSq, "fabsq", RTLDT_FL_QUAD, RTLDT_FL_QUAD));
-        addV9OpfDecoder(FsTOx, new FP2RegisterDecoder(FsTOx, "fstox", RTLDT_FL_SINGLE, RTLDT_FL_QUAD));
-        addV9OpfDecoder(FdTOx, new FP2RegisterDecoder(FdTOx, "fdtox", RTLDT_FL_DOUBLE, RTLDT_FL_QUAD));
-        addV9OpfDecoder(FqTOx, new FP2RegisterDecoder(FqTOx, "fqtox", RTLDT_FL_QUAD, RTLDT_FL_QUAD));
-        addV9OpfDecoder(FxTOs, new FP2RegisterDecoder(FxTOs, "fxtos", RTLDT_FL_QUAD, RTLDT_FL_SINGLE));
-        addV9OpfDecoder(FxTOd, new FP2RegisterDecoder(FxTOd, "fxtod", RTLDT_FL_QUAD, RTLDT_FL_SINGLE));
-        addV9OpfDecoder(FxTOq, new FP2RegisterDecoder(FxTOq, "fxtoq", RTLDT_FL_QUAD, RTLDT_FL_QUAD));
-    }
-
-    InstructionDecoder getOpfDecoder(int opf) {
-        InstructionDecoder decoder = (InstructionDecoder) V8FPop1Decoder.opfDecoders.get(new Integer(opf));
-        return (decoder !=null)? decoder : (InstructionDecoder) v9opfDecoders.get(new Integer(opf));
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FPop2Decoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FPop2Decoder.java
deleted file mode 100644
index 033d5dc55cc..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FPop2Decoder.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-import java.util.*;
-
-class V9FPop2Decoder extends FPopDecoder
-                     implements V9InstructionDecoder {
-    static Map v9fpop2Decoders = new HashMap(); // Map<Integer, InstructionDecoder>
-    static void addV9FPop2Decoder(int fpOpcode, InstructionDecoder decoder) {
-        v9fpop2Decoders.put(new Integer(fpOpcode), decoder);
-    }
-
-    static {
-        // flag conditional moves
-
-        addV9FPop2Decoder(FMOVs_fcc0, new V9FMOVccDecoder(FMOVs_fcc0, RTLDT_FL_SINGLE));
-        addV9FPop2Decoder(FMOVs_fcc1, new V9FMOVccDecoder(FMOVs_fcc1, RTLDT_FL_SINGLE));
-        addV9FPop2Decoder(FMOVs_fcc2, new V9FMOVccDecoder(FMOVs_fcc2, RTLDT_FL_SINGLE));
-        addV9FPop2Decoder(FMOVs_fcc3, new V9FMOVccDecoder(FMOVs_fcc3, RTLDT_FL_SINGLE));
-        addV9FPop2Decoder(FMOVs_icc, new V9FMOVccDecoder(FMOVs_icc, RTLDT_FL_SINGLE));
-        addV9FPop2Decoder(FMOVs_xcc, new V9FMOVccDecoder(FMOVs_xcc, RTLDT_FL_SINGLE));
-        addV9FPop2Decoder(FMOVd_fcc0, new V9FMOVccDecoder(FMOVd_fcc0, RTLDT_FL_DOUBLE));
-        addV9FPop2Decoder(FMOVd_fcc1, new V9FMOVccDecoder(FMOVd_fcc1, RTLDT_FL_DOUBLE));
-        addV9FPop2Decoder(FMOVd_fcc2, new V9FMOVccDecoder(FMOVd_fcc2, RTLDT_FL_DOUBLE));
-        addV9FPop2Decoder(FMOVd_fcc3, new V9FMOVccDecoder(FMOVd_fcc3, RTLDT_FL_DOUBLE));
-        addV9FPop2Decoder(FMOVd_icc, new V9FMOVccDecoder(FMOVd_icc, RTLDT_FL_DOUBLE));
-        addV9FPop2Decoder(FMOVd_xcc, new V9FMOVccDecoder(FMOVd_xcc, RTLDT_FL_DOUBLE));
-        addV9FPop2Decoder(FMOVq_fcc0, new V9FMOVccDecoder(FMOVq_fcc0, RTLDT_FL_QUAD));
-        addV9FPop2Decoder(FMOVq_fcc1, new V9FMOVccDecoder(FMOVq_fcc1, RTLDT_FL_QUAD));
-        addV9FPop2Decoder(FMOVq_fcc2, new V9FMOVccDecoder(FMOVq_fcc2, RTLDT_FL_QUAD));
-        addV9FPop2Decoder(FMOVq_fcc3, new V9FMOVccDecoder(FMOVq_fcc3, RTLDT_FL_QUAD));
-        addV9FPop2Decoder(FMOVq_icc, new V9FMOVccDecoder(FMOVq_icc, RTLDT_FL_QUAD));
-        addV9FPop2Decoder(FMOVq_xcc, new V9FMOVccDecoder(FMOVq_xcc, RTLDT_FL_QUAD));
-
-        // register conditional moves
-
-        addV9FPop2Decoder(FMOVRsZ, new V9FMOVrDecoder(FMOVRsZ, "fmovrsz", RTLDT_FL_SINGLE));
-        addV9FPop2Decoder(FMOVRsLEZ, new V9FMOVrDecoder(FMOVRsLEZ, "fmovrslez", RTLDT_FL_SINGLE));
-        addV9FPop2Decoder(FMOVRsLZ, new V9FMOVrDecoder(FMOVRsLZ, "fmovrslz", RTLDT_FL_SINGLE));
-        addV9FPop2Decoder(FMOVRsNZ, new V9FMOVrDecoder(FMOVRsNZ, "fmovrsnz", RTLDT_FL_SINGLE));
-        addV9FPop2Decoder(FMOVRsGZ, new V9FMOVrDecoder(FMOVRsGZ, "fmovrsgz", RTLDT_FL_SINGLE));
-        addV9FPop2Decoder(FMOVRsGEZ, new V9FMOVrDecoder(FMOVRsGEZ, "fmovrsgez", RTLDT_FL_SINGLE));
-
-        addV9FPop2Decoder(FMOVRdZ, new V9FMOVrDecoder(FMOVRdZ, "fmovrdz", RTLDT_FL_DOUBLE));
-        addV9FPop2Decoder(FMOVRdLEZ, new V9FMOVrDecoder(FMOVRdLEZ, "fmovrdlez", RTLDT_FL_DOUBLE));
-        addV9FPop2Decoder(FMOVRdLZ, new V9FMOVrDecoder(FMOVRdLZ, "fmovrdlz", RTLDT_FL_DOUBLE));
-        addV9FPop2Decoder(FMOVRdNZ, new V9FMOVrDecoder(FMOVRdNZ, "fmovrdnz", RTLDT_FL_DOUBLE));
-        addV9FPop2Decoder(FMOVRdGZ, new V9FMOVrDecoder(FMOVRdGZ, "fmovrdgz", RTLDT_FL_DOUBLE));
-        addV9FPop2Decoder(FMOVRdGEZ, new V9FMOVrDecoder(FMOVRdGEZ, "fmovrdgez", RTLDT_FL_DOUBLE));
-
-        addV9FPop2Decoder(FMOVRqZ, new V9FMOVrDecoder(FMOVRqZ, "fmovrqz", RTLDT_FL_QUAD));
-        addV9FPop2Decoder(FMOVRqLEZ, new V9FMOVrDecoder(FMOVRqLEZ, "fmovrqlez", RTLDT_FL_QUAD));
-        addV9FPop2Decoder(FMOVRqLZ, new V9FMOVrDecoder(FMOVRqLZ, "fmovrqlz", RTLDT_FL_QUAD));
-        addV9FPop2Decoder(FMOVRqNZ, new V9FMOVrDecoder(FMOVRqNZ, "fmovrqnz", RTLDT_FL_QUAD));
-        addV9FPop2Decoder(FMOVRqGZ, new V9FMOVrDecoder(FMOVRqGZ, "fmovrqgz", RTLDT_FL_QUAD));
-        addV9FPop2Decoder(FMOVRqGEZ, new V9FMOVrDecoder(FMOVRqGEZ, "fmovrqgez", RTLDT_FL_QUAD));
-    }
-
-    InstructionDecoder getOpfDecoder(int opf) {
-        InstructionDecoder decoder = (InstructionDecoder) V8FPop2Decoder.fpop2Decoders.get(new Integer(opf));
-        return (decoder != null) ? decoder : (InstructionDecoder) v9fpop2Decoders.get(new Integer(opf));
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FloatBranchDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FloatBranchDecoder.java
deleted file mode 100644
index 870769a0afc..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FloatBranchDecoder.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-class V9FloatBranchDecoder extends V9CCBranchDecoder {
-    String getConditionName(int conditionCode, boolean isAnnuled) {
-        return isAnnuled ? floatAnnuledConditionNames[conditionCode]
-                         : floatConditionNames[conditionCode];
-    }
-
-    int getConditionFlag(int instruction) {
-        return (FBPfcc_CC_MASK & instruction) >>> FBPfcc_CC_START_BIT;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FlushwDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FlushwDecoder.java
deleted file mode 100644
index b33377644a6..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9FlushwDecoder.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9FlushwDecoder extends InstructionDecoder
-               implements V9InstructionDecoder {
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        Instruction instr = null;
-        // "i" bit has to be zero. see page 169 - A.21 Flush Register Windows.
-        if (isIBitSet(instruction)) {
-            instr = v9factory.newIllegalInstruction(instruction);
-        } else {
-            instr = v9factory.newV9FlushwInstruction();
-        }
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9InstructionDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9InstructionDecoder.java
deleted file mode 100644
index f7213977316..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9InstructionDecoder.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-interface V9InstructionDecoder extends /* imports */ SPARCV9Opcodes {
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9IntegerBranchDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9IntegerBranchDecoder.java
deleted file mode 100644
index f4a70170b81..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9IntegerBranchDecoder.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-class V9IntegerBranchDecoder extends V9CCBranchDecoder {
-    String getConditionName(int conditionCode, boolean isAnnuled) {
-        return isAnnuled ? integerAnnuledConditionNames[conditionCode]
-                         : integerConditionNames[conditionCode];
-    }
-
-    int getConditionFlag(int instruction) {
-        return ((BPcc_CC_MASK & instruction) >>> BPcc_CC_START_BIT) + icc;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9MOVccDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9MOVccDecoder.java
deleted file mode 100644
index 665c96513d8..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9MOVccDecoder.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9MOVccDecoder extends V9CMoveDecoder {
-    private static String getMoveCCName(int conditionCode, int conditionFlag) {
-        return "mov" + getConditionName(conditionCode, conditionFlag);
-    }
-
-    private static int getMoveConditionFlag(int instruction) {
-        boolean cc2Bit = (instruction & CMOVE_CC2_MASK) != 0;
-        int conditionFlag = (instruction & CMOVE_CC0_CC1_MASK) >>> CMOVE_CC_START_BIT;
-        if (cc2Bit) conditionFlag |= (0x4); // 100;
-        return conditionFlag;
-    }
-
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        Instruction instr = null;
-        int conditionFlag = getMoveConditionFlag(instruction);
-        if (conditionFlag == CFLAG_RESERVED1 || conditionFlag == CFLAG_RESERVED2) {
-            instr = v9factory.newIllegalInstruction(instruction);
-        } else {
-            int rdNum = getDestinationRegister(instruction);
-            SPARCRegister rd = SPARCRegisters.getRegister(rdNum);
-            int conditionCode = getMoveConditionCode(instruction);
-            ImmediateOrRegister source = getCMoveSource(instruction, 11);
-            String name = getMoveCCName(conditionCode, conditionFlag);
-            instr = v9factory.newV9MOVccInstruction(name, conditionCode, conditionFlag, source, rd);
-        }
-
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9MOVrDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9MOVrDecoder.java
deleted file mode 100644
index d5afacb0dd3..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9MOVrDecoder.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9MOVrDecoder extends V9CMoveDecoder {
-    private static final String regConditionNames[] = {
-        null, "movrz", "movrlez", "movrlz", null, "movrnz", "movrgz", "movrgez"
-    };
-
-    private static String getMOVrName(int conditionCode) {
-        return regConditionNames[conditionCode];
-    }
-
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        Instruction instr = null;
-        int regConditionCode = getRegisterConditionCode(instruction);
-        String name = getMOVrName(regConditionCode);
-        if (name == null) {
-            instr = v9factory.newIllegalInstruction(instruction);
-        } else {
-            int rdNum = getDestinationRegister(instruction);
-            SPARCRegister rd = SPARCRegisters.getRegister(rdNum);
-            SPARCRegister rs1 = SPARCRegisters.getRegister(getSourceRegister1(instruction));
-            ImmediateOrRegister operand2 = getCMoveSource(instruction, 10);
-            instr = v9factory.newV9MOVrInstruction(name, rs1, operand2, rd, regConditionCode);
-        }
-
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9PopcDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9PopcDecoder.java
deleted file mode 100644
index 44ffd52e57c..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9PopcDecoder.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9PopcDecoder extends InstructionDecoder
-              implements V9InstructionDecoder {
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        int rs1Num = getSourceRegister1(instruction);
-        Instruction instr = null;
-        // in POPC, rs1 should be zero. see page 205 - A.41 Population Count
-        if (rs1Num != 0) {
-            instr = v9factory.newIllegalInstruction(instruction);
-        } else {
-            SPARCRegister rd = SPARCRegisters.getRegister(getDestinationRegister(instruction));
-            instr = v9factory.newV9PopcInstruction(getOperand2(instruction), rd);
-        }
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9PrefetchDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9PrefetchDecoder.java
deleted file mode 100644
index 75593ba83d2..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9PrefetchDecoder.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9PrefetchDecoder extends MemoryInstructionDecoder
-           implements V9InstructionDecoder {
-    V9PrefetchDecoder() {
-      // Fake the destination with an integer type so we can get fcn from rd
-      super(PREFETCH, "prefetch", RTLDT_SIGNED_WORD);
-    }
-
-    Instruction decodeMemoryInstruction(int instruction,
-                                   SPARCRegisterIndirectAddress addr,
-                                   SPARCRegister rd, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        return v9factory.newV9PrefetchInstruction(name, addr, rd.getNumber());
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9PrivilegedReadWriteDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9PrivilegedReadWriteDecoder.java
deleted file mode 100644
index 20840faf01a..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9PrivilegedReadWriteDecoder.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-abstract class V9PrivilegedReadWriteDecoder extends InstructionDecoder
-                  implements V9InstructionDecoder {
-    static boolean isLegalPrivilegedRegister(int reg) {
-        return (reg > -1 && reg < 16) || reg == 31;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9RdprDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9RdprDecoder.java
deleted file mode 100644
index 4318c3efd2f..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9RdprDecoder.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9RdprDecoder extends V9PrivilegedReadWriteDecoder {
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        Instruction instr = null;
-        int prNum = getSourceRegister1(instruction);
-        if (isLegalPrivilegedRegister(prNum)) {
-            SPARCRegister rd = SPARCRegisters.getRegister(getDestinationRegister(instruction));
-            instr = v9factory.newV9RdprInstruction(prNum, rd);
-        } else {
-            instr = v9factory.newIllegalInstruction(instruction);
-        }
-
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9ReadDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9ReadDecoder.java
deleted file mode 100644
index e4b99e2dbe8..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9ReadDecoder.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9ReadDecoder extends InstructionDecoder
-              implements V9InstructionDecoder {
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        Instruction instr = null;
-        int specialRegNum = getSourceRegister1(instruction);
-
-        // rs1 values 1, 7-14 are reserved - see page 214, A.44 Read State Register.
-        if (specialRegNum == 1 || (specialRegNum > 6 && specialRegNum < 15)) {
-            instr = v9factory.newIllegalInstruction(instruction);
-        } else {
-            int rdNum = getDestinationRegister(instruction);
-            if (specialRegNum == 15) {
-                // may be stbar, member or illegal
-                if (rdNum == 0) {
-                    boolean iBit = isIBitSet(instruction);
-                    if (iBit) {
-                        instr = v9factory.newV9MembarInstruction((instruction & MMASK_MASK) >>> MMASK_START_BIT,
-                                                        (instruction & CMASK_MASK) >>> CMASK_START_BIT);
-                    } else {
-                        instr = v9factory.newStbarInstruction();
-                    }
-                } else { // rd != 0 && rs1 == 15
-                    instr = v9factory.newIllegalInstruction(instruction);
-                }
-             } else {
-                int asrRegNum = -1;
-                if (specialRegNum > 15){
-                    asrRegNum = specialRegNum;
-                    specialRegNum = SPARCV9SpecialRegisters.ASR;
-                }
-                SPARCRegister rd = SPARCRegisters.getRegister(rdNum);
-                instr = v9factory.newV9ReadInstruction(specialRegNum, asrRegNum, rd);
-             }
-        }
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9RegisterBranchDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9RegisterBranchDecoder.java
deleted file mode 100644
index 60c81fe7a1e..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9RegisterBranchDecoder.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-abstract class V9RegisterBranchDecoder extends V9BranchDecoder {
-    static int getDisp16(int instruction) {
-        int offset = (DISP_16_LO_MASK & instruction)  |
-           ((DISP_16_HI_MASK & instruction) >>> (DISP_16_HI_START_BIT - DISP_16_LO_NUMBITS));
-
-        // sign extend and word align
-        offset = extractSignedIntFromNBits(offset, 16);
-        offset <<= 2;
-
-        return offset;
-    }
-
-    String getConditionName(int conditionCode, boolean isAnnuled) {
-        return null;
-    }
-
-    abstract String getRegisterConditionName(int rcond);
-
-    public Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        int rcond = (BRANCH_RCOND_MASK & instruction) >>> BRANCH_RCOND_START_BIT;
-        if (rcond == BRANCH_RCOND_RESERVED1 || rcond == BRANCH_RCOND_RESERVED2)
-            return factory.newIllegalInstruction(instruction);
-
-        SPARCRegister rs1 = SPARCRegisters.getRegister(getSourceRegister1(instruction));
-        boolean predictTaken = getPredictTaken(instruction);
-        boolean annuled = getAnnuledBit(instruction);
-        PCRelativeAddress addr = new PCRelativeAddress(getDisp16(instruction));
-        String name = getRegisterConditionName(rcond);
-        return v9factory.newV9RegisterBranchInstruction(name, addr, annuled, rcond, rs1, predictTaken);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9SavedRestoredDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9SavedRestoredDecoder.java
deleted file mode 100644
index 5e04ece4148..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9SavedRestoredDecoder.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9SavedRestoredDecoder extends InstructionDecoder
-              implements V9InstructionDecoder {
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        Instruction instr = null;
-        int rdNum = getDestinationRegister(instruction);
-        // "rd" field is "fcn". Only values 0 and 1 are defined.
-        // see page 219 - A.47 Saved and Restored
-        switch (rdNum) {
-            case 0:
-                instr = v9factory.newV9SavedInstruction();
-                break;
-            case 1:
-                instr = v9factory.newV9RestoredInstruction();
-                break;
-            default:
-                instr = v9factory.newIllegalInstruction(instruction);
-                break;
-        }
-
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9ShiftDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9ShiftDecoder.java
deleted file mode 100644
index e42a085a08e..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9ShiftDecoder.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9ShiftDecoder extends InstructionDecoder
-                     implements V9InstructionDecoder {
-    final int op3;
-    final String name;
-    final int rtlOperation;
-
-    V9ShiftDecoder(int op3, String name, int rtlOperation) {
-        this.op3 = op3;
-        this.name = name;
-        this.rtlOperation = rtlOperation;
-    }
-
-    static boolean isXBitSet(int instruction) {
-        return (instruction & X_MASK) != 0;
-    }
-
-    Instruction decode(int instruction,
-                       SPARCInstructionFactory factory) {
-        SPARCRegister rs1 = SPARCRegisters.getRegister(getSourceRegister1(instruction));
-        SPARCRegister rd = SPARCRegisters.getRegister(getDestinationRegister(instruction));
-        boolean xBit = isXBitSet(instruction);
-        ImmediateOrRegister operand2 = null;
-
-        if (isIBitSet(instruction)) {
-            // look for 64 bits shift operations.
-            int value = instruction & ( xBit ? SHIFT_COUNT_6_MASK : SHIFT_COUNT_5_MASK);
-            operand2 = new Immediate(new Short((short) value));
-        } else {
-            operand2 = SPARCRegisters.getRegister(getSourceRegister2(instruction));
-        }
-
-        return factory.newShiftInstruction(xBit? name + "x" : name, op3, rtlOperation, rs1, operand2, rd);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9SpecialLoadDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9SpecialLoadDecoder.java
deleted file mode 100644
index 290acb71592..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9SpecialLoadDecoder.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9SpecialLoadDecoder extends MemoryInstructionDecoder
-               implements V9InstructionDecoder {
-    V9SpecialLoadDecoder(int op3) {
-        super(op3, "ld[x]fsr", RTLDT_UNKNOWN);
-    }
-
-    Instruction decodeMemoryInstruction(int instruction,
-                               SPARCRegisterIndirectAddress addr,
-                               SPARCRegister rd, SPARCInstructionFactory factory) {
-        return factory.newSpecialLoadInstruction(rd == SPARCRegisters.G0? "ld" : "ldx",
-                                                SPARCSpecialRegisters.FSR, -1,
-                                                addr);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9SpecialStoreDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9SpecialStoreDecoder.java
deleted file mode 100644
index 4b82b8188a0..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9SpecialStoreDecoder.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9SpecialStoreDecoder extends MemoryInstructionDecoder
-               implements V9InstructionDecoder {
-    V9SpecialStoreDecoder(int op3) {
-        super(op3, "st[x]fsr", RTLDT_UNKNOWN);
-    }
-
-    Instruction decodeMemoryInstruction(int instruction,
-                               SPARCRegisterIndirectAddress addr,
-                               SPARCRegister rd, SPARCInstructionFactory factory) {
-        return factory.newSpecialStoreInstruction(rd == SPARCRegisters.G0? "st" : "stx",
-                                                SPARCSpecialRegisters.FSR, -1,
-                                                addr);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9WriteDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9WriteDecoder.java
deleted file mode 100644
index 948c0dc5c80..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9WriteDecoder.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9WriteDecoder extends InstructionDecoder
-              implements V9InstructionDecoder {
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        Instruction instr = null;
-        int specialRegNum = getDestinationRegister(instruction);
-
-        // rd values 1, 4,5 7-14 are reserved - see page 244, A.63 Write State Register.
-        if (specialRegNum == 1 || specialRegNum == 4 || specialRegNum == 5
-            || (specialRegNum > 6 && specialRegNum < 15)) {
-            instr = v9factory.newIllegalInstruction(instruction);
-        } else {
-            int rs1Num = getSourceRegister1(instruction);
-            if (specialRegNum == 15) {
-                if (isIBitSet(instruction) && rs1Num == 0) {
-                    instr = v9factory.newV9SirInstruction();
-                } else {
-                    instr = v9factory.newIllegalInstruction(instruction);
-                }
-            } else {
-                int asrRegNum = -1;
-                if (specialRegNum > 15) {
-                    asrRegNum = specialRegNum;
-                    specialRegNum = SPARCV9SpecialRegisters.ASR;
-                }
-                SPARCRegister rs1 = SPARCRegisters.getRegister(rs1Num);
-                instr = v9factory.newV9WriteInstruction(specialRegNum, asrRegNum, rs1, getOperand2(instruction));
-            }
-        }
-
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9WrprDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9WrprDecoder.java
deleted file mode 100644
index fa147938bdf..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9WrprDecoder.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class V9WrprDecoder extends V9PrivilegedReadWriteDecoder {
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        SPARCV9InstructionFactory v9factory = (SPARCV9InstructionFactory) factory;
-        Instruction instr = null;
-        int prNum = getDestinationRegister(instruction);
-        if (isLegalPrivilegedRegister(prNum)) {
-            SPARCRegister rs1 = SPARCRegisters.getRegister(getSourceRegister1(instruction));
-            ImmediateOrRegister operand2 = getOperand2(instruction);
-            instr = v9factory.newV9WrprInstruction(rs1, operand2, prNum);
-        } else {
-            instr = v9factory.newIllegalInstruction(instruction);
-        }
-
-        return instr;
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/WriteDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/WriteDecoder.java
deleted file mode 100644
index 0d760b736d8..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/WriteDecoder.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.sparc;
-
-import sun.jvm.hotspot.asm.*;
-
-class WriteDecoder extends ReadWriteDecoder {
-    WriteDecoder(int specialRegNum) {
-        super(specialRegNum);
-    }
-
-    Instruction decodeReadWrite(int instruction, SPARCInstructionFactory factory,
-                                int rs1Num, int rdNum) {
-        Instruction instr = null;
-        int specialReg = specialRegNum;
-        if (rdNum == 0)
-            specialReg = SPARCSpecialRegisters.Y;
-        return factory.newWriteInstruction(specialReg, rdNum,
-                              SPARCRegisters.getRegister(rs1Num),
-                              getOperand2(instruction));
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/ArithmeticDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/ArithmeticDecoder.java
deleted file mode 100644
index 23cc5a611b6..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/ArithmeticDecoder.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-import sun.jvm.hotspot.asm.*;
-
-public class ArithmeticDecoder extends InstructionDecoder {
-   private int rtlOperation;
-
-   public ArithmeticDecoder(String name, int addrMode1, int operandType1, int rtlOperation) {
-      super(name, addrMode1, operandType1);
-      this.rtlOperation = rtlOperation;
-   }
-   public ArithmeticDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2, int rtlOperation) {
-      super(name, addrMode1, operandType1, addrMode2, operandType2);
-      this.rtlOperation = rtlOperation;
-   }
-   public ArithmeticDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2, int addrMode3, int operandType3, int rtlOperation) {
-      super(name, addrMode1, operandType1, addrMode2, operandType2, addrMode3, operandType3);
-      this.rtlOperation = rtlOperation;
-   }
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
-      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
-      Operand op3 = getOperand3(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-      return factory.newArithmeticInstruction(name, rtlOperation, op1, op2, op3, size, prefixes);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/BranchDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/BranchDecoder.java
deleted file mode 100644
index fd47df8740a..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/BranchDecoder.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-import sun.jvm.hotspot.utilities.*;
-
-public class BranchDecoder extends InstructionDecoder {
-
-   public BranchDecoder(String name) {
-      super(name);
-   }
-   public BranchDecoder(String name, int addrMode1, int operandType1) {
-      super(name, addrMode1, operandType1);
-   }
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand addr = getOperand1(bytesArray, operandSize, addrSize);
-      if (Assert.ASSERTS_ENABLED) {
-         Assert.that(addr == null || addr instanceof X86PCRelativeAddress, "Address should be PC Relative!");
-      }
-      int size = byteIndex - instrStartIndex;
-      return factory.newBranchInstruction(name, (X86PCRelativeAddress)addr, size, prefixes);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/CallDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/CallDecoder.java
deleted file mode 100644
index 12a7e1da892..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/CallDecoder.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class CallDecoder extends InstructionDecoder {
-    public CallDecoder(String name, int addrMode1, int operandType1) {
-        super(name, addrMode1, operandType1);
-    }
-    protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-        Operand operand = getOperand1(bytesArray, operandSize, addrSize);
-        int size = byteIndex - instrStartIndex;
-        Address address;
-        if (operand instanceof X86Register) {
-            address = new X86RegisterDirectAddress((X86Register)operand);
-        } else {
-            address = (Address) operand;
-        }
-        return factory.newCallInstruction(name, address, size, prefixes);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/ConditionalJmpDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/ConditionalJmpDecoder.java
deleted file mode 100644
index bedd5a2aefe..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/ConditionalJmpDecoder.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-import sun.jvm.hotspot.utilities.*;
-
-public class ConditionalJmpDecoder extends InstructionDecoder {
-
-   public ConditionalJmpDecoder(String name, int addrMode1, int operandType1) {
-      super(name, addrMode1, operandType1);
-   }
-
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand addr = getOperand1(bytesArray, operandSize, addrSize);
-      if (Assert.ASSERTS_ENABLED) {
-        Assert.that(addr instanceof X86PCRelativeAddress, "Address should be PC Relative!");
-      }
-      return factory.newCondJmpInstruction(name, (X86PCRelativeAddress)addr, byteIndex-instrStartIndex, prefixes);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FPArithmeticDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FPArithmeticDecoder.java
deleted file mode 100644
index 74d9e970d1f..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FPArithmeticDecoder.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class FPArithmeticDecoder extends FPInstructionDecoder {
-   private int rtlOperation;
-
-   public FPArithmeticDecoder(String name, int addrMode1, int operandType1, int rtlOperation) {
-      super(name, addrMode1, operandType1);
-      this.rtlOperation = rtlOperation;
-   }
-   public FPArithmeticDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2, int rtlOperation) {
-      super(name, addrMode1, operandType1, addrMode2, operandType2);
-      this.rtlOperation = rtlOperation;
-   }
-
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
-      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-      return factory.newFPArithmeticInstruction(name, rtlOperation, op1, op2, size, prefixes);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FPInstructionDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FPInstructionDecoder.java
deleted file mode 100644
index 885a3591173..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FPInstructionDecoder.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-// basic float instruction decoder class
-public class FPInstructionDecoder extends InstructionDecoder {
-
-   public FPInstructionDecoder(String name) {
-      super(name);
-   }
-   public FPInstructionDecoder(String name, int addrMode1, int operandType1) {
-      super(name, addrMode1, operandType1);
-   }
-   public FPInstructionDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2) {
-      super(name, addrMode1, operandType1, addrMode2, operandType2);
-   }
-
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-      return new X86FPInstruction(name, op1, size, prefixes);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FPLoadDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FPLoadDecoder.java
deleted file mode 100644
index 630b550b985..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FPLoadDecoder.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-class FPLoadDecoder extends FPInstructionDecoder {
-   FPLoadDecoder(String name, int addrMode1, int operandType1) {
-      super(name, addrMode1, operandType1);
-   }
-
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand op = getOperand1(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-      return factory.newFPLoadInstruction(name, op, size, prefixes);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FPStoreDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FPStoreDecoder.java
deleted file mode 100644
index 6939c003c96..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FPStoreDecoder.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-class FPStoreDecoder extends FPInstructionDecoder {
-   FPStoreDecoder(String name, int addrMode1, int operandType1) {
-      super(name, addrMode1, operandType1);
-   }
-
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand op = getOperand1(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-      return factory.newFPStoreInstruction(name, op, size, prefixes);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FloatDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FloatDecoder.java
deleted file mode 100644
index cedfac4f0f3..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FloatDecoder.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class FloatDecoder extends FPInstructionDecoder {
-
-   public FloatDecoder() {
-      super(null);
-   }
-
-   //Please refer to IA-32 Intel Architecture Software Developer's Manual Volume 2
-   //APPENDIX A - Escape opcodes
-
-   /*When ModR/M byte is within 00h to BFh*/
-   private static final FPInstructionDecoder floatMapOne[][] = {
-      /* d8 */
-      {
-      new FPArithmeticDecoder("fadds", ADDR_E, v_mode, RTLOP_ADD),
-      new FPArithmeticDecoder("fmuls", ADDR_E, v_mode, RTLOP_SMUL),
-      new FPInstructionDecoder("fcoms", ADDR_E, v_mode),
-      new FPInstructionDecoder("fcomps", ADDR_E, v_mode),
-      new FPArithmeticDecoder("fsubs", ADDR_E, v_mode, RTLOP_SUB),
-      new FPArithmeticDecoder("fsubrs", ADDR_E, v_mode, RTLOP_SUB),
-      new FPArithmeticDecoder("fdivs", ADDR_E, v_mode, RTLOP_SDIV),
-      new FPArithmeticDecoder("fdivrs", ADDR_E, v_mode, RTLOP_SDIV)
-      },
-      /*  d9 */
-      {
-      new FPLoadDecoder("flds", ADDR_E, v_mode),
-      null,
-      new FPStoreDecoder("fsts", ADDR_E, v_mode),
-      new FPStoreDecoder("fstps", ADDR_E, v_mode),
-      new FPStoreDecoder("fldenv", ADDR_E, v_mode),
-      new FPStoreDecoder("fldcw", ADDR_E, v_mode),
-      new FPStoreDecoder("fNstenv", ADDR_E, v_mode),
-      new FPStoreDecoder("fNstcw", ADDR_E, v_mode)
-      },
-      /* da */
-      {
-      new FPArithmeticDecoder("fiaddl", ADDR_E, v_mode, RTLOP_ADD),
-      new FPArithmeticDecoder("fimull", ADDR_E, v_mode, RTLOP_SMUL),
-      new FPInstructionDecoder("ficoml", ADDR_E, v_mode),
-      new FPInstructionDecoder("ficompl", ADDR_E, v_mode),
-      new FPArithmeticDecoder("fisubl", ADDR_E, v_mode, RTLOP_SUB),
-      new FPArithmeticDecoder("fisubrl", ADDR_E, v_mode, RTLOP_SUB),
-      new FPArithmeticDecoder("fidivl", ADDR_E, v_mode, RTLOP_SDIV),
-      new FPArithmeticDecoder("fidivrl", ADDR_E, v_mode, RTLOP_SDIV)
-      },
-      /* db */
-      {
-      new FPLoadDecoder("fildl", ADDR_E, v_mode),
-      null,
-      new FPStoreDecoder("fistl", ADDR_E, v_mode),
-      new FPStoreDecoder("fistpl", ADDR_E, v_mode),
-      null,
-      new FPLoadDecoder("fldt", ADDR_E, v_mode),
-      null,
-      new FPStoreDecoder("fstpt", ADDR_E, v_mode)
-      },
-      /* dc */
-      {
-      new FPArithmeticDecoder("faddl", ADDR_E, v_mode, RTLOP_ADD),
-      new FPArithmeticDecoder("fmull", ADDR_E, v_mode, RTLOP_SMUL),
-      new FPInstructionDecoder("fcoml", ADDR_E, v_mode),
-      new FPInstructionDecoder("fcompl", ADDR_E, v_mode),
-      new FPArithmeticDecoder("fsubl", ADDR_E, v_mode, RTLOP_SUB),
-      new FPArithmeticDecoder("fsubrl", ADDR_E, v_mode, RTLOP_SUB),
-      new FPArithmeticDecoder("fdivl", ADDR_E, v_mode, RTLOP_SDIV),
-      new FPArithmeticDecoder("fdivrl", ADDR_E, v_mode, RTLOP_SDIV)
-      },
-      /* dd */
-      {
-      new FPLoadDecoder("fldl", ADDR_E, v_mode),
-      null,
-      new FPStoreDecoder("fstl", ADDR_E, v_mode),
-      new FPStoreDecoder("fstpl", ADDR_E, v_mode),
-      new FPStoreDecoder("frstor", ADDR_E, v_mode),
-      null,
-      new FPStoreDecoder("fNsave", ADDR_E, v_mode),
-      new FPStoreDecoder("fNstsw", ADDR_E, v_mode)
-      },
-      /* de */
-      {
-      new FPArithmeticDecoder("fiadd", ADDR_E, v_mode, RTLOP_ADD),
-      new FPArithmeticDecoder("fimul", ADDR_E, v_mode, RTLOP_SMUL),
-      new FPInstructionDecoder("ficom", ADDR_E, v_mode),
-      new FPInstructionDecoder("ficomp", ADDR_E, v_mode),
-      new FPArithmeticDecoder("fisub", ADDR_E, v_mode, RTLOP_SUB),
-      new FPArithmeticDecoder("fisubr", ADDR_E, v_mode, RTLOP_SUB),
-      new FPArithmeticDecoder("fidiv", ADDR_E, v_mode, RTLOP_SDIV),
-      new FPArithmeticDecoder("fidivr", ADDR_E, v_mode, RTLOP_SDIV)
-      },
-      /* df */
-      {
-      new FPLoadDecoder("fild", ADDR_E, v_mode),
-      null,
-      new FPStoreDecoder("fist", ADDR_E, v_mode),
-      new FPStoreDecoder("fistp", ADDR_E, v_mode),
-      new FPLoadDecoder("fbld", ADDR_E, v_mode),
-      new FPLoadDecoder("fildll", ADDR_E, v_mode),
-      new FPStoreDecoder("fbstp", ADDR_E, v_mode),
-      new FPStoreDecoder("fistpll", ADDR_E, v_mode)
-      }
-   };
-
-   /*When ModR/M byte is outside 00h to BFh*/
-   private static final FPInstructionDecoder floatMapTwo[][] = {
-
-      /* d8 */
-      /*parameter for ADDR_FPREG, 0 means ST(0), 1 means ST at rm value. */
-      {
-      new FPArithmeticDecoder("fadd", ADDR_FPREG, 0, ADDR_FPREG, 1, RTLOP_ADD),
-      new FPArithmeticDecoder("fmul", ADDR_FPREG, 0, ADDR_FPREG, 1, RTLOP_SMUL),
-      new FPInstructionDecoder("fcom", ADDR_FPREG, 1),
-      new FPInstructionDecoder("fcomp", ADDR_FPREG, 1),
-      new FPArithmeticDecoder("fsub", ADDR_FPREG, 0, ADDR_FPREG, 1, RTLOP_SUB),
-      new FPArithmeticDecoder("fsubr", ADDR_FPREG, 0, ADDR_FPREG, 1, RTLOP_SUB),
-      new FPArithmeticDecoder("fdiv", ADDR_FPREG, 0, ADDR_FPREG, 1, RTLOP_SDIV),
-      new FPArithmeticDecoder("fdivr", ADDR_FPREG, 0, ADDR_FPREG, 1, RTLOP_SDIV)
-      },
-      /* d9 */
-      {
-      new FPLoadDecoder("fld", ADDR_FPREG, 1),
-      new FPInstructionDecoder("fxch", ADDR_FPREG, 1),
-      new FloatGRPDecoder(null, 0),
-      null,
-      new FloatGRPDecoder(null, 1),
-      new FloatGRPDecoder(null, 2),
-      new FloatGRPDecoder(null, 3),
-      new FloatGRPDecoder(null, 4)
-      },
-      /* da */
-      {
-      null,
-      null,
-      null,
-      null,
-      null,
-      new FloatGRPDecoder(null, 5),
-      null,
-      null
-      },
-      /* db */
-      {
-      null,
-      null,
-      null,
-      null,
-      new FloatGRPDecoder(null, 6),
-      null,
-      null,
-      null
-      },
-      /* dc */
-      {
-      new FPArithmeticDecoder("fadd", ADDR_FPREG, 1, ADDR_FPREG, 0, RTLOP_ADD),
-      new FPArithmeticDecoder("fmul", ADDR_FPREG, 1, ADDR_FPREG, 0, RTLOP_SMUL),
-      null,
-      null,
-      new FPArithmeticDecoder("fsub", ADDR_FPREG, 1, ADDR_FPREG, 0, RTLOP_SUB),
-      new FPArithmeticDecoder("fsubr",ADDR_FPREG, 1, ADDR_FPREG, 0, RTLOP_SUB),
-      new FPArithmeticDecoder("fdiv", ADDR_FPREG, 1, ADDR_FPREG, 0, RTLOP_SDIV),
-      new FPArithmeticDecoder("fdivr", ADDR_FPREG, 1, ADDR_FPREG, 0, RTLOP_SDIV)
-      },
-      /* dd */
-      {
-      new FPInstructionDecoder("ffree", ADDR_FPREG, 1),
-      null,
-      new FPStoreDecoder("fst", ADDR_FPREG, 1),
-      new FPStoreDecoder("fstp", ADDR_FPREG, 1),
-      new FPInstructionDecoder("fucom", ADDR_FPREG, 1),
-      new FPInstructionDecoder("fucomp", ADDR_FPREG, 1),
-      null,
-      null
-      },
-      /* de */
-      {
-      new FPArithmeticDecoder("faddp", ADDR_FPREG, 1, ADDR_FPREG, 0, RTLOP_ADD),
-      new FPArithmeticDecoder("fmulp", ADDR_FPREG, 1, ADDR_FPREG, 0, RTLOP_SMUL),
-      null,
-      new FloatGRPDecoder(null, 7),
-      new FPArithmeticDecoder("fsubrp", ADDR_FPREG, 1, ADDR_FPREG, 0, RTLOP_SUB),
-      new FPArithmeticDecoder("fsubp", ADDR_FPREG, 1, ADDR_FPREG, 0, RTLOP_SUB),
-      new FPArithmeticDecoder("fdivrp", ADDR_FPREG, 1, ADDR_FPREG, 0, RTLOP_SDIV),
-      new FPArithmeticDecoder("fdivp", ADDR_FPREG, 1, ADDR_FPREG, 0, RTLOP_SDIV)
-      },
-      /* df */
-      {
-      null,
-      null,
-      null,
-      null,
-      new FloatGRPDecoder(null, 7),
-      null,
-      null,
-      null
-      }
-   };
-
-   public Instruction decode(byte[] bytesArray, int index, int instrStartIndex, int segmentOverride, int prefixes, X86InstructionFactory factory) {
-      this.byteIndex = index;
-      this.instrStartIndex = instrStartIndex;
-      this.prefixes = prefixes;
-
-      int ModRM = readByte(bytesArray, byteIndex);
-      int reg = (ModRM >> 3) & 7;
-      int regOrOpcode = (ModRM >> 3) & 7;
-      int rm = ModRM & 7;
-
-      int floatOpcode = InstructionDecoder.readByte(bytesArray, instrStartIndex);
-      FPInstructionDecoder instrDecoder = null;
-
-      if(ModRM < 0xbf) {
-         instrDecoder = floatMapOne[floatOpcode - 0xd8][reg];
-      }
-      else {
-         instrDecoder = floatMapTwo[floatOpcode - 0xd8][reg];
-      }
-
-      Instruction instr = null;
-      if(instrDecoder != null) {
-         instr = instrDecoder.decode(bytesArray, byteIndex, instrStartIndex, segmentOverride, prefixes, factory);
-         byteIndex = instrDecoder.getCurrentIndex();
-      } else {
-          instr = factory.newIllegalInstruction();
-      }
-      return instr;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FloatGRPDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FloatGRPDecoder.java
deleted file mode 100644
index 95422b7716a..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/FloatGRPDecoder.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class FloatGRPDecoder extends FPInstructionDecoder {
-
-   final private int number;
-
-   //Please refer to IA-32 Intel Architecture Software Developer's Manual Volume 2
-   //APPENDIX A - Escape opcodes
-
-   private static final FPInstructionDecoder floatGRPMap[][] = {
-      /* d9_2 */
-      {
-      new FPInstructionDecoder("fnop"),
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null
-      },
-      /*  d9_4 */
-      {
-      new FPInstructionDecoder("fchs"),
-      new FPInstructionDecoder("fabs"),
-      null,
-      null,
-      new FPInstructionDecoder("ftst"),
-      new FPInstructionDecoder("fxam"),
-      null,
-      null
-      },
-      /* d9_5 */
-      {
-      new FPInstructionDecoder("fld1"),
-      new FPInstructionDecoder("fldl2t"),
-      new FPInstructionDecoder("fldl2e"),
-      new FPInstructionDecoder("fldpi"),
-      new FPInstructionDecoder("fldlg2"),
-      new FPInstructionDecoder("fldln2"),
-      new FPInstructionDecoder("fldz"),
-      null
-      },
-      /* d9_6 */
-      {
-      new FPInstructionDecoder("f2xm1"),
-      new FPInstructionDecoder("fyl2x"),
-      new FPInstructionDecoder("fptan"),
-      new FPInstructionDecoder("fpatan"),
-      new FPInstructionDecoder("fxtract"),
-      new FPInstructionDecoder("fprem1"),
-      new FPInstructionDecoder("fdecstp"),
-      new FPInstructionDecoder("fincstp")
-      },
-      /* d9_7 */
-      {
-      new FPInstructionDecoder("fprem"),
-      new FPInstructionDecoder("fyl2xp1"),
-      new FPInstructionDecoder("fsqrt"),
-      new FPInstructionDecoder("fsincos"),
-      new FPInstructionDecoder("frndint"),
-      new FPInstructionDecoder("fscale"),
-      new FPInstructionDecoder("fsin"),
-      new FPInstructionDecoder("fcos")
-      },
-      /* da_5 */
-      {
-      null,
-      new FPInstructionDecoder("fucompp"),
-      null,
-      null,
-      null,
-      null,
-      null,
-      null
-      },
-      /* db_4 */
-      {
-      new FPInstructionDecoder("feni(287 only)"),
-      new FPInstructionDecoder("fdisi(287 only)"),
-      new FPInstructionDecoder("fNclex"),
-      new FPInstructionDecoder("fNinit"),
-      new FPInstructionDecoder("fNsetpm(287 only)"),
-      null,
-      null,
-      null
-      },
-      /* de_3 */
-      {
-      null,
-      new FPInstructionDecoder("fcompp"),
-      null,
-      null,
-      null,
-      null,
-      null,
-      null
-      },
-      /* df_4 */
-      {
-      new FPInstructionDecoder("fNstsw"),
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null
-      }
-   };
-
-   public FloatGRPDecoder(String name, int number) {
-      super(name);
-      this.number = number;
-   }
-
-   public Instruction decode(byte[] bytesArray, int index, int instrStartIndex, int segmentOverride, int prefixes, X86InstructionFactory factory) {
-      this.byteIndex = index;
-      this.instrStartIndex = instrStartIndex;
-      this.prefixes = prefixes;
-
-      int ModRM = readByte(bytesArray, byteIndex);
-      int rm = ModRM & 7;
-
-      FPInstructionDecoder instrDecoder = null;
-      instrDecoder = floatGRPMap[number][rm];
-
-      Instruction instr = null;
-      if(instrDecoder != null) {
-         instr = instrDecoder.decode(bytesArray, byteIndex, instrStartIndex, segmentOverride, prefixes, factory);
-         byteIndex = instrDecoder.getCurrentIndex();
-      } else {
-         instr = factory.newIllegalInstruction();
-      }
-      return instr;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/GRPDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/GRPDecoder.java
deleted file mode 100644
index 479ac7abdf8..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/GRPDecoder.java
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class GRPDecoder extends InstructionDecoder {
-
-   final private int number;
-   //Please refer to IA-32 Intel Architecture Software Developer's Manual Volume 2
-   //APPENDIX A - Table A-4. Opcode Extensions for One and Two-byte Opcodes by Group Number.
-   private static final InstructionDecoder grpTable[][] = {
-      {
-      new ArithmeticDecoder("addb", ADDR_E, b_mode, ADDR_I, b_mode, RTLOP_ADD),
-      new LogicalDecoder("orb", ADDR_E, b_mode, ADDR_I, b_mode, RTLOP_OR),
-      new ArithmeticDecoder("adcb", ADDR_E, b_mode, ADDR_I, b_mode, RTLOP_ADDC),
-      new ArithmeticDecoder("sbbb", ADDR_E, b_mode, ADDR_I, b_mode, RTLOP_SUBC),
-      new LogicalDecoder("andb", ADDR_E, b_mode, ADDR_I, b_mode, RTLOP_AND),
-      new ArithmeticDecoder("subb", ADDR_E, b_mode, ADDR_I, b_mode, RTLOP_SUB),
-      new LogicalDecoder("xorb", ADDR_E, b_mode, ADDR_I, b_mode, RTLOP_XOR),
-      new InstructionDecoder("cmpb", ADDR_E, b_mode, ADDR_I, b_mode)
-      },
-      {
-      new ArithmeticDecoder("addS", ADDR_E, v_mode, ADDR_I, v_mode, RTLOP_ADD),
-      new LogicalDecoder("orS", ADDR_E, v_mode, ADDR_I, v_mode, RTLOP_OR),
-      new ArithmeticDecoder("adcS", ADDR_E, v_mode, ADDR_I, v_mode, RTLOP_ADDC),
-      new ArithmeticDecoder("sbbS", ADDR_E, v_mode, ADDR_I, v_mode, RTLOP_SUBC),
-      new LogicalDecoder("andS", ADDR_E, v_mode, ADDR_I, v_mode, RTLOP_AND),
-      new ArithmeticDecoder("subS", ADDR_E, v_mode, ADDR_I, v_mode, RTLOP_SUB),
-      new LogicalDecoder("xorS", ADDR_E, v_mode, ADDR_I, v_mode, RTLOP_XOR),
-      new InstructionDecoder("cmpS", ADDR_E, v_mode, ADDR_I, v_mode)
-      },
-      {
-      new ArithmeticDecoder("addS", ADDR_E, v_mode, ADDR_I, b_mode, RTLOP_ADD), /*note: sIb here*/
-      new LogicalDecoder("orS", ADDR_E, v_mode, ADDR_I, b_mode, RTLOP_OR),
-      new ArithmeticDecoder("adcS", ADDR_E, v_mode, ADDR_I, b_mode, RTLOP_ADDC),
-      new ArithmeticDecoder("sbbS", ADDR_E, v_mode, ADDR_I, b_mode, RTLOP_SUBC),
-      new LogicalDecoder("andS", ADDR_E, v_mode, ADDR_I, b_mode, RTLOP_AND),
-      new ArithmeticDecoder("subS", ADDR_E, v_mode, ADDR_I, b_mode, RTLOP_SUB),
-      new LogicalDecoder("xorS", ADDR_E, v_mode, ADDR_I, b_mode, RTLOP_XOR),
-      new InstructionDecoder("cmpS", ADDR_E, v_mode, ADDR_I, b_mode)
-      },
-      {
-      new RotateDecoder("rolb", ADDR_E, b_mode, ADDR_I, b_mode),
-      new RotateDecoder("rorb", ADDR_E, b_mode, ADDR_I, b_mode),
-      new RotateDecoder("rclb", ADDR_E, b_mode, ADDR_I, b_mode),
-      new RotateDecoder("rcrb", ADDR_E, b_mode, ADDR_I, b_mode),
-      new ShiftDecoder("shlb", ADDR_E, b_mode, ADDR_I, b_mode, RTLOP_SLL),
-      new ShiftDecoder("shrb", ADDR_E, b_mode, ADDR_I, b_mode, RTLOP_SRL),
-      null,
-      new ShiftDecoder("sarb", ADDR_E, b_mode, ADDR_I, b_mode, RTLOP_SRA),
-      },
-      {
-      new RotateDecoder("rolS", ADDR_E, v_mode, ADDR_I, b_mode),
-      new RotateDecoder("rorS", ADDR_E, v_mode, ADDR_I, b_mode),
-      new RotateDecoder("rclS", ADDR_E, v_mode, ADDR_I, b_mode),
-      new RotateDecoder("rcrS", ADDR_E, v_mode, ADDR_I, b_mode),
-      new ShiftDecoder("shlS", ADDR_E, v_mode, ADDR_I, b_mode,  RTLOP_SLL),
-      new ShiftDecoder("shrS", ADDR_E, v_mode, ADDR_I, b_mode, RTLOP_SRL),
-      null,
-      new ShiftDecoder("sarS", ADDR_E, v_mode, ADDR_I, b_mode, RTLOP_SRA)
-      },
-      {
-      new RotateDecoder("rolb", ADDR_E, b_mode),
-      new RotateDecoder("rorb", ADDR_E, b_mode),
-      new RotateDecoder("rclb", ADDR_E, b_mode),
-      new RotateDecoder("rcrb", ADDR_E, b_mode),
-      new ShiftDecoder("shlb", ADDR_E, b_mode, RTLOP_SLL),
-      new ShiftDecoder("shrb", ADDR_E, b_mode, RTLOP_SRL),
-      null,
-      new ShiftDecoder("sarb", ADDR_E, b_mode, RTLOP_SRA)
-      },
-      {
-      new RotateDecoder("rolS", ADDR_E, v_mode),
-      new RotateDecoder("rorS", ADDR_E, v_mode),
-      new RotateDecoder("rclS", ADDR_E, v_mode),
-      new RotateDecoder("rcrS", ADDR_E, v_mode),
-      new ShiftDecoder("shlS", ADDR_E, v_mode, RTLOP_SLL),
-      new ShiftDecoder("shrS", ADDR_E, v_mode, RTLOP_SRL),
-      null,
-      new ShiftDecoder("sarS", ADDR_E, v_mode, RTLOP_SRA)
-      },
-      {
-      new RotateDecoder("rolb", ADDR_E, b_mode, ADDR_REG, CL),
-      new RotateDecoder("rorb", ADDR_E, b_mode, ADDR_REG, CL),
-      new RotateDecoder("rclb", ADDR_E, b_mode, ADDR_REG, CL),
-      new RotateDecoder("rcrb", ADDR_E, b_mode, ADDR_REG, CL),
-      new ShiftDecoder( "shlb", ADDR_E, b_mode, ADDR_REG, CL, RTLOP_SLL),
-      new ShiftDecoder("shrb", ADDR_E, b_mode, ADDR_REG, CL, RTLOP_SRL),
-      null,
-      new ShiftDecoder("sarb", ADDR_E, b_mode, ADDR_REG, CL, RTLOP_SRA)
-      },
-      {
-      new RotateDecoder("rolS", ADDR_E, v_mode, ADDR_REG, CL),
-      new RotateDecoder("rorS", ADDR_E, v_mode, ADDR_REG, CL),
-      new RotateDecoder("rclS", ADDR_E, v_mode, ADDR_REG, CL),
-      new RotateDecoder("rcrS", ADDR_E, v_mode, ADDR_REG, CL),
-      new ShiftDecoder("shlS", ADDR_E, v_mode, ADDR_REG, CL, RTLOP_SLL),
-      new ShiftDecoder("shrS", ADDR_E, v_mode, ADDR_REG, CL, RTLOP_SRL),
-      null,
-      new ShiftDecoder("sarS", ADDR_E, v_mode, ADDR_REG, CL, RTLOP_SRA)
-      },
-      {
-      new InstructionDecoder("testb", ADDR_E, b_mode, ADDR_I, b_mode),
-      null, /*new InstructionDecoder("(bad)", ADDR_E, b_mode)*/
-      new LogicalDecoder("notb", ADDR_E, b_mode, RTLOP_NOT),
-      new InstructionDecoder("negb", ADDR_E, b_mode),
-      new ArithmeticDecoder("mulb", ADDR_REG, AL, ADDR_E, b_mode, RTLOP_UMUL),
-      new ArithmeticDecoder("imulb", ADDR_REG, AL, ADDR_E, b_mode, RTLOP_SMUL),
-      new ArithmeticDecoder("divb", ADDR_REG, AL, ADDR_E, b_mode, RTLOP_UDIV),
-      new ArithmeticDecoder("idivb", ADDR_REG, AL, ADDR_E, b_mode, RTLOP_SDIV)
-      },
-      {
-      new InstructionDecoder("testS", ADDR_E, v_mode, ADDR_I, v_mode),
-      null,
-      new LogicalDecoder("notS", ADDR_E, v_mode, RTLOP_NOT),
-      new InstructionDecoder("negS", ADDR_E, v_mode),
-      new ArithmeticDecoder("mulS", ADDR_REG, EAX, ADDR_E, v_mode, RTLOP_UMUL),
-      new ArithmeticDecoder("imulS", ADDR_REG, EAX, ADDR_E, v_mode, RTLOP_SMUL),
-      new ArithmeticDecoder("divS", ADDR_REG, EAX, ADDR_E, v_mode, RTLOP_SDIV),
-      new ArithmeticDecoder("idivS", ADDR_REG, EAX, ADDR_E, v_mode, RTLOP_SDIV)
-      },
-      {
-      new ArithmeticDecoder("incb", ADDR_E, b_mode, RTLOP_ADD),
-      new ArithmeticDecoder("decb", ADDR_E, b_mode, RTLOP_SUB),
-      null,
-      null,
-      null,
-      null,
-      null,
-      null
-      },
-      {
-      new ArithmeticDecoder("incS", ADDR_E, v_mode, RTLOP_ADD),
-      new ArithmeticDecoder("decS", ADDR_E, v_mode, RTLOP_SUB),
-      new CallDecoder("call", ADDR_E, v_mode),
-      new CallDecoder("lcall", ADDR_E, p_mode),
-      new JmpDecoder("jmp", ADDR_E, v_mode),
-      new JmpDecoder("ljmp", ADDR_E, p_mode),
-      new InstructionDecoder("pushS", ADDR_E, v_mode),
-      null
-      },
-      {
-      new InstructionDecoder("sldt", ADDR_E, w_mode),
-      new InstructionDecoder("str", ADDR_E, w_mode),
-      new InstructionDecoder("lldt", ADDR_E, w_mode),
-      new InstructionDecoder("ltr", ADDR_E, w_mode),
-      new InstructionDecoder("verr", ADDR_E, w_mode),
-      new InstructionDecoder("verw", ADDR_E, w_mode),
-      null,
-      null
-      },
-      {
-      new InstructionDecoder("sgdt", ADDR_E, w_mode),
-      new InstructionDecoder("sidt", ADDR_E, w_mode),
-      new InstructionDecoder("lgdt", ADDR_E, w_mode),
-      new InstructionDecoder("lidt", ADDR_E, w_mode),
-      new InstructionDecoder("smsw", ADDR_E, w_mode),
-      null,
-      new InstructionDecoder("lmsw", ADDR_E, w_mode),
-      new InstructionDecoder("invlpg", ADDR_E, w_mode)
-      },
-      {
-      null,
-      null,
-      null,
-      null,
-      new InstructionDecoder("btS", ADDR_E, v_mode, ADDR_I, b_mode),
-      new InstructionDecoder("btsS", ADDR_E, v_mode, ADDR_I, b_mode),
-      new InstructionDecoder("btrS", ADDR_E, v_mode, ADDR_I, b_mode),
-      new InstructionDecoder("btcS", ADDR_E, v_mode, ADDR_I, b_mode)
-      },
-      /*16*/
-      {
-      null,
-      new SSEInstructionDecoder("cmpxch8b", ADDR_W, q_mode),
-      null,
-      null,
-      null,
-      null,
-      null,
-      null
-      },
-      /*17*/
-      {
-      null,
-      null,
-      new SSEShiftDecoder("psrlw", ADDR_P, q_mode, ADDR_I, b_mode, RTLOP_SRL),
-      null,
-      new SSEShiftDecoder("psraw", ADDR_P, q_mode, ADDR_I, b_mode, RTLOP_SRA),
-      null,
-      new SSEShiftDecoder("psllw", ADDR_P, q_mode, ADDR_I, b_mode, RTLOP_SLL),
-      null
-      },
-      /*18*/
-      {
-      null,
-      null,
-      new SSEShiftDecoder("psrld", ADDR_P, q_mode, ADDR_I, b_mode, RTLOP_SRL),
-      null,
-      new SSEShiftDecoder("psrad", ADDR_P, q_mode, ADDR_I, b_mode, RTLOP_SRA),
-      null,
-      new SSEShiftDecoder("pslld", ADDR_P, q_mode, ADDR_I, b_mode, RTLOP_SLL),
-      null
-      },
-      /*19*/
-      {
-      null,
-      null,
-      new SSEShiftDecoder("psrlq", ADDR_P, q_mode, ADDR_I, b_mode, RTLOP_SRL),
-      null,
-      null,
-      null,
-      new SSEShiftDecoder("psllq", ADDR_P, q_mode, ADDR_I, b_mode, RTLOP_SLL),
-      null
-      },
-      /*20 - Grp15*/
-      {
-      new SSEInstructionDecoder("fxsave"),
-      new SSEInstructionDecoder("fxrstor"),
-      new SSEInstructionDecoder("ldmxcsr"),
-      new SSEInstructionDecoder("stmxcsr"),
-      null,
-      null,
-      null,
-      new SSEInstructionDecoder("clflush")
-      },
-      /*21 - Grp16*/
-      {
-      new SSEInstructionDecoder("prefetchnta"),
-      new SSEInstructionDecoder("prefetcht0"),
-      new SSEInstructionDecoder("prefetcht1"),
-      new SSEInstructionDecoder("prefetcht2"),
-      null,
-      null,
-      null,
-      null
-      },
-      /*22 - Grp12:66*/
-      {
-      null,
-      null,
-      new SSEShiftDecoder("psrlw", ADDR_P, dq_mode, ADDR_I, b_mode, RTLOP_SRL),
-      null,
-      new SSEShiftDecoder("psraw", ADDR_P, dq_mode, ADDR_I, b_mode, RTLOP_SRA),
-      null,
-      new SSEShiftDecoder("psllw", ADDR_P, dq_mode, ADDR_I, b_mode, RTLOP_SLL),
-      null
-      },
-      /*23 - Grp13:66*/
-      {
-      null,
-      null,
-      new SSEShiftDecoder("psrld", ADDR_W, dq_mode, ADDR_I, b_mode, RTLOP_SRL),
-      null,
-      new SSEShiftDecoder("psrad", ADDR_W, dq_mode, ADDR_I, b_mode, RTLOP_SRA),
-      null,
-      new SSEShiftDecoder("pslld", ADDR_W, dq_mode, ADDR_I, b_mode, RTLOP_SLL),
-      null
-      },
-      /*24 - - Grp14:66*/
-      {
-      null,
-      null,
-      new SSEShiftDecoder("psrlq", ADDR_W, dq_mode, ADDR_I, b_mode, RTLOP_SRL),
-      new SSEShiftDecoder("psrldq", ADDR_W, dq_mode, ADDR_I, b_mode, RTLOP_SRL),
-      null,
-      null,
-      new SSEShiftDecoder("psllq", ADDR_W, dq_mode, ADDR_I, b_mode, RTLOP_SLL),
-      new SSEShiftDecoder("psllq", ADDR_W, dq_mode, ADDR_I, b_mode, RTLOP_SLL)
-      }
-};
-
-   public GRPDecoder(String name, int number) {
-      super(name);
-      this.number = number;
-   }
-
-   public Instruction decode(byte[] bytesArray, int index, int instrStartIndex, int segmentOverride, int prefixes, X86InstructionFactory factory) {
-      this.byteIndex = index;
-      this.instrStartIndex = instrStartIndex;
-      this.prefixes = prefixes;
-
-      int ModRM = readByte(bytesArray, byteIndex);
-      int reg = (ModRM >> 3) & 7;
-
-      InstructionDecoder instrDecoder = grpTable[number][reg];
-      Instruction instr = null;
-      if(instrDecoder != null) {
-         instr = instrDecoder.decode(bytesArray, byteIndex, instrStartIndex, segmentOverride, prefixes, factory);
-         byteIndex = instrDecoder.getCurrentIndex();
-      } else {
-         instr = factory.newIllegalInstruction();
-      }
-
-      return instr;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/InstructionDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/InstructionDecoder.java
deleted file mode 100644
index 87f6e10a43c..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/InstructionDecoder.java
+++ /dev/null
@@ -1,554 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-// basic instruction decoder class
-public class InstructionDecoder implements /* imports */ X86Opcodes , RTLDataTypes, RTLOperations {
-
-   protected String name;
-   protected int addrMode1;
-   protected int operandType1;
-   protected int addrMode2;
-   protected int operandType2;
-   protected int addrMode3;
-   protected int operandType3;
-
-   private int mod;
-   private int regOrOpcode;
-   private int rm;
-   protected int prefixes;
-
-   protected int byteIndex;
-   protected int instrStartIndex;
-
-   public InstructionDecoder(String name) {
-      this.name = name;
-      this.operandType1 = INVALID_OPERANDTYPE;
-      this.operandType2 = INVALID_OPERANDTYPE;
-      this.operandType3 = INVALID_OPERANDTYPE;
-      this.addrMode1 = INVALID_ADDRMODE;
-      this.addrMode2 = INVALID_ADDRMODE;
-      this.addrMode3 = INVALID_ADDRMODE;
-   }
-   public InstructionDecoder(String name, int addrMode1, int operandType1) {
-      this(name);
-      this.addrMode1 = addrMode1;
-      this.operandType1 = operandType1;
-   }
-   public InstructionDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2) {
-      this(name, addrMode1, operandType1);
-      this.addrMode2 = addrMode2;
-      this.operandType2 = operandType2;
-   }
-   public InstructionDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2,
-                                       int addrMode3, int operandType3) {
-      this(name, addrMode1, operandType1, addrMode2, operandType2);
-      this.addrMode3 = addrMode3;
-      this.operandType3 = operandType3;
-   }
-   // "operand1"
-   protected Operand getOperand1(byte[] bytesArray, boolean operandSize, boolean addrSize) {
-      if( (addrMode1 != INVALID_ADDRMODE) && (operandType1 != INVALID_OPERANDTYPE) )
-         return getOperand(bytesArray, addrMode1, operandType1, operandSize, addrSize);
-      else
-         return null;
-   }
-
-   // "operand2"
-   protected Operand getOperand2(byte[] bytesArray, boolean operandSize, boolean addrSize) {
-      if( (addrMode2 != INVALID_ADDRMODE) && (operandType2 != INVALID_OPERANDTYPE) )
-         return getOperand(bytesArray, addrMode2, operandType2, operandSize, addrSize);
-      else
-         return null;
-   }
-
-   // "operand3"
-   protected Operand getOperand3(byte[] bytesArray, boolean operandSize, boolean addrSize) {
-      if( (addrMode3 != INVALID_ADDRMODE) && (operandType3 != INVALID_OPERANDTYPE) )
-         return getOperand(bytesArray, addrMode3, operandType3, operandSize, addrSize);
-      else
-         return null;
-   }
-
-   static int readInt32(byte[] bytesArray, int index) {
-      int ret = 0;
-      ret = readByte(bytesArray, index);
-      ret |= readByte(bytesArray, index+1) << 8;
-      ret |= readByte(bytesArray, index+2) << 16;
-      ret |= readByte(bytesArray, index+3) << 24;
-      return ret;
-   }
-   static int readInt16(byte[] bytesArray, int index) {
-      int ret = 0;
-      ret = readByte(bytesArray, index);
-      ret |= readByte(bytesArray, index+1) << 8;
-      return ret;
-   }
-   static int readByte(byte[] bytesArray, int index) {
-      int ret = 0;
-      if (index < bytesArray.length) {
-         ret = (int)bytesArray[index];
-         ret = ret & 0xff;
-      }
-      return ret;
-   }
-   private boolean isModRMPresent(int addrMode) {
-      if( (addrMode == ADDR_E) || (addrMode == ADDR_G) || (addrMode == ADDR_FPREG) || (addrMode == ADDR_Q) || (addrMode == ADDR_W) )
-         return true;
-      else
-         return false;
-   }
-   public int getCurrentIndex() {
-      return byteIndex;
-   }
-
-   public Instruction decode(byte[] bytesArray, int index, int instrStartIndex, int segmentOverride, int prefixes, X86InstructionFactory factory) {
-      this.byteIndex = index;
-      this.instrStartIndex = instrStartIndex;
-      this.prefixes = prefixes;
-      boolean operandSize; //operand-size prefix
-      boolean addrSize;    //address-size prefix
-      if ( ( (prefixes & PREFIX_DATA) ^ segmentOverride ) == 1)
-         operandSize = true;
-      else
-         operandSize = false;
-      if ( ((prefixes & PREFIX_ADR) ^ segmentOverride) == 1)
-         addrSize = true;
-      else
-         addrSize = false;
-      this.name = getCorrectOpcodeName(name, prefixes, operandSize, addrSize);
-
-      //Fetch the mod/reg/rm byte only if it is present.
-      if( isModRMPresent(addrMode1) || isModRMPresent(addrMode2) || isModRMPresent(addrMode3) ) {
-
-         int ModRM = readByte(bytesArray, byteIndex);
-         byteIndex++;
-         mod = (ModRM >> 6) & 3;
-         regOrOpcode = (ModRM >> 3) & 7;
-         rm = ModRM & 7;
-      }
-      return decodeInstruction(bytesArray, operandSize, addrSize, factory);
-   }
-
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
-      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
-      Operand op3 = getOperand3(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-      return factory.newGeneralInstruction(name, op1, op2, op3, size, prefixes);
-   }
-
-   // capital letters in template are macros
-   private String getCorrectOpcodeName(String oldName, int prefixes, boolean operandSize, boolean addrSize) {
-      StringBuffer newName = new StringBuffer(oldName);
-      int index = 0;
-      for(index=0; index<oldName.length(); index++) {
-         switch (oldName.charAt(index)) {
-            case 'C':           /* For jcxz/jecxz */
-               if (addrSize)
-                  newName.setCharAt(index, 'e');
-               index++;
-               break;
-            case 'N':
-               if ((prefixes & PREFIX_FWAIT) == 0)
-                  newName.setCharAt(index, 'n');
-               index++;
-               break;
-            case 'S':
-            /* operand size flag */
-               if (operandSize == true)
-                  newName.setCharAt(index, 'l');
-               else
-                  newName.setCharAt(index, 'w');
-               index++;
-               break;
-            default:
-               break;
-         }
-      }
-      return newName.toString();
-   }
-
-   //IA-32 Intel Architecture Software Developer's Manual Volume 2
-   //Refer to Chapter 2 - Instruction Format
-
-   //Get the Operand object from the address type and the operand type
-   private Operand getOperand(byte[] bytesArray, int addrMode, int operandType, boolean operandSize, boolean addrSize) {
-      Operand op = null;
-      switch(addrMode) {
-         case ADDR_E:
-         case ADDR_W:   //SSE: ModR/M byte specifies either 128 bit XMM register or memory
-         case ADDR_Q:   //SSE: ModR/M byte specifies either 128 bit MMX register or memory
-            X86SegmentRegister segReg = getSegmentRegisterFromPrefix(prefixes);
-
-            if (mod == 3) {    //Register operand, no SIB follows
-               if (addrMode == ADDR_E) {
-                  switch (operandType) {
-                     case b_mode:
-                        op = X86Registers.getRegister8(rm);
-                        break;
-                     case w_mode:
-                        op = X86Registers.getRegister16(rm);
-                        break;
-                     case v_mode:
-                        if (operandSize == true) //Operand size prefix is present
-                           op = X86Registers.getRegister32(rm);
-                        else
-                           op = X86Registers.getRegister16(rm);
-                        break;
-                     case p_mode:
-                        X86Register reg;
-                        if (operandSize == true) //Operand size prefix is present
-                           reg = X86Registers.getRegister32(rm);
-                        else
-                           reg = X86Registers.getRegister16(rm);
-
-                        op = new X86RegisterIndirectAddress(segReg, reg, null, 0);
-                        break;
-                     default:
-                        break;
-                  }
-               } else if (addrMode == ADDR_W) {
-                  op = X86XMMRegisters.getRegister(rm);
-               } else if (addrMode == ADDR_Q) {
-                  op = X86MMXRegisters.getRegister(rm);
-               }
-
-            } else {   //mod != 3
-               //SIB follows for (rm==4), SIB gives scale, index and base in this case
-               //disp32 is present for (mod==0 && rm==5) || (mod==2)
-               //disp8 is present for (mod==1)
-               //for (rm!=4) base is register at rm.
-               int scale = 0;
-               int index = 0;
-               int base = 0;
-               long disp = 0;
-               if(rm == 4) {
-                  int sib = readByte(bytesArray, byteIndex);
-                  byteIndex++;
-                  scale = (sib >> 6) & 3;
-                  index = (sib >> 3) & 7;
-                  base = sib & 7;
-               }
-
-               switch (mod) {
-                  case 0:
-                     switch(rm) {
-                        case 4:
-                           if(base == 5) {
-                              disp = readInt32(bytesArray, byteIndex);
-                              byteIndex += 4;
-                              if (index != 4) {
-                                 op = new X86RegisterIndirectAddress(segReg, null, X86Registers.getRegister32(index), disp, scale);
-                              } else {
-                                 op = new X86RegisterIndirectAddress(segReg, null, null, disp, scale);
-                              }
-                           }
-                           else {
-                              if (index != 4) {
-                                 op = new X86RegisterIndirectAddress(segReg, X86Registers.getRegister32(base), X86Registers.getRegister32(index), 0, scale);
-                              } else {
-                                 op = new X86RegisterIndirectAddress(segReg, X86Registers.getRegister32(base), null, 0, scale);
-                              }
-                           }
-                           break;
-                        case 5:
-                           disp = readInt32(bytesArray, byteIndex);
-                           byteIndex += 4;
-                           //Create an Address object only with displacement
-                           op = new X86RegisterIndirectAddress(segReg, null, null, disp);
-                           break;
-                        default:
-                           base = rm;
-                           //Create an Address object only with base
-                           op = new X86RegisterIndirectAddress(segReg, X86Registers.getRegister32(base), null, 0);
-                           break;
-                        }
-                        break;
-                  case 1:
-                     disp = (byte)readByte(bytesArray, byteIndex);
-                     byteIndex++;
-                     if (rm !=4) {
-                        base = rm;
-                        //Address with base and disp only
-                        op = new X86RegisterIndirectAddress(segReg, X86Registers.getRegister32(base), null, disp);
-                     } else {
-                        if (index != 4) {
-                           op = new X86RegisterIndirectAddress(segReg, X86Registers.getRegister32(base), X86Registers.getRegister32(index), disp, scale);
-                        } else {
-                           op = new X86RegisterIndirectAddress(segReg, X86Registers.getRegister32(base), null, disp, scale);
-                        }
-                     }
-                     break;
-                  case 2:
-                     disp = readInt32(bytesArray, byteIndex);
-                     byteIndex += 4;
-                     if (rm !=4) {
-                        base = rm;
-                        //Address with base and disp
-                        op = new X86RegisterIndirectAddress(segReg, X86Registers.getRegister32(base), null, disp);
-                     } else if (index != 4) {
-                        op = new X86RegisterIndirectAddress(segReg, X86Registers.getRegister32(base), X86Registers.getRegister32(index), disp, scale);
-                     } else {
-                        op = new X86RegisterIndirectAddress(segReg, X86Registers.getRegister32(base), null, disp, scale);
-                     }
-                     break;
-               }
-            }
-            break;
-
-         case ADDR_I:
-            switch (operandType) {
-               case b_mode:
-                  op = new Immediate(new Integer(readByte(bytesArray, byteIndex)));
-                  byteIndex++;
-                  break;
-               case w_mode:
-                  op = new Immediate(new Integer(readInt16(bytesArray, byteIndex)));
-                  byteIndex += 2;
-                  break;
-               case v_mode:
-                  if (operandSize == true) { //Operand size prefix is present
-                     op = new Immediate(new Integer(readInt32(bytesArray, byteIndex)));
-                     byteIndex += 4;
-                  } else {
-                     op = new Immediate(new Integer(readInt16(bytesArray, byteIndex)));
-                     byteIndex += 2;
-                  }
-                  break;
-               default:
-                  break;
-            }
-            break;
-         case ADDR_REG: //registers
-            switch(operandType) {
-               case EAX:
-               case ECX:
-               case EDX:
-               case EBX:
-               case ESP:
-               case EBP:
-               case ESI:
-               case EDI:
-                  if(operandSize == true) {
-                     op = X86Registers.getRegister32(operandType - EAX);
-                  }
-                  else {
-                     op = X86Registers.getRegister16(operandType - EAX);
-                  }
-                  break;
-               case AX:
-               case CX:
-               case DX:
-               case BX:
-               case SP:
-               case BP:
-               case SI:
-               case DI:
-                  op = X86Registers.getRegister16(operandType - AX);
-                  break;
-               case AL:
-               case CL:
-               case DL:
-               case BL:
-               case AH:
-               case CH:
-               case DH:
-               case BH:
-                  op = X86Registers.getRegister8(operandType - AL);
-                  break;
-               case ES:  //ES, CS, SS, DS, FS, GS
-               case CS:
-               case SS:
-               case DS:
-               case FS:
-               case GS:
-                  op = X86SegmentRegisters.getSegmentRegister(operandType - ES);
-                  break;
-           }
-           break;
-         case ADDR_DIR: //segment and offset
-            long segment = 0;
-            long offset = 0;
-            switch (operandType) {
-               case p_mode:
-                  if (addrSize == true) {
-                     offset = readInt32(bytesArray, byteIndex);
-                     byteIndex += 4;
-                     segment = readInt16(bytesArray, byteIndex);
-                     byteIndex += 2;
-                  } else {
-                     offset = readInt16(bytesArray, byteIndex);
-                     byteIndex += 2;
-                     segment = readInt16(bytesArray, byteIndex);
-                     byteIndex += 2;
-                  }
-                  op = new X86DirectAddress(segment, offset); //with offset
-                  break;
-               case v_mode:
-                  if (addrSize == true) {
-                     offset = readInt32(bytesArray, byteIndex);
-                     byteIndex += 4;
-                  } else {
-                     offset = readInt16(bytesArray, byteIndex);
-                     byteIndex += 2;
-                  }
-                  op = new X86DirectAddress(offset); //with offset
-                  break;
-               default:
-                  break;
-            }
-            break;
-         case ADDR_G:
-            switch (operandType) {
-               case b_mode:
-                  op = X86Registers.getRegister8(regOrOpcode);
-                  break;
-               case w_mode:
-                  op = X86Registers.getRegister16(regOrOpcode);
-                  break;
-               case d_mode:
-                  op = X86Registers.getRegister32(regOrOpcode);
-                  break;
-              case v_mode:
-                 if (operandSize == true)
-                    op = X86Registers.getRegister32(regOrOpcode);
-                 else
-                    op = X86Registers.getRegister16(regOrOpcode);
-                    break;
-              default:
-                 break;
-            }
-            break;
-         case ADDR_SEG:
-            op = X86SegmentRegisters.getSegmentRegister(regOrOpcode);
-            break;
-         case ADDR_OFF:
-            int off = 0;
-            if (addrSize == true) {
-               off = readInt32(bytesArray, byteIndex);
-               byteIndex += 4;
-            }
-            else {
-               off = readInt16(bytesArray, byteIndex);
-               byteIndex += 2;
-            }
-            op = new X86DirectAddress((long)off);
-            break;
-         case ADDR_J:
-            long disp = 0;
-            //The effective address is Instruction pointer + relative offset
-            switch(operandType) {
-               case b_mode:
-                  disp = (byte)readByte(bytesArray, byteIndex);
-                  byteIndex++;
-                  break;
-               case v_mode:
-                  if (operandSize == true) {
-                     disp = readInt32(bytesArray, byteIndex);
-                     byteIndex += 4;
-                  }
-                  else {
-                     disp = readInt16(bytesArray, byteIndex);
-                     byteIndex += 2;
-                  }
-                  //disp = disp + (byteIndex-instrStartIndex);
-                  break;
-            }
-            op = new X86PCRelativeAddress(disp);
-            break;
-         case ADDR_ESDI:
-            op = new X86SegmentRegisterAddress(X86SegmentRegisters.ES, X86Registers.DI);
-            break;
-         case ADDR_DSSI:
-            op = new X86SegmentRegisterAddress(X86SegmentRegisters.DS, X86Registers.SI);
-            break;
-         case ADDR_R:
-            switch (operandType) {
-               case b_mode:
-                  op = X86Registers.getRegister8(mod);
-                  break;
-              case w_mode:
-                 op = X86Registers.getRegister16(mod);
-                 break;
-              case d_mode:
-                 op = X86Registers.getRegister32(mod);
-                 break;
-             case v_mode:
-                if (operandSize == true)
-                   op = X86Registers.getRegister32(mod);
-                else
-                   op = X86Registers.getRegister16(mod);
-                   break;
-             default:
-                break;
-            }
-            break;
-         case ADDR_FPREG:
-            switch (operandType) {
-               case 0:
-                  op = X86FloatRegisters.getRegister(0);
-                  break;
-               case 1:
-                  op = X86FloatRegisters.getRegister(rm);
-                  break;
-            }
-            break;
-
-         //SSE: reg field of ModR/M byte selects a 128-bit XMM register
-         case ADDR_V:
-            op = X86XMMRegisters.getRegister(regOrOpcode);
-            break;
-
-         //SSE: reg field of ModR/M byte selects a 64-bit MMX register
-         case ADDR_P:
-            op = X86MMXRegisters.getRegister(regOrOpcode);
-            break;
-      }
-      return op;
-   }
-
-   private X86SegmentRegister getSegmentRegisterFromPrefix(int prefixes) {
-      X86SegmentRegister segRegister = null;
-
-      if ( (prefixes & PREFIX_CS) != 0)
-         segRegister = X86SegmentRegisters.CS;
-      if ( (prefixes & PREFIX_DS) != 0)
-         segRegister =  X86SegmentRegisters.DS;
-      if ( (prefixes & PREFIX_ES) != 0)
-         segRegister =  X86SegmentRegisters.ES;
-      if ( (prefixes & PREFIX_FS) != 0)
-         segRegister =  X86SegmentRegisters.FS;
-      if ( (prefixes & PREFIX_SS) != 0)
-         segRegister =  X86SegmentRegisters.SS;
-      if ( (prefixes & PREFIX_GS) != 0)
-         segRegister =  X86SegmentRegisters.GS;
-
-      return segRegister;
-   }
-
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/JmpDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/JmpDecoder.java
deleted file mode 100644
index 9a88823a069..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/JmpDecoder.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2002, 2004, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class JmpDecoder extends InstructionDecoder {
-    public JmpDecoder(String name, int addrMode1, int operandType1) {
-        super(name, addrMode1, operandType1);
-    }
-    protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-        Operand operand = getOperand1(bytesArray, operandSize, addrSize);
-        int size = byteIndex - instrStartIndex;
-        Address address;
-        if (operand instanceof X86Register) {
-            address = new X86RegisterDirectAddress((X86Register)operand);
-        } else {
-            address = (Address) operand;
-        }
-        return factory.newJmpInstruction(name, address, size, prefixes);
-    }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/LogicalDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/LogicalDecoder.java
deleted file mode 100644
index 51de615c0bf..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/LogicalDecoder.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class LogicalDecoder extends InstructionDecoder {
-   private int rtlOperation;
-
-   public LogicalDecoder(String name, int addrMode1, int operandType1, int rtlOperation) {
-      super(name, addrMode1, operandType1);
-      this.rtlOperation = rtlOperation;
-   }
-   public LogicalDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2, int rtlOperation) {
-      super(name, addrMode1, operandType1, addrMode2, operandType2);
-      this.rtlOperation = rtlOperation;
-   }
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
-      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-      return factory.newLogicInstruction(name, rtlOperation, op1, op2, size, prefixes);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/MoveDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/MoveDecoder.java
deleted file mode 100644
index 74f65f7a10c..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/MoveDecoder.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class MoveDecoder extends InstructionDecoder {
-   public MoveDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2) {
-      super(name, addrMode1, operandType1, addrMode2, operandType2);
-   }
-
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
-      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-
-      if( (op1 instanceof X86Register) && (op2 instanceof ImmediateOrRegister) ) {
-         return factory.newMoveInstruction(name, (X86Register)op1, (ImmediateOrRegister)op2, size, prefixes);
-      }
-      else if( (op1 instanceof Address) && (op2 instanceof Immediate) ) {
-         return factory.newGeneralInstruction(name, op1, op2, size, prefixes);
-      }
-      else if( (op1 instanceof Address) && (op2 instanceof X86Register) ) {
-         return factory.newMoveStoreInstruction(name, (Address)op1, (X86Register)op2, 0, size, prefixes);
-      }
-      else if( (op1 instanceof X86Register) && (op2 instanceof Address) ) {
-         return factory.newMoveLoadInstruction(name, (X86Register)op1, (Address)op2, 0, size, prefixes);
-      }
-
-      return null;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/RotateDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/RotateDecoder.java
deleted file mode 100644
index 8f901c3119e..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/RotateDecoder.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class RotateDecoder extends InstructionDecoder {
-
-   public RotateDecoder(String name, int addrMode1, int operandType1) {
-      super(name, addrMode1, operandType1);
-   }
-   public RotateDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2) {
-      super(name, addrMode1, operandType1, addrMode2, operandType2);
-   }
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
-      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-      return factory.newRotateInstruction(name, op1, (ImmediateOrRegister)op2, size, prefixes);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSEArithmeticDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSEArithmeticDecoder.java
deleted file mode 100644
index 2fe15d9f7de..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSEArithmeticDecoder.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SSEArithmeticDecoder extends SSEInstructionDecoder {
-   private int rtlOperation;
-
-   public SSEArithmeticDecoder(String name, int addrMode1, int operandType1, int rtlOperation) {
-      super(name, addrMode1, operandType1);
-      this.rtlOperation = rtlOperation;
-   }
-
-   public SSEArithmeticDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2, int rtlOperation) {
-      super(name, addrMode1, operandType1, addrMode2, operandType2);
-      this.rtlOperation = rtlOperation;
-   }
-
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
-      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-      return factory.newArithmeticInstruction(name, rtlOperation, op1, op2, size, prefixes);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSEInstructionDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSEInstructionDecoder.java
deleted file mode 100644
index 280c4e2c25a..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSEInstructionDecoder.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-// SSE instructions decoder class
-public class SSEInstructionDecoder extends InstructionDecoder {
-
-   public SSEInstructionDecoder(String name) {
-      super(name);
-   }
-   public SSEInstructionDecoder(String name, int addrMode1, int operandType1) {
-      super(name, addrMode1, operandType1);
-   }
-   public SSEInstructionDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2) {
-      super(name, addrMode1, operandType1, addrMode2, operandType2);
-   }
-
-   public SSEInstructionDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2, int addrMode3, int operandType3) {
-      super(name, addrMode1, operandType1, addrMode2, operandType2, addrMode3, operandType3);
-   }
-
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
-      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
-      Operand op3 = getOperand3(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-      return factory.newGeneralInstruction(name, op1, op2, op3, size, 0);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSELogicalDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSELogicalDecoder.java
deleted file mode 100644
index 2ae23a668d9..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSELogicalDecoder.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SSELogicalDecoder extends SSEInstructionDecoder {
-   private int rtlOperation;
-
-   public SSELogicalDecoder(String name, int addrMode1, int operandType1, int addrMode2,
-                                                        int operandType2, int rtlOperation) {
-      super(name, addrMode1, operandType1, addrMode2, operandType2);
-      this.rtlOperation = rtlOperation;
-   }
-
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize,
-                                           boolean addrSize, X86InstructionFactory factory) {
-      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
-      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-      return factory.newLogicInstruction(name, rtlOperation, op1, op2, size, prefixes);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSEMoveDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSEMoveDecoder.java
deleted file mode 100644
index 35630ae3059..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSEMoveDecoder.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SSEMoveDecoder extends SSEInstructionDecoder {
-
-   public SSEMoveDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2) {
-      super(name, addrMode1, operandType1, addrMode2, operandType2);
-   }
-
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
-      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-
-      if( (op1 instanceof X86Register) && (op2 instanceof ImmediateOrRegister) ) {
-         return factory.newMoveInstruction(name, (X86Register)op1, (ImmediateOrRegister)op2, size, 0);
-      }
-      else if( (op1 instanceof Address) && (op2 instanceof Immediate) ) {
-         return factory.newGeneralInstruction(name, op1, op2, size, 0);
-      }
-      else if( (op1 instanceof Address) && (op2 instanceof X86Register) ) {
-         return factory.newMoveStoreInstruction(name, (Address)op1, (X86Register)op2, 0, size, 0);
-      }
-      else if( (op1 instanceof X86Register) && (op2 instanceof Address) ) {
-         return factory.newMoveLoadInstruction(name, (X86Register)op1, (Address)op2, 0, size, 0);
-      }
-
-      return null;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSEShiftDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSEShiftDecoder.java
deleted file mode 100644
index aace0a8bf65..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/SSEShiftDecoder.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class SSEShiftDecoder extends SSEInstructionDecoder {
-   private int rtlOperation;
-
-   public SSEShiftDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2, int rtlOperation) {
-      super(name, addrMode1, operandType1, addrMode2, operandType2);
-      this.rtlOperation = rtlOperation;
-   }
-
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
-      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-      return factory.newShiftInstruction(name, rtlOperation, op1, (ImmediateOrRegister)op2, size, 0);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/ShiftDecoder.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/ShiftDecoder.java
deleted file mode 100644
index 8b4e820052c..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/ShiftDecoder.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class ShiftDecoder extends InstructionDecoder {
-   private int rtlOperation;
-
-   public ShiftDecoder(String name, int addrMode1, int operandType1, int rtlOperation) {
-      super(name, addrMode1, operandType1);
-      this.rtlOperation = rtlOperation;
-   }
-   public ShiftDecoder(String name, int addrMode1, int operandType1, int addrMode2, int operandType2, int rtlOperation) {
-      super(name, addrMode1, operandType1, addrMode2, operandType2);
-      this.rtlOperation = rtlOperation;
-   }
-   protected Instruction decodeInstruction(byte[] bytesArray, boolean operandSize, boolean addrSize, X86InstructionFactory factory) {
-      Operand op1 = getOperand1(bytesArray, operandSize, addrSize);
-      Operand op2 = getOperand2(bytesArray, operandSize, addrSize);
-      int size = byteIndex - instrStartIndex;
-      return factory.newShiftInstruction(name, rtlOperation, op1, (ImmediateOrRegister)op2, size, prefixes);
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86ArithmeticInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86ArithmeticInstruction.java
deleted file mode 100644
index e03df827241..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86ArithmeticInstruction.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86ArithmeticInstruction extends X86Instruction
-                                        implements ArithmeticInstruction {
-   final private int operation; //RTL operation
-   final private Operand operand1;
-   final private Operand operand2;
-   final private Operand operand3;
-   final private String description;
-
-   public X86ArithmeticInstruction(String name, int operation, Operand op1, Operand op2, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.operation = operation;
-      this.operand1 = op1;
-      this.operand2 = op2;
-      this.operand3 = null;
-      description = initDescription();
-   }
-
-   public X86ArithmeticInstruction(String name, int operation, Operand op1, Operand op2, Operand op3, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.operation = operation;
-      this.operand1 = op1;
-      this.operand2 = op2;
-      this.operand3 = op3;
-      description = initDescription();
-   }
-
-   protected String initDescription() {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      if (operand1 != null) {
-         buf.append(getOperandAsString(operand1));
-      }
-      if (operand2 != null) {
-         buf.append(comma);
-         buf.append(getOperandAsString(operand2));
-      }
-      if(operand3 != null) {
-         buf.append(comma);
-         buf.append(getOperandAsString(operand3));
-      }
-      return buf.toString();
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      return description;
-   }
-
-   public Operand getArithmeticDestination() {
-      return operand1;
-   }
-
-   public Operand getOperand1() {
-      return operand1;
-   }
-
-   public Operand getOperand2() {
-      return operand2;
-   }
-
-   public Operand getOperand3() {
-      return operand3;
-   }
-
-   public Operand[] getArithmeticSources() {
-      return (new Operand[] { operand1, operand2, operand3 });
-   }
-
-   public int getOperation() {
-      return operation;
-   }
-
-   public boolean isArithmetic() {
-      return true;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86BranchInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86BranchInstruction.java
deleted file mode 100644
index 49d5f596088..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86BranchInstruction.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86BranchInstruction extends X86Instruction
-                                        implements BranchInstruction {
-   final private X86PCRelativeAddress addr;
-
-   public X86BranchInstruction(String name, X86PCRelativeAddress addr, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.addr = addr;
-      if(addr instanceof X86PCRelativeAddress) {
-         addr.setInstructionSize(getSize());
-      }
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      if(addr != null) {
-         buf.append(spaces);
-         if(addr instanceof X86PCRelativeAddress) {
-            long disp = ((X86PCRelativeAddress)addr).getDisplacement();
-            long address = disp + currentPc;
-            buf.append(symFinder.getSymbolFor(address));
-         }
-      }
-      return buf.toString();
-   }
-
-   public Address getBranchDestination() {
-      return addr;
-   }
-
-   public boolean isBranch() {
-      return true;
-   }
-
-   public boolean isConditional() {
-      return false;
-   }
-
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86CallInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86CallInstruction.java
deleted file mode 100644
index 6e137d248cb..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86CallInstruction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86CallInstruction extends X86Instruction
-                                     implements CallInstruction {
-   final private Address addr;
-
-   public X86CallInstruction(String name, Address addr, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.addr = addr;
-      if(addr instanceof X86PCRelativeAddress) {
-         ((X86PCRelativeAddress)addr).setInstructionSize(getSize());
-      }
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      long address;
-      if(addr instanceof X86PCRelativeAddress) {
-         long disp = ((X86PCRelativeAddress)addr).getDisplacement();
-         address = disp + currentPc;
-         buf.append(symFinder.getSymbolFor(address));
-      }
-      else {
-         buf.append(addr.toString());
-      }
-      return buf.toString();
-   }
-
-   public Address getBranchDestination() {
-      return addr;
-   }
-
-   public boolean isCall() {
-      return true;
-   }
-
-   public boolean isConditional() {
-      return false;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86CondJmpInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86CondJmpInstruction.java
deleted file mode 100644
index 9962c7bc194..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86CondJmpInstruction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86CondJmpInstruction extends X86Instruction
-                                           implements BranchInstruction {
-   final private X86PCRelativeAddress addr;
-
-   public X86CondJmpInstruction(String name, X86PCRelativeAddress addr, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.addr = addr;
-      if(addr instanceof X86PCRelativeAddress) {
-         addr.setInstructionSize(getSize());
-      }
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-
-      if(addr instanceof X86PCRelativeAddress) {
-         long disp = ((X86PCRelativeAddress)addr).getDisplacement();
-         long address = disp + currentPc;
-         buf.append(symFinder.getSymbolFor(address));
-      }
-      return buf.toString();
-   }
-
-   public Address getBranchDestination() {
-      return addr;
-   }
-
-   public boolean isBranch() {
-      return true;
-   }
-
-   public boolean isConditional() {
-      return true;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86DirectAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86DirectAddress.java
deleted file mode 100644
index 313e81bf5b3..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86DirectAddress.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.Address;
-import sun.jvm.hotspot.asm.DirectAddress;
-import sun.jvm.hotspot.asm.Register;
-
-public class X86DirectAddress extends DirectAddress {
-   private long segment;
-   public X86DirectAddress(long segment, long disp) {
-      super(disp);
-      this.segment = segment;
-   }
-   public X86DirectAddress(long disp) {
-      super(disp);
-      this.segment = 0;
-   }
-
-   public String toString() {
-      StringBuffer buf = new StringBuffer();
-      if (getSegment() != 0) {
-         buf.append("0x");
-         buf.append(Long.toHexString(getSegment()));
-         buf.append(":");
-      }
-      buf.append("[");
-      buf.append("0x");
-      buf.append(Long.toHexString(getValue()));
-      buf.append("]");
-
-      return buf.toString();
-   }
-
-   long getSegment() {
-      return segment;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Disassembler.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Disassembler.java
deleted file mode 100644
index aa08e493353..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Disassembler.java
+++ /dev/null
@@ -1,1617 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-import java.io.*;
-
-public class X86Disassembler extends Disassembler
-                              implements X86Opcodes {
-   private int byteIndex;
-   protected final X86InstructionFactory factory;
-
-   public X86Disassembler(long startPc, byte[] code, X86InstructionFactory factory) {
-      super(startPc, code);
-      this.factory = factory;
-   }
-
-   public X86Disassembler(long startPc, byte[] code) {
-      this(startPc, code, new X86InstructionFactoryImpl());
-   }
-
-   //Please refer to IA-32 Intel Architecture Software Developer's Manual Volume 2
-   //APPENDIX A - Table A-2. One-byte Opcode Map
-   private static final InstructionDecoder oneByteTable[] = {
-      /* 00 */
-      new ArithmeticDecoder("addb", ADDR_E, b_mode, ADDR_G, b_mode, RTLOP_ADD),
-      new ArithmeticDecoder("addS", ADDR_E, v_mode, ADDR_G, v_mode, RTLOP_ADD),
-      new ArithmeticDecoder("addb", ADDR_G, b_mode, ADDR_E, b_mode, RTLOP_ADD),
-      new ArithmeticDecoder("addS", ADDR_G, v_mode, ADDR_E, v_mode, RTLOP_ADD),
-      new ArithmeticDecoder("addb", ADDR_REG, AL, ADDR_I, b_mode, RTLOP_ADD),
-      new ArithmeticDecoder("addS", ADDR_REG, EAX, ADDR_I, v_mode, RTLOP_ADD),
-      new InstructionDecoder("pushl", ADDR_REG, ES),
-      new InstructionDecoder("popl", ADDR_REG, ES),
-      /* 08 */
-      new LogicalDecoder("orb", ADDR_E, b_mode, ADDR_G, b_mode, RTLOP_OR),
-      new LogicalDecoder("orS", ADDR_E, v_mode, ADDR_G, v_mode, RTLOP_OR),
-      new LogicalDecoder("orb", ADDR_G, b_mode, ADDR_E, b_mode, RTLOP_OR),
-      new LogicalDecoder("orS", ADDR_G, v_mode, ADDR_E, v_mode, RTLOP_OR),
-      new LogicalDecoder("orb", ADDR_REG, AL, ADDR_I, b_mode, RTLOP_OR),
-      new LogicalDecoder("orS", ADDR_REG, EAX, ADDR_I, v_mode, RTLOP_OR),
-      new InstructionDecoder("pushl", ADDR_REG, CS),
-      null,     /* 0x0f extended opcode escape */
-      /* 10 */
-      new ArithmeticDecoder("adcb", ADDR_E, b_mode, ADDR_G, b_mode, RTLOP_ADDC),
-      new ArithmeticDecoder("adcS", ADDR_E, v_mode, ADDR_G, v_mode, RTLOP_ADDC),
-      new ArithmeticDecoder("adcb", ADDR_G, b_mode, ADDR_E, b_mode, RTLOP_ADDC),
-      new ArithmeticDecoder("adcS", ADDR_G, v_mode, ADDR_E, v_mode, RTLOP_ADDC),
-      new ArithmeticDecoder("adcb", ADDR_REG, AL, ADDR_I, b_mode, RTLOP_ADDC),
-      new ArithmeticDecoder("adcS", ADDR_REG, EAX, ADDR_I, v_mode, RTLOP_ADDC),
-      new InstructionDecoder("pushl", ADDR_REG, SS),
-      new InstructionDecoder("popl", ADDR_REG, SS),
-      /* 18 */
-      new ArithmeticDecoder("sbbb", ADDR_E, b_mode, ADDR_G, b_mode, RTLOP_SUBC),
-      new ArithmeticDecoder("sbbS", ADDR_E, v_mode, ADDR_G, v_mode, RTLOP_SUBC),
-      new ArithmeticDecoder("sbbb", ADDR_G, b_mode, ADDR_E, b_mode, RTLOP_SUBC),
-      new ArithmeticDecoder("sbbS", ADDR_G, v_mode, ADDR_E, v_mode, RTLOP_SUBC),
-      new ArithmeticDecoder("sbbb", ADDR_REG, AL, ADDR_I, b_mode, RTLOP_SUBC),
-      new ArithmeticDecoder("sbbS", ADDR_REG, EAX, ADDR_I, v_mode, RTLOP_SUBC),
-      new InstructionDecoder("pushl", ADDR_REG, DS),
-      new InstructionDecoder("popl", ADDR_REG, DS),
-      /* 20 */
-      new LogicalDecoder("andb", ADDR_E, b_mode, ADDR_G, b_mode, RTLOP_AND),
-      new LogicalDecoder("andS", ADDR_E, v_mode, ADDR_G, v_mode, RTLOP_AND),
-      new LogicalDecoder("andb", ADDR_G, b_mode, ADDR_E, b_mode, RTLOP_AND),
-      new LogicalDecoder("andS", ADDR_G, v_mode, ADDR_E, v_mode, RTLOP_AND),
-      new LogicalDecoder("andb", ADDR_REG, AL, ADDR_I, b_mode, RTLOP_AND),
-      new LogicalDecoder("andS", ADDR_REG, EAX, ADDR_I, v_mode, RTLOP_AND),
-      null,                     /* SEG es prefix */
-      new InstructionDecoder("daa"),
-      /* 28 */
-      new ArithmeticDecoder("subb", ADDR_E, b_mode, ADDR_G, b_mode, RTLOP_SUB),
-      new ArithmeticDecoder("subS", ADDR_E, v_mode, ADDR_G, v_mode, RTLOP_SUB),
-      new ArithmeticDecoder("subb", ADDR_G, b_mode, ADDR_E, b_mode, RTLOP_SUB),
-      new ArithmeticDecoder("subS", ADDR_G, v_mode, ADDR_E, v_mode, RTLOP_SUB),
-      new ArithmeticDecoder("subb", ADDR_REG, AL, ADDR_I, b_mode, RTLOP_SUB),
-      new ArithmeticDecoder("subS", ADDR_REG, EAX, ADDR_I, v_mode, RTLOP_SUB),
-      null,                     /* SEG CS prefix */
-      new InstructionDecoder("das"),
-      /* 30 */
-      new LogicalDecoder("xorb", ADDR_E, b_mode, ADDR_G, b_mode, RTLOP_XOR),
-      new LogicalDecoder("xorS", ADDR_E, v_mode, ADDR_G, v_mode, RTLOP_XOR),
-      new LogicalDecoder("xorb", ADDR_G, b_mode, ADDR_E, b_mode, RTLOP_XOR),
-      new LogicalDecoder("xorS", ADDR_G, v_mode, ADDR_E, v_mode, RTLOP_XOR),
-      new LogicalDecoder("xorb", ADDR_REG, AL, ADDR_I, b_mode, RTLOP_XOR),
-      new LogicalDecoder("xorS", ADDR_REG, EAX, ADDR_I, v_mode, RTLOP_XOR),
-      null,     /* SEG SS prefix */
-      new InstructionDecoder("aaa"),
-      /* 38 */
-      new InstructionDecoder("cmpb", ADDR_E, b_mode, ADDR_G, b_mode),
-      new InstructionDecoder("cmpS", ADDR_E, v_mode, ADDR_G, v_mode),
-      new InstructionDecoder("cmpb", ADDR_G, b_mode, ADDR_E, b_mode),
-      new InstructionDecoder("cmpS", ADDR_G, v_mode, ADDR_E, v_mode),
-      new InstructionDecoder("cmpb", ADDR_REG, AL, ADDR_I, b_mode),
-      new InstructionDecoder("cmpS", ADDR_REG, EAX, ADDR_I, v_mode),
-      null, /* SEG DS prefix */
-      new InstructionDecoder("aas"),
-      /* 40 */
-      new ArithmeticDecoder("incS", ADDR_REG, EAX, RTLOP_ADD),
-      new ArithmeticDecoder("incS", ADDR_REG, ECX, RTLOP_ADD),
-      new ArithmeticDecoder("incS", ADDR_REG, EDX, RTLOP_ADD),
-      new ArithmeticDecoder("incS", ADDR_REG, EBX, RTLOP_ADD),
-      new ArithmeticDecoder("incS", ADDR_REG, ESP, RTLOP_ADD),
-      new ArithmeticDecoder("incS", ADDR_REG, EBP, RTLOP_ADD),
-      new ArithmeticDecoder("incS", ADDR_REG, ESI, RTLOP_ADD),
-      new ArithmeticDecoder("incS", ADDR_REG, EDI, RTLOP_ADD),
-      /* 48 */
-      new ArithmeticDecoder("decS", ADDR_REG, EAX, RTLOP_SUB),
-      new ArithmeticDecoder("decS", ADDR_REG, ECX, RTLOP_SUB),
-      new ArithmeticDecoder("decS", ADDR_REG, EDX, RTLOP_SUB),
-      new ArithmeticDecoder("decS", ADDR_REG, EBX, RTLOP_SUB),
-      new ArithmeticDecoder("decS", ADDR_REG, ESP, RTLOP_SUB),
-      new ArithmeticDecoder("decS", ADDR_REG, EBP, RTLOP_SUB),
-      new ArithmeticDecoder("decS", ADDR_REG, ESI, RTLOP_SUB),
-      new ArithmeticDecoder("decS", ADDR_REG, EDI, RTLOP_SUB),
-      /* 50 */
-      new InstructionDecoder("pushS", ADDR_REG, EAX),
-      new InstructionDecoder("pushS", ADDR_REG, ECX),
-      new InstructionDecoder("pushS", ADDR_REG, EDX),
-      new InstructionDecoder("pushS", ADDR_REG, EBX),
-      new InstructionDecoder("pushS", ADDR_REG, ESP),
-      new InstructionDecoder("pushS", ADDR_REG, EBP),
-      new InstructionDecoder("pushS", ADDR_REG, ESI),
-      new InstructionDecoder("pushS", ADDR_REG, EDI),
-      /* 58 */
-      new InstructionDecoder("popS", ADDR_REG, EAX),
-      new InstructionDecoder("popS", ADDR_REG, ECX),
-      new InstructionDecoder("popS", ADDR_REG, EDX),
-      new InstructionDecoder("popS", ADDR_REG, EBX),
-      new InstructionDecoder("popS", ADDR_REG, ESP),
-      new InstructionDecoder("popS", ADDR_REG, EBP),
-      new InstructionDecoder("popS", ADDR_REG, ESI),
-      new InstructionDecoder("popS", ADDR_REG, EDI),
-      /* 60 */
-      new InstructionDecoder("pusha"),
-      new InstructionDecoder("popa"),
-      new InstructionDecoder("boundS", ADDR_G, v_mode, ADDR_E, v_mode),
-      new InstructionDecoder("arpl", ADDR_E, w_mode, ADDR_G, w_mode),
-      null,     /* seg fs */
-      null,     /* seg gs */
-      null,     /* op size prefix */
-      null, /* adr size prefix */
-      /* 68 */
-      new InstructionDecoder("pushS", ADDR_I, v_mode),  /* 386 book wrong */
-      new ArithmeticDecoder("imulS", ADDR_G, v_mode, ADDR_E, v_mode, ADDR_I, v_mode, RTLOP_SMUL),
-      new InstructionDecoder("pushl", ADDR_I, b_mode), /* push of byte really pushes 4 bytes */
-      new ArithmeticDecoder("imulS", ADDR_G, v_mode, ADDR_E, v_mode, ADDR_I, b_mode, RTLOP_SMUL),
-      new InstructionDecoder("insb", ADDR_ESDI, b_mode, INDIR_REG, DX),
-      new InstructionDecoder("insS", ADDR_ESDI, v_mode, INDIR_REG, DX),
-      new InstructionDecoder("outsb", INDIR_REG, DX, ADDR_DSSI, b_mode),
-      new InstructionDecoder("outsS", INDIR_REG, DX, ADDR_DSSI, v_mode),
-      /* 70 */
-      new ConditionalJmpDecoder("jo", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("jno", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("jb", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("jae", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("je", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("jne", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("jbe", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("ja", ADDR_J, b_mode),
-      /* 78 */
-      new ConditionalJmpDecoder("js", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("jns", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("jp", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("jnp", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("jl", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("jnl", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("jle", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("jg", ADDR_J, b_mode),
-      /* 80 */
-      new GRPDecoder(null, 0),
-      new GRPDecoder(null, 1),
-      null,
-      new GRPDecoder(null, 2),
-      new InstructionDecoder("testb", ADDR_E, b_mode, ADDR_G, b_mode),
-      new InstructionDecoder("testS", ADDR_E, v_mode, ADDR_G, v_mode),
-      new MoveDecoder("xchgb", ADDR_E, b_mode, ADDR_G, b_mode),
-      new MoveDecoder("xchgS", ADDR_E, v_mode, ADDR_G, v_mode),
-      /* 88 */
-      new MoveDecoder("movb", ADDR_E, b_mode, ADDR_G, b_mode),
-      new MoveDecoder("movS", ADDR_E, v_mode, ADDR_G, v_mode),
-      new MoveDecoder("movb", ADDR_G, b_mode, ADDR_E, b_mode),
-      new MoveDecoder("movS", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("movw", ADDR_E, w_mode, ADDR_SEG, w_mode),
-      new InstructionDecoder("leaS", ADDR_G, v_mode, ADDR_E, 0),
-      new MoveDecoder("movw", ADDR_SEG, w_mode, ADDR_E, w_mode),
-      new InstructionDecoder("popS", ADDR_E, v_mode),
-      /* 90 */
-      new InstructionDecoder("nop"),
-      new MoveDecoder("xchgS", ADDR_REG, ECX, ADDR_REG, EAX),
-      new MoveDecoder("xchgS", ADDR_REG, EDX, ADDR_REG, EAX),
-      new MoveDecoder("xchgS", ADDR_REG, EBX, ADDR_REG, EAX),
-      new MoveDecoder("xchgS", ADDR_REG, ESP, ADDR_REG, EAX),
-      new MoveDecoder("xchgS", ADDR_REG, EBP, ADDR_REG, EAX),
-      new MoveDecoder("xchgS", ADDR_REG, ESI, ADDR_REG, EAX),
-      new MoveDecoder("xchgS", ADDR_REG, EDI, ADDR_REG, EAX),
-      /* 98 */
-      new InstructionDecoder("cwtl"),
-      new InstructionDecoder("cltd"),
-      new CallDecoder("lcall", ADDR_DIR, p_mode),
-      null, /* fwait */
-      new InstructionDecoder("pushf"),
-      new InstructionDecoder("popf"),
-      new InstructionDecoder("sahf"),
-      new InstructionDecoder("lahf"),
-      /* a0 */
-      new MoveDecoder("movb", ADDR_REG, AL, ADDR_OFF, b_mode),
-      new MoveDecoder("movS", ADDR_REG, EAX, ADDR_OFF, v_mode),
-      new MoveDecoder("movb", ADDR_OFF, b_mode, ADDR_REG, AL),
-      new MoveDecoder("movS", ADDR_OFF, v_mode, ADDR_REG, EAX),
-      new MoveDecoder("movsb", ADDR_ESDI, b_mode, ADDR_DSSI, b_mode),
-      new MoveDecoder("movsS", ADDR_ESDI, v_mode, ADDR_DSSI, v_mode),
-      new InstructionDecoder("cmpsb", ADDR_ESDI, b_mode, ADDR_DSSI, b_mode),
-      new InstructionDecoder("cmpsS", ADDR_ESDI, v_mode, ADDR_DSSI, v_mode),
-      /* a8 */
-      new InstructionDecoder("testb", ADDR_REG, AL, ADDR_I, b_mode),
-      new InstructionDecoder("testS", ADDR_REG, EAX, ADDR_I, v_mode),
-      new InstructionDecoder("stosb", ADDR_ESDI, b_mode, ADDR_REG, AL),
-      new InstructionDecoder("stosS", ADDR_ESDI, v_mode, ADDR_REG, EAX),
-      new InstructionDecoder("lodsb", ADDR_REG, AL, ADDR_DSSI, b_mode),
-      new InstructionDecoder("lodsS", ADDR_REG, EAX, ADDR_DSSI, v_mode),
-      new InstructionDecoder("scasb", ADDR_REG, AL, ADDR_ESDI, b_mode),
-      new InstructionDecoder("scasS", ADDR_REG, EAX, ADDR_ESDI, v_mode),
-      /* b0 */
-      new MoveDecoder("movb", ADDR_REG, AL, ADDR_I, b_mode),
-      new MoveDecoder("movb", ADDR_REG, CL, ADDR_I, b_mode),
-      new MoveDecoder("movb", ADDR_REG, DL, ADDR_I, b_mode),
-      new MoveDecoder("movb", ADDR_REG, BL, ADDR_I, b_mode),
-      new MoveDecoder("movb", ADDR_REG, AH, ADDR_I, b_mode),
-      new MoveDecoder("movb", ADDR_REG, CH, ADDR_I, b_mode),
-      new MoveDecoder("movb", ADDR_REG, DH, ADDR_I, b_mode),
-      new MoveDecoder("movb", ADDR_REG, BH, ADDR_I, b_mode),
-      /* b8 */
-      new MoveDecoder("movS", ADDR_REG, EAX, ADDR_I, v_mode),
-      new MoveDecoder("movS", ADDR_REG, ECX, ADDR_I, v_mode),
-      new MoveDecoder("movS", ADDR_REG, EDX, ADDR_I, v_mode),
-      new MoveDecoder("movS", ADDR_REG, EBX, ADDR_I, v_mode),
-      new MoveDecoder("movS", ADDR_REG, ESP, ADDR_I, v_mode),
-      new MoveDecoder("movS", ADDR_REG, EBP, ADDR_I, v_mode),
-      new MoveDecoder("movS", ADDR_REG, ESI, ADDR_I, v_mode),
-      new MoveDecoder("movS", ADDR_REG, EDI, ADDR_I, v_mode),
-      /* c0 */
-      new GRPDecoder(null, 3),
-      new GRPDecoder(null, 4),
-      new BranchDecoder("ret", ADDR_I, w_mode),
-      new BranchDecoder("ret"),
-      new InstructionDecoder("lesS", ADDR_G, v_mode, ADDR_E, 0),
-      new InstructionDecoder("ldsS", ADDR_G, v_mode, ADDR_E, 0),
-      new MoveDecoder("movb", ADDR_E, b_mode, ADDR_I, b_mode),
-      new MoveDecoder("movS", ADDR_E, v_mode, ADDR_I, v_mode),
-      /* c8 */
-      new InstructionDecoder("enter", ADDR_I, w_mode, ADDR_I, b_mode),
-      new InstructionDecoder("leave"),
-      new InstructionDecoder("lret", ADDR_I, w_mode),
-      new InstructionDecoder("lret"),
-      new InstructionDecoder("int3"),
-      new InstructionDecoder("int", ADDR_I, b_mode),
-      new InstructionDecoder("into"),
-      new InstructionDecoder("iret"),
-      /* d0 */
-      new GRPDecoder(null, 5),
-      new GRPDecoder(null, 6),
-      new GRPDecoder(null, 7),
-      new GRPDecoder(null, 8),
-      new InstructionDecoder("aam", ADDR_I, b_mode),
-      new InstructionDecoder("aad", ADDR_I, b_mode),
-      null,
-      new InstructionDecoder("xlat"),
-      /* d8 */
-      new FloatDecoder(),
-      new FloatDecoder(),
-      new FloatDecoder(),
-      new FloatDecoder(),
-      new FloatDecoder(),
-      new FloatDecoder(),
-      new FloatDecoder(),
-      new FloatDecoder(),
-      /* e0 */
-      new BranchDecoder("loopne", ADDR_J, b_mode),
-      new BranchDecoder("loope", ADDR_J, b_mode),
-      new BranchDecoder("loop", ADDR_J, b_mode),
-      new ConditionalJmpDecoder("jCcxz", ADDR_J, b_mode),
-      new InstructionDecoder("inb", ADDR_REG, AL, ADDR_I, b_mode),
-      new InstructionDecoder("inS", ADDR_REG, EAX, ADDR_I, b_mode),
-      new InstructionDecoder("outb", ADDR_I, b_mode, ADDR_REG, AL),
-      new InstructionDecoder("outS", ADDR_I, b_mode, ADDR_REG, EAX),
-      /* e8 */
-      new CallDecoder("call", ADDR_J, v_mode),
-      new JmpDecoder("jmp", ADDR_J, v_mode),
-      new JmpDecoder("ljmp", ADDR_DIR, p_mode),
-      new JmpDecoder("jmp", ADDR_J, b_mode),
-      new InstructionDecoder("inb", ADDR_REG, AL, INDIR_REG, DX),
-      new InstructionDecoder("inS", ADDR_REG, EAX, INDIR_REG, DX),
-      new InstructionDecoder("outb", INDIR_REG, DX, ADDR_REG,AL),
-      new InstructionDecoder("outS", INDIR_REG, DX, ADDR_REG, EAX),
-      /* f0 */
-      new InstructionDecoder("lock"),   /* lock prefix */
-      null,
-      new InstructionDecoder("repne"),  /* repne */
-      new InstructionDecoder("rep"),    /* repz */
-      new InstructionDecoder("hlt"),
-      new InstructionDecoder("cmc"),
-      new GRPDecoder(null, 9),
-      new GRPDecoder(null, 10),
-      /* f8 */
-      new InstructionDecoder("clc"),
-      new InstructionDecoder("stc"),
-      new InstructionDecoder("cli"),
-      new InstructionDecoder("sti"),
-      new InstructionDecoder("cld"),
-      new InstructionDecoder("std"),
-      new GRPDecoder(null, 11),
-      new GRPDecoder(null, 12)
-   };
-
-   //APPENDIX A - Table A-3. Two-byte Opcode Map
-   private static final InstructionDecoder twoByteTable[] = {
-      /* 00 */
-      new GRPDecoder(null, 13),
-      new GRPDecoder(null, 14),
-      new InstructionDecoder("larS", ADDR_G, v_mode, ADDR_E, w_mode),
-      new InstructionDecoder("lslS", ADDR_G, v_mode, ADDR_E, w_mode),
-      null,
-      null,
-      new InstructionDecoder("clts"),
-      null,
-      /* 08 */
-      new InstructionDecoder("invd"),
-      new InstructionDecoder("wbinvd"),
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 10 */ //SSE
-      new SSEMoveDecoder("movups", ADDR_V, ps_mode, ADDR_W, ps_mode),
-      new SSEMoveDecoder("movups", ADDR_W, ps_mode, ADDR_V, ps_mode),
-      new SSEMoveDecoder("movlps", ADDR_W, q_mode, ADDR_V, q_mode),
-      new SSEMoveDecoder("movlps", ADDR_V, q_mode, ADDR_W, q_mode),
-      new SSEInstructionDecoder("unpcklps", ADDR_V, ps_mode, ADDR_W, q_mode),
-      new SSEInstructionDecoder("unpckhps", ADDR_V, ps_mode, ADDR_W, q_mode),
-      new SSEMoveDecoder("movhps", ADDR_V, q_mode, ADDR_W, q_mode),
-      new SSEMoveDecoder("movhps", ADDR_W, q_mode, ADDR_V, q_mode),
-      /* 18 */
-      new GRPDecoder(null, 21),
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 20 */
-      /* these are all backward in appendix A of the intel book */
-      new MoveDecoder("movl", ADDR_R, d_mode, ADDR_C, d_mode),
-      new MoveDecoder("movl", ADDR_R, d_mode, ADDR_D, d_mode),
-      new MoveDecoder("movl", ADDR_C, d_mode, ADDR_R, d_mode),
-      new MoveDecoder("movl", ADDR_D, d_mode, ADDR_R, d_mode),
-      new MoveDecoder("movl", ADDR_R, d_mode, ADDR_T, d_mode),
-      null,
-      new MoveDecoder("movl", ADDR_T, d_mode, ADDR_R, d_mode),
-      null,
-      /* 28 */
-      new SSEMoveDecoder("movaps", ADDR_V, ps_mode, ADDR_W, ps_mode),
-      new SSEMoveDecoder("movaps", ADDR_W, ps_mode, ADDR_V, ps_mode),
-      new SSEInstructionDecoder("cvtpi2ps", ADDR_V, ps_mode, ADDR_Q, q_mode),
-      new SSEMoveDecoder("movntps", ADDR_W, ps_mode, ADDR_V, ps_mode),
-      new SSEInstructionDecoder("cvttps2pi", ADDR_Q, q_mode, ADDR_W, ps_mode),
-      new SSEInstructionDecoder("cvtps2pi", ADDR_Q, q_mode, ADDR_W, ps_mode),
-      new SSEInstructionDecoder("ucomiss", ADDR_V, ss_mode, ADDR_W, ss_mode),
-      new SSEInstructionDecoder("comiss", ADDR_V, ps_mode, ADDR_W, ps_mode),
-      /* 30 */
-      new SSEInstructionDecoder("wrmsr"),
-      new SSEInstructionDecoder("rtdsc"),
-      new SSEInstructionDecoder("rdmsr"),
-      new SSEInstructionDecoder("rdpmc"),
-      new SSEInstructionDecoder("sysenter"),
-      new SSEInstructionDecoder("sysexit"),
-      null,
-      null,
-      /* 38 */
-      null,
-      null,
-      null,
-      null,
-      new SSEMoveDecoder("movnti", ADDR_G, v_mode, ADDR_E, v_mode),
-      null,
-      null,
-      null,
-      /* 40 */
-      new MoveDecoder("cmovo", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("cmovno", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("cmovb", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("cmovae", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("cmove", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("cmovne", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("cmovbe", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("cmova", ADDR_G, v_mode, ADDR_E, v_mode),
-      /* 48 */
-      new MoveDecoder("cmovs", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("cmovns", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("cmovp", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("cmovnp", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("cmovl", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("cmovge", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("cmovle", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("cmovg", ADDR_G, v_mode, ADDR_E, v_mode),
-      /* 50 */
-      new SSEMoveDecoder("movmskps", ADDR_E, d_mode, ADDR_V, ps_mode),
-      new SSEInstructionDecoder("sqrtps", ADDR_V, ps_mode, ADDR_W, ps_mode),
-      new SSEInstructionDecoder("rsqrtps", ADDR_V, ps_mode, ADDR_W, ps_mode),
-      new SSEInstructionDecoder("rcpps", ADDR_V, ps_mode, ADDR_W, ps_mode),
-      new SSELogicalDecoder("andps", ADDR_V, ps_mode, ADDR_W, ps_mode, RTLOP_AND),
-      new SSELogicalDecoder("andnps", ADDR_V, ps_mode, ADDR_W, ps_mode, RTLOP_AND),
-      new SSELogicalDecoder("orps", ADDR_V, ps_mode, ADDR_W, ps_mode, RTLOP_OR),
-      new SSELogicalDecoder("xorps", ADDR_V, ps_mode, ADDR_W, ps_mode, RTLOP_XOR),
-      /* 58 */
-      new SSEArithmeticDecoder("addps", ADDR_V, ps_mode, ADDR_W, ps_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("mulps", ADDR_V, ps_mode, ADDR_W, ps_mode, RTLOP_SMUL),
-      new SSEInstructionDecoder("cvtps2pd", ADDR_V, pd_mode, ADDR_W, ps_mode),
-      new SSEInstructionDecoder("cvtdq2ps", ADDR_V, ps_mode, ADDR_W, dq_mode),
-      new SSEArithmeticDecoder("subps", ADDR_V, ps_mode, ADDR_W, ps_mode, RTLOP_SUB),
-      new SSEInstructionDecoder("minps", ADDR_V, ps_mode, ADDR_W, ps_mode),
-      new SSEArithmeticDecoder("divps", ADDR_V, ps_mode, ADDR_W, ps_mode, RTLOP_SDIV),
-      new SSEInstructionDecoder("maxps", ADDR_V, ps_mode, ADDR_W, ps_mode),
-      /* 60 */
-      new SSEInstructionDecoder("punpcklbw", ADDR_P, q_mode, ADDR_Q, d_mode),
-      new SSEInstructionDecoder("punpcklwd", ADDR_P, q_mode, ADDR_Q, d_mode),
-      new SSEInstructionDecoder("punpckldq", ADDR_P, q_mode, ADDR_Q, d_mode),
-      new SSEInstructionDecoder("packsswb", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSEInstructionDecoder("pcmpgtb", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSEInstructionDecoder("pcmpgtw", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSEInstructionDecoder("pcmpgtd", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSEInstructionDecoder("packuswb", ADDR_P, q_mode, ADDR_Q, q_mode),
-      /* 68 */
-      new SSEInstructionDecoder("punpckhbw", ADDR_P, q_mode, ADDR_Q, d_mode),
-      new SSEInstructionDecoder("punpckhwd", ADDR_P, q_mode, ADDR_Q, d_mode),
-      new SSEInstructionDecoder("punpckhdq", ADDR_P, q_mode, ADDR_Q, d_mode),
-      new SSEInstructionDecoder("packssdw", ADDR_P, q_mode, ADDR_Q, d_mode),
-      null,
-      null,
-      new SSEMoveDecoder("movd", ADDR_P, d_mode, ADDR_E, d_mode),
-      new SSEMoveDecoder("movq", ADDR_P, q_mode, ADDR_E, q_mode),
-      /* 70 */
-      new SSEInstructionDecoder("pshufw", ADDR_P, q_mode, ADDR_Q, q_mode, ADDR_I, b_mode),
-      new GRPDecoder(null, 17),
-      new GRPDecoder(null, 18),
-      new GRPDecoder(null, 19),
-      new SSEInstructionDecoder("pcmpeqb", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSEInstructionDecoder("pcmpeqw", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSEInstructionDecoder("pcmpeqd", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSEInstructionDecoder("emms"),
-      /* 78 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      new SSEMoveDecoder("movd", ADDR_E, d_mode, ADDR_P, d_mode),
-      new SSEMoveDecoder("movq", ADDR_Q, q_mode, ADDR_P, q_mode),
-      /* 80 */
-      new ConditionalJmpDecoder("jo", ADDR_J, v_mode),
-      new ConditionalJmpDecoder("jno", ADDR_J, v_mode),
-      new ConditionalJmpDecoder("jb", ADDR_J, v_mode),
-      new ConditionalJmpDecoder("jae", ADDR_J, v_mode),
-      new ConditionalJmpDecoder("je", ADDR_J, v_mode),
-      new ConditionalJmpDecoder("jne", ADDR_J, v_mode),
-      new ConditionalJmpDecoder("jbe", ADDR_J, v_mode),
-      new ConditionalJmpDecoder("ja", ADDR_J, v_mode),
-      /* 88 */
-      new ConditionalJmpDecoder("js", ADDR_J, v_mode),
-      new ConditionalJmpDecoder("jns", ADDR_J, v_mode),
-      new ConditionalJmpDecoder("jp", ADDR_J, v_mode),
-      new ConditionalJmpDecoder("jnp", ADDR_J, v_mode),
-      new ConditionalJmpDecoder("jl", ADDR_J, v_mode),
-      new ConditionalJmpDecoder("jge", ADDR_J, v_mode),
-      new ConditionalJmpDecoder("jle", ADDR_J, v_mode),
-      new ConditionalJmpDecoder("jg", ADDR_J, v_mode),
-      /* 90 */
-      new InstructionDecoder("seto", ADDR_E, b_mode),
-      new InstructionDecoder("setno", ADDR_E, b_mode),
-      new InstructionDecoder("setb", ADDR_E, b_mode),
-      new InstructionDecoder("setae", ADDR_E, b_mode),
-      new InstructionDecoder("sete", ADDR_E, b_mode),
-      new InstructionDecoder("setne", ADDR_E, b_mode),
-      new InstructionDecoder("setbe", ADDR_E, b_mode),
-      new InstructionDecoder("seta", ADDR_E, b_mode),
-      /* 98 */
-      new InstructionDecoder("sets", ADDR_E, b_mode),
-      new InstructionDecoder("setns", ADDR_E, b_mode),
-      new InstructionDecoder("setp", ADDR_E, b_mode),
-      new InstructionDecoder("setnp", ADDR_E, b_mode),
-      new InstructionDecoder("setl", ADDR_E, b_mode),
-      new InstructionDecoder("setge", ADDR_E, b_mode),
-      new InstructionDecoder("setle", ADDR_E, b_mode),
-      new InstructionDecoder("setg", ADDR_E, b_mode),
-      /* a0 */
-      new InstructionDecoder("pushl", ADDR_REG, FS),
-      new InstructionDecoder("popl", ADDR_REG, FS),
-      null,
-      new InstructionDecoder("btS", ADDR_E, v_mode, ADDR_G, v_mode),
-      new InstructionDecoder("shldS", ADDR_E, v_mode, ADDR_G, v_mode, ADDR_I, b_mode),
-      new InstructionDecoder("shldS", ADDR_E, v_mode, ADDR_G, v_mode, ADDR_REG, CL),
-      null,
-      null,
-      /* a8 */
-      new InstructionDecoder("pushl", ADDR_REG, GS),
-      new InstructionDecoder("popl", ADDR_REG, GS),
-      new SSEInstructionDecoder("rsm"),
-      new InstructionDecoder("btsS", ADDR_E, v_mode, ADDR_G, v_mode),
-      new InstructionDecoder("shrdS", ADDR_E, v_mode, ADDR_G, v_mode, ADDR_I, b_mode),
-      new InstructionDecoder("shrdS", ADDR_E, v_mode, ADDR_G, v_mode, ADDR_REG, CL),
-      new GRPDecoder(null, 20),
-      new ArithmeticDecoder("imulS", ADDR_G, v_mode, ADDR_E, v_mode, RTLOP_SMUL),
-      /* b0 */
-      new InstructionDecoder("cmpxchgb", ADDR_E, b_mode, ADDR_G, b_mode),
-      new InstructionDecoder("cmpxchgS", ADDR_E, v_mode, ADDR_G, v_mode),
-      new InstructionDecoder("lssS", ADDR_G, v_mode, ADDR_M, p_mode),
-      new InstructionDecoder("btrS", ADDR_E, v_mode, ADDR_G, v_mode),
-      new InstructionDecoder("lfsS", ADDR_G, v_mode, ADDR_M, p_mode),
-      new InstructionDecoder("lgsS", ADDR_G, v_mode, ADDR_M, p_mode),
-      new MoveDecoder("movzbS", ADDR_G, v_mode, ADDR_E, b_mode),
-      new MoveDecoder("movzwS", ADDR_G, v_mode, ADDR_E, w_mode),
-      /* b8 */
-      null,
-      null,
-      new GRPDecoder(null, 15),
-      new InstructionDecoder("btcS", ADDR_E, v_mode, ADDR_G, v_mode),
-      new InstructionDecoder("bsfS", ADDR_G, v_mode, ADDR_E, v_mode),
-      new InstructionDecoder("bsrS", ADDR_G, v_mode, ADDR_E, v_mode),
-      new MoveDecoder("movsbS", ADDR_G, v_mode, ADDR_E, b_mode),
-      new MoveDecoder("movswS", ADDR_G, v_mode, ADDR_E, w_mode),
-      /* c0 */
-      new ArithmeticDecoder("xaddb", ADDR_E, b_mode, ADDR_G, b_mode, RTLOP_ADD),
-      new ArithmeticDecoder("xaddS", ADDR_E, v_mode, ADDR_G, v_mode, RTLOP_ADD),
-      new SSEInstructionDecoder("cmpps", ADDR_V, ps_mode, ADDR_W, ps_mode, ADDR_I, b_mode),
-      new SSEMoveDecoder("movnti", ADDR_E, d_mode, ADDR_G, d_mode),
-      new SSEInstructionDecoder("pinsrw", ADDR_P, q_mode, ADDR_E, d_mode, ADDR_I, b_mode),
-      new SSEInstructionDecoder("pextrw", ADDR_G, d_mode, ADDR_P, q_mode, ADDR_I, b_mode),
-      new SSEInstructionDecoder("shufps", ADDR_V, ps_mode, ADDR_W, ps_mode, ADDR_I, b_mode),
-      new GRPDecoder(null, 16),
-      /* c8 */
-      new InstructionDecoder("bswap", ADDR_REG, EAX),
-      new InstructionDecoder("bswap", ADDR_REG, ECX),
-      new InstructionDecoder("bswap", ADDR_REG, EDX),
-      new InstructionDecoder("bswap", ADDR_REG, EBX),
-      new InstructionDecoder("bswap", ADDR_REG, ESP),
-      new InstructionDecoder("bswap", ADDR_REG, EBP),
-      new InstructionDecoder("bswap", ADDR_REG, ESI),
-      new InstructionDecoder("bswap", ADDR_REG, EDI),
-      /* d0 */
-      null,
-      new SSEShiftDecoder("psrlw", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SRL),
-      new SSEShiftDecoder("psrld", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SRL),
-      new SSEShiftDecoder("psrlq", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SRL),
-      new SSEArithmeticDecoder("paddq", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("pmullw", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SMUL),
-      null,
-      new SSEMoveDecoder("pmovmskb", ADDR_G, d_mode, ADDR_P, q_mode),
-      /* d8 */
-      new SSEArithmeticDecoder("psubusb", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SUB),
-      new SSEArithmeticDecoder("psubusw", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SUB),
-      new SSEInstructionDecoder("pminub", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSELogicalDecoder("pand", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_AND),
-      new SSEArithmeticDecoder("paddusb", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("paddusw", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_ADD),
-      new SSEInstructionDecoder("pmaxub", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSELogicalDecoder("pandn", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_AND),
-      /* e0 */
-      new SSEInstructionDecoder("pavgb", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSEInstructionDecoder("psraw", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSEInstructionDecoder("psrad", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSEInstructionDecoder("pavgw", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSEArithmeticDecoder("pmulhuw", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_UMUL),
-      new SSEArithmeticDecoder("pmulhw", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SMUL),
-      null,
-      new SSEMoveDecoder("movntq", ADDR_W, q_mode, ADDR_V, q_mode),
-      /* e8 */
-      new SSEArithmeticDecoder("psubsb", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SUB),
-      new SSEArithmeticDecoder("psubsw", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SUB),
-      new SSEInstructionDecoder("pminsw", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSELogicalDecoder("por", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_OR),
-      new SSEArithmeticDecoder("paddsb", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("paddsw", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_ADD),
-      new SSEInstructionDecoder("pmaxsw", ADDR_P, q_mode, ADDR_Q, q_mode),
-      new SSELogicalDecoder("pxor", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_XOR),
-      /* f0 */
-      null,
-      new SSEShiftDecoder("psllw", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SLL),
-      new SSEShiftDecoder("pslld", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SLL),
-      new SSEShiftDecoder("psllq", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SLL),
-      new SSEArithmeticDecoder("pmuludq", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_UMUL),
-      new SSEArithmeticDecoder("pmaddwd", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("psadbw", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_ADD),
-      new SSEMoveDecoder("maskmoveq", ADDR_P, pi_mode, ADDR_Q, pi_mode),
-      /* f8 */
-      new SSEArithmeticDecoder("psubb", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SUB),
-      new SSEArithmeticDecoder("psubw", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SUB),
-      new SSEArithmeticDecoder("psubd", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SUB),
-      new SSEArithmeticDecoder("psubq", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_SUB),
-      new SSEArithmeticDecoder("paddb", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("paddw", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("paddd", ADDR_P, q_mode, ADDR_Q, q_mode, RTLOP_ADD),
-      null
-   };
-
-   private static final InstructionDecoder twoBytePrefixF2Table[] = {
-      /* 00 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 08 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 10 */
-      new SSEMoveDecoder("movsd", ADDR_V, sd_mode, ADDR_W, sd_mode),
-      new SSEMoveDecoder("movsd", ADDR_V, sd_mode, ADDR_W, sd_mode),
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 18 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 20 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 28 */
-      null,
-      null,
-      new SSEInstructionDecoder("cvtsi2sd", ADDR_V, sd_mode, ADDR_E, d_mode),
-      null,
-      new SSEInstructionDecoder("cvttsd2si", ADDR_G, d_mode, ADDR_W, sd_mode),
-      new SSEInstructionDecoder("cvtsd2si", ADDR_G, d_mode, ADDR_W, sd_mode),
-      null,
-      null,
-      /* 30 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 38 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 40 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 48 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 50 */
-      null,
-      new SSEInstructionDecoder("sqrtsd", ADDR_V, sd_mode, ADDR_W, sd_mode),
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 58 */
-      new SSEArithmeticDecoder("addsd", ADDR_V, sd_mode, ADDR_W, sd_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("mulsd", ADDR_V, sd_mode, ADDR_W, sd_mode, RTLOP_SMUL),
-      new SSEInstructionDecoder("cvtsd2ss", ADDR_V, sd_mode, ADDR_W, sd_mode),
-      null,
-      new SSEArithmeticDecoder("subsd", ADDR_V, sd_mode, ADDR_W, sd_mode, RTLOP_SUB),
-      new SSEInstructionDecoder("minsd", ADDR_V, sd_mode, ADDR_W, sd_mode),
-      new SSEArithmeticDecoder("divsd", ADDR_V, sd_mode, ADDR_W, sd_mode, RTLOP_SDIV),
-      new SSEInstructionDecoder("maxsd", ADDR_V, sd_mode, ADDR_W, sd_mode),
-      /* 60 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 68 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 70 */
-      new SSEInstructionDecoder("pshuflw", ADDR_V, dq_mode, ADDR_W, dq_mode, ADDR_I, b_mode),
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 78 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 80 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 88 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 90 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 98 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* a0 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* a8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* b0 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* b8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* c0 */
-      null,
-      null,
-      new SSEInstructionDecoder("cmpsd", ADDR_V, sd_mode, ADDR_W, sd_mode, ADDR_I, b_mode),
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* c8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* d0 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      new SSEMoveDecoder("movdq2q", ADDR_P, q_mode, ADDR_W, q_mode),
-      null,
-      /* d8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* e0 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      new SSEInstructionDecoder("cvtpd2dq", ADDR_V, dq_mode, ADDR_W, pd_mode),
-      null,
-      /* e8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* f0 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* f8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null
-   };
-
-   private static final InstructionDecoder twoBytePrefixF3Table[] = {
-      /* 00 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 08 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 10 */
-      new SSEMoveDecoder("movss", ADDR_V, ss_mode, ADDR_W, ss_mode),
-      new SSEMoveDecoder("movss", ADDR_W, ss_mode, ADDR_V, ss_mode),
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 18 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 20 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 28 */
-      null,
-      null,
-      new SSEInstructionDecoder("cvtsi2ss", ADDR_V, ss_mode, ADDR_E, d_mode),
-      null,
-      new SSEInstructionDecoder("cvttss2si", ADDR_G, d_mode, ADDR_W, ss_mode),
-      new SSEInstructionDecoder("cvtss2si", ADDR_G, d_mode, ADDR_W, ss_mode),
-      null,
-      null,
-      /* 30 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 38 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 40 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 48 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 50 */
-      null,
-      new SSEInstructionDecoder("sqrtss", ADDR_V, ss_mode, ADDR_W, ss_mode),
-      new SSEInstructionDecoder("rsqrtss", ADDR_V, ss_mode, ADDR_W, ss_mode),
-      new SSEInstructionDecoder("rcpss", ADDR_V, ss_mode, ADDR_W, ss_mode),
-      null,
-      null,
-      null,
-      null,
-      /* 58 */
-      new SSEArithmeticDecoder("addss", ADDR_V, ss_mode, ADDR_W, ss_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("mulss", ADDR_V, ss_mode, ADDR_W, ss_mode, RTLOP_SMUL),
-      new SSEInstructionDecoder("cvtss2sd", ADDR_V, ss_mode, ADDR_W, ss_mode),
-      new SSEInstructionDecoder("cvttps2dq", ADDR_V, dq_mode, ADDR_W, ps_mode),
-      new SSEArithmeticDecoder("subss", ADDR_V, ss_mode, ADDR_W, ss_mode, RTLOP_SUB),
-      new SSEInstructionDecoder("minss", ADDR_V, ss_mode, ADDR_W, ss_mode),
-      new SSEArithmeticDecoder("divss", ADDR_V, ss_mode, ADDR_W, ss_mode, RTLOP_SDIV),
-      new SSEInstructionDecoder("maxss", ADDR_V, ss_mode, ADDR_W, ss_mode),
-      /* 60 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 68 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      new SSEMoveDecoder("movdqu", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      /* 70 */
-      new SSEInstructionDecoder("pshufhw", ADDR_V, dq_mode, ADDR_W, dq_mode, ADDR_I, b_mode),
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 78 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      new SSEMoveDecoder("movq", ADDR_V, q_mode, ADDR_W, q_mode),
-      new SSEMoveDecoder("movdqu", ADDR_W, dq_mode, ADDR_V, dq_mode),
-      /* 80 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 88 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 90 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 98 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* a0 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* a8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* b0 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* b8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* c0 */
-      null,
-      null,
-      new SSEInstructionDecoder("cmpss", ADDR_V, ss_mode, ADDR_W, ss_mode, ADDR_I, b_mode),
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* c8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* d0 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      new SSEMoveDecoder("movq2dq", ADDR_V, dq_mode, ADDR_Q, q_mode),
-      null,
-      /* d8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* e0 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      new SSEInstructionDecoder("cvtdq2pd", ADDR_V, pd_mode, ADDR_W, dq_mode),
-      null,
-      /* e8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* f0 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* f8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null
-   };
-
-   private static final InstructionDecoder twoBytePrefix66Table[] = {
-      /* 00 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 08 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 10 */
-      new SSEMoveDecoder("movupd", ADDR_V, pd_mode, ADDR_W, pd_mode),
-      new SSEMoveDecoder("movupd", ADDR_W, pd_mode, ADDR_V, pd_mode),
-      new SSEMoveDecoder("movlpd", ADDR_V, q_mode, ADDR_W, s_mode),
-      new SSEMoveDecoder("movlpd", ADDR_V, q_mode, ADDR_W, q_mode),
-      new SSEInstructionDecoder("unpcklpd", ADDR_V, pd_mode, ADDR_W, q_mode),
-      new SSEInstructionDecoder("unpckhpd", ADDR_V, pd_mode, ADDR_W, q_mode),
-      new SSEMoveDecoder("movhpd", ADDR_V, q_mode, ADDR_W, q_mode),
-      new SSEMoveDecoder("movhpd", ADDR_W, q_mode, ADDR_V, q_mode),
-      /* 18 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 20 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 28 */
-      new SSEMoveDecoder("movapd", ADDR_V, pd_mode, ADDR_W, pd_mode),
-      new SSEMoveDecoder("movapd", ADDR_W, pd_mode, ADDR_V, pd_mode),
-      new SSEInstructionDecoder("cvtpi2pd", ADDR_V, pd_mode, ADDR_Q, dq_mode),
-      new SSEMoveDecoder("movntpd", ADDR_W, pd_mode, ADDR_V, pd_mode),
-      new SSEInstructionDecoder("cvttpd2pi", ADDR_Q, dq_mode, ADDR_W, pd_mode),
-      new SSEInstructionDecoder("cvtpd2pi", ADDR_Q, dq_mode, ADDR_W, pd_mode),
-      new SSEInstructionDecoder("ucomisd", ADDR_V, sd_mode, ADDR_W, sd_mode),
-      new SSEInstructionDecoder("comisd", ADDR_V, sd_mode, ADDR_W, sd_mode),
-      /* 30 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 38 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 40 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 48 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 50 */
-      new SSEMoveDecoder("movmskpd", ADDR_E, d_mode, ADDR_V, pd_mode),
-      new SSEInstructionDecoder("sqrtpd", ADDR_V, pd_mode, ADDR_W, pd_mode),
-      null,
-      null,
-      new SSELogicalDecoder("andpd", ADDR_V, pd_mode, ADDR_W, pd_mode, RTLOP_AND),
-      new SSELogicalDecoder("andnpd", ADDR_V, pd_mode, ADDR_W, pd_mode, RTLOP_AND),
-      new SSELogicalDecoder("orpd", ADDR_V, pd_mode, ADDR_W, pd_mode, RTLOP_OR),
-      new SSELogicalDecoder("xorpd", ADDR_V, pd_mode, ADDR_W, pd_mode, RTLOP_XOR),
-      /* 58 */
-      new SSEArithmeticDecoder("addpd", ADDR_V, pd_mode, ADDR_W, pd_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("mulpd", ADDR_V, pd_mode, ADDR_W, pd_mode, RTLOP_SMUL),
-      new SSEInstructionDecoder("cvtpd2ps", ADDR_V, ps_mode, ADDR_W, pd_mode),
-      new SSEInstructionDecoder("cvtps2dq", ADDR_V, dq_mode, ADDR_W, ps_mode),
-      new SSEArithmeticDecoder("subpd", ADDR_V, pd_mode, ADDR_W, pd_mode, RTLOP_SUB),
-      new SSEInstructionDecoder("minpd", ADDR_V, pd_mode, ADDR_W, pd_mode),
-      new SSEArithmeticDecoder("divpd", ADDR_V, pd_mode, ADDR_W, pd_mode, RTLOP_SDIV),
-      new SSEInstructionDecoder("maxpd", ADDR_V, pd_mode, ADDR_W, pd_mode),
-      /* 60 */
-      new SSEInstructionDecoder("punpcklbw", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEInstructionDecoder("punpcklwd", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEInstructionDecoder("punpckldq", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEInstructionDecoder("packsswb", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEInstructionDecoder("pcmpgtb", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEInstructionDecoder("pcmpgtw", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEInstructionDecoder("pcmpgtd", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEInstructionDecoder("packuswb", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      /* 68 */
-      new SSEInstructionDecoder("punpckhbw", ADDR_P, dq_mode, ADDR_Q, dq_mode),
-      new SSEInstructionDecoder("punpckhwd", ADDR_P, dq_mode, ADDR_Q, dq_mode),
-      new SSEInstructionDecoder("punpckhdq", ADDR_P, dq_mode, ADDR_Q, dq_mode),
-      new SSEInstructionDecoder("packssdw", ADDR_P, dq_mode, ADDR_Q, dq_mode),
-      new SSEInstructionDecoder("punpcklqdq", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEInstructionDecoder("punpckhqdq", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEMoveDecoder("movd", ADDR_V, dq_mode, ADDR_E, d_mode),
-      new SSEMoveDecoder("movdqa", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      /* 70 */
-      new SSEInstructionDecoder("pshufd", ADDR_V, dq_mode, ADDR_W, dq_mode, ADDR_I, b_mode),
-      new GRPDecoder(null, 22),
-      new GRPDecoder(null, 23),
-      new GRPDecoder(null, 24),
-      new SSEInstructionDecoder("pcmpeqb", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEInstructionDecoder("pcmpeqw", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEInstructionDecoder("pcmpeqd", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      null,
-      /* 78 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      new SSEMoveDecoder("movd", ADDR_E, d_mode, ADDR_V, dq_mode),
-      new SSEMoveDecoder("movdqa", ADDR_W, dq_mode, ADDR_V, dq_mode),
-      /* 80 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 88 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 90 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* 98 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* a0 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* a8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* b0 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* b8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* c0 */
-      null,
-      null,
-      new SSEInstructionDecoder("cmppd", ADDR_V, pd_mode, ADDR_W, pd_mode, ADDR_I, b_mode),
-      null,
-      new SSEInstructionDecoder("pinsrw", ADDR_V, dq_mode, ADDR_E, d_mode, ADDR_I, b_mode),
-      new SSEInstructionDecoder("pextrw", ADDR_G, d_mode, ADDR_V, dq_mode, ADDR_I, b_mode),
-      new SSEInstructionDecoder("shufpd", ADDR_V, pd_mode, ADDR_W, pd_mode, ADDR_I, b_mode),
-      null,
-      /* c8 */
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      null,
-      /* d0 */
-      null,
-      new SSEShiftDecoder("psrlw", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SRL),
-      new SSEShiftDecoder("psrld", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SRL),
-      new SSEShiftDecoder("psrlq", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SRL),
-      new SSEArithmeticDecoder("paddq", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("pmullw", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SMUL),
-      new SSEMoveDecoder("movq", ADDR_W, q_mode, ADDR_V, q_mode),
-      new SSEMoveDecoder("pmovmskb", ADDR_G, d_mode, ADDR_V, dq_mode),
-      /* d8 */
-      new SSEArithmeticDecoder("psubusb", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SUB),
-      new SSEArithmeticDecoder("psubusw", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SUB),
-      new SSEInstructionDecoder("pminub", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSELogicalDecoder("pand", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_AND),
-      new SSEArithmeticDecoder("paddusb", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("paddusw", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_ADD),
-      new SSEInstructionDecoder("pmaxub", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSELogicalDecoder("pandn", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_AND),
-      /* e0 */
-      new SSEInstructionDecoder("pavgb", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEInstructionDecoder("psraw", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEInstructionDecoder("psrad", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEInstructionDecoder("pavgw", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSEArithmeticDecoder("pmulhuw", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_UMUL),
-      new SSEArithmeticDecoder("pmulhw", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SMUL),
-      new SSEInstructionDecoder("cvttpd2dq", ADDR_V, dq_mode, ADDR_W, pd_mode),
-      new SSEMoveDecoder("movntdq", ADDR_W, dq_mode, ADDR_V, dq_mode),
-      /* e8 */
-      new SSEArithmeticDecoder("psubusb", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SUB),
-      new SSEArithmeticDecoder("psubusw", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SUB),
-      new SSEInstructionDecoder("pminsw", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSELogicalDecoder("por", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_OR),
-      new SSEArithmeticDecoder("paddsb", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("paddsw", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_ADD),
-      new SSEInstructionDecoder("pmaxsw", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      new SSELogicalDecoder("pxor", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_XOR),
-      /* f0 */
-      null,
-      new SSEShiftDecoder("psllw", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SLL),
-      new SSEShiftDecoder("pslld", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SLL),
-      new SSEShiftDecoder("psllq", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SLL),
-      new SSEArithmeticDecoder("pmuludq", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_UMUL),
-      new SSEArithmeticDecoder("pmaddwd", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("psadbw", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_ADD),
-      new SSEMoveDecoder("maskmovdqu", ADDR_V, dq_mode, ADDR_W, dq_mode),
-      /* f8 */
-      new SSEArithmeticDecoder("psubb", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SUB),
-      new SSEArithmeticDecoder("psubw", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SUB),
-      new SSEArithmeticDecoder("psubd", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SUB),
-      new SSEArithmeticDecoder("psubq", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_SUB),
-      new SSEArithmeticDecoder("paddb", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("paddw", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_ADD),
-      new SSEArithmeticDecoder("paddd", ADDR_V, dq_mode, ADDR_W, dq_mode, RTLOP_ADD),
-      null
-   };
-
-   public void decode(InstructionVisitor visitor) {
-      int enter_instruction = 0;
-      Instruction instr = null;
-      visitor.prologue();
-      InstructionDecoder instrDecoder = null;
-      try {
-         byteIndex = 0;
-         int len = 0;
-         int instrStartIndex = 0;
-
-         while(len < code.length) {
-            int prefixes = 0;
-            instrStartIndex = byteIndex;
-
-            //check if there is any prefix
-            prefixes = getPrefixes();
-            int segmentOverride = 1;  //get segment override prefix
-
-            if (code[byteIndex] == 0xc8)
-               enter_instruction = 1;
-            else
-               enter_instruction = 0;
-
-            //Read opcode
-            int opcode = InstructionDecoder.readByte(code, byteIndex);
-            byteIndex++;
-
-            if (opcode == 0x0f) {
-               opcode = InstructionDecoder.readByte(code, byteIndex);
-               byteIndex++;
-
-               //SSE: SSE instructions have reserved use of 0xF2, 0xF3, 0x66 prefixes
-               if ((prefixes & PREFIX_REPNZ) != 0) {
-                  instrDecoder = twoBytePrefixF2Table[opcode];
-               } else if ((prefixes & PREFIX_REPZ) != 0) {
-                  instrDecoder = twoBytePrefixF3Table[opcode];
-               } else if ((prefixes & PREFIX_DATA) != 0) {
-                  instrDecoder = twoBytePrefix66Table[opcode];
-               } else {
-                  instrDecoder = twoByteTable[opcode];
-               }
-
-            } else {
-               instrDecoder = oneByteTable[opcode];
-            }
-            if (instrDecoder != null) {
-               instr = instrDecoder.decode(code, byteIndex, instrStartIndex, segmentOverride, prefixes, factory);
-               visitor.visit(startPc + len, instr);
-               len = instrDecoder.getCurrentIndex();
-            }
-            else {
-               len += 1;
-            }
-            byteIndex = len;
-         }
-      } catch (Exception exp) {
-            visitor.epilogue();
-      }
-   }
-
-   private int getPrefixes() {
-      int prefixByte = 0;
-      int prefixes = 0;
-      boolean isPrefix = true;
-      while (isPrefix) {
-         prefixByte = InstructionDecoder.readByte(code, byteIndex);
-
-         switch (prefixByte) {
-            case 0xf3:
-               prefixes |= PREFIX_REPZ;
-               break;
-            case 0xf2:
-               prefixes |= PREFIX_REPNZ;
-               break;
-            case 0xf0:
-               prefixes |= PREFIX_LOCK;
-               break;
-            case 0x2e:
-               prefixes |= PREFIX_CS;
-               break;
-            case 0x36:
-               prefixes |= PREFIX_SS;
-               break;
-            case 0x3e:
-               prefixes |= PREFIX_DS;
-               break;
-            case 0x26:
-               prefixes |= PREFIX_ES;
-               break;
-            case 0x64:
-               prefixes |= PREFIX_FS;
-               break;
-            case 0x65:
-               prefixes |= PREFIX_GS;
-               break;
-            case 0x66:
-               prefixes |= PREFIX_DATA;
-               break;
-            case 0x67:
-               prefixes |= PREFIX_ADR;
-               break;
-            case 0x9b:
-               prefixes |= PREFIX_FWAIT;
-               break;
-            default:
-               isPrefix = false;
-               break;
-         }
-         if(isPrefix)
-             byteIndex++;
-      }
-      return prefixes;
-   }
-
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FPArithmeticInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FPArithmeticInstruction.java
deleted file mode 100644
index 0764ab862cb..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FPArithmeticInstruction.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86FPArithmeticInstruction extends X86FPInstruction
-                                        implements ArithmeticInstruction {
-   final private int operation; //RTL operation
-   final private Operand operand1;
-   final private Operand operand2;
-   final private String description;
-
-   public X86FPArithmeticInstruction(String name, int operation, Operand op1, Operand op2, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.operation = operation;
-      this.operand1 = op1;
-      this.operand2 = op2;
-      description = initDescription();
-   }
-
-   protected String initDescription() {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      if (operand1 != null) {
-         buf.append(getOperandAsString(operand1));
-      }
-      if (operand2 != null) {
-         buf.append(comma);
-         buf.append(getOperandAsString(operand2));
-      }
-      return buf.toString();
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      return description;
-   }
-
-   public Operand getArithmeticDestination() {
-      return operand1;
-   }
-   public Operand getOperand1() {
-      return operand1;
-   }
-
-   public Operand getOperand2() {
-      return operand2;
-   }
-
-   public Operand[] getArithmeticSources() {
-      return (new Operand[] { operand1, operand2});
-   }
-
-   public int getOperation() {
-      return operation;
-   }
-
-   public boolean isArithmetic() {
-      return true;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FPInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FPInstruction.java
deleted file mode 100644
index 1b9617c05c4..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FPInstruction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86FPInstruction extends X86Instruction {
-
-   final private Operand operand1;
-   final private String description;
-
-   public X86FPInstruction(String name, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.operand1 = null;
-      description = initDescription();
-   }
-
-   public X86FPInstruction(String name, Operand op1, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.operand1 = op1;
-      description = initDescription();
-   }
-
-   protected String initDescription() {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      if (operand1 != null) {
-         buf.append(getOperandAsString(operand1));
-      }
-      return buf.toString();
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      return description;
-   }
-
-   public Operand getOperand1() {
-      return operand1;
-   }
-
-   public boolean isFloat() {
-      return true;
-   }
-
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FPLoadInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FPLoadInstruction.java
deleted file mode 100644
index 6c2eca037b4..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FPLoadInstruction.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86FPLoadInstruction extends X86FPInstruction {
-
-   final private Operand source;
-
-   public X86FPLoadInstruction(String name, Operand operand, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.source = operand;
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      buf.append(source.toString());
-      return buf.toString();
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FPStoreInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FPStoreInstruction.java
deleted file mode 100644
index b608b4e8bd6..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FPStoreInstruction.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86FPStoreInstruction extends X86FPInstruction {
-
-   final private Operand dest;
-
-   public X86FPStoreInstruction(String name, Operand op, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.dest = op;
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      buf.append(dest.toString());
-      return buf.toString();
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FloatRegister.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FloatRegister.java
deleted file mode 100644
index e4bb5093844..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FloatRegister.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.Register;
-import sun.jvm.hotspot.utilities.Assert;
-
-public class X86FloatRegister extends Register {
-
-   public X86FloatRegister(int number) {
-      super(number);
-   }
-
-   public int getNumber() {
-      return number;
-   }
-
-   public int getNumberOfRegisters() {
-      return X86FloatRegisters.getNumRegisters();
-   }
-
-   public boolean isFloat() {
-      return true;
-   }
-
-   public boolean isFramePointer() {
-      return false;
-   }
-
-   public boolean isStackPointer() {
-      return false;
-   }
-
-   public boolean isValid() {
-      return number >= 0 && number < X86FloatRegisters.getNumRegisters();
-   }
-
-   public String toString() {
-      return X86FloatRegisters.getRegisterName(number);
-   }
-
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FloatRegisters.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FloatRegisters.java
deleted file mode 100644
index 010b97bad97..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86FloatRegisters.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.utilities.Assert;
-
-public class X86FloatRegisters {
-
-   public static int getNumRegisters() {
-      return NUM_REGISTERS;
-   }
-
-   public static X86FloatRegister getRegister(int regNum) {
-      if (Assert.ASSERTS_ENABLED) {
-         Assert.that(regNum > -1 && regNum < NUM_REGISTERS, "invalid float register number!");
-      }
-      return registers[regNum];
-   }
-
-   public static String getRegisterName(int i) {
-      return "ST(" + i + ")";
-   }
-
-   public static final X86FloatRegister ST0;
-   public static final X86FloatRegister ST1;
-   public static final X86FloatRegister ST2;
-   public static final X86FloatRegister ST3;
-   public static final X86FloatRegister ST4;
-   public static final X86FloatRegister ST5;
-   public static final X86FloatRegister ST6;
-   public static final X86FloatRegister ST7;
-
-   public static final int NUM_REGISTERS = 8;
-
-   private static final X86FloatRegister registers[];
-
-   static {
-      ST0 = new X86FloatRegister(0);
-      ST1 = new X86FloatRegister(1);
-      ST2 = new X86FloatRegister(2);
-      ST3 = new X86FloatRegister(3);
-      ST4 = new X86FloatRegister(4);
-      ST5 = new X86FloatRegister(5);
-      ST6 = new X86FloatRegister(6);
-      ST7 = new X86FloatRegister(7);
-      registers = (new X86FloatRegister[] {
-         ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7
-      });
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86GeneralInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86GeneralInstruction.java
deleted file mode 100644
index 8226f19004f..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86GeneralInstruction.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86GeneralInstruction extends X86Instruction {
-   final private Operand operand1;
-   final private Operand operand2;
-   final private Operand operand3;
-   final private String description;
-
-   public X86GeneralInstruction(String name, Operand op1, Operand op2, Operand op3, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.operand1 = op1;
-      this.operand2 = op2;
-      this.operand3 = op3;
-      description = initDescription();
-   }
-   public X86GeneralInstruction(String name, Operand op1, Operand op2, int size, int prefixes) {
-      this(name, op1, op2, null, size, prefixes);
-   }
-
-   public X86GeneralInstruction(String name, Operand op1, int size, int prefixes) {
-      this(name, op1, null, null, size, prefixes);
-   }
-
-   protected String initDescription() {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      if (operand1 != null) {
-         buf.append(getOperandAsString(operand1));
-      }
-      if (operand2 != null) {
-         buf.append(comma);
-         buf.append(getOperandAsString(operand2));
-      }
-      if(operand3 != null) {
-          buf.append(comma);
-          buf.append(getOperandAsString(operand3));
-      }
-      return buf.toString();
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      return description;
-   }
-
-   public Operand getOperand1() {
-      return operand1;
-   }
-
-   public Operand getOperand2() {
-      return operand2;
-   }
-
-   public Operand getOperand3() {
-      return operand3;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Helper.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Helper.java
deleted file mode 100644
index d5590f329aa..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Helper.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-
-public class X86Helper implements CPUHelper {
-   public Disassembler createDisassembler(long startPc, byte[] code) {
-       return new X86Disassembler(startPc, code);
-   }
-
-   public Register getIntegerRegister(int num) {
-      return X86Registers.getRegister32(num);
-   }
-
-   public Register getFloatRegister(int num) {
-      return X86FloatRegisters.getRegister(num);
-   }
-
-   public Register getStackPointer() {
-      return X86Registers.ESP;
-   }
-
-   public Register getFramePointer() {
-      return X86Registers.EBP;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86IllegalInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86IllegalInstruction.java
deleted file mode 100644
index 0a2032e946a..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86IllegalInstruction.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.SymbolFinder;
-
-public final class X86IllegalInstruction extends X86Instruction {
-   final private String description;
-
-   public X86IllegalInstruction() {
-      super("illegal", 1, 0);
-      description = "bad opcode";
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      return description;
-   }
-
-   public boolean isIllegal() {
-      return true;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Instruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Instruction.java
deleted file mode 100644
index d0ec9bbc876..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Instruction.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public abstract class X86Instruction implements Instruction, X86Opcodes {
-   final private String name;
-   final private int size;
-   final private int prefixes;
-
-   public X86Instruction(String name, int size, int prefixes) {
-      this.name = name;
-      this.size = size;
-      this.prefixes = prefixes;
-   }
-
-   public abstract String asString(long currentPc, SymbolFinder symFinder);
-
-   public String getName() {
-      return name;
-   }
-
-   public String getPrefixString() {
-      StringBuffer buf = new StringBuffer();
-      if ((prefixes & PREFIX_REPZ) != 0)
-         buf.append("repz ");
-      if ((prefixes & PREFIX_REPNZ) != 0)
-         buf.append("repnz ");
-      if ((prefixes & PREFIX_LOCK) != 0)
-         buf.append("lock ");
-
-      return buf.toString();
-   }
-
-   protected String getOperandAsString(Operand op) {
-      StringBuffer buf = new StringBuffer();
-      if ((op instanceof Register) || (op instanceof Address)) {
-         buf.append(op.toString());
-      } else {
-         Number number = ((Immediate)op).getNumber();
-         buf.append("0x");
-         buf.append(Integer.toHexString(number.intValue()));
-      }
-      return buf.toString();
-   }
-
-   public int getSize() {
-      return size;
-   }
-
-   public boolean isArithmetic() {
-      return false;
-   }
-
-   public boolean isBranch() {
-      return false;
-   }
-
-   public boolean isCall() {
-      return false;
-   }
-
-   public boolean isFloat() {
-      return false;
-   }
-
-   public boolean isIllegal() {
-      return false;
-   }
-
-   public boolean isLoad() {
-      return false;
-   }
-
-   public boolean isLogical() {
-      return false;
-   }
-
-   public boolean isMove() {
-      return false;
-   }
-
-   public boolean isReturn() {
-      return false;
-   }
-
-   public boolean isShift() {
-      return false;
-   }
-
-   public boolean isStore() {
-      return false;
-   }
-
-   public boolean isTrap() {
-      return false;
-   }
-
-   public boolean isNoop() {
-      return false;
-   }
-
-   protected static String comma = ", ";
-   protected static String spaces = "\t";
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86InstructionFactory.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86InstructionFactory.java
deleted file mode 100644
index ff4bc8586b3..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86InstructionFactory.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public interface X86InstructionFactory {
-   public X86Instruction newCallInstruction(String name, Address addr, int size, int prefixes);
-
-   public X86Instruction newJmpInstruction(String name, Address addr, int size, int prefixes);
-
-   public X86Instruction newCondJmpInstruction(String name, X86PCRelativeAddress addr, int size, int prefixes);
-
-   public X86Instruction newMoveInstruction(String name, X86Register rd, ImmediateOrRegister oSrc, int size, int prefixes);
-
-   public X86Instruction newMoveLoadInstruction(String name, X86Register op1, Address op2, int dataType, int size, int prefixes);
-
-   public X86Instruction newMoveStoreInstruction(String name, Address op1, X86Register op2, int dataType, int size, int prefixes);
-
-   public X86Instruction newArithmeticInstruction(String name, int rtlOperation, Operand op1, Operand op2, Operand op3, int size, int prefixes);
-
-   public X86Instruction newArithmeticInstruction(String name, int rtlOperation, Operand op1, Operand op2, int size, int prefixes);
-
-   public X86Instruction newLogicInstruction(String name, int rtlOperation, Operand op1, Operand op2, int size, int prefixes);
-
-   public X86Instruction newBranchInstruction(String name, X86PCRelativeAddress addr, int size, int prefixes);
-
-   public X86Instruction newShiftInstruction(String name, int rtlOperation, Operand op1, ImmediateOrRegister op2, int size, int prefixes);
-
-   public X86Instruction newRotateInstruction(String name, Operand op1, ImmediateOrRegister op2, int size, int prefixes);
-
-   public X86Instruction newFPLoadInstruction(String name, Operand op, int size, int prefixes);
-
-   public X86Instruction newFPStoreInstruction(String name, Operand op, int size, int prefixes);
-
-   public X86Instruction newFPArithmeticInstruction(String name, int rtlOperation, Operand op1, Operand op2, int size, int prefixes);
-
-   public X86Instruction newGeneralInstruction(String name, Operand op1, Operand op2, Operand op3, int size, int prefixes);
-
-   public X86Instruction newGeneralInstruction(String name, Operand op1, Operand op2, int size, int prefixes);
-
-   public X86Instruction newGeneralInstruction(String name, Operand op1, int size, int prefixes);
-
-   public X86Instruction newIllegalInstruction();
-
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86InstructionFactoryImpl.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86InstructionFactoryImpl.java
deleted file mode 100644
index d5a371a4602..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86InstructionFactoryImpl.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86InstructionFactoryImpl implements X86InstructionFactory {
-
-   public X86Instruction newCallInstruction(String name, Address addr, int size, int prefixes) {
-      return new X86CallInstruction(name, addr, size, prefixes);
-   }
-
-   public X86Instruction newJmpInstruction(String name, Address addr, int size, int prefixes) {
-      return new X86JmpInstruction(name, addr, size, prefixes);
-   }
-
-   public X86Instruction newCondJmpInstruction(String name, X86PCRelativeAddress addr, int size, int prefixes) {
-      return new X86CondJmpInstruction(name, addr, size, prefixes);
-   }
-
-   public X86Instruction newMoveInstruction(String name, X86Register rd, ImmediateOrRegister oSrc, int size, int prefixes) {
-      return new X86MoveInstruction(name, rd, oSrc, size, prefixes);
-   }
-
-   public X86Instruction newMoveLoadInstruction(String name, X86Register op1, Address op2, int dataType, int size, int prefixes) {
-      return new X86MoveLoadInstruction(name, op1, op2, dataType, size, prefixes);
-   }
-
-   public X86Instruction newMoveStoreInstruction(String name, Address op1, X86Register op2, int dataType, int size, int prefixes) {
-      return new X86MoveStoreInstruction(name, op1, op2, dataType, size, prefixes);
-   }
-
-   public X86Instruction newArithmeticInstruction(String name, int rtlOperation, Operand op1, Operand op2,  Operand op3, int size, int prefixes) {
-      return new X86ArithmeticInstruction(name, rtlOperation, op1, op2, op3, size, prefixes);
-   }
-
-   public X86Instruction newArithmeticInstruction(String name, int rtlOperation, Operand op1, Operand op2, int size, int prefixes) {
-      return new X86ArithmeticInstruction(name, rtlOperation, op1, op2, size, prefixes);
-   }
-
-
-   public X86Instruction newLogicInstruction(String name, int rtlOperation, Operand op1, Operand op2, int size, int prefixes) {
-      return new X86LogicInstruction(name, rtlOperation, op1, op2, size, prefixes);
-   }
-
-   public X86Instruction newBranchInstruction(String name, X86PCRelativeAddress addr, int size, int prefixes) {
-      return new X86BranchInstruction(name, addr, size, prefixes);
-   }
-
-   public X86Instruction newShiftInstruction(String name, int rtlOperation, Operand op1, ImmediateOrRegister op2, int size, int prefixes) {
-      return new X86ShiftInstruction(name, rtlOperation, op1, op2, size, prefixes);
-   }
-
-   public X86Instruction newRotateInstruction(String name, Operand op1, ImmediateOrRegister op2, int size, int prefixes) {
-      return new X86RotateInstruction(name, op1, op2, size, prefixes);
-   }
-
-   public X86Instruction newFPLoadInstruction(String name, Operand op, int size, int prefixes) {
-      return new X86FPLoadInstruction(name, op, size, prefixes);
-   }
-
-   public X86Instruction newFPStoreInstruction(String name, Operand op, int size, int prefixes) {
-      return new X86FPStoreInstruction(name, op, size, prefixes);
-   }
-
-   public X86Instruction newFPArithmeticInstruction(String name, int rtlOperation, Operand op1, Operand op2, int size, int prefixes) {
-      return new X86FPArithmeticInstruction(name, rtlOperation, op1, op2, size, prefixes);
-   }
-
-   public X86Instruction newGeneralInstruction(String name, Operand op1, Operand op2, Operand op3, int size, int prefixes) {
-      return new X86GeneralInstruction(name, op1, op2, op3, size, prefixes);
-   }
-
-   public X86Instruction newGeneralInstruction(String name, Operand op1, Operand op2, int size, int prefixes) {
-      return new X86GeneralInstruction(name, op1, op2, size, prefixes);
-   }
-
-   public X86Instruction newGeneralInstruction(String name, Operand op1, int size, int prefixes) {
-      return new X86GeneralInstruction(name, op1, size, prefixes);
-   }
-
-   public X86Instruction newIllegalInstruction() {
-      return new X86IllegalInstruction();
-   }
-
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86JmpInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86JmpInstruction.java
deleted file mode 100644
index baeae4f0d07..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86JmpInstruction.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86JmpInstruction extends X86Instruction
-                         implements BranchInstruction {
-   final private Address addr;
-
-   public X86JmpInstruction(String name, Address addr, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.addr = addr;
-      if(addr instanceof X86PCRelativeAddress) {
-         ((X86PCRelativeAddress)addr).setInstructionSize(getSize());
-      }
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      long address;
-      if(addr instanceof X86PCRelativeAddress) {
-         long disp = ((X86PCRelativeAddress)addr).getDisplacement();
-         address = disp + currentPc;
-         buf.append(symFinder.getSymbolFor(address));
-      }
-      else {
-         buf.append(addr.toString());
-      }
-      return buf.toString();
-   }
-
-   public Address getBranchDestination() {
-      return addr;
-   }
-
-   public boolean isBranch() {
-      return true;
-   }
-
-   public boolean isConditional() {
-      return false;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86LogicInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86LogicInstruction.java
deleted file mode 100644
index 63de7fd76e3..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86LogicInstruction.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86LogicInstruction extends X86Instruction
-                                      implements LogicInstruction {
-   final private Operand operand1;
-   final private Operand operand2;
-   final private int operation;
-
-   public X86LogicInstruction(String name, int operation, Operand op1, Operand op2, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.operation = operation;
-      this.operand1 = op1;
-      this.operand2 = op2;
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      buf.append(getOperandAsString(operand1));
-      if(operand2 != null) {
-         buf.append(comma);
-         buf.append(getOperandAsString(operand2));
-      }
-      return buf.toString();
-   }
-
-   public Operand getLogicDestination() {
-      return operand1;
-   }
-
-   public Operand[] getLogicSources() {
-      return (new Operand[] { operand2 });
-   }
-
-   public int getOperation() {
-      return operation;
-   }
-
-   public boolean isLogic() {
-      return true;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MMXRegister.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MMXRegister.java
deleted file mode 100644
index 501792f63e5..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MMXRegister.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86MMXRegister extends X86Register {
-
-   public X86MMXRegister(int num, String name) {
-     super(num, name);
-   }
-   public int getNumberOfRegisters() {
-     return X86MMXRegisters.getNumberOfRegisters();
-   }
-   public String toString() {
-     return name;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MMXRegisters.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MMXRegisters.java
deleted file mode 100644
index d6784511fea..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MMXRegisters.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.utilities.*;
-
-/* 8 64-bit registers called MMX registers*/
-
-public class X86MMXRegisters {
-
-   public static final int NUM_MMX_REGISTERS = 8;
-
-   public static final X86MMXRegister MM0;
-   public static final X86MMXRegister MM1;
-   public static final X86MMXRegister MM2;
-   public static final X86MMXRegister MM3;
-   public static final X86MMXRegister MM4;
-   public static final X86MMXRegister MM5;
-   public static final X86MMXRegister MM6;
-   public static final X86MMXRegister MM7;
-
-   private static X86MMXRegister mmxRegisters[];
-
-   static {
-      //MMX registers
-      MM0 = new X86MMXRegister(0, "%mm0");
-      MM1 = new X86MMXRegister(1, "%mm1");
-      MM2 = new X86MMXRegister(2, "%mm2");
-      MM3 = new X86MMXRegister(3, "%mm3");
-      MM4 = new X86MMXRegister(4, "%mm4");
-      MM5 = new X86MMXRegister(5, "%mm5");
-      MM6 = new X86MMXRegister(6, "%mm6");
-      MM7 = new X86MMXRegister(7, "%mm7");
-
-      mmxRegisters = (new X86MMXRegister[] {
-            MM0, MM1, MM2, MM3, MM4, MM5, MM6, MM7
-      });
-   }
-
-   public static int getNumberOfRegisters() {
-      return NUM_MMX_REGISTERS;
-   }
-
-   //Return the register name
-   public static String getRegisterName(int regNum) {
-      if (Assert.ASSERTS_ENABLED) {
-         Assert.that(regNum > -1 && regNum < NUM_MMX_REGISTERS, "invalid MMX register number!");
-      }
-      return mmxRegisters[regNum].toString();
-   }
-
-   public static X86MMXRegister getRegister(int regNum) {
-      if (Assert.ASSERTS_ENABLED) {
-         Assert.that(regNum > -1 && regNum < NUM_MMX_REGISTERS, "invalid MMX register number!");
-      }
-     return mmxRegisters[regNum];
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MemoryIndirectAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MemoryIndirectAddress.java
deleted file mode 100644
index 856f7d6697e..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MemoryIndirectAddress.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-import sun.jvm.hotspot.asm.x86.*;
-
-public class X86MemoryIndirectAddress extends IndirectAddress {
-
-   private long value;
-
-   public X86MemoryIndirectAddress(long value) {
-      this.value = value;
-   }
-
-   public String toString() {
-      StringBuffer buf = new StringBuffer();
-      buf.append("*");
-      buf.append("[");
-      buf.append(Long.toHexString(value));
-      buf.append(']');
-      return buf.toString();
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MemoryInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MemoryInstruction.java
deleted file mode 100644
index 639483f7634..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MemoryInstruction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public abstract class X86MemoryInstruction extends X86Instruction
-             implements MemoryInstruction {
-   final protected Address address;
-   final protected X86Register register;
-   final protected int dataType;
-   final protected String description;
-
-   public X86MemoryInstruction(String name, Address address, X86Register register, int dataType, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.address = address;
-      this.register = register;
-      this.dataType = dataType;
-      description = initDescription();
-   }
-
-   protected String initDescription() {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      buf.append(register.toString());
-      buf.append(comma);
-      buf.append(address.toString());
-      return buf.toString();
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      return description;
-   }
-
-   public int getDataType() {
-      return dataType;
-   }
-
-   public boolean isConditional() {
-      return false;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MoveInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MoveInstruction.java
deleted file mode 100644
index d1419708c2f..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MoveInstruction.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86MoveInstruction extends X86Instruction
-                          implements MoveInstruction, RTLOperations {
-   private ImmediateOrRegister source;
-   private X86Register destination;
-
-   public X86MoveInstruction(String name, X86Register rd, ImmediateOrRegister oSrc, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.source = oSrc;
-      this.destination = rd;
-   }
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      buf.append(destination.toString());
-      buf.append(comma);
-      buf.append(getSourceString());
-      return buf.toString();
-   }
-
-   protected String getSourceString() {
-      StringBuffer buf = new StringBuffer();
-      if ((source instanceof Register)) {
-         buf.append(source.toString());
-      } else {
-         Number number = ((Immediate)source).getNumber();
-         buf.append("0x");
-         buf.append(Integer.toHexString(number.intValue()));
-      }
-      return buf.toString();
-   }
-
-   public ImmediateOrRegister getMoveSource() {
-      return source;
-   }
-
-   public Register getMoveDestination() {
-     return destination;
-   }
-
-   // for condition moves
-   public boolean  isConditional() {
-      return false;
-   }
-
-   public boolean isMove() {
-      return true;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MoveLoadInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MoveLoadInstruction.java
deleted file mode 100644
index 1b94a1851ec..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MoveLoadInstruction.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86MoveLoadInstruction extends X86MemoryInstruction
-                                          implements LoadInstruction {
-   public X86MoveLoadInstruction(String name, X86Register register, Address address, int dataType, int size, int prefixes) {
-      super(name, address, register, dataType, size, prefixes);
-   }
-
-   public boolean isLoad() {
-      return true;
-   }
-
-   public Register[] getLoadDestinations() {
-      Register[] destinations = new Register[1];
-      destinations[0] = register;
-      return destinations;
-   }
-
-   protected String initDescription() {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      buf.append(register.toString());
-      buf.append(comma);
-      buf.append(address.toString());
-      return buf.toString();
-   }
-
-   public Address getLoadSource() {
-      return address;
-   }
-
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MoveStoreInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MoveStoreInstruction.java
deleted file mode 100644
index 64c492cfacc..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86MoveStoreInstruction.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86MoveStoreInstruction extends X86MemoryInstruction
-                                          implements StoreInstruction {
-   final protected Register[] storeSources;
-
-   public X86MoveStoreInstruction(String name, Address address, X86Register register, int dataType, int size, int prefixes) {
-      super(name, address, register, dataType, size, prefixes);
-      storeSources = new Register[1];
-      storeSources[0] = register;
-   }
-
-   protected String initDescription() {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      buf.append(address.toString());
-      buf.append(comma);
-      buf.append(register.toString());
-      return buf.toString();
-   }
-
-   public int getDataType() {
-      return dataType;
-   }
-
-   public Address getStoreDestination() {
-      return address;
-   }
-
-   public Register[] getStoreSources() {
-      return storeSources;
-   }
-
-   public boolean isStore() {
-      return true;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Opcodes.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Opcodes.java
deleted file mode 100644
index 171cad307ca..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Opcodes.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-//Please refer to IA-32 Intel Architecture Software Developer's Manual Volume 2
-//APPENDIX A - A.1.
-
-public interface X86Opcodes
-                  extends RTLDataTypes, RTLOperations {
-   public static final int b_mode = 1;
-   public static final int v_mode = 2;
-   public static final int w_mode = 3;
-   public static final int d_mode = 4;
-   public static final int p_mode = 5;
-
-   public static final int dq_mode = 6;     //SSE: double-quadword
-   public static final int pi_mode = 7;     //SSE: quadword MMX register
-   public static final int ps_mode = 8;     //SSE: 128bit single precision floating point data
-   public static final int pd_mode = 9;     //SSE: 128bit double precision floating point data
-   public static final int sd_mode = 10;    //SSE: 128bit scalar double precision floating point data
-   public static final int  q_mode = 11;    //SSE: quadword
-   public static final int ss_mode = 12;    //SSE: scalar element of 128bit floating data
-   public static final int si_mode = 13;    //SSE: doubleword integer register (e.g. eax)
-   public static final int  s_mode = 14;    //SSE: 6 byte pseudo descriptor
-
-   public static final int INVALID_OPERANDTYPE = -1;
-
-   public static final int EAX = 0;
-   public static final int ECX = 1;
-   public static final int EDX = 2;
-   public static final int EBX = 3;
-   public static final int ESP = 4;
-   public static final int EBP = 5;
-   public static final int ESI = 6;
-   public static final int EDI = 7;
-
-   public static final int AX = 8;
-   public static final int CX = 9;
-   public static final int DX = 10;
-   public static final int BX = 11;
-   public static final int SP = 12;
-   public static final int BP = 13;
-   public static final int SI = 14;
-   public static final int DI = 15;
-
-   public static final int AL = 16;
-   public static final int CL = 17;
-   public static final int DL = 18;
-   public static final int BL = 19;
-   public static final int AH = 20;
-   public static final int CH = 21;
-   public static final int DH = 22;
-   public static final int BH = 23;
-
-   public static final int ES = 24;
-   public static final int CS = 25;
-   public static final int SS = 26;
-   public static final int DS = 27;
-   public static final int FS = 28;
-   public static final int GS = 29;
-
-   //Addressing modes
-   public static final int ADDR_E = 1;
-   public static final int ADDR_I = 2;
-   public static final int ADDR_DIR = 3;
-   public static final int ADDR_J = 4;
-   public static final int ADDR_G = 5;
-   public static final int ADDR_REG = 6;
-   public static final int ADDR_ESDI = 7;
-   public static final int ADDR_DSSI = 8;
-   public static final int ADDR_SEG = 9;
-   public static final int ADDR_OFF = 10;
-   public static final int INDIR_REG = 11;
-   public static final int ADDR_INDIR_E = 12;
-   public static final int ADDR_R = 13;  //mod field selects a register
-   public static final int ADDR_C = 14;  //reg field selects a control register
-   public static final int ADDR_D = 15; //reg field selects debug register
-   public static final int ADDR_T = 16; //reg field selects test register
-   public static final int ADDR_M = 17; //modR/M refer only to memory
-   public static final int ADDR_FPREG = 18;
-   //SSE
-   public static final int ADDR_W = 19;  //modR/M: either a 128 bit XMM register or memory
-   public static final int ADDR_Q = 20;  //modR/M: either a 128 bit MMX register or memory
-   public static final int ADDR_V = 21;  //reg field of modR/M selects a 128-bit XMM register
-   public static final int ADDR_P = 22;  //reg field of modR/M selects a 64-bit MMX register
-
-   public static final int INVALID_ADDRMODE = -1;
-
-   //Refer to chapter 2 - Instruction Format
-   //Prefix codes
-   public static final int PREFIX_REPZ = 1;
-   public static final int PREFIX_REPNZ = 2;
-   public static final int PREFIX_LOCK = 4;
-   public static final int PREFIX_CS = 8;
-   public static final int PREFIX_SS = 0x10;
-   public static final int PREFIX_DS = 0x20;
-   public static final int PREFIX_ES = 0x40;
-   public static final int PREFIX_FS = 0x80;
-   public static final int PREFIX_GS = 0x100;
-   public static final int PREFIX_DATA = 0x200;
-   public static final int PREFIX_ADR = 0x400;
-   public static final int PREFIX_FWAIT = 0x800;
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Register.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Register.java
deleted file mode 100644
index 6712a6d3fbf..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Register.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86Register extends Register {
-   protected String name;
-   public X86Register(int num, String name) {
-     super(num);
-     this.name = name;
-   }
-   public int getNumberOfRegisters() {
-     return X86Registers.getNumberOfRegisters();
-   }
-   public String toString() {
-     return name;
-   }
-   public boolean isFramePointer() {
-     return number == 5; //ebp
-   }
-   public boolean isStackPointer() {
-     return number == 4; //esp
-   }
-   public boolean isFloat() {
-     return false;
-   }
-   public boolean isSegmentPointer() {
-     return false;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86RegisterIndirectAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86RegisterIndirectAddress.java
deleted file mode 100644
index 834b5b10811..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86RegisterIndirectAddress.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.Address;
-import sun.jvm.hotspot.asm.BaseIndexScaleDispAddress;
-
-public class X86RegisterIndirectAddress extends BaseIndexScaleDispAddress {
-
-   final private X86SegmentRegister segReg;
-
-   public X86RegisterIndirectAddress(X86SegmentRegister segReg, X86Register base, X86Register index, long disp, int scale) {
-      super(base, index, disp, scale);
-      this.segReg = segReg;
-   }
-
-   public X86RegisterIndirectAddress(X86SegmentRegister segReg, X86Register base, X86Register index, long disp) {
-      super(base, index, disp, -1);
-      this.segReg = segReg;
-   }
-
-   public String toString() {
-      StringBuffer buf = new StringBuffer();
-      if(segReg != null) {
-         buf.append(segReg.toString());
-         buf.append(":");
-      }
-
-      long disp = getDisplacement();
-      if(disp != 0)
-          buf.append(disp);
-
-      sun.jvm.hotspot.asm.Register base = getBase();
-      sun.jvm.hotspot.asm.Register index = getIndex();
-      int scaleVal = getScale();
-      scaleVal = 1 << scaleVal;
-
-      if( (base != null) || (index != null) || (scaleVal > 1) )
-         buf.append('[');
-
-      if(base != null) {
-         buf.append(base.toString());
-         if(index != null) {
-            buf.append("+");
-            buf.append(index.toString());
-         }
-      }
-      else {
-         if(index != null) {
-            buf.append(index.toString());
-         }
-      }
-
-      if (scaleVal > 1) {
-         buf.append(" * ");
-         buf.append(Integer.toString(scaleVal));
-      }
-
-      if( (base != null) || (index != null) || (scaleVal > 1) )
-         buf.append(']');
-
-      return buf.toString();
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86RegisterPart.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86RegisterPart.java
deleted file mode 100644
index fe936d98847..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86RegisterPart.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86RegisterPart extends X86Register {
-   private int startBit;
-   private int length;
-   public X86RegisterPart(int num, String name, int startBit, int length) {
-      super(num, name);
-      this.startBit = startBit;
-      this.length = length;
-   }
-   public boolean is32BitRegister() {
-      return ( length == 32);
-   }
-   public boolean is16BitRegister() {
-      return ( length == 16);
-   }
-   public boolean is8BitRegister() {
-      return ( length == 8);
-   }
-
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Registers.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Registers.java
deleted file mode 100644
index 778118bbb42..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86Registers.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.utilities.*;
-
-public class X86Registers {
-  public static final int NUM_REGISTERS = 8;
-
-   public static final X86Register EAX;
-   public static final X86Register ECX;
-   public static final X86Register EDX;
-   public static final X86Register EBX;
-   public static final X86Register ESP;
-   public static final X86Register EBP;
-   public static final X86Register ESI;
-   public static final X86Register EDI;
-
-   public static final X86Register AX;
-   public static final X86Register CX;
-   public static final X86Register DX;
-   public static final X86Register BX;
-   public static final X86Register SP;
-   public static final X86Register BP;
-   public static final X86Register SI;
-   public static final X86Register DI;
-
-   public static final X86Register AL;
-   public static final X86Register CL;
-   public static final X86Register DL;
-   public static final X86Register BL;
-   public static final X86Register AH;
-   public static final X86Register CH;
-   public static final X86Register DH;
-   public static final X86Register BH;
-
-   private static X86Register registers8[];
-   private static X86Register registers16[];
-   private static X86Register registers32[];
-
-   static {
-      EAX = new X86RegisterPart(0, "%eax", 0, 32);
-      ECX = new X86RegisterPart(1, "%ecx", 0, 32);
-      EDX = new X86RegisterPart(2, "%edx", 0, 32);
-      EBX = new X86RegisterPart(3, "%ebx", 0, 32);
-      ESP = new X86RegisterPart(4, "%esp", 0, 32);
-      EBP = new X86RegisterPart(5, "%ebp", 0, 32);
-      ESI = new X86RegisterPart(6, "%esi", 0, 32);
-      EDI = new X86RegisterPart(7, "%edi", 0, 32);
-
-      AX = new X86RegisterPart(0, "%ax", 0, 16);
-      CX = new X86RegisterPart(1, "%cx", 0, 16);
-      DX = new X86RegisterPart(2, "%dx", 0, 16);
-      BX = new X86RegisterPart(3, "%bx", 0, 16);
-      SP = new X86RegisterPart(4, "%sp", 0, 16);
-      BP = new X86RegisterPart(5, "%bp", 0, 16);
-      SI = new X86RegisterPart(6, "%si", 0, 16);
-      DI = new X86RegisterPart(7, "%di", 0, 16);
-
-      AL = new X86RegisterPart(0, "%al", 0, 8);
-      CL = new X86RegisterPart(1, "%cl", 0, 8);
-      DL = new X86RegisterPart(2, "%dl", 0, 8);
-      BL = new X86RegisterPart(3, "%bl", 0, 8);
-      AH = new X86RegisterPart(0, "%ah", 8, 8);
-      CH = new X86RegisterPart(1, "%ch", 8, 8);
-      DH = new X86RegisterPart(2, "%dh", 8, 8);
-      BH = new X86RegisterPart(3, "%bh", 8, 8);
-
-      registers32 = (new X86Register[] {
-            EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI
-      });
-      registers16 = (new X86Register[] {
-            AX, CX, DX, BX, SP, BP, SI, DI
-      });
-      registers8 = (new X86Register[] {
-            AL, CL, DL, BL, AH, CH, DH, BH
-      });
-   }
-
-   public static int getNumberOfRegisters() {
-      return NUM_REGISTERS;
-   }
-
-   public static X86Register getRegister8(int regNum) {
-      if (Assert.ASSERTS_ENABLED) {
-         Assert.that(regNum > -1 && regNum < NUM_REGISTERS, "invalid integer register number!");
-      }
-      return registers8[regNum];
-   }
-
-   public static X86Register getRegister16(int regNum) {
-      if (Assert.ASSERTS_ENABLED) {
-         Assert.that(regNum > -1 && regNum < NUM_REGISTERS, "invalid integer register number!");
-      }
-      return registers16[regNum];
-   }
-
-   public static X86Register getRegister32(int regNum) {
-      if (Assert.ASSERTS_ENABLED) {
-         Assert.that(regNum > -1 && regNum < NUM_REGISTERS, "invalid integer register number!");
-      }
-      return registers32[regNum];
-   }
-
-   //Return the 32bit register name
-   public static String getRegisterName(int regNum) {
-      if (Assert.ASSERTS_ENABLED) {
-         Assert.that(regNum > -1 && regNum < NUM_REGISTERS, "invalid integer register number!");
-      }
-      return registers32[regNum].toString();
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86RotateInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86RotateInstruction.java
deleted file mode 100644
index d830d1f28ee..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86RotateInstruction.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86RotateInstruction extends X86Instruction {
-   final private Operand operand1;
-   final private ImmediateOrRegister operand2;
-
-   public X86RotateInstruction(String name, Operand operand1, ImmediateOrRegister operand2, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.operand1 = operand1;
-      this.operand2 = operand2;
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      if(operand2 != null) {
-         if ((operand2 instanceof Register)) {
-            buf.append(operand2.toString());
-         }
-         else {
-            Number number = ((Immediate)operand2).getNumber();
-            buf.append("0x");
-            buf.append(Integer.toHexString(number.intValue()));
-         }
-         buf.append(comma);
-      }
-      buf.append(getOperandAsString(operand1));
-      return buf.toString();
-   }
-
-   public Operand getRotateDestination() {
-      return operand1;
-   }
-
-   public Operand getRotateSource() {
-      return operand1;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86SegmentRegister.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86SegmentRegister.java
deleted file mode 100644
index 333eb6ab354..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86SegmentRegister.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86SegmentRegister extends X86Register {
-
-   public X86SegmentRegister(int num, String name) {
-     super(num, name);
-   }
-   public int getNumberOfRegisters() {
-     return X86SegmentRegisters.getNumberOfRegisters();
-   }
-   public String toString() {
-     return name;
-   }
-   public boolean isSegmentPointer() {
-     return true;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86SegmentRegisterAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86SegmentRegisterAddress.java
deleted file mode 100644
index 9626b4d931a..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86SegmentRegisterAddress.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86SegmentRegisterAddress extends IndirectAddress {
-   private final X86SegmentRegister segment;
-   private final X86Register offset;
-
-   public X86SegmentRegisterAddress(X86SegmentRegister segment, X86Register offset) {
-      this.segment = segment;
-      this.offset = offset;
-   }
-
-   public String toString() {
-        StringBuffer buf = new StringBuffer();
-        buf.append(getSegment().toString());
-        buf.append(":");
-        buf.append(getOffset().toString());
-        return buf.toString();
-   }
-
-   public X86SegmentRegister getSegment() {
-      return segment;
-   }
-
-   public X86Register getOffset() {
-      return offset;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86SegmentRegisters.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86SegmentRegisters.java
deleted file mode 100644
index ac26b83f829..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86SegmentRegisters.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.utilities.*;
-
-public class X86SegmentRegisters {
-
-   public static final int NUM_SEGMENT_REGISTERS = 6;
-
-   public static final X86SegmentRegister ES;
-   public static final X86SegmentRegister CS;
-   public static final X86SegmentRegister SS;
-   public static final X86SegmentRegister DS;
-   public static final X86SegmentRegister FS;
-   public static final X86SegmentRegister GS;
-
-   private static X86SegmentRegister segmentRegisters[];
-
-   static {
-      //Segment registers
-      ES = new X86SegmentRegister(0, "%es");
-      CS = new X86SegmentRegister(1, "%cs");
-      SS = new X86SegmentRegister(2, "%ss");
-      DS = new X86SegmentRegister(3, "%ds");
-      FS = new X86SegmentRegister(4, "%fs");
-      GS = new X86SegmentRegister(5, "%gs");
-
-      segmentRegisters = (new X86SegmentRegister[] {
-            ES, CS, SS, DS, FS, GS
-      });
-   }
-
-   public static int getNumberOfRegisters() {
-      return NUM_SEGMENT_REGISTERS;
-   }
-
-   public static X86SegmentRegister getSegmentRegister(int regNum) {
-      if (Assert.ASSERTS_ENABLED) {
-         Assert.that(regNum > -1 && regNum < NUM_SEGMENT_REGISTERS, "invalid segment register number!");
-      }
-     return segmentRegisters[regNum];
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86ShiftInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86ShiftInstruction.java
deleted file mode 100644
index 300eedfb911..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86ShiftInstruction.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86ShiftInstruction extends X86Instruction implements ShiftInstruction {
-   final private int operation;
-   final private Operand operand1;
-   final private ImmediateOrRegister operand2;
-
-   public X86ShiftInstruction(String name, int operation, Operand operand1, ImmediateOrRegister operand2, int size, int prefixes) {
-      super(name, size, prefixes);
-      this.operand1 = operand1;
-      this.operand2 = operand2;
-      this.operation = operation;
-   }
-
-   public String asString(long currentPc, SymbolFinder symFinder) {
-      StringBuffer buf = new StringBuffer();
-      buf.append(getPrefixString());
-      buf.append(getName());
-      buf.append(spaces);
-      buf.append(getOperandAsString(operand1));
-
-      if(operand2 != null) {
-         buf.append(comma);
-
-         if ((operand2 instanceof Register)) {
-            buf.append(operand2.toString());
-         }
-         else {
-            Number number = ((Immediate)operand2).getNumber();
-            buf.append("0x");
-            buf.append(Integer.toHexString(number.intValue()));
-         }
-      }
-      return buf.toString();
-   }
-
-   public int getOperation() {
-      return operation;
-   }
-
-   public Operand getShiftDestination() {
-      return operand1;
-   }
-
-   public Operand getShiftLength() {
-      return operand2;
-   }
-
-   public Operand getShiftSource() {
-      return operand1;
-   }
-
-   public boolean isShift() {
-      return true;
-   }
-
-   protected String getOperand2String() {
-      return operand2.toString();
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86XMMRegister.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86XMMRegister.java
deleted file mode 100644
index 81e34c91401..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86XMMRegister.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.asm.*;
-
-public class X86XMMRegister extends X86Register {
-
-   public X86XMMRegister(int num, String name) {
-     super(num, name);
-   }
-   public int getNumberOfRegisters() {
-     return X86XMMRegisters.getNumberOfRegisters();
-   }
-   public String toString() {
-     return name;
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86XMMRegisters.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86XMMRegisters.java
deleted file mode 100644
index 6de96ff88f3..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86XMMRegisters.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.asm.x86;
-
-import sun.jvm.hotspot.utilities.*;
-
-/* There are 8 128-bit XMM registers*/
-
-public class X86XMMRegisters {
-
-   public static final int NUM_XMM_REGISTERS = 8;
-
-   public static final X86XMMRegister XMM0;
-   public static final X86XMMRegister XMM1;
-   public static final X86XMMRegister XMM2;
-   public static final X86XMMRegister XMM3;
-   public static final X86XMMRegister XMM4;
-   public static final X86XMMRegister XMM5;
-   public static final X86XMMRegister XMM6;
-   public static final X86XMMRegister XMM7;
-
-   private static X86XMMRegister xmmRegisters[];
-
-   static {
-      //XMM registers
-      XMM0 = new X86XMMRegister(0, "%xmm0");
-      XMM1 = new X86XMMRegister(1, "%xmm1");
-      XMM2 = new X86XMMRegister(2, "%xmm2");
-      XMM3 = new X86XMMRegister(3, "%xmm3");
-      XMM4 = new X86XMMRegister(4, "%xmm4");
-      XMM5 = new X86XMMRegister(5, "%xmm5");
-      XMM6 = new X86XMMRegister(6, "%xmm6");
-      XMM7 = new X86XMMRegister(7, "%xmm7");
-
-      xmmRegisters = (new X86XMMRegister[] {
-            XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7
-      });
-   }
-
-   public static int getNumberOfRegisters() {
-      return NUM_XMM_REGISTERS;
-   }
-
-   //Return the register name
-   public static String getRegisterName(int regNum) {
-      if (Assert.ASSERTS_ENABLED) {
-         Assert.that(regNum > -1 && regNum < NUM_XMM_REGISTERS, "invalid XMM register number!");
-      }
-      return xmmRegisters[regNum].toString();
-   }
-
-   public static X86XMMRegister getRegister(int regNum) {
-      if (Assert.ASSERTS_ENABLED) {
-         Assert.that(regNum > -1 && regNum < NUM_XMM_REGISTERS, "invalid XMM register number!");
-      }
-     return xmmRegisters[regNum];
-   }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java
index 92d71356e65..b2b279524f4 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java
@@ -58,10 +58,6 @@ import sun.jvm.hotspot.utilities.*;
  * <P> The BugSpot debugger requires that the underlying Debugger
  * support C/C++ debugging via the CDebugger interface. </P>
  *
- * <P> FIXME: need to add a way to configure the paths to dbx and the
- * DSO from the outside. However, this should work for now for
- * internal use. </P>
- *
  * <P> FIXME: especially with the addition of remote debugging, this
  * has turned into a mess; needs rethinking. </P> */
 
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java
index 13d19e4fd65..e1be42422be 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/CodeBlob.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,6 @@ package sun.jvm.hotspot.code;
 import java.io.*;
 import java.util.*;
 
-import sun.jvm.hotspot.asm.x86.*;
 import sun.jvm.hotspot.compiler.*;
 import sun.jvm.hotspot.debugger.*;
 import sun.jvm.hotspot.runtime.*;
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/CodeCache.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/CodeCache.java
index 9cb837f9ee3..7b999e052f6 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/CodeCache.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/CodeCache.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java
index 86af73625f7..839ad00aafb 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/code/NMethod.java
@@ -351,6 +351,82 @@ public class NMethod extends CodeBlob {
     return bestGuessPCDesc;
   }
 
+  PCDesc find_pc_desc(long pc, boolean approximate) {
+    return find_pc_desc_internal(pc, approximate);
+  }
+
+  // Finds a PcDesc with real-pc equal to "pc"
+  PCDesc find_pc_desc_internal(long pc, boolean approximate) {
+    long base_address = VM.getAddressValue(codeBegin());
+    int pc_offset = (int) (pc - base_address);
+
+    // Fallback algorithm: quasi-linear search for the PcDesc
+    // Find the last pc_offset less than the given offset.
+    // The successor must be the required match, if there is a match at all.
+    // (Use a fixed radix to avoid expensive affine pointer arithmetic.)
+    Address lower = scopesPCsBegin();
+    Address upper = scopesPCsEnd();
+    upper = upper.addOffsetTo(-pcDescSize); // exclude final sentinel
+    if (lower.greaterThan(upper))  return null;  // native method; no PcDescs at all
+
+    // Take giant steps at first (4096, then 256, then 16, then 1)
+    int LOG2_RADIX = 4;
+    int RADIX = (1 << LOG2_RADIX);
+    Address mid;
+    for (int step = (1 << (LOG2_RADIX*3)); step > 1; step >>= LOG2_RADIX) {
+      while ((mid = lower.addOffsetTo(step * pcDescSize)).lessThan(upper)) {
+        PCDesc m = new PCDesc(mid);
+        if (m.getPCOffset() < pc_offset) {
+          lower = mid;
+        } else {
+          upper = mid;
+          break;
+        }
+      }
+    }
+    // Sneak up on the value with a linear search of length ~16.
+    while (true) {
+      mid = lower.addOffsetTo(pcDescSize);
+      PCDesc m = new PCDesc(mid);
+      if (m.getPCOffset() < pc_offset) {
+        lower = mid;
+      } else {
+        upper = mid;
+        break;
+      }
+    }
+
+    PCDesc u = new PCDesc(upper);
+    if (match_desc(u, pc_offset, approximate)) {
+      return u;
+    } else {
+      return null;
+    }
+  }
+
+  // ScopeDesc retrieval operation
+  PCDesc pc_desc_at(long pc)   { return find_pc_desc(pc, false); }
+  // pc_desc_near returns the first PCDesc at or after the givne pc.
+  PCDesc pc_desc_near(long pc) { return find_pc_desc(pc, true); }
+
+  // Return a the last scope in (begin..end]
+  public ScopeDesc scope_desc_in(long begin, long end) {
+    PCDesc p = pc_desc_near(begin+1);
+    if (p != null && VM.getAddressValue(p.getRealPC(this)) <= end) {
+      return new ScopeDesc(this, p.getScopeDecodeOffset(), p.getObjDecodeOffset(), p.getReexecute());
+    }
+    return null;
+  }
+
+  static boolean match_desc(PCDesc pc, int pc_offset, boolean approximate) {
+    if (!approximate) {
+      return pc.getPCOffset() == pc_offset;
+    } else {
+      PCDesc prev = new PCDesc(pc.getAddress().addOffsetTo(-pcDescSize));
+       return prev.getPCOffset() < pc_offset && pc_offset <= pc.getPCOffset();
+    }
+  }
+
   /** This is only for use by the debugging system, and is only
       intended for use in the topmost frame, where we are not
       guaranteed to be at a PC for which we have a PCDesc. It finds
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Address.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Address.java
index 0579260ecab..21db5d55831 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Address.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Address.java
@@ -89,6 +89,7 @@ public interface Address {
   public Address    getAddressAt       (long offset) throws UnmappedAddressException, UnalignedAddressException;
   /** Returns the decoded address at the given offset */
   public Address    getCompOopAddressAt (long offset) throws UnmappedAddressException, UnalignedAddressException;
+  public Address    getCompKlassAddressAt (long offset) throws UnmappedAddressException, UnalignedAddressException;
 
   //
   // Java-related routines
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java
index 63d7d8da320..405c82cbb02 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/Debugger.java
@@ -121,6 +121,9 @@ public interface Debugger extends SymbolLookup, ThreadAccess {
   public long getHeapOopSize();
   public long getNarrowOopBase();
   public int  getNarrowOopShift();
+  public long getKlassPtrSize();
+  public long getNarrowKlassBase();
+  public int  getNarrowKlassShift();
 
   public ReadResult readBytesFromProcess(long address, long numBytes)
     throws DebuggerException;
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java
index d616da68eb0..815fbf7442d 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/DebuggerBase.java
@@ -58,6 +58,10 @@ public abstract class DebuggerBase implements Debugger {
   protected long heapOopSize;
   protected long narrowOopBase;  // heap base for compressed oops.
   protected int  narrowOopShift; // shift to decode compressed oops.
+  // class metadata space
+  protected long klassPtrSize;
+  protected long narrowKlassBase;  // heap base for compressed klass ptrs.
+  protected int  narrowKlassShift; // shift to decode compressed klass ptrs.
   // Should be initialized if desired by calling initCache()
   private PageCache cache;
 
@@ -159,10 +163,14 @@ public abstract class DebuggerBase implements Debugger {
     javaPrimitiveTypesConfigured = true;
   }
 
-  public void putHeapConst(long heapOopSize, long narrowOopBase, int narrowOopShift) {
+  public void putHeapConst(long heapOopSize, long klassPtrSize, long narrowOopBase, int narrowOopShift,
+                           long narrowKlassBase, int narrowKlassShift) {
     this.heapOopSize = heapOopSize;
+    this.klassPtrSize = klassPtrSize;
     this.narrowOopBase = narrowOopBase;
     this.narrowOopShift = narrowOopShift;
+    this.narrowKlassBase = narrowKlassBase;
+    this.narrowKlassShift = narrowKlassShift;
   }
 
   /** May be called by subclasses if desired to initialize the page
@@ -464,6 +472,15 @@ public abstract class DebuggerBase implements Debugger {
     return value;
   }
 
+  protected long readCompKlassAddressValue(long address)
+    throws UnmappedAddressException, UnalignedAddressException {
+    long value = readCInteger(address, getKlassPtrSize(), true);
+    if (value != 0) {
+      value = (long)(narrowKlassBase + (long)(value << narrowKlassShift));
+    }
+    return value;
+  }
+
   protected void writeAddressValue(long address, long value)
     throws UnmappedAddressException, UnalignedAddressException {
     writeCInteger(address, machDesc.getAddressSize(), value);
@@ -551,4 +568,15 @@ public abstract class DebuggerBase implements Debugger {
   public int getNarrowOopShift() {
     return narrowOopShift;
   }
+
+  public long getKlassPtrSize() {
+    return klassPtrSize;
+  }
+
+  public long getNarrowKlassBase() {
+    return narrowKlassBase;
+  }
+  public int getNarrowKlassShift() {
+    return narrowKlassShift;
+  }
 }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java
index 31ad2ec5882..77b18a158d8 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/JVMDebugger.java
@@ -42,5 +42,7 @@ public interface JVMDebugger extends Debugger {
                                               long jintSize,
                                               long jlongSize,
                                               long jshortSize);
-  public void putHeapConst(long heapOopSize, long narrowOopBase, int narrowOopShift);
+  public void putHeapConst(long heapOopSize, long klassPtrSize,
+                           long narrowKlassBase, int narrowKlassShift,
+                           long narrowOopBase, int narrowOopShift);
 }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/ThreadContext.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/ThreadContext.java
index ec6b7e6de11..eef49b669cb 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/ThreadContext.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/ThreadContext.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/amd64/AMD64ThreadContext.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/amd64/AMD64ThreadContext.java
index 5b2332a0fe6..2798ab17f7a 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/amd64/AMD64ThreadContext.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/amd64/AMD64ThreadContext.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdAddress.java
index de707f0e99c..d1b56881f13 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdAddress.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdAddress.java
@@ -79,6 +79,11 @@ class BsdAddress implements Address {
         return debugger.readCompOopAddress(addr + offset);
     }
 
+    public Address getCompKlassAddressAt(long offset)
+            throws UnalignedAddressException, UnmappedAddressException {
+        return debugger.readCompOopAddress(addr + offset);
+    }
+
     //
     // Java-related routines
     //
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java
index 1818d1d5a96..addcf0569c8 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdCDebugger.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdDebugger.java
index a708a750c0f..3500e38f124 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdDebugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdDebugger.java
@@ -46,6 +46,7 @@ public interface BsdDebugger extends JVMDebugger {
     throws DebuggerException;
   public BsdAddress readAddress(long address) throws DebuggerException;
   public BsdAddress readCompOopAddress(long address) throws DebuggerException;
+  public BsdAddress readCompKlassAddress(long address) throws DebuggerException;
   public BsdOopHandle readOopHandle(long address) throws DebuggerException;
   public BsdOopHandle readCompOopHandle(long address) throws DebuggerException;
   public long[]       getThreadIntegerRegisterSet(int lwp_id) throws DebuggerException;
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdDebuggerLocal.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdDebuggerLocal.java
index 13785ef4ebf..9596d26e22e 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdDebuggerLocal.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdDebuggerLocal.java
@@ -431,6 +431,12 @@ public class BsdDebuggerLocal extends DebuggerBase implements BsdDebugger {
         return (value == 0 ? null : new BsdAddress(this, value));
     }
 
+    public BsdAddress readCompKlassAddress(long address)
+            throws UnmappedAddressException, UnalignedAddressException {
+        long value = readCompKlassAddressValue(address);
+        return (value == 0 ? null : new BsdAddress(this, value));
+    }
+
     /** From the BsdDebugger interface */
     public BsdOopHandle readOopHandle(long address)
             throws UnmappedAddressException, UnalignedAddressException,
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java
index 01fe1d74577..0624fa92c78 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/bsd/BsdThreadContextFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dummy/DummyAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dummy/DummyAddress.java
index ecc4aa12800..b14ae19ad09 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dummy/DummyAddress.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/dummy/DummyAddress.java
@@ -80,6 +80,10 @@ class DummyAddress implements Address {
     return new DummyAddress(debugger, badLong);
   }
 
+  public Address getCompKlassAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
+    return new DummyAddress(debugger, badLong);
+  }
+
   //
   // Java-related routines
   //
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/ia64/IA64ThreadContext.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/ia64/IA64ThreadContext.java
index 4a5aa00d945..8a8ce383f2e 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/ia64/IA64ThreadContext.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/ia64/IA64ThreadContext.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxAddress.java
index c2e652d2059..9e85e133b3a 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxAddress.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxAddress.java
@@ -79,6 +79,11 @@ class LinuxAddress implements Address {
         return debugger.readCompOopAddress(addr + offset);
     }
 
+    public Address getCompKlassAddressAt(long offset)
+            throws UnalignedAddressException, UnmappedAddressException {
+        return debugger.readCompKlassAddress(addr + offset);
+    }
+
     //
     // Java-related routines
     //
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebugger.java
index 3a03fe5dc73..a1f8e128df8 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebugger.java
@@ -46,6 +46,7 @@ public interface LinuxDebugger extends JVMDebugger {
     throws DebuggerException;
   public LinuxAddress readAddress(long address) throws DebuggerException;
   public LinuxAddress readCompOopAddress(long address) throws DebuggerException;
+  public LinuxAddress readCompKlassAddress(long address) throws DebuggerException;
   public LinuxOopHandle readOopHandle(long address) throws DebuggerException;
   public LinuxOopHandle readCompOopHandle(long address) throws DebuggerException;
   public long[]       getThreadIntegerRegisterSet(int lwp_id) throws DebuggerException;
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java
index c3cbf14887a..150b5442786 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/linux/LinuxDebuggerLocal.java
@@ -429,6 +429,12 @@ public class LinuxDebuggerLocal extends DebuggerBase implements LinuxDebugger {
         return (value == 0 ? null : new LinuxAddress(this, value));
     }
 
+    public LinuxAddress readCompKlassAddress(long address)
+            throws UnmappedAddressException, UnalignedAddressException {
+        long value = readCompKlassAddressValue(address);
+        return (value == 0 ? null : new LinuxAddress(this, value));
+    }
+
     /** From the LinuxDebugger interface */
     public LinuxOopHandle readOopHandle(long address)
             throws UnmappedAddressException, UnalignedAddressException,
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcAddress.java
index cd496cacb0f..d91d896e982 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcAddress.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcAddress.java
@@ -76,6 +76,10 @@ class ProcAddress implements Address {
     return debugger.readCompOopAddress(addr + offset);
   }
 
+  public Address getCompKlassAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
+    return debugger.readCompKlassAddress(addr + offset);
+  }
+
   //
   // Java-related routines
   //
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebugger.java
index adf1bcc9139..9fbdbe9c33f 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebugger.java
@@ -47,6 +47,7 @@ public interface ProcDebugger extends JVMDebugger {
     throws DebuggerException;
   public ProcAddress   readAddress(long address) throws DebuggerException;
   public ProcAddress   readCompOopAddress(long address) throws DebuggerException;
+  public ProcAddress   readCompKlassAddress(long address) throws DebuggerException;
   public ProcOopHandle readOopHandle(long address) throws DebuggerException;
   public ProcOopHandle readCompOopHandle(long address) throws DebuggerException;
   public long[]       getThreadIntegerRegisterSet(int tid) throws DebuggerException;
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java
index dbfed015c92..298dbfda634 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/proc/ProcDebuggerLocal.java
@@ -351,6 +351,12 @@ public class ProcDebuggerLocal extends DebuggerBase implements ProcDebugger {
         return (value == 0 ? null : new ProcAddress(this, value));
     }
 
+    public ProcAddress readCompKlassAddress(long address)
+    throws UnmappedAddressException, UnalignedAddressException {
+        long value = readCompKlassAddressValue(address);
+        return (value == 0 ? null : new ProcAddress(this, value));
+    }
+
     /** From the ProcDebugger interface */
     public ProcOopHandle readOopHandle(long address)
     throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteAddress.java
index 90588a09b98..6b34f5c1a66 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteAddress.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteAddress.java
@@ -74,6 +74,9 @@ class RemoteAddress implements Address {
   public Address getCompOopAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
     return debugger.readCompOopAddress(addr + offset);
   }
+  public Address getCompKlassAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
+    return debugger.readCompKlassAddress(addr + offset);
+  }
 
   //
   // Java-related routines
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java
index 013ad1c576c..1f72aa6aa04 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebugger.java
@@ -68,6 +68,9 @@ public interface RemoteDebugger extends Remote {
   public long      getHeapOopSize() throws RemoteException;
   public long      getNarrowOopBase() throws RemoteException;
   public int       getNarrowOopShift() throws RemoteException;
+  public long      getKlassPtrSize() throws RemoteException;
+  public long      getNarrowKlassBase() throws RemoteException;
+  public int       getNarrowKlassShift() throws RemoteException;
 
   public boolean   areThreadsEqual(long addrOrId1, boolean isAddress1,
                                    long addrOrId2, boolean isAddress2) throws RemoteException;
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java
index 8417b8cb5a6..ffa61b548e7 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerClient.java
@@ -99,7 +99,10 @@ public class RemoteDebuggerClient extends DebuggerBase implements JVMDebugger {
       javaPrimitiveTypesConfigured = true;
       narrowOopBase  = remoteDebugger.getNarrowOopBase();
       narrowOopShift = remoteDebugger.getNarrowOopShift();
+      narrowKlassBase  = remoteDebugger.getNarrowKlassBase();
+      narrowKlassShift = remoteDebugger.getNarrowKlassShift();
       heapOopSize  = remoteDebugger.getHeapOopSize();
+      klassPtrSize  = remoteDebugger.getKlassPtrSize();
     }
     catch (RemoteException e) {
       throw new DebuggerException(e);
@@ -319,6 +322,12 @@ public class RemoteDebuggerClient extends DebuggerBase implements JVMDebugger {
     return (value == 0 ? null : new RemoteAddress(this, value));
   }
 
+  RemoteAddress readCompKlassAddress(long address)
+    throws UnmappedAddressException, UnalignedAddressException {
+    long value = readCompKlassAddressValue(address);
+    return (value == 0 ? null : new RemoteAddress(this, value));
+  }
+
   RemoteOopHandle readOopHandle(long address)
     throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
     long value = readAddressValue(address);
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java
index 86ccadb79fa..3dc7b28bfd7 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/remote/RemoteDebuggerServer.java
@@ -126,6 +126,18 @@ public class RemoteDebuggerServer extends UnicastRemoteObject
     return debugger.getNarrowOopShift();
   }
 
+  public long getKlassPtrSize() throws RemoteException {
+    return debugger.getHeapOopSize();
+  }
+
+  public long getNarrowKlassBase() throws RemoteException {
+    return debugger.getNarrowKlassBase();
+  }
+
+  public int  getNarrowKlassShift() throws RemoteException {
+    return debugger.getNarrowKlassShift();
+  }
+
   public boolean   areThreadsEqual(long addrOrId1, boolean isAddress1,
                                    long addrOrId2, boolean isAddress2) throws RemoteException {
     ThreadProxy t1 = getThreadProxy(addrOrId1, isAddress1);
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/sparc/SPARCThreadContext.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/sparc/SPARCThreadContext.java
index 228d9191dfe..89ebec6c920 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/sparc/SPARCThreadContext.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/sparc/SPARCThreadContext.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgAddress.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgAddress.java
index c2130f8ea55..a5fc0dc2bd5 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgAddress.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgAddress.java
@@ -76,6 +76,10 @@ class WindbgAddress implements Address {
     return debugger.readCompOopAddress(addr + offset);
   }
 
+  public Address getCompKlassAddressAt(long offset) throws UnalignedAddressException, UnmappedAddressException {
+    return debugger.readCompKlassAddress(addr + offset);
+  }
+
   //
   // Java-related routines
   //
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebugger.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebugger.java
index 47ea85e421b..81825c67d06 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebugger.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebugger.java
@@ -46,6 +46,7 @@ public interface WindbgDebugger extends JVMDebugger {
     throws DebuggerException;
   public WindbgAddress readAddress(long address) throws DebuggerException;
   public WindbgAddress readCompOopAddress(long address) throws DebuggerException;
+  public WindbgAddress readCompKlassAddress(long address) throws DebuggerException;
   public WindbgOopHandle readOopHandle(long address) throws DebuggerException;
   public WindbgOopHandle readCompOopHandle(long address) throws DebuggerException;
 
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java
index 3e5a6aa96b6..fe7559d05fa 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/windbg/WindbgDebuggerLocal.java
@@ -321,6 +321,11 @@ public class WindbgDebuggerLocal extends DebuggerBase implements WindbgDebugger
     return (WindbgAddress) newAddress(readCompOopAddressValue(address));
   }
 
+  public WindbgAddress readCompKlassAddress(long address)
+    throws UnmappedAddressException, UnalignedAddressException {
+    return (WindbgAddress) newAddress(readCompKlassAddressValue(address));
+  }
+
   /** From the WindbgDebugger interface */
   public WindbgOopHandle readOopHandle(long address)
     throws UnmappedAddressException, UnalignedAddressException, NotInHeapException {
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/x86/X86ThreadContext.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/x86/X86ThreadContext.java
index 9d51bcffc49..9f24c410ea5 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/x86/X86ThreadContext.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/debugger/x86/X86ThreadContext.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SADebugServer.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SADebugServer.java
index df5cf24f437..19c41dfa84b 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SADebugServer.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/SADebugServer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -51,6 +51,13 @@ public final class SADebugServer {
          usage();
       }
 
+      // By default SA agent classes prefer Windows process debugger
+      // to windbg debugger. SA expects special properties to be set
+      // to choose other debuggers. We will set those here before
+      // attaching to SA agent.
+
+       System.setProperty("sun.jvm.hotspot.debugger.useWindbgDebugger", "true");
+
       // delegate to the actual SA debug server.
       sun.jvm.hotspot.DebugServer.main(args);
    }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/VirtualMachineImpl.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/VirtualMachineImpl.java
index 707673246a4..dc99ffd76be 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/VirtualMachineImpl.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/jdi/VirtualMachineImpl.java
@@ -263,6 +263,13 @@ public class VirtualMachineImpl extends MirrorImpl implements PathSearchingVirtu
                                             this.hashCode() + "]");
 
         ((com.sun.tools.jdi.VirtualMachineManagerImpl)mgr).addVirtualMachine(this);
+
+        // By default SA agent classes prefer Windows process debugger
+        // to windbg debugger. SA expects special properties to be set
+        // to choose other debuggers. We will set those here before
+        // attaching to SA agent.
+
+        System.setProperty("sun.jvm.hotspot.debugger.useWindbgDebugger", "true");
     }
 
     // we reflectively use newly spec'ed class because our ALT_BOOTDIR
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java
index 06e9b58016d..c23ce3a4093 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/memory/Universe.java
@@ -53,6 +53,8 @@ public class Universe {
 
   private static AddressField narrowOopBaseField;
   private static CIntegerField narrowOopShiftField;
+  private static AddressField narrowKlassBaseField;
+  private static CIntegerField narrowKlassShiftField;
 
   static {
     VM.registerVMInitializedObserver(new Observer() {
@@ -86,6 +88,8 @@ public class Universe {
 
     narrowOopBaseField = type.getAddressField("_narrow_oop._base");
     narrowOopShiftField = type.getCIntegerField("_narrow_oop._shift");
+    narrowKlassBaseField = type.getAddressField("_narrow_klass._base");
+    narrowKlassShiftField = type.getCIntegerField("_narrow_klass._shift");
   }
 
   public Universe() {
@@ -111,6 +115,19 @@ public class Universe {
     return (int)narrowOopShiftField.getValue();
   }
 
+  public static long getNarrowKlassBase() {
+    if (narrowKlassBaseField.getValue() == null) {
+      return 0;
+    } else {
+      return narrowKlassBaseField.getValue().minus(null);
+    }
+  }
+
+  public static int getNarrowKlassShift() {
+    return (int)narrowKlassShiftField.getValue();
+  }
+
+
   /** Returns "TRUE" iff "p" points into the allocated area of the heap. */
   public boolean isIn(Address p) {
     return heap().isIn(p);
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Array.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Array.java
index 64b297ff25e..46d8b83bddf 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Array.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Array.java
@@ -59,7 +59,7 @@ public class Array extends Oop {
     if (headerSize != 0) {
       return headerSize;
     }
-    if (VM.getVM().isCompressedHeadersEnabled()) {
+    if (VM.getVM().isCompressedKlassPointersEnabled()) {
       headerSize = typeSize;
     } else {
       headerSize = VM.getVM().alignUp(typeSize + VM.getVM().getIntSize(),
@@ -80,7 +80,7 @@ public class Array extends Oop {
     if (lengthOffsetInBytes != 0) {
       return lengthOffsetInBytes;
     }
-    if (VM.getVM().isCompressedHeadersEnabled()) {
+    if (VM.getVM().isCompressedKlassPointersEnabled()) {
       lengthOffsetInBytes = typeSize - VM.getVM().getIntSize();
     } else {
       lengthOffsetInBytes = typeSize;
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ArrayKlass.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ArrayKlass.java
index 3b9ff5e576e..f7cfb046d7d 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ArrayKlass.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ArrayKlass.java
@@ -44,7 +44,7 @@ public class ArrayKlass extends Klass {
   }
 
   private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
-    Type type          = db.lookupType("arrayKlass");
+    Type type          = db.lookupType("ArrayKlass");
     dimension          = new CIntField(type.getCIntegerField("_dimension"), 0);
     higherDimension    = new MetadataField(type.getAddressField("_higher_dimension"), 0);
     lowerDimension     = new MetadataField(type.getAddressField("_lower_dimension"), 0);
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/BranchData.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/BranchData.java
index b3d09109084..5f27437289c 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/BranchData.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/BranchData.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/CounterData.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/CounterData.java
index 65549a15827..f803c71e02b 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/CounterData.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/CounterData.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Instance.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Instance.java
index b7a724f113e..b16c59481a6 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Instance.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Instance.java
@@ -53,7 +53,7 @@ public class Instance extends Oop {
 
   // Returns header size in bytes.
   public static long getHeaderSize() {
-    if (VM.getVM().isCompressedHeadersEnabled()) {
+    if (VM.getVM().isCompressedKlassPointersEnabled()) {
       return typeSize - VM.getVM().getIntSize();
     } else {
       return typeSize;
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/JumpData.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/JumpData.java
index 7e2ab758aeb..008a6ee7164 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/JumpData.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/JumpData.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Klass.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Klass.java
index 9d724516ef9..63ac006ebb9 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Klass.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Klass.java
@@ -188,11 +188,11 @@ public class Klass extends Metadata implements ClassConstants {
   public Klass arrayKlassOrNull()         { return arrayKlassImpl(true);        }
 
   public Klass arrayKlassImpl(boolean orNull, int rank) {
-    throw new RuntimeException("array_klass should be dispatched to InstanceKlass, objArrayKlass or typeArrayKlass");
+    throw new RuntimeException("array_klass should be dispatched to InstanceKlass, ObjArrayKlass or TypeArrayKlass");
   }
 
   public Klass arrayKlassImpl(boolean orNull) {
-    throw new RuntimeException("array_klass should be dispatched to InstanceKlass, objArrayKlass or typeArrayKlass");
+    throw new RuntimeException("array_klass should be dispatched to InstanceKlass, ObjArrayKlass or TypeArrayKlass");
   }
 
   // This returns the name in the form java/lang/String which isn't really a signature
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Metadata.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Metadata.java
index 505aa0c960d..35ce375b52e 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Metadata.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Metadata.java
@@ -55,8 +55,8 @@ abstract public class Metadata extends VMObject {
     metadataConstructor.addMapping("InstanceMirrorKlass", InstanceMirrorKlass.class);
     metadataConstructor.addMapping("InstanceRefKlass", InstanceRefKlass.class);
     metadataConstructor.addMapping("InstanceClassLoaderKlass", InstanceClassLoaderKlass.class);
-    metadataConstructor.addMapping("typeArrayKlass", TypeArrayKlass.class);
-    metadataConstructor.addMapping("objArrayKlass", ObjArrayKlass.class);
+    metadataConstructor.addMapping("TypeArrayKlass", TypeArrayKlass.class);
+    metadataConstructor.addMapping("ObjArrayKlass", ObjArrayKlass.class);
     metadataConstructor.addMapping("Method", Method.class);
     metadataConstructor.addMapping("MethodData", MethodData.class);
     metadataConstructor.addMapping("ConstMethod", ConstMethod.class);
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/MetadataField.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/MetadataField.java
index 9e786b3e316..56824c600ab 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/MetadataField.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/MetadataField.java
@@ -27,7 +27,6 @@ package sun.jvm.hotspot.oops;
 import sun.jvm.hotspot.runtime.VMObject;
 import sun.jvm.hotspot.debugger.*;
 
-// The class for an C int field simply provides access to the value.
 public class MetadataField extends Field {
 
   public MetadataField(sun.jvm.hotspot.types.AddressField vmField, long startOffset) {
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/MultiBranchData.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/MultiBranchData.java
index 77f2647c41a..0075339f520 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/MultiBranchData.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/MultiBranchData.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCLdstubInstruction.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/NarrowKlassField.java
similarity index 64%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCLdstubInstruction.java
rename to hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/NarrowKlassField.java
index 724d8104613..70fb41f7253 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCLdstubInstruction.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/NarrowKlassField.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,20 +22,20 @@
  *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+package sun.jvm.hotspot.oops;
 
-import sun.jvm.hotspot.asm.*;
+import sun.jvm.hotspot.debugger.*;
 
-public class SPARCLdstubInstruction extends SPARCAtomicLoadStoreInstruction {
-    public SPARCLdstubInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rd) {
-        super(name, addr, rd);
-    }
+public class NarrowKlassField extends MetadataField {
 
-    public int getDataType() {
-        return RTLDT_UNSIGNED_BYTE;
-    }
+  public NarrowKlassField(sun.jvm.hotspot.types.AddressField vmField, long startOffset) {
+    super(vmField, startOffset);
+  }
 
-    public boolean isConditional() {
-        return false;
-    }
+  public Metadata getValue(Address addr) {
+    return Metadata.instantiateWrapperFor(addr.getCompKlassAddressAt(getOffset()));
+  }
+  public void setValue(Oop obj, long value) throws MutationException {
+    // Fix this: set* missing in Address
+  }
 }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjArrayKlass.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjArrayKlass.java
index b254bc96298..c45ff130cf7 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjArrayKlass.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/ObjArrayKlass.java
@@ -43,7 +43,7 @@ public class ObjArrayKlass extends ArrayKlass {
   }
 
   private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
-    Type type = db.lookupType("objArrayKlass");
+    Type type = db.lookupType("ObjArrayKlass");
     elementKlass = new MetadataField(type.getAddressField("_element_klass"), 0);
     bottomKlass  = new MetadataField(type.getAddressField("_bottom_klass"), 0);
   }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Oop.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Oop.java
index 0d588ecb13e..ab81252d4e7 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Oop.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/Oop.java
@@ -47,10 +47,7 @@ public class Oop {
     Type type  = db.lookupType("oopDesc");
     mark       = new CIntField(type.getCIntegerField("_mark"), 0);
     klass      = new MetadataField(type.getAddressField("_metadata._klass"), 0);
-    if (VM.getVM().isCompressedHeadersEnabled()) {
-      // compressedKlass  = new CIntField(type.getCIntegerField("_metadata._compressed_klass"), 0);
-      throw new InternalError("unimplemented");
-    }
+    compressedKlass  = new NarrowKlassField(type.getAddressField("_metadata._compressed_klass"), 0);
     headerSize = type.getSize();
   }
 
@@ -74,13 +71,13 @@ public class Oop {
 
   private static CIntField mark;
   private static MetadataField  klass;
-  private static CIntField compressedKlass;
+  private static NarrowKlassField compressedKlass;
 
   // Accessors for declared fields
   public Mark  getMark()   { return new Mark(getHandle()); }
   public Klass getKlass() {
-    if (VM.getVM().isCompressedHeadersEnabled()) {
-      throw new InternalError("unimplemented");
+    if (VM.getVM().isCompressedKlassPointersEnabled()) {
+      return (Klass)compressedKlass.getValue(getHandle());
     } else {
       return (Klass)klass.getValue(getHandle());
     }
@@ -150,7 +147,7 @@ public class Oop {
   void iterateFields(OopVisitor visitor, boolean doVMFields) {
     if (doVMFields) {
       visitor.doCInt(mark, true);
-      if (VM.getVM().isCompressedHeadersEnabled()) {
+      if (VM.getVM().isCompressedKlassPointersEnabled()) {
         throw new InternalError("unimplemented");
       } else {
         visitor.doMetadata(klass, true);
@@ -210,8 +207,8 @@ public class Oop {
     if (handle == null) {
       return null;
     }
-    if (VM.getVM().isCompressedHeadersEnabled()) {
-      throw new InternalError("Unimplemented");
+    if (VM.getVM().isCompressedKlassPointersEnabled()) {
+      return (Klass)Metadata.instantiateWrapperFor(handle.getCompKlassAddressAt(compressedKlass.getOffset()));
     } else {
       return (Klass)Metadata.instantiateWrapperFor(handle.getAddressAt(klass.getOffset()));
     }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/TypeArrayKlass.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/TypeArrayKlass.java
index 94f58a9dc01..e4f1f98f7d5 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/TypeArrayKlass.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/TypeArrayKlass.java
@@ -31,7 +31,7 @@ import sun.jvm.hotspot.runtime.*;
 import sun.jvm.hotspot.types.*;
 import sun.jvm.hotspot.utilities.*;
 
-// TypeArrayKlass is a proxy for typeArrayKlass in the JVM
+// TypeArrayKlass is a proxy for TypeArrayKlass in the JVM
 
 public class TypeArrayKlass extends ArrayKlass {
   static {
@@ -43,7 +43,7 @@ public class TypeArrayKlass extends ArrayKlass {
   }
 
   private static synchronized void initialize(TypeDataBase db) throws WrongTypeException {
-    Type t             = db.lookupType("typeArrayKlass");
+    Type t             = db.lookupType("TypeArrayKlass");
     maxLength          = new CIntField(t.getCIntegerField("_max_length"), 0);
   }
 
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/VirtualCallData.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/VirtualCallData.java
index 2516fe07e06..21b715f343c 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/VirtualCallData.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/VirtualCallData.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/java_lang_Class.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/java_lang_Class.java
index d1d7adeb7b5..e82d80789f4 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/java_lang_Class.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/oops/java_lang_Class.java
@@ -63,11 +63,7 @@ public class java_lang_Class {
 
   /** get Klass* field at offset hc_klass_offset from a java.lang.Class object */
   public static Klass asKlass(Oop aClass) {
-    if (VM.getVM().isCompressedHeadersEnabled()) {
-      throw new InternalError("unimplemented");
-    } else {
-      return (Klass)Metadata.instantiateWrapperFor(aClass.getHandle().getAddressAt(klassOffset));
-    }
+    return (Klass)Metadata.instantiateWrapperFor(aClass.getHandle().getAddressAt(klassOffset));
   }
 
   /** get oop_size field at offset oop_size_offset from a java.lang.Class object */
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Bytes.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Bytes.java
index dfa6fe3f19a..a8df4418454 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Bytes.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Bytes.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,14 +25,29 @@
 package sun.jvm.hotspot.runtime;
 
 import sun.jvm.hotspot.debugger.*;
+import sun.jvm.hotspot.utilities.PlatformInfo;
 
 /** Encapsulates some byte-swapping operations defined in the VM */
 
 public class Bytes {
+  // swap if client platform is different from server's.
   private boolean swap;
 
   public Bytes(MachineDescription machDesc) {
-    swap = !machDesc.isBigEndian();
+    String cpu = PlatformInfo.getCPU();
+    if (cpu.equals("sparc")) {
+      if (machDesc.isBigEndian()) {
+        swap = false;
+      } else {
+        swap = true;
+      }
+    } else { // intel
+      if (machDesc.isBigEndian()) {
+        swap = true;
+      } else {
+        swap = false;
+      }
+    }
   }
 
   /** Should only swap if the hardware's underlying byte order is
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java
index 5a4c344657d..8e259e3a145 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/Threads.java
@@ -32,9 +32,7 @@ import sun.jvm.hotspot.runtime.solaris_x86.SolarisX86JavaThreadPDAccess;
 import sun.jvm.hotspot.runtime.solaris_amd64.SolarisAMD64JavaThreadPDAccess;
 import sun.jvm.hotspot.runtime.win32_amd64.Win32AMD64JavaThreadPDAccess;
 import sun.jvm.hotspot.runtime.win32_x86.Win32X86JavaThreadPDAccess;
-import sun.jvm.hotspot.runtime.win32_ia64.Win32IA64JavaThreadPDAccess;
 import sun.jvm.hotspot.runtime.linux_x86.LinuxX86JavaThreadPDAccess;
-import sun.jvm.hotspot.runtime.linux_ia64.LinuxIA64JavaThreadPDAccess;
 import sun.jvm.hotspot.runtime.linux_amd64.LinuxAMD64JavaThreadPDAccess;
 import sun.jvm.hotspot.runtime.linux_sparc.LinuxSPARCJavaThreadPDAccess;
 import sun.jvm.hotspot.runtime.bsd_x86.BsdX86JavaThreadPDAccess;
@@ -79,14 +77,10 @@ public class Threads {
                 access =  new Win32X86JavaThreadPDAccess();
             } else if (cpu.equals("amd64")) {
                 access =  new Win32AMD64JavaThreadPDAccess();
-            } else if (cpu.equals("ia64")) {
-                access =  new Win32IA64JavaThreadPDAccess();
             }
         } else if (os.equals("linux")) {
             if (cpu.equals("x86")) {
                 access = new LinuxX86JavaThreadPDAccess();
-            } else if (cpu.equals("ia64")) {
-                access = new LinuxIA64JavaThreadPDAccess();
             } else if (cpu.equals("amd64")) {
                 access = new LinuxAMD64JavaThreadPDAccess();
             } else if (cpu.equals("sparc")) {
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
index ffe177238c2..5531980b1f8 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java
@@ -103,6 +103,7 @@ public class VM {
   private int          logMinObjAlignmentInBytes;
   private int          heapWordSize;
   private int          heapOopSize;
+  private int          klassPtrSize;
   private int          oopSize;
   /** This is only present in a non-core build */
   private CodeCache    codeCache;
@@ -129,7 +130,7 @@ public class VM {
   private static CIntegerType boolType;
   private Boolean sharingEnabled;
   private Boolean compressedOopsEnabled;
-  private Boolean compressedHeadersEnabled;
+  private Boolean compressedKlassPointersEnabled;
 
   // command line flags supplied to VM - see struct Flag in globals.hpp
   public static final class Flag {
@@ -350,6 +351,12 @@ public class VM {
     } else {
       heapOopSize = (int)getOopSize();
     }
+
+    if (isCompressedKlassPointersEnabled()) {
+      klassPtrSize = (int)getIntSize();
+    } else {
+      klassPtrSize = (int)getOopSize(); // same as an oop
+    }
   }
 
   /** This could be used by a reflective runtime system */
@@ -374,8 +381,9 @@ public class VM {
       ((Observer) iter.next()).update(null, null);
     }
 
-    debugger.putHeapConst(soleInstance.getHeapOopSize(), Universe.getNarrowOopBase(),
-                          Universe.getNarrowOopShift());
+    debugger.putHeapConst(soleInstance.getHeapOopSize(), soleInstance.getKlassPtrSize(),
+                          Universe.getNarrowOopBase(), Universe.getNarrowOopShift(),
+                          Universe.getNarrowKlassBase(), Universe.getNarrowKlassShift());
   }
 
   /** This is used by the debugging system */
@@ -477,6 +485,11 @@ public class VM {
     return db.lookupIntConstant(name);
   }
 
+  // Convenience function for conversions
+  static public long getAddressValue(Address addr) {
+    return VM.getVM().getDebugger().getAddressValue(addr);
+  }
+
   public long getAddressSize() {
     return db.getAddressSize();
   }
@@ -531,6 +544,10 @@ public class VM {
   public int getHeapOopSize() {
     return heapOopSize;
   }
+
+  public int getKlassPtrSize() {
+    return klassPtrSize;
+  }
   /** Utility routine for getting data structure alignment correct */
   public long alignUp(long size, long alignment) {
     return (size + alignment - 1) & ~(alignment - 1);
@@ -779,13 +796,13 @@ public class VM {
     return compressedOopsEnabled.booleanValue();
   }
 
-  public boolean isCompressedHeadersEnabled() {
-    if (compressedHeadersEnabled == null) {
-        Flag flag = getCommandLineFlag("UseCompressedHeaders");
-        compressedHeadersEnabled = (flag == null) ? Boolean.FALSE:
+  public boolean isCompressedKlassPointersEnabled() {
+    if (compressedKlassPointersEnabled == null) {
+        Flag flag = getCommandLineFlag("UseCompressedKlassPointers");
+        compressedKlassPointersEnabled = (flag == null) ? Boolean.FALSE:
              (flag.getBool()? Boolean.TRUE: Boolean.FALSE);
     }
-    return compressedHeadersEnabled.booleanValue();
+    return compressedKlassPointersEnabled.booleanValue();
   }
 
   public int getObjectAlignmentInBytes() {
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/IA64CurrentFrameGuess.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/IA64CurrentFrameGuess.java
deleted file mode 100644
index 6a0acef50f1..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/IA64CurrentFrameGuess.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.runtime.ia64;
-
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.debugger.ia64.*;
-import sun.jvm.hotspot.code.*;
-import sun.jvm.hotspot.interpreter.*;
-import sun.jvm.hotspot.runtime.*;
-
-/** <P> Should be able to be used on all ia64 platforms we support
-    (Win32, Linux) to implement JavaThread's
-    "currentFrameGuess()" functionality. Input is an IA64ThreadContext;
-    output is SP, FP, and PC for an IA64Frame. Instantiation of the
-    IA64Frame is left to the caller, since we may need to subclass
-    IA64Frame to support signal handler frames on Unix platforms. </P>
-
-    <P> This is pretty much impossible on ia64.
-    </P> */
-
-public class IA64CurrentFrameGuess {
-  private IA64ThreadContext context;
-  private JavaThread       thread;
-  private Address          spFound;
-  private Address          fpFound;
-  private Address          pcFound;
-
-  private static final boolean DEBUG = false;
-
-  public IA64CurrentFrameGuess(IA64ThreadContext context,
-                              JavaThread thread) {
-    this.context = context;
-    this.thread  = thread;
-  }
-
-  /** Returns false if not able to find a frame within a reasonable range. */
-  public boolean run(long regionInBytesToSearch) {
-    /*
-      Without using the stack walking library this is not possible on ia64.
-      There is also the issue of walking dynamic code where there is no
-      stack walking info generated.
-    */
-    return false;
-  }
-
-  public Address getSP() { return null; }
-  public Address getFP() { return null; }
-  /** May be null if getting values from thread-local storage; take
-      care to call the correct IA64Frame constructor to recover this if
-      necessary */
-  public Address getPC() { return null; }
-
-  private void setValues(Address sp, Address fp, Address pc) {
-    spFound = sp;
-    fpFound = fp;
-    pcFound = pc;
-  }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/IA64Frame.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/IA64Frame.java
deleted file mode 100644
index 273d8622bcc..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/IA64Frame.java
+++ /dev/null
@@ -1,481 +0,0 @@
-/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.runtime.ia64;
-
-import java.util.*;
-// import sun.jvm.hotspot.asm.ia64.*;
-import sun.jvm.hotspot.code.*;
-import sun.jvm.hotspot.compiler.*;
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.oops.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-import sun.jvm.hotspot.utilities.*;
-
-/** Specialization of and implementation of abstract methods of the
-    Frame class for the ia64 family of CPUs. */
-
-public class IA64Frame extends Frame {
-  private static final boolean DEBUG = false;
-
-  // All frames
-
-  // Interpreter frames
-
-  // Entry frames
-
-  // Native frames
-
-  // an additional field beyond sp and pc:
-  // Address raw_fp; // frame pointer only 1.4.2
-
-  Address iframe;
-
-  private IA64Frame() {
-  }
-
-  public IA64Frame(Address raw_sp, Address iframe, Address pc) {
-    this.raw_sp = raw_sp;
-    this.iframe = iframe;
-    this.pc = pc;
-    if (DEBUG) {
-      System.err.println("IA64Frame(sp, iframe, pc): " + this);
-      dumpStack();
-    }
-  }
-
-  public Object clone() {
-    IA64Frame frame = new IA64Frame();
-    frame.raw_sp = raw_sp;
-    frame.iframe = iframe;
-    frame.pc = pc;
-    return frame;
-  }
-
-  public boolean equals(Object arg) {
-    if (arg == null) {
-      return false;
-    }
-
-    if (!(arg instanceof IA64Frame)) {
-      return false;
-    }
-
-    IA64Frame other = (IA64Frame) arg;
-
-    return (AddressOps.equal(getSP(), other.getSP()) &&
-            AddressOps.equal(getIFRAME(), other.getIFRAME()) &&
-            AddressOps.equal(getPC(), other.getPC()));
-  }
-
-  public int hashCode() {
-    if (iframe == null) {
-      return 0;
-    }
-
-    return iframe.hashCode();
-  }
-
-  public String toString() {
-    return "sp: " + (getSP() == null? "null" : getSP().toString()) +
-         ", iframe: " + (getIFRAME() == null? "null" : getIFRAME().toString()) +
-         ", pc: " + (pc == null? "null" : pc.toString());
-  }
-
-  // accessors for the instance variables
-  public Address getFP() { return null; }
-  public Address getIFRAME() { return iframe; }
-  public Address getSP() { return raw_sp; }
-  public Address getID() { return getFP(); }
-
-  // FIXME: not implemented yet
-  public boolean isSignalHandlerFrameDbg() { return false; }
-  public int     getSignalNumberDbg()      { return 0;     }
-  public String  getSignalNameDbg()        { return null;  }
-
-  // FIXME: do sanity checks
-  public boolean isInterpretedFrameValid() {
-    return true;
-  }
-
-  public boolean isInterpretedFrame() { return iframe != null; }
-
-
-  // FIXME: not applicable in current system
-  //  void    patch_pc(Thread* thread, address pc);
-
-  public Frame sender(RegisterMap regMap, CodeBlob cb) {
-
-    if (iframe == null) {
-      return null;
-    }
-
-    cInterpreter fr = new cInterpreter(iframe);
-
-    if (fr.prev() == null) {
-      Address wrapper = fr.wrapper();
-      if ( wrapper == null) {
-        return null;
-      }
-      IA64JavaCallWrapper jcw = new IA64JavaCallWrapper(wrapper);
-      Address iprev = jcw.getPrevIFrame();
-      if (iprev == null) {
-        return null;
-      }
-      return new IA64Frame(null, iprev, null);
-    } else {
-      return new IA64Frame(null, fr.prev(), null);
-    }
-
-    /*
-    IA64RegisterMap map = (IA64RegisterMap) regMap;
-
-    if (Assert.ASSERTS_ENABLED) {
-      Assert.that(map != null, "map must be set");
-    }
-
-    // Default is we done have to follow them. The sender_for_xxx will
-    // update it accordingly
-    map.setIncludeArgumentOops(false);
-
-    if (isEntryFrame())       return senderForEntryFrame(map);
-    if (isInterpretedFrame()) return senderForInterpreterFrame(map);
-
-    if (!VM.getVM().isCore()) {
-      if(cb == null) {
-        cb = VM.getVM().getCodeCache().findBlob(getPC());
-      } else {
-        if (Assert.ASSERTS_ENABLED) {
-          Assert.that(cb.equals(VM.getVM().getCodeCache().findBlob(getPC())), "Must be the same");
-        }
-      }
-
-      if (cb != null) {
-         return senderForCompiledFrame(map, cb);
-      }
-    }
-
-    // Must be native-compiled frame, i.e. the marshaling code for native
-    // methods that exists in the core system.
-    return new IA64Frame(getSenderSP(), getLink(), getSenderPC());
-
-    */
-  }
-
-  private Frame senderForEntryFrame(IA64RegisterMap map) {
-    if (Assert.ASSERTS_ENABLED) {
-      Assert.that(map != null, "map must be set");
-    }
-    /*
-    // Java frame called from C; skip all C frames and return top C
-    // frame of that chunk as the sender
-    IA64JavaCallWrapper jcw = (IA64JavaCallWrapper) getEntryFrameCallWrapper();
-    if (Assert.ASSERTS_ENABLED) {
-      Assert.that(!entryFrameIsFirst(), "next Java fp must be non zero");
-      Assert.that(jcw.getLastJavaSP().greaterThan(getSP()), "must be above this frame on stack");
-    }
-    IA64Frame fr = new IA64Frame(jcw.getLastJavaSP(), jcw.getLastJavaFP(), null);
-    map.clear();
-    if (Assert.ASSERTS_ENABLED) {
-      Assert.that(map.getIncludeArgumentOops(), "should be set by clear");
-    }
-    return fr;
-    */
-    throw new RuntimeException("senderForEntryFrame NYI");
-  }
-
-  private Frame senderForInterpreterFrame(IA64RegisterMap map) {
-    /*
-    Address sp = addressOfStackSlot(INTERPRETER_FRAME_SENDER_SP_OFFSET).getAddressAt(0);
-    // We do not need to update the callee-save register mapping because above
-    // us is either another interpreter frame or a converter-frame, but never
-    // directly a compiled frame.
-    return new IA64Frame(sp, getLink(), getSenderPC());
-    */
-    throw new RuntimeException("senderForInterpreterFrame NYI");
-  }
-
-  private Frame senderForDeoptimizedFrame(IA64RegisterMap map, CodeBlob cb) {
-    // FIXME
-    throw new RuntimeException("Deoptimized frames not handled yet");
-  }
-
-  private Frame senderForCompiledFrame(IA64RegisterMap map, CodeBlob cb) {
-    //
-    // NOTE: some of this code is (unfortunately) duplicated in IA64CurrentFrameGuess
-    //
-
-    if (Assert.ASSERTS_ENABLED) {
-      Assert.that(map != null, "map must be set");
-    }
-
-    throw new RuntimeException("senderForCompiledFrame NYI");
-
-    /*
-
-    // frame owned by optimizing compiler
-    Address        sender_sp = null;
-
-    if (VM.getVM().isClientCompiler()) {
-      sender_sp        = addressOfStackSlot(SENDER_SP_OFFSET);
-    } else {
-      if (Assert.ASSERTS_ENABLED) {
-        Assert.that(cb.getFrameSize() >= 0, "Compiled by Compiler1: do not use");
-      }
-      sender_sp = getSP().addOffsetTo(cb.getFrameSize());
-    }
-
-    // On Intel the return_address is always the word on the stack
-    Address sender_pc = sender_sp.getAddressAt(-1 * VM.getVM().getAddressSize());
-
-    if (map.getUpdateMap() && cb.getOopMaps() != null) {
-      OopMapSet.updateRegisterMap(this, cb, map, true);
-    }
-
-    Address saved_fp = null;
-    if (VM.getVM().isClientCompiler()) {
-      saved_fp = getFP().getAddressAt(0);
-    } else {
-      int llink_offset = cb.getLinkOffset();
-      if (llink_offset >= 0) {
-        // Restore base-pointer, since next frame might be an interpreter frame.
-        Address fp_addr = getSP().addOffsetTo(VM.getVM().getAddressSize() * llink_offset);
-        saved_fp = fp_addr.getAddressAt(0);
-      }
-    }
-
-    sender_sp = null ; // sp_addr.getAddressAt(0);
-
-    return new IA64Frame(sender_sp, saved_fp, sender_pc);
-
-    */
-  }
-
-  protected boolean hasSenderPD() {
-    // FIXME
-    return true;
-  }
-
-  public long frameSize() {
-    throw new RuntimeException("frameSize NYI");
-    /*
-    return (getSenderSP().minus(getSP()) / VM.getVM().getAddressSize());
-    */
-  }
-
-  public Address getLink() {
-    throw new RuntimeException("getLink NYI");
-    /*
-    return addressOfStackSlot(LINK_OFFSET).getAddressAt(0);
-    */
-  }
-
-  // FIXME: not implementable yet
-  //inline void      frame::set_link(intptr_t* addr)  { *(intptr_t **)addr_at(link_offset) = addr; }
-
-  public Address getUnextendedSP() { return getSP(); }
-
-  // Return address:
-  /*
-  public Address getSenderPCAddr() { return addressOfStackSlot(RETURN_ADDR_OFFSET); }
-  */
-
-  public Address getSenderPC()     { return null;  }
-
-  /*
-  // return address of param, zero origin index.
-  public Address getNativeParamAddr(int idx) {
-    return addressOfStackSlot(NATIVE_FRAME_INITIAL_PARAM_OFFSET + idx);
-  }
-  */
-
-  public Address getSenderSP()     { return null; }
-
-  /*
-  public Address compiledArgumentToLocationPD(VMReg reg, RegisterMap regMap, int argSize) {
-    if (VM.getVM().isCore() || VM.getVM().isClientCompiler()) {
-      throw new RuntimeException("Should not reach here");
-    }
-
-    return oopMapRegToLocation(reg, regMap);
-  }
-
-  */
-
-  public Address addressOfInterpreterFrameLocals() {
-    if (iframe == null) {
-      throw new RuntimeException("Not an Interpreter frame");
-    }
-    cInterpreter fr = new cInterpreter(iframe);
-    return fr.locals();
-  }
-
-  private Address addressOfInterpreterFrameBCX() {
-    if (iframe == null) {
-      throw new RuntimeException("Not an Interpreter frame");
-    }
-    cInterpreter fr = new cInterpreter(iframe);
-    return fr.bcpAddr();
-  }
-
-  public int getInterpreterFrameBCI() {
-    // FIXME: this is not atomic with respect to GC and is unsuitable
-    // for use in a non-debugging, or reflective, system. Need to
-    // figure out how to express this.
-    Address bcp = addressOfInterpreterFrameBCX().getAddressAt(0);
-    Address methodHandle = addressOfInterpreterFrameMethod().getAddressAt(0);
-    Method method = (Method)Metadata.instantiateWrapperFor(methodHandle);
-    return bcpToBci(bcp, method);
-  }
-
-  public Address addressOfInterpreterFrameMDX() {
-    return null;
-  }
-
-  // FIXME
-  //inline int frame::interpreter_frame_monitor_size() {
-  //  return BasicObjectLock::size();
-  //}
-
-  // expression stack
-  // (the max_stack arguments are used by the GC; see class FrameClosure)
-
-  public Address addressOfInterpreterFrameExpressionStack() {
-    if (iframe == null) {
-      throw new RuntimeException("Not an Interpreter frame");
-    }
-    cInterpreter fr = new cInterpreter(iframe);
-    return fr.stackBase();
-  }
-
-  public int getInterpreterFrameExpressionStackDirection() { return -1; }
-
-  // top of expression stack
-  public Address addressOfInterpreterFrameTOS() {
-    if (iframe == null) {
-      throw new RuntimeException("Not an Interpreter frame");
-    }
-    cInterpreter fr = new cInterpreter(iframe);
-    // tos always points to first free element in c++ interpreter not tos
-    return fr.stackBase().addOffsetTo(VM.getVM().getAddressSize());
-  }
-
-  /** Expression stack from top down */
-  public Address addressOfInterpreterFrameTOSAt(int slot) {
-    return addressOfInterpreterFrameTOS().addOffsetTo(slot * VM.getVM().getAddressSize());
-  }
-
-  public Address getInterpreterFrameSenderSP() {
-    if (Assert.ASSERTS_ENABLED) {
-      Assert.that(isInterpretedFrame(), "interpreted frame expected");
-    }
-    throw new RuntimeException("getInterpreterFrameSenderSP NYI");
-  }
-
-  // Monitors
-  public BasicObjectLock interpreterFrameMonitorBegin() {
-    if (iframe == null) {
-      throw new RuntimeException("Not an Interpreter frame");
-    }
-    cInterpreter fr = new cInterpreter(iframe);
-    return new BasicObjectLock(fr.monitorBase());
-  }
-
-  public BasicObjectLock interpreterFrameMonitorEnd() {
-    if (iframe == null) {
-      throw new RuntimeException("Not an Interpreter frame");
-    }
-    cInterpreter fr = new cInterpreter(iframe);
-    // Monitors end is just above stack base (2 slots per monitor)
-    Address result = fr.stackBase().addOffsetTo(2 * VM.getVM().getAddressSize());
-    /*
-    if (Assert.ASSERTS_ENABLED) {
-      // make sure the pointer points inside the frame
-      Assert.that(AddressOps.gt(getFP(), result), "result must <  than frame pointer");
-      Assert.that(AddressOps.lte(getSP(), result), "result must >= than stack pointer");
-    }
-    */
-    return new BasicObjectLock(result);
-  }
-
-  public int interpreterFrameMonitorSize() {
-    return BasicObjectLock.size();
-  }
-
-  // Method
-  public Address addressOfInterpreterFrameMethod() {
-    if (iframe == null) {
-      throw new RuntimeException("Not an Interpreter frame");
-    }
-    cInterpreter fr = new cInterpreter(iframe);
-    return fr.methodAddr();
-  }
-
-  // Constant pool cache
-  public Address addressOfInterpreterFrameCPCache() {
-    if (iframe == null) {
-      throw new RuntimeException("Not an Interpreter frame");
-    }
-    cInterpreter fr = new cInterpreter(iframe);
-    return fr.constantsAddr();
-  }
-
-  // Entry frames
-  public JavaCallWrapper getEntryFrameCallWrapper() {
-    throw new RuntimeException("getEntryFrameCallWrapper NYI");
-  }
-
-  protected Address addressOfSavedOopResult() {
-    throw new RuntimeException("public boolean isInterpretedFrame() NYI");
-    /*
-    // offset is 2 for compiler2 and 3 for compiler1
-    return getSP().addOffsetTo((VM.getVM().isClientCompiler() ? 2 : 3) *
-                               VM.getVM().getAddressSize());
-    */
-  }
-
-  protected Address addressOfSavedReceiver() {
-    throw new RuntimeException("getEntryFrameCallWrapper NYI");
-    // return getSP().addOffsetTo(-4 * VM.getVM().getAddressSize());
-  }
-
-  private void dumpStack() {
-    /*
-    if (getFP() != null) {
-      for (Address addr = getSP().addOffsetTo(-5 * VM.getVM().getAddressSize());
-           AddressOps.lte(addr, getFP().addOffsetTo(5 * VM.getVM().getAddressSize()));
-           addr = addr.addOffsetTo(VM.getVM().getAddressSize())) {
-        System.out.println(addr + ": " + addr.getAddressAt(0));
-      }
-    } else {
-      for (Address addr = getSP().addOffsetTo(-5 * VM.getVM().getAddressSize());
-           AddressOps.lte(addr, getSP().addOffsetTo(20 * VM.getVM().getAddressSize()));
-           addr = addr.addOffsetTo(VM.getVM().getAddressSize())) {
-        System.out.println(addr + ": " + addr.getAddressAt(0));
-      }
-    }
-    */
-  }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/IA64JavaCallWrapper.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/IA64JavaCallWrapper.java
deleted file mode 100644
index 6b3d45cedca..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/IA64JavaCallWrapper.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.runtime.ia64;
-
-import java.util.*;
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.types.*;
-import sun.jvm.hotspot.runtime.*;
-
-public class IA64JavaCallWrapper extends JavaCallWrapper {
-  private static AddressField lastJavaIFrameField;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("JavaCallWrapper");
-
-    lastJavaIFrameField  = type.getAddressField("_last_Java_iframe");
-  }
-
-  public IA64JavaCallWrapper(Address addr) {
-    super(addr);
-  }
-
-  public Address getPrevIFrame() {
-    return lastJavaIFrameField.getValue(addr);
-  }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/IA64RegisterMap.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/IA64RegisterMap.java
deleted file mode 100644
index 99c358d0d2e..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/IA64RegisterMap.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.runtime.ia64;
-
-import sun.jvm.hotspot.asm.ia64.*;
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.runtime.*;
-
-public class IA64RegisterMap extends RegisterMap {
-
-  /** This is the only public constructor */
-  public IA64RegisterMap(JavaThread thread, boolean updateMap) {
-    super(thread, updateMap);
-  }
-
-  protected IA64RegisterMap(RegisterMap map) {
-    super(map);
-  }
-
-  public Object clone() {
-    IA64RegisterMap retval = new IA64RegisterMap(this);
-    return retval;
-  }
-
-  // no PD state to clear or copy:
-  protected void clearPD() {}
-  protected void initializePD() {}
-  protected void initializeFromPD(RegisterMap map) {}
-  protected Address getLocationPD(VMReg reg) { return null; }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/cInterpreter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/cInterpreter.java
deleted file mode 100644
index 72419755da9..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ia64/cInterpreter.java
+++ /dev/null
@@ -1,199 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.runtime.ia64;
-
-import java.util.*;
-// import sun.jvm.hotspot.asm.ia64.*;
-import sun.jvm.hotspot.code.*;
-import sun.jvm.hotspot.compiler.*;
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.oops.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.types.*;
-import sun.jvm.hotspot.utilities.*;
-
-/** Specialization of and implementation of abstract methods of the
-    Frame class for the ia64 family of CPUs. */
-
-public class cInterpreter extends VMObject {
-  private static final boolean DEBUG = true;
-
-  private static AddressField bcpField;
-  private static AddressField localsField;
-  private static AddressField constantsField;
-  private static AddressField methodField;
-  private static AddressField stackField;       // i.e. tos
-  private static AddressField stackBaseField;   // ultimate bottom of stack
-  private static AddressField stackLimitField;  // ultimate top of stack
-  private static AddressField monitorBaseField;
-  private static CIntegerField messageField;
-  private static AddressField prevFieldField;
-  private static AddressField wrapperField;
-  private static AddressField prevField;
-
-  private static int NO_REQUEST;
-  private static int INITIALIZE;
-  private static int METHOD_ENTRY;
-  private static int METHOD_RESUME;
-  private static int GOT_MONITORS;
-  private static int RETHROW_EXCEPTION;
-  private static int CALL_METHOD;
-  private static int RETURN_FROM_METHOD;
-  private static int RETRY_METHOD;
-  private static int MORE_MONITORS;
-  private static int THROWING_EXCEPTION;
-  private static int POPPING_FRAME;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-
-    Type cInterpreterType = db.lookupType("cInterpreter");
-    bcpField = cInterpreterType.getAddressField("_bcp");
-    localsField = cInterpreterType.getAddressField("_locals");
-    constantsField = cInterpreterType.getAddressField("_constants");
-    methodField = cInterpreterType.getAddressField("_method");
-    stackField = cInterpreterType.getAddressField("_stack");
-    stackBaseField = cInterpreterType.getAddressField("_stack_base");
-    stackLimitField = cInterpreterType.getAddressField("_stack_limit");
-    monitorBaseField = cInterpreterType.getAddressField("_monitor_base");
-    // messageField = cInterpreterType.getCIntegerField("_msg");
-    messageField = null;
-    wrapperField = cInterpreterType.getAddressField("_wrapper");
-    prevField = cInterpreterType.getAddressField("_prev_link");
-
-    /*
-    NO_REQUEST = db.lookupIntConstant("no_request").intValue();
-    INITIALIZE = db.lookupIntConstant("initialize").intValue();
-    METHOD_ENTRY = db.lookupIntConstant("method_entry").intValue();
-    METHOD_RESUME = db.lookupIntConstant("method_resume").intValue();
-    GOT_MONITORS = db.lookupIntConstant("got_monitors").intValue();
-    RETHROW_EXCEPTION = db.lookupIntConstant("rethrow_exception").intValue();
-    CALL_METHOD = db.lookupIntConstant("call_method").intValue();
-    RETURN_FROM_METHOD = db.lookupIntConstant("return_from_method").intValue();
-    RETRY_METHOD = db.lookupIntConstant("retry_method").intValue();
-    MORE_MONITORS = db.lookupIntConstant("more_monitors").intValue();
-    THROWING_EXCEPTION = db.lookupIntConstant("throwing_exception").intValue();
-    POPPING_FRAME = db.lookupIntConstant("popping_frame").intValue();
-    */
-  }
-
-
-  public cInterpreter(Address addr) {
-    super(addr);
-  }
-
-  public Address prev() {
-    return prevField.getValue(addr);
-  }
-
-  public Address locals() {
-
-    Address val = localsField.getValue(addr);
-    return val;
-  }
-
-  public Address localsAddr() {
-
-    Address localsAddr = localsField.getValue(addr);
-    return localsAddr;
-  }
-
-  public Address bcp() {
-
-    Address val = bcpField.getValue(addr);
-    return val;
-  }
-
-  public Address bcpAddr() {
-
-    Address bcpAddr = addr.addOffsetTo(bcpField.getOffset());
-    return bcpAddr;
-  }
-
-  public Address constants() {
-
-    Address val = constantsField.getValue(addr);
-    return val;
-  }
-
-  public Address constantsAddr() {
-
-    Address constantsAddr = constantsField.getValue(addr);
-    return constantsAddr;
-  }
-
-  public Address method() {
-
-    Address val = methodField.getValue(addr);
-    return val;
-  }
-  public Address methodAddr() {
-
-    Address methodAddr = addr.addOffsetTo(methodField.getOffset());
-    return methodAddr;
-  }
-
-  public Address stack() {
-
-    Address val = stackField.getValue(addr);
-    return val;
-  }
-
-  public Address stackBase() {
-
-    Address val = stackBaseField.getValue(addr);
-    return val;
-  }
-
-  public Address stackLimit() {
-
-    Address val = stackLimitField.getValue(addr);
-    return val;
-  }
-
-  public Address monitorBase() {
-
-    Address val = monitorBaseField.getValue(addr);
-    return val;
-  }
-
-  public Address wrapper() {
-
-    return wrapperField.getValue(addr);
-  }
-
-  public int message() {
-    int val = (int) messageField.getValue(addr);
-    return val;
-  }
-
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/linux_ia64/LinuxIA64JavaThreadPDAccess.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/linux_ia64/LinuxIA64JavaThreadPDAccess.java
deleted file mode 100644
index a0e36d59b7b..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/linux_ia64/LinuxIA64JavaThreadPDAccess.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.runtime.linux_ia64;
-
-import java.io.*;
-import java.util.*;
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.debugger.ia64.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.runtime.ia64.*;
-import sun.jvm.hotspot.types.*;
-import sun.jvm.hotspot.utilities.*;
-
-public class LinuxIA64JavaThreadPDAccess implements JavaThreadPDAccess {
-  // private static AddressField  lastJavaPCField;
-  // private static AddressField  lastJavaFPField;
-  private static AddressField  lastJavaIFrameField;
-  private static AddressField  osThreadField;
-
-  // Field from OSThread
-  private static CIntegerField osThreadPThreadIDField;
-
-  // This is currently unneeded but is being kept in case we change
-  // the currentFrameGuess algorithm
-  private static final long GUESS_SCAN_RANGE = 128 * 1024;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("JavaThread");
-
-    lastJavaIFrameField     = type.getAddressField("_last_Java_iframe");
-    osThreadField           = type.getAddressField("_osthread");
-
-    type = db.lookupType("OSThread");
-    osThreadPThreadIDField   = type.getCIntegerField("_pthread_id");
-  }
-
-  public    Address getLastJavaIFrame(Address addr) {
-    return lastJavaIFrameField.getValue(addr);
-  }
-
-
-  public    Address getBaseOfStackPointer(Address addr) {
-    return null;
-  }
-
-  public Address getLastJavaFP(Address addr) {
-    return null; // Not in 1.4.1
-  }
-
-  public    Address getLastJavaPC(Address addr) {
-    return null; // Not in 1.4.1
-  }
-
-  public boolean isInterpretedFrame() {
-
-    // In 1.4.1 there are only interpreted frames
-    // and there is no pc
-    return true;
-  }
-
-  public    Frame getLastFramePD(JavaThread thread, Address addr) {
-    // The thread is the JavaThread that contains "this"
-    // so we don't need any new accessor at the JavaThread level
-    Address iframe = getLastJavaIFrame(addr);
-    Address pc = thread.getLastJavaPC();
-    if (iframe == null) {
-      return null; // no information
-    }
-    return new IA64Frame(thread.getLastJavaSP(), iframe, pc);
-  }
-
-  public    RegisterMap newRegisterMap(JavaThread thread, boolean updateMap) {
-    return new IA64RegisterMap(thread, updateMap);
-  }
-
-  public    Frame getCurrentFrameGuess(JavaThread thread, Address addr) {
-    return getLastFramePD(thread, addr);
-  }
-
-  public    void printThreadIDOn(Address addr, PrintStream tty) {
-    tty.print(getThreadProxy(addr));
-  }
-
-  public    void printInfoOn(Address threadAddr, PrintStream tty) {
-    tty.print("Thread id: ");
-    printThreadIDOn(threadAddr, tty);
-    tty.println("\nLastJavaIFrame: " + getLastJavaIFrame(threadAddr));
-  }
-
-  public    Address getLastSP(Address addr) {
-    ThreadProxy t = getThreadProxy(addr);
-    IA64ThreadContext context = (IA64ThreadContext) t.getContext();
-    return context.getRegisterAsAddress(IA64ThreadContext.SP);
-  }
-
-  public    ThreadProxy getThreadProxy(Address addr) {
-    // Addr is the address of the JavaThread.
-    // Fetch the OSThread (for now and for simplicity, not making a
-    // separate "OSThread" class in this package)
-    Address osThreadAddr = osThreadField.getValue(addr);
-    // Get the address of the _pthread_id from the OSThread
-    Address pthreadIdAddr = osThreadAddr.addOffsetTo(osThreadPThreadIDField.getOffset());
-
-    JVMDebugger debugger = VM.getVM().getDebugger();
-    return debugger.getThreadForIdentifierAddress(pthreadIdAddr);
-  }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/win32_ia64/Win32IA64JavaThreadPDAccess.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/win32_ia64/Win32IA64JavaThreadPDAccess.java
deleted file mode 100644
index 48014ab3938..00000000000
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/win32_ia64/Win32IA64JavaThreadPDAccess.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-package sun.jvm.hotspot.runtime.win32_ia64;
-
-import java.io.*;
-import java.util.*;
-import sun.jvm.hotspot.debugger.*;
-import sun.jvm.hotspot.debugger.ia64.*;
-import sun.jvm.hotspot.runtime.*;
-import sun.jvm.hotspot.runtime.ia64.*;
-import sun.jvm.hotspot.types.*;
-import sun.jvm.hotspot.utilities.*;
-
-public class Win32IA64JavaThreadPDAccess implements JavaThreadPDAccess {
-  // private static AddressField  lastJavaPCField;
-  // private static AddressField  lastJavaFPField;
-  private static AddressField  lastJavaIFrameField;
-  private static AddressField  osThreadField;
-
-  // Field from OSThread
-  private static CIntegerField osThreadPThreadIDField;
-
-  // This is currently unneeded but is being kept in case we change
-  // the currentFrameGuess algorithm
-  private static final long GUESS_SCAN_RANGE = 128 * 1024;
-
-  static {
-    VM.registerVMInitializedObserver(new Observer() {
-        public void update(Observable o, Object data) {
-          initialize(VM.getVM().getTypeDataBase());
-        }
-      });
-  }
-
-  private static synchronized void initialize(TypeDataBase db) {
-    Type type = db.lookupType("JavaThread");
-
-    lastJavaIFrameField     = type.getAddressField("_last_Java_iframe");
-    osThreadField           = type.getAddressField("_osthread");
-
-    type = db.lookupType("OSThread");
-    osThreadPThreadIDField   = type.getCIntegerField("_pthread_id");
-  }
-
-  public    Address getLastJavaIFrame(Address addr) {
-    return lastJavaIFrameField.getValue(addr);
-  }
-
-
-  public    Address getBaseOfStackPointer(Address addr) {
-    return null;
-  }
-
-  public Address getLastJavaFP(Address addr) {
-    return null; // Not in 1.4.1
-  }
-
-  public    Address getLastJavaPC(Address addr) {
-    return null; // Not in 1.4.1
-  }
-
-  public boolean isInterpretedFrame() {
-
-    // In 1.4.1 there are only interpreted frames
-    // and there is no pc
-    return true;
-  }
-
-  public    Frame getLastFramePD(JavaThread thread, Address addr) {
-    // The thread is the JavaThread that contains "this"
-    // so we don't need any new accessor at the JavaThread level
-    Address iframe = getLastJavaIFrame(addr);
-    Address pc = thread.getLastJavaPC();
-    if (iframe == null) {
-      return null; // no information
-    }
-    return new IA64Frame(thread.getLastJavaSP(), iframe, pc);
-  }
-
-  public    RegisterMap newRegisterMap(JavaThread thread, boolean updateMap) {
-    return new IA64RegisterMap(thread, updateMap);
-  }
-
-  public    Frame getCurrentFrameGuess(JavaThread thread, Address addr) {
-    return getLastFramePD(thread, addr);
-  }
-
-  public    void printThreadIDOn(Address addr, PrintStream tty) {
-    tty.print(getThreadProxy(addr));
-  }
-
-  public    void printInfoOn(Address threadAddr, PrintStream tty) {
-    tty.print("Thread id: ");
-    printThreadIDOn(threadAddr, tty);
-    tty.println("\nLastJavaIFrame: " + getLastJavaIFrame(threadAddr));
-  }
-
-  public    Address getLastSP(Address addr) {
-    ThreadProxy t = getThreadProxy(addr);
-    IA64ThreadContext context = (IA64ThreadContext) t.getContext();
-    return context.getRegisterAsAddress(IA64ThreadContext.SP);
-  }
-
-  public    ThreadProxy getThreadProxy(Address addr) {
-    // Addr is the address of the JavaThread.
-    // Fetch the OSThread (for now and for simplicity, not making a
-    // separate "OSThread" class in this package)
-    Address osThreadAddr = osThreadField.getValue(addr);
-    // Get the address of the _pthread_id from the OSThread
-    Address pthreadIdAddr = osThreadAddr.addOffsetTo(osThreadPThreadIDField.getOffset());
-
-    JVMDebugger debugger = VM.getVM().getDebugger();
-    return debugger.getThreadForIdentifierAddress(pthreadIdAddr);
-  }
-}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/x86/X86RegisterMap.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/x86/X86RegisterMap.java
index 707df689e70..4cde2902043 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/x86/X86RegisterMap.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/x86/X86RegisterMap.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,6 @@
 
 package sun.jvm.hotspot.runtime.x86;
 
-import sun.jvm.hotspot.asm.x86.*;
 import sun.jvm.hotspot.debugger.*;
 import sun.jvm.hotspot.runtime.*;
 
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java
index d7c9913da1b..954052703c8 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/tools/jcore/ClassWriter.java
@@ -354,15 +354,14 @@ public class ClassWriter implements /* imports */ ClassConstants
     }
 
     protected void writeFields() throws IOException {
-        U2Array fields = klass.getFields();
-        final int length = (int) fields.length();
+        final int javaFieldsCount = klass.getJavaFieldsCount();
 
         // write number of fields
-        dos.writeShort((short) length);
+        dos.writeShort((short) javaFieldsCount);
 
-        if (DEBUG) debugMessage("number of fields = " + length);
+        if (DEBUG) debugMessage("number of fields = " + javaFieldsCount);
 
-        for (int index = 0; index < length; index++) {
+        for (int index = 0; index < javaFieldsCount; index++) {
             short accessFlags    = klass.getFieldAccessFlags(index);
             dos.writeShort(accessFlags & (short) JVM_RECOGNIZED_FIELD_MODIFIERS);
 
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
index 5f673f26e46..91993feea8c 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
@@ -27,10 +27,6 @@ package sun.jvm.hotspot.ui.classbrowser;
 import java.io.*;
 import java.util.*;
 import sun.jvm.hotspot.asm.*;
-import sun.jvm.hotspot.asm.sparc.*;
-import sun.jvm.hotspot.asm.x86.*;
-import sun.jvm.hotspot.asm.ia64.*;
-import sun.jvm.hotspot.asm.amd64.*;
 import sun.jvm.hotspot.code.*;
 import sun.jvm.hotspot.compiler.*;
 import sun.jvm.hotspot.debugger.*;
@@ -182,40 +178,6 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
            spaces = "  ";
            tab = "    ";
        }
-    }
-
-   private static CPUHelper cpuHelper;
-   static {
-      VM.registerVMInitializedObserver(new Observer() {
-         public void update(Observable o, Object data) {
-            initialize();
-         }
-      });
-   }
-
-   private static synchronized void initialize() {
-      String cpu = VM.getVM().getCPU();
-      if (cpu.equals("sparc")) {
-         cpuHelper = new SPARCHelper();
-      } else if (cpu.equals("x86")) {
-         cpuHelper = new X86Helper();
-      } else if (cpu.equals("amd64") || cpu.equals("x86_64")) {
-         cpuHelper = new AMD64Helper();
-      } else if (cpu.equals("ia64")) {
-         cpuHelper = new IA64Helper();
-      } else {
-        try {
-          cpuHelper = (CPUHelper)Class.forName("sun.jvm.hotspot.asm." +
-             cpu.toLowerCase() + "." + cpu.toUpperCase() +
-             "Helper").newInstance();
-        } catch (Exception e) {
-          throw new RuntimeException("cpu '" + cpu + "' is not yet supported!");
-        }
-      }
-   }
-
-   protected static synchronized CPUHelper getCPUHelper() {
-      return cpuHelper;
    }
 
    protected String escapeHTMLSpecialChars(String value) {
@@ -827,10 +789,6 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
       }
    }
 
-   protected Disassembler createDisassembler(long startPc, byte[] code) {
-      return getCPUHelper().createDisassembler(startPc, code);
-   }
-
    protected SymbolFinder createSymbolFinder() {
       return new DummySymbolFinder();
    }
@@ -892,17 +850,9 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
       return genHTMLForRawDisassembly(pc, null);
    }
 
-   protected byte[] readBuffer(sun.jvm.hotspot.debugger.Address addr, int size) {
-      byte[] buf = new byte[size];
-      for (int b = 0; b < size; b++) {
-         buf[b] = (byte) addr.getJByteAt(b);
-      }
-      return buf;
-   }
-
-    public String genHTMLForRawDisassembly(sun.jvm.hotspot.debugger.Address startPc, int size) {
+   public String genHTMLForRawDisassembly(sun.jvm.hotspot.debugger.Address startPc, int size) {
       try {
-         return genHTMLForRawDisassembly(startPc, null, readBuffer(startPc, size));
+         return genHTMLForRawDisassembly(startPc, size, null);
       } catch (Exception exp) {
          return genHTMLErrorMessage(exp);
       }
@@ -911,7 +861,7 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
    protected String genHTMLForRawDisassembly(sun.jvm.hotspot.debugger.Address startPc,
                                              String prevPCs) {
       try {
-         return genHTMLForRawDisassembly(startPc, prevPCs, readBuffer(startPc, NATIVE_CODE_SIZE));
+         return genHTMLForRawDisassembly(startPc, NATIVE_CODE_SIZE, prevPCs);
       } catch (Exception exp) {
          return genHTMLErrorMessage(exp);
       }
@@ -928,25 +878,28 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
       return buf.toString();
    }
 
-   protected String genPCHref(long currentPc, sun.jvm.hotspot.asm.Address addr) {
-      String href = null;
-      if (addr instanceof PCRelativeAddress) {
-         PCRelativeAddress pcRelAddr = (PCRelativeAddress) addr;
-         href = genPCHref(currentPc + pcRelAddr.getDisplacement());
-      } else if(addr instanceof DirectAddress) {
-         href =  genPCHref(((DirectAddress) addr).getValue());
-      }
-
-      return href;
+   protected String genPCHref(Address addr) {
+      return genPCHref(addressToLong(addr));
    }
 
-   class RawCodeVisitor implements InstructionVisitor {
+   class HTMLDisassembler implements InstructionVisitor {
       private int instrSize = 0;
       private Formatter buf;
       private SymbolFinder symFinder = createSymbolFinder();
+      private long pc;
+      private OopMapSet oms;
+      private CodeBlob blob;
+      private NMethod nmethod;
 
-      RawCodeVisitor(Formatter buf) {
+      HTMLDisassembler(Formatter buf, CodeBlob blob) {
          this.buf = buf;
+         this.blob = blob;
+         if (blob != null) {
+            if (blob instanceof NMethod) {
+               nmethod = (NMethod)blob;
+            }
+            oms = blob.getOopMaps();
+         }
       }
 
       public int getInstructionSize() {
@@ -956,26 +909,68 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
       public void prologue() {
       }
 
-      public void visit(long currentPc, Instruction instr) {
-         String href = null;
-          if (instr.isCall()) {
-             CallInstruction call = (CallInstruction) instr;
-             sun.jvm.hotspot.asm.Address addr = call.getBranchDestination();
-             href = genPCHref(currentPc, addr);
-          }
+      public void beginInstruction(long currentPc) {
+         pc = currentPc;
 
-          instrSize += instr.getSize();
-          buf.append("0x");
-          buf.append(Long.toHexString(currentPc));
-          buf.append(':');
-          buf.append(tab);
+         sun.jvm.hotspot.debugger.Address adr = longToAddress(pc);
+         if (nmethod != null) {
+            if (adr.equals(nmethod.getEntryPoint()))             print("[Entry Point]\n");
+            if (adr.equals(nmethod.getVerifiedEntryPoint()))     print("[Verified Entry Point]\n");
+            if (adr.equals(nmethod.exceptionBegin()))            print("[Exception Handler]\n");
+            if (adr.equals(nmethod.stubBegin()) &&
+                !nmethod.stubBegin().equals(nmethod.stubEnd()))  print("[Stub Code]\n");
+            // if (adr.equals(nmethod.constsBegin()))               print("[Constants]\n");
+         }
 
-          if (href != null) {
-             buf.link(href, instr.asString(currentPc, symFinder));
-          } else {
-             buf.append(instr.asString(currentPc, symFinder));
-          }
-          buf.br();
+         buf.append(adr.toString());
+         buf.append(':');
+         buf.append(tab);
+      }
+
+      public void printAddress(long address) {
+         sun.jvm.hotspot.debugger.Address addr = longToAddress(address);
+         if (VM.getVM().getCodeCache().contains(addr)) {
+            buf.link(genPCHref(address), addr.toString());
+         } else {
+            buf.append(addr.toString());
+         }
+      }
+
+      public void print(String s) {
+         buf.append(s);
+      }
+
+      public void endInstruction(long endPc) {
+         instrSize += endPc - pc;
+         if (genHTML) buf.br();
+
+         if (nmethod != null) {
+            ScopeDesc sd = nmethod.scope_desc_in(pc, endPc);
+            if (sd != null) {
+               buf.br();
+               buf.append(genSafepointInfo(nmethod, sd));
+            }
+         }
+
+         if (oms != null) {
+            long base = addressToLong(blob.codeBegin());
+            for (int i = 0, imax = (int)oms.getSize(); i < imax; i++) {
+               OopMap om = oms.getMapAt(i);
+               long omspc = base + om.getOffset();
+               if (omspc > pc) {
+                  if (omspc <= endPc) {
+                     buf.br();
+                     buf.append(genOopMapInfo(om));
+                     // st.move_to(column);
+                     // visitor.print("; ");
+                        // om.print_on(st);
+                  }
+                  break;
+               }
+            }
+         }
+         // follow each complete insn by a nice newline
+         buf.br();
       }
 
       public void epilogue() {
@@ -983,13 +978,11 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
    };
 
    protected String genHTMLForRawDisassembly(sun.jvm.hotspot.debugger.Address addr,
-                                             String prevPCs,
-                                             byte[] code) {
+                                             int size,
+                                             String prevPCs) {
       try {
-         long startPc = addressToLong(addr);
-         Disassembler disasm = createDisassembler(startPc, code);
          final Formatter buf = new Formatter(genHTML);
-         buf.genHTMLPrologue("Disassembly @0x" + Long.toHexString(startPc));
+         buf.genHTMLPrologue("Disassembly @ " + addr);
 
          if (prevPCs != null && genHTML) {
              buf.beginTag("p");
@@ -999,11 +992,12 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
 
 
          buf.h3("Code");
-         RawCodeVisitor visitor = new RawCodeVisitor(buf);
-         disasm.decode(visitor);
+         HTMLDisassembler visitor = new HTMLDisassembler(buf, null);
+         Disassembler.decode(visitor, null, addr, addr.addOffsetTo(size));
 
          if (genHTML) buf.beginTag("p");
          Formatter tmpBuf = new Formatter(genHTML);
+         long startPc = addressToLong(addr);
          tmpBuf.append("0x");
          tmpBuf.append(Long.toHexString(startPc + visitor.getInstructionSize()).toString());
          tmpBuf.append(",0x");
@@ -1024,8 +1018,7 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
       }
    }
 
-   protected String genSafepointInfo(NMethod nm, PCDesc pcDesc) {
-       ScopeDesc sd = nm.getScopeDescAt(pcDesc.getRealPC(nm));
+   protected String genSafepointInfo(NMethod nm, ScopeDesc sd) {
        Formatter buf = new Formatter(genHTML);
        Formatter tabs = new Formatter(genHTML);
        tabs.append(tab + tab + tab); // Initial indent for debug info
@@ -1040,8 +1033,6 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
        genScObjInfo(buf, tabs, sd);
        buf.endTag("pre");
 
-       buf.append(genOopMapInfo(nm, pcDesc));
-
        return buf.toString();
    }
 
@@ -1229,7 +1220,7 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
       buf.append(omvIterator.iterate(oms, "Oops:", false));
 
       oms = new OopMapStream(map, OopMapValue.OopTypes.NARROWOOP_VALUE);
-      buf.append(omvIterator.iterate(oms, "narrowOops:", false));
+      buf.append(omvIterator.iterate(oms, "NarrowOops:", false));
 
       oms = new OopMapStream(map, OopMapValue.OopTypes.VALUE_VALUE);
       buf.append(omvIterator.iterate(oms, "Values:", false));
@@ -1433,76 +1424,7 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
          buf.append(genMethodAndKlassLink(nmethod.getMethod()));
 
          buf.h3("Compiled Code");
-         sun.jvm.hotspot.debugger.Address instsBegin = nmethod.instsBegin();
-         sun.jvm.hotspot.debugger.Address instsEnd   = nmethod.instsEnd();
-         final int instsSize = nmethod.instsSize();
-         final long startPc = addressToLong(instsBegin);
-         final byte[] code = new byte[instsSize];
-         for (int i=0; i < code.length; i++)
-            code[i] = instsBegin.getJByteAt(i);
-
-         final long verifiedEntryPoint = addressToLong(nmethod.getVerifiedEntryPoint());
-         final long entryPoint = addressToLong(nmethod.getEntryPoint());
-         final Map safepoints = nmethod.getSafepoints();
-
-         final SymbolFinder symFinder = createSymbolFinder();
-         final Disassembler disasm = createDisassembler(startPc, code);
-         class NMethodVisitor implements InstructionVisitor {
-            public void prologue() {
-            }
-
-            public void visit(long currentPc, Instruction instr) {
-               String href = null;
-               if (instr.isCall()) {
-                  CallInstruction call = (CallInstruction) instr;
-                  sun.jvm.hotspot.asm.Address addr = call.getBranchDestination();
-                  href = genPCHref(currentPc, addr);
-               }
-
-               if (currentPc == verifiedEntryPoint) {
-                   buf.bold("Verified Entry Point"); buf.br();
-               }
-               if (currentPc == entryPoint) {
-                   buf.bold(">Entry Point"); buf.br();
-               }
-
-               PCDesc pcDesc = (PCDesc) safepoints.get(longToAddress(currentPc));
-
-               if (pcDesc != null) {
-                  buf.append(genSafepointInfo(nmethod, pcDesc));
-               }
-
-               buf.append("0x");
-               buf.append(Long.toHexString(currentPc));
-               buf.append(':');
-               buf.append(tab);
-
-               if (href != null) {
-                  buf.link(href, instr.asString(currentPc, symFinder));
-               } else {
-                  buf.append(instr.asString(currentPc, symFinder));
-               }
-
-               buf.br();
-            }
-
-            public void epilogue() {
-            }
-         };
-
-         disasm.decode(new NMethodVisitor());
-
-         sun.jvm.hotspot.debugger.Address stubBegin = nmethod.stubBegin();
-         if (stubBegin != null) {
-            sun.jvm.hotspot.debugger.Address stubEnd   = nmethod.stubEnd();
-            buf.h3("Stub");
-            long stubStartPc = addressToLong(stubBegin);
-            long stubEndPc = addressToLong(stubEnd);
-            int range = (int) (stubEndPc - stubStartPc);
-            byte[] stubCode = readBuffer(stubBegin, range);
-            Disassembler disasm2 = createDisassembler(stubStartPc, stubCode);
-            disasm2.decode(new NMethodVisitor());
-         }
+         Disassembler.decode(new HTMLDisassembler(buf, nmethod), nmethod);
          buf.genHTMLEpilogue();
          return buf.toString();
       } catch (Exception exp) {
@@ -1517,72 +1439,7 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
          buf.h3("CodeBlob");
 
          buf.h3("Compiled Code");
-         final sun.jvm.hotspot.debugger.Address codeBegin = blob.codeBegin();
-         final int codeSize = blob.getCodeSize();
-         final long startPc = addressToLong(codeBegin);
-         final byte[] code = new byte[codeSize];
-         for (int i=0; i < code.length; i++)
-            code[i] = codeBegin.getJByteAt(i);
-
-         final SymbolFinder symFinder = createSymbolFinder();
-         final Disassembler disasm = createDisassembler(startPc, code);
-         class CodeBlobVisitor implements InstructionVisitor {
-            OopMapSet maps;
-            OopMap curMap;
-            int curMapIndex;
-            long curMapOffset;
-            public void prologue() {
-              maps = blob.getOopMaps();
-              if (maps != null && (maps.getSize() > 0)) {
-                curMap = maps.getMapAt(0);
-                if (curMap != null) {
-                  curMapOffset = curMap.getOffset();
-                }
-              }
-            }
-
-            public void visit(long currentPc, Instruction instr) {
-               String href = null;
-               if (instr.isCall()) {
-                  CallInstruction call = (CallInstruction) instr;
-                  sun.jvm.hotspot.asm.Address addr = call.getBranchDestination();
-                  href = genPCHref(currentPc, addr);
-               }
-
-               buf.append("0x");
-               buf.append(Long.toHexString(currentPc));
-               buf.append(':');
-               buf.append(tab);
-
-               if (href != null) {
-                  buf.link(href, instr.asString(currentPc, symFinder));
-               } else {
-                   buf.append(instr.asString(currentPc, symFinder));
-               }
-               buf.br();
-
-               // See whether we have an oop map at this PC
-               if (curMap != null) {
-                 long curOffset = currentPc - startPc;
-                 if (curOffset == curMapOffset) {
-                   buf.append(genOopMapInfo(curMap));
-                   if (++curMapIndex >= maps.getSize()) {
-                     curMap = null;
-                   } else {
-                     curMap = maps.getMapAt(curMapIndex);
-                     if (curMap != null) {
-                       curMapOffset = curMap.getOffset();
-                     }
-                   }
-                 }
-               }
-            }
-
-            public void epilogue() {
-            }
-         };
-
-         disasm.decode(new CodeBlobVisitor());
+         Disassembler.decode(new HTMLDisassembler(buf, blob), blob);
 
          buf.genHTMLEpilogue();
          return buf.toString();
@@ -1653,13 +1510,8 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
       }
 
       buf.h3("Code");
-      long stubStartPc = addressToLong(codelet.codeBegin());
-      long stubEndPc = addressToLong(codelet.codeEnd());
-      int range = (int) (stubEndPc - stubStartPc);
-      byte[] stubCode = readBuffer(codelet.codeBegin(), range);
-      Disassembler disasm = createDisassembler(stubStartPc, stubCode);
-      disasm.decode(new RawCodeVisitor(buf));
-
+      Disassembler.decode(new HTMLDisassembler(buf, null), null,
+                          codelet.codeBegin(), codelet.codeEnd());
 
       Stub next = stubq.getNext(codelet);
       if (next != null) {
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtable.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtable.java
index 0f4da3a9218..5b7cfc571eb 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtable.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtable.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtableEntry.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtableEntry.java
index 0296dcbd651..2399fc28c38 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtableEntry.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/BasicHashtableEntry.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/Hashtable.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/Hashtable.java
index 70709f02b84..e9248e74fdc 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/Hashtable.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/Hashtable.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableBucket.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableBucket.java
index 44f78e49dd8..d86ee992ef0 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableBucket.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableBucket.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableEntry.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableEntry.java
index 38c5968720d..428715f63d6 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableEntry.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/HashtableEntry.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/RobustOopDeterminator.java b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/RobustOopDeterminator.java
index b2e9ed20b15..ca1f3baa6ec 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/RobustOopDeterminator.java
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/RobustOopDeterminator.java
@@ -53,9 +53,8 @@ public class RobustOopDeterminator {
   private static void initialize(TypeDataBase db) {
     Type type = db.lookupType("oopDesc");
 
-    if (VM.getVM().isCompressedHeadersEnabled()) {
-      // klassField = type.getNarrowOopField("_metadata._compressed_klass");
-      throw new InternalError("unimplemented");
+    if (VM.getVM().isCompressedKlassPointersEnabled()) {
+      klassField = type.getAddressField("_metadata._compressed_klass");
     } else {
       klassField = type.getAddressField("_metadata._klass");
     }
@@ -70,7 +69,11 @@ public class RobustOopDeterminator {
     }
     try {
       // Try to instantiate the Klass
-      Metadata.instantiateWrapperFor(klassField.getValue(oop));
+      if (VM.getVM().isCompressedKlassPointersEnabled()) {
+        Metadata.instantiateWrapperFor(oop.getCompKlassAddressAt(klassField.getOffset()));
+      } else {
+        Metadata.instantiateWrapperFor(klassField.getValue(oop));
+      }
           return true;
         }
     catch (AddressException e) {
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js
index b191dda80ca..ad977642bf0 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/utilities/soql/sa.js
@@ -221,15 +221,6 @@ function main(globals, jvmarg) {
   // if "registerCommand" function is defined
   // then register few global functions as "commands".
   if (typeof(registerCommand) == 'function') {
-    this.printDis = function(addr, len) {
-      if (!addr) {
-         writeln("Usage: dis address [ length ]");
-      } else {
-         dis(addr, len);
-      }
-    }
-    registerCommand("dis", "dis address [ length ]", "printDis");
-
     this.jclass = function(name) {
       if (typeof(name) == "string") {
          var clazz = sapkg.utilities.SystemDictionaryHelper.findInstanceKlass(name);
@@ -251,15 +242,6 @@ function main(globals, jvmarg) {
     }
     registerCommand("classes", "classes", "jclasses");
 
-    this.printJDis = function(addr) {
-      if (!addr) {
-         writeln("Usage: jdis address");
-      } else {
-         jdis(addr);
-      }
-    }
-    registerCommand("jdis", "jdis address", "printJDis");
-
     this.dclass = function(clazz, dir) {
       if (!clazz) {
          writeln("Usage: dumpclass { address | name } [ directory ]");
@@ -395,18 +377,6 @@ function addr2sym(addr) {
     }
 }
 
-// read 'num' bytes at 'addr' and return an array as result.
-// returns Java byte[] type result and not a JavaScript array.
-function readBytesAt(addr, num) {
-   addr = any2addr(addr);
-   var res = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, num);
-   var i;
-   for (i = 0; i < num; i++) {
-      res[i] = addr.getJByteAt(i);
-   }
-   return res;
-}
-
 // read 'num' words at 'addr' and return an array as result.
 // returns Java long[] type result and not a JavaScript array.
 function readWordsAt(addr, num) {
@@ -506,54 +476,6 @@ function mem(addr, num) {
    writeln();
 }
 
-// return the disassemble class for current CPU
-function disassemblerClass() {
-   var DisAsmClass;
-   if (CPU == 'x86') {
-      DisAsmClass = sapkg.asm.x86.X86Disassembler;
-   } else if (CPU == 'sparc') {
-      DisAsmClass = sapkg.asm.sparc.SPARCV9Disassembler;
-   }
-   return DisAsmClass;
-}
-
-// print native code disassembly of 'num' bytes at 'addr'
-function dis(addr, num) {
-   addr = any2addr(addr);
-   var nmethod = findNMethod(addr);
-   if (nmethod != null) {
-      // disassemble it as nmethod
-      nmethoddis(nmethod);     
-   } else {
-      // raw disassembly
-      if (num == undefined) {
-         // size of one SPARC instruction and
-         // unknown number of Intel instructions.
-         num = 4;
-      }
-      DisAsmClass = disassemblerClass();
-      if (DisAsmClass == undefined) {
-         // unsupported CPU
-         writeln(CPU + " is not yet supported!");
-         return;
-      }
-
-      var bytes = readBytesAt(addr, num);
-      var disAsm = new DisAsmClass(addr2num(addr), bytes);
-      disAsm.decode(new sapkg.asm.InstructionVisitor() {
-                      visit: function (pc, instr) {
-                         write(addr2sym(num2addr(pc)) + ':', '\t');
-                         writeln(instr.asString(pc, 
-                                 new sapkg.asm.SymbolFinder() {
-                                    getSymbolFor: function(addr) {
-                                       return addr2sym(num2addr(addr));
-                                    }
-                                 }));
-                      }
-                   });
-   }
-}
-
 // System dictionary functions
 
 // find InstanceKlass by name
@@ -586,31 +508,6 @@ function forEachPrimArrayKlass(callback) {
    sa.sysDict.primArrayClassesDo(new VisitorClass() { visit: callback });
 }
 
-// (hotspot) symbol table functions
-
-// String-to-Symbol
-function str2sym(str) {
-   return sa.symTbl.probe(str);
-}
-
-// Symbol-to-String
-function sym2str(sym) {
-   return sym.asString();
-}
-
-// oop functions
-
-// Address-to-Oop
-function addr2oop(addr) {
-   addr = any2addr(addr);
-   return sa.objHeap.newOop(addr.addOffsetToAsOopHandle(0));
-}
-
-// Oop-to-Address
-function oop2addr(oop) {
-   return oop.handle;
-}
-
 // 'oop' to higher-level java object wrapper in which for(i in o) 
 // works by iterating java level fields and javaobject.javafield
 // syntax works.
@@ -646,202 +543,6 @@ function forEachOopOfKlass(callback, klass, includeSubtypes) {
         klass, includeSubtypes);
 }
 
-// code cache functions
-
-// iterates CodeCache for each 'CodeBlob'
-function forEachCodeBlob(callback) {
-   var VisitorClass = sapkg.code.CodeCacheVisitor;
-   sa.codeCache.iterate(new VisitorClass() { visit: callback });
-}
-
-// find the ClodBlob (if any) that contains given address
-function findCodeBlob(addr) {
-   addr = any2addr(addr);
-   return sa.codeCache.findBlobUnsafe(addr);
-}
-
-// find the NMethod (if any) that contains given address
-function findNMethod(addr) {
-   var codeBlob = findCodeBlob(addr);
-   return (codeBlob != null && codeBlob.isNMethod())? codeBlob : null;
-}
-
-// returns PcDesc at given address or null
-function pcDescAt(addr) {
-   addr = any2addr(addr);
-   var nmethod = findNMethod(addr);
-   return (nmethod != null)? nmethod.safepoints.get(addr) : null;
-}
-
-// helpers for nmethod disassembler
-function printScope(scopeDesc) {
-   if (scopeDesc == null) {
-      return;
-   }
-   printScope(scopeDesc.sender());
-   var method = scopeDesc.method;
-   var bci = scopeDesc.BCI;
-   var line = -1;
-   if (method.hasLineNumberTable()) {
-      line = method.getLineNumberFromBCI(bci);
-   }
-  
-   write('\t', method.externalNameAndSignature(), '@', method.handle, 'bci=' + bci);
-   if (line != -1) { 
-      write('line=' + line); 
-   }
-   writeln();
-}
-
-function printSafepointInfo(nmethod, pcDesc) {
-   var scopeDesc = nmethod.getScopeDescAt(
-                      pcDesc.getRealPC(nmethod),
-                      pcDesc.isAtCall());
-   printScope(scopeDesc);
-}
-
-// print disassembly for a given nmethod
-function nmethoddis(nmethod) {
-   var DisAsmClass = disassemblerClass();
-   if (DisAsmClass == undefined) {
-      writeln(CPU + " is not yet supported!");
-      return;
-   }
-
-   var method = nmethod.method;
-   writeln('NMethod:', method.externalNameAndSignature(), '@', method.handle);
-
-   var codeBegin = nmethod.codeBegin();
-   var codeEnd = nmethod.codeEnd();
-   var size = codeEnd.minus(codeBegin);
-   var code = readBytesAt(codeBegin, size);
-   var startPc = addr2num(codeBegin);
-   var verifiedEntryPoint = addr2num(nmethod.verifiedEntryPoint);
-   var entryPoint = addr2num(nmethod.entryPoint);
-   var interpreterEntryPoint = addr2num(nmethod.interpreterEntryPointOrNull);
-   var safepoints = nmethod.safepoints;
-   var disAsm = new DisAsmClass(startPc, code);
-   disAsm.decode(new sapkg.asm.InstructionVisitor() {
-                    visit: function(curPc, instr) {
-                       if (curPc == verifiedEntryPoint) {
-                          writeln();                                    
-                          writeln("Verified Entry Point:");
-                       }
-                       if (curPc == entryPoint) {
-                          writeln();
-                          writeln("Entry Point:");                     
-                       }
-                       if (curPc == interpreterEntryPoint) {
-                          writeln("");
-                          writeln("Interpreter Entry Point:");
-                       }
-
-                       var pcDesc = safepoints.get(num2addr(curPc));
-                       var isSafepoint = (pcDesc != null);
-                       if (isSafepoint && pcDesc.isAtCall()) {
-                          printSafepointInfo(nmethod, pcDesc);
-                       }
-
-                       write(num2addr(curPc) + ':', '\t');
-                       writeln(instr.asString(curPc, 
-                                 new sapkg.asm.SymbolFinder() {
-                                    getSymbolFor: function(addr) {
-                                       return addr2sym(num2addr(addr));
-                                    }
-                                 }));
-
-                       if (isSafepoint && !pcDesc.isAtCall()) {
-                          printSafepointInfo(nmethod, pcDesc);
-                       }
-                    }                    
-                 });
-}
-
-// bytecode interpreter functions
-
-// iterates interpreter codelets for each interpreter codelet
-function forEachInterpCodelet(callback) {
-   var stubQueue = sa.interpreter.code;
-   var stub = stubQueue.first;
-   while (stub != null) {
-      if (callback(stub) == false) return;
-      stub = stubQueue.getNext(stub);
-   }
-}
-
-// helper for bytecode disassembler
-function printExceptionTable(method) {
-   var expTbl = method.getExceptionTable();
-   var len = expTbl.getLength();
-   if (len != 0) {     
-      var i;
-      var cpool = method.constants;
-      writeln("start", '\t', "end", '\t', "handler", '\t', "exception");
-      writeln("");
-      for (i = 0; i < len; i += 4) {
-         write(expTbl.getIntAt(i), '\t', 
-               expTbl.getIntAt(i + 1), '\t', 
-               expTbl.getIntAt(i + 2), '\t');
-         var cpIndex = expTbl.getIntAt(i + 3);
-         var oop = (cpIndex == 0)? null : cpool.getObjAt(cpIndex);
-         if (oop == null) {
-            writeln("<any>");
-         } else if (oop.isSymbol()) {
-            writeln(oop.asString().replace('/', '.'));
-         } else if (oop.isKlass()) {
-            writeln(oop.name.asString().replace('/', '.'));
-         } else {
-            writeln(cpIndex);
-         }
-      }
-   }
-}
-
-// print Java bytecode disassembly
-function jdis(method) {   
-   if (method.getByteCode == undefined) {
-      // method oop may be specified by address
-      method = addr2oop(any2addr(method));
-   }
-   writeln(method, '-', method.externalNameAndSignature());
-   if (method.isNative()) {
-      writeln("native method");
-      return;
-   }
-   if (method.isAbstract()) {
-      writeln("abstract method");
-      return;
-   }
-   
-   writeln();
-   var BytecodeDisAsmClass = sapkg.interpreter.BytecodeDisassembler;
-   var disAsm = new BytecodeDisAsmClass(method);
-   var bci = 0;
-   var hasLines = method.hasLineNumberTable();
-   if (hasLines) {
-      writeln("bci", '\t', "line", '\t', "instruction");
-   } else {
-      writeln("bci", '\t', "instruction");
-   }
-   writeln("");
-   disAsm.decode(new sapkg.interpreter.BytecodeVisitor() {
-                    prologue: function(method) { },
-                    epilogue: function() { },
-                    visit: function(bytecode) {
-                       if (hasLines) {
-                          var line = method.getLineNumberFromBCI(bci);
-                          writeln(bci, '\t', line, '\t', bytecode);
-                       } else {
-                          writeln(bci, '\t', bytecode);
-                       }
-                       bci++;
-                    }
-                 });
-
-    writeln();
-    printExceptionTable(method);
-}
-
 // Java thread
 
 // iterates each Thread
diff --git a/hotspot/agent/src/share/native/sadis.c b/hotspot/agent/src/share/native/sadis.c
new file mode 100644
index 00000000000..06525deecf5
--- /dev/null
+++ b/hotspot/agent/src/share/native/sadis.c
@@ -0,0 +1,289 @@
+/*
+ * Copyright 2012, Oracle and/or its affiliates. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#include "sun_jvm_hotspot_asm_Disassembler.h"
+
+/*
+ *  This file implements a binding between Java and the hsdis
+ *  dissasembler.  It should compile on Linux/Solaris and Windows.
+ *  The only platform dependent pieces of the code for doing
+ *  dlopen/dlsym to find the entry point in hsdis.  All the rest is
+ *  standard JNI code.
+ */
+
+#ifdef _WINDOWS
+
+#define snprintf  _snprintf
+#define vsnprintf _vsnprintf
+
+#include <windows.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef _DEBUG
+#include <crtdbg.h>
+#endif
+
+#else
+
+#include <string.h>
+#include <dlfcn.h>
+#include <link.h>
+
+#endif
+
+#include <limits.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#ifdef _WINDOWS
+static int getLastErrorString(char *buf, size_t len)
+{
+    long errval;
+
+    if ((errval = GetLastError()) != 0)
+    {
+      /* DOS error */
+      size_t n = (size_t)FormatMessage(
+            FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS,
+            NULL,
+            errval,
+            0,
+            buf,
+            (DWORD)len,
+            NULL);
+      if (n > 3) {
+        /* Drop final '.', CR, LF */
+        if (buf[n - 1] == '\n') n--;
+        if (buf[n - 1] == '\r') n--;
+        if (buf[n - 1] == '.') n--;
+        buf[n] = '\0';
+      }
+      return (int)n;
+    }
+
+    if (errno != 0)
+    {
+      /* C runtime error that has no corresponding DOS error code */
+      const char *s = strerror(errno);
+      size_t n = strlen(s);
+      if (n >= len) n = len - 1;
+      strncpy(buf, s, n);
+      buf[n] = '\0';
+      return (int)n;
+    }
+    return 0;
+}
+#endif /* _WINDOWS */
+
+/*
+ * Class:     sun_jvm_hotspot_asm_Disassembler
+ * Method:    load_library
+ * Signature: (Ljava/lang/String;)L
+ */
+JNIEXPORT jlong JNICALL Java_sun_jvm_hotspot_asm_Disassembler_load_1library(JNIEnv * env,
+                                                                           jclass disclass,
+                                                                           jstring jrepath_s,
+                                                                           jstring libname_s) {
+  uintptr_t func = 0;
+  const char* error_message = NULL;
+  const char* java_home;
+  jboolean isCopy;
+  uintptr_t *handle = NULL;
+
+  const char * jrepath = (*env)->GetStringUTFChars(env, jrepath_s, &isCopy); // like $JAVA_HOME/jre/lib/sparc/
+  const char * libname = (*env)->GetStringUTFChars(env, libname_s, &isCopy);
+  char buffer[128];
+
+  /* Load the hsdis library */
+#ifdef _WINDOWS
+  HINSTANCE hsdis_handle;
+  hsdis_handle = LoadLibrary(libname);
+  if (hsdis_handle == NULL) {
+    snprintf(buffer, sizeof(buffer), "%s%s", jrepath, libname);
+    hsdis_handle = LoadLibrary(buffer);
+  }
+  if (hsdis_handle != NULL) {
+    func = (uintptr_t)GetProcAddress(hsdis_handle, "decode_instructions_virtual");
+  }
+  if (func == 0) {
+    getLastErrorString(buffer, sizeof(buffer));
+    error_message = buffer;
+  }
+#else
+  void* hsdis_handle;
+  hsdis_handle = dlopen(libname, RTLD_LAZY | RTLD_GLOBAL);
+  if (hsdis_handle == NULL) {
+    snprintf(buffer, sizeof(buffer), "%s%s", jrepath, libname);
+    hsdis_handle = dlopen(buffer, RTLD_LAZY | RTLD_GLOBAL);
+  }
+  if (hsdis_handle != NULL) {
+    func = (uintptr_t)dlsym(hsdis_handle, "decode_instructions_virtual");
+  }
+  if (func == 0) {
+    error_message = dlerror();
+  }
+#endif
+
+  (*env)->ReleaseStringUTFChars(env, libname_s, libname);
+  (*env)->ReleaseStringUTFChars(env, jrepath_s, jrepath);
+
+  if (func == 0) {
+    /* Couldn't find entry point.  error_message should contain some
+     * platform dependent error message.
+     */
+    jclass eclass = (*env)->FindClass(env, "sun/jvm/hotspot/debugger/DebuggerException");
+    (*env)->ThrowNew(env, eclass, error_message);
+  }
+  return (jlong)func;
+}
+
+/* signature of decode_instructions_virtual from hsdis.h */
+typedef void* (*decode_func)(uintptr_t start_va, uintptr_t end_va,
+                             unsigned char* start, uintptr_t length,
+                             void* (*event_callback)(void*, const char*, void*),
+                             void* event_stream,
+                             int (*printf_callback)(void*, const char*, ...),
+                             void* printf_stream,
+                             const char* options);
+
+/* container for call back state when decoding instructions */
+typedef struct {
+  JNIEnv* env;
+  jobject dis;
+  jobject visitor;
+  jmethodID handle_event;
+  jmethodID raw_print;
+  char buffer[4096];
+} decode_env;
+
+
+/* event callback binding to Disassembler.handleEvent */
+static void* event_to_env(void* env_pv, const char* event, void* arg) {
+  decode_env* denv = (decode_env*)env_pv;
+  JNIEnv* env = denv->env;
+  jstring event_string = (*env)->NewStringUTF(env, event);
+  jlong result = (*env)->CallLongMethod(env, denv->dis, denv->handle_event, denv->visitor,
+                                        event_string, (jlong) (uintptr_t)arg);
+  if ((*env)->ExceptionOccurred(env) != NULL) {
+    /* ignore exceptions for now */
+    (*env)->ExceptionClear(env);
+    result = 0;
+  }
+  return (void*)(uintptr_t)result;
+}
+
+/* printing callback binding to Disassembler.rawPrint */
+static int printf_to_env(void* env_pv, const char* format, ...) {
+  jstring output;
+  va_list ap;
+  int cnt;
+  decode_env* denv = (decode_env*)env_pv;
+  JNIEnv* env = denv->env;
+  size_t flen = strlen(format);
+  const char* raw = NULL;
+
+  if (flen == 0)  return 0;
+  if (flen < 2 ||
+      strchr(format, '%') == NULL) {
+    raw = format;
+  } else if (format[0] == '%' && format[1] == '%' &&
+             strchr(format+2, '%') == NULL) {
+    // happens a lot on machines with names like %foo
+    flen--;
+    raw = format+1;
+  }
+  if (raw != NULL) {
+    jstring output = (*env)->NewStringUTF(env, raw);
+    (*env)->CallVoidMethod(env, denv->dis, denv->raw_print, denv->visitor, output);
+    if ((*env)->ExceptionOccurred(env) != NULL) {
+      /* ignore exceptions for now */
+      (*env)->ExceptionClear(env);
+    }
+    return (int) flen;
+  }
+  va_start(ap, format);
+  cnt = vsnprintf(denv->buffer, sizeof(denv->buffer), format, ap);
+  va_end(ap);
+
+  output = (*env)->NewStringUTF(env, denv->buffer);
+  (*env)->CallVoidMethod(env, denv->dis, denv->raw_print, denv->visitor, output);
+  if ((*env)->ExceptionOccurred(env) != NULL) {
+    /* ignore exceptions for now */
+    (*env)->ExceptionClear(env);
+  }
+  return cnt;
+}
+
+/*
+ * Class:     sun_jvm_hotspot_asm_Disassembler
+ * Method:    decode
+ * Signature: (Lsun/jvm/hotspot/asm/InstructionVisitor;J[BLjava/lang/String;J)V
+ */
+JNIEXPORT void JNICALL Java_sun_jvm_hotspot_asm_Disassembler_decode(JNIEnv * env,
+                                                                    jobject dis,
+                                                                    jobject visitor,
+                                                                    jlong startPc,
+                                                                    jbyteArray code,
+                                                                    jstring options_s,
+                                                                    jlong decode_instructions_virtual) {
+  jboolean isCopy;
+  jbyte* start = (*env)->GetByteArrayElements(env, code, &isCopy);
+  jbyte* end = start + (*env)->GetArrayLength(env, code);
+  const char * options = (*env)->GetStringUTFChars(env, options_s, &isCopy);
+  jclass disclass = (*env)->GetObjectClass(env, dis);
+
+  decode_env denv;
+  denv.env = env;
+  denv.dis = dis;
+  denv.visitor = visitor;
+
+  /* find Disassembler.handleEvent callback */
+  denv.handle_event = (*env)->GetMethodID(env, disclass, "handleEvent",
+                                          "(Lsun/jvm/hotspot/asm/InstructionVisitor;Ljava/lang/String;J)J");
+  if ((*env)->ExceptionOccurred(env)) {
+    return;
+  }
+
+  /* find Disassembler.rawPrint callback */
+  denv.raw_print = (*env)->GetMethodID(env, disclass, "rawPrint",
+                                       "(Lsun/jvm/hotspot/asm/InstructionVisitor;Ljava/lang/String;)V");
+  if ((*env)->ExceptionOccurred(env)) {
+    return;
+  }
+
+  /* decode the buffer */
+  (*(decode_func)(uintptr_t)decode_instructions_virtual)(startPc,
+                                                         startPc + end - start,
+                                                         (unsigned char*)start,
+                                                         end - start,
+                                                         &event_to_env,  (void*) &denv,
+                                                         &printf_to_env, (void*) &denv,
+                                                         options);
+
+  /* cleanup */
+  (*env)->ReleaseByteArrayElements(env, code, start, JNI_ABORT);
+  (*env)->ReleaseStringUTFChars(env, options_s, options);
+}
diff --git a/hotspot/agent/test/jdi/jstack.sh b/hotspot/agent/test/jdi/jstack.sh
index 2d23f3dd999..67f7770e092 100644
--- a/hotspot/agent/test/jdi/jstack.sh
+++ b/hotspot/agent/test/jdi/jstack.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -23,10 +23,4 @@
 #  
 #
 
-OS=`uname`
-
-if [ "$OS" != "Linux" ]; then
-   OPTIONS="-Dsun.jvm.hotspot.debugger.useProcDebugger"
-fi
-
 $JAVA_HOME/bin/java -showversion ${OPTIONS} -classpath $JAVA_HOME/lib/sa-jdi.jar sun.jvm.hotspot.tools.StackTrace $*
diff --git a/hotspot/agent/test/jdi/jstack64.sh b/hotspot/agent/test/jdi/jstack64.sh
index b62e2ec2efd..cd2a422546b 100644
--- a/hotspot/agent/test/jdi/jstack64.sh
+++ b/hotspot/agent/test/jdi/jstack64.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,4 @@
 #  
 #
 
-OPTIONS="-Dsun.jvm.hotspot.debugger.useProcDebugger"
-
 $JAVA_HOME/bin/java -d64 -showversion ${OPTIONS} -classpath $JAVA_HOME/lib/sa-jdi.jar sun.jvm.hotspot.tools.StackTrace $*
diff --git a/hotspot/agent/test/jdi/runsa.sh b/hotspot/agent/test/jdi/runsa.sh
index d9ab903c52d..aa4d7786326 100644
--- a/hotspot/agent/test/jdi/runsa.sh
+++ b/hotspot/agent/test/jdi/runsa.sh
@@ -1,6 +1,6 @@
 #!/bin/ksh
 #
-# Copyright (c) 2002, 2003, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,6 @@ if [ -z "$jdk" ] ; then
 fi
 
 set -x
-#setenv USE_LIBPROC_DEBUGGER "-Dsun.jvm.hotspot.debugger.useProcDebugger -Djava.library.path=$saprocdir"
 
 # If jjh makes this, then the classes are in .../build/agent.
 # if someone else does, they are in  .
diff --git a/hotspot/agent/test/jdi/sasanity.sh b/hotspot/agent/test/jdi/sasanity.sh
index 19580aa2049..0e155526dd8 100644
--- a/hotspot/agent/test/jdi/sasanity.sh
+++ b/hotspot/agent/test/jdi/sasanity.sh
@@ -1,6 +1,6 @@
 #!/bin/ksh
 #
-# Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -46,10 +46,6 @@ jdk=$1
 shift
 OS=`uname`
 
-if [ "$OS" != "Linux" ]; then
-   OPTIONS="-Dsun.jvm.hotspot.debugger.useProcDebugger"
-fi
-
 javacp=$jdk/lib/sa-jdi.jar:./workdir
 
 mkdir -p workdir
diff --git a/hotspot/agent/test/libproc/libproctest.sh b/hotspot/agent/test/libproc/libproctest.sh
index fc7df1b482b..9eed0a2db5e 100644
--- a/hotspot/agent/test/libproc/libproctest.sh
+++ b/hotspot/agent/test/libproc/libproctest.sh
@@ -1,7 +1,7 @@
 #!/bin/ksh
 
 #
-# Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -59,7 +59,7 @@ gcore $pid
 kill -9 $pid
 
 
-OPTIONS="-Djava.library.path=$STARTDIR/../src/os/solaris/proc/`uname -p`:$STARTDIR/../solaris/`uname -p` -Dsun.jvm.hotspot.debugger.useProcDebugger"
+OPTIONS="-Djava.library.path=$STARTDIR/../src/os/solaris/proc/`uname -p`:$STARTDIR/../solaris/`uname -p`"
 
 # run libproc client
 $SA_JAVA -showversion ${OPTIONS} -cp $STARTDIR/../../build/classes::$STARTDIR/../sa.jar:$STARTDIR LibprocClient x core.$pid
diff --git a/hotspot/agent/test/libproc/libproctest64.sh b/hotspot/agent/test/libproc/libproctest64.sh
index 5fcf709e057..05706d90791 100644
--- a/hotspot/agent/test/libproc/libproctest64.sh
+++ b/hotspot/agent/test/libproc/libproctest64.sh
@@ -1,7 +1,7 @@
 #!/bin/ksh
 
 #
-# Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@ done
 gcore $pid
 kill -9 $pid
 
-OPTIONS="-Djava.library.path=$STARTDIR/../src/os/solaris/proc/sparcv9:$STARTDIR/../solaris/sparcv9 -Dsun.jvm.hotspot.debugger.useProcDebugger"
+OPTIONS="-Djava.library.path=$STARTDIR/../src/os/solaris/proc/sparcv9:$STARTDIR/../solaris/sparcv9"
 
 # run libproc client
 $SA_JAVA -d64 -showversion ${OPTIONS} -cp $STARTDIR/../../build/classes::$STARTDIR/../sa.jar:$STARTDIR LibprocClient x core.$pid
diff --git a/hotspot/make/Makefile b/hotspot/make/Makefile
index fc536c12072..a0b7ba7687c 100644
--- a/hotspot/make/Makefile
+++ b/hotspot/make/Makefile
@@ -76,6 +76,8 @@ endif
 
 include $(GAMMADIR)/make/altsrc.make
 
+-include $(HS_ALT_MAKE)/Makefile.make
+
 ifneq ($(ALT_OUTPUTDIR),)
   ALT_OUT=ALT_OUTPUTDIR=$(ALT_OUTPUTDIR)
 else
@@ -88,16 +90,23 @@ C2_VM_TARGETS=product  fastdebug  optimized  jvmg
 KERNEL_VM_TARGETS=productkernel fastdebugkernel optimizedkernel jvmgkernel
 ZERO_VM_TARGETS=productzero fastdebugzero optimizedzero jvmgzero
 SHARK_VM_TARGETS=productshark fastdebugshark optimizedshark jvmgshark
+MINIMAL1_VM_TARGETS=productminimal1 fastdebugminimal1 jvmgminimal1
 
-COMMON_VM_PRODUCT_TARGETS=product product1 productkernel docs export_product
-COMMON_VM_FASTDEBUG_TARGETS=fastdebug fastdebug1 fastdebugkernel docs export_fastdebug
-COMMON_VM_DEBUG_TARGETS=jvmg jvmg1 jvmgkernel docs export_debug
+COMMON_VM_PRODUCT_TARGETS=product product1 docs export_product
+COMMON_VM_FASTDEBUG_TARGETS=fastdebug fastdebug1 docs export_fastdebug
+COMMON_VM_DEBUG_TARGETS=jvmg jvmg1 docs export_debug
 
 # JDK directory list
 JDK_DIRS=bin include jre lib demo
 
 all:           all_product all_fastdebug
 
+ifeq ($(JVM_VARIANT_MINIMAL1),true)
+all_product:	productminimal1
+all_fastdebug:	fastdebugminimal1
+all_debug:	jvmgminimal1
+endif
+
 ifdef BUILD_CLIENT_ONLY
 all_product:   product1 docs export_product
 all_fastdebug: fastdebug1 docs export_fastdebug
@@ -114,7 +123,7 @@ all_debug:     $(COMMON_VM_DEBUG_TARGETS)
 endif
 endif
 
-all_optimized: optimized optimized1 optimizedkernel docs export_optimized
+all_optimized: optimized optimized1 docs export_optimized
 
 allzero:           all_productzero all_fastdebugzero
 all_productzero:   productzero docs export_product
@@ -167,6 +176,11 @@ $(SHARK_VM_TARGETS):
 	$(MAKE) BUILD_FLAVOR=$(@:%shark=%) VM_TARGET=$@ \
 	  generic_buildshark $(ALT_OUT)
 
+$(MINIMAL1_VM_TARGETS):
+	$(CD) $(GAMMADIR)/make; \
+	$(MAKE) BUILD_FLAVOR=$(@:%minimal1=%) VM_TARGET=$@ \
+	  generic_buildminimal1 $(ALT_OUT)
+
 # Build compiler1 (client) rule, different for platforms
 generic_build1:
 	$(MKDIR) -p $(OUTPUTDIR)
@@ -239,6 +253,27 @@ generic_buildshark:
 		$(MAKE) -f $(ABS_OS_MAKEFILE) \
 			$(MAKE_ARGS) $(VM_TARGET) 
 
+generic_buildminimal1:
+ifeq ($(JVM_VARIANT_MINIMAL1),true)
+	$(MKDIR) -p $(OUTPUTDIR)
+  ifeq ($(ARCH_DATA_MODEL), 32)
+    ifeq ($(OSNAME),windows)
+	$(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" ;
+    else
+      ifeq ($(OSNAME),solaris)
+	$(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)" ;
+      else
+	$(CD) $(OUTPUTDIR); \
+	$(MAKE) -f $(ABS_OS_MAKEFILE) $(MAKE_ARGS) $(VM_TARGET) ;
+      endif
+    endif
+  else
+	    @$(ECHO) "No ($(VM_TARGET)) for $(OSNAME) ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)"
+  endif
+else
+	@$(ECHO) "Error: trying to build a minimal target but JVM_VARIANT_MINIMAL1 is not true."
+endif
+
 # Export file rule
 generic_export: $(EXPORT_LIST)
 export_product:
@@ -287,6 +322,8 @@ C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR)
 KERNEL_DIR=$(KERNEL_BASE_DIR)/$(VM_SUBDIR)
 ZERO_DIR=$(ZERO_BASE_DIR)/$(VM_SUBDIR)
 SHARK_DIR=$(SHARK_BASE_DIR)/$(VM_SUBDIR)
+MINIMAL1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_minimal1
+MINIMAL1_DIR=$(MINIMAL1_BASE_DIR)/$(VM_SUBDIR)
 
 ifeq ($(JVM_VARIANT_SERVER), true)
     MISC_DIR=$(C2_DIR)
@@ -308,6 +345,10 @@ ifeq ($(JVM_VARIANT_ZERO), true)
     MISC_DIR=$(ZERO_DIR)
     GEN_DIR=$(ZERO_BASE_DIR)/generated
 endif
+ifeq ($(JVM_VARIANT_MINIMAL1), true)
+    MISC_DIR=$(MINIMAL1_DIR)
+    GEN_DIR=$(MINIMAL1_BASE_DIR)/generated
+endif
 
 # Bin files (windows)
 ifeq ($(OSNAME),windows)
@@ -357,6 +398,16 @@ $(EXPORT_KERNEL_DIR)/%.map:  $(KERNEL_DIR)/%.map
 	$(install-file)
 endif
 
+# Minimal JVM files always come from minimal area
+$(EXPORT_MINIMAL_DIR)/%.diz:  $(MINIMAL1_DIR)/%.diz
+	$(install-file)
+$(EXPORT_MINIMAL_DIR)/%.dll:  $(MINIMAL1_DIR)/%.dll
+	$(install-file)
+$(EXPORT_MINIMAL_DIR)/%.pdb:  $(MINIMAL1_DIR)/%.pdb
+	$(install-file)
+$(EXPORT_MINIMAL_DIR)/%.map:  $(MINIMAL1_DIR)/%.map
+	$(install-file)
+
 # Shared Library
 ifneq ($(OSNAME),windows)
     ifeq ($(JVM_VARIANT_SERVER), true)
@@ -411,6 +462,26 @@ ifneq ($(OSNAME),windows)
         $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX):       $(ZERO_DIR)/%.$(LIBRARY_SUFFIX)
 		$(install-file)
     endif
+    ifeq ($(JVM_VARIANT_MINIMAL1), true)
+        $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX):	$(MINIMAL1_DIR)/%.$(LIBRARY_SUFFIX)
+		$(install-file)
+        $(EXPORT_MINIMAL_DIR)/%.$(LIBRARY_SUFFIX):	$(MINIMAL1_DIR)/%.$(LIBRARY_SUFFIX)
+		$(install-file)
+        $(EXPORT_MINIMAL_DIR)/64/%.$(LIBRARY_SUFFIX):	$(MINIMAL1_DIR)/%.$(LIBRARY_SUFFIX)
+		$(install-file)
+        $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo:		$(MINIMAL1_DIR)/%.debuginfo
+		$(install-file)
+        $(EXPORT_MINIMAL_DIR)/%.debuginfo:		$(MINIMAL1_DIR)/%.debuginfo
+		$(install-file)
+        $(EXPORT_MINIMAL_DIR)/64/%.debuginfo:		$(MINIMAL1_DIR)/%.debuginfo
+		$(install-file)
+        $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz:		$(MINIMAL1_DIR)/%.diz
+		$(install-file)
+        $(EXPORT_MINIMAL_DIR)/%.diz:			$(MINIMAL1_DIR)/%.diz
+		$(install-file)
+        $(EXPORT_MINIMAL_DIR)/64/%.diz:			$(MINIMAL1_DIR)/%.diz
+		$(install-file)
+    endif
 endif
 
 # Jar file (sa-jdi.jar)
@@ -451,7 +522,7 @@ $(EXPORT_DOCS_DIR)/platform/jvmti/%: $(DOCS_DIR)/%
 	$(install-file)
 
 # Xusage file
-$(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt: $(XUSAGE)
+$(EXPORT_SERVER_DIR)/Xusage.txt $(EXPORT_CLIENT_DIR)/Xusage.txt $(EXPORT_KERNEL_DIR)/Xusage.txt $(EXPORT_MINIMAL_DIR)/Xusage.txt: $(XUSAGE)
 	$(prep-target)
 	$(RM) $@.temp
 	$(SED) 's/\(separated by \)[;:]/\1$(PATH_SEP)/g' $< > $@.temp
@@ -467,6 +538,7 @@ clean_build:
 	$(RM) -r $(KERNEL_DIR)
 	$(RM) -r $(ZERO_DIR)
 	$(RM) -r $(SHARK_DIR)
+	$(RM) -r $(MINIMAL1_DIR)
 clean_export:
 	$(RM) -r $(EXPORT_PATH)
 clean_jdk:
@@ -574,10 +646,11 @@ target_help:
 	@$(ECHO) "create_jdk:       Create JDK image, export all files into it"
 	@$(ECHO) "update_jdk:       Update JDK image with fresh exported files"
 	@$(ECHO) " "
-	@$(ECHO) "Others targets are:"
+	@$(ECHO) "Other targets are:"
 	@$(ECHO) "   $(C1_VM_TARGETS)"
 	@$(ECHO) "   $(C2_VM_TARGETS)"
 	@$(ECHO) "   $(KERNEL_VM_TARGETS)"
+	@$(ECHO) "   $(MINIMAL1_VM_TARGETS)"
 
 # Variable help (only common ones used by this workspace)
 variable_help: variable_help_intro variable_list variable_help_end
@@ -672,9 +745,10 @@ endif
 include $(GAMMADIR)/make/jprt.gmk
 
 .PHONY: all world clobber clean help $(C1_VM_TARGETS) $(C2_VM_TARGETS) \
-        $(KERNEL_VM_TARGETS) \
-	generic_build1 generic_build2 generic_buildkernel generic_export \
+        $(KERNEL_VM_TARGETS) $(MINIMAL1_VM_TARGETS) \
+	generic_build1 generic_build2 generic_buildkernel generic_buildminimal1 generic_export \
 	export_product export_fastdebug export_debug export_optimized \
 	export_jdk_product export_jdk_fastdebug export_jdk_debug \
 	create_jdk copy_jdk update_jdk test_jdk \
-	copy_product_jdk copy_fastdebug_jdk copy_debug_jdk 
+	copy_product_jdk copy_fastdebug_jdk copy_debug_jdk  \
+	$(HS_ALT_MAKE)/Makefile.make
diff --git a/hotspot/make/bsd/Makefile b/hotspot/make/bsd/Makefile
index 518c54fd31b..7c047e99070 100644
--- a/hotspot/make/bsd/Makefile
+++ b/hotspot/make/bsd/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -175,6 +175,10 @@ VARIANTARCH = $(subst i386,i486,$(ZERO_LIBARCH))
 #       profiledshark   shark           <os>_<arch>_shark/profiled
 #       productshark    shark           <os>_<arch>_shark/product
 #
+#       fastdebugminimal1 minimal1      <os>_<arch>_minimal1/fastdebug
+#       jvmgminimal1      minimal1      <os>_<arch>_minimal1/jvmg
+#       productminimal1   minimal1      <os>_<arch>_minimal1/product
+#
 # What you get with each target:
 #
 # debug*     - "thin" libjvm_g - debug info linked into the gamma_g launcher
@@ -199,6 +203,7 @@ SUBDIRS_TIERED    = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
 SUBDIRS_CORE      = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
 SUBDIRS_ZERO      = $(addprefix $(OSNAME)_$(VARIANTARCH)_zero/,$(TARGETS))
 SUBDIRS_SHARK     = $(addprefix $(OSNAME)_$(VARIANTARCH)_shark/,$(TARGETS))
+SUBDIRS_MINIMAL1  = $(addprefix $(OSNAME)_$(BUILDARCH)_minimal1/,$(TARGETS))
 
 TARGETS_C2        = $(TARGETS)
 TARGETS_C1        = $(addsuffix 1,$(TARGETS))
@@ -206,6 +211,7 @@ TARGETS_TIERED    = $(addsuffix tiered,$(TARGETS))
 TARGETS_CORE      = $(addsuffix core,$(TARGETS))
 TARGETS_ZERO      = $(addsuffix zero,$(TARGETS))
 TARGETS_SHARK     = $(addsuffix shark,$(TARGETS))
+TARGETS_MINIMAL1  = $(addsuffix minimal1,$(TARGETS))
 
 BUILDTREE_MAKE    = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
 BUILDTREE_VARS    = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) LIBRARY_SUFFIX=$(LIBRARY_SUFFIX)
@@ -223,6 +229,7 @@ all:
 	@echo "  $(TARGETS_CORE)"
 	@echo "  $(TARGETS_ZERO)"
 	@echo "  $(TARGETS_SHARK)"
+	@echo "  $(TARGETS_MINIMAL1)"
 
 checks: check_os_version check_j2se_version
 
@@ -281,6 +288,10 @@ $(SUBDIRS_SHARK): $(BUILDTREE_MAKE) platform_zero
 	$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
 	$(BUILDTREE) VARIANT=shark VARIANTARCH=$(VARIANTARCH)
 
+$(SUBDIRS_MINIMAL1): $(BUILDTREE_MAKE)
+	$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
+	$(BUILDTREE) VARIANT=minimal1
+
 platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in
 	$(SED) 's/@ZERO_ARCHDEF@/$(ZERO_ARCHDEF)/g;s/@ZERO_LIBARCH@/$(ZERO_LIBARCH)/g;' < $< > $@
 
@@ -288,52 +299,74 @@ platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in
 
 $(TARGETS_C2):  $(SUBDIRS_C2)
 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install
 endif
 
 $(TARGETS_TIERED):  $(SUBDIRS_TIERED)
 	cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) install
 endif
 
 $(TARGETS_C1):  $(SUBDIRS_C1)
 	cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install
 endif
 
 $(TARGETS_CORE):  $(SUBDIRS_CORE)
 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
 endif
 
 $(TARGETS_ZERO):  $(SUBDIRS_ZERO)
 	cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS) install
 endif
 
 $(TARGETS_SHARK):  $(SUBDIRS_SHARK)
 	cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install
 endif
 
+$(TARGETS_MINIMAL1):  $(SUBDIRS_MINIMAL1)
+	cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
+	cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && ./test_gamma
+endif
+ifdef INSTALL
+	cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS) install
+endif
+
 # Just build the tree, and nothing else:
 tree:      $(SUBDIRS_C2)
 tree1:     $(SUBDIRS_C1)
 treecore:  $(SUBDIRS_CORE)
 treezero:  $(SUBDIRS_ZERO)
 treeshark: $(SUBDIRS_SHARK)
+treeminimal1: $(SUBDIRS_MINIMAL1)
 
 # Doc target.  This is the same for all build options.
 #     Hence create a docs directory beside ...$(ARCH)_[...]
@@ -355,17 +388,23 @@ shark: jvmgshark productshark
 clean_docs:
 	rm -rf $(SUBDIR_DOCS)
 
-clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark:
+clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark clean_minimal1:
 	rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@)
 
-clean:  clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_docs
+clean:  clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_minimal1 clean_docs
 
 include $(GAMMADIR)/make/cscope.make
 
+#
+# Include alternate Makefile if it exists.
+#
+-include $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make
+
 #-------------------------------------------------------------------------------
 
-.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK)
+.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) $(TARGETS_MINIMAL1)
 .PHONY: tree tree1 treecore treezero treeshark
 .PHONY: all compiler1 compiler2 core zero shark
 .PHONY: clean clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark docs clean_docs
 .PHONY: checks check_os_version check_j2se_version
+.PHONY: $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make
diff --git a/hotspot/make/bsd/makefiles/adlc.make b/hotspot/make/bsd/makefiles/adlc.make
index 2f161cb3fce..ceaa893ec8d 100644
--- a/hotspot/make/bsd/makefiles/adlc.make
+++ b/hotspot/make/bsd/makefiles/adlc.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/bsd/makefiles/buildtree.make b/hotspot/make/bsd/makefiles/buildtree.make
index 5d218ff48f9..800b68d225e 100644
--- a/hotspot/make/bsd/makefiles/buildtree.make
+++ b/hotspot/make/bsd/makefiles/buildtree.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -60,6 +60,7 @@ OS_VENDOR:=$(shell uname -s)
 
 -include $(SPEC)
 include $(GAMMADIR)/make/scm.make
+include $(GAMMADIR)/make/defs.make
 include $(GAMMADIR)/make/altsrc.make
 
 
@@ -163,6 +164,13 @@ ifndef HOTSPOT_VM_DISTRO
   endif
 endif
 
+# if hotspot-only build and/or OPENJDK isn't passed down, need to set OPENJDK
+ifndef OPENJDK
+  ifneq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true)
+    OPENJDK=true
+  endif
+endif
+
 BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION=  JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
 
 BUILDTREE	= \
@@ -195,6 +203,8 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
 	sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \
 	echo; \
 	echo "GAMMADIR = $(GAMMADIR)"; \
+	echo "HS_ALT_MAKE = $(HS_ALT_MAKE)"; \
+	echo "OSNAME = $(OSNAME)"; \
 	echo "SYSDEFS = \$$(Platform_sysdefs)"; \
 	echo "SRCARCH = $(SRCARCH)"; \
 	echo "BUILDARCH = $(BUILDARCH)"; \
@@ -205,6 +215,7 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
 	echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
+	echo "OPENJDK = $(OPENJDK)"; \
 	echo; \
 	echo "# Used for platform dispatching"; \
 	echo "TARGET_DEFINES  = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \
@@ -251,6 +262,7 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
 	[ -n "$(SPEC)" ] && \
 	    echo "include $(SPEC)"; \
 	echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \
+	echo "include \$$(GAMMADIR)/make/excludeSrc.make"; \
 	echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \
 	) > $@
 
diff --git a/hotspot/make/bsd/makefiles/defs.make b/hotspot/make/bsd/makefiles/defs.make
index 1183981390f..824abe3aa0c 100644
--- a/hotspot/make/bsd/makefiles/defs.make
+++ b/hotspot/make/bsd/makefiles/defs.make
@@ -155,6 +155,7 @@ EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
 EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
 EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client
+EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal
 
 EXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/wb.jar
 
@@ -168,6 +169,19 @@ ifeq ($(JVM_VARIANT_CLIENT),true)
   EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
 endif
 
+ifeq ($(JVM_VARIANT_MINIMAL1),true)
+  EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/Xusage.txt
+  EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX)
+
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    ifeq ($(ZIP_DEBUGINFO_FILES),1)
+	EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.diz
+    else
+	EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.debuginfo
+    endif
+  endif 
+endif
+
 # Serviceability Binaries
 # No SA Support for PPC, IA64, ARM or zero
 ADD_SA_BINARIES/x86   = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
diff --git a/hotspot/make/bsd/makefiles/dtrace.make b/hotspot/make/bsd/makefiles/dtrace.make
index 1f5d95627e9..98ce02f7e29 100644
--- a/hotspot/make/bsd/makefiles/dtrace.make
+++ b/hotspot/make/bsd/makefiles/dtrace.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -114,21 +114,21 @@ $(GENOFFS): $(DTRACE_SRCDIR)/$(GENOFFS)Main.c lib$(GENOFFS).dylib
 
 # $@.tmp is created first to avoid an empty $(JVMOFFS).h if an error occurs.
 $(JVMOFFS).h: $(GENOFFS)
-	$(QUIETLY) DYLD_LIBRARY_PATH=. ./$(GENOFFS) -header > $@.tmp; touch $@; \
+	$(QUIETLY) DYLD_LIBRARY_PATH=.:$(DYLD_LIBRARY_PATH) ./$(GENOFFS) -header > $@.tmp; touch $@; \
 	if [ `diff $@.tmp $@ > /dev/null 2>&1; echo $$?` -ne 0 ] ; \
 	then rm -f $@; mv $@.tmp $@; \
 	else rm -f $@.tmp; \
 	fi
 
 $(JVMOFFS)Index.h: $(GENOFFS)
-	$(QUIETLY) DYLD_LIBRARY_PATH=. ./$(GENOFFS) -index > $@.tmp; touch $@; \
+	$(QUIETLY) DYLD_LIBRARY_PATH=.:$(DYLD_LIBRARY_PATH) ./$(GENOFFS) -index > $@.tmp; touch $@; \
 	if [ `diff $@.tmp $@ > /dev/null 2>&1; echo $$?` -ne 0 ] ; \
 	then rm -f $@; mv $@.tmp $@; \
 	else rm -f $@.tmp; \
 	fi
 
 $(JVMOFFS).cpp: $(GENOFFS) $(JVMOFFS).h $(JVMOFFS)Index.h
-	$(QUIETLY) DYLD_LIBRARY_PATH=. ./$(GENOFFS) -table > $@.tmp; touch $@; \
+	$(QUIETLY) DYLD_LIBRARY_PATH=.:$(DYLD_LIBRARY_PATH) ./$(GENOFFS) -table > $@.tmp; touch $@; \
 	if [ `diff $@.tmp $@ > /dev/null 2>&1; echo $$?` -ne 0 ] ; \
 	then rm -f $@; mv $@.tmp $@; \
 	else rm -f $@.tmp; \
diff --git a/hotspot/make/bsd/makefiles/gcc.make b/hotspot/make/bsd/makefiles/gcc.make
index 249628ee7fa..f9451d84f77 100644
--- a/hotspot/make/bsd/makefiles/gcc.make
+++ b/hotspot/make/bsd/makefiles/gcc.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -151,11 +151,6 @@ ifdef CC_INTERP
   CFLAGS += -DCC_INTERP
 endif
 
-# Build for embedded targets
-ifdef JAVASE_EMBEDDED
-  CFLAGS += -DJAVASE_EMBEDDED
-endif
-
 # Keep temporary files (.ii, .s)
 ifdef NEED_ASM
   CFLAGS += -save-temps
@@ -186,20 +181,32 @@ ifeq ($(OS_VENDOR), Darwin)
   CFLAGS_WARN/os_bsd.o = $(CFLAGS_WARN/DEFAULT) -Wno-deprecated-declarations
 endif
 
+OPT_CFLAGS/SIZE=-Os
+OPT_CFLAGS/SPEED=-O3
+
+# Hotspot uses very unstrict aliasing turn this optimization off
+# This option is added to CFLAGS rather than OPT_CFLAGS
+# so that OPT_CFLAGS overrides get this option too.
+CFLAGS += -fno-strict-aliasing
 
 # The flags to use for an Optimized g++ build
 ifeq ($(OS_VENDOR), Darwin)
   # use -Os by default, unless -O3 can be proved to be worth the cost, as per policy
   # <http://wikis.sun.com/display/OpenJDK/Mac+OS+X+Port+Compilers>
-  OPT_CFLAGS += -Os
+  OPT_CFLAGS_DEFAULT ?= SIZE
 else
-  OPT_CFLAGS += -O3
+  OPT_CFLAGS_DEFAULT ?= SPEED
 endif
 
-# Hotspot uses very unstrict aliasing turn this optimization off
-OPT_CFLAGS += -fno-strict-aliasing
+ifdef OPT_CFLAGS
+  ifneq ("$(origin OPT_CFLAGS)", "command line")
+    $(error " Use OPT_EXTRAS instead of OPT_CFLAGS to add extra flags to OPT_CFLAGS.")
+  endif
+endif
 
-# The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp 
+OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS)
+
+# The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp
 # if we use expensive-optimizations
 ifeq ($(BUILDARCH), ia64)
 OPT_CFLAGS += -fno-expensive-optimizations
diff --git a/hotspot/make/bsd/makefiles/ia64.make b/hotspot/make/bsd/makefiles/ia64.make
index 0fa65f270a8..8535807a787 100644
--- a/hotspot/make/bsd/makefiles/ia64.make
+++ b/hotspot/make/bsd/makefiles/ia64.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,6 @@
 #
 # IA64 only uses c++ based interpreter
 CFLAGS += -DCC_INTERP -D_LP64=1 -DVM_LITTLE_ENDIAN
-# Hotspot uses very unstrict aliasing turn this optimization off
-OPT_CFLAGS += -fno-strict-aliasing
 ifeq ($(VERSION),debug)
 ASM_FLAGS= -DDEBUG
 else
diff --git a/hotspot/make/bsd/makefiles/jvmg.make b/hotspot/make/bsd/makefiles/jvmg.make
index b5be2967edc..3f1061a2830 100644
--- a/hotspot/make/bsd/makefiles/jvmg.make
+++ b/hotspot/make/bsd/makefiles/jvmg.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/bsd/makefiles/launcher.make b/hotspot/make/bsd/makefiles/launcher.make
index c78d5516902..588bf9aaebf 100644
--- a/hotspot/make/bsd/makefiles/launcher.make
+++ b/hotspot/make/bsd/makefiles/launcher.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -19,7 +19,7 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
-#  
+#
 #
 
 # Rules to build gamma launcher, used by vm.make
@@ -41,6 +41,8 @@ LAUNCHERFLAGS := $(ARCHFLAG) \
                 -DLAUNCHER_TYPE=\"gamma\" \
                 -DLINK_INTO_$(LINK_INTO) \
                 $(TARGET_DEFINES)
+# Give the launcher task_for_pid() privileges so that it can be used to run JStack, JInfo, et al.
+LFLAGS_LAUNCHER += -sectcreate __TEXT __info_plist $(GAMMADIR)/src/os/bsd/launcher/Info-privileged.plist
 
 ifeq ($(LINK_INTO),AOUT)
   LAUNCHER.o                 = launcher.o $(JVM_OBJ_FILES)
@@ -50,22 +52,22 @@ ifeq ($(LINK_INTO),AOUT)
   LIBS_LAUNCHER             += $(STATIC_STDCXX) $(LIBS)
 else
   LAUNCHER.o                 = launcher.o
-  LFLAGS_LAUNCHER           += -L`pwd` 
+  LFLAGS_LAUNCHER           += -L`pwd`
 
   # The gamma launcher runs the JDK from $JAVA_HOME, overriding the JVM with a
-  # freshly built JVM at ./libjvm.{so|dylib}.  This is accomplished by setting 
-  # the library searchpath using ({DY}LD_LIBRARY_PATH) to find the local JVM 
+  # freshly built JVM at ./libjvm.{so|dylib}.  This is accomplished by setting
+  # the library searchpath using ({DY}LD_LIBRARY_PATH) to find the local JVM
   # first.  Gamma dlopen()s libjava from $JAVA_HOME/jre/lib{/$arch}, which is
   # statically linked with CoreFoundation framework libs. Unfortunately, gamma's
-  # unique searchpath results in some unresolved symbols in the framework 
+  # unique searchpath results in some unresolved symbols in the framework
   # libraries, because JDK libraries are inadvertently discovered first on the
   # searchpath, e.g. libjpeg.  On Mac OS X, filenames are case *insensitive*.
   # So, the actual filename collision is libjpeg.dylib and libJPEG.dylib.
-  # To resolve this, gamma needs to also statically link with the CoreFoundation 
+  # To resolve this, gamma needs to also statically link with the CoreFoundation
   # framework libraries.
 
   ifeq ($(OS_VENDOR),Darwin)
-    LFLAGS_LAUNCHER         += -framework CoreFoundation 
+    LFLAGS_LAUNCHER         += -framework CoreFoundation
   endif
 
   LIBS_LAUNCHER             += -l$(JVM) $(LIBS)
@@ -99,8 +101,11 @@ $(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c
 $(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
 	$(QUIETLY) echo Linking launcher...
 	$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
-	$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER)
+	$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(sort $(OBJS)) $(LIBS_LAUNCHER)
 	$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
+	# Sign the launcher with the development certificate (if present) so that it can be used
+	# to run JStack, JInfo, et al.
+	$(QUIETLY) -codesign -s openjdk_codesign $@
 
 $(LAUNCHER): $(LAUNCHER_SCRIPT)
 
diff --git a/jdk/src/share/test/pack200/pack.conf b/hotspot/make/bsd/makefiles/minimal1.make
similarity index 54%
rename from jdk/src/share/test/pack200/pack.conf
rename to hotspot/make/bsd/makefiles/minimal1.make
index 628ad038b1f..9494f78bcdd 100644
--- a/jdk/src/share/test/pack200/pack.conf
+++ b/hotspot/make/bsd/makefiles/minimal1.make
@@ -1,11 +1,10 @@
-# Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+#
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.  Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
+# published by the Free Software Foundation.
 #
 # This code is distributed in the hope that it will be useful, but WITHOUT
 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -20,12 +19,28 @@
 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 # or visit www.oracle.com if you need additional information or have any
 # questions.
+#  
 #
-#
-# The config file for the packer, define all the test properties here.
-pack.effort=1
-pack.unknown.attribute=error
-pack.deflate.hint=false
-pack.keep.class.order=true
-pack.verbose=1
 
+TYPE=MINIMAL1
+
+INCLUDE_JVMTI ?= false
+INCLUDE_FPROF ?= false
+INCLUDE_VM_STRUCTS ?= false
+INCLUDE_JNI_CHECK ?= false
+INCLUDE_SERVICES ?= false
+INCLUDE_MANAGEMENT ?= false
+INCLUDE_ALTERNATE_GCS ?= false
+INCLUDE_NMT ?= false
+INCLUDE_CDS ?= false
+
+CXXFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\"
+CFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\"
+
+Src_Dirs/MINIMAL1 = $(CORE_PATHS) $(COMPILER1_PATHS)
+
+Src_Files_EXCLUDE/MINIMAL1 += $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
+
+-include $(HS_ALT_MAKE)/$(OSNAME)/makefiles/minimal1.make
+
+.PHONY: $(HS_ALT_MAKE)/$(OSNAME)/makefiles/minimal1.make
diff --git a/hotspot/make/bsd/makefiles/product.make b/hotspot/make/bsd/makefiles/product.make
index 6edcef5f4ba..d27c0a6011c 100644
--- a/hotspot/make/bsd/makefiles/product.make
+++ b/hotspot/make/bsd/makefiles/product.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/bsd/makefiles/rules.make b/hotspot/make/bsd/makefiles/rules.make
index a1e4c34b286..d40b88d5ed0 100644
--- a/hotspot/make/bsd/makefiles/rules.make
+++ b/hotspot/make/bsd/makefiles/rules.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/bsd/makefiles/sa.make b/hotspot/make/bsd/makefiles/sa.make
index b7bb477ca30..83b9b7954be 100644
--- a/hotspot/make/bsd/makefiles/sa.make
+++ b/hotspot/make/bsd/makefiles/sa.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -120,9 +120,9 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES)
 	$(QUIETLY) $(REMOTE) $(RUN.JAR) cf $@ -C $(SA_CLASSDIR)/ .
 	$(QUIETLY) $(REMOTE) $(RUN.JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
 	$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.x86.X86ThreadContext
-	$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.ia64.IA64ThreadContext
 	$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext
 	$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.sparc.SPARCThreadContext
+	$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.asm.Disassembler
 
 clean:
 	rm -rf $(SA_CLASSDIR)
diff --git a/hotspot/make/bsd/makefiles/saproc.make b/hotspot/make/bsd/makefiles/saproc.make
index 458cd3a0c50..24109f6d50f 100644
--- a/hotspot/make/bsd/makefiles/saproc.make
+++ b/hotspot/make/bsd/makefiles/saproc.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -40,12 +40,13 @@ AGENT_DIR = $(GAMMADIR)/agent
 
 SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family)
 
-NON_STUB_SASRCFILES = $(SASRCDIR)/salibelf.c          \
-                      $(SASRCDIR)/symtab.c            \
-                      $(SASRCDIR)/libproc_impl.c      \
-                      $(SASRCDIR)/ps_proc.c           \
-                      $(SASRCDIR)/ps_core.c           \
-                      $(SASRCDIR)/BsdDebuggerLocal.c
+NON_STUB_SASRCFILES = $(SASRCDIR)/salibelf.c                 \
+                      $(SASRCDIR)/symtab.c                   \
+                      $(SASRCDIR)/libproc_impl.c             \
+                      $(SASRCDIR)/ps_proc.c                  \
+                      $(SASRCDIR)/ps_core.c                  \
+                      $(SASRCDIR)/BsdDebuggerLocal.c         \
+                      $(AGENT_DIR)/src/share/native/sadis.c
 
 ifeq ($(OS_VENDOR), FreeBSD)
   SASRCFILES = $(NON_STUB_SASRCFILES)
diff --git a/hotspot/make/bsd/makefiles/sparcWorks.make b/hotspot/make/bsd/makefiles/sparcWorks.make
index c87f5044096..e39116023c5 100644
--- a/hotspot/make/bsd/makefiles/sparcWorks.make
+++ b/hotspot/make/bsd/makefiles/sparcWorks.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/bsd/makefiles/top.make b/hotspot/make/bsd/makefiles/top.make
index 934e5d1f470..647e132b076 100644
--- a/hotspot/make/bsd/makefiles/top.make
+++ b/hotspot/make/bsd/makefiles/top.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/bsd/makefiles/vm.make b/hotspot/make/bsd/makefiles/vm.make
index f423408acd9..e60535821b6 100644
--- a/hotspot/make/bsd/makefiles/vm.make
+++ b/hotspot/make/bsd/makefiles/vm.make
@@ -190,7 +190,7 @@ SHARK_SPECIFIC_FILES     := shark
 ZERO_SPECIFIC_FILES      := zero
 
 # Always exclude these.
-Src_Files_EXCLUDE := jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp
+Src_Files_EXCLUDE += jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp
 
 # Exclude per type.
 Src_Files_EXCLUDE/CORE      := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
@@ -311,7 +311,7 @@ $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
 	    echo Linking vm...;                                         \
 	    $(LINK_LIB.CXX/PRE_HOOK)                                     \
 	    $(LINK_VM) $(LD_SCRIPT_FLAG)                                \
-		       $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM);       \
+		       $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM); \
 	    $(LINK_LIB.CXX/POST_HOOK)                                    \
 	    rm -f $@.1; ln -s $@ $@.1;                                  \
 	    [ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \
diff --git a/hotspot/make/defs.make b/hotspot/make/defs.make
index 63c6be7e274..3d86ed70e6c 100644
--- a/hotspot/make/defs.make
+++ b/hotspot/make/defs.make
@@ -22,6 +22,27 @@
 #  
 #
 
+# The common definitions for hotspot builds.
+
+# Optionally include SPEC file generated by configure.
+ifneq ($(SPEC),)
+  include $(SPEC)
+endif
+
+# Directory paths and user name
+# Unless GAMMADIR is set on the command line, search upward from
+# the current directory for a parent directory containing "src/share/vm".
+# If that fails, look for $GAMMADIR in the environment.
+# When the tree of subdirs is built, this setting is stored in each flags.make.
+GAMMADIR := $(shell until ([ -d dev ]&&echo $${GAMMADIR:-/GAMMADIR/}) || ([ -d src/share/vm ]&&pwd); do cd ..; done)
+HS_SRC_DIR=$(GAMMADIR)/src
+HS_MAKE_DIR=$(GAMMADIR)/make
+HS_BUILD_DIR=$(GAMMADIR)/build
+
+ifeq ($(USER),)
+  USER=$(USERNAME)
+endif
+
 ifeq ($(HS_ALT_MAKE),)
   ifneq ($(OPENJDK),true)
     HS_ALT_MAKE=$(GAMMADIR)/make/closed
@@ -30,12 +51,10 @@ ifeq ($(HS_ALT_MAKE),)
   endif
 endif
 
-# The common definitions for hotspot builds.
-
-# Optionally include SPEC file generated by configure.
-ifneq ($(SPEC),)
-  include $(SPEC)
-endif
+#
+# Include alternate defs.make if it exists
+#
+-include $(HS_ALT_MAKE)/defs.make
 
 # Default to verbose build logs (show all compile lines):
 MAKE_VERBOSE=y
@@ -84,20 +103,6 @@ ifeq ($(JVM_VARIANTS),)
   endif
 endif
 
-# Directory paths and user name
-# Unless GAMMADIR is set on the command line, search upward from
-# the current directory for a parent directory containing "src/share/vm".
-# If that fails, look for $GAMMADIR in the environment.
-# When the tree of subdirs is built, this setting is stored in each flags.make.
-GAMMADIR := $(shell until ([ -d dev ]&&echo $${GAMMADIR:-/GAMMADIR/}) || ([ -d src/share/vm ]&&pwd); do cd ..; done)
-HS_SRC_DIR=$(GAMMADIR)/src
-HS_MAKE_DIR=$(GAMMADIR)/make
-HS_BUILD_DIR=$(GAMMADIR)/build
-
-ifeq ($(USER),)
-  USER=$(USERNAME)
-endif
-
 # hotspot version definitions
 include $(GAMMADIR)/make/hotspot_version
 
@@ -332,7 +337,11 @@ EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jni.h
 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/$(JDK_INCLUDE_SUBDIR)/jni_md.h
 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jmm.h
 
+# By default, run Queens test after building
+TEST_IN_BUILD ?= true
+
 ifndef JAVASE_EMBEDDED
 EXPORT_LIST += $(EXPORT_INCLUDE_DIR)/jfr.h
 endif
 
+.PHONY: $(HS_ALT_MAKE)/defs.make
diff --git a/hotspot/make/excludeSrc.make b/hotspot/make/excludeSrc.make
new file mode 100644
index 00000000000..00a1e3a706e
--- /dev/null
+++ b/hotspot/make/excludeSrc.make
@@ -0,0 +1,110 @@
+#
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#  
+#
+ifeq ($(INCLUDE_JVMTI), false)
+      CXXFLAGS += -DINCLUDE_JVMTI=0
+      CFLAGS += -DINCLUDE_JVMTI=0
+
+      Src_Files_EXCLUDE += jvmtiGetLoadedClasses.cpp forte.cpp jvmtiThreadState.cpp jvmtiExtensions.cpp \
+	jvmtiImpl.cpp jvmtiManageCapabilities.cpp jvmtiRawMonitor.cpp jvmtiUtil.cpp jvmtiTrace.cpp \
+	jvmtiCodeBlobEvents.cpp jvmtiEnv.cpp jvmtiRedefineClasses.cpp jvmtiEnvBase.cpp jvmtiEnvThreadState.cpp \
+	jvmtiTagMap.cpp jvmtiEventController.cpp evmCompat.cpp jvmtiEnter.xsl jvmtiExport.cpp
+endif
+
+ifeq ($(INCLUDE_FPROF), false)
+      CXXFLAGS += -DINCLUDE_FPROF=0
+      CFLAGS += -DINCLUDE_FPROF=0
+
+      Src_Files_EXCLUDE += fprofiler.cpp
+endif
+
+ifeq ($(INCLUDE_VM_STRUCTS), false)
+      CXXFLAGS += -DINCLUDE_VM_STRUCTS=0
+      CFLAGS += -DINCLUDE_VM_STRUCTS=0
+
+      Src_Files_EXCLUDE += vmStructs.cpp
+endif
+
+ifeq ($(INCLUDE_JNI_CHECK), false)
+      CXXFLAGS += -DINCLUDE_JNI_CHECK=0
+      CFLAGS += -DINCLUDE_JNI_CHECK=0
+
+      Src_Files_EXCLUDE += jniCheck.cpp
+endif
+
+ifeq ($(INCLUDE_SERVICES), false)
+      CXXFLAGS += -DINCLUDE_SERVICES=0
+      CFLAGS += -DINCLUDE_SERVICES=0
+
+      Src_Files_EXCLUDE += heapDumper.cpp heapInspection.cpp \
+	attachListener_linux.cpp attachListener.cpp
+endif
+
+ifeq ($(INCLUDE_MANAGEMENT), false)
+      CXXFLAGS += -DINCLUDE_MANAGEMENT=0
+      CFLAGS += -DINCLUDE_MANAGEMENT=0
+endif
+
+ifeq ($(INCLUDE_CDS), false)
+      CXXFLAGS += -DINCLUDE_CDS=0
+      CFLAGS += -DINCLUDE_CDS=0
+
+      Src_Files_EXCLUDE += metaspaceShared.cpp
+endif
+
+ifeq ($(INCLUDE_ALTERNATE_GCS), false)
+      CXXFLAGS += -DINCLUDE_ALTERNATE_GCS=0
+      CFLAGS += -DINCLUDE_ALTERNATE_GCS=0
+
+      CXXFLAGS += -DSERIALGC
+      CFLAGS += -DSERIALGC
+      Src_Files_EXCLUDE += \
+	binaryTreeDictionary.cpp cmsAdaptiveSizePolicy.cpp cmsCollectorPolicy.cpp \
+	cmsGCAdaptivePolicyCounters.cpp cmsLockVerifier.cpp cmsPermGen.cpp compactibleFreeListSpace.cpp \
+	concurrentMarkSweepGeneration.cpp concurrentMarkSweepThread.cpp freeBlockDictionary.cpp \
+	freeChunk.cpp freeList.cpp promotionInfo.cpp vmCMSOperations.cpp collectionSetChooser.cpp \
+	concurrentG1Refine.cpp concurrentG1RefineThread.cpp concurrentMark.cpp concurrentMarkThread.cpp \
+	dirtyCardQueue.cpp g1AllocRegion.cpp g1BlockOffsetTable.cpp g1CollectedHeap.cpp g1GCPhaseTimes.cpp \
+	g1CollectorPolicy.cpp g1ErgoVerbose.cpp g1_globals.cpp g1HRPrinter.cpp g1MarkSweep.cpp \
+	g1MMUTracker.cpp g1MonitoringSupport.cpp g1RemSet.cpp g1SATBCardTableModRefBS.cpp heapRegion.cpp \
+	heapRegionRemSet.cpp heapRegionSeq.cpp heapRegionSet.cpp heapRegionSets.cpp ptrQueue.cpp \
+	satbQueue.cpp sparsePRT.cpp survRateGroup.cpp vm_operations_g1.cpp adjoiningGenerations.cpp \
+	adjoiningVirtualSpaces.cpp asPSOldGen.cpp asPSYoungGen.cpp cardTableExtension.cpp \
+	gcTaskManager.cpp gcTaskThread.cpp objectStartArray.cpp parallelScavengeHeap.cpp parMarkBitMap.cpp \
+	pcTasks.cpp psAdaptiveSizePolicy.cpp psCompactionManager.cpp psGCAdaptivePolicyCounters.cpp \
+	psGenerationCounters.cpp psMarkSweep.cpp psMarkSweepDecorator.cpp psOldGen.cpp psParallelCompact.cpp \
+	psPermGen.cpp psPromotionLAB.cpp psPromotionManager.cpp psScavenge.cpp psTasks.cpp psVirtualspace.cpp \
+	psYoungGen.cpp vmPSOperations.cpp asParNewGeneration.cpp parCardTableModRefBS.cpp \
+	parGCAllocBuffer.cpp parNewGeneration.cpp mutableSpace.cpp gSpaceCounters.cpp allocationStats.cpp \
+	spaceCounters.cpp gcAdaptivePolicyCounters.cpp mutableNUMASpace.cpp immutableSpace.cpp \
+	immutableSpace.cpp g1MemoryPool.cpp psMemoryPool.cpp yieldWorkingGroup.cpp g1Log.cpp
+endif 
+
+ifeq ($(INCLUDE_NMT), false)
+      CXXFLAGS += -DINCLUDE_NMT=0
+      CFLAGS += -DINCLUDE_NMT=0
+
+      Src_Files_EXCLUDE += \
+	 memBaseline.cpp memPtr.cpp memRecorder.cpp memReporter.cpp memSnapshot.cpp memTrackWorker.cpp \
+	 memTracker.cpp nmtDCmd.cpp
+endif
diff --git a/hotspot/make/hotspot_version b/hotspot/make/hotspot_version
index 0fcde16cec9..ef0a7519680 100644
--- a/hotspot/make/hotspot_version
+++ b/hotspot/make/hotspot_version
@@ -35,7 +35,7 @@ HOTSPOT_VM_COPYRIGHT=Copyright 2012
 
 HS_MAJOR_VER=25
 HS_MINOR_VER=0
-HS_BUILD_NUMBER=02
+HS_BUILD_NUMBER=05
 
 JDK_MAJOR_VER=1
 JDK_MINOR_VER=8
diff --git a/hotspot/make/linux/Makefile b/hotspot/make/linux/Makefile
index ad49c935bce..065ca0e83e7 100644
--- a/hotspot/make/linux/Makefile
+++ b/hotspot/make/linux/Makefile
@@ -175,6 +175,10 @@ VARIANTARCH = $(subst i386,i486,$(ZERO_LIBARCH))
 #       profiledshark   shark           <os>_<arch>_shark/profiled
 #       productshark    shark           <os>_<arch>_shark/product
 #
+#       fastdebugminimal1 minimal1      <os>_<arch>_minimal1/fastdebug
+#       jvmgminimal1      minimal1      <os>_<arch>_minimal1/jvmg
+#       productminimal1   minimal1      <os>_<arch>_minimal1/product
+#
 # What you get with each target:
 #
 # debug*     - "thin" libjvm_g - debug info linked into the gamma_g launcher
@@ -199,6 +203,7 @@ SUBDIRS_TIERED    = $(addprefix $(OSNAME)_$(BUILDARCH)_tiered/,$(TARGETS))
 SUBDIRS_CORE      = $(addprefix $(OSNAME)_$(BUILDARCH)_core/,$(TARGETS))
 SUBDIRS_ZERO      = $(addprefix $(OSNAME)_$(VARIANTARCH)_zero/,$(TARGETS))
 SUBDIRS_SHARK     = $(addprefix $(OSNAME)_$(VARIANTARCH)_shark/,$(TARGETS))
+SUBDIRS_MINIMAL1  = $(addprefix $(OSNAME)_$(BUILDARCH)_minimal1/,$(TARGETS))
 
 TARGETS_C2        = $(TARGETS)
 TARGETS_C1        = $(addsuffix 1,$(TARGETS))
@@ -206,6 +211,7 @@ TARGETS_TIERED    = $(addsuffix tiered,$(TARGETS))
 TARGETS_CORE      = $(addsuffix core,$(TARGETS))
 TARGETS_ZERO      = $(addsuffix zero,$(TARGETS))
 TARGETS_SHARK     = $(addsuffix shark,$(TARGETS))
+TARGETS_MINIMAL1 =  $(addsuffix minimal1,$(TARGETS))
 
 BUILDTREE_MAKE    = $(GAMMADIR)/make/$(OSNAME)/makefiles/buildtree.make
 BUILDTREE_VARS    = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH)
@@ -224,6 +230,7 @@ all:
 	@echo "  $(TARGETS_CORE)"
 	@echo "  $(TARGETS_ZERO)"
 	@echo "  $(TARGETS_SHARK)"
+	@echo "  $(TARGETS_MINIMAL1)"
 
 checks: check_os_version check_j2se_version
 
@@ -281,6 +288,11 @@ $(SUBDIRS_SHARK): $(BUILDTREE_MAKE) platform_zero
 	$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
 	$(BUILDTREE) VARIANT=shark VARIANTARCH=$(VARIANTARCH)
 
+$(SUBDIRS_MINIMAL1): $(BUILDTREE_MAKE)
+	$(QUIETLY) $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/Makefile checks
+	$(BUILDTREE) VARIANT=minimal1
+
+
 platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in
 	$(SED) 's/@ZERO_ARCHDEF@/$(ZERO_ARCHDEF)/g;s/@ZERO_LIBARCH@/$(ZERO_LIBARCH)/g;' < $< > $@
 
@@ -288,52 +300,74 @@ platform_zero: $(GAMMADIR)/make/$(OSNAME)/platform_zero.in
 
 $(TARGETS_C2):  $(SUBDIRS_C2)
 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install
 endif
 
 $(TARGETS_TIERED):  $(SUBDIRS_TIERED)
 	cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) install
 endif
 
 $(TARGETS_C1):  $(SUBDIRS_C1)
 	cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install
 endif
 
 $(TARGETS_CORE):  $(SUBDIRS_CORE)
 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
 endif
 
 $(TARGETS_ZERO):  $(SUBDIRS_ZERO)
 	cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(VARIANTARCH)_zero/$(patsubst %zero,%,$@) && $(MAKE) $(MFLAGS) install
 endif
 
 $(TARGETS_SHARK):  $(SUBDIRS_SHARK)
 	cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(VARIANTARCH)_shark/$(patsubst %shark,%,$@) && $(MAKE) $(MFLAGS) install
 endif
 
+$(TARGETS_MINIMAL1):  $(SUBDIRS_MINIMAL1)
+	cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
+	cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && ./test_gamma
+endif
+ifdef INSTALL
+	cd $(OSNAME)_$(BUILDARCH)_minimal1/$(patsubst %minimal1,%,$@) && $(MAKE) $(MFLAGS) install
+endif
+
 # Just build the tree, and nothing else:
 tree:      $(SUBDIRS_C2)
 tree1:     $(SUBDIRS_C1)
 treecore:  $(SUBDIRS_CORE)
 treezero:  $(SUBDIRS_ZERO)
 treeshark: $(SUBDIRS_SHARK)
+treeminimal1: $(SUBDIRS_MINIMAL1)
 
 # Doc target.  This is the same for all build options.
 #     Hence create a docs directory beside ...$(ARCH)_[...]
@@ -357,17 +391,23 @@ shark: jvmgshark productshark
 clean_docs:
 	rm -rf $(SUBDIR_DOCS)
 
-clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark:
+clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark clean_minimal1:
 	rm -rf $(OSNAME)_$(BUILDARCH)_$(subst clean_,,$@)
 
-clean:  clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_docs
+clean:  clean_compiler2 clean_compiler1 clean_core clean_zero clean_shark clean_minimal1 clean_docs
 
 include $(GAMMADIR)/make/cscope.make
 
+#
+# Include alternate Makefile if it exists.
+#
+-include $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make
+
 #-------------------------------------------------------------------------------
 
-.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK)
+.PHONY: $(TARGETS_C2) $(TARGETS_C1) $(TARGETS_CORE) $(TARGETS_ZERO) $(TARGETS_SHARK) $(TARGETS_MINIMAL1)
 .PHONY: tree tree1 treecore treezero treeshark
 .PHONY: all compiler1 compiler2 core zero shark
 .PHONY: clean clean_compiler1 clean_compiler2 clean_core clean_zero clean_shark docs clean_docs
 .PHONY: checks check_os_version check_j2se_version
+.PHONY: $(HS_ALT_MAKE)/$(OSNAME)/Makefile.make
diff --git a/hotspot/make/linux/makefiles/adlc.make b/hotspot/make/linux/makefiles/adlc.make
index 6befe8a94fb..f1892d7d5cc 100644
--- a/hotspot/make/linux/makefiles/adlc.make
+++ b/hotspot/make/linux/makefiles/adlc.make
@@ -109,7 +109,7 @@ all: $(EXEC)
 
 $(EXEC) : $(OBJECTS)
 	@echo Making adlc
-	$(QUIETLY) $(HOST.LINK_NOPROF.CXX) -o $(EXEC) $(OBJECTS)
+	$(QUIETLY) $(filter-out $(ARCHFLAG),$(HOST.LINK_NOPROF.CXX)) -o $(EXEC) $(OBJECTS)
 
 # Random dependencies:
 $(OBJECTS): opcodes.hpp classes.hpp adlc.hpp adlcVMDeps.hpp adlparse.hpp archDesc.hpp arena.hpp dict2.hpp filebuff.hpp forms.hpp formsopt.hpp formssel.hpp
@@ -213,14 +213,14 @@ PROCESS_AD_FILES = awk '{ \
 $(OUTDIR)/%.o: %.cpp
 	@echo Compiling $<
 	$(QUIETLY) $(REMOVE_TARGET)
-	$(QUIETLY) $(HOST.COMPILE.CXX) -o $@ $< $(COMPILE_DONE)
+	$(QUIETLY) $(filter-out $(ARCHFLAG),$(HOST.COMPILE.CXX)) -o $@ $< $(COMPILE_DONE)
 
 # Some object files are given a prefix, to disambiguate
 # them from objects of the same name built for the VM.
 $(OUTDIR)/adlc-%.o: %.cpp
 	@echo Compiling $<
 	$(QUIETLY) $(REMOVE_TARGET)
-	$(QUIETLY) $(HOST.COMPILE.CXX) -o $@ $< $(COMPILE_DONE)
+	$(QUIETLY) $(filter-out $(ARCHFLAG),$(HOST.COMPILE.CXX)) -o $@ $< $(COMPILE_DONE)
 
 # #########################################################################
 
diff --git a/hotspot/make/linux/makefiles/buildtree.make b/hotspot/make/linux/makefiles/buildtree.make
index 9e8d4d9f784..639c11f87c8 100644
--- a/hotspot/make/linux/makefiles/buildtree.make
+++ b/hotspot/make/linux/makefiles/buildtree.make
@@ -57,6 +57,7 @@
 
 -include $(SPEC)
 include $(GAMMADIR)/make/scm.make
+include $(GAMMADIR)/make/defs.make
 include $(GAMMADIR)/make/altsrc.make
 
 
@@ -156,6 +157,13 @@ ifndef HOTSPOT_VM_DISTRO
   endif
 endif
 
+# if hotspot-only build and/or OPENJDK isn't passed down, need to set OPENJDK
+ifndef OPENJDK
+  ifneq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true)
+    OPENJDK=true
+  endif
+endif
+
 BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION=  JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
 
 BUILDTREE	= \
@@ -188,6 +196,8 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
 	sed -n '/=/s/^ */Platform_/p' < $(PLATFORM_FILE); \
 	echo; \
 	echo "GAMMADIR = $(GAMMADIR)"; \
+	echo "HS_ALT_MAKE = $(HS_ALT_MAKE)"; \
+	echo "OSNAME = $(OSNAME)"; \
 	echo "SYSDEFS = \$$(Platform_sysdefs)"; \
 	echo "SRCARCH = $(SRCARCH)"; \
 	echo "BUILDARCH = $(BUILDARCH)"; \
@@ -198,6 +208,7 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
 	echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
+	echo "OPENJDK = $(OPENJDK)"; \
 	echo; \
 	echo "# Used for platform dispatching"; \
 	echo "TARGET_DEFINES  = -DTARGET_OS_FAMILY_\$$(Platform_os_family)"; \
@@ -254,6 +265,7 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
 	[ -n "$(SPEC)" ] && \
 	    echo "include $(SPEC)"; \
 	echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(VARIANT).make"; \
+	echo "include \$$(GAMMADIR)/make/excludeSrc.make"; \
 	echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(COMPILER).make"; \
 	) > $@
 
diff --git a/hotspot/make/linux/makefiles/defs.make b/hotspot/make/linux/makefiles/defs.make
index 5a66e495a29..1fcc7859b07 100644
--- a/hotspot/make/linux/makefiles/defs.make
+++ b/hotspot/make/linux/makefiles/defs.make
@@ -29,8 +29,14 @@
 SLASH_JAVA ?= /java
 
 # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
-ARCH:=$(shell uname -m)
-PATH_SEP = :
+
+# ARCH can be set explicitly in spec.gmk
+ifndef ARCH
+  ARCH := $(shell uname -m)
+endif
+
+PATH_SEP ?= :
+
 ifeq ($(LP64), 1)
   ARCH_DATA_MODEL ?= 64
 else
@@ -72,8 +78,8 @@ ifeq ($(ARCH), sparc64)
   HS_ARCH            = sparc
 endif
 
-# x86_64
-ifeq ($(ARCH), x86_64) 
+# amd64/x86_64
+ifneq (,$(findstring $(ARCH), amd64 x86_64))
   ifeq ($(ARCH_DATA_MODEL), 64)
     ARCH_DATA_MODEL = 64
     MAKE_ARGS       += LP64=1
@@ -90,8 +96,8 @@ ifeq ($(ARCH), x86_64)
   endif
 endif
 
-# i686
-ifeq ($(ARCH), i686)
+# i686/i586 ie 32-bit x86
+ifneq (,$(findstring $(ARCH), i686 i586))
   ARCH_DATA_MODEL  = 32
   PLATFORM         = linux-i586
   VM_PLATFORM      = linux_i486
@@ -248,6 +254,7 @@ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 endif
 EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
 EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client
+EXPORT_MINIMAL_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/minimal
 
 EXPORT_LIST += $(EXPORT_JRE_LIB_DIR)/wb.jar
 
@@ -275,6 +282,19 @@ ifeq ($(JVM_VARIANT_CLIENT),true)
   endif 
 endif
 
+ifeq ($(JVM_VARIANT_MINIMAL1),true)
+  EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/Xusage.txt
+  EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.$(LIBRARY_SUFFIX)
+
+  ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+    ifeq ($(ZIP_DEBUGINFO_FILES),1)
+	EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.diz
+    else
+	EXPORT_LIST += $(EXPORT_MINIMAL_DIR)/libjvm.debuginfo
+    endif
+  endif 
+endif
+
 # Serviceability Binaries
 # No SA Support for PPC, IA64, ARM or zero
 ADD_SA_BINARIES/x86   = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
diff --git a/hotspot/make/linux/makefiles/dtrace.make b/hotspot/make/linux/makefiles/dtrace.make
index 785561cc64f..b50eab183de 100644
--- a/hotspot/make/linux/makefiles/dtrace.make
+++ b/hotspot/make/linux/makefiles/dtrace.make
@@ -1,5 +1,6 @@
 #
-# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012 Red Hat, Inc.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -25,3 +26,40 @@
 # Linux does not build jvm_db
 LIBJVM_DB =
 
+# Only OPENJDK builds test and support SDT probes currently.
+ifndef OPENJDK
+REASON = "This JDK does not support SDT probes"
+else
+
+# We need a recent GCC for the default
+ifeq "$(shell expr \( $(CC_VER_MAJOR) \>= 4 \) \& \( $(CC_VER_MINOR) \>= 4 \) )" "0"
+REASON = "gcc version is too old"
+else
+
+# But it does have a SystemTap dtrace compatible sys/sdt.h
+ifneq ($(ALT_SDT_H),)
+  SDT_H_FILE = $(ALT_SDT_H)
+else
+  SDT_H_FILE = /usr/include/sys/sdt.h
+endif
+DTRACE_ENABLED = $(shell test -f $(SDT_H_FILE) && echo $(SDT_H_FILE))
+REASON = "$(SDT_H_FILE) not found"
+
+ifneq ($(DTRACE_ENABLED),)
+  CFLAGS += -DDTRACE_ENABLED
+endif
+
+endif
+endif
+
+# Phony target used in vm.make build target to check whether enabled.
+.PHONY: dtraceCheck
+ifeq ($(DTRACE_ENABLED),)
+dtraceCheck:
+	$(QUIETLY) echo "**NOTICE** Dtrace support disabled: $(REASON)"
+else
+dtraceCheck:
+endif
+
+# It doesn't support HAVE_DTRACE_H though.
+
diff --git a/hotspot/make/linux/makefiles/gcc.make b/hotspot/make/linux/makefiles/gcc.make
index 9231dafde28..3bed2c8562f 100644
--- a/hotspot/make/linux/makefiles/gcc.make
+++ b/hotspot/make/linux/makefiles/gcc.make
@@ -116,11 +116,6 @@ ifdef CC_INTERP
   CFLAGS += -DCC_INTERP
 endif
 
-# Build for embedded targets
-ifdef JAVASE_EMBEDDED
-  CFLAGS += -DJAVASE_EMBEDDED
-endif
-
 # Keep temporary files (.ii, .s)
 ifdef NEED_ASM
   CFLAGS += -save-temps
@@ -146,10 +141,23 @@ CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS)
 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) 
 
 # The flags to use for an Optimized g++ build
-OPT_CFLAGS += -O3
+OPT_CFLAGS/SIZE=-Os
+OPT_CFLAGS/SPEED=-O3
 
 # Hotspot uses very unstrict aliasing turn this optimization off
-OPT_CFLAGS += -fno-strict-aliasing
+# This option is added to CFLAGS rather than OPT_CFLAGS
+# so that OPT_CFLAGS overrides get this option too.
+CFLAGS += -fno-strict-aliasing 
+
+OPT_CFLAGS_DEFAULT ?= SPEED
+
+ifdef OPT_CFLAGS
+  ifneq ("$(origin OPT_CFLAGS)", "command line")
+    $(error " Use OPT_EXTRAS instead of OPT_CFLAGS to add extra flags to OPT_CFLAGS.")
+  endif
+endif
+
+OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS)
 
 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp 
 # if we use expensive-optimizations
diff --git a/hotspot/make/linux/makefiles/ia64.make b/hotspot/make/linux/makefiles/ia64.make
index 0fa65f270a8..8535807a787 100644
--- a/hotspot/make/linux/makefiles/ia64.make
+++ b/hotspot/make/linux/makefiles/ia64.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,6 @@
 #
 # IA64 only uses c++ based interpreter
 CFLAGS += -DCC_INTERP -D_LP64=1 -DVM_LITTLE_ENDIAN
-# Hotspot uses very unstrict aliasing turn this optimization off
-OPT_CFLAGS += -fno-strict-aliasing
 ifeq ($(VERSION),debug)
 ASM_FLAGS= -DDEBUG
 else
diff --git a/hotspot/make/linux/makefiles/launcher.make b/hotspot/make/linux/makefiles/launcher.make
index 0c102eadc0a..23f3edad41a 100644
--- a/hotspot/make/linux/makefiles/launcher.make
+++ b/hotspot/make/linux/makefiles/launcher.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -82,7 +82,7 @@ $(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c
 $(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
 	$(QUIETLY) echo Linking launcher...
 	$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
-	$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER)
+	$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(sort $(OBJS)) $(LIBS_LAUNCHER)
 	$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
 
 $(LAUNCHER): $(LAUNCHER_SCRIPT)
diff --git a/hotspot/make/linux/makefiles/minimal1.make b/hotspot/make/linux/makefiles/minimal1.make
new file mode 100644
index 00000000000..9494f78bcdd
--- /dev/null
+++ b/hotspot/make/linux/makefiles/minimal1.make
@@ -0,0 +1,46 @@
+#
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#  
+#
+
+TYPE=MINIMAL1
+
+INCLUDE_JVMTI ?= false
+INCLUDE_FPROF ?= false
+INCLUDE_VM_STRUCTS ?= false
+INCLUDE_JNI_CHECK ?= false
+INCLUDE_SERVICES ?= false
+INCLUDE_MANAGEMENT ?= false
+INCLUDE_ALTERNATE_GCS ?= false
+INCLUDE_NMT ?= false
+INCLUDE_CDS ?= false
+
+CXXFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\"
+CFLAGS += -DMINIMAL_JVM -DCOMPILER1 -DVMTYPE=\"Minimal\"
+
+Src_Dirs/MINIMAL1 = $(CORE_PATHS) $(COMPILER1_PATHS)
+
+Src_Files_EXCLUDE/MINIMAL1 += $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
+
+-include $(HS_ALT_MAKE)/$(OSNAME)/makefiles/minimal1.make
+
+.PHONY: $(HS_ALT_MAKE)/$(OSNAME)/makefiles/minimal1.make
diff --git a/hotspot/make/linux/makefiles/ppc.make b/hotspot/make/linux/makefiles/ppc.make
index 8d085e64211..3364bd743b8 100644
--- a/hotspot/make/linux/makefiles/ppc.make
+++ b/hotspot/make/linux/makefiles/ppc.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/product.make b/hotspot/make/linux/makefiles/product.make
index efce43d08b7..a64d49f9d12 100644
--- a/hotspot/make/linux/makefiles/product.make
+++ b/hotspot/make/linux/makefiles/product.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/rules.make b/hotspot/make/linux/makefiles/rules.make
index a1e4c34b286..d40b88d5ed0 100644
--- a/hotspot/make/linux/makefiles/rules.make
+++ b/hotspot/make/linux/makefiles/rules.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/sa.make b/hotspot/make/linux/makefiles/sa.make
index f39e736827f..66a7b945737 100644
--- a/hotspot/make/linux/makefiles/sa.make
+++ b/hotspot/make/linux/makefiles/sa.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -107,9 +107,9 @@ $(GENERATED)/sa-jdi.jar:: $(AGENT_FILES)
 	$(QUIETLY) $(REMOTE) $(RUN.JAR) cf $@ -C $(SA_CLASSDIR)/ .
 	$(QUIETLY) $(REMOTE) $(RUN.JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
 	$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.x86.X86ThreadContext
-	$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.ia64.IA64ThreadContext
 	$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext
 	$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.sparc.SPARCThreadContext
+	$(QUIETLY) $(REMOTE) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.asm.Disassembler
 
 clean:
 	rm -rf $(SA_CLASSDIR)
diff --git a/hotspot/make/linux/makefiles/saproc.make b/hotspot/make/linux/makefiles/saproc.make
index af0767a4385..cffafb8ad3d 100644
--- a/hotspot/make/linux/makefiles/saproc.make
+++ b/hotspot/make/linux/makefiles/saproc.make
@@ -48,7 +48,8 @@ SASRCFILES = $(SASRCDIR)/salibelf.c                   \
              $(SASRCDIR)/libproc_impl.c               \
              $(SASRCDIR)/ps_proc.c                    \
              $(SASRCDIR)/ps_core.c                    \
-             $(SASRCDIR)/LinuxDebuggerLocal.c
+             $(SASRCDIR)/LinuxDebuggerLocal.c         \
+             $(AGENT_DIR)/src/share/native/sadis.c
 
 -include $(HS_ALT_MAKE)/linux/makefiles/saproc.make
 
diff --git a/hotspot/make/linux/makefiles/sparcWorks.make b/hotspot/make/linux/makefiles/sparcWorks.make
index c87f5044096..e39116023c5 100644
--- a/hotspot/make/linux/makefiles/sparcWorks.make
+++ b/hotspot/make/linux/makefiles/sparcWorks.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/top.make b/hotspot/make/linux/makefiles/top.make
index 3f6e73ebc1b..011d46a05b8 100644
--- a/hotspot/make/linux/makefiles/top.make
+++ b/hotspot/make/linux/makefiles/top.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/linux/makefiles/vm.make b/hotspot/make/linux/makefiles/vm.make
index 6e9794ba710..3da1a52e0ee 100644
--- a/hotspot/make/linux/makefiles/vm.make
+++ b/hotspot/make/linux/makefiles/vm.make
@@ -192,7 +192,7 @@ SHARK_SPECIFIC_FILES     := shark
 ZERO_SPECIFIC_FILES      := zero
 
 # Always exclude these.
-Src_Files_EXCLUDE := jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp
+Src_Files_EXCLUDE += jsig.c jvmtiEnvRecommended.cpp jvmtiEnvStub.cpp
 
 # Exclude per type.
 Src_Files_EXCLUDE/CORE      := $(COMPILER1_SPECIFIC_FILES) $(COMPILER2_SPECIFIC_FILES) $(ZERO_SPECIFIC_FILES) $(SHARK_SPECIFIC_FILES) ciTypeFlow.cpp
@@ -320,7 +320,7 @@ $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
 	    echo Linking vm...;                                         \
 	    $(LINK_LIB.CXX/PRE_HOOK)                                     \
 	    $(LINK_VM) $(LD_SCRIPT_FLAG)                                \
-		       $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM);       \
+		       $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM);       \
 	    $(LINK_LIB.CXX/POST_HOOK)                                    \
 	    rm -f $@.1; ln -s $@ $@.1;                                  \
 	    [ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \
@@ -387,7 +387,7 @@ include $(MAKEFILES_DIR)/wb.make
 
 #----------------------------------------------------------------------
 
-build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(BUILDLIBSAPROC) $(WB_JAR)
+build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(BUILDLIBSAPROC) dtraceCheck $(WB_JAR)
 
 install: install_jvm install_jsig install_saproc
 
diff --git a/hotspot/make/sa.files b/hotspot/make/sa.files
index c634590fea5..b982aaff736 100644
--- a/hotspot/make/sa.files
+++ b/hotspot/make/sa.files
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -39,10 +39,7 @@ AGENT_SRC_DIR = $(AGENT_DIR)/src/share/classes
 AGENT_FILES = \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/asm/*.java \
-$(AGENT_SRC_DIR)/sun/jvm/hotspot/asm/amd64/*.java \
-$(AGENT_SRC_DIR)/sun/jvm/hotspot/asm/ia64/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/asm/sparc/*.java \
-$(AGENT_SRC_DIR)/sun/jvm/hotspot/asm/x86/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/bugspot/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/bugspot/tree/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/c1/*.java \
@@ -59,10 +56,8 @@ $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/cdbg/basic/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/cdbg/basic/x86/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/cdbg/basic/amd64/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/dummy/*.java \
-$(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/ia64/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/linux/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/linux/amd64/*.java \
-$(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/linux/ia64/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/linux/x86/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/linux/sparc/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/posix/*.java \
@@ -79,7 +74,6 @@ $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/sparc/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/win32/coff/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/windbg/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/windbg/amd64/*.java \
-$(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/windbg/ia64/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/windbg/x86/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/debugger/x86/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/gc_implementation/g1/*.java \
@@ -98,10 +92,8 @@ $(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/amd64/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/bsd/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/bsd_amd64/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/bsd_x86/*.java \
-$(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/ia64/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/linux/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/linux_amd64/*.java \
-$(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/linux_ia64/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/linux_x86/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/linux_sparc/*.java \
 $(AGENT_SRC_DIR)/sun/jvm/hotspot/runtime/posix/*.java \
diff --git a/hotspot/make/solaris/Makefile b/hotspot/make/solaris/Makefile
index eec2be46da6..3a71eb541a2 100644
--- a/hotspot/make/solaris/Makefile
+++ b/hotspot/make/solaris/Makefile
@@ -237,35 +237,45 @@ $(SUBDIRS_KERNEL): $(BUILDTREE_MAKE)
 
 $(TARGETS_C2):  $(SUBDIRS_C2)
 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_compiler2/$@ && $(MAKE) $(MFLAGS) install
 endif
 
 $(TARGETS_TIERED):  $(SUBDIRS_TIERED)
 	cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_tiered/$(patsubst %tiered,%,$@) && $(MAKE) $(MFLAGS) install
 endif
 
 $(TARGETS_C1):  $(SUBDIRS_C1)
 	cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_compiler1/$(patsubst %1,%,$@) && $(MAKE) $(MFLAGS) install
 endif
 
 $(TARGETS_CORE):  $(SUBDIRS_CORE)
 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_core/$(patsubst %core,%,$@) && $(MAKE) $(MFLAGS) install
 endif
 
 $(TARGETS_KERNEL):  $(SUBDIRS_KERNEL)
 	cd $(OSNAME)_$(BUILDARCH)_kernel/$(patsubst %kernel,%,$@) && $(MAKE) $(MFLAGS)
+ifeq ($(TEST_IN_BUILD),true)
 	cd $(OSNAME)_$(BUILDARCH)_kernel/$(patsubst %kernel,%,$@) && ./test_gamma
+endif
 ifdef INSTALL
 	cd $(OSNAME)_$(BUILDARCH)_kernel/$(patsubst %kernel,%,$@) && $(MAKE) $(MFLAGS) install
 endif
diff --git a/hotspot/make/solaris/makefiles/adlc.make b/hotspot/make/solaris/makefiles/adlc.make
index 2d110cffe4f..750bd8319bf 100644
--- a/hotspot/make/solaris/makefiles/adlc.make
+++ b/hotspot/make/solaris/makefiles/adlc.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/buildtree.make b/hotspot/make/solaris/makefiles/buildtree.make
index d3147676088..3bca3dcee79 100644
--- a/hotspot/make/solaris/makefiles/buildtree.make
+++ b/hotspot/make/solaris/makefiles/buildtree.make
@@ -148,6 +148,13 @@ ifndef HOTSPOT_VM_DISTRO
   endif
 endif
 
+# if hotspot-only build and/or OPENJDK isn't passed down, need to set OPENJDK
+ifndef OPENJDK
+  ifneq ($(call if-has-altsrc,$(HS_COMMON_SRC)/,true,false),true)
+    OPENJDK=true
+  endif
+endif
+
 BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HS_BUILD_VER) HOTSPOT_BUILD_VERSION= JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION) 
 
 BUILDTREE	= \
@@ -190,6 +197,7 @@ flags.make: $(BUILDTREE_MAKE) ../shared_dirs.lst
 	echo "SA_BUILD_VERSION = $(HS_BUILD_VER)"; \
 	echo "HOTSPOT_BUILD_USER = $(HOTSPOT_BUILD_USER)"; \
 	echo "HOTSPOT_VM_DISTRO = $(HOTSPOT_VM_DISTRO)"; \
+	echo "OPENJDK = $(OPENJDK)"; \
 	echo "$(LP64_SETTING/$(DATA_MODE))"; \
 	echo; \
 	echo "# Used for platform dispatching"; \
diff --git a/hotspot/make/solaris/makefiles/dtrace.make b/hotspot/make/solaris/makefiles/dtrace.make
index 48bc98d2dc6..1473a0f67b2 100644
--- a/hotspot/make/solaris/makefiles/dtrace.make
+++ b/hotspot/make/solaris/makefiles/dtrace.make
@@ -206,15 +206,15 @@ CONDITIONALLY_UPDATE_JVMOFFS_TARGET = \
 
 # $@.tmp is created first to avoid an empty $(JVMOFFS).h if an error occurs.
 $(JVMOFFS).h: $(GENOFFS)
-	$(QUIETLY) LD_LIBRARY_PATH=. ./$(GENOFFS) -header > $@.tmp
+	$(QUIETLY) LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ./$(GENOFFS) -header > $@.tmp
 	$(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET)
 
 $(JVMOFFS)Index.h: $(GENOFFS)
-	$(QUIETLY) LD_LIBRARY_PATH=. ./$(GENOFFS) -index > $@.tmp
+	$(QUIETLY) LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ./$(GENOFFS) -index > $@.tmp
 	$(QUIETLY)  $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET)
 
 $(JVMOFFS).cpp: $(GENOFFS) $(JVMOFFS).h $(JVMOFFS)Index.h
-	$(QUIETLY) LD_LIBRARY_PATH=. ./$(GENOFFS) -table > $@.tmp
+	$(QUIETLY) LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ./$(GENOFFS) -table > $@.tmp
 	$(QUIETLY) $(CONDITIONALLY_UPDATE_JVMOFFS_TARGET)
 
 $(JVMOFFS.o): $(JVMOFFS).h $(JVMOFFS).cpp 
diff --git a/hotspot/make/solaris/makefiles/gcc.make b/hotspot/make/solaris/makefiles/gcc.make
index be26f6d418c..8b2be7a7177 100644
--- a/hotspot/make/solaris/makefiles/gcc.make
+++ b/hotspot/make/solaris/makefiles/gcc.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/jvmg.make b/hotspot/make/solaris/makefiles/jvmg.make
index 821c0a13850..4605e13ff39 100644
--- a/hotspot/make/solaris/makefiles/jvmg.make
+++ b/hotspot/make/solaris/makefiles/jvmg.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/launcher.make b/hotspot/make/solaris/makefiles/launcher.make
index f735b20d343..090ff5ea7a6 100644
--- a/hotspot/make/solaris/makefiles/launcher.make
+++ b/hotspot/make/solaris/makefiles/launcher.make
@@ -96,7 +96,7 @@ $(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
 	$(QUIETLY) echo Linking launcher...
 	$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
-	$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(OBJS) $(LIBS_LAUNCHER)
+	$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(sort $(OBJS)) $(LIBS_LAUNCHER)
 	$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
 endif # filter -sbfast -xsbfast
 
diff --git a/hotspot/make/solaris/makefiles/optimized.make b/hotspot/make/solaris/makefiles/optimized.make
index 83fd01ca994..87716a88be0 100644
--- a/hotspot/make/solaris/makefiles/optimized.make
+++ b/hotspot/make/solaris/makefiles/optimized.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/rules.make b/hotspot/make/solaris/makefiles/rules.make
index 4401698801c..b7006f5836e 100644
--- a/hotspot/make/solaris/makefiles/rules.make
+++ b/hotspot/make/solaris/makefiles/rules.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/sa.make b/hotspot/make/solaris/makefiles/sa.make
index ec27f561313..2c08b1c5170 100644
--- a/hotspot/make/solaris/makefiles/sa.make
+++ b/hotspot/make/solaris/makefiles/sa.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -94,6 +94,7 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES)
 	$(QUIETLY) $(RUN.JAR) cf $@ -C $(SA_CLASSDIR)/ .
 	$(QUIETLY) $(RUN.JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
 	$(QUIETLY) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.debugger.proc.ProcDebuggerLocal
+	$(QUIETLY) $(RUN.JAVAH) -classpath $(SA_CLASSDIR) -d $(GENERATED) -jni sun.jvm.hotspot.asm.Disassembler
 
 clean:
 	rm -rf $(SA_CLASSDIR)
diff --git a/hotspot/make/solaris/makefiles/saproc.make b/hotspot/make/solaris/makefiles/saproc.make
index 3e16f431d73..9e237615225 100644
--- a/hotspot/make/solaris/makefiles/saproc.make
+++ b/hotspot/make/solaris/makefiles/saproc.make
@@ -27,7 +27,9 @@
 # libsaproc[_g].so: serviceability agent
 
 SAPROC = saproc
+SADIS = sadis
 LIBSAPROC = lib$(SAPROC).so
+SADISOBJ = $(SADIS).o
 
 SAPROC_G = $(SAPROC)$(G_SUFFIX)
 LIBSAPROC_G = lib$(SAPROC_G).so
@@ -43,6 +45,8 @@ SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family)/proc
 
 SASRCFILES = $(SASRCDIR)/saproc.cpp
 
+SADISSRCFILES = $(AGENT_DIR)/src/share/native/sadis.c
+
 SAMAPFILE = $(SASRCDIR)/mapfile
 
 DEST_SAPROC           = $(JDK_LIBDIR)/$(LIBSAPROC)
@@ -90,13 +94,14 @@ $(shell uname -r -v \
 # when actually building on Nevada-B158 or earlier:
 #SOLARIS_11_B159_OR_LATER=-DSOLARIS_11_B159_OR_LATER
 
-$(LIBSAPROC): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(SASRCFILES) $(SAMAPFILE)
+
+$(LIBSAPROC): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(SASRCFILES) $(SADISOBJ) $(SAMAPFILE)
 	$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
 	  echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \
 	  exit 1; \
 	fi
 	@echo Making SA debugger back-end...
-	$(QUIETLY) $(CXX)                                               \
+	           $(QUIETLY) $(CXX)                                    \
                    $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG)     \
 	           -I$(SASRCDIR)                                        \
 	           -I$(GENERATED)                                       \
@@ -104,10 +109,23 @@ $(LIBSAPROC): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(SASRCFILES) $(SA
 	           -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family)    \
 	           $(SOLARIS_11_B159_OR_LATER)                          \
 	           $(SASRCFILES)                                        \
+	           $(SADISOBJ)                                          \
 	           $(SA_LFLAGS)                                         \
 	           -o $@                                                \
 	           -ldl -ldemangle -lthread -lc
 	[ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); }
+
+$(SADISOBJ): $(SADISSRCFILES)
+	           $(QUIETLY) $(CC)                                     \
+	           $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG)     \
+	           -I$(SASRCDIR)                                        \
+	           -I$(GENERATED)                                       \
+	           -I$(BOOT_JAVA_HOME)/include                          \
+	           -I$(BOOT_JAVA_HOME)/include/$(Platform_os_family)    \
+	           $(SOLARIS_11_B159_OR_LATER)                          \
+	           $(SADISSRCFILES)                                     \
+	           -c -o $(SADISOBJ)
+	
 ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
 # gobjcopy crashes on "empty" section headers with the SHF_ALLOC flag set.
 # Clear the SHF_ALLOC flag (if set) from empty section headers.
diff --git a/hotspot/make/solaris/makefiles/top.make b/hotspot/make/solaris/makefiles/top.make
index bbe10798ff5..1d31f1e8d55 100644
--- a/hotspot/make/solaris/makefiles/top.make
+++ b/hotspot/make/solaris/makefiles/top.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/solaris/makefiles/vm.make b/hotspot/make/solaris/makefiles/vm.make
index 8f1a5e20adf..d91cba35131 100644
--- a/hotspot/make/solaris/makefiles/vm.make
+++ b/hotspot/make/solaris/makefiles/vm.make
@@ -288,7 +288,7 @@ $(LIBJVM): $(ADD_GNU_DEBUGLINK) $(FIX_EMPTY_SEC_HDR_FLAGS) $(LIBJVM.o) $(LIBJVM_
 ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
 	@echo Linking vm...
 	$(QUIETLY) $(LINK_LIB.CXX/PRE_HOOK)
-	$(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM)
+	$(QUIETLY) $(LINK_VM) $(LFLAGS_VM) -o $@ $(sort $(LIBJVM.o)) $(LIBS_VM)
 	$(QUIETLY) $(LINK_LIB.CXX/POST_HOOK)
 	$(QUIETLY) rm -f $@.1 && ln -s $@ $@.1
 	$(QUIETLY) [ -f $(LIBJVM_G) ] || ln -s $@ $(LIBJVM_G)
diff --git a/hotspot/make/windows/build.bat b/hotspot/make/windows/build.bat
index ac63bb2ad4a..e4eab3abf0c 100644
--- a/hotspot/make/windows/build.bat
+++ b/hotspot/make/windows/build.bat
@@ -1,6 +1,6 @@
 @echo off
 REM
-REM Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+REM Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
 REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 REM
 REM This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/build_vm_def.sh b/hotspot/make/windows/build_vm_def.sh
index 35dd9dcd16f..c54a1803b93 100644
--- a/hotspot/make/windows/build_vm_def.sh
+++ b/hotspot/make/windows/build_vm_def.sh
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/get_msc_ver.sh b/hotspot/make/windows/get_msc_ver.sh
index da00db4d3c2..89c7a3f8c8f 100644
--- a/hotspot/make/windows/get_msc_ver.sh
+++ b/hotspot/make/windows/get_msc_ver.sh
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/adlc.make b/hotspot/make/windows/makefiles/adlc.make
index f091b988645..f320d4e932d 100644
--- a/hotspot/make/windows/makefiles/adlc.make
+++ b/hotspot/make/windows/makefiles/adlc.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/defs.make b/hotspot/make/windows/makefiles/defs.make
index cb2e0b791e4..d0f45c0bac6 100644
--- a/hotspot/make/windows/makefiles/defs.make
+++ b/hotspot/make/windows/makefiles/defs.make
@@ -154,10 +154,9 @@ MAKE_ARGS += ZIPEXE=$(ZIPEXE)
 # On 32 bit windows we build server, client and kernel, on 64 bit just server.
 ifeq ($(JVM_VARIANTS),)
   ifeq ($(ARCH_DATA_MODEL), 32)
-    JVM_VARIANTS:=client,server,kernel
+    JVM_VARIANTS:=client,server
     JVM_VARIANT_CLIENT:=true
     JVM_VARIANT_SERVER:=true
-    JVM_VARIANT_KERNEL:=true
   else
     JVM_VARIANTS:=server
     JVM_VARIANT_SERVER:=true
diff --git a/hotspot/make/windows/makefiles/launcher.make b/hotspot/make/windows/makefiles/launcher.make
index 90485aa7380..10ad009eef9 100644
--- a/hotspot/make/windows/makefiles/launcher.make
+++ b/hotspot/make/windows/makefiles/launcher.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/projectcreator.make b/hotspot/make/windows/makefiles/projectcreator.make
index ebc5a0a8497..5d71de6618a 100644
--- a/hotspot/make/windows/makefiles/projectcreator.make
+++ b/hotspot/make/windows/makefiles/projectcreator.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -29,12 +29,11 @@
 # HOTSPOTRELEASEBINDEST, or HOTSPOTDEBUGBINDEST environment variables.
 
 ProjectCreatorSources=\
-        $(WorkSpace)\src\share\tools\ProjectCreator\DirectoryTree.java \
-        $(WorkSpace)\src\share\tools\ProjectCreator\DirectoryTreeNode.java \
-        $(WorkSpace)\src\share\tools\ProjectCreator\FileFormatException.java \
         $(WorkSpace)\src\share\tools\ProjectCreator\ProjectCreator.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\FileTreeCreator.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\FileTreeCreatorVC7.java \
+        $(WorkSpace)\src\share\tools\ProjectCreator\FileTreeCreatorVC10.java \
         $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatform.java \
-        $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC6.java \
         $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC7.java \
         $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC8.java \
         $(WorkSpace)\src\share\tools\ProjectCreator\WinGammaPlatformVC9.java \
@@ -57,10 +56,24 @@ ProjectCreatorIncludesPRIVATE=\
         -relativeInclude src\os_cpu\windows_$(Platform_arch)\vm \
         -relativeInclude src\cpu\$(Platform_arch)\vm \
         -absoluteInclude $(HOTSPOTBUILDSPACE)/%f/generated \
-        -ignorePath $(HOTSPOTBUILDSPACE)/%f/generated \
-        -ignorePath src\share\vm\adlc \
-        -ignorePath src\share\vm\shark \
-        -ignorePath posix
+        -relativeSrcInclude src \
+        -absoluteSrcInclude $(HOTSPOTBUILDSPACE) \
+        -ignorePath $(HOTSPOTBUILDSPACE) \
+        -ignorePath launcher \
+        -ignorePath share\vm\adlc \
+        -ignorePath share\vm\shark \
+        -ignorePath share\tools \
+        -ignorePath solaris \
+        -ignorePath posix \
+        -ignorePath sparc \
+        -ignorePath linux \
+        -ignorePath bsd \
+        -ignorePath osx \
+        -ignorePath arm \
+        -ignorePath ppc \
+        -ignorePath zero \
+        -hidePath .hg
+	
 
 # This is referenced externally by both the IDE and batch builds
 ProjectCreatorOptions=
@@ -84,6 +97,7 @@ ProjectCreatorIDEOptions=\
         $(ProjectCreatorIDEOptions) \
         -sourceBase $(HOTSPOTWORKSPACE) \
         -buildBase $(HOTSPOTBUILDSPACE)\%f\%b \
+        -buildSpace $(HOTSPOTBUILDSPACE) \
         -startAt src \
         -compiler $(VcVersion) \
         -projectFileName $(HOTSPOTBUILDSPACE)\$(ProjectFile) \
@@ -103,6 +117,7 @@ ProjectCreatorIDEOptions=\
         -define TARGET_OS_ARCH_windows_x86 \
         -define TARGET_OS_FAMILY_windows \
         -define TARGET_COMPILER_visCPP \
+        -define INCLUDE_TRACE \
        $(ProjectCreatorIncludesPRIVATE)
 
 # Add in build-specific options
@@ -125,9 +140,13 @@ ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
 !endif
 
 ProjectCreatorIDEOptionsIgnoreCompiler1=\
+ -ignorePath_TARGET compiler1 \
+ -ignorePath_TARGET tiered \
  -ignorePath_TARGET c1_
 
 ProjectCreatorIDEOptionsIgnoreCompiler2=\
+ -ignorePath_TARGET compiler2 \
+ -ignorePath_TARGET tiered \
  -ignorePath_TARGET src/share/vm/opto \
  -ignorePath_TARGET src/share/vm/libadt \
  -ignorePath_TARGET adfiles \
@@ -209,6 +228,7 @@ $(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=kernel) \
 ##################################################
 ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
  -define_compiler1 COMPILER1 \
+ -ignorePath_compiler1 core \
 $(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=compiler1)
 
 ##################################################
@@ -217,18 +237,19 @@ $(ProjectCreatorIDEOptionsIgnoreCompiler2:TARGET=compiler1)
 #NOTE! This list must be kept in sync with GENERATED_NAMES in adlc.make.
 ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
  -define_compiler2 COMPILER2 \
+ -ignorePath_compiler2 core \
  -additionalFile_compiler2 $(Platform_arch_model).ad \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model).cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model).hpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_clone.cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_expand.cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_format.cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_gen.cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_misc.cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_peephole.cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles ad_$(Platform_arch_model)_pipeline.cpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles adGlobals_$(Platform_arch_model).hpp \
- -additionalGeneratedFile_compiler2 $(HOTSPOTBUILDSPACE)/%f/generated/adfiles dfa_$(Platform_arch_model).cpp \
+ -additionalFile_compiler2 ad_$(Platform_arch_model).cpp \
+ -additionalFile_compiler2 ad_$(Platform_arch_model).hpp \
+ -additionalFile_compiler2 ad_$(Platform_arch_model)_clone.cpp \
+ -additionalFile_compiler2 ad_$(Platform_arch_model)_expand.cpp \
+ -additionalFile_compiler2 ad_$(Platform_arch_model)_format.cpp \
+ -additionalFile_compiler2 ad_$(Platform_arch_model)_gen.cpp \
+ -additionalFile_compiler2 ad_$(Platform_arch_model)_misc.cpp \
+ -additionalFile_compiler2 ad_$(Platform_arch_model)_peephole.cpp \
+ -additionalFile_compiler2 ad_$(Platform_arch_model)_pipeline.cpp \
+ -additionalFile_compiler2 adGlobals_$(Platform_arch_model).hpp \
+ -additionalFile_compiler2 dfa_$(Platform_arch_model).cpp \
  $(ProjectCreatorIDEOptionsIgnoreCompiler1:TARGET=compiler2)
 
 # Add in the jvmti (JSR-163) options
@@ -237,8 +258,8 @@ ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
 #       code merge was done correctly (@see jvmti.make and jvmtiEnvFill.java).
 #       If so, they would then check it in as a new version of jvmtiEnv.cpp.
 ProjectCreatorIDEOptions=$(ProjectCreatorIDEOptions) \
- -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles jvmtiEnv.hpp \
- -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles jvmtiEnter.cpp \
- -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles jvmtiEnterTrace.cpp \
- -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles jvmti.h \
- -additionalGeneratedFile $(HOTSPOTBUILDSPACE)/%f/generated/jvmtifiles bytecodeInterpreterWithChecks.cpp
+ -additionalFile jvmtiEnv.hpp \
+ -additionalFile jvmtiEnter.cpp \
+ -additionalFile jvmtiEnterTrace.cpp \
+ -additionalFile jvmti.h \
+ -additionalFile bytecodeInterpreterWithChecks.cpp
diff --git a/hotspot/make/windows/makefiles/rules.make b/hotspot/make/windows/makefiles/rules.make
index 3e8d8549a59..693c1926526 100644
--- a/hotspot/make/windows/makefiles/rules.make
+++ b/hotspot/make/windows/makefiles/rules.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/sa.make b/hotspot/make/windows/makefiles/sa.make
index 9391ce88fd5..9363f0e5e6f 100644
--- a/hotspot/make/windows/makefiles/sa.make
+++ b/hotspot/make/windows/makefiles/sa.make
@@ -69,8 +69,8 @@ $(GENERATED)/sa-jdi.jar: $(AGENT_FILES)
 	$(RUN_JAR) uf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector
 	$(RUN_JAVAH) -classpath $(SA_CLASSDIR) -jni sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal
 	$(RUN_JAVAH) -classpath $(SA_CLASSDIR) -jni sun.jvm.hotspot.debugger.x86.X86ThreadContext 
-	$(RUN_JAVAH) -classpath $(SA_CLASSDIR) -jni sun.jvm.hotspot.debugger.ia64.IA64ThreadContext 
 	$(RUN_JAVAH) -classpath $(SA_CLASSDIR) -jni sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext 
+	$(RUN_JAVAH) -classpath $(SA_CLASSDIR) -jni sun.jvm.hotspot.asm.Disassembler
 
 
 
diff --git a/hotspot/make/windows/makefiles/sanity.make b/hotspot/make/windows/makefiles/sanity.make
index 23e8f4b354c..86c6b59aefe 100644
--- a/hotspot/make/windows/makefiles/sanity.make
+++ b/hotspot/make/windows/makefiles/sanity.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/shared.make b/hotspot/make/windows/makefiles/shared.make
index b525cf7b265..06cd75f0e5e 100644
--- a/hotspot/make/windows/makefiles/shared.make
+++ b/hotspot/make/windows/makefiles/shared.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/makefiles/vm.make b/hotspot/make/windows/makefiles/vm.make
index ee878fe7343..b1e71de0e5a 100644
--- a/hotspot/make/windows/makefiles/vm.make
+++ b/hotspot/make/windows/makefiles/vm.make
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/make/windows/projectfiles/common/Makefile b/hotspot/make/windows/projectfiles/common/Makefile
index 1b037a185a0..f14f9c4ba07 100644
--- a/hotspot/make/windows/projectfiles/common/Makefile
+++ b/hotspot/make/windows/projectfiles/common/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp b/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp
index 22cf4ced748..25c850c8b46 100644
--- a/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/assembler_sparc.cpp
@@ -725,24 +725,6 @@ void MacroAssembler::jump(const AddressLiteral& addrlit, Register temp, int offs
 }
 
 
-// Convert to C varargs format
-void MacroAssembler::set_varargs( Argument inArg, Register d ) {
-  // spill register-resident args to their memory slots
-  // (SPARC calling convention requires callers to have already preallocated these)
-  // Note that the inArg might in fact be an outgoing argument,
-  // if a leaf routine or stub does some tricky argument shuffling.
-  // This routine must work even though one of the saved arguments
-  // is in the d register (e.g., set_varargs(Argument(0, false), O0)).
-  for (Argument savePtr = inArg;
-       savePtr.is_register();
-       savePtr = savePtr.successor()) {
-    st_ptr(savePtr.as_register(), savePtr.address_in_frame());
-  }
-  // return the address of the first memory slot
-  Address a = inArg.address_in_frame();
-  add(a.base(), a.disp(), d);
-}
-
 // Conditional breakpoint (for assertion checks in assembly code)
 void MacroAssembler::breakpoint_trap(Condition c, CC cc) {
   trap(c, cc, G0, ST_RESERVED_FOR_USER_0);
@@ -1659,6 +1641,21 @@ void  MacroAssembler::set_narrow_oop(jobject obj, Register d) {
 
 }
 
+void  MacroAssembler::set_narrow_klass(Klass* k, Register d) {
+  assert(oop_recorder() != NULL, "this assembler needs an OopRecorder");
+  int klass_index = oop_recorder()->find_index(k);
+  RelocationHolder rspec = metadata_Relocation::spec(klass_index);
+  narrowOop encoded_k = oopDesc::encode_klass(k);
+
+  assert_not_delayed();
+  // Relocation with special format (see relocInfo_sparc.hpp).
+  relocate(rspec, 1);
+  // Assembler::sethi(encoded_k, d);
+  emit_long( op(branch_op) | rd(d) | op2(sethi_op2) | hi22(encoded_k) );
+  // Don't add relocation for 'add'. Do patching during 'sethi' processing.
+  add(d, low10(encoded_k), d);
+
+}
 
 void MacroAssembler::align(int modulus) {
   while (offset() % modulus != 0) nop();
@@ -2943,6 +2940,20 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
   assert(itable_index.is_constant() || itable_index.as_register() == method_result,
          "caller must use same register for non-constant itable index as for method");
 
+  Label L_no_such_interface_restore;
+  bool did_save = false;
+  if (scan_temp == noreg || sethi_temp == noreg) {
+    Register recv_2 = recv_klass->is_global() ? recv_klass : L0;
+    Register intf_2 = intf_klass->is_global() ? intf_klass : L1;
+    assert(method_result->is_global(), "must be able to return value");
+    scan_temp  = L2;
+    sethi_temp = L3;
+    save_frame_and_mov(0, recv_klass, recv_2, intf_klass, intf_2);
+    recv_klass = recv_2;
+    intf_klass = intf_2;
+    did_save = true;
+  }
+
   // Compute start of first itableOffsetEntry (which is at the end of the vtable)
   int vtable_base = InstanceKlass::vtable_start_offset() * wordSize;
   int scan_step   = itableOffsetEntry::size() * wordSize;
@@ -2981,7 +2992,7 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
   //     result = (klass + scan->offset() + itable_index);
   //   }
   // }
-  Label search, found_method;
+  Label L_search, L_found_method;
 
   for (int peel = 1; peel >= 0; peel--) {
     // %%%% Could load both offset and interface in one ldx, if they were
@@ -2991,23 +3002,23 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
     // Check that this entry is non-null.  A null entry means that
     // the receiver class doesn't implement the interface, and wasn't the
     // same as when the caller was compiled.
-    bpr(Assembler::rc_z, false, Assembler::pn, method_result, L_no_such_interface);
+    bpr(Assembler::rc_z, false, Assembler::pn, method_result, did_save ? L_no_such_interface_restore : L_no_such_interface);
     delayed()->cmp(method_result, intf_klass);
 
     if (peel) {
-      brx(Assembler::equal,    false, Assembler::pt, found_method);
+      brx(Assembler::equal,    false, Assembler::pt, L_found_method);
     } else {
-      brx(Assembler::notEqual, false, Assembler::pn, search);
+      brx(Assembler::notEqual, false, Assembler::pn, L_search);
       // (invert the test to fall through to found_method...)
     }
     delayed()->add(scan_temp, scan_step, scan_temp);
 
     if (!peel)  break;
 
-    bind(search);
+    bind(L_search);
   }
 
-  bind(found_method);
+  bind(L_found_method);
 
   // Got a hit.
   int ito_offset = itableOffsetEntry::offset_offset_in_bytes();
@@ -3015,6 +3026,18 @@ void MacroAssembler::lookup_interface_method(Register recv_klass,
   ito_offset -= scan_step;
   lduw(scan_temp, ito_offset, scan_temp);
   ld_ptr(recv_klass, scan_temp, method_result);
+
+  if (did_save) {
+    Label L_done;
+    ba(L_done);
+    delayed()->restore();
+
+    bind(L_no_such_interface_restore);
+    ba(L_no_such_interface);
+    delayed()->restore();
+
+    bind(L_done);
+  }
 }
 
 
@@ -4652,7 +4675,7 @@ void MacroAssembler::load_klass(Register src_oop, Register klass) {
   // if this changes, change that.
   if (UseCompressedKlassPointers) {
     lduw(src_oop, oopDesc::klass_offset_in_bytes(), klass);
-    decode_heap_oop_not_null(klass);
+    decode_klass_not_null(klass);
   } else {
     ld_ptr(src_oop, oopDesc::klass_offset_in_bytes(), klass);
   }
@@ -4661,7 +4684,7 @@ void MacroAssembler::load_klass(Register src_oop, Register klass) {
 void MacroAssembler::store_klass(Register klass, Register dst_oop) {
   if (UseCompressedKlassPointers) {
     assert(dst_oop != klass, "not enough registers");
-    encode_heap_oop_not_null(klass);
+    encode_klass_not_null(klass);
     st(klass, dst_oop, oopDesc::klass_offset_in_bytes());
   } else {
     st_ptr(klass, dst_oop, oopDesc::klass_offset_in_bytes());
@@ -4821,17 +4844,58 @@ void  MacroAssembler::decode_heap_oop_not_null(Register src, Register dst) {
   // pd_code_size_limit.
   // Also do not verify_oop as this is called by verify_oop.
   assert (UseCompressedOops, "must be compressed");
-  assert (Universe::heap() != NULL, "java heap should be initialized");
   assert (LogMinObjAlignmentInBytes == Universe::narrow_oop_shift(), "decode alg wrong");
   sllx(src, LogMinObjAlignmentInBytes, dst);
   if (Universe::narrow_oop_base() != NULL)
     add(dst, G6_heapbase, dst);
 }
 
+void MacroAssembler::encode_klass_not_null(Register r) {
+  assert(Metaspace::is_initialized(), "metaspace should be initialized");
+  assert (UseCompressedKlassPointers, "must be compressed");
+  assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
+  if (Universe::narrow_klass_base() != NULL)
+    sub(r, G6_heapbase, r);
+  srlx(r, LogKlassAlignmentInBytes, r);
+}
+
+void MacroAssembler::encode_klass_not_null(Register src, Register dst) {
+  assert(Metaspace::is_initialized(), "metaspace should be initialized");
+  assert (UseCompressedKlassPointers, "must be compressed");
+  assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
+  if (Universe::narrow_klass_base() == NULL) {
+    srlx(src, LogKlassAlignmentInBytes, dst);
+  } else {
+    sub(src, G6_heapbase, dst);
+    srlx(dst, LogKlassAlignmentInBytes, dst);
+  }
+}
+
+void  MacroAssembler::decode_klass_not_null(Register r) {
+  assert(Metaspace::is_initialized(), "metaspace should be initialized");
+  // Do not add assert code to this unless you change vtableStubs_sparc.cpp
+  // pd_code_size_limit.
+  assert (UseCompressedKlassPointers, "must be compressed");
+  assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
+  sllx(r, LogKlassAlignmentInBytes, r);
+  if (Universe::narrow_klass_base() != NULL)
+    add(r, G6_heapbase, r);
+}
+
+void  MacroAssembler::decode_klass_not_null(Register src, Register dst) {
+  assert(Metaspace::is_initialized(), "metaspace should be initialized");
+  // Do not add assert code to this unless you change vtableStubs_sparc.cpp
+  // pd_code_size_limit.
+  assert (UseCompressedKlassPointers, "must be compressed");
+  assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
+  sllx(src, LogKlassAlignmentInBytes, dst);
+  if (Universe::narrow_klass_base() != NULL)
+    add(dst, G6_heapbase, dst);
+}
+
 void MacroAssembler::reinit_heapbase() {
-  if (UseCompressedOops) {
-    // call indirectly to solve generation ordering problem
-    AddressLiteral base(Universe::narrow_oop_base_addr());
+  if (UseCompressedOops || UseCompressedKlassPointers) {
+    AddressLiteral base(Universe::narrow_ptrs_base_addr());
     load_ptr_contents(base, G6_heapbase);
   }
 }
diff --git a/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp b/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp
index 99153f33b4f..f9b893258be 100644
--- a/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp
+++ b/hotspot/src/cpu/sparc/vm/assembler_sparc.hpp
@@ -2280,6 +2280,11 @@ public:
   void encode_heap_oop_not_null(Register src, Register dst);
   void decode_heap_oop_not_null(Register src, Register dst);
 
+  void encode_klass_not_null(Register r);
+  void decode_klass_not_null(Register r);
+  void encode_klass_not_null(Register src, Register dst);
+  void decode_klass_not_null(Register src, Register dst);
+
   // Support for managing the JavaThread pointer (i.e.; the reference to
   // thread-local information).
   void get_thread();                                // load G2_thread
@@ -2409,6 +2414,7 @@ public:
   inline void    set_metadata             (const AddressLiteral& obj_addr, Register d); // same as load_address
 
   void set_narrow_oop( jobject obj, Register d );
+  void set_narrow_klass( Klass* k, Register d );
 
   // nop padding
   void align(int modulus);
@@ -2428,9 +2434,6 @@ public:
   static void test();
 #endif
 
-  // convert an incoming arglist to varargs format; put the pointer in d
-  void set_varargs( Argument a, Register d );
-
   int total_frame_size_in_bytes(int extraWords);
 
   // used when extraWords known statically
diff --git a/hotspot/src/cpu/sparc/vm/assembler_sparc.inline.hpp b/hotspot/src/cpu/sparc/vm/assembler_sparc.inline.hpp
index bccbe13d41b..63359d511eb 100644
--- a/hotspot/src/cpu/sparc/vm/assembler_sparc.inline.hpp
+++ b/hotspot/src/cpu/sparc/vm/assembler_sparc.inline.hpp
@@ -347,7 +347,11 @@ inline void Assembler::sub(Register s1, RegisterOrConstant s2, Register d, int o
 inline void Assembler::swap(    Register s1, Register s2, Register d) { v9_dep();  emit_long( op(ldst_op) | rd(d) | op3(swap_op3) | rs1(s1) | rs2(s2) ); }
 inline void Assembler::swap(    Register s1, int simm13a, Register d) { v9_dep();  emit_data( op(ldst_op) | rd(d) | op3(swap_op3) | rs1(s1) | immed(true) | simm(simm13a, 13)); }
 
-inline void Assembler::swap(    Address& a, Register d, int offset ) { relocate(a.rspec(offset)); swap(  a.base(), a.disp() + offset, d ); }
+inline void Assembler::swap(    Address& a, Register d, int offset ) {
+  relocate(a.rspec(offset));
+  if (a.has_index()) { assert(offset == 0, ""); swap( a.base(), a.index(), d         ); }
+  else               {                          swap( a.base(), a.disp() + offset, d ); }
+}
 
 
 // Use the right loads/stores for the platform
diff --git a/hotspot/src/cpu/sparc/vm/c1_FrameMap_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_FrameMap_sparc.cpp
index 0dce2505412..97ec2239549 100644
--- a/hotspot/src/cpu/sparc/vm/c1_FrameMap_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/c1_FrameMap_sparc.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/c1_FrameMap_sparc.hpp b/hotspot/src/cpu/sparc/vm/c1_FrameMap_sparc.hpp
index 4eb731d7b4f..ae4262bb73b 100644
--- a/hotspot/src/cpu/sparc/vm/c1_FrameMap_sparc.hpp
+++ b/hotspot/src/cpu/sparc/vm/c1_FrameMap_sparc.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
index 2890c56d81a..27bf44244b5 100644
--- a/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
@@ -105,6 +105,11 @@ bool LIR_Assembler::is_single_instruction(LIR_Op* op) {
         if (src->is_address() && !src->is_stack() && (src->type() == T_OBJECT || src->type() == T_ARRAY)) return false;
       }
 
+      if (UseCompressedKlassPointers) {
+        if (src->is_address() && !src->is_stack() && src->type() == T_ADDRESS &&
+            src->as_address_ptr()->disp() == oopDesc::klass_offset_in_bytes()) return false;
+      }
+
       if (dst->is_register()) {
         if (src->is_address() && Assembler::is_simm13(src->as_address_ptr()->disp())) {
           return !PatchALot;
@@ -969,8 +974,18 @@ int LIR_Assembler::load(Register base, int offset, LIR_Opr to_reg, BasicType typ
 #endif
         }
         break;
-      case T_METADATA:
-      case T_ADDRESS:  __ ld_ptr(base, offset, to_reg->as_register()); break;
+      case T_METADATA:  __ ld_ptr(base, offset, to_reg->as_register()); break;
+      case T_ADDRESS:
+#ifdef _LP64
+        if (offset == oopDesc::klass_offset_in_bytes() && UseCompressedKlassPointers) {
+          __ lduw(base, offset, to_reg->as_register());
+          __ decode_klass_not_null(to_reg->as_register());
+        } else
+#endif
+        {
+          __ ld_ptr(base, offset, to_reg->as_register());
+        }
+        break;
       case T_ARRAY : // fall through
       case T_OBJECT:
         {
@@ -1315,7 +1330,13 @@ void LIR_Assembler::const2reg(LIR_Opr src, LIR_Opr dest, LIR_PatchCode patch_cod
 
 Address LIR_Assembler::as_Address(LIR_Address* addr) {
   Register reg = addr->base()->as_register();
-  return Address(reg, addr->disp());
+  LIR_Opr index = addr->index();
+  if (index->is_illegal()) {
+    return Address(reg, addr->disp());
+  } else {
+    assert (addr->disp() == 0, "unsupported address mode");
+    return Address(reg, index->as_pointer_register());
+  }
 }
 
 
@@ -2284,7 +2305,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
         __ mov(length, len);
         __ load_klass(dst, tmp);
 
-        int ek_offset = in_bytes(objArrayKlass::element_klass_offset());
+        int ek_offset = in_bytes(ObjArrayKlass::element_klass_offset());
         __ ld_ptr(tmp, ek_offset, super_k);
 
         int sco_offset = in_bytes(Klass::super_check_offset_offset());
@@ -2338,7 +2359,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
     if (UseCompressedKlassPointers) {
       // tmp holds the default type. It currently comes uncompressed after the
       // load of a constant, so encode it.
-      __ encode_heap_oop(tmp);
+      __ encode_klass_not_null(tmp);
       // load the raw value of the dst klass, since we will be comparing
       // uncompressed values directly.
       __ lduw(dst, oopDesc::klass_offset_in_bytes(), tmp2);
@@ -2775,7 +2796,7 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
     __ load_klass(value, klass_RInfo);
 
     // get instance klass
-    __ ld_ptr(Address(k_RInfo, objArrayKlass::element_klass_offset()), k_RInfo);
+    __ ld_ptr(Address(k_RInfo, ObjArrayKlass::element_klass_offset()), k_RInfo);
     // perform the fast part of the checking logic
     __ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, O7, success_target, failure_target, NULL);
 
@@ -3438,7 +3459,28 @@ void LIR_Assembler::peephole(LIR_List* lir) {
   }
 }
 
+void LIR_Assembler::atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr dest, LIR_Opr tmp) {
+  LIR_Address* addr = src->as_address_ptr();
 
+  assert(data == dest, "swap uses only 2 operands");
+  assert (code == lir_xchg, "no xadd on sparc");
 
+  if (data->type() == T_INT) {
+    __ swap(as_Address(addr), data->as_register());
+  } else if (data->is_oop()) {
+    Register obj = data->as_register();
+    Register narrow = tmp->as_register();
+#ifdef _LP64
+    assert(UseCompressedOops, "swap is 32bit only");
+    __ encode_heap_oop(obj, narrow);
+    __ swap(as_Address(addr), narrow);
+    __ decode_heap_oop(narrow, obj);
+#else
+    __ swap(as_Address(addr), obj);
+#endif
+  } else {
+    ShouldNotReachHere();
+  }
+}
 
 #undef __
diff --git a/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.hpp b/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.hpp
index 1fa8e24565c..1b13f28f127 100644
--- a/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.hpp
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp
index 75b7b6cdfa9..2d4b3a2f1d1 100644
--- a/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp
@@ -1204,3 +1204,58 @@ void LIRGenerator::get_Object_unsafe(LIR_Opr dst, LIR_Opr src, LIR_Opr offset,
     __ load(addr, dst);
   }
 }
+
+void LIRGenerator::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {
+  BasicType type = x->basic_type();
+  LIRItem src(x->object(), this);
+  LIRItem off(x->offset(), this);
+  LIRItem value(x->value(), this);
+
+  src.load_item();
+  value.load_item();
+  off.load_nonconstant();
+
+  LIR_Opr dst = rlock_result(x, type);
+  LIR_Opr data = value.result();
+  bool is_obj = (type == T_ARRAY || type == T_OBJECT);
+  LIR_Opr offset = off.result();
+
+  if (data != dst) {
+    __ move(data, dst);
+    data = dst;
+  }
+
+  assert (!x->is_add() && (type == T_INT || (is_obj LP64_ONLY(&& UseCompressedOops))), "unexpected type");
+  LIR_Address* addr;
+  if (offset->is_constant()) {
+
+#ifdef _LP64
+    jlong l = offset->as_jlong();
+    assert((jlong)((jint)l) == l, "offset too large for constant");
+    jint c = (jint)l;
+#else
+    jint c = offset->as_jint();
+#endif
+    addr = new LIR_Address(src.result(), c, type);
+  } else {
+    addr = new LIR_Address(src.result(), offset, type);
+  }
+
+  LIR_Opr tmp = LIR_OprFact::illegalOpr;
+  LIR_Opr ptr = LIR_OprFact::illegalOpr;
+
+  if (is_obj) {
+    // Do the pre-write barrier, if any.
+    // barriers on sparc don't work with a base + index address
+    tmp = FrameMap::G3_opr;
+    ptr = new_pointer_register();
+    __ add(src.result(), off.result(), ptr);
+    pre_barrier(ptr, LIR_OprFact::illegalOpr /* pre_val */,
+                true /* do_load */, false /* patch */, NULL);
+  }
+  __ xchg(LIR_OprFact::address(addr), data, dst, tmp);
+  if (is_obj) {
+    // Seems to be a precise address
+    post_barrier(ptr, data);
+  }
+}
diff --git a/hotspot/src/cpu/sparc/vm/c1_LinearScan_sparc.hpp b/hotspot/src/cpu/sparc/vm/c1_LinearScan_sparc.hpp
index 46902b68f52..164c000de21 100644
--- a/hotspot/src/cpu/sparc/vm/c1_LinearScan_sparc.hpp
+++ b/hotspot/src/cpu/sparc/vm/c1_LinearScan_sparc.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp b/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp
index be56a7031e3..05db22c93f9 100644
--- a/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/c1_MacroAssembler_sparc.cpp
@@ -189,7 +189,7 @@ void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register
   if (UseCompressedKlassPointers) {
     // Save klass
     mov(klass, t1);
-    encode_heap_oop_not_null(t1);
+    encode_klass_not_null(t1);
     stw(t1, obj, oopDesc::klass_offset_in_bytes());
   } else {
     st_ptr(klass, obj, oopDesc::klass_offset_in_bytes());
diff --git a/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp b/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp
index d92291fb36e..2e2040efc54 100644
--- a/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/interp_masm_sparc.cpp
@@ -1395,12 +1395,17 @@ void InterpreterMacroAssembler::test_invocation_counter_for_mdp(Register invocat
   AddressLiteral profile_limit((address) &InvocationCounter::InterpreterProfileLimit);
   sethi(profile_limit, Rtmp);
   ld(Rtmp, profile_limit.low10(), Rtmp);
-  cmp_and_br_short(invocation_count, Rtmp, Assembler::lessUnsigned, Assembler::pn, profile_continue);
+  cmp(invocation_count, Rtmp);
+  // Use long branches because call_VM() code and following code generated by
+  // test_backedge_count_for_osr() is large in debug VM.
+  br(Assembler::lessUnsigned, false, Assembler::pn, profile_continue);
+  delayed()->nop();
 
   // Build it now.
   call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::profile_method));
   set_method_data_pointer_for_bcp();
-  ba_short(profile_continue);
+  ba(profile_continue);
+  delayed()->nop();
   bind(done);
 }
 
diff --git a/hotspot/src/cpu/sparc/vm/interpreterGenerator_sparc.hpp b/hotspot/src/cpu/sparc/vm/interpreterGenerator_sparc.hpp
index 2f9fac8ce1c..0558b7b3c3c 100644
--- a/hotspot/src/cpu/sparc/vm/interpreterGenerator_sparc.hpp
+++ b/hotspot/src/cpu/sparc/vm/interpreterGenerator_sparc.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp
index 3e6accae3d6..9245f3b40ff 100644
--- a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.cpp
@@ -121,6 +121,7 @@ void MethodHandles::verify_ref_kind(MacroAssembler* _masm, int ref_kind, Registe
 void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register method, Register target, Register temp,
                                             bool for_compiler_entry) {
   assert(method == G5_method, "interpreter calling convention");
+  assert_different_registers(method, target, temp);
 
   if (!for_compiler_entry && JvmtiExport::can_post_interpreter_events()) {
     Label run_compiled_code;
@@ -153,19 +154,19 @@ void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
   BLOCK_COMMENT("jump_to_lambda_form {");
   // This is the initial entry point of a lazy method handle.
   // After type checking, it picks up the invoker from the LambdaForm.
-  assert_different_registers(recv, method_temp, temp2, temp3);
+  assert_different_registers(recv, method_temp, temp2);  // temp3 is only passed on
   assert(method_temp == G5_method, "required register for loading method");
 
   //NOT_PRODUCT({ FlagSetting fs(TraceMethodHandles, true); trace_method_handle(_masm, "LZMH"); });
 
   // Load the invoker, as MH -> MH.form -> LF.vmentry
   __ verify_oop(recv);
-  __ load_heap_oop(Address(recv,        NONZERO(java_lang_invoke_MethodHandle::form_offset_in_bytes())),       method_temp);
+  __ load_heap_oop(Address(recv,        NONZERO(java_lang_invoke_MethodHandle::form_offset_in_bytes())),   method_temp);
   __ verify_oop(method_temp);
-  __ load_heap_oop(Address(method_temp, NONZERO(java_lang_invoke_LambdaForm::vmentry_offset_in_bytes())), method_temp);
+  __ load_heap_oop(Address(method_temp, NONZERO(java_lang_invoke_LambdaForm::vmentry_offset_in_bytes())),  method_temp);
   __ verify_oop(method_temp);
   // the following assumes that a Method* is normally compressed in the vmtarget field:
-  __ ld_ptr(Address(method_temp, NONZERO(java_lang_invoke_MemberName::vmtarget_offset_in_bytes())),     method_temp);
+  __ ld_ptr(       Address(method_temp, NONZERO(java_lang_invoke_MemberName::vmtarget_offset_in_bytes())), method_temp);
 
   if (VerifyMethodHandles && !for_compiler_entry) {
     // make sure recv is already on stack
@@ -207,8 +208,6 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
   Register O1_scratch    = O1;
   Register O4_param_size = O4;   // size of parameters
 
-  address code_start = __ pc();
-
   // here's where control starts out:
   __ align(CodeEntryAlignment);
   address entry_point = __ pc();
@@ -251,22 +250,9 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
   // O4_first_arg_addr is live!
 
   if (TraceMethodHandles) {
-    const char* name = vmIntrinsics::name_at(iid);
-    if (*name == '_')  name += 1;
-    const size_t len = strlen(name) + 50;
-    char* qname = NEW_C_HEAP_ARRAY(char, len, mtInternal);
-    const char* suffix = "";
-    if (vmIntrinsics::method_for(iid) == NULL ||
-        !vmIntrinsics::method_for(iid)->access_flags().is_public()) {
-      if (is_signature_polymorphic_static(iid))
-        suffix = "/static";
-      else
-        suffix = "/private";
-    }
-    jio_snprintf(qname, len, "MethodHandle::interpreter_entry::%s%s", name, suffix);
     if (O0_mh != noreg)
       __ mov(O0_mh, G3_method_handle);  // make stub happy
-    trace_method_handle(_masm, qname);
+    trace_method_handle_interpreter_entry(_masm, iid);
   }
 
   if (iid == vmIntrinsics::_invokeBasic) {
@@ -286,14 +272,6 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
     generate_method_handle_dispatch(_masm, iid, O0_recv, G5_member, not_for_compiler_entry);
   }
 
-  if (PrintMethodHandleStubs) {
-    address code_end = __ pc();
-    tty->print_cr("--------");
-    tty->print_cr("method handle interpreter entry for %s", vmIntrinsics::name_at(iid));
-    Disassembler::decode(code_start, code_end);
-    tty->cr();
-  }
-
   return entry_point;
 }
 
@@ -303,25 +281,25 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
                                                     Register member_reg,
                                                     bool for_compiler_entry) {
   assert(is_signature_polymorphic(iid), "expected invoke iid");
-  // temps used in this code are not used in *either* compiled or interpreted calling sequences
   Register temp1 = (for_compiler_entry ? G1_scratch : O1);
-  Register temp2 = (for_compiler_entry ? G4_scratch : O4);
-  Register temp3 = G3_scratch;
-  Register temp4 = (for_compiler_entry ? noreg      : O2);
+  Register temp2 = (for_compiler_entry ? G3_scratch : O2);
+  Register temp3 = (for_compiler_entry ? G4_scratch : O3);
+  Register temp4 = (for_compiler_entry ? noreg      : O4);
   if (for_compiler_entry) {
     assert(receiver_reg == (iid == vmIntrinsics::_linkToStatic ? noreg : O0), "only valid assignment");
-    assert_different_registers(temp1,      O0, O1, O2, O3, O4, O5);
-    assert_different_registers(temp2,      O0, O1, O2, O3, O4, O5);
-    assert_different_registers(temp3,      O0, O1, O2, O3, O4, O5);
-    assert_different_registers(temp4,      O0, O1, O2, O3, O4, O5);
+    assert_different_registers(temp1, O0, O1, O2, O3, O4, O5);
+    assert_different_registers(temp2, O0, O1, O2, O3, O4, O5);
+    assert_different_registers(temp3, O0, O1, O2, O3, O4, O5);
+    assert_different_registers(temp4, O0, O1, O2, O3, O4, O5);
+  } else {
+    assert_different_registers(temp1, temp2, temp3, temp4, O5_savedSP);  // don't trash lastSP
   }
   if (receiver_reg != noreg)  assert_different_registers(temp1, temp2, temp3, temp4, receiver_reg);
   if (member_reg   != noreg)  assert_different_registers(temp1, temp2, temp3, temp4, member_reg);
-  if (!for_compiler_entry)    assert_different_registers(temp1, temp2, temp3, temp4, O5_savedSP);  // don't trash lastSP
 
   if (iid == vmIntrinsics::_invokeBasic) {
     // indirect through MH.form.vmentry.vmtarget
-    jump_to_lambda_form(_masm, receiver_reg, G5_method, temp2, temp3, for_compiler_entry);
+    jump_to_lambda_form(_masm, receiver_reg, G5_method, temp1, temp2, for_compiler_entry);
 
   } else {
     // The method is a member invoker used by direct method handles.
@@ -378,24 +356,22 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
     //  member_reg - MemberName that was the trailing argument
     //  temp1_recv_klass - klass of stacked receiver, if needed
     //  O5_savedSP - interpreter linkage (if interpreted)
-    //  O0..O7,G1,G4 - compiler arguments (if compiled)
+    //  O0..O5 - compiler arguments (if compiled)
 
-    bool method_is_live = false;
+    Label L_incompatible_class_change_error;
     switch (iid) {
     case vmIntrinsics::_linkToSpecial:
       if (VerifyMethodHandles) {
-        verify_ref_kind(_masm, JVM_REF_invokeSpecial, member_reg, temp3);
+        verify_ref_kind(_masm, JVM_REF_invokeSpecial, member_reg, temp2);
       }
       __ ld_ptr(member_vmtarget, G5_method);
-      method_is_live = true;
       break;
 
     case vmIntrinsics::_linkToStatic:
       if (VerifyMethodHandles) {
-        verify_ref_kind(_masm, JVM_REF_invokeStatic, member_reg, temp3);
+        verify_ref_kind(_masm, JVM_REF_invokeStatic, member_reg, temp2);
       }
       __ ld_ptr(member_vmtarget, G5_method);
-      method_is_live = true;
       break;
 
     case vmIntrinsics::_linkToVirtual:
@@ -404,7 +380,7 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
       // minus the CP setup and profiling:
 
       if (VerifyMethodHandles) {
-        verify_ref_kind(_masm, JVM_REF_invokeVirtual, member_reg, temp3);
+        verify_ref_kind(_masm, JVM_REF_invokeVirtual, member_reg, temp2);
       }
 
       // pick out the vtable index from the MemberName, and then we can discard it:
@@ -423,7 +399,6 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
 
       // get target Method* & entry point
       __ lookup_virtual_method(temp1_recv_klass, temp2_index, G5_method);
-      method_is_live = true;
       break;
     }
 
@@ -432,13 +407,13 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
       // same as TemplateTable::invokeinterface
       // (minus the CP setup and profiling, with different argument motion)
       if (VerifyMethodHandles) {
-        verify_ref_kind(_masm, JVM_REF_invokeInterface, member_reg, temp3);
+        verify_ref_kind(_masm, JVM_REF_invokeInterface, member_reg, temp2);
       }
 
-      Register temp3_intf = temp3;
-      __ load_heap_oop(member_clazz, temp3_intf);
-      load_klass_from_Class(_masm, temp3_intf, temp2, temp4);
-      __ verify_klass_ptr(temp3_intf);
+      Register temp2_intf = temp2;
+      __ load_heap_oop(member_clazz, temp2_intf);
+      load_klass_from_Class(_masm, temp2_intf, temp3, temp4);
+      __ verify_klass_ptr(temp2_intf);
 
       Register G5_index = G5_method;
       __ ld_ptr(member_vmindex, G5_index);
@@ -450,37 +425,34 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
       }
 
       // given intf, index, and recv klass, dispatch to the implementation method
-      Label L_no_such_interface;
-      Register no_sethi_temp = noreg;
-      __ lookup_interface_method(temp1_recv_klass, temp3_intf,
+      __ lookup_interface_method(temp1_recv_klass, temp2_intf,
                                  // note: next two args must be the same:
                                  G5_index, G5_method,
-                                 temp2, no_sethi_temp,
-                                 L_no_such_interface);
-
-      __ verify_method_ptr(G5_method);
-      jump_from_method_handle(_masm, G5_method, temp2, temp3, for_compiler_entry);
-
-      __ bind(L_no_such_interface);
-      AddressLiteral icce(StubRoutines::throw_IncompatibleClassChangeError_entry());
-      __ jump_to(icce, temp3);
-      __ delayed()->nop();
+                                 temp3, temp4,
+                                 L_incompatible_class_change_error);
       break;
     }
 
     default:
-      fatal(err_msg("unexpected intrinsic %d: %s", iid, vmIntrinsics::name_at(iid)));
+      fatal(err_msg_res("unexpected intrinsic %d: %s", iid, vmIntrinsics::name_at(iid)));
       break;
     }
 
-    if (method_is_live) {
-      // live at this point:  G5_method, O5_savedSP (if interpreted)
+    // Live at this point:
+    //   G5_method
+    //   O5_savedSP (if interpreted)
 
-      // After figuring out which concrete method to call, jump into it.
-      // Note that this works in the interpreter with no data motion.
-      // But the compiled version will require that rcx_recv be shifted out.
-      __ verify_method_ptr(G5_method);
-      jump_from_method_handle(_masm, G5_method, temp1, temp3, for_compiler_entry);
+    // After figuring out which concrete method to call, jump into it.
+    // Note that this works in the interpreter with no data motion.
+    // But the compiled version will require that rcx_recv be shifted out.
+    __ verify_method_ptr(G5_method);
+    jump_from_method_handle(_masm, G5_method, temp1, temp2, for_compiler_entry);
+
+    if (iid == vmIntrinsics::_linkToInterface) {
+      __ BIND(L_incompatible_class_change_error);
+      AddressLiteral icce(StubRoutines::throw_IncompatibleClassChangeError_entry());
+      __ jump_to(icce, temp1);
+      __ delayed()->nop();
     }
   }
 }
diff --git a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.hpp b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.hpp
index 75231984d0e..d58e7d75cd0 100644
--- a/hotspot/src/cpu/sparc/vm/methodHandles_sparc.hpp
+++ b/hotspot/src/cpu/sparc/vm/methodHandles_sparc.hpp
@@ -58,5 +58,3 @@ public:
                                   Register recv, Register method_temp,
                                   Register temp2, Register temp3,
                                   bool for_compiler_entry);
-
-  static void trace_method_handle(MacroAssembler* _masm, const char* adaptername) PRODUCT_RETURN;
diff --git a/hotspot/src/cpu/sparc/vm/relocInfo_sparc.cpp b/hotspot/src/cpu/sparc/vm/relocInfo_sparc.cpp
index fcaaa18a6f4..aeb2420c640 100644
--- a/hotspot/src/cpu/sparc/vm/relocInfo_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/relocInfo_sparc.cpp
@@ -97,8 +97,8 @@ void Relocation::pd_set_data_value(address x, intptr_t o, bool verify_only) {
     jint inst2;
     guarantee(Assembler::inv_op2(inst)==Assembler::sethi_op2, "must be sethi");
     if (format() != 0) {
-      assert(type() == relocInfo::oop_type, "only narrow oops case");
-      jint np = oopDesc::encode_heap_oop((oop)x);
+      assert(type() == relocInfo::oop_type || type() == relocInfo::metadata_type, "only narrow oops or klasses case");
+      jint np = type() == relocInfo::oop_type ? oopDesc::encode_heap_oop((oop)x) : oopDesc::encode_klass((Klass*)x);
       inst &= ~Assembler::hi22(-1);
       inst |=  Assembler::hi22((intptr_t)np);
       if (verify_only) {
diff --git a/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp b/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
index 2968bc8dfa7..bc35d196dcf 100644
--- a/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
@@ -313,6 +313,14 @@ void RegisterSaver::restore_result_registers(MacroAssembler* masm) {
 
 }
 
+// Is vector's size (in bytes) bigger than a size saved by default?
+// 8 bytes FP registers are saved by default on SPARC.
+bool SharedRuntime::is_wide_vector(int size) {
+  // Note, MaxVectorSize == 8 on SPARC.
+  assert(size <= 8, err_msg_res("%d bytes vectors are not supported", size));
+  return size > 8;
+}
+
 // The java_calling_convention describes stack locations as ideal slots on
 // a frame with no abi restrictions. Since we must observe abi restrictions
 // (like the placement of the register window) the slots must be biased by
@@ -364,9 +372,9 @@ static VMRegPair reg64_to_VMRegPair(Register r) {
 // ---------------------------------------------------------------------------
 // The compiled Java calling convention.  The Java convention always passes
 // 64-bit values in adjacent aligned locations (either registers or stack),
-// floats in float registers and doubles in aligned float pairs.  Values are
-// packed in the registers.  There is no backing varargs store for values in
-// registers.  In the 32-bit build, longs are passed in G1 and G4 (cannot be
+// floats in float registers and doubles in aligned float pairs.  There is
+// no backing varargs store for values in registers.
+// In the 32-bit build, longs are passed on the stack (cannot be
 // passed in I's, because longs in I's get their heads chopped off at
 // interrupt).
 int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
@@ -375,76 +383,13 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
                                            int is_outgoing) {
   assert(F31->as_VMReg()->is_reg(), "overlapping stack/register numbers");
 
-  // Convention is to pack the first 6 int/oop args into the first 6 registers
-  // (I0-I5), extras spill to the stack.  Then pack the first 8 float args
-  // into F0-F7, extras spill to the stack.  Then pad all register sets to
-  // align.  Then put longs and doubles into the same registers as they fit,
-  // else spill to the stack.
   const int int_reg_max = SPARC_ARGS_IN_REGS_NUM;
   const int flt_reg_max = 8;
-  //
-  // Where 32-bit 1-reg longs start being passed
-  // In tiered we must pass on stack because c1 can't use a "pair" in a single reg.
-  // So make it look like we've filled all the G regs that c2 wants to use.
-  Register g_reg = TieredCompilation ? noreg : G1;
 
-  // Count int/oop and float args.  See how many stack slots we'll need and
-  // where the longs & doubles will go.
-  int int_reg_cnt   = 0;
-  int flt_reg_cnt   = 0;
-  // int stk_reg_pairs = frame::register_save_words*(wordSize>>2);
-  // int stk_reg_pairs = SharedRuntime::out_preserve_stack_slots();
-  int stk_reg_pairs = 0;
-  for (int i = 0; i < total_args_passed; i++) {
-    switch (sig_bt[i]) {
-    case T_LONG:                // LP64, longs compete with int args
-      assert(sig_bt[i+1] == T_VOID, "");
-#ifdef _LP64
-      if (int_reg_cnt < int_reg_max)  int_reg_cnt++;
-#endif
-      break;
-    case T_OBJECT:
-    case T_ARRAY:
-    case T_ADDRESS: // Used, e.g., in slow-path locking for the lock's stack address
-      if (int_reg_cnt < int_reg_max)  int_reg_cnt++;
-#ifndef _LP64
-      else                            stk_reg_pairs++;
-#endif
-      break;
-    case T_INT:
-    case T_SHORT:
-    case T_CHAR:
-    case T_BYTE:
-    case T_BOOLEAN:
-      if (int_reg_cnt < int_reg_max)  int_reg_cnt++;
-      else                            stk_reg_pairs++;
-      break;
-    case T_FLOAT:
-      if (flt_reg_cnt < flt_reg_max)  flt_reg_cnt++;
-      else                            stk_reg_pairs++;
-      break;
-    case T_DOUBLE:
-      assert(sig_bt[i+1] == T_VOID, "");
-      break;
-    case T_VOID:
-      break;
-    default:
-      ShouldNotReachHere();
-    }
-  }
-
-  // This is where the longs/doubles start on the stack.
-  stk_reg_pairs = (stk_reg_pairs+1) & ~1; // Round
-
-  int flt_reg_pairs = (flt_reg_cnt+1) & ~1;
-
-  // int stk_reg = frame::register_save_words*(wordSize>>2);
-  // int stk_reg = SharedRuntime::out_preserve_stack_slots();
-  int stk_reg = 0;
   int int_reg = 0;
   int flt_reg = 0;
+  int slot = 0;
 
-  // Now do the signature layout
   for (int i = 0; i < total_args_passed; i++) {
     switch (sig_bt[i]) {
     case T_INT:
@@ -461,11 +406,14 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
         Register r = is_outgoing ? as_oRegister(int_reg++) : as_iRegister(int_reg++);
         regs[i].set1(r->as_VMReg());
       } else {
-        regs[i].set1(VMRegImpl::stack2reg(stk_reg++));
+        regs[i].set1(VMRegImpl::stack2reg(slot++));
       }
       break;
 
 #ifdef _LP64
+    case T_LONG:
+      assert(sig_bt[i+1] == T_VOID, "expecting VOID in other half");
+      // fall-through
     case T_OBJECT:
     case T_ARRAY:
     case T_ADDRESS: // Used, e.g., in slow-path locking for the lock's stack address
@@ -473,78 +421,57 @@ int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
         Register r = is_outgoing ? as_oRegister(int_reg++) : as_iRegister(int_reg++);
         regs[i].set2(r->as_VMReg());
       } else {
-        regs[i].set2(VMRegImpl::stack2reg(stk_reg_pairs));
-        stk_reg_pairs += 2;
+        slot = round_to(slot, 2);  // align
+        regs[i].set2(VMRegImpl::stack2reg(slot));
+        slot += 2;
       }
       break;
-#endif // _LP64
-
+#else
     case T_LONG:
       assert(sig_bt[i+1] == T_VOID, "expecting VOID in other half");
-#ifdef _LP64
-        if (int_reg < int_reg_max) {
-          Register r = is_outgoing ? as_oRegister(int_reg++) : as_iRegister(int_reg++);
-          regs[i].set2(r->as_VMReg());
-        } else {
-          regs[i].set2(VMRegImpl::stack2reg(stk_reg_pairs));
-          stk_reg_pairs += 2;
-        }
-#else
-#ifdef COMPILER2
-        // For 32-bit build, can't pass longs in O-regs because they become
-        // I-regs and get trashed.  Use G-regs instead.  G1 and G4 are almost
-        // spare and available.  This convention isn't used by the Sparc ABI or
-        // anywhere else. If we're tiered then we don't use G-regs because c1
-        // can't deal with them as a "pair". (Tiered makes this code think g's are filled)
-        // G0: zero
-        // G1: 1st Long arg
-        // G2: global allocated to TLS
-        // G3: used in inline cache check
-        // G4: 2nd Long arg
-        // G5: used in inline cache check
-        // G6: used by OS
-        // G7: used by OS
-
-        if (g_reg == G1) {
-          regs[i].set2(G1->as_VMReg()); // This long arg in G1
-          g_reg = G4;                  // Where the next arg goes
-        } else if (g_reg == G4) {
-          regs[i].set2(G4->as_VMReg()); // The 2nd long arg in G4
-          g_reg = noreg;               // No more longs in registers
-        } else {
-          regs[i].set2(VMRegImpl::stack2reg(stk_reg_pairs));
-          stk_reg_pairs += 2;
-        }
-#else // COMPILER2
-          regs[i].set2(VMRegImpl::stack2reg(stk_reg_pairs));
-          stk_reg_pairs += 2;
-#endif // COMPILER2
-#endif // _LP64
+      // On 32-bit SPARC put longs always on the stack to keep the pressure off
+      // integer argument registers.  They should be used for oops.
+      slot = round_to(slot, 2);  // align
+      regs[i].set2(VMRegImpl::stack2reg(slot));
+      slot += 2;
+#endif
       break;
 
     case T_FLOAT:
-      if (flt_reg < flt_reg_max) regs[i].set1(as_FloatRegister(flt_reg++)->as_VMReg());
-      else                       regs[i].set1(VMRegImpl::stack2reg(stk_reg++));
-      break;
-    case T_DOUBLE:
-      assert(sig_bt[i+1] == T_VOID, "expecting half");
-      if (flt_reg_pairs + 1 < flt_reg_max) {
-        regs[i].set2(as_FloatRegister(flt_reg_pairs)->as_VMReg());
-        flt_reg_pairs += 2;
+      if (flt_reg < flt_reg_max) {
+        FloatRegister r = as_FloatRegister(flt_reg++);
+        regs[i].set1(r->as_VMReg());
       } else {
-        regs[i].set2(VMRegImpl::stack2reg(stk_reg_pairs));
-        stk_reg_pairs += 2;
+        regs[i].set1(VMRegImpl::stack2reg(slot++));
       }
       break;
-    case T_VOID: regs[i].set_bad();  break; // Halves of longs & doubles
+
+    case T_DOUBLE:
+      assert(sig_bt[i+1] == T_VOID, "expecting half");
+      if (round_to(flt_reg, 2) + 1 < flt_reg_max) {
+        flt_reg = round_to(flt_reg, 2);  // align
+        FloatRegister r = as_FloatRegister(flt_reg);
+        regs[i].set2(r->as_VMReg());
+        flt_reg += 2;
+      } else {
+        slot = round_to(slot, 2);  // align
+        regs[i].set2(VMRegImpl::stack2reg(slot));
+        slot += 2;
+      }
+      break;
+
+    case T_VOID:
+      regs[i].set_bad();   // Halves of longs & doubles
+      break;
+
     default:
-      ShouldNotReachHere();
+      fatal(err_msg_res("unknown basic type %d", sig_bt[i]));
+      break;
     }
   }
 
   // retun the amount of stack space these arguments will need.
-  return stk_reg_pairs;
-
+  return slot;
 }
 
 // Helper class mostly to avoid passing masm everywhere, and handle
@@ -601,8 +528,7 @@ void AdapterGenerator::patch_callers_callsite() {
   Label L;
   __ ld_ptr(G5_method, in_bytes(Method::code_offset()), G3_scratch);
   __ br_null(G3_scratch, false, Assembler::pt, L);
-  // Schedule the branch target address early.
-  __ delayed()->ld_ptr(G5_method, in_bytes(Method::interpreter_entry_offset()), G3_scratch);
+  __ delayed()->nop();
   // Call into the VM to patch the caller, then jump to compiled callee
   __ save_frame(4);     // Args in compiled layout; do not blow them
 
@@ -645,7 +571,6 @@ void AdapterGenerator::patch_callers_callsite() {
   __ ldx(FP, -8 + STACK_BIAS, G1);
   __ ldx(FP, -16 + STACK_BIAS, G4);
   __ mov(L5, G5_method);
-  __ ld_ptr(G5_method, in_bytes(Method::interpreter_entry_offset()), G3_scratch);
 #endif /* _LP64 */
 
   __ restore();      // Restore args
@@ -726,7 +651,7 @@ void AdapterGenerator::gen_c2i_adapter(
                             int comp_args_on_stack, // VMRegStackSlots
                             const BasicType *sig_bt,
                             const VMRegPair *regs,
-                            Label& skip_fixup) {
+                            Label& L_skip_fixup) {
 
   // Before we get into the guts of the C2I adapter, see if we should be here
   // at all.  We've come from compiled code and are attempting to jump to the
@@ -747,7 +672,7 @@ void AdapterGenerator::gen_c2i_adapter(
 
   patch_callers_callsite();
 
-  __ bind(skip_fixup);
+  __ bind(L_skip_fixup);
 
   // Since all args are passed on the stack, total_args_passed*wordSize is the
   // space we need.  Add in varargs area needed by the interpreter. Round up
@@ -757,46 +682,18 @@ void AdapterGenerator::gen_c2i_adapter(
                  (frame::varargs_offset - frame::register_save_words)*wordSize;
   const int extraspace = round_to(arg_size + varargs_area, 2*wordSize);
 
-  int bias = STACK_BIAS;
+  const int bias = STACK_BIAS;
   const int interp_arg_offset = frame::varargs_offset*wordSize +
                         (total_args_passed-1)*Interpreter::stackElementSize;
 
-  Register base = SP;
+  const Register base = SP;
 
-#ifdef _LP64
-  // In the 64bit build because of wider slots and STACKBIAS we can run
-  // out of bits in the displacement to do loads and stores.  Use g3 as
-  // temporary displacement.
-  if (!Assembler::is_simm13(extraspace)) {
-    __ set(extraspace, G3_scratch);
-    __ sub(SP, G3_scratch, SP);
-  } else {
-    __ sub(SP, extraspace, SP);
-  }
+  // Make some extra space on the stack.
+  __ sub(SP, __ ensure_simm13_or_reg(extraspace, G3_scratch), SP);
   set_Rdisp(G3_scratch);
-#else
-  __ sub(SP, extraspace, SP);
-#endif // _LP64
 
-  // First write G1 (if used) to where ever it must go
-  for (int i=0; i<total_args_passed; i++) {
-    const int st_off = interp_arg_offset - (i*Interpreter::stackElementSize) + bias;
-    VMReg r_1 = regs[i].first();
-    VMReg r_2 = regs[i].second();
-    if (r_1 == G1_scratch->as_VMReg()) {
-      if (sig_bt[i] == T_OBJECT || sig_bt[i] == T_ARRAY) {
-        store_c2i_object(G1_scratch, base, st_off);
-      } else if (sig_bt[i] == T_LONG) {
-        assert(!TieredCompilation, "should not use register args for longs");
-        store_c2i_long(G1_scratch, base, st_off, false);
-      } else {
-        store_c2i_int(G1_scratch, base, st_off);
-      }
-    }
-  }
-
-  // Now write the args into the outgoing interpreter space
-  for (int i=0; i<total_args_passed; i++) {
+  // Write the args into the outgoing interpreter space.
+  for (int i = 0; i < total_args_passed; i++) {
     const int st_off = interp_arg_offset - (i*Interpreter::stackElementSize) + bias;
     VMReg r_1 = regs[i].first();
     VMReg r_2 = regs[i].second();
@@ -804,23 +701,9 @@ void AdapterGenerator::gen_c2i_adapter(
       assert(!r_2->is_valid(), "");
       continue;
     }
-    // Skip G1 if found as we did it first in order to free it up
-    if (r_1 == G1_scratch->as_VMReg()) {
-      continue;
-    }
-#ifdef ASSERT
-    bool G1_forced = false;
-#endif // ASSERT
     if (r_1->is_stack()) {        // Pretend stack targets are loaded into G1
-#ifdef _LP64
-      Register ld_off = Rdisp;
-      __ set(reg2offset(r_1) + extraspace + bias, ld_off);
-#else
-      int ld_off = reg2offset(r_1) + extraspace + bias;
-#endif // _LP64
-#ifdef ASSERT
-      G1_forced = true;
-#endif // ASSERT
+      RegisterOrConstant ld_off = reg2offset(r_1) + extraspace + bias;
+      ld_off = __ ensure_simm13_or_reg(ld_off, Rdisp);
       r_1 = G1_scratch->as_VMReg();// as part of the load/store shuffle
       if (!r_2->is_valid()) __ ld (base, ld_off, G1_scratch);
       else                  __ ldx(base, ld_off, G1_scratch);
@@ -831,11 +714,6 @@ void AdapterGenerator::gen_c2i_adapter(
       if (sig_bt[i] == T_OBJECT || sig_bt[i] == T_ARRAY) {
         store_c2i_object(r, base, st_off);
       } else if (sig_bt[i] == T_LONG || sig_bt[i] == T_DOUBLE) {
-#ifndef _LP64
-        if (TieredCompilation) {
-          assert(G1_forced || sig_bt[i] != T_LONG, "should not use register args for longs");
-        }
-#endif // _LP64
         store_c2i_long(r, base, st_off, r_2->is_stack());
       } else {
         store_c2i_int(r, base, st_off);
@@ -851,19 +729,12 @@ void AdapterGenerator::gen_c2i_adapter(
     }
   }
 
-#ifdef _LP64
-  // Need to reload G3_scratch, used for temporary displacements.
+  // Load the interpreter entry point.
   __ ld_ptr(G5_method, in_bytes(Method::interpreter_entry_offset()), G3_scratch);
 
   // Pass O5_savedSP as an argument to the interpreter.
   // The interpreter will restore SP to this value before returning.
-  __ set(extraspace, G1);
-  __ add(SP, G1, O5_savedSP);
-#else
-  // Pass O5_savedSP as an argument to the interpreter.
-  // The interpreter will restore SP to this value before returning.
-  __ add(SP, extraspace, O5_savedSP);
-#endif // _LP64
+  __ add(SP, __ ensure_simm13_or_reg(extraspace, G1), O5_savedSP);
 
   __ mov((frame::varargs_offset)*wordSize -
          1*Interpreter::stackElementSize+bias+BytesPerWord, G1);
@@ -971,7 +842,6 @@ void AdapterGenerator::gen_i2c_adapter(
 
   // Outputs:
   // G2_thread      - TLS
-  // G1, G4         - Outgoing long args in 32-bit build
   // O0-O5          - Outgoing args in compiled layout
   // O6             - Adjusted or restored SP
   // O7             - Valid return address
@@ -1016,10 +886,10 @@ void AdapterGenerator::gen_i2c_adapter(
   // +--------------+ <--- start of outgoing args
   // |  pad, align  |   |
   // +--------------+   |
-  // | ints, floats |   |---Outgoing stack args, packed low.
-  // +--------------+   |   First few args in registers.
-  // :   doubles    :   |
-  // |   longs      |   |
+  // | ints, longs, |   |
+  // |    floats,   |   |---Outgoing stack args.
+  // :    doubles   :   |   First few args in registers.
+  // |              |   |
   // +--------------+ <--- SP' + 16*wordsize
   // |              |
   // :    window    :
@@ -1033,7 +903,6 @@ void AdapterGenerator::gen_i2c_adapter(
   // Cut-out for having no stack args.  Since up to 6 args are passed
   // in registers, we will commonly have no stack args.
   if (comp_args_on_stack > 0) {
-
     // Convert VMReg stack slots to words.
     int comp_words_on_stack = round_to(comp_args_on_stack*VMRegImpl::stack_slot_size, wordSize)>>LogBytesPerWord;
     // Round up to miminum stack alignment, in wordSize
@@ -1044,13 +913,9 @@ void AdapterGenerator::gen_i2c_adapter(
     __ sub(SP, (comp_words_on_stack)*wordSize, SP);
   }
 
-  // Will jump to the compiled code just as if compiled code was doing it.
-  // Pre-load the register-jump target early, to schedule it better.
-  __ ld_ptr(G5_method, in_bytes(Method::from_compiled_offset()), G3);
-
   // Now generate the shuffle code.  Pick up all register args and move the
   // rest through G1_scratch.
-  for (int i=0; i<total_args_passed; i++) {
+  for (int i = 0; i < total_args_passed; i++) {
     if (sig_bt[i] == T_VOID) {
       // Longs and doubles are passed in native word order, but misaligned
       // in the 32-bit build.
@@ -1088,14 +953,13 @@ void AdapterGenerator::gen_i2c_adapter(
               next_arg_slot(ld_off) : arg_slot(ld_off);
         __ ldx(Gargs, slot, r);
 #else
-        // Need to load a 64-bit value into G1/G4, but G1/G4 is being used in the
-        // stack shuffle.  Load the first 2 longs into G1/G4 later.
+        fatal("longs should be on stack");
 #endif
       }
     } else {
       assert(r_1->is_FloatRegister(), "");
       if (!r_2->is_valid()) {
-        __ ldf(FloatRegisterImpl::S, Gargs, arg_slot(ld_off), r_1->as_FloatRegister());
+        __ ldf(FloatRegisterImpl::S, Gargs,      arg_slot(ld_off), r_1->as_FloatRegister());
       } else {
 #ifdef _LP64
         // In V9, doubles are given 2 64-bit slots in the interpreter, but the
@@ -1104,11 +968,11 @@ void AdapterGenerator::gen_i2c_adapter(
         // spare float register.
         RegisterOrConstant slot = (sig_bt[i] == T_LONG || sig_bt[i] == T_DOUBLE) ?
               next_arg_slot(ld_off) : arg_slot(ld_off);
-        __ ldf(FloatRegisterImpl::D, Gargs, slot, r_1->as_FloatRegister());
+        __ ldf(FloatRegisterImpl::D, Gargs,                  slot, r_1->as_FloatRegister());
 #else
         // Need to marshal 64-bit value from misaligned Lesp loads
         __ ldf(FloatRegisterImpl::S, Gargs, next_arg_slot(ld_off), r_1->as_FloatRegister());
-        __ ldf(FloatRegisterImpl::S, Gargs, arg_slot(ld_off), r_2->as_FloatRegister());
+        __ ldf(FloatRegisterImpl::S, Gargs,      arg_slot(ld_off), r_2->as_FloatRegister());
 #endif
       }
     }
@@ -1124,76 +988,35 @@ void AdapterGenerator::gen_i2c_adapter(
       else                  __ stf(FloatRegisterImpl::D, r_1->as_FloatRegister(), SP, slot);
     }
   }
-  bool made_space = false;
-#ifndef _LP64
-  // May need to pick up a few long args in G1/G4
-  bool g4_crushed = false;
-  bool g3_crushed = false;
-  for (int i=0; i<total_args_passed; i++) {
-    if (regs[i].first()->is_Register() && regs[i].second()->is_valid()) {
-      // Load in argument order going down
-      int ld_off = (total_args_passed-i)*Interpreter::stackElementSize;
-      // Need to marshal 64-bit value from misaligned Lesp loads
-      Register r = regs[i].first()->as_Register()->after_restore();
-      if (r == G1 || r == G4) {
-        assert(!g4_crushed, "ordering problem");
-        if (r == G4){
-          g4_crushed = true;
-          __ lduw(Gargs, arg_slot(ld_off)     , G3_scratch); // Load lo bits
-          __ ld  (Gargs, next_arg_slot(ld_off), r);          // Load hi bits
-        } else {
-          // better schedule this way
-          __ ld  (Gargs, next_arg_slot(ld_off), r);          // Load hi bits
-          __ lduw(Gargs, arg_slot(ld_off)     , G3_scratch); // Load lo bits
-        }
-        g3_crushed = true;
-        __ sllx(r, 32, r);
-        __ or3(G3_scratch, r, r);
-      } else {
-        assert(r->is_out(), "longs passed in two O registers");
-        __ ld  (Gargs, arg_slot(ld_off)     , r->successor()); // Load lo bits
-        __ ld  (Gargs, next_arg_slot(ld_off), r);              // Load hi bits
-      }
-    }
-  }
-#endif
 
   // Jump to the compiled code just as if compiled code was doing it.
-  //
-#ifndef _LP64
-    if (g3_crushed) {
-      // Rats load was wasted, at least it is in cache...
-      __ ld_ptr(G5_method, Method::from_compiled_offset(), G3);
-    }
-#endif /* _LP64 */
+  __ ld_ptr(G5_method, in_bytes(Method::from_compiled_offset()), G3);
 
-    // 6243940 We might end up in handle_wrong_method if
-    // the callee is deoptimized as we race thru here. If that
-    // happens we don't want to take a safepoint because the
-    // caller frame will look interpreted and arguments are now
-    // "compiled" so it is much better to make this transition
-    // invisible to the stack walking code. Unfortunately if
-    // we try and find the callee by normal means a safepoint
-    // is possible. So we stash the desired callee in the thread
-    // and the vm will find there should this case occur.
-    Address callee_target_addr(G2_thread, JavaThread::callee_target_offset());
-    __ st_ptr(G5_method, callee_target_addr);
+  // 6243940 We might end up in handle_wrong_method if
+  // the callee is deoptimized as we race thru here. If that
+  // happens we don't want to take a safepoint because the
+  // caller frame will look interpreted and arguments are now
+  // "compiled" so it is much better to make this transition
+  // invisible to the stack walking code. Unfortunately if
+  // we try and find the callee by normal means a safepoint
+  // is possible. So we stash the desired callee in the thread
+  // and the vm will find there should this case occur.
+  Address callee_target_addr(G2_thread, JavaThread::callee_target_offset());
+  __ st_ptr(G5_method, callee_target_addr);
 
-    if (StressNonEntrant) {
-      // Open a big window for deopt failure
-      __ save_frame(0);
-      __ mov(G0, L0);
-      Label loop;
-      __ bind(loop);
-      __ sub(L0, 1, L0);
-      __ br_null_short(L0, Assembler::pt, loop);
+  if (StressNonEntrant) {
+    // Open a big window for deopt failure
+    __ save_frame(0);
+    __ mov(G0, L0);
+    Label loop;
+    __ bind(loop);
+    __ sub(L0, 1, L0);
+    __ br_null_short(L0, Assembler::pt, loop);
+    __ restore();
+  }
 
-      __ restore();
-    }
-
-
-    __ jmpl(G3, 0, G0);
-    __ delayed()->nop();
+  __ jmpl(G3, 0, G0);
+  __ delayed()->nop();
 }
 
 // ---------------------------------------------------------------
@@ -1221,28 +1044,17 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
   // compiled code, which relys solely on SP and not FP, get sick).
 
   address c2i_unverified_entry = __ pc();
-  Label skip_fixup;
+  Label L_skip_fixup;
   {
-#if !defined(_LP64) && defined(COMPILER2)
-    Register R_temp   = L0;   // another scratch register
-#else
-    Register R_temp   = G1;   // another scratch register
-#endif
+    Register R_temp = G1;  // another scratch register
 
     AddressLiteral ic_miss(SharedRuntime::get_ic_miss_stub());
 
     __ verify_oop(O0);
     __ load_klass(O0, G3_scratch);
 
-#if !defined(_LP64) && defined(COMPILER2)
-    __ save(SP, -frame::register_save_words*wordSize, SP);
     __ ld_ptr(G5_method, CompiledICHolder::holder_klass_offset(), R_temp);
     __ cmp(G3_scratch, R_temp);
-    __ restore();
-#else
-    __ ld_ptr(G5_method, CompiledICHolder::holder_klass_offset(), R_temp);
-    __ cmp(G3_scratch, R_temp);
-#endif
 
     Label ok, ok2;
     __ brx(Assembler::equal, false, Assembler::pt, ok);
@@ -1256,8 +1068,8 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
     // the call site corrected.
     __ ld_ptr(G5_method, in_bytes(Method::code_offset()), G3_scratch);
     __ bind(ok2);
-    __ br_null(G3_scratch, false, Assembler::pt, skip_fixup);
-    __ delayed()->ld_ptr(G5_method, in_bytes(Method::interpreter_entry_offset()), G3_scratch);
+    __ br_null(G3_scratch, false, Assembler::pt, L_skip_fixup);
+    __ delayed()->nop();
     __ jump_to(ic_miss, G3_scratch);
     __ delayed()->nop();
 
@@ -1265,7 +1077,7 @@ AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(MacroAssembler *masm
 
   address c2i_entry = __ pc();
 
-  agen.gen_c2i_adapter(total_args_passed, comp_args_on_stack, sig_bt, regs, skip_fixup);
+  agen.gen_c2i_adapter(total_args_passed, comp_args_on_stack, sig_bt, regs, L_skip_fixup);
 
   __ flush();
   return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry);
@@ -1985,12 +1797,12 @@ static void unpack_array_argument(MacroAssembler* masm, VMRegPair reg, BasicType
 }
 
 static void verify_oop_args(MacroAssembler* masm,
-                            int total_args_passed,
+                            methodHandle method,
                             const BasicType* sig_bt,
                             const VMRegPair* regs) {
   Register temp_reg = G5_method;  // not part of any compiled calling seq
   if (VerifyOops) {
-    for (int i = 0; i < total_args_passed; i++) {
+    for (int i = 0; i < method->size_of_parameters(); i++) {
       if (sig_bt[i] == T_OBJECT ||
           sig_bt[i] == T_ARRAY) {
         VMReg r = regs[i].first();
@@ -2009,35 +1821,32 @@ static void verify_oop_args(MacroAssembler* masm,
 }
 
 static void gen_special_dispatch(MacroAssembler* masm,
-                                 int total_args_passed,
-                                 int comp_args_on_stack,
-                                 vmIntrinsics::ID special_dispatch,
+                                 methodHandle method,
                                  const BasicType* sig_bt,
                                  const VMRegPair* regs) {
-  verify_oop_args(masm, total_args_passed, sig_bt, regs);
+  verify_oop_args(masm, method, sig_bt, regs);
+  vmIntrinsics::ID iid = method->intrinsic_id();
 
   // Now write the args into the outgoing interpreter space
   bool     has_receiver   = false;
   Register receiver_reg   = noreg;
   int      member_arg_pos = -1;
   Register member_reg     = noreg;
-  int      ref_kind       = MethodHandles::signature_polymorphic_intrinsic_ref_kind(special_dispatch);
+  int      ref_kind       = MethodHandles::signature_polymorphic_intrinsic_ref_kind(iid);
   if (ref_kind != 0) {
-    member_arg_pos = total_args_passed - 1;  // trailing MemberName argument
+    member_arg_pos = method->size_of_parameters() - 1;  // trailing MemberName argument
     member_reg = G5_method;  // known to be free at this point
     has_receiver = MethodHandles::ref_kind_has_receiver(ref_kind);
-  } else if (special_dispatch == vmIntrinsics::_invokeBasic) {
+  } else if (iid == vmIntrinsics::_invokeBasic) {
     has_receiver = true;
   } else {
-    fatal(err_msg("special_dispatch=%d", special_dispatch));
+    fatal(err_msg_res("unexpected intrinsic id %d", iid));
   }
 
   if (member_reg != noreg) {
     // Load the member_arg into register, if necessary.
-    assert(member_arg_pos >= 0 && member_arg_pos < total_args_passed, "oob");
-    assert(sig_bt[member_arg_pos] == T_OBJECT, "dispatch argument must be an object");
+    SharedRuntime::check_member_name_argument_is_last_argument(method, sig_bt, regs);
     VMReg r = regs[member_arg_pos].first();
-    assert(r->is_valid(), "bad member arg");
     if (r->is_stack()) {
       RegisterOrConstant ld_off = reg2offset(r) + STACK_BIAS;
       ld_off = __ ensure_simm13_or_reg(ld_off, member_reg);
@@ -2050,7 +1859,7 @@ static void gen_special_dispatch(MacroAssembler* masm,
 
   if (has_receiver) {
     // Make sure the receiver is loaded into a register.
-    assert(total_args_passed > 0, "oob");
+    assert(method->size_of_parameters() > 0, "oob");
     assert(sig_bt[0] == T_OBJECT, "receiver argument must be an object");
     VMReg r = regs[0].first();
     assert(r->is_valid(), "bad receiver arg");
@@ -2058,7 +1867,7 @@ static void gen_special_dispatch(MacroAssembler* masm,
       // Porting note:  This assumes that compiled calling conventions always
       // pass the receiver oop in a register.  If this is not true on some
       // platform, pick a temp and load the receiver from stack.
-      assert(false, "receiver always in a register");
+      fatal("receiver always in a register");
       receiver_reg = G3_scratch;  // known to be free at this point
       RegisterOrConstant ld_off = reg2offset(r) + STACK_BIAS;
       ld_off = __ ensure_simm13_or_reg(ld_off, member_reg);
@@ -2070,7 +1879,7 @@ static void gen_special_dispatch(MacroAssembler* masm,
   }
 
   // Figure out which address we are really jumping to:
-  MethodHandles::generate_method_handle_dispatch(masm, special_dispatch,
+  MethodHandles::generate_method_handle_dispatch(masm, iid,
                                                  receiver_reg, member_reg, /*for_compiler_entry:*/ true);
 }
 
@@ -2103,11 +1912,9 @@ static void gen_special_dispatch(MacroAssembler* masm,
 //    transition back to thread_in_Java
 //    return to caller
 //
-nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
+nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
                                                 methodHandle method,
                                                 int compile_id,
-                                                int total_in_args,
-                                                int comp_args_on_stack, // in VMRegStackSlots
                                                 BasicType* in_sig_bt,
                                                 VMRegPair* in_regs,
                                                 BasicType ret_type) {
@@ -2116,9 +1923,7 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
     intptr_t start = (intptr_t)__ pc();
     int vep_offset = ((intptr_t)__ pc()) - start;
     gen_special_dispatch(masm,
-                         total_in_args,
-                         comp_args_on_stack,
-                         method->intrinsic_id(),
+                         method,
                          in_sig_bt,
                          in_regs);
     int frame_complete = ((intptr_t)__ pc()) - start;  // not complete, period
@@ -2220,6 +2025,7 @@ nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
   // we convert the java signature to a C signature by inserting
   // the hidden arguments as arg[0] and possibly arg[1] (static method)
 
+  const int total_in_args = method->size_of_parameters();
   int total_c_args = total_in_args;
   int total_save_slots = 6 * VMRegImpl::slots_per_word;
   if (!is_critical_native) {
@@ -3936,7 +3742,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
 // the 64-bit %o's, then do a save, then fixup the caller's SP (our FP).
 // Tricky, tricky, tricky...
 
-SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, bool cause_return) {
+SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_type) {
   assert (StubRoutines::forward_exception_entry() != NULL, "must be generated before");
 
   // allocate space for the code
@@ -3954,6 +3760,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, bool cause
 
   int start = __ offset();
 
+  bool cause_return = (poll_type == POLL_AT_RETURN);
   // If this causes a return before the processing, then do a "restore"
   if (cause_return) {
     __ restore();
diff --git a/hotspot/src/cpu/sparc/vm/sparc.ad b/hotspot/src/cpu/sparc/vm/sparc.ad
index 42b4cf81b8b..b7029faa604 100644
--- a/hotspot/src/cpu/sparc/vm/sparc.ad
+++ b/hotspot/src/cpu/sparc/vm/sparc.ad
@@ -557,9 +557,9 @@ int MachCallDynamicJavaNode::ret_addr_offset() {
     int entry_offset = InstanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size();
     int v_off = entry_offset*wordSize + vtableEntry::method_offset_in_bytes();
     int klass_load_size;
-    if (UseCompressedOops && UseCompressedKlassPointers) {
+    if (UseCompressedKlassPointers) {
       assert(Universe::heap() != NULL, "java heap should be initialized");
-      if (Universe::narrow_oop_base() == NULL)
+      if (Universe::narrow_klass_base() == NULL)
         klass_load_size = 2*BytesPerInstWord; // see MacroAssembler::load_klass()
       else
         klass_load_size = 3*BytesPerInstWord;
@@ -1707,11 +1707,11 @@ uint reloc_java_to_interp() {
 void MachUEPNode::format( PhaseRegAlloc *ra_, outputStream *st ) const {
   st->print_cr("\nUEP:");
 #ifdef    _LP64
-  if (UseCompressedOops) {
+  if (UseCompressedKlassPointers) {
     assert(Universe::heap() != NULL, "java heap should be initialized");
     st->print_cr("\tLDUW   [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check - compressed klass");
     st->print_cr("\tSLL    R_G5,3,R_G5");
-    if (Universe::narrow_oop_base() != NULL)
+    if (Universe::narrow_klass_base() != NULL)
       st->print_cr("\tADD    R_G5,R_G6_heap_base,R_G5");
   } else {
     st->print_cr("\tLDX    [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check");
@@ -1838,6 +1838,12 @@ const bool Matcher::match_rule_supported(int opcode) {
   case Op_PopCountL:
     if (!UsePopCountInstruction)
       return false;
+  case Op_CompareAndSwapL:
+#ifdef _LP64
+  case Op_CompareAndSwapP:
+#endif
+    if (!VM_Version::supports_cx8())
+      return false;
     break;
   }
 
@@ -1864,6 +1870,11 @@ const int Matcher::vector_ideal_reg(int size) {
   return Op_RegD;
 }
 
+const int Matcher::vector_shift_count_ideal_reg(int size) {
+  fatal("vector shift is not supported");
+  return Node::NotAMachineReg;
+}
+
 // Limits on vector size (number of elements) loaded into vector.
 const int Matcher::max_vector_size(const BasicType bt) {
   assert(is_java_primitive(bt), "only primitive type vectors");
@@ -1931,6 +1942,12 @@ bool Matcher::narrow_oop_use_complex_address() {
   return false;
 }
 
+bool Matcher::narrow_klass_use_complex_address() {
+  NOT_LP64(ShouldNotCallThis());
+  assert(UseCompressedKlassPointers, "only for compressed klass code");
+  return false;
+}
+
 // Is it better to copy float constants, or load them directly from memory?
 // Intel can load a float constant from a direct address, requiring no
 // extra registers.  Most RISCs will have to materialize an address into a
@@ -2591,9 +2608,9 @@ encode %{
       int off = __ offset();
       __ load_klass(O0, G3_scratch);
       int klass_load_size;
-      if (UseCompressedOops && UseCompressedKlassPointers) {
+      if (UseCompressedKlassPointers) {
         assert(Universe::heap() != NULL, "java heap should be initialized");
-        if (Universe::narrow_oop_base() == NULL)
+        if (Universe::narrow_klass_base() == NULL)
           klass_load_size = 2*BytesPerInstWord;
         else
           klass_load_size = 3*BytesPerInstWord;
@@ -3599,6 +3616,15 @@ operand immN()
   interface(CONST_INTER);
 %}
 
+operand immNKlass()
+%{
+  match(ConNKlass);
+
+  op_cost(10);
+  format %{ %}
+  interface(CONST_INTER);
+%}
+
 // NULL Pointer Immediate
 operand immN0()
 %{
@@ -5859,8 +5885,8 @@ instruct loadI2L_immI(iRegL dst, memory mem, immI mask, iRegL tmp) %{
 %}
 
 // Load Unsigned Integer into a Long Register
-instruct loadUI2L(iRegL dst, memory mem) %{
-  match(Set dst (LoadUI2L mem));
+instruct loadUI2L(iRegL dst, memory mem, immL_32bits mask) %{
+  match(Set dst (AndL (ConvI2L (LoadI mem)) mask));
   ins_cost(MEMORY_REF_COST);
 
   size(4);
@@ -6148,6 +6174,17 @@ instruct loadConN(iRegN dst, immN src) %{
   ins_pipe(ialu_hi_lo_reg);
 %}
 
+instruct loadConNKlass(iRegN dst, immNKlass src) %{
+  match(Set dst src);
+  ins_cost(DEFAULT_COST * 3/2);
+  format %{ "SET    $src,$dst\t! compressed klass ptr" %}
+  ins_encode %{
+    Register dst = $dst$$Register;
+    __ set_narrow_klass((Klass*)$src$$constant, dst);
+  %}
+  ins_pipe(ialu_hi_lo_reg);
+%}
+
 // Materialize long value (predicated by immL_cheap).
 instruct loadConL_set64(iRegL dst, immL_cheap con, o7RegL tmp) %{
   match(Set dst con);
@@ -6464,6 +6501,25 @@ instruct storeN(memory dst, iRegN src) %{
    ins_pipe(istore_mem_spORreg);
 %}
 
+instruct storeNKlass(memory dst, iRegN src) %{
+   match(Set dst (StoreNKlass dst src));
+   ins_cost(MEMORY_REF_COST);
+   size(4);
+
+   format %{ "STW    $src,$dst\t! compressed klass ptr" %}
+   ins_encode %{
+     Register base = as_Register($dst$$base);
+     Register index = as_Register($dst$$index);
+     Register src = $src$$Register;
+     if (index != G0) {
+       __ stw(src, base, index);
+     } else {
+       __ stw(src, base, $dst$$disp);
+     }
+   %}
+   ins_pipe(istore_mem_spORreg);
+%}
+
 instruct storeN0(memory dst, immN0 src) %{
    match(Set dst (StoreN dst src));
    ins_cost(MEMORY_REF_COST);
@@ -6571,6 +6627,23 @@ instruct decodeHeapOop_not_null(iRegP dst, iRegN src) %{
   ins_pipe(ialu_reg);
 %}
 
+instruct encodeKlass_not_null(iRegN dst, iRegP src) %{
+  match(Set dst (EncodePKlass src));
+  format %{ "encode_klass_not_null $src, $dst" %}
+  ins_encode %{
+    __ encode_klass_not_null($src$$Register, $dst$$Register);
+  %}
+  ins_pipe(ialu_reg);
+%}
+
+instruct decodeKlass_not_null(iRegP dst, iRegN src) %{
+  match(Set dst (DecodeNKlass src));
+  format %{ "decode_klass_not_null $src, $dst" %}
+  ins_encode %{
+    __ decode_klass_not_null($src$$Register, $dst$$Register);
+  %}
+  ins_pipe(ialu_reg);
+%}
 
 //----------MemBar Instructions-----------------------------------------------
 // Memory barrier flavors
@@ -7199,6 +7272,7 @@ instruct storeLConditional( iRegP mem_ptr, iRegL oldval, g3RegL newval, flagsReg
 // No flag versions for CompareAndSwap{P,I,L} because matcher can't match them
 
 instruct compareAndSwapL_bool(iRegP mem_ptr, iRegL oldval, iRegL newval, iRegI res, o7RegI tmp1, flagsReg ccr ) %{
+  predicate(VM_Version::supports_cx8());
   match(Set res (CompareAndSwapL mem_ptr (Binary oldval newval)));
   effect( USE mem_ptr, KILL ccr, KILL tmp1);
   format %{
@@ -7230,6 +7304,9 @@ instruct compareAndSwapI_bool(iRegP mem_ptr, iRegI oldval, iRegI newval, iRegI r
 %}
 
 instruct compareAndSwapP_bool(iRegP mem_ptr, iRegP oldval, iRegP newval, iRegI res, o7RegI tmp1, flagsReg ccr ) %{
+#ifdef _LP64
+  predicate(VM_Version::supports_cx8());
+#endif
   match(Set res (CompareAndSwapP mem_ptr (Binary oldval newval)));
   effect( USE mem_ptr, KILL ccr, KILL tmp1);
   format %{
@@ -7264,6 +7341,38 @@ instruct compareAndSwapN_bool(iRegP mem_ptr, iRegN oldval, iRegN newval, iRegI r
   ins_pipe( long_memory_op );
 %}
 
+instruct xchgI( memory mem, iRegI newval) %{
+  match(Set newval (GetAndSetI mem newval));
+  format %{ "SWAP  [$mem],$newval" %}
+  size(4);
+  ins_encode %{
+    __ swap($mem$$Address, $newval$$Register);
+  %}
+  ins_pipe( long_memory_op );
+%}
+
+#ifndef _LP64
+instruct xchgP( memory mem, iRegP newval) %{
+  match(Set newval (GetAndSetP mem newval));
+  format %{ "SWAP  [$mem],$newval" %}
+  size(4);
+  ins_encode %{
+    __ swap($mem$$Address, $newval$$Register);
+  %}
+  ins_pipe( long_memory_op );
+%}
+#endif
+
+instruct xchgN( memory mem, iRegN newval) %{
+  match(Set newval (GetAndSetN mem newval));
+  format %{ "SWAP  [$mem],$newval" %}
+  size(4);
+  ins_encode %{
+    __ swap($mem$$Address, $newval$$Register);
+  %}
+  ins_pipe( long_memory_op );
+%}
+
 //---------------------
 // Subtraction Instructions
 // Register Subtraction
diff --git a/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp b/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp
index d0887f6cf08..8faea51198e 100644
--- a/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/stubGenerator_sparc.cpp
@@ -3091,7 +3091,7 @@ class StubGenerator: public StubCodeGenerator {
     arraycopy_range_checks(src, src_pos, dst, dst_pos, length,
                            O5_temp, G4_dst_klass, L_failed);
 
-    // typeArrayKlass
+    // TypeArrayKlass
     //
     // src_addr = (src + array_header_in_bytes()) + (src_pos << log2elemsize);
     // dst_addr = (dst + array_header_in_bytes()) + (dst_pos << log2elemsize);
@@ -3142,7 +3142,7 @@ class StubGenerator: public StubCodeGenerator {
     __ br(Assembler::always, false, Assembler::pt, entry_jlong_arraycopy);
     __ delayed()->signx(length, count); // length
 
-    // objArrayKlass
+    // ObjArrayKlass
   __ BIND(L_objArray);
     // live at this point:  G3_src_klass, G4_dst_klass, src[_pos], dst[_pos], length
 
@@ -3198,8 +3198,8 @@ class StubGenerator: public StubCodeGenerator {
       generate_type_check(G3_src_klass, sco_temp, G4_dst_klass,
                           O5_temp, L_plain_copy);
 
-      // Fetch destination element klass from the objArrayKlass header.
-      int ek_offset = in_bytes(objArrayKlass::element_klass_offset());
+      // Fetch destination element klass from the ObjArrayKlass header.
+      int ek_offset = in_bytes(ObjArrayKlass::element_klass_offset());
 
       // the checkcast_copy loop needs two extra arguments:
       __ ld_ptr(G4_dst_klass, ek_offset, O4);   // dest elem klass
diff --git a/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp b/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp
index e23f993338f..5b1887dbbca 100644
--- a/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/templateTable_sparc.cpp
@@ -867,7 +867,7 @@ void TemplateTable::aastore() {
 
   // do fast instanceof cache test
 
-  __ ld_ptr(O4,     in_bytes(objArrayKlass::element_klass_offset()),  O4);
+  __ ld_ptr(O4,     in_bytes(ObjArrayKlass::element_klass_offset()),  O4);
 
   assert(Otos_i == O0, "just checking");
 
@@ -2936,6 +2936,7 @@ void TemplateTable::prepare_invoke(int byte_no,
     // Push the appendix as a trailing parameter.
     // This must be done before we get the receiver,
     // since the parameter_size includes it.
+    assert(ConstantPoolCacheEntry::_indy_resolved_references_appendix_offset == 0, "appendix expected at index+0");
     __ load_resolved_reference_at_index(temp, index);
     __ verify_oop(temp);
     __ push_ptr(temp);  // push appendix (MethodType, CallSite, etc.)
@@ -3235,15 +3236,15 @@ void TemplateTable::invokehandle(int byte_no) {
   }
 
   const Register Rret       = Lscratch;
-  const Register G4_mtype   = G4_scratch;  // f1
+  const Register G4_mtype   = G4_scratch;
   const Register O0_recv    = O0;
   const Register Rscratch   = G3_scratch;
 
   prepare_invoke(byte_no, G5_method, Rret, G4_mtype, O0_recv);
   __ null_check(O0_recv);
 
-  // G4: MethodType object (from cpool->resolved_references[])
-  // G5: MH.linkToCallSite method (from f2)
+  // G4: MethodType object (from cpool->resolved_references[f1], if necessary)
+  // G5: MH.invokeExact_MT method (from f2)
 
   // Note:  G4_mtype is already pushed (if necessary) by prepare_invoke
 
@@ -3275,8 +3276,8 @@ void TemplateTable::invokedynamic(int byte_no) {
 
   prepare_invoke(byte_no, G5_method, Rret, G4_callsite);
 
-  // G4: CallSite object (from cpool->resolved_references[])
-  // G5: MH.linkToCallSite method (from f1)
+  // G4: CallSite object (from cpool->resolved_references[f1])
+  // G5: MH.linkToCallSite method (from f2)
 
   // Note:  G4_callsite is already pushed by prepare_invoke
 
diff --git a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
index ca93deb0e01..aaa601fbbc9 100644
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.cpp
@@ -96,6 +96,7 @@ void VM_Version::initialize() {
   UseSSE = 0; // Only on x86 and x64
 
   _supports_cx8 = has_v9();
+  _supports_atomic_getset4 = true; // swap instruction
 
   if (is_niagara()) {
     // Indirect branch is the same cost as direct
@@ -116,6 +117,7 @@ void VM_Version::initialize() {
     // 32-bit oops don't make sense for the 64-bit VM on sparc
     // since the 32-bit VM has the same registers and smaller objects.
     Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes);
+    Universe::set_narrow_klass_shift(LogKlassAlignmentInBytes);
 #endif // _LP64
 #ifdef COMPILER2
     // Indirect branch is the same cost as direct
@@ -338,7 +340,11 @@ void VM_Version::revert() {
 
 unsigned int VM_Version::calc_parallel_worker_threads() {
   unsigned int result;
-  if (is_niagara_plus()) {
+  if (is_M_series()) {
+    // for now, use same gc thread calculation for M-series as for niagara-plus
+    // in future, we may want to tweak parameters for nof_parallel_worker_thread
+    result = nof_parallel_worker_threads(5, 16, 8);
+  } else if (is_niagara_plus()) {
     result = nof_parallel_worker_threads(5, 16, 8);
   } else {
     result = nof_parallel_worker_threads(5, 8, 8);
diff --git a/hotspot/src/cpu/sparc/vm/vm_version_sparc.hpp b/hotspot/src/cpu/sparc/vm/vm_version_sparc.hpp
index d7f21c328a3..d602fd08cfb 100644
--- a/hotspot/src/cpu/sparc/vm/vm_version_sparc.hpp
+++ b/hotspot/src/cpu/sparc/vm/vm_version_sparc.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -124,6 +124,8 @@ public:
   // Returns true if the platform is in the niagara line (T series)
   // and newer than the niagara1.
   static bool is_niagara_plus()         { return is_T_family(_features) && !is_T1_model(_features); }
+
+  static bool is_M_series()             { return is_M_family(_features); }
   static bool is_T4()                   { return is_T_family(_features) && has_cbcond(); }
 
   // Fujitsu SPARC64
diff --git a/hotspot/src/cpu/sparc/vm/vtableStubs_sparc.cpp b/hotspot/src/cpu/sparc/vm/vtableStubs_sparc.cpp
index 8a1f6ec5e4b..8e7021fa1a7 100644
--- a/hotspot/src/cpu/sparc/vm/vtableStubs_sparc.cpp
+++ b/hotspot/src/cpu/sparc/vm/vtableStubs_sparc.cpp
@@ -220,13 +220,13 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
       const int basic = 5*BytesPerInstWord +
                         // shift;add for load_klass (only shift with zero heap based)
                         (UseCompressedKlassPointers ?
-                         ((Universe::narrow_oop_base() == NULL) ? BytesPerInstWord : 2*BytesPerInstWord) : 0);
+                         ((Universe::narrow_klass_base() == NULL) ? BytesPerInstWord : 2*BytesPerInstWord) : 0);
       return basic + slop;
     } else {
       const int basic = (28 LP64_ONLY(+ 6)) * BytesPerInstWord +
                         // shift;add for load_klass (only shift with zero heap based)
                         (UseCompressedKlassPointers ?
-                         ((Universe::narrow_oop_base() == NULL) ? BytesPerInstWord : 2*BytesPerInstWord) : 0);
+                         ((Universe::narrow_klass_base() == NULL) ? BytesPerInstWord : 2*BytesPerInstWord) : 0);
       return (basic + slop);
     }
   }
diff --git a/hotspot/src/cpu/x86/vm/assembler_x86.cpp b/hotspot/src/cpu/x86/vm/assembler_x86.cpp
index 611d7ab50cd..378c1f8c6e7 100644
--- a/hotspot/src/cpu/x86/vm/assembler_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/assembler_x86.cpp
@@ -1170,26 +1170,11 @@ void Assembler::cmpw(Address dst, int imm16) {
 // and stores reg into adr if so; otherwise, the value at adr is loaded into rax,.
 // The ZF is set if the compared values were equal, and cleared otherwise.
 void Assembler::cmpxchgl(Register reg, Address adr) { // cmpxchg
-  if (Atomics & 2) {
-     // caveat: no instructionmark, so this isn't relocatable.
-     // Emit a synthetic, non-atomic, CAS equivalent.
-     // Beware.  The synthetic form sets all ICCs, not just ZF.
-     // cmpxchg r,[m] is equivalent to rax, = CAS (m, rax, r)
-     cmpl(rax, adr);
-     movl(rax, adr);
-     if (reg != rax) {
-        Label L ;
-        jcc(Assembler::notEqual, L);
-        movl(adr, reg);
-        bind(L);
-     }
-  } else {
-     InstructionMark im(this);
-     prefix(adr, reg);
-     emit_byte(0x0F);
-     emit_byte(0xB1);
-     emit_operand(reg, adr);
-  }
+  InstructionMark im(this);
+  prefix(adr, reg);
+  emit_byte(0x0F);
+  emit_byte(0xB1);
+  emit_operand(reg, adr);
 }
 
 void Assembler::comisd(XMMRegister dst, Address src) {
@@ -1513,12 +1498,7 @@ void Assembler::leal(Register dst, Address src) {
 }
 
 void Assembler::lock() {
-  if (Atomics & 1) {
-     // Emit either nothing, a NOP, or a NOP: prefix
-     emit_byte(0x90) ;
-  } else {
-     emit_byte(0xF0);
-  }
+  emit_byte(0xF0);
 }
 
 void Assembler::lzcntl(Register dst, Register src) {
@@ -3496,6 +3476,33 @@ void Assembler::vinsertf128h(XMMRegister dst, XMMRegister nds, XMMRegister src)
   emit_byte(0x01);
 }
 
+void Assembler::vinsertf128h(XMMRegister dst, Address src) {
+  assert(VM_Version::supports_avx(), "");
+  InstructionMark im(this);
+  bool vector256 = true;
+  assert(dst != xnoreg, "sanity");
+  int dst_enc = dst->encoding();
+  // swap src<->dst for encoding
+  vex_prefix(src, dst_enc, dst_enc, VEX_SIMD_66, VEX_OPCODE_0F_3A, false, vector256);
+  emit_byte(0x18);
+  emit_operand(dst, src);
+  // 0x01 - insert into upper 128 bits
+  emit_byte(0x01);
+}
+
+void Assembler::vextractf128h(Address dst, XMMRegister src) {
+  assert(VM_Version::supports_avx(), "");
+  InstructionMark im(this);
+  bool vector256 = true;
+  assert(src != xnoreg, "sanity");
+  int src_enc = src->encoding();
+  vex_prefix(dst, 0, src_enc, VEX_SIMD_66, VEX_OPCODE_0F_3A, false, vector256);
+  emit_byte(0x19);
+  emit_operand(src, dst);
+  // 0x01 - extract from upper 128 bits
+  emit_byte(0x01);
+}
+
 void Assembler::vinserti128h(XMMRegister dst, XMMRegister nds, XMMRegister src) {
   assert(VM_Version::supports_avx2(), "");
   bool vector256 = true;
@@ -3507,6 +3514,33 @@ void Assembler::vinserti128h(XMMRegister dst, XMMRegister nds, XMMRegister src)
   emit_byte(0x01);
 }
 
+void Assembler::vinserti128h(XMMRegister dst, Address src) {
+  assert(VM_Version::supports_avx2(), "");
+  InstructionMark im(this);
+  bool vector256 = true;
+  assert(dst != xnoreg, "sanity");
+  int dst_enc = dst->encoding();
+  // swap src<->dst for encoding
+  vex_prefix(src, dst_enc, dst_enc, VEX_SIMD_66, VEX_OPCODE_0F_3A, false, vector256);
+  emit_byte(0x38);
+  emit_operand(dst, src);
+  // 0x01 - insert into upper 128 bits
+  emit_byte(0x01);
+}
+
+void Assembler::vextracti128h(Address dst, XMMRegister src) {
+  assert(VM_Version::supports_avx2(), "");
+  InstructionMark im(this);
+  bool vector256 = true;
+  assert(src != xnoreg, "sanity");
+  int src_enc = src->encoding();
+  vex_prefix(dst, 0, src_enc, VEX_SIMD_66, VEX_OPCODE_0F_3A, false, vector256);
+  emit_byte(0x39);
+  emit_operand(src, dst);
+  // 0x01 - extract from upper 128 bits
+  emit_byte(0x01);
+}
+
 void Assembler::vzeroupper() {
   assert(VM_Version::supports_avx(), "");
   (void)vex_prefix_and_encode(xmm0, xmm0, xmm0, VEX_SIMD_NONE);
@@ -6882,7 +6916,7 @@ void MacroAssembler::call_VM_base(Register oop_result,
 #ifdef ASSERT
   // TraceBytecodes does not use r12 but saves it over the call, so don't verify
   // r12 is the heapbase.
-  LP64_ONLY(if (UseCompressedOops && !TraceBytecodes) verify_heapbase("call_VM_base");)
+  LP64_ONLY(if ((UseCompressedOops || UseCompressedKlassPointers) && !TraceBytecodes) verify_heapbase("call_VM_base: heap base corrupted?");)
 #endif // ASSERT
 
   assert(java_thread != oop_result  , "cannot use the same register for java_thread & oop_result");
@@ -8907,11 +8941,9 @@ void MacroAssembler::fp_runtime_fallback(address runtime_entry, int nb_args, int
   pusha();
 
   // if we are coming from c1, xmm registers may be live
-  if (UseSSE >= 1) {
-    subptr(rsp, sizeof(jdouble)* LP64_ONLY(16) NOT_LP64(8));
-  }
   int off = 0;
   if (UseSSE == 1)  {
+    subptr(rsp, sizeof(jdouble)*8);
     movflt(Address(rsp,off++*sizeof(jdouble)),xmm0);
     movflt(Address(rsp,off++*sizeof(jdouble)),xmm1);
     movflt(Address(rsp,off++*sizeof(jdouble)),xmm2);
@@ -8921,23 +8953,50 @@ void MacroAssembler::fp_runtime_fallback(address runtime_entry, int nb_args, int
     movflt(Address(rsp,off++*sizeof(jdouble)),xmm6);
     movflt(Address(rsp,off++*sizeof(jdouble)),xmm7);
   } else if (UseSSE >= 2)  {
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm0);
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm1);
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm2);
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm3);
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm4);
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm5);
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm6);
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm7);
+#ifdef COMPILER2
+    if (MaxVectorSize > 16) {
+      assert(UseAVX > 0, "256bit vectors are supported only with AVX");
+      // Save upper half of YMM registes
+      subptr(rsp, 16 * LP64_ONLY(16) NOT_LP64(8));
+      vextractf128h(Address(rsp,  0),xmm0);
+      vextractf128h(Address(rsp, 16),xmm1);
+      vextractf128h(Address(rsp, 32),xmm2);
+      vextractf128h(Address(rsp, 48),xmm3);
+      vextractf128h(Address(rsp, 64),xmm4);
+      vextractf128h(Address(rsp, 80),xmm5);
+      vextractf128h(Address(rsp, 96),xmm6);
+      vextractf128h(Address(rsp,112),xmm7);
 #ifdef _LP64
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm8);
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm9);
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm10);
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm11);
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm12);
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm13);
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm14);
-    movdbl(Address(rsp,off++*sizeof(jdouble)),xmm15);
+      vextractf128h(Address(rsp,128),xmm8);
+      vextractf128h(Address(rsp,144),xmm9);
+      vextractf128h(Address(rsp,160),xmm10);
+      vextractf128h(Address(rsp,176),xmm11);
+      vextractf128h(Address(rsp,192),xmm12);
+      vextractf128h(Address(rsp,208),xmm13);
+      vextractf128h(Address(rsp,224),xmm14);
+      vextractf128h(Address(rsp,240),xmm15);
+#endif
+    }
+#endif
+    // Save whole 128bit (16 bytes) XMM regiters
+    subptr(rsp, 16 * LP64_ONLY(16) NOT_LP64(8));
+    movdqu(Address(rsp,off++*16),xmm0);
+    movdqu(Address(rsp,off++*16),xmm1);
+    movdqu(Address(rsp,off++*16),xmm2);
+    movdqu(Address(rsp,off++*16),xmm3);
+    movdqu(Address(rsp,off++*16),xmm4);
+    movdqu(Address(rsp,off++*16),xmm5);
+    movdqu(Address(rsp,off++*16),xmm6);
+    movdqu(Address(rsp,off++*16),xmm7);
+#ifdef _LP64
+    movdqu(Address(rsp,off++*16),xmm8);
+    movdqu(Address(rsp,off++*16),xmm9);
+    movdqu(Address(rsp,off++*16),xmm10);
+    movdqu(Address(rsp,off++*16),xmm11);
+    movdqu(Address(rsp,off++*16),xmm12);
+    movdqu(Address(rsp,off++*16),xmm13);
+    movdqu(Address(rsp,off++*16),xmm14);
+    movdqu(Address(rsp,off++*16),xmm15);
 #endif
   }
 
@@ -9015,28 +9074,52 @@ void MacroAssembler::fp_runtime_fallback(address runtime_entry, int nb_args, int
     movflt(xmm5, Address(rsp,off++*sizeof(jdouble)));
     movflt(xmm6, Address(rsp,off++*sizeof(jdouble)));
     movflt(xmm7, Address(rsp,off++*sizeof(jdouble)));
+    addptr(rsp, sizeof(jdouble)*8);
   } else if (UseSSE >= 2)  {
-    movdbl(xmm0, Address(rsp,off++*sizeof(jdouble)));
-    movdbl(xmm1, Address(rsp,off++*sizeof(jdouble)));
-    movdbl(xmm2, Address(rsp,off++*sizeof(jdouble)));
-    movdbl(xmm3, Address(rsp,off++*sizeof(jdouble)));
-    movdbl(xmm4, Address(rsp,off++*sizeof(jdouble)));
-    movdbl(xmm5, Address(rsp,off++*sizeof(jdouble)));
-    movdbl(xmm6, Address(rsp,off++*sizeof(jdouble)));
-    movdbl(xmm7, Address(rsp,off++*sizeof(jdouble)));
+    // Restore whole 128bit (16 bytes) XMM regiters
+    movdqu(xmm0, Address(rsp,off++*16));
+    movdqu(xmm1, Address(rsp,off++*16));
+    movdqu(xmm2, Address(rsp,off++*16));
+    movdqu(xmm3, Address(rsp,off++*16));
+    movdqu(xmm4, Address(rsp,off++*16));
+    movdqu(xmm5, Address(rsp,off++*16));
+    movdqu(xmm6, Address(rsp,off++*16));
+    movdqu(xmm7, Address(rsp,off++*16));
 #ifdef _LP64
-    movdbl(xmm8, Address(rsp,off++*sizeof(jdouble)));
-    movdbl(xmm9, Address(rsp,off++*sizeof(jdouble)));
-    movdbl(xmm10, Address(rsp,off++*sizeof(jdouble)));
-    movdbl(xmm11, Address(rsp,off++*sizeof(jdouble)));
-    movdbl(xmm12, Address(rsp,off++*sizeof(jdouble)));
-    movdbl(xmm13, Address(rsp,off++*sizeof(jdouble)));
-    movdbl(xmm14, Address(rsp,off++*sizeof(jdouble)));
-    movdbl(xmm15, Address(rsp,off++*sizeof(jdouble)));
+    movdqu(xmm8, Address(rsp,off++*16));
+    movdqu(xmm9, Address(rsp,off++*16));
+    movdqu(xmm10, Address(rsp,off++*16));
+    movdqu(xmm11, Address(rsp,off++*16));
+    movdqu(xmm12, Address(rsp,off++*16));
+    movdqu(xmm13, Address(rsp,off++*16));
+    movdqu(xmm14, Address(rsp,off++*16));
+    movdqu(xmm15, Address(rsp,off++*16));
+#endif
+    addptr(rsp, 16 * LP64_ONLY(16) NOT_LP64(8));
+#ifdef COMPILER2
+    if (MaxVectorSize > 16) {
+      // Restore upper half of YMM registes.
+      vinsertf128h(xmm0, Address(rsp,  0));
+      vinsertf128h(xmm1, Address(rsp, 16));
+      vinsertf128h(xmm2, Address(rsp, 32));
+      vinsertf128h(xmm3, Address(rsp, 48));
+      vinsertf128h(xmm4, Address(rsp, 64));
+      vinsertf128h(xmm5, Address(rsp, 80));
+      vinsertf128h(xmm6, Address(rsp, 96));
+      vinsertf128h(xmm7, Address(rsp,112));
+#ifdef _LP64
+      vinsertf128h(xmm8, Address(rsp,128));
+      vinsertf128h(xmm9, Address(rsp,144));
+      vinsertf128h(xmm10, Address(rsp,160));
+      vinsertf128h(xmm11, Address(rsp,176));
+      vinsertf128h(xmm12, Address(rsp,192));
+      vinsertf128h(xmm13, Address(rsp,208));
+      vinsertf128h(xmm14, Address(rsp,224));
+      vinsertf128h(xmm15, Address(rsp,240));
+#endif
+      addptr(rsp, 16 * LP64_ONLY(16) NOT_LP64(8));
+    }
 #endif
-  }
-  if (UseSSE >= 1) {
-    addptr(rsp, sizeof(jdouble)* LP64_ONLY(16) NOT_LP64(8));
   }
   popa();
 }
@@ -9933,7 +10016,7 @@ void MacroAssembler::load_klass(Register dst, Register src) {
 #ifdef _LP64
   if (UseCompressedKlassPointers) {
     movl(dst, Address(src, oopDesc::klass_offset_in_bytes()));
-    decode_heap_oop_not_null(dst);
+    decode_klass_not_null(dst);
   } else
 #endif
     movptr(dst, Address(src, oopDesc::klass_offset_in_bytes()));
@@ -9944,15 +10027,10 @@ void MacroAssembler::load_prototype_header(Register dst, Register src) {
   if (UseCompressedKlassPointers) {
     assert (Universe::heap() != NULL, "java heap should be initialized");
     movl(dst, Address(src, oopDesc::klass_offset_in_bytes()));
-    if (Universe::narrow_oop_shift() != 0) {
-      assert(LogMinObjAlignmentInBytes == Universe::narrow_oop_shift(), "decode alg wrong");
-      if (LogMinObjAlignmentInBytes == Address::times_8) {
-        movq(dst, Address(r12_heapbase, dst, Address::times_8, Klass::prototype_header_offset()));
-      } else {
-        // OK to use shift since we don't need to preserve flags.
-        shlq(dst, LogMinObjAlignmentInBytes);
-        movq(dst, Address(r12_heapbase, dst, Address::times_1, Klass::prototype_header_offset()));
-      }
+    if (Universe::narrow_klass_shift() != 0) {
+      assert(LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
+      assert(LogKlassAlignmentInBytes == Address::times_8, "klass not aligned on 64bits?");
+      movq(dst, Address(r12_heapbase, dst, Address::times_8, Klass::prototype_header_offset()));
     } else {
       movq(dst, Address(dst, Klass::prototype_header_offset()));
     }
@@ -9967,7 +10045,7 @@ void MacroAssembler::load_prototype_header(Register dst, Register src) {
 void MacroAssembler::store_klass(Register dst, Register src) {
 #ifdef _LP64
   if (UseCompressedKlassPointers) {
-    encode_heap_oop_not_null(src);
+    encode_klass_not_null(src);
     movl(Address(dst, oopDesc::klass_offset_in_bytes()), src);
   } else
 #endif
@@ -10049,12 +10127,12 @@ void MacroAssembler::store_klass_gap(Register dst, Register src) {
 
 #ifdef ASSERT
 void MacroAssembler::verify_heapbase(const char* msg) {
-  assert (UseCompressedOops, "should be compressed");
+  assert (UseCompressedOops || UseCompressedKlassPointers, "should be compressed");
   assert (Universe::heap() != NULL, "java heap should be initialized");
   if (CheckCompressedOops) {
     Label ok;
     push(rscratch1); // cmpptr trashes rscratch1
-    cmpptr(r12_heapbase, ExternalAddress((address)Universe::narrow_oop_base_addr()));
+    cmpptr(r12_heapbase, ExternalAddress((address)Universe::narrow_ptrs_base_addr()));
     jcc(Assembler::equal, ok);
     STOP(msg);
     bind(ok);
@@ -10192,6 +10270,74 @@ void  MacroAssembler::decode_heap_oop_not_null(Register dst, Register src) {
   }
 }
 
+void MacroAssembler::encode_klass_not_null(Register r) {
+  assert(Metaspace::is_initialized(), "metaspace should be initialized");
+#ifdef ASSERT
+  verify_heapbase("MacroAssembler::encode_klass_not_null: heap base corrupted?");
+#endif
+  if (Universe::narrow_klass_base() != NULL) {
+    subq(r, r12_heapbase);
+  }
+  if (Universe::narrow_klass_shift() != 0) {
+    assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
+    shrq(r, LogKlassAlignmentInBytes);
+  }
+}
+
+void MacroAssembler::encode_klass_not_null(Register dst, Register src) {
+  assert(Metaspace::is_initialized(), "metaspace should be initialized");
+#ifdef ASSERT
+  verify_heapbase("MacroAssembler::encode_klass_not_null2: heap base corrupted?");
+#endif
+  if (dst != src) {
+    movq(dst, src);
+  }
+  if (Universe::narrow_klass_base() != NULL) {
+    subq(dst, r12_heapbase);
+  }
+  if (Universe::narrow_klass_shift() != 0) {
+    assert (LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
+    shrq(dst, LogKlassAlignmentInBytes);
+  }
+}
+
+void  MacroAssembler::decode_klass_not_null(Register r) {
+  assert(Metaspace::is_initialized(), "metaspace should be initialized");
+  // Note: it will change flags
+  assert (UseCompressedKlassPointers, "should only be used for compressed headers");
+  // Cannot assert, unverified entry point counts instructions (see .ad file)
+  // vtableStubs also counts instructions in pd_code_size_limit.
+  // Also do not verify_oop as this is called by verify_oop.
+  if (Universe::narrow_klass_shift() != 0) {
+    assert(LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
+    shlq(r, LogKlassAlignmentInBytes);
+    if (Universe::narrow_klass_base() != NULL) {
+      addq(r, r12_heapbase);
+    }
+  } else {
+    assert (Universe::narrow_klass_base() == NULL, "sanity");
+  }
+}
+
+void  MacroAssembler::decode_klass_not_null(Register dst, Register src) {
+  assert(Metaspace::is_initialized(), "metaspace should be initialized");
+  // Note: it will change flags
+  assert (UseCompressedKlassPointers, "should only be used for compressed headers");
+  // Cannot assert, unverified entry point counts instructions (see .ad file)
+  // vtableStubs also counts instructions in pd_code_size_limit.
+  // Also do not verify_oop as this is called by verify_oop.
+  if (Universe::narrow_klass_shift() != 0) {
+    assert(LogKlassAlignmentInBytes == Universe::narrow_klass_shift(), "decode alg wrong");
+    assert(LogKlassAlignmentInBytes == Address::times_8, "klass not aligned on 64bits?");
+    leaq(dst, Address(r12_heapbase, src, Address::times_8, 0));
+  } else {
+    assert (Universe::narrow_klass_base() == NULL, "sanity");
+    if (dst != src) {
+      movq(dst, src);
+    }
+  }
+}
+
 void  MacroAssembler::set_narrow_oop(Register dst, jobject obj) {
   assert (UseCompressedOops, "should only be used for compressed headers");
   assert (Universe::heap() != NULL, "java heap should be initialized");
@@ -10210,6 +10356,22 @@ void  MacroAssembler::set_narrow_oop(Address dst, jobject obj) {
   mov_narrow_oop(dst, oop_index, rspec);
 }
 
+void  MacroAssembler::set_narrow_klass(Register dst, Klass* k) {
+  assert (UseCompressedKlassPointers, "should only be used for compressed headers");
+  assert (oop_recorder() != NULL, "this assembler needs an OopRecorder");
+  int klass_index = oop_recorder()->find_index(k);
+  RelocationHolder rspec = metadata_Relocation::spec(klass_index);
+  mov_narrow_oop(dst, oopDesc::encode_klass(k), rspec);
+}
+
+void  MacroAssembler::set_narrow_klass(Address dst, Klass* k) {
+  assert (UseCompressedKlassPointers, "should only be used for compressed headers");
+  assert (oop_recorder() != NULL, "this assembler needs an OopRecorder");
+  int klass_index = oop_recorder()->find_index(k);
+  RelocationHolder rspec = metadata_Relocation::spec(klass_index);
+  mov_narrow_oop(dst, oopDesc::encode_klass(k), rspec);
+}
+
 void  MacroAssembler::cmp_narrow_oop(Register dst, jobject obj) {
   assert (UseCompressedOops, "should only be used for compressed headers");
   assert (Universe::heap() != NULL, "java heap should be initialized");
@@ -10228,9 +10390,25 @@ void  MacroAssembler::cmp_narrow_oop(Address dst, jobject obj) {
   Assembler::cmp_narrow_oop(dst, oop_index, rspec);
 }
 
+void  MacroAssembler::cmp_narrow_klass(Register dst, Klass* k) {
+  assert (UseCompressedKlassPointers, "should only be used for compressed headers");
+  assert (oop_recorder() != NULL, "this assembler needs an OopRecorder");
+  int klass_index = oop_recorder()->find_index(k);
+  RelocationHolder rspec = metadata_Relocation::spec(klass_index);
+  Assembler::cmp_narrow_oop(dst, oopDesc::encode_klass(k), rspec);
+}
+
+void  MacroAssembler::cmp_narrow_klass(Address dst, Klass* k) {
+  assert (UseCompressedKlassPointers, "should only be used for compressed headers");
+  assert (oop_recorder() != NULL, "this assembler needs an OopRecorder");
+  int klass_index = oop_recorder()->find_index(k);
+  RelocationHolder rspec = metadata_Relocation::spec(klass_index);
+  Assembler::cmp_narrow_oop(dst, oopDesc::encode_klass(k), rspec);
+}
+
 void MacroAssembler::reinit_heapbase() {
-  if (UseCompressedOops) {
-    movptr(r12_heapbase, ExternalAddress((address)Universe::narrow_oop_base_addr()));
+  if (UseCompressedOops || UseCompressedKlassPointers) {
+    movptr(r12_heapbase, ExternalAddress((address)Universe::narrow_ptrs_base_addr()));
   }
 }
 #endif // _LP64
@@ -10513,7 +10691,7 @@ void MacroAssembler::string_indexof(Register str1, Register str2,
         // Array header size is 12 bytes in 32-bit VM
         // + 6 bytes for 3 chars == 18 bytes,
         // enough space to load vec and shift.
-        assert(HeapWordSize*typeArrayKlass::header_size() >= 12,"sanity");
+        assert(HeapWordSize*TypeArrayKlass::header_size() >= 12,"sanity");
         movdqu(vec, Address(str2, (int_cnt2*2)-16));
         psrldq(vec, 16-(int_cnt2*2));
       }
diff --git a/hotspot/src/cpu/x86/vm/assembler_x86.hpp b/hotspot/src/cpu/x86/vm/assembler_x86.hpp
index 368f5c438c8..c936e13f5d8 100644
--- a/hotspot/src/cpu/x86/vm/assembler_x86.hpp
+++ b/hotspot/src/cpu/x86/vm/assembler_x86.hpp
@@ -1743,6 +1743,12 @@ private:
   void vinsertf128h(XMMRegister dst, XMMRegister nds, XMMRegister src);
   void vinserti128h(XMMRegister dst, XMMRegister nds, XMMRegister src);
 
+  // Load/store high 128bit of YMM registers which does not destroy other half.
+  void vinsertf128h(XMMRegister dst, Address src);
+  void vinserti128h(XMMRegister dst, Address src);
+  void vextractf128h(Address dst, XMMRegister src);
+  void vextracti128h(Address dst, XMMRegister src);
+
   // AVX instruction which is used to clear upper 128 bits of YMM registers and
   // to avoid transaction penalty between AVX and SSE states. There is no
   // penalty if legacy SSE instructions are encoded using VEX prefix because
@@ -2077,6 +2083,15 @@ class MacroAssembler: public Assembler {
   void cmp_narrow_oop(Register dst, jobject obj);
   void cmp_narrow_oop(Address dst, jobject obj);
 
+  void encode_klass_not_null(Register r);
+  void decode_klass_not_null(Register r);
+  void encode_klass_not_null(Register dst, Register src);
+  void decode_klass_not_null(Register dst, Register src);
+  void set_narrow_klass(Register dst, Klass* k);
+  void set_narrow_klass(Address dst, Klass* k);
+  void cmp_narrow_klass(Register dst, Klass* k);
+  void cmp_narrow_klass(Address dst, Klass* k);
+
   // if heap base register is used - reinit it with the correct value
   void reinit_heapbase();
 
diff --git a/hotspot/src/cpu/x86/vm/c1_FrameMap_x86.cpp b/hotspot/src/cpu/x86/vm/c1_FrameMap_x86.cpp
index 87b32a43337..bd3ad930b70 100644
--- a/hotspot/src/cpu/x86/vm/c1_FrameMap_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/c1_FrameMap_x86.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/c1_FrameMap_x86.hpp b/hotspot/src/cpu/x86/vm/c1_FrameMap_x86.hpp
index e61f72aa776..ea5d6d39da6 100644
--- a/hotspot/src/cpu/x86/vm/c1_FrameMap_x86.hpp
+++ b/hotspot/src/cpu/x86/vm/c1_FrameMap_x86.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -148,7 +148,7 @@
 
   static int adjust_reg_range(int range) {
     // Reduce the number of available regs (to free r12) in case of compressed oops
-    if (UseCompressedOops) return range - 1;
+    if (UseCompressedOops || UseCompressedKlassPointers) return range - 1;
     return range;
   }
 
diff --git a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
index 36bd4d764e0..684ae866e9c 100644
--- a/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
@@ -340,7 +340,7 @@ int LIR_Assembler::check_icache() {
   Register receiver = FrameMap::receiver_opr->as_register();
   Register ic_klass = IC_Klass;
   const int ic_cmp_size = LP64_ONLY(10) NOT_LP64(9);
-  const bool do_post_padding = VerifyOops || UseCompressedOops;
+  const bool do_post_padding = VerifyOops || UseCompressedKlassPointers;
   if (!do_post_padding) {
     // insert some nops so that the verified entry point is aligned on CodeEntryAlignment
     while ((__ offset() + ic_cmp_size) % CodeEntryAlignment != 0) {
@@ -1262,7 +1262,11 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
       break;
 
     case T_ADDRESS:
-      __ movptr(dest->as_register(), from_addr);
+      if (UseCompressedKlassPointers && addr->disp() == oopDesc::klass_offset_in_bytes()) {
+        __ movl(dest->as_register(), from_addr);
+      } else {
+        __ movptr(dest->as_register(), from_addr);
+      }
       break;
     case T_INT:
       __ movl(dest->as_register(), from_addr);
@@ -1364,6 +1368,12 @@ void LIR_Assembler::mem2reg(LIR_Opr src, LIR_Opr dest, BasicType type, LIR_Patch
     }
 #endif
     __ verify_oop(dest->as_register());
+  } else if (type == T_ADDRESS && addr->disp() == oopDesc::klass_offset_in_bytes()) {
+#ifdef _LP64
+    if (UseCompressedKlassPointers) {
+      __ decode_klass_not_null(dest->as_register());
+    }
+#endif
   }
 }
 
@@ -1705,7 +1715,7 @@ void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, L
   } else if (obj == klass_RInfo) {
     klass_RInfo = dst;
   }
-  if (k->is_loaded() && !UseCompressedOops) {
+  if (k->is_loaded() && !UseCompressedKlassPointers) {
     select_different_registers(obj, dst, k_RInfo, klass_RInfo);
   } else {
     Rtmp1 = op->tmp3()->as_register();
@@ -1881,7 +1891,7 @@ void LIR_Assembler::emit_opTypeCheck(LIR_OpTypeCheck* op) {
     __ load_klass(klass_RInfo, value);
 
     // get instance klass (it's already uncompressed)
-    __ movptr(k_RInfo, Address(k_RInfo, objArrayKlass::element_klass_offset()));
+    __ movptr(k_RInfo, Address(k_RInfo, ObjArrayKlass::element_klass_offset()));
     // perform the fast part of the checking logic
     __ check_klass_subtype_fast_path(klass_RInfo, k_RInfo, Rtmp1, success_target, failure_target, NULL);
     // call out-of-line instance of __ check_klass_subtype_slow_path(...):
@@ -3349,7 +3359,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
 
 #ifndef _LP64
         __ movptr(tmp, dst_klass_addr);
-        __ movptr(tmp, Address(tmp, objArrayKlass::element_klass_offset()));
+        __ movptr(tmp, Address(tmp, ObjArrayKlass::element_klass_offset()));
         __ push(tmp);
         __ movl(tmp, Address(tmp, Klass::super_check_offset_offset()));
         __ push(tmp);
@@ -3375,14 +3385,14 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
         // Allocate abi space for args but be sure to keep stack aligned
         __ subptr(rsp, 6*wordSize);
         __ load_klass(c_rarg3, dst);
-        __ movptr(c_rarg3, Address(c_rarg3, objArrayKlass::element_klass_offset()));
+        __ movptr(c_rarg3, Address(c_rarg3, ObjArrayKlass::element_klass_offset()));
         store_parameter(c_rarg3, 4);
         __ movl(c_rarg3, Address(c_rarg3, Klass::super_check_offset_offset()));
         __ call(RuntimeAddress(copyfunc_addr));
         __ addptr(rsp, 6*wordSize);
 #else
         __ load_klass(c_rarg4, dst);
-        __ movptr(c_rarg4, Address(c_rarg4, objArrayKlass::element_klass_offset()));
+        __ movptr(c_rarg4, Address(c_rarg4, ObjArrayKlass::element_klass_offset()));
         __ movl(c_rarg3, Address(c_rarg4, Klass::super_check_offset_offset()));
         __ call(RuntimeAddress(copyfunc_addr));
 #endif
@@ -3446,7 +3456,7 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) {
     __ mov_metadata(tmp, default_type->constant_encoding());
 #ifdef _LP64
     if (UseCompressedKlassPointers) {
-      __ encode_heap_oop(tmp);
+      __ encode_klass_not_null(tmp);
     }
 #endif
 
@@ -3794,5 +3804,49 @@ void LIR_Assembler::peephole(LIR_List*) {
   // do nothing for now
 }
 
+void LIR_Assembler::atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr dest, LIR_Opr tmp) {
+  assert(data == dest, "xchg/xadd uses only 2 operands");
+
+  if (data->type() == T_INT) {
+    if (code == lir_xadd) {
+      if (os::is_MP()) {
+        __ lock();
+      }
+      __ xaddl(as_Address(src->as_address_ptr()), data->as_register());
+    } else {
+      __ xchgl(data->as_register(), as_Address(src->as_address_ptr()));
+    }
+  } else if (data->is_oop()) {
+    assert (code == lir_xchg, "xadd for oops");
+    Register obj = data->as_register();
+#ifdef _LP64
+    if (UseCompressedOops) {
+      __ encode_heap_oop(obj);
+      __ xchgl(obj, as_Address(src->as_address_ptr()));
+      __ decode_heap_oop(obj);
+    } else {
+      __ xchgptr(obj, as_Address(src->as_address_ptr()));
+    }
+#else
+    __ xchgl(obj, as_Address(src->as_address_ptr()));
+#endif
+  } else if (data->type() == T_LONG) {
+#ifdef _LP64
+    assert(data->as_register_lo() == data->as_register_hi(), "should be a single register");
+    if (code == lir_xadd) {
+      if (os::is_MP()) {
+        __ lock();
+      }
+      __ xaddq(as_Address(src->as_address_ptr()), data->as_register_lo());
+    } else {
+      __ xchgq(data->as_register_lo(), as_Address(src->as_address_ptr()));
+    }
+#else
+    ShouldNotReachHere();
+#endif
+  } else {
+    ShouldNotReachHere();
+  }
+}
 
 #undef __
diff --git a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
index d363c0eec68..5ef14861966 100644
--- a/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/c1_LIRGenerator_x86.cpp
@@ -753,9 +753,24 @@ void LIRGenerator::do_CompareAndSwap(Intrinsic* x, ValueType* type) {
   LIR_Opr addr = new_pointer_register();
   LIR_Address* a;
   if(offset.result()->is_constant()) {
+#ifdef _LP64
+    jlong c = offset.result()->as_jlong();
+    if ((jlong)((jint)c) == c) {
+      a = new LIR_Address(obj.result(),
+                          (jint)c,
+                          as_BasicType(type));
+    } else {
+      LIR_Opr tmp = new_register(T_LONG);
+      __ move(offset.result(), tmp);
+      a = new LIR_Address(obj.result(),
+                          tmp,
+                          as_BasicType(type));
+    }
+#else
     a = new LIR_Address(obj.result(),
-                        NOT_LP64(offset.result()->as_constant_ptr()->as_jint()) LP64_ONLY((int)offset.result()->as_constant_ptr()->as_jlong()),
+                        offset.result()->as_jint(),
                         as_BasicType(type));
+#endif
   } else {
     a = new LIR_Address(obj.result(),
                         offset.result(),
@@ -1151,7 +1166,7 @@ void LIRGenerator::do_CheckCast(CheckCast* x) {
   }
   LIR_Opr reg = rlock_result(x);
   LIR_Opr tmp3 = LIR_OprFact::illegalOpr;
-  if (!x->klass()->is_loaded() || UseCompressedOops) {
+  if (!x->klass()->is_loaded() || UseCompressedKlassPointers) {
     tmp3 = new_register(objectType);
   }
   __ checkcast(reg, obj.result(), x->klass(),
@@ -1173,7 +1188,7 @@ void LIRGenerator::do_InstanceOf(InstanceOf* x) {
   }
   obj.load_item();
   LIR_Opr tmp3 = LIR_OprFact::illegalOpr;
-  if (!x->klass()->is_loaded() || UseCompressedOops) {
+  if (!x->klass()->is_loaded() || UseCompressedKlassPointers) {
     tmp3 = new_register(objectType);
   }
   __ instanceof(reg, obj.result(), x->klass(),
@@ -1345,3 +1360,57 @@ void LIRGenerator::put_Object_unsafe(LIR_Opr src, LIR_Opr offset, LIR_Opr data,
     }
   }
 }
+
+void LIRGenerator::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {
+  BasicType type = x->basic_type();
+  LIRItem src(x->object(), this);
+  LIRItem off(x->offset(), this);
+  LIRItem value(x->value(), this);
+
+  src.load_item();
+  value.load_item();
+  off.load_nonconstant();
+
+  LIR_Opr dst = rlock_result(x, type);
+  LIR_Opr data = value.result();
+  bool is_obj = (type == T_ARRAY || type == T_OBJECT);
+  LIR_Opr offset = off.result();
+
+  assert (type == T_INT || (!x->is_add() && is_obj) LP64_ONLY( || type == T_LONG ), "unexpected type");
+  LIR_Address* addr;
+  if (offset->is_constant()) {
+#ifdef _LP64
+    jlong c = offset->as_jlong();
+    if ((jlong)((jint)c) == c) {
+      addr = new LIR_Address(src.result(), (jint)c, type);
+    } else {
+      LIR_Opr tmp = new_register(T_LONG);
+      __ move(offset, tmp);
+      addr = new LIR_Address(src.result(), tmp, type);
+    }
+#else
+    addr = new LIR_Address(src.result(), offset->as_jint(), type);
+#endif
+  } else {
+    addr = new LIR_Address(src.result(), offset, type);
+  }
+
+  if (data != dst) {
+    __ move(data, dst);
+    data = dst;
+  }
+  if (x->is_add()) {
+    __ xadd(LIR_OprFact::address(addr), data, dst, LIR_OprFact::illegalOpr);
+  } else {
+    if (is_obj) {
+      // Do the pre-write barrier, if any.
+      pre_barrier(LIR_OprFact::address(addr), LIR_OprFact::illegalOpr /* pre_val */,
+                  true /* do_load */, false /* patch */, NULL);
+    }
+    __ xchg(LIR_OprFact::address(addr), data, dst, LIR_OprFact::illegalOpr);
+    if (is_obj) {
+      // Seems to be a precise address
+      post_barrier(LIR_OprFact::address(addr), data);
+    }
+  }
+}
diff --git a/hotspot/src/cpu/x86/vm/c1_LinearScan_x86.cpp b/hotspot/src/cpu/x86/vm/c1_LinearScan_x86.cpp
index 77859b9d6e1..7956a6af59f 100644
--- a/hotspot/src/cpu/x86/vm/c1_LinearScan_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/c1_LinearScan_x86.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp b/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp
index c1eb9d0f28d..d9ae6ce5de5 100644
--- a/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/c1_MacroAssembler_x86.cpp
@@ -159,7 +159,7 @@ void C1_MacroAssembler::initialize_header(Register obj, Register klass, Register
 #ifdef _LP64
   if (UseCompressedKlassPointers) { // Take care not to kill klass
     movptr(t1, klass);
-    encode_heap_oop_not_null(t1);
+    encode_klass_not_null(t1);
     movl(Address(obj, oopDesc::klass_offset_in_bytes()), t1);
   } else
 #endif
diff --git a/hotspot/src/cpu/x86/vm/interpreterGenerator_x86.hpp b/hotspot/src/cpu/x86/vm/interpreterGenerator_x86.hpp
index 9a058213ca2..13786e4149a 100644
--- a/hotspot/src/cpu/x86/vm/interpreterGenerator_x86.hpp
+++ b/hotspot/src/cpu/x86/vm/interpreterGenerator_x86.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp
index eb4e20fb2ef..88ec6b71965 100644
--- a/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/methodHandles_x86.cpp
@@ -209,8 +209,6 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
   Register rcx_mh     = rcx;   // MH receiver; dies quickly and is recycled
   Register rbx_method = rbx;   // eventual target of this invocation
 
-  address code_start = __ pc();
-
   // here's where control starts out:
   __ align(CodeEntryAlignment);
   address entry_point = __ pc();
@@ -251,23 +249,7 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
 
   // rdx_first_arg_addr is live!
 
-  if (TraceMethodHandles) {
-    const char* name = vmIntrinsics::name_at(iid);
-    if (*name == '_')  name += 1;
-    const size_t len = strlen(name) + 50;
-    char* qname = NEW_C_HEAP_ARRAY(char, len, mtInternal);
-    const char* suffix = "";
-    if (vmIntrinsics::method_for(iid) == NULL ||
-        !vmIntrinsics::method_for(iid)->access_flags().is_public()) {
-      if (is_signature_polymorphic_static(iid))
-        suffix = "/static";
-      else
-        suffix = "/private";
-    }
-    jio_snprintf(qname, len, "MethodHandle::interpreter_entry::%s%s", name, suffix);
-    // note: stub look for mh in rcx
-    trace_method_handle(_masm, qname);
-  }
+  trace_method_handle_interpreter_entry(_masm, iid);
 
   if (iid == vmIntrinsics::_invokeBasic) {
     generate_method_handle_dispatch(_masm, iid, rcx_mh, noreg, not_for_compiler_entry);
@@ -287,14 +269,6 @@ address MethodHandles::generate_method_handle_interpreter_entry(MacroAssembler*
     generate_method_handle_dispatch(_masm, iid, rcx_recv, rbx_member, not_for_compiler_entry);
   }
 
-  if (PrintMethodHandleStubs) {
-    address code_end = __ pc();
-    tty->print_cr("--------");
-    tty->print_cr("method handle interpreter entry for %s", vmIntrinsics::name_at(iid));
-    Disassembler::decode(code_start, code_end);
-    tty->cr();
-  }
-
   return entry_point;
 }
 
@@ -327,10 +301,11 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
     assert_different_registers(temp3,        rcx, rdx);
   }
 #endif
+  else {
+    assert_different_registers(temp1, temp2, temp3, saved_last_sp_register());  // don't trash lastSP
+  }
   assert_different_registers(temp1, temp2, temp3, receiver_reg);
   assert_different_registers(temp1, temp2, temp3, member_reg);
-  if (!for_compiler_entry)
-    assert_different_registers(temp1, temp2, temp3, saved_last_sp_register());  // don't trash lastSP
 
   if (iid == vmIntrinsics::_invokeBasic) {
     // indirect through MH.form.vmentry.vmtarget
@@ -392,14 +367,13 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
     //  rsi/r13 - interpreter linkage (if interpreted)
     //  rcx, rdx, rsi, rdi, r8, r8 - compiler arguments (if compiled)
 
-    bool method_is_live = false;
+    Label L_incompatible_class_change_error;
     switch (iid) {
     case vmIntrinsics::_linkToSpecial:
       if (VerifyMethodHandles) {
         verify_ref_kind(_masm, JVM_REF_invokeSpecial, member_reg, temp3);
       }
       __ movptr(rbx_method, member_vmtarget);
-      method_is_live = true;
       break;
 
     case vmIntrinsics::_linkToStatic:
@@ -407,7 +381,6 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
         verify_ref_kind(_masm, JVM_REF_invokeStatic, member_reg, temp3);
       }
       __ movptr(rbx_method, member_vmtarget);
-      method_is_live = true;
       break;
 
     case vmIntrinsics::_linkToVirtual:
@@ -436,7 +409,6 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
 
       // get target Method* & entry point
       __ lookup_virtual_method(temp1_recv_klass, temp2_index, rbx_method);
-      method_is_live = true;
       break;
     }
 
@@ -464,35 +436,32 @@ void MethodHandles::generate_method_handle_dispatch(MacroAssembler* _masm,
       }
 
       // given intf, index, and recv klass, dispatch to the implementation method
-      Label L_no_such_interface;
       __ lookup_interface_method(temp1_recv_klass, temp3_intf,
                                  // note: next two args must be the same:
                                  rbx_index, rbx_method,
                                  temp2,
-                                 L_no_such_interface);
-
-      __ verify_method_ptr(rbx_method);
-      jump_from_method_handle(_masm, rbx_method, temp2, for_compiler_entry);
-      __ hlt();
-
-      __ bind(L_no_such_interface);
-      __ jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
+                                 L_incompatible_class_change_error);
       break;
     }
 
     default:
-      fatal(err_msg("unexpected intrinsic %d: %s", iid, vmIntrinsics::name_at(iid)));
+      fatal(err_msg_res("unexpected intrinsic %d: %s", iid, vmIntrinsics::name_at(iid)));
       break;
     }
 
-    if (method_is_live) {
-      // live at this point:  rbx_method, rsi/r13 (if interpreted)
+    // Live at this point:
+    //   rbx_method
+    //   rsi/r13 (if interpreted)
 
-      // After figuring out which concrete method to call, jump into it.
-      // Note that this works in the interpreter with no data motion.
-      // But the compiled version will require that rcx_recv be shifted out.
-      __ verify_method_ptr(rbx_method);
-      jump_from_method_handle(_masm, rbx_method, temp1, for_compiler_entry);
+    // After figuring out which concrete method to call, jump into it.
+    // Note that this works in the interpreter with no data motion.
+    // But the compiled version will require that rcx_recv be shifted out.
+    __ verify_method_ptr(rbx_method);
+    jump_from_method_handle(_masm, rbx_method, temp1, for_compiler_entry);
+
+    if (iid == vmIntrinsics::_linkToInterface) {
+      __ bind(L_incompatible_class_change_error);
+      __ jump(RuntimeAddress(StubRoutines::throw_IncompatibleClassChangeError_entry()));
     }
   }
 }
diff --git a/hotspot/src/cpu/x86/vm/methodHandles_x86.hpp b/hotspot/src/cpu/x86/vm/methodHandles_x86.hpp
index 62342eefbf2..bb333781a62 100644
--- a/hotspot/src/cpu/x86/vm/methodHandles_x86.hpp
+++ b/hotspot/src/cpu/x86/vm/methodHandles_x86.hpp
@@ -55,8 +55,6 @@ public:
                                   Register temp2,
                                   bool for_compiler_entry);
 
-  static void trace_method_handle(MacroAssembler* _masm, const char* adaptername) PRODUCT_RETURN;
-
   static Register saved_last_sp_register() {
     // Should be in sharedRuntime, not here.
     return LP64_ONLY(r13) NOT_LP64(rsi);
diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp
index 30b5cfca9cd..7cb2bb81edd 100644
--- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp
+++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_32.cpp
@@ -46,11 +46,11 @@
 const int StackAlignmentInSlots = StackAlignmentInBytes / VMRegImpl::stack_slot_size;
 
 class RegisterSaver {
-  enum { FPU_regs_live = 8 /*for the FPU stack*/+8/*eight more for XMM registers*/ };
   // Capture info about frame layout
+#define DEF_XMM_OFFS(regnum) xmm ## regnum ## _off = xmm_off + (regnum)*16/BytesPerInt, xmm ## regnum ## H_off
   enum layout {
                 fpu_state_off = 0,
-                fpu_state_end = fpu_state_off+FPUStateSizeInWords-1,
+                fpu_state_end = fpu_state_off+FPUStateSizeInWords,
                 st0_off, st0H_off,
                 st1_off, st1H_off,
                 st2_off, st2H_off,
@@ -59,16 +59,16 @@ class RegisterSaver {
                 st5_off, st5H_off,
                 st6_off, st6H_off,
                 st7_off, st7H_off,
-
-                xmm0_off, xmm0H_off,
-                xmm1_off, xmm1H_off,
-                xmm2_off, xmm2H_off,
-                xmm3_off, xmm3H_off,
-                xmm4_off, xmm4H_off,
-                xmm5_off, xmm5H_off,
-                xmm6_off, xmm6H_off,
-                xmm7_off, xmm7H_off,
-                flags_off,
+                xmm_off,
+                DEF_XMM_OFFS(0),
+                DEF_XMM_OFFS(1),
+                DEF_XMM_OFFS(2),
+                DEF_XMM_OFFS(3),
+                DEF_XMM_OFFS(4),
+                DEF_XMM_OFFS(5),
+                DEF_XMM_OFFS(6),
+                DEF_XMM_OFFS(7),
+                flags_off = xmm7_off + 16/BytesPerInt + 1, // 16-byte stack alignment fill word
                 rdi_off,
                 rsi_off,
                 ignore_off,  // extra copy of rbp,
@@ -83,13 +83,13 @@ class RegisterSaver {
                 rbp_off,
                 return_off,      // slot for return address
                 reg_save_size };
-
+  enum { FPU_regs_live = flags_off - fpu_state_end };
 
   public:
 
   static OopMap* save_live_registers(MacroAssembler* masm, int additional_frame_words,
-                                     int* total_frame_words, bool verify_fpu = true);
-  static void restore_live_registers(MacroAssembler* masm);
+                                     int* total_frame_words, bool verify_fpu = true, bool save_vectors = false);
+  static void restore_live_registers(MacroAssembler* masm, bool restore_vectors = false);
 
   static int rax_offset() { return rax_off; }
   static int rbx_offset() { return rbx_off; }
@@ -113,9 +113,20 @@ class RegisterSaver {
 };
 
 OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_frame_words,
-                                           int* total_frame_words, bool verify_fpu) {
-
-  int frame_size_in_bytes =  (reg_save_size + additional_frame_words) * wordSize;
+                                           int* total_frame_words, bool verify_fpu, bool save_vectors) {
+  int vect_words = 0;
+#ifdef COMPILER2
+  if (save_vectors) {
+    assert(UseAVX > 0, "256bit vectors are supported only with AVX");
+    assert(MaxVectorSize == 32, "only 256bit vectors are supported now");
+    // Save upper half of YMM registes
+    vect_words = 8 * 16 / wordSize;
+    additional_frame_words += vect_words;
+  }
+#else
+  assert(!save_vectors, "vectors are generated only by C2");
+#endif
+  int frame_size_in_bytes = (reg_save_size + additional_frame_words) * wordSize;
   int frame_words = frame_size_in_bytes / wordSize;
   *total_frame_words = frame_words;
 
@@ -129,7 +140,7 @@ OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_
   __ enter();
   __ pusha();
   __ pushf();
-  __ subptr(rsp,FPU_regs_live*sizeof(jdouble)); // Push FPU registers space
+  __ subptr(rsp,FPU_regs_live*wordSize); // Push FPU registers space
   __ push_FPU_state();          // Save FPU state & init
 
   if (verify_fpu) {
@@ -183,14 +194,28 @@ OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_
     __ movflt(Address(rsp,xmm6_off*wordSize),xmm6);
     __ movflt(Address(rsp,xmm7_off*wordSize),xmm7);
   } else if( UseSSE >= 2 ) {
-    __ movdbl(Address(rsp,xmm0_off*wordSize),xmm0);
-    __ movdbl(Address(rsp,xmm1_off*wordSize),xmm1);
-    __ movdbl(Address(rsp,xmm2_off*wordSize),xmm2);
-    __ movdbl(Address(rsp,xmm3_off*wordSize),xmm3);
-    __ movdbl(Address(rsp,xmm4_off*wordSize),xmm4);
-    __ movdbl(Address(rsp,xmm5_off*wordSize),xmm5);
-    __ movdbl(Address(rsp,xmm6_off*wordSize),xmm6);
-    __ movdbl(Address(rsp,xmm7_off*wordSize),xmm7);
+    // Save whole 128bit (16 bytes) XMM regiters
+    __ movdqu(Address(rsp,xmm0_off*wordSize),xmm0);
+    __ movdqu(Address(rsp,xmm1_off*wordSize),xmm1);
+    __ movdqu(Address(rsp,xmm2_off*wordSize),xmm2);
+    __ movdqu(Address(rsp,xmm3_off*wordSize),xmm3);
+    __ movdqu(Address(rsp,xmm4_off*wordSize),xmm4);
+    __ movdqu(Address(rsp,xmm5_off*wordSize),xmm5);
+    __ movdqu(Address(rsp,xmm6_off*wordSize),xmm6);
+    __ movdqu(Address(rsp,xmm7_off*wordSize),xmm7);
+  }
+
+  if (vect_words > 0) {
+    assert(vect_words*wordSize == 128, "");
+    __ subptr(rsp, 128); // Save upper half of YMM registes
+    __ vextractf128h(Address(rsp,  0),xmm0);
+    __ vextractf128h(Address(rsp, 16),xmm1);
+    __ vextractf128h(Address(rsp, 32),xmm2);
+    __ vextractf128h(Address(rsp, 48),xmm3);
+    __ vextractf128h(Address(rsp, 64),xmm4);
+    __ vextractf128h(Address(rsp, 80),xmm5);
+    __ vextractf128h(Address(rsp, 96),xmm6);
+    __ vextractf128h(Address(rsp,112),xmm7);
   }
 
   // Set an oopmap for the call site.  This oopmap will map all
@@ -253,10 +278,20 @@ OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_
 
 }
 
-void RegisterSaver::restore_live_registers(MacroAssembler* masm) {
-
+void RegisterSaver::restore_live_registers(MacroAssembler* masm, bool restore_vectors) {
   // Recover XMM & FPU state
-  if( UseSSE == 1 ) {
+  int additional_frame_bytes = 0;
+#ifdef COMPILER2
+  if (restore_vectors) {
+    assert(UseAVX > 0, "256bit vectors are supported only with AVX");
+    assert(MaxVectorSize == 32, "only 256bit vectors are supported now");
+    additional_frame_bytes = 128;
+  }
+#else
+  assert(!restore_vectors, "vectors are generated only by C2");
+#endif
+  if (UseSSE == 1) {
+    assert(additional_frame_bytes == 0, "");
     __ movflt(xmm0,Address(rsp,xmm0_off*wordSize));
     __ movflt(xmm1,Address(rsp,xmm1_off*wordSize));
     __ movflt(xmm2,Address(rsp,xmm2_off*wordSize));
@@ -265,18 +300,33 @@ void RegisterSaver::restore_live_registers(MacroAssembler* masm) {
     __ movflt(xmm5,Address(rsp,xmm5_off*wordSize));
     __ movflt(xmm6,Address(rsp,xmm6_off*wordSize));
     __ movflt(xmm7,Address(rsp,xmm7_off*wordSize));
-  } else if( UseSSE >= 2 ) {
-    __ movdbl(xmm0,Address(rsp,xmm0_off*wordSize));
-    __ movdbl(xmm1,Address(rsp,xmm1_off*wordSize));
-    __ movdbl(xmm2,Address(rsp,xmm2_off*wordSize));
-    __ movdbl(xmm3,Address(rsp,xmm3_off*wordSize));
-    __ movdbl(xmm4,Address(rsp,xmm4_off*wordSize));
-    __ movdbl(xmm5,Address(rsp,xmm5_off*wordSize));
-    __ movdbl(xmm6,Address(rsp,xmm6_off*wordSize));
-    __ movdbl(xmm7,Address(rsp,xmm7_off*wordSize));
+  } else if (UseSSE >= 2) {
+#define STACK_ADDRESS(x) Address(rsp,(x)*wordSize + additional_frame_bytes)
+    __ movdqu(xmm0,STACK_ADDRESS(xmm0_off));
+    __ movdqu(xmm1,STACK_ADDRESS(xmm1_off));
+    __ movdqu(xmm2,STACK_ADDRESS(xmm2_off));
+    __ movdqu(xmm3,STACK_ADDRESS(xmm3_off));
+    __ movdqu(xmm4,STACK_ADDRESS(xmm4_off));
+    __ movdqu(xmm5,STACK_ADDRESS(xmm5_off));
+    __ movdqu(xmm6,STACK_ADDRESS(xmm6_off));
+    __ movdqu(xmm7,STACK_ADDRESS(xmm7_off));
+#undef STACK_ADDRESS
+  }
+  if (restore_vectors) {
+    // Restore upper half of YMM registes.
+    assert(additional_frame_bytes == 128, "");
+    __ vinsertf128h(xmm0, Address(rsp,  0));
+    __ vinsertf128h(xmm1, Address(rsp, 16));
+    __ vinsertf128h(xmm2, Address(rsp, 32));
+    __ vinsertf128h(xmm3, Address(rsp, 48));
+    __ vinsertf128h(xmm4, Address(rsp, 64));
+    __ vinsertf128h(xmm5, Address(rsp, 80));
+    __ vinsertf128h(xmm6, Address(rsp, 96));
+    __ vinsertf128h(xmm7, Address(rsp,112));
+    __ addptr(rsp, additional_frame_bytes);
   }
   __ pop_FPU_state();
-  __ addptr(rsp, FPU_regs_live*sizeof(jdouble)); // Pop FPU registers
+  __ addptr(rsp, FPU_regs_live*wordSize); // Pop FPU registers
 
   __ popf();
   __ popa();
@@ -308,6 +358,13 @@ void RegisterSaver::restore_result_registers(MacroAssembler* masm) {
   __ addptr(rsp, return_off * wordSize);
 }
 
+// Is vector's size (in bytes) bigger than a size saved by default?
+// 16 bytes XMM registers are saved by default using SSE2 movdqu instructions.
+// Note, MaxVectorSize == 0 with UseSSE < 2 and vectors are not generated.
+bool SharedRuntime::is_wide_vector(int size) {
+  return size > 16;
+}
+
 // The java_calling_convention describes stack locations as ideal slots on
 // a frame with no abi restrictions. Since we must observe abi restrictions
 // (like the placement of the register window) the slots must be biased by
@@ -1346,12 +1403,12 @@ static void unpack_array_argument(MacroAssembler* masm, VMRegPair reg, BasicType
 }
 
 static void verify_oop_args(MacroAssembler* masm,
-                            int total_args_passed,
+                            methodHandle method,
                             const BasicType* sig_bt,
                             const VMRegPair* regs) {
   Register temp_reg = rbx;  // not part of any compiled calling seq
   if (VerifyOops) {
-    for (int i = 0; i < total_args_passed; i++) {
+    for (int i = 0; i < method->size_of_parameters(); i++) {
       if (sig_bt[i] == T_OBJECT ||
           sig_bt[i] == T_ARRAY) {
         VMReg r = regs[i].first();
@@ -1368,35 +1425,32 @@ static void verify_oop_args(MacroAssembler* masm,
 }
 
 static void gen_special_dispatch(MacroAssembler* masm,
-                                 int total_args_passed,
-                                 int comp_args_on_stack,
-                                 vmIntrinsics::ID special_dispatch,
+                                 methodHandle method,
                                  const BasicType* sig_bt,
                                  const VMRegPair* regs) {
-  verify_oop_args(masm, total_args_passed, sig_bt, regs);
+  verify_oop_args(masm, method, sig_bt, regs);
+  vmIntrinsics::ID iid = method->intrinsic_id();
 
   // Now write the args into the outgoing interpreter space
   bool     has_receiver   = false;
   Register receiver_reg   = noreg;
   int      member_arg_pos = -1;
   Register member_reg     = noreg;
-  int      ref_kind       = MethodHandles::signature_polymorphic_intrinsic_ref_kind(special_dispatch);
+  int      ref_kind       = MethodHandles::signature_polymorphic_intrinsic_ref_kind(iid);
   if (ref_kind != 0) {
-    member_arg_pos = total_args_passed - 1;  // trailing MemberName argument
+    member_arg_pos = method->size_of_parameters() - 1;  // trailing MemberName argument
     member_reg = rbx;  // known to be free at this point
     has_receiver = MethodHandles::ref_kind_has_receiver(ref_kind);
-  } else if (special_dispatch == vmIntrinsics::_invokeBasic) {
+  } else if (iid == vmIntrinsics::_invokeBasic) {
     has_receiver = true;
   } else {
-    guarantee(false, err_msg("special_dispatch=%d", special_dispatch));
+    fatal(err_msg_res("unexpected intrinsic id %d", iid));
   }
 
   if (member_reg != noreg) {
     // Load the member_arg into register, if necessary.
-    assert(member_arg_pos >= 0 && member_arg_pos < total_args_passed, "oob");
-    assert(sig_bt[member_arg_pos] == T_OBJECT, "dispatch argument must be an object");
+    SharedRuntime::check_member_name_argument_is_last_argument(method, sig_bt, regs);
     VMReg r = regs[member_arg_pos].first();
-    assert(r->is_valid(), "bad member arg");
     if (r->is_stack()) {
       __ movptr(member_reg, Address(rsp, r->reg2stack() * VMRegImpl::stack_slot_size + wordSize));
     } else {
@@ -1407,7 +1461,7 @@ static void gen_special_dispatch(MacroAssembler* masm,
 
   if (has_receiver) {
     // Make sure the receiver is loaded into a register.
-    assert(total_args_passed > 0, "oob");
+    assert(method->size_of_parameters() > 0, "oob");
     assert(sig_bt[0] == T_OBJECT, "receiver argument must be an object");
     VMReg r = regs[0].first();
     assert(r->is_valid(), "bad receiver arg");
@@ -1415,7 +1469,7 @@ static void gen_special_dispatch(MacroAssembler* masm,
       // Porting note:  This assumes that compiled calling conventions always
       // pass the receiver oop in a register.  If this is not true on some
       // platform, pick a temp and load the receiver from stack.
-      assert(false, "receiver always in a register");
+      fatal("receiver always in a register");
       receiver_reg = rcx;  // known to be free at this point
       __ movptr(receiver_reg, Address(rsp, r->reg2stack() * VMRegImpl::stack_slot_size + wordSize));
     } else {
@@ -1425,7 +1479,7 @@ static void gen_special_dispatch(MacroAssembler* masm,
   }
 
   // Figure out which address we are really jumping to:
-  MethodHandles::generate_method_handle_dispatch(masm, special_dispatch,
+  MethodHandles::generate_method_handle_dispatch(masm, iid,
                                                  receiver_reg, member_reg, /*for_compiler_entry:*/ true);
 }
 
@@ -1461,8 +1515,6 @@ static void gen_special_dispatch(MacroAssembler* masm,
 nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
                                                 methodHandle method,
                                                 int compile_id,
-                                                int total_in_args,
-                                                int comp_args_on_stack,
                                                 BasicType* in_sig_bt,
                                                 VMRegPair* in_regs,
                                                 BasicType ret_type) {
@@ -1471,9 +1523,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
     intptr_t start = (intptr_t)__ pc();
     int vep_offset = ((intptr_t)__ pc()) - start;
     gen_special_dispatch(masm,
-                         total_in_args,
-                         comp_args_on_stack,
-                         method->intrinsic_id(),
+                         method,
                          in_sig_bt,
                          in_regs);
     int frame_complete = ((intptr_t)__ pc()) - start;  // not complete, period
@@ -1506,6 +1556,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
   // we convert the java signature to a C signature by inserting
   // the hidden arguments as arg[0] and possibly arg[1] (static method)
 
+  const int total_in_args = method->size_of_parameters();
   int total_c_args = total_in_args;
   if (!is_critical_native) {
     total_c_args += 1;
@@ -2738,7 +2789,6 @@ uint SharedRuntime::out_preserve_stack_slots() {
   return 0;
 }
 
-
 //------------------------------generate_deopt_blob----------------------------
 void SharedRuntime::generate_deopt_blob() {
   // allocate space for the code
@@ -3276,7 +3326,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
 // setup oopmap, and calls safepoint code to stop the compiled code for
 // a safepoint.
 //
-SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, bool cause_return) {
+SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_type) {
 
   // Account for thread arg in our frame
   const int additional_words = 1;
@@ -3296,17 +3346,18 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, bool cause
   const Register java_thread = rdi; // callee-saved for VC++
   address start   = __ pc();
   address call_pc = NULL;
-
+  bool cause_return = (poll_type == POLL_AT_RETURN);
+  bool save_vectors = (poll_type == POLL_AT_VECTOR_LOOP);
   // If cause_return is true we are at a poll_return and there is
   // the return address on the stack to the caller on the nmethod
   // that is safepoint. We can leave this return on the stack and
   // effectively complete the return and safepoint in the caller.
   // Otherwise we push space for a return address that the safepoint
   // handler will install later to make the stack walking sensible.
-  if( !cause_return )
-    __ push(rbx);                // Make room for return address (or push it again)
+  if (!cause_return)
+    __ push(rbx);  // Make room for return address (or push it again)
 
-  map = RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words, false);
+  map = RegisterSaver::save_live_registers(masm, additional_words, &frame_size_in_words, false, save_vectors);
 
   // The following is basically a call_VM. However, we need the precise
   // address of the call in order to generate an oopmap. Hence, we do all the
@@ -3318,7 +3369,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, bool cause
   __ set_last_Java_frame(java_thread, noreg, noreg, NULL);
 
   // if this was not a poll_return then we need to correct the return address now.
-  if( !cause_return ) {
+  if (!cause_return) {
     __ movptr(rax, Address(java_thread, JavaThread::saved_exception_pc_offset()));
     __ movptr(Address(rbp, wordSize), rax);
   }
@@ -3346,15 +3397,14 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, bool cause
   __ jcc(Assembler::equal, noException);
 
   // Exception pending
-
-  RegisterSaver::restore_live_registers(masm);
+  RegisterSaver::restore_live_registers(masm, save_vectors);
 
   __ jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
 
   __ bind(noException);
 
   // Normal exit, register restoring and exit
-  RegisterSaver::restore_live_registers(masm);
+  RegisterSaver::restore_live_registers(masm, save_vectors);
 
   __ ret(0);
 
diff --git a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp
index 4059ca6b30d..49ddcb8f255 100644
--- a/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/sharedRuntime_x86_64.cpp
@@ -116,8 +116,8 @@ class RegisterSaver {
   };
 
  public:
-  static OopMap* save_live_registers(MacroAssembler* masm, int additional_frame_words, int* total_frame_words);
-  static void restore_live_registers(MacroAssembler* masm);
+  static OopMap* save_live_registers(MacroAssembler* masm, int additional_frame_words, int* total_frame_words, bool save_vectors = false);
+  static void restore_live_registers(MacroAssembler* masm, bool restore_vectors = false);
 
   // Offsets into the register save area
   // Used by deoptimization when it is managing result register
@@ -134,7 +134,19 @@ class RegisterSaver {
   static void restore_result_registers(MacroAssembler* masm);
 };
 
-OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_frame_words, int* total_frame_words) {
+OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_frame_words, int* total_frame_words, bool save_vectors) {
+  int vect_words = 0;
+#ifdef COMPILER2
+  if (save_vectors) {
+    assert(UseAVX > 0, "256bit vectors are supported only with AVX");
+    assert(MaxVectorSize == 32, "only 256bit vectors are supported now");
+    // Save upper half of YMM registes
+    vect_words = 16 * 16 / wordSize;
+    additional_frame_words += vect_words;
+  }
+#else
+  assert(!save_vectors, "vectors are generated only by C2");
+#endif
 
   // Always make the frame size 16-byte aligned
   int frame_size_in_bytes = round_to(additional_frame_words*wordSize +
@@ -155,6 +167,27 @@ OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_
 
   __ enter();          // rsp becomes 16-byte aligned here
   __ push_CPU_state(); // Push a multiple of 16 bytes
+
+  if (vect_words > 0) {
+    assert(vect_words*wordSize == 256, "");
+    __ subptr(rsp, 256); // Save upper half of YMM registes
+    __ vextractf128h(Address(rsp,  0),xmm0);
+    __ vextractf128h(Address(rsp, 16),xmm1);
+    __ vextractf128h(Address(rsp, 32),xmm2);
+    __ vextractf128h(Address(rsp, 48),xmm3);
+    __ vextractf128h(Address(rsp, 64),xmm4);
+    __ vextractf128h(Address(rsp, 80),xmm5);
+    __ vextractf128h(Address(rsp, 96),xmm6);
+    __ vextractf128h(Address(rsp,112),xmm7);
+    __ vextractf128h(Address(rsp,128),xmm8);
+    __ vextractf128h(Address(rsp,144),xmm9);
+    __ vextractf128h(Address(rsp,160),xmm10);
+    __ vextractf128h(Address(rsp,176),xmm11);
+    __ vextractf128h(Address(rsp,192),xmm12);
+    __ vextractf128h(Address(rsp,208),xmm13);
+    __ vextractf128h(Address(rsp,224),xmm14);
+    __ vextractf128h(Address(rsp,240),xmm15);
+  }
   if (frame::arg_reg_save_area_bytes != 0) {
     // Allocate argument register save area
     __ subptr(rsp, frame::arg_reg_save_area_bytes);
@@ -167,112 +200,111 @@ OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_
 
   OopMapSet *oop_maps = new OopMapSet();
   OopMap* map = new OopMap(frame_size_in_slots, 0);
-  map->set_callee_saved(VMRegImpl::stack2reg( rax_off  + additional_frame_slots), rax->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg( rcx_off  + additional_frame_slots), rcx->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg( rdx_off  + additional_frame_slots), rdx->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg( rbx_off  + additional_frame_slots), rbx->as_VMReg());
+
+#define STACK_OFFSET(x) VMRegImpl::stack2reg((x) + additional_frame_slots)
+
+  map->set_callee_saved(STACK_OFFSET( rax_off ), rax->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET( rcx_off ), rcx->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET( rdx_off ), rdx->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET( rbx_off ), rbx->as_VMReg());
   // rbp location is known implicitly by the frame sender code, needs no oopmap
   // and the location where rbp was saved by is ignored
-  map->set_callee_saved(VMRegImpl::stack2reg( rsi_off  + additional_frame_slots), rsi->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg( rdi_off  + additional_frame_slots), rdi->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg( r8_off   + additional_frame_slots), r8->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg( r9_off   + additional_frame_slots), r9->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg( r10_off  + additional_frame_slots), r10->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg( r11_off  + additional_frame_slots), r11->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg( r12_off  + additional_frame_slots), r12->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg( r13_off  + additional_frame_slots), r13->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg( r14_off  + additional_frame_slots), r14->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg( r15_off  + additional_frame_slots), r15->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm0_off  + additional_frame_slots), xmm0->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm1_off  + additional_frame_slots), xmm1->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm2_off  + additional_frame_slots), xmm2->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm3_off  + additional_frame_slots), xmm3->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm4_off  + additional_frame_slots), xmm4->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm5_off  + additional_frame_slots), xmm5->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm6_off  + additional_frame_slots), xmm6->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm7_off  + additional_frame_slots), xmm7->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm8_off  + additional_frame_slots), xmm8->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm9_off  + additional_frame_slots), xmm9->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm10_off + additional_frame_slots), xmm10->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm11_off + additional_frame_slots), xmm11->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm12_off + additional_frame_slots), xmm12->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm13_off + additional_frame_slots), xmm13->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm14_off + additional_frame_slots), xmm14->as_VMReg());
-  map->set_callee_saved(VMRegImpl::stack2reg(xmm15_off + additional_frame_slots), xmm15->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET( rsi_off ), rsi->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET( rdi_off ), rdi->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET( r8_off  ), r8->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET( r9_off  ), r9->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET( r10_off ), r10->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET( r11_off ), r11->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET( r12_off ), r12->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET( r13_off ), r13->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET( r14_off ), r14->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET( r15_off ), r15->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm0_off ), xmm0->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm1_off ), xmm1->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm2_off ), xmm2->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm3_off ), xmm3->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm4_off ), xmm4->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm5_off ), xmm5->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm6_off ), xmm6->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm7_off ), xmm7->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm8_off ), xmm8->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm9_off ), xmm9->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm10_off), xmm10->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm11_off), xmm11->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm12_off), xmm12->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm13_off), xmm13->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm14_off), xmm14->as_VMReg());
+  map->set_callee_saved(STACK_OFFSET(xmm15_off), xmm15->as_VMReg());
 
   // %%% These should all be a waste but we'll keep things as they were for now
   if (true) {
-    map->set_callee_saved(VMRegImpl::stack2reg( raxH_off  + additional_frame_slots),
-                          rax->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg( rcxH_off  + additional_frame_slots),
-                          rcx->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg( rdxH_off  + additional_frame_slots),
-                          rdx->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg( rbxH_off  + additional_frame_slots),
-                          rbx->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET( raxH_off ), rax->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET( rcxH_off ), rcx->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET( rdxH_off ), rdx->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET( rbxH_off ), rbx->as_VMReg()->next());
     // rbp location is known implicitly by the frame sender code, needs no oopmap
-    map->set_callee_saved(VMRegImpl::stack2reg( rsiH_off  + additional_frame_slots),
-                          rsi->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg( rdiH_off  + additional_frame_slots),
-                          rdi->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg( r8H_off   + additional_frame_slots),
-                          r8->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg( r9H_off   + additional_frame_slots),
-                          r9->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg( r10H_off  + additional_frame_slots),
-                          r10->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg( r11H_off  + additional_frame_slots),
-                          r11->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg( r12H_off  + additional_frame_slots),
-                          r12->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg( r13H_off  + additional_frame_slots),
-                          r13->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg( r14H_off  + additional_frame_slots),
-                          r14->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg( r15H_off  + additional_frame_slots),
-                          r15->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm0H_off  + additional_frame_slots),
-                          xmm0->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm1H_off  + additional_frame_slots),
-                          xmm1->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm2H_off  + additional_frame_slots),
-                          xmm2->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm3H_off  + additional_frame_slots),
-                          xmm3->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm4H_off  + additional_frame_slots),
-                          xmm4->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm5H_off  + additional_frame_slots),
-                          xmm5->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm6H_off  + additional_frame_slots),
-                          xmm6->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm7H_off  + additional_frame_slots),
-                          xmm7->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm8H_off  + additional_frame_slots),
-                          xmm8->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm9H_off  + additional_frame_slots),
-                          xmm9->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm10H_off + additional_frame_slots),
-                          xmm10->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm11H_off + additional_frame_slots),
-                          xmm11->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm12H_off + additional_frame_slots),
-                          xmm12->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm13H_off + additional_frame_slots),
-                          xmm13->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm14H_off + additional_frame_slots),
-                          xmm14->as_VMReg()->next());
-    map->set_callee_saved(VMRegImpl::stack2reg(xmm15H_off + additional_frame_slots),
-                          xmm15->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET( rsiH_off ), rsi->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET( rdiH_off ), rdi->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET( r8H_off  ), r8->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET( r9H_off  ), r9->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET( r10H_off ), r10->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET( r11H_off ), r11->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET( r12H_off ), r12->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET( r13H_off ), r13->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET( r14H_off ), r14->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET( r15H_off ), r15->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm0H_off ), xmm0->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm1H_off ), xmm1->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm2H_off ), xmm2->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm3H_off ), xmm3->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm4H_off ), xmm4->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm5H_off ), xmm5->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm6H_off ), xmm6->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm7H_off ), xmm7->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm8H_off ), xmm8->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm9H_off ), xmm9->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm10H_off), xmm10->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm11H_off), xmm11->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm12H_off), xmm12->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm13H_off), xmm13->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm14H_off), xmm14->as_VMReg()->next());
+    map->set_callee_saved(STACK_OFFSET(xmm15H_off), xmm15->as_VMReg()->next());
   }
 
   return map;
 }
 
-void RegisterSaver::restore_live_registers(MacroAssembler* masm) {
+void RegisterSaver::restore_live_registers(MacroAssembler* masm, bool restore_vectors) {
   if (frame::arg_reg_save_area_bytes != 0) {
     // Pop arg register save area
     __ addptr(rsp, frame::arg_reg_save_area_bytes);
   }
+#ifdef COMPILER2
+  if (restore_vectors) {
+    // Restore upper half of YMM registes.
+    assert(UseAVX > 0, "256bit vectors are supported only with AVX");
+    assert(MaxVectorSize == 32, "only 256bit vectors are supported now");
+    __ vinsertf128h(xmm0, Address(rsp,  0));
+    __ vinsertf128h(xmm1, Address(rsp, 16));
+    __ vinsertf128h(xmm2, Address(rsp, 32));
+    __ vinsertf128h(xmm3, Address(rsp, 48));
+    __ vinsertf128h(xmm4, Address(rsp, 64));
+    __ vinsertf128h(xmm5, Address(rsp, 80));
+    __ vinsertf128h(xmm6, Address(rsp, 96));
+    __ vinsertf128h(xmm7, Address(rsp,112));
+    __ vinsertf128h(xmm8, Address(rsp,128));
+    __ vinsertf128h(xmm9, Address(rsp,144));
+    __ vinsertf128h(xmm10, Address(rsp,160));
+    __ vinsertf128h(xmm11, Address(rsp,176));
+    __ vinsertf128h(xmm12, Address(rsp,192));
+    __ vinsertf128h(xmm13, Address(rsp,208));
+    __ vinsertf128h(xmm14, Address(rsp,224));
+    __ vinsertf128h(xmm15, Address(rsp,240));
+    __ addptr(rsp, 256);
+  }
+#else
+  assert(!restore_vectors, "vectors are generated only by C2");
+#endif
   // Recover CPU state
   __ pop_CPU_state();
   // Get the rbp described implicitly by the calling convention (no oopMap)
@@ -297,6 +329,12 @@ void RegisterSaver::restore_result_registers(MacroAssembler* masm) {
   __ addptr(rsp, return_offset_in_bytes());
 }
 
+// Is vector's size (in bytes) bigger than a size saved by default?
+// 16 bytes XMM registers are saved by default using fxsave/fxrstor instructions.
+bool SharedRuntime::is_wide_vector(int size) {
+  return size > 16;
+}
+
 // The java_calling_convention describes stack locations as ideal slots on
 // a frame with no abi restrictions. Since we must observe abi restrictions
 // (like the placement of the register window) the slots must be biased by
@@ -1593,12 +1631,12 @@ class ComputeMoveOrder: public StackObj {
 };
 
 static void verify_oop_args(MacroAssembler* masm,
-                            int total_args_passed,
+                            methodHandle method,
                             const BasicType* sig_bt,
                             const VMRegPair* regs) {
   Register temp_reg = rbx;  // not part of any compiled calling seq
   if (VerifyOops) {
-    for (int i = 0; i < total_args_passed; i++) {
+    for (int i = 0; i < method->size_of_parameters(); i++) {
       if (sig_bt[i] == T_OBJECT ||
           sig_bt[i] == T_ARRAY) {
         VMReg r = regs[i].first();
@@ -1615,35 +1653,32 @@ static void verify_oop_args(MacroAssembler* masm,
 }
 
 static void gen_special_dispatch(MacroAssembler* masm,
-                                 int total_args_passed,
-                                 int comp_args_on_stack,
-                                 vmIntrinsics::ID special_dispatch,
+                                 methodHandle method,
                                  const BasicType* sig_bt,
                                  const VMRegPair* regs) {
-  verify_oop_args(masm, total_args_passed, sig_bt, regs);
+  verify_oop_args(masm, method, sig_bt, regs);
+  vmIntrinsics::ID iid = method->intrinsic_id();
 
   // Now write the args into the outgoing interpreter space
   bool     has_receiver   = false;
   Register receiver_reg   = noreg;
   int      member_arg_pos = -1;
   Register member_reg     = noreg;
-  int      ref_kind       = MethodHandles::signature_polymorphic_intrinsic_ref_kind(special_dispatch);
+  int      ref_kind       = MethodHandles::signature_polymorphic_intrinsic_ref_kind(iid);
   if (ref_kind != 0) {
-    member_arg_pos = total_args_passed - 1;  // trailing MemberName argument
+    member_arg_pos = method->size_of_parameters() - 1;  // trailing MemberName argument
     member_reg = rbx;  // known to be free at this point
     has_receiver = MethodHandles::ref_kind_has_receiver(ref_kind);
-  } else if (special_dispatch == vmIntrinsics::_invokeBasic) {
+  } else if (iid == vmIntrinsics::_invokeBasic) {
     has_receiver = true;
   } else {
-    guarantee(false, err_msg("special_dispatch=%d", special_dispatch));
+    fatal(err_msg_res("unexpected intrinsic id %d", iid));
   }
 
   if (member_reg != noreg) {
     // Load the member_arg into register, if necessary.
-    assert(member_arg_pos >= 0 && member_arg_pos < total_args_passed, "oob");
-    assert(sig_bt[member_arg_pos] == T_OBJECT, "dispatch argument must be an object");
+    SharedRuntime::check_member_name_argument_is_last_argument(method, sig_bt, regs);
     VMReg r = regs[member_arg_pos].first();
-    assert(r->is_valid(), "bad member arg");
     if (r->is_stack()) {
       __ movptr(member_reg, Address(rsp, r->reg2stack() * VMRegImpl::stack_slot_size + wordSize));
     } else {
@@ -1654,7 +1689,7 @@ static void gen_special_dispatch(MacroAssembler* masm,
 
   if (has_receiver) {
     // Make sure the receiver is loaded into a register.
-    assert(total_args_passed > 0, "oob");
+    assert(method->size_of_parameters() > 0, "oob");
     assert(sig_bt[0] == T_OBJECT, "receiver argument must be an object");
     VMReg r = regs[0].first();
     assert(r->is_valid(), "bad receiver arg");
@@ -1662,7 +1697,7 @@ static void gen_special_dispatch(MacroAssembler* masm,
       // Porting note:  This assumes that compiled calling conventions always
       // pass the receiver oop in a register.  If this is not true on some
       // platform, pick a temp and load the receiver from stack.
-      assert(false, "receiver always in a register");
+      fatal("receiver always in a register");
       receiver_reg = j_rarg0;  // known to be free at this point
       __ movptr(receiver_reg, Address(rsp, r->reg2stack() * VMRegImpl::stack_slot_size + wordSize));
     } else {
@@ -1672,7 +1707,7 @@ static void gen_special_dispatch(MacroAssembler* masm,
   }
 
   // Figure out which address we are really jumping to:
-  MethodHandles::generate_method_handle_dispatch(masm, special_dispatch,
+  MethodHandles::generate_method_handle_dispatch(masm, iid,
                                                  receiver_reg, member_reg, /*for_compiler_entry:*/ true);
 }
 
@@ -1708,8 +1743,6 @@ static void gen_special_dispatch(MacroAssembler* masm,
 nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
                                                 methodHandle method,
                                                 int compile_id,
-                                                int total_in_args,
-                                                int comp_args_on_stack,
                                                 BasicType* in_sig_bt,
                                                 VMRegPair* in_regs,
                                                 BasicType ret_type) {
@@ -1718,9 +1751,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
     intptr_t start = (intptr_t)__ pc();
     int vep_offset = ((intptr_t)__ pc()) - start;
     gen_special_dispatch(masm,
-                         total_in_args,
-                         comp_args_on_stack,
-                         method->intrinsic_id(),
+                         method,
                          in_sig_bt,
                          in_regs);
     int frame_complete = ((intptr_t)__ pc()) - start;  // not complete, period
@@ -1754,6 +1785,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
   // we convert the java signature to a C signature by inserting
   // the hidden arguments as arg[0] and possibly arg[1] (static method)
 
+  const int total_in_args = method->size_of_parameters();
   int total_c_args = total_in_args;
   if (!is_critical_native) {
     total_c_args += 1;
@@ -3241,7 +3273,6 @@ uint SharedRuntime::out_preserve_stack_slots() {
   return 0;
 }
 
-
 //------------------------------generate_deopt_blob----------------------------
 void SharedRuntime::generate_deopt_blob() {
   // Allocate space for the code
@@ -3746,7 +3777,7 @@ void SharedRuntime::generate_uncommon_trap_blob() {
 // Generate a special Compile2Runtime blob that saves all registers,
 // and setup oopmap.
 //
-SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, bool cause_return) {
+SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_type) {
   assert(StubRoutines::forward_exception_entry() != NULL,
          "must be generated before");
 
@@ -3761,6 +3792,8 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, bool cause
   address start   = __ pc();
   address call_pc = NULL;
   int frame_size_in_words;
+  bool cause_return = (poll_type == POLL_AT_RETURN);
+  bool save_vectors = (poll_type == POLL_AT_VECTOR_LOOP);
 
   // Make room for return address (or push it again)
   if (!cause_return) {
@@ -3768,7 +3801,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, bool cause
   }
 
   // Save registers, fpu state, and flags
-  map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words);
+  map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, save_vectors);
 
   // The following is basically a call_VM.  However, we need the precise
   // address of the call in order to generate an oopmap. Hence, we do all the
@@ -3805,7 +3838,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, bool cause
 
   // Exception pending
 
-  RegisterSaver::restore_live_registers(masm);
+  RegisterSaver::restore_live_registers(masm, save_vectors);
 
   __ jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
 
@@ -3813,7 +3846,7 @@ SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, bool cause
   __ bind(noException);
 
   // Normal exit, restore registers and exit.
-  RegisterSaver::restore_live_registers(masm);
+  RegisterSaver::restore_live_registers(masm, save_vectors);
 
   __ ret(0);
 
diff --git a/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp b/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp
index 8a9de37e1e8..f149fde83ab 100644
--- a/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp
+++ b/hotspot/src/cpu/x86/vm/stubGenerator_x86_32.cpp
@@ -1801,7 +1801,7 @@ class StubGenerator: public StubCodeGenerator {
     assert_different_registers(src, src_pos, dst, dst_pos, rcx_lh);
     arraycopy_range_checks(src, src_pos, dst, dst_pos, LENGTH, L_failed);
 
-    // typeArrayKlass
+    // TypeArrayKlass
     //
     // src_addr = (src + array_header_in_bytes()) + (src_pos << log2elemsize);
     // dst_addr = (dst + array_header_in_bytes()) + (dst_pos << log2elemsize);
@@ -1864,7 +1864,7 @@ class StubGenerator: public StubCodeGenerator {
     __ leave(); // required for proper stackwalking of RuntimeStub frame
     __ ret(0);
 
-    // objArrayKlass
+    // ObjArrayKlass
   __ BIND(L_objArray);
     // live at this point:  rcx_src_klass, src[_pos], dst[_pos]
 
@@ -1894,7 +1894,7 @@ class StubGenerator: public StubCodeGenerator {
     // live at this point:  rcx_src_klass, dst[_pos], src[_pos]
     {
       // Handy offsets:
-      int  ek_offset = in_bytes(objArrayKlass::element_klass_offset());
+      int  ek_offset = in_bytes(ObjArrayKlass::element_klass_offset());
       int sco_offset = in_bytes(Klass::super_check_offset_offset());
 
       Register rsi_dst_klass = rsi;
diff --git a/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp b/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp
index de60df86f2a..8ae595a56da 100644
--- a/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/stubGenerator_x86_64.cpp
@@ -2604,7 +2604,7 @@ class StubGenerator: public StubCodeGenerator {
     arraycopy_range_checks(src, src_pos, dst, dst_pos, r11_length,
                            r10, L_failed);
 
-    // typeArrayKlass
+    // TypeArrayKlass
     //
     // src_addr = (src + array_header_in_bytes()) + (src_pos << log2elemsize);
     // dst_addr = (dst + array_header_in_bytes()) + (dst_pos << log2elemsize);
@@ -2670,7 +2670,7 @@ class StubGenerator: public StubCodeGenerator {
     __ movl2ptr(count, r11_length); // length
     __ jump(RuntimeAddress(long_copy_entry));
 
-    // objArrayKlass
+    // ObjArrayKlass
   __ BIND(L_objArray);
     // live at this point:  r10_src_klass, r11_length, src[_pos], dst[_pos]
 
@@ -2723,8 +2723,8 @@ class StubGenerator: public StubCodeGenerator {
       assert_clean_int(sco_temp, rax);
       generate_type_check(r10_src_klass, sco_temp, r11_dst_klass, L_plain_copy);
 
-      // Fetch destination element klass from the objArrayKlass header.
-      int ek_offset = in_bytes(objArrayKlass::element_klass_offset());
+      // Fetch destination element klass from the ObjArrayKlass header.
+      int ek_offset = in_bytes(ObjArrayKlass::element_klass_offset());
       __ movptr(r11_dst_klass, Address(r11_dst_klass, ek_offset));
       __ movl(  sco_temp,      Address(r11_dst_klass, sco_offset));
       assert_clean_int(sco_temp, rax);
diff --git a/hotspot/src/cpu/x86/vm/stubRoutines_x86_64.cpp b/hotspot/src/cpu/x86/vm/stubRoutines_x86_64.cpp
index 782dc906399..084bbf8fb82 100644
--- a/hotspot/src/cpu/x86/vm/stubRoutines_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/stubRoutines_x86_64.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/stubRoutines_x86_64.hpp b/hotspot/src/cpu/x86/vm/stubRoutines_x86_64.hpp
index 7737c4eee6e..9b9cede4f2d 100644
--- a/hotspot/src/cpu/x86/vm/stubRoutines_x86_64.hpp
+++ b/hotspot/src/cpu/x86/vm/stubRoutines_x86_64.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp b/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp
index 441738b5e7c..24d138e4917 100644
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_32.cpp
@@ -949,7 +949,7 @@ void TemplateTable::aastore() {
   __ load_klass(rbx, rax);
   // Move superklass into EAX
   __ load_klass(rax, rdx);
-  __ movptr(rax, Address(rax, objArrayKlass::element_klass_offset()));
+  __ movptr(rax, Address(rax, ObjArrayKlass::element_klass_offset()));
   // Compress array+index*wordSize+12 into a single register.  Frees ECX.
   __ lea(rdx, element_address);
 
@@ -2139,7 +2139,7 @@ void TemplateTable::load_invoke_cp_cache_entry(int byte_no,
   const int index_offset = in_bytes(ConstantPoolCache::base_offset() +
                                     ConstantPoolCacheEntry::f2_offset());
 
-    size_t index_size = (is_invokedynamic ? sizeof(u4) : sizeof(u2));
+  size_t index_size = (is_invokedynamic ? sizeof(u4) : sizeof(u2));
   resolve_cache_and_index(byte_no, cache, index, index_size);
     __ movptr(method, Address(cache, index, Address::times_ptr, method_offset));
 
@@ -2876,6 +2876,7 @@ void TemplateTable::prepare_invoke(int byte_no,
     // since the parameter_size includes it.
     __ push(rbx);
     __ mov(rbx, index);
+    assert(ConstantPoolCacheEntry::_indy_resolved_references_appendix_offset == 0, "appendix expected at index+0");
     __ load_resolved_reference_at_index(index, rbx);
     __ pop(rbx);
     __ push(index);  // push appendix (MethodType, CallSite, etc.)
@@ -3093,8 +3094,8 @@ void TemplateTable::invokeinterface(int byte_no) {
 void TemplateTable::invokehandle(int byte_no) {
   transition(vtos, vtos);
   assert(byte_no == f1_byte, "use this argument");
-  const Register rbx_method = rbx;  // (from f2)
-  const Register rax_mtype  = rax;  // (from f1)
+  const Register rbx_method = rbx;
+  const Register rax_mtype  = rax;
   const Register rcx_recv   = rcx;
   const Register rdx_flags  = rdx;
 
@@ -3104,13 +3105,14 @@ void TemplateTable::invokehandle(int byte_no) {
     return;
   }
 
-  prepare_invoke(byte_no,
-                 rbx_method, rax_mtype,  // get f2 Method*, f1 MethodType
-                 rcx_recv);
+  prepare_invoke(byte_no, rbx_method, rax_mtype, rcx_recv);
   __ verify_method_ptr(rbx_method);
   __ verify_oop(rcx_recv);
   __ null_check(rcx_recv);
 
+  // rax: MethodType object (from cpool->resolved_references[f1], if necessary)
+  // rbx: MH.invokeExact_MT method (from f2)
+
   // Note:  rax_mtype is already pushed (if necessary) by prepare_invoke
 
   // FIXME: profile the LambdaForm also
@@ -3140,7 +3142,7 @@ void TemplateTable::invokedynamic(int byte_no) {
 
   prepare_invoke(byte_no, rbx_method, rax_callsite);
 
-  // rax: CallSite object (from cpool->resolved_references[])
+  // rax: CallSite object (from cpool->resolved_references[f1])
   // rbx: MH.linkToCallSite method (from f2)
 
   // Note:  rax_callsite is already pushed by prepare_invoke
diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp b/hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp
index c0ff89796cf..dea3d7f5aaf 100644
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_32.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp
index bf5fd9be460..bb9b86f2473 100644
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_64.cpp
@@ -970,7 +970,7 @@ void TemplateTable::aastore() {
   // Move superklass into rax
   __ load_klass(rax, rdx);
   __ movptr(rax, Address(rax,
-                         objArrayKlass::element_klass_offset()));
+                         ObjArrayKlass::element_klass_offset()));
   // Compress array + index*oopSize + 12 into a single register.  Frees rcx.
   __ lea(rdx, element_address);
 
@@ -2184,7 +2184,7 @@ void TemplateTable::load_invoke_cp_cache_entry(int byte_no,
   const int index_offset = in_bytes(ConstantPoolCache::base_offset() +
                                     ConstantPoolCacheEntry::f2_offset());
 
-    size_t index_size = (is_invokedynamic ? sizeof(u4) : sizeof(u2));
+  size_t index_size = (is_invokedynamic ? sizeof(u4) : sizeof(u2));
   resolve_cache_and_index(byte_no, cache, index, index_size);
     __ movptr(method, Address(cache, index, Address::times_ptr, method_offset));
 
@@ -2926,6 +2926,7 @@ void TemplateTable::prepare_invoke(int byte_no,
     // since the parameter_size includes it.
     __ push(rbx);
     __ mov(rbx, index);
+    assert(ConstantPoolCacheEntry::_indy_resolved_references_appendix_offset == 0, "appendix expected at index+0");
     __ load_resolved_reference_at_index(index, rbx);
     __ pop(rbx);
     __ push(index);  // push appendix (MethodType, CallSite, etc.)
@@ -3144,8 +3145,8 @@ void TemplateTable::invokeinterface(int byte_no) {
 void TemplateTable::invokehandle(int byte_no) {
   transition(vtos, vtos);
   assert(byte_no == f1_byte, "use this argument");
-  const Register rbx_method = rbx;  // f2
-  const Register rax_mtype  = rax;  // f1
+  const Register rbx_method = rbx;
+  const Register rax_mtype  = rax;
   const Register rcx_recv   = rcx;
   const Register rdx_flags  = rdx;
 
@@ -3155,13 +3156,14 @@ void TemplateTable::invokehandle(int byte_no) {
     return;
   }
 
-  prepare_invoke(byte_no,
-                 rbx_method, rax_mtype,  // get f2 Method*, f1 MethodType
-                 rcx_recv);
+  prepare_invoke(byte_no, rbx_method, rax_mtype, rcx_recv);
   __ verify_method_ptr(rbx_method);
   __ verify_oop(rcx_recv);
   __ null_check(rcx_recv);
 
+  // rax: MethodType object (from cpool->resolved_references[f1], if necessary)
+  // rbx: MH.invokeExact_MT method (from f2)
+
   // Note:  rax_mtype is already pushed (if necessary) by prepare_invoke
 
   // FIXME: profile the LambdaForm also
@@ -3191,7 +3193,7 @@ void TemplateTable::invokedynamic(int byte_no) {
 
   prepare_invoke(byte_no, rbx_method, rax_callsite);
 
-  // rax: CallSite object (from cpool->resolved_references[])
+  // rax: CallSite object (from cpool->resolved_references[f1])
   // rbx: MH.linkToCallSite method (from f2)
 
   // Note:  rax_callsite is already pushed by prepare_invoke
diff --git a/hotspot/src/cpu/x86/vm/templateTable_x86_64.hpp b/hotspot/src/cpu/x86/vm/templateTable_x86_64.hpp
index 15c4c005620..fa506a094f8 100644
--- a/hotspot/src/cpu/x86/vm/templateTable_x86_64.hpp
+++ b/hotspot/src/cpu/x86/vm/templateTable_x86_64.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
index 12f3f258415..bf7b3c213f1 100644
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.cpp
@@ -363,6 +363,11 @@ void VM_Version::get_processor_features() {
   }
 
   _supports_cx8 = supports_cmpxchg8();
+  // xchg and xadd instructions
+  _supports_atomic_getset4 = true;
+  _supports_atomic_getadd4 = true;
+  LP64_ONLY(_supports_atomic_getset8 = true);
+  LP64_ONLY(_supports_atomic_getadd8 = true);
 
 #ifdef _LP64
   // OS should support SSE for x64 and hardware should support at least SSE2.
@@ -562,10 +567,10 @@ void VM_Version::get_processor_features() {
         AllocatePrefetchInstr = 3;
       }
       // On family 15h processors use XMM and UnalignedLoadStores for Array Copy
-      if( supports_sse2() && FLAG_IS_DEFAULT(UseXMMForArrayCopy) ) {
+      if (supports_sse2() && FLAG_IS_DEFAULT(UseXMMForArrayCopy)) {
         UseXMMForArrayCopy = true;
       }
-      if( FLAG_IS_DEFAULT(UseUnalignedLoadStores) && UseXMMForArrayCopy ) {
+      if (supports_sse2() && FLAG_IS_DEFAULT(UseUnalignedLoadStores)) {
         UseUnalignedLoadStores = true;
       }
     }
@@ -612,16 +617,16 @@ void VM_Version::get_processor_features() {
         MaxLoopPad = 11;
       }
 #endif // COMPILER2
-      if( FLAG_IS_DEFAULT(UseXMMForArrayCopy) ) {
+      if (FLAG_IS_DEFAULT(UseXMMForArrayCopy)) {
         UseXMMForArrayCopy = true; // use SSE2 movq on new Intel cpus
       }
-      if( supports_sse4_2() && supports_ht() ) { // Newest Intel cpus
-        if( FLAG_IS_DEFAULT(UseUnalignedLoadStores) && UseXMMForArrayCopy ) {
+      if (supports_sse4_2() && supports_ht()) { // Newest Intel cpus
+        if (FLAG_IS_DEFAULT(UseUnalignedLoadStores)) {
           UseUnalignedLoadStores = true; // use movdqu on newest Intel cpus
         }
       }
-      if( supports_sse4_2() && UseSSE >= 4 ) {
-        if( FLAG_IS_DEFAULT(UseSSE42Intrinsics)) {
+      if (supports_sse4_2() && UseSSE >= 4) {
+        if (FLAG_IS_DEFAULT(UseSSE42Intrinsics)) {
           UseSSE42Intrinsics = true;
         }
       }
@@ -638,6 +643,13 @@ void VM_Version::get_processor_features() {
     FLAG_SET_DEFAULT(UsePopCountInstruction, false);
   }
 
+#ifdef COMPILER2
+  if (FLAG_IS_DEFAULT(AlignVector)) {
+    // Modern processors allow misaligned memory operations for vectors.
+    AlignVector = !UseUnalignedLoadStores;
+  }
+#endif // COMPILER2
+
   assert(0 <= ReadPrefetchInstr && ReadPrefetchInstr <= 3, "invalid value");
   assert(0 <= AllocatePrefetchInstr && AllocatePrefetchInstr <= 3, "invalid value");
 
diff --git a/hotspot/src/cpu/x86/vm/vm_version_x86.hpp b/hotspot/src/cpu/x86/vm/vm_version_x86.hpp
index 7e309772af0..92cdbd3fd03 100644
--- a/hotspot/src/cpu/x86/vm/vm_version_x86.hpp
+++ b/hotspot/src/cpu/x86/vm/vm_version_x86.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp b/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp
index 578023ab4ad..867ebfa152f 100644
--- a/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp
+++ b/hotspot/src/cpu/x86/vm/vtableStubs_x86_64.cpp
@@ -212,11 +212,11 @@ int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
   if (is_vtable_stub) {
     // Vtable stub size
     return (DebugVtables ? 512 : 24) + (CountCompiledCalls ? 13 : 0) +
-           (UseCompressedOops ? 16 : 0);  // 1 leaq can be 3 bytes + 1 long
+           (UseCompressedKlassPointers ? 16 : 0);  // 1 leaq can be 3 bytes + 1 long
   } else {
     // Itable stub size
     return (DebugVtables ? 512 : 74) + (CountCompiledCalls ? 13 : 0) +
-           (UseCompressedOops ? 32 : 0);  // 2 leaqs
+           (UseCompressedKlassPointers ? 32 : 0);  // 2 leaqs
   }
   // In order to tune these parameters, run the JVM with VM options
   // +PrintMiscellaneous and +WizardMode to see information about
diff --git a/hotspot/src/cpu/x86/vm/x86.ad b/hotspot/src/cpu/x86/vm/x86.ad
index 71e26fb2007..a2cf6f7945d 100644
--- a/hotspot/src/cpu/x86/vm/x86.ad
+++ b/hotspot/src/cpu/x86/vm/x86.ad
@@ -498,10 +498,18 @@ const bool Matcher::match_rule_supported(int opcode) {
     case Op_PopCountL:
       if (!UsePopCountInstruction)
         return false;
+    break;
     case Op_MulVI:
       if ((UseSSE < 4) && (UseAVX < 1)) // only with SSE4_1 or AVX
         return false;
     break;
+    case Op_CompareAndSwapL:
+#ifdef _LP64
+    case Op_CompareAndSwapP:
+#endif
+      if (!VM_Version::supports_cx8())
+        return false;
+    break;
   }
 
   return true;  // Per default match rules are supported.
@@ -563,6 +571,11 @@ const int Matcher::vector_ideal_reg(int size) {
   return 0;
 }
 
+// Only lowest bits of xmm reg are used for vector shift count.
+const int Matcher::vector_shift_count_ideal_reg(int size) {
+  return Op_VecS;
+}
+
 // x86 supports misaligned vectors store/load.
 const bool Matcher::misaligned_vectors_ok() {
   return !AlignVector; // can be changed by flag
@@ -3750,10 +3763,24 @@ instruct vdiv4D_mem(vecY dst, vecY src, memory mem) %{
   ins_pipe( pipe_slow );
 %}
 
+// ------------------------------ Shift ---------------------------------------
+
+// Left and right shift count vectors are the same on x86
+// (only lowest bits of xmm reg are used for count).
+instruct vshiftcnt(vecS dst, rRegI cnt) %{
+  match(Set dst (LShiftCntV cnt));
+  match(Set dst (RShiftCntV cnt));
+  format %{ "movd    $dst,$cnt\t! load shift count" %}
+  ins_encode %{
+    __ movdl($dst$$XMMRegister, $cnt$$Register);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
 // ------------------------------ LeftShift -----------------------------------
 
 // Shorts/Chars vector left shift
-instruct vsll2S(vecS dst, regF shift) %{
+instruct vsll2S(vecS dst, vecS shift) %{
   predicate(n->as_Vector()->length() == 2);
   match(Set dst (LShiftVS dst shift));
   format %{ "psllw   $dst,$shift\t! left shift packed2S" %}
@@ -3773,7 +3800,7 @@ instruct vsll2S_imm(vecS dst, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsll2S_reg(vecS dst, vecS src, regF shift) %{
+instruct vsll2S_reg(vecS dst, vecS src, vecS shift) %{
   predicate(UseAVX > 0 && n->as_Vector()->length() == 2);
   match(Set dst (LShiftVS src shift));
   format %{ "vpsllw  $dst,$src,$shift\t! left shift packed2S" %}
@@ -3795,7 +3822,7 @@ instruct vsll2S_reg_imm(vecS dst, vecS src, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsll4S(vecD dst, regF shift) %{
+instruct vsll4S(vecD dst, vecS shift) %{
   predicate(n->as_Vector()->length() == 4);
   match(Set dst (LShiftVS dst shift));
   format %{ "psllw   $dst,$shift\t! left shift packed4S" %}
@@ -3815,7 +3842,7 @@ instruct vsll4S_imm(vecD dst, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsll4S_reg(vecD dst, vecD src, regF shift) %{
+instruct vsll4S_reg(vecD dst, vecD src, vecS shift) %{
   predicate(UseAVX > 0 && n->as_Vector()->length() == 4);
   match(Set dst (LShiftVS src shift));
   format %{ "vpsllw  $dst,$src,$shift\t! left shift packed4S" %}
@@ -3837,7 +3864,7 @@ instruct vsll4S_reg_imm(vecD dst, vecD src, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsll8S(vecX dst, regF shift) %{
+instruct vsll8S(vecX dst, vecS shift) %{
   predicate(n->as_Vector()->length() == 8);
   match(Set dst (LShiftVS dst shift));
   format %{ "psllw   $dst,$shift\t! left shift packed8S" %}
@@ -3857,7 +3884,7 @@ instruct vsll8S_imm(vecX dst, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsll8S_reg(vecX dst, vecX src, regF shift) %{
+instruct vsll8S_reg(vecX dst, vecX src, vecS shift) %{
   predicate(UseAVX > 0 && n->as_Vector()->length() == 8);
   match(Set dst (LShiftVS src shift));
   format %{ "vpsllw  $dst,$src,$shift\t! left shift packed8S" %}
@@ -3879,7 +3906,7 @@ instruct vsll8S_reg_imm(vecX dst, vecX src, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsll16S_reg(vecY dst, vecY src, regF shift) %{
+instruct vsll16S_reg(vecY dst, vecY src, vecS shift) %{
   predicate(UseAVX > 1 && n->as_Vector()->length() == 16);
   match(Set dst (LShiftVS src shift));
   format %{ "vpsllw  $dst,$src,$shift\t! left shift packed16S" %}
@@ -3902,7 +3929,7 @@ instruct vsll16S_reg_imm(vecY dst, vecY src, immI8 shift) %{
 %}
 
 // Integers vector left shift
-instruct vsll2I(vecD dst, regF shift) %{
+instruct vsll2I(vecD dst, vecS shift) %{
   predicate(n->as_Vector()->length() == 2);
   match(Set dst (LShiftVI dst shift));
   format %{ "pslld   $dst,$shift\t! left shift packed2I" %}
@@ -3922,7 +3949,7 @@ instruct vsll2I_imm(vecD dst, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsll2I_reg(vecD dst, vecD src, regF shift) %{
+instruct vsll2I_reg(vecD dst, vecD src, vecS shift) %{
   predicate(UseAVX > 0 && n->as_Vector()->length() == 2);
   match(Set dst (LShiftVI src shift));
   format %{ "vpslld  $dst,$src,$shift\t! left shift packed2I" %}
@@ -3944,7 +3971,7 @@ instruct vsll2I_reg_imm(vecD dst, vecD src, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsll4I(vecX dst, regF shift) %{
+instruct vsll4I(vecX dst, vecS shift) %{
   predicate(n->as_Vector()->length() == 4);
   match(Set dst (LShiftVI dst shift));
   format %{ "pslld   $dst,$shift\t! left shift packed4I" %}
@@ -3964,7 +3991,7 @@ instruct vsll4I_imm(vecX dst, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsll4I_reg(vecX dst, vecX src, regF shift) %{
+instruct vsll4I_reg(vecX dst, vecX src, vecS shift) %{
   predicate(UseAVX > 0 && n->as_Vector()->length() == 4);
   match(Set dst (LShiftVI src shift));
   format %{ "vpslld  $dst,$src,$shift\t! left shift packed4I" %}
@@ -3986,7 +4013,7 @@ instruct vsll4I_reg_imm(vecX dst, vecX src, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsll8I_reg(vecY dst, vecY src, regF shift) %{
+instruct vsll8I_reg(vecY dst, vecY src, vecS shift) %{
   predicate(UseAVX > 1 && n->as_Vector()->length() == 8);
   match(Set dst (LShiftVI src shift));
   format %{ "vpslld  $dst,$src,$shift\t! left shift packed8I" %}
@@ -4009,7 +4036,7 @@ instruct vsll8I_reg_imm(vecY dst, vecY src, immI8 shift) %{
 %}
 
 // Longs vector left shift
-instruct vsll2L(vecX dst, regF shift) %{
+instruct vsll2L(vecX dst, vecS shift) %{
   predicate(n->as_Vector()->length() == 2);
   match(Set dst (LShiftVL dst shift));
   format %{ "psllq   $dst,$shift\t! left shift packed2L" %}
@@ -4029,7 +4056,7 @@ instruct vsll2L_imm(vecX dst, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsll2L_reg(vecX dst, vecX src, regF shift) %{
+instruct vsll2L_reg(vecX dst, vecX src, vecS shift) %{
   predicate(UseAVX > 0 && n->as_Vector()->length() == 2);
   match(Set dst (LShiftVL src shift));
   format %{ "vpsllq  $dst,$src,$shift\t! left shift packed2L" %}
@@ -4051,7 +4078,7 @@ instruct vsll2L_reg_imm(vecX dst, vecX src, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsll4L_reg(vecY dst, vecY src, regF shift) %{
+instruct vsll4L_reg(vecY dst, vecY src, vecS shift) %{
   predicate(UseAVX > 1 && n->as_Vector()->length() == 4);
   match(Set dst (LShiftVL src shift));
   format %{ "vpsllq  $dst,$src,$shift\t! left shift packed4L" %}
@@ -4080,7 +4107,7 @@ instruct vsll4L_reg_imm(vecY dst, vecY src, immI8 shift) %{
 // sign extension before a shift.
 
 // Integers vector logical right shift
-instruct vsrl2I(vecD dst, regF shift) %{
+instruct vsrl2I(vecD dst, vecS shift) %{
   predicate(n->as_Vector()->length() == 2);
   match(Set dst (URShiftVI dst shift));
   format %{ "psrld   $dst,$shift\t! logical right shift packed2I" %}
@@ -4100,7 +4127,7 @@ instruct vsrl2I_imm(vecD dst, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsrl2I_reg(vecD dst, vecD src, regF shift) %{
+instruct vsrl2I_reg(vecD dst, vecD src, vecS shift) %{
   predicate(UseAVX > 0 && n->as_Vector()->length() == 2);
   match(Set dst (URShiftVI src shift));
   format %{ "vpsrld  $dst,$src,$shift\t! logical right shift packed2I" %}
@@ -4122,7 +4149,7 @@ instruct vsrl2I_reg_imm(vecD dst, vecD src, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsrl4I(vecX dst, regF shift) %{
+instruct vsrl4I(vecX dst, vecS shift) %{
   predicate(n->as_Vector()->length() == 4);
   match(Set dst (URShiftVI dst shift));
   format %{ "psrld   $dst,$shift\t! logical right shift packed4I" %}
@@ -4142,7 +4169,7 @@ instruct vsrl4I_imm(vecX dst, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsrl4I_reg(vecX dst, vecX src, regF shift) %{
+instruct vsrl4I_reg(vecX dst, vecX src, vecS shift) %{
   predicate(UseAVX > 0 && n->as_Vector()->length() == 4);
   match(Set dst (URShiftVI src shift));
   format %{ "vpsrld  $dst,$src,$shift\t! logical right shift packed4I" %}
@@ -4164,7 +4191,7 @@ instruct vsrl4I_reg_imm(vecX dst, vecX src, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsrl8I_reg(vecY dst, vecY src, regF shift) %{
+instruct vsrl8I_reg(vecY dst, vecY src, vecS shift) %{
   predicate(UseAVX > 1 && n->as_Vector()->length() == 8);
   match(Set dst (URShiftVI src shift));
   format %{ "vpsrld  $dst,$src,$shift\t! logical right shift packed8I" %}
@@ -4187,7 +4214,7 @@ instruct vsrl8I_reg_imm(vecY dst, vecY src, immI8 shift) %{
 %}
 
 // Longs vector logical right shift
-instruct vsrl2L(vecX dst, regF shift) %{
+instruct vsrl2L(vecX dst, vecS shift) %{
   predicate(n->as_Vector()->length() == 2);
   match(Set dst (URShiftVL dst shift));
   format %{ "psrlq   $dst,$shift\t! logical right shift packed2L" %}
@@ -4207,7 +4234,7 @@ instruct vsrl2L_imm(vecX dst, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsrl2L_reg(vecX dst, vecX src, regF shift) %{
+instruct vsrl2L_reg(vecX dst, vecX src, vecS shift) %{
   predicate(UseAVX > 0 && n->as_Vector()->length() == 2);
   match(Set dst (URShiftVL src shift));
   format %{ "vpsrlq  $dst,$src,$shift\t! logical right shift packed2L" %}
@@ -4229,7 +4256,7 @@ instruct vsrl2L_reg_imm(vecX dst, vecX src, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsrl4L_reg(vecY dst, vecY src, regF shift) %{
+instruct vsrl4L_reg(vecY dst, vecY src, vecS shift) %{
   predicate(UseAVX > 1 && n->as_Vector()->length() == 4);
   match(Set dst (URShiftVL src shift));
   format %{ "vpsrlq  $dst,$src,$shift\t! logical right shift packed4L" %}
@@ -4254,7 +4281,7 @@ instruct vsrl4L_reg_imm(vecY dst, vecY src, immI8 shift) %{
 // ------------------- ArithmeticRightShift -----------------------------------
 
 // Shorts/Chars vector arithmetic right shift
-instruct vsra2S(vecS dst, regF shift) %{
+instruct vsra2S(vecS dst, vecS shift) %{
   predicate(n->as_Vector()->length() == 2);
   match(Set dst (RShiftVS dst shift));
   format %{ "psraw   $dst,$shift\t! arithmetic right shift packed2S" %}
@@ -4274,7 +4301,7 @@ instruct vsra2S_imm(vecS dst, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsra2S_reg(vecS dst, vecS src, regF shift) %{
+instruct vsra2S_reg(vecS dst, vecS src, vecS shift) %{
   predicate(UseAVX > 0 && n->as_Vector()->length() == 2);
   match(Set dst (RShiftVS src shift));
   format %{ "vpsraw  $dst,$src,$shift\t! arithmetic right shift packed2S" %}
@@ -4296,7 +4323,7 @@ instruct vsra2S_reg_imm(vecS dst, vecS src, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsra4S(vecD dst, regF shift) %{
+instruct vsra4S(vecD dst, vecS shift) %{
   predicate(n->as_Vector()->length() == 4);
   match(Set dst (RShiftVS dst shift));
   format %{ "psraw   $dst,$shift\t! arithmetic right shift packed4S" %}
@@ -4316,7 +4343,7 @@ instruct vsra4S_imm(vecD dst, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsra4S_reg(vecD dst, vecD src, regF shift) %{
+instruct vsra4S_reg(vecD dst, vecD src, vecS shift) %{
   predicate(UseAVX > 0 && n->as_Vector()->length() == 4);
   match(Set dst (RShiftVS src shift));
   format %{ "vpsraw  $dst,$src,$shift\t! arithmetic right shift packed4S" %}
@@ -4338,7 +4365,7 @@ instruct vsra4S_reg_imm(vecD dst, vecD src, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsra8S(vecX dst, regF shift) %{
+instruct vsra8S(vecX dst, vecS shift) %{
   predicate(n->as_Vector()->length() == 8);
   match(Set dst (RShiftVS dst shift));
   format %{ "psraw   $dst,$shift\t! arithmetic right shift packed8S" %}
@@ -4358,7 +4385,7 @@ instruct vsra8S_imm(vecX dst, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsra8S_reg(vecX dst, vecX src, regF shift) %{
+instruct vsra8S_reg(vecX dst, vecX src, vecS shift) %{
   predicate(UseAVX > 0 && n->as_Vector()->length() == 8);
   match(Set dst (RShiftVS src shift));
   format %{ "vpsraw  $dst,$src,$shift\t! arithmetic right shift packed8S" %}
@@ -4380,7 +4407,7 @@ instruct vsra8S_reg_imm(vecX dst, vecX src, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsra16S_reg(vecY dst, vecY src, regF shift) %{
+instruct vsra16S_reg(vecY dst, vecY src, vecS shift) %{
   predicate(UseAVX > 1 && n->as_Vector()->length() == 16);
   match(Set dst (RShiftVS src shift));
   format %{ "vpsraw  $dst,$src,$shift\t! arithmetic right shift packed16S" %}
@@ -4403,7 +4430,7 @@ instruct vsra16S_reg_imm(vecY dst, vecY src, immI8 shift) %{
 %}
 
 // Integers vector arithmetic right shift
-instruct vsra2I(vecD dst, regF shift) %{
+instruct vsra2I(vecD dst, vecS shift) %{
   predicate(n->as_Vector()->length() == 2);
   match(Set dst (RShiftVI dst shift));
   format %{ "psrad   $dst,$shift\t! arithmetic right shift packed2I" %}
@@ -4423,7 +4450,7 @@ instruct vsra2I_imm(vecD dst, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsra2I_reg(vecD dst, vecD src, regF shift) %{
+instruct vsra2I_reg(vecD dst, vecD src, vecS shift) %{
   predicate(UseAVX > 0 && n->as_Vector()->length() == 2);
   match(Set dst (RShiftVI src shift));
   format %{ "vpsrad  $dst,$src,$shift\t! arithmetic right shift packed2I" %}
@@ -4445,7 +4472,7 @@ instruct vsra2I_reg_imm(vecD dst, vecD src, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsra4I(vecX dst, regF shift) %{
+instruct vsra4I(vecX dst, vecS shift) %{
   predicate(n->as_Vector()->length() == 4);
   match(Set dst (RShiftVI dst shift));
   format %{ "psrad   $dst,$shift\t! arithmetic right shift packed4I" %}
@@ -4465,7 +4492,7 @@ instruct vsra4I_imm(vecX dst, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsra4I_reg(vecX dst, vecX src, regF shift) %{
+instruct vsra4I_reg(vecX dst, vecX src, vecS shift) %{
   predicate(UseAVX > 0 && n->as_Vector()->length() == 4);
   match(Set dst (RShiftVI src shift));
   format %{ "vpsrad  $dst,$src,$shift\t! arithmetic right shift packed4I" %}
@@ -4487,7 +4514,7 @@ instruct vsra4I_reg_imm(vecX dst, vecX src, immI8 shift) %{
   ins_pipe( pipe_slow );
 %}
 
-instruct vsra8I_reg(vecY dst, vecY src, regF shift) %{
+instruct vsra8I_reg(vecY dst, vecY src, vecS shift) %{
   predicate(UseAVX > 1 && n->as_Vector()->length() == 8);
   match(Set dst (RShiftVI src shift));
   format %{ "vpsrad  $dst,$src,$shift\t! arithmetic right shift packed8I" %}
diff --git a/hotspot/src/cpu/x86/vm/x86_32.ad b/hotspot/src/cpu/x86/vm/x86_32.ad
index e82d799ec08..dafac776c56 100644
--- a/hotspot/src/cpu/x86/vm/x86_32.ad
+++ b/hotspot/src/cpu/x86/vm/x86_32.ad
@@ -1424,6 +1424,11 @@ bool Matcher::narrow_oop_use_complex_address() {
   return true;
 }
 
+bool Matcher::narrow_klass_use_complex_address() {
+  ShouldNotCallThis();
+  return true;
+}
+
 
 // Is it better to copy float constants, or load them directly from memory?
 // Intel can load a float constant from a direct address, requiring no
@@ -1553,9 +1558,6 @@ const RegMask Matcher::method_handle_invoke_SP_save_mask() {
 // Returns true if the high 32 bits of the value is known to be zero.
 bool is_operand_hi32_zero(Node* n) {
   int opc = n->Opcode();
-  if (opc == Op_LoadUI2L) {
-    return true;
-  }
   if (opc == Op_AndL) {
     Node* o2 = n->in(2);
     if (o2->is_Con() && (o2->get_long() & 0xFFFFFFFF00000000LL) == 0LL) {
@@ -6147,8 +6149,8 @@ instruct loadI2L_immI(eRegL dst, memory mem, immI mask, eFlagsReg cr) %{
 %}
 
 // Load Unsigned Integer into Long Register
-instruct loadUI2L(eRegL dst, memory mem, eFlagsReg cr) %{
-  match(Set dst (LoadUI2L mem));
+instruct loadUI2L(eRegL dst, memory mem, immL_32bits mask, eFlagsReg cr) %{
+  match(Set dst (AndL (ConvI2L (LoadI mem)) mask));
   effect(KILL cr);
 
   ins_cost(250);
@@ -7762,6 +7764,7 @@ instruct storeLConditional( memory mem, eADXRegL oldval, eBCXRegL newval, eFlags
 // No flag versions for CompareAndSwap{P,I,L} because matcher can't match them
 
 instruct compareAndSwapL( rRegI res, eSIRegP mem_ptr, eADXRegL oldval, eBCXRegL newval, eFlagsReg cr ) %{
+  predicate(VM_Version::supports_cx8());
   match(Set res (CompareAndSwapL mem_ptr (Binary oldval newval)));
   effect(KILL cr, KILL oldval);
   format %{ "CMPXCHG8 [$mem_ptr],$newval\t# If EDX:EAX==[$mem_ptr] Then store $newval into [$mem_ptr]\n\t"
@@ -7798,6 +7801,47 @@ instruct compareAndSwapI( rRegI res, pRegP mem_ptr, eAXRegI oldval, eCXRegI newv
   ins_pipe( pipe_cmpxchg );
 %}
 
+instruct xaddI_no_res( memory mem, Universe dummy, immI add, eFlagsReg cr) %{
+  predicate(n->as_LoadStore()->result_not_used());
+  match(Set dummy (GetAndAddI mem add));
+  effect(KILL cr);
+  format %{ "ADDL  [$mem],$add" %}
+  ins_encode %{
+    if (os::is_MP()) { __ lock(); }
+    __ addl($mem$$Address, $add$$constant);
+  %}
+  ins_pipe( pipe_cmpxchg );
+%}
+
+instruct xaddI( memory mem, rRegI newval, eFlagsReg cr) %{
+  match(Set newval (GetAndAddI mem newval));
+  effect(KILL cr);
+  format %{ "XADDL  [$mem],$newval" %}
+  ins_encode %{
+    if (os::is_MP()) { __ lock(); }
+    __ xaddl($mem$$Address, $newval$$Register);
+  %}
+  ins_pipe( pipe_cmpxchg );
+%}
+
+instruct xchgI( memory mem, rRegI newval) %{
+  match(Set newval (GetAndSetI mem newval));
+  format %{ "XCHGL  $newval,[$mem]" %}
+  ins_encode %{
+    __ xchgl($newval$$Register, $mem$$Address);
+  %}
+  ins_pipe( pipe_cmpxchg );
+%}
+
+instruct xchgP( memory mem, pRegP newval) %{
+  match(Set newval (GetAndSetP mem newval));
+  format %{ "XCHGL  $newval,[$mem]" %}
+  ins_encode %{
+    __ xchgl($newval$$Register, $mem$$Address);
+  %}
+  ins_pipe( pipe_cmpxchg );
+%}
+
 //----------Subtraction Instructions-------------------------------------------
 // Integer Subtraction Instructions
 instruct subI_eReg(rRegI dst, rRegI src, eFlagsReg cr) %{
@@ -12103,8 +12147,8 @@ instruct partialSubtypeCheck( eDIRegP result, eSIRegP sub, eAXRegP super, eCXReg
 
   ins_cost(1100);  // slightly larger than the next version
   format %{ "MOV    EDI,[$sub+Klass::secondary_supers]\n\t"
-            "MOV    ECX,[EDI+arrayKlass::length]\t# length to scan\n\t"
-            "ADD    EDI,arrayKlass::base_offset\t# Skip to start of data; set NZ in case count is zero\n\t"
+            "MOV    ECX,[EDI+ArrayKlass::length]\t# length to scan\n\t"
+            "ADD    EDI,ArrayKlass::base_offset\t# Skip to start of data; set NZ in case count is zero\n\t"
             "REPNE SCASD\t# Scan *EDI++ for a match with EAX while CX-- != 0\n\t"
             "JNE,s  miss\t\t# Missed: EDI not-zero\n\t"
             "MOV    [$sub+Klass::secondary_super_cache],$super\t# Hit: update cache\n\t"
@@ -12122,8 +12166,8 @@ instruct partialSubtypeCheck_vs_Zero( eFlagsReg cr, eSIRegP sub, eAXRegP super,
 
   ins_cost(1000);
   format %{ "MOV    EDI,[$sub+Klass::secondary_supers]\n\t"
-            "MOV    ECX,[EDI+arrayKlass::length]\t# length to scan\n\t"
-            "ADD    EDI,arrayKlass::base_offset\t# Skip to start of data; set NZ in case count is zero\n\t"
+            "MOV    ECX,[EDI+ArrayKlass::length]\t# length to scan\n\t"
+            "ADD    EDI,ArrayKlass::base_offset\t# Skip to start of data; set NZ in case count is zero\n\t"
             "REPNE SCASD\t# Scan *EDI++ for a match with EAX while CX-- != 0\n\t"
             "JNE,s  miss\t\t# Missed: flags NZ\n\t"
             "MOV    [$sub+Klass::secondary_super_cache],$super\t# Hit: update cache, flags Z\n\t"
diff --git a/hotspot/src/cpu/x86/vm/x86_64.ad b/hotspot/src/cpu/x86/vm/x86_64.ad
index 8c0fb376f3b..5b05ec22293 100644
--- a/hotspot/src/cpu/x86/vm/x86_64.ad
+++ b/hotspot/src/cpu/x86/vm/x86_64.ad
@@ -1409,10 +1409,10 @@ uint reloc_java_to_interp()
 #ifndef PRODUCT
 void MachUEPNode::format(PhaseRegAlloc* ra_, outputStream* st) const
 {
-  if (UseCompressedOops) {
+  if (UseCompressedKlassPointers) {
     st->print_cr("movl    rscratch1, [j_rarg0 + oopDesc::klass_offset_in_bytes()]\t# compressed klass");
-    if (Universe::narrow_oop_shift() != 0) {
-      st->print_cr("\tdecode_heap_oop_not_null rscratch1, rscratch1");
+    if (Universe::narrow_klass_shift() != 0) {
+      st->print_cr("\tdecode_klass_not_null rscratch1, rscratch1");
     }
     st->print_cr("\tcmpq    rax, rscratch1\t # Inline cache check");
   } else {
@@ -1428,7 +1428,7 @@ void MachUEPNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const
 {
   MacroAssembler masm(&cbuf);
   uint insts_size = cbuf.insts_size();
-  if (UseCompressedOops) {
+  if (UseCompressedKlassPointers) {
     masm.load_klass(rscratch1, j_rarg0);
     masm.cmpptr(rax, rscratch1);
   } else {
@@ -1576,6 +1576,11 @@ bool Matcher::narrow_oop_use_complex_address() {
   return (LogMinObjAlignmentInBytes <= 3);
 }
 
+bool Matcher::narrow_klass_use_complex_address() {
+  assert(UseCompressedKlassPointers, "only for compressed klass code");
+  return (LogKlassAlignmentInBytes <= 3);
+}
+
 // Is it better to copy float constants, or load them directly from
 // memory?  Intel can load a float constant from a direct address,
 // requiring no extra registers.  Most RISCs will have to materialize
@@ -3139,6 +3144,14 @@ operand immN() %{
   interface(CONST_INTER);
 %}
 
+operand immNKlass() %{
+  match(ConNKlass);
+
+  op_cost(10);
+  format %{ %}
+  interface(CONST_INTER);
+%}
+
 // NULL Pointer Immediate
 operand immN0() %{
   predicate(n->get_narrowcon() == 0);
@@ -4038,6 +4051,145 @@ operand indPosIndexScaleOffsetNarrow(rRegN reg, immL32 off, rRegI idx, immI2 sca
   %}
 %}
 
+operand indirectNarrowKlass(rRegN reg)
+%{
+  predicate(Universe::narrow_klass_shift() == 0);
+  constraint(ALLOC_IN_RC(ptr_reg));
+  match(DecodeNKlass reg);
+
+  format %{ "[$reg]" %}
+  interface(MEMORY_INTER) %{
+    base($reg);
+    index(0x4);
+    scale(0x0);
+    disp(0x0);
+  %}
+%}
+
+operand indOffset8NarrowKlass(rRegN reg, immL8 off)
+%{
+  predicate(Universe::narrow_klass_shift() == 0);
+  constraint(ALLOC_IN_RC(ptr_reg));
+  match(AddP (DecodeNKlass reg) off);
+
+  format %{ "[$reg + $off (8-bit)]" %}
+  interface(MEMORY_INTER) %{
+    base($reg);
+    index(0x4);
+    scale(0x0);
+    disp($off);
+  %}
+%}
+
+operand indOffset32NarrowKlass(rRegN reg, immL32 off)
+%{
+  predicate(Universe::narrow_klass_shift() == 0);
+  constraint(ALLOC_IN_RC(ptr_reg));
+  match(AddP (DecodeNKlass reg) off);
+
+  format %{ "[$reg + $off (32-bit)]" %}
+  interface(MEMORY_INTER) %{
+    base($reg);
+    index(0x4);
+    scale(0x0);
+    disp($off);
+  %}
+%}
+
+operand indIndexOffsetNarrowKlass(rRegN reg, rRegL lreg, immL32 off)
+%{
+  predicate(Universe::narrow_klass_shift() == 0);
+  constraint(ALLOC_IN_RC(ptr_reg));
+  match(AddP (AddP (DecodeNKlass reg) lreg) off);
+
+  op_cost(10);
+  format %{"[$reg + $off + $lreg]" %}
+  interface(MEMORY_INTER) %{
+    base($reg);
+    index($lreg);
+    scale(0x0);
+    disp($off);
+  %}
+%}
+
+operand indIndexNarrowKlass(rRegN reg, rRegL lreg)
+%{
+  predicate(Universe::narrow_klass_shift() == 0);
+  constraint(ALLOC_IN_RC(ptr_reg));
+  match(AddP (DecodeNKlass reg) lreg);
+
+  op_cost(10);
+  format %{"[$reg + $lreg]" %}
+  interface(MEMORY_INTER) %{
+    base($reg);
+    index($lreg);
+    scale(0x0);
+    disp(0x0);
+  %}
+%}
+
+operand indIndexScaleNarrowKlass(rRegN reg, rRegL lreg, immI2 scale)
+%{
+  predicate(Universe::narrow_klass_shift() == 0);
+  constraint(ALLOC_IN_RC(ptr_reg));
+  match(AddP (DecodeNKlass reg) (LShiftL lreg scale));
+
+  op_cost(10);
+  format %{"[$reg + $lreg << $scale]" %}
+  interface(MEMORY_INTER) %{
+    base($reg);
+    index($lreg);
+    scale($scale);
+    disp(0x0);
+  %}
+%}
+
+operand indIndexScaleOffsetNarrowKlass(rRegN reg, immL32 off, rRegL lreg, immI2 scale)
+%{
+  predicate(Universe::narrow_klass_shift() == 0);
+  constraint(ALLOC_IN_RC(ptr_reg));
+  match(AddP (AddP (DecodeNKlass reg) (LShiftL lreg scale)) off);
+
+  op_cost(10);
+  format %{"[$reg + $off + $lreg << $scale]" %}
+  interface(MEMORY_INTER) %{
+    base($reg);
+    index($lreg);
+    scale($scale);
+    disp($off);
+  %}
+%}
+
+operand indCompressedKlassOffset(rRegN reg, immL32 off) %{
+  predicate(UseCompressedKlassPointers && (Universe::narrow_klass_shift() == Address::times_8));
+  constraint(ALLOC_IN_RC(ptr_reg));
+  match(AddP (DecodeNKlass reg) off);
+
+  op_cost(10);
+  format %{"[R12 + $reg << 3 + $off] (compressed klass addressing)" %}
+  interface(MEMORY_INTER) %{
+    base(0xc); // R12
+    index($reg);
+    scale(0x3);
+    disp($off);
+  %}
+%}
+
+operand indPosIndexScaleOffsetNarrowKlass(rRegN reg, immL32 off, rRegI idx, immI2 scale)
+%{
+  constraint(ALLOC_IN_RC(ptr_reg));
+  predicate(Universe::narrow_klass_shift() == 0 && n->in(2)->in(3)->in(1)->as_Type()->type()->is_long()->_lo >= 0);
+  match(AddP (AddP (DecodeNKlass reg) (LShiftL (ConvI2L idx) scale)) off);
+
+  op_cost(10);
+  format %{"[$reg + $off + $idx << $scale]" %}
+  interface(MEMORY_INTER) %{
+    base($reg);
+    index($idx);
+    scale($scale);
+    disp($off);
+  %}
+%}
 
 //----------Special Memory Operands--------------------------------------------
 // Stack Slot Operand - This operand is used for loading and storing temporary
@@ -4209,7 +4361,11 @@ opclass memory(indirect, indOffset8, indOffset32, indIndexOffset, indIndex,
                indCompressedOopOffset,
                indirectNarrow, indOffset8Narrow, indOffset32Narrow,
                indIndexOffsetNarrow, indIndexNarrow, indIndexScaleNarrow,
-               indIndexScaleOffsetNarrow, indPosIndexScaleOffsetNarrow);
+               indIndexScaleOffsetNarrow, indPosIndexScaleOffsetNarrow,
+               indCompressedKlassOffset,
+               indirectNarrowKlass, indOffset8NarrowKlass, indOffset32NarrowKlass,
+               indIndexOffsetNarrowKlass, indIndexNarrowKlass, indIndexScaleNarrowKlass,
+               indIndexScaleOffsetNarrowKlass, indPosIndexScaleOffsetNarrowKlass);
 
 //----------PIPELINE-----------------------------------------------------------
 // Rules which define the behavior of the target architectures pipeline.
@@ -5044,9 +5200,9 @@ instruct loadI2L_immI(rRegL dst, memory mem, immI mask, rFlagsReg cr) %{
 %}
 
 // Load Unsigned Integer into Long Register
-instruct loadUI2L(rRegL dst, memory mem)
+instruct loadUI2L(rRegL dst, memory mem, immL_32bits mask) 
 %{
-  match(Set dst (LoadUI2L mem));
+  match(Set dst (AndL (ConvI2L (LoadI mem)) mask));
 
   ins_cost(125);
   format %{ "movl    $dst, $mem\t# uint -> long" %}
@@ -5469,6 +5625,22 @@ instruct loadConN(rRegN dst, immN src) %{
   ins_pipe(ialu_reg_fat); // XXX
 %}
 
+instruct loadConNKlass(rRegN dst, immNKlass src) %{
+  match(Set dst src);
+
+  ins_cost(125);
+  format %{ "movl    $dst, $src\t# compressed klass ptr" %}
+  ins_encode %{
+    address con = (address)$src$$constant;
+    if (con == NULL) {
+      ShouldNotReachHere();
+    } else {
+      __ set_narrow_klass($dst$$Register, (Klass*)$src$$constant);
+    }
+  %}
+  ins_pipe(ialu_reg_fat); // XXX
+%}
+
 instruct loadConF0(regF dst, immF0 src)
 %{
   match(Set dst src);
@@ -5738,7 +5910,7 @@ instruct storeP(memory mem, any_RegP src)
 
 instruct storeImmP0(memory mem, immP0 zero)
 %{
-  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL));
+  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL) && (Universe::narrow_klass_base() == NULL));
   match(Set mem (StoreP mem zero));
 
   ins_cost(125); // XXX
@@ -5774,9 +5946,21 @@ instruct storeN(memory mem, rRegN src)
   ins_pipe(ialu_mem_reg);
 %}
 
+instruct storeNKlass(memory mem, rRegN src)
+%{
+  match(Set mem (StoreNKlass mem src));
+
+  ins_cost(125); // XXX
+  format %{ "movl    $mem, $src\t# compressed klass ptr" %}
+  ins_encode %{
+    __ movl($mem$$Address, $src$$Register);
+  %}
+  ins_pipe(ialu_mem_reg);
+%}
+
 instruct storeImmN0(memory mem, immN0 zero)
 %{
-  predicate(Universe::narrow_oop_base() == NULL);
+  predicate(Universe::narrow_oop_base() == NULL && Universe::narrow_klass_base() == NULL);
   match(Set mem (StoreN mem zero));
 
   ins_cost(125); // XXX
@@ -5804,10 +5988,22 @@ instruct storeImmN(memory mem, immN src)
   ins_pipe(ialu_mem_imm);
 %}
 
+instruct storeImmNKlass(memory mem, immNKlass src)
+%{
+  match(Set mem (StoreNKlass mem src));
+
+  ins_cost(150); // XXX
+  format %{ "movl    $mem, $src\t# compressed klass ptr" %}
+  ins_encode %{
+    __ set_narrow_klass($mem$$Address, (Klass*)$src$$constant);
+  %}
+  ins_pipe(ialu_mem_imm);
+%}
+
 // Store Integer Immediate
 instruct storeImmI0(memory mem, immI0 zero)
 %{
-  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL));
+  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL) && (Universe::narrow_klass_base() == NULL));
   match(Set mem (StoreI mem zero));
 
   ins_cost(125); // XXX
@@ -5832,7 +6028,7 @@ instruct storeImmI(memory mem, immI src)
 // Store Long Immediate
 instruct storeImmL0(memory mem, immL0 zero)
 %{
-  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL));
+  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL) && (Universe::narrow_klass_base() == NULL));
   match(Set mem (StoreL mem zero));
 
   ins_cost(125); // XXX
@@ -5857,7 +6053,7 @@ instruct storeImmL(memory mem, immL32 src)
 // Store Short/Char Immediate
 instruct storeImmC0(memory mem, immI0 zero)
 %{
-  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL));
+  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL) && (Universe::narrow_klass_base() == NULL));
   match(Set mem (StoreC mem zero));
 
   ins_cost(125); // XXX
@@ -5883,7 +6079,7 @@ instruct storeImmI16(memory mem, immI16 src)
 // Store Byte Immediate
 instruct storeImmB0(memory mem, immI0 zero)
 %{
-  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL));
+  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL) && (Universe::narrow_klass_base() == NULL));
   match(Set mem (StoreB mem zero));
 
   ins_cost(125); // XXX
@@ -5908,7 +6104,7 @@ instruct storeImmB(memory mem, immI8 src)
 // Store CMS card-mark Immediate
 instruct storeImmCM0_reg(memory mem, immI0 zero)
 %{
-  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL));
+  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL) && (Universe::narrow_klass_base() == NULL));
   match(Set mem (StoreCM mem zero));
 
   ins_cost(125); // XXX
@@ -5946,7 +6142,7 @@ instruct storeF(memory mem, regF src)
 // Store immediate Float value (it is faster than store from XMM register)
 instruct storeF0(memory mem, immF0 zero)
 %{
-  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL));
+  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL) && (Universe::narrow_klass_base() == NULL));
   match(Set mem (StoreF mem zero));
 
   ins_cost(25); // XXX
@@ -5996,7 +6192,7 @@ instruct storeD0_imm(memory mem, immD0 src)
 
 instruct storeD0(memory mem, immD0 zero)
 %{
-  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL));
+  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL) && (Universe::narrow_klass_base() == NULL));
   match(Set mem (StoreD mem zero));
 
   ins_cost(25); // XXX
@@ -6482,6 +6678,32 @@ instruct decodeHeapOop_not_null(rRegP dst, rRegN src, rFlagsReg cr) %{
   ins_pipe(ialu_reg_long);
 %}
 
+instruct encodeKlass_not_null(rRegN dst, rRegP src, rFlagsReg cr) %{
+  match(Set dst (EncodePKlass src));
+  effect(KILL cr);
+  format %{ "encode_heap_oop_not_null $dst,$src" %}
+  ins_encode %{
+    __ encode_klass_not_null($dst$$Register, $src$$Register);
+  %}
+  ins_pipe(ialu_reg_long);
+%}
+
+instruct decodeKlass_not_null(rRegP dst, rRegN src, rFlagsReg cr) %{
+  match(Set dst (DecodeNKlass src));
+  effect(KILL cr);
+  format %{ "decode_heap_oop_not_null $dst,$src" %}
+  ins_encode %{
+    Register s = $src$$Register;
+    Register d = $dst$$Register;
+    if (s != d) {
+      __ decode_klass_not_null(d, s);
+    } else {
+      __ decode_klass_not_null(d);
+    }
+  %}
+  ins_pipe(ialu_reg_long);
+%}
+
 
 //----------Conditional Move---------------------------------------------------
 // Jump
@@ -7242,6 +7464,7 @@ instruct compareAndSwapP(rRegI res,
                          rax_RegP oldval, rRegP newval,
                          rFlagsReg cr)
 %{
+  predicate(VM_Version::supports_cx8());
   match(Set res (CompareAndSwapP mem_ptr (Binary oldval newval)));
   effect(KILL cr, KILL oldval);
 
@@ -7265,6 +7488,7 @@ instruct compareAndSwapL(rRegI res,
                          rax_RegL oldval, rRegL newval,
                          rFlagsReg cr)
 %{
+  predicate(VM_Version::supports_cx8());
   match(Set res (CompareAndSwapL mem_ptr (Binary oldval newval)));
   effect(KILL cr, KILL oldval);
 
@@ -7329,6 +7553,88 @@ instruct compareAndSwapN(rRegI res,
   ins_pipe( pipe_cmpxchg );
 %}
 
+instruct xaddI_no_res( memory mem, Universe dummy, immI add, rFlagsReg cr) %{
+  predicate(n->as_LoadStore()->result_not_used());
+  match(Set dummy (GetAndAddI mem add));
+  effect(KILL cr);
+  format %{ "ADDL  [$mem],$add" %}
+  ins_encode %{
+    if (os::is_MP()) { __ lock(); }
+    __ addl($mem$$Address, $add$$constant);
+  %}
+  ins_pipe( pipe_cmpxchg );
+%}
+
+instruct xaddI( memory mem, rRegI newval, rFlagsReg cr) %{
+  match(Set newval (GetAndAddI mem newval));
+  effect(KILL cr);
+  format %{ "XADDL  [$mem],$newval" %}
+  ins_encode %{
+    if (os::is_MP()) { __ lock(); }
+    __ xaddl($mem$$Address, $newval$$Register);
+  %}
+  ins_pipe( pipe_cmpxchg );
+%}
+
+instruct xaddL_no_res( memory mem, Universe dummy, immL add, rFlagsReg cr) %{
+  predicate(n->as_LoadStore()->result_not_used());
+  match(Set dummy (GetAndAddL mem add));
+  effect(KILL cr);
+  format %{ "ADDQ  [$mem],$add" %}
+  ins_encode %{
+    if (os::is_MP()) { __ lock(); }
+    __ addq($mem$$Address, $add$$constant);
+  %}
+  ins_pipe( pipe_cmpxchg );
+%}
+
+instruct xaddL( memory mem, rRegL newval, rFlagsReg cr) %{
+  match(Set newval (GetAndAddL mem newval));
+  effect(KILL cr);
+  format %{ "XADDQ  [$mem],$newval" %}
+  ins_encode %{
+    if (os::is_MP()) { __ lock(); }
+    __ xaddq($mem$$Address, $newval$$Register);
+  %}
+  ins_pipe( pipe_cmpxchg );
+%}
+
+instruct xchgI( memory mem, rRegI newval) %{
+  match(Set newval (GetAndSetI mem newval));
+  format %{ "XCHGL  $newval,[$mem]" %}
+  ins_encode %{
+    __ xchgl($newval$$Register, $mem$$Address);
+  %}
+  ins_pipe( pipe_cmpxchg );
+%}
+
+instruct xchgL( memory mem, rRegL newval) %{
+  match(Set newval (GetAndSetL mem newval));
+  format %{ "XCHGL  $newval,[$mem]" %}
+  ins_encode %{
+    __ xchgq($newval$$Register, $mem$$Address);
+  %}
+  ins_pipe( pipe_cmpxchg );
+%}
+
+instruct xchgP( memory mem, rRegP newval) %{
+  match(Set newval (GetAndSetP mem newval));
+  format %{ "XCHGQ  $newval,[$mem]" %}
+  ins_encode %{
+    __ xchgq($newval$$Register, $mem$$Address);
+  %}
+  ins_pipe( pipe_cmpxchg );
+%}
+
+instruct xchgN( memory mem, rRegN newval) %{
+  match(Set newval (GetAndSetN mem newval));
+  format %{ "XCHGL  $newval,$mem]" %}
+  ins_encode %{
+    __ xchgl($newval$$Register, $mem$$Address);
+  %}
+  ins_pipe( pipe_cmpxchg );
+%}
+
 //----------Subtraction Instructions-------------------------------------------
 
 // Integer Subtraction Instructions
@@ -10368,7 +10674,7 @@ instruct testP_mem(rFlagsReg cr, memory op, immP0 zero)
 
 instruct testP_mem_reg0(rFlagsReg cr, memory mem, immP0 zero)
 %{
-  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL));
+  predicate(UseCompressedOops && (Universe::narrow_oop_base() == NULL) && (Universe::narrow_klass_base() == NULL));
   match(Set cr (CmpP (LoadP mem) zero));
 
   format %{ "cmpq    R12, $mem\t# ptr (R12_heapbase==0)" %}
@@ -10419,6 +10725,27 @@ instruct compN_mem_imm(rFlagsRegU cr, memory mem, immN src)
   ins_pipe(ialu_cr_reg_mem);
 %}
 
+instruct compN_rReg_imm_klass(rFlagsRegU cr, rRegN op1, immNKlass op2) %{
+  match(Set cr (CmpN op1 op2));
+
+  format %{ "cmpl    $op1, $op2\t# compressed klass ptr" %}
+  ins_encode %{
+    __ cmp_narrow_klass($op1$$Register, (Klass*)$op2$$constant);
+  %}
+  ins_pipe(ialu_cr_reg_imm);
+%}
+
+instruct compN_mem_imm_klass(rFlagsRegU cr, memory mem, immNKlass src)
+%{
+  match(Set cr (CmpN src (LoadNKlass mem)));
+
+  format %{ "cmpl    $mem, $src\t# compressed klass ptr" %}
+  ins_encode %{
+    __ cmp_narrow_klass($mem$$Address, (Klass*)$src$$constant);
+  %}
+  ins_pipe(ialu_cr_reg_mem);
+%}
+
 instruct testN_reg(rFlagsReg cr, rRegN src, immN0 zero) %{
   match(Set cr (CmpN src zero));
 
@@ -10442,7 +10769,7 @@ instruct testN_mem(rFlagsReg cr, memory mem, immN0 zero)
 
 instruct testN_mem_reg0(rFlagsReg cr, memory mem, immN0 zero)
 %{
-  predicate(Universe::narrow_oop_base() == NULL);
+  predicate(Universe::narrow_oop_base() == NULL && (Universe::narrow_klass_base() == NULL));
   match(Set cr (CmpN (LoadN mem) zero));
 
   format %{ "cmpl    R12, $mem\t# compressed ptr (R12_heapbase==0)" %}
diff --git a/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp b/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp
index 322f62ce8cc..eb170370630 100644
--- a/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp
+++ b/hotspot/src/cpu/zero/vm/interpreterGenerator_zero.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
diff --git a/hotspot/src/cpu/zero/vm/methodHandles_zero.hpp b/hotspot/src/cpu/zero/vm/methodHandles_zero.hpp
index 086f3375f6d..a71fce34f12 100644
--- a/hotspot/src/cpu/zero/vm/methodHandles_zero.hpp
+++ b/hotspot/src/cpu/zero/vm/methodHandles_zero.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2011 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
diff --git a/hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp b/hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp
index 7f2960fbdf1..a21245afdc1 100644
--- a/hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp
+++ b/hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp
@@ -267,8 +267,8 @@ int generateJvmOffsets(GEN_variant gen_variant) {
 
   printf("\n");
 
-  GEN_OFFS(NarrowOopStruct, _base);
-  GEN_OFFS(NarrowOopStruct, _shift);
+  GEN_OFFS(NarrowPtrStruct, _base);
+  GEN_OFFS(NarrowPtrStruct, _shift);
   printf("\n");
 
   GEN_VALUE(SIZE_HeapBlockHeader, (int) sizeof(HeapBlock::Header));
diff --git a/hotspot/src/os/bsd/dtrace/jhelper.d b/hotspot/src/os/bsd/dtrace/jhelper.d
index a5cb9b7de8f..9ff6bd5434d 100644
--- a/hotspot/src/os/bsd/dtrace/jhelper.d
+++ b/hotspot/src/os/bsd/dtrace/jhelper.d
@@ -45,10 +45,6 @@ extern pointer __JvmOffsets;
 
 extern pointer __1cJCodeCacheF_heap_;
 extern pointer __1cIUniverseO_collectedHeap_;
-extern pointer __1cIUniverseL_narrow_oop_;
-#ifdef _LP64
-extern pointer UseCompressedOops;
-#endif
 
 extern pointer __1cHnmethodG__vtbl_;
 extern pointer __1cNMethodG__vtbl_;
@@ -136,8 +132,8 @@ dtrace:helper:ustack:
   copyin_offset(SIZE_oopDesc);
   copyin_offset(SIZE_ConstantPool);
 
-  copyin_offset(OFFSET_NarrowOopStruct_base);
-  copyin_offset(OFFSET_NarrowOopStruct_shift);
+  copyin_offset(OFFSET_NarrowPtrStruct_base);
+  copyin_offset(OFFSET_NarrowPtrStruct_shift);
 
   /*
    * The PC to translate is in arg0.
@@ -159,17 +155,6 @@ dtrace:helper:ustack:
   this->CodeCache_heap_address = copyin_ptr(&``__1cJCodeCacheF_heap_);
 
   /* Reading volatile values */
-#ifdef _LP64
-  this->Use_Compressed_Oops  = copyin_uint8(&``UseCompressedOops);
-#else
-  this->Use_Compressed_Oops  = 0;
-#endif
-
-  this->Universe_narrow_oop_base  = copyin_ptr(&``__1cIUniverseL_narrow_oop_ +
-                                               OFFSET_NarrowOopStruct_base);
-  this->Universe_narrow_oop_shift = copyin_int32(&``__1cIUniverseL_narrow_oop_ +
-                                                 OFFSET_NarrowOopStruct_shift);
-
   this->CodeCache_low = copyin_ptr(this->CodeCache_heap_address + 
       OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
 
diff --git a/hotspot/src/os/bsd/launcher/Info-privileged.plist b/hotspot/src/os/bsd/launcher/Info-privileged.plist
new file mode 100644
index 00000000000..9b2fc0a32fc
--- /dev/null
+++ b/hotspot/src/os/bsd/launcher/Info-privileged.plist
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+        <key>CFBundleIdentifier</key>
+        <string>net.java.openjdk.cmd</string>
+        <key>CFBundleInfoDictionaryVersion</key>
+        <string>6.0</string>
+        <key>CFBundleName</key>
+        <string>OpenJDK Command</string>
+        <key>CFBundleShortVersionString</key>
+        <string>1.0</string>
+        <key>CFBundleVersion</key>
+        <string>1.0</string>
+        <key>SecTaskAccess</key>
+        <string>allowed</string>
+</dict>
+</plist>
diff --git a/hotspot/src/os/bsd/vm/decoder_machO.cpp b/hotspot/src/os/bsd/vm/decoder_machO.cpp
index 75250d19514..b475f23ff94 100644
--- a/hotspot/src/os/bsd/vm/decoder_machO.cpp
+++ b/hotspot/src/os/bsd/vm/decoder_machO.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/bsd/vm/os_bsd.cpp b/hotspot/src/os/bsd/vm/os_bsd.cpp
index a1c41218270..984e25cb942 100644
--- a/hotspot/src/os/bsd/vm/os_bsd.cpp
+++ b/hotspot/src/os/bsd/vm/os_bsd.cpp
@@ -82,12 +82,6 @@
 # include "assembler_ppc.inline.hpp"
 # include "nativeInst_ppc.hpp"
 #endif
-#ifdef COMPILER1
-#include "c1/c1_Runtime1.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/runtime.hpp"
-#endif
 
 // put OS-includes here
 # include <sys/types.h>
diff --git a/hotspot/src/os/bsd/vm/os_bsd.inline.hpp b/hotspot/src/os/bsd/vm/os_bsd.inline.hpp
index 9980d4631a2..651059fbe8a 100644
--- a/hotspot/src/os/bsd/vm/os_bsd.inline.hpp
+++ b/hotspot/src/os/bsd/vm/os_bsd.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp b/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp
index e9db634135f..123e6e289bf 100644
--- a/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp
+++ b/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/linux/vm/decoder_linux.cpp b/hotspot/src/os/linux/vm/decoder_linux.cpp
index e4623969456..915593a4e9a 100644
--- a/hotspot/src/os/linux/vm/decoder_linux.cpp
+++ b/hotspot/src/os/linux/vm/decoder_linux.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/linux/vm/os_linux.cpp b/hotspot/src/os/linux/vm/os_linux.cpp
index df6eb0e71c8..d2f92f8f51b 100644
--- a/hotspot/src/os/linux/vm/os_linux.cpp
+++ b/hotspot/src/os/linux/vm/os_linux.cpp
@@ -82,12 +82,6 @@
 # include "assembler_ppc.inline.hpp"
 # include "nativeInst_ppc.hpp"
 #endif
-#ifdef COMPILER1
-#include "c1/c1_Runtime1.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/runtime.hpp"
-#endif
 
 // put OS-includes here
 # include <sys/types.h>
diff --git a/hotspot/src/os/linux/vm/os_linux.inline.hpp b/hotspot/src/os/linux/vm/os_linux.inline.hpp
index c663c9b6961..ba56240dc8e 100644
--- a/hotspot/src/os/linux/vm/os_linux.inline.hpp
+++ b/hotspot/src/os/linux/vm/os_linux.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/linux/vm/perfMemory_linux.cpp b/hotspot/src/os/linux/vm/perfMemory_linux.cpp
index 8839aac6c10..2adae8d18af 100644
--- a/hotspot/src/os/linux/vm/perfMemory_linux.cpp
+++ b/hotspot/src/os/linux/vm/perfMemory_linux.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/linux/vm/vmError_linux.cpp b/hotspot/src/os/linux/vm/vmError_linux.cpp
index 8ec6ca04c25..378c9a6ab6a 100644
--- a/hotspot/src/os/linux/vm/vmError_linux.cpp
+++ b/hotspot/src/os/linux/vm/vmError_linux.cpp
@@ -44,7 +44,7 @@ void VMError::show_message_box(char *buf, int buflen) {
     jio_snprintf(p, buflen - len,
                "\n\n"
                "Do you want to debug the problem?\n\n"
-               "To debug, run 'gdb /proc/%d/exe %d'; then switch to thread " INTX_FORMAT " (" INTPTR_FORMAT ")\n"
+               "To debug, run 'gdb /proc/%d/exe %d'; then switch to thread " UINTX_FORMAT " (" INTPTR_FORMAT ")\n"
                "Enter 'yes' to launch gdb automatically (PATH must include gdb)\n"
                "Otherwise, press RETURN to abort...",
                os::current_process_id(), os::current_process_id(),
diff --git a/hotspot/src/os/posix/launcher/java_md.c b/hotspot/src/os/posix/launcher/java_md.c
index 8b1542e8d9e..970222c4fd3 100644
--- a/hotspot/src/os/posix/launcher/java_md.c
+++ b/hotspot/src/os/posix/launcher/java_md.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/posix/launcher/launcher.script b/hotspot/src/os/posix/launcher/launcher.script
index 4f5fff8b13e..0a2ae5f4d6b 100644
--- a/hotspot/src/os/posix/launcher/launcher.script
+++ b/hotspot/src/os/posix/launcher/launcher.script
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/posix/vm/os_posix.cpp b/hotspot/src/os/posix/vm/os_posix.cpp
index ce355c1cc9f..cbffa3279af 100644
--- a/hotspot/src/os/posix/vm/os_posix.cpp
+++ b/hotspot/src/os/posix/vm/os_posix.cpp
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/posix/vm/os_posix.hpp b/hotspot/src/os/posix/vm/os_posix.hpp
index 62ec7135d14..c7d1d6bd741 100644
--- a/hotspot/src/os/posix/vm/os_posix.hpp
+++ b/hotspot/src/os/posix/vm/os_posix.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp
index 2626559d46c..1a269539695 100644
--- a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp
+++ b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp
@@ -262,8 +262,8 @@ int generateJvmOffsets(GEN_variant gen_variant) {
 
   printf("\n");
 
-  GEN_OFFS(NarrowOopStruct, _base);
-  GEN_OFFS(NarrowOopStruct, _shift);
+  GEN_OFFS(NarrowPtrStruct, _base);
+  GEN_OFFS(NarrowPtrStruct, _shift);
   printf("\n");
 
   GEN_VALUE(SIZE_HeapBlockHeader, sizeof(HeapBlock::Header));
diff --git a/hotspot/src/os/solaris/dtrace/hs_private.d b/hotspot/src/os/solaris/dtrace/hs_private.d
index df395e5c045..89304368ddb 100644
--- a/hotspot/src/os/solaris/dtrace/hs_private.d
+++ b/hotspot/src/os/solaris/dtrace/hs_private.d
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/solaris/dtrace/jhelper.d b/hotspot/src/os/solaris/dtrace/jhelper.d
index c6e8cd7438f..976a832107f 100644
--- a/hotspot/src/os/solaris/dtrace/jhelper.d
+++ b/hotspot/src/os/solaris/dtrace/jhelper.d
@@ -45,10 +45,6 @@ extern pointer __JvmOffsets;
 
 extern pointer __1cJCodeCacheF_heap_;
 extern pointer __1cIUniverseO_collectedHeap_;
-extern pointer __1cIUniverseL_narrow_oop_;
-#ifdef _LP64
-extern pointer UseCompressedOops;
-#endif
 
 extern pointer __1cHnmethodG__vtbl_;
 extern pointer __1cGMethodG__vtbl_;
@@ -136,8 +132,8 @@ dtrace:helper:ustack:
   copyin_offset(SIZE_oopDesc);
   copyin_offset(SIZE_ConstantPool);
 
-  copyin_offset(OFFSET_NarrowOopStruct_base);
-  copyin_offset(OFFSET_NarrowOopStruct_shift);
+  copyin_offset(OFFSET_NarrowPtrStruct_base);
+  copyin_offset(OFFSET_NarrowPtrStruct_shift);
 
   /*
    * The PC to translate is in arg0.
@@ -158,18 +154,6 @@ dtrace:helper:ustack:
 
   this->CodeCache_heap_address = copyin_ptr(&``__1cJCodeCacheF_heap_);
 
-  /* Reading volatile values */
-#ifdef _LP64
-  this->Use_Compressed_Oops  = copyin_uint8(&``UseCompressedOops);
-#else
-  this->Use_Compressed_Oops  = 0;
-#endif
-
-  this->Universe_narrow_oop_base  = copyin_ptr(&``__1cIUniverseL_narrow_oop_ +
-                                               OFFSET_NarrowOopStruct_base);
-  this->Universe_narrow_oop_shift = copyin_int32(&``__1cIUniverseL_narrow_oop_ +
-                                                 OFFSET_NarrowOopStruct_shift);
-
   this->CodeCache_low = copyin_ptr(this->CodeCache_heap_address + 
       OFFSET_CodeHeap_memory + OFFSET_VirtualSpace_low);
 
diff --git a/hotspot/src/os/solaris/vm/attachListener_solaris.cpp b/hotspot/src/os/solaris/vm/attachListener_solaris.cpp
index b5b38bdc814..f90538efe77 100644
--- a/hotspot/src/os/solaris/vm/attachListener_solaris.cpp
+++ b/hotspot/src/os/solaris/vm/attachListener_solaris.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/solaris/vm/decoder_solaris.cpp b/hotspot/src/os/solaris/vm/decoder_solaris.cpp
index d700706a067..32b6e949531 100644
--- a/hotspot/src/os/solaris/vm/decoder_solaris.cpp
+++ b/hotspot/src/os/solaris/vm/decoder_solaris.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/solaris/vm/os_solaris.cpp b/hotspot/src/os/solaris/vm/os_solaris.cpp
index 68bd830cf1b..0483dcbfb34 100644
--- a/hotspot/src/os/solaris/vm/os_solaris.cpp
+++ b/hotspot/src/os/solaris/vm/os_solaris.cpp
@@ -70,12 +70,6 @@
 # include "assembler_sparc.inline.hpp"
 # include "nativeInst_sparc.hpp"
 #endif
-#ifdef COMPILER1
-#include "c1/c1_Runtime1.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/runtime.hpp"
-#endif
 
 // put OS-includes here
 # include <dlfcn.h>
@@ -1488,11 +1482,11 @@ void _handle_uncaught_cxx_exception() {
 
 
 // First crack at OS-specific initialization, from inside the new thread.
-void os::initialize_thread() {
+void os::initialize_thread(Thread* thr) {
   int r = thr_main() ;
   guarantee (r == 0 || r == 1, "CR6501650 or CR6493689") ;
   if (r) {
-    JavaThread* jt = (JavaThread *)Thread::current();
+    JavaThread* jt = (JavaThread *)thr;
     assert(jt != NULL,"Sanity check");
     size_t stack_size;
     address base = jt->stack_base();
@@ -5876,15 +5870,6 @@ extern "C" {
   }
 }
 
-// Just to get the Kernel build to link on solaris for testing.
-
-extern "C" {
-class ASGCT_CallTrace;
-void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint depth, void* ucontext)
-  KERNEL_RETURN;
-}
-
-
 // ObjectMonitor park-unpark infrastructure ...
 //
 // We implement Solaris and Linux PlatformEvents with the
diff --git a/hotspot/src/os/solaris/vm/os_solaris.hpp b/hotspot/src/os/solaris/vm/os_solaris.hpp
index 174f2529dbe..c1dff0cf193 100644
--- a/hotspot/src/os/solaris/vm/os_solaris.hpp
+++ b/hotspot/src/os/solaris/vm/os_solaris.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/solaris/vm/os_solaris.inline.hpp b/hotspot/src/os/solaris/vm/os_solaris.inline.hpp
index 2468100fc43..3454f6d7ba4 100644
--- a/hotspot/src/os/solaris/vm/os_solaris.inline.hpp
+++ b/hotspot/src/os/solaris/vm/os_solaris.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp b/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp
index c841ff8a1b6..c24789cbb17 100644
--- a/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp
+++ b/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/windows/vm/decoder_windows.cpp b/hotspot/src/os/windows/vm/decoder_windows.cpp
index 6500e59302f..82ba909bc5c 100644
--- a/hotspot/src/os/windows/vm/decoder_windows.cpp
+++ b/hotspot/src/os/windows/vm/decoder_windows.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/windows/vm/decoder_windows.hpp b/hotspot/src/os/windows/vm/decoder_windows.hpp
index ad80e5b9c12..b2c2638d8ab 100644
--- a/hotspot/src/os/windows/vm/decoder_windows.hpp
+++ b/hotspot/src/os/windows/vm/decoder_windows.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/windows/vm/jvm_windows.h b/hotspot/src/os/windows/vm/jvm_windows.h
index 91039821558..737f34dddf2 100644
--- a/hotspot/src/os/windows/vm/jvm_windows.h
+++ b/hotspot/src/os/windows/vm/jvm_windows.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -61,8 +61,6 @@ typedef struct _MODULEINFO {
 
 typedef int socklen_t;
 
-// #include "jni.h"
-
 #define JNI_ONLOAD_SYMBOLS      {"_JNI_OnLoad@8", "JNI_OnLoad"}
 #define JNI_ONUNLOAD_SYMBOLS    {"_JNI_OnUnload@8", "JNI_OnUnload"}
 #define JVM_ONLOAD_SYMBOLS      {"_JVM_OnLoad@12", "JVM_OnLoad"}
@@ -108,10 +106,7 @@ JVM_GetThreadInterruptEvent();
  * File I/O
  */
 
-// #include <sys/types.h>
-// #include <sys/stat.h>
-// #include <fcntl.h>
-// #include <errno.h>
+#include <sys/stat.h>
 
 /* O Flags */
 
diff --git a/hotspot/src/os/windows/vm/os_windows.cpp b/hotspot/src/os/windows/vm/os_windows.cpp
index 5534a1ea0a1..dc31e27a6b7 100644
--- a/hotspot/src/os/windows/vm/os_windows.cpp
+++ b/hotspot/src/os/windows/vm/os_windows.cpp
@@ -69,12 +69,6 @@
 # include "assembler_x86.inline.hpp"
 # include "nativeInst_x86.hpp"
 #endif
-#ifdef COMPILER1
-#include "c1/c1_Runtime1.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/runtime.hpp"
-#endif
 
 #ifdef _DEBUG
 #include <crtdbg.h>
diff --git a/hotspot/src/os/windows/vm/os_windows.hpp b/hotspot/src/os/windows/vm/os_windows.hpp
index 33ea7064ba6..f3196af9afc 100644
--- a/hotspot/src/os/windows/vm/os_windows.hpp
+++ b/hotspot/src/os/windows/vm/os_windows.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os/windows/vm/perfMemory_windows.cpp b/hotspot/src/os/windows/vm/perfMemory_windows.cpp
index 2358171b78a..2c75539d86a 100644
--- a/hotspot/src/os/windows/vm/perfMemory_windows.cpp
+++ b/hotspot/src/os/windows/vm/perfMemory_windows.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
index c6d31ab4f9a..b7b3e4c726f 100644
--- a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
+++ b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp
@@ -52,12 +52,6 @@
 #include "thread_bsd.inline.hpp"
 #include "utilities/events.hpp"
 #include "utilities/vmError.hpp"
-#ifdef COMPILER1
-#include "c1/c1_Runtime1.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/runtime.hpp"
-#endif
 
 // put OS-includes here
 # include <sys/types.h>
@@ -297,7 +291,7 @@ char* os::non_memory_address_word() {
   return (char*) -1;
 }
 
-void os::initialize_thread() {
+void os::initialize_thread(Thread* thr) {
 // Nothing to do.
 }
 
diff --git a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.hpp b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.hpp
index f109e246fae..cf83423bf3d 100644
--- a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.hpp
+++ b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.inline.hpp b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.inline.hpp
index 67b2482aaf3..145e608f547 100644
--- a/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.inline.hpp
+++ b/hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp b/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
index 4bb5a8abb24..51ea6e3f24e 100644
--- a/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
+++ b/hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -58,12 +58,6 @@
 #include "thread_bsd.inline.hpp"
 #include "utilities/events.hpp"
 #include "utilities/vmError.hpp"
-#ifdef COMPILER1
-#include "c1/c1_Runtime1.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/runtime.hpp"
-#endif
 
 address os::current_stack_pointer() {
   address dummy = (address) &dummy;
@@ -103,7 +97,7 @@ char* os::non_memory_address_word() {
 #endif // SPARC
 }
 
-void os::initialize_thread() {
+void os::initialize_thread(Thread* thr) {
   // Nothing to do.
 }
 
diff --git a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp
index 11c90e522fc..894aec58868 100644
--- a/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp
+++ b/hotspot/src/os_cpu/linux_sparc/vm/os_linux_sparc.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,13 +52,6 @@
 #include "thread_linux.inline.hpp"
 #include "utilities/events.hpp"
 #include "utilities/vmError.hpp"
-#ifdef COMPILER1
-#include "c1/c1_Runtime1.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/runtime.hpp"
-#endif
-
 
 // Linux/Sparc has rather obscure naming of registers in sigcontext
 // different between 32 and 64 bits
@@ -225,7 +218,7 @@ char* os::non_memory_address_word() {
   return (char*) 0;
 }
 
-void os::initialize_thread() {}
+void os::initialize_thread(Thread* thr) {}
 
 void os::print_context(outputStream *st, void *context) {
   if (context == NULL) return;
diff --git a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
index 93bb1f45919..126b2ab2a53 100644
--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
+++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,12 +52,6 @@
 #include "thread_linux.inline.hpp"
 #include "utilities/events.hpp"
 #include "utilities/vmError.hpp"
-#ifdef COMPILER1
-#include "c1/c1_Runtime1.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/runtime.hpp"
-#endif
 
 // put OS-includes here
 # include <sys/types.h>
@@ -114,7 +108,7 @@ char* os::non_memory_address_word() {
   return (char*) -1;
 }
 
-void os::initialize_thread() {
+void os::initialize_thread(Thread* thr) {
 // Nothing to do.
 }
 
diff --git a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.hpp b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.hpp
index 9bb22f8e6ba..1d3fd350c68 100644
--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.hpp
+++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.inline.hpp b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.inline.hpp
index fee719b01b8..f6996fd1a25 100644
--- a/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.inline.hpp
+++ b/hotspot/src/os_cpu/linux_x86/vm/os_linux_x86.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
index 203090ce079..86cb2b4eebb 100644
--- a/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
+++ b/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2009, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
@@ -53,12 +53,6 @@
 #include "thread_linux.inline.hpp"
 #include "utilities/events.hpp"
 #include "utilities/vmError.hpp"
-#ifdef COMPILER1
-#include "c1/c1_Runtime1.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/runtime.hpp"
-#endif
 
 address os::current_stack_pointer() {
   address dummy = (address) &dummy;
@@ -98,7 +92,7 @@ char* os::non_memory_address_word() {
 #endif // SPARC
 }
 
-void os::initialize_thread() {
+void os::initialize_thread(Thread * thr){
   // Nothing to do.
 }
 
diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp
index 752daf7bf67..0c8116166d4 100644
--- a/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/os_solaris_sparc.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,13 +52,6 @@
 #include "thread_solaris.inline.hpp"
 #include "utilities/events.hpp"
 #include "utilities/vmError.hpp"
-#ifdef COMPILER1
-#include "c1/c1_Runtime1.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/runtime.hpp"
-#endif
-
 
 # include <signal.h>        // needed first to avoid name collision for "std" with SC 5.0
 
diff --git a/hotspot/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp b/hotspot/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp
index edf46ce4a30..e46e2150095 100644
--- a/hotspot/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp
+++ b/hotspot/src/os_cpu/solaris_sparc/vm/vm_version_solaris_sparc.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp
index ec047c16b58..3491bbed119 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp
+++ b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,12 +52,6 @@
 #include "thread_solaris.inline.hpp"
 #include "utilities/events.hpp"
 #include "utilities/vmError.hpp"
-#ifdef COMPILER1
-#include "c1/c1_Runtime1.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/runtime.hpp"
-#endif
 
 // put OS-includes here
 # include <sys/types.h>
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.hpp b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.hpp
index fd4f15282b4..90bff295ea0 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.hpp
+++ b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.inline.hpp b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.inline.hpp
index 986884e031f..cedbe5e5033 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.inline.hpp
+++ b/hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/solaris_x86_32.il b/hotspot/src/os_cpu/solaris_x86/vm/solaris_x86_32.il
index 9b0f07da315..281711d4b3a 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/solaris_x86_32.il
+++ b/hotspot/src/os_cpu/solaris_x86/vm/solaris_x86_32.il
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 //
 // This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/solaris_x86/vm/solaris_x86_64.il b/hotspot/src/os_cpu/solaris_x86/vm/solaris_x86_64.il
index 89809bc54dd..16bd3541079 100644
--- a/hotspot/src/os_cpu/solaris_x86/vm/solaris_x86_64.il
+++ b/hotspot/src/os_cpu/solaris_x86/vm/solaris_x86_64.il
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 //
 // This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp
index 52fe243ee0e..434929f30d2 100644
--- a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp
+++ b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,12 +52,6 @@
 #include "thread_windows.inline.hpp"
 #include "utilities/events.hpp"
 #include "utilities/vmError.hpp"
-#ifdef COMPILER1
-#include "c1/c1_Runtime1.hpp"
-#endif
-#ifdef COMPILER2
-#include "opto/runtime.hpp"
-#endif
 
 # include "unwind_windows_x86.hpp"
 #undef REG_SP
@@ -219,7 +213,7 @@ bool os::register_code_area(char *low, char *high) {
   return true;
 }
 
-void os::initialize_thread() {
+void os::initialize_thread(Thread* thr) {
 // Nothing to do.
 }
 
diff --git a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp
index 74e3519c901..41814b6c61b 100644
--- a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp
+++ b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.inline.hpp b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.inline.hpp
index d108e3e4202..1bf7c1a30a6 100644
--- a/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.inline.hpp
+++ b/hotspot/src/os_cpu/windows_x86/vm/os_windows_x86.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/tools/ProjectCreator/BuildConfig.java b/hotspot/src/share/tools/ProjectCreator/BuildConfig.java
index 92fbf7746b5..00441dfb220 100644
--- a/hotspot/src/share/tools/ProjectCreator/BuildConfig.java
+++ b/hotspot/src/share/tools/ProjectCreator/BuildConfig.java
@@ -22,15 +22,14 @@
  *
  */
 
-import java.io.File;
 import java.util.Enumeration;
 import java.util.Hashtable;
-import java.util.Iterator;
 import java.util.Vector;
 
 class BuildConfig {
+    @SuppressWarnings("rawtypes")
     Hashtable vars;
-    Vector basicNames, basicPaths;
+    Vector<String> basicNames, basicPaths;
     String[] context;
 
     static CompilerInterface ci;
@@ -47,6 +46,7 @@ class BuildConfig {
         return ci;
     }
 
+    @SuppressWarnings("rawtypes")
     protected void initNames(String flavour, String build, String outDll) {
         if (vars == null) vars = new Hashtable();
 
@@ -63,26 +63,28 @@ class BuildConfig {
         // ones mentioned above were needed to expand format
         String buildBase = expandFormat(getFieldString(null, "BuildBase"));
         String sourceBase = getFieldString(null, "SourceBase");
+        String buildSpace = getFieldString(null, "BuildSpace");
         String outDir = buildBase;
 
         put("Id", flavourBuild);
         put("OutputDir", outDir);
         put("SourceBase", sourceBase);
         put("BuildBase", buildBase);
+        put("BuildSpace", buildSpace);
         put("OutputDll", outDir + Util.sep + outDll);
 
         context = new String [] {flavourBuild, flavour, build, null};
     }
 
-    protected void init(Vector includes, Vector defines) {
+    protected void init(Vector<String> includes, Vector<String> defines) {
         initDefaultDefines(defines);
         initDefaultCompilerFlags(includes);
         initDefaultLinkerFlags();
-        handleDB();
+        //handleDB();
     }
 
 
-    protected void initDefaultCompilerFlags(Vector includes) {
+    protected void initDefaultCompilerFlags(Vector<String> includes) {
         Vector compilerFlags = new Vector();
 
         compilerFlags.addAll(getCI().getBaseCompilerFlags(getV("Define"),
@@ -100,143 +102,48 @@ class BuildConfig {
         put("LinkerFlags", linkerFlags);
     }
 
-    DirectoryTree getSourceTree(String sourceBase, String startAt) {
-        DirectoryTree tree = new DirectoryTree();
-
-        tree.addSubdirToIgnore("Codemgr_wsdata");
-        tree.addSubdirToIgnore("deleted_files");
-        tree.addSubdirToIgnore("SCCS");
-        tree.setVerbose(true);
-        if (startAt != null) {
-            tree.readDirectory(sourceBase + File.separator + startAt);
-        } else {
-            tree.readDirectory(sourceBase);
-        }
-
-        return tree;
-    }
-
-
-    Vector getPreferredPaths() {
-        Vector preferredPaths = new Vector();
-
-        // In the case of multiple files with the same name in
-        // different subdirectories, prefer these versions
-        preferredPaths.add("windows");
-        preferredPaths.add("x86");
-        preferredPaths.add("closed");
-
-        // Also prefer "opto" over "adlc" for adlcVMDeps.hpp
-        preferredPaths.add("opto");
-
-        return preferredPaths;
-    }
-
-
-    void handleDB() {
-        WinGammaPlatform platform = (WinGammaPlatform)getField(null, "PlatformObject");
-
-        putSpecificField("AllFilesHash", computeAllFiles(platform));
-    }
-
-
-    private boolean matchesIgnoredPath(String prefixedName) {
-        Vector rv = new Vector();
+    public boolean matchesIgnoredPath(String path) {
+        Vector<String> rv = new Vector<String>();
         collectRelevantVectors(rv, "IgnorePath");
-        for (Iterator i = rv.iterator(); i.hasNext(); ) {
-            String pathPart = (String) i.next();
-            if (prefixedName.contains(Util.normalize(pathPart)))  {
+        for (String pathPart : rv) {
+            if (path.contains(pathPart))  {
                 return true;
             }
         }
         return false;
     }
 
-    void addAll(Iterator i, Hashtable hash,
-                WinGammaPlatform platform, DirectoryTree tree,
-                Vector preferredPaths, Vector filesNotFound, Vector filesDuplicate) {
-        for (; i.hasNext(); ) {
-            String fileName = (String) i.next();
-            if (lookupHashFieldInContext("IgnoreFile", fileName) == null) {
-                String prefixedName = platform.envVarPrefixedFileName(fileName,
-                                                                      0, /* ignored */
-                                                                      tree,
-                                                                      preferredPaths,
-                                                                      filesNotFound,
-                                                                      filesDuplicate);
-                if (prefixedName != null) {
-                    prefixedName = Util.normalize(prefixedName);
-                    if (!matchesIgnoredPath(prefixedName)) {
-                        addTo(hash, prefixedName, fileName);
-                    }
+    public boolean matchesHidePath(String path) {
+        Vector<String> rv = new Vector<String>();
+        collectRelevantVectors(rv, "HidePath");
+        for (String pathPart : rv) {
+            if (path.contains(Util.normalize(pathPart)))  {
+                return true;
+            }
+        }
+        return false;
+    }
+
+   public Vector<String> matchesAdditionalGeneratedPath(String fullPath) {
+        Vector<String> rv = new Vector<String>();
+        Hashtable<String, String> v = (Hashtable<String, String>)BuildConfig.getField(this.toString(), "AdditionalGeneratedFile");
+        if (v != null) {
+            for (Enumeration<String> e=v.keys(); e.hasMoreElements(); ) {
+                String key = e.nextElement();
+                String val = v.get(key);
+
+                if (fullPath.endsWith(expandFormat(key))) {
+                    rv.add(expandFormat(val));
                 }
             }
         }
+        return rv;
     }
 
     void addTo(Hashtable ht, String key, String value) {
         ht.put(expandFormat(key), expandFormat(value));
     }
 
-    Hashtable computeAllFiles(WinGammaPlatform platform) {
-        Hashtable rv = new Hashtable();
-        DirectoryTree tree = getSourceTree(get("SourceBase"), getFieldString(null, "StartAt"));
-        Vector preferredPaths = getPreferredPaths();
-
-        // Hold errors until end
-        Vector filesNotFound = new Vector();
-        Vector filesDuplicate = new Vector();
-
-        Vector includedFiles = new Vector();
-
-        // find all files
-        Vector dirs = getSourceIncludes();
-        for (Iterator i = dirs.iterator(); i.hasNext(); ) {
-            String dir = (String)i.next();
-            DirectoryTree subtree = getSourceTree(dir, null);
-            for (Iterator fi = subtree.getFileIterator(); fi.hasNext(); ) {
-                String name = ((File)fi.next()).getName();
-                includedFiles.add(name);
-            }
-        }
-        addAll(includedFiles.iterator(), rv,
-               platform, tree,
-               preferredPaths, filesNotFound, filesDuplicate);
-
-        Vector addFiles = new Vector();
-        collectRelevantVectors(addFiles, "AdditionalFile");
-        addAll(addFiles.iterator(), rv,
-               platform, tree,
-               preferredPaths, filesNotFound, filesDuplicate);
-
-        collectRelevantHashes(rv, "AdditionalGeneratedFile");
-
-        if ((filesNotFound.size() != 0) ||
-            (filesDuplicate.size() != 0)) {
-            System.err.println("Error: some files were not found or " +
-                               "appeared in multiple subdirectories of " +
-                               "directory " + get("SourceBase") + " and could not " +
-                               "be resolved with os_family and arch.");
-            if (filesNotFound.size() != 0) {
-                System.err.println("Files not found:");
-                for (Iterator iter = filesNotFound.iterator();
-                     iter.hasNext(); ) {
-                    System.err.println("  " + (String) iter.next());
-                }
-            }
-            if (filesDuplicate.size() != 0) {
-                System.err.println("Duplicate files:");
-                for (Iterator iter = filesDuplicate.iterator();
-                     iter.hasNext(); ) {
-                    System.err.println("  " + (String) iter.next());
-                }
-            }
-            throw new RuntimeException();
-        }
-
-        return rv;
-    }
-
     void initDefaultDefines(Vector defines) {
         Vector sysDefines = new Vector();
         sysDefines.add("WIN32");
@@ -324,20 +231,19 @@ class BuildConfig {
     }
 
     void collectRelevantVectors(Vector rv, String field) {
-        for (int i = 0; i < context.length; i++) {
-            Vector v = getFieldVector(context[i], field);
+        for (String ctx : context) {
+            Vector<String> v = getFieldVector(ctx, field);
             if (v != null) {
-                for (Iterator j=v.iterator(); j.hasNext(); ) {
-                    String val = (String)j.next();
-                    rv.add(expandFormat(val));
+                for (String val : v) {
+                    rv.add(expandFormat(val).replace('/', '\\'));
                 }
             }
         }
     }
 
     void collectRelevantHashes(Hashtable rv, String field) {
-        for (int i = 0; i < context.length; i++) {
-            Hashtable v = (Hashtable)getField(context[i], field);
+        for (String ctx : context) {
+            Hashtable v = (Hashtable)getField(ctx, field);
             if (v != null) {
                 for (Enumeration e=v.keys(); e.hasMoreElements(); ) {
                     String key = (String)e.nextElement();
@@ -357,21 +263,17 @@ class BuildConfig {
 
     Vector getIncludes() {
         Vector rv = new Vector();
-
         collectRelevantVectors(rv, "AbsoluteInclude");
-
         rv.addAll(getSourceIncludes());
-
         return rv;
     }
 
     private Vector getSourceIncludes() {
-        Vector rv = new Vector();
-        Vector ri = new Vector();
+        Vector<String> rv = new Vector<String>();
+        Vector<String> ri = new Vector<String>();
         String sourceBase = getFieldString(null, "SourceBase");
         collectRelevantVectors(ri, "RelativeInclude");
-        for (Iterator i = ri.iterator(); i.hasNext(); ) {
-            String f = (String)i.next();
+        for (String f : ri) {
             rv.add(sourceBase + Util.sep + f);
         }
         return rv;
@@ -604,7 +506,6 @@ class TieredFastDebugConfig extends GenericDebugNonKernelConfig {
     }
 }
 
-
 abstract class ProductConfig extends BuildConfig {
     protected void init(Vector includes, Vector defines) {
         defines.add("NDEBUG");
@@ -638,7 +539,6 @@ class TieredProductConfig extends ProductConfig {
     }
 }
 
-
 class CoreDebugConfig extends GenericDebugNonKernelConfig {
     String getOptFlag() {
         return getCI().getNoOptFlag();
@@ -650,7 +550,6 @@ class CoreDebugConfig extends GenericDebugNonKernelConfig {
     }
 }
 
-
 class CoreFastDebugConfig extends GenericDebugNonKernelConfig {
     String getOptFlag() {
         return getCI().getOptFlag();
@@ -662,7 +561,6 @@ class CoreFastDebugConfig extends GenericDebugNonKernelConfig {
     }
 }
 
-
 class CoreProductConfig extends ProductConfig {
     CoreProductConfig() {
         initNames("core", "product", "jvm.dll");
@@ -700,6 +598,7 @@ class KernelProductConfig extends ProductConfig {
         init(getIncludes(), getDefines());
     }
 }
+
 abstract class CompilerInterface {
     abstract Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir);
     abstract Vector getBaseLinkerFlags(String outDir, String outDll, String platformName);
diff --git a/hotspot/src/share/tools/ProjectCreator/DirectoryTree.java b/hotspot/src/share/tools/ProjectCreator/DirectoryTree.java
deleted file mode 100644
index 76a5e4668ae..00000000000
--- a/hotspot/src/share/tools/ProjectCreator/DirectoryTree.java
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-/** Encapsulates a notion of a directory tree. Designed to allow fast
-    querying of full paths for unique filenames in the hierarchy. */
-
-import java.io.*;
-import java.util.*;
-
-public class DirectoryTree {
-
-    /** The root of the read directoryTree */
-    private Node rootNode;
-
-    /** Subdirs to ignore; Vector of Strings */
-    private Vector subdirsToIgnore;
-
-    /** This maps file names to Lists of nodes. */
-    private Hashtable nameToNodeListTable;
-
-    /** Output "."'s as directories are read. Defaults to false. */
-    private boolean verbose;
-
-    public DirectoryTree() {
-        subdirsToIgnore = new Vector();
-        verbose = false;
-    }
-
-    public void addSubdirToIgnore(String subdir) {
-        subdirsToIgnore.add(subdir);
-    }
-
-    private class FileIterator implements Iterator {
-        private Vector nodes = new Vector();
-
-        public FileIterator(Node rootNode) {
-            if(rootNode == null) {
-                return;
-            }
-            nodes.add(rootNode);
-            prune();
-        }
-        public boolean hasNext() {
-            return nodes.size() > 0;
-        }
-        public Object next() {
-            Node last = (Node)nodes.remove(nodes.size() - 1);
-            prune();
-            return new File(last.getName());
-        }
-
-        public void remove() {
-            throw new RuntimeException();
-        }
-
-        private void prune() {
-            while (nodes.size() > 0) {
-                Node last = (Node)nodes.get(nodes.size() - 1);
-
-                if (last.isDirectory()) {
-                    nodes.remove(nodes.size() - 1);
-                    nodes.addAll(last.children);
-                } else {
-                    // Is at file
-                    return;
-                }
-            }
-        }
-    }
-
-    public Iterator getFileIterator() {
-        return new FileIterator(rootNode);
-    }
-
-    /** Output "."'s to System.out as directories are read. Defaults
-        to false. */
-    public void setVerbose(boolean newValue) {
-        verbose = newValue;
-    }
-
-    public boolean getVerbose() {
-        return verbose;
-    }
-
-    public String getRootNodeName() {
-        return rootNode.getName();
-    }
-
-    /** Takes an absolute path to the root directory of this
-        DirectoryTree. Throws IllegalArgumentException if the given
-        string represents a plain file or nonexistent directory. */
-
-    public void readDirectory(String baseDirectory)
-        throws IllegalArgumentException {
-        File root = new File(Util.normalize(baseDirectory));
-        if (!root.isDirectory()) {
-            return;
-        }
-        try {
-            root = root.getCanonicalFile();
-        }
-        catch (IOException e) {
-            throw new RuntimeException(e.toString());
-        }
-        rootNode = new Node(root);
-        readDirectory(rootNode, root);
-    }
-
-    /** Queries the DirectoryTree for a file or directory name. Takes
-        only the name of the file or directory itself (i.e., no parent
-        directory information should be in the passed name). Returns a
-        List of DirectoryTreeNodes specifying the full paths of all of
-        the files or directories of this name in the DirectoryTree.
-        Returns null if the directory tree has not been read from disk
-        yet or if the file was not found in the tree. */
-    public List findFile(String name) {
-        if (rootNode == null) {
-            return null;
-        }
-
-        if (nameToNodeListTable == null) {
-            nameToNodeListTable = new Hashtable();
-            try {
-                buildNameToNodeListTable(rootNode);
-            } catch (IOException e) {
-                e.printStackTrace();
-                return null;
-            }
-        }
-
-        return (List) nameToNodeListTable.get(name);
-    }
-
-    private void buildNameToNodeListTable(Node curNode)
-      throws IOException {
-        String fullName = curNode.getName();
-        String parent = curNode.getParent();
-        String separator = System.getProperty("file.separator");
-
-        if (parent != null) {
-          if (!fullName.startsWith(parent)) {
-            throw new RuntimeException(
-                "Internal error: parent of file name \"" + fullName +
-                "\" does not match file name \"" + parent + "\""
-            );
-          }
-
-          int len = parent.length();
-          if (!parent.endsWith(separator)) {
-            len += separator.length();
-          }
-
-          String fileName = fullName.substring(len);
-
-          if (fileName == null) {
-            throw new RuntimeException(
-                "Internal error: file name was empty"
-            );
-          }
-
-          List nodeList = (List) nameToNodeListTable.get(fileName);
-          if (nodeList == null) {
-            nodeList = new Vector();
-            nameToNodeListTable.put(fileName, nodeList);
-          }
-
-          nodeList.add(curNode);
-        } else {
-          if (curNode != rootNode) {
-            throw new RuntimeException(
-                "Internal error: parent of file + \"" + fullName + "\"" +
-                " was null"
-            );
-          }
-        }
-
-        if (curNode.isDirectory()) {
-          Iterator iter = curNode.getChildren();
-          if (iter != null) {
-            while (iter.hasNext()) {
-              buildNameToNodeListTable((Node) iter.next());
-            }
-          }
-        }
-    }
-
-    /** Reads all of the files in the given directory and adds them as
-        children of the directory tree node. Requires that the passed
-        node represents a directory. */
-
-    private void readDirectory(Node parentNode, File parentDir) {
-        File[] children = parentDir.listFiles();
-        if (children == null)
-            return;
-        if (verbose) {
-            System.out.print(".");
-            System.out.flush();
-        }
-        for (int i = 0; i < children.length; i++) {
-            File child = children[i];
-            children[i] = null;
-            boolean isDir = child.isDirectory();
-            boolean mustSkip = false;
-            if (isDir) {
-                for (Iterator iter = subdirsToIgnore.iterator();
-                     iter.hasNext(); ) {
-                    if (child.getName().equals((String) iter.next())) {
-                        mustSkip = true;
-                        break;
-                    }
-                }
-            }
-            if (!mustSkip) {
-                Node childNode = new Node(child);
-                parentNode.addChild(childNode);
-                if (isDir) {
-                    readDirectory(childNode, child);
-                }
-            }
-        }
-    }
-
-    private class Node implements DirectoryTreeNode {
-        private File file;
-        private Vector children;
-
-        /** file must be a canonical file */
-        Node(File file) {
-            this.file = file;
-            children = new Vector();
-        }
-
-        public boolean isFile() {
-            return file.isFile();
-        }
-
-        public boolean isDirectory() {
-            return file.isDirectory();
-        }
-
-        public String getName() {
-            return file.getPath();
-        }
-
-        public String getParent() {
-            return file.getParent();
-        }
-
-        public void addChild(Node n) {
-            children.add(n);
-        }
-
-        public Iterator getChildren() throws IllegalArgumentException {
-            return children.iterator();
-        }
-
-        public int getNumChildren() throws IllegalArgumentException {
-            return children.size();
-        }
-
-        public DirectoryTreeNode getChild(int i)
-            throws IllegalArgumentException, ArrayIndexOutOfBoundsException {
-            return (DirectoryTreeNode) children.get(i);
-        }
-    }
-}
diff --git a/hotspot/src/share/tools/ProjectCreator/FileFormatException.java b/hotspot/src/share/tools/ProjectCreator/FileFormatException.java
deleted file mode 100644
index 077886f85dd..00000000000
--- a/hotspot/src/share/tools/ProjectCreator/FileFormatException.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-@SuppressWarnings("serial")
-public class FileFormatException extends Exception {
-
-    public FileFormatException() {
-        super();
-    }
-
-    public FileFormatException(String s) {
-        super(s);
-    }
-}
diff --git a/hotspot/src/share/tools/ProjectCreator/FileTreeCreator.java b/hotspot/src/share/tools/ProjectCreator/FileTreeCreator.java
new file mode 100644
index 00000000000..3643c572e99
--- /dev/null
+++ b/hotspot/src/share/tools/ProjectCreator/FileTreeCreator.java
@@ -0,0 +1,72 @@
+import java.nio.file.FileSystems;
+import java.nio.file.Path;
+import java.nio.file.SimpleFileVisitor;
+import java.util.HashSet;
+import java.util.Stack;
+import java.util.Vector;
+
+public class FileTreeCreator extends SimpleFileVisitor<Path>
+{
+   Path vcProjLocation;
+   Path startDir;
+   final int startDirLength;
+   Stack<DirAttributes> attributes = new Stack<DirAttributes>();
+   Vector<BuildConfig> allConfigs;
+   WinGammaPlatformVC10 wg;
+
+   public FileTreeCreator(Path startDir, Vector<BuildConfig> allConfigs, WinGammaPlatformVC10 wg) {
+      super();
+      this.wg = wg;
+      this.allConfigs = allConfigs;
+      this.startDir = startDir;
+      startDirLength = startDir.toAbsolutePath().toString().length();
+      vcProjLocation = FileSystems.getDefault().getPath(allConfigs.firstElement().get("BuildSpace"));
+      attributes.push(new DirAttributes());
+   }
+
+   public class DirAttributes {
+
+      private HashSet<BuildConfig> ignores;
+      private HashSet<BuildConfig> disablePch;
+
+      public DirAttributes() {
+         ignores = new HashSet<BuildConfig>();
+         disablePch = new HashSet<BuildConfig>();
+      }
+
+      public DirAttributes(HashSet<BuildConfig> excludes2, HashSet<BuildConfig> disablePch2) {
+         ignores = excludes2;
+         disablePch = disablePch2;
+      }
+
+      @SuppressWarnings("unchecked")
+      public DirAttributes clone() {
+         return new DirAttributes((HashSet<BuildConfig>)this.ignores.clone(), (HashSet<BuildConfig>)this.disablePch.clone());
+      }
+
+      public void setIgnore(BuildConfig conf) {
+         ignores.add(conf);
+      }
+
+      public boolean hasIgnore(BuildConfig cfg) {
+         return ignores.contains(cfg);
+      }
+
+      public void removeFromIgnored(BuildConfig cfg) {
+         ignores.remove(cfg);
+      }
+
+      public void setDisablePch(BuildConfig conf) {
+         disablePch.add(conf);
+      }
+
+      public boolean hasDisablePch(BuildConfig cfg) {
+         return disablePch.contains(cfg);
+      }
+
+      public void removeFromDisablePch(BuildConfig cfg) {
+         disablePch.remove(cfg);
+      }
+
+   }
+}
diff --git a/hotspot/src/share/tools/ProjectCreator/FileTreeCreatorVC10.java b/hotspot/src/share/tools/ProjectCreator/FileTreeCreatorVC10.java
new file mode 100644
index 00000000000..837eef1a566
--- /dev/null
+++ b/hotspot/src/share/tools/ProjectCreator/FileTreeCreatorVC10.java
@@ -0,0 +1,142 @@
+import static java.nio.file.FileVisitResult.CONTINUE;
+
+import java.io.IOException;
+import java.nio.file.FileSystems;
+import java.nio.file.FileVisitResult;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.Stack;
+import java.util.Vector;
+
+public class FileTreeCreatorVC10 extends FileTreeCreator {
+
+      public FileTreeCreatorVC10(Path startDir, Vector<BuildConfig> allConfigs, WinGammaPlatformVC10 wg) {
+         super(startDir, allConfigs, wg);
+      }
+
+      @Override
+      public FileVisitResult visitFile(Path file, BasicFileAttributes attr) {
+         DirAttributes currentFileAttr = attributes.peek().clone();
+         boolean usePch = false;
+         boolean disablePch = false;
+         boolean useIgnore = false;
+         String fileName = file.getFileName().toString();
+
+         // TODO hideFile
+
+         // usePch applies to all configs for a file.
+         if (fileName.equals(BuildConfig.getFieldString(null, "UseToGeneratePch"))) {
+            usePch = true;
+         }
+
+         for (BuildConfig cfg : allConfigs) {
+            if (cfg.lookupHashFieldInContext("IgnoreFile", fileName) != null) {
+               useIgnore = true;
+               currentFileAttr.setIgnore(cfg);
+            } else if (cfg.matchesIgnoredPath(file.toAbsolutePath().toString())) {
+               useIgnore = true;
+               currentFileAttr.setIgnore(cfg);
+            }
+
+            if (cfg.lookupHashFieldInContext("DisablePch", fileName) != null) {
+               disablePch = true;
+               currentFileAttr.setDisablePch(cfg);
+            }
+
+            Vector<String> rv = new Vector<String>();
+            cfg.collectRelevantVectors(rv, "AdditionalFile");
+            for(String addFile : rv) {
+               if (addFile.equals(fileName)) {
+                  // supress any ignore
+                  // TODO - may need some adjustments
+                  if (file.toAbsolutePath().toString().contains(cfg.get("Flavour"))) {
+                     currentFileAttr.removeFromIgnored(cfg);
+                  }
+               }
+            }
+         }
+
+         String tagName = wg.getFileTagFromSuffix(fileName);
+         String fileLoc = vcProjLocation.relativize(file).toString();
+
+         if (!useIgnore && !disablePch && !usePch) {
+            wg.tag(tagName, new String[] { "Include", fileLoc});
+         } else {
+            wg.startTag(
+                  tagName,
+                  new String[] { "Include", fileLoc});
+
+            for (BuildConfig cfg : allConfigs) {
+               boolean ignore = currentFileAttr.hasIgnore(cfg);
+               if (ignore) {
+                  wg.tagData("ExcludedFromBuild", "true", "Condition", "'$(Configuration)|$(Platform)'=='" + cfg.get("Name") + "'");
+               }
+               if (usePch) {
+                  wg.tagData("PrecompiledHeader", "Create", "Condition", "'$(Configuration)|$(Platform)'=='" + cfg.get("Name") + "'");
+               }
+               if (disablePch) {
+                  wg.tag("PrecompiledHeader", "Condition", "'$(Configuration)|$(Platform)'=='" + cfg.get("Name") + "'");
+               }
+            }
+            wg.endTag();
+         }
+
+         String filter = startDir.relativize(file.getParent().toAbsolutePath()).toString();
+         wg.addFilterDependency(fileLoc, filter);
+
+         return CONTINUE;
+      }
+
+      @Override
+      public FileVisitResult preVisitDirectory(Path path, BasicFileAttributes attrs)
+            throws IOException {
+         Boolean hide = false;
+         // TODO remove attrs, if path is matched in this dir, then it is too in every subdir.
+         // And we will check anyway
+         DirAttributes newAttr = attributes.peek().clone();
+
+         // check per config ignorePaths!
+         for (BuildConfig cfg : allConfigs) {
+            if (cfg.matchesIgnoredPath(path.toAbsolutePath().toString())) {
+               newAttr.setIgnore(cfg);
+            }
+
+            // Hide is always on all configs. And additional files are never hiddden
+            if (cfg.matchesHidePath(path.toAbsolutePath().toString())) {
+               hide = true;
+               break;
+            }
+         }
+
+         if (!hide) {
+            String name = startDir.relativize(path.toAbsolutePath()).toString();
+            if (!"".equals(name)) {
+               wg.addFilter(name);
+            }
+
+            attributes.push(newAttr);
+            return super.preVisitDirectory(path, attrs);
+         } else {
+            return FileVisitResult.SKIP_SUBTREE;
+         }
+      }
+
+      @Override
+      public FileVisitResult postVisitDirectory(Path dir, IOException exc) {
+         //end matching attributes set by ignorepath
+         attributes.pop();
+         return CONTINUE;
+      }
+
+      @Override
+      public FileVisitResult visitFileFailed(Path file, IOException exc) {
+         return CONTINUE;
+      }
+
+      public void writeFileTree() throws IOException {
+         Files.walkFileTree(this.startDir, this);
+      }
+
+
+   }
\ No newline at end of file
diff --git a/hotspot/src/share/tools/ProjectCreator/FileTreeCreatorVC7.java b/hotspot/src/share/tools/ProjectCreator/FileTreeCreatorVC7.java
new file mode 100644
index 00000000000..b36e0121f8a
--- /dev/null
+++ b/hotspot/src/share/tools/ProjectCreator/FileTreeCreatorVC7.java
@@ -0,0 +1,156 @@
+import static java.nio.file.FileVisitResult.CONTINUE;
+
+import java.io.IOException;
+import java.nio.file.FileSystems;
+import java.nio.file.FileVisitResult;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.Stack;
+import java.util.Vector;
+
+public class FileTreeCreatorVC7 extends FileTreeCreator {
+
+      public FileTreeCreatorVC7(Path startDir, Vector<BuildConfig> allConfigs, WinGammaPlatform wg) {
+         super(startDir, allConfigs, null);
+      }
+
+      @Override
+      public FileVisitResult visitFile(Path file, BasicFileAttributes attr) {
+         DirAttributes currentFileAttr = attributes.peek().clone();
+         boolean usePch = false;
+         boolean disablePch = false;
+         boolean useIgnore = false;
+         String fileName = file.getFileName().toString();
+
+         // usePch applies to all configs for a file.
+         if (fileName.equals(BuildConfig.getFieldString(null, "UseToGeneratePch"))) {
+            usePch = true;
+         }
+
+         for (BuildConfig cfg : allConfigs) {
+            if (cfg.lookupHashFieldInContext("IgnoreFile", fileName) != null) {
+               useIgnore = true;
+               currentFileAttr.setIgnore(cfg);
+            } else if (cfg.matchesIgnoredPath(file.toAbsolutePath().toString())) {
+               useIgnore = true;
+               currentFileAttr.setIgnore(cfg);
+            }
+
+            if (cfg.lookupHashFieldInContext("DisablePch", fileName) != null) {
+               disablePch = true;
+               currentFileAttr.setDisablePch(cfg);
+            }
+
+            Vector<String> rv = new Vector<String>();
+            cfg.collectRelevantVectors(rv, "AdditionalFile");
+            for(String addFile : rv) {
+               if (addFile.equals(fileName)) {
+                  // supress any ignore
+                  currentFileAttr.removeFromIgnored(cfg);
+               }
+            }
+         }
+
+         if (!useIgnore && !disablePch && !usePch) {
+            wg.tag("File", new String[] { "RelativePath", vcProjLocation.relativize(file).toString()});
+         } else {
+            wg.startTag(
+                  "File",
+                  new String[] { "RelativePath", vcProjLocation.relativize(file).toString()});
+
+            for (BuildConfig cfg : allConfigs) {
+               boolean ignore = currentFileAttr.hasIgnore(cfg);
+               String [] fileConfAttr;
+
+               if (ignore) {
+                  fileConfAttr = new String[] {"Name", cfg.get("Name"), "ExcludedFromBuild", "TRUE" };
+               } else {
+                  fileConfAttr = new String[] {"Name", cfg.get("Name")};
+               }
+
+               if (!disablePch && !usePch && !ignore) {
+                  continue;
+               } else if (!disablePch && !usePch) {
+                  wg.tag("FileConfiguration", fileConfAttr);
+               } else {
+                  wg.startTag("FileConfiguration", fileConfAttr);
+                  if (usePch) {
+                     // usePch always applies to all configs, might not always be so.
+                     wg.tag("Tool", new String[] {
+                           "Name", "VCCLCompilerTool", "UsePrecompiledHeader",
+                     "1" });
+                     assert(!disablePch);
+                  }
+                  if (disablePch) {
+                     if (currentFileAttr.hasDisablePch(cfg)) {
+                        wg.tag("Tool", new String[] {
+                              "Name", "VCCLCompilerTool", "UsePrecompiledHeader",
+                        "0" });
+                     }
+                     assert(!usePch);
+                  }
+                  wg.endTag();
+               }
+            }
+            wg.endTag();
+         }
+
+         return CONTINUE;
+      }
+
+      @Override
+      public FileVisitResult preVisitDirectory(Path path, BasicFileAttributes attrs)
+            throws IOException {
+         Boolean hide = false;
+         DirAttributes newAttr = attributes.peek().clone();
+
+         String rPath;
+         if (path.toAbsolutePath().toString().equals(this.startDir.toAbsolutePath().toString())){
+            rPath = startDir.toString();
+         } else {
+            rPath = path.getFileName().toString();
+         }
+
+         // check per config ignorePaths!
+         for (BuildConfig cfg : allConfigs) {
+            if (cfg.matchesIgnoredPath(path.toAbsolutePath().toString())) {
+               newAttr.setIgnore(cfg);
+            }
+
+            // Hide is always on all configs. And additional files are never hiddden
+            if (cfg.matchesHidePath(path.toAbsolutePath().toString())) {
+               hide = true;
+               break;
+            }
+         }
+
+         if (!hide) {
+            wg.startTag("Filter", new String[] {
+                  "Name", rPath});
+
+            attributes.push(newAttr);
+            return super.preVisitDirectory(path, attrs);
+         } else {
+            return FileVisitResult.SKIP_SUBTREE;
+         }
+      }
+
+      @Override
+      public FileVisitResult postVisitDirectory(Path dir, IOException exc) {
+         //end matching attributes set by ignorepath
+         wg.endTag();
+         attributes.pop();
+
+         return CONTINUE;
+      }
+
+      @Override
+      public FileVisitResult visitFileFailed(Path file, IOException exc) {
+         return CONTINUE;
+      }
+
+      public void writeFileTree() throws IOException {
+         Files.walkFileTree(this.startDir, this);
+      }
+   }
\ No newline at end of file
diff --git a/hotspot/src/share/tools/ProjectCreator/ProjectCreator.java b/hotspot/src/share/tools/ProjectCreator/ProjectCreator.java
index 5203c5a36ed..daa7a41ab81 100644
--- a/hotspot/src/share/tools/ProjectCreator/ProjectCreator.java
+++ b/hotspot/src/share/tools/ProjectCreator/ProjectCreator.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -24,75 +24,76 @@
 
 public class ProjectCreator {
 
-    public static void usage() {
-        System.out.println("ProjectCreator options:");
-        System.err.println("WinGammaPlatform platform-specific options:");
-        System.err.println("  -sourceBase <path to directory (workspace) " +
-                           "containing source files; no trailing slash>");
-        System.err.println("  -dspFileName <full pathname to which .dsp file " +
-                           "will be written; all parent directories must " +
-                           "already exist>");
-        System.err.println("  -envVar <environment variable to be inserted " +
-                           "into .dsp file, substituting for path given in " +
-                           "-sourceBase. Example: HotSpotWorkSpace>");
-        System.err.println("  -dllLoc <path to directory in which to put " +
-                           "jvm.dll and jvm_g.dll; no trailing slash>");
-        System.err.println("  If any of the above are specified, "+
-                           "they must all be.");
-        System.err.println("  Additional, optional arguments, which can be " +
-                           "specified multiple times:");
-        System.err.println("    -absoluteInclude <string containing absolute " +
-                           "path to include directory>");
-        System.err.println("    -relativeInclude <string containing include " +
-                           "directory relative to -envVar>");
-        System.err.println("    -define <preprocessor flag to be #defined " +
-                           "(note: doesn't yet support " +
-                           "#define (flag) (value))>");
-        System.err.println("    -perFileLine <file> <line>");
-        System.err.println("    -conditionalPerFileLine <file> <line for " +
-                           "release build> <line for debug build>");
-        System.err.println("  (NOTE: To work around a bug in nmake, where " +
-                           "you can't have a '#' character in a quoted " +
-                           "string, all of the lines outputted have \"#\"" +
-                           "prepended)");
-        System.err.println("    -startAt <subdir of sourceBase>");
-        System.err.println("    -ignoreFile <file which won't be able to be " +
-                           "found in the sourceBase because it's generated " +
-                           "later>");
-        System.err.println("    -additionalFile <file not in database but " +
-                           "which should show up in .dsp file>");
-        System.err.println("    -additionalGeneratedFile <environment variable of " +
-                           "generated file's location> <relative path to " +
-                           "directory containing file; no trailing slash> " +
-                           "<name of file generated later in the build process>");
-        System.err.println("    -prelink <build> <desc> <cmds>:");
-        System.err.println(" Generate a set of prelink commands for the given BUILD");
-        System.err.println(" (\"Debug\" or \"Release\"). The prelink description and commands");
-        System.err.println(" are both quoted strings.");
-        System.err.println("    Default includes: \".\"");
-        System.err.println("    Default defines: WIN32, _WINDOWS, \"HOTSPOT_BUILD_USER=$(USERNAME)\"");
-    }
+   public static void usage() {
+      System.out.println("ProjectCreator options:");
+      System.err.println("WinGammaPlatform platform-specific options:");
+      System.err.println("  -sourceBase <path to directory (workspace) "
+            + "containing source files; no trailing slash>");
+      System.err.println("  -dspFileName <full pathname to which .dsp file "
+            + "will be written; all parent directories must "
+            + "already exist>");
+      System.err.println("  -envVar <environment variable to be inserted "
+            + "into .dsp file, substituting for path given in "
+            + "-sourceBase. Example: HotSpotWorkSpace>");
+      System.err.println("  -dllLoc <path to directory in which to put "
+            + "jvm.dll and jvm_g.dll; no trailing slash>");
+      System.err.println("  If any of the above are specified, "
+            + "they must all be.");
+      System.err.println("  Additional, optional arguments, which can be "
+            + "specified multiple times:");
+      System.err.println("    -absoluteInclude <string containing absolute "
+            + "path to include directory>");
+      System.err.println("    -relativeInclude <string containing include "
+            + "directory relative to -envVar>");
+      System.err.println("    -define <preprocessor flag to be #defined "
+            + "(note: doesn't yet support " + "#define (flag) (value))>");
+      System.err.println("    -perFileLine <file> <line>");
+      System.err.println("    -conditionalPerFileLine <file> <line for "
+            + "release build> <line for debug build>");
+      System.err.println("  (NOTE: To work around a bug in nmake, where "
+            + "you can't have a '#' character in a quoted "
+            + "string, all of the lines outputted have \"#\"" + "prepended)");
+      System.err.println("    -startAt <subdir of sourceBase>");
+      System.err.println("    -ignoreFile <file which won't be able to be "
+            + "found in the sourceBase because it's generated " + "later>");
+      System.err.println("    -additionalFile <file not in database but "
+            + "which should show up in .dsp file>");
+      System.err
+            .println("    -additionalGeneratedFile <environment variable of "
+                  + "generated file's location> <relative path to "
+                  + "directory containing file; no trailing slash> "
+                  + "<name of file generated later in the build process>");
+      System.err.println("    -prelink <build> <desc> <cmds>:");
+      System.err
+            .println(" Generate a set of prelink commands for the given BUILD");
+      System.err
+            .println(" (\"Debug\" or \"Release\"). The prelink description and commands");
+      System.err.println(" are both quoted strings.");
+      System.err.println("    Default includes: \".\"");
+      System.err
+            .println("    Default defines: WIN32, _WINDOWS, \"HOTSPOT_BUILD_USER=$(USERNAME)\"");
+   }
 
-    public static void main(String[] args) {
-        try {
-            if (args.length < 3) {
-                usage();
-                System.exit(1);
-            }
+   public static void main(String[] args) {
+      try {
+         if (args.length < 3) {
+            usage();
+            System.exit(1);
+         }
 
-            String platformName = args[0];
-            Class platformClass = Class.forName(platformName);
-            WinGammaPlatform platform = (WinGammaPlatform) platformClass.newInstance();
+         String platformName = args[0];
+         Class platformClass = Class.forName(platformName);
+         WinGammaPlatform platform = (WinGammaPlatform) platformClass
+               .newInstance();
 
-            String[] platformArgs = new String[args.length - 1];
-            System.arraycopy(args, 1, platformArgs, 0, platformArgs.length);
+         String[] platformArgs = new String[args.length - 1];
+         System.arraycopy(args, 1, platformArgs, 0, platformArgs.length);
 
-            // Allow the platform to write platform-specific files
-            platform.createVcproj(platformArgs);
-        }
-        catch (Exception e) {
-            e.printStackTrace();
-              System.exit(1);
-        }
-    }
+         // Allow the platform to write platform-specific files
+         platform.createVcproj(platformArgs);
+      } catch (Exception e) {
+         e.printStackTrace();
+         System.exit(1);
+      }
+   }
 }
diff --git a/hotspot/src/share/tools/ProjectCreator/Util.java b/hotspot/src/share/tools/ProjectCreator/Util.java
index 466a099749d..ca830780048 100644
--- a/hotspot/src/share/tools/ProjectCreator/Util.java
+++ b/hotspot/src/share/tools/ProjectCreator/Util.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,18 +26,19 @@ import java.util.*;
 import java.io.File;
 
 public class Util {
-    static String join(String padder, Vector v) {
+
+    static String join(String padder, Vector<String> v) {
         return join(padder, v, false);
     }
 
-    static String join(String padder, Vector v, boolean quoted) {
+    static String join(String padder, Vector<String> v, boolean quoted) {
         StringBuffer sb = new StringBuffer();
 
-        for (Iterator iter = v.iterator(); iter.hasNext(); ) {
+        for (Iterator<String> iter = v.iterator(); iter.hasNext(); ) {
             if (quoted) {
                 sb.append('"');
             }
-            sb.append((String)iter.next());
+            sb.append(iter.next());
             if (quoted) {
                 sb.append('"');
             }
@@ -48,10 +49,10 @@ public class Util {
     }
 
 
-    static String prefixed_join(String padder, Vector v, boolean quoted) {
+    static String prefixed_join(String padder, Vector<String> v, boolean quoted) {
         StringBuffer sb = new StringBuffer();
 
-        for (Iterator iter = v.iterator(); iter.hasNext(); ) {
+        for (Iterator<String> iter = v.iterator(); iter.hasNext(); ) {
             sb.append(padder);
 
             if (quoted) {
diff --git a/hotspot/src/share/tools/ProjectCreator/WinGammaPlatform.java b/hotspot/src/share/tools/ProjectCreator/WinGammaPlatform.java
index 7c4dc53e2c2..2cc6f542ee5 100644
--- a/hotspot/src/share/tools/ProjectCreator/WinGammaPlatform.java
+++ b/hotspot/src/share/tools/ProjectCreator/WinGammaPlatform.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@ import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Stack;
 import java.util.TreeSet;
 import java.util.Vector;
 
@@ -218,69 +219,6 @@ public abstract class WinGammaPlatform {
         return false;
     }
 
-    /* This returns a String containing the full path to the passed
-       file name, or null if an error occurred. If the file was not
-       found or was a duplicate and couldn't be resolved using the
-       preferred paths, the file name is added to the appropriate
-       Vector of Strings. */
-    private String findFileInDirectory(String fileName,
-                                       DirectoryTree directory,
-                                       Vector preferredPaths,
-                                       Vector filesNotFound,
-                                       Vector filesDuplicate) {
-        List locationsInTree = directory.findFile(fileName);
-        int  rootNameLength = directory.getRootNodeName().length();
-        String name = null;
-        if ((locationsInTree == null) ||
-            (locationsInTree.size() == 0)) {
-            filesNotFound.add(fileName);
-        } else if (locationsInTree.size() > 1) {
-            // Iterate through them, trying to find one with a
-            // preferred path
-        search:
-            {
-                for (Iterator locIter = locationsInTree.iterator();
-                     locIter.hasNext(); ) {
-                    DirectoryTreeNode node =
-                        (DirectoryTreeNode) locIter.next();
-                    String tmpName = node.getName();
-                    for (Iterator prefIter = preferredPaths.iterator();
-                         prefIter.hasNext(); ) {
-                        // We need to make sure the preferred path is
-                        // found from the file path not including the root node name.
-                        if (tmpName.indexOf((String)prefIter.next(),
-                                            rootNameLength) != -1) {
-                            name = tmpName;
-                            break search;
-                        }
-                    }
-                }
-            }
-
-            if (name == null) {
-                filesDuplicate.add(fileName);
-            }
-        } else {
-            name = ((DirectoryTreeNode) locationsInTree.get(0)).getName();
-        }
-
-        return name;
-    }
-
-    protected String envVarPrefixedFileName(String fileName,
-                                            int sourceBaseLen,
-                                            DirectoryTree tree,
-                                            Vector preferredPaths,
-                                            Vector filesNotFound,
-                                            Vector filesDuplicate) {
-        String fullName = findFileInDirectory(fileName,
-                                              tree,
-                                              preferredPaths,
-                                              filesNotFound,
-                                              filesDuplicate);
-        return fullName;
-    }
-
      String getProjectName(String fullPath, String extension)
         throws IllegalArgumentException, IOException {
         File file = new File(fullPath).getCanonicalFile();
@@ -369,6 +307,12 @@ public abstract class WinGammaPlatform {
                               HsArgHandler.STRING
                               ),
 
+               new HsArgRule("-buildSpace",
+                              "BuildSpace",
+                              null,
+                              HsArgHandler.STRING
+                              ),
+
               new HsArgRule("-platformName",
                               "PlatformName",
                               null,
@@ -405,6 +349,18 @@ public abstract class WinGammaPlatform {
                               HsArgHandler.VECTOR
                               ),
 
+                new HsArgRule("-absoluteSrcInclude",
+                              "AbsoluteSrcInclude",
+                              null,
+                              HsArgHandler.VECTOR
+                              ),
+
+                new HsArgRule("-relativeSrcInclude",
+                              "RelativeSrcInclude",
+                              null,
+                              HsArgHandler.VECTOR
+                              ),
+
                 new HsArgRule("-define",
                               "Define",
                               null,
@@ -494,6 +450,12 @@ public abstract class WinGammaPlatform {
                               HsArgHandler.VECTOR
                               ),
 
+                new HsArgRule("-hidePath",
+                      "HidePath",
+                      null,
+                      HsArgHandler.VECTOR
+                      ),
+
                 new HsArgRule("-additionalFile",
                               "AdditionalFile",
                               null,
@@ -611,107 +573,101 @@ public abstract class WinGammaPlatform {
         return allConfigs;
     }
 
-    class FileAttribute {
-        int     numConfigs;
-        Vector  configs;
-        String  shortName;
-        boolean noPch, pchRoot;
-
-        FileAttribute(String shortName, BuildConfig cfg, int numConfigs) {
-            this.shortName = shortName;
-            this.noPch =  (cfg.lookupHashFieldInContext("DisablePch", shortName) != null);
-            this.pchRoot = shortName.equals(BuildConfig.getFieldString(null, "UseToGeneratePch"));
-            this.numConfigs = numConfigs;
-
-            configs = new Vector();
-            add(cfg.get("Name"));
-        }
-
-        void add(String confName) {
-            configs.add(confName);
-
-            // if presented in all configs
-            if (configs.size() == numConfigs) {
-                configs = null;
-            }
-        }
-    }
-
-    class FileInfo implements Comparable {
-        String        full;
-        FileAttribute attr;
-
-        FileInfo(String full, FileAttribute  attr) {
-            this.full = full;
-            this.attr = attr;
-        }
-
-        public int compareTo(Object o) {
-            FileInfo oo = (FileInfo)o;
-            return full.compareTo(oo.full);
-        }
-
-        boolean isHeader() {
-            return attr.shortName.endsWith(".h") || attr.shortName.endsWith(".hpp");
-        }
-
-        boolean isCpp() {
-            return attr.shortName.endsWith(".cpp");
-        }
-    }
-
-
-    TreeSet sortFiles(Hashtable allFiles) {
-        TreeSet rv = new TreeSet();
-        Enumeration e = allFiles.keys();
-        while (e.hasMoreElements()) {
-            String fullPath = (String)e.nextElement();
-            rv.add(new FileInfo(fullPath, (FileAttribute)allFiles.get(fullPath)));
-        }
-        return rv;
-    }
-
-    Hashtable computeAttributedFiles(Vector allConfigs) {
-        Hashtable ht = new Hashtable();
-        int numConfigs = allConfigs.size();
-
-        for (Iterator i = allConfigs.iterator(); i.hasNext(); ) {
-            BuildConfig bc = (BuildConfig)i.next();
-            Hashtable  confFiles = (Hashtable)bc.getSpecificField("AllFilesHash");
-            String confName = bc.get("Name");
-
-            for (Enumeration e=confFiles.keys(); e.hasMoreElements(); ) {
-                String filePath = (String)e.nextElement();
-                FileAttribute fa = (FileAttribute)ht.get(filePath);
-
-                if (fa == null) {
-                    fa = new FileAttribute((String)confFiles.get(filePath), bc, numConfigs);
-                    ht.put(filePath, fa);
-                } else {
-                    fa.add(confName);
-                }
-            }
-        }
-
-        return ht;
-    }
-
-     Hashtable computeAttributedFiles(BuildConfig bc) {
-        Hashtable ht = new Hashtable();
-        Hashtable confFiles = (Hashtable)bc.getSpecificField("AllFilesHash");
-
-        for (Enumeration e = confFiles.keys(); e.hasMoreElements(); ) {
-            String filePath = (String)e.nextElement();
-            ht.put(filePath,  new FileAttribute((String)confFiles.get(filePath), bc, 1));
-        }
-
-        return ht;
-    }
-
     PrintWriter printWriter;
 
     public void writeProjectFile(String projectFileName, String projectName,
                                  Vector<BuildConfig> allConfigs) throws IOException {
         throw new RuntimeException("use compiler version specific version");
     }
+
+    int indent;
+    private Stack<String> tagStack = new Stack<String>();
+
+    private void startTagPrim(String name, String[] attrs, boolean close) {
+       startTagPrim(name, attrs, close, true);
+    }
+
+    private void startTagPrim(String name, String[] attrs, boolean close,
+          boolean newline) {
+       doIndent();
+       printWriter.print("<" + name);
+       indent++;
+
+       if (attrs != null && attrs.length > 0) {
+          for (int i = 0; i < attrs.length; i += 2) {
+             printWriter.print(" " + attrs[i] + "=\"" + attrs[i + 1] + "\"");
+             if (i < attrs.length - 2) {
+             }
+          }
+       }
+
+       if (close) {
+          indent--;
+          printWriter.print(" />");
+       } else {
+          // TODO push tag name, and change endTag to pop and print.
+          tagStack.push(name);
+          printWriter.print(">");
+       }
+       if (newline) {
+          printWriter.println();
+       }
+    }
+
+    void startTag(String name, String... attrs) {
+       startTagPrim(name, attrs, false);
+    }
+
+    void startTagV(String name, Vector attrs) {
+       String s[] = new String[attrs.size()];
+       for (int i = 0; i < attrs.size(); i++) {
+          s[i] = (String) attrs.elementAt(i);
+       }
+       startTagPrim(name, s, false);
+    }
+
+    void endTag() {
+       String name = tagStack.pop();
+       indent--;
+       doIndent();
+       printWriter.println("</" + name + ">");
+    }
+
+    private void endTagNoIndent() {
+       String name = tagStack.pop();
+       indent--;
+       printWriter.println("</" + name + ">");
+    }
+
+    void tag(String name, String... attrs) {
+       startTagPrim(name, attrs, true);
+    }
+
+    void tagData(String name, String data) {
+       startTagPrim(name, null, false, false);
+       printWriter.print(data);
+       endTagNoIndent();
+    }
+
+    void tagData(String name, String data, String... attrs) {
+       startTagPrim(name, attrs, false, false);
+       printWriter.print(data);
+       endTagNoIndent();
+    }
+
+    void tagV(String name, Vector attrs) {
+       String s[] = new String[attrs.size()];
+       for (int i = 0; i < attrs.size(); i++) {
+          s[i] = (String) attrs.elementAt(i);
+       }
+       startTagPrim(name, s, true);
+    }
+
+    void doIndent() {
+       for (int i = 0; i < indent; i++) {
+          printWriter.print("  ");
+       }
+    }
+
+
 }
diff --git a/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java b/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java
index 4a96981e76d..137abdc30e9 100644
--- a/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java
+++ b/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC10.java
@@ -3,14 +3,18 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.io.UnsupportedEncodingException;
-import java.util.Hashtable;
+import java.nio.file.FileSystems;
 import java.util.Iterator;
-import java.util.TreeSet;
+import java.util.LinkedList;
 import java.util.UUID;
 import java.util.Vector;
 
 public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 {
 
+
+   LinkedList <String>filters = new LinkedList<String>();
+   LinkedList <String[]>filterDeps = new LinkedList<String[]>();
+
     @Override
     protected String getProjectExt() {
         return ".vcxproj";
@@ -37,15 +41,15 @@ public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 {
                     "Include", cfg.get("Name"));
             tagData("Configuration", cfg.get("Id"));
             tagData("Platform", cfg.get("PlatformName"));
-            endTag("ProjectConfiguration");
+            endTag();
         }
-        endTag("ItemGroup");
+        endTag();
 
         startTag("PropertyGroup", "Label", "Globals");
         tagData("ProjectGuid", "{8822CB5C-1C41-41C2-8493-9F6E1994338B}");
         tag("SccProjectName");
         tag("SccLocalPath");
-        endTag("PropertyGroup");
+        endTag();
 
         tag("Import", "Project", "$(VCTargetsPath)\\Microsoft.Cpp.Default.props");
 
@@ -53,19 +57,19 @@ public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 {
             startTag(cfg, "PropertyGroup", "Label", "Configuration");
             tagData("ConfigurationType", "DynamicLibrary");
             tagData("UseOfMfc", "false");
-            endTag("PropertyGroup");
+            endTag();
         }
 
         tag("Import", "Project", "$(VCTargetsPath)\\Microsoft.Cpp.props");
         startTag("ImportGroup", "Label", "ExtensionSettings");
-        endTag("ImportGroup");
+        endTag();
         for (BuildConfig cfg : allConfigs) {
             startTag(cfg, "ImportGroup", "Label", "PropertySheets");
             tag("Import",
                     "Project", "$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props",
                     "Condition", "exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')",
                     "Label", "LocalAppDataPlatform");
-            endTag("ImportGroup");
+            endTag();
         }
 
         tag("PropertyGroup", "Label", "UserMacros");
@@ -82,38 +86,38 @@ public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 {
             tag(cfg, "CodeAnalysisRules");
             tag(cfg, "CodeAnalysisRuleAssemblies");
         }
-        endTag("PropertyGroup");
+        endTag();
 
         for (BuildConfig cfg : allConfigs) {
             startTag(cfg, "ItemDefinitionGroup");
             startTag("ClCompile");
             tagV(cfg.getV("CompilerFlags"));
-            endTag("ClCompile");
+            endTag();
 
             startTag("Link");
             tagV(cfg.getV("LinkerFlags"));
-            endTag("Link");
+            endTag();
 
             startTag("PostBuildEvent");
             tagData("Message", BuildConfig.getFieldString(null, "PostbuildDescription"));
             tagData("Command", cfg.expandFormat(BuildConfig.getFieldString(null, "PostbuildCommand").replace("\t", "\r\n")));
-            endTag("PostBuildEvent");
+            endTag();
 
             startTag("PreLinkEvent");
             tagData("Message", BuildConfig.getFieldString(null, "PrelinkDescription"));
             tagData("Command", cfg.expandFormat(BuildConfig.getFieldString(null, "PrelinkCommand").replace("\t", "\r\n")));
-            endTag("PreLinkEvent");
+            endTag();
 
-            endTag("ItemDefinitionGroup");
+            endTag();
         }
 
         writeFiles(allConfigs, projDir);
 
         tag("Import", "Project", "$(VCTargetsPath)\\Microsoft.Cpp.targets");
         startTag("ImportGroup", "Label", "ExtensionTargets");
-        endTag("ImportGroup");
+        endTag();
 
-        endTag("Project");
+        endTag();
         printWriter.close();
         System.out.println("    Done.");
 
@@ -138,14 +142,22 @@ public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 {
         for (BuildConfig cfg : allConfigs) {
             startTag(cfg, "PropertyGroup");
             tagData("LocalDebuggerCommand", "$(TargetDir)/hotspot.exe");
-            endTag("PropertyGroup");
+            endTag();
         }
 
-        endTag("Project");
+        endTag();
         printWriter.close();
         System.out.println("    Done.");
     }
 
+    public void addFilter(String rPath) {
+       filters.add(rPath);
+    }
+
+    public void addFilterDependency(String fileLoc, String filter) {
+      filterDeps.add(new String[] {fileLoc, filter});
+    }
+
     private void writeFilterFile(String projectFileName, String projectName,
             Vector<BuildConfig> allConfigs, String base) throws FileNotFoundException, UnsupportedEncodingException {
         String filterFileName = projectFileName + ".filters";
@@ -157,210 +169,92 @@ public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 {
                 "ToolsVersion", "4.0",
                 "xmlns", "http://schemas.microsoft.com/developer/msbuild/2003");
 
-        Hashtable<String, FileAttribute> allFiles = computeAttributedFiles(allConfigs);
-        TreeSet<FileInfo> sortedFiles = sortFiles(allFiles);
-        Vector<NameFilter> filters = makeFilters(sortedFiles);
-
-        // first all filters
         startTag("ItemGroup");
-        for (NameFilter filter : filters) {
-            doWriteFilter(filter, "");
+        for (String filter : filters) {
+           startTag("Filter", "Include",filter);
+           UUID uuid = UUID.randomUUID();
+           tagData("UniqueIdentifier", "{" + uuid.toString() + "}");
+           endTag();
         }
         startTag("Filter", "Include", "Resource Files");
         UUID uuid = UUID.randomUUID();
         tagData("UniqueIdentifier", "{" + uuid.toString() + "}");
         tagData("Extensions", "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe");
-        endTag("Filter");
-        endTag("ItemGroup");
+        endTag();
+        endTag();
 
-        // then all cpp files
+        //TODO - do I need to split cpp and hpp files?
+
+        // then all files
         startTag("ItemGroup");
-        for (NameFilter filter : filters) {
-            doWriteFiles(sortedFiles, filter, "", "ClCompile", new Evaluator() {
-                public boolean pick(FileInfo fi) {
-                    return fi.isCpp();
-                }
-            }, base);
-        }
-        endTag("ItemGroup");
+        for (String[] dep : filterDeps) {
+           String tagName = getFileTagFromSuffix(dep[0]);
 
-        // then all header files
-        startTag("ItemGroup");
-        for (NameFilter filter : filters) {
-            doWriteFiles(sortedFiles, filter, "", "ClInclude", new Evaluator() {
-                public boolean pick(FileInfo fi) {
-                    return fi.isHeader();
-                }
-            }, base);
+           startTag(tagName, "Include", dep[0]);
+           tagData("Filter", dep[1]);
+           endTag();
         }
-        endTag("ItemGroup");
+        endTag();
 
-        // then all other files
-        startTag("ItemGroup");
-        for (NameFilter filter : filters) {
-            doWriteFiles(sortedFiles, filter, "", "None", new Evaluator() {
-                public boolean pick(FileInfo fi) {
-                    return true;
-                }
-            }, base);
-        }
-        endTag("ItemGroup");
-
-        endTag("Project");
+        endTag();
         printWriter.close();
         System.out.println("    Done.");
     }
 
-
-    private void doWriteFilter(NameFilter filter, String start) {
-        startTag("Filter", "Include", start + filter.fname);
-        UUID uuid = UUID.randomUUID();
-        tagData("UniqueIdentifier", "{" + uuid.toString() + "}");
-        endTag("Filter");
-        if (filter instanceof ContainerFilter) {
-            Iterator i = ((ContainerFilter)filter).babies();
-            while (i.hasNext()) {
-                doWriteFilter((NameFilter)i.next(), start + filter.fname + "\\");
-            }
-        }
+    public String getFileTagFromSuffix(String fileName) {
+       if (fileName.endsWith(".cpp")) {
+          return"ClCompile";
+       } else if (fileName.endsWith(".c")) {
+          return "ClCompile";
+       } else if (fileName.endsWith(".hpp")) {
+          return"ClInclude";
+       } else if (fileName.endsWith(".h")) {
+          return "ClInclude";
+       } else {
+          return"None";
+       }
     }
 
-    interface Evaluator {
-        boolean pick(FileInfo fi);
-    }
-
-    private void doWriteFiles(TreeSet<FileInfo> allFiles, NameFilter filter, String start, String tool, Evaluator eval, String base) {
-        if (filter instanceof ContainerFilter) {
-            Iterator i = ((ContainerFilter)filter).babies();
-            while (i.hasNext()) {
-                doWriteFiles(allFiles, (NameFilter)i.next(), start + filter.fname + "\\", tool, eval, base);
-            }
-        }
-        else {
-            Iterator i = allFiles.iterator();
-            while (i.hasNext()) {
-                FileInfo fi = (FileInfo)i.next();
-
-                if (!filter.match(fi)) {
-                    continue;
-                }
-                if (eval.pick(fi)) {
-                    startTag(tool, "Include", rel(fi.full, base));
-                    tagData("Filter", start + filter.fname);
-                    endTag(tool);
-
-                    // we not gonna look at this file anymore (sic!)
-                    i.remove();
-                }
-            }
-        }
-    }
-
-
     void writeFiles(Vector<BuildConfig> allConfigs, String projDir) {
-        Hashtable<String, FileAttribute> allFiles = computeAttributedFiles(allConfigs);
-        TreeSet<FileInfo> sortedFiles = sortFiles(allFiles);
+       // This code assummes there are no config specific includes.
+       startTag("ItemGroup");
 
-        // first cpp-files
-        startTag("ItemGroup");
-        for (FileInfo fi : sortedFiles) {
-            if (!fi.isCpp()) {
-                continue;
-            }
-            writeFile("ClCompile", allConfigs, fi, projDir);
-        }
-        endTag("ItemGroup");
+       String sourceBase = BuildConfig.getFieldString(null, "SourceBase");
 
-        // then header-files
-        startTag("ItemGroup");
-        for (FileInfo fi : sortedFiles) {
-            if (!fi.isHeader()) {
-                continue;
-            }
-            writeFile("ClInclude", allConfigs, fi, projDir);
-        }
-        endTag("ItemGroup");
+       // Use first config for all global absolute includes.
+       BuildConfig baseConfig = allConfigs.firstElement();
+       Vector<String> rv = new Vector<String>();
 
-        // then others
-        startTag("ItemGroup");
-        for (FileInfo fi : sortedFiles) {
-            if (fi.isHeader() || fi.isCpp()) {
-                continue;
-            }
-            writeFile("None", allConfigs, fi, projDir);
-        }
-        endTag("ItemGroup");
+       // Then use first config for all relative includes
+       Vector<String> ri = new Vector<String>();
+       baseConfig.collectRelevantVectors(ri, "RelativeSrcInclude");
+       for (String f : ri) {
+          rv.add(sourceBase + Util.sep + f);
+       }
+
+       baseConfig.collectRelevantVectors(rv, "AbsoluteSrcInclude");
+
+       handleIncludes(rv, allConfigs);
+
+       endTag();
     }
 
-    /**
-     * Make "path" into a relative path using "base" as the base.
-     *
-     * path and base are assumed to be normalized with / as the file separator.
-     * returned path uses "\\" as file separator
-     */
-    private String rel(String path, String base)
-    {
-        if(!base.endsWith("/")) {
-                base += "/";
-        }
-        String[] pathTok = path.split("/");
-        String[] baseTok = base.split("/");
-        int pi = 0;
-        int bi = 0;
-        StringBuilder newPath = new StringBuilder();
-
-        // first step past all path components that are the same
-        while (pi < pathTok.length &&
-                bi < baseTok.length &&
-                pathTok[pi].equals(baseTok[bi])) {
-            pi++;
-            bi++;
-        }
-
-        // for each path component left in base, add "../"
-        while (bi < baseTok.length) {
-            bi++;
-                newPath.append("..\\");
-        }
-
-        // now add everything left in path
-        while (pi < pathTok.length) {
-                newPath.append(pathTok[pi]);
-                pi++;
-            if (pi != pathTok.length) {
-                newPath.append("\\");
-            }
-        }
-        return newPath.toString();
-    }
-
-    private void writeFile(String tool, Vector<BuildConfig> allConfigs, FileInfo fi, String base) {
-        if (fi.attr.configs == null && fi.attr.pchRoot == false && fi.attr.noPch == false) {
-            tag(tool, "Include", rel(fi.full, base));
-        }
-        else {
-            startTag(tool, "Include", rel(fi.full, base));
-            for (BuildConfig cfg : allConfigs) {
-                if (fi.attr.configs != null && !fi.attr.configs.contains(cfg.get("Name"))) {
-                    tagData(cfg, "ExcludedFromBuild", "true");
-                }
-                if (fi.attr.pchRoot) {
-                        tagData(cfg, "PrecompiledHeader", "Create");
-                }
-                if (fi.attr.noPch) {
-                        startTag(cfg, "PrecompiledHeader");
-                        endTag("PrecompiledHeader");
-                }
-            }
-            endTag(tool);
-        }
+    // Will visit file tree for each include
+    private void handleIncludes(Vector<String> includes, Vector<BuildConfig> allConfigs) {
+       for (String path : includes)  {
+          FileTreeCreatorVC10 ftc = new FileTreeCreatorVC10(FileSystems.getDefault().getPath(path) , allConfigs, this);
+          try {
+             ftc.writeFileTree();
+          } catch (IOException e) {
+             e.printStackTrace();
+          }
+       }
     }
 
     String buildCond(BuildConfig cfg) {
         return "'$(Configuration)|$(Platform)'=='"+cfg.get("Name")+"'";
     }
 
-
     void tagV(Vector<String> v) {
         Iterator<String> i = v.iterator();
         while(i.hasNext()) {
@@ -391,6 +285,7 @@ public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 {
 
         startTag(name, ss);
     }
+
 }
 
 class CompilerInterfaceVC10 extends CompilerInterface {
diff --git a/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC6.java b/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC6.java
deleted file mode 100644
index f29abc051e4..00000000000
--- a/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC6.java
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- *
- */
-
-import java.io.*;
-import java.util.*;
-
-public class WinGammaPlatformVC6 extends WinGammaPlatform {
-    public void writeProjectFile(String projectFileName, String projectName,
-                                 Vector allConfigs) throws IOException {
-        Vector allConfigNames = new Vector();
-
-        printWriter = new PrintWriter(new FileWriter(projectFileName));
-        String cfg = ((BuildConfig)allConfigs.get(0)).get("Name");
-
-        printWriter.println("# Microsoft Developer Studio Project File - Name=\"" + projectName + "\" - Package Owner=<4>");
-        printWriter.println("# Microsoft Developer Studio Generated Build File, Format Version 6.00");
-        printWriter.println("# ** DO NOT EDIT **");
-        printWriter.println("");
-        printWriter.println("# TARGTYPE \"Win32 (x86) Dynamic-Link Library\" 0x0102");
-        printWriter.println("CFG=" + cfg);
-        printWriter.println("");
-
-        printWriter.println("!MESSAGE This is not a valid makefile. To build this project using NMAKE,");
-        printWriter.println("!MESSAGE use the Export Makefile command and run");
-        printWriter.println("!MESSAGE ");
-        printWriter.println("!MESSAGE NMAKE /f \"" + projectName + ".mak\".");
-        printWriter.println("!MESSAGE ");
-        printWriter.println("!MESSAGE You can specify a configuration when running NMAKE");
-        printWriter.println("!MESSAGE by defining the macro CFG on the command line. For example:");
-        printWriter.println("!MESSAGE ");
-        printWriter.println("!MESSAGE NMAKE /f \"" + projectName + ".mak\" CFG=\"" + cfg + "\"");
-        printWriter.println("!MESSAGE ");
-        printWriter.println("!MESSAGE Possible choices for configuration are:");
-        printWriter.println("!MESSAGE ");
-        for (Iterator i = allConfigs.iterator(); i.hasNext(); ) {
-            String name = ((BuildConfig)i.next()).get("Name");
-            printWriter.println("!MESSAGE \""+ name + "\" (based on \"Win32 (x86) Dynamic-Link Library\")");
-            allConfigNames.add(name);
-        }
-        printWriter.println("!MESSAGE ");
-        printWriter.println("");
-
-        printWriter.println("# Begin Project");
-        printWriter.println("# PROP AllowPerConfigDependencies 0");
-        printWriter.println("# PROP Scc_ProjName \"\"");
-        printWriter.println("# PROP Scc_LocalPath \"\"");
-        printWriter.println("CPP=cl.exe");
-        printWriter.println("MTL=midl.exe");
-        printWriter.println("RSC=rc.exe");
-
-
-        String keyword = "!IF";
-        for (Iterator i = allConfigs.iterator(); i.hasNext(); ) {
-            BuildConfig bcfg = (BuildConfig)i.next();
-            printWriter.println(keyword + "  \"$(CFG)\" == \"" + bcfg.get("Name") + "\"");
-            writeConfigHeader(bcfg);
-            keyword = "!ELSEIF";
-            if (!i.hasNext()) printWriter.println("!ENDIF");
-        }
-
-
-        TreeSet sortedFiles = sortFiles(computeAttributedFiles(allConfigs));
-
-        printWriter.println("# Begin Target");
-
-        for (Iterator i = allConfigs.iterator(); i.hasNext(); ) {
-            printWriter.println("# Name \"" + ((BuildConfig)i.next()).get("Name") + "\"");
-        }
-        printWriter.println("# Begin Group \"Header Files\"");
-        printWriter.println("# PROP Default_Filter \"h;hpp;hxx;hm;inl;fi;fd\"");
-
-        Iterator i = sortedFiles.iterator();
-
-        while (i.hasNext()) {
-            FileInfo fi = (FileInfo)i.next();
-
-            // skip sources
-            if (!fi.isHeader()) {
-                continue;
-            }
-
-            printFile(fi, allConfigNames);
-        }
-        printWriter.println("# End Group");
-        printWriter.println("");
-
-        printWriter.println("# Begin Group \"Source Files\"");
-        printWriter.println("# PROP Default_Filter \"cpp;c;cxx;rc;def;r;odl;hpj;bat;for;f90\"");
-
-        i = sortedFiles.iterator();
-        while (i.hasNext()) {
-            FileInfo fi = (FileInfo)i.next();
-
-            // skip headers
-            if (fi.isHeader()) {
-                continue;
-            }
-
-            printFile(fi, allConfigNames);
-        }
-        printWriter.println("# End Group");
-        printWriter.println("");
-
-
-        printWriter.println("# Begin Group \"Resource Files\"");
-        printWriter.println("# PROP Default_Filter \"ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe\"");
-        printWriter.println("# End Group");
-        printWriter.println("");
-        printWriter.println("# End Target");
-
-        printWriter.println("# End Project");
-
-        printWriter.close();
-    }
-
-
-    void printFile(FileInfo fi, Vector allConfigNames) {
-        printWriter.println("# Begin Source File");
-        printWriter.println("");
-        printWriter.println("SOURCE=\"" + fi.full + "\"");
-        FileAttribute attr = fi.attr;
-
-        if (attr.noPch) {
-            printWriter.println("# SUBTRACT CPP /YX /Yc /Yu");
-        }
-
-        if (attr.pchRoot) {
-            printWriter.println("# ADD CPP /Yc\"incls/_precompiled.incl\"");
-        }
-        if (attr.configs != null) {
-            String keyword = "!IF";
-            for (Iterator j=allConfigNames.iterator(); j.hasNext();) {
-                String cfg = (String)j.next();
-                if (!attr.configs.contains(cfg)) {
-                    printWriter.println(keyword+" \"$(CFG)\" == \"" + cfg +"\"");
-                    printWriter.println("# PROP BASE Exclude_From_Build 1");
-                    printWriter.println("# PROP Exclude_From_Build 1");
-                    keyword = "!ELSEIF";
-                }
-            }
-            printWriter.println("!ENDIF");
-        }
-
-        printWriter.println("# End Source File");
-    }
-
-    void writeConfigHeader(BuildConfig cfg) {
-        printWriter.println("# Begin Special Build Tool");
-        printWriter.println("SOURCE=\"$(InputPath)\"");
-        printWriter.println("PreLink_Desc=" +  BuildConfig.getFieldString(null, "PrelinkDescription"));
-        printWriter.println("PreLink_Cmds=" +
-                            cfg.expandFormat(BuildConfig.getFieldString(null, "PrelinkCommand")));
-        printWriter.println("# End Special Build Tool");
-        printWriter.println("");
-
-        for (Iterator i = cfg.getV("CompilerFlags").iterator(); i.hasNext(); ) {
-            printWriter.println("# "+(String)i.next());
-        }
-
-
-        printWriter.println("LINK32=link.exe");
-
-        for (Iterator i = cfg.getV("LinkerFlags").iterator(); i.hasNext(); ) {
-            printWriter.println("# "+(String)i.next());
-        }
-
-        printWriter.println("ADD BASE MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32");
-        printWriter.println("ADD MTL /nologo /D \"_DEBUG\" /mktyplib203 /win32");
-        printWriter.println("ADD BASE RSC /l 0x409 /d \"_DEBUG\"");
-        printWriter.println("ADD RSC /l 0x409 /d \"_DEBUG\"");
-        printWriter.println("BSC32=bscmake.exe");
-        printWriter.println("ADD BASE BSC32 /nologo");
-        printWriter.println("ADD BSC32 /nologo");
-        printWriter.println("");
-    }
-
-    protected String getProjectExt() {
-        return ".dsp";
-    }
-}
-
-
-class CompilerInterfaceVC6  extends CompilerInterface {
-    Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir) {
-        Vector rv = new Vector();
-
-        rv.add("PROP BASE Use_MFC 0");
-        rv.add("PROP Use_MFC 0");
-        rv.add("ADD CPP /nologo /MT /W3 /WX /GX /YX /Fr /FD /c");
-        rv.add("PROP BASE Output_Dir \""+outDir+"\"");
-        rv.add("PROP Output_Dir \""+outDir+"\"");
-        rv.add("PROP BASE Intermediate_Dir \""+outDir+"\"");
-        rv.add("PROP Intermediate_Dir \""+outDir+"\"");
-        rv.add("PROP BASE Target_Dir \"\"");
-        rv.add("PROP Target_Dir \"\"");
-        rv.add("ADD BASE CPP "+Util.prefixed_join(" /I ", includes, true));
-        rv.add("ADD CPP "+Util.prefixed_join(" /I ", includes, true));
-        rv.add("ADD BASE CPP "+Util.prefixed_join(" /D ", defines, true));
-        rv.add("ADD CPP "+Util.prefixed_join(" /D ", defines, true));
-        rv.add("ADD CPP /Yu\"incls/_precompiled.incl\"");
-
-        return rv;
-    }
-
-    Vector getBaseLinkerFlags(String outDir, String outDll, String platformName) {
-        Vector rv = new Vector();
-
-        rv.add("PROP Ignore_Export_Lib 0");
-        rv.add("ADD BASE CPP /MD");
-        rv.add("ADD CPP /MD");
-        rv.add("ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib " +
-               "           advapi32.lib shell32.lib ole32.lib oleaut32.lib winmm.lib");
-        String machine = "/machine:I386";
-        if (platformName.equals("x64")) {
-                machine = "/machine:X64";
-        }
-        rv.add("ADD LINK32      /out:\""+outDll+"\" "+
-               "                /nologo /subsystem:windows /machine:" + machine +
-               "                /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 ");
-        rv.add("SUBTRACT LINK32 /pdb:none /map");
-
-        return rv;
-    }
-
-    Vector getDebugCompilerFlags(String opt) {
-        Vector rv = new Vector();
-
-        rv.add("ADD BASE CPP /Gm /Zi /O"+opt);
-
-        return rv;
-    }
-
-    Vector getDebugLinkerFlags() {
-        Vector rv = new Vector();
-
-        rv.add("PROP BASE Use_Debug_Libraries 1");
-        rv.add("PROP Use_Debug_Libraries 1");
-        rv.add("ADD LINK32 /debug");
-
-        return rv;
-    }
-
-    void getAdditionalNonKernelLinkerFlags(Vector rv) {}
-
-    Vector getProductCompilerFlags() {
-        Vector rv = new Vector();
-
-        rv.add("ADD CPP /O"+getOptFlag());
-
-        return rv;
-    }
-
-    Vector getProductLinkerFlags() {
-        Vector rv = new Vector();
-
-        rv.add("PROP BASE Use_Debug_Libraries 0");
-        rv.add("PROP Use_Debug_Libraries 0");
-
-        return rv;
-    }
-
-    String getOptFlag() {
-        return "2";
-    }
-
-    String getNoOptFlag() {
-        return "d";
-    }
-
-    String makeCfgName(String flavourBuild, String platform) {
-        return "vm - "+ platform + " " + flavourBuild;
-    }
-}
diff --git a/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC7.java b/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC7.java
index d1d63c84734..09e961cbfa0 100644
--- a/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC7.java
+++ b/hotspot/src/share/tools/ProjectCreator/WinGammaPlatformVC7.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,758 +25,326 @@
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.PrintWriter;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.TreeSet;
+import java.nio.file.FileSystems;
 import java.util.Vector;
 
 public class WinGammaPlatformVC7 extends WinGammaPlatform {
 
-    String projectVersion() {return "7.10";};
-
-    public void writeProjectFile(String projectFileName, String projectName,
-                                 Vector<BuildConfig> allConfigs) throws IOException {
-        System.out.println();
-        System.out.println("    Writing .vcproj file: "+projectFileName);
-        // If we got this far without an error, we're safe to actually
-        // write the .vcproj file
-        printWriter = new PrintWriter(new FileWriter(projectFileName));
-
-        printWriter.println("<?xml version=\"1.0\" encoding=\"windows-1251\"?>");
-        startTag(
-            "VisualStudioProject",
-            new String[] {
-                "ProjectType", "Visual C++",
-                "Version", projectVersion(),
-                "Name", projectName,
-                "ProjectGUID", "{8822CB5C-1C41-41C2-8493-9F6E1994338B}",
-                "SccProjectName", "",
-                "SccLocalPath", ""
-            }
-            );
-        startTag("Platforms");
-        tag("Platform", new String[] {"Name", (String) BuildConfig.getField(null, "PlatformName")});
-        endTag("Platforms");
-
-        startTag("Configurations");
-
-        for (Iterator i = allConfigs.iterator(); i.hasNext(); ) {
-            writeConfiguration((BuildConfig)i.next());
-        }
-
-        endTag("Configurations");
-
-        tag("References");
-
-        writeFiles(allConfigs);
-
-        tag("Globals");
-
-        endTag("VisualStudioProject");
-        printWriter.close();
-
-        System.out.println("    Done.");
-    }
-
-
-    abstract class NameFilter {
-                protected String fname;
-
-        abstract boolean match(FileInfo fi);
-
-        String  filterString() { return ""; }
-        String name() { return this.fname;}
-
-        @Override
-        // eclipse auto-generated
-        public int hashCode() {
-            final int prime = 31;
-            int result = 1;
-            result = prime * result + getOuterType().hashCode();
-            result = prime * result + ((fname == null) ? 0 : fname.hashCode());
-            return result;
-        }
-
-        @Override
-        // eclipse auto-generated
-        public boolean equals(Object obj) {
-            if (this == obj)
-                return true;
-            if (obj == null)
-                return false;
-            if (getClass() != obj.getClass())
-                return false;
-            NameFilter other = (NameFilter) obj;
-            if (!getOuterType().equals(other.getOuterType()))
-                return false;
-            if (fname == null) {
-                if (other.fname != null)
-                    return false;
-            } else if (!fname.equals(other.fname))
-                return false;
-            return true;
-        }
-
-        // eclipse auto-generated
-        private WinGammaPlatformVC7 getOuterType() {
-            return WinGammaPlatformVC7.this;
-        }
-    }
-
-    class DirectoryFilter extends NameFilter {
-        String dir;
-        int baseLen, dirLen;
-
-        DirectoryFilter(String dir, String sbase) {
-            this.dir = dir;
-            this.baseLen = sbase.length();
-            this.dirLen = dir.length();
-            this.fname = dir;
-        }
-
-        DirectoryFilter(String fname, String dir, String sbase) {
-            this.dir = dir;
-            this.baseLen = sbase.length();
-            this.dirLen = dir.length();
-            this.fname = fname;
-        }
-
-
-        boolean match(FileInfo fi) {
-            int lastSlashIndex = fi.full.lastIndexOf('/');
-            String fullDir = fi.full.substring(0, lastSlashIndex);
-            return fullDir.endsWith(dir);
-        }
-
-        @Override
-        // eclipse auto-generated
-        public int hashCode() {
-            final int prime = 31;
-            int result = super.hashCode();
-            result = prime * result + getOuterType().hashCode();
-            result = prime * result + baseLen;
-            result = prime * result + ((dir == null) ? 0 : dir.hashCode());
-            result = prime * result + dirLen;
-            return result;
-        }
-
-        @Override
-        // eclipse auto-generated
-        public boolean equals(Object obj) {
-            if (this == obj)
-                return true;
-            if (!super.equals(obj))
-                return false;
-            if (getClass() != obj.getClass())
-                return false;
-            DirectoryFilter other = (DirectoryFilter) obj;
-            if (!getOuterType().equals(other.getOuterType()))
-                return false;
-            if (baseLen != other.baseLen)
-                return false;
-            if (dir == null) {
-                if (other.dir != null)
-                    return false;
-            } else if (!dir.equals(other.dir))
-                return false;
-            if (dirLen != other.dirLen)
-                return false;
-            return true;
-        }
-
-        // eclipse auto-generated
-        private WinGammaPlatformVC7 getOuterType() {
-            return WinGammaPlatformVC7.this;
-        }
-    }
-
-    class TerminatorFilter extends NameFilter {
-        TerminatorFilter(String fname) {
-            this.fname = fname;
-
-        }
-        boolean match(FileInfo fi) {
-            return true;
-        }
-
-    }
-
-    class SpecificNameFilter extends NameFilter {
-        String pats[];
-
-        SpecificNameFilter(String fname, String[] pats) {
-            this.fname = fname;
-            this.pats = pats;
-        }
-
-        boolean match(FileInfo fi) {
-            for (int i=0; i<pats.length; i++) {
-                if (fi.attr.shortName.matches(pats[i])) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-    }
-
-    class SpecificPathFilter extends NameFilter {
-        String pats[];
-
-        SpecificPathFilter(String fname, String[] pats) {
-            this.fname = fname;
-            this.pats = pats;
-        }
-
-        boolean match(FileInfo fi) {
-            for (int i=0; i<pats.length; i++) {
-                if (fi.full.matches(pats[i])) {
-                    return true;
-                }
-            }
-            return false;
-        }
-
-    }
-
-    class ContainerFilter extends NameFilter {
-        Vector children;
-
-        ContainerFilter(String fname) {
-            this.fname = fname;
-            children = new Vector();
-
-        }
-        boolean match(FileInfo fi) {
-            return false;
-        }
-
-        Iterator babies() { return children.iterator(); }
-
-        void add(NameFilter f) {
-            children.add(f);
-        }
-    }
-
-
-    void writeCustomToolConfig(Vector configs, String[] customToolAttrs) {
-        for (Iterator i = configs.iterator(); i.hasNext(); ) {
-            startTag("FileConfiguration",
-                     new String[] {
-                         "Name",  (String)i.next()
-                     }
-                     );
-            tag("Tool", customToolAttrs);
-
-            endTag("FileConfiguration");
-        }
-    }
-
-    // here we define filters, which define layout of what can be seen in 'Solution View' of MSVC
-    // Basically there are two types of entities - container filters and real filters
-    //   - container filter just provides a container to group together real filters
-    //   - real filter can select elements from the set according to some rule, put it into XML
-    //     and remove from the list
-    Vector<NameFilter> makeFilters(TreeSet<FileInfo> files) {
-        Vector<NameFilter> rv = new Vector<NameFilter>();
-        String sbase = Util.normalize(BuildConfig.getFieldString(null, "SourceBase")+"/src/");
-
-        String currentDir = "";
-        DirectoryFilter container = null;
-        for(FileInfo fileInfo : files) {
-
-            if (!fileInfo.full.startsWith(sbase)) {
-                continue;
-            }
-
-            int lastSlash = fileInfo.full.lastIndexOf('/');
-            String dir = fileInfo.full.substring(sbase.length(), lastSlash);
-            if(dir.equals("share/vm")) {
-                // skip files directly in share/vm - should only be precompiled.hpp which is handled below
-                continue;
-            }
-            if (!dir.equals(currentDir)) {
-                currentDir = dir;
-                if (container != null && !rv.contains(container)) {
-                    rv.add(container);
-                }
-
-                // remove "share/vm/" from names
-                String name = dir;
-                if (dir.startsWith("share/vm/")) {
-                    name = dir.substring("share/vm/".length(), dir.length());
-                }
-                DirectoryFilter newfilter = new DirectoryFilter(name, dir, sbase);
-                int i = rv.indexOf(newfilter);
-                if(i == -1) {
-                    container = newfilter;
-                } else {
-                    // if the filter already exists, reuse it
-                    container = (DirectoryFilter) rv.get(i);
-                }
-            }
-        }
-        if (container != null && !rv.contains(container)) {
-            rv.add(container);
-        }
-
-        ContainerFilter generated = new ContainerFilter("Generated");
-        ContainerFilter c1Generated = new ContainerFilter("C1");
-        c1Generated.add(new SpecificPathFilter("C++ Interpreter Generated", new String[] {".*compiler1/generated/jvmtifiles/bytecodeInterpreterWithChecks.+"}));
-        c1Generated.add(new SpecificPathFilter("jvmtifiles", new String[] {".*compiler1/generated/jvmtifiles/.*"}));
-        generated.add(c1Generated);
-        ContainerFilter c2Generated = new ContainerFilter("C2");
-        c2Generated.add(new SpecificPathFilter("C++ Interpreter Generated", new String[] {".*compiler2/generated/jvmtifiles/bytecodeInterpreterWithChecks.+"}));
-        c2Generated.add(new SpecificPathFilter("adfiles", new String[] {".*compiler2/generated/adfiles/.*"}));
-        c2Generated.add(new SpecificPathFilter("jvmtifiles", new String[] {".*compiler2/generated/jvmtifiles/.*"}));
-        generated.add(c2Generated);
-        ContainerFilter coreGenerated = new ContainerFilter("Core");
-        coreGenerated.add(new SpecificPathFilter("C++ Interpreter Generated", new String[] {".*core/generated/jvmtifiles/bytecodeInterpreterWithChecks.+"}));
-        coreGenerated.add(new SpecificPathFilter("jvmtifiles", new String[] {".*core/generated/jvmtifiles/.*"}));
-        generated.add(coreGenerated);
-        ContainerFilter tieredGenerated = new ContainerFilter("Tiered");
-        tieredGenerated.add(new SpecificPathFilter("C++ Interpreter Generated", new String[] {".*tiered/generated/jvmtifiles/bytecodeInterpreterWithChecks.+"}));
-        tieredGenerated.add(new SpecificPathFilter("adfiles", new String[] {".*tiered/generated/adfiles/.*"}));
-        tieredGenerated.add(new SpecificPathFilter("jvmtifiles", new String[] {".*tiered/generated/jvmtifiles/.*"}));
-        generated.add(tieredGenerated);
-        ContainerFilter kernelGenerated = new ContainerFilter("Kernel");
-        kernelGenerated.add(new SpecificPathFilter("C++ Interpreter Generated", new String[] {".*kernel/generated/jvmtifiles/bytecodeInterpreterWithChecks.+"}));
-        kernelGenerated.add(new SpecificPathFilter("jvmtifiles", new String[] {".*kernel/generated/jvmtifiles/.*"}));
-        generated.add(kernelGenerated);
-        rv.add(generated);
-
-        rv.add(new SpecificNameFilter("Precompiled Header", new String[] {"precompiled.hpp"}));
-
-        // this one is to catch files not caught by other filters
-        rv.add(new TerminatorFilter("Source Files"));
-
-        return rv;
-    }
-
-    void writeFiles(Vector<BuildConfig> allConfigs) {
-
-        Hashtable allFiles = computeAttributedFiles(allConfigs);
-
-        Vector allConfigNames = new Vector();
-        for (Iterator i = allConfigs.iterator(); i.hasNext(); ) {
-            allConfigNames.add(((BuildConfig)i.next()).get("Name"));
-        }
-
-        TreeSet sortedFiles = sortFiles(allFiles);
-
-        startTag("Files");
-
-        for (Iterator i = makeFilters(sortedFiles).iterator(); i.hasNext(); ) {
-            doWriteFiles(sortedFiles, allConfigNames, (NameFilter)i.next());
-        }
-
-
-        startTag("Filter",
-                 new String[] {
-                     "Name", "Resource Files",
-                     "Filter", "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-                 }
-                 );
-        endTag("Filter");
-
-        endTag("Files");
-    }
-
-    void doWriteFiles(TreeSet allFiles, Vector allConfigNames, NameFilter filter) {
-        startTag("Filter",
-                 new String[] {
-                     "Name",   filter.name(),
-                     "Filter", filter.filterString()
-                 }
-                 );
-
-        if (filter instanceof ContainerFilter) {
-
-            Iterator i = ((ContainerFilter)filter).babies();
-            while (i.hasNext()) {
-                doWriteFiles(allFiles, allConfigNames, (NameFilter)i.next());
-            }
-
-        } else {
-
-            Iterator i = allFiles.iterator();
-            while (i.hasNext()) {
-                FileInfo fi = (FileInfo)i.next();
-
-                if (!filter.match(fi)) {
-                    continue;
-                }
-
-                startTag("File",
-                         new String[] {
-                             "RelativePath", fi.full.replace('/', '\\')
-                         }
-                         );
-
-                FileAttribute a = fi.attr;
-                if (a.pchRoot) {
-                    writeCustomToolConfig(allConfigNames,
-                                          new String[] {
-                                              "Name", "VCCLCompilerTool",
-                                              "UsePrecompiledHeader", "1"
-                                          });
-                }
-
-                if (a.noPch) {
-                    writeCustomToolConfig(allConfigNames,
-                                          new String[] {
-                                              "Name", "VCCLCompilerTool",
-                                              "UsePrecompiledHeader", "0"
-                                          });
-                }
-
-                if (a.configs != null) {
-                    for (Iterator j=allConfigNames.iterator(); j.hasNext();) {
-                        String cfg = (String)j.next();
-                        if (!a.configs.contains(cfg)) {
-                            startTag("FileConfiguration",
-                                     new String[] {
-                                         "Name", cfg,
-                                         "ExcludedFromBuild", "TRUE"
-                                     });
-                            endTag("FileConfiguration");
-
-                        }
-                    }
-                }
-
-                endTag("File");
-
-                // we not gonna look at this file anymore
-                i.remove();
-            }
-        }
-
-        endTag("Filter");
-    }
-
-
-    void writeConfiguration(BuildConfig cfg) {
-        startTag("Configuration",
-                 new String[] {
-                     "Name", cfg.get("Name"),
-                     "OutputDirectory",  cfg.get("OutputDir"),
-                     "IntermediateDirectory",  cfg.get("OutputDir"),
-                     "ConfigurationType", "2",
-                     "UseOfMFC", "0",
-                     "ATLMinimizesCRunTimeLibraryUsage", "FALSE"
-                 }
-                 );
-
-
-
-        tagV("Tool", cfg.getV("CompilerFlags"));
-
-        tag("Tool",
-            new String[] {
-                "Name", "VCCustomBuildTool"
-            }
-            );
-
-        tagV("Tool", cfg.getV("LinkerFlags"));
-
-        tag("Tool",
-            new String[] {
-               "Name", "VCPostBuildEventTool",
-                "Description", BuildConfig.getFieldString(null, "PostbuildDescription"),
-                //Caution: String.replace(String,String) is available from JDK5 onwards only
-                "CommandLine", cfg.expandFormat(BuildConfig.getFieldString(null, "PostbuildCommand").replace
-                   ("\t", "&#x0D;&#x0A;"))
-            }
-            );
-
-        tag("Tool",
-            new String[] {
-                "Name", "VCPreBuildEventTool"
-            }
-            );
-
-        tag("Tool",
-            new String[] {
-                "Name", "VCPreLinkEventTool",
-                "Description", BuildConfig.getFieldString(null, "PrelinkDescription"),
-                //Caution: String.replace(String,String) is available from JDK5 onwards only
-                "CommandLine", cfg.expandFormat(BuildConfig.getFieldString(null, "PrelinkCommand").replace
-                   ("\t", "&#x0D;&#x0A;"))
-            }
-            );
-
-        tag("Tool",
-            new String[] {
-                "Name", "VCResourceCompilerTool",
-                // XXX???
-                "PreprocessorDefinitions", "NDEBUG",
-                "Culture", "1033"
-            }
-            );
-
-        tag("Tool",
-            new String[] {
-                "Name", "VCMIDLTool",
-                "PreprocessorDefinitions", "NDEBUG",
-                "MkTypLibCompatible", "TRUE",
-                "SuppressStartupBanner", "TRUE",
-                "TargetEnvironment", "1",
-                "TypeLibraryName", cfg.get("OutputDir") + Util.sep + "vm.tlb",
-                "HeaderFileName", ""
-            }
-            );
-
-        endTag("Configuration");
-    }
-
-    int indent;
-
-    private void startTagPrim(String name,
-            String[] attrs,
-            boolean close) {
-        startTagPrim(name, attrs, close, true);
-    }
-
-    private void startTagPrim(String name,
-                              String[] attrs,
-                              boolean close,
-                              boolean newline) {
-        doIndent();
-        printWriter.print("<"+name);
-        indent++;
-
-        if (attrs != null && attrs.length > 0) {
-            for (int i=0; i<attrs.length; i+=2) {
-                printWriter.print(" " + attrs[i]+"=\""+attrs[i+1]+"\"");
-                if (i < attrs.length - 2) {
-                }
-            }
-        }
-
-        if (close) {
-            indent--;
-            printWriter.print(" />");
-        } else {
-                printWriter.print(">");
-        }
-        if(newline) {
-                printWriter.println();
-        }
-    }
-
-    void startTag(String name, String... attrs) {
-        startTagPrim(name, attrs, false);
-    }
-
-    void startTagV(String name, Vector attrs) {
-        String s[] = new String [attrs.size()];
-         for (int i=0; i<attrs.size(); i++) {
-             s[i] = (String)attrs.elementAt(i);
+   // TODO How about moving all globals configs to its own BuildConfig?
+
+   String projectVersion() {
+      return "7.10";
+   };
+
+   public void writeProjectFile(String projectFileName, String projectName,
+         Vector<BuildConfig> allConfigs) throws IOException {
+      System.out.println();
+      System.out.println("    Writing .vcproj file: " + projectFileName);
+      // If we got this far without an error, we're safe to actually
+      // write the .vcproj file
+      printWriter = new PrintWriter(new FileWriter(projectFileName));
+
+      printWriter
+      .println("<?xml version=\"1.0\" encoding=\"windows-1251\"?>");
+      startTag("VisualStudioProject", new String[] { "ProjectType",
+            "Visual C++", "Version", projectVersion(), "Name", projectName,
+            "ProjectGUID", "{8822CB5C-1C41-41C2-8493-9F6E1994338B}",
+            "SccProjectName", "", "SccLocalPath", "" });
+      startTag("Platforms");
+      tag("Platform",
+            new String[] { "Name",
+            (String) BuildConfig.getField(null, "PlatformName") });
+      endTag();
+
+      startTag("Configurations");
+
+      for (BuildConfig cfg : allConfigs) {
+         writeConfiguration(cfg);
+      }
+
+      endTag();
+
+      tag("References");
+
+      writeFiles(allConfigs);
+
+      tag("Globals");
+
+      endTag();
+      printWriter.close();
+
+      System.out.println("    Done.");
+   }
+
+   void writeCustomToolConfig(Vector<BuildConfig> configs, String[] customToolAttrs) {
+      for (BuildConfig cfg : configs) {
+         startTag("FileConfiguration",
+               new String[] { "Name", (String) cfg.get("Name") });
+         tag("Tool", customToolAttrs);
+
+         endTag();
+      }
+   }
+
+   void writeFiles(Vector<BuildConfig> allConfigs) {
+
+      // This code assummes there are no config specific includes.
+      startTag("Files");
+      String sourceBase = BuildConfig.getFieldString(null, "SourceBase");
+
+      // Use first config for all global absolute includes.
+      BuildConfig baseConfig = allConfigs.firstElement();
+      Vector<String> rv = new Vector<String>();
+
+      // Then use first config for all relative includes
+      Vector<String> ri = new Vector<String>();
+      baseConfig.collectRelevantVectors(ri, "RelativeSrcInclude");
+      for (String f : ri) {
+         rv.add(sourceBase + Util.sep + f);
+      }
+
+      baseConfig.collectRelevantVectors(rv, "AbsoluteSrcInclude");
+
+      handleIncludes(rv, allConfigs);
+
+      startTag("Filter", new String[] { "Name", "Resource Files", "Filter",
+      "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe" });
+      endTag();
+
+      endTag();
+   }
+
+   // Will visit file tree for each include
+   private void handleIncludes(Vector<String> includes, Vector<BuildConfig> allConfigs) {
+      for (String path : includes)  {
+         FileTreeCreatorVC7 ftc = new FileTreeCreatorVC7(FileSystems.getDefault().getPath(path) , allConfigs, this);
+         try {
+            ftc.writeFileTree();
+         } catch (IOException e) {
+            e.printStackTrace();
          }
-        startTagPrim(name, s, false);
-    }
+      }
+   }
 
-    void endTag(String name) {
-        indent--;
-        doIndent();
-        printWriter.println("</"+name+">");
-    }
+   void writeConfiguration(BuildConfig cfg) {
+      startTag("Configuration", new String[] { "Name", cfg.get("Name"),
+            "OutputDirectory", cfg.get("OutputDir"),
+            "IntermediateDirectory", cfg.get("OutputDir"),
+            "ConfigurationType", "2", "UseOfMFC", "0",
+            "ATLMinimizesCRunTimeLibraryUsage", "FALSE" });
 
-    void tag(String name, String... attrs) {
-        startTagPrim(name, attrs, true);
-    }
+      tagV("Tool", cfg.getV("CompilerFlags"));
 
-    void tagData(String name, String data) {
-        doIndent();
-        printWriter.print("<"+name+">");
-        printWriter.print(data);
-        printWriter.println("</"+name+">");
-    }
+      tag("Tool", new String[] { "Name", "VCCustomBuildTool" });
 
-    void tagData(String name, String data, String... attrs) {
-        startTagPrim(name, attrs, false, false);
-        printWriter.print(data);
-        printWriter.println("</"+name+">");
-        indent--;
-    }
+      tagV("Tool", cfg.getV("LinkerFlags"));
 
-    void tagV(String name, Vector attrs) {
-         String s[] = new String [attrs.size()];
-         for (int i=0; i<attrs.size(); i++) {
-             s[i] = (String)attrs.elementAt(i);
-         }
-         startTagPrim(name, s, true);
-    }
+      tag("Tool",
+            new String[] {
+            "Name",
+            "VCPostBuildEventTool",
+            "Description",
+            BuildConfig
+            .getFieldString(null, "PostbuildDescription"),
+            // Caution: String.replace(String,String) is available
+            // from JDK5 onwards only
+            "CommandLine",
+            cfg.expandFormat(BuildConfig.getFieldString(null,
+                  "PostbuildCommand").replace("\t",
+                        "&#x0D;&#x0A;")) });
+
+      tag("Tool", new String[] { "Name", "VCPreBuildEventTool" });
+
+      tag("Tool",
+            new String[] {
+            "Name",
+            "VCPreLinkEventTool",
+            "Description",
+            BuildConfig.getFieldString(null, "PrelinkDescription"),
+            // Caution: String.replace(String,String) is available
+            // from JDK5 onwards only
+            "CommandLine",
+            cfg.expandFormat(BuildConfig.getFieldString(null,
+                  "PrelinkCommand").replace("\t", "&#x0D;&#x0A;")) });
+
+      tag("Tool", new String[] { "Name", "VCResourceCompilerTool",
+            "PreprocessorDefinitions", "NDEBUG", "Culture", "1033" });
+
+      tag("Tool", new String[] { "Name", "VCMIDLTool",
+            "PreprocessorDefinitions", "NDEBUG", "MkTypLibCompatible",
+            "TRUE", "SuppressStartupBanner", "TRUE", "TargetEnvironment",
+            "1", "TypeLibraryName",
+            cfg.get("OutputDir") + Util.sep + "vm.tlb", "HeaderFileName",
+      "" });
+
+      endTag();
+   }
 
 
-    void doIndent() {
-        for (int i=0; i<indent; i++) {
-            printWriter.print("  ");
-        }
-    }
 
-    protected String getProjectExt() {
-        return ".vcproj";
-    }
+   protected String getProjectExt() {
+      return ".vcproj";
+   }
 }
 
 class CompilerInterfaceVC7 extends CompilerInterface {
-    void getBaseCompilerFlags_common(Vector defines, Vector includes, String outDir,Vector rv) {
+   void getBaseCompilerFlags_common(Vector defines, Vector includes,
+         String outDir, Vector rv) {
 
-        // advanced M$ IDE (2003) can only recognize name if it's first or
-        // second attribute in the tag - go guess
-        addAttr(rv, "Name", "VCCLCompilerTool");
-        addAttr(rv, "AdditionalIncludeDirectories", Util.join(",", includes));
-        addAttr(rv, "PreprocessorDefinitions",
-                                Util.join(";", defines).replace("\"","&quot;"));
-        addAttr(rv, "PrecompiledHeaderThrough", "precompiled.hpp");
-        addAttr(rv, "PrecompiledHeaderFile", outDir+Util.sep+"vm.pch");
-        addAttr(rv, "AssemblerListingLocation", outDir);
-        addAttr(rv, "ObjectFile", outDir+Util.sep);
-        addAttr(rv, "ProgramDataBaseFileName", outDir+Util.sep+"jvm.pdb");
-        // Set /nologo optin
-        addAttr(rv, "SuppressStartupBanner", "TRUE");
-        // Surpass the default /Tc or /Tp. 0 is compileAsDefault
-        addAttr(rv, "CompileAs", "0");
-        // Set /W3 option. 3 is warningLevel_3
-        addAttr(rv, "WarningLevel", "3");
-        // Set /WX option,
-        addAttr(rv, "WarnAsError", "TRUE");
-        // Set /GS option
-        addAttr(rv, "BufferSecurityCheck", "FALSE");
-        // Set /Zi option. 3 is debugEnabled
-        addAttr(rv, "DebugInformationFormat", "3");
-    }
-    Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir) {
-        Vector rv = new Vector();
+      // advanced M$ IDE (2003) can only recognize name if it's first or
+      // second attribute in the tag - go guess
+      addAttr(rv, "Name", "VCCLCompilerTool");
+      addAttr(rv, "AdditionalIncludeDirectories", Util.join(",", includes));
+      addAttr(rv, "PreprocessorDefinitions",
+            Util.join(";", defines).replace("\"", "&quot;"));
+      addAttr(rv, "PrecompiledHeaderThrough", "precompiled.hpp");
+      addAttr(rv, "PrecompiledHeaderFile", outDir + Util.sep + "vm.pch");
+      addAttr(rv, "AssemblerListingLocation", outDir);
+      addAttr(rv, "ObjectFile", outDir + Util.sep);
+      addAttr(rv, "ProgramDataBaseFileName", outDir + Util.sep + "jvm.pdb");
+      // Set /nologo optin
+      addAttr(rv, "SuppressStartupBanner", "TRUE");
+      // Surpass the default /Tc or /Tp. 0 is compileAsDefault
+      addAttr(rv, "CompileAs", "0");
+      // Set /W3 option. 3 is warningLevel_3
+      addAttr(rv, "WarningLevel", "3");
+      // Set /WX option,
+      addAttr(rv, "WarnAsError", "TRUE");
+      // Set /GS option
+      addAttr(rv, "BufferSecurityCheck", "FALSE");
+      // Set /Zi option. 3 is debugEnabled
+      addAttr(rv, "DebugInformationFormat", "3");
+   }
 
-        getBaseCompilerFlags_common(defines,includes, outDir, rv);
-        // Set /Yu option. 3 is pchUseUsingSpecific
-        // Note: Starting VC8 pchUseUsingSpecific is 2 !!!
-        addAttr(rv, "UsePrecompiledHeader", "3");
-        // Set /EHsc- option
-        addAttr(rv, "ExceptionHandling", "FALSE");
+   Vector getBaseCompilerFlags(Vector defines, Vector includes, String outDir) {
+      Vector rv = new Vector();
 
-        return rv;
-    }
+      getBaseCompilerFlags_common(defines, includes, outDir, rv);
+      // Set /Yu option. 3 is pchUseUsingSpecific
+      // Note: Starting VC8 pchUseUsingSpecific is 2 !!!
+      addAttr(rv, "UsePrecompiledHeader", "3");
+      // Set /EHsc- option
+      addAttr(rv, "ExceptionHandling", "FALSE");
 
-    Vector getBaseLinkerFlags(String outDir, String outDll, String platformName) {
-        Vector rv = new Vector();
+      return rv;
+   }
 
-        addAttr(rv, "Name", "VCLinkerTool");
-        addAttr(rv, "AdditionalOptions",
-                "/export:JNI_GetDefaultJavaVMInitArgs " +
-                "/export:JNI_CreateJavaVM " +
-                "/export:JVM_FindClassFromBootLoader "+
-                "/export:JNI_GetCreatedJavaVMs "+
-                "/export:jio_snprintf /export:jio_printf "+
-                "/export:jio_fprintf /export:jio_vfprintf "+
-                "/export:jio_vsnprintf "+
-                "/export:JVM_GetVersionInfo "+
-                "/export:JVM_GetThreadStateNames "+
-                "/export:JVM_GetThreadStateValues "+
-                "/export:JVM_InitAgentProperties ");
-        addAttr(rv, "AdditionalDependencies", "Wsock32.lib winmm.lib");
-        addAttr(rv, "OutputFile", outDll);
-        // Set /INCREMENTAL option. 1 is linkIncrementalNo
-        addAttr(rv, "LinkIncremental", "1");
-        addAttr(rv, "SuppressStartupBanner", "TRUE");
-        addAttr(rv, "ModuleDefinitionFile", outDir+Util.sep+"vm.def");
-        addAttr(rv, "ProgramDatabaseFile", outDir+Util.sep+"jvm.pdb");
-        // Set /SUBSYSTEM option. 2 is subSystemWindows
-        addAttr(rv, "SubSystem", "2");
-        addAttr(rv, "BaseAddress", "0x8000000");
-        addAttr(rv, "ImportLibrary", outDir+Util.sep+"jvm.lib");
-        if(platformName.equals("Win32")) {
-            // Set /MACHINE option. 1 is X86
-            addAttr(rv, "TargetMachine", "1");
-        } else {
-            // Set /MACHINE option. 17 is X64
-            addAttr(rv, "TargetMachine", "17");
-        }
+   Vector getBaseLinkerFlags(String outDir, String outDll, String platformName) {
+      Vector rv = new Vector();
 
-        return rv;
-    }
+      addAttr(rv, "Name", "VCLinkerTool");
+      addAttr(rv, "AdditionalOptions",
+            "/export:JNI_GetDefaultJavaVMInitArgs "
+                  + "/export:JNI_CreateJavaVM "
+                  + "/export:JVM_FindClassFromBootLoader "
+                  + "/export:JNI_GetCreatedJavaVMs "
+                  + "/export:jio_snprintf /export:jio_printf "
+                  + "/export:jio_fprintf /export:jio_vfprintf "
+                  + "/export:jio_vsnprintf "
+                  + "/export:JVM_GetVersionInfo "
+                  + "/export:JVM_GetThreadStateNames "
+                  + "/export:JVM_GetThreadStateValues "
+                  + "/export:JVM_InitAgentProperties ");
+      addAttr(rv, "AdditionalDependencies", "Wsock32.lib winmm.lib");
+      addAttr(rv, "OutputFile", outDll);
+      // Set /INCREMENTAL option. 1 is linkIncrementalNo
+      addAttr(rv, "LinkIncremental", "1");
+      addAttr(rv, "SuppressStartupBanner", "TRUE");
+      addAttr(rv, "ModuleDefinitionFile", outDir + Util.sep + "vm.def");
+      addAttr(rv, "ProgramDatabaseFile", outDir + Util.sep + "jvm.pdb");
+      // Set /SUBSYSTEM option. 2 is subSystemWindows
+      addAttr(rv, "SubSystem", "2");
+      addAttr(rv, "BaseAddress", "0x8000000");
+      addAttr(rv, "ImportLibrary", outDir + Util.sep + "jvm.lib");
+      if (platformName.equals("Win32")) {
+         // Set /MACHINE option. 1 is X86
+         addAttr(rv, "TargetMachine", "1");
+      } else {
+         // Set /MACHINE option. 17 is X64
+         addAttr(rv, "TargetMachine", "17");
+      }
 
-    void  getDebugCompilerFlags_common(String opt,Vector rv) {
+      return rv;
+   }
 
-        // Set /On option
-        addAttr(rv, "Optimization", opt);
-        // Set /FR option. 1 is brAllInfo
-        addAttr(rv, "BrowseInformation", "1");
-        addAttr(rv, "BrowseInformationFile", "$(IntDir)" + Util.sep);
-        // Set /MD option. 2 is rtMultiThreadedDLL
-        addAttr(rv, "RuntimeLibrary", "2");
-        // Set /Oy- option
-        addAttr(rv, "OmitFramePointers", "FALSE");
+   void getDebugCompilerFlags_common(String opt, Vector rv) {
 
-    }
+      // Set /On option
+      addAttr(rv, "Optimization", opt);
+      // Set /FR option. 1 is brAllInfo
+      addAttr(rv, "BrowseInformation", "1");
+      addAttr(rv, "BrowseInformationFile", "$(IntDir)" + Util.sep);
+      // Set /MD option. 2 is rtMultiThreadedDLL
+      addAttr(rv, "RuntimeLibrary", "2");
+      // Set /Oy- option
+      addAttr(rv, "OmitFramePointers", "FALSE");
 
-    Vector getDebugCompilerFlags(String opt) {
-        Vector rv = new Vector();
+   }
 
-        getDebugCompilerFlags_common(opt,rv);
+   Vector getDebugCompilerFlags(String opt) {
+      Vector rv = new Vector();
 
-        return rv;
-    }
+      getDebugCompilerFlags_common(opt, rv);
 
-    Vector getDebugLinkerFlags() {
-        Vector rv = new Vector();
+      return rv;
+   }
 
-        addAttr(rv, "GenerateDebugInformation", "TRUE"); // == /DEBUG option
+   Vector getDebugLinkerFlags() {
+      Vector rv = new Vector();
 
-        return rv;
-    }
+      addAttr(rv, "GenerateDebugInformation", "TRUE"); // == /DEBUG option
 
-    void getAdditionalNonKernelLinkerFlags(Vector rv) {
-        extAttr(rv, "AdditionalOptions",
-                "/export:AsyncGetCallTrace ");
-    }
+      return rv;
+   }
 
-    void getProductCompilerFlags_common(Vector rv) {
-        // Set /O2 option. 2 is optimizeMaxSpeed
-        addAttr(rv, "Optimization", "2");
-        // Set /Oy- option
-        addAttr(rv, "OmitFramePointers", "FALSE");
-        // Set /Ob option.  1 is expandOnlyInline
-        addAttr(rv, "InlineFunctionExpansion", "1");
-        // Set /GF option.
-        addAttr(rv, "StringPooling", "TRUE");
-        // Set /MD option. 2 is rtMultiThreadedDLL
-        addAttr(rv, "RuntimeLibrary", "2");
-        // Set /Gy option
-        addAttr(rv, "EnableFunctionLevelLinking", "TRUE");
-    }
+   void getAdditionalNonKernelLinkerFlags(Vector rv) {
+      extAttr(rv, "AdditionalOptions", "/export:AsyncGetCallTrace ");
+   }
 
-    Vector getProductCompilerFlags() {
-        Vector rv = new Vector();
+   void getProductCompilerFlags_common(Vector rv) {
+      // Set /O2 option. 2 is optimizeMaxSpeed
+      addAttr(rv, "Optimization", "2");
+      // Set /Oy- option
+      addAttr(rv, "OmitFramePointers", "FALSE");
+      // Set /Ob option. 1 is expandOnlyInline
+      addAttr(rv, "InlineFunctionExpansion", "1");
+      // Set /GF option.
+      addAttr(rv, "StringPooling", "TRUE");
+      // Set /MD option. 2 is rtMultiThreadedDLL
+      addAttr(rv, "RuntimeLibrary", "2");
+      // Set /Gy option
+      addAttr(rv, "EnableFunctionLevelLinking", "TRUE");
+   }
 
-        getProductCompilerFlags_common(rv);
+   Vector getProductCompilerFlags() {
+      Vector rv = new Vector();
 
-        return rv;
-    }
+      getProductCompilerFlags_common(rv);
 
-    Vector getProductLinkerFlags() {
-        Vector rv = new Vector();
+      return rv;
+   }
 
-        // Set /OPT:REF option. 2 is optReferences
-        addAttr(rv, "OptimizeReferences", "2");
-        // Set /OPT:optFolding option. 2 is optFolding
-        addAttr(rv, "EnableCOMDATFolding", "2");
+   Vector getProductLinkerFlags() {
+      Vector rv = new Vector();
 
-        return rv;
-    }
+      // Set /OPT:REF option. 2 is optReferences
+      addAttr(rv, "OptimizeReferences", "2");
+      // Set /OPT:optFolding option. 2 is optFolding
+      addAttr(rv, "EnableCOMDATFolding", "2");
 
-    String getOptFlag() {
-        return "2";
-    }
+      return rv;
+   }
 
-    String getNoOptFlag() {
-        return "0";
-    }
+   String getOptFlag() {
+      return "2";
+   }
+
+   String getNoOptFlag() {
+      return "0";
+   }
+
+   String makeCfgName(String flavourBuild, String platform) {
+      return flavourBuild + "|" + platform;
+   }
 
-    String makeCfgName(String flavourBuild, String platform) {
-        return  flavourBuild + "|" + platform;
-    }
 }
diff --git a/hotspot/src/share/tools/hsdis/Makefile b/hotspot/src/share/tools/hsdis/Makefile
index 19f9cdb586f..3cfdf57e6bd 100644
--- a/hotspot/src/share/tools/hsdis/Makefile
+++ b/hotspot/src/share/tools/hsdis/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -66,14 +66,18 @@ ARCH=i386
 endif
 CC 		= $(MINGW)-gcc
 CONFIGURE_ARGS= --host=$(MINGW) --target=$(MINGW)
-else
+else   #linux 
 CPU             = $(shell uname -m)
 ARCH1=$(CPU:x86_64=amd64)
 ARCH=$(ARCH1:i686=i386)
-CFLAGS/i386	+= -m32
-CFLAGS/sparc	+= -m32
+ifdef LP64
 CFLAGS/sparcv9	+= -m64
 CFLAGS/amd64	+= -m64
+else
+ARCH=$(ARCH1:amd64=i386)
+CFLAGS/i386	+= -m32
+CFLAGS/sparc	+= -m32
+endif
 CFLAGS		+= $(CFLAGS/$(ARCH))
 CFLAGS		+= -fPIC
 OS		= linux
@@ -85,16 +89,41 @@ DLDFLAGS	+= -shared
 LDFLAGS         += -ldl
 OUTFLAGS	+= -o $@
 ## OS = Windows ##
-else   # !SunOS, !Linux => Windows
+else   # !SunOS, !Linux => Darwin or Windows
+ifeq ($(OS),Darwin)
+CPU             = $(shell uname -m)
+ARCH1=$(CPU:x86_64=amd64)
+ARCH=$(ARCH1:i686=i386)
+ifdef LP64
+CFLAGS/sparcv9  += -m64
+CFLAGS/amd64    += -m64
+else
+ARCH=$(ARCH1:amd64=i386)
+CFLAGS/i386     += -m32
+CFLAGS/sparc    += -m32
+endif # LP64
+CFLAGS          += $(CFLAGS/$(ARCH))
+CFLAGS          += -fPIC
+OS              = macosx
+LIB_EXT         = .dylib
+CC              = gcc
+CFLAGS          += -O
+# CFLAGS        += -DZ_PREFIX
+DLDFLAGS        += -shared
+DLDFLAGS        += -lz
+LDFLAGS         += -ldl
+OUTFLAGS        += -o $@
+else #Windows
 OS		= windows
 CC		= gcc
 #CPPFLAGS	+= /D"WIN32" /D"_WINDOWS" /D"DEBUG" /D"NDEBUG"
 CFLAGS		+=  /nologo /MD /W3 /WX /O2 /Fo$(@:.dll=.obj) /Gi-
-CFLAGS		+= LIBARCH=\"$(LIBARCH)\""
+CFLAGS		+= LIBARCH=\"$(LIBARCH)\"
 DLDFLAGS	+= /dll /subsystem:windows /incremental:no \
 			/export:decode_instruction
 OUTFLAGS	+= /link /out:$@
 LIB_EXT		= .dll
+endif   # Darwin
 endif	# Linux
 endif	# SunOS
 
@@ -118,7 +147,7 @@ else
 BINUTILSDIR	= $(shell cd $(BINUTILS);pwd)
 endif
 
-CPPFLAGS	+= -I$(BINUTILSDIR)/include -I$(BINUTILS)/bfd -I$(TARGET_DIR)/bfd
+CPPFLAGS	+= -I$(BINUTILSDIR)/include -I$(BINUTILSDIR)/bfd -I$(TARGET_DIR)/bfd
 CPPFLAGS	+= -DLIBARCH_$(LIBARCH) -DLIBARCH=\"$(LIBARCH)\" -DLIB_EXT=\"$(LIB_EXT)\"
 
 TARGET_DIR	= build/$(OS)-$(JDKARCH)
diff --git a/hotspot/src/share/tools/hsdis/README b/hotspot/src/share/tools/hsdis/README
index f3080cbfcc9..51caa4051e9 100644
--- a/hotspot/src/share/tools/hsdis/README
+++ b/hotspot/src/share/tools/hsdis/README
@@ -1,4 +1,4 @@
-Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   
 This code is free software; you can redistribute it and/or modify it
@@ -38,8 +38,14 @@ copy of the software from http://directory.fsf.org/project/binutils or
 one of it's mirrors.  Builds targetting windows should use at least
 2.19 and currently requires the use of a cross compiler.
 
+Binutils should be configured with the '--disable-nls' flag to disable
+Native Language Support, otherwise you might get an "undefined
+reference to `libintl_gettext'" if you try to load hsdis.so on systems
+which don't have NLS by default.  It also avoids build problems on
+other configurations that don't include the full NLS support.
+
 The makefile looks for the sources in build/binutils or you can
-specify it's location to the makefile using BINTUILS=path.  It will
+specify it's location to the makefile using BINUTILS=path.  It will
 configure binutils and build it first and then build and link the
 disasembly adapter.  Make all will build the default target for your
 platform.  If you platform support both 32 and 64 simultaneously then
diff --git a/hotspot/src/share/tools/hsdis/hsdis-demo.c b/hotspot/src/share/tools/hsdis/hsdis-demo.c
index e83a0425c50..2f7b67d3649 100644
--- a/hotspot/src/share/tools/hsdis/hsdis-demo.c
+++ b/hotspot/src/share/tools/hsdis/hsdis-demo.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -26,14 +26,16 @@
    This demonstrates the protocol required by the HotSpot PrintAssembly option.
 */
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <inttypes.h>
+
 #include "hsdis.h"
 
-#include "stdio.h"
-#include "stdlib.h"
-#include "string.h"
 
 void greet(const char*);
-void disassemble(void*, void*);
+void disassemble(uintptr_t, uintptr_t);
 void end_of_file();
 
 const char* options = NULL;
@@ -62,7 +64,14 @@ int main(int ac, char** av) {
   if (!greeted)
     greet("world");
   printf("...And now for something completely different:\n");
-  disassemble((void*) &main, (void*) &end_of_file);
+  void *start = (void*) &main;
+  void *end = (void*) &end_of_file;
+#if defined(__ia64) || defined(__powerpc__)
+  /* On IA64 and PPC function pointers are pointers to function descriptors */
+  start = *((void**)start);
+  end = *((void**)end);
+#endif
+  disassemble(start, (end > start) ? end : start + 64);
   printf("Cheers!\n");
 }
 
@@ -76,7 +85,7 @@ void end_of_file() { }
 
 #include "dlfcn.h"
 
-#define DECODE_INSTRUCTIONS_NAME "decode_instructions"
+#define DECODE_INSTRUCTIONS_NAME "decode_instructions_virtual"
 #define HSDIS_NAME               "hsdis"
 static void* decode_instructions_pv = 0;
 static const char* hsdis_path[] = {
@@ -108,8 +117,14 @@ static const char* load_decode_instructions() {
 
 
 static const char* lookup(void* addr) {
+#if defined(__ia64) || defined(__powerpc__)
+  /* On IA64 and PPC function pointers are pointers to function descriptors */
+#define CHECK_NAME(fn) \
+  if (addr == *((void**) &fn))  return #fn;
+#else
 #define CHECK_NAME(fn) \
   if (addr == (void*) &fn)  return #fn;
+#endif
 
   CHECK_NAME(main);
   CHECK_NAME(greet);
@@ -123,6 +138,14 @@ static const char* lookup(void* addr) {
 
 
 static const char event_cookie[] = "event_cookie"; /* demo placeholder */
+static void* simple_handle_event(void* cookie, const char* event, void* arg) {
+  if (MATCH(event, "/insn")) {
+    // follow each complete insn by a nice newline
+    printf("\n");
+  }
+  return NULL;
+}
+
 static void* handle_event(void* cookie, const char* event, void* arg) {
 #define NS_DEMO "demo:"
   if (cookie != event_cookie)
@@ -162,10 +185,8 @@ static void* handle_event(void* cookie, const char* event, void* arg) {
     printf(" %p\t", arg);
 
   } else if (MATCH(event, "/insn")) {
-    /* basic action for </insn>:
-       (none, plugin puts the newline for us
-    */
-
+    // follow each complete insn by a nice newline
+    printf("\n");
   } else if (MATCH(event, "mach")) {
     printf("Decoding for CPU '%s'\n", (char*) arg);
 
@@ -186,7 +207,7 @@ static void* handle_event(void* cookie, const char* event, void* arg) {
 #define fprintf_callback \
   (decode_instructions_printf_callback_ftype)&fprintf
 
-void disassemble(void* from, void* to) {
+void disassemble(uintptr_t from, uintptr_t to) {
   const char* err = load_decode_instructions();
   if (err != NULL) {
     printf("%s: %s\n", err, dlerror());
@@ -197,15 +218,15 @@ void disassemble(void* from, void* to) {
     = (decode_instructions_ftype) decode_instructions_pv;
   void* res;
   if (raw && xml) {
-    res = (*decode_instructions)(from, to, NULL, stdout, NULL, stdout, options);
+    res = (*decode_instructions)(from, to, (unsigned char*)from, to - from, simple_handle_event, stdout, NULL, stdout, options);
   } else if (raw) {
-    res = (*decode_instructions)(from, to, NULL, NULL, NULL, stdout, options);
+    res = (*decode_instructions)(from, to, (unsigned char*)from, to - from, simple_handle_event, stdout, NULL, stdout, options);
   } else {
-    res = (*decode_instructions)(from, to,
+    res = (*decode_instructions)(from, to, (unsigned char*)from, to - from,
                                  handle_event, (void*) event_cookie,
                                  fprintf_callback, stdout,
                                  options);
   }
-  if (res != to)
+  if (res != (void*)to)
     printf("*** Result was %p!\n", res);
 }
diff --git a/hotspot/src/share/tools/hsdis/hsdis.c b/hotspot/src/share/tools/hsdis/hsdis.c
index 8034ac15af5..251344e0ce8 100644
--- a/hotspot/src/share/tools/hsdis/hsdis.c
+++ b/hotspot/src/share/tools/hsdis/hsdis.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,13 +27,13 @@
    HotSpot PrintAssembly option.
 */
 
-#include "hsdis.h"
-
-#include <sysdep.h>
 #include <libiberty.h>
 #include <bfd.h>
 #include <dis-asm.h>
 #include <inttypes.h>
+#include <string.h>
+#include <errno.h>
+#include "hsdis.h"
 
 #ifndef bool
 #define bool int
@@ -47,11 +47,15 @@ typedef decode_instructions_printf_callback_ftype printf_callback_t;
 
 /* disassemble_info.application_data object */
 struct hsdis_app_data {
-  /* the arguments to decode_instructions */
-  uintptr_t start; uintptr_t end;
+  /* virtual address of data */
+  uintptr_t start_va, end_va;
+  /* the instructions to be decoded */
+  unsigned char* buffer;
+  uintptr_t length;
   event_callback_t  event_callback;  void* event_stream;
   printf_callback_t printf_callback; void* printf_stream;
   bool losing;
+  bool do_newline;
 
   /* the architecture being disassembled */
   const char* arch_name;
@@ -65,6 +69,8 @@ struct hsdis_app_data {
   char insn_options[256];
 };
 
+static void* decode(struct hsdis_app_data* app_data, const char* options);
+
 #define DECL_APP_DATA(dinfo) \
   struct hsdis_app_data* app_data = (struct hsdis_app_data*) (dinfo)->application_data
 
@@ -89,59 +95,91 @@ void*
 #ifdef DLL_ENTRY
   DLL_ENTRY
 #endif
-decode_instructions(void* start_pv, void* end_pv,
-                    event_callback_t  event_callback_arg,  void* event_stream_arg,
-                    printf_callback_t printf_callback_arg, void* printf_stream_arg,
-                    const char* options) {
+decode_instructions_virtual(uintptr_t start_va, uintptr_t end_va,
+                            unsigned char* buffer, uintptr_t length,
+                            event_callback_t  event_callback_arg,  void* event_stream_arg,
+                            printf_callback_t printf_callback_arg, void* printf_stream_arg,
+                            const char* options) {
   struct hsdis_app_data app_data;
   memset(&app_data, 0, sizeof(app_data));
-  app_data.start = (uintptr_t) start_pv;
-  app_data.end   = (uintptr_t) end_pv;
+  app_data.start_va    = start_va;
+  app_data.end_va      = end_va;
+  app_data.buffer = buffer;
+  app_data.length = length;
   app_data.event_callback  = event_callback_arg;
   app_data.event_stream    = event_stream_arg;
   app_data.printf_callback = printf_callback_arg;
   app_data.printf_stream   = printf_stream_arg;
+  app_data.do_newline = false;
 
-  setup_app_data(&app_data, options);
+  return decode(&app_data, options);
+}
+
+/* This is the compatability interface for older version of hotspot */
+void*
+#ifdef DLL_ENTRY
+  DLL_ENTRY
+#endif
+decode_instructions(void* start_pv, void* end_pv,
+                    event_callback_t  event_callback_arg,  void* event_stream_arg,
+                    printf_callback_t printf_callback_arg, void* printf_stream_arg,
+                    const char* options) {
+  decode_instructions_virtual((uintptr_t)start_pv,
+                             (uintptr_t)end_pv,
+                             (unsigned char*)start_pv,
+                             (uintptr_t)end_pv - (uintptr_t)start_pv,
+                             event_callback_arg,
+                             event_stream_arg,
+                             printf_callback_arg,
+                             printf_stream_arg,
+                             options);
+}
+
+static void* decode(struct hsdis_app_data* app_data, const char* options) {
+  setup_app_data(app_data, options);
   char buf[128];
 
   {
     /* now reload everything from app_data: */
-    DECL_EVENT_CALLBACK(&app_data);
-    DECL_PRINTF_CALLBACK(&app_data);
-    uintptr_t start = app_data.start;
-    uintptr_t end   = app_data.end;
+    DECL_EVENT_CALLBACK(app_data);
+    DECL_PRINTF_CALLBACK(app_data);
+    uintptr_t start = app_data->start_va;
+    uintptr_t end   = app_data->end_va;
     uintptr_t p     = start;
 
     (*event_callback)(event_stream, "insns", (void*)start);
 
     (*event_callback)(event_stream, "mach name='%s'",
-                      (void*) app_data.arch_info->printable_name);
-    if (app_data.dinfo.bytes_per_line != 0) {
+                      (void*) app_data->arch_info->printable_name);
+    if (app_data->dinfo.bytes_per_line != 0) {
       (*event_callback)(event_stream, "format bytes-per-line='%p'/",
-                        (void*)(intptr_t) app_data.dinfo.bytes_per_line);
+                        (void*)(intptr_t) app_data->dinfo.bytes_per_line);
     }
 
-    while (p < end && !app_data.losing) {
+    while (p < end && !app_data->losing) {
       (*event_callback)(event_stream, "insn", (void*) p);
 
       /* reset certain state, so we can read it with confidence */
-      app_data.dinfo.insn_info_valid    = 0;
-      app_data.dinfo.branch_delay_insns = 0;
-      app_data.dinfo.data_size          = 0;
-      app_data.dinfo.insn_type          = 0;
+      app_data->dinfo.insn_info_valid    = 0;
+      app_data->dinfo.branch_delay_insns = 0;
+      app_data->dinfo.data_size          = 0;
+      app_data->dinfo.insn_type          = 0;
 
-      int size = (*app_data.dfn)((bfd_vma) p, &app_data.dinfo);
+      int size = (*app_data->dfn)((bfd_vma) p, &app_data->dinfo);
 
       if (size > 0)  p += size;
-      else           app_data.losing = true;
+      else           app_data->losing = true;
 
-      const char* insn_close = format_insn_close("/insn", &app_data.dinfo,
-                                                 buf, sizeof(buf));
-      (*event_callback)(event_stream, insn_close, (void*) p);
+      if (!app_data->losing) {
+        const char* insn_close = format_insn_close("/insn", &app_data->dinfo,
+                                                   buf, sizeof(buf));
+        (*event_callback)(event_stream, insn_close, (void*) p) != NULL;
 
-      /* follow each complete insn by a nice newline */
-      (*printf_callback)(printf_stream, "\n");
+        if (app_data->do_newline) {
+          /* follow each complete insn by a nice newline */
+          (*printf_callback)(printf_stream, "\n");
+        }
+      }
     }
 
     (*event_callback)(event_stream, "/insns", (void*) p);
@@ -150,7 +188,7 @@ decode_instructions(void* start_pv, void* end_pv,
 }
 
 /* take the address of the function, for luck, and also test the typedef: */
-const decode_instructions_ftype decode_instructions_address = &decode_instructions;
+const decode_instructions_ftype decode_instructions_address = &decode_instructions_virtual;
 
 static const char* format_insn_close(const char* close,
                                      disassemble_info* dinfo,
@@ -189,13 +227,14 @@ hsdis_read_memory_func(bfd_vma memaddr,
                        bfd_byte* myaddr,
                        unsigned int length,
                        struct disassemble_info* dinfo) {
-  uintptr_t memaddr_p = (uintptr_t) memaddr;
   DECL_APP_DATA(dinfo);
-  if (memaddr_p + length > app_data->end) {
+  /* convert the virtual address memaddr into an address within memory buffer */
+  uintptr_t offset = ((uintptr_t) memaddr) - app_data->start_va;
+  if (offset + length > app_data->length) {
     /* read is out of bounds */
     return EIO;
   } else {
-    memcpy(myaddr, (bfd_byte*) memaddr_p, length);
+    memcpy(myaddr, (bfd_byte*) (app_data->buffer + offset), length);
     return 0;
   }
 }
@@ -407,16 +446,16 @@ static const bfd_arch_info_type* find_arch_info(const char* arch_name) {
 static const char* native_arch_name() {
   const char* res = NULL;
 #ifdef LIBARCH_i386
-    res = "i386";
+  res = "i386";
 #endif
 #ifdef LIBARCH_amd64
-    res = "i386:x86-64";
+  res = "i386:x86-64";
 #endif
 #ifdef LIBARCH_sparc
-    res = "sparc:v8plusb";
+  res = "sparc:v8plusb";
 #endif
 #ifdef LIBARCH_sparcv9
-    res = "sparc:v9b";
+  res = "sparc:v9b";
 #endif
   if (res == NULL)
     res = "architecture not set in Makefile!";
@@ -468,7 +507,7 @@ static void parse_fake_insn(disassembler_ftype dfn,
   dinfo->fprintf_func     = &print_to_dev_null;
   (*dfn)(0, dinfo);
 
-  // put it back:
+  /* put it back */
   dinfo->read_memory_func = read_memory_func;
   dinfo->fprintf_func     = fprintf_func;
 }
diff --git a/hotspot/src/share/tools/hsdis/hsdis.h b/hotspot/src/share/tools/hsdis/hsdis.h
index d1b2dd96476..5ab26ef086c 100644
--- a/hotspot/src/share/tools/hsdis/hsdis.h
+++ b/hotspot/src/share/tools/hsdis/hsdis.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,10 @@
 /* decode_instructions -- dump a range of addresses as native instructions
    This implements the protocol required by the HotSpot PrintAssembly option.
 
-   The starting and ending addresses are within the current process's address space.
+   The start_va, end_va is the virtual address the region of memory to
+   disasemble and buffer contains the instructions to decode,
+   Disassembling instructions in the current address space is done by
+   having start_va == buffer.
 
    The option string, if not empty, is interpreted by the disassembler implementation.
 
@@ -48,18 +51,20 @@ extern
 #ifdef DLL_EXPORT
   DLL_EXPORT
 #endif
-void* decode_instructions(void* start, void* end,
-                          void* (*event_callback)(void*, const char*, void*),
-                          void* event_stream,
-                          int (*printf_callback)(void*, const char*, ...),
-                          void* printf_stream,
-                          const char* options);
+void* decode_instructions_virtual(uintptr_t start_va, uintptr_t end_va,
+                                  unsigned char* buffer, uintptr_t length,
+                                  void* (*event_callback)(void*, const char*, void*),
+                                  void* event_stream,
+                                  int (*printf_callback)(void*, const char*, ...),
+                                  void* printf_stream,
+                                  const char* options);
 
 /* convenience typedefs */
 
 typedef void* (*decode_instructions_event_callback_ftype)  (void*, const char*, void*);
 typedef int   (*decode_instructions_printf_callback_ftype) (void*, const char*, ...);
-typedef void* (*decode_instructions_ftype) (void* start, void* end,
+typedef void* (*decode_instructions_ftype) (uintptr_t start_va, uintptr_t end_va,
+                                            unsigned char* buffer, uintptr_t length,
                                             decode_instructions_event_callback_ftype event_callback,
                                             void* event_stream,
                                             decode_instructions_printf_callback_ftype printf_callback,
diff --git a/hotspot/src/share/vm/adlc/adlparse.cpp b/hotspot/src/share/vm/adlc/adlparse.cpp
index ff486733efc..6d08eab8010 100644
--- a/hotspot/src/share/vm/adlc/adlparse.cpp
+++ b/hotspot/src/share/vm/adlc/adlparse.cpp
@@ -1392,7 +1392,7 @@ void ADLParser::pipe_parse(void) {
       _AD.addForm(machnode);
     }
     else if (!strcmp(ident, "attributes")) {
-      bool vsi_seen = false, bhds_seen = false;
+      bool vsi_seen = false;
 
       skipws();
       if ( (_curchar != '%')
@@ -1436,7 +1436,6 @@ void ADLParser::pipe_parse(void) {
           }
 
           pipeline->_branchHasDelaySlot = true;
-          bhds_seen = true;
           continue;
         }
 
@@ -1639,6 +1638,12 @@ void ADLParser::resource_parse(PipelineForm &pipeline) {
     next_char();                   // Skip "(" or ","
     ident = get_ident();           // Grab next identifier
 
+    if (_AD._adl_debug > 1) {
+      if (ident != NULL) {
+        fprintf(stderr, "resource_parse: identifier: %s\n", ident);
+      }
+    }
+
     if (ident == NULL) {
       parse_err(SYNERR, "keyword identifier expected at \"%c\"\n", _curchar);
       return;
@@ -2427,7 +2432,6 @@ InstructForm *ADLParser::peep_match_child_parse(PeepMatch &match, int parent, in
   int        lparen = 0;          // keep track of parenthesis nesting depth
   int        rparen = 0;          // position of instruction at this depth
   InstructForm *inst_seen  = NULL;
-  InstructForm *child_seen = NULL;
 
   // Walk the match tree,
   // Record <parent, position, instruction name, input position>
@@ -2437,7 +2441,7 @@ InstructForm *ADLParser::peep_match_child_parse(PeepMatch &match, int parent, in
     if (_curchar == '(') {
       ++lparen;
       next_char();
-      child_seen = peep_match_child_parse(match, parent, position, rparen);
+      ( void ) peep_match_child_parse(match, parent, position, rparen);
     }
     // Right paren signals end of an input, may be more
     else if (_curchar == ')') {
@@ -3154,6 +3158,9 @@ void ADLParser::constant_parse_expression(EncClass* encoding, char* ec_name) {
 
 
 //------------------------------size_parse-----------------------------------
+// Parse a 'size(<expr>)' attribute which specifies the size of the
+// emitted instructions in bytes. <expr> can be a C++ expression,
+// e.g. a constant.
 char* ADLParser::size_parse(InstructForm *instr) {
   char* sizeOfInstr = NULL;
 
@@ -4274,7 +4281,17 @@ char *ADLParser::get_ident_common(bool do_preproc) {
             || ((c >= '0') && (c <= '9'))
             || ((c == '_')) || ((c == ':')) || ((c == '#')) );
   if (start == end) {             // We popped out on the first try
-    parse_err(SYNERR, "identifier expected at %c\n", c);
+    // It can occur that `start' contains the rest of the input file.
+    // In this case the output should be truncated.
+    if (strlen(start) > 24) {
+      char buf[32];
+      strncpy(buf, start, 20);
+      buf[20] = '\0';
+      strcat(buf, "[...]");
+      parse_err(SYNERR, "Identifier expected, but found '%s'.", buf);
+    } else {
+      parse_err(SYNERR, "Identifier expected, but found '%s'.", start);
+    }
     start = NULL;
   }
   else {
diff --git a/hotspot/src/share/vm/adlc/archDesc.cpp b/hotspot/src/share/vm/adlc/archDesc.cpp
index 23cbb1e007b..a8983ebaee0 100644
--- a/hotspot/src/share/vm/adlc/archDesc.cpp
+++ b/hotspot/src/share/vm/adlc/archDesc.cpp
@@ -221,6 +221,7 @@ ArchDesc::ArchDesc()
       _register = NULL;
       _encode = NULL;
       _pipeline = NULL;
+      _frame = NULL;
 }
 
 ArchDesc::~ArchDesc() {
@@ -648,7 +649,10 @@ int  ArchDesc::instructFormCount() {
 // Return the textual binding for a given CPP flag name.
 // Return NULL if there is no binding, or it has been #undef-ed.
 char* ArchDesc::get_preproc_def(const char* flag) {
-  SourceForm* deff = (SourceForm*) _preproc_table[flag];
+  // In case of syntax errors, flag may take the value NULL.
+  SourceForm* deff = NULL;
+  if (flag != NULL)
+    deff = (SourceForm*) _preproc_table[flag];
   return (deff == NULL) ? NULL : deff->_code;
 }
 
@@ -803,7 +807,9 @@ int ArchDesc::emit_msg(int quiet, int flag, int line, const char *fmt,
     while (i++ <= 15)  fputc(' ', errfile);
     fprintf(errfile, "%-8s:", pref);
     vfprintf(errfile, fmt, args);
-    fprintf(errfile, "\n"); }
+    fprintf(errfile, "\n");
+    fflush(errfile);
+  }
   return 1;
 }
 
@@ -855,8 +861,14 @@ const char *ArchDesc::reg_mask(OperandForm  &opForm) {
 
   // Check constraints on result's register class
   const char *result_class = opForm.constrained_reg_class();
-  if (!result_class) opForm.dump();
-  assert( result_class, "Resulting register class was not defined for operand");
+  if (result_class == NULL) {
+    opForm.dump();
+    syntax_err(opForm._linenum,
+               "Use of an undefined result class for operand: %s",
+               opForm._ident);
+    abort();
+  }
+
   regMask = reg_class_to_reg_mask( result_class );
 
   return regMask;
@@ -865,8 +877,14 @@ const char *ArchDesc::reg_mask(OperandForm  &opForm) {
 // Obtain the name of the RegMask for an InstructForm
 const char *ArchDesc::reg_mask(InstructForm &inForm) {
   const char *result = inForm.reduce_result();
-  assert( result,
-          "Did not find result operand or RegMask for this instruction");
+
+  if (result == NULL) {
+    syntax_err(inForm._linenum,
+               "Did not find result operand or RegMask"
+               " for this instruction: %s",
+               inForm._ident);
+    abort();
+  }
 
   // Instructions producing 'Universe' use RegMask::Empty
   if( strcmp(result,"Universe")==0 ) {
@@ -875,10 +893,17 @@ const char *ArchDesc::reg_mask(InstructForm &inForm) {
 
   // Lookup this result operand and get its register class
   Form *form = (Form*)_globalNames[result];
-  assert( form, "Result operand must be defined");
+  if (form == NULL) {
+    syntax_err(inForm._linenum,
+               "Did not find result operand for result: %s", result);
+    abort();
+  }
   OperandForm *oper = form->is_operand();
-  if (oper == NULL) form->dump();
-  assert( oper, "Result must be an OperandForm");
+  if (oper == NULL) {
+    syntax_err(inForm._linenum, "Form is not an OperandForm:");
+    form->dump();
+    abort();
+  }
   return reg_mask( *oper );
 }
 
@@ -887,7 +912,13 @@ const char *ArchDesc::reg_mask(InstructForm &inForm) {
 char *ArchDesc::stack_or_reg_mask(OperandForm  &opForm) {
   // name of cisc_spillable version
   const char *reg_mask_name = reg_mask(opForm);
-  assert( reg_mask_name != NULL, "called with incorrect opForm");
+
+  if (reg_mask_name == NULL) {
+     syntax_err(opForm._linenum,
+                "Did not find reg_mask for opForm: %s",
+                opForm._ident);
+     abort();
+  }
 
   const char *stack_or = "STACK_OR_";
   int   length         = (int)strlen(stack_or) + (int)strlen(reg_mask_name) + 1;
@@ -968,7 +999,8 @@ void ArchDesc::initBaseOpTypes() {
   // Create InstructForm and assign type for each ideal instruction.
   for ( int j = _last_machine_leaf+1; j < _last_opcode; ++j) {
     char         *ident    = (char *)NodeClassNames[j];
-    if(!strcmp(ident, "ConI") || !strcmp(ident, "ConP") || !strcmp(ident, "ConN") ||
+    if(!strcmp(ident, "ConI") || !strcmp(ident, "ConP") ||
+       !strcmp(ident, "ConN") || !strcmp(ident, "ConNKlass") ||
        !strcmp(ident, "ConF") || !strcmp(ident, "ConD") ||
        !strcmp(ident, "ConL") || !strcmp(ident, "Con" ) ||
        !strcmp(ident, "Bool") ) {
diff --git a/hotspot/src/share/vm/adlc/archDesc.hpp b/hotspot/src/share/vm/adlc/archDesc.hpp
index ad8f454be5a..f6ae35a9e97 100644
--- a/hotspot/src/share/vm/adlc/archDesc.hpp
+++ b/hotspot/src/share/vm/adlc/archDesc.hpp
@@ -365,13 +365,14 @@ protected:
 // A derived class defines the appropriate output for a specific mapping.
 class OutputMap {
 protected:
-  FILE     *_hpp;
-  FILE     *_cpp;
-  FormDict &_globals;
-  ArchDesc &_AD;
+  FILE       *_hpp;
+  FILE       *_cpp;
+  FormDict   &_globals;
+  ArchDesc   &_AD;
+  const char *_name;
 public:
-  OutputMap (FILE *decl_file, FILE *def_file, FormDict &globals, ArchDesc &AD)
-    : _hpp(decl_file), _cpp(def_file), _globals(globals), _AD(AD) {};
+  OutputMap (FILE *decl_file, FILE *def_file, FormDict &globals, ArchDesc &AD, const char *name)
+    : _hpp(decl_file), _cpp(def_file), _globals(globals), _AD(AD), _name(name) {};
   // Access files used by this routine
   FILE        *decl_file() { return _hpp; }
   FILE        *def_file()  { return _cpp; }
diff --git a/hotspot/src/share/vm/adlc/dict2.cpp b/hotspot/src/share/vm/adlc/dict2.cpp
index 22ec13d2c38..c7797c74223 100644
--- a/hotspot/src/share/vm/adlc/dict2.cpp
+++ b/hotspot/src/share/vm/adlc/dict2.cpp
@@ -33,7 +33,7 @@
 // String hash tables
 #define MAXID 20
 static char initflag = 0;       // True after 1st initialization
-static char shft[MAXID] = {1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6};
+static char shft[MAXID + 1] = {1,2,3,4,5,6,7,1,2,3,4,5,6,7,1,2,3,4,5,6,7};
 static short xsum[MAXID];
 
 //------------------------------bucket---------------------------------------
diff --git a/hotspot/src/share/vm/adlc/filebuff.hpp b/hotspot/src/share/vm/adlc/filebuff.hpp
index 3d8bdad8fe0..894a2c5bad2 100644
--- a/hotspot/src/share/vm/adlc/filebuff.hpp
+++ b/hotspot/src/share/vm/adlc/filebuff.hpp
@@ -31,10 +31,14 @@
 using namespace std;
 
 // STRUCTURE FOR HANDLING INPUT AND OUTPUT FILES
-typedef struct {
+
+class BufferedFile {
+ public:
   const char *_name;
   FILE *_fp;
-} BufferedFile;
+  inline BufferedFile() { _name = NULL; _fp = NULL; };
+  inline ~BufferedFile() {};
+};
 
 class ArchDesc;
 
diff --git a/hotspot/src/share/vm/adlc/forms.cpp b/hotspot/src/share/vm/adlc/forms.cpp
index 70b8bd96253..7833ecb6dc8 100644
--- a/hotspot/src/share/vm/adlc/forms.cpp
+++ b/hotspot/src/share/vm/adlc/forms.cpp
@@ -215,6 +215,7 @@ Form::DataType Form::ideal_to_const_type(const char *name) const {
   if (strcmp(name,"ConI")==0) return Form::idealI;
   if (strcmp(name,"ConP")==0) return Form::idealP;
   if (strcmp(name,"ConN")==0) return Form::idealN;
+  if (strcmp(name,"ConNKlass")==0) return Form::idealNKlass;
   if (strcmp(name,"ConL")==0) return Form::idealL;
   if (strcmp(name,"ConF")==0) return Form::idealF;
   if (strcmp(name,"ConD")==0) return Form::idealD;
@@ -255,9 +256,8 @@ Form::DataType Form::is_load_from_memory(const char *opType) const {
   if( strcmp(opType,"LoadD_unaligned")==0 )  return Form::idealD;
   if( strcmp(opType,"LoadF")==0 )  return Form::idealF;
   if( strcmp(opType,"LoadI")==0 )  return Form::idealI;
-  if( strcmp(opType,"LoadUI2L")==0 )  return Form::idealI;
   if( strcmp(opType,"LoadKlass")==0 )  return Form::idealP;
-  if( strcmp(opType,"LoadNKlass")==0 ) return Form::idealN;
+  if( strcmp(opType,"LoadNKlass")==0 ) return Form::idealNKlass;
   if( strcmp(opType,"LoadL")==0 )  return Form::idealL;
   if( strcmp(opType,"LoadL_unaligned")==0 )  return Form::idealL;
   if( strcmp(opType,"LoadPLocked")==0 )  return Form::idealP;
@@ -280,6 +280,7 @@ Form::DataType Form::is_store_to_memory(const char *opType) const {
   if( strcmp(opType,"StoreL")==0)  return Form::idealL;
   if( strcmp(opType,"StoreP")==0)  return Form::idealP;
   if( strcmp(opType,"StoreN")==0)  return Form::idealN;
+  if( strcmp(opType,"StoreNKlass")==0)  return Form::idealNKlass;
   if( strcmp(opType,"StoreVector")==0 )  return Form::idealV;
   assert( strcmp(opType,"Store") != 0, "Must type Stores" );
   return Form::none;
diff --git a/hotspot/src/share/vm/adlc/forms.hpp b/hotspot/src/share/vm/adlc/forms.hpp
index aa13845d38f..a682e65a36f 100644
--- a/hotspot/src/share/vm/adlc/forms.hpp
+++ b/hotspot/src/share/vm/adlc/forms.hpp
@@ -173,7 +173,8 @@ public:
     idealC      =  7,  // Char    type
     idealS      =  8,  // String  type
     idealN      =  9,  // Narrow oop types
-    idealV      = 10   // Vector  type
+    idealNKlass = 10,  // Narrow klass types
+    idealV      = 11   // Vector  type
   };
   // Convert ideal name to a DataType, return DataType::none if not a 'ConX'
   Form::DataType  ideal_to_const_type(const char *ideal_type_name) const;
@@ -448,11 +449,11 @@ public:
   // Return number of USEs + number of DEFs
   int        num_operands();
   // Return zero-based position in list;  -1 if not in list.
-  int        operand_position(const char *name, int usedef);
+  int        operand_position(const char *name, int usedef, Form *fm);
   // Find position for this name, regardless of use/def information
   int        operand_position(const char *name);
   // Find position for this name when looked up for output via "format"
-  int        operand_position_format(const char *name);
+  int        operand_position_format(const char *name, Form *fm);
   // Find position for the Label when looked up for output via "format"
   int        label_position();
   // Find position for the Method when looked up for output via "format"
diff --git a/hotspot/src/share/vm/adlc/formssel.cpp b/hotspot/src/share/vm/adlc/formssel.cpp
index cccce31c28f..f7f48b4a2dc 100644
--- a/hotspot/src/share/vm/adlc/formssel.cpp
+++ b/hotspot/src/share/vm/adlc/formssel.cpp
@@ -567,7 +567,7 @@ bool InstructForm::rematerialize(FormDict &globals, RegisterForm *registers ) {
         if( strcmp(rc_name,"stack_slots") ) {
           // Check for ideal_type of RegFlags
           const char *type = opform->ideal_type( globals, registers );
-          if( !strcmp(type,"RegFlags") )
+          if( (type != NULL) && !strcmp(type, "RegFlags") )
             rematerialize = true;
         } else
           rematerialize = false; // Do not rematerialize things target stk
@@ -746,13 +746,16 @@ int InstructForm::memory_operand(FormDict &globals) const {
 // Expected use is for pointer vs oop determination for LoadP
 bool InstructForm::captures_bottom_type(FormDict &globals) const {
   if( _matrule && _matrule->_rChild &&
-       (!strcmp(_matrule->_rChild->_opType,"CastPP")     ||  // new result type
-        !strcmp(_matrule->_rChild->_opType,"CastX2P")    ||  // new result type
-        !strcmp(_matrule->_rChild->_opType,"DecodeN")    ||
-        !strcmp(_matrule->_rChild->_opType,"EncodeP")    ||
-        !strcmp(_matrule->_rChild->_opType,"LoadN")      ||
-        !strcmp(_matrule->_rChild->_opType,"LoadNKlass") ||
-        !strcmp(_matrule->_rChild->_opType,"CreateEx")   ||  // type of exception
+       (!strcmp(_matrule->_rChild->_opType,"CastPP")       ||  // new result type
+        !strcmp(_matrule->_rChild->_opType,"CastX2P")      ||  // new result type
+        !strcmp(_matrule->_rChild->_opType,"DecodeN")      ||
+        !strcmp(_matrule->_rChild->_opType,"EncodeP")      ||
+        !strcmp(_matrule->_rChild->_opType,"DecodeNKlass") ||
+        !strcmp(_matrule->_rChild->_opType,"EncodePKlass") ||
+        !strcmp(_matrule->_rChild->_opType,"LoadN")        ||
+        !strcmp(_matrule->_rChild->_opType,"GetAndSetN")   ||
+        !strcmp(_matrule->_rChild->_opType,"LoadNKlass")   ||
+        !strcmp(_matrule->_rChild->_opType,"CreateEx")     ||  // type of exception
         !strcmp(_matrule->_rChild->_opType,"CheckCastPP")) ) return true;
   else if ( is_ideal_load() == Form::idealP )                return true;
   else if ( is_ideal_store() != Form::none  )                return true;
@@ -792,6 +795,20 @@ uint InstructForm::num_opnds() {
   return num_opnds;
 }
 
+const char *InstructForm::opnd_ident(int idx) {
+  return _components.at(idx)->_name;
+}
+
+const char *InstructForm::unique_opnd_ident(int idx) {
+  uint i;
+  for (i = 1; i < num_opnds(); ++i) {
+    if (unique_opnds_idx(i) == idx) {
+      break;
+    }
+  }
+  return (_components.at(i) != NULL) ? _components.at(i)->_name : "";
+}
+
 // Return count of unmatched operands.
 uint InstructForm::num_post_match_opnds() {
   uint  num_post_match_opnds = _components.count();
@@ -863,6 +880,9 @@ uint InstructForm::oper_input_base(FormDict &globals) {
   return base;
 }
 
+// This function determines the order of the MachOper in _opnds[]
+// by writing the operand names into the _components list.
+//
 // Implementation does not modify state of internal structures
 void InstructForm::build_components() {
   // Add top-level operands to the components
@@ -958,11 +978,11 @@ void InstructForm::build_components() {
 
 // Return zero-based position in component list;  -1 if not in list.
 int   InstructForm::operand_position(const char *name, int usedef) {
-  return unique_opnds_idx(_components.operand_position(name, usedef));
+  return unique_opnds_idx(_components.operand_position(name, usedef, this));
 }
 
 int   InstructForm::operand_position_format(const char *name) {
-  return unique_opnds_idx(_components.operand_position_format(name));
+  return unique_opnds_idx(_components.operand_position_format(name, this));
 }
 
 // Return zero-based position in component list; -1 if not in list.
@@ -1222,7 +1242,7 @@ bool InstructForm::check_branch_variant(ArchDesc &AD, InstructForm *short_branch
     if (different) {
       globalAD->syntax_err(short_branch->_linenum, "Instruction %s and its short form %s have different parameters\n", _ident, short_branch->_ident);
     }
-    if (AD._short_branch_debug) {
+    if (AD._adl_debug > 1 || AD._short_branch_debug) {
       fprintf(stderr, "Instruction %s has short form %s\n", _ident, short_branch->_ident);
     }
     _short_branch_form = short_branch;
@@ -1254,16 +1274,19 @@ void InstructForm::rep_var_format(FILE *fp, const char *rep_var) {
   // Find replacement variable's type
   const Form *form   = _localNames[rep_var];
   if (form == NULL) {
-    fprintf(stderr, "unknown replacement variable in format statement: '%s'\n", rep_var);
-    assert(false, "ShouldNotReachHere()");
+    globalAD->syntax_err(_linenum, "Unknown replacement variable %s in format statement of %s.",
+                         rep_var, _ident);
+    return;
   }
   OpClassForm *opc   = form->is_opclass();
   assert( opc, "replacement variable was not found in local names");
   // Lookup the index position of the replacement variable
   int idx  = operand_position_format(rep_var);
   if ( idx == -1 ) {
-    assert( strcmp(opc->_ident,"label")==0, "Unimplemented");
-    assert( false, "ShouldNotReachHere()");
+    globalAD->syntax_err(_linenum, "Could not find replacement variable %s in format statement of %s.\n",
+                         rep_var, _ident);
+    assert(strcmp(opc->_ident, "label") == 0, "Unimplemented");
+    return;
   }
 
   if (is_noninput_operand(idx)) {
@@ -1272,7 +1295,7 @@ void InstructForm::rep_var_format(FILE *fp, const char *rep_var) {
     OperandForm* oper = form->is_operand();
     if (oper != NULL && oper->is_bound_register()) {
       const RegDef* first = oper->get_RegClass()->find_first_elem();
-      fprintf(fp, "    tty->print(\"%s\");\n", first->_regname);
+      fprintf(fp, "    st->print(\"%s\");\n", first->_regname);
     } else {
       globalAD->syntax_err(_linenum, "In %s can't find format for %s %s", _ident, opc->_ident, rep_var);
     }
@@ -1370,26 +1393,28 @@ void InstructForm::index_temps(FILE *fp, FormDict &globals, const char *prefix,
   // idx0=0 is used to indicate that info comes from this same node, not from input edge.
   // idx1 starts at oper_input_base()
   if ( cur_num_opnds >= 1 ) {
-    fprintf(fp,"    // Start at oper_input_base() and count operands\n");
-    fprintf(fp,"    unsigned %sidx0 = %d;\n", prefix, oper_input_base(globals));
-    fprintf(fp,"    unsigned %sidx1 = %d;\n", prefix, oper_input_base(globals));
+    fprintf(fp,"  // Start at oper_input_base() and count operands\n");
+    fprintf(fp,"  unsigned %sidx0 = %d;\n", prefix, oper_input_base(globals));
+    fprintf(fp,"  unsigned %sidx1 = %d;", prefix, oper_input_base(globals));
+    fprintf(fp," \t// %s\n", unique_opnd_ident(1));
 
     // Generate starting points for other unique operands if they exist
     for ( idx = 2; idx < num_unique_opnds(); ++idx ) {
       if( *receiver == 0 ) {
-        fprintf(fp,"    unsigned %sidx%d = %sidx%d + opnd_array(%d)->num_edges();\n",
+        fprintf(fp,"  unsigned %sidx%d = %sidx%d + opnd_array(%d)->num_edges();",
                 prefix, idx, prefix, idx-1, idx-1 );
       } else {
-        fprintf(fp,"    unsigned %sidx%d = %sidx%d + %s_opnds[%d]->num_edges();\n",
+        fprintf(fp,"  unsigned %sidx%d = %sidx%d + %s_opnds[%d]->num_edges();",
                 prefix, idx, prefix, idx-1, receiver, idx-1 );
       }
+      fprintf(fp," \t// %s\n", unique_opnd_ident(idx));
     }
   }
   if( *receiver != 0 ) {
     // This value is used by generate_peepreplace when copying a node.
     // Don't emit it in other cases since it can hide bugs with the
     // use invalid idx's.
-    fprintf(fp,"    unsigned %sidx%d = %sreq(); \n", prefix, idx, receiver);
+    fprintf(fp,"  unsigned %sidx%d = %sreq(); \n", prefix, idx, receiver);
   }
 
 }
@@ -1773,9 +1798,25 @@ static int effect_lookup(const char *name) {
   return Component::INVALID;
 }
 
+const char *Component::getUsedefName() {
+  switch (_usedef) {
+    case Component::INVALID:  return "INVALID";  break;
+    case Component::USE:      return "USE";      break;
+    case Component::USE_DEF:  return "USE_DEF";  break;
+    case Component::USE_KILL: return "USE_KILL"; break;
+    case Component::KILL:     return "KILL";     break;
+    case Component::TEMP:     return "TEMP";     break;
+    case Component::DEF:      return "DEF";      break;
+    case Component::CALL:     return "CALL";     break;
+    default: assert(false, "unknown effect");
+  }
+  return "Undefined Use/Def info";
+}
+
 Effect::Effect(const char *name) : _name(name), _use_def(effect_lookup(name)) {
   _ftype = Form::EFF;
 }
+
 Effect::~Effect() {
 }
 
@@ -2272,7 +2313,7 @@ void OperandForm::build_components() {
 }
 
 int OperandForm::operand_position(const char *name, int usedef) {
-  return _components.operand_position(name, usedef);
+  return _components.operand_position(name, usedef, this);
 }
 
 
@@ -2398,20 +2439,20 @@ void  OperandForm::int_format(FILE *fp, FormDict &globals, uint index) {
   if (_matrule && (_matrule->is_base_register(globals) ||
                    strcmp(ideal_type(globalAD->globalNames()), "RegFlags") == 0)) {
     // !!!!! !!!!!
-    fprintf(fp,    "{ char reg_str[128];\n");
-    fprintf(fp,"      ra->dump_register(node,reg_str);\n");
-    fprintf(fp,"      tty->print(\"%cs\",reg_str);\n",'%');
-    fprintf(fp,"    }\n");
+    fprintf(fp,"  { char reg_str[128];\n");
+    fprintf(fp,"    ra->dump_register(node,reg_str);\n");
+    fprintf(fp,"    st->print(\"%cs\",reg_str);\n",'%');
+    fprintf(fp,"  }\n");
   } else if (_matrule && (dtype = _matrule->is_base_constant(globals)) != Form::none) {
     format_constant( fp, index, dtype );
   } else if (ideal_to_sReg_type(_ident) != Form::none) {
     // Special format for Stack Slot Register
-    fprintf(fp,    "{ char reg_str[128];\n");
-    fprintf(fp,"      ra->dump_register(node,reg_str);\n");
-    fprintf(fp,"      tty->print(\"%cs\",reg_str);\n",'%');
-    fprintf(fp,"    }\n");
+    fprintf(fp,"  { char reg_str[128];\n");
+    fprintf(fp,"    ra->dump_register(node,reg_str);\n");
+    fprintf(fp,"    st->print(\"%cs\",reg_str);\n",'%');
+    fprintf(fp,"  }\n");
   } else {
-    fprintf(fp,"tty->print(\"No format defined for %s\n\");\n", _ident);
+    fprintf(fp,"  st->print(\"No format defined for %s\n\");\n", _ident);
     fflush(fp);
     fprintf(stderr,"No format defined for %s\n", _ident);
     dump();
@@ -2425,36 +2466,37 @@ void  OperandForm::ext_format(FILE *fp, FormDict &globals, uint index) {
   Form::DataType dtype;
   if (_matrule && (_matrule->is_base_register(globals) ||
                    strcmp(ideal_type(globalAD->globalNames()), "RegFlags") == 0)) {
-    fprintf(fp,    "{ char reg_str[128];\n");
-    fprintf(fp,"      ra->dump_register(node->in(idx");
-    if ( index != 0 ) fprintf(fp,                  "+%d",index);
-    fprintf(fp,                                       "),reg_str);\n");
-    fprintf(fp,"      tty->print(\"%cs\",reg_str);\n",'%');
-    fprintf(fp,"    }\n");
+    fprintf(fp,"  { char reg_str[128];\n");
+    fprintf(fp,"    ra->dump_register(node->in(idx");
+    if ( index != 0 ) fprintf(fp,              "+%d",index);
+    fprintf(fp,                                      "),reg_str);\n");
+    fprintf(fp,"    st->print(\"%cs\",reg_str);\n",'%');
+    fprintf(fp,"  }\n");
   } else if (_matrule && (dtype = _matrule->is_base_constant(globals)) != Form::none) {
     format_constant( fp, index, dtype );
   } else if (ideal_to_sReg_type(_ident) != Form::none) {
     // Special format for Stack Slot Register
-    fprintf(fp,    "{ char reg_str[128];\n");
-    fprintf(fp,"      ra->dump_register(node->in(idx");
+    fprintf(fp,"  { char reg_str[128];\n");
+    fprintf(fp,"    ra->dump_register(node->in(idx");
     if ( index != 0 ) fprintf(fp,                  "+%d",index);
     fprintf(fp,                                       "),reg_str);\n");
-    fprintf(fp,"      tty->print(\"%cs\",reg_str);\n",'%');
-    fprintf(fp,"    }\n");
+    fprintf(fp,"    st->print(\"%cs\",reg_str);\n",'%');
+    fprintf(fp,"  }\n");
   } else {
-    fprintf(fp,"tty->print(\"No format defined for %s\n\");\n", _ident);
+    fprintf(fp,"  st->print(\"No format defined for %s\n\");\n", _ident);
     assert( false,"Internal error:\n  output_external_operand() attempting to output other than a Register or Constant");
   }
 }
 
 void OperandForm::format_constant(FILE *fp, uint const_index, uint const_type) {
   switch(const_type) {
-  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::idealN:  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;
+  case Form::idealI: fprintf(fp,"  st->print(\"#%%d\", _c%d);\n", const_index); break;
+  case Form::idealP: fprintf(fp,"  if (_c%d) _c%d->dump_on(st);\n", const_index, const_index); break;
+  case Form::idealNKlass:
+  case Form::idealN: fprintf(fp,"  if (_c%d) _c%d->dump_on(st);\n", const_index, 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()");
   }
@@ -2824,17 +2866,8 @@ void Component::output(FILE *fp) {
   fprintf(fp,"Component:");  // Write to output files
   fprintf(fp, "  name = %s", _name);
   fprintf(fp, ", type = %s", _type);
-  const char * usedef = "Undefined Use/Def info";
-  switch (_usedef) {
-    case USE:      usedef = "USE";      break;
-    case USE_DEF:  usedef = "USE_DEF";  break;
-    case USE_KILL: usedef = "USE_KILL"; break;
-    case KILL:     usedef = "KILL";     break;
-    case TEMP:     usedef = "TEMP";     break;
-    case DEF:      usedef = "DEF";      break;
-    default: assert(false, "unknown effect");
-  }
-  fprintf(fp, ", use/def = %s\n", usedef);
+  assert(_usedef != 0, "unknown effect");
+  fprintf(fp, ", use/def = %s\n", getUsedefName());
 }
 
 
@@ -2926,9 +2959,9 @@ int ComponentList::num_operands() {
   return count;
 }
 
-// Return zero-based position in list;  -1 if not in list.
+// Return zero-based position of operand 'name' in list;  -1 if not in list.
 // if parameter 'usedef' is ::USE, it will match USE, USE_DEF, ...
-int ComponentList::operand_position(const char *name, int usedef) {
+int ComponentList::operand_position(const char *name, int usedef, Form *fm) {
   PreserveIter pi(this);
   int position = 0;
   int num_opnds = num_operands();
@@ -2951,10 +2984,18 @@ int ComponentList::operand_position(const char *name, int usedef) {
         return position+1;
       } else {
         if( preceding_non_use && strcmp(component->_name, preceding_non_use->_name) ) {
-          fprintf(stderr, "the name '%s' should not precede the name '%s'\n", preceding_non_use->_name, name);
+          fprintf(stderr, "the name '%s(%s)' should not precede the name '%s(%s)'",
+                  preceding_non_use->_name, preceding_non_use->getUsedefName(),
+                  name, component->getUsedefName());
+          if (fm && fm->is_instruction()) fprintf(stderr,  "in form '%s'", fm->is_instruction()->_ident);
+          if (fm && fm->is_operand()) fprintf(stderr,  "in form '%s'", fm->is_operand()->_ident);
+          fprintf(stderr,  "\n");
         }
         if( position >= num_opnds ) {
-          fprintf(stderr, "the name '%s' is too late in its name list\n", name);
+          fprintf(stderr, "the name '%s' is too late in its name list", name);
+          if (fm && fm->is_instruction()) fprintf(stderr,  "in form '%s'", fm->is_instruction()->_ident);
+          if (fm && fm->is_operand()) fprintf(stderr,  "in form '%s'", fm->is_operand()->_ident);
+          fprintf(stderr,  "\n");
         }
         assert(position < num_opnds, "advertised index in bounds");
         return position;
@@ -3000,10 +3041,10 @@ int ComponentList::operand_position(const char *name) {
   return Not_in_list;
 }
 
-int ComponentList::operand_position_format(const char *name) {
+int ComponentList::operand_position_format(const char *name, Form *fm) {
   PreserveIter pi(this);
   int  first_position = operand_position(name);
-  int  use_position   = operand_position(name, Component::USE);
+  int  use_position   = operand_position(name, Component::USE, fm);
 
   return ((first_position < use_position) ? use_position : first_position);
 }
@@ -3266,8 +3307,8 @@ const char *MatchNode::reduce_right(FormDict &globals) const {
 
   // If we are a "Set", start from the right child.
   const MatchNode *const mnode = sets_result() ?
-    (const MatchNode *const)this->_rChild :
-    (const MatchNode *const)this;
+    (const MatchNode *)this->_rChild :
+    (const MatchNode *)this;
 
   // If our right child exists, it is the right reduction
   if ( mnode->_rChild ) {
@@ -3284,8 +3325,8 @@ const char *MatchNode::reduce_left(FormDict &globals) const {
 
   // If we are a "Set", start from the right child.
   const MatchNode *const mnode = sets_result() ?
-    (const MatchNode *const)this->_rChild :
-    (const MatchNode *const)this;
+    (const MatchNode *)this->_rChild :
+    (const MatchNode *)this;
 
   // If our left child exists, it is the left reduction
   if ( mnode->_lChild ) {
@@ -3389,9 +3430,9 @@ void MatchNode::output(FILE *fp) {
 
 int MatchNode::needs_ideal_memory_edge(FormDict &globals) const {
   static const char *needs_ideal_memory_list[] = {
-    "StoreI","StoreL","StoreP","StoreN","StoreD","StoreF" ,
+    "StoreI","StoreL","StoreP","StoreN","StoreNKlass","StoreD","StoreF" ,
     "StoreB","StoreC","Store" ,"StoreFP",
-    "LoadI", "LoadUI2L", "LoadL", "LoadP" ,"LoadN", "LoadD" ,"LoadF"  ,
+    "LoadI", "LoadL", "LoadP" ,"LoadN", "LoadD" ,"LoadF"  ,
     "LoadB" , "LoadUB", "LoadUS" ,"LoadS" ,"Load" ,
     "StoreVector", "LoadVector",
     "LoadRange", "LoadKlass", "LoadNKlass", "LoadL_unaligned", "LoadD_unaligned",
@@ -3399,7 +3440,9 @@ int MatchNode::needs_ideal_memory_edge(FormDict &globals) const {
     "StorePConditional", "StoreIConditional", "StoreLConditional",
     "CompareAndSwapI", "CompareAndSwapL", "CompareAndSwapP", "CompareAndSwapN",
     "StoreCM",
-    "ClearArray"
+    "ClearArray",
+    "GetAndAddI", "GetAndSetI", "GetAndSetP",
+    "GetAndAddL", "GetAndSetL", "GetAndSetN",
   };
   int cnt = sizeof(needs_ideal_memory_list)/sizeof(char*);
   if( strcmp(_opType,"PrefetchRead")==0 ||
@@ -3944,6 +3987,8 @@ int MatchRule::is_expensive() const {
         strcmp(opType,"ConvL2I")==0 ||
         strcmp(opType,"DecodeN")==0 ||
         strcmp(opType,"EncodeP")==0 ||
+        strcmp(opType,"EncodePKlass")==0 ||
+        strcmp(opType,"DecodeNKlass")==0 ||
         strcmp(opType,"RoundDouble")==0 ||
         strcmp(opType,"RoundFloat")==0 ||
         strcmp(opType,"ReverseBytesI")==0 ||
@@ -4040,18 +4085,28 @@ Form::DataType MatchRule::is_ideal_load() const {
 }
 
 bool MatchRule::is_vector() const {
-  if( _rChild ) {
+  static const char *vector_list[] = {
+    "AddVB","AddVS","AddVI","AddVL","AddVF","AddVD",
+    "SubVB","SubVS","SubVI","SubVL","SubVF","SubVD",
+    "MulVS","MulVI","MulVF","MulVD",
+    "DivVF","DivVD",
+    "AndV" ,"XorV" ,"OrV",
+    "LShiftCntV","RShiftCntV",
+    "LShiftVB","LShiftVS","LShiftVI","LShiftVL",
+    "RShiftVB","RShiftVS","RShiftVI","RShiftVL",
+    "URShiftVB","URShiftVS","URShiftVI","URShiftVL",
+    "ReplicateB","ReplicateS","ReplicateI","ReplicateL","ReplicateF","ReplicateD",
+    "LoadVector","StoreVector",
+    // Next are not supported currently.
+    "PackB","PackS","PackI","PackL","PackF","PackD","Pack2L","Pack2D",
+    "ExtractB","ExtractUB","ExtractC","ExtractS","ExtractI","ExtractL","ExtractF","ExtractD"
+  };
+  int cnt = sizeof(vector_list)/sizeof(char*);
+  if (_rChild) {
     const char  *opType = _rChild->_opType;
-    if( strcmp(opType,"ReplicateB")==0 ||
-        strcmp(opType,"ReplicateS")==0 ||
-        strcmp(opType,"ReplicateI")==0 ||
-        strcmp(opType,"ReplicateL")==0 ||
-        strcmp(opType,"ReplicateF")==0 ||
-        strcmp(opType,"ReplicateD")==0 ||
-        strcmp(opType,"LoadVector")==0 ||
-        strcmp(opType,"StoreVector")==0 ||
-        0 /* 0 to line up columns nicely */ )
-      return true;
+    for (int i=0; i<cnt; i++)
+      if (strcmp(opType,vector_list[i]) == 0)
+        return true;
   }
   return false;
 }
@@ -4095,12 +4150,17 @@ void MatchRule::dump() {
   output(stderr);
 }
 
-void MatchRule::output(FILE *fp) {
+// Write just one line.
+void MatchRule::output_short(FILE *fp) {
   fprintf(fp,"MatchRule: ( %s",_name);
   if (_lChild) _lChild->output(fp);
   if (_rChild) _rChild->output(fp);
-  fprintf(fp," )\n");
-  fprintf(fp,"   nesting depth = %d\n", _depth);
+  fprintf(fp," )");
+}
+
+void MatchRule::output(FILE *fp) {
+  output_short(fp);
+  fprintf(fp,"\n   nesting depth = %d\n", _depth);
   if (_result) fprintf(fp,"   Result Type = %s", _result);
   fprintf(fp,"\n");
 }
diff --git a/hotspot/src/share/vm/adlc/formssel.hpp b/hotspot/src/share/vm/adlc/formssel.hpp
index 93b43b1f08b..6f2975fc3a3 100644
--- a/hotspot/src/share/vm/adlc/formssel.hpp
+++ b/hotspot/src/share/vm/adlc/formssel.hpp
@@ -76,7 +76,7 @@ class InstructForm : public Form {
 private:
   bool           _ideal_only;       // Not a user-defined instruction
   // Members used for tracking CISC-spilling
-  uint           _cisc_spill_operand;// Which operand may cisc-spill
+  int            _cisc_spill_operand;// Which operand may cisc-spill
   void           set_cisc_spill_operand(uint op_index) { _cisc_spill_operand = op_index; }
   bool           _is_cisc_alternate;
   InstructForm  *_cisc_spill_alternate;// cisc possible replacement
@@ -103,7 +103,7 @@ public:
   RewriteRule   *_rewrule;         // Rewrite rule for this instruction
   FormatRule    *_format;          // Format for assembly generation
   Peephole      *_peephole;        // List of peephole rules for instruction
-  const char    *_ins_pipe;        // Instruction Scheduline description class
+  const char    *_ins_pipe;        // Instruction Scheduling description class
 
   uint          *_uniq_idx;        // Indexes of unique operands
   int            _uniq_idx_length; // Length of _uniq_idx array
@@ -198,6 +198,7 @@ public:
 
   virtual const char *cost();      // Access ins_cost attribute
   virtual uint        num_opnds(); // Count of num_opnds for MachNode class
+                                   // Counts USE_DEF opnds twice.  See also num_unique_opnds().
   virtual uint        num_post_match_opnds();
   virtual uint        num_consts(FormDict &globals) const;// Constants in match rule
   // Constants in match rule with specified type
@@ -228,6 +229,7 @@ public:
   // Return number of relocation entries needed for this instruction.
   virtual uint        reloc(FormDict &globals);
 
+  const char         *opnd_ident(int idx);  // Name of operand #idx.
   const char         *reduce_result();
   // Return the name of the operand on the right hand side of the binary match
   // Return NULL if there is no right hand side
@@ -240,7 +242,7 @@ public:
   // Check if this instruction can cisc-spill to 'alternate'
   bool                cisc_spills_to(ArchDesc &AD, InstructForm *alternate);
   InstructForm       *cisc_spill_alternate() { return _cisc_spill_alternate; }
-  uint                cisc_spill_operand() const { return _cisc_spill_operand; }
+  int                 cisc_spill_operand() const { return _cisc_spill_operand; }
   bool                is_cisc_alternate() const { return _is_cisc_alternate; }
   void                set_cisc_alternate(bool val) { _is_cisc_alternate = val; }
   const char         *cisc_reg_mask_name() const { return _cisc_reg_mask_name; }
@@ -277,6 +279,7 @@ public:
                           return idx;
                         }
   }
+  const char         *unique_opnd_ident(int idx);  // Name of operand at unique idx.
 
   // Operands which are only KILLs aren't part of the input array and
   // require special handling in some cases.  Their position in this
@@ -889,6 +892,7 @@ public:
 
   void dump();                     // Debug printer
   void output(FILE *fp);           // Write to output files
+  const char* getUsedefName();
 
 public:
   // Implementation depends upon working bit intersection and union.
@@ -1030,6 +1034,7 @@ public:
   void       matchrule_swap_commutative_op(const char* instr_ident, int count, int& match_rules_cnt);
 
   void dump();
+  void output_short(FILE *fp);
   void output(FILE *fp);
 };
 
diff --git a/hotspot/src/share/vm/adlc/main.cpp b/hotspot/src/share/vm/adlc/main.cpp
index b8a5271dfa2..3bfa0695e5b 100644
--- a/hotspot/src/share/vm/adlc/main.cpp
+++ b/hotspot/src/share/vm/adlc/main.cpp
@@ -341,14 +341,20 @@ int main(int argc, char *argv[])
 static void usage(ArchDesc& AD)
 {
   printf("Architecture Description Language Compiler\n\n");
-  printf("Usage: adl [-doqw] [-Dflag[=def]] [-Uflag] [-cFILENAME] [-hFILENAME] [-aDFAFILE] ADLFILE\n");
+  printf("Usage: adlc [-doqwTs] [-#]* [-D<FLAG>[=<DEF>]] [-U<FLAG>] [-c<CPP_FILE_NAME>] [-h<HPP_FILE_NAME>] [-a<DFA_FILE_NAME>] [-v<GLOBALS_FILE_NAME>] <ADL_FILE_NAME>\n");
   printf(" d  produce DFA debugging info\n");
   printf(" o  no output produced, syntax and semantic checking only\n");
   printf(" q  quiet mode, supresses all non-essential messages\n");
   printf(" w  suppress warning messages\n");
+  printf(" T  make DFA as many subroutine calls\n");
+  printf(" s  output which instructions are cisc-spillable\n");
+  printf(" D  define preprocessor symbol\n");
+  printf(" U  undefine preprocessor symbol\n");
   printf(" c  specify CPP file name (default: %s)\n", AD._CPP_file._name);
   printf(" h  specify HPP file name (default: %s)\n", AD._HPP_file._name);
   printf(" a  specify DFA output file name\n");
+  printf(" v  specify adGlobals output file name\n");
+  printf(" #  increment ADL debug level\n");
   printf("\n");
 }
 
@@ -450,22 +456,6 @@ static char *strip_ext(char *fname)
   return fname;
 }
 
-//------------------------------strip_path_and_ext------------------------------
-static char *strip_path_and_ext(char *fname)
-{
-  char *ep;
-  char *sp;
-
-  if (fname) {
-    for (sp = fname; *sp; sp++)
-      if (*sp == '/')  fname = sp+1;
-    ep = fname;                    // start at first character and look for '.'
-    while (ep <= (fname + strlen(fname) - 1) && *ep != '.') ep++;
-    if (*ep == '.')     *ep = '\0'; // truncate string at '.'
-  }
-  return fname;
-}
-
 //------------------------------base_plus_suffix-------------------------------
 // New concatenated string
 static char *base_plus_suffix(const char* base, const char *suffix)
@@ -477,18 +467,6 @@ static char *base_plus_suffix(const char* base, const char *suffix)
   return fname;
 }
 
-
-//------------------------------prefix_plus_base_plus_suffix-------------------
-// New concatenated string
-static char *prefix_plus_base_plus_suffix(const char* prefix, const char* base, const char *suffix)
-{
-  int len = (int)strlen(prefix) + (int)strlen(base) + (int)strlen(suffix) + 1;
-
-  char* fname = new char[len];
-  sprintf(fname,"%s%s%s",prefix,base,suffix);
-  return fname;
-}
-
 //------------------------------get_legal_text---------------------------------
 // Get pointer to legal text at the beginning of AD file.
 // This code assumes that a legal text starts at the beginning of .ad files,
diff --git a/hotspot/src/share/vm/adlc/output_c.cpp b/hotspot/src/share/vm/adlc/output_c.cpp
index 68a0ff818f8..36b7157bdea 100644
--- a/hotspot/src/share/vm/adlc/output_c.cpp
+++ b/hotspot/src/share/vm/adlc/output_c.cpp
@@ -518,6 +518,14 @@ static int pipeline_res_mask_initializer(
 
     int cycles = piperesource->_cycles;
     uint stage          = pipeline->_stages.index(piperesource->_stage);
+    if (NameList::Not_in_list == stage) {
+      fprintf(stderr,
+              "pipeline_res_mask_initializer: "
+              "semantic error: "
+              "pipeline stage undeclared: %s\n",
+              piperesource->_stage);
+      exit(1);
+    }
     uint upper_limit    = stage+cycles-1;
     uint lower_limit    = stage-1;
     uint upper_idx      = upper_limit >> 5;
@@ -1000,7 +1008,7 @@ void ArchDesc::build_pipe_classes(FILE *fp_cpp) {
   }
   fprintf(fp_cpp, "};\n\n");
   fprintf(fp_cpp, "#ifndef PRODUCT\n");
-  fprintf(fp_cpp, "void Bundle::dump() const {\n");
+  fprintf(fp_cpp, "void Bundle::dump(outputStream *st) const {\n");
   fprintf(fp_cpp, "  static const char * bundle_flags[] = {\n");
   fprintf(fp_cpp, "    \"\",\n");
   fprintf(fp_cpp, "    \"use nop delay\",\n");
@@ -1019,22 +1027,22 @@ void ArchDesc::build_pipe_classes(FILE *fp_cpp) {
   // See if the same string is in the table
   fprintf(fp_cpp, "  bool needs_comma = false;\n\n");
   fprintf(fp_cpp, "  if (_flags) {\n");
-  fprintf(fp_cpp, "    tty->print(\"%%s\", bundle_flags[_flags]);\n");
+  fprintf(fp_cpp, "    st->print(\"%%s\", bundle_flags[_flags]);\n");
   fprintf(fp_cpp, "    needs_comma = true;\n");
   fprintf(fp_cpp, "  };\n");
   fprintf(fp_cpp, "  if (instr_count()) {\n");
-  fprintf(fp_cpp, "    tty->print(\"%%s%%d instr%%s\", needs_comma ? \", \" : \"\", instr_count(), instr_count() != 1 ? \"s\" : \"\");\n");
+  fprintf(fp_cpp, "    st->print(\"%%s%%d instr%%s\", needs_comma ? \", \" : \"\", instr_count(), instr_count() != 1 ? \"s\" : \"\");\n");
   fprintf(fp_cpp, "    needs_comma = true;\n");
   fprintf(fp_cpp, "  };\n");
   fprintf(fp_cpp, "  uint r = resources_used();\n");
   fprintf(fp_cpp, "  if (r) {\n");
-  fprintf(fp_cpp, "    tty->print(\"%%sresource%%s:\", needs_comma ? \", \" : \"\", (r & (r-1)) != 0 ? \"s\" : \"\");\n");
+  fprintf(fp_cpp, "    st->print(\"%%sresource%%s:\", needs_comma ? \", \" : \"\", (r & (r-1)) != 0 ? \"s\" : \"\");\n");
   fprintf(fp_cpp, "    for (uint i = 0; i < %d; i++)\n", _pipeline->_rescount);
   fprintf(fp_cpp, "      if ((r & (1 << i)) != 0)\n");
-  fprintf(fp_cpp, "        tty->print(\" %%s\", resource_names[i]);\n");
+  fprintf(fp_cpp, "        st->print(\" %%s\", resource_names[i]);\n");
   fprintf(fp_cpp, "    needs_comma = true;\n");
   fprintf(fp_cpp, "  };\n");
-  fprintf(fp_cpp, "  tty->print(\"\\n\");\n");
+  fprintf(fp_cpp, "  st->print(\"\\n\");\n");
   fprintf(fp_cpp, "}\n");
   fprintf(fp_cpp, "#endif\n");
 }
@@ -1048,39 +1056,6 @@ static void defineOut_RegMask(FILE *fp, const char *node, const char *regMask) {
           node, regMask);
 }
 
-// Scan the peepmatch and output a test for each instruction
-static void check_peepmatch_instruction_tree(FILE *fp, PeepMatch *pmatch, PeepConstraint *pconstraint) {
-  int         parent        = -1;
-  int         inst_position = 0;
-  const char* inst_name     = NULL;
-  int         input         = 0;
-  fprintf(fp, "      // Check instruction sub-tree\n");
-  pmatch->reset();
-  for( pmatch->next_instruction( parent, inst_position, inst_name, input );
-       inst_name != NULL;
-       pmatch->next_instruction( parent, inst_position, inst_name, input ) ) {
-    // If this is not a placeholder
-    if( ! pmatch->is_placeholder() ) {
-      // Define temporaries 'inst#', based on parent and parent's input index
-      if( parent != -1 ) {                // root was initialized
-        fprintf(fp, "  inst%d = inst%d->in(%d);\n",
-                inst_position, parent, input);
-      }
-
-      // When not the root
-      // Test we have the correct instruction by comparing the rule
-      if( parent != -1 ) {
-        fprintf(fp, "  matches = matches &&  ( inst%d->rule() == %s_rule );",
-                inst_position, inst_name);
-      }
-    } else {
-      // Check that user did not try to constrain a placeholder
-      assert( ! pconstraint->constrains_instruction(inst_position),
-              "fatal(): Can not constrain a placeholder instruction");
-    }
-  }
-}
-
 static void print_block_index(FILE *fp, int inst_position) {
   assert( inst_position >= 0, "Instruction number less than zero");
   fprintf(fp, "block_index");
@@ -1242,7 +1217,7 @@ static void check_peepconstraints(FILE *fp, FormDict &globals, PeepMatch *pmatch
         if( left_op_index != 0 ) {
           assert( (left_index <= 9999) && (left_op_index <= 9999), "exceed string size");
           // Must have index into operands
-          sprintf(left_reg_index,",inst%d_idx%d", left_index, left_op_index);
+          sprintf(left_reg_index,",inst%d_idx%d", (int)left_index, left_op_index);
         } else {
           strcpy(left_reg_index, "");
         }
@@ -1255,7 +1230,7 @@ static void check_peepconstraints(FILE *fp, FormDict &globals, PeepMatch *pmatch
           if( right_op_index != 0 ) {
             assert( (right_index <= 9999) && (right_op_index <= 9999), "exceed string size");
             // Must have index into operands
-            sprintf(right_reg_index,",inst%d_idx%d", right_index, right_op_index);
+            sprintf(right_reg_index,",inst%d_idx%d", (int)right_index, right_op_index);
           } else {
             strcpy(right_reg_index, "");
           }
@@ -1606,6 +1581,12 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
         fprintf(fp, "  ((MachFastLockNode*)n%d)->_counters = _counters;\n",cnt);
       }
 
+      // Fill in the bottom_type where requested
+      if (node->captures_bottom_type(_globalNames) &&
+          new_inst->captures_bottom_type(_globalNames)) {
+        fprintf(fp, "  ((MachTypeNode*)n%d)->_bottom_type = bottom_type();\n", cnt);
+      }
+
       const char *resultOper = new_inst->reduce_result();
       fprintf(fp,"  n%d->set_opnd_array(0, state->MachOperGenerator( %s, C ));\n",
               cnt, machOperEnum(resultOper));
@@ -1639,7 +1620,7 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
           new_pos = new_inst->operand_position(parameter,Component::USE);
           exp_pos += node->num_opnds();
           // If there is no use of the created operand, just skip it
-          if (new_pos != -1) {
+          if (new_pos != NameList::Not_in_list) {
             //Copy the operand from the original made above
             fprintf(fp,"  n%d->set_opnd_array(%d, op%d->clone(C)); // %s\n",
                     cnt, new_pos, exp_pos-node->num_opnds(), opid);
@@ -1767,7 +1748,7 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
         }
 
         fprintf(fp,"  kill = ");
-        fprintf(fp,"new (C, 1) MachProjNode( %s, %d, (%s), Op_%s );\n",
+        fprintf(fp,"new (C) MachProjNode( %s, %d, (%s), Op_%s );\n",
                 machNode, proj_no++, regmask, ideal_type);
         fprintf(fp,"  proj_list.push(kill);\n");
       }
@@ -1783,7 +1764,8 @@ void ArchDesc::defineExpand(FILE *fp, InstructForm *node) {
       // Build mapping from num_edges to local variables
       fprintf(fp,"  unsigned num0 = 0;\n");
       for( i = 1; i < cur_num_opnds; i++ ) {
-        fprintf(fp,"  unsigned num%d = opnd_array(%d)->num_edges();\n",i,i);
+        fprintf(fp,"  unsigned num%d = opnd_array(%d)->num_edges();",i,i);
+        fprintf(fp, " \t// %s\n", node->opnd_ident(i));
       }
       // Build a mapping from operand index to input edges
       fprintf(fp,"  unsigned idx0 = oper_input_base();\n");
@@ -1928,6 +1910,7 @@ public:
   }
 
   // Track necessary state when identifying a replacement variable
+  // @arg rep_var: The formal parameter of the encoding.
   void update_state(const char *rep_var) {
     // A replacement variable or one of its subfields
     // Obtain replacement variable from list
@@ -1949,7 +1932,7 @@ public:
         }
       }
       else {
-        // Lookup its position in parameter list
+        // Lookup its position in (formal) parameter list of encoding
         int   param_no  = _encoding.rep_var_index(rep_var);
         if ( param_no == -1 ) {
           _AD.syntax_err( _encoding._linenum,
@@ -1958,6 +1941,7 @@ public:
         }
 
         // Lookup the corresponding ins_encode parameter
+        // This is the argument (actual parameter) to the encoding.
         const char *inst_rep_var = _ins_encode.rep_var_name(_inst, param_no);
         if (inst_rep_var == NULL) {
           _AD.syntax_err( _ins_encode._linenum,
@@ -2323,6 +2307,7 @@ private:
           // Add parameter for index position, if not result operand
           if( _operand_idx != 0 ) fprintf(_fp,",idx%d", _operand_idx);
           fprintf(_fp,")");
+          fprintf(_fp, "/* %s */", _operand_name);
         }
       } else {
         assert( _reg_status == LITERAL_OUTPUT, "should have output register literal in emit_rep_var");
@@ -2362,7 +2347,7 @@ private:
         }
       } else {
         assert( _constant_status == LITERAL_OUTPUT, "should have output constant literal in emit_rep_var");
-        // Cosntant literal has already been sent to output file, nothing more needed
+        // Constant literal has already been sent to output file, nothing more needed
       }
     }
     else if ( strcmp(rep_var,"$disp") == 0 ) {
@@ -2381,6 +2366,8 @@ private:
     }
     else {
       printf("emit_field: %s\n",rep_var);
+      globalAD->syntax_err(_inst._linenum, "Unknown replacement variable %s in format statement of %s.",
+                           rep_var, _inst._ident);
       assert( false, "UnImplemented()");
     }
   }
@@ -2478,14 +2465,14 @@ void ArchDesc::defineSize(FILE *fp, InstructForm &inst) {
 
   //(1)
   // Output instruction's emit prototype
-  fprintf(fp,"uint  %sNode::size(PhaseRegAlloc *ra_) const {\n",
+  fprintf(fp,"uint %sNode::size(PhaseRegAlloc *ra_) const {\n",
           inst._ident);
 
-  fprintf(fp, " assert(VerifyOops || MachNode::size(ra_) <= %s, \"bad fixed size\");\n", inst._size);
+  fprintf(fp, "  assert(VerifyOops || MachNode::size(ra_) <= %s, \"bad fixed size\");\n", inst._size);
 
   //(2)
   // Print the size
-  fprintf(fp, " return (VerifyOops ? MachNode::size(ra_) : %s);\n", inst._size);
+  fprintf(fp, "  return (VerifyOops ? MachNode::size(ra_) : %s);\n", inst._size);
 
   // (3) and (4)
   fprintf(fp,"}\n");
@@ -2573,7 +2560,7 @@ void ArchDesc::defineEmit(FILE* fp, InstructForm& inst) {
   }
 
   // (3) and (4)
-  fprintf(fp, "}\n");
+  fprintf(fp, "}\n\n");
 }
 
 // defineEvalConstant ---------------------------------------------------------
@@ -2721,12 +2708,12 @@ static void defineIn_RegMask(FILE *fp, FormDict &globals, OperandForm &oper) {
 // (2)  }
 //
 static void defineClone(FILE *fp, FormDict &globalNames, OperandForm &oper) {
-  fprintf(fp,"MachOper  *%sOper::clone(Compile* C) const {\n", oper._ident);
+  fprintf(fp,"MachOper *%sOper::clone(Compile* C) const {\n", oper._ident);
   // Check for constants that need to be copied over
   const int  num_consts    = oper.num_consts(globalNames);
   const bool is_ideal_bool = oper.is_ideal_bool();
   if( (num_consts > 0) ) {
-    fprintf(fp,"  return  new (C) %sOper(", oper._ident);
+    fprintf(fp,"  return new (C) %sOper(", oper._ident);
     // generate parameters for constants
     int i = 0;
     fprintf(fp,"_c%d", i);
@@ -2738,21 +2725,12 @@ static void defineClone(FILE *fp, FormDict &globalNames, OperandForm &oper) {
   }
   else {
     assert( num_consts == 0, "Currently support zero or one constant per operand clone function");
-    fprintf(fp,"  return  new (C) %sOper();\n", oper._ident);
+    fprintf(fp,"  return new (C) %sOper();\n", oper._ident);
   }
   // finish method
   fprintf(fp,"}\n");
 }
 
-static void define_hash(FILE *fp, char *operand) {
-  fprintf(fp,"uint %sOper::hash() const { return 5; }\n", operand);
-}
-
-static void define_cmp(FILE *fp, char *operand) {
-  fprintf(fp,"uint %sOper::cmp( const MachOper &oper ) const { return opcode() == oper.opcode(); }\n", operand);
-}
-
-
 // Helper functions for bug 4796752, abstracted with minimal modification
 // from define_oper_interface()
 OperandForm *rep_var_to_operand(const char *encoding, OperandForm &oper, FormDict &globals) {
@@ -2846,14 +2824,14 @@ void ArchDesc::define_oper_interface(FILE *fp, OperandForm &oper, FormDict &glob
   } else if ( (strcmp(name,"disp") == 0) ) {
     fprintf(fp,"(PhaseRegAlloc *ra_, const Node *node, int idx) const { \n");
   } else {
-    fprintf(fp,"() const { ");
+    fprintf(fp,"() const { \n");
   }
 
   // Check for hexadecimal value OR replacement variable
   if( *encoding == '$' ) {
     // Replacement variable
     const char *rep_var = encoding + 1;
-    fprintf(fp,"// Replacement variable: %s\n", encoding+1);
+    fprintf(fp,"    // Replacement variable: %s\n", encoding+1);
     // Lookup replacement variable, rep_var, in operand's component list
     const Component *comp = oper._components.search(rep_var);
     assert( comp != NULL, "Replacement variable not found in components");
@@ -2874,10 +2852,10 @@ void ArchDesc::define_oper_interface(FILE *fp, OperandForm &oper, FormDict &glob
     } else if ( op->ideal_to_sReg_type(op->_ident) != Form::none ) {
       // StackSlot for an sReg comes either from input node or from self, when idx==0
       fprintf(fp,"    if( idx != 0 ) {\n");
-      fprintf(fp,"      // Access register number for input operand\n");
+      fprintf(fp,"      // Access stack offset (register number) for input operand\n");
       fprintf(fp,"      return ra_->reg2offset(ra_->get_reg_first(node->in(idx)));/* sReg */\n");
       fprintf(fp,"    }\n");
-      fprintf(fp,"    // Access register number from myself\n");
+      fprintf(fp,"    // Access stack offset (register number) from myself\n");
       fprintf(fp,"    return ra_->reg2offset(ra_->get_reg_first(node));/* sReg */\n");
     } else if (op->_matrule && op->_matrule->is_base_constant(globals)) {
       // Constant
@@ -2894,7 +2872,7 @@ void ArchDesc::define_oper_interface(FILE *fp, OperandForm &oper, FormDict &glob
   }
   else if( *encoding == '0' && *(encoding+1) == 'x' ) {
     // Hex value
-    fprintf(fp,"return %s;", encoding);
+    fprintf(fp,"    return %s;\n", encoding);
   } else {
     assert( false, "Do not support octal or decimal encode constants");
   }
@@ -3127,8 +3105,8 @@ void ArchDesc::defineClasses(FILE *fp) {
     // Output the definition for number of relocation entries
     uint reloc_size = instr->reloc(_globalNames);
     if ( reloc_size != 0 ) {
-      fprintf(fp,"int  %sNode::reloc()   const {\n", instr->_ident);
-      fprintf(fp,  "  return  %d;\n", reloc_size );
+      fprintf(fp,"int %sNode::reloc() const {\n", instr->_ident);
+      fprintf(fp,"  return %d;\n", reloc_size);
       fprintf(fp,"}\n");
       fprintf(fp,"\n");
     }
@@ -3235,7 +3213,7 @@ void ArchDesc::defineClasses(FILE *fp) {
 class OutputReduceOp : public OutputMap {
 public:
   OutputReduceOp(FILE *hpp, FILE *cpp, FormDict &globals, ArchDesc &AD)
-    : OutputMap(hpp, cpp, globals, AD) {};
+    : OutputMap(hpp, cpp, globals, AD, "reduceOp") {};
 
   void declaration() { fprintf(_hpp, "extern const int   reduceOp[];\n"); }
   void definition()  { fprintf(_cpp, "const        int   reduceOp[] = {\n"); }
@@ -3270,7 +3248,7 @@ public:
 class OutputLeftOp : public OutputMap {
 public:
   OutputLeftOp(FILE *hpp, FILE *cpp, FormDict &globals, ArchDesc &AD)
-    : OutputMap(hpp, cpp, globals, AD) {};
+    : OutputMap(hpp, cpp, globals, AD, "leftOp") {};
 
   void declaration() { fprintf(_hpp, "extern const int   leftOp[];\n"); }
   void definition()  { fprintf(_cpp, "const        int   leftOp[] = {\n"); }
@@ -3300,7 +3278,7 @@ public:
 class OutputRightOp : public OutputMap {
 public:
   OutputRightOp(FILE *hpp, FILE *cpp, FormDict &globals, ArchDesc &AD)
-    : OutputMap(hpp, cpp, globals, AD) {};
+    : OutputMap(hpp, cpp, globals, AD, "rightOp") {};
 
   void declaration() { fprintf(_hpp, "extern const int   rightOp[];\n"); }
   void definition()  { fprintf(_cpp, "const        int   rightOp[] = {\n"); }
@@ -3330,11 +3308,11 @@ public:
 class OutputRuleName : public OutputMap {
 public:
   OutputRuleName(FILE *hpp, FILE *cpp, FormDict &globals, ArchDesc &AD)
-    : OutputMap(hpp, cpp, globals, AD) {};
+    : OutputMap(hpp, cpp, globals, AD, "ruleName") {};
 
   void declaration() { fprintf(_hpp, "extern const char *ruleName[];\n"); }
   void definition()  { fprintf(_cpp, "const char        *ruleName[] = {\n"); }
-  void closing()     { fprintf(_cpp, "  \"no trailing comma\"\n");
+  void closing()     { fprintf(_cpp, "  \"invalid rule name\" // no trailing comma\n");
                        OutputMap::closing();
   }
   void map(OpClassForm &opc)  { fprintf(_cpp, "  \"%s\"", _AD.machOperEnum(opc._ident) ); }
@@ -3348,7 +3326,7 @@ public:
 class OutputSwallowed : public OutputMap {
 public:
   OutputSwallowed(FILE *hpp, FILE *cpp, FormDict &globals, ArchDesc &AD)
-    : OutputMap(hpp, cpp, globals, AD) {};
+    : OutputMap(hpp, cpp, globals, AD, "swallowed") {};
 
   void declaration() { fprintf(_hpp, "extern const bool  swallowed[];\n"); }
   void definition()  { fprintf(_cpp, "const        bool  swallowed[] = {\n"); }
@@ -3369,7 +3347,7 @@ public:
 class OutputInstChainRule : public OutputMap {
 public:
   OutputInstChainRule(FILE *hpp, FILE *cpp, FormDict &globals, ArchDesc &AD)
-    : OutputMap(hpp, cpp, globals, AD) {};
+    : OutputMap(hpp, cpp, globals, AD, "instruction_chain_rule") {};
 
   void declaration() { fprintf(_hpp, "extern const bool  instruction_chain_rule[];\n"); }
   void definition()  { fprintf(_cpp, "const        bool  instruction_chain_rule[] = {\n"); }
@@ -3410,7 +3388,7 @@ void ArchDesc::build_map(OutputMap &map) {
     if ( op->ideal_only() )  continue;
 
     // Generate the entry for this opcode
-    map.map(*op);    fprintf(fp_cpp, ", // %d\n", idx);
+    fprintf(fp_cpp, "  /* %4d */", idx); map.map(*op); fprintf(fp_cpp, ",\n");
     ++idx;
   };
   fprintf(fp_cpp, "  // last operand\n");
@@ -3419,7 +3397,7 @@ void ArchDesc::build_map(OutputMap &map) {
   map.record_position(OutputMap::BEGIN_OPCLASSES, idx );
   _opclass.reset();
   for(; (opc = (OpClassForm*)_opclass.iter()) != NULL; ) {
-    map.map(*opc);    fprintf(fp_cpp, ", // %d\n", idx);
+    fprintf(fp_cpp, "  /* %4d */", idx); map.map(*opc); fprintf(fp_cpp, ",\n");
     ++idx;
   };
   fprintf(fp_cpp, "  // last operand class\n");
@@ -3429,7 +3407,7 @@ void ArchDesc::build_map(OutputMap &map) {
   _internalOpNames.reset();
   char *name = NULL;
   for(; (name = (char *)_internalOpNames.iter()) != NULL; ) {
-    map.map(name);    fprintf(fp_cpp, ", // %d\n", idx);
+    fprintf(fp_cpp, "  /* %4d */", idx); map.map(name); fprintf(fp_cpp, ",\n");
     ++idx;
   };
   fprintf(fp_cpp, "  // last internally defined operand\n");
@@ -3447,7 +3425,7 @@ void ArchDesc::build_map(OutputMap &map) {
         if ( ! inst->is_simple_chain_rule(_globalNames) ) continue;
         if ( inst->rematerialize(_globalNames, get_registers()) ) continue;
 
-        map.map(*inst);      fprintf(fp_cpp, ", // %d\n", idx);
+        fprintf(fp_cpp, "  /* %4d */", idx); map.map(*inst); fprintf(fp_cpp, ",\n");
         ++idx;
       };
       map.record_position(OutputMap::BEGIN_REMATERIALIZE, idx );
@@ -3458,7 +3436,7 @@ void ArchDesc::build_map(OutputMap &map) {
         if ( ! inst->is_simple_chain_rule(_globalNames) ) continue;
         if ( ! inst->rematerialize(_globalNames, get_registers()) ) continue;
 
-        map.map(*inst);      fprintf(fp_cpp, ", // %d\n", idx);
+        fprintf(fp_cpp, "  /* %4d */", idx); map.map(*inst); fprintf(fp_cpp, ",\n");
         ++idx;
       };
       map.record_position(OutputMap::END_INST_CHAIN_RULES, idx );
@@ -3472,7 +3450,7 @@ void ArchDesc::build_map(OutputMap &map) {
         if ( inst->is_simple_chain_rule(_globalNames) ) continue;
         if ( ! inst->rematerialize(_globalNames, get_registers()) ) continue;
 
-        map.map(*inst);      fprintf(fp_cpp, ", // %d\n", idx);
+        fprintf(fp_cpp, "  /* %4d */", idx); map.map(*inst); fprintf(fp_cpp, ",\n");
         ++idx;
       };
       map.record_position(OutputMap::END_REMATERIALIZE, idx );
@@ -3483,7 +3461,7 @@ void ArchDesc::build_map(OutputMap &map) {
         if ( inst->is_simple_chain_rule(_globalNames) ) continue;
         if ( inst->rematerialize(_globalNames, get_registers()) ) continue;
 
-        map.map(*inst);      fprintf(fp_cpp, ", // %d\n", idx);
+        fprintf(fp_cpp, "  /* %4d */", idx); map.map(*inst); fprintf(fp_cpp, ",\n");
         ++idx;
       };
     }
@@ -3565,7 +3543,7 @@ void ArchDesc::buildReduceMaps(FILE *fp_hpp, FILE *fp_cpp) {
     next              = _register->iter_RegDefs();
     char policy       = reg_save_policy(rdef->_callconv);
     const char *comma = (next != NULL) ? "," : " // no trailing comma";
-    fprintf(fp_cpp, "  '%c'%s\n", policy, comma);
+    fprintf(fp_cpp, "  '%c'%s // %s\n", policy, comma, rdef->_regname);
   }
   fprintf(fp_cpp, "};\n\n");
 
@@ -3577,7 +3555,7 @@ void ArchDesc::buildReduceMaps(FILE *fp_hpp, FILE *fp_cpp) {
     next        = _register->iter_RegDefs();
     char policy = reg_save_policy(rdef->_c_conv);
     const char *comma = (next != NULL) ? "," : " // no trailing comma";
-    fprintf(fp_cpp, "  '%c'%s\n", policy, comma);
+    fprintf(fp_cpp, "  '%c'%s // %s\n", policy, comma, rdef->_regname);
   }
   fprintf(fp_cpp, "};\n\n");
 
@@ -3638,6 +3616,8 @@ static void path_to_constant(FILE *fp, FormDict &globals,
       fprintf(fp, "_leaf->bottom_type()->is_ptr()");
     } else if ( (strcmp(optype,"ConN") == 0) ) {
       fprintf(fp, "_leaf->bottom_type()->is_narrowoop()");
+    } else if ( (strcmp(optype,"ConNKlass") == 0) ) {
+      fprintf(fp, "_leaf->bottom_type()->is_narrowklass()");
     } else if ( (strcmp(optype,"ConF") == 0) ) {
       fprintf(fp, "_leaf->getf()");
     } else if ( (strcmp(optype,"ConD") == 0) ) {
@@ -3786,7 +3766,7 @@ void ArchDesc::buildMachNode(FILE *fp_cpp, InstructForm *inst, const char *inden
       // For each operand not in the match rule, call MachOperGenerator
       // with the enum for the opcode that needs to be built.
       ComponentList clist = inst->_components;
-      int         index  = clist.operand_position(comp->_name, comp->_usedef);
+      int         index  = clist.operand_position(comp->_name, comp->_usedef, inst);
       const char *opcode = machOperEnum(comp->_type);
       fprintf(fp_cpp, "%s node->set_opnd_array(%d, ", indent, index);
       fprintf(fp_cpp, "MachOperGenerator(%s, C));\n", opcode);
@@ -3981,7 +3961,7 @@ void ArchDesc::buildMachNodeGenerator(FILE *fp_cpp) {
     fprintf(fp_cpp, "  case %s_rule:", opClass);
 
     // Start local scope
-    fprintf(fp_cpp, "  {\n");
+    fprintf(fp_cpp, " {\n");
     // Generate code to construct the new MachNode
     buildMachNode(fp_cpp, inst, "     ");
     // Return result and exit scope
@@ -4131,6 +4111,9 @@ static int PrintAdlcCisc = 0;
 // Get info for the CISC_oracle and MachNode::cisc_version()
 void ArchDesc::identify_cisc_spill_instructions() {
 
+  if (_frame == NULL)
+    return;
+
   // Find the user-defined operand for cisc-spilling
   if( _frame->_cisc_spilling_operand_name != NULL ) {
     const Form *form = _globalNames[_frame->_cisc_spilling_operand_name];
diff --git a/hotspot/src/share/vm/adlc/output_h.cpp b/hotspot/src/share/vm/adlc/output_h.cpp
index 8aea9287116..bf538baddf3 100644
--- a/hotspot/src/share/vm/adlc/output_h.cpp
+++ b/hotspot/src/share/vm/adlc/output_h.cpp
@@ -25,6 +25,8 @@
 // output_h.cpp - Class HPP file output routines for architecture definition
 #include "adlc.hpp"
 
+// The comment delimiter used in format statements after assembler instructions.
+#define commentSeperator "!"
 
 // Generate the #define that describes the number of registers.
 static void defineRegCount(FILE *fp, RegisterForm *registers) {
@@ -79,10 +81,15 @@ void ArchDesc::buildMachRegisterNumbers(FILE *fp_hpp) {
     _register->reset_RegDefs();
     int i = 0;
     while( (reg_def = _register->iter_RegDefs()) != NULL ) {
-      fprintf(fp_hpp,"  %s_num,\t\t// %d\n", reg_def->_regname, i++);
+      fprintf(fp_hpp,"  %s_num,", reg_def->_regname);
+      for (int j = 0; j < 20-(int)strlen(reg_def->_regname); j++) fprintf(fp_hpp, " ");
+      fprintf(fp_hpp," // enum %3d, regnum %3d, reg encode %3s\n",
+              i++,
+              reg_def->register_num(),
+              reg_def->register_encode());
     }
     // Finish defining enumeration
-    fprintf(fp_hpp, "  _last_Mach_Reg\t// %d\n", i);
+    fprintf(fp_hpp, "  _last_Mach_Reg            // %d\n", i);
     fprintf(fp_hpp, "};\n");
   }
 
@@ -121,13 +128,24 @@ void ArchDesc::buildMachRegisterEncodes(FILE *fp_hpp) {
     fprintf(fp_hpp, "// in the order of occurrence in the alloc_class(es).\n");
     fprintf(fp_hpp, "enum MachRegisterEncodes {\n");
 
+    // Find max enum string length.
+    size_t maxlen = 0;
+    _register->reset_RegDefs();
+    reg_def = _register->iter_RegDefs();
+    while (reg_def != NULL) {
+      size_t len = strlen(reg_def->_regname);
+      if (len > maxlen) maxlen = len;
+      reg_def = _register->iter_RegDefs();
+    }
+
     // Output the register encoding for each register in the allocation classes
     _register->reset_RegDefs();
     reg_def_next = _register->iter_RegDefs();
     while( (reg_def = reg_def_next) != NULL ) {
       reg_def_next = _register->iter_RegDefs();
-      fprintf(fp_hpp,"  %s_enc = %s%s\n",
-              reg_def->_regname, reg_def->register_encode(), reg_def_next == NULL? "" : "," );
+      fprintf(fp_hpp,"  %s_enc", reg_def->_regname);
+      for (size_t i = strlen(reg_def->_regname); i < maxlen; i++) fprintf(fp_hpp, " ");
+      fprintf(fp_hpp," = %3s%s\n", reg_def->register_encode(), reg_def_next == NULL? "" : "," );
     }
     // Finish defining enumeration
     fprintf(fp_hpp, "};\n");
@@ -177,14 +195,6 @@ static void in_RegMask(FILE *fp) {
   fprintf(fp,"  virtual const RegMask *in_RegMask(int index) const;\n");
 }
 
-static void declare_hash(FILE *fp) {
-  fprintf(fp,"  virtual uint           hash() const;\n");
-}
-
-static void declare_cmp(FILE *fp) {
-  fprintf(fp,"  virtual uint           cmp( const MachOper &oper ) const;\n");
-}
-
 static void declareConstStorage(FILE *fp, FormDict &globals, OperandForm *oper) {
   int i = 0;
   Component *comp;
@@ -207,6 +217,10 @@ static void declareConstStorage(FILE *fp, FormDict &globals, OperandForm *oper)
       if (i > 0) fprintf(fp,", ");
       fprintf(fp,"  const TypeNarrowOop *_c%d;\n", i);
     }
+    else if (!strcmp(type, "ConNKlass")) {
+      if (i > 0) fprintf(fp,", ");
+      fprintf(fp,"  const TypeNarrowKlass *_c%d;\n", i);
+    }
     else if (!strcmp(type, "ConL")) {
       if (i > 0) fprintf(fp,", ");
       fprintf(fp,"  jlong          _c%d;\n", i);
@@ -243,6 +257,10 @@ static void declareConstStorage(FILE *fp, FormDict &globals, OperandForm *oper)
         fprintf(fp,"  const TypePtr *_c%d;\n", i);
         i++;
       }
+      else if (!strcmp(comp->base_type(globals), "ConNKlass")) {
+        fprintf(fp,"  const TypePtr *_c%d;\n", i);
+        i++;
+      }
       else if (!strcmp(comp->base_type(globals), "ConL")) {
         fprintf(fp,"  jlong            _c%d;\n", i);
         i++;
@@ -288,11 +306,12 @@ static void defineConstructor(FILE *fp, const char *name, uint num_consts,
       fprintf(fp,is_ideal_bool ? "BoolTest::mask c%d" : "int32 c%d", i);
       break;
     }
-    case Form::idealN : { fprintf(fp,"const TypeNarrowOop *c%d", i); break; }
-    case Form::idealP : { fprintf(fp,"const TypePtr *c%d", i); break; }
-    case Form::idealL : { fprintf(fp,"jlong c%d", i);   break;        }
-    case Form::idealF : { fprintf(fp,"jfloat c%d", i);  break;        }
-    case Form::idealD : { fprintf(fp,"jdouble c%d", i); break;        }
+    case Form::idealN :      { fprintf(fp,"const TypeNarrowOop *c%d", i); break; }
+    case Form::idealNKlass : { fprintf(fp,"const TypeNarrowKlass *c%d", i); break; }
+    case Form::idealP :      { fprintf(fp,"const TypePtr *c%d", i); break; }
+    case Form::idealL :      { fprintf(fp,"jlong c%d", i);   break;        }
+    case Form::idealF :      { fprintf(fp,"jfloat c%d", i);  break;        }
+    case Form::idealD :      { fprintf(fp,"jdouble c%d", i); break;        }
     default:
       assert(!is_ideal_bool, "Non-constant operand lacks component list.");
       break;
@@ -316,6 +335,11 @@ static void defineConstructor(FILE *fp, const char *name, uint num_consts,
         fprintf(fp,"const TypePtr *c%d", i);
         i++;
       }
+      else if (!strcmp(comp->base_type(globals), "ConNKlass")) {
+        if (i > 0) fprintf(fp,", ");
+        fprintf(fp,"const TypePtr *c%d", i);
+        i++;
+      }
       else if (!strcmp(comp->base_type(globals), "ConL")) {
         if (i > 0) fprintf(fp,", ");
         fprintf(fp,"jlong c%d", i);
@@ -358,18 +382,19 @@ static void defineConstructor(FILE *fp, const char *name, uint num_consts,
 static void defineCCodeDump(OperandForm* oper, FILE *fp, int i) {
   assert(oper != NULL, "what");
   CondInterface* cond = oper->_interface->is_CondInterface();
-  fprintf(fp, "         if( _c%d == BoolTest::eq ) st->print(\"%s\");\n",i,cond->_equal_format);
-  fprintf(fp, "    else if( _c%d == BoolTest::ne ) st->print(\"%s\");\n",i,cond->_not_equal_format);
-  fprintf(fp, "    else if( _c%d == BoolTest::le ) st->print(\"%s\");\n",i,cond->_less_equal_format);
-  fprintf(fp, "    else if( _c%d == BoolTest::ge ) st->print(\"%s\");\n",i,cond->_greater_equal_format);
-  fprintf(fp, "    else if( _c%d == BoolTest::lt ) st->print(\"%s\");\n",i,cond->_less_format);
-  fprintf(fp, "    else if( _c%d == BoolTest::gt ) st->print(\"%s\");\n",i,cond->_greater_format);
+  fprintf(fp, "       if( _c%d == BoolTest::eq ) st->print(\"%s\");\n",i,cond->_equal_format);
+  fprintf(fp, "  else if( _c%d == BoolTest::ne ) st->print(\"%s\");\n",i,cond->_not_equal_format);
+  fprintf(fp, "  else if( _c%d == BoolTest::le ) st->print(\"%s\");\n",i,cond->_less_equal_format);
+  fprintf(fp, "  else if( _c%d == BoolTest::ge ) st->print(\"%s\");\n",i,cond->_greater_equal_format);
+  fprintf(fp, "  else if( _c%d == BoolTest::lt ) st->print(\"%s\");\n",i,cond->_less_format);
+  fprintf(fp, "  else if( _c%d == BoolTest::gt ) st->print(\"%s\");\n",i,cond->_greater_format);
 }
 
 // Output code that dumps constant values, increment "i" if type is constant
 static uint dump_spec_constant(FILE *fp, const char *ideal_type, uint i, OperandForm* oper) {
   if (!strcmp(ideal_type, "ConI")) {
     fprintf(fp,"   st->print(\"#%%d\", _c%d);\n", i);
+    fprintf(fp,"   st->print(\"/0x%%08x\", _c%d);\n", i);
     ++i;
   }
   else if (!strcmp(ideal_type, "ConP")) {
@@ -380,16 +405,25 @@ static uint dump_spec_constant(FILE *fp, const char *ideal_type, uint i, Operand
     fprintf(fp,"    _c%d->dump_on(st);\n", i);
     ++i;
   }
+  else if (!strcmp(ideal_type, "ConNKlass")) {
+    fprintf(fp,"    _c%d->dump_on(st);\n", i);
+    ++i;
+  }
   else if (!strcmp(ideal_type, "ConL")) {
     fprintf(fp,"    st->print(\"#\" INT64_FORMAT, _c%d);\n", i);
+    fprintf(fp,"    st->print(\"/\" PTR64_FORMAT, _c%d);\n", i);
     ++i;
   }
   else if (!strcmp(ideal_type, "ConF")) {
     fprintf(fp,"    st->print(\"#%%f\", _c%d);\n", i);
+    fprintf(fp,"    jint _c%di = JavaValue(_c%d).get_jint();\n", i, i);
+    fprintf(fp,"    st->print(\"/0x%%x/\", _c%di);\n", i);
     ++i;
   }
   else if (!strcmp(ideal_type, "ConD")) {
     fprintf(fp,"    st->print(\"#%%f\", _c%d);\n", i);
+    fprintf(fp,"    jlong _c%dl = JavaValue(_c%d).get_jlong();\n", i, i);
+    fprintf(fp,"    st->print(\"/\" PTR64_FORMAT, _c%dl);\n", i);
     ++i;
   }
   else if (!strcmp(ideal_type, "Bool")) {
@@ -411,7 +445,7 @@ void gen_oper_format(FILE *fp, FormDict &globals, OperandForm &oper, bool for_c_
   }
 
   // Local pointer indicates remaining part of format rule
-  uint  idx = 0;                   // position of operand in match rule
+  int idx = 0;                   // position of operand in match rule
 
   // Generate internal format function, used when stored locally
   fprintf(fp, "\n#ifndef PRODUCT\n");
@@ -426,13 +460,12 @@ void gen_oper_format(FILE *fp, FormDict &globals, OperandForm &oper, bool for_c_
       oper._format->_rep_vars.reset();
       oper._format->_strings.reset();
       while ( (string = oper._format->_strings.iter()) != NULL ) {
-        fprintf(fp,"  ");
 
         // Check if this is a standard string or a replacement variable
         if ( string != NameList::_signal ) {
           // Normal string
           // Pass through to st->print
-          fprintf(fp,"st->print(\"%s\");\n", string);
+          fprintf(fp,"  st->print(\"%s\");\n", string);
         } else {
           // Replacement variable
           const char *rep_var = oper._format->_rep_vars.iter();
@@ -455,7 +488,7 @@ void gen_oper_format(FILE *fp, FormDict &globals, OperandForm &oper, bool for_c_
           }
 
           // output invocation of "$..."s format function
-          if ( op != NULL )   op->int_format(fp, globals, idx);
+          if ( op != NULL ) op->int_format(fp, globals, idx);
 
           if ( idx == -1 ) {
             fprintf(stderr,
@@ -498,13 +531,12 @@ void gen_oper_format(FILE *fp, FormDict &globals, OperandForm &oper, bool for_c_
       oper._format->_rep_vars.reset();
       oper._format->_strings.reset();
       while ( (string = oper._format->_strings.iter()) != NULL ) {
-        fprintf(fp,"  ");
 
         // Check if this is a standard string or a replacement variable
         if ( string != NameList::_signal ) {
           // Normal string
           // Pass through to st->print
-          fprintf(fp,"st->print(\"%s\");\n", string);
+          fprintf(fp,"  st->print(\"%s\");\n", string);
         } else {
           // Replacement variable
           const char *rep_var = oper._format->_rep_vars.iter();
@@ -529,7 +561,7 @@ void gen_oper_format(FILE *fp, FormDict &globals, OperandForm &oper, bool for_c_
           if ( op != NULL )   op->ext_format(fp, globals, idx);
 
           // Lookup the index position of the replacement variable
-          idx      = oper._components.operand_position_format(rep_var);
+          idx      = oper._components.operand_position_format(rep_var, &oper);
           if ( idx == -1 ) {
             fprintf(stderr,
                     "Using a name, %s, that isn't in match rule\n", rep_var);
@@ -583,7 +615,7 @@ void gen_inst_format(FILE *fp, FormDict &globals, InstructForm &inst, bool for_c
     inst._format->_rep_vars.reset();
     inst._format->_strings.reset();
     while( (string = inst._format->_strings.iter()) != NULL ) {
-      fprintf(fp,"    ");
+      fprintf(fp,"  ");
       // Check if this is a standard string or a replacement variable
       if( string == NameList::_signal ) { // Replacement variable
         const char* rep_var =  inst._format->_rep_vars.iter();
@@ -640,11 +672,12 @@ void gen_inst_format(FILE *fp, FormDict &globals, InstructForm &inst, bool for_c
   if( call_type != Form::invalid_type ) {
     switch( call_type ) {
     case Form::JAVA_DYNAMIC:
-      fprintf(fp,"    _method->print_short_name();\n");
+      fprintf(fp,"  _method->print_short_name(st);\n");
       break;
     case Form::JAVA_STATIC:
-      fprintf(fp,"    if( _method ) _method->print_short_name(st); else st->print(\" wrapper for: %%s\", _name);\n");
-      fprintf(fp,"    if( !_method ) dump_trap_args(st);\n");
+      fprintf(fp,"  if( _method ) _method->print_short_name(st);\n");
+      fprintf(fp,"  else st->print(\" wrapper for: %%s\", _name);\n");
+      fprintf(fp,"  if( !_method ) dump_trap_args(st);\n");
       break;
     case Form::JAVA_COMPILED:
     case Form::JAVA_INTERP:
@@ -652,52 +685,46 @@ void gen_inst_format(FILE *fp, FormDict &globals, InstructForm &inst, bool for_c
     case Form::JAVA_RUNTIME:
     case Form::JAVA_LEAF:
     case Form::JAVA_NATIVE:
-      fprintf(fp,"    st->print(\" %%s\", _name);");
+      fprintf(fp,"  st->print(\" %%s\", _name);");
       break;
     default:
-      assert(0,"ShouldNotReacHere");
+      assert(0,"ShouldNotReachHere");
     }
-    fprintf(fp,  "    st->print_cr(\"\");\n" );
-    fprintf(fp,  "    if (_jvms) _jvms->format(ra, this, st); else st->print_cr(\"        No JVM State Info\");\n" );
-    fprintf(fp,  "    st->print(\"        # \");\n" );
-    fprintf(fp,  "    if( _jvms ) _oop_map->print_on(st);\n");
+    fprintf(fp,  "  st->print_cr(\"\");\n" );
+    fprintf(fp,  "  if (_jvms) _jvms->format(ra, this, st); else st->print_cr(\"        No JVM State Info\");\n" );
+    fprintf(fp,  "  st->print(\"        # \");\n" );
+    fprintf(fp,  "  if( _jvms && _oop_map ) _oop_map->print_on(st);\n");
   }
   else if(inst.is_ideal_safepoint()) {
-    fprintf(fp,  "    st->print(\"\");\n" );
-    fprintf(fp,  "    if (_jvms) _jvms->format(ra, this, st); else st->print_cr(\"        No JVM State Info\");\n" );
-    fprintf(fp,  "    st->print(\"        # \");\n" );
-    fprintf(fp,  "    if( _jvms ) _oop_map->print_on(st);\n");
+    fprintf(fp,  "  st->print(\"\");\n" );
+    fprintf(fp,  "  if (_jvms) _jvms->format(ra, this, st); else st->print_cr(\"        No JVM State Info\");\n" );
+    fprintf(fp,  "  st->print(\"        # \");\n" );
+    fprintf(fp,  "  if( _jvms && _oop_map ) _oop_map->print_on(st);\n");
   }
   else if( inst.is_ideal_if() ) {
-    fprintf(fp,  "    st->print(\"  P=%%f C=%%f\",_prob,_fcnt);\n" );
+    fprintf(fp,  "  st->print(\"  P=%%f C=%%f\",_prob,_fcnt);\n" );
   }
   else if( inst.is_ideal_mem() ) {
     // Print out the field name if available to improve readability
-    fprintf(fp,  "    if (ra->C->alias_type(adr_type())->field() != NULL) {\n");
-    fprintf(fp,  "      ciField* f = ra->C->alias_type(adr_type())->field();\n");
-    fprintf(fp,  "      st->print(\" ! Field: \");\n");
-    fprintf(fp,  "      if (f->is_volatile())\n");
-    fprintf(fp,  "        st->print(\"volatile \");\n");
-    fprintf(fp,  "      f->holder()->name()->print_symbol_on(st);\n");
-    fprintf(fp,  "      st->print(\".\");\n");
-    fprintf(fp,  "      f->name()->print_symbol_on(st);\n");
-    fprintf(fp,  "      if (f->is_constant())\n");
-    fprintf(fp,  "        st->print(\" (constant)\");\n");
-    fprintf(fp,  "    } else\n");
+    fprintf(fp,  "  if (ra->C->alias_type(adr_type())->field() != NULL) {\n");
+    fprintf(fp,  "    ciField* f = ra->C->alias_type(adr_type())->field();\n");
+    fprintf(fp,  "    st->print(\" %s Field: \");\n", commentSeperator);
+    fprintf(fp,  "    if (f->is_volatile())\n");
+    fprintf(fp,  "      st->print(\"volatile \");\n");
+    fprintf(fp,  "    f->holder()->name()->print_symbol_on(st);\n");
+    fprintf(fp,  "    st->print(\".\");\n");
+    fprintf(fp,  "    f->name()->print_symbol_on(st);\n");
+    fprintf(fp,  "    if (f->is_constant())\n");
+    fprintf(fp,  "      st->print(\" (constant)\");\n");
+    fprintf(fp,  "  } else {\n");
     // Make sure 'Volatile' gets printed out
     fprintf(fp,  "    if (ra->C->alias_type(adr_type())->is_volatile())\n");
     fprintf(fp,  "      st->print(\" volatile!\");\n");
+    fprintf(fp,  "  }\n");
   }
 
   // Complete the definition of the format function
-  fprintf(fp, "  }\n#endif\n");
-}
-
-static bool is_non_constant(char* x) {
-  // Tells whether the string (part of an operator interface) is non-constant.
-  // Simply detect whether there is an occurrence of a formal parameter,
-  // which will always begin with '$'.
-  return strchr(x, '$') == 0;
+  fprintf(fp, "}\n#endif\n");
 }
 
 void ArchDesc::declare_pipe_classes(FILE *fp_hpp) {
@@ -1089,7 +1116,7 @@ void ArchDesc::declare_pipe_classes(FILE *fp_hpp) {
   fprintf(fp_hpp, "  static void initialize_nops(MachNode *nop_list[%d], Compile* C);\n\n",
     _pipeline->_nopcnt);
   fprintf(fp_hpp, "#ifndef PRODUCT\n");
-  fprintf(fp_hpp, "  void dump() const;\n");
+  fprintf(fp_hpp, "  void dump(outputStream *st = tty) const;\n");
   fprintf(fp_hpp, "#endif\n");
   fprintf(fp_hpp, "};\n\n");
 
@@ -1234,12 +1261,12 @@ void ArchDesc::declareClasses(FILE *fp) {
       unsigned int position = 0;
       const char  *opret, *opname, *optype;
       oper->_matrule->base_operand(position,_globalNames,opret,opname,optype);
-      fprintf(fp,"  virtual const Type *type() const {");
+      fprintf(fp,"  virtual const Type    *type() const {");
       const char *type = getIdealType(optype);
       if( type != NULL ) {
         Form::DataType data_type = oper->is_base_constant(_globalNames);
         // Check if we are an ideal pointer type
-        if( data_type == Form::idealP || data_type == Form::idealN ) {
+        if( data_type == Form::idealP || data_type == Form::idealN || data_type == Form::idealNKlass ) {
           // Return the ideal type we already have: <TypePtr *>
           fprintf(fp," return _c0;");
         } else {
@@ -1377,6 +1404,16 @@ void ArchDesc::declareClasses(FILE *fp) {
           fprintf(fp,   " return _c0->get_ptrtype()->reloc();");
           fprintf(fp, " }\n");
         }
+        else if (!strcmp(oper->ideal_type(_globalNames), "ConNKlass")) {
+          // Access the locally stored constant
+          fprintf(fp,"  virtual intptr_t       constant() const {");
+          fprintf(fp,   " return _c0->get_ptrtype()->get_con();");
+          fprintf(fp, " }\n");
+          // Generate query to determine if this pointer is an oop
+          fprintf(fp,"  virtual relocInfo::relocType           constant_reloc() const {");
+          fprintf(fp,   " return _c0->get_ptrtype()->reloc();");
+          fprintf(fp, " }\n");
+        }
         else if (!strcmp(oper->ideal_type(_globalNames), "ConL")) {
           fprintf(fp,"  virtual intptr_t       constant() const {");
           // We don't support addressing modes with > 4Gig offsets.
@@ -1503,12 +1540,19 @@ void ArchDesc::declareClasses(FILE *fp) {
       fprintf(fp, "  GrowableArray<Label*> _index2label;\n");
     }
     fprintf(fp,"public:\n");
-    fprintf(fp,"  MachOper *opnd_array(uint operand_index) const { assert(operand_index < _num_opnds, \"invalid _opnd_array index\"); return _opnd_array[operand_index]; }\n");
-    fprintf(fp,"  void      set_opnd_array(uint operand_index, MachOper *operand) { assert(operand_index < _num_opnds, \"invalid _opnd_array index\"); _opnd_array[operand_index] = operand; }\n");
+    fprintf(fp,"  MachOper *opnd_array(uint operand_index) const {\n");
+    fprintf(fp,"    assert(operand_index < _num_opnds, \"invalid _opnd_array index\");\n");
+    fprintf(fp,"    return _opnd_array[operand_index];\n");
+    fprintf(fp,"  }\n");
+    fprintf(fp,"  void      set_opnd_array(uint operand_index, MachOper *operand) {\n");
+    fprintf(fp,"    assert(operand_index < _num_opnds, \"invalid _opnd_array index\");\n");
+    fprintf(fp,"    _opnd_array[operand_index] = operand;\n");
+    fprintf(fp,"  }\n");
     fprintf(fp,"private:\n");
     if ( instr->is_ideal_jump() ) {
       fprintf(fp,"  virtual void           add_case_label(int index_num, Label* blockLabel) {\n");
-      fprintf(fp,"                                          _index2label.at_put_grow(index_num, blockLabel);}\n");
+      fprintf(fp,"    _index2label.at_put_grow(index_num, blockLabel);\n");
+      fprintf(fp,"  }\n");
     }
     if( can_cisc_spill() && (instr->cisc_spill_alternate() != NULL) ) {
       fprintf(fp,"  const RegMask  *_cisc_RegMask;\n");
@@ -1544,7 +1588,7 @@ void ArchDesc::declareClasses(FILE *fp) {
     while (attr != NULL) {
       if (strcmp(attr->_ident,"ins_cost") &&
           strcmp(attr->_ident,"ins_short_branch")) {
-        fprintf(fp,"  int             %s() const { return %s; }\n",
+        fprintf(fp,"          int            %s() const { return %s; }\n",
                 attr->_ident, attr->_val);
       }
       // Check value for ins_avoid_back_to_back, and if it is true (1), set the flag
@@ -1628,12 +1672,12 @@ void ArchDesc::declareClasses(FILE *fp) {
 
     // Output the declaration for number of relocation entries
     if ( instr->reloc(_globalNames) != 0 ) {
-      fprintf(fp,"  virtual int            reloc()   const;\n");
+      fprintf(fp,"  virtual int            reloc() const;\n");
     }
 
     if (instr->alignment() != 1) {
-      fprintf(fp,"  virtual int            alignment_required()   const { return %d; }\n", instr->alignment());
-      fprintf(fp,"  virtual int            compute_padding(int current_offset)   const;\n");
+      fprintf(fp,"  virtual int            alignment_required() const { return %d; }\n", instr->alignment());
+      fprintf(fp,"  virtual int            compute_padding(int current_offset) const;\n");
     }
 
     // Starting point for inputs matcher wants.
@@ -1803,13 +1847,14 @@ void ArchDesc::declareClasses(FILE *fp) {
       // as is done for pointers
       //
       // Construct appropriate constant type containing the constant value.
-      fprintf(fp,"  virtual const class Type *bottom_type() const{\n");
+      fprintf(fp,"  virtual const class Type *bottom_type() const {\n");
       switch( data_type ) {
       case Form::idealI:
         fprintf(fp,"    return  TypeInt::make(opnd_array(1)->constant());\n");
         break;
       case Form::idealP:
       case Form::idealN:
+      case Form::idealNKlass:
         fprintf(fp,"    return  opnd_array(1)->type();\n");
         break;
       case Form::idealD:
@@ -1833,7 +1878,7 @@ void ArchDesc::declareClasses(FILE *fp) {
       // !!!!! !!!!!
       // Provide explicit bottom type for conversions to int
       // On Intel the result operand is a stackSlot, untyped.
-      fprintf(fp,"  virtual const class Type *bottom_type() const{");
+      fprintf(fp,"  virtual const class Type *bottom_type() const {");
       fprintf(fp,   " return  TypeInt::INT;");
       fprintf(fp, " };\n");
     }*/
@@ -1854,7 +1899,7 @@ void ArchDesc::declareClasses(FILE *fp) {
       // BoxNode provides the address of a stack slot.
       // Define its bottom type to be TypeRawPtr::BOTTOM instead of TypePtr::BOTTOM
       // This prevent s insert_anti_dependencies from complaining. It will
-      // complain if it see that the pointer base is TypePtr::BOTTOM since
+      // complain if it sees that the pointer base is TypePtr::BOTTOM since
       // it doesn't understand what that might alias.
       fprintf(fp,"  const Type            *bottom_type() const { return TypeRawPtr::BOTTOM; } // Box?\n");
     }
@@ -2017,7 +2062,7 @@ void ArchDesc::defineStateClass(FILE *fp) {
 class OutputMachOperands : public OutputMap {
 public:
   OutputMachOperands(FILE *hpp, FILE *cpp, FormDict &globals, ArchDesc &AD)
-    : OutputMap(hpp, cpp, globals, AD) {};
+    : OutputMap(hpp, cpp, globals, AD, "MachOperands") {};
 
   void declaration() { }
   void definition()  { fprintf(_cpp, "enum MachOperands {\n"); }
@@ -2052,7 +2097,7 @@ class OutputMachOpcodes : public OutputMap {
   int end_instructions;
 public:
   OutputMachOpcodes(FILE *hpp, FILE *cpp, FormDict &globals, ArchDesc &AD)
-    : OutputMap(hpp, cpp, globals, AD),
+    : OutputMap(hpp, cpp, globals, AD, "MachOpcodes"),
       begin_inst_chain_rule(-1), end_inst_chain_rule(-1), end_instructions(-1)
   {};
 
diff --git a/hotspot/src/share/vm/asm/assembler.cpp b/hotspot/src/share/vm/asm/assembler.cpp
index 339b3a462d9..7f5dbf21ae4 100644
--- a/hotspot/src/share/vm/asm/assembler.cpp
+++ b/hotspot/src/share/vm/asm/assembler.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/asm/assembler.hpp b/hotspot/src/share/vm/asm/assembler.hpp
index 2fd2b802479..897edb0a791 100644
--- a/hotspot/src/share/vm/asm/assembler.hpp
+++ b/hotspot/src/share/vm/asm/assembler.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/asm/codeBuffer.cpp b/hotspot/src/share/vm/asm/codeBuffer.cpp
index 64994a9f4fc..bb1ae18fcb5 100644
--- a/hotspot/src/share/vm/asm/codeBuffer.cpp
+++ b/hotspot/src/share/vm/asm/codeBuffer.cpp
@@ -1026,25 +1026,30 @@ class CodeComment: public CHeapObj<mtCode> {
     }
     return a;
   }
+
+  // Convenience for add_comment.
+  CodeComment* find_last(intptr_t offset) {
+    CodeComment* a = find(offset);
+    if (a != NULL) {
+      while ((a->_next != NULL) && (a->_next->_offset == offset)) {
+        a = a->_next;
+      }
+    }
+    return a;
+  }
 };
 
 
 void CodeComments::add_comment(intptr_t offset, const char * comment) {
-  CodeComment* c = new CodeComment(offset, comment);
-  CodeComment* insert = NULL;
-  if (_comments != NULL) {
-    CodeComment* c = _comments->find(offset);
-    insert = c;
-    while (c && c->offset() == offset) {
-      insert = c;
-      c = c->next();
-    }
-  }
-  if (insert) {
-    // insert after comments with same offset
-    c->set_next(insert->next());
-    insert->set_next(c);
+  CodeComment* c      = new CodeComment(offset, comment);
+  CodeComment* inspos = (_comments == NULL) ? NULL : _comments->find_last(offset);
+
+  if (inspos) {
+    // insert after already existing comments with same offset
+    c->set_next(inspos->next());
+    inspos->set_next(c);
   } else {
+    // no comments with such offset, yet. Insert before anything else.
     c->set_next(_comments);
     _comments = c;
   }
@@ -1052,12 +1057,11 @@ void CodeComments::add_comment(intptr_t offset, const char * comment) {
 
 
 void CodeComments::assign(CodeComments& other) {
-  assert(_comments == NULL, "don't overwrite old value");
   _comments = other._comments;
 }
 
 
-void CodeComments::print_block_comment(outputStream* stream, intptr_t offset) {
+void CodeComments::print_block_comment(outputStream* stream, intptr_t offset) const {
   if (_comments != NULL) {
     CodeComment* c = _comments->find(offset);
     while (c && c->offset() == offset) {
@@ -1085,6 +1089,7 @@ void CodeComments::free() {
 
 
 void CodeBuffer::decode() {
+  ttyLocker ttyl;
   Disassembler::decode(decode_begin(), insts_end());
   _decode_begin = insts_end();
 }
@@ -1096,6 +1101,7 @@ void CodeBuffer::skip_decode() {
 
 
 void CodeBuffer::decode_all() {
+  ttyLocker ttyl;
   for (int n = 0; n < (int)SECT_LIMIT; n++) {
     // dump contents of each section
     CodeSection* cs = code_section(n);
diff --git a/hotspot/src/share/vm/asm/codeBuffer.hpp b/hotspot/src/share/vm/asm/codeBuffer.hpp
index 0e01a9fbf82..63dba2dbb0d 100644
--- a/hotspot/src/share/vm/asm/codeBuffer.hpp
+++ b/hotspot/src/share/vm/asm/codeBuffer.hpp
@@ -253,7 +253,7 @@ public:
   }
 
   void add_comment(intptr_t offset, const char * comment) PRODUCT_RETURN;
-  void print_block_comment(outputStream* stream, intptr_t offset)  PRODUCT_RETURN;
+  void print_block_comment(outputStream* stream, intptr_t offset) const PRODUCT_RETURN;
   void assign(CodeComments& other)  PRODUCT_RETURN;
   void free() PRODUCT_RETURN;
 };
diff --git a/hotspot/src/share/vm/asm/register.hpp b/hotspot/src/share/vm/asm/register.hpp
index c0b247de26f..128b6070b1f 100644
--- a/hotspot/src/share/vm/asm/register.hpp
+++ b/hotspot/src/share/vm/asm/register.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -103,8 +103,8 @@ inline void assert_different_registers(
 ) {
   assert(
     a != b,
-    err_msg("registers must be different: a=%d, b=%d",
-            a, b)
+    err_msg_res("registers must be different: a=%d, b=%d",
+                a, b)
   );
 }
 
@@ -117,8 +117,8 @@ inline void assert_different_registers(
   assert(
     a != b && a != c
            && b != c,
-    err_msg("registers must be different: a=%d, b=%d, c=%d",
-            a, b, c)
+    err_msg_res("registers must be different: a=%d, b=%d, c=%d",
+                a, b, c)
   );
 }
 
@@ -133,8 +133,8 @@ inline void assert_different_registers(
     a != b && a != c && a != d
            && b != c && b != d
                      && c != d,
-    err_msg("registers must be different: a=%d, b=%d, c=%d, d=%d",
-            a, b, c, d)
+    err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d",
+                a, b, c, d)
   );
 }
 
@@ -151,8 +151,8 @@ inline void assert_different_registers(
            && b != c && b != d && b != e
                      && c != d && c != e
                                && d != e,
-    err_msg("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d",
-            a, b, c, d, e)
+    err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d",
+                a, b, c, d, e)
   );
 }
 
@@ -171,8 +171,8 @@ inline void assert_different_registers(
                      && c != d && c != e && c != f
                                && d != e && d != f
                                          && e != f,
-    err_msg("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d",
-            a, b, c, d, e, f)
+    err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d",
+                a, b, c, d, e, f)
   );
 }
 
@@ -193,8 +193,8 @@ inline void assert_different_registers(
                                && d != e && d != f && d != g
                                          && e != f && e != g
                                                    && f != g,
-    err_msg("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d",
-            a, b, c, d, e, f, g)
+    err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d",
+                a, b, c, d, e, f, g)
   );
 }
 
@@ -217,8 +217,8 @@ inline void assert_different_registers(
                                          && e != f && e != g && e != h
                                                    && f != g && f != h
                                                              && g != h,
-    err_msg("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d",
-            a, b, c, d, e, f, g, h)
+    err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d",
+                a, b, c, d, e, f, g, h)
   );
 }
 
@@ -243,8 +243,8 @@ inline void assert_different_registers(
                                                    && f != g && f != h && f != i
                                                              && g != h && g != i
                                                                        && h != i,
-    err_msg("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d",
-            a, b, c, d, e, f, g, h, i)
+    err_msg_res("registers must be different: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d",
+                a, b, c, d, e, f, g, h, i)
   );
 }
 
diff --git a/hotspot/src/share/vm/c1/c1_CFGPrinter.cpp b/hotspot/src/share/vm/c1/c1_CFGPrinter.cpp
index 66a7e225ebd..4eaa7d27f68 100644
--- a/hotspot/src/share/vm/c1/c1_CFGPrinter.cpp
+++ b/hotspot/src/share/vm/c1/c1_CFGPrinter.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp b/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp
index 7d9ddf85273..40ecd64900b 100644
--- a/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp
+++ b/hotspot/src/share/vm/c1/c1_Canonicalizer.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -931,6 +931,7 @@ void Canonicalizer::do_UnsafeGetRaw(UnsafeGetRaw* x) { if (OptimizeUnsafes) do_U
 void Canonicalizer::do_UnsafePutRaw(UnsafePutRaw* x) { if (OptimizeUnsafes) do_UnsafeRawOp(x); }
 void Canonicalizer::do_UnsafeGetObject(UnsafeGetObject* x) {}
 void Canonicalizer::do_UnsafePutObject(UnsafePutObject* x) {}
+void Canonicalizer::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {}
 void Canonicalizer::do_UnsafePrefetchRead (UnsafePrefetchRead*  x) {}
 void Canonicalizer::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {}
 void Canonicalizer::do_ProfileCall(ProfileCall* x) {}
diff --git a/hotspot/src/share/vm/c1/c1_Canonicalizer.hpp b/hotspot/src/share/vm/c1/c1_Canonicalizer.hpp
index b7ab8f5ae8f..d1eb55b07c7 100644
--- a/hotspot/src/share/vm/c1/c1_Canonicalizer.hpp
+++ b/hotspot/src/share/vm/c1/c1_Canonicalizer.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -100,6 +100,7 @@ class Canonicalizer: InstructionVisitor {
   virtual void do_UnsafePutRaw   (UnsafePutRaw*    x);
   virtual void do_UnsafeGetObject(UnsafeGetObject* x);
   virtual void do_UnsafePutObject(UnsafePutObject* x);
+  virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x);
   virtual void do_UnsafePrefetchRead (UnsafePrefetchRead*  x);
   virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x);
   virtual void do_ProfileCall    (ProfileCall*     x);
diff --git a/hotspot/src/share/vm/c1/c1_Compilation.cpp b/hotspot/src/share/vm/c1/c1_Compilation.cpp
index d4fe226eabe..68d3d2cc36b 100644
--- a/hotspot/src/share/vm/c1/c1_Compilation.cpp
+++ b/hotspot/src/share/vm/c1/c1_Compilation.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,6 +32,7 @@
 #include "c1/c1_ValueMap.hpp"
 #include "c1/c1_ValueStack.hpp"
 #include "code/debugInfoRec.hpp"
+#include "compiler/compileLog.hpp"
 
 
 typedef enum {
@@ -67,10 +68,25 @@ static int totalInstructionNodes = 0;
 class PhaseTraceTime: public TraceTime {
  private:
   JavaThread* _thread;
+  CompileLog* _log;
 
  public:
-  PhaseTraceTime(TimerName timer):
-    TraceTime("", &timers[timer], CITime || CITimeEach, Verbose) {
+  PhaseTraceTime(TimerName timer)
+  : TraceTime("", &timers[timer], CITime || CITimeEach, Verbose), _log(NULL) {
+    if (Compilation::current() != NULL) {
+      _log = Compilation::current()->log();
+    }
+
+    if (_log != NULL) {
+      _log->begin_head("phase name='%s'", timer_name[timer]);
+      _log->stamp();
+      _log->end_head();
+    }
+  }
+
+  ~PhaseTraceTime() {
+    if (_log != NULL)
+      _log->done("phase");
   }
 };
 
@@ -346,7 +362,8 @@ void Compilation::install_code(int frame_size) {
     implicit_exception_table(),
     compiler(),
     _env->comp_level(),
-    has_unsafe_access()
+    has_unsafe_access(),
+    SharedRuntime::is_wide_vector(max_vector_size())
   );
 }
 
@@ -389,6 +406,10 @@ void Compilation::compile_method() {
     PhaseTraceTime timeit(_t_codeinstall);
     install_code(frame_size);
   }
+
+  if (log() != NULL) // Print code cache state into compiler log
+    log()->code_cache_state();
+
   totalInstructionNodes += Instruction::number_of_instructions();
 }
 
@@ -455,6 +476,7 @@ Compilation::Compilation(AbstractCompiler* compiler, ciEnv* env, ciMethod* metho
                          int osr_bci, BufferBlob* buffer_blob)
 : _compiler(compiler)
 , _env(env)
+, _log(env->log())
 , _method(method)
 , _osr_bci(osr_bci)
 , _hir(NULL)
diff --git a/hotspot/src/share/vm/c1/c1_Compilation.hpp b/hotspot/src/share/vm/c1/c1_Compilation.hpp
index 376b6f3372e..0a7373da875 100644
--- a/hotspot/src/share/vm/c1/c1_Compilation.hpp
+++ b/hotspot/src/share/vm/c1/c1_Compilation.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -66,6 +66,7 @@ class Compilation: public StackObj {
   int _next_block_id;
   AbstractCompiler*  _compiler;
   ciEnv*             _env;
+  CompileLog*        _log;
   ciMethod*          _method;
   int                _osr_bci;
   IR*                _hir;
@@ -123,10 +124,12 @@ class Compilation: public StackObj {
 
   // accessors
   ciEnv* env() const                             { return _env; }
+  CompileLog* log() const                        { return _log; }
   AbstractCompiler* compiler() const             { return _compiler; }
   bool has_exception_handlers() const            { return _has_exception_handlers; }
   bool has_fpu_code() const                      { return _has_fpu_code; }
   bool has_unsafe_access() const                 { return _has_unsafe_access; }
+  int max_vector_size() const                    { return 0; }
   ciMethod* method() const                       { return _method; }
   int osr_bci() const                            { return _osr_bci; }
   bool is_osr_compile() const                    { return osr_bci() >= 0; }
diff --git a/hotspot/src/share/vm/c1/c1_Compiler.cpp b/hotspot/src/share/vm/c1/c1_Compiler.cpp
index 7e55ce30fd6..2820506182a 100644
--- a/hotspot/src/share/vm/c1/c1_Compiler.cpp
+++ b/hotspot/src/share/vm/c1/c1_Compiler.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/c1/c1_FrameMap.cpp b/hotspot/src/share/vm/c1/c1_FrameMap.cpp
index 8920dbe1c33..212499caf98 100644
--- a/hotspot/src/share/vm/c1/c1_FrameMap.cpp
+++ b/hotspot/src/share/vm/c1/c1_FrameMap.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/c1/c1_FrameMap.hpp b/hotspot/src/share/vm/c1/c1_FrameMap.hpp
index 2847b3f50b5..1062f7a8ecd 100644
--- a/hotspot/src/share/vm/c1/c1_FrameMap.hpp
+++ b/hotspot/src/share/vm/c1/c1_FrameMap.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
index 636fed2f2b7..1bbdc5afbca 100644
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.cpp
@@ -1682,6 +1682,12 @@ void GraphBuilder::invoke(Bytecodes::Code code) {
   ciInstanceKlass* callee_holder = ciEnv::get_instance_klass_for_declared_method_holder(holder);
   ciInstanceKlass* actual_recv = callee_holder;
 
+  CompileLog* log = compilation()->log();
+  if (log != NULL)
+      log->elem("call method='%d' instr='%s'",
+                log->identify(target),
+                Bytecodes::name(code));
+
   // Some methods are obviously bindable without any type checks so
   // convert them directly to an invokespecial or invokestatic.
   if (target->is_loaded() && !target->is_abstract() && target->can_be_statically_bound()) {
@@ -1826,6 +1832,7 @@ void GraphBuilder::invoke(Bytecodes::Code code) {
     }
     code = Bytecodes::_invokespecial;
   }
+
   // check if we could do inlining
   if (!PatchALot && Inline && klass->is_loaded() &&
       (klass->is_initialized() || klass->is_interface() && target->holder()->is_initialized())
@@ -2448,6 +2455,7 @@ BlockEnd* GraphBuilder::iterate_bytecodes_for_block(int bci) {
 #endif
   _skip_block = false;
   assert(state() != NULL, "ValueStack missing!");
+  CompileLog* log = compilation()->log();
   ciBytecodeStream s(method());
   s.reset_to_bci(bci);
   int prev_bci = bci;
@@ -2466,6 +2474,9 @@ BlockEnd* GraphBuilder::iterate_bytecodes_for_block(int bci) {
          (block_at(s.cur_bci()) == NULL || block_at(s.cur_bci()) == block())) {
     assert(state()->kind() == ValueStack::Parsing, "invalid state kind");
 
+    if (log != NULL)
+      log->set_context("bc code='%d' bci='%d'", (int)code, s.cur_bci());
+
     // Check for active jsr during OSR compilation
     if (compilation()->is_osr_compile()
         && scope()->is_top_scope()
@@ -2686,8 +2697,13 @@ BlockEnd* GraphBuilder::iterate_bytecodes_for_block(int bci) {
       case Bytecodes::_breakpoint     : BAILOUT_("concurrent setting of breakpoint", NULL);
       default                         : ShouldNotReachHere(); break;
     }
+
+    if (log != NULL)
+      log->clear_context(); // skip marker if nothing was printed
+
     // save current bci to setup Goto at the end
     prev_bci = s.cur_bci();
+
   }
   CHECK_BAILOUT_(NULL);
   // stop processing of this block (see try_inline_full)
@@ -3383,6 +3399,41 @@ bool GraphBuilder::try_inline_intrinsics(ciMethod* callee) {
       append_unsafe_CAS(callee);
       return true;
 
+    case vmIntrinsics::_getAndAddInt:
+      if (!VM_Version::supports_atomic_getadd4()) {
+        return false;
+      }
+      return append_unsafe_get_and_set_obj(callee, true);
+    case vmIntrinsics::_getAndAddLong:
+      if (!VM_Version::supports_atomic_getadd8()) {
+        return false;
+      }
+      return append_unsafe_get_and_set_obj(callee, true);
+    case vmIntrinsics::_getAndSetInt:
+      if (!VM_Version::supports_atomic_getset4()) {
+        return false;
+      }
+      return append_unsafe_get_and_set_obj(callee, false);
+    case vmIntrinsics::_getAndSetLong:
+      if (!VM_Version::supports_atomic_getset8()) {
+        return false;
+      }
+      return append_unsafe_get_and_set_obj(callee, false);
+    case vmIntrinsics::_getAndSetObject:
+#ifdef _LP64
+      if (!UseCompressedOops && !VM_Version::supports_atomic_getset8()) {
+        return false;
+      }
+      if (UseCompressedOops && !VM_Version::supports_atomic_getset4()) {
+        return false;
+      }
+#else
+      if (!VM_Version::supports_atomic_getset4()) {
+        return false;
+      }
+#endif
+      return append_unsafe_get_and_set_obj(callee, false);
+
     case vmIntrinsics::_Reference_get:
       // Use the intrinsic version of Reference.get() so that the value in
       // the referent field can be registered by the G1 pre-barrier code.
@@ -3632,7 +3683,7 @@ bool GraphBuilder::try_inline_full(ciMethod* callee, bool holder_known, Bytecode
       INLINE_BAILOUT("total inlining greater than DesiredMethodLimit");
     }
     // printing
-    print_inlining(callee, "");
+    print_inlining(callee);
   }
 
   // NOTE: Bailouts from this point on, which occur at the
@@ -4098,14 +4149,41 @@ void GraphBuilder::append_unsafe_CAS(ciMethod* callee) {
 
 
 void GraphBuilder::print_inlining(ciMethod* callee, const char* msg, bool success) {
+  CompileLog* log = compilation()->log();
+  if (log != NULL) {
+    if (success) {
+      if (msg != NULL)
+        log->inline_success(msg);
+      else
+        log->inline_success("receiver is statically known");
+    } else {
+      log->inline_fail(msg);
+    }
+  }
+
   if (!PrintInlining)  return;
-  assert(msg != NULL, "must be");
   CompileTask::print_inlining(callee, scope()->level(), bci(), msg);
   if (success && CIPrintMethodCodes) {
     callee->print_codes();
   }
 }
 
+bool GraphBuilder::append_unsafe_get_and_set_obj(ciMethod* callee, bool is_add) {
+  if (InlineUnsafeOps) {
+    Values* args = state()->pop_arguments(callee->arg_size());
+    BasicType t = callee->return_type()->basic_type();
+    null_check(args->at(0));
+    Instruction* offset = args->at(2);
+#ifndef _LP64
+    offset = append(new Convert(Bytecodes::_l2i, offset, as_ValueType(T_INT)));
+#endif
+    Instruction* op = append(new UnsafeGetAndSetObject(t, args->at(1), offset, args->at(3), is_add));
+    compilation()->set_has_unsafe_access(true);
+    kill_all();
+    push(op->type(), op);
+  }
+  return InlineUnsafeOps;
+}
 
 #ifndef PRODUCT
 void GraphBuilder::print_stats() {
diff --git a/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp b/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp
index 8d7e7de3436..1eca297cd15 100644
--- a/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp
+++ b/hotspot/src/share/vm/c1/c1_GraphBuilder.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
 #include "c1/c1_ValueStack.hpp"
 #include "ci/ciMethodData.hpp"
 #include "ci/ciStreams.hpp"
+#include "compiler/compileLog.hpp"
 
 class MemoryBuffer;
 
@@ -367,8 +368,9 @@ class GraphBuilder VALUE_OBJ_CLASS_SPEC {
   bool append_unsafe_put_raw(ciMethod* callee, BasicType t);
   bool append_unsafe_prefetch(ciMethod* callee, bool is_store, bool is_static);
   void append_unsafe_CAS(ciMethod* callee);
+  bool append_unsafe_get_and_set_obj(ciMethod* callee, bool is_add);
 
-  void print_inlining(ciMethod* callee, const char* msg, bool success = true);
+  void print_inlining(ciMethod* callee, const char* msg = NULL, bool success = true);
 
   void profile_call(ciMethod* callee, Value recv, ciKlass* predicted_holder);
   void profile_invocation(ciMethod* inlinee, ValueStack* state);
diff --git a/hotspot/src/share/vm/c1/c1_IR.cpp b/hotspot/src/share/vm/c1/c1_IR.cpp
index bdff56008bd..015874ac0d3 100644
--- a/hotspot/src/share/vm/c1/c1_IR.cpp
+++ b/hotspot/src/share/vm/c1/c1_IR.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/c1/c1_IR.hpp b/hotspot/src/share/vm/c1/c1_IR.hpp
index 83c25d633e0..e1f4c15ebcc 100644
--- a/hotspot/src/share/vm/c1/c1_IR.hpp
+++ b/hotspot/src/share/vm/c1/c1_IR.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/c1/c1_Instruction.hpp b/hotspot/src/share/vm/c1/c1_Instruction.hpp
index 930a599aa9e..4fff026e0c2 100644
--- a/hotspot/src/share/vm/c1/c1_Instruction.hpp
+++ b/hotspot/src/share/vm/c1/c1_Instruction.hpp
@@ -102,6 +102,7 @@ class       UnsafePutRaw;
 class     UnsafeObjectOp;
 class       UnsafeGetObject;
 class       UnsafePutObject;
+class         UnsafeGetAndSetObject;
 class       UnsafePrefetch;
 class         UnsafePrefetchRead;
 class         UnsafePrefetchWrite;
@@ -202,6 +203,7 @@ class InstructionVisitor: public StackObj {
   virtual void do_UnsafePutRaw   (UnsafePutRaw*    x) = 0;
   virtual void do_UnsafeGetObject(UnsafeGetObject* x) = 0;
   virtual void do_UnsafePutObject(UnsafePutObject* x) = 0;
+  virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) = 0;
   virtual void do_UnsafePrefetchRead (UnsafePrefetchRead*  x) = 0;
   virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) = 0;
   virtual void do_ProfileCall    (ProfileCall*     x) = 0;
@@ -2273,6 +2275,27 @@ LEAF(UnsafePutObject, UnsafeObjectOp)
                                                    f->visit(&_value); }
 };
 
+LEAF(UnsafeGetAndSetObject, UnsafeObjectOp)
+ private:
+  Value _value;                                  // Value to be stored
+  bool  _is_add;
+ public:
+  UnsafeGetAndSetObject(BasicType basic_type, Value object, Value offset, Value value, bool is_add)
+  : UnsafeObjectOp(basic_type, object, offset, false, false)
+    , _value(value)
+    , _is_add(is_add)
+  {
+    ASSERT_VALUES
+  }
+
+  // accessors
+  bool is_add() const                            { return _is_add; }
+  Value value()                                  { return _value; }
+
+  // generic
+  virtual void input_values_do(ValueVisitor* f)   { UnsafeObjectOp::input_values_do(f);
+                                                   f->visit(&_value); }
+};
 
 BASE(UnsafePrefetch, UnsafeObjectOp)
  public:
diff --git a/hotspot/src/share/vm/c1/c1_InstructionPrinter.cpp b/hotspot/src/share/vm/c1/c1_InstructionPrinter.cpp
index 383ffbb6138..a2f6f86fd85 100644
--- a/hotspot/src/share/vm/c1/c1_InstructionPrinter.cpp
+++ b/hotspot/src/share/vm/c1/c1_InstructionPrinter.cpp
@@ -831,6 +831,12 @@ void InstructionPrinter::do_UnsafePutObject(UnsafePutObject* x) {
   output()->put(')');
 }
 
+void InstructionPrinter::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {
+  print_unsafe_object_op(x, x->is_add()?"UnsafeGetAndSetObject (add)":"UnsafeGetAndSetObject");
+  output()->print(", value ");
+  print_value(x->value());
+  output()->put(')');
+}
 
 void InstructionPrinter::do_UnsafePrefetchRead(UnsafePrefetchRead* x) {
   print_unsafe_object_op(x, "UnsafePrefetchRead");
diff --git a/hotspot/src/share/vm/c1/c1_InstructionPrinter.hpp b/hotspot/src/share/vm/c1/c1_InstructionPrinter.hpp
index 3d09ef02b72..d1d99cc2116 100644
--- a/hotspot/src/share/vm/c1/c1_InstructionPrinter.hpp
+++ b/hotspot/src/share/vm/c1/c1_InstructionPrinter.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -128,6 +128,7 @@ class InstructionPrinter: public InstructionVisitor {
   virtual void do_UnsafePutRaw   (UnsafePutRaw*    x);
   virtual void do_UnsafeGetObject(UnsafeGetObject* x);
   virtual void do_UnsafePutObject(UnsafePutObject* x);
+  virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x);
   virtual void do_UnsafePrefetchRead (UnsafePrefetchRead*  x);
   virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x);
   virtual void do_ProfileCall    (ProfileCall*     x);
diff --git a/hotspot/src/share/vm/c1/c1_LIR.cpp b/hotspot/src/share/vm/c1/c1_LIR.cpp
index 9bc7ab8ed37..178d1867179 100644
--- a/hotspot/src/share/vm/c1/c1_LIR.cpp
+++ b/hotspot/src/share/vm/c1/c1_LIR.cpp
@@ -264,6 +264,7 @@ void LIR_Op2::verify() const {
 #ifdef ASSERT
   switch (code()) {
     case lir_cmove:
+    case lir_xchg:
       break;
 
     default:
@@ -630,6 +631,8 @@ void LIR_OpVisitState::visit(LIR_Op* op) {
     case lir_shl:
     case lir_shr:
     case lir_ushr:
+    case lir_xadd:
+    case lir_xchg:
     {
       assert(op->as_Op2() != NULL, "must be");
       LIR_Op2* op2 = (LIR_Op2*)op;
@@ -641,6 +644,13 @@ void LIR_OpVisitState::visit(LIR_Op* op) {
       if (op2->_opr2->is_valid())         do_input(op2->_opr2);
       if (op2->_tmp1->is_valid())         do_temp(op2->_tmp1);
       if (op2->_result->is_valid())       do_output(op2->_result);
+      if (op->code() == lir_xchg || op->code() == lir_xadd) {
+        // on ARM and PPC, return value is loaded first so could
+        // destroy inputs. On other platforms that implement those
+        // (x86, sparc), the extra constrainsts are harmless.
+        if (op2->_opr1->is_valid())       do_temp(op2->_opr1);
+        if (op2->_opr2->is_valid())       do_temp(op2->_opr2);
+      }
 
       break;
     }
@@ -1733,6 +1743,8 @@ const char * LIR_Op::name() const {
      case lir_shr:                   s = "shift_right";   break;
      case lir_ushr:                  s = "ushift_right";  break;
      case lir_alloc_array:           s = "alloc_array";   break;
+     case lir_xadd:                  s = "xadd";          break;
+     case lir_xchg:                  s = "xchg";          break;
      // LIR_Op3
      case lir_idiv:                  s = "idiv";          break;
      case lir_irem:                  s = "irem";          break;
diff --git a/hotspot/src/share/vm/c1/c1_LIR.hpp b/hotspot/src/share/vm/c1/c1_LIR.hpp
index a79a8ace4e4..122ebe8ce1b 100644
--- a/hotspot/src/share/vm/c1/c1_LIR.hpp
+++ b/hotspot/src/share/vm/c1/c1_LIR.hpp
@@ -963,6 +963,8 @@ enum LIR_Code {
       , lir_alloc_array
       , lir_throw
       , lir_compare_to
+      , lir_xadd
+      , lir_xchg
   , end_op2
   , begin_op3
       , lir_idiv
@@ -2191,6 +2193,9 @@ class LIR_List: public CompilationResourceObj {
   void profile_call(ciMethod* method, int bci, ciMethod* callee, LIR_Opr mdo, LIR_Opr recv, LIR_Opr t1, ciKlass* cha_klass) {
     append(new LIR_OpProfileCall(lir_profile_call, method, bci, callee, mdo, recv, t1, cha_klass));
   }
+
+  void xadd(LIR_Opr src, LIR_Opr add, LIR_Opr res, LIR_Opr tmp) { append(new LIR_Op2(lir_xadd, src, add, res, tmp)); }
+  void xchg(LIR_Opr src, LIR_Opr set, LIR_Opr res, LIR_Opr tmp) { append(new LIR_Op2(lir_xchg, src, set, res, tmp)); }
 };
 
 void print_LIR(BlockList* blocks);
@@ -2287,16 +2292,21 @@ class LIR_OpVisitState: public StackObj {
       LIR_Address* address = opr->as_address_ptr();
       if (address != NULL) {
         // special handling for addresses: add base and index register of the address
-        // both are always input operands!
+        // both are always input operands or temp if we want to extend
+        // their liveness!
+        if (mode == outputMode) {
+          mode = inputMode;
+        }
+        assert (mode == inputMode || mode == tempMode, "input or temp only for addresses");
         if (address->_base->is_valid()) {
           assert(address->_base->is_register(), "must be");
-          assert(_oprs_len[inputMode] < maxNumberOfOperands, "array overflow");
-          _oprs_new[inputMode][_oprs_len[inputMode]++] = &address->_base;
+          assert(_oprs_len[mode] < maxNumberOfOperands, "array overflow");
+          _oprs_new[mode][_oprs_len[mode]++] = &address->_base;
         }
         if (address->_index->is_valid()) {
           assert(address->_index->is_register(), "must be");
-          assert(_oprs_len[inputMode] < maxNumberOfOperands, "array overflow");
-          _oprs_new[inputMode][_oprs_len[inputMode]++] = &address->_index;
+          assert(_oprs_len[mode] < maxNumberOfOperands, "array overflow");
+          _oprs_new[mode][_oprs_len[mode]++] = &address->_index;
         }
 
       } else {
diff --git a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp
index e67987d7833..a76f5bb2ec3 100644
--- a/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp
+++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.cpp
@@ -773,6 +773,11 @@ void LIR_Assembler::emit_op2(LIR_Op2* op) {
       throw_op(op->in_opr1(), op->in_opr2(), op->info());
       break;
 
+    case lir_xadd:
+    case lir_xchg:
+      atomic_op(op->code(), op->in_opr1(), op->in_opr2(), op->result_opr(), op->tmp1_opr());
+      break;
+
     default:
       Unimplemented();
       break;
diff --git a/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp b/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp
index 226e4f83ff9..5cce9d0b71c 100644
--- a/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp
+++ b/hotspot/src/share/vm/c1/c1_LIRAssembler.hpp
@@ -252,6 +252,8 @@ class LIR_Assembler: public CompilationResourceObj {
 
   void verify_oop_map(CodeEmitInfo* info);
 
+  void atomic_op(LIR_Code code, LIR_Opr src, LIR_Opr data, LIR_Opr dest, LIR_Opr tmp);
+
 #ifdef TARGET_ARCH_x86
 # include "c1_LIRAssembler_x86.hpp"
 #endif
diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp
index bea8b93cef5..cf865f1b557 100644
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.cpp
@@ -1286,7 +1286,7 @@ void LIRGenerator::do_getClass(Intrinsic* x) {
   if (x->needs_null_check()) {
     info = state_for(x);
   }
-  __ move(new LIR_Address(rcvr.result(), oopDesc::klass_offset_in_bytes(), UseCompressedKlassPointers ? T_OBJECT : T_ADDRESS), result, info);
+  __ move(new LIR_Address(rcvr.result(), oopDesc::klass_offset_in_bytes(), T_ADDRESS), result, info);
   __ move_wide(new LIR_Address(result, in_bytes(Klass::java_mirror_offset()), T_OBJECT), result);
 }
 
diff --git a/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp b/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp
index ac20e7a3324..aedd6a69c94 100644
--- a/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp
+++ b/hotspot/src/share/vm/c1/c1_LIRGenerator.hpp
@@ -527,6 +527,7 @@ class LIRGenerator: public InstructionVisitor, public BlockClosure {
   virtual void do_UnsafePutRaw   (UnsafePutRaw*    x);
   virtual void do_UnsafeGetObject(UnsafeGetObject* x);
   virtual void do_UnsafePutObject(UnsafePutObject* x);
+  virtual void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x);
   virtual void do_UnsafePrefetchRead (UnsafePrefetchRead*  x);
   virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x);
   virtual void do_ProfileCall    (ProfileCall*     x);
diff --git a/hotspot/src/share/vm/c1/c1_LinearScan.cpp b/hotspot/src/share/vm/c1/c1_LinearScan.cpp
index fab4834a9be..1db08a8573a 100644
--- a/hotspot/src/share/vm/c1/c1_LinearScan.cpp
+++ b/hotspot/src/share/vm/c1/c1_LinearScan.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/c1/c1_LinearScan.hpp b/hotspot/src/share/vm/c1/c1_LinearScan.hpp
index 0c06f1b016d..3f552b70053 100644
--- a/hotspot/src/share/vm/c1/c1_LinearScan.hpp
+++ b/hotspot/src/share/vm/c1/c1_LinearScan.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/c1/c1_Optimizer.cpp b/hotspot/src/share/vm/c1/c1_Optimizer.cpp
index 487a7a7efde..7d24a126b20 100644
--- a/hotspot/src/share/vm/c1/c1_Optimizer.cpp
+++ b/hotspot/src/share/vm/c1/c1_Optimizer.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
 #include "c1/c1_ValueSet.hpp"
 #include "c1/c1_ValueStack.hpp"
 #include "utilities/bitMap.inline.hpp"
+#include "compiler/compileLog.hpp"
 
 define_array(ValueSetArray, ValueSet*);
 define_stack(ValueSetList, ValueSetArray);
@@ -54,7 +55,18 @@ class CE_Eliminator: public BlockClosure {
       // substituted some ifops/phis, so resolve the substitution
       SubstitutionResolver sr(_hir);
     }
+
+    CompileLog* log = _hir->compilation()->log();
+    if (log != NULL)
+      log->set_context("optimize name='cee'");
   }
+
+  ~CE_Eliminator() {
+    CompileLog* log = _hir->compilation()->log();
+    if (log != NULL)
+      log->clear_context(); // skip marker if nothing was printed
+  }
+
   int cee_count() const                          { return _cee_count; }
   int ifop_count() const                         { return _ifop_count; }
 
@@ -306,6 +318,15 @@ class BlockMerger: public BlockClosure {
   , _merge_count(0)
   {
     _hir->iterate_preorder(this);
+    CompileLog* log = _hir->compilation()->log();
+    if (log != NULL)
+      log->set_context("optimize name='eliminate_blocks'");
+  }
+
+  ~BlockMerger() {
+    CompileLog* log = _hir->compilation()->log();
+    if (log != NULL)
+      log->clear_context(); // skip marker if nothing was printed
   }
 
   bool try_merge(BlockBegin* block) {
@@ -505,6 +526,7 @@ public:
   void do_UnsafePutRaw   (UnsafePutRaw*    x);
   void do_UnsafeGetObject(UnsafeGetObject* x);
   void do_UnsafePutObject(UnsafePutObject* x);
+  void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x);
   void do_UnsafePrefetchRead (UnsafePrefetchRead*  x);
   void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x);
   void do_ProfileCall    (ProfileCall*     x);
@@ -573,6 +595,15 @@ class NullCheckEliminator: public ValueVisitor {
     , _work_list(new BlockList()) {
     _visitable_instructions = new ValueSet();
     _visitor.set_eliminator(this);
+    CompileLog* log = _opt->ir()->compilation()->log();
+    if (log != NULL)
+      log->set_context("optimize name='null_check_elimination'");
+  }
+
+  ~NullCheckEliminator() {
+    CompileLog* log = _opt->ir()->compilation()->log();
+    if (log != NULL)
+      log->clear_context(); // skip marker if nothing was printed
   }
 
   Optimizer*  opt()                               { return _opt; }
@@ -676,6 +707,7 @@ void NullCheckVisitor::do_UnsafeGetRaw   (UnsafeGetRaw*    x) {}
 void NullCheckVisitor::do_UnsafePutRaw   (UnsafePutRaw*    x) {}
 void NullCheckVisitor::do_UnsafeGetObject(UnsafeGetObject* x) {}
 void NullCheckVisitor::do_UnsafePutObject(UnsafePutObject* x) {}
+void NullCheckVisitor::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {}
 void NullCheckVisitor::do_UnsafePrefetchRead (UnsafePrefetchRead*  x) {}
 void NullCheckVisitor::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {}
 void NullCheckVisitor::do_ProfileCall    (ProfileCall*     x) { nce()->clear_last_explicit_null_check(); }
diff --git a/hotspot/src/share/vm/c1/c1_Runtime1.cpp b/hotspot/src/share/vm/c1/c1_Runtime1.cpp
index e1a4e62b57f..8936114585a 100644
--- a/hotspot/src/share/vm/c1/c1_Runtime1.cpp
+++ b/hotspot/src/share/vm/c1/c1_Runtime1.cpp
@@ -327,7 +327,7 @@ JRT_ENTRY(void, Runtime1::new_type_array(JavaThread* thread, Klass* klass, jint
   //       anymore after new_typeArray() and no GC can happen before.
   //       (This may have to change if this code changes!)
   assert(klass->is_klass(), "not a class");
-  BasicType elt_type = typeArrayKlass::cast(klass)->element_type();
+  BasicType elt_type = TypeArrayKlass::cast(klass)->element_type();
   oop obj = oopFactory::new_typeArray(elt_type, length, CHECK);
   thread->set_vm_result(obj);
   // This is pretty rare but this runtime patch is stressful to deoptimization
@@ -346,7 +346,7 @@ JRT_ENTRY(void, Runtime1::new_object_array(JavaThread* thread, Klass* array_klas
   //       anymore after new_objArray() and no GC can happen before.
   //       (This may have to change if this code changes!)
   assert(array_klass->is_klass(), "not a class");
-  Klass* elem_klass = objArrayKlass::cast(array_klass)->element_klass();
+  Klass* elem_klass = ObjArrayKlass::cast(array_klass)->element_klass();
   objArrayOop obj = oopFactory::new_objArray(elem_klass, length, CHECK);
   thread->set_vm_result(obj);
   // This is pretty rare but this runtime patch is stressful to deoptimization
@@ -362,7 +362,7 @@ JRT_ENTRY(void, Runtime1::new_multi_array(JavaThread* thread, Klass* klass, int
 
   assert(klass->is_klass(), "not a class");
   assert(rank >= 1, "rank must be nonzero");
-  oop obj = arrayKlass::cast(klass)->multi_allocate(rank, dims, CHECK);
+  oop obj = ArrayKlass::cast(klass)->multi_allocate(rank, dims, CHECK);
   thread->set_vm_result(obj);
 JRT_END
 
@@ -1234,8 +1234,8 @@ template <class T> int obj_arraycopy_work(oopDesc* src, T* src_addr,
     bs->write_ref_array((HeapWord*)dst_addr, length);
     return ac_ok;
   } else {
-    Klass* bound = objArrayKlass::cast(dst->klass())->element_klass();
-    Klass* stype = objArrayKlass::cast(src->klass())->element_klass();
+    Klass* bound = ObjArrayKlass::cast(dst->klass())->element_klass();
+    Klass* stype = ObjArrayKlass::cast(src->klass())->element_klass();
     if (stype == bound || Klass::cast(stype)->is_subtype_of(bound)) {
       // Elements are guaranteed to be subtypes, so no check necessary
       bs->write_ref_array_pre(dst_addr, length);
@@ -1263,7 +1263,7 @@ JRT_LEAF(int, Runtime1::arraycopy(oopDesc* src, int src_pos, oopDesc* dst, int d
   if (src->is_typeArray()) {
     Klass* const klass_oop = src->klass();
     if (klass_oop != dst->klass()) return ac_failed;
-    typeArrayKlass* klass = typeArrayKlass::cast(klass_oop);
+    TypeArrayKlass* klass = TypeArrayKlass::cast(klass_oop);
     const int l2es = klass->log2_element_size();
     const int ihs = klass->array_header_in_bytes() / wordSize;
     char* src_addr = (char*) ((oopDesc**)src + ihs) + (src_pos << l2es);
diff --git a/hotspot/src/share/vm/c1/c1_ValueMap.cpp b/hotspot/src/share/vm/c1/c1_ValueMap.cpp
index 388c0dc5408..a759854102a 100644
--- a/hotspot/src/share/vm/c1/c1_ValueMap.cpp
+++ b/hotspot/src/share/vm/c1/c1_ValueMap.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/c1/c1_ValueMap.hpp b/hotspot/src/share/vm/c1/c1_ValueMap.hpp
index 6f89738d4d3..07dd9ddfb3d 100644
--- a/hotspot/src/share/vm/c1/c1_ValueMap.hpp
+++ b/hotspot/src/share/vm/c1/c1_ValueMap.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -157,6 +157,7 @@ class ValueNumberingVisitor: public InstructionVisitor {
   void do_Invoke         (Invoke*          x) { kill_memory(); }
   void do_UnsafePutRaw   (UnsafePutRaw*    x) { kill_memory(); }
   void do_UnsafePutObject(UnsafePutObject* x) { kill_memory(); }
+  void do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) { kill_memory(); }
   void do_Intrinsic      (Intrinsic*       x) { if (!x->preserves_state()) kill_memory(); }
 
   void do_Phi            (Phi*             x) { /* nothing to do */ }
diff --git a/hotspot/src/share/vm/c1/c1_ValueStack.cpp b/hotspot/src/share/vm/c1/c1_ValueStack.cpp
index d17a3f6a206..44a8e6d529f 100644
--- a/hotspot/src/share/vm/c1/c1_ValueStack.cpp
+++ b/hotspot/src/share/vm/c1/c1_ValueStack.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/c1/c1_ValueStack.hpp b/hotspot/src/share/vm/c1/c1_ValueStack.hpp
index 1dfd98da105..a3c8b27a964 100644
--- a/hotspot/src/share/vm/c1/c1_ValueStack.hpp
+++ b/hotspot/src/share/vm/c1/c1_ValueStack.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/ci/ciArrayKlass.cpp b/hotspot/src/share/vm/ci/ciArrayKlass.cpp
index b280cfb030a..7d2d19774c0 100644
--- a/hotspot/src/share/vm/ci/ciArrayKlass.cpp
+++ b/hotspot/src/share/vm/ci/ciArrayKlass.cpp
@@ -31,7 +31,7 @@
 // ciArrayKlass
 //
 // This class represents a Klass* in the HotSpot virtual machine
-// whose Klass part in an arrayKlass.
+// whose Klass part in an ArrayKlass.
 
 // ------------------------------------------------------------------
 // ciArrayKlass::ciArrayKlass
@@ -39,7 +39,7 @@
 // Loaded array klass.
 ciArrayKlass::ciArrayKlass(KlassHandle h_k) : ciKlass(h_k) {
   assert(get_Klass()->oop_is_array(), "wrong type");
-  _dimension = get_arrayKlass()->dimension();
+  _dimension = get_ArrayKlass()->dimension();
 }
 
 // ------------------------------------------------------------------
diff --git a/hotspot/src/share/vm/ci/ciArrayKlass.hpp b/hotspot/src/share/vm/ci/ciArrayKlass.hpp
index 5451327c923..da749cdc61a 100644
--- a/hotspot/src/share/vm/ci/ciArrayKlass.hpp
+++ b/hotspot/src/share/vm/ci/ciArrayKlass.hpp
@@ -30,7 +30,7 @@
 // ciArrayKlass
 //
 // This class, and its subclasses represent Klass*s in the
-// HotSpot virtual machine whose Klass part is an arrayKlass.
+// HotSpot virtual machine whose Klass part is an ArrayKlass.
 class ciArrayKlass : public ciKlass {
   CI_PACKAGE_ACCESS
 private:
@@ -40,8 +40,8 @@ protected:
   ciArrayKlass(KlassHandle h_k);
   ciArrayKlass(ciSymbol* name, int dimension, BasicType bt);
 
-  arrayKlass* get_arrayKlass() {
-    return (arrayKlass*)get_Klass();
+  ArrayKlass* get_ArrayKlass() {
+    return (ArrayKlass*)get_Klass();
   }
 
   const char* type_string() { return "ciArrayKlass"; }
@@ -53,7 +53,7 @@ public:
   bool is_leaf_type();          // No subtypes of this array type.
 
   ciInstance* component_mirror() {
-    // This is a real field in arrayKlass, but we derive it from element_type.
+    // This is a real field in ArrayKlass, but we derive it from element_type.
     return element_type()->java_mirror();
   }
 
diff --git a/hotspot/src/share/vm/ci/ciClassList.hpp b/hotspot/src/share/vm/ci/ciClassList.hpp
index 60bdec982b7..7272ea87586 100644
--- a/hotspot/src/share/vm/ci/ciClassList.hpp
+++ b/hotspot/src/share/vm/ci/ciClassList.hpp
@@ -49,6 +49,7 @@ class   ciInstance;
 class     ciCallSite;
 class     ciMemberName;
 class     ciMethodHandle;
+class     ciMethodType;
 class     ciArray;
 class       ciObjArray;
 class       ciTypeArray;
@@ -99,6 +100,7 @@ friend class ciMemberName;             \
 friend class ciMethod;                 \
 friend class ciMethodData;             \
 friend class ciMethodHandle;           \
+friend class ciMethodType;             \
 friend class ciReceiverTypeData;       \
 friend class ciSymbol;                 \
 friend class ciArray;                  \
diff --git a/hotspot/src/share/vm/ci/ciEnv.cpp b/hotspot/src/share/vm/ci/ciEnv.cpp
index ef4826b4f25..bdfd15f63fb 100644
--- a/hotspot/src/share/vm/ci/ciEnv.cpp
+++ b/hotspot/src/share/vm/ci/ciEnv.cpp
@@ -326,7 +326,7 @@ bool ciEnv::check_klass_accessibility(ciKlass* accessing_klass,
 
   if (resolved_klass->oop_is_objArray()) {
     // Find the element klass, if this is an array.
-    resolved_klass = objArrayKlass::cast(resolved_klass)->bottom_klass();
+    resolved_klass = ObjArrayKlass::cast(resolved_klass)->bottom_klass();
   }
   if (resolved_klass->oop_is_instance()) {
     return Reflection::verify_class_access(accessing_klass->get_Klass(),
@@ -921,7 +921,8 @@ void ciEnv::register_method(ciMethod* target,
                             ImplicitExceptionTable* inc_table,
                             AbstractCompiler* compiler,
                             int comp_level,
-                            bool has_unsafe_access) {
+                            bool has_unsafe_access,
+                            bool has_wide_vectors) {
   VM_ENTRY_MARK;
   nmethod* nm = NULL;
   {
@@ -1016,6 +1017,7 @@ void ciEnv::register_method(ciMethod* target,
       }
     } else {
       nm->set_has_unsafe_access(has_unsafe_access);
+      nm->set_has_wide_vectors(has_wide_vectors);
 
       // Record successful registration.
       // (Put nm into the task handle *before* publishing to the Java heap.)
@@ -1124,7 +1126,8 @@ void ciEnv::record_method_not_compilable(const char* reason, bool all_tiers) {
       if (all_tiers) {
         log()->elem("method_not_compilable");
       } else {
-        log()->elem("method_not_compilable_at_tier");
+        log()->elem("method_not_compilable_at_tier level='%d'",
+                    current()->task()->comp_level());
       }
     }
     _compilable = new_compilable;
diff --git a/hotspot/src/share/vm/ci/ciEnv.hpp b/hotspot/src/share/vm/ci/ciEnv.hpp
index 63b316e61b4..f252dc7c0f4 100644
--- a/hotspot/src/share/vm/ci/ciEnv.hpp
+++ b/hotspot/src/share/vm/ci/ciEnv.hpp
@@ -362,7 +362,8 @@ public:
                        ImplicitExceptionTable*   inc_table,
                        AbstractCompiler*         compiler,
                        int                       comp_level,
-                       bool                      has_unsafe_access);
+                       bool                      has_unsafe_access,
+                       bool                      has_wide_vectors);
 
 
   // Access to certain well known ciObjects.
diff --git a/hotspot/src/share/vm/ci/ciKlass.hpp b/hotspot/src/share/vm/ci/ciKlass.hpp
index edf192f3daa..d378059fcbc 100644
--- a/hotspot/src/share/vm/ci/ciKlass.hpp
+++ b/hotspot/src/share/vm/ci/ciKlass.hpp
@@ -33,7 +33,7 @@
 // HotSpot virtual machine.  In the vm, each Klass* contains an
 // embedded Klass object.  ciKlass is subclassed to explicitly
 // represent the kind of Klass embedded in the Klass*.  For
-// example, a Klass* with an embedded objArrayKlass object is
+// example, a Klass* with an embedded ObjArrayKlass object is
 // represented in the ciObject hierarchy by the class
 // ciObjArrayKlass.
 class ciKlass : public ciType {
diff --git a/hotspot/src/share/vm/ci/ciMethodHandle.hpp b/hotspot/src/share/vm/ci/ciMethodHandle.hpp
index 3e1fc6603c1..355657eeadd 100644
--- a/hotspot/src/share/vm/ci/ciMethodHandle.hpp
+++ b/hotspot/src/share/vm/ci/ciMethodHandle.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/ci/ciMethodType.hpp b/hotspot/src/share/vm/ci/ciMethodType.hpp
new file mode 100644
index 00000000000..6dd9bf801ab
--- /dev/null
+++ b/hotspot/src/share/vm/ci/ciMethodType.hpp
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef SHARE_VM_CI_CIMETHODTYPE_HPP
+#define SHARE_VM_CI_CIMETHODTYPE_HPP
+
+#include "ci/ciInstance.hpp"
+#include "ci/ciUtilities.hpp"
+#include "classfile/javaClasses.hpp"
+
+// ciMethodType
+//
+// The class represents a java.lang.invoke.MethodType object.
+class ciMethodType : public ciInstance {
+private:
+  ciType* class_to_citype(oop klass_oop) const {
+    if (java_lang_Class::is_primitive(klass_oop)) {
+      BasicType bt = java_lang_Class::primitive_type(klass_oop);
+      return ciType::make(bt);
+    } else {
+      Klass* k = java_lang_Class::as_Klass(klass_oop);
+      return CURRENT_ENV->get_klass(k);
+    }
+  }
+
+public:
+  ciMethodType(instanceHandle h_i) : ciInstance(h_i) {}
+
+  // What kind of ciObject is this?
+  bool is_method_type() const { return true; }
+
+  ciType* rtype() const {
+    GUARDED_VM_ENTRY(
+      oop rtype = java_lang_invoke_MethodType::rtype(get_oop());
+      return class_to_citype(rtype);
+    )
+  }
+
+  int ptype_count() const {
+    GUARDED_VM_ENTRY(return java_lang_invoke_MethodType::ptype_count(get_oop());)
+  }
+
+  int ptype_slot_count() const {
+    GUARDED_VM_ENTRY(return java_lang_invoke_MethodType::ptype_slot_count(get_oop());)
+  }
+
+  ciType* ptype_at(int index) const {
+    GUARDED_VM_ENTRY(
+      oop ptype = java_lang_invoke_MethodType::ptype(get_oop(), index);
+      return class_to_citype(ptype);
+    )
+  }
+};
+
+#endif // SHARE_VM_CI_CIMETHODTYPE_HPP
diff --git a/hotspot/src/share/vm/ci/ciObjArrayKlass.cpp b/hotspot/src/share/vm/ci/ciObjArrayKlass.cpp
index 18097b8ebc7..3ccb54eac9c 100644
--- a/hotspot/src/share/vm/ci/ciObjArrayKlass.cpp
+++ b/hotspot/src/share/vm/ci/ciObjArrayKlass.cpp
@@ -32,7 +32,7 @@
 // ciObjArrayKlass
 //
 // This class represents a Klass* in the HotSpot virtual machine
-// whose Klass part is an objArrayKlass.
+// whose Klass part is an ObjArrayKlass.
 
 // ------------------------------------------------------------------
 // ciObjArrayKlass::ciObjArrayKlass
@@ -40,7 +40,7 @@
 // Constructor for loaded object array klasses.
 ciObjArrayKlass::ciObjArrayKlass(KlassHandle h_k) : ciArrayKlass(h_k) {
   assert(get_Klass()->oop_is_objArray(), "wrong type");
-  Klass* element_Klass = get_objArrayKlass()->bottom_klass();
+  Klass* element_Klass = get_ObjArrayKlass()->bottom_klass();
   _base_element_klass = CURRENT_ENV->get_klass(element_Klass);
   assert(_base_element_klass->is_instance_klass() ||
          _base_element_klass->is_type_array_klass(), "bad base klass");
@@ -83,7 +83,7 @@ ciKlass* ciObjArrayKlass::element_klass() {
     // Produce the element klass.
     if (is_loaded()) {
       VM_ENTRY_MARK;
-      Klass* element_Klass = get_objArrayKlass()->element_klass();
+      Klass* element_Klass = get_ObjArrayKlass()->element_klass();
       _element_klass = CURRENT_THREAD_ENV->get_klass(element_Klass);
     } else {
       VM_ENTRY_MARK;
diff --git a/hotspot/src/share/vm/ci/ciObjArrayKlass.hpp b/hotspot/src/share/vm/ci/ciObjArrayKlass.hpp
index bc4cb792bc2..ffbf8502804 100644
--- a/hotspot/src/share/vm/ci/ciObjArrayKlass.hpp
+++ b/hotspot/src/share/vm/ci/ciObjArrayKlass.hpp
@@ -30,7 +30,7 @@
 // ciObjArrayKlass
 //
 // This class represents a Klass* in the HotSpot virtual machine
-// whose Klass part is an objArrayKlass.
+// whose Klass part is an ObjArrayKlass.
 class ciObjArrayKlass : public ciArrayKlass {
   CI_PACKAGE_ACCESS
   friend class ciEnv;
@@ -45,8 +45,8 @@ protected:
                   ciKlass* base_element_klass,
                   int dimension);
 
-  objArrayKlass* get_objArrayKlass() {
-    return (objArrayKlass*)get_Klass();
+  ObjArrayKlass* get_ObjArrayKlass() {
+    return (ObjArrayKlass*)get_Klass();
   }
 
   static ciObjArrayKlass* make_impl(ciKlass* element_klass);
diff --git a/hotspot/src/share/vm/ci/ciObject.hpp b/hotspot/src/share/vm/ci/ciObject.hpp
index daccd5bf9bc..6246e173e9c 100644
--- a/hotspot/src/share/vm/ci/ciObject.hpp
+++ b/hotspot/src/share/vm/ci/ciObject.hpp
@@ -123,6 +123,7 @@ public:
   virtual bool is_instance()                { return false; }
   virtual bool is_member_name()       const { return false; }
   virtual bool is_method_handle()     const { return false; }
+  virtual bool is_method_type()       const { return false; }
   virtual bool is_array()                   { return false; }
   virtual bool is_obj_array()               { return false; }
   virtual bool is_type_array()              { return false; }
@@ -142,35 +143,39 @@ public:
   }
 
   // Subclass casting with assertions.
-  ciNullObject*            as_null_object() {
+  ciNullObject* as_null_object() {
     assert(is_null_object(), "bad cast");
     return (ciNullObject*)this;
   }
-  ciCallSite*              as_call_site() {
+  ciCallSite* as_call_site() {
     assert(is_call_site(), "bad cast");
-    return (ciCallSite*) this;
+    return (ciCallSite*)this;
   }
-  ciInstance*              as_instance() {
+  ciInstance* as_instance() {
     assert(is_instance(), "bad cast");
     return (ciInstance*)this;
   }
-  ciMemberName*            as_member_name() {
+  ciMemberName* as_member_name() {
     assert(is_member_name(), "bad cast");
     return (ciMemberName*)this;
   }
-  ciMethodHandle*          as_method_handle() {
+  ciMethodHandle* as_method_handle() {
     assert(is_method_handle(), "bad cast");
-    return (ciMethodHandle*) this;
+    return (ciMethodHandle*)this;
   }
-  ciArray*                 as_array() {
+  ciMethodType* as_method_type() {
+    assert(is_method_type(), "bad cast");
+    return (ciMethodType*)this;
+  }
+  ciArray* as_array() {
     assert(is_array(), "bad cast");
     return (ciArray*)this;
   }
-  ciObjArray*              as_obj_array() {
+  ciObjArray* as_obj_array() {
     assert(is_obj_array(), "bad cast");
     return (ciObjArray*)this;
   }
-  ciTypeArray*             as_type_array() {
+  ciTypeArray* as_type_array() {
     assert(is_type_array(), "bad cast");
     return (ciTypeArray*)this;
   }
diff --git a/hotspot/src/share/vm/ci/ciObjectFactory.cpp b/hotspot/src/share/vm/ci/ciObjectFactory.cpp
index 2ca0c4443d9..8fb6e12b767 100644
--- a/hotspot/src/share/vm/ci/ciObjectFactory.cpp
+++ b/hotspot/src/share/vm/ci/ciObjectFactory.cpp
@@ -30,6 +30,7 @@
 #include "ci/ciMethod.hpp"
 #include "ci/ciMethodData.hpp"
 #include "ci/ciMethodHandle.hpp"
+#include "ci/ciMethodType.hpp"
 #include "ci/ciNullObject.hpp"
 #include "ci/ciObjArray.hpp"
 #include "ci/ciObjArrayKlass.hpp"
@@ -145,7 +146,7 @@ void ciObjectFactory::init_shared_objects() {
 
   for (int i = T_BOOLEAN; i <= T_CONFLICT; i++) {
     BasicType t = (BasicType)i;
-    if (type2name(t) != NULL && t != T_OBJECT && t != T_ARRAY && t != T_NARROWOOP) {
+    if (type2name(t) != NULL && t != T_OBJECT && t != T_ARRAY && t != T_NARROWOOP && t != T_NARROWKLASS) {
       ciType::_basic_types[t] = new (_arena) ciType(t);
       init_ident_of(ciType::_basic_types[t]);
     }
@@ -173,7 +174,7 @@ void ciObjectFactory::init_shared_objects() {
   }
 
   ciEnv::_unloaded_cisymbol = ciObjectFactory::get_symbol(vmSymbols::dummy_symbol());
-  // Create dummy InstanceKlass and objArrayKlass object and assign them idents
+  // Create dummy InstanceKlass and ObjArrayKlass object and assign them idents
   ciEnv::_unloaded_ciinstance_klass = new (_arena) ciInstanceKlass(ciEnv::_unloaded_cisymbol, NULL, NULL);
   init_ident_of(ciEnv::_unloaded_ciinstance_klass);
   ciEnv::_unloaded_ciobjarrayklass = new (_arena) ciObjArrayKlass(ciEnv::_unloaded_cisymbol, ciEnv::_unloaded_ciinstance_klass, 1);
@@ -237,23 +238,23 @@ ciObject* ciObjectFactory::get(oop key) {
 
   assert(key == NULL || Universe::heap()->is_in_reserved(key), "must be");
 
-    NonPermObject* &bucket = find_non_perm(key);
-    if (bucket != NULL) {
-      return bucket->object();
-    }
+  NonPermObject* &bucket = find_non_perm(key);
+  if (bucket != NULL) {
+    return bucket->object();
+  }
 
-    // The ciObject does not yet exist.  Create it and insert it
-    // into the cache.
-    Handle keyHandle(key);
-    ciObject* new_object = create_new_object(keyHandle());
-    assert(keyHandle() == new_object->get_oop(), "must be properly recorded");
-    init_ident_of(new_object);
+  // The ciObject does not yet exist.  Create it and insert it
+  // into the cache.
+  Handle keyHandle(key);
+  ciObject* new_object = create_new_object(keyHandle());
+  assert(keyHandle() == new_object->get_oop(), "must be properly recorded");
+  init_ident_of(new_object);
   assert(Universe::heap()->is_in_reserved(new_object->get_oop()), "must be");
 
-      // Not a perm-space object.
-      insert_non_perm(bucket, keyHandle(), new_object);
-      return new_object;
-    }
+  // Not a perm-space object.
+  insert_non_perm(bucket, keyHandle(), new_object);
+  return new_object;
+}
 
 // ------------------------------------------------------------------
 // ciObjectFactory::get
@@ -324,6 +325,8 @@ ciObject* ciObjectFactory::create_new_object(oop o) {
       return new (arena()) ciMemberName(h_i);
     else if (java_lang_invoke_MethodHandle::is_instance(o))
       return new (arena()) ciMethodHandle(h_i);
+    else if (java_lang_invoke_MethodType::is_instance(o))
+      return new (arena()) ciMethodType(h_i);
     else
       return new (arena()) ciInstance(h_i);
   } else if (o->is_objArray()) {
@@ -451,7 +454,7 @@ ciKlass* ciObjectFactory::get_unloaded_klass(ciKlass* accessing_klass,
   // the cache.
   ciKlass* new_klass = NULL;
 
-  // Two cases: this is an unloaded objArrayKlass or an
+  // Two cases: this is an unloaded ObjArrayKlass or an
   // unloaded InstanceKlass.  Deal with both.
   if (name->byte_at(0) == '[') {
     // Decompose the name.'
@@ -477,7 +480,7 @@ ciKlass* ciObjectFactory::get_unloaded_klass(ciKlass* accessing_klass,
       // The type array itself takes care of one of the dimensions.
       dimension--;
 
-      // The element klass is a typeArrayKlass.
+      // The element klass is a TypeArrayKlass.
       element_klass = ciTypeArrayKlass::make(element_type);
     }
     new_klass = new (arena()) ciObjArrayKlass(name, element_klass, dimension);
diff --git a/hotspot/src/share/vm/ci/ciSignature.cpp b/hotspot/src/share/vm/ci/ciSignature.cpp
index 229a904e9b8..d09cc2fd2fe 100644
--- a/hotspot/src/share/vm/ci/ciSignature.cpp
+++ b/hotspot/src/share/vm/ci/ciSignature.cpp
@@ -23,6 +23,7 @@
  */
 
 #include "precompiled.hpp"
+#include "ci/ciMethodType.hpp"
 #include "ci/ciSignature.hpp"
 #include "ci/ciUtilities.hpp"
 #include "memory/allocation.inline.hpp"
@@ -79,6 +80,24 @@ ciSignature::ciSignature(ciKlass* accessing_klass, constantPoolHandle cpool, ciS
   _count = count;
 }
 
+// ------------------------------------------------------------------
+// ciSignature::ciSignature
+ciSignature::ciSignature(ciKlass* accessing_klass, ciSymbol* symbol, ciMethodType* method_type) :
+  _symbol(symbol),
+  _accessing_klass(accessing_klass),
+  _size( method_type->ptype_slot_count()),
+  _count(method_type->ptype_count())
+{
+  ASSERT_IN_VM;
+  EXCEPTION_CONTEXT;
+  Arena* arena = CURRENT_ENV->arena();
+  _types = new (arena) GrowableArray<ciType*>(arena, _count + 1, 0, NULL);
+  for (int i = 0; i < _count; i++) {
+    _types->append(method_type->ptype_at(i));
+  }
+  _types->append(method_type->rtype());
+}
+
 // ------------------------------------------------------------------
 // ciSignature::return_type
 //
diff --git a/hotspot/src/share/vm/ci/ciSignature.hpp b/hotspot/src/share/vm/ci/ciSignature.hpp
index d4ec2759dfa..37506c953b4 100644
--- a/hotspot/src/share/vm/ci/ciSignature.hpp
+++ b/hotspot/src/share/vm/ci/ciSignature.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,6 +47,7 @@ private:
   friend class ciObjectFactory;
 
   ciSignature(ciKlass* accessing_klass, constantPoolHandle cpool, ciSymbol* signature);
+  ciSignature(ciKlass* accessing_klass,                           ciSymbol* signature, ciMethodType* method_type);
 
   void get_all_klasses();
 
diff --git a/hotspot/src/share/vm/ci/ciStreams.cpp b/hotspot/src/share/vm/ci/ciStreams.cpp
index 8ed962f233b..76520fdff10 100644
--- a/hotspot/src/share/vm/ci/ciStreams.cpp
+++ b/hotspot/src/share/vm/ci/ciStreams.cpp
@@ -364,12 +364,15 @@ ciMethod* ciBytecodeStream::get_method(bool& will_link, ciSignature* *declared_s
   constantPoolHandle cpool(_method->get_Method()->constants());
   ciMethod* m = env->get_method_by_index(cpool, get_method_index(), cur_bc(), _holder);
   will_link = m->is_loaded();
-  // Get declared method signature and return it.
-  if (has_optional_appendix()) {
-    const int sig_index = get_method_signature_index();
-    Symbol* sig_sym = cpool->symbol_at(sig_index);
-    ciKlass* pool_holder = env->get_klass(cpool->pool_holder());
-    (*declared_signature_result) = new (env->arena()) ciSignature(pool_holder, cpool, env->get_symbol(sig_sym));
+
+  // Use the MethodType stored in the CP cache to create a signature
+  // with correct types (in respect to class loaders).
+  if (has_method_type()) {
+    ciSymbol*     sig_sym     = env->get_symbol(cpool->symbol_at(get_method_signature_index()));
+    ciKlass*      pool_holder = env->get_klass(cpool->pool_holder());
+    ciMethodType* method_type = get_method_type();
+    ciSignature* declared_signature = new (env->arena()) ciSignature(pool_holder, sig_sym, method_type);
+    (*declared_signature_result) = declared_signature;
   } else {
     (*declared_signature_result) = m->signature();
   }
@@ -399,6 +402,31 @@ ciObject* ciBytecodeStream::get_appendix() {
   return CURRENT_ENV->get_object(appendix_oop);
 }
 
+// ------------------------------------------------------------------
+// ciBytecodeStream::has_method_type
+//
+// Returns true if there is a MethodType argument stored in the
+// constant pool cache at the current bci.
+bool ciBytecodeStream::has_method_type() {
+  GUARDED_VM_ENTRY(
+    constantPoolHandle cpool(_method->get_Method()->constants());
+    return ConstantPool::has_method_type_at_if_loaded(cpool, get_method_index());
+  )
+}
+
+// ------------------------------------------------------------------
+// ciBytecodeStream::get_method_type
+//
+// Return the MethodType stored in the constant pool cache at
+// the current bci.
+ciMethodType* ciBytecodeStream::get_method_type() {
+  GUARDED_VM_ENTRY(
+    constantPoolHandle cpool(_method->get_Method()->constants());
+    oop method_type_oop = ConstantPool::method_type_at_if_loaded(cpool, get_method_index());
+    return CURRENT_ENV->get_object(method_type_oop)->as_method_type();
+  )
+}
+
 // ------------------------------------------------------------------
 // ciBytecodeStream::get_declared_method_holder
 //
diff --git a/hotspot/src/share/vm/ci/ciStreams.hpp b/hotspot/src/share/vm/ci/ciStreams.hpp
index 445c1444456..db46a4a85d3 100644
--- a/hotspot/src/share/vm/ci/ciStreams.hpp
+++ b/hotspot/src/share/vm/ci/ciStreams.hpp
@@ -257,12 +257,14 @@ public:
   int      get_field_holder_index();
   int      get_field_signature_index();
 
-  ciMethod* get_method(bool& will_link, ciSignature* *declared_signature_result);
-  bool      has_appendix();
-  ciObject* get_appendix();
-  ciKlass*  get_declared_method_holder();
-  int       get_method_holder_index();
-  int       get_method_signature_index();
+  ciMethod*     get_method(bool& will_link, ciSignature* *declared_signature_result);
+  bool          has_appendix();
+  ciObject*     get_appendix();
+  bool          has_method_type();
+  ciMethodType* get_method_type();
+  ciKlass*      get_declared_method_holder();
+  int           get_method_holder_index();
+  int           get_method_signature_index();
 
   // Get the resolved references arrays from the constant pool
   ciObjArray* get_resolved_references();
diff --git a/hotspot/src/share/vm/ci/ciSymbol.cpp b/hotspot/src/share/vm/ci/ciSymbol.cpp
index e6987bfe68b..26b3e4d565d 100644
--- a/hotspot/src/share/vm/ci/ciSymbol.cpp
+++ b/hotspot/src/share/vm/ci/ciSymbol.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/ci/ciTypeArrayKlass.cpp b/hotspot/src/share/vm/ci/ciTypeArrayKlass.cpp
index 486785f4321..991fc283127 100644
--- a/hotspot/src/share/vm/ci/ciTypeArrayKlass.cpp
+++ b/hotspot/src/share/vm/ci/ciTypeArrayKlass.cpp
@@ -35,7 +35,7 @@
 // ciTypeArrayKlass::ciTypeArrayKlass
 ciTypeArrayKlass::ciTypeArrayKlass(KlassHandle h_k) : ciArrayKlass(h_k) {
   assert(get_Klass()->oop_is_typeArray(), "wrong type");
-  assert(element_type() == get_typeArrayKlass()->element_type(), "");
+  assert(element_type() == get_TypeArrayKlass()->element_type(), "");
 }
 
 // ------------------------------------------------------------------
diff --git a/hotspot/src/share/vm/ci/ciTypeArrayKlass.hpp b/hotspot/src/share/vm/ci/ciTypeArrayKlass.hpp
index 6272ab83866..5a57f74c497 100644
--- a/hotspot/src/share/vm/ci/ciTypeArrayKlass.hpp
+++ b/hotspot/src/share/vm/ci/ciTypeArrayKlass.hpp
@@ -37,8 +37,8 @@ class ciTypeArrayKlass : public ciArrayKlass {
 protected:
   ciTypeArrayKlass(KlassHandle h_k);
 
-  typeArrayKlass* get_typeArrayKlass() {
-    return (typeArrayKlass*)get_Klass();
+  TypeArrayKlass* get_TypeArrayKlass() {
+    return (TypeArrayKlass*)get_Klass();
   }
 
   const char* type_string() { return "ciTypeArrayKlass"; }
diff --git a/hotspot/src/share/vm/ci/ciTypeFlow.cpp b/hotspot/src/share/vm/ci/ciTypeFlow.cpp
index f8b727cd2d5..bdbeeaf933e 100644
--- a/hotspot/src/share/vm/ci/ciTypeFlow.cpp
+++ b/hotspot/src/share/vm/ci/ciTypeFlow.cpp
@@ -2194,6 +2194,10 @@ bool ciTypeFlow::clone_loop_heads(Loop* lp, StateVector* temp_vector, JsrSet* te
     if (head->backedge_copy_count() != 0)
       continue;
 
+    // Don't clone head of OSR loop to get correct types in start block.
+    if (is_osr_flow() && head->start() == start_bci())
+      continue;
+
     // check _no_ shared head below us
     Loop* ch;
     for (ch = lp->child(); ch != NULL && ch->head() != head; ch = ch->sibling());
diff --git a/hotspot/src/share/vm/ci/ciTypeFlow.hpp b/hotspot/src/share/vm/ci/ciTypeFlow.hpp
index 8a8d241dac8..012ffb05ed0 100644
--- a/hotspot/src/share/vm/ci/ciTypeFlow.hpp
+++ b/hotspot/src/share/vm/ci/ciTypeFlow.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/classfile/classFileParser.cpp b/hotspot/src/share/vm/classfile/classFileParser.cpp
index 5dcd87cc391..9de2da9fc8b 100644
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp
@@ -782,7 +782,7 @@ bool put_after_lookup(Symbol* name, Symbol* sig, NameSigHash** table) {
 
 Array<Klass*>* ClassFileParser::parse_interfaces(constantPoolHandle cp,
                                                  int length,
-                                                   ClassLoaderData* loader_data,
+                                                 ClassLoaderData* loader_data,
                                                  Handle protection_domain,
                                                  Symbol* class_name,
                                                  TRAPS) {
@@ -816,9 +816,6 @@ Array<Klass*>* ClassFileParser::parse_interfaces(constantPoolHandle cp,
                     unresolved_klass, class_loader, protection_domain,
                     false, CHECK_NULL);
       interf = KlassHandle(THREAD, k);
-
-      if (LinkWellKnownClasses)  // my super type is well known to me
-        cp->klass_at_put(interface_index, interf()); // eagerly resolve
     }
 
     if (!Klass::cast(interf())->is_interface()) {
@@ -1008,40 +1005,42 @@ static FieldAllocationType _basic_type_to_atype[2 * (T_CONFLICT + 1)] = {
   BAD_ALLOCATION_TYPE, // 1
   BAD_ALLOCATION_TYPE, // 2
   BAD_ALLOCATION_TYPE, // 3
-  NONSTATIC_BYTE ,     // T_BOOLEAN  =  4,
-  NONSTATIC_SHORT,     // T_CHAR     =  5,
-  NONSTATIC_WORD,      // T_FLOAT    =  6,
-  NONSTATIC_DOUBLE,    // T_DOUBLE   =  7,
-  NONSTATIC_BYTE,      // T_BYTE     =  8,
-  NONSTATIC_SHORT,     // T_SHORT    =  9,
-  NONSTATIC_WORD,      // T_INT      = 10,
-  NONSTATIC_DOUBLE,    // T_LONG     = 11,
-  NONSTATIC_OOP,       // T_OBJECT   = 12,
-  NONSTATIC_OOP,       // T_ARRAY    = 13,
-  BAD_ALLOCATION_TYPE, // T_VOID     = 14,
-  BAD_ALLOCATION_TYPE, // T_ADDRESS  = 15,
-  BAD_ALLOCATION_TYPE, // T_NARROWOOP= 16,
-  BAD_ALLOCATION_TYPE, // T_METADATA = 17,
-  BAD_ALLOCATION_TYPE, // T_CONFLICT = 18,
+  NONSTATIC_BYTE ,     // T_BOOLEAN     =  4,
+  NONSTATIC_SHORT,     // T_CHAR        =  5,
+  NONSTATIC_WORD,      // T_FLOAT       =  6,
+  NONSTATIC_DOUBLE,    // T_DOUBLE      =  7,
+  NONSTATIC_BYTE,      // T_BYTE        =  8,
+  NONSTATIC_SHORT,     // T_SHORT       =  9,
+  NONSTATIC_WORD,      // T_INT         = 10,
+  NONSTATIC_DOUBLE,    // T_LONG        = 11,
+  NONSTATIC_OOP,       // T_OBJECT      = 12,
+  NONSTATIC_OOP,       // T_ARRAY       = 13,
+  BAD_ALLOCATION_TYPE, // T_VOID        = 14,
+  BAD_ALLOCATION_TYPE, // T_ADDRESS     = 15,
+  BAD_ALLOCATION_TYPE, // T_NARROWOOP   = 16,
+  BAD_ALLOCATION_TYPE, // T_METADATA    = 17,
+  BAD_ALLOCATION_TYPE, // T_NARROWKLASS = 18,
+  BAD_ALLOCATION_TYPE, // T_CONFLICT    = 19,
   BAD_ALLOCATION_TYPE, // 0
   BAD_ALLOCATION_TYPE, // 1
   BAD_ALLOCATION_TYPE, // 2
   BAD_ALLOCATION_TYPE, // 3
-  STATIC_BYTE ,        // T_BOOLEAN  =  4,
-  STATIC_SHORT,        // T_CHAR     =  5,
-  STATIC_WORD,          // T_FLOAT    =  6,
-  STATIC_DOUBLE,       // T_DOUBLE   =  7,
-  STATIC_BYTE,         // T_BYTE     =  8,
-  STATIC_SHORT,        // T_SHORT    =  9,
-  STATIC_WORD,         // T_INT      = 10,
-  STATIC_DOUBLE,       // T_LONG     = 11,
-  STATIC_OOP,          // T_OBJECT   = 12,
-  STATIC_OOP,          // T_ARRAY    = 13,
-  BAD_ALLOCATION_TYPE, // T_VOID     = 14,
-  BAD_ALLOCATION_TYPE, // T_ADDRESS  = 15,
-  BAD_ALLOCATION_TYPE, // T_NARROWOOP= 16,
-  BAD_ALLOCATION_TYPE, // T_METADATA = 17,
-  BAD_ALLOCATION_TYPE, // T_CONFLICT = 18,
+  STATIC_BYTE ,        // T_BOOLEAN     =  4,
+  STATIC_SHORT,        // T_CHAR        =  5,
+  STATIC_WORD,         // T_FLOAT       =  6,
+  STATIC_DOUBLE,       // T_DOUBLE      =  7,
+  STATIC_BYTE,         // T_BYTE        =  8,
+  STATIC_SHORT,        // T_SHORT       =  9,
+  STATIC_WORD,         // T_INT         = 10,
+  STATIC_DOUBLE,       // T_LONG        = 11,
+  STATIC_OOP,          // T_OBJECT      = 12,
+  STATIC_OOP,          // T_ARRAY       = 13,
+  BAD_ALLOCATION_TYPE, // T_VOID        = 14,
+  BAD_ALLOCATION_TYPE, // T_ADDRESS     = 15,
+  BAD_ALLOCATION_TYPE, // T_NARROWOOP   = 16,
+  BAD_ALLOCATION_TYPE, // T_METADATA    = 17,
+  BAD_ALLOCATION_TYPE, // T_NARROWKLASS = 18,
+  BAD_ALLOCATION_TYPE, // T_CONFLICT    = 19,
 };
 
 static FieldAllocationType basic_type_to_atype(bool is_static, BasicType type) {
@@ -1072,10 +1071,11 @@ class FieldAllocationCount: public ResourceObj {
 
 Array<u2>* ClassFileParser::parse_fields(ClassLoaderData* loader_data,
                                          Symbol* class_name,
-                                              constantPoolHandle cp, bool is_interface,
-                                              FieldAllocationCount *fac,
+                                         constantPoolHandle cp,
+                                         bool is_interface,
+                                         FieldAllocationCount *fac,
                                          Array<AnnotationArray*>** fields_annotations,
-                                              u2* java_fields_count_ptr, TRAPS) {
+                                         u2* java_fields_count_ptr, TRAPS) {
   ClassFileStream* cfs = stream();
   cfs->guarantee_more(2, CHECK_NULL);  // length
   u2 length = cfs->get_u2_fast();
@@ -2169,14 +2169,12 @@ methodHandle ClassFileParser::parse_method(ClassLoaderData* loader_data,
   }
 
   // All sizing information for a Method* is finally available, now create it
-  Method* m = Method::allocate(loader_data,
-                                        code_length,
-                                        access_flags,
-                                            linenumber_table_length,
-                                            total_lvt_length,
-                                            exception_table_length,
-                                            checked_exceptions_length,
-                                            CHECK_(nullHandle));
+  Method* m = Method::allocate(loader_data, code_length, access_flags,
+                               linenumber_table_length,
+                               total_lvt_length,
+                               exception_table_length,
+                               checked_exceptions_length,
+                               CHECK_(nullHandle));
 
   ClassLoadingService::add_class_method_size(m->size()*HeapWordSize);
 
@@ -2351,14 +2349,14 @@ methodHandle ClassFileParser::parse_method(ClassLoaderData* loader_data,
 // are added to klass's access_flags.
 
 Array<Method*>* ClassFileParser::parse_methods(ClassLoaderData* loader_data,
-                                                 constantPoolHandle cp,
-                                                 bool is_interface,
-                                              AccessFlags* promoted_flags,
-                                              bool* has_final_method,
-                                                 Array<AnnotationArray*>** methods_annotations,
-                                                 Array<AnnotationArray*>** methods_parameter_annotations,
-                                                 Array<AnnotationArray*>** methods_default_annotations,
-                                              TRAPS) {
+                                               constantPoolHandle cp,
+                                               bool is_interface,
+                                               AccessFlags* promoted_flags,
+                                               bool* has_final_method,
+                                               Array<AnnotationArray*>** methods_annotations,
+                                               Array<AnnotationArray*>** methods_parameter_annotations,
+                                               Array<AnnotationArray*>** methods_default_annotations,
+                                               TRAPS) {
   ClassFileStream* cfs = stream();
   AnnotationArray* method_annotations = NULL;
   AnnotationArray* method_parameter_annotations = NULL;
@@ -2450,10 +2448,9 @@ Array<int>* ClassFileParser::sort_methods(ClassLoaderData* loader_data,
   }
   // Sort method array by ascending method name (for faster lookups & vtable construction)
   // Note that the ordering is not alphabetical, see Symbol::fast_compare
-  Method::sort_methods(methods,
-                              methods_annotations,
-                              methods_parameter_annotations,
-                              methods_default_annotations);
+  Method::sort_methods(methods, methods_annotations,
+                       methods_parameter_annotations,
+                       methods_default_annotations);
 
   // If JVMTI original method ordering or sharing is enabled construct int
   // array remembering the original ordering
@@ -2835,10 +2832,10 @@ void ClassFileParser::parse_classfile_attributes(ClassLoaderData* loader_data,
   }
   AnnotationArray* annotations = assemble_annotations(loader_data,
                                                       runtime_visible_annotations,
-                                                     runtime_visible_annotations_length,
-                                                     runtime_invisible_annotations,
-                                                     runtime_invisible_annotations_length,
-                                                     CHECK);
+                                                      runtime_visible_annotations_length,
+                                                      runtime_invisible_annotations,
+                                                      runtime_invisible_annotations_length,
+                                                      CHECK);
   set_class_annotations(annotations);
 
   if (parsed_innerclasses_attribute || parsed_enclosingmethod_attribute) {
@@ -2884,9 +2881,9 @@ void ClassFileParser::apply_parsed_class_attributes(instanceKlassHandle k) {
 
 AnnotationArray* ClassFileParser::assemble_annotations(ClassLoaderData* loader_data,
                                                        u1* runtime_visible_annotations,
-                                                      int runtime_visible_annotations_length,
-                                                      u1* runtime_invisible_annotations,
-                                                      int runtime_invisible_annotations_length, TRAPS) {
+                                                       int runtime_visible_annotations_length,
+                                                       u1* runtime_invisible_annotations,
+                                                       int runtime_invisible_annotations_length, TRAPS) {
   AnnotationArray* annotations = NULL;
   if (runtime_visible_annotations != NULL ||
       runtime_invisible_annotations != NULL) {
@@ -3161,13 +3158,13 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
     Array<AnnotationArray*>* methods_parameter_annotations = NULL;
     Array<AnnotationArray*>* methods_default_annotations = NULL;
     Array<Method*>* methods = parse_methods(loader_data,
-                                              cp, access_flags.is_interface(),
-                                           &promoted_flags,
-                                           &has_final_method,
-                                              &methods_annotations,
-                                              &methods_parameter_annotations,
-                                              &methods_default_annotations,
-                                           CHECK_(nullHandle));
+                                            cp, access_flags.is_interface(),
+                                            &promoted_flags,
+                                            &has_final_method,
+                                            &methods_annotations,
+                                            &methods_parameter_annotations,
+                                            &methods_default_annotations,
+                                            CHECK_(nullHandle));
 
     // Additional attributes
     ClassAnnotationCollector parsed_annotations;
@@ -3186,17 +3183,14 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
                            "Interfaces must have java.lang.Object as superclass in class file %s",
                            CHECK_(nullHandle));
       }
-      Klass* k = SystemDictionary::resolve_super_or_fail(class_name,
-                                                           sk,
-                                                           class_loader,
-                                                           protection_domain,
-                                                           true,
-                                                           CHECK_(nullHandle));
+      Klass* k = SystemDictionary::resolve_super_or_fail(class_name, sk,
+                                                         class_loader,
+                                                         protection_domain,
+                                                         true,
+                                                         CHECK_(nullHandle));
 
       KlassHandle kh (THREAD, k);
       super_klass = instanceKlassHandle(THREAD, kh());
-      if (LinkWellKnownClasses)  // my super class is well known to me
-        cp->klass_at_put(super_class_index, super_klass()); // eagerly resolve
     }
     if (super_klass.not_null()) {
       if (super_klass->is_interface()) {
@@ -3222,10 +3216,10 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
     // sort methods
     Array<int>* method_ordering = sort_methods(loader_data,
                                                methods,
-                                                   methods_annotations,
-                                                   methods_parameter_annotations,
-                                                   methods_default_annotations,
-                                                   CHECK_(nullHandle));
+                                               methods_annotations,
+                                               methods_parameter_annotations,
+                                               methods_default_annotations,
+                                               CHECK_(nullHandle));
 
     // promote flags from parse_methods() to the klass' flags
     access_flags.add_promoted_flags(promoted_flags.as_int());
@@ -3591,16 +3585,16 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
       InstanceKlass::nonstatic_oop_map_size(total_oop_map_count);
 
     Klass* ik = InstanceKlass::allocate_instance_klass(loader_data,
-                                                         vtable_size,
-                                                         itable_size,
-                                                static_field_size,
-                                                         total_oop_map_size2,
-                                                         rt,
-                                                access_flags,
-                                                         name,
-                                                         super_klass(),
-                                                         host_klass,
-                                                CHECK_(nullHandle));
+                                                       vtable_size,
+                                                       itable_size,
+                                                       static_field_size,
+                                                       total_oop_map_size2,
+                                                       rt,
+                                                       access_flags,
+                                                       name,
+                                                       super_klass(),
+                                                       host_klass,
+                                                       CHECK_(nullHandle));
 
     // Add all classes to our internal class loader list here,
     // including classes in the bootstrap (NULL) class loader.
@@ -3642,7 +3636,7 @@ instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
     // has to be changed accordingly.
     this_klass->set_initial_method_idnum(methods->length());
     this_klass->set_name(cp->klass_name_at(this_class_index));
-    if (LinkWellKnownClasses || is_anonymous())  // I am well known to myself
+    if (is_anonymous())  // I am well known to myself
       cp->klass_at_put(this_class_index, this_klass()); // eagerly resolve
 
     if (fields_annotations != NULL ||
diff --git a/hotspot/src/share/vm/classfile/classFileParser.hpp b/hotspot/src/share/vm/classfile/classFileParser.hpp
index 17106125a20..c6c4a089c1b 100644
--- a/hotspot/src/share/vm/classfile/classFileParser.hpp
+++ b/hotspot/src/share/vm/classfile/classFileParser.hpp
@@ -148,7 +148,7 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
   // Interface parsing
   Array<Klass*>* parse_interfaces(constantPoolHandle cp,
                                   int length,
-                                    ClassLoaderData* loader_data,
+                                  ClassLoaderData* loader_data,
                                   Handle protection_domain,
                                   Symbol* class_name,
                                   TRAPS);
@@ -166,10 +166,10 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
                               TRAPS);
   Array<u2>* parse_fields(ClassLoaderData* loader_data,
                           Symbol* class_name,
-                               constantPoolHandle cp, bool is_interface,
-                               FieldAllocationCount *fac,
+                          constantPoolHandle cp, bool is_interface,
+                          FieldAllocationCount *fac,
                           Array<AnnotationArray*>** fields_annotations,
-                               u2* java_fields_count_ptr, TRAPS);
+                          u2* java_fields_count_ptr, TRAPS);
 
   // Method parsing
   methodHandle parse_method(ClassLoaderData* loader_data,
@@ -181,13 +181,13 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
                             AnnotationArray** method_default_annotations,
                             TRAPS);
   Array<Method*>* parse_methods(ClassLoaderData* loader_data,
-                                  constantPoolHandle cp,
-                                  bool is_interface,
+                                constantPoolHandle cp,
+                                bool is_interface,
                                 AccessFlags* promoted_flags,
                                 bool* has_final_method,
-                                  Array<AnnotationArray*>** methods_annotations,
-                                  Array<AnnotationArray*>** methods_parameter_annotations,
-                                  Array<AnnotationArray*>** methods_default_annotations,
+                                Array<AnnotationArray*>** methods_annotations,
+                                Array<AnnotationArray*>** methods_parameter_annotations,
+                                Array<AnnotationArray*>** methods_default_annotations,
                                 TRAPS);
   Array<int>* sort_methods(ClassLoaderData* loader_data,
                            Array<Method*>* methods,
@@ -232,9 +232,9 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
   // Annotations handling
   AnnotationArray* assemble_annotations(ClassLoaderData* loader_data,
                                         u1* runtime_visible_annotations,
-                                       int runtime_visible_annotations_length,
-                                       u1* runtime_invisible_annotations,
-                                       int runtime_invisible_annotations_length, TRAPS);
+                                        int runtime_visible_annotations_length,
+                                        u1* runtime_invisible_annotations,
+                                        int runtime_invisible_annotations_length, TRAPS);
   int skip_annotation(u1* buffer, int limit, int index);
   int skip_annotation_value(u1* buffer, int limit, int index);
   void parse_annotations(u1* buffer, int limit, constantPoolHandle cp,
@@ -252,8 +252,8 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
                      unsigned int* nonstatic_oop_counts);
   void set_precomputed_flags(instanceKlassHandle k);
   Array<Klass*>* compute_transitive_interfaces(ClassLoaderData* loader_data,
-                                                 instanceKlassHandle super,
-                                                 Array<Klass*>* local_ifs, TRAPS);
+                                               instanceKlassHandle super,
+                                               Array<Klass*>* local_ifs, TRAPS);
 
   // Format checker methods
   void classfile_parse_error(const char* msg, TRAPS);
@@ -344,7 +344,7 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
   // constant pool construction, but in later versions they can.
   // %%% Let's phase out the old is_klass_reference.
   bool is_klass_reference(constantPoolHandle cp, int index) {
-    return ((LinkWellKnownClasses || EnableInvokeDynamic)
+    return (EnableInvokeDynamic
             ? cp->tag_at(index).is_klass_or_reference()
             : cp->tag_at(index).is_klass_reference());
   }
diff --git a/hotspot/src/share/vm/classfile/classLoader.hpp b/hotspot/src/share/vm/classfile/classLoader.hpp
index ee58550b61e..aa68ed2d0c1 100644
--- a/hotspot/src/share/vm/classfile/classLoader.hpp
+++ b/hotspot/src/share/vm/classfile/classLoader.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/classfile/javaAssertions.hpp b/hotspot/src/share/vm/classfile/javaAssertions.hpp
index d06d9010f00..8746b8477d2 100644
--- a/hotspot/src/share/vm/classfile/javaAssertions.hpp
+++ b/hotspot/src/share/vm/classfile/javaAssertions.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/classfile/javaClasses.cpp b/hotspot/src/share/vm/classfile/javaClasses.cpp
index bf539191ac0..7e8c39cdd3b 100644
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp
@@ -540,18 +540,18 @@ oop java_lang_Class::create_mirror(KlassHandle k, TRAPS) {
     if (k->oop_is_array()) {
       Handle comp_mirror;
       if (k->oop_is_typeArray()) {
-        BasicType type = typeArrayKlass::cast(k())->element_type();
+        BasicType type = TypeArrayKlass::cast(k())->element_type();
         comp_mirror = Universe::java_mirror(type);
       } else {
         assert(k->oop_is_objArray(), "Must be");
-        Klass* element_klass = objArrayKlass::cast(k())->element_klass();
+        Klass* element_klass = ObjArrayKlass::cast(k())->element_klass();
         assert(element_klass != NULL, "Must have an element klass");
           comp_mirror = Klass::cast(element_klass)->java_mirror();
       }
       assert(comp_mirror.not_null(), "must have a mirror");
 
         // Two-way link between the array klass and its component mirror:
-      arrayKlass::cast(k())->set_component_mirror(comp_mirror());
+      ArrayKlass::cast(k())->set_component_mirror(comp_mirror());
       set_array_klass(comp_mirror(), k());
     } else {
       assert(k->oop_is_instance(), "Must be");
@@ -704,7 +704,7 @@ bool java_lang_Class::is_primitive(oop java_class) {
 #ifdef ASSERT
   if (is_primitive) {
     Klass* k = ((Klass*)java_class->metadata_field(_array_klass_offset));
-    assert(k == NULL || is_java_primitive(arrayKlass::cast(k)->element_type()),
+    assert(k == NULL || is_java_primitive(ArrayKlass::cast(k)->element_type()),
         "Should be either the T_VOID primitive or a java primitive");
   }
 #endif
@@ -719,7 +719,7 @@ BasicType java_lang_Class::primitive_type(oop java_class) {
   BasicType type = T_VOID;
   if (ak != NULL) {
     // Note: create_basic_type_mirror above initializes ak to a non-null value.
-    type = arrayKlass::cast(ak)->element_type();
+    type = ArrayKlass::cast(ak)->element_type();
   } else {
     assert(java_class == Universe::void_mirror(), "only valid non-array primitive");
   }
@@ -846,7 +846,7 @@ void java_lang_Thread::set_thread(oop java_thread, JavaThread* thread) {
 
 typeArrayOop java_lang_Thread::name(oop java_thread) {
   oop name = java_thread->obj_field(_name_offset);
-  assert(name == NULL || (name->is_typeArray() && typeArrayKlass::cast(name->klass())->element_type() == T_CHAR), "just checking");
+  assert(name == NULL || (name->is_typeArray() && TypeArrayKlass::cast(name->klass())->element_type() == T_CHAR), "just checking");
   return typeArrayOop(name);
 }
 
diff --git a/hotspot/src/share/vm/classfile/systemDictionary.cpp b/hotspot/src/share/vm/classfile/systemDictionary.cpp
index 3af4219e4f0..3fa7267ba0f 100644
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp
@@ -244,7 +244,7 @@ Klass* SystemDictionary::resolve_array_class_or_null(Symbol* class_name,
     }
   } else {
     k = Universe::typeArrayKlassObj(t);
-    k = typeArrayKlass::cast(k)->array_klass(fd.dimension(), CHECK_NULL);
+    k = TypeArrayKlass::cast(k)->array_klass(fd.dimension(), CHECK_NULL);
   }
   return k;
 }
@@ -291,16 +291,6 @@ Klass* SystemDictionary::resolve_super_or_fail(Symbol* child_name,
                                                  Handle protection_domain,
                                                  bool is_superclass,
                                                  TRAPS) {
-
-  // Try to get one of the well-known klasses.
-  // They are trusted, and do not participate in circularities.
-  if (LinkWellKnownClasses) {
-    Klass* k = find_well_known_klass(class_name);
-    if (k != NULL) {
-      return k;
-    }
-  }
-
   // Double-check, if child class is already loaded, just return super-class,interface
   // Don't add a placedholder if already loaded, i.e. already in system dictionary
   // Make sure there's a placeholder for the *child* before resolving.
@@ -920,20 +910,12 @@ Klass* SystemDictionary::find(Symbol* class_name,
 // Look for a loaded instance or array klass by name.  Do not do any loading.
 // return NULL in case of error.
 Klass* SystemDictionary::find_instance_or_array_klass(Symbol* class_name,
-                                                        Handle class_loader,
-                                                        Handle protection_domain,
-                                                        TRAPS) {
+                                                      Handle class_loader,
+                                                      Handle protection_domain,
+                                                      TRAPS) {
   Klass* k = NULL;
   assert(class_name != NULL, "class name must be non NULL");
 
-  // Try to get one of the well-known klasses.
-  if (LinkWellKnownClasses) {
-    k = find_well_known_klass(class_name);
-    if (k != NULL) {
-      return k;
-    }
-  }
-
   if (FieldType::is_array(class_name)) {
     // The name refers to an array.  Parse the name.
     // dimension and object_key in FieldArrayInfo are assigned as a
@@ -954,48 +936,16 @@ Klass* SystemDictionary::find_instance_or_array_klass(Symbol* class_name,
   return k;
 }
 
-// Quick range check for names of well-known classes:
-static Symbol* wk_klass_name_limits[2] = {NULL, NULL};
-
-#ifndef PRODUCT
-static int find_wkk_calls, find_wkk_probes, find_wkk_wins;
-// counts for "hello world": 3983, 1616, 1075
-//  => 60% hit after limit guard, 25% total win rate
-#endif
-
-Klass* SystemDictionary::find_well_known_klass(Symbol* class_name) {
-  // A bounds-check on class_name will quickly get a negative result.
-  NOT_PRODUCT(find_wkk_calls++);
-  if (class_name >= wk_klass_name_limits[0] &&
-      class_name <= wk_klass_name_limits[1]) {
-    NOT_PRODUCT(find_wkk_probes++);
-    vmSymbols::SID sid = vmSymbols::find_sid(class_name);
-    if (sid != vmSymbols::NO_SID) {
-      Klass* k = NULL;
-      switch (sid) {
-        #define WK_KLASS_CASE(name, symbol, ignore_option) \
-        case vmSymbols::VM_SYMBOL_ENUM_NAME(symbol): \
-          k = WK_KLASS(name); break;
-        WK_KLASSES_DO(WK_KLASS_CASE)
-        #undef WK_KLASS_CASE
-      }
-      NOT_PRODUCT(if (k != NULL)  find_wkk_wins++);
-      return k;
-    }
-  }
-  return NULL;
-}
-
 // Note: this method is much like resolve_from_stream, but
 // updates no supplemental data structures.
 // TODO consolidate the two methods with a helper routine?
 Klass* SystemDictionary::parse_stream(Symbol* class_name,
-                                        Handle class_loader,
-                                        Handle protection_domain,
-                                        ClassFileStream* st,
-                                        KlassHandle host_klass,
-                                        GrowableArray<Handle>* cp_patches,
-                                        TRAPS) {
+                                      Handle class_loader,
+                                      Handle protection_domain,
+                                      ClassFileStream* st,
+                                      KlassHandle host_klass,
+                                      GrowableArray<Handle>* cp_patches,
+                                      TRAPS) {
   TempNewSymbol parsed_name = NULL;
 
   // Parse the stream. Note that we do this even though this klass might
@@ -1076,11 +1026,11 @@ Klass* SystemDictionary::parse_stream(Symbol* class_name,
 // the class until we have parsed the stream.
 
 Klass* SystemDictionary::resolve_from_stream(Symbol* class_name,
-                                               Handle class_loader,
-                                               Handle protection_domain,
-                                               ClassFileStream* st,
-                                               bool verify,
-                                               TRAPS) {
+                                             Handle class_loader,
+                                             Handle protection_domain,
+                                             ClassFileStream* st,
+                                             bool verify,
+                                             TRAPS) {
 
   // Classloaders that support parallelism, e.g. bootstrap classloader,
   // or all classloaders with UnsyncloadClass do not acquire lock here
@@ -1939,23 +1889,12 @@ void SystemDictionary::initialize_wk_klasses_until(WKID limit_id, WKID &start_id
     int opt  = (info & right_n_bits(CEIL_LG_OPTION_LIMIT));
 
     initialize_wk_klass((WKID)id, opt, CHECK);
-
-    // Update limits, so find_well_known_klass can be very fast:
-    Symbol* s = vmSymbols::symbol_at((vmSymbols::SID)sid);
-    if (wk_klass_name_limits[1] == NULL) {
-      wk_klass_name_limits[0] = wk_klass_name_limits[1] = s;
-    } else if (wk_klass_name_limits[1] < s) {
-      wk_klass_name_limits[1] = s;
-    } else if (wk_klass_name_limits[0] > s) {
-      wk_klass_name_limits[0] = s;
-    }
   }
 
   // move the starting value forward to the limit:
   start_id = limit_id;
 }
 
-
 void SystemDictionary::initialize_preloaded_classes(TRAPS) {
   assert(WK_KLASS(Object_klass) == NULL, "preloaded classes should only be initialized once");
   // Preload commonly used klasses
@@ -2187,7 +2126,7 @@ Klass* SystemDictionary::find_constrained_instance_or_array_klass(
   // Force the protection domain to be null.  (This removes protection checks.)
   Handle no_protection_domain;
   Klass* klass = find_instance_or_array_klass(class_name, class_loader,
-                                                no_protection_domain, CHECK_NULL);
+                                              no_protection_domain, CHECK_NULL);
   if (klass != NULL)
     return klass;
 
@@ -2429,7 +2368,8 @@ static methodHandle unpack_method_and_appendix(Handle mname,
 methodHandle SystemDictionary::find_method_handle_invoker(Symbol* name,
                                                           Symbol* signature,
                                                           KlassHandle accessing_klass,
-                                                          Handle* appendix_result,
+                                                          Handle *appendix_result,
+                                                          Handle *method_type_result,
                                                           TRAPS) {
   methodHandle empty;
   assert(EnableInvokeDynamic, "");
@@ -2461,6 +2401,7 @@ methodHandle SystemDictionary::find_method_handle_invoker(Symbol* name,
                          vmSymbols::linkMethod_signature(),
                          &args, CHECK_(empty));
   Handle mname(THREAD, (oop) result.get_jobject());
+  (*method_type_result) = method_type;
   return unpack_method_and_appendix(mname, appendix_box, appendix_result, THREAD);
 }
 
@@ -2523,7 +2464,7 @@ Handle SystemDictionary::find_method_handle_type(Symbol* signature,
       mirror = NULL;  // safety
       // Emulate ConstantPool::verify_constant_pool_resolve.
       if (Klass::cast(sel_klass)->oop_is_objArray())
-        sel_klass = objArrayKlass::cast(sel_klass)->bottom_klass();
+        sel_klass = ObjArrayKlass::cast(sel_klass)->bottom_klass();
       if (Klass::cast(sel_klass)->oop_is_instance()) {
         KlassHandle sel_kh(THREAD, sel_klass);
         LinkResolver::check_klass_accessability(accessing_klass, sel_kh, CHECK_(empty));
@@ -2607,7 +2548,8 @@ methodHandle SystemDictionary::find_dynamic_call_site_invoker(KlassHandle caller
                                                               Handle bootstrap_specifier,
                                                               Symbol* name,
                                                               Symbol* type,
-                                                              Handle* appendix_result,
+                                                              Handle *appendix_result,
+                                                              Handle *method_type_result,
                                                               TRAPS) {
   methodHandle empty;
   Handle bsm, info;
@@ -2650,6 +2592,7 @@ methodHandle SystemDictionary::find_dynamic_call_site_invoker(KlassHandle caller
                          vmSymbols::linkCallSite_signature(),
                          &args, CHECK_(empty));
   Handle mname(THREAD, (oop) result.get_jobject());
+  (*method_type_result) = method_type;
   return unpack_method_and_appendix(mname, appendix_box, appendix_result, THREAD);
 }
 
diff --git a/hotspot/src/share/vm/classfile/systemDictionary.hpp b/hotspot/src/share/vm/classfile/systemDictionary.hpp
index 36ab5158c79..19ddbe9c9f8 100644
--- a/hotspot/src/share/vm/classfile/systemDictionary.hpp
+++ b/hotspot/src/share/vm/classfile/systemDictionary.hpp
@@ -92,93 +92,93 @@ class SymbolPropertyTable;
 // The order of these definitions is significant; it is the order in which
 // preloading is actually performed by initialize_preloaded_classes.
 
-#define WK_KLASSES_DO(template)                                               \
-  /* well-known classes */                                                    \
-  template(Object_klass,                 java_lang_Object,               Pre) \
-  template(String_klass,                 java_lang_String,               Pre) \
-  template(Class_klass,                  java_lang_Class,                Pre) \
-  template(Cloneable_klass,              java_lang_Cloneable,            Pre) \
-  template(ClassLoader_klass,            java_lang_ClassLoader,          Pre) \
-  template(Serializable_klass,           java_io_Serializable,           Pre) \
-  template(System_klass,                 java_lang_System,               Pre) \
-  template(Throwable_klass,              java_lang_Throwable,            Pre) \
-  template(Error_klass,                  java_lang_Error,                Pre) \
-  template(ThreadDeath_klass,            java_lang_ThreadDeath,          Pre) \
-  template(Exception_klass,              java_lang_Exception,            Pre) \
-  template(RuntimeException_klass,       java_lang_RuntimeException,     Pre) \
-  template(ProtectionDomain_klass,       java_security_ProtectionDomain, Pre) \
-  template(AccessControlContext_klass,   java_security_AccessControlContext, Pre) \
-  template(ClassNotFoundException_klass, java_lang_ClassNotFoundException, Pre) \
-  template(NoClassDefFoundError_klass,   java_lang_NoClassDefFoundError, Pre) \
-  template(LinkageError_klass,           java_lang_LinkageError,         Pre) \
-  template(ClassCastException_klass,     java_lang_ClassCastException,   Pre) \
-  template(ArrayStoreException_klass,    java_lang_ArrayStoreException,  Pre) \
-  template(VirtualMachineError_klass,    java_lang_VirtualMachineError,  Pre) \
-  template(OutOfMemoryError_klass,       java_lang_OutOfMemoryError,     Pre) \
-  template(StackOverflowError_klass,     java_lang_StackOverflowError,   Pre) \
-  template(IllegalMonitorStateException_klass, java_lang_IllegalMonitorStateException, Pre) \
-  template(Reference_klass,              java_lang_ref_Reference,        Pre) \
-                                                                              \
-  /* Preload ref klasses and set reference types */                           \
-  template(SoftReference_klass,          java_lang_ref_SoftReference,    Pre) \
-  template(WeakReference_klass,          java_lang_ref_WeakReference,    Pre) \
-  template(FinalReference_klass,         java_lang_ref_FinalReference,   Pre) \
-  template(PhantomReference_klass,       java_lang_ref_PhantomReference, Pre) \
-  template(Finalizer_klass,              java_lang_ref_Finalizer,        Pre) \
-                                                                              \
-  template(Thread_klass,                 java_lang_Thread,               Pre) \
-  template(ThreadGroup_klass,            java_lang_ThreadGroup,          Pre) \
-  template(Properties_klass,             java_util_Properties,           Pre) \
-  template(reflect_AccessibleObject_klass, java_lang_reflect_AccessibleObject, Pre) \
-  template(reflect_Field_klass,          java_lang_reflect_Field,        Pre) \
-  template(reflect_Method_klass,         java_lang_reflect_Method,       Pre) \
-  template(reflect_Constructor_klass,    java_lang_reflect_Constructor,  Pre) \
-                                                                              \
+#define WK_KLASSES_DO(do_klass)                                                                                          \
+  /* well-known classes */                                                                                               \
+  do_klass(Object_klass,                                java_lang_Object,                          Pre                 ) \
+  do_klass(String_klass,                                java_lang_String,                          Pre                 ) \
+  do_klass(Class_klass,                                 java_lang_Class,                           Pre                 ) \
+  do_klass(Cloneable_klass,                             java_lang_Cloneable,                       Pre                 ) \
+  do_klass(ClassLoader_klass,                           java_lang_ClassLoader,                     Pre                 ) \
+  do_klass(Serializable_klass,                          java_io_Serializable,                      Pre                 ) \
+  do_klass(System_klass,                                java_lang_System,                          Pre                 ) \
+  do_klass(Throwable_klass,                             java_lang_Throwable,                       Pre                 ) \
+  do_klass(Error_klass,                                 java_lang_Error,                           Pre                 ) \
+  do_klass(ThreadDeath_klass,                           java_lang_ThreadDeath,                     Pre                 ) \
+  do_klass(Exception_klass,                             java_lang_Exception,                       Pre                 ) \
+  do_klass(RuntimeException_klass,                      java_lang_RuntimeException,                Pre                 ) \
+  do_klass(ProtectionDomain_klass,                      java_security_ProtectionDomain,            Pre                 ) \
+  do_klass(AccessControlContext_klass,                  java_security_AccessControlContext,        Pre                 ) \
+  do_klass(ClassNotFoundException_klass,                java_lang_ClassNotFoundException,          Pre                 ) \
+  do_klass(NoClassDefFoundError_klass,                  java_lang_NoClassDefFoundError,            Pre                 ) \
+  do_klass(LinkageError_klass,                          java_lang_LinkageError,                    Pre                 ) \
+  do_klass(ClassCastException_klass,                    java_lang_ClassCastException,              Pre                 ) \
+  do_klass(ArrayStoreException_klass,                   java_lang_ArrayStoreException,             Pre                 ) \
+  do_klass(VirtualMachineError_klass,                   java_lang_VirtualMachineError,             Pre                 ) \
+  do_klass(OutOfMemoryError_klass,                      java_lang_OutOfMemoryError,                Pre                 ) \
+  do_klass(StackOverflowError_klass,                    java_lang_StackOverflowError,              Pre                 ) \
+  do_klass(IllegalMonitorStateException_klass,          java_lang_IllegalMonitorStateException,    Pre                 ) \
+  do_klass(Reference_klass,                             java_lang_ref_Reference,                   Pre                 ) \
+                                                                                                                         \
+  /* Preload ref klasses and set reference types */                                                                      \
+  do_klass(SoftReference_klass,                         java_lang_ref_SoftReference,               Pre                 ) \
+  do_klass(WeakReference_klass,                         java_lang_ref_WeakReference,               Pre                 ) \
+  do_klass(FinalReference_klass,                        java_lang_ref_FinalReference,              Pre                 ) \
+  do_klass(PhantomReference_klass,                      java_lang_ref_PhantomReference,            Pre                 ) \
+  do_klass(Finalizer_klass,                             java_lang_ref_Finalizer,                   Pre                 ) \
+                                                                                                                         \
+  do_klass(Thread_klass,                                java_lang_Thread,                          Pre                 ) \
+  do_klass(ThreadGroup_klass,                           java_lang_ThreadGroup,                     Pre                 ) \
+  do_klass(Properties_klass,                            java_util_Properties,                      Pre                 ) \
+  do_klass(reflect_AccessibleObject_klass,              java_lang_reflect_AccessibleObject,        Pre                 ) \
+  do_klass(reflect_Field_klass,                         java_lang_reflect_Field,                   Pre                 ) \
+  do_klass(reflect_Method_klass,                        java_lang_reflect_Method,                  Pre                 ) \
+  do_klass(reflect_Constructor_klass,                   java_lang_reflect_Constructor,             Pre                 ) \
+                                                                                                                         \
   /* NOTE: needed too early in bootstrapping process to have checks based on JDK version */                              \
   /* Universe::is_gte_jdk14x_version() is not set up by this point. */                                                   \
   /* It's okay if this turns out to be NULL in non-1.4 JDKs. */                                                          \
-  template(reflect_MagicAccessorImpl_klass,             sun_reflect_MagicAccessorImpl,             Opt)                  \
-  template(reflect_MethodAccessorImpl_klass,            sun_reflect_MethodAccessorImpl,            Opt_Only_JDK14NewRef) \
-  template(reflect_ConstructorAccessorImpl_klass,       sun_reflect_ConstructorAccessorImpl,       Opt_Only_JDK14NewRef) \
-  template(reflect_DelegatingClassLoader_klass,         sun_reflect_DelegatingClassLoader,         Opt)                  \
-  template(reflect_ConstantPool_klass,                  sun_reflect_ConstantPool,                  Opt_Only_JDK15)       \
-  template(reflect_UnsafeStaticFieldAccessorImpl_klass, sun_reflect_UnsafeStaticFieldAccessorImpl, Opt_Only_JDK15)       \
-                                                                              \
-  /* support for dynamic typing; it's OK if these are NULL in earlier JDKs */ \
-  template(MethodHandle_klass,             java_lang_invoke_MethodHandle,             Pre_JSR292) \
-  template(MemberName_klass,               java_lang_invoke_MemberName,               Pre_JSR292) \
-  template(MethodHandleNatives_klass,      java_lang_invoke_MethodHandleNatives,      Pre_JSR292) \
-  template(LambdaForm_klass,               java_lang_invoke_LambdaForm,               Opt)        \
-  template(MethodType_klass,               java_lang_invoke_MethodType,               Pre_JSR292) \
-  template(BootstrapMethodError_klass,     java_lang_BootstrapMethodError,            Pre_JSR292) \
-  template(CallSite_klass,                 java_lang_invoke_CallSite,                 Pre_JSR292) \
-  template(ConstantCallSite_klass,         java_lang_invoke_ConstantCallSite,         Pre_JSR292) \
-  template(MutableCallSite_klass,          java_lang_invoke_MutableCallSite,          Pre_JSR292) \
-  template(VolatileCallSite_klass,         java_lang_invoke_VolatileCallSite,         Pre_JSR292) \
-  /* Note: MethodHandle must be first, and VolatileCallSite last in group */  \
-                                                                              \
-  template(StringBuffer_klass,           java_lang_StringBuffer,         Pre) \
-  template(StringBuilder_klass,          java_lang_StringBuilder,        Pre) \
-                                                                              \
-  /* It's NULL in non-1.4 JDKs. */                                            \
-  template(StackTraceElement_klass,      java_lang_StackTraceElement,    Opt) \
-  /* Universe::is_gte_jdk14x_version() is not set up by this point. */        \
-  /* It's okay if this turns out to be NULL in non-1.4 JDKs. */               \
-  template(nio_Buffer_klass,             java_nio_Buffer,                Opt) \
-                                                                              \
-  template(DownloadManager_klass,        sun_jkernel_DownloadManager, Opt_Kernel) \
-                                                                              \
-  template(PostVMInitHook_klass,         sun_misc_PostVMInitHook, Opt)        \
-                                                                              \
-  /* Preload boxing klasses */                                                \
-  template(Boolean_klass,                java_lang_Boolean,              Pre) \
-  template(Character_klass,              java_lang_Character,            Pre) \
-  template(Float_klass,                  java_lang_Float,                Pre) \
-  template(Double_klass,                 java_lang_Double,               Pre) \
-  template(Byte_klass,                   java_lang_Byte,                 Pre) \
-  template(Short_klass,                  java_lang_Short,                Pre) \
-  template(Integer_klass,                java_lang_Integer,              Pre) \
-  template(Long_klass,                   java_lang_Long,                 Pre) \
+  do_klass(reflect_MagicAccessorImpl_klass,             sun_reflect_MagicAccessorImpl,             Opt                 ) \
+  do_klass(reflect_MethodAccessorImpl_klass,            sun_reflect_MethodAccessorImpl,            Opt_Only_JDK14NewRef) \
+  do_klass(reflect_ConstructorAccessorImpl_klass,       sun_reflect_ConstructorAccessorImpl,       Opt_Only_JDK14NewRef) \
+  do_klass(reflect_DelegatingClassLoader_klass,         sun_reflect_DelegatingClassLoader,         Opt                 ) \
+  do_klass(reflect_ConstantPool_klass,                  sun_reflect_ConstantPool,                  Opt_Only_JDK15      ) \
+  do_klass(reflect_UnsafeStaticFieldAccessorImpl_klass, sun_reflect_UnsafeStaticFieldAccessorImpl, Opt_Only_JDK15      ) \
+                                                                                                                         \
+  /* support for dynamic typing; it's OK if these are NULL in earlier JDKs */                                            \
+  do_klass(MethodHandle_klass,                          java_lang_invoke_MethodHandle,             Pre_JSR292          ) \
+  do_klass(MemberName_klass,                            java_lang_invoke_MemberName,               Pre_JSR292          ) \
+  do_klass(MethodHandleNatives_klass,                   java_lang_invoke_MethodHandleNatives,      Pre_JSR292          ) \
+  do_klass(LambdaForm_klass,                            java_lang_invoke_LambdaForm,               Opt                 ) \
+  do_klass(MethodType_klass,                            java_lang_invoke_MethodType,               Pre_JSR292          ) \
+  do_klass(BootstrapMethodError_klass,                  java_lang_BootstrapMethodError,            Pre_JSR292          ) \
+  do_klass(CallSite_klass,                              java_lang_invoke_CallSite,                 Pre_JSR292          ) \
+  do_klass(ConstantCallSite_klass,                      java_lang_invoke_ConstantCallSite,         Pre_JSR292          ) \
+  do_klass(MutableCallSite_klass,                       java_lang_invoke_MutableCallSite,          Pre_JSR292          ) \
+  do_klass(VolatileCallSite_klass,                      java_lang_invoke_VolatileCallSite,         Pre_JSR292          ) \
+  /* Note: MethodHandle must be first, and VolatileCallSite last in group */                                             \
+                                                                                                                         \
+  do_klass(StringBuffer_klass,                          java_lang_StringBuffer,                    Pre                 ) \
+  do_klass(StringBuilder_klass,                         java_lang_StringBuilder,                   Pre                 ) \
+                                                                                                                         \
+  /* It's NULL in non-1.4 JDKs. */                                                                                       \
+  do_klass(StackTraceElement_klass,                     java_lang_StackTraceElement,               Opt                 ) \
+  /* Universe::is_gte_jdk14x_version() is not set up by this point. */                                                   \
+  /* It's okay if this turns out to be NULL in non-1.4 JDKs. */                                                          \
+  do_klass(nio_Buffer_klass,                            java_nio_Buffer,                           Opt                 ) \
+                                                                                                                         \
+  do_klass(DownloadManager_klass,                       sun_jkernel_DownloadManager,               Opt_Kernel          ) \
+                                                                                                                         \
+  do_klass(PostVMInitHook_klass,                        sun_misc_PostVMInitHook,                   Opt                 ) \
+                                                                                                                         \
+  /* Preload boxing klasses */                                                                                           \
+  do_klass(Boolean_klass,                               java_lang_Boolean,                         Pre                 ) \
+  do_klass(Character_klass,                             java_lang_Character,                       Pre                 ) \
+  do_klass(Float_klass,                                 java_lang_Float,                           Pre                 ) \
+  do_klass(Double_klass,                                java_lang_Double,                          Pre                 ) \
+  do_klass(Byte_klass,                                  java_lang_Byte,                            Pre                 ) \
+  do_klass(Short_klass,                                 java_lang_Short,                           Pre                 ) \
+  do_klass(Integer_klass,                               java_lang_Integer,                         Pre                 ) \
+  do_klass(Long_klass,                                  java_lang_Long,                            Pre                 ) \
   /*end*/
 
 
@@ -280,9 +280,6 @@ public:
                                                Handle protection_domain,
                                                TRAPS);
 
-  // If the given name is known to vmSymbols, return the well-know klass:
-  static Klass* find_well_known_klass(Symbol* class_name);
-
   // Lookup an instance or array class that has already been loaded
   // either into the given class loader, or else into another class
   // loader that is constrained (via loader constraints) to produce
@@ -392,9 +389,9 @@ public:
     return k;
   }
 
-  static Klass* check_klass_Pre(Klass* k) { return check_klass(k); }
+  static Klass* check_klass_Pre(       Klass* k) { return check_klass(k); }
   static Klass* check_klass_Pre_JSR292(Klass* k) { return EnableInvokeDynamic ? check_klass(k) : k; }
-  static Klass* check_klass_Opt(Klass* k) { return k; }
+  static Klass* check_klass_Opt(       Klass* k) { return k; }
   static Klass* check_klass_Opt_Kernel(Klass* k) { return k; } //== Opt
   static Klass* check_klass_Opt_Only_JDK15(Klass* k) {
     assert(JDK_Version::is_gte_jdk15x_version(), "JDK 1.5 only");
@@ -497,6 +494,7 @@ public:
                                                  Symbol* signature,
                                                  KlassHandle accessing_klass,
                                                  Handle *appendix_result,
+                                                 Handle *method_type_result,
                                                  TRAPS);
   // for a given signature, find the internal MethodHandle method (linkTo* or invokeBasic)
   // (does not ask Java, since this is a low-level intrinsic defined by the JVM)
@@ -523,6 +521,7 @@ public:
                                                      Symbol* name,
                                                      Symbol* type,
                                                      Handle *appendix_result,
+                                                     Handle *method_type_result,
                                                      TRAPS);
 
   // Utility for printing loader "name" as part of tracing constraints
diff --git a/hotspot/src/share/vm/classfile/vmSymbols.cpp b/hotspot/src/share/vm/classfile/vmSymbols.cpp
index 44de54f5fae..318d4178f81 100644
--- a/hotspot/src/share/vm/classfile/vmSymbols.cpp
+++ b/hotspot/src/share/vm/classfile/vmSymbols.cpp
@@ -324,24 +324,6 @@ vmIntrinsics::ID vmIntrinsics::for_raw_conversion(BasicType src, BasicType dest)
   return vmIntrinsics::_none;
 }
 
-Method* vmIntrinsics::method_for(vmIntrinsics::ID id) {
-  if (id == _none)  return NULL;
-  Symbol* cname = vmSymbols::symbol_at(class_for(id));
-  Symbol* mname = vmSymbols::symbol_at(name_for(id));
-  Symbol* msig  = vmSymbols::symbol_at(signature_for(id));
-  if (cname == NULL || mname == NULL || msig == NULL)  return NULL;
-  Klass* k = SystemDictionary::find_well_known_klass(cname);
-  if (k == NULL)  return NULL;
-  Method* m = InstanceKlass::cast(k)->find_method(mname, msig);
-  if (m == NULL &&
-      cname == vmSymbols::java_lang_invoke_MethodHandle() &&
-      msig == vmSymbols::star_name()) {
-    // Any signature polymorphic method is represented by a fixed concrete signature:
-    m = InstanceKlass::cast(k)->find_method(mname, vmSymbols::object_array_object_signature());
-  }
-  return m;
-}
-
 
 #define VM_INTRINSIC_INITIALIZE(id, klass, name, sig, flags) #id "\0"
 static const char* vm_intrinsic_name_bodies =
diff --git a/hotspot/src/share/vm/classfile/vmSymbols.hpp b/hotspot/src/share/vm/classfile/vmSymbols.hpp
index 417c2552840..06fdb35be19 100644
--- a/hotspot/src/share/vm/classfile/vmSymbols.hpp
+++ b/hotspot/src/share/vm/classfile/vmSymbols.hpp
@@ -873,6 +873,20 @@
    do_name(     putOrderedInt_name,                              "putOrderedInt")                                       \
    do_alias(    putOrderedInt_signature,                        /*(Ljava/lang/Object;JI)V*/ putInt_signature)           \
                                                                                                                         \
+  do_intrinsic(_getAndAddInt,             sun_misc_Unsafe,        getAndAddInt_name, getAndAddInt_signature, F_R)       \
+   do_name(     getAndAddInt_name,                                "getAndAddInt")                                       \
+   do_signature(getAndAddInt_signature,                           "(Ljava/lang/Object;JI)I" )                           \
+  do_intrinsic(_getAndAddLong,            sun_misc_Unsafe,        getAndAddLong_name, getAndAddLong_signature, F_R)     \
+   do_name(     getAndAddLong_name,                               "getAndAddLong")                                      \
+   do_signature(getAndAddLong_signature,                          "(Ljava/lang/Object;JJ)J" )                           \
+  do_intrinsic(_getAndSetInt,             sun_misc_Unsafe,        getAndSet_name, getAndSetInt_signature, F_R)          \
+   do_name(     getAndSet_name,                                   "getAndSet")                                          \
+   do_alias(    getAndSetInt_signature,                         /*"(Ljava/lang/Object;JI)I"*/ getAndAddInt_signature)   \
+  do_intrinsic(_getAndSetLong,            sun_misc_Unsafe,        getAndSet_name, getAndSetLong_signature, F_R)         \
+   do_alias(    getAndSetLong_signature,                        /*"(Ljava/lang/Object;JJ)J"*/ getAndAddLong_signature)  \
+  do_intrinsic(_getAndSetObject,          sun_misc_Unsafe,        getAndSet_name, getAndSetObject_signature,  F_R)      \
+   do_signature(getAndSetObject_signature,                        "(Ljava/lang/Object;JLjava/lang/Object;)Ljava/lang/Object;" ) \
+                                                                                                                        \
   /* prefetch_signature is shared by all prefetch variants */                                                           \
   do_signature( prefetch_signature,        "(Ljava/lang/Object;J)V")                                                    \
                                                                                                                         \
@@ -1124,9 +1138,6 @@ public:
 
   static const char* short_name_as_C_string(ID id, char* buf, int size);
 
-  // Access to intrinsic methods:
-  static Method* method_for(ID id);
-
   // Wrapper object methods:
   static ID for_boxing(BasicType type);
   static ID for_unboxing(BasicType type);
diff --git a/hotspot/src/share/vm/code/codeBlob.cpp b/hotspot/src/share/vm/code/codeBlob.cpp
index 425ad7f317c..779235f25fe 100644
--- a/hotspot/src/share/vm/code/codeBlob.cpp
+++ b/hotspot/src/share/vm/code/codeBlob.cpp
@@ -162,8 +162,10 @@ void CodeBlob::trace_new_stub(CodeBlob* stub, const char* name1, const char* nam
     assert(strlen(name1) + strlen(name2) < sizeof(stub_id), "");
     jio_snprintf(stub_id, sizeof(stub_id), "%s%s", name1, name2);
     if (PrintStubCode) {
+      ttyLocker ttyl;
       tty->print_cr("Decoding %s " INTPTR_FORMAT, stub_id, (intptr_t) stub);
       Disassembler::decode(stub->code_begin(), stub->code_end());
+      tty->cr();
     }
     Forte::register_stub(stub_id, stub->code_begin(), stub->code_end());
 
@@ -548,6 +550,7 @@ void RuntimeStub::verify() {
 }
 
 void RuntimeStub::print_on(outputStream* st) const {
+  ttyLocker ttyl;
   CodeBlob::print_on(st);
   st->print("Runtime Stub (" INTPTR_FORMAT "): ", this);
   st->print_cr(name());
@@ -563,6 +566,7 @@ void SingletonBlob::verify() {
 }
 
 void SingletonBlob::print_on(outputStream* st) const {
+  ttyLocker ttyl;
   CodeBlob::print_on(st);
   st->print_cr(name());
   Disassembler::decode((CodeBlob*)this, st);
diff --git a/hotspot/src/share/vm/code/codeBlob.hpp b/hotspot/src/share/vm/code/codeBlob.hpp
index a8b73ae7601..1d47bd9729c 100644
--- a/hotspot/src/share/vm/code/codeBlob.hpp
+++ b/hotspot/src/share/vm/code/codeBlob.hpp
@@ -184,7 +184,7 @@ class CodeBlob VALUE_OBJ_CLASS_SPEC {
   static void trace_new_stub(CodeBlob* blob, const char* name1, const char* name2 = "");
 
   // Print the comment associated with offset on stream, if there is one
-  virtual void print_block_comment(outputStream* stream, address block_begin) {
+  virtual void print_block_comment(outputStream* stream, address block_begin) const {
     intptr_t offset = (intptr_t)(block_begin - code_begin());
     _comments.print_block_comment(stream, offset);
   }
diff --git a/hotspot/src/share/vm/code/codeCache.cpp b/hotspot/src/share/vm/code/codeCache.cpp
index 0b4a99ad179..c40a377ebb3 100644
--- a/hotspot/src/share/vm/code/codeCache.cpp
+++ b/hotspot/src/share/vm/code/codeCache.cpp
@@ -309,12 +309,10 @@ int CodeCache::alignment_offset() {
 
 // Mark nmethods for unloading if they contain otherwise unreachable
 // oops.
-void CodeCache::do_unloading(BoolObjectClosure* is_alive,
-                             OopClosure* keep_alive,
-                             bool unloading_occurred) {
+void CodeCache::do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred) {
   assert_locked_or_safepoint(CodeCache_lock);
   FOR_ALL_ALIVE_NMETHODS(nm) {
-    nm->do_unloading(is_alive, keep_alive, unloading_occurred);
+    nm->do_unloading(is_alive, unloading_occurred);
   }
 }
 
diff --git a/hotspot/src/share/vm/code/codeCache.hpp b/hotspot/src/share/vm/code/codeCache.hpp
index b9dee54d614..6187ba9a2a7 100644
--- a/hotspot/src/share/vm/code/codeCache.hpp
+++ b/hotspot/src/share/vm/code/codeCache.hpp
@@ -130,9 +130,7 @@ class CodeCache : AllStatic {
   // If "unloading_occurred" is true, then unloads (i.e., breaks root links
   // to) any unmarked codeBlobs in the cache.  Sets "marked_for_unloading"
   // to "true" iff some code got unloaded.
-  static void do_unloading(BoolObjectClosure* is_alive,
-                           OopClosure* keep_alive,
-                           bool unloading_occurred);
+  static void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred);
   static void oops_do(OopClosure* f) {
     CodeBlobToOopClosure oopc(f, /*do_marking=*/ false);
     blobs_do(&oopc);
diff --git a/hotspot/src/share/vm/code/dependencies.cpp b/hotspot/src/share/vm/code/dependencies.cpp
index 3fa0c6a2558..4cdb499fe27 100644
--- a/hotspot/src/share/vm/code/dependencies.cpp
+++ b/hotspot/src/share/vm/code/dependencies.cpp
@@ -333,12 +333,14 @@ void Dependencies::encode_content_bytes() {
       for (int j = 0; j < stride; j++) {
         if (j == skipj)  continue;
         ciBaseObject* v = deps->at(i+j);
+        int idx;
         if (v->is_object()) {
-          bytes.write_int(_oop_recorder->find_index(v->as_object()->constant_encoding()));
+          idx = _oop_recorder->find_index(v->as_object()->constant_encoding());
         } else {
           ciMetadata* meta = v->as_metadata();
-          bytes.write_int(_oop_recorder->find_index(meta->constant_encoding()));
+          idx = _oop_recorder->find_index(meta->constant_encoding());
         }
+        bytes.write_int(idx);
       }
     }
   }
@@ -573,8 +575,8 @@ void Dependencies::DepStream::log_dependency(Klass* witness) {
     if (type() == call_site_target_value) {
       args[j] = argument_oop(j);
     } else {
-    args[j] = argument(j);
-  }
+      args[j] = argument(j);
+    }
   }
   if (_deps != NULL && _deps->log() != NULL) {
     Dependencies::write_dependency_to(_deps->log(),
@@ -665,6 +667,14 @@ inline oop Dependencies::DepStream::recorded_oop_at(int i) {
 
 Metadata* Dependencies::DepStream::argument(int i) {
   Metadata* result = recorded_metadata_at(argument_index(i));
+
+  if (result == NULL) { // Explicit context argument can be compressed
+    int ctxkj = dep_context_arg(type());  // -1 if no explicit context arg
+    if (ctxkj >= 0 && i == ctxkj && ctxkj+1 < argument_count()) {
+      result = ctxk_encoded_as_null(type(), argument(ctxkj+1));
+    }
+  }
+
   assert(result == NULL || result->is_klass() || result->is_method(), "must be");
   return result;
 }
@@ -680,25 +690,21 @@ Klass* Dependencies::DepStream::context_type() {
 
   // Most dependencies have an explicit context type argument.
   {
-    int ctxkj = dep_context_arg(_type);  // -1 if no explicit context arg
+    int ctxkj = dep_context_arg(type());  // -1 if no explicit context arg
     if (ctxkj >= 0) {
       Metadata* k = argument(ctxkj);
-      if (k != NULL) {       // context type was not compressed away
-        assert(k->is_klass(), "type check");
-        return (Klass*) k;
-      }
-      // recompute "default" context type
-      return ctxk_encoded_as_null(_type, argument(ctxkj+1));
+      assert(k != NULL && k->is_klass(), "type check");
+      return (Klass*)k;
     }
   }
 
   // Some dependencies are using the klass of the first object
   // argument as implicit context type (e.g. call_site_target_value).
   {
-    int ctxkj = dep_implicit_context_arg(_type);
+    int ctxkj = dep_implicit_context_arg(type());
     if (ctxkj >= 0) {
       Klass* k = argument_oop(ctxkj)->klass();
-      assert(k->is_klass(), "type check");
+      assert(k != NULL && k->is_klass(), "type check");
       return (Klass*) k;
     }
   }
diff --git a/hotspot/src/share/vm/code/icBuffer.hpp b/hotspot/src/share/vm/code/icBuffer.hpp
index 340dbb893e8..36d0c761666 100644
--- a/hotspot/src/share/vm/code/icBuffer.hpp
+++ b/hotspot/src/share/vm/code/icBuffer.hpp
@@ -25,6 +25,7 @@
 #ifndef SHARE_VM_CODE_ICBUFFER_HPP
 #define SHARE_VM_CODE_ICBUFFER_HPP
 
+#include "asm/codeBuffer.hpp"
 #include "code/stubs.hpp"
 #include "interpreter/bytecodes.hpp"
 #include "memory/allocation.hpp"
@@ -48,7 +49,8 @@ class ICStub: public Stub {
  protected:
   friend class ICStubInterface;
   // This will be called only by ICStubInterface
-  void    initialize(int size) { _size = size; _ic_site = NULL; }
+  void    initialize(int size,
+                     CodeComments comments)      { _size = size; _ic_site = NULL; }
   void    finalize(); // called when a method is removed
 
   // General info
diff --git a/hotspot/src/share/vm/code/nmethod.cpp b/hotspot/src/share/vm/code/nmethod.cpp
index 1b3ddf48ec2..d935845fd65 100644
--- a/hotspot/src/share/vm/code/nmethod.cpp
+++ b/hotspot/src/share/vm/code/nmethod.cpp
@@ -463,6 +463,7 @@ void nmethod::init_defaults() {
   _has_unsafe_access          = 0;
   _has_method_handle_invokes  = 0;
   _lazy_critical_native       = 0;
+  _has_wide_vectors           = 0;
   _marked_for_deoptimization  = 0;
   _lock_count                 = 0;
   _stack_traversal_mark       = 0;
@@ -700,7 +701,9 @@ nmethod::nmethod(
     // then print the requested information
     if (PrintNativeNMethods) {
       print_code();
-      oop_maps->print();
+      if (oop_maps != NULL) {
+        oop_maps->print();
+      }
     }
     if (PrintRelocations) {
       print_relocations();
@@ -1472,9 +1475,7 @@ void nmethod::flush_dependencies(BoolObjectClosure* is_alive) {
 
 
 // If this oop is not live, the nmethod can be unloaded.
-bool nmethod::can_unload(BoolObjectClosure* is_alive,
-                         OopClosure* keep_alive,
-                         oop* root, bool unloading_occurred) {
+bool nmethod::can_unload(BoolObjectClosure* is_alive, oop* root, bool unloading_occurred) {
   assert(root != NULL, "just checking");
   oop obj = *root;
   if (obj == NULL || is_alive->do_object_b(obj)) {
@@ -1583,8 +1584,7 @@ void nmethod::post_compiled_method_unload() {
 // GC to unload an nmethod if it contains otherwise unreachable
 // oops.
 
-void nmethod::do_unloading(BoolObjectClosure* is_alive,
-                           OopClosure* keep_alive, bool unloading_occurred) {
+void nmethod::do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred) {
   // Make sure the oop's ready to receive visitors
   assert(!is_zombie() && !is_unloaded(),
          "should not call follow on zombie or unloaded nmethod");
@@ -1672,7 +1672,7 @@ void nmethod::do_unloading(BoolObjectClosure* is_alive,
                   (r->oop_addr() >= oops_begin() && r->oop_addr() < oops_end()),
              "oop must be found in exactly one place");
       if (r->oop_is_immediate() && r->oop_value() != NULL) {
-        if (can_unload(is_alive, keep_alive, r->oop_addr(), unloading_occurred)) {
+        if (can_unload(is_alive, r->oop_addr(), unloading_occurred)) {
           return;
         }
       }
@@ -1684,7 +1684,7 @@ void nmethod::do_unloading(BoolObjectClosure* is_alive,
   // Scopes
   for (oop* p = oops_begin(); p < oops_end(); p++) {
     if (*p == Universe::non_oop_word())  continue;  // skip non-oops
-    if (can_unload(is_alive, keep_alive, p, unloading_occurred)) {
+    if (can_unload(is_alive, p, unloading_occurred)) {
       return;
     }
   }
@@ -2669,7 +2669,7 @@ ScopeDesc* nmethod::scope_desc_in(address begin, address end) {
   return NULL;
 }
 
-void nmethod::print_nmethod_labels(outputStream* stream, address block_begin) {
+void nmethod::print_nmethod_labels(outputStream* stream, address block_begin) const {
   if (block_begin == entry_point())             stream->print_cr("[Entry Point]");
   if (block_begin == verified_entry_point())    stream->print_cr("[Verified Entry Point]");
   if (block_begin == exception_begin())         stream->print_cr("[Exception Handler]");
diff --git a/hotspot/src/share/vm/code/nmethod.hpp b/hotspot/src/share/vm/code/nmethod.hpp
index a64e9ff71b8..477ceb6dcb6 100644
--- a/hotspot/src/share/vm/code/nmethod.hpp
+++ b/hotspot/src/share/vm/code/nmethod.hpp
@@ -177,6 +177,7 @@ class nmethod : public CodeBlob {
   unsigned int _has_unsafe_access:1;         // May fault due to unsafe access.
   unsigned int _has_method_handle_invokes:1; // Has this method MethodHandle invokes?
   unsigned int _lazy_critical_native:1;      // Lazy JNI critical native
+  unsigned int _has_wide_vectors:1;          // Preserve wide vectors at safepoints
 
   // Protected by Patching_lock
   unsigned char _state;                      // {alive, not_entrant, zombie, unloaded}
@@ -442,6 +443,9 @@ class nmethod : public CodeBlob {
   bool  is_lazy_critical_native() const           { return _lazy_critical_native; }
   void  set_lazy_critical_native(bool z)          { _lazy_critical_native = z; }
 
+  bool  has_wide_vectors() const                  { return _has_wide_vectors; }
+  void  set_has_wide_vectors(bool z)              { _has_wide_vectors = z; }
+
   int   comp_level() const                        { return _comp_level; }
 
   // Support for oops in scopes and relocs:
@@ -556,10 +560,8 @@ public:
   void set_method(Method* method) { _method = method; }
 
   // GC support
-  void do_unloading(BoolObjectClosure* is_alive, OopClosure* keep_alive,
-                    bool unloading_occurred);
-  bool can_unload(BoolObjectClosure* is_alive, OopClosure* keep_alive,
-                  oop* root, bool unloading_occurred);
+  void do_unloading(BoolObjectClosure* is_alive, bool unloading_occurred);
+  bool can_unload(BoolObjectClosure* is_alive, oop* root, bool unloading_occurred);
 
   void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map,
                                      OopClosure* f);
@@ -649,11 +651,11 @@ public:
   void log_state_change() const;
 
   // Prints block-level comments, including nmethod specific block labels:
-  virtual void print_block_comment(outputStream* stream, address block_begin) {
+  virtual void print_block_comment(outputStream* stream, address block_begin) const {
     print_nmethod_labels(stream, block_begin);
     CodeBlob::print_block_comment(stream, block_begin);
   }
-  void print_nmethod_labels(outputStream* stream, address block_begin);
+  void print_nmethod_labels(outputStream* stream, address block_begin) const;
 
   // Prints a comment for one native instruction (reloc info, pc desc)
   void print_code_comment_on(outputStream* st, int column, address begin, address end);
diff --git a/hotspot/src/share/vm/code/stubs.cpp b/hotspot/src/share/vm/code/stubs.cpp
index 124c0a64068..245a2463a05 100644
--- a/hotspot/src/share/vm/code/stubs.cpp
+++ b/hotspot/src/share/vm/code/stubs.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -101,7 +101,8 @@ Stub* StubQueue::stub_containing(address pc) const {
 
 Stub* StubQueue::request_committed(int code_size) {
   Stub* s = request(code_size);
-  if (s != NULL) commit(code_size);
+  CodeComments comments;
+  if (s != NULL) commit(code_size, comments);
   return s;
 }
 
@@ -118,7 +119,8 @@ Stub* StubQueue::request(int requested_code_size) {
       assert(_buffer_limit == _buffer_size, "buffer must be fully usable");
       if (_queue_end + requested_size <= _buffer_size) {
         // code fits in at the end => nothing to do
-        stub_initialize(s, requested_size);
+        CodeComments comments;
+        stub_initialize(s, requested_size, comments);
         return s;
       } else {
         // stub doesn't fit in at the queue end
@@ -135,7 +137,8 @@ Stub* StubQueue::request(int requested_code_size) {
     // Queue: |XXX|.......|XXXXXXX|.......|
     //        ^0  ^end    ^begin  ^limit  ^size
     s = current_stub();
-    stub_initialize(s, requested_size);
+    CodeComments comments;
+    stub_initialize(s, requested_size, comments);
     return s;
   }
   // Not enough space left
@@ -144,12 +147,12 @@ Stub* StubQueue::request(int requested_code_size) {
 }
 
 
-void StubQueue::commit(int committed_code_size) {
+void StubQueue::commit(int committed_code_size, CodeComments& comments) {
   assert(committed_code_size > 0, "committed_code_size must be > 0");
   int committed_size = round_to(stub_code_size_to_size(committed_code_size), CodeEntryAlignment);
   Stub* s = current_stub();
   assert(committed_size <= stub_size(s), "committed size must not exceed requested size");
-  stub_initialize(s, committed_size);
+  stub_initialize(s, committed_size, comments);
   _queue_end += committed_size;
   _number_of_stubs++;
   if (_mutex != NULL) _mutex->unlock();
diff --git a/hotspot/src/share/vm/code/stubs.hpp b/hotspot/src/share/vm/code/stubs.hpp
index afc8f04d46c..36ada2a4cd9 100644
--- a/hotspot/src/share/vm/code/stubs.hpp
+++ b/hotspot/src/share/vm/code/stubs.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
 #ifndef SHARE_VM_CODE_STUBS_HPP
 #define SHARE_VM_CODE_STUBS_HPP
 
+#include "asm/codeBuffer.hpp"
 #include "memory/allocation.hpp"
 #ifdef TARGET_OS_FAMILY_linux
 # include "os_linux.inline.hpp"
@@ -71,7 +72,8 @@
 class Stub VALUE_OBJ_CLASS_SPEC {
  public:
   // Initialization/finalization
-  void    initialize(int size)                   { ShouldNotCallThis(); }                // called to initialize/specify the stub's size
+  void    initialize(int size,
+                     CodeComments& comments)     { ShouldNotCallThis(); }                // called to initialize/specify the stub's size
   void    finalize()                             { ShouldNotCallThis(); }                // called before the stub is deallocated
 
   // General info/converters
@@ -104,7 +106,8 @@ class Stub VALUE_OBJ_CLASS_SPEC {
 class StubInterface: public CHeapObj<mtCode> {
  public:
   // Initialization/finalization
-  virtual void    initialize(Stub* self, int size)         = 0; // called after creation (called twice if allocated via (request, commit))
+  virtual void    initialize(Stub* self, int size,
+                             CodeComments& comments)       = 0; // called after creation (called twice if allocated via (request, commit))
   virtual void    finalize(Stub* self)                     = 0; // called before deallocation
 
   // General info/converters
@@ -132,7 +135,8 @@ class StubInterface: public CHeapObj<mtCode> {
                                                            \
    public:                                                 \
     /* Initialization/finalization */                      \
-    virtual void    initialize(Stub* self, int size)       { cast(self)->initialize(size); }       \
+    virtual void    initialize(Stub* self, int size,       \
+                               CodeComments& comments)     { cast(self)->initialize(size, comments); } \
     virtual void    finalize(Stub* self)                   { cast(self)->finalize(); }             \
                                                            \
     /* General info */                                     \
@@ -171,7 +175,8 @@ class StubQueue: public CHeapObj<mtCode> {
   Stub* current_stub() const                     { return stub_at(_queue_end); }
 
   // Stub functionality accessed via interface
-  void  stub_initialize(Stub* s, int size)       { assert(size % CodeEntryAlignment == 0, "size not aligned"); _stub_interface->initialize(s, size); }
+  void  stub_initialize(Stub* s, int size,
+                        CodeComments& comments)  { assert(size % CodeEntryAlignment == 0, "size not aligned"); _stub_interface->initialize(s, size, comments); }
   void  stub_finalize(Stub* s)                   { _stub_interface->finalize(s); }
   int   stub_size(Stub* s) const                 { return _stub_interface->size(s); }
   bool  stub_contains(Stub* s, address pc) const { return _stub_interface->code_begin(s) <= pc && pc < _stub_interface->code_end(s); }
@@ -200,7 +205,8 @@ class StubQueue: public CHeapObj<mtCode> {
   // Stub allocation (atomic transactions)
   Stub* request_committed(int code_size);        // request a stub that provides exactly code_size space for code
   Stub* request(int requested_code_size);        // request a stub with a (maximum) code space - locks the queue
-  void  commit (int committed_code_size);        // commit the previously requested stub - unlocks the queue
+  void  commit (int committed_code_size,
+                CodeComments& comments);         // commit the previously requested stub - unlocks the queue
 
   // Stub deallocation
   void  remove_first();                          // remove the first stub in the queue
diff --git a/hotspot/src/share/vm/code/vmreg.hpp b/hotspot/src/share/vm/code/vmreg.hpp
index ef2bdce29d4..23832a398c1 100644
--- a/hotspot/src/share/vm/code/vmreg.hpp
+++ b/hotspot/src/share/vm/code/vmreg.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/compiler/abstractCompiler.hpp b/hotspot/src/share/vm/compiler/abstractCompiler.hpp
index 55303a01fad..9007a82fc49 100644
--- a/hotspot/src/share/vm/compiler/abstractCompiler.hpp
+++ b/hotspot/src/share/vm/compiler/abstractCompiler.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/compiler/compileBroker.cpp b/hotspot/src/share/vm/compiler/compileBroker.cpp
index 6fe00d8ae4e..b1e10d652a4 100644
--- a/hotspot/src/share/vm/compiler/compileBroker.cpp
+++ b/hotspot/src/share/vm/compiler/compileBroker.cpp
@@ -197,9 +197,9 @@ class CompilationLog : public StringEventLog {
 
   void log_compile(JavaThread* thread, CompileTask* task) {
     StringLogMessage lm;
-    stringStream msg = lm.stream();
+    stringStream sstr = lm.stream();
     // msg.time_stamp().update_to(tty->time_stamp().ticks());
-    task->print_compilation(&msg, true);
+    task->print_compilation(&sstr, NULL, true);
     log(thread, "%s", (const char*)lm);
   }
 
@@ -491,9 +491,9 @@ void CompileTask::print_inline_indent(int inline_level, outputStream* st) {
 
 // ------------------------------------------------------------------
 // CompileTask::print_compilation
-void CompileTask::print_compilation(outputStream* st, bool short_form) {
+void CompileTask::print_compilation(outputStream* st, const char* msg, bool short_form) {
   bool is_osr_method = osr_bci() != InvocationEntryBci;
-  print_compilation_impl(st, method(), compile_id(), comp_level(), is_osr_method, osr_bci(), is_blocking(), NULL, short_form);
+  print_compilation_impl(st, method(), compile_id(), comp_level(), is_osr_method, osr_bci(), is_blocking(), msg, short_form);
 }
 
 // ------------------------------------------------------------------
@@ -1249,7 +1249,7 @@ nmethod* CompileBroker::compile_method(methodHandle method, int osr_bci,
     // We accept a higher level osr method
     nmethod* nm = method->lookup_osr_nmethod_for(osr_bci, comp_level, false);
     if (nm != NULL) return nm;
-    if (method->is_not_osr_compilable()) return NULL;
+    if (method->is_not_osr_compilable(comp_level)) return NULL;
   }
 
   assert(!HAS_PENDING_EXCEPTION, "No exception should be present");
@@ -1330,7 +1330,7 @@ bool CompileBroker::compilation_is_complete(methodHandle method,
                                             int          comp_level) {
   bool is_osr = (osr_bci != standard_entry_bci);
   if (is_osr) {
-    if (method->is_not_osr_compilable()) {
+    if (method->is_not_osr_compilable(comp_level)) {
       return true;
     } else {
       nmethod* result = method->lookup_osr_nmethod_for(osr_bci, comp_level, true);
@@ -1381,7 +1381,7 @@ bool CompileBroker::compilation_is_prohibited(methodHandle method, int osr_bci,
   // Some compilers may not support on stack replacement.
   if (is_osr &&
       (!CICompileOSR || !compiler(comp_level)->supports_osr())) {
-    method->set_not_osr_compilable();
+    method->set_not_osr_compilable(comp_level);
     return true;
   }
 
@@ -1570,7 +1570,8 @@ void CompileBroker::compiler_thread_loop() {
   }
   CompileLog* log = thread->log();
   if (log != NULL) {
-    log->begin_elem("start_compile_thread thread='" UINTX_FORMAT "' process='%d'",
+    log->begin_elem("start_compile_thread name='%s' thread='" UINTX_FORMAT "' process='%d'",
+                    thread->name(),
                     os::current_thread_id(),
                     os::current_process_id());
     log->stamp();
@@ -1807,11 +1808,10 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) {
         _compilation_log->log_failure(thread, task, ci_env.failure_reason(), retry_message);
       }
       if (PrintCompilation) {
-        tty->print("%4d   COMPILE SKIPPED: %s", compile_id, ci_env.failure_reason());
-        if (retry_message != NULL) {
-          tty->print(" (%s)", retry_message);
-        }
-        tty->cr();
+        FormatBufferResource msg = retry_message != NULL ?
+            err_msg_res("COMPILE SKIPPED: %s (%s)", ci_env.failure_reason(), retry_message) :
+            err_msg_res("COMPILE SKIPPED: %s",      ci_env.failure_reason());
+        task->print_compilation(tty, msg);
       }
     } else {
       task->mark_success();
@@ -1840,14 +1840,20 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) {
     tty->print_cr("size: %d time: %d inlined: %d bytes", code_size, (int)time.milliseconds(), task->num_inlined_bytecodes());
   }
 
-  if (compilable == ciEnv::MethodCompilable_never) {
-    if (is_osr) {
-      method->set_not_osr_compilable();
-    } else {
+  // Disable compilation, if required.
+  switch (compilable) {
+  case ciEnv::MethodCompilable_never:
+    if (is_osr)
+      method->set_not_osr_compilable_quietly();
+    else
       method->set_not_compilable_quietly();
-    }
-  } else if (compilable == ciEnv::MethodCompilable_not_at_tier) {
-    method->set_not_compilable_quietly(task->comp_level());
+    break;
+  case ciEnv::MethodCompilable_not_at_tier:
+    if (is_osr)
+      method->set_not_osr_compilable_quietly(task->comp_level());
+    else
+      method->set_not_compilable_quietly(task->comp_level());
+    break;
   }
 
   // Note that the queued_for_compilation bits are cleared without
diff --git a/hotspot/src/share/vm/compiler/compileBroker.hpp b/hotspot/src/share/vm/compiler/compileBroker.hpp
index 485726e410d..5169cbe3581 100644
--- a/hotspot/src/share/vm/compiler/compileBroker.hpp
+++ b/hotspot/src/share/vm/compiler/compileBroker.hpp
@@ -105,7 +105,7 @@ private:
                                       const char* msg = NULL, bool short_form = false);
 
 public:
-  void         print_compilation(outputStream* st = tty, bool short_form = false);
+  void         print_compilation(outputStream* st = tty, const char* msg = NULL, bool short_form = false);
   static void  print_compilation(outputStream* st, const nmethod* nm, const char* msg = NULL, bool short_form = false) {
     print_compilation_impl(st, nm->method(), nm->compile_id(), nm->comp_level(),
                            nm->is_osr_method(), nm->is_osr_method() ? nm->osr_entry_bci() : -1, /*is_blocking*/ false,
diff --git a/hotspot/src/share/vm/compiler/compileLog.cpp b/hotspot/src/share/vm/compiler/compileLog.cpp
index 9c63c18407c..e02e4e5475a 100644
--- a/hotspot/src/share/vm/compiler/compileLog.cpp
+++ b/hotspot/src/share/vm/compiler/compileLog.cpp
@@ -125,46 +125,46 @@ int CompileLog::identify(ciBaseObject* obj) {
     ciMetadata* mobj = obj->as_metadata();
     if (mobj->is_klass()) {
       ciKlass* klass = mobj->as_klass();
-    begin_elem("klass id='%d'", id);
-    name(klass->name());
-    if (!klass->is_loaded()) {
-      print(" unloaded='1'");
-    } else {
-      print(" flags='%d'", klass->modifier_flags());
-    }
-    end_elem();
+      begin_elem("klass id='%d'", id);
+      name(klass->name());
+      if (!klass->is_loaded()) {
+        print(" unloaded='1'");
+      } else {
+        print(" flags='%d'", klass->modifier_flags());
+      }
+      end_elem();
     } else if (mobj->is_method()) {
       ciMethod* method = mobj->as_method();
-    ciSignature* sig = method->signature();
-    // Pre-identify items that we will need!
-    identify(sig->return_type());
-    for (int i = 0; i < sig->count(); i++) {
-      identify(sig->type_at(i));
-    }
-    begin_elem("method id='%d' holder='%d'",
-               id, identify(method->holder()));
-    name(method->name());
-    print(" return='%d'", identify(sig->return_type()));
-    if (sig->count() > 0) {
-      print(" arguments='");
+      ciSignature* sig = method->signature();
+      // Pre-identify items that we will need!
+      identify(sig->return_type());
       for (int i = 0; i < sig->count(); i++) {
-        print((i == 0) ? "%d" : " %d", identify(sig->type_at(i)));
+        identify(sig->type_at(i));
       }
-      print("'");
-    }
-    if (!method->is_loaded()) {
-      print(" unloaded='1'");
-    } else {
-      print(" flags='%d'", (jchar) method->flags().as_int());
-      // output a few metrics
-      print(" bytes='%d'", method->code_size());
-      method->log_nmethod_identity(this);
-      //print(" count='%d'", method->invocation_count());
-      //int bec = method->backedge_count();
-      //if (bec != 0)  print(" backedge_count='%d'", bec);
-      print(" iicount='%d'", method->interpreter_invocation_count());
-    }
-    end_elem();
+      begin_elem("method id='%d' holder='%d'",
+          id, identify(method->holder()));
+      name(method->name());
+      print(" return='%d'", identify(sig->return_type()));
+      if (sig->count() > 0) {
+        print(" arguments='");
+        for (int i = 0; i < sig->count(); i++) {
+          print((i == 0) ? "%d" : " %d", identify(sig->type_at(i)));
+        }
+        print("'");
+      }
+      if (!method->is_loaded()) {
+        print(" unloaded='1'");
+      } else {
+        print(" flags='%d'", (jchar) method->flags().as_int());
+        // output a few metrics
+        print(" bytes='%d'", method->code_size());
+        method->log_nmethod_identity(this);
+        //print(" count='%d'", method->invocation_count());
+        //int bec = method->backedge_count();
+        //if (bec != 0)  print(" backedge_count='%d'", bec);
+        print(" iicount='%d'", method->interpreter_invocation_count());
+      }
+      end_elem();
     } else if (mobj->is_type()) {
       BasicType type = mobj->as_type()->basic_type();
       elem("type id='%d' name='%s'", id, type2name(type));
@@ -302,3 +302,48 @@ void CompileLog::finish_log(outputStream* file) {
   char buf[4 * K];
   finish_log_on_error(file, buf, sizeof(buf));
 }
+
+// ------------------------------------------------------------------
+// CompileLog::inline_success
+//
+// Print about successful method inlining.
+void CompileLog::inline_success(const char* reason) {
+  begin_elem("inline_success reason='");
+  text(reason);
+  end_elem("'");
+}
+
+// ------------------------------------------------------------------
+// CompileLog::inline_fail
+//
+// Print about failed method inlining.
+void CompileLog::inline_fail(const char* reason) {
+  begin_elem("inline_fail reason='");
+  text(reason);
+  end_elem("'");
+}
+
+// ------------------------------------------------------------------
+// CompileLog::set_context
+//
+// Set XML tag as an optional marker - it is printed only if
+// there are other entries after until it is reset.
+void CompileLog::set_context(const char* format, ...) {
+  va_list ap;
+  va_start(ap, format);
+  clear_context();
+  _context.print("<");
+  _context.vprint(format, ap);
+  _context.print_cr("/>");
+  va_end(ap);
+}
+
+// ------------------------------------------------------------------
+// CompileLog::code_cache_state
+//
+// Print code cache state.
+void CompileLog::code_cache_state() {
+  begin_elem("code_cache");
+  CodeCache::log_state(this);
+  end_elem("");
+}
diff --git a/hotspot/src/share/vm/compiler/compileLog.hpp b/hotspot/src/share/vm/compiler/compileLog.hpp
index 4dffb2b46a7..1af5e91435b 100644
--- a/hotspot/src/share/vm/compiler/compileLog.hpp
+++ b/hotspot/src/share/vm/compiler/compileLog.hpp
@@ -62,7 +62,13 @@ class CompileLog : public xmlStream {
 
   intx          thread_id()                      { return _thread_id; }
   const char*   file()                           { return _file; }
+
+  // Optional context marker, to help place actions that occur during
+  // parsing. If there is no log output until the next context string
+  // or reset, context string will be silently ignored
   stringStream* context()                        { return &_context; }
+  void    clear_context()                        { context()->reset(); }
+  void      set_context(const char* format, ...);
 
   void          name(ciSymbol* s);               // name='s'
   void          name(Symbol* s)                  { xmlStream::name(s); }
@@ -71,6 +77,9 @@ class CompileLog : public xmlStream {
   int           identify(ciBaseObject* obj);
   void          clear_identities();
 
+  void inline_fail   (const char* reason);
+  void inline_success(const char* reason);
+
   // virtuals
   virtual void see_tag(const char* tag, bool push);
   virtual void pop_tag(const char* tag);
@@ -78,6 +87,9 @@ class CompileLog : public xmlStream {
   // make a provisional end of log mark
   void mark_file_end() { _file_end = out()->count(); }
 
+  // Print code cache statistics
+  void code_cache_state();
+
   // copy all logs to the given stream
   static void finish_log(outputStream* out);
   static void finish_log_on_error(outputStream* out, char *buf, int buflen);
diff --git a/hotspot/src/share/vm/compiler/disassembler.cpp b/hotspot/src/share/vm/compiler/disassembler.cpp
index 9603e863edd..e1fed2e4d23 100644
--- a/hotspot/src/share/vm/compiler/disassembler.cpp
+++ b/hotspot/src/share/vm/compiler/disassembler.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@ bool        Disassembler::_tried_to_load_library = false;
 Disassembler::decode_func Disassembler::_decode_instructions = NULL;
 
 static const char hsdis_library_name[] = "hsdis-"HOTSPOT_LIB_ARCH;
-static const char decode_instructions_name[] = "decode_instructions";
+static const char decode_instructions_name[] = "decode_instructions_virtual";
 
 #define COMMENT_COLUMN  40 LP64_ONLY(+8) /*could be an option*/
 #define BYTES_COMMENT   ";..."  /* funky byte display comment */
@@ -148,6 +148,7 @@ class decode_env {
  private:
   nmethod*      _nm;
   CodeBlob*     _code;
+  CodeComments  _comments;
   outputStream* _output;
   address       _start, _end;
 
@@ -187,7 +188,7 @@ class decode_env {
   void print_address(address value);
 
  public:
-  decode_env(CodeBlob* code, outputStream* output);
+  decode_env(CodeBlob* code, outputStream* output, CodeComments c = CodeComments());
 
   address decode_instructions(address start, address end);
 
@@ -218,6 +219,8 @@ class decode_env {
         }
       }
     }
+    // follow each complete insn by a nice newline
+    st->cr();
   }
 
   address handle_event(const char* event, address arg);
@@ -229,12 +232,13 @@ class decode_env {
   const char* options() { return _option_buf; }
 };
 
-decode_env::decode_env(CodeBlob* code, outputStream* output) {
+decode_env::decode_env(CodeBlob* code, outputStream* output, CodeComments c) {
   memset(this, 0, sizeof(*this));
   _output = output ? output : tty;
   _code = code;
   if (code != NULL && code->is_nmethod())
     _nm = (nmethod*) code;
+  _comments.assign(c);
 
   // by default, output pc but not bytes:
   _print_pc       = true;
@@ -356,6 +360,7 @@ void decode_env::print_insn_labels() {
   if (cb != NULL) {
     cb->print_block_comment(st, p);
   }
+  _comments.print_block_comment(st, (intptr_t)(p - _start));
   if (_print_pc) {
     st->print("  " PTR_FORMAT ": ", p);
   }
@@ -446,14 +451,16 @@ address decode_env::decode_instructions(address start, address end) {
     FILE* out = stdout;
     FILE* xmlout = (_print_raw > 1 ? out : NULL);
     return (address)
-      (*Disassembler::_decode_instructions)(start, end,
+      (*Disassembler::_decode_instructions)((uintptr_t)start, (uintptr_t)end,
+                                            start, end - start,
                                             NULL, (void*) xmlout,
                                             NULL, (void*) out,
                                             options());
   }
 
   return (address)
-    (*Disassembler::_decode_instructions)(start, end,
+    (*Disassembler::_decode_instructions)((uintptr_t)start, (uintptr_t)end,
+                                          start, end - start,
                                           &event_to_env,  (void*) this,
                                           &printf_to_env, (void*) this,
                                           options());
@@ -467,10 +474,9 @@ void Disassembler::decode(CodeBlob* cb, outputStream* st) {
   env.decode_instructions(cb->code_begin(), cb->code_end());
 }
 
-
-void Disassembler::decode(address start, address end, outputStream* st) {
+void Disassembler::decode(address start, address end, outputStream* st, CodeComments c) {
   if (!load_library())  return;
-  decode_env env(CodeCache::find_blob_unsafe(start), st);
+  decode_env env(CodeCache::find_blob_unsafe(start), st, c);
   env.decode_instructions(start, end);
 }
 
diff --git a/hotspot/src/share/vm/compiler/disassembler.hpp b/hotspot/src/share/vm/compiler/disassembler.hpp
index a70b8ccd378..053b4689fbb 100644
--- a/hotspot/src/share/vm/compiler/disassembler.hpp
+++ b/hotspot/src/share/vm/compiler/disassembler.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
 #ifndef SHARE_VM_COMPILER_DISASSEMBLER_HPP
 #define SHARE_VM_COMPILER_DISASSEMBLER_HPP
 
+#include "asm/codeBuffer.hpp"
 #include "runtime/globals.hpp"
 #ifdef TARGET_OS_FAMILY_linux
 # include "os_linux.inline.hpp"
@@ -48,7 +49,8 @@ class Disassembler {
   friend class decode_env;
  private:
   // this is the type of the dll entry point:
-  typedef void* (*decode_func)(void* start, void* end,
+  typedef void* (*decode_func)(uintptr_t start_va, uintptr_t end_va,
+                               unsigned char* buffer, uintptr_t length,
                                void* (*event_callback)(void*, const char*, void*),
                                void* event_stream,
                                int (*printf_callback)(void*, const char*, ...),
@@ -87,7 +89,7 @@ class Disassembler {
   }
   static void decode(CodeBlob *cb,               outputStream* st = NULL);
   static void decode(nmethod* nm,                outputStream* st = NULL);
-  static void decode(address begin, address end, outputStream* st = NULL);
+  static void decode(address begin, address end, outputStream* st = NULL, CodeComments c = CodeComments());
 };
 
 #endif // SHARE_VM_COMPILER_DISASSEMBLER_HPP
diff --git a/hotspot/src/share/vm/compiler/oopMap.cpp b/hotspot/src/share/vm/compiler/oopMap.cpp
index 2cd212d277f..7c51c669b5c 100644
--- a/hotspot/src/share/vm/compiler/oopMap.cpp
+++ b/hotspot/src/share/vm/compiler/oopMap.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp
index 5edd8ccc9ab..838e35fb599 100644
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp
@@ -1195,9 +1195,9 @@ void CMSAdaptiveSizePolicy::compute_tenured_generation_free_space(
   set_promo_size(desired_promo_size);
 }
 
-int CMSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(
+uint CMSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(
                                              bool is_survivor_overflow,
-                                             int tenuring_threshold,
+                                             uint tenuring_threshold,
                                              size_t survivor_limit) {
   assert(survivor_limit >= generation_alignment(),
          "survivor_limit too small");
@@ -1315,7 +1315,7 @@ int CMSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(
 
     gclog_or_tty->print( "  avg_promoted_padded_avg: %f"
                 "  avg_pretenured_padded_avg: %f"
-                "  tenuring_thresh: %d"
+                "  tenuring_thresh: %u"
                 "  target_size: " SIZE_FORMAT
                 "  survivor_limit: " SIZE_FORMAT,
                 gch->gc_stats(1)->avg_promoted()->padded_average(),
diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp
index ec418e689b5..6053b4323bd 100644
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.hpp
@@ -440,9 +440,9 @@ class CMSAdaptiveSizePolicy : public AdaptiveSizePolicy {
                                                    size_t max_eden_size);
   // Calculates new survivor space size;  returns a new tenuring threshold
   // value. Stores new survivor size in _survivor_size.
-  virtual int compute_survivor_space_size_and_threshold(
+  virtual uint compute_survivor_space_size_and_threshold(
                                                 bool   is_survivor_overflow,
-                                                int    tenuring_threshold,
+                                                uint   tenuring_threshold,
                                                 size_t survivor_limit);
 
   virtual void compute_tenured_generation_free_space(size_t cur_tenured_free,
diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
index d26749e2667..bc103b492d7 100644
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepGeneration.cpp
@@ -222,7 +222,7 @@ ConcurrentMarkSweepGeneration::ConcurrentMarkSweepGeneration(
   // depends on this property.
   debug_only(
     FreeChunk* junk = NULL;
-    assert(UseCompressedOops ||
+    assert(UseCompressedKlassPointers ||
            junk->prev_addr() == (void*)(oop(junk)->klass_addr()),
            "Offset of FreeChunk::_prev within FreeChunk must match"
            "  that of OopDesc::_klass within OopDesc");
@@ -5954,9 +5954,7 @@ void CMSCollector::refProcessingWork(bool asynch, bool clear_all_soft_refs) {
       bool purged_class = SystemDictionary::do_unloading(&_is_alive_closure);
 
       // Follow CodeCache roots and unload any methods marked for unloading
-      CodeCache::do_unloading(&_is_alive_closure,
-                              &cmsKeepAliveClosure,
-                              purged_class);
+      CodeCache::do_unloading(&_is_alive_closure, purged_class);
 
       cmsDrainMarkingStackClosure.do_void();
       verify_work_stacks_empty();
diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp
index 93c3df0e402..c8e6e518565 100644
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.cpp
@@ -230,6 +230,7 @@ void ConcurrentMarkSweepThread::print_on(outputStream* st) const {
 void ConcurrentMarkSweepThread::print_all_on(outputStream* st) {
   if (_cmst != NULL) {
     _cmst->print_on(st);
+    st->cr();
   }
   if (_collector != NULL) {
     AbstractWorkGang* gang = _collector->conc_workers();
diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.cpp
index d0693ab1da2..34ee7d67b9a 100644
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.cpp
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.hpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.hpp
index 582fe9e82fe..21934bca81c 100644
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.hpp
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/freeChunk.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp
index 3b8d5aa0878..eb8f9504f26 100644
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/vmCMSOperations.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp
index 46a7d309cdc..75a31179af1 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentG1Refine.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
index 6743f2119ed..a06b01cae37 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
@@ -1188,29 +1188,14 @@ void ConcurrentMark::checkpointRootsFinal(bool clear_all_soft_refs) {
 // liveness counting data.
 class CMCountDataClosureBase: public HeapRegionClosure {
 protected:
+  G1CollectedHeap* _g1h;
   ConcurrentMark* _cm;
+  CardTableModRefBS* _ct_bs;
+
   BitMap* _region_bm;
   BitMap* _card_bm;
 
-  void set_card_bitmap_range(BitMap::idx_t start_idx, BitMap::idx_t last_idx) {
-    assert(start_idx <= last_idx, "sanity");
-
-    // Set the inclusive bit range [start_idx, last_idx].
-    // For small ranges (up to 8 cards) use a simple loop; otherwise
-    // use par_at_put_range.
-    if ((last_idx - start_idx) < 8) {
-      for (BitMap::idx_t i = start_idx; i <= last_idx; i += 1) {
-        _card_bm->par_set_bit(i);
-      }
-    } else {
-      assert(last_idx < _card_bm->size(), "sanity");
-      // Note BitMap::par_at_put_range() is exclusive.
-      BitMap::idx_t max_idx = MAX2(last_idx+1, _card_bm->size());
-      _card_bm->par_at_put_range(start_idx, max_idx, true);
-    }
-  }
-
-  // It takes a region that's not empty (i.e., it has at least one
+  // Takes a region that's not empty (i.e., it has at least one
   // live object in it and sets its corresponding bit on the region
   // bitmap to 1. If the region is "starts humongous" it will also set
   // to 1 the bits on the region bitmap that correspond to its
@@ -1231,9 +1216,11 @@ protected:
   }
 
 public:
-  CMCountDataClosureBase(ConcurrentMark *cm,
+  CMCountDataClosureBase(G1CollectedHeap* g1h,
                          BitMap* region_bm, BitMap* card_bm):
-    _cm(cm), _region_bm(region_bm), _card_bm(card_bm) { }
+    _g1h(g1h), _cm(g1h->concurrent_mark()),
+    _ct_bs((CardTableModRefBS*) (g1h->barrier_set())),
+    _region_bm(region_bm), _card_bm(card_bm) { }
 };
 
 // Closure that calculates the # live objects per region. Used
@@ -1243,9 +1230,9 @@ class CalcLiveObjectsClosure: public CMCountDataClosureBase {
   size_t _region_marked_bytes;
 
 public:
-  CalcLiveObjectsClosure(CMBitMapRO *bm, ConcurrentMark *cm,
+  CalcLiveObjectsClosure(CMBitMapRO *bm, G1CollectedHeap* g1h,
                          BitMap* region_bm, BitMap* card_bm) :
-    CMCountDataClosureBase(cm, region_bm, card_bm),
+    CMCountDataClosureBase(g1h, region_bm, card_bm),
     _bm(bm), _region_marked_bytes(0) { }
 
   bool doHeapRegion(HeapRegion* hr) {
@@ -1261,44 +1248,63 @@ public:
       return false;
     }
 
-    HeapWord* nextTop = hr->next_top_at_mark_start();
-    HeapWord* start   = hr->bottom();
+    HeapWord* ntams = hr->next_top_at_mark_start();
+    HeapWord* start = hr->bottom();
 
-    assert(start <= hr->end() && start <= nextTop && nextTop <= hr->end(),
+    assert(start <= hr->end() && start <= ntams && ntams <= hr->end(),
            err_msg("Preconditions not met - "
-                   "start: "PTR_FORMAT", nextTop: "PTR_FORMAT", end: "PTR_FORMAT,
-                   start, nextTop, hr->end()));
+                   "start: "PTR_FORMAT", ntams: "PTR_FORMAT", end: "PTR_FORMAT,
+                   start, ntams, hr->end()));
 
     // Find the first marked object at or after "start".
-    start = _bm->getNextMarkedWordAddress(start, nextTop);
+    start = _bm->getNextMarkedWordAddress(start, ntams);
 
     size_t marked_bytes = 0;
 
-    while (start < nextTop) {
+    while (start < ntams) {
       oop obj = oop(start);
       int obj_sz = obj->size();
-      HeapWord* obj_last = start + obj_sz - 1;
+      HeapWord* obj_end = start + obj_sz;
 
       BitMap::idx_t start_idx = _cm->card_bitmap_index_for(start);
-      BitMap::idx_t last_idx = _cm->card_bitmap_index_for(obj_last);
+      BitMap::idx_t end_idx = _cm->card_bitmap_index_for(obj_end);
 
-      // Set the bits in the card BM for this object (inclusive).
-      set_card_bitmap_range(start_idx, last_idx);
+      // Note: if we're looking at the last region in heap - obj_end
+      // could be actually just beyond the end of the heap; end_idx
+      // will then correspond to a (non-existent) card that is also
+      // just beyond the heap.
+      if (_g1h->is_in_g1_reserved(obj_end) && !_ct_bs->is_card_aligned(obj_end)) {
+        // end of object is not card aligned - increment to cover
+        // all the cards spanned by the object
+        end_idx += 1;
+      }
+
+      // Set the bits in the card BM for the cards spanned by this object.
+      _cm->set_card_bitmap_range(_card_bm, start_idx, end_idx, true /* is_par */);
 
       // Add the size of this object to the number of marked bytes.
       marked_bytes += (size_t)obj_sz * HeapWordSize;
 
       // Find the next marked object after this one.
-      start = _bm->getNextMarkedWordAddress(obj_last + 1, nextTop);
+      start = _bm->getNextMarkedWordAddress(obj_end, ntams);
     }
 
     // Mark the allocated-since-marking portion...
     HeapWord* top = hr->top();
-    if (nextTop < top) {
-      BitMap::idx_t start_idx = _cm->card_bitmap_index_for(nextTop);
-      BitMap::idx_t last_idx = _cm->card_bitmap_index_for(top - 1);
+    if (ntams < top) {
+      BitMap::idx_t start_idx = _cm->card_bitmap_index_for(ntams);
+      BitMap::idx_t end_idx = _cm->card_bitmap_index_for(top);
 
-      set_card_bitmap_range(start_idx, last_idx);
+      // Note: if we're looking at the last region in heap - top
+      // could be actually just beyond the end of the heap; end_idx
+      // will then correspond to a (non-existent) card that is also
+      // just beyond the heap.
+      if (_g1h->is_in_g1_reserved(top) && !_ct_bs->is_card_aligned(top)) {
+        // end of object is not card aligned - increment to cover
+        // all the cards spanned by the object
+        end_idx += 1;
+      }
+      _cm->set_card_bitmap_range(_card_bm, start_idx, end_idx, true /* is_par */);
 
       // This definitely means the region has live objects.
       set_bit_for_region(hr);
@@ -1325,6 +1331,7 @@ public:
 // regions during the STW cleanup pause.
 
 class VerifyLiveObjectDataHRClosure: public HeapRegionClosure {
+  G1CollectedHeap* _g1h;
   ConcurrentMark* _cm;
   CalcLiveObjectsClosure _calc_cl;
   BitMap* _region_bm;   // Region BM to be verified
@@ -1337,14 +1344,14 @@ class VerifyLiveObjectDataHRClosure: public HeapRegionClosure {
   int _failures;
 
 public:
-  VerifyLiveObjectDataHRClosure(ConcurrentMark* cm,
+  VerifyLiveObjectDataHRClosure(G1CollectedHeap* g1h,
                                 BitMap* region_bm,
                                 BitMap* card_bm,
                                 BitMap* exp_region_bm,
                                 BitMap* exp_card_bm,
                                 bool verbose) :
-    _cm(cm),
-    _calc_cl(_cm->nextMarkBitMap(), _cm, exp_region_bm, exp_card_bm),
+    _g1h(g1h), _cm(g1h->concurrent_mark()),
+    _calc_cl(_cm->nextMarkBitMap(), g1h, exp_region_bm, exp_card_bm),
     _region_bm(region_bm), _card_bm(card_bm), _verbose(verbose),
     _exp_region_bm(exp_region_bm), _exp_card_bm(exp_card_bm),
     _failures(0) { }
@@ -1491,7 +1498,7 @@ public:
   void work(uint worker_id) {
     assert(worker_id < _n_workers, "invariant");
 
-    VerifyLiveObjectDataHRClosure verify_cl(_cm,
+    VerifyLiveObjectDataHRClosure verify_cl(_g1h,
                                             _actual_region_bm, _actual_card_bm,
                                             _expected_region_bm,
                                             _expected_card_bm,
@@ -1521,10 +1528,10 @@ public:
 
 class FinalCountDataUpdateClosure: public CMCountDataClosureBase {
  public:
-  FinalCountDataUpdateClosure(ConcurrentMark* cm,
+  FinalCountDataUpdateClosure(G1CollectedHeap* g1h,
                               BitMap* region_bm,
                               BitMap* card_bm) :
-    CMCountDataClosureBase(cm, region_bm, card_bm) { }
+    CMCountDataClosureBase(g1h, region_bm, card_bm) { }
 
   bool doHeapRegion(HeapRegion* hr) {
 
@@ -1548,24 +1555,29 @@ class FinalCountDataUpdateClosure: public CMCountDataClosureBase {
     if (ntams < top) {
       // This definitely means the region has live objects.
       set_bit_for_region(hr);
-    }
 
-    // Now set the bits for [ntams, top]
-    BitMap::idx_t start_idx = _cm->card_bitmap_index_for(ntams);
-    // set_card_bitmap_range() expects the last_idx to be with
-    // the range of the bit map (see assertion in set_card_bitmap_range()),
-    // so limit it to that range with this application of MIN2.
-    BitMap::idx_t last_idx = MIN2(_cm->card_bitmap_index_for(top),
-                                  _card_bm->size()-1);
-    if (start_idx < _card_bm->size()) {
-    set_card_bitmap_range(start_idx, last_idx);
-    } else {
-      // To reach here start_idx must be beyond the end of
-      // the bit map and last_idx must have been limited by
-      // the MIN2().
-      assert(start_idx == last_idx + 1,
-        err_msg("Not beyond end start_idx " SIZE_FORMAT " last_idx "
-                SIZE_FORMAT, start_idx, last_idx));
+      // Now set the bits in the card bitmap for [ntams, top)
+      BitMap::idx_t start_idx = _cm->card_bitmap_index_for(ntams);
+      BitMap::idx_t end_idx = _cm->card_bitmap_index_for(top);
+
+      // Note: if we're looking at the last region in heap - top
+      // could be actually just beyond the end of the heap; end_idx
+      // will then correspond to a (non-existent) card that is also
+      // just beyond the heap.
+      if (_g1h->is_in_g1_reserved(top) && !_ct_bs->is_card_aligned(top)) {
+        // end of object is not card aligned - increment to cover
+        // all the cards spanned by the object
+        end_idx += 1;
+      }
+
+      assert(end_idx <= _card_bm->size(),
+             err_msg("oob: end_idx=  "SIZE_FORMAT", bitmap size= "SIZE_FORMAT,
+                     end_idx, _card_bm->size()));
+      assert(start_idx < _card_bm->size(),
+             err_msg("oob: start_idx=  "SIZE_FORMAT", bitmap size= "SIZE_FORMAT,
+                     start_idx, _card_bm->size()));
+
+      _cm->set_card_bitmap_range(_card_bm, start_idx, end_idx, true /* is_par */);
     }
 
     // Set the bit for the region if it contains live data
@@ -1606,7 +1618,7 @@ public:
   void work(uint worker_id) {
     assert(worker_id < _n_workers, "invariant");
 
-    FinalCountDataUpdateClosure final_update_cl(_cm,
+    FinalCountDataUpdateClosure final_update_cl(_g1h,
                                                 _actual_region_bm,
                                                 _actual_card_bm);
 
@@ -2846,20 +2858,19 @@ void ConcurrentMark::clear_marking_state(bool clear_overflow) {
 // Aggregate the counting data that was constructed concurrently
 // with marking.
 class AggregateCountDataHRClosure: public HeapRegionClosure {
+  G1CollectedHeap* _g1h;
   ConcurrentMark* _cm;
+  CardTableModRefBS* _ct_bs;
   BitMap* _cm_card_bm;
   size_t _max_task_num;
 
  public:
-  AggregateCountDataHRClosure(ConcurrentMark *cm,
+  AggregateCountDataHRClosure(G1CollectedHeap* g1h,
                               BitMap* cm_card_bm,
                               size_t max_task_num) :
-    _cm(cm), _cm_card_bm(cm_card_bm),
-    _max_task_num(max_task_num) { }
-
-  bool is_card_aligned(HeapWord* p) {
-    return ((uintptr_t(p) & (CardTableModRefBS::card_size - 1)) == 0);
-  }
+    _g1h(g1h), _cm(g1h->concurrent_mark()),
+    _ct_bs((CardTableModRefBS*) (g1h->barrier_set())),
+    _cm_card_bm(cm_card_bm), _max_task_num(max_task_num) { }
 
   bool doHeapRegion(HeapRegion* hr) {
     if (hr->continuesHumongous()) {
@@ -2890,16 +2901,23 @@ class AggregateCountDataHRClosure: public HeapRegionClosure {
       return false;
     }
 
-    assert(is_card_aligned(start), "sanity");
-    assert(is_card_aligned(end), "sanity");
+    // 'start' should be in the heap.
+    assert(_g1h->is_in_g1_reserved(start) && _ct_bs->is_card_aligned(start), "sanity");
+    // 'end' *may* be just beyone the end of the heap (if hr is the last region)
+    assert(!_g1h->is_in_g1_reserved(end) || _ct_bs->is_card_aligned(end), "sanity");
 
     BitMap::idx_t start_idx = _cm->card_bitmap_index_for(start);
     BitMap::idx_t limit_idx = _cm->card_bitmap_index_for(limit);
     BitMap::idx_t end_idx = _cm->card_bitmap_index_for(end);
 
-    // If ntams is not card aligned then we bump the index for
-    // limit so that we get the card spanning ntams.
-    if (!is_card_aligned(limit)) {
+    // If ntams is not card aligned then we bump card bitmap index
+    // for limit so that we get the all the cards spanned by
+    // the object ending at ntams.
+    // Note: if this is the last region in the heap then ntams
+    // could be actually just beyond the end of the the heap;
+    // limit_idx will then  correspond to a (non-existent) card
+    // that is also outside the heap.
+    if (_g1h->is_in_g1_reserved(limit) && !_ct_bs->is_card_aligned(limit)) {
       limit_idx += 1;
     }
 
@@ -2928,7 +2946,7 @@ class AggregateCountDataHRClosure: public HeapRegionClosure {
 
         // BitMap::get_next_one_offset() can handle the case when
         // its left_offset parameter is greater than its right_offset
-        // parameter. If does, however, have an early exit if
+        // parameter. It does, however, have an early exit if
         // left_offset == right_offset. So let's limit the value
         // passed in for left offset here.
         BitMap::idx_t next_idx = MIN2(scan_idx + 1, limit_idx);
@@ -2964,7 +2982,7 @@ public:
     _active_workers(n_workers) { }
 
   void work(uint worker_id) {
-    AggregateCountDataHRClosure cl(_cm, _cm_card_bm, _max_task_num);
+    AggregateCountDataHRClosure cl(_g1h, _cm_card_bm, _max_task_num);
 
     if (G1CollectedHeap::use_parallel_gc_threads()) {
       _g1h->heap_region_par_iterate_chunked(&cl, worker_id,
diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp
index c448e34fa2d..abb46e1065c 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.hpp
@@ -806,7 +806,14 @@ public:
     return _MARKING_VERBOSE_ && _verbose_level >= high_verbose;
   }
 
-  // Counting data structure accessors
+  // Liveness counting
+
+  // Utility routine to set an exclusive range of cards on the given
+  // card liveness bitmap
+  inline void set_card_bitmap_range(BitMap* card_bm,
+                                    BitMap::idx_t start_idx,
+                                    BitMap::idx_t end_idx,
+                                    bool is_par);
 
   // Returns the card number of the bottom of the G1 heap.
   // Used in biasing indices into accounting card bitmaps.
diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp
index aca12a885e1..7f69234a5b7 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.inline.hpp
@@ -28,6 +28,42 @@
 #include "gc_implementation/g1/concurrentMark.hpp"
 #include "gc_implementation/g1/g1CollectedHeap.inline.hpp"
 
+// Utility routine to set an exclusive range of cards on the given
+// card liveness bitmap
+inline void ConcurrentMark::set_card_bitmap_range(BitMap* card_bm,
+                                                  BitMap::idx_t start_idx,
+                                                  BitMap::idx_t end_idx,
+                                                  bool is_par) {
+
+  // Set the exclusive bit range [start_idx, end_idx).
+  assert((end_idx - start_idx) > 0, "at least one card");
+  assert(end_idx <= card_bm->size(), "sanity");
+
+  // Silently clip the end index
+  end_idx = MIN2(end_idx, card_bm->size());
+
+  // For small ranges use a simple loop; otherwise use set_range or
+  // use par_at_put_range (if parallel). The range is made up of the
+  // cards that are spanned by an object/mem region so 8 cards will
+  // allow up to object sizes up to 4K to be handled using the loop.
+  if ((end_idx - start_idx) <= 8) {
+    for (BitMap::idx_t i = start_idx; i < end_idx; i += 1) {
+      if (is_par) {
+        card_bm->par_set_bit(i);
+      } else {
+        card_bm->set_bit(i);
+      }
+    }
+  } else {
+    // Note BitMap::par_at_put_range() and BitMap::set_range() are exclusive.
+    if (is_par) {
+      card_bm->par_at_put_range(start_idx, end_idx, true);
+    } else {
+      card_bm->set_range(start_idx, end_idx);
+    }
+  }
+}
+
 // Returns the index in the liveness accounting card bitmap
 // for the given address
 inline BitMap::idx_t ConcurrentMark::card_bitmap_index_for(HeapWord* addr) {
@@ -35,7 +71,6 @@ inline BitMap::idx_t ConcurrentMark::card_bitmap_index_for(HeapWord* addr) {
   // by the card shift -- address 0 corresponds to card number 0.  One
   // must subtract the card num of the bottom of the heap to obtain a
   // card table index.
-
   intptr_t card_num = intptr_t(uintptr_t(addr) >> CardTableModRefBS::card_shift);
   return card_num - heap_bottom_card_num();
 }
@@ -46,8 +81,10 @@ inline void ConcurrentMark::count_region(MemRegion mr, HeapRegion* hr,
                                          size_t* marked_bytes_array,
                                          BitMap* task_card_bm) {
   G1CollectedHeap* g1h = _g1h;
+  CardTableModRefBS* ct_bs = (CardTableModRefBS*) (g1h->barrier_set());
+
   HeapWord* start = mr.start();
-  HeapWord* last = mr.last();
+  HeapWord* end = mr.end();
   size_t region_size_bytes = mr.byte_size();
   uint index = hr->hrs_index();
 
@@ -61,24 +98,21 @@ inline void ConcurrentMark::count_region(MemRegion mr, HeapRegion* hr,
   marked_bytes_array[index] += region_size_bytes;
 
   BitMap::idx_t start_idx = card_bitmap_index_for(start);
-  BitMap::idx_t last_idx = card_bitmap_index_for(last);
+  BitMap::idx_t end_idx = card_bitmap_index_for(end);
 
-  // The card bitmap is task/worker specific => no need to use 'par' routines.
-  // Set bits in the inclusive bit range [start_idx, last_idx].
-  //
-  // For small ranges use a simple loop; otherwise use set_range
-  // The range are the cards that are spanned by the object/region
-  // so 8 cards will allow objects/regions up to 4K to be handled
-  // using the loop.
-  if ((last_idx - start_idx) <= 8) {
-    for (BitMap::idx_t i = start_idx; i <= last_idx; i += 1) {
-     task_card_bm->set_bit(i);
-    }
-  } else {
-    assert(last_idx < task_card_bm->size(), "sanity");
-    // Note: BitMap::set_range() is exclusive.
-    task_card_bm->set_range(start_idx, last_idx+1);
+  // Note: if we're looking at the last region in heap - end
+  // could be actually just beyond the end of the heap; end_idx
+  // will then correspond to a (non-existent) card that is also
+  // just beyond the heap.
+  if (g1h->is_in_g1_reserved(end) && !ct_bs->is_card_aligned(end)) {
+    // end of region is not card aligned - incremement to cover
+    // all the cards spanned by the region.
+    end_idx += 1;
   }
+  // The card bitmap is task/worker specific => no need to use
+  // the 'par' BitMap routines.
+  // Set bits in the exclusive bit range [start_idx, end_idx).
+  set_card_bitmap_range(task_card_bm, start_idx, end_idx, false /* is_par */);
 }
 
 // Counts the given memory region in the task/worker counting
diff --git a/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp b/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp
index 7a0b71356f7..134c8d0a36e 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/dirtyCardQueue.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
index 1e3a7a7bc27..f023f932ab8 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
@@ -3412,7 +3412,6 @@ void G1CollectedHeap::print_gc_threads_on(outputStream* st) const {
   st->cr();
   _cm->print_worker_threads_on(st);
   _cg1r->print_worker_threads_on(st);
-  st->cr();
 }
 
 void G1CollectedHeap::gc_threads_do(ThreadClosure* tc) const {
@@ -4152,7 +4151,7 @@ void G1CollectedHeap::init_gc_alloc_regions() {
   }
 }
 
-void G1CollectedHeap::release_gc_alloc_regions() {
+void G1CollectedHeap::release_gc_alloc_regions(uint no_of_gc_workers) {
   _survivor_gc_alloc_region.release();
   // If we have an old GC alloc region to release, we'll save it in
   // _retained_old_gc_alloc_region. If we don't
@@ -4162,8 +4161,8 @@ void G1CollectedHeap::release_gc_alloc_regions() {
   _retained_old_gc_alloc_region = _old_gc_alloc_region.release();
 
   if (ResizePLAB) {
-    _survivor_plab_stats.adjust_desired_plab_sz();
-    _old_plab_stats.adjust_desired_plab_sz();
+    _survivor_plab_stats.adjust_desired_plab_sz(no_of_gc_workers);
+    _old_plab_stats.adjust_desired_plab_sz(no_of_gc_workers);
   }
 }
 
@@ -5428,7 +5427,7 @@ public:
 };
 
 // Weak Reference processing during an evacuation pause (part 1).
-void G1CollectedHeap::process_discovered_references() {
+void G1CollectedHeap::process_discovered_references(uint no_of_gc_workers) {
   double ref_proc_start = os::elapsedTime();
 
   ReferenceProcessor* rp = _ref_processor_stw;
@@ -5455,15 +5454,14 @@ void G1CollectedHeap::process_discovered_references() {
   // referents points to another object which is also referenced by an
   // object discovered by the STW ref processor.
 
-  uint active_workers = (G1CollectedHeap::use_parallel_gc_threads() ?
-                        workers()->active_workers() : 1);
-
   assert(!G1CollectedHeap::use_parallel_gc_threads() ||
-           active_workers == workers()->active_workers(),
-           "Need to reset active_workers");
+           no_of_gc_workers == workers()->active_workers(),
+           "Need to reset active GC workers");
 
-  set_par_threads(active_workers);
-  G1ParPreserveCMReferentsTask keep_cm_referents(this, active_workers, _task_queues);
+  set_par_threads(no_of_gc_workers);
+  G1ParPreserveCMReferentsTask keep_cm_referents(this,
+                                                 no_of_gc_workers,
+                                                 _task_queues);
 
   if (G1CollectedHeap::use_parallel_gc_threads()) {
     workers()->run_task(&keep_cm_referents);
@@ -5529,10 +5527,10 @@ void G1CollectedHeap::process_discovered_references() {
                                       NULL);
   } else {
     // Parallel reference processing
-    assert(rp->num_q() == active_workers, "sanity");
-    assert(active_workers <= rp->max_num_q(), "sanity");
+    assert(rp->num_q() == no_of_gc_workers, "sanity");
+    assert(no_of_gc_workers <= rp->max_num_q(), "sanity");
 
-    G1STWRefProcTaskExecutor par_task_executor(this, workers(), _task_queues, active_workers);
+    G1STWRefProcTaskExecutor par_task_executor(this, workers(), _task_queues, no_of_gc_workers);
     rp->process_discovered_references(&is_alive, &keep_alive, &drain_queue, &par_task_executor);
   }
 
@@ -5547,7 +5545,7 @@ void G1CollectedHeap::process_discovered_references() {
 }
 
 // Weak Reference processing during an evacuation pause (part 2).
-void G1CollectedHeap::enqueue_discovered_references() {
+void G1CollectedHeap::enqueue_discovered_references(uint no_of_gc_workers) {
   double ref_enq_start = os::elapsedTime();
 
   ReferenceProcessor* rp = _ref_processor_stw;
@@ -5561,13 +5559,12 @@ void G1CollectedHeap::enqueue_discovered_references() {
   } else {
     // Parallel reference enqueuing
 
-    uint active_workers = (ParallelGCThreads > 0 ? workers()->active_workers() : 1);
-    assert(active_workers == workers()->active_workers(),
-           "Need to reset active_workers");
-    assert(rp->num_q() == active_workers, "sanity");
-    assert(active_workers <= rp->max_num_q(), "sanity");
+    assert(no_of_gc_workers == workers()->active_workers(),
+           "Need to reset active workers");
+    assert(rp->num_q() == no_of_gc_workers, "sanity");
+    assert(no_of_gc_workers <= rp->max_num_q(), "sanity");
 
-    G1STWRefProcTaskExecutor par_task_executor(this, workers(), _task_queues, active_workers);
+    G1STWRefProcTaskExecutor par_task_executor(this, workers(), _task_queues, no_of_gc_workers);
     rp->enqueue_discovered_references(&par_task_executor);
   }
 
@@ -5659,7 +5656,7 @@ void G1CollectedHeap::evacuate_collection_set() {
   // as we may have to copy some 'reachable' referent
   // objects (and their reachable sub-graphs) that were
   // not copied during the pause.
-  process_discovered_references();
+  process_discovered_references(n_workers);
 
   // Weak root processing.
   // Note: when JSR 292 is enabled and code blobs can contain
@@ -5671,7 +5668,7 @@ void G1CollectedHeap::evacuate_collection_set() {
     JNIHandles::weak_oops_do(&is_alive, &keep_alive);
   }
 
-  release_gc_alloc_regions();
+  release_gc_alloc_regions(n_workers);
   g1_rem_set()->cleanup_after_oops_into_collection_set_do();
 
   concurrent_g1_refine()->clear_hot_cache();
@@ -5695,7 +5692,7 @@ void G1CollectedHeap::evacuate_collection_set() {
   // will log these updates (and dirty their associated
   // cards). We need these updates logged to update any
   // RSets.
-  enqueue_discovered_references();
+  enqueue_discovered_references(n_workers);
 
   if (G1DeferredRSUpdate) {
     RedirtyLoggedCardTableEntryFastClosure redirty;
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
index 1a9a02896cb..816d4f253ac 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.hpp
@@ -326,7 +326,7 @@ private:
   void init_gc_alloc_regions();
 
   // It releases the GC alloc regions at the end of a GC.
-  void release_gc_alloc_regions();
+  void release_gc_alloc_regions(uint no_of_gc_workers);
 
   // It does any cleanup that needs to be done on the GC alloc regions
   // before a Full GC.
@@ -652,11 +652,11 @@ protected:
 
   // Process any reference objects discovered during
   // an incremental evacuation pause.
-  void process_discovered_references();
+  void process_discovered_references(uint no_of_gc_workers);
 
   // Enqueue any remaining discovered references
   // after processing.
-  void enqueue_discovered_references();
+  void enqueue_discovered_references(uint no_of_gc_workers);
 
 public:
 
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp
index 4a3f46c974d..b7d810dbb60 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectorPolicy.hpp
@@ -840,8 +840,8 @@ private:
   //
 
   // Current tenuring threshold, set to 0 if the collector reaches the
-  // maximum amount of suvivors regions.
-  int _tenuring_threshold;
+  // maximum amount of survivors regions.
+  uint _tenuring_threshold;
 
   // The limit on the number of regions allocated for survivors.
   uint _max_survivor_regions;
@@ -851,7 +851,7 @@ private:
   size_t _survivor_bytes_before_gc;
   size_t _capacity_before_gc;
 
-  // The amount of survor regions after a collection.
+  // The amount of survivor regions after a collection.
   uint _recorded_survivor_regions;
   // List of survivor regions.
   HeapRegion* _recorded_survivor_head;
@@ -862,7 +862,7 @@ private:
 public:
 
   inline GCAllocPurpose
-    evacuation_destination(HeapRegion* src_region, int age, size_t word_sz) {
+    evacuation_destination(HeapRegion* src_region, uint age, size_t word_sz) {
       if (age < _tenuring_threshold && src_region->is_young()) {
         return GCAllocForSurvived;
       } else {
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp
index ae8439ad25f..7a102cf43d7 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1GCPhaseTimes.cpp
@@ -129,7 +129,7 @@ void WorkerDataArray<T>::print(int level, const char* title) {
   buf.append_and_print_cr("]");
 }
 
-#ifdef ASSERT
+#ifndef PRODUCT
 
 template <class T>
 void WorkerDataArray<T>::reset() {
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1MMUTracker.hpp b/hotspot/src/share/vm/gc_implementation/g1/g1MMUTracker.hpp
index a8146c92386..b8ca02c4d5e 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MMUTracker.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MMUTracker.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
index 67eac907cde..55925da896c 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
@@ -151,9 +151,7 @@ void G1MarkSweep::mark_sweep_phase1(bool& marked_for_unloading,
 
   // Follow code cache roots (has to be done after system dictionary,
   // assumes all live klasses are marked)
-  CodeCache::do_unloading(&GenMarkSweep::is_alive,
-                                   &GenMarkSweep::keep_alive,
-                                   purged_class);
+  CodeCache::do_unloading(&GenMarkSweep::is_alive, purged_class);
   GenMarkSweep::follow_stack();
 
   // Update subklass/sibling/implementor links of live klasses
diff --git a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp
index 1a756aa3122..b780b2d522a 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/ptrQueue.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp
index 6a860295745..ab0ab1f0205 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/sparsePRT.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/g1/survRateGroup.hpp b/hotspot/src/share/vm/gc_implementation/g1/survRateGroup.hpp
index abac3e00a72..fade2442d97 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/survRateGroup.hpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/survRateGroup.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp b/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp
index b4b62fc77f9..564b24c7460 100644
--- a/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
index df4626136aa..ea432002a1e 100644
--- a/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parNew/parNewGeneration.cpp
@@ -1037,7 +1037,7 @@ void ParNewGeneration::collect(bool   full,
 
   adjust_desired_tenuring_threshold();
   if (ResizePLAB) {
-    plab_stats()->adjust_desired_plab_sz();
+    plab_stats()->adjust_desired_plab_sz(n_workers);
   }
 
   if (PrintGC && !PrintGCDetails) {
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp
index 0411751d754..83d3edffc34 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp
@@ -121,103 +121,12 @@ class CheckForPreciseMarks : public OopClosure {
 
 // We get passed the space_top value to prevent us from traversing into
 // the old_gen promotion labs, which cannot be safely parsed.
-void CardTableExtension::scavenge_contents(ObjectStartArray* start_array,
-                                           MutableSpace* sp,
-                                           HeapWord* space_top,
-                                           PSPromotionManager* pm)
-{
-  assert(start_array != NULL && sp != NULL && pm != NULL, "Sanity");
-  assert(start_array->covered_region().contains(sp->used_region()),
-         "ObjectStartArray does not cover space");
 
-  if (sp->not_empty()) {
-    oop* sp_top = (oop*)space_top;
-    oop* prev_top = NULL;
-    jbyte* current_card = byte_for(sp->bottom());
-    jbyte* end_card     = byte_for(sp_top - 1);    // sp_top is exclusive
-    // scan card marking array
-    while (current_card <= end_card) {
-      jbyte value = *current_card;
-      // skip clean cards
-      if (card_is_clean(value)) {
-        current_card++;
-      } else {
-        // we found a non-clean card
-        jbyte* first_nonclean_card = current_card++;
-        oop* bottom = (oop*)addr_for(first_nonclean_card);
-        // find object starting on card
-        oop* bottom_obj = (oop*)start_array->object_start((HeapWord*)bottom);
-        // bottom_obj = (oop*)start_array->object_start((HeapWord*)bottom);
-        assert(bottom_obj <= bottom, "just checking");
-        // make sure we don't scan oops we already looked at
-        if (bottom < prev_top) bottom = prev_top;
-        // figure out when to stop scanning
-        jbyte* first_clean_card;
-        oop* top;
-        bool restart_scanning;
-        do {
-          restart_scanning = false;
-          // find a clean card
-          while (current_card <= end_card) {
-            value = *current_card;
-            if (card_is_clean(value)) break;
-            current_card++;
-          }
-          // check if we reached the end, if so we are done
-          if (current_card >= end_card) {
-            first_clean_card = end_card + 1;
-            current_card++;
-            top = sp_top;
-          } else {
-            // we have a clean card, find object starting on that card
-            first_clean_card = current_card++;
-            top = (oop*)addr_for(first_clean_card);
-            oop* top_obj = (oop*)start_array->object_start((HeapWord*)top);
-            // top_obj = (oop*)start_array->object_start((HeapWord*)top);
-            assert(top_obj <= top, "just checking");
-            if (oop(top_obj)->is_objArray() || oop(top_obj)->is_typeArray()) {
-              // an arrayOop is starting on the clean card - since we do exact store
-              // checks for objArrays we are done
-            } else {
-              // otherwise, it is possible that the object starting on the clean card
-              // spans the entire card, and that the store happened on a later card.
-              // figure out where the object ends
-              top = top_obj + oop(top_obj)->size();
-              jbyte* top_card = CardTableModRefBS::byte_for(top - 1);   // top is exclusive
-              if (top_card > first_clean_card) {
-                // object ends a different card
-                current_card = top_card + 1;
-                if (card_is_clean(*top_card)) {
-                  // the ending card is clean, we are done
-                  first_clean_card = top_card;
-                } else {
-                  // the ending card is not clean, continue scanning at start of do-while
-                  restart_scanning = true;
-                }
-              } else {
-                // object ends on the clean card, we are done.
-                assert(first_clean_card == top_card, "just checking");
-              }
-            }
-          }
-        } while (restart_scanning);
-        // we know which cards to scan, now clear them
-        while (first_nonclean_card < first_clean_card) {
-          *first_nonclean_card++ = clean_card;
-        }
-        // scan oops in objects
-        do {
-          oop(bottom_obj)->push_contents(pm);
-          bottom_obj += oop(bottom_obj)->size();
-          assert(bottom_obj <= sp_top, "just checking");
-        } while (bottom_obj < top);
-        pm->drain_stacks_cond_depth();
-        // remember top oop* scanned
-        prev_top = top;
-      }
-    }
-  }
-}
+// Do not call this method if the space is empty.
+// It is a waste to start tasks and get here only to
+// do no work.  If this method needs to be called
+// when the space is empty, fix the calculation of
+// end_card to allow sp_top == sp->bottom().
 
 void CardTableExtension::scavenge_contents_parallel(ObjectStartArray* start_array,
                                                     MutableSpace* sp,
@@ -228,10 +137,11 @@ void CardTableExtension::scavenge_contents_parallel(ObjectStartArray* start_arra
   int ssize = 128; // Naked constant!  Work unit = 64k.
   int dirty_card_count = 0;
 
+  // It is a waste to get here if empty.
+  assert(sp->bottom() < sp->top(), "Should not be called if empty");
   oop* sp_top = (oop*)space_top;
-  oop* sp_last = sp->bottom() == space_top ? sp_top : sp_top - 1;
   jbyte* start_card = byte_for(sp->bottom());
-  jbyte* end_card   = byte_for(sp_last) + 1;
+  jbyte* end_card   = byte_for(sp_top - 1) + 1;
   oop* last_scanned = NULL; // Prevent scanning objects more than once
   // The width of the stripe ssize*stripe_total must be
   // consistent with the number of stripes so that the complete slice
@@ -255,6 +165,16 @@ void CardTableExtension::scavenge_contents_parallel(ObjectStartArray* start_arra
     HeapWord* slice_start = addr_for(worker_start_card);
     HeapWord* slice_end = MIN2((HeapWord*) sp_top, addr_for(worker_end_card));
 
+#ifdef ASSERT
+    if (GCWorkerDelayMillis > 0) {
+      // Delay 1 worker so that it proceeds after all the work
+      // has been completed.
+      if (stripe_number < 2) {
+        os::sleep(Thread::current(), GCWorkerDelayMillis, false);
+      }
+    }
+#endif
+
     // If there are not objects starting within the chunk, skip it.
     if (!start_array->object_starts_in_range(slice_start, slice_end)) {
       continue;
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp
index 27f917d23fd..733b5c91ad9 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.hpp
@@ -60,11 +60,6 @@ class CardTableExtension : public CardTableModRefBS {
   // BarrierSet::Name kind() { return BarrierSet::CardTableExtension; }
 
   // Scavenge support
-  void scavenge_contents(ObjectStartArray* start_array,
-                         MutableSpace* sp,
-                         HeapWord* space_top,
-                         PSPromotionManager* pm);
-
   void scavenge_contents_parallel(ObjectStartArray* start_array,
                                   MutableSpace* sp,
                                   HeapWord* space_top,
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp
index b32007eded5..08c75e14677 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.hpp
index b64f7d9557e..76b0ec92dd8 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.hpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskManager.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp
index 9bbdf49ed75..2ea89a59eb8 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.cpp
@@ -1,6 +1,6 @@
 
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.hpp
index 1a77fe060c4..7f8aff2bdbf 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.hpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/gcTaskThread.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/objectStartArray.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/objectStartArray.hpp
index cbd671a06c4..34d64a5c5d8 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/objectStartArray.hpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/objectStartArray.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp
index 44ddcba440f..3d4cbedd827 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp
index 9523b7923f6..38061a9dfc5 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp
index fd71e4a6cb5..7b9ff165050 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/pcTasks.cpp
@@ -204,7 +204,7 @@ void StealMarkingTask::do_it(GCTaskManager* manager, uint which) {
   int random_seed = 17;
   do {
     while (ParCompactionManager::steal_objarray(which, &random_seed, task)) {
-      objArrayKlass* const k = (objArrayKlass*)task.obj()->klass();
+      ObjArrayKlass* const k = (ObjArrayKlass*)task.obj()->klass();
       k->oop_follow_contents(cm, task.obj(), task.index());
       cm->follow_marking_stacks();
     }
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp
index e3909617fe3..3b24ed8866a 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.cpp
@@ -941,9 +941,9 @@ size_t PSAdaptiveSizePolicy::promo_decrement(size_t cur_promo) {
   return promo_heap_delta;
 }
 
-int PSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(
+uint PSAdaptiveSizePolicy::compute_survivor_space_size_and_threshold(
                                              bool is_survivor_overflow,
-                                             int tenuring_threshold,
+                                             uint tenuring_threshold,
                                              size_t survivor_limit) {
   assert(survivor_limit >= _intra_generation_alignment,
          "survivor_limit too small");
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp
index d9b86e8fb37..030cb9da167 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psAdaptiveSizePolicy.hpp
@@ -353,9 +353,9 @@ class PSAdaptiveSizePolicy : public AdaptiveSizePolicy {
 
   // Calculates new survivor space size;  returns a new tenuring threshold
   // value. Stores new survivor size in _survivor_size.
-  int compute_survivor_space_size_and_threshold(bool   is_survivor_overflow,
-                                                int    tenuring_threshold,
-                                                size_t survivor_limit);
+  uint compute_survivor_space_size_and_threshold(bool   is_survivor_overflow,
+                                                 uint    tenuring_threshold,
+                                                 size_t survivor_limit);
 
   // Return the maximum size of a survivor space if the young generation were of
   // size gen_size.
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp
index b08c9307614..62c578f33fd 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psCompactionManager.cpp
@@ -188,10 +188,10 @@ void ParCompactionManager::follow_marking_stacks() {
     // Process ObjArrays one at a time to avoid marking stack bloat.
     ObjArrayTask task;
     if (_objarray_stack.pop_overflow(task)) {
-      objArrayKlass* const k = (objArrayKlass*)task.obj()->klass();
+      ObjArrayKlass* const k = (ObjArrayKlass*)task.obj()->klass();
       k->oop_follow_contents(this, task.obj(), task.index());
     } else if (_objarray_stack.pop_local(task)) {
-      objArrayKlass* const k = (objArrayKlass*)task.obj()->klass();
+      ObjArrayKlass* const k = (ObjArrayKlass*)task.obj()->klass();
       k->oop_follow_contents(this, task.obj(), task.index());
     }
   } while (!marking_stacks_empty());
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psGenerationCounters.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psGenerationCounters.cpp
index ccb4298f883..2bf6a0df94a 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psGenerationCounters.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psGenerationCounters.cpp
@@ -1,6 +1,6 @@
 
 /*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
index 1c59966eed1..44e764f7ae7 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psMarkSweep.cpp
@@ -521,8 +521,7 @@ void PSMarkSweep::mark_sweep_phase1(bool clear_all_softrefs) {
   bool purged_class = SystemDictionary::do_unloading(is_alive_closure());
 
   // Follow code cache roots
-  CodeCache::do_unloading(is_alive_closure(), mark_and_push_closure(),
-                          purged_class);
+  CodeCache::do_unloading(is_alive_closure(), purged_class);
   follow_stack(); // Flush marking stack
 
   // Update subklass/sibling/implementor links of live klasses
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
index fe8ec1780b6..7a077621277 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psParallelCompact.cpp
@@ -2375,8 +2375,7 @@ void PSParallelCompact::marking_phase(ParCompactionManager* cm,
   bool purged_class = SystemDictionary::do_unloading(is_alive_closure());
 
   // Follow code cache roots.
-  CodeCache::do_unloading(is_alive_closure(), &mark_and_push_closure,
-                          purged_class);
+  CodeCache::do_unloading(is_alive_closure(), purged_class);
   cm->follow_marking_stacks(); // Flush marking stack.
 
   // Update subklass/sibling/implementor links of live klasses
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.hpp
index e11ce406eec..e0427ef18e9 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.hpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionLAB.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp
index 038b3bda7e0..8822a481b3d 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psPromotionManager.inline.hpp
@@ -85,7 +85,7 @@ oop PSPromotionManager::copy_to_survivor_space(oop o) {
 
     if (!promote_immediately) {
       // Find the objects age, MT safe.
-      int age = (test_mark->has_displaced_mark_helper() /* o->has_displaced_mark() */) ?
+      uint age = (test_mark->has_displaced_mark_helper() /* o->has_displaced_mark() */) ?
         test_mark->displaced_mark_helper()->age() : test_mark->age();
 
       // Try allocating obj in to-space (unless too old)
@@ -136,6 +136,13 @@ oop PSPromotionManager::copy_to_survivor_space(oop o) {
 
             HeapWord* lab_base = old_gen()->cas_allocate(OldPLABSize);
             if(lab_base != NULL) {
+#ifdef ASSERT
+              // Delay the initialization of the promotion lab (plab).
+              // This exposes uninitialized plabs to card table processing.
+              if (GCWorkerDelayMillis > 0) {
+                os::sleep(Thread::current(), GCWorkerDelayMillis, false);
+              }
+#endif
               _old_lab.initialize(MemRegion(lab_base, OldPLABSize));
               // Try the old lab allocation again.
               new_obj = (oop) _old_lab.allocate(new_obj_size);
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
index 65623d7c8f7..370311d1c9c 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.cpp
@@ -59,7 +59,7 @@ int                        PSScavenge::_consecutive_skipped_scavenges = 0;
 ReferenceProcessor*        PSScavenge::_ref_processor = NULL;
 CardTableExtension*        PSScavenge::_card_table = NULL;
 bool                       PSScavenge::_survivor_overflow = false;
-int                        PSScavenge::_tenuring_threshold = 0;
+uint                       PSScavenge::_tenuring_threshold = 0;
 HeapWord*                  PSScavenge::_young_generation_boundary = NULL;
 elapsedTimer               PSScavenge::_accumulated_time;
 Stack<markOop, mtGC>       PSScavenge::_preserved_mark_stack;
@@ -395,9 +395,13 @@ bool PSScavenge::invoke_no_policy() {
 
       GCTaskQueue* q = GCTaskQueue::create();
 
-      uint stripe_total = active_workers;
-      for(uint i=0; i < stripe_total; i++) {
-        q->enqueue(new OldToYoungRootsTask(old_gen, old_top, i, stripe_total));
+      if (!old_gen->object_space()->is_empty()) {
+        // There are only old-to-young pointers if there are objects
+        // in the old gen.
+        uint stripe_total = active_workers;
+        for(uint i=0; i < stripe_total; i++) {
+          q->enqueue(new OldToYoungRootsTask(old_gen, old_top, i, stripe_total));
+        }
       }
 
       q->enqueue(new ScavengeRootsTask(ScavengeRootsTask::universe));
@@ -525,7 +529,7 @@ bool PSScavenge::invoke_no_policy() {
 
        if (PrintTenuringDistribution) {
          gclog_or_tty->cr();
-         gclog_or_tty->print_cr("Desired survivor size %ld bytes, new threshold %d (max %d)",
+         gclog_or_tty->print_cr("Desired survivor size %ld bytes, new threshold %u (max %u)",
                                 size_policy->calculated_survivor_size_in_bytes(),
                                 _tenuring_threshold, MaxTenuringThreshold);
        }
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp
index af753d6f40d..43e59ac9cfb 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psScavenge.hpp
@@ -66,14 +66,14 @@ class PSScavenge: AllStatic {
   static PSIsAliveClosure    _is_alive_closure;     // Closure used for reference processing
   static CardTableExtension* _card_table;           // We cache the card table for fast access.
   static bool                _survivor_overflow;    // Overflow this collection
-  static int                 _tenuring_threshold;   // tenuring threshold for next scavenge
+  static uint                _tenuring_threshold;   // tenuring threshold for next scavenge
   static elapsedTimer        _accumulated_time;     // total time spent on scavenge
   static HeapWord*           _young_generation_boundary; // The lowest address possible for the young_gen.
                                                          // This is used to decide if an oop should be scavenged,
                                                          // cards should be marked, etc.
   static Stack<markOop, mtGC> _preserved_mark_stack; // List of marks to be restored after failed promotion
   static Stack<oop, mtGC>     _preserved_oop_stack;  // List of oops that need their mark restored.
-  static CollectorCounters*      _counters;         // collector performance counters
+  static CollectorCounters*      _counters;          // collector performance counters
   static bool                    _promotion_failed;
 
   static void clean_up_failed_promotion();
@@ -88,7 +88,7 @@ class PSScavenge: AllStatic {
 
  public:
   // Accessors
-  static int              tenuring_threshold()  { return _tenuring_threshold; }
+  static uint             tenuring_threshold()  { return _tenuring_threshold; }
   static elapsedTimer*    accumulated_time()    { return &_accumulated_time; }
   static bool             promotion_failed()    { return _promotion_failed; }
   static int              consecutive_skipped_scavenges()
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp
index f3aa69ac397..605792671a9 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp
@@ -164,36 +164,14 @@ void StealTask::do_it(GCTaskManager* manager, uint which) {
   guarantee(pm->stacks_empty(), "stacks should be empty at this point");
 }
 
-//
-// SerialOldToYoungRootsTask
-//
-
-void SerialOldToYoungRootsTask::do_it(GCTaskManager* manager, uint which) {
-  assert(_gen != NULL, "Sanity");
-  assert(_gen->object_space()->contains(_gen_top) || _gen_top == _gen->object_space()->top(), "Sanity");
-
-  {
-    PSPromotionManager* pm = PSPromotionManager::gc_thread_promotion_manager(which);
-
-    assert(Universe::heap()->kind() == CollectedHeap::ParallelScavengeHeap, "Sanity");
-    CardTableExtension* card_table = (CardTableExtension *)Universe::heap()->barrier_set();
-    // FIX ME! Assert that card_table is the type we believe it to be.
-
-    card_table->scavenge_contents(_gen->start_array(),
-                                  _gen->object_space(),
-                                  _gen_top,
-                                  pm);
-
-    // Do the real work
-    pm->drain_stacks(false);
-  }
-}
-
 //
 // OldToYoungRootsTask
 //
 
 void OldToYoungRootsTask::do_it(GCTaskManager* manager, uint which) {
+  // There are not old-to-young pointers if the old gen is empty.
+  assert(!_gen->object_space()->is_empty(),
+    "Should not be called is there is no work");
   assert(_gen != NULL, "Sanity");
   assert(_gen->object_space()->contains(_gen_top) || _gen_top == _gen->object_space()->top(), "Sanity");
   assert(_stripe_number < ParallelGCThreads, "Sanity");
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.hpp
index d31f653ac16..7769fddf7c4 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.hpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.hpp
@@ -112,25 +112,6 @@ class StealTask : public GCTask {
   virtual void do_it(GCTaskManager* manager, uint which);
 };
 
-//
-// SerialOldToYoungRootsTask
-//
-// This task is used to scan for roots in the perm gen
-
-class SerialOldToYoungRootsTask : public GCTask {
- private:
-  PSOldGen* _gen;
-  HeapWord* _gen_top;
-
- public:
-  SerialOldToYoungRootsTask(PSOldGen *gen, HeapWord* gen_top) :
-    _gen(gen), _gen_top(gen_top) { }
-
-  char* name() { return (char *)"serial-old-to-young-roots-task"; }
-
-  virtual void do_it(GCTaskManager* manager, uint which);
-};
-
 //
 // OldToYoungRootsTask
 //
diff --git a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.hpp b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.hpp
index b90ed979b4e..02e36ac291d 100644
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.hpp
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp b/hotspot/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp
index 2b5858b725a..90093a2cb2e 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.cpp
@@ -642,7 +642,7 @@ bool AdaptiveSizePolicy::print_adaptive_size_policy_on(outputStream* st) const {
 
 bool AdaptiveSizePolicy::print_adaptive_size_policy_on(
                                             outputStream* st,
-                                            int tenuring_threshold_arg) const {
+                                            uint tenuring_threshold_arg) const {
   if (!AdaptiveSizePolicy::print_adaptive_size_policy_on(st)) {
     return false;
   }
@@ -663,7 +663,7 @@ bool AdaptiveSizePolicy::print_adaptive_size_policy_on(
     assert(!tenuring_threshold_change(), "(no change was attempted)");
   }
   if (tenuring_threshold_changed) {
-    st->print_cr("%d", tenuring_threshold_arg);
+    st->print_cr("%u", tenuring_threshold_arg);
   }
   return true;
 }
diff --git a/hotspot/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.hpp b/hotspot/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.hpp
index 4becadce84b..2fca75fce54 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/adaptiveSizePolicy.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -489,8 +489,8 @@ class AdaptiveSizePolicy : public CHeapObj<mtGC> {
 
   // Printing support
   virtual bool print_adaptive_size_policy_on(outputStream* st) const;
-  bool print_adaptive_size_policy_on(outputStream* st, int
-                                  tenuring_threshold) const;
+  bool print_adaptive_size_policy_on(outputStream* st,
+                                     uint tenuring_threshold) const;
 };
 
 // Class that can be used to print information about the
diff --git a/hotspot/src/share/vm/gc_implementation/shared/ageTable.cpp b/hotspot/src/share/vm/gc_implementation/shared/ageTable.cpp
index bc74db8f777..50162a0adb1 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/ageTable.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/ageTable.cpp
@@ -78,10 +78,10 @@ void ageTable::merge_par(ageTable* subTable) {
   }
 }
 
-int ageTable::compute_tenuring_threshold(size_t survivor_capacity) {
+uint ageTable::compute_tenuring_threshold(size_t survivor_capacity) {
   size_t desired_survivor_size = (size_t)((((double) survivor_capacity)*TargetSurvivorRatio)/100);
   size_t total = 0;
-  int age = 1;
+  uint age = 1;
   assert(sizes[0] == 0, "no objects with age zero should be recorded");
   while (age < table_size) {
     total += sizes[age];
@@ -90,13 +90,13 @@ int ageTable::compute_tenuring_threshold(size_t survivor_capacity) {
     if (total > desired_survivor_size) break;
     age++;
   }
-  int result = age < MaxTenuringThreshold ? age : MaxTenuringThreshold;
+  uint result = age < MaxTenuringThreshold ? age : MaxTenuringThreshold;
 
   if (PrintTenuringDistribution || UsePerfData) {
 
     if (PrintTenuringDistribution) {
       gclog_or_tty->cr();
-      gclog_or_tty->print_cr("Desired survivor size %ld bytes, new threshold %d (max %d)",
+      gclog_or_tty->print_cr("Desired survivor size %ld bytes, new threshold %u (max %u)",
         desired_survivor_size*oopSize, result, MaxTenuringThreshold);
     }
 
@@ -106,7 +106,7 @@ int ageTable::compute_tenuring_threshold(size_t survivor_capacity) {
       total += sizes[age];
       if (sizes[age] > 0) {
         if (PrintTenuringDistribution) {
-          gclog_or_tty->print_cr("- age %3d: %10ld bytes, %10ld total",
+          gclog_or_tty->print_cr("- age %3u: %10ld bytes, %10ld total",
             age, sizes[age]*oopSize, total*oopSize);
         }
       }
diff --git a/hotspot/src/share/vm/gc_implementation/shared/ageTable.hpp b/hotspot/src/share/vm/gc_implementation/shared/ageTable.hpp
index d763157e4f2..9e2ee99997f 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/ageTable.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/ageTable.hpp
@@ -55,7 +55,7 @@ class ageTable VALUE_OBJ_CLASS_SPEC {
 
   // add entry
   void add(oop p, size_t oop_size) {
-    int age = p->age();
+    uint age = p->age();
     assert(age > 0 && age < table_size, "invalid age of object");
     sizes[age] += oop_size;
   }
@@ -66,7 +66,7 @@ class ageTable VALUE_OBJ_CLASS_SPEC {
   void merge_par(ageTable* subTable);
 
   // calculate new tenuring threshold based on age information
-  int compute_tenuring_threshold(size_t survivor_capacity);
+  uint compute_tenuring_threshold(size_t survivor_capacity);
 
  private:
   PerfVariable* _perf_sizes[table_size];
diff --git a/hotspot/src/share/vm/gc_implementation/shared/allocationStats.hpp b/hotspot/src/share/vm/gc_implementation/shared/allocationStats.hpp
index 46f25371cc2..df1ee1ea2e5 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/allocationStats.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/allocationStats.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/collectorCounters.cpp b/hotspot/src/share/vm/gc_implementation/shared/collectorCounters.cpp
index d5aff5c5d09..76468b7d1f3 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/collectorCounters.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/collectorCounters.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/collectorCounters.hpp b/hotspot/src/share/vm/gc_implementation/shared/collectorCounters.hpp
index 52eb44396ad..81791d2a5e0 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/collectorCounters.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/collectorCounters.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/gSpaceCounters.cpp b/hotspot/src/share/vm/gc_implementation/shared/gSpaceCounters.cpp
index 00a96703d57..4a8f85ab2a1 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/gSpaceCounters.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/gSpaceCounters.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/gSpaceCounters.hpp b/hotspot/src/share/vm/gc_implementation/shared/gSpaceCounters.hpp
index 8b901e2e9e0..745dac7417b 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/gSpaceCounters.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/gSpaceCounters.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/gcAdaptivePolicyCounters.hpp b/hotspot/src/share/vm/gc_implementation/shared/gcAdaptivePolicyCounters.hpp
index 30e78244ac4..c1758a2fc19 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/gcAdaptivePolicyCounters.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/gcAdaptivePolicyCounters.hpp
@@ -188,7 +188,7 @@ class GCAdaptivePolicyCounters : public GCPolicyCounters {
   inline void update_survivor_overflowed(bool survivor_overflowed) {
     _survivor_overflowed_counter->set_value(survivor_overflowed);
   }
-  inline void update_tenuring_threshold(int threshold) {
+  inline void update_tenuring_threshold(uint threshold) {
     tenuring_threshold()->set_value(threshold);
   }
   inline void update_increment_tenuring_threshold_for_gc_cost() {
diff --git a/hotspot/src/share/vm/gc_implementation/shared/gcPolicyCounters.hpp b/hotspot/src/share/vm/gc_implementation/shared/gcPolicyCounters.hpp
index 10a7bac5144..022a5f0bb0e 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/gcPolicyCounters.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/gcPolicyCounters.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/gcStats.hpp b/hotspot/src/share/vm/gc_implementation/shared/gcStats.hpp
index af16ca63ecf..4182e275188 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/gcStats.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/gcStats.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/gcUtil.cpp b/hotspot/src/share/vm/gc_implementation/shared/gcUtil.cpp
index 3b9fd7a68aa..62492359527 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/gcUtil.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/gcUtil.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/gcUtil.hpp b/hotspot/src/share/vm/gc_implementation/shared/gcUtil.hpp
index ba97f7cfd3a..a01115d06ef 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/gcUtil.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/gcUtil.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/generationCounters.cpp b/hotspot/src/share/vm/gc_implementation/shared/generationCounters.cpp
index 8cbfac19bee..6dd07a3a938 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/generationCounters.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/generationCounters.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/generationCounters.hpp b/hotspot/src/share/vm/gc_implementation/shared/generationCounters.hpp
index 78c00769101..b716fe8bd11 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/generationCounters.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/generationCounters.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/hSpaceCounters.cpp b/hotspot/src/share/vm/gc_implementation/shared/hSpaceCounters.cpp
index cc4cccb3bdc..9aa76f31736 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/hSpaceCounters.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/hSpaceCounters.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/hSpaceCounters.hpp b/hotspot/src/share/vm/gc_implementation/shared/hSpaceCounters.hpp
index d33a103fb32..f3b956ee67a 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/hSpaceCounters.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/hSpaceCounters.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp b/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp
index 9c4b22e785d..bbbd1a05532 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/markSweep.cpp
@@ -115,7 +115,7 @@ void MarkSweep::follow_stack() {
     // Process ObjArrays one at a time to avoid marking stack bloat.
     if (!_objarray_stack.is_empty()) {
       ObjArrayTask task = _objarray_stack.pop();
-      objArrayKlass* const k = (objArrayKlass*)task.obj()->klass();
+      ObjArrayKlass* const k = (ObjArrayKlass*)task.obj()->klass();
       k->oop_follow_contents(task.obj(), task.index());
     }
   } while (!_marking_stack.is_empty() || !_objarray_stack.is_empty());
diff --git a/hotspot/src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp b/hotspot/src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp
index d159dbe28fc..87f74484ab8 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/parGCAllocBuffer.cpp
@@ -87,7 +87,7 @@ void ParGCAllocBuffer::flush_stats(PLABStats* stats) {
 // Compute desired plab size and latch result for later
 // use. This should be called once at the end of parallel
 // scavenge; it clears the sensor accumulators.
-void PLABStats::adjust_desired_plab_sz() {
+void PLABStats::adjust_desired_plab_sz(uint no_of_gc_workers) {
   assert(ResizePLAB, "Not set");
   if (_allocated == 0) {
     assert(_unused == 0,
@@ -107,7 +107,7 @@ void PLABStats::adjust_desired_plab_sz() {
     target_refills = 1;
   }
   _used = _allocated - _wasted - _unused;
-  size_t plab_sz = _used/(target_refills*ParallelGCThreads);
+  size_t plab_sz = _used/(target_refills*no_of_gc_workers);
   if (PrintPLAB) gclog_or_tty->print(" (plab_sz = %d ", plab_sz);
   // Take historical weighted average
   _filter.sample(plab_sz);
diff --git a/hotspot/src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp b/hotspot/src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp
index cb35ee28f2e..0666353aa59 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/parGCAllocBuffer.hpp
@@ -204,7 +204,8 @@ class PLABStats VALUE_OBJ_CLASS_SPEC {
     return _desired_plab_sz;
   }
 
-  void adjust_desired_plab_sz(); // filter computation, latches output to
+  void adjust_desired_plab_sz(uint no_of_gc_workers);
+                                 // filter computation, latches output to
                                  // _desired_plab_sz, clears sensor accumulators
 
   void add_allocated(size_t v) {
diff --git a/hotspot/src/share/vm/gc_implementation/shared/spaceCounters.cpp b/hotspot/src/share/vm/gc_implementation/shared/spaceCounters.cpp
index 44fc6e16b70..48dddd85b9d 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/spaceCounters.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/spaceCounters.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/spaceCounters.hpp b/hotspot/src/share/vm/gc_implementation/shared/spaceCounters.hpp
index 1369ee0c313..6b13e5acfd2 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/spaceCounters.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/spaceCounters.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/spaceDecorator.hpp b/hotspot/src/share/vm/gc_implementation/shared/spaceDecorator.hpp
index 513735ddf08..8d500ae50bf 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/spaceDecorator.hpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/spaceDecorator.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.cpp b/hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.cpp
index a75c26499db..ee1be4a6490 100644
--- a/hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.cpp
+++ b/hotspot/src/share/vm/gc_implementation/shared/vmGCOperations.cpp
@@ -198,8 +198,6 @@ void VM_CollectForMetadataAllocation::doit() {
   CollectedHeap* heap = Universe::heap();
   GCCauseSetter gccs(heap, _gc_cause);
 
-  bool do_cms_concurrent = false;
-
   // Check again if the space is available.  Another thread
   // may have similarly failed a metadata allocation and induced
   // a GC that freed space for the allocation.
@@ -208,23 +206,25 @@ void VM_CollectForMetadataAllocation::doit() {
     }
 
   if (_result == NULL) {
-    if (!UseConcMarkSweepGC) {
-      // Don't clear the soft refs the first time.
-      heap->collect_as_vm_thread(GCCause::_metadata_GC_threshold);
-      _result = _loader_data->metaspace_non_null()->allocate(_size, _mdtype);
-      // Don't do this for now
-      // This seems too costly to do a second full GC
-      // Let the metaspace grow instead
-      // if (_result == NULL) {
-      //  // If allocation fails again, clear soft refs
-      //  heap->collect_as_vm_thread(GCCause::_last_ditch_collection);
-      //  _result = _loader_data->metaspace_non_null()->allocate(_size, _mdtype);
-      // }
-    } else {
-      MetaspaceGC::set_should_concurrent_collect(true);
-      do_cms_concurrent = true;
+    if (UseConcMarkSweepGC) {
+      if (CMSClassUnloadingEnabled) {
+        MetaspaceGC::set_should_concurrent_collect(true);
+      }
+      // For CMS expand since the collection is going to be concurrent.
+      _result =
+        _loader_data->metaspace_non_null()->expand_and_allocate(_size, _mdtype);
     }
     if (_result == NULL) {
+      // Don't clear the soft refs.  This GC is for reclaiming metadata
+      // and is unrelated to the fullness of the Java heap which should
+      // be the criteria for clearing SoftReferences.
+      if (Verbose && PrintGCDetails && UseConcMarkSweepGC) {
+        gclog_or_tty->print_cr("\nCMS full GC for Metaspace");
+      }
+      heap->collect_as_vm_thread(GCCause::_metadata_GC_threshold);
+      _result = _loader_data->metaspace_non_null()->allocate(_size, _mdtype);
+    }
+    if (_result == NULL && !UseConcMarkSweepGC /* CMS already tried */) {
       // If still failing, allow the Metaspace to expand.
       // See delta_capacity_until_GC() for explanation of the
       // amount of the expansion.
@@ -233,18 +233,10 @@ void VM_CollectForMetadataAllocation::doit() {
       _result =
         _loader_data->metaspace_non_null()->expand_and_allocate(_size, _mdtype);
 
-      if (do_cms_concurrent && _result == NULL) {
-        // Rather than fail with a metaspace out-of-memory, do a full
-        // GC for CMS.
-        heap->collect_as_vm_thread(GCCause::_metadata_GC_threshold);
-        _result = _loader_data->metaspace_non_null()->allocate(_size, _mdtype);
-      }
-      if (_result == NULL) {
-        if (PrintGCDetails) {
-          gclog_or_tty->print_cr("\nAfter Metaspace GC failed to allocate size "
-                                 SIZE_FORMAT, _size);
-        }
-      }
+    }
+    if (Verbose && PrintGCDetails && _result == NULL) {
+      gclog_or_tty->print_cr("\nAfter Metaspace GC failed to allocate size "
+                             SIZE_FORMAT, _size);
     }
   }
 
diff --git a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
index e748268479d..6c18761dba2 100644
--- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
+++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
@@ -1626,7 +1626,7 @@ run:
           if (rhsObject != NULL) {
             /* Check assignability of rhsObject into arrObj */
             Klass* rhsKlassOop = rhsObject->klass(); // EBX (subclass)
-            Klass* elemKlassOop = objArrayKlass::cast(arrObj->klass())->element_klass(); // superklass EAX
+            Klass* elemKlassOop = ObjArrayKlass::cast(arrObj->klass())->element_klass(); // superklass EAX
             //
             // Check for compatibilty. This check must not GC!!
             // Seems way more expensive now that we must dispatch
diff --git a/hotspot/src/share/vm/interpreter/interpreter.cpp b/hotspot/src/share/vm/interpreter/interpreter.cpp
index 9e329ebf851..dad8f9ec751 100644
--- a/hotspot/src/share/vm/interpreter/interpreter.cpp
+++ b/hotspot/src/share/vm/interpreter/interpreter.cpp
@@ -60,6 +60,8 @@ void InterpreterCodelet::verify() {
 
 
 void InterpreterCodelet::print_on(outputStream* st) const {
+  ttyLocker ttyl;
+
   if (PrintInterpreter) {
     st->cr();
     st->print_cr("----------------------------------------------------------------------");
@@ -72,7 +74,7 @@ void InterpreterCodelet::print_on(outputStream* st) const {
 
   if (PrintInterpreter) {
     st->cr();
-    Disassembler::decode(code_begin(), code_end(), st);
+    Disassembler::decode(code_begin(), code_end(), st, DEBUG_ONLY(_comments) NOT_DEBUG(CodeComments()));
   }
 }
 
diff --git a/hotspot/src/share/vm/interpreter/interpreter.hpp b/hotspot/src/share/vm/interpreter/interpreter.hpp
index 0ab0be74770..346af856a04 100644
--- a/hotspot/src/share/vm/interpreter/interpreter.hpp
+++ b/hotspot/src/share/vm/interpreter/interpreter.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -48,10 +48,12 @@ class InterpreterCodelet: public Stub {
   int         _size;                             // the size in bytes
   const char* _description;                      // a description of the codelet, for debugging & printing
   Bytecodes::Code _bytecode;                     // associated bytecode if any
+  DEBUG_ONLY(CodeComments _comments;)            // Comments for annotating assembler output.
 
  public:
   // Initialization/finalization
-  void    initialize(int size)                   { _size = size; }
+  void    initialize(int size,
+                     CodeComments& comments)     { _size = size; DEBUG_ONLY(_comments.assign(comments);) }
   void    finalize()                             { ShouldNotCallThis(); }
 
   // General info/converters
@@ -129,7 +131,7 @@ class CodeletMark: ResourceMark {
 
 
     // commit Codelet
-    AbstractInterpreter::code()->commit((*_masm)->code()->pure_insts_size());
+    AbstractInterpreter::code()->commit((*_masm)->code()->pure_insts_size(), (*_masm)->code()->comments());
     // make sure nobody can use _masm outside a CodeletMark lifespan
     *_masm = NULL;
   }
diff --git a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
index d5ba01d8e32..6aa8ea116b9 100644
--- a/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
+++ b/hotspot/src/share/vm/interpreter/interpreterRuntime.cpp
@@ -211,7 +211,7 @@ IRT_ENTRY(void, InterpreterRuntime::multianewarray(JavaThread* thread, jint* fir
     int n = Interpreter::local_offset_in_bytes(index)/jintSize;
     dims[index] = first_size_address[n];
   }
-  oop obj = arrayKlass::cast(klass)->multi_allocate(nof_dims, dims, CHECK);
+  oop obj = ArrayKlass::cast(klass)->multi_allocate(nof_dims, dims, CHECK);
   thread->set_vm_result(obj);
 IRT_END
 
@@ -737,6 +737,7 @@ IRT_ENTRY(void, InterpreterRuntime::resolve_invokehandle(JavaThread* thread)) {
       pool,
       info.resolved_method(),
       info.resolved_appendix(),
+      info.resolved_method_type(),
       pool->resolved_references());
 }
 IRT_END
@@ -765,6 +766,7 @@ IRT_ENTRY(void, InterpreterRuntime::resolve_invokedynamic(JavaThread* thread)) {
       pool,
       info.resolved_method(),
       info.resolved_appendix(),
+      info.resolved_method_type(),
       pool->resolved_references());
 }
 IRT_END
diff --git a/hotspot/src/share/vm/interpreter/linkResolver.cpp b/hotspot/src/share/vm/interpreter/linkResolver.cpp
index 50a2a21a4d8..c794f06e175 100644
--- a/hotspot/src/share/vm/interpreter/linkResolver.cpp
+++ b/hotspot/src/share/vm/interpreter/linkResolver.cpp
@@ -99,7 +99,7 @@ void CallInfo::set_virtual(KlassHandle resolved_klass, KlassHandle selected_klas
   assert(!resolved_method->is_compiled_lambda_form(), "these must be handled via an invokehandle call");
 }
 
-void CallInfo::set_handle(methodHandle resolved_method, Handle resolved_appendix, TRAPS) {
+void CallInfo::set_handle(methodHandle resolved_method, Handle resolved_appendix, Handle resolved_method_type, TRAPS) {
   if (resolved_method.is_null()) {
     THROW_MSG(vmSymbols::java_lang_InternalError(), "resolved method is null");
   }
@@ -110,7 +110,8 @@ void CallInfo::set_handle(methodHandle resolved_method, Handle resolved_appendix
   int vtable_index = Method::nonvirtual_vtable_index;
   assert(resolved_method->vtable_index() == vtable_index, "");
   set_common(resolved_klass, resolved_klass, resolved_method, resolved_method, vtable_index, CHECK);
-  _resolved_appendix = resolved_appendix;
+  _resolved_appendix    = resolved_appendix;
+  _resolved_method_type = resolved_method_type;
 }
 
 void CallInfo::set_common(KlassHandle resolved_klass, KlassHandle selected_klass, methodHandle resolved_method, methodHandle selected_method, int vtable_index, TRAPS) {
@@ -221,7 +222,8 @@ void LinkResolver::lookup_method_in_interfaces(methodHandle& result, KlassHandle
 void LinkResolver::lookup_polymorphic_method(methodHandle& result,
                                              KlassHandle klass, Symbol* name, Symbol* full_signature,
                                              KlassHandle current_klass,
-                                             Handle* appendix_result_or_null,
+                                             Handle *appendix_result_or_null,
+                                             Handle *method_type_result,
                                              TRAPS) {
   vmIntrinsics::ID iid = MethodHandles::signature_polymorphic_name_id(name);
   if (TraceMethodHandles) {
@@ -275,10 +277,12 @@ void LinkResolver::lookup_polymorphic_method(methodHandle& result,
       }
 
       Handle appendix;
+      Handle method_type;
       result = SystemDictionary::find_method_handle_invoker(name,
                                                             full_signature,
                                                             current_klass,
                                                             &appendix,
+                                                            &method_type,
                                                             CHECK);
       if (TraceMethodHandles) {
         tty->print("lookup_polymorphic_method => (via Java) ");
@@ -307,6 +311,7 @@ void LinkResolver::lookup_polymorphic_method(methodHandle& result,
 
         assert(appendix_result_or_null != NULL, "");
         (*appendix_result_or_null) = appendix;
+        (*method_type_result)      = method_type;
         return;
       }
     }
@@ -419,7 +424,7 @@ void LinkResolver::resolve_method(methodHandle& resolved_method, KlassHandle res
     if (resolved_method.is_null()) {
       // JSR 292:  see if this is an implicitly generated method MethodHandle.linkToVirtual(*...), etc
       lookup_polymorphic_method(resolved_method, resolved_klass, method_name, method_signature,
-                                current_klass, (Handle*)NULL, THREAD);
+                                current_klass, (Handle*)NULL, (Handle*)NULL, THREAD);
       if (HAS_PENDING_EXCEPTION) {
         nested_exception = Handle(THREAD, PENDING_EXCEPTION);
         CLEAR_PENDING_EXCEPTION;
@@ -1207,11 +1212,12 @@ void LinkResolver::resolve_handle_call(CallInfo& result, KlassHandle resolved_kl
   assert(resolved_klass() == SystemDictionary::MethodHandle_klass(), "");
   assert(MethodHandles::is_signature_polymorphic_name(method_name), "");
   methodHandle resolved_method;
-  Handle resolved_appendix;
+  Handle       resolved_appendix;
+  Handle       resolved_method_type;
   lookup_polymorphic_method(resolved_method, resolved_klass,
                             method_name, method_signature,
-                            current_klass, &resolved_appendix, CHECK);
-  result.set_handle(resolved_method, resolved_appendix, CHECK);
+                            current_klass, &resolved_appendix, &resolved_method_type, CHECK);
+  result.set_handle(resolved_method, resolved_appendix, resolved_method_type, CHECK);
 }
 
 
@@ -1219,7 +1225,7 @@ void LinkResolver::resolve_invokedynamic(CallInfo& result, constantPoolHandle po
   assert(EnableInvokeDynamic, "");
   pool->set_invokedynamic();    // mark header to flag active call sites
 
-  //resolve_pool(<resolved_klass>, method_name,  method_signature, current_klass, pool, index, CHECK);
+  //resolve_pool(<resolved_klass>, method_name, method_signature, current_klass, pool, index, CHECK);
   Symbol* method_name       = pool->name_ref_at(index);
   Symbol* method_signature  = pool->signature_ref_at(index);
   KlassHandle current_klass = KlassHandle(THREAD, pool->pool_holder());
@@ -1236,9 +1242,10 @@ void LinkResolver::resolve_invokedynamic(CallInfo& result, constantPoolHandle po
     bootstrap_specifier = Handle(THREAD, bsm_info);
   }
   if (!cpce->is_f1_null()) {
-    methodHandle method(THREAD, cpce->f1_as_method());
-    Handle appendix(THREAD, cpce->appendix_if_resolved(pool));
-    result.set_handle(method, appendix, CHECK);
+    methodHandle method(     THREAD, cpce->f1_as_method());
+    Handle       appendix(   THREAD, cpce->appendix_if_resolved(pool));
+    Handle       method_type(THREAD, cpce->method_type_if_resolved(pool));
+    result.set_handle(method, appendix, method_type, CHECK);
     return;
   }
 
@@ -1260,11 +1267,13 @@ void LinkResolver::resolve_dynamic_call(CallInfo& result,
   // JSR 292:  this must resolve to an implicitly generated method MH.linkToCallSite(*...)
   // The appendix argument is likely to be a freshly-created CallSite.
   Handle       resolved_appendix;
+  Handle       resolved_method_type;
   methodHandle resolved_method =
     SystemDictionary::find_dynamic_call_site_invoker(current_klass,
                                                      bootstrap_specifier,
                                                      method_name, method_signature,
                                                      &resolved_appendix,
+                                                     &resolved_method_type,
                                                      THREAD);
   if (HAS_PENDING_EXCEPTION) {
     if (TraceMethodHandles) {
@@ -1284,7 +1293,7 @@ void LinkResolver::resolve_dynamic_call(CallInfo& result,
     CLEAR_PENDING_EXCEPTION;
     THROW_CAUSE(vmSymbols::java_lang_BootstrapMethodError(), nested_exception)
   }
-  result.set_handle(resolved_method, resolved_appendix, CHECK);
+  result.set_handle(resolved_method, resolved_appendix, resolved_method_type, CHECK);
 }
 
 //------------------------------------------------------------------------------------------------------------------------
diff --git a/hotspot/src/share/vm/interpreter/linkResolver.hpp b/hotspot/src/share/vm/interpreter/linkResolver.hpp
index 511a92e3eda..4054eeb35ef 100644
--- a/hotspot/src/share/vm/interpreter/linkResolver.hpp
+++ b/hotspot/src/share/vm/interpreter/linkResolver.hpp
@@ -76,12 +76,13 @@ class CallInfo: public LinkInfo {
   methodHandle _selected_method;        // dynamic (actual) target method
   int          _vtable_index;           // vtable index of selected method
   Handle       _resolved_appendix;      // extra argument in constant pool (if CPCE::has_appendix)
+  Handle       _resolved_method_type;   // MethodType (for invokedynamic and invokehandle call sites)
 
-  void         set_static(   KlassHandle resolved_klass,                             methodHandle resolved_method                                                , TRAPS);
-  void         set_interface(KlassHandle resolved_klass, KlassHandle selected_klass, methodHandle resolved_method, methodHandle selected_method                  , TRAPS);
-  void         set_virtual(  KlassHandle resolved_klass, KlassHandle selected_klass, methodHandle resolved_method, methodHandle selected_method, int vtable_index, TRAPS);
-  void         set_handle(                                                           methodHandle resolved_method,   Handle resolved_appendix,                     TRAPS);
-  void         set_common(   KlassHandle resolved_klass, KlassHandle selected_klass, methodHandle resolved_method, methodHandle selected_method, int vtable_index, TRAPS);
+  void         set_static(   KlassHandle resolved_klass,                             methodHandle resolved_method                                                       , TRAPS);
+  void         set_interface(KlassHandle resolved_klass, KlassHandle selected_klass, methodHandle resolved_method, methodHandle selected_method                         , TRAPS);
+  void         set_virtual(  KlassHandle resolved_klass, KlassHandle selected_klass, methodHandle resolved_method, methodHandle selected_method, int vtable_index       , TRAPS);
+  void         set_handle(                                                           methodHandle resolved_method, Handle resolved_appendix, Handle resolved_method_type, TRAPS);
+  void         set_common(   KlassHandle resolved_klass, KlassHandle selected_klass, methodHandle resolved_method, methodHandle selected_method, int vtable_index       , TRAPS);
 
   friend class LinkResolver;
 
@@ -91,6 +92,7 @@ class CallInfo: public LinkInfo {
   methodHandle resolved_method() const           { return _resolved_method; }
   methodHandle selected_method() const           { return _selected_method; }
   Handle       resolved_appendix() const         { return _resolved_appendix; }
+  Handle       resolved_method_type() const      { return _resolved_method_type; }
 
   BasicType    result_type() const               { return selected_method()->result_type(); }
   bool         has_vtable_index() const          { return _vtable_index >= 0; }
@@ -113,7 +115,7 @@ class LinkResolver: AllStatic {
   static void lookup_instance_method_in_klasses (methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS);
   static void lookup_method_in_interfaces       (methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS);
   static void lookup_polymorphic_method         (methodHandle& result, KlassHandle klass, Symbol* name, Symbol* signature,
-                                                 KlassHandle current_klass, Handle* appendix_result_or_null, TRAPS);
+                                                 KlassHandle current_klass, Handle *appendix_result_or_null, Handle *method_type_result, TRAPS);
 
   static int vtable_index_of_miranda_method(KlassHandle klass, Symbol* name, Symbol* signature, TRAPS);
 
diff --git a/hotspot/src/share/vm/interpreter/rewriter.cpp b/hotspot/src/share/vm/interpreter/rewriter.cpp
index d6eebdeae10..b699d4494a4 100644
--- a/hotspot/src/share/vm/interpreter/rewriter.cpp
+++ b/hotspot/src/share/vm/interpreter/rewriter.cpp
@@ -179,7 +179,7 @@ void Rewriter::maybe_rewrite_invokehandle(address opc, int cp_index, int cache_i
             MethodHandles::is_signature_polymorphic_name(SystemDictionary::MethodHandle_klass(),
                                                          _pool->name_ref_at(cp_index))) {
           // we may need a resolved_refs entry for the appendix
-          add_invokedynamic_resolved_references_entry(cp_index, cache_index);
+          add_invokedynamic_resolved_references_entries(cp_index, cache_index);
           status = +1;
         } else {
           status = -1;
@@ -211,7 +211,7 @@ void Rewriter::rewrite_invokedynamic(address bcp, int offset, bool reverse) {
   if (!reverse) {
     int cp_index = Bytes::get_Java_u2(p);
     int cache_index = add_invokedynamic_cp_cache_entry(cp_index);
-    add_invokedynamic_resolved_references_entry(cp_index, cache_index);
+    add_invokedynamic_resolved_references_entries(cp_index, cache_index);
     // Replace the trailing four bytes with a CPC index for the dynamic
     // call site.  Unlike other CPC entries, there is one per bytecode,
     // not just one per distinct CP entry.  In other words, the
diff --git a/hotspot/src/share/vm/interpreter/rewriter.hpp b/hotspot/src/share/vm/interpreter/rewriter.hpp
index 9a786ba2266..78d09a92e23 100644
--- a/hotspot/src/share/vm/interpreter/rewriter.hpp
+++ b/hotspot/src/share/vm/interpreter/rewriter.hpp
@@ -113,12 +113,19 @@ class Rewriter: public StackObj {
     return ref_index;
   }
 
-  // add a new entry to the resolved_references map (for invokedynamic only)
-  int add_invokedynamic_resolved_references_entry(int cp_index, int cache_index) {
+  // add a new entries to the resolved_references map (for invokedynamic and invokehandle only)
+  int add_invokedynamic_resolved_references_entries(int cp_index, int cache_index) {
     assert(_resolved_reference_limit >= 0, "must add indy refs after first iteration");
-    int ref_index = _resolved_references_map.append(cp_index);  // many-to-one
-    assert(ref_index >= _resolved_reference_limit, "");
-    _invokedynamic_references_map.at_put_grow(ref_index, cache_index, -1);
+    int ref_index = -1;
+    for (int entry = 0; entry < ConstantPoolCacheEntry::_indy_resolved_references_entries; entry++) {
+      const int index = _resolved_references_map.append(cp_index);  // many-to-one
+      assert(index >= _resolved_reference_limit, "");
+      if (entry == 0) {
+        ref_index = index;
+      }
+      assert((index - entry) == ref_index, "entries must be consecutive");
+      _invokedynamic_references_map.at_put_grow(index, cache_index, -1);
+    }
     return ref_index;
   }
 
@@ -127,15 +134,6 @@ class Rewriter: public StackObj {
     return cp_index;
   }
 
-  // invokedynamic support - append the cpCache entry (encoded) in object map.
-  // The resolved_references_map should still be in ascending order
-  // The resolved_references has the invokedynamic call site objects appended after
-  // the objects that are resolved in the constant pool.
-  int add_callsite_entry(int main_cpc_entry) {
-    int ref_index = _resolved_references_map.append(main_cpc_entry);
-    return ref_index;
-  }
-
   // Access the contents of _cp_cache_map to determine CP cache layout.
   int cp_cache_entry_pool_index(int cache_index) {
     int cp_index = _cp_cache_map[cache_index];
diff --git a/hotspot/src/share/vm/libadt/set.cpp b/hotspot/src/share/vm/libadt/set.cpp
index c475a21f700..7364795ed70 100644
--- a/hotspot/src/share/vm/libadt/set.cpp
+++ b/hotspot/src/share/vm/libadt/set.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/libadt/vectset.cpp b/hotspot/src/share/vm/libadt/vectset.cpp
index de7bcd81e80..ab80afef681 100644
--- a/hotspot/src/share/vm/libadt/vectset.cpp
+++ b/hotspot/src/share/vm/libadt/vectset.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/memory/allocation.hpp b/hotspot/src/share/vm/memory/allocation.hpp
index aefeadbbf86..6bae79f8133 100644
--- a/hotspot/src/share/vm/memory/allocation.hpp
+++ b/hotspot/src/share/vm/memory/allocation.hpp
@@ -27,6 +27,7 @@
 
 #include "runtime/globals.hpp"
 #include "utilities/globalDefinitions.hpp"
+#include "utilities/macros.hpp"
 #ifdef COMPILER1
 #include "c1/c1_globals.hpp"
 #endif
@@ -157,8 +158,16 @@ enum MemoryType {
 
 typedef unsigned short MEMFLAGS;
 
+#if INCLUDE_NMT
+
 extern bool NMT_track_callsite;
 
+#else
+
+const bool NMT_track_callsite = false;
+
+#endif // INCLUDE_NMT
+
 // debug build does not inline
 #if defined(_DEBUG_)
   #define CURRENT_PC       (NMT_track_callsite ? os::get_caller_pc(1) : 0)
diff --git a/hotspot/src/share/vm/memory/allocation.inline.hpp b/hotspot/src/share/vm/memory/allocation.inline.hpp
index 21e8a3bc94e..804faa2a17a 100644
--- a/hotspot/src/share/vm/memory/allocation.inline.hpp
+++ b/hotspot/src/share/vm/memory/allocation.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/memory/cardTableModRefBS.cpp b/hotspot/src/share/vm/memory/cardTableModRefBS.cpp
index 496b2cbbf7d..bd0c79ed439 100644
--- a/hotspot/src/share/vm/memory/cardTableModRefBS.cpp
+++ b/hotspot/src/share/vm/memory/cardTableModRefBS.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/memory/defNewGeneration.hpp b/hotspot/src/share/vm/memory/defNewGeneration.hpp
index 832782b149c..b7c794d86c2 100644
--- a/hotspot/src/share/vm/memory/defNewGeneration.hpp
+++ b/hotspot/src/share/vm/memory/defNewGeneration.hpp
@@ -43,7 +43,7 @@ class DefNewGeneration: public Generation {
 
 protected:
   Generation* _next_gen;
-  int         _tenuring_threshold;   // Tenuring threshold for next collection.
+  uint        _tenuring_threshold;   // Tenuring threshold for next collection.
   ageTable    _age_table;
   // Size of object to pretenure in words; command line provides bytes
   size_t        _pretenure_size_threshold_words;
@@ -325,7 +325,7 @@ protected:
                                 bool parallel = false);
 
   oop copy_to_survivor_space(oop old);
-  int tenuring_threshold() { return _tenuring_threshold; }
+  uint tenuring_threshold() { return _tenuring_threshold; }
 
   // Performance Counter support
   void update_counters();
diff --git a/hotspot/src/share/vm/memory/freeBlockDictionary.cpp b/hotspot/src/share/vm/memory/freeBlockDictionary.cpp
index 3c6c8116784..13b4daa89ad 100644
--- a/hotspot/src/share/vm/memory/freeBlockDictionary.cpp
+++ b/hotspot/src/share/vm/memory/freeBlockDictionary.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/memory/freeList.cpp b/hotspot/src/share/vm/memory/freeList.cpp
index 1c6018082de..a5fbc06ee0a 100644
--- a/hotspot/src/share/vm/memory/freeList.cpp
+++ b/hotspot/src/share/vm/memory/freeList.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/memory/freeList.hpp b/hotspot/src/share/vm/memory/freeList.hpp
index d306578c9cb..a982cfbda97 100644
--- a/hotspot/src/share/vm/memory/freeList.hpp
+++ b/hotspot/src/share/vm/memory/freeList.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/memory/genMarkSweep.cpp b/hotspot/src/share/vm/memory/genMarkSweep.cpp
index 5ab72e4e97d..91fe3957c6a 100644
--- a/hotspot/src/share/vm/memory/genMarkSweep.cpp
+++ b/hotspot/src/share/vm/memory/genMarkSweep.cpp
@@ -291,7 +291,7 @@ void GenMarkSweep::mark_sweep_phase1(int level,
   bool purged_class = SystemDictionary::do_unloading(&is_alive);
 
   // Follow code cache roots
-  CodeCache::do_unloading(&is_alive, &keep_alive, purged_class);
+  CodeCache::do_unloading(&is_alive, purged_class);
   follow_stack(); // Flush marking stack
 
   // Update subklass/sibling/implementor links of live klasses
diff --git a/hotspot/src/share/vm/memory/heap.cpp b/hotspot/src/share/vm/memory/heap.cpp
index 95c99082cad..fda24f18469 100644
--- a/hotspot/src/share/vm/memory/heap.cpp
+++ b/hotspot/src/share/vm/memory/heap.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/memory/heap.hpp b/hotspot/src/share/vm/memory/heap.hpp
index 74f68ae054a..f1aa3ffdc33 100644
--- a/hotspot/src/share/vm/memory/heap.hpp
+++ b/hotspot/src/share/vm/memory/heap.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/memory/heapInspection.hpp b/hotspot/src/share/vm/memory/heapInspection.hpp
index 68590cafd4e..72e675850d4 100644
--- a/hotspot/src/share/vm/memory/heapInspection.hpp
+++ b/hotspot/src/share/vm/memory/heapInspection.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,7 @@
 #include "memory/allocation.inline.hpp"
 #include "oops/oop.inline.hpp"
 
-#ifndef SERVICES_KERNEL
+#if INCLUDE_SERVICES
 
 
 // HeapInspection
@@ -129,12 +129,12 @@ class KlassInfoHisto : public StackObj {
   void sort();
 };
 
-#endif // SERVICES_KERNEL
+#endif // INCLUDE_SERVICES
 
 class HeapInspection : public AllStatic {
  public:
-  static void heap_inspection(outputStream* st, bool need_prologue) KERNEL_RETURN;
-  static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) KERNEL_RETURN;
+  static void heap_inspection(outputStream* st, bool need_prologue) NOT_SERVICES_RETURN;
+  static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
 };
 
 #endif // SHARE_VM_MEMORY_HEAPINSPECTION_HPP
diff --git a/hotspot/src/share/vm/memory/metaspace.cpp b/hotspot/src/share/vm/memory/metaspace.cpp
index 23aabded25b..0396eef2def 100644
--- a/hotspot/src/share/vm/memory/metaspace.cpp
+++ b/hotspot/src/share/vm/memory/metaspace.cpp
@@ -2518,7 +2518,7 @@ void SpaceManager::dump(outputStream* const out) const {
                 " waste " SIZE_FORMAT, curr_total, used, free, capacity, waste);
 }
 
-#ifndef PRODUCT
+#ifdef ASSERT
 void SpaceManager::mangle_freed_chunks() {
   for (ChunkIndex index = SmallIndex;
        index < NumberOfFreeLists;
@@ -2536,7 +2536,7 @@ void SpaceManager::mangle_freed_chunks() {
     }
   }
 }
-#endif // PRODUCT
+#endif // ASSERT
 
 
 // MetaspaceAux
diff --git a/hotspot/src/share/vm/memory/metaspace.hpp b/hotspot/src/share/vm/memory/metaspace.hpp
index 077995a09c2..169a3b71d29 100644
--- a/hotspot/src/share/vm/memory/metaspace.hpp
+++ b/hotspot/src/share/vm/memory/metaspace.hpp
@@ -135,6 +135,8 @@ class Metaspace : public CHeapObj<mtClass> {
   MetaWord* expand_and_allocate(size_t size,
                                 MetadataType mdtype);
 
+  static bool is_initialized() { return _class_space_list != NULL; }
+
 #ifndef PRODUCT
   bool contains(const void *ptr) const;
   bool contains_class(const void *ptr) const;
diff --git a/hotspot/src/share/vm/memory/metaspaceShared.cpp b/hotspot/src/share/vm/memory/metaspaceShared.cpp
index e5553ffc601..f69e7586e08 100644
--- a/hotspot/src/share/vm/memory/metaspaceShared.cpp
+++ b/hotspot/src/share/vm/memory/metaspaceShared.cpp
@@ -42,14 +42,8 @@
 
 
 int MetaspaceShared::_max_alignment = 0;
-int MetaspaceShared::max_alignment()                   { return _max_alignment; }
-void MetaspaceShared::set_max_alignment(int alignment) { _max_alignment = alignment; }
 
-// Accessor functions to save shared space created for metadata, which has
-// extra space allocated at the end for miscellaneous data and code.
 ReservedSpace* MetaspaceShared::_shared_rs = NULL;
-ReservedSpace* MetaspaceShared::shared_rs()            { return _shared_rs; }
-void MetaspaceShared::set_shared_rs(ReservedSpace* rs) { _shared_rs = rs; }
 
 // Read/write a data stream for restoring/preserving metadata pointers and
 // miscellaneous data from/to the shared archive file.
diff --git a/hotspot/src/share/vm/memory/metaspaceShared.hpp b/hotspot/src/share/vm/memory/metaspaceShared.hpp
index fcbed66ac27..12c8af510f0 100644
--- a/hotspot/src/share/vm/memory/metaspaceShared.hpp
+++ b/hotspot/src/share/vm/memory/metaspaceShared.hpp
@@ -56,18 +56,33 @@ class MetaspaceShared : AllStatic {
     n_regions = 4
   };
 
-  static void set_max_alignment(int alignment) KERNEL_RETURN;
-  static int max_alignment()                   KERNEL_RETURN_(0);
+  // Accessor functions to save shared space created for metadata, which has
+  // extra space allocated at the end for miscellaneous data and code.
+  static void set_max_alignment(int alignment) {
+    CDS_ONLY(_max_alignment = alignment);
+  }
 
-  static void preload_and_dump(TRAPS) KERNEL_RETURN;
-  static ReservedSpace* shared_rs();
-  static void set_shared_rs(ReservedSpace* rs) KERNEL_RETURN;
+  static int max_alignment() {
+    CDS_ONLY(return _max_alignment);
+    NOT_CDS(return 0);
+  }
 
-  static bool map_shared_spaces(FileMapInfo* mapinfo) KERNEL_RETURN_(false);
-  static void initialize_shared_spaces() KERNEL_RETURN;
+  static void preload_and_dump(TRAPS) NOT_CDS_RETURN;
+
+  static ReservedSpace* shared_rs() {
+    CDS_ONLY(return _shared_rs);
+    NOT_CDS(return NULL);
+  }
+
+  static void set_shared_rs(ReservedSpace* rs) {
+    CDS_ONLY(_shared_rs = rs;)
+  }
+
+  static bool map_shared_spaces(FileMapInfo* mapinfo) NOT_CDS_RETURN_(false);
+  static void initialize_shared_spaces() NOT_CDS_RETURN;
 
   // Return true if given address is in the mapped shared space.
-  static bool is_in_shared_space(const void* p) KERNEL_RETURN_(false);
+  static bool is_in_shared_space(const void* p) NOT_CDS_RETURN_(false);
 
   static void generate_vtable_methods(void** vtbl_list,
                                       void** vtable,
@@ -79,7 +94,7 @@ class MetaspaceShared : AllStatic {
   // Remap the shared readonly space to shared readwrite, private if
   // sharing is enabled. Simply returns true if sharing is not enabled
   // or if the remapping has already been done by a prior call.
-  static bool remap_shared_readonly_as_readwrite() KERNEL_RETURN_(true);
+  static bool remap_shared_readonly_as_readwrite() NOT_CDS_RETURN_(true);
 
   static void print_shared_spaces();
 };
diff --git a/hotspot/src/share/vm/memory/oopFactory.cpp b/hotspot/src/share/vm/memory/oopFactory.cpp
index 996022e4c33..8318e3bf0d4 100644
--- a/hotspot/src/share/vm/memory/oopFactory.cpp
+++ b/hotspot/src/share/vm/memory/oopFactory.cpp
@@ -47,12 +47,12 @@ typeArrayOop oopFactory::new_charArray(const char* utf8_str, TRAPS) {
 }
 
 typeArrayOop oopFactory::new_tenured_charArray(int length, TRAPS) {
-  return typeArrayKlass::cast(Universe::charArrayKlassObj())->allocate(length, THREAD);
+  return TypeArrayKlass::cast(Universe::charArrayKlassObj())->allocate(length, THREAD);
 }
 
 typeArrayOop oopFactory::new_typeArray(BasicType type, int length, TRAPS) {
   Klass* type_asKlassOop = Universe::typeArrayKlassObj(type);
-  typeArrayKlass* type_asArrayKlass = typeArrayKlass::cast(type_asKlassOop);
+  TypeArrayKlass* type_asArrayKlass = TypeArrayKlass::cast(type_asKlassOop);
   typeArrayOop result = type_asArrayKlass->allocate(length, THREAD);
   return result;
 }
@@ -66,14 +66,14 @@ typeArrayOop oopFactory::new_typeArray(BasicType type, int length, TRAPS) {
 typeArrayOop oopFactory::new_metaDataArray(int length, TRAPS) {
   BasicType type = LP64_ONLY(T_LONG) NOT_LP64(T_INT);
   Klass* type_asKlassOop = Universe::typeArrayKlassObj(type);
-  typeArrayKlass* type_asArrayKlass = typeArrayKlass::cast(type_asKlassOop);
+  TypeArrayKlass* type_asArrayKlass = TypeArrayKlass::cast(type_asKlassOop);
   typeArrayOop result = type_asArrayKlass->allocate_common(length, true, THREAD);
   return result;
 }
 
 typeArrayOop oopFactory::new_typeArray_nozero(BasicType type, int length, TRAPS) {
   Klass* type_asKlassOop = Universe::typeArrayKlassObj(type);
-  typeArrayKlass* type_asArrayKlass = typeArrayKlass::cast(type_asKlassOop);
+  TypeArrayKlass* type_asArrayKlass = TypeArrayKlass::cast(type_asKlassOop);
   typeArrayOop result = type_asArrayKlass->allocate_common(length, false, THREAD);
   return result;
 }
@@ -82,7 +82,7 @@ typeArrayOop oopFactory::new_typeArray_nozero(BasicType type, int length, TRAPS)
 objArrayOop oopFactory::new_objArray(Klass* klass, int length, TRAPS) {
   assert(klass->is_klass(), "must be instance class");
   if (klass->oop_is_array()) {
-    return ((arrayKlass*)klass)->allocate_arrayArray(1, length, THREAD);
+    return ((ArrayKlass*)klass)->allocate_arrayArray(1, length, THREAD);
   } else {
     assert (klass->oop_is_instance(), "new object array with klass not an InstanceKlass");
     return ((InstanceKlass*)klass)->allocate_objArray(1, length, THREAD);
diff --git a/hotspot/src/share/vm/memory/oopFactory.hpp b/hotspot/src/share/vm/memory/oopFactory.hpp
index 60c0e24c073..bd034669043 100644
--- a/hotspot/src/share/vm/memory/oopFactory.hpp
+++ b/hotspot/src/share/vm/memory/oopFactory.hpp
@@ -40,19 +40,19 @@ class vframeArray;
 class oopFactory: AllStatic {
  public:
   // Basic type leaf array allocation
-  static typeArrayOop    new_boolArray  (int length, TRAPS) { return typeArrayKlass::cast(Universe::boolArrayKlassObj  ())->allocate(length, CHECK_NULL); }
-  static typeArrayOop    new_charArray  (int length, TRAPS) { return typeArrayKlass::cast(Universe::charArrayKlassObj  ())->allocate(length, CHECK_NULL); }
-  static typeArrayOop    new_singleArray(int length, TRAPS) { return typeArrayKlass::cast(Universe::singleArrayKlassObj())->allocate(length, CHECK_NULL); }
-  static typeArrayOop    new_doubleArray(int length, TRAPS) { return typeArrayKlass::cast(Universe::doubleArrayKlassObj())->allocate(length, CHECK_NULL); }
-  static typeArrayOop    new_byteArray  (int length, TRAPS) { return typeArrayKlass::cast(Universe::byteArrayKlassObj  ())->allocate(length, CHECK_NULL); }
-  static typeArrayOop    new_shortArray (int length, TRAPS) { return typeArrayKlass::cast(Universe::shortArrayKlassObj ())->allocate(length, CHECK_NULL); }
-  static typeArrayOop    new_intArray   (int length, TRAPS) { return typeArrayKlass::cast(Universe::intArrayKlassObj   ())->allocate(length, CHECK_NULL); }
-  static typeArrayOop    new_longArray  (int length, TRAPS) { return typeArrayKlass::cast(Universe::longArrayKlassObj  ())->allocate(length, CHECK_NULL); }
+  static typeArrayOop    new_boolArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::boolArrayKlassObj  ())->allocate(length, CHECK_NULL); }
+  static typeArrayOop    new_charArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::charArrayKlassObj  ())->allocate(length, CHECK_NULL); }
+  static typeArrayOop    new_singleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::singleArrayKlassObj())->allocate(length, CHECK_NULL); }
+  static typeArrayOop    new_doubleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::doubleArrayKlassObj())->allocate(length, CHECK_NULL); }
+  static typeArrayOop    new_byteArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::byteArrayKlassObj  ())->allocate(length, CHECK_NULL); }
+  static typeArrayOop    new_shortArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::shortArrayKlassObj ())->allocate(length, CHECK_NULL); }
+  static typeArrayOop    new_intArray   (int length, TRAPS) { return TypeArrayKlass::cast(Universe::intArrayKlassObj   ())->allocate(length, CHECK_NULL); }
+  static typeArrayOop    new_longArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::longArrayKlassObj  ())->allocate(length, CHECK_NULL); }
 
   // create java.lang.Object[]
   static objArrayOop     new_objectArray(int length, TRAPS)  {
     assert(Universe::objectArrayKlassObj() != NULL, "Too early?");
-    return objArrayKlass::
+    return ObjArrayKlass::
       cast(Universe::objectArrayKlassObj())->allocate(length, CHECK_NULL);
   }
 
diff --git a/hotspot/src/share/vm/memory/referencePolicy.hpp b/hotspot/src/share/vm/memory/referencePolicy.hpp
index 99015d01aff..971b9d0a620 100644
--- a/hotspot/src/share/vm/memory/referencePolicy.hpp
+++ b/hotspot/src/share/vm/memory/referencePolicy.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/memory/space.inline.hpp b/hotspot/src/share/vm/memory/space.inline.hpp
index 07e6127230c..1d600e2a1aa 100644
--- a/hotspot/src/share/vm/memory/space.inline.hpp
+++ b/hotspot/src/share/vm/memory/space.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/memory/specialized_oop_closures.hpp b/hotspot/src/share/vm/memory/specialized_oop_closures.hpp
index 8c0b8fe4559..a13660d406a 100644
--- a/hotspot/src/share/vm/memory/specialized_oop_closures.hpp
+++ b/hotspot/src/share/vm/memory/specialized_oop_closures.hpp
@@ -200,7 +200,7 @@ public:
   enum Kind {
     ik,             // InstanceKlass
     irk,            // InstanceRefKlass
-    oa,             // objArrayKlass
+    oa,             // ObjArrayKlass
     NUM_Kinds
   };
 
diff --git a/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp b/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp
index c85a59de14e..f8acf536ee3 100644
--- a/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp
+++ b/hotspot/src/share/vm/memory/threadLocalAllocBuffer.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,7 @@ class GlobalTLABStats;
 // the threads for allocation.
 //            It is thread-private at any time, but maybe multiplexed over
 //            time across multiple threads. The park()/unpark() pair is
-//            used to make it avaiable for such multiplexing.
+//            used to make it available for such multiplexing.
 class ThreadLocalAllocBuffer: public CHeapObj<mtThread> {
   friend class VMStructs;
 private:
diff --git a/hotspot/src/share/vm/memory/universe.cpp b/hotspot/src/share/vm/memory/universe.cpp
index b2398259fd5..a4af5a8c98f 100644
--- a/hotspot/src/share/vm/memory/universe.cpp
+++ b/hotspot/src/share/vm/memory/universe.cpp
@@ -151,7 +151,9 @@ size_t          Universe::_heap_used_at_last_gc = 0;
 
 CollectedHeap*  Universe::_collectedHeap = NULL;
 
-NarrowOopStruct Universe::_narrow_oop = { NULL, 0, true };
+NarrowPtrStruct Universe::_narrow_oop = { NULL, 0, true };
+NarrowPtrStruct Universe::_narrow_klass = { NULL, 0, true };
+address Universe::_narrow_ptrs_base;
 
 
 void Universe::basic_type_classes_do(void f(Klass*)) {
@@ -265,14 +267,14 @@ void Universe::genesis(TRAPS) {
       compute_base_vtable_size();
 
       if (!UseSharedSpaces) {
-        _boolArrayKlassObj      = typeArrayKlass::create_klass(T_BOOLEAN, sizeof(jboolean), CHECK);
-        _charArrayKlassObj      = typeArrayKlass::create_klass(T_CHAR,    sizeof(jchar),    CHECK);
-        _singleArrayKlassObj    = typeArrayKlass::create_klass(T_FLOAT,   sizeof(jfloat),   CHECK);
-        _doubleArrayKlassObj    = typeArrayKlass::create_klass(T_DOUBLE,  sizeof(jdouble),  CHECK);
-        _byteArrayKlassObj      = typeArrayKlass::create_klass(T_BYTE,    sizeof(jbyte),    CHECK);
-        _shortArrayKlassObj     = typeArrayKlass::create_klass(T_SHORT,   sizeof(jshort),   CHECK);
-        _intArrayKlassObj       = typeArrayKlass::create_klass(T_INT,     sizeof(jint),     CHECK);
-        _longArrayKlassObj      = typeArrayKlass::create_klass(T_LONG,    sizeof(jlong),    CHECK);
+        _boolArrayKlassObj      = TypeArrayKlass::create_klass(T_BOOLEAN, sizeof(jboolean), CHECK);
+        _charArrayKlassObj      = TypeArrayKlass::create_klass(T_CHAR,    sizeof(jchar),    CHECK);
+        _singleArrayKlassObj    = TypeArrayKlass::create_klass(T_FLOAT,   sizeof(jfloat),   CHECK);
+        _doubleArrayKlassObj    = TypeArrayKlass::create_klass(T_DOUBLE,  sizeof(jdouble),  CHECK);
+        _byteArrayKlassObj      = TypeArrayKlass::create_klass(T_BYTE,    sizeof(jbyte),    CHECK);
+        _shortArrayKlassObj     = TypeArrayKlass::create_klass(T_SHORT,   sizeof(jshort),   CHECK);
+        _intArrayKlassObj       = TypeArrayKlass::create_klass(T_INT,     sizeof(jint),     CHECK);
+        _longArrayKlassObj      = TypeArrayKlass::create_klass(T_LONG,    sizeof(jlong),    CHECK);
 
         _typeArrayKlassObjs[T_BOOLEAN] = _boolArrayKlassObj;
         _typeArrayKlassObjs[T_CHAR]    = _charArrayKlassObj;
@@ -440,8 +442,8 @@ void Universe::init_self_patching_vtbl_list(void** list, int count) {
   { InstanceClassLoaderKlass o; add_vtable(list, &n, &o, count); }
   { InstanceMirrorKlass o;    add_vtable(list, &n, &o, count); }
   { InstanceRefKlass o;       add_vtable(list, &n, &o, count); }
-  { typeArrayKlass o;         add_vtable(list, &n, &o, count); }
-  { objArrayKlass o;          add_vtable(list, &n, &o, count); }
+  { TypeArrayKlass o;         add_vtable(list, &n, &o, count); }
+  { ObjArrayKlass o;          add_vtable(list, &n, &o, count); }
   { Method o;                 add_vtable(list, &n, &o, count); }
   { ConstantPool o;           add_vtable(list, &n, &o, count); }
 }
@@ -752,7 +754,7 @@ jint Universe::initialize_heap() {
 #ifndef SERIALGC
     Universe::_collectedHeap = new ParallelScavengeHeap();
 #else  // SERIALGC
-    fatal("UseParallelGC not supported in java kernel vm.");
+    fatal("UseParallelGC not supported in this VM.");
 #endif // SERIALGC
 
   } else if (UseG1GC) {
@@ -777,7 +779,7 @@ jint Universe::initialize_heap() {
         gc_policy = new ConcurrentMarkSweepPolicy();
       }
 #else   // SERIALGC
-    fatal("UseConcMarkSweepGC not supported in java kernel vm.");
+    fatal("UseConcMarkSweepGC not supported in this VM.");
 #endif // SERIALGC
     } else { // default old generation
       gc_policy = new MarkSweepPolicy();
@@ -807,7 +809,7 @@ jint Universe::initialize_heap() {
     }
     if ((uint64_t)Universe::heap()->reserved_region().end() > OopEncodingHeapMax) {
       // Can't reserve heap below 32Gb.
-      Universe::set_narrow_oop_base(Universe::heap()->base() - os::vm_page_size());
+      // keep the Universe::narrow_oop_base() set in Universe::reserve_heap()
       Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes);
       if (verbose) {
         tty->print(", Compressed Oops with base: "PTR_FORMAT, Universe::narrow_oop_base());
@@ -838,8 +840,16 @@ jint Universe::initialize_heap() {
       tty->cr();
       tty->cr();
     }
+    if (UseCompressedKlassPointers) {
+      Universe::set_narrow_klass_base(Universe::narrow_oop_base());
+      Universe::set_narrow_klass_shift(MIN2(Universe::narrow_oop_shift(), LogKlassAlignmentInBytes));
+    }
+    Universe::set_narrow_ptrs_base(Universe::narrow_oop_base());
   }
-  assert(Universe::narrow_oop_base() == (Universe::heap()->base() - os::vm_page_size()) ||
+  // Universe::narrow_oop_base() is one page below the metaspace
+  // base. The actual metaspace base depends on alignment constraints
+  // so we don't know its exact location here.
+  assert((intptr_t)Universe::narrow_oop_base() <= (intptr_t)(Universe::heap()->base() - os::vm_page_size() - ClassMetaspaceSize) ||
          Universe::narrow_oop_base() == NULL, "invalid value");
   assert(Universe::narrow_oop_shift() == LogMinObjAlignmentInBytes ||
          Universe::narrow_oop_shift() == 0, "invalid value");
@@ -861,7 +871,10 @@ jint Universe::initialize_heap() {
 ReservedSpace Universe::reserve_heap(size_t heap_size, size_t alignment) {
   // Add in the class metaspace area so the classes in the headers can
   // be compressed the same as instances.
-  size_t total_reserved = align_size_up(heap_size + ClassMetaspaceSize, alignment);
+  // Need to round class space size up because it's below the heap and
+  // the actual alignment depends on its size.
+  size_t metaspace_size = align_size_up(ClassMetaspaceSize, alignment);
+  size_t total_reserved = align_size_up(heap_size + metaspace_size, alignment);
   char* addr = Universe::preferred_heap_base(total_reserved, Universe::UnscaledNarrowOop);
 
   ReservedHeapSpace total_rs(total_reserved, alignment, UseLargePages, addr);
@@ -895,11 +908,23 @@ ReservedSpace Universe::reserve_heap(size_t heap_size, size_t alignment) {
     return total_rs;
   }
 
-  // Split the reserved space into main Java heap and a space for classes
-  // so that they can be compressed using the same algorithm as compressed oops
-  ReservedSpace heap_rs = total_rs.first_part(heap_size);
-  ReservedSpace class_rs = total_rs.last_part(heap_size, alignment);
+  // Split the reserved space into main Java heap and a space for
+  // classes so that they can be compressed using the same algorithm
+  // as compressed oops. If compress oops and compress klass ptrs are
+  // used we need the meta space first: if the alignment used for
+  // compressed oops is greater than the one used for compressed klass
+  // ptrs, a metadata space on top of the heap could become
+  // unreachable.
+  ReservedSpace class_rs = total_rs.first_part(metaspace_size);
+  ReservedSpace heap_rs = total_rs.last_part(metaspace_size, alignment);
   Metaspace::initialize_class_space(class_rs);
+
+  if (UseCompressedOops) {
+    // Universe::initialize_heap() will reset this to NULL if unscaled
+    // or zero-based narrow oops are actually used.
+    address base = (address)(total_rs.base() - os::vm_page_size());
+    Universe::set_narrow_oop_base(base);
+  }
   return heap_rs;
 }
 
diff --git a/hotspot/src/share/vm/memory/universe.hpp b/hotspot/src/share/vm/memory/universe.hpp
index 818f9d3405a..12e0acb3ce0 100644
--- a/hotspot/src/share/vm/memory/universe.hpp
+++ b/hotspot/src/share/vm/memory/universe.hpp
@@ -105,16 +105,16 @@ class LatestMethodOopCache : public CommonMethodOopCache {
   Method* get_Method();
 };
 
-// For UseCompressedOops.
-struct NarrowOopStruct {
-  // Base address for oop-within-java-object materialization.
-  // NULL if using wide oops or zero based narrow oops.
+// For UseCompressedOops and UseCompressedKlassPointers.
+struct NarrowPtrStruct {
+  // Base address for oop/klass-within-java-object materialization.
+  // NULL if using wide oops/klasses or zero based narrow oops/klasses.
   address _base;
-  // Number of shift bits for encoding/decoding narrow oops.
-  // 0 if using wide oops or zero based unscaled narrow oops,
-  // LogMinObjAlignmentInBytes otherwise.
+  // Number of shift bits for encoding/decoding narrow ptrs.
+  // 0 if using wide ptrs or zero based unscaled narrow ptrs,
+  // LogMinObjAlignmentInBytes/LogKlassAlignmentInBytes otherwise.
   int     _shift;
-  // Generate code with implicit null checks for narrow oops.
+  // Generate code with implicit null checks for narrow ptrs.
   bool    _use_implicit_null_checks;
 };
 
@@ -206,7 +206,10 @@ class Universe: AllStatic {
   static CollectedHeap* _collectedHeap;
 
   // For UseCompressedOops.
-  static struct NarrowOopStruct _narrow_oop;
+  static struct NarrowPtrStruct _narrow_oop;
+  // For UseCompressedKlassPointers.
+  static struct NarrowPtrStruct _narrow_klass;
+  static address _narrow_ptrs_base;
 
   // array of dummy objects used with +FullGCAlot
   debug_only(static objArrayOop _fullgc_alot_dummy_array;)
@@ -259,8 +262,21 @@ class Universe: AllStatic {
     HeapBasedNarrowOop = 2
   };
   static char*    preferred_heap_base(size_t heap_size, NARROW_OOP_MODE mode);
-  static void     set_narrow_oop_base(address base)   { _narrow_oop._base  = base; }
-  static void     set_narrow_oop_use_implicit_null_checks(bool use) { _narrow_oop._use_implicit_null_checks = use; }
+  static char*    preferred_metaspace_base(size_t heap_size, NARROW_OOP_MODE mode);
+  static void     set_narrow_oop_base(address base) {
+    assert(UseCompressedOops, "no compressed oops?");
+    _narrow_oop._base    = base;
+  }
+  static void     set_narrow_klass_base(address base) {
+    assert(UseCompressedKlassPointers, "no compressed klass ptrs?");
+    _narrow_klass._base   = base;
+  }
+  static void     set_narrow_oop_use_implicit_null_checks(bool use) {
+    assert(UseCompressedOops, "no compressed ptrs?");
+    _narrow_oop._use_implicit_null_checks   = use;
+  }
+  static bool     reserve_metaspace_helper(bool with_base = false);
+  static ReservedHeapSpace reserve_heap_metaspace(size_t heap_size, size_t alignment, bool& contiguous);
 
   // Debugging
   static int _verify_count;                           // number of verifies done
@@ -354,14 +370,30 @@ class Universe: AllStatic {
   static CollectedHeap* heap() { return _collectedHeap; }
 
   // For UseCompressedOops
-  static address* narrow_oop_base_addr()              { return &_narrow_oop._base; }
-  static address  narrow_oop_base()                   { return  _narrow_oop._base; }
-  static bool  is_narrow_oop_base(void* addr)         { return (narrow_oop_base() == (address)addr); }
-  static int      narrow_oop_shift()                  { return  _narrow_oop._shift; }
-  static bool     narrow_oop_use_implicit_null_checks()             { return  _narrow_oop._use_implicit_null_checks; }
+  static address  narrow_oop_base()                       { return  _narrow_oop._base; }
+  static bool  is_narrow_oop_base(void* addr)             { return (narrow_oop_base() == (address)addr); }
+  static int      narrow_oop_shift()                      { return  _narrow_oop._shift; }
+  static bool     narrow_oop_use_implicit_null_checks()   { return  _narrow_oop._use_implicit_null_checks; }
+
+  // For UseCompressedKlassPointers
+  static address  narrow_klass_base()                     { return  _narrow_klass._base; }
+  static bool  is_narrow_klass_base(void* addr)           { return (narrow_klass_base() == (address)addr); }
+  static int      narrow_klass_shift()                    { return  _narrow_klass._shift; }
+  static bool     narrow_klass_use_implicit_null_checks() { return  _narrow_klass._use_implicit_null_checks; }
+
+  static address* narrow_ptrs_base_addr()                 { return &_narrow_ptrs_base; }
+  static void     set_narrow_ptrs_base(address a)         { _narrow_ptrs_base = a; }
+  static address  narrow_ptrs_base()                      { return _narrow_ptrs_base; }
 
   // this is set in vm_version on sparc (and then reset in universe afaict)
-  static void     set_narrow_oop_shift(int shift)     { _narrow_oop._shift = shift; }
+  static void     set_narrow_oop_shift(int shift)         {
+    _narrow_oop._shift   = shift;
+  }
+
+  static void     set_narrow_klass_shift(int shift)       {
+    assert(shift == 0 || shift == LogKlassAlignmentInBytes, "invalid shift for klass ptrs");
+    _narrow_klass._shift   = shift;
+  }
 
   // Reserve Java heap and determine CompressedOops mode
   static ReservedSpace reserve_heap(size_t heap_size, size_t alignment);
diff --git a/hotspot/src/share/vm/oops/arrayKlass.cpp b/hotspot/src/share/vm/oops/arrayKlass.cpp
index 89191ab7b08..781c8945377 100644
--- a/hotspot/src/share/vm/oops/arrayKlass.cpp
+++ b/hotspot/src/share/vm/oops/arrayKlass.cpp
@@ -36,7 +36,7 @@
 #include "oops/objArrayOop.hpp"
 #include "oops/oop.inline.hpp"
 
-int arrayKlass::static_size(int header_size) {
+int ArrayKlass::static_size(int header_size) {
   // size of an array klass object
   assert(header_size <= InstanceKlass::header_size(), "bad header size");
   // If this assert fails, see comments in base_create_array_klass.
@@ -51,7 +51,7 @@ int arrayKlass::static_size(int header_size) {
 }
 
 
-Klass* arrayKlass::java_super() const {
+Klass* ArrayKlass::java_super() const {
   if (super() == NULL)  return NULL;  // bootstrap case
   // Array klasses have primary supertypes which are not reported to Java.
   // Example super chain:  String[][] -> Object[][] -> Object[] -> Object
@@ -59,18 +59,18 @@ Klass* arrayKlass::java_super() const {
 }
 
 
-oop arrayKlass::multi_allocate(int rank, jint* sizes, TRAPS) {
+oop ArrayKlass::multi_allocate(int rank, jint* sizes, TRAPS) {
   ShouldNotReachHere();
   return NULL;
 }
 
-Method* arrayKlass::uncached_lookup_method(Symbol* name, Symbol* signature) const {
+Method* ArrayKlass::uncached_lookup_method(Symbol* name, Symbol* signature) const {
   // There are no methods in an array klass but the super class (Object) has some
   assert(super(), "super klass must be present");
   return Klass::cast(super())->uncached_lookup_method(name, signature);
 }
 
-arrayKlass::arrayKlass(Symbol* name) {
+ArrayKlass::ArrayKlass(Symbol* name) {
   set_alloc_size(0);
   set_name(name);
 
@@ -89,15 +89,15 @@ arrayKlass::arrayKlass(Symbol* name) {
 
 
 // Initialization of vtables and mirror object is done separatly from base_create_array_klass,
-// since a GC can happen. At this point all instance variables of the arrayKlass must be setup.
-void arrayKlass::complete_create_array_klass(arrayKlass* k, KlassHandle super_klass, TRAPS) {
+// since a GC can happen. At this point all instance variables of the ArrayKlass must be setup.
+void ArrayKlass::complete_create_array_klass(ArrayKlass* k, KlassHandle super_klass, TRAPS) {
   ResourceMark rm(THREAD);
   k->initialize_supers(super_klass(), CHECK);
   k->vtable()->initialize_vtable(false, CHECK);
   java_lang_Class::create_mirror(k, CHECK);
 }
 
-GrowableArray<Klass*>* arrayKlass::compute_secondary_supers(int num_extra_slots) {
+GrowableArray<Klass*>* ArrayKlass::compute_secondary_supers(int num_extra_slots) {
   // interfaces = { cloneable_klass, serializable_klass };
   assert(num_extra_slots == 0, "sanity of primitive array type");
   // Must share this for correct bootstrapping!
@@ -105,7 +105,7 @@ GrowableArray<Klass*>* arrayKlass::compute_secondary_supers(int num_extra_slots)
   return NULL;
 }
 
-bool arrayKlass::compute_is_subtype_of(Klass* k) {
+bool ArrayKlass::compute_is_subtype_of(Klass* k) {
   // An array is a subtype of Serializable, Clonable, and Object
   return    k == SystemDictionary::Object_klass()
          || k == SystemDictionary::Cloneable_klass()
@@ -113,19 +113,19 @@ bool arrayKlass::compute_is_subtype_of(Klass* k) {
 }
 
 
-inline intptr_t* arrayKlass::start_of_vtable() const {
+inline intptr_t* ArrayKlass::start_of_vtable() const {
   // all vtables start at the same place, that's why we use InstanceKlass::header_size here
   return ((intptr_t*)this) + InstanceKlass::header_size();
 }
 
 
-klassVtable* arrayKlass::vtable() const {
+klassVtable* ArrayKlass::vtable() const {
   KlassHandle kh(Thread::current(), this);
   return new klassVtable(kh, start_of_vtable(), vtable_length() / vtableEntry::size());
 }
 
 
-objArrayOop arrayKlass::allocate_arrayArray(int n, int length, TRAPS) {
+objArrayOop ArrayKlass::allocate_arrayArray(int n, int length, TRAPS) {
   if (length < 0) {
     THROW_0(vmSymbols::java_lang_NegativeArraySizeException());
   }
@@ -136,40 +136,40 @@ objArrayOop arrayKlass::allocate_arrayArray(int n, int length, TRAPS) {
   }
   int size = objArrayOopDesc::object_size(length);
   Klass* k = array_klass(n+dimension(), CHECK_0);
-  arrayKlass* ak = arrayKlass::cast(k);
+  ArrayKlass* ak = ArrayKlass::cast(k);
   objArrayOop o =
     (objArrayOop)CollectedHeap::array_allocate(ak, size, length, CHECK_0);
   // initialization to NULL not necessary, area already cleared
   return o;
 }
 
-void arrayKlass::array_klasses_do(void f(Klass* k, TRAPS), TRAPS) {
+void ArrayKlass::array_klasses_do(void f(Klass* k, TRAPS), TRAPS) {
   Klass* k = this;
   // Iterate over this array klass and all higher dimensions
   while (k != NULL) {
     f(k, CHECK);
-    k = arrayKlass::cast(k)->higher_dimension();
+    k = ArrayKlass::cast(k)->higher_dimension();
   }
 }
 
-void arrayKlass::array_klasses_do(void f(Klass* k)) {
+void ArrayKlass::array_klasses_do(void f(Klass* k)) {
   Klass* k = this;
   // Iterate over this array klass and all higher dimensions
   while (k != NULL) {
     f(k);
-    k = arrayKlass::cast(k)->higher_dimension();
+    k = ArrayKlass::cast(k)->higher_dimension();
   }
 }
 
 
-void arrayKlass::with_array_klasses_do(void f(Klass* k)) {
+void ArrayKlass::with_array_klasses_do(void f(Klass* k)) {
   array_klasses_do(f);
 }
 
 
 // GC support
 
-void arrayKlass::oops_do(OopClosure* cl) {
+void ArrayKlass::oops_do(OopClosure* cl) {
   Klass::oops_do(cl);
 
   cl->do_oop(adr_component_mirror());
@@ -177,42 +177,42 @@ void arrayKlass::oops_do(OopClosure* cl) {
 
 // JVM support
 
-jint arrayKlass::compute_modifier_flags(TRAPS) const {
+jint ArrayKlass::compute_modifier_flags(TRAPS) const {
   return JVM_ACC_ABSTRACT | JVM_ACC_FINAL | JVM_ACC_PUBLIC;
 }
 
 // JVMTI support
 
-jint arrayKlass::jvmti_class_status() const {
+jint ArrayKlass::jvmti_class_status() const {
   return JVMTI_CLASS_STATUS_ARRAY;
 }
 
-void arrayKlass::remove_unshareable_info() {
+void ArrayKlass::remove_unshareable_info() {
   Klass::remove_unshareable_info();
   // Clear the java mirror
   set_component_mirror(NULL);
 }
 
-void arrayKlass::restore_unshareable_info(TRAPS) {
+void ArrayKlass::restore_unshareable_info(TRAPS) {
   Klass::restore_unshareable_info(CHECK);
   // Klass recreates the component mirror also
 }
 
 // Printing
 
-void arrayKlass::print_on(outputStream* st) const {
+void ArrayKlass::print_on(outputStream* st) const {
   assert(is_klass(), "must be klass");
   Klass::print_on(st);
 }
 
-void arrayKlass::print_value_on(outputStream* st) const {
+void ArrayKlass::print_value_on(outputStream* st) const {
   assert(is_klass(), "must be klass");
   for(int index = 0; index < dimension(); index++) {
     st->print("[]");
   }
 }
 
-void arrayKlass::oop_print_on(oop obj, outputStream* st) {
+void ArrayKlass::oop_print_on(oop obj, outputStream* st) {
   assert(obj->is_array(), "must be array");
   Klass::oop_print_on(obj, st);
   st->print_cr(" - length: %d", arrayOop(obj)->length());
@@ -221,7 +221,7 @@ void arrayKlass::oop_print_on(oop obj, outputStream* st) {
 
 // Verification
 
-void arrayKlass::verify_on(outputStream* st) {
+void ArrayKlass::verify_on(outputStream* st) {
   Klass::verify_on(st);
 
   if (component_mirror() != NULL) {
@@ -229,7 +229,7 @@ void arrayKlass::verify_on(outputStream* st) {
   }
 }
 
-void arrayKlass::oop_verify_on(oop obj, outputStream* st) {
+void ArrayKlass::oop_verify_on(oop obj, outputStream* st) {
   guarantee(obj->is_array(), "must be array");
   arrayOop a = arrayOop(obj);
   guarantee(a->length() >= 0, "array with negative length?");
diff --git a/hotspot/src/share/vm/oops/arrayKlass.hpp b/hotspot/src/share/vm/oops/arrayKlass.hpp
index 35e4949e0d3..38a5340e366 100644
--- a/hotspot/src/share/vm/oops/arrayKlass.hpp
+++ b/hotspot/src/share/vm/oops/arrayKlass.hpp
@@ -30,9 +30,9 @@
 
 class klassVtable;
 
-// arrayKlass is the abstract baseclass for all array classes
+// ArrayKlass is the abstract baseclass for all array classes
 
-class arrayKlass: public Klass {
+class ArrayKlass: public Klass {
   friend class VMStructs;
  private:
   int      _dimension;         // This is n'th-dimensional array.
@@ -46,8 +46,8 @@ class arrayKlass: public Klass {
   // Constructors
   // The constructor with the Symbol argument does the real array
   // initialization, the other is a dummy
-  arrayKlass(Symbol* name);
-  arrayKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for cds"); }
+  ArrayKlass(Symbol* name);
+  ArrayKlass() { assert(DumpSharedSpaces || UseSharedSpaces, "only for cds"); }
 
  public:
   // Testing operation
@@ -80,7 +80,7 @@ class arrayKlass: public Klass {
   oop* adr_component_mirror()           { return (oop*)&this->_component_mirror;}
 
   // Compiler/Interpreter offset
-  static ByteSize component_mirror_offset() { return in_ByteSize(offset_of(arrayKlass, _component_mirror)); }
+  static ByteSize component_mirror_offset() { return in_ByteSize(offset_of(ArrayKlass, _component_mirror)); }
 
   virtual Klass* java_super() const;//{ return SystemDictionary::Object_klass(); }
 
@@ -94,16 +94,16 @@ class arrayKlass: public Klass {
   Method* uncached_lookup_method(Symbol* name, Symbol* signature) const;
 
   // Casting from Klass*
-  static arrayKlass* cast(Klass* k) {
-    assert(k->oop_is_array(), "cast to arrayKlass");
-    return (arrayKlass*) k;
+  static ArrayKlass* cast(Klass* k) {
+    assert(k->oop_is_array(), "cast to ArrayKlass");
+    return (ArrayKlass*) k;
   }
 
   GrowableArray<Klass*>* compute_secondary_supers(int num_extra_slots);
   bool compute_is_subtype_of(Klass* k);
 
   // Sizing
-  static int header_size()                 { return sizeof(arrayKlass)/HeapWordSize; }
+  static int header_size()                 { return sizeof(ArrayKlass)/HeapWordSize; }
   static int static_size(int header_size);
 
   // Java vtable
@@ -124,7 +124,7 @@ class arrayKlass: public Klass {
   virtual void oops_do(OopClosure* cl);
 
   // Return a handle.
-  static void     complete_create_array_klass(arrayKlass* k, KlassHandle super_klass, TRAPS);
+  static void     complete_create_array_klass(ArrayKlass* k, KlassHandle super_klass, TRAPS);
 
 
   // jvm support
diff --git a/hotspot/src/share/vm/oops/constantPool.cpp b/hotspot/src/share/vm/oops/constantPool.cpp
index b708e1ed36f..7f81ca696af 100644
--- a/hotspot/src/share/vm/oops/constantPool.cpp
+++ b/hotspot/src/share/vm/oops/constantPool.cpp
@@ -445,7 +445,6 @@ bool ConstantPool::has_appendix_at_if_loaded(constantPoolHandle cpool, int which
   return e->has_appendix();
 }
 
-
 oop ConstantPool::appendix_at_if_loaded(constantPoolHandle cpool, int which) {
   if (cpool->cache() == NULL)  return NULL;  // nothing to load yet
   int cache_index = decode_cpcache_index(which, true);
@@ -454,6 +453,21 @@ oop ConstantPool::appendix_at_if_loaded(constantPoolHandle cpool, int which) {
 }
 
 
+bool ConstantPool::has_method_type_at_if_loaded(constantPoolHandle cpool, int which) {
+  if (cpool->cache() == NULL)  return false;  // nothing to load yet
+  int cache_index = decode_cpcache_index(which, true);
+  ConstantPoolCacheEntry* e = cpool->cache()->entry_at(cache_index);
+  return e->has_method_type();
+}
+
+oop ConstantPool::method_type_at_if_loaded(constantPoolHandle cpool, int which) {
+  if (cpool->cache() == NULL)  return NULL;  // nothing to load yet
+  int cache_index = decode_cpcache_index(which, true);
+  ConstantPoolCacheEntry* e = cpool->cache()->entry_at(cache_index);
+  return e->method_type_if_resolved(cpool);
+}
+
+
 Symbol* ConstantPool::impl_name_ref_at(int which, bool uncached) {
   int name_index = name_ref_index_at(impl_name_and_type_ref_index_at(which, uncached));
   return symbol_at(name_index);
@@ -519,7 +533,7 @@ int ConstantPool::remap_instruction_operand_from_cache(int operand) {
 void ConstantPool::verify_constant_pool_resolve(constantPoolHandle this_oop, KlassHandle k, TRAPS) {
  if (k->oop_is_instance() || k->oop_is_objArray()) {
     instanceKlassHandle holder (THREAD, this_oop->pool_holder());
-    Klass* elem_oop = k->oop_is_instance() ? k() : objArrayKlass::cast(k())->bottom_klass();
+    Klass* elem_oop = k->oop_is_instance() ? k() : ObjArrayKlass::cast(k())->bottom_klass();
     KlassHandle element (THREAD, elem_oop);
 
     // The element type could be a typeArray - we only need the access check if it is
diff --git a/hotspot/src/share/vm/oops/constantPool.hpp b/hotspot/src/share/vm/oops/constantPool.hpp
index d290f003da3..5348ae8cb97 100644
--- a/hotspot/src/share/vm/oops/constantPool.hpp
+++ b/hotspot/src/share/vm/oops/constantPool.hpp
@@ -468,7 +468,7 @@ class ConstantPool : public Metadata {
     assert(tag_at(which).is_string(), "Corrupted constant pool");
     // Must do an acquire here in case another thread resolved the klass
     // behind our back, lest we later load stale values thru the oop.
-    // we might want a volatile_obj_at in objArrayKlass.
+    // we might want a volatile_obj_at in ObjArrayKlass.
     int obj_index = cp_to_object_index(which);
     return resolved_references()->obj_at(obj_index);
   }
@@ -694,13 +694,15 @@ class ConstantPool : public Metadata {
   friend class SystemDictionary;
 
   // Used by compiler to prevent classloading.
-  static Method*         method_at_if_loaded      (constantPoolHandle this_oop, int which);
-  static bool      has_appendix_at_if_loaded      (constantPoolHandle this_oop, int which);
-  static oop           appendix_at_if_loaded      (constantPoolHandle this_oop, int which);
-  static Klass*           klass_at_if_loaded      (constantPoolHandle this_oop, int which);
-  static Klass*       klass_ref_at_if_loaded      (constantPoolHandle this_oop, int which);
+  static Method*          method_at_if_loaded      (constantPoolHandle this_oop, int which);
+  static bool       has_appendix_at_if_loaded      (constantPoolHandle this_oop, int which);
+  static oop            appendix_at_if_loaded      (constantPoolHandle this_oop, int which);
+  static bool    has_method_type_at_if_loaded      (constantPoolHandle this_oop, int which);
+  static oop         method_type_at_if_loaded      (constantPoolHandle this_oop, int which);
+  static Klass*            klass_at_if_loaded      (constantPoolHandle this_oop, int which);
+  static Klass*        klass_ref_at_if_loaded      (constantPoolHandle this_oop, int which);
   // Same as above - but does LinkResolving.
-  static Klass*       klass_ref_at_if_loaded_check(constantPoolHandle this_oop, int which, TRAPS);
+  static Klass*        klass_ref_at_if_loaded_check(constantPoolHandle this_oop, int which, TRAPS);
 
   // Routines currently used for annotations (only called by jvm.cpp) but which might be used in the
   // future by other Java code. These take constant pool indices rather than
diff --git a/hotspot/src/share/vm/oops/cpCache.cpp b/hotspot/src/share/vm/oops/cpCache.cpp
index 13180cd9eb6..b246cbad316 100644
--- a/hotspot/src/share/vm/oops/cpCache.cpp
+++ b/hotspot/src/share/vm/oops/cpCache.cpp
@@ -244,21 +244,23 @@ void ConstantPoolCacheEntry::set_interface_call(methodHandle method, int index)
 
 
 void ConstantPoolCacheEntry::set_method_handle(constantPoolHandle cpool,
-                                               methodHandle adapter, Handle appendix,
+                                               methodHandle adapter,
+                                               Handle appendix, Handle method_type,
                                                objArrayHandle resolved_references) {
-  set_method_handle_common(cpool, Bytecodes::_invokehandle, adapter, appendix, resolved_references);
+  set_method_handle_common(cpool, Bytecodes::_invokehandle, adapter, appendix, method_type, resolved_references);
 }
 
 void ConstantPoolCacheEntry::set_dynamic_call(constantPoolHandle cpool,
-                                              methodHandle adapter, Handle appendix,
+                                              methodHandle adapter,
+                                              Handle appendix, Handle method_type,
                                               objArrayHandle resolved_references) {
-  set_method_handle_common(cpool, Bytecodes::_invokedynamic, adapter, appendix, resolved_references);
+  set_method_handle_common(cpool, Bytecodes::_invokedynamic, adapter, appendix, method_type, resolved_references);
 }
 
 void ConstantPoolCacheEntry::set_method_handle_common(constantPoolHandle cpool,
                                                       Bytecodes::Code invoke_code,
                                                       methodHandle adapter,
-                                                      Handle appendix,
+                                                      Handle appendix, Handle method_type,
                                                       objArrayHandle resolved_references) {
   // NOTE: This CPCE can be the subject of data races.
   // There are three words to update: flags, refs[f2], f1 (in that order).
@@ -274,18 +276,21 @@ void ConstantPoolCacheEntry::set_method_handle_common(constantPoolHandle cpool,
     return;
   }
 
-  bool has_appendix = appendix.not_null();
+  const bool has_appendix    = appendix.not_null();
+  const bool has_method_type = method_type.not_null();
 
   // Write the flags.
   set_method_flags(as_TosState(adapter->result_type()),
-                   ((has_appendix ?  1 : 0) << has_appendix_shift) |
-                   (                 1      << is_final_shift),
+                   ((has_appendix    ? 1 : 0) << has_appendix_shift   ) |
+                   ((has_method_type ? 1 : 0) << has_method_type_shift) |
+                   (                   1      << is_final_shift       ),
                    adapter->size_of_parameters());
 
   if (TraceInvokeDynamic) {
-    tty->print_cr("set_method_handle bc=%d appendix="PTR_FORMAT"%s method="PTR_FORMAT" ",
+    tty->print_cr("set_method_handle bc=%d appendix="PTR_FORMAT"%s method_type="PTR_FORMAT"%s method="PTR_FORMAT" ",
                   invoke_code,
-                  (intptr_t)appendix(), (has_appendix ? "" : " (unused)"),
+                  (intptr_t)appendix(),    (has_appendix    ? "" : " (unused)"),
+                  (intptr_t)method_type(), (has_method_type ? "" : " (unused)"),
                   (intptr_t)adapter());
     adapter->print();
     if (has_appendix)  appendix()->print();
@@ -310,17 +315,26 @@ void ConstantPoolCacheEntry::set_method_handle_common(constantPoolHandle cpool,
   // This allows us to create fewer method oops, while keeping type safety.
   //
 
+  // Store appendix, if any.
   if (has_appendix) {
-    int ref_index = f2_as_index();
-    assert(ref_index >= 0 && ref_index < resolved_references->length(), "oob");
-    assert(resolved_references->obj_at(ref_index) == NULL, "init just once");
-    resolved_references->obj_at_put(ref_index, appendix());
+    const int appendix_index = f2_as_index() + _indy_resolved_references_appendix_offset;
+    assert(appendix_index >= 0 && appendix_index < resolved_references->length(), "oob");
+    assert(resolved_references->obj_at(appendix_index) == NULL, "init just once");
+    resolved_references->obj_at_put(appendix_index, appendix());
+  }
+
+  // Store MethodType, if any.
+  if (has_method_type) {
+    const int method_type_index = f2_as_index() + _indy_resolved_references_method_type_offset;
+    assert(method_type_index >= 0 && method_type_index < resolved_references->length(), "oob");
+    assert(resolved_references->obj_at(method_type_index) == NULL, "init just once");
+    resolved_references->obj_at_put(method_type_index, method_type());
   }
 
   release_set_f1(adapter());  // This must be the last one to set (see NOTE above)!
 
-    // The interpreter assembly code does not check byte_2,
-    // but it is used by is_resolved, method_if_resolved, etc.
+  // The interpreter assembly code does not check byte_2,
+  // but it is used by is_resolved, method_if_resolved, etc.
   set_bytecode_1(invoke_code);
   NOT_PRODUCT(verify(tty));
   if (TraceInvokeDynamic) {
@@ -376,7 +390,16 @@ Method* ConstantPoolCacheEntry::method_if_resolved(constantPoolHandle cpool) {
 oop ConstantPoolCacheEntry::appendix_if_resolved(constantPoolHandle cpool) {
   if (is_f1_null() || !has_appendix())
     return NULL;
-  int ref_index = f2_as_index();
+  const int ref_index = f2_as_index() + _indy_resolved_references_appendix_offset;
+  objArrayOop resolved_references = cpool->resolved_references();
+  return resolved_references->obj_at(ref_index);
+}
+
+
+oop ConstantPoolCacheEntry::method_type_if_resolved(constantPoolHandle cpool) {
+  if (is_f1_null() || !has_method_type())
+    return NULL;
+  const int ref_index = f2_as_index() + _indy_resolved_references_method_type_offset;
   objArrayOop resolved_references = cpool->resolved_references();
   return resolved_references->obj_at(ref_index);
 }
@@ -513,13 +536,23 @@ void ConstantPoolCache::initialize(intArray& inverse_index_map, intArray& invoke
   for (int i = 0; i < length(); i++) {
     ConstantPoolCacheEntry* e = entry_at(i);
     int original_index = inverse_index_map[i];
-      e->initialize_entry(original_index);
+    e->initialize_entry(original_index);
     assert(entry_at(i) == e, "sanity");
-    }
+  }
   for (int ref = 0; ref < invokedynamic_references_map.length(); ref++) {
-    int cpci = invokedynamic_references_map[ref];
-    if (cpci >= 0)
+    const int cpci = invokedynamic_references_map[ref];
+    if (cpci >= 0) {
+#ifdef ASSERT
+      // invokedynamic and invokehandle have more entries; check if they
+      // all point to the same constant pool cache entry.
+      for (int entry = 1; entry < ConstantPoolCacheEntry::_indy_resolved_references_entries; entry++) {
+        const int cpci_next = invokedynamic_references_map[ref + entry];
+        assert(cpci == cpci_next, err_msg_res("%d == %d", cpci, cpci_next));
+      }
+#endif
       entry_at(cpci)->initialize_resolved_reference_index(ref);
+      ref += ConstantPoolCacheEntry::_indy_resolved_references_entries - 1;  // skip extra entries
+    }
   }
 }
 
diff --git a/hotspot/src/share/vm/oops/cpCache.hpp b/hotspot/src/share/vm/oops/cpCache.hpp
index 71a9b849869..164e34d9a3a 100644
--- a/hotspot/src/share/vm/oops/cpCache.hpp
+++ b/hotspot/src/share/vm/oops/cpCache.hpp
@@ -42,10 +42,10 @@ class PSPromotionManager;
 // _indices   [ b2 | b1 |  index  ]  index = constant_pool_index
 // _f1        [  entry specific   ]  metadata ptr (method or klass)
 // _f2        [  entry specific   ]  vtable or res_ref index, or vfinal method ptr
-// _flags     [tos|0|F=1|0|0|f|v|0 |00000|field_index] (for field entries)
-// bit length [ 4 |1| 1 |1|1|1|1|1 |--5--|----16-----]
-// _flags     [tos|0|F=0|A|I|f|0|vf|00000|00000|psize] (for method entries)
-// bit length [ 4 |1| 1 |1|1|1|1|1 |--5--|--8--|--8--]
+// _flags     [tos|0|F=1|0|0|0|f|v|0 |0000|field_index] (for field entries)
+// bit length [ 4 |1| 1 |1|1|1|1|1|1 |-4--|----16-----]
+// _flags     [tos|0|F=0|M|A|I|f|0|vf|0000|00000|psize] (for method entries)
+// bit length [ 4 |1| 1 |1|1|1|1|1|1 |-4--|--8--|--8--]
 
 // --------------------------------
 //
@@ -166,11 +166,12 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
     tos_state_shift            = BitsPerInt - tos_state_bits,  // see verify_tos_state_shift below
     // misc. option bits; can be any bit position in [16..27]
     is_field_entry_shift       = 26,  // (F) is it a field or a method?
-    has_appendix_shift         = 25,  // (A) does the call site have an appendix argument?
-    is_forced_virtual_shift    = 24,  // (I) is the interface reference forced to virtual mode?
-    is_final_shift             = 23,  // (f) is the field or method final?
-    is_volatile_shift          = 22,  // (v) is the field volatile?
-    is_vfinal_shift            = 21,  // (vf) did the call resolve to a final method?
+    has_method_type_shift      = 25,  // (M) does the call site have a MethodType?
+    has_appendix_shift         = 24,  // (A) does the call site have an appendix argument?
+    is_forced_virtual_shift    = 23,  // (I) is the interface reference forced to virtual mode?
+    is_final_shift             = 22,  // (f) is the field or method final?
+    is_volatile_shift          = 21,  // (v) is the field volatile?
+    is_vfinal_shift            = 20,  // (vf) did the call resolve to a final method?
     // low order bits give field index (for FieldInfo) or method parameter size:
     field_index_bits           = 16,
     field_index_mask           = right_n_bits(field_index_bits),
@@ -223,14 +224,16 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
   void set_method_handle(
     constantPoolHandle cpool,                    // holding constant pool (required for locking)
     methodHandle method,                         // adapter for invokeExact, etc.
-    Handle appendix,                             // stored in refs[f2]; could be a java.lang.invoke.MethodType
+    Handle appendix,                             // stored in refs[f2+0]; could be a java.lang.invoke.MethodType
+    Handle method_type,                          // stored in refs[f2+1]; is a java.lang.invoke.MethodType
     objArrayHandle resolved_references
   );
 
   void set_dynamic_call(
     constantPoolHandle cpool,                    // holding constant pool (required for locking)
     methodHandle method,                         // adapter for this call site
-    Handle appendix,                             // stored in refs[f2]; could be a java.lang.invoke.CallSite
+    Handle appendix,                             // stored in refs[f2+0]; could be a java.lang.invoke.CallSite
+    Handle method_type,                          // stored in refs[f2+1]; is a java.lang.invoke.MethodType
     objArrayHandle resolved_references
   );
 
@@ -253,12 +256,24 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
     constantPoolHandle cpool,                    // holding constant pool (required for locking)
     Bytecodes::Code invoke_code,                 // _invokehandle or _invokedynamic
     methodHandle adapter,                        // invoker method (f1)
-    Handle appendix,                             // appendix such as CallSite, MethodType, etc. (refs[f2])
+    Handle appendix,                             // appendix such as CallSite, MethodType, etc. (refs[f2+0])
+    Handle method_type,                          // MethodType (refs[f2+1])
     objArrayHandle resolved_references
   );
 
-  Method* method_if_resolved(constantPoolHandle cpool);
-  oop appendix_if_resolved(constantPoolHandle cpool);
+  // invokedynamic and invokehandle call sites have two entries in the
+  // resolved references array:
+  //   appendix   (at index+0)
+  //   MethodType (at index+1)
+  enum {
+    _indy_resolved_references_appendix_offset    = 0,
+    _indy_resolved_references_method_type_offset = 1,
+    _indy_resolved_references_entries
+  };
+
+  Method*      method_if_resolved(constantPoolHandle cpool);
+  oop        appendix_if_resolved(constantPoolHandle cpool);
+  oop     method_type_if_resolved(constantPoolHandle cpool);
 
   void set_parameter_size(int value);
 
@@ -270,11 +285,11 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
       case Bytecodes::_getfield        :    // fall through
       case Bytecodes::_invokespecial   :    // fall through
       case Bytecodes::_invokestatic    :    // fall through
+      case Bytecodes::_invokehandle    :    // fall through
+      case Bytecodes::_invokedynamic   :    // fall through
       case Bytecodes::_invokeinterface : return 1;
       case Bytecodes::_putstatic       :    // fall through
       case Bytecodes::_putfield        :    // fall through
-      case Bytecodes::_invokehandle    :    // fall through
-      case Bytecodes::_invokedynamic   :    // fall through
       case Bytecodes::_invokevirtual   : return 2;
       default                          : break;
     }
@@ -307,6 +322,7 @@ class ConstantPoolCacheEntry VALUE_OBJ_CLASS_SPEC {
   bool is_forced_virtual() const                 { return (_flags & (1 << is_forced_virtual_shift)) != 0; }
   bool is_vfinal() const                         { return (_flags & (1 << is_vfinal_shift))         != 0; }
   bool has_appendix() const                      { return (_flags & (1 << has_appendix_shift))      != 0; }
+  bool has_method_type() const                   { return (_flags & (1 << has_method_type_shift))   != 0; }
   bool is_method_entry() const                   { return (_flags & (1 << is_field_entry_shift))    == 0; }
   bool is_field_entry() const                    { return (_flags & (1 << is_field_entry_shift))    != 0; }
   bool is_byte() const                           { return flag_state() == btos; }
diff --git a/hotspot/src/share/vm/oops/instanceKlass.cpp b/hotspot/src/share/vm/oops/instanceKlass.cpp
index b9decf1797a..89452acdcaa 100644
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp
@@ -989,13 +989,13 @@ Klass* InstanceKlass::array_klass_impl(instanceKlassHandle this_oop, bool or_nul
 
       // Check if update has already taken place
       if (this_oop->array_klasses() == NULL) {
-        Klass*    k = objArrayKlass::allocate_objArray_klass(this_oop->class_loader_data(), 1, this_oop, CHECK_NULL);
+        Klass*    k = ObjArrayKlass::allocate_objArray_klass(this_oop->class_loader_data(), 1, this_oop, CHECK_NULL);
         this_oop->set_array_klasses(k);
       }
     }
   }
   // _this will always be set at this point
-  objArrayKlass* oak = (objArrayKlass*)this_oop->array_klasses();
+  ObjArrayKlass* oak = (ObjArrayKlass*)this_oop->array_klasses();
   if (or_null) {
     return oak->array_klass_or_null(n);
   }
@@ -1224,12 +1224,12 @@ void InstanceKlass::do_nonstatic_fields(FieldClosure* cl) {
 
 void InstanceKlass::array_klasses_do(void f(Klass* k, TRAPS), TRAPS) {
   if (array_klasses() != NULL)
-    arrayKlass::cast(array_klasses())->array_klasses_do(f, THREAD);
+    ArrayKlass::cast(array_klasses())->array_klasses_do(f, THREAD);
 }
 
 void InstanceKlass::array_klasses_do(void f(Klass* k)) {
   if (array_klasses() != NULL)
-    arrayKlass::cast(array_klasses())->array_klasses_do(f);
+    ArrayKlass::cast(array_klasses())->array_klasses_do(f);
 }
 
 
@@ -2310,7 +2310,7 @@ bool InstanceKlass::is_same_class_package(Klass* class2) {
   Symbol* classname1 = Klass::cast(class1)->name();
 
   if (Klass::cast(class2)->oop_is_objArray()) {
-    class2 = objArrayKlass::cast(class2)->bottom_klass();
+    class2 = ObjArrayKlass::cast(class2)->bottom_klass();
   }
   oop classloader2;
   if (Klass::cast(class2)->oop_is_instance()) {
diff --git a/hotspot/src/share/vm/oops/instanceOop.hpp b/hotspot/src/share/vm/oops/instanceOop.hpp
index c608598c13a..9ebb9d4720b 100644
--- a/hotspot/src/share/vm/oops/instanceOop.hpp
+++ b/hotspot/src/share/vm/oops/instanceOop.hpp
@@ -37,7 +37,9 @@ class instanceOopDesc : public oopDesc {
 
   // If compressed, the offset of the fields of the instance may not be aligned.
   static int base_offset_in_bytes() {
-    return UseCompressedKlassPointers ?
+    // offset computation code breaks if UseCompressedKlassPointers
+    // only is true
+    return (UseCompressedOops && UseCompressedKlassPointers) ?
              klass_gap_offset_in_bytes() :
              sizeof(instanceOopDesc);
   }
diff --git a/hotspot/src/share/vm/oops/klass.cpp b/hotspot/src/share/vm/oops/klass.cpp
index 9013c1e97d0..94546f0d71a 100644
--- a/hotspot/src/share/vm/oops/klass.cpp
+++ b/hotspot/src/share/vm/oops/klass.cpp
@@ -532,13 +532,13 @@ Klass* Klass::array_klass_or_null() {
 
 
 Klass* Klass::array_klass_impl(bool or_null, int rank, TRAPS) {
-  fatal("array_klass should be dispatched to InstanceKlass, objArrayKlass or typeArrayKlass");
+  fatal("array_klass should be dispatched to InstanceKlass, ObjArrayKlass or TypeArrayKlass");
   return NULL;
 }
 
 
 Klass* Klass::array_klass_impl(bool or_null, TRAPS) {
-  fatal("array_klass should be dispatched to InstanceKlass, objArrayKlass or typeArrayKlass");
+  fatal("array_klass should be dispatched to InstanceKlass, ObjArrayKlass or TypeArrayKlass");
   return NULL;
 }
 
@@ -674,7 +674,7 @@ void Klass::verify_vtable_index(int i) {
     assert(i>=0 && i<((InstanceKlass*)this)->vtable_length()/vtableEntry::size(), "index out of bounds");
   } else {
     assert(oop_is_array(), "Must be");
-    assert(i>=0 && i<((arrayKlass*)this)->vtable_length()/vtableEntry::size(), "index out of bounds");
+    assert(i>=0 && i<((ArrayKlass*)this)->vtable_length()/vtableEntry::size(), "index out of bounds");
   }
 }
 
diff --git a/hotspot/src/share/vm/oops/klassVtable.cpp b/hotspot/src/share/vm/oops/klassVtable.cpp
index c6cdb3f84fe..a522ab5152a 100644
--- a/hotspot/src/share/vm/oops/klassVtable.cpp
+++ b/hotspot/src/share/vm/oops/klassVtable.cpp
@@ -1096,7 +1096,7 @@ class VtableStats : AllStatic {
     SystemDictionary::classes_do(do_class);
     fixed  = no_klasses * oopSize;      // vtable length
     // filler size is a conservative approximation
-    filler = oopSize * (no_klasses - no_instance_klasses) * (sizeof(InstanceKlass) - sizeof(arrayKlass) - 1);
+    filler = oopSize * (no_klasses - no_instance_klasses) * (sizeof(InstanceKlass) - sizeof(ArrayKlass) - 1);
     entries = sizeof(vtableEntry) * sum_of_vtable_len;
     array_entries = sizeof(vtableEntry) * sum_of_array_vtable_len;
   }
diff --git a/hotspot/src/share/vm/oops/klassVtable.hpp b/hotspot/src/share/vm/oops/klassVtable.hpp
index 8abf6332b3d..ca0ba34bdd6 100644
--- a/hotspot/src/share/vm/oops/klassVtable.hpp
+++ b/hotspot/src/share/vm/oops/klassVtable.hpp
@@ -31,7 +31,7 @@
 #include "utilities/growableArray.hpp"
 
 // A klassVtable abstracts the variable-length vtable that is embedded in InstanceKlass
-// and arrayKlass.  klassVtable objects are used just as convenient transient accessors to the vtable,
+// and ArrayKlass.  klassVtable objects are used just as convenient transient accessors to the vtable,
 // not to actually hold the vtable data.
 // Note: the klassVtable should not be accessed before the class has been verified
 // (until that point, the vtable is uninitialized).
diff --git a/hotspot/src/share/vm/oops/markOop.hpp b/hotspot/src/share/vm/oops/markOop.hpp
index c5b35ee7a04..d49beb33bfc 100644
--- a/hotspot/src/share/vm/oops/markOop.hpp
+++ b/hotspot/src/share/vm/oops/markOop.hpp
@@ -318,7 +318,7 @@ class markOopDesc: public oopDesc {
     intptr_t tmp = (intptr_t) monitor;
     return (markOop) (tmp | monitor_value);
   }
-  static markOop encode(JavaThread* thread, int age, int bias_epoch) {
+  static markOop encode(JavaThread* thread, uint age, int bias_epoch) {
     intptr_t tmp = (intptr_t) thread;
     assert(UseBiasedLocking && ((tmp & (epoch_mask_in_place | age_mask_in_place | biased_lock_mask_in_place)) == 0), "misaligned JavaThread pointer");
     assert(age <= max_age, "age too large");
@@ -333,10 +333,10 @@ class markOopDesc: public oopDesc {
   markOop set_marked()   { return markOop((value() & ~lock_mask_in_place) | marked_value); }
   markOop set_unmarked() { return markOop((value() & ~lock_mask_in_place) | unlocked_value); }
 
-  int     age()               const { return mask_bits(value() >> age_shift, age_mask); }
-  markOop set_age(int v) const {
+  uint    age()               const { return mask_bits(value() >> age_shift, age_mask); }
+  markOop set_age(uint v) const {
     assert((v & ~age_mask) == 0, "shouldn't overflow age field");
-    return markOop((value() & ~age_mask_in_place) | (((intptr_t)v & age_mask) << age_shift));
+    return markOop((value() & ~age_mask_in_place) | (((uintptr_t)v & age_mask) << age_shift));
   }
   markOop incr_age()          const { return age() == max_age ? markOop(this) : set_age(age() + 1); }
 
diff --git a/hotspot/src/share/vm/oops/method.cpp b/hotspot/src/share/vm/oops/method.cpp
index e6f3a4a7ecd..5a1032f771e 100644
--- a/hotspot/src/share/vm/oops/method.cpp
+++ b/hotspot/src/share/vm/oops/method.cpp
@@ -251,8 +251,12 @@ void Method::mask_for(int bci, InterpreterOopMap* mask) {
 
 
 int Method::bci_from(address bcp) const {
+#ifdef ASSERT
+  { ResourceMark rm;
   assert(is_native() && bcp == code_base() || contains(bcp) || is_error_reported(),
          err_msg("bcp doesn't belong to this method: bcp: " INTPTR_FORMAT ", method: %s", bcp, name_and_sig_as_C_string()));
+  }
+#endif
   return bcp - code_base();
 }
 
@@ -688,30 +692,18 @@ void Method::set_signature_handler(address handler) {
 }
 
 
-bool Method::is_not_compilable(int comp_level) const {
-  if (number_of_breakpoints() > 0) {
-    return true;
-  }
-  if (is_method_handle_intrinsic()) {
-    return !is_synthetic();  // the generated adapters must be compiled
-  }
-  if (comp_level == CompLevel_any) {
-    return is_not_c1_compilable() || is_not_c2_compilable();
-  }
-  if (is_c1_compile(comp_level)) {
-    return is_not_c1_compilable();
-  }
-  if (is_c2_compile(comp_level)) {
-    return is_not_c2_compilable();
-  }
-  return false;
-}
-
-// call this when compiler finds that this method is not compilable
-void Method::set_not_compilable(int comp_level, bool report) {
+void Method::print_made_not_compilable(int comp_level, bool is_osr, bool report) {
   if (PrintCompilation && report) {
     ttyLocker ttyl;
-    tty->print("made not compilable ");
+    tty->print("made not %scompilable on ", is_osr ? "OSR " : "");
+    if (comp_level == CompLevel_all) {
+      tty->print("all levels ");
+    } else {
+      tty->print("levels ");
+      for (int i = (int)CompLevel_none; i <= comp_level; i++) {
+        tty->print("%d ", i);
+      }
+    }
     this->print_short_name(tty);
     int size = this->code_size();
     if (size > 0)
@@ -720,21 +712,65 @@ void Method::set_not_compilable(int comp_level, bool report) {
   }
   if ((TraceDeoptimization || LogCompilation) && (xtty != NULL)) {
     ttyLocker ttyl;
-    xtty->begin_elem("make_not_compilable thread='%d'", (int) os::current_thread_id());
+    xtty->begin_elem("make_not_%scompilable thread='" UINTX_FORMAT "'",
+                     is_osr ? "osr_" : "", os::current_thread_id());
     xtty->method(this);
     xtty->stamp();
     xtty->end_elem();
   }
+}
+
+bool Method::is_not_compilable(int comp_level) const {
+  if (number_of_breakpoints() > 0)
+    return true;
+  if (is_method_handle_intrinsic())
+    return !is_synthetic();  // the generated adapters must be compiled
+  if (comp_level == CompLevel_any)
+    return is_not_c1_compilable() || is_not_c2_compilable();
+  if (is_c1_compile(comp_level))
+    return is_not_c1_compilable();
+  if (is_c2_compile(comp_level))
+    return is_not_c2_compilable();
+  return false;
+}
+
+// call this when compiler finds that this method is not compilable
+void Method::set_not_compilable(int comp_level, bool report) {
+  print_made_not_compilable(comp_level, /*is_osr*/ false, report);
   if (comp_level == CompLevel_all) {
     set_not_c1_compilable();
     set_not_c2_compilable();
   } else {
-    if (is_c1_compile(comp_level)) {
+    if (is_c1_compile(comp_level))
       set_not_c1_compilable();
-    } else
-      if (is_c2_compile(comp_level)) {
-        set_not_c2_compilable();
-      }
+    if (is_c2_compile(comp_level))
+      set_not_c2_compilable();
+  }
+  CompilationPolicy::policy()->disable_compilation(this);
+}
+
+bool Method::is_not_osr_compilable(int comp_level) const {
+  if (is_not_compilable(comp_level))
+    return true;
+  if (comp_level == CompLevel_any)
+    return is_not_c1_osr_compilable() || is_not_c2_osr_compilable();
+  if (is_c1_compile(comp_level))
+    return is_not_c1_osr_compilable();
+  if (is_c2_compile(comp_level))
+    return is_not_c2_osr_compilable();
+  return false;
+}
+
+void Method::set_not_osr_compilable(int comp_level, bool report) {
+  print_made_not_compilable(comp_level, /*is_osr*/ true, report);
+  if (comp_level == CompLevel_all) {
+    set_not_c1_osr_compilable();
+    set_not_c2_osr_compilable();
+  } else {
+    if (is_c1_compile(comp_level))
+      set_not_c1_osr_compilable();
+    if (is_c2_compile(comp_level))
+      set_not_c2_osr_compilable();
   }
   CompilationPolicy::policy()->disable_compilation(this);
 }
@@ -1030,7 +1066,7 @@ methodHandle Method::make_method_handle_intrinsic(vmIntrinsics::ID iid,
 Klass* Method::check_non_bcp_klass(Klass* klass) {
   if (klass != NULL && Klass::cast(klass)->class_loader() != NULL) {
     if (Klass::cast(klass)->oop_is_objArray())
-      klass = objArrayKlass::cast(klass)->bottom_klass();
+      klass = ObjArrayKlass::cast(klass)->bottom_klass();
     return klass;
   }
   return NULL;
diff --git a/hotspot/src/share/vm/oops/method.hpp b/hotspot/src/share/vm/oops/method.hpp
index 66dfbae3a6c..5e779a57cc1 100644
--- a/hotspot/src/share/vm/oops/method.hpp
+++ b/hotspot/src/share/vm/oops/method.hpp
@@ -745,19 +745,30 @@ class Method : public Metadata {
   // Indicates whether compilation failed earlier for this method, or
   // whether it is not compilable for another reason like having a
   // breakpoint set in it.
-  bool is_not_compilable(int comp_level = CompLevel_any) const;
+  bool  is_not_compilable(int comp_level = CompLevel_any) const;
   void set_not_compilable(int comp_level = CompLevel_all, bool report = true);
   void set_not_compilable_quietly(int comp_level = CompLevel_all) {
     set_not_compilable(comp_level, false);
   }
-  bool is_not_osr_compilable(int comp_level = CompLevel_any) const {
-    return is_not_compilable(comp_level) || access_flags().is_not_osr_compilable();
+  bool  is_not_osr_compilable(int comp_level = CompLevel_any) const;
+  void set_not_osr_compilable(int comp_level = CompLevel_all, bool report = true);
+  void set_not_osr_compilable_quietly(int comp_level = CompLevel_all) {
+    set_not_osr_compilable(comp_level, false);
   }
-  void set_not_osr_compilable()               { _access_flags.set_not_osr_compilable();       }
-  bool is_not_c1_compilable() const           { return access_flags().is_not_c1_compilable(); }
-  void set_not_c1_compilable()                { _access_flags.set_not_c1_compilable();        }
-  bool is_not_c2_compilable() const           { return access_flags().is_not_c2_compilable(); }
-  void set_not_c2_compilable()                { _access_flags.set_not_c2_compilable();        }
+
+ private:
+  void print_made_not_compilable(int comp_level, bool is_osr, bool report);
+
+ public:
+  bool  is_not_c1_compilable() const          { return access_flags().is_not_c1_compilable(); }
+  void set_not_c1_compilable()                {       _access_flags.set_not_c1_compilable();  }
+  bool  is_not_c2_compilable() const          { return access_flags().is_not_c2_compilable(); }
+  void set_not_c2_compilable()                {       _access_flags.set_not_c2_compilable();  }
+
+  bool  is_not_c1_osr_compilable() const      { return is_not_c1_compilable(); }  // don't waste an accessFlags bit
+  void set_not_c1_osr_compilable()            {       set_not_c1_compilable(); }  // don't waste an accessFlags bit
+  bool  is_not_c2_osr_compilable() const      { return access_flags().is_not_c2_osr_compilable(); }
+  void set_not_c2_osr_compilable()            {       _access_flags.set_not_c2_osr_compilable();  }
 
   // Background compilation support
   bool queued_for_compilation() const  { return access_flags().queued_for_compilation(); }
diff --git a/hotspot/src/share/vm/oops/objArrayKlass.cpp b/hotspot/src/share/vm/oops/objArrayKlass.cpp
index b0d90141233..925e04c688c 100644
--- a/hotspot/src/share/vm/oops/objArrayKlass.cpp
+++ b/hotspot/src/share/vm/oops/objArrayKlass.cpp
@@ -56,16 +56,16 @@
 #include "oops/oop.pcgc.inline.hpp"
 #endif
 
-objArrayKlass* objArrayKlass::allocate(ClassLoaderData* loader_data, int n, KlassHandle klass_handle, Symbol* name, TRAPS) {
-  assert(objArrayKlass::header_size() <= InstanceKlass::header_size(),
+ObjArrayKlass* ObjArrayKlass::allocate(ClassLoaderData* loader_data, int n, KlassHandle klass_handle, Symbol* name, TRAPS) {
+  assert(ObjArrayKlass::header_size() <= InstanceKlass::header_size(),
       "array klasses must be same size as InstanceKlass");
 
-  int size = arrayKlass::static_size(objArrayKlass::header_size());
+  int size = ArrayKlass::static_size(ObjArrayKlass::header_size());
 
-  return new (loader_data, size, THREAD) objArrayKlass(n, klass_handle, name);
+  return new (loader_data, size, THREAD) ObjArrayKlass(n, klass_handle, name);
 }
 
-Klass* objArrayKlass::allocate_objArray_klass(ClassLoaderData* loader_data,
+Klass* ObjArrayKlass::allocate_objArray_klass(ClassLoaderData* loader_data,
                                                 int n, KlassHandle element_klass, TRAPS) {
 
   // Eagerly allocate the direct array supertype.
@@ -145,7 +145,7 @@ Klass* objArrayKlass::allocate_objArray_klass(ClassLoaderData* loader_data,
   }
 
   // Initialize instance variables
-  objArrayKlass* oak = objArrayKlass::allocate(loader_data, n, element_klass, name, CHECK_0);
+  ObjArrayKlass* oak = ObjArrayKlass::allocate(loader_data, n, element_klass, name, CHECK_0);
 
   // Add all classes to our internal class loader list here,
   // including classes in the bootstrap (NULL) class loader.
@@ -153,12 +153,12 @@ Klass* objArrayKlass::allocate_objArray_klass(ClassLoaderData* loader_data,
   loader_data->add_class(oak);
 
   // Call complete_create_array_klass after all instance variables has been initialized.
-  arrayKlass::complete_create_array_klass(oak, super_klass, CHECK_0);
+  ArrayKlass::complete_create_array_klass(oak, super_klass, CHECK_0);
 
   return oak;
 }
 
-objArrayKlass::objArrayKlass(int n, KlassHandle element_klass, Symbol* name) : arrayKlass(name) {
+ObjArrayKlass::ObjArrayKlass(int n, KlassHandle element_klass, Symbol* name) : ArrayKlass(name) {
   this->set_dimension(n);
   this->set_element_klass(element_klass());
   // decrement refcount because object arrays are not explicitly freed.  The
@@ -168,7 +168,7 @@ objArrayKlass::objArrayKlass(int n, KlassHandle element_klass, Symbol* name) : a
 
   Klass* bk;
   if (element_klass->oop_is_objArray()) {
-    bk = objArrayKlass::cast(element_klass())->bottom_klass();
+    bk = ObjArrayKlass::cast(element_klass())->bottom_klass();
   } else {
     bk = element_klass();
   }
@@ -181,12 +181,12 @@ objArrayKlass::objArrayKlass(int n, KlassHandle element_klass, Symbol* name) : a
   assert(this->oop_is_objArray(), "sanity");
 }
 
-int objArrayKlass::oop_size(oop obj) const {
+int ObjArrayKlass::oop_size(oop obj) const {
   assert(obj->is_objArray(), "must be object array");
   return objArrayOop(obj)->object_size();
 }
 
-objArrayOop objArrayKlass::allocate(int length, TRAPS) {
+objArrayOop ObjArrayKlass::allocate(int length, TRAPS) {
   if (length >= 0) {
     if (length <= arrayOopDesc::max_array_length(T_OBJECT)) {
       int size = objArrayOopDesc::object_size(length);
@@ -204,7 +204,7 @@ objArrayOop objArrayKlass::allocate(int length, TRAPS) {
 
 static int multi_alloc_counter = 0;
 
-oop objArrayKlass::multi_allocate(int rank, jint* sizes, TRAPS) {
+oop ObjArrayKlass::multi_allocate(int rank, jint* sizes, TRAPS) {
   int length = *sizes;
   // Call to lower_dimension uses this pointer, so most be called before a
   // possible GC
@@ -215,7 +215,7 @@ oop objArrayKlass::multi_allocate(int rank, jint* sizes, TRAPS) {
   if (rank > 1) {
     if (length != 0) {
       for (int index = 0; index < length; index++) {
-        arrayKlass* ak = arrayKlass::cast(h_lower_dimension());
+        ArrayKlass* ak = ArrayKlass::cast(h_lower_dimension());
         oop sub_array = ak->multi_allocate(rank-1, &sizes[1], CHECK_NULL);
         h_array->obj_at_put(index, sub_array);
       }
@@ -235,7 +235,7 @@ oop objArrayKlass::multi_allocate(int rank, jint* sizes, TRAPS) {
 }
 
 // Either oop or narrowOop depending on UseCompressedOops.
-template <class T> void objArrayKlass::do_copy(arrayOop s, T* src,
+template <class T> void ObjArrayKlass::do_copy(arrayOop s, T* src,
                                arrayOop d, T* dst, int length, TRAPS) {
 
   BarrierSet* bs = Universe::heap()->barrier_set();
@@ -252,8 +252,8 @@ template <class T> void objArrayKlass::do_copy(arrayOop s, T* src,
     Copy::conjoint_oops_atomic(src, dst, length);
   } else {
     // We have to make sure all elements conform to the destination array
-    Klass* bound = objArrayKlass::cast(d->klass())->element_klass();
-    Klass* stype = objArrayKlass::cast(s->klass())->element_klass();
+    Klass* bound = ObjArrayKlass::cast(d->klass())->element_klass();
+    Klass* stype = ObjArrayKlass::cast(s->klass())->element_klass();
     if (stype == bound || Klass::cast(stype)->is_subtype_of(bound)) {
       // elements are guaranteed to be subtypes, so no check necessary
       bs->write_ref_array_pre(dst, length);
@@ -290,7 +290,7 @@ template <class T> void objArrayKlass::do_copy(arrayOop s, T* src,
   bs->write_ref_array((HeapWord*)dst, length);
 }
 
-void objArrayKlass::copy_array(arrayOop s, int src_pos, arrayOop d,
+void ObjArrayKlass::copy_array(arrayOop s, int src_pos, arrayOop d,
                                int dst_pos, int length, TRAPS) {
   assert(s->is_objArray(), "must be obj array");
 
@@ -327,7 +327,7 @@ void objArrayKlass::copy_array(arrayOop s, int src_pos, arrayOop d,
 }
 
 
-Klass* objArrayKlass::array_klass_impl(bool or_null, int n, TRAPS) {
+Klass* ObjArrayKlass::array_klass_impl(bool or_null, int n, TRAPS) {
 
   assert(dimension() <= n, "check order of chain");
   int dim = dimension();
@@ -348,30 +348,30 @@ Klass* objArrayKlass::array_klass_impl(bool or_null, int n, TRAPS) {
 
         // Create multi-dim klass object and link them together
         Klass* k =
-          objArrayKlass::allocate_objArray_klass(class_loader_data(), dim + 1, this, CHECK_NULL);
-        objArrayKlass* ak = objArrayKlass::cast(k);
+          ObjArrayKlass::allocate_objArray_klass(class_loader_data(), dim + 1, this, CHECK_NULL);
+        ObjArrayKlass* ak = ObjArrayKlass::cast(k);
         ak->set_lower_dimension(this);
         OrderAccess::storestore();
         set_higher_dimension(ak);
-        assert(ak->oop_is_objArray(), "incorrect initialization of objArrayKlass");
+        assert(ak->oop_is_objArray(), "incorrect initialization of ObjArrayKlass");
       }
     }
   } else {
     CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
   }
 
-  objArrayKlass *ak = objArrayKlass::cast(higher_dimension());
+  ObjArrayKlass *ak = ObjArrayKlass::cast(higher_dimension());
   if (or_null) {
     return ak->array_klass_or_null(n);
   }
   return ak->array_klass(n, CHECK_NULL);
 }
 
-Klass* objArrayKlass::array_klass_impl(bool or_null, TRAPS) {
+Klass* ObjArrayKlass::array_klass_impl(bool or_null, TRAPS) {
   return array_klass_impl(or_null, dimension() +  1, CHECK_NULL);
 }
 
-bool objArrayKlass::can_be_primary_super_slow() const {
+bool ObjArrayKlass::can_be_primary_super_slow() const {
   if (!bottom_klass()->can_be_primary_super())
     // array of interfaces
     return false;
@@ -379,7 +379,7 @@ bool objArrayKlass::can_be_primary_super_slow() const {
     return Klass::can_be_primary_super_slow();
 }
 
-GrowableArray<Klass*>* objArrayKlass::compute_secondary_supers(int num_extra_slots) {
+GrowableArray<Klass*>* ObjArrayKlass::compute_secondary_supers(int num_extra_slots) {
   // interfaces = { cloneable_klass, serializable_klass, elemSuper[], ... };
   Array<Klass*>* elem_supers = Klass::cast(element_klass())->secondary_supers();
   int num_elem_supers = elem_supers == NULL ? 0 : elem_supers->length();
@@ -402,16 +402,16 @@ GrowableArray<Klass*>* objArrayKlass::compute_secondary_supers(int num_extra_slo
   }
 }
 
-bool objArrayKlass::compute_is_subtype_of(Klass* k) {
+bool ObjArrayKlass::compute_is_subtype_of(Klass* k) {
   if (!k->oop_is_objArray())
-    return arrayKlass::compute_is_subtype_of(k);
+    return ArrayKlass::compute_is_subtype_of(k);
 
-  objArrayKlass* oak = objArrayKlass::cast(k);
+  ObjArrayKlass* oak = ObjArrayKlass::cast(k);
   return element_klass()->is_subtype_of(oak->element_klass());
 }
 
-void objArrayKlass::initialize(TRAPS) {
-  Klass::cast(bottom_klass())->initialize(THREAD);  // dispatches to either InstanceKlass or typeArrayKlass
+void ObjArrayKlass::initialize(TRAPS) {
+  Klass::cast(bottom_klass())->initialize(THREAD);  // dispatches to either InstanceKlass or TypeArrayKlass
 }
 
 #define ObjArrayKlass_SPECIALIZED_OOP_ITERATE(T, a, p, do_oop) \
@@ -456,7 +456,7 @@ void objArrayKlass::initialize(TRAPS) {
       a, p, low, high, do_oop)                               \
   }
 
-void objArrayKlass::oop_follow_contents(oop obj) {
+void ObjArrayKlass::oop_follow_contents(oop obj) {
   assert (obj->is_array(), "obj must be array");
   MarkSweep::follow_klass(obj->klass());
   if (UseCompressedOops) {
@@ -467,7 +467,7 @@ void objArrayKlass::oop_follow_contents(oop obj) {
 }
 
 #ifndef SERIALGC
-void objArrayKlass::oop_follow_contents(ParCompactionManager* cm,
+void ObjArrayKlass::oop_follow_contents(ParCompactionManager* cm,
                                         oop obj) {
   assert(obj->is_array(), "obj must be array");
   PSParallelCompact::follow_klass(cm, obj->klass());
@@ -487,7 +487,7 @@ void objArrayKlass::oop_follow_contents(ParCompactionManager* cm,
 
 #define ObjArrayKlass_OOP_OOP_ITERATE_DEFN(OopClosureType, nv_suffix)           \
                                                                                 \
-int objArrayKlass::oop_oop_iterate##nv_suffix(oop obj,                          \
+int ObjArrayKlass::oop_oop_iterate##nv_suffix(oop obj,                          \
                                               OopClosureType* closure) {        \
   SpecializationStats::record_iterate_call##nv_suffix(SpecializationStats::oa); \
   assert (obj->is_array(), "obj must be array");                                \
@@ -504,7 +504,7 @@ int objArrayKlass::oop_oop_iterate##nv_suffix(oop obj,
 
 #define ObjArrayKlass_OOP_OOP_ITERATE_DEFN_m(OopClosureType, nv_suffix)         \
                                                                                 \
-int objArrayKlass::oop_oop_iterate##nv_suffix##_m(oop obj,                      \
+int ObjArrayKlass::oop_oop_iterate##nv_suffix##_m(oop obj,                      \
                                                   OopClosureType* closure,      \
                                                   MemRegion mr) {               \
   SpecializationStats::record_iterate_call##nv_suffix(SpecializationStats::oa); \
@@ -526,7 +526,7 @@ int objArrayKlass::oop_oop_iterate##nv_suffix##_m(oop obj,
 // for objArrayOops.
 #define ObjArrayKlass_OOP_OOP_ITERATE_DEFN_r(OopClosureType, nv_suffix)         \
                                                                                 \
-int objArrayKlass::oop_oop_iterate_range##nv_suffix(oop obj,                    \
+int ObjArrayKlass::oop_oop_iterate_range##nv_suffix(oop obj,                    \
                                                   OopClosureType* closure,      \
                                                   int start, int end) {         \
   SpecializationStats::record_iterate_call##nv_suffix(SpecializationStats::oa); \
@@ -567,7 +567,7 @@ ALL_OOP_OOP_ITERATE_CLOSURES_2(ObjArrayKlass_OOP_OOP_ITERATE_DEFN_m)
 ALL_OOP_OOP_ITERATE_CLOSURES_1(ObjArrayKlass_OOP_OOP_ITERATE_DEFN_r)
 ALL_OOP_OOP_ITERATE_CLOSURES_2(ObjArrayKlass_OOP_OOP_ITERATE_DEFN_r)
 
-int objArrayKlass::oop_adjust_pointers(oop obj) {
+int ObjArrayKlass::oop_adjust_pointers(oop obj) {
   assert(obj->is_objArray(), "obj must be obj array");
   objArrayOop a = objArrayOop(obj);
   // Get size before changing pointers.
@@ -579,7 +579,7 @@ int objArrayKlass::oop_adjust_pointers(oop obj) {
 }
 
 #ifndef SERIALGC
-void objArrayKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
+void ObjArrayKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
   assert(obj->is_objArray(), "obj must be obj array");
   ObjArrayKlass_OOP_ITERATE( \
     objArrayOop(obj), p, \
@@ -588,7 +588,7 @@ void objArrayKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
     })
 }
 
-int objArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
+int ObjArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
   assert (obj->is_objArray(), "obj must be obj array");
   objArrayOop a = objArrayOop(obj);
   int size = a->object_size();
@@ -600,7 +600,7 @@ int objArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
 
 // JVM support
 
-jint objArrayKlass::compute_modifier_flags(TRAPS) const {
+jint ObjArrayKlass::compute_modifier_flags(TRAPS) const {
   // The modifier for an objectArray is the same as its element
   if (element_klass() == NULL) {
     assert(Universe::is_bootstrapping(), "partial objArray only at startup");
@@ -616,7 +616,7 @@ jint objArrayKlass::compute_modifier_flags(TRAPS) const {
 
 // Printing
 
-void objArrayKlass::print_on(outputStream* st) const {
+void ObjArrayKlass::print_on(outputStream* st) const {
 #ifndef PRODUCT
   Klass::print_on(st);
   st->print(" - instance klass: ");
@@ -625,7 +625,7 @@ void objArrayKlass::print_on(outputStream* st) const {
 #endif //PRODUCT
 }
 
-void objArrayKlass::print_value_on(outputStream* st) const {
+void ObjArrayKlass::print_value_on(outputStream* st) const {
   assert(is_klass(), "must be klass");
 
   element_klass()->print_value_on(st);
@@ -634,8 +634,8 @@ void objArrayKlass::print_value_on(outputStream* st) const {
 
 #ifndef PRODUCT
 
-void objArrayKlass::oop_print_on(oop obj, outputStream* st) {
-  arrayKlass::oop_print_on(obj, st);
+void ObjArrayKlass::oop_print_on(oop obj, outputStream* st) {
+  ArrayKlass::oop_print_on(obj, st);
   assert(obj->is_objArray(), "must be objArray");
   objArrayOop oa = objArrayOop(obj);
   int print_len = MIN2((intx) oa->length(), MaxElementPrintSize);
@@ -646,7 +646,7 @@ void objArrayKlass::oop_print_on(oop obj, outputStream* st) {
   }
   int remaining = oa->length() - print_len;
   if (remaining > 0) {
-    tty->print_cr(" - <%d more elements, increase MaxElementPrintSize to print>", remaining);
+    st->print_cr(" - <%d more elements, increase MaxElementPrintSize to print>", remaining);
   }
 }
 
@@ -654,7 +654,7 @@ void objArrayKlass::oop_print_on(oop obj, outputStream* st) {
 
 static int max_objArray_print_length = 4;
 
-void objArrayKlass::oop_print_value_on(oop obj, outputStream* st) {
+void ObjArrayKlass::oop_print_value_on(oop obj, outputStream* st) {
   assert(obj->is_objArray(), "must be objArray");
   st->print("a ");
   element_klass()->print_value_on(st);
@@ -673,15 +673,15 @@ void objArrayKlass::oop_print_value_on(oop obj, outputStream* st) {
   }
 }
 
-const char* objArrayKlass::internal_name() const {
+const char* ObjArrayKlass::internal_name() const {
   return external_name();
 }
 
 
 // Verification
 
-void objArrayKlass::verify_on(outputStream* st) {
-  arrayKlass::verify_on(st);
+void ObjArrayKlass::verify_on(outputStream* st) {
+  ArrayKlass::verify_on(st);
   guarantee(element_klass()->is_metadata(), "should be in metaspace");
   guarantee(element_klass()->is_klass(), "should be klass");
   guarantee(bottom_klass()->is_metadata(), "should be in metaspace");
@@ -690,8 +690,8 @@ void objArrayKlass::verify_on(outputStream* st) {
   guarantee(bk->oop_is_instance() || bk->oop_is_typeArray(),  "invalid bottom klass");
 }
 
-void objArrayKlass::oop_verify_on(oop obj, outputStream* st) {
-  arrayKlass::oop_verify_on(obj, st);
+void ObjArrayKlass::oop_verify_on(oop obj, outputStream* st) {
+  ArrayKlass::oop_verify_on(obj, st);
   guarantee(obj->is_objArray(), "must be objArray");
   objArrayOop oa = objArrayOop(obj);
   for(int index = 0; index < oa->length(); index++) {
diff --git a/hotspot/src/share/vm/oops/objArrayKlass.hpp b/hotspot/src/share/vm/oops/objArrayKlass.hpp
index f5d471675e4..7cb778e77f0 100644
--- a/hotspot/src/share/vm/oops/objArrayKlass.hpp
+++ b/hotspot/src/share/vm/oops/objArrayKlass.hpp
@@ -29,20 +29,20 @@
 #include "memory/specialized_oop_closures.hpp"
 #include "oops/arrayKlass.hpp"
 
-// objArrayKlass is the klass for objArrays
+// ObjArrayKlass is the klass for objArrays
 
-class objArrayKlass : public arrayKlass {
+class ObjArrayKlass : public ArrayKlass {
   friend class VMStructs;
  private:
   Klass* _element_klass;            // The klass of the elements of this array type
-  Klass* _bottom_klass;             // The one-dimensional type (InstanceKlass or typeArrayKlass)
+  Klass* _bottom_klass;             // The one-dimensional type (InstanceKlass or TypeArrayKlass)
 
   // Constructor
-  objArrayKlass(int n, KlassHandle element_klass, Symbol* name);
-  static objArrayKlass* allocate(ClassLoaderData* loader_data, int n, KlassHandle klass_handle, Symbol* name, TRAPS);
+  ObjArrayKlass(int n, KlassHandle element_klass, Symbol* name);
+  static ObjArrayKlass* allocate(ClassLoaderData* loader_data, int n, KlassHandle klass_handle, Symbol* name, TRAPS);
  public:
   // For dummy objects
-  objArrayKlass() {}
+  ObjArrayKlass() {}
 
   // Instance variables
   Klass* element_klass() const      { return _element_klass; }
@@ -54,7 +54,7 @@ class objArrayKlass : public arrayKlass {
   Klass** bottom_klass_addr()       { return &_bottom_klass; }
 
   // Compiler/Interpreter offset
-  static ByteSize element_klass_offset() { return in_ByteSize(offset_of(objArrayKlass, _element_klass)); }
+  static ByteSize element_klass_offset() { return in_ByteSize(offset_of(ObjArrayKlass, _element_klass)); }
 
   // Dispatched operation
   bool can_be_primary_super_slow() const;
@@ -78,11 +78,11 @@ class objArrayKlass : public arrayKlass {
 
  private:
   // Either oop or narrowOop depending on UseCompressedOops.
-  // must be called from within objArrayKlass.cpp
+  // must be called from within ObjArrayKlass.cpp
   template <class T> void do_copy(arrayOop s, T* src, arrayOop d,
                                   T* dst, int length, TRAPS);
  protected:
-  // Returns the objArrayKlass for n'th dimension.
+  // Returns the ObjArrayKlass for n'th dimension.
   virtual Klass* array_klass_impl(bool or_null, int n, TRAPS);
 
   // Returns the array class with this class as element type.
@@ -90,14 +90,14 @@ class objArrayKlass : public arrayKlass {
 
  public:
   // Casting from Klass*
-  static objArrayKlass* cast(Klass* k) {
-    assert(k->oop_is_objArray(), "cast to objArrayKlass");
-    return (objArrayKlass*) k;
+  static ObjArrayKlass* cast(Klass* k) {
+    assert(k->oop_is_objArray(), "cast to ObjArrayKlass");
+    return (ObjArrayKlass*) k;
   }
 
   // Sizing
-  static int header_size()                { return sizeof(objArrayKlass)/HeapWordSize; }
-  int size() const                        { return arrayKlass::static_size(header_size()); }
+  static int header_size()                { return sizeof(ObjArrayKlass)/HeapWordSize; }
+  int size() const                        { return ArrayKlass::static_size(header_size()); }
 
   // Initialization (virtual from Klass)
   void initialize(TRAPS);
diff --git a/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp b/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
index b99b6889330..4a948d82eac 100644
--- a/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
+++ b/hotspot/src/share/vm/oops/objArrayKlass.inline.hpp
@@ -32,7 +32,7 @@
 #include "gc_implementation/parallelScavenge/psParallelCompact.hpp"
 #endif
 
-void objArrayKlass::oop_follow_contents(oop obj, int index) {
+void ObjArrayKlass::oop_follow_contents(oop obj, int index) {
   if (UseCompressedOops) {
     objarray_follow_contents<narrowOop>(obj, index);
   } else {
@@ -41,7 +41,7 @@ void objArrayKlass::oop_follow_contents(oop obj, int index) {
 }
 
 template <class T>
-void objArrayKlass::objarray_follow_contents(oop obj, int index) {
+void ObjArrayKlass::objarray_follow_contents(oop obj, int index) {
   objArrayOop a = objArrayOop(obj);
   const size_t len = size_t(a->length());
   const size_t beg_index = size_t(index);
@@ -64,7 +64,7 @@ void objArrayKlass::objarray_follow_contents(oop obj, int index) {
 }
 
 #ifndef SERIALGC
-void objArrayKlass::oop_follow_contents(ParCompactionManager* cm, oop obj,
+void ObjArrayKlass::oop_follow_contents(ParCompactionManager* cm, oop obj,
                                         int index) {
   if (UseCompressedOops) {
     objarray_follow_contents<narrowOop>(cm, obj, index);
@@ -74,7 +74,7 @@ void objArrayKlass::oop_follow_contents(ParCompactionManager* cm, oop obj,
 }
 
 template <class T>
-void objArrayKlass::objarray_follow_contents(ParCompactionManager* cm, oop obj,
+void ObjArrayKlass::objarray_follow_contents(ParCompactionManager* cm, oop obj,
                                              int index) {
   objArrayOop a = objArrayOop(obj);
   const size_t len = size_t(a->length());
diff --git a/hotspot/src/share/vm/oops/objArrayOop.cpp b/hotspot/src/share/vm/oops/objArrayOop.cpp
index 1cfd8962eb8..00c4abe5ec3 100644
--- a/hotspot/src/share/vm/oops/objArrayOop.cpp
+++ b/hotspot/src/share/vm/oops/objArrayOop.cpp
@@ -31,7 +31,7 @@
                                                                                    \
 int objArrayOopDesc::oop_iterate_range(OopClosureType* blk, int start, int end) {  \
   SpecializationStats::record_call();                                              \
-  return ((objArrayKlass*)klass())->oop_oop_iterate_range##nv_suffix(this, blk, start, end); \
+  return ((ObjArrayKlass*)klass())->oop_oop_iterate_range##nv_suffix(this, blk, start, end); \
 }
 
 ALL_OOP_OOP_ITERATE_CLOSURES_1(ObjArrayOop_OOP_ITERATE_DEFN)
diff --git a/hotspot/src/share/vm/oops/objArrayOop.hpp b/hotspot/src/share/vm/oops/objArrayOop.hpp
index a7cf5472020..0cf5d0395e0 100644
--- a/hotspot/src/share/vm/oops/objArrayOop.hpp
+++ b/hotspot/src/share/vm/oops/objArrayOop.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,7 @@
 // Evaluating "String arg[10]" will create an objArrayOop.
 
 class objArrayOopDesc : public arrayOopDesc {
-  friend class objArrayKlass;
+  friend class ObjArrayKlass;
   friend class Runtime1;
   friend class psPromotionManager;
   friend class CSetMarkOopClosure;
diff --git a/hotspot/src/share/vm/oops/oop.hpp b/hotspot/src/share/vm/oops/oop.hpp
index ca79e348698..7cb04ff4c00 100644
--- a/hotspot/src/share/vm/oops/oop.hpp
+++ b/hotspot/src/share/vm/oops/oop.hpp
@@ -327,7 +327,7 @@ class oopDesc {
   oop forwardee() const;
 
   // Age of object during scavenge
-  int age() const;
+  uint age() const;
   void incr_age();
 
   // Adjust all pointers in this object to point at it's forwarded location and
diff --git a/hotspot/src/share/vm/oops/oop.inline.hpp b/hotspot/src/share/vm/oops/oop.inline.hpp
index c3099b36e1b..c097617478d 100644
--- a/hotspot/src/share/vm/oops/oop.inline.hpp
+++ b/hotspot/src/share/vm/oops/oop.inline.hpp
@@ -185,8 +185,8 @@ inline bool oopDesc::is_null(narrowOop obj) { return obj == 0; }
 inline bool check_obj_alignment(oop obj) {
   return (intptr_t)obj % MinObjAlignmentInBytes == 0;
 }
-inline bool check_obj_alignment(Klass* obj) {
-  return (intptr_t)obj % MinObjAlignmentInBytes == 0;
+inline bool check_klass_alignment(Klass* obj) {
+  return (intptr_t)obj % KlassAlignmentInBytes == 0;
 }
 
 inline narrowOop oopDesc::encode_heap_oop_not_null(oop v) {
@@ -228,9 +228,9 @@ inline oop oopDesc::decode_heap_oop(oop v)  { return v; }
 
 inline narrowOop oopDesc::encode_klass_not_null(Klass* v) {
   assert(!is_null(v), "oop value can never be zero");
-  assert(check_obj_alignment(v), "Address not aligned");
-  address base = Universe::narrow_oop_base();
-  int    shift = Universe::narrow_oop_shift();
+  assert(check_klass_alignment(v), "Address not aligned");
+  address base = Universe::narrow_klass_base();
+  int    shift = Universe::narrow_klass_shift();
   uint64_t  pd = (uint64_t)(pointer_delta((void*)v, (void*)base, 1));
   assert(OopEncodingHeapMax > pd, "change encoding max if new encoding");
   uint64_t result = pd >> shift;
@@ -245,10 +245,10 @@ inline narrowOop oopDesc::encode_klass(Klass* v) {
 
 inline Klass* oopDesc::decode_klass_not_null(narrowOop v) {
   assert(!is_null(v), "narrow oop value can never be zero");
-  address base = Universe::narrow_oop_base();
-  int    shift = Universe::narrow_oop_shift();
+  address base = Universe::narrow_klass_base();
+  int    shift = Universe::narrow_klass_shift();
   Klass* result = (Klass*)(void*)((uintptr_t)base + ((uintptr_t)v << shift));
-  assert(check_obj_alignment(result), err_msg("address not aligned: " PTR_FORMAT, (void*) result));
+  assert(check_klass_alignment(result), err_msg("address not aligned: " PTR_FORMAT, (void*) result));
   return result;
 }
 
@@ -693,7 +693,7 @@ inline void oopDesc::set_displaced_mark(markOop m) {
 }
 
 // The following method needs to be MT safe.
-inline int oopDesc::age() const {
+inline uint oopDesc::age() const {
   assert(!is_forwarded(), "Attempt to read age from forwarded mark");
   if (has_displaced_mark()) {
     return displaced_mark()->age();
diff --git a/hotspot/src/share/vm/oops/oop.pcgc.inline.hpp b/hotspot/src/share/vm/oops/oop.pcgc.inline.hpp
index 16164ff4970..050678185f3 100644
--- a/hotspot/src/share/vm/oops/oop.pcgc.inline.hpp
+++ b/hotspot/src/share/vm/oops/oop.pcgc.inline.hpp
@@ -44,7 +44,7 @@ inline void oopDesc::update_contents(ParCompactionManager* cm) {
     // It might contain oops beyond the header, so take the virtual call.
     new_klass->oop_update_pointers(cm, this);
   }
-  // Else skip it.  The typeArrayKlass in the header never needs scavenging.
+  // Else skip it.  The TypeArrayKlass in the header never needs scavenging.
 }
 
 inline void oopDesc::follow_contents(ParCompactionManager* cm) {
diff --git a/hotspot/src/share/vm/oops/oop.psgc.inline.hpp b/hotspot/src/share/vm/oops/oop.psgc.inline.hpp
index addd5e9fb62..4d8c3d63da0 100644
--- a/hotspot/src/share/vm/oops/oop.psgc.inline.hpp
+++ b/hotspot/src/share/vm/oops/oop.psgc.inline.hpp
@@ -39,7 +39,7 @@ inline void oopDesc::push_contents(PSPromotionManager* pm) {
     // It might contain oops beyond the header, so take the virtual call.
     k->oop_push_contents(pm, this);
   }
-  // Else skip it.  The typeArrayKlass in the header never needs scavenging.
+  // Else skip it.  The TypeArrayKlass in the header never needs scavenging.
 }
 
 #endif // SHARE_VM_OOPS_OOP_PSGC_INLINE_HPP
diff --git a/hotspot/src/share/vm/oops/oopsHierarchy.hpp b/hotspot/src/share/vm/oops/oopsHierarchy.hpp
index db6f75888fe..d599b1bae64 100644
--- a/hotspot/src/share/vm/oops/oopsHierarchy.hpp
+++ b/hotspot/src/share/vm/oops/oopsHierarchy.hpp
@@ -128,7 +128,7 @@ public:
 #endif
 
   // from parNewGeneration and other things that want to get to the end of
-  // an oop for stuff (like objArrayKlass.cpp)
+  // an oop for stuff (like ObjArrayKlass.cpp)
   operator oop* () const              { return (oop *)obj(); }
 };
 
@@ -172,8 +172,8 @@ class   InstanceKlass;
 class     InstanceMirrorKlass;
 class     InstanceClassLoaderKlass;
 class     InstanceRefKlass;
-class   arrayKlass;
-class     objArrayKlass;
-class     typeArrayKlass;
+class   ArrayKlass;
+class     ObjArrayKlass;
+class     TypeArrayKlass;
 
 #endif // SHARE_VM_OOPS_OOPSHIERARCHY_HPP
diff --git a/hotspot/src/share/vm/oops/typeArrayKlass.cpp b/hotspot/src/share/vm/oops/typeArrayKlass.cpp
index f9d0c69b706..9b6ec260cda 100644
--- a/hotspot/src/share/vm/oops/typeArrayKlass.cpp
+++ b/hotspot/src/share/vm/oops/typeArrayKlass.cpp
@@ -40,18 +40,18 @@
 #include "oops/typeArrayOop.hpp"
 #include "runtime/handles.inline.hpp"
 
-bool typeArrayKlass::compute_is_subtype_of(Klass* k) {
+bool TypeArrayKlass::compute_is_subtype_of(Klass* k) {
   if (!k->oop_is_typeArray()) {
-    return arrayKlass::compute_is_subtype_of(k);
+    return ArrayKlass::compute_is_subtype_of(k);
   }
 
-  typeArrayKlass* tak = typeArrayKlass::cast(k);
+  TypeArrayKlass* tak = TypeArrayKlass::cast(k);
   if (dimension() != tak->dimension()) return false;
 
   return element_type() == tak->element_type();
 }
 
-typeArrayKlass* typeArrayKlass::create_klass(BasicType type,
+TypeArrayKlass* TypeArrayKlass::create_klass(BasicType type,
                                       const char* name_str, TRAPS) {
   Symbol* sym = NULL;
   if (name_str != NULL) {
@@ -60,7 +60,7 @@ typeArrayKlass* typeArrayKlass::create_klass(BasicType type,
 
   ClassLoaderData* null_loader_data = ClassLoaderData::the_null_class_loader_data();
 
-  typeArrayKlass* ak = typeArrayKlass::allocate(null_loader_data, type, sym, CHECK_NULL);
+  TypeArrayKlass* ak = TypeArrayKlass::allocate(null_loader_data, type, sym, CHECK_NULL);
 
   // Add all classes to our internal class loader list here,
   // including classes in the bootstrap (NULL) class loader.
@@ -73,27 +73,27 @@ typeArrayKlass* typeArrayKlass::create_klass(BasicType type,
   return ak;
 }
 
-typeArrayKlass* typeArrayKlass::allocate(ClassLoaderData* loader_data, BasicType type, Symbol* name, TRAPS) {
-  assert(typeArrayKlass::header_size() <= InstanceKlass::header_size(),
+TypeArrayKlass* TypeArrayKlass::allocate(ClassLoaderData* loader_data, BasicType type, Symbol* name, TRAPS) {
+  assert(TypeArrayKlass::header_size() <= InstanceKlass::header_size(),
       "array klasses must be same size as InstanceKlass");
 
-  int size = arrayKlass::static_size(typeArrayKlass::header_size());
+  int size = ArrayKlass::static_size(TypeArrayKlass::header_size());
 
-  return new (loader_data, size, THREAD) typeArrayKlass(type, name);
+  return new (loader_data, size, THREAD) TypeArrayKlass(type, name);
 }
 
-typeArrayKlass::typeArrayKlass(BasicType type, Symbol* name) : arrayKlass(name) {
+TypeArrayKlass::TypeArrayKlass(BasicType type, Symbol* name) : ArrayKlass(name) {
   set_layout_helper(array_layout_helper(type));
   assert(oop_is_array(), "sanity");
   assert(oop_is_typeArray(), "sanity");
 
   set_max_length(arrayOopDesc::max_array_length(type));
-  assert(size() >= typeArrayKlass::header_size(), "bad size");
+  assert(size() >= TypeArrayKlass::header_size(), "bad size");
 
   set_class_loader_data(ClassLoaderData::the_null_class_loader_data());
 }
 
-typeArrayOop typeArrayKlass::allocate_common(int length, bool do_zero, TRAPS) {
+typeArrayOop TypeArrayKlass::allocate_common(int length, bool do_zero, TRAPS) {
   assert(log2_element_size() >= 0, "bad scale");
   if (length >= 0) {
     if (length <= max_length()) {
@@ -117,7 +117,7 @@ typeArrayOop typeArrayKlass::allocate_common(int length, bool do_zero, TRAPS) {
   }
 }
 
-oop typeArrayKlass::multi_allocate(int rank, jint* last_size, TRAPS) {
+oop TypeArrayKlass::multi_allocate(int rank, jint* last_size, TRAPS) {
   // For typeArrays this is only called for the last dimension
   assert(rank == 1, "just checking");
   int length = *last_size;
@@ -125,11 +125,11 @@ oop typeArrayKlass::multi_allocate(int rank, jint* last_size, TRAPS) {
 }
 
 
-void typeArrayKlass::copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, TRAPS) {
+void TypeArrayKlass::copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, TRAPS) {
   assert(s->is_typeArray(), "must be type array");
 
   // Check destination
-  if (!d->is_typeArray() || element_type() != typeArrayKlass::cast(d->klass())->element_type()) {
+  if (!d->is_typeArray() || element_type() != TypeArrayKlass::cast(d->klass())->element_type()) {
     THROW(vmSymbols::java_lang_ArrayStoreException());
   }
 
@@ -156,7 +156,7 @@ void typeArrayKlass::copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos
 
 
 // create a klass of array holding typeArrays
-Klass* typeArrayKlass::array_klass_impl(bool or_null, int n, TRAPS) {
+Klass* TypeArrayKlass::array_klass_impl(bool or_null, int n, TRAPS) {
   int dim = dimension();
   assert(dim <= n, "check order of chain");
     if (dim == n)
@@ -173,92 +173,92 @@ Klass* typeArrayKlass::array_klass_impl(bool or_null, int n, TRAPS) {
       MutexLocker mu(MultiArray_lock, THREAD);
 
       if (higher_dimension() == NULL) {
-        Klass* oak = objArrayKlass::allocate_objArray_klass(
+        Klass* oak = ObjArrayKlass::allocate_objArray_klass(
               class_loader_data(), dim + 1, this, CHECK_NULL);
-        objArrayKlass* h_ak = objArrayKlass::cast(oak);
+        ObjArrayKlass* h_ak = ObjArrayKlass::cast(oak);
         h_ak->set_lower_dimension(this);
         OrderAccess::storestore();
         set_higher_dimension(h_ak);
-        assert(h_ak->oop_is_objArray(), "incorrect initialization of objArrayKlass");
+        assert(h_ak->oop_is_objArray(), "incorrect initialization of ObjArrayKlass");
       }
     }
   } else {
     CHECK_UNHANDLED_OOPS_ONLY(Thread::current()->clear_unhandled_oops());
   }
-  objArrayKlass* h_ak = objArrayKlass::cast(higher_dimension());
+  ObjArrayKlass* h_ak = ObjArrayKlass::cast(higher_dimension());
   if (or_null) {
     return h_ak->array_klass_or_null(n);
   }
   return h_ak->array_klass(n, CHECK_NULL);
 }
 
-Klass* typeArrayKlass::array_klass_impl(bool or_null, TRAPS) {
+Klass* TypeArrayKlass::array_klass_impl(bool or_null, TRAPS) {
   return array_klass_impl(or_null, dimension() +  1, THREAD);
 }
 
-int typeArrayKlass::oop_size(oop obj) const {
+int TypeArrayKlass::oop_size(oop obj) const {
   assert(obj->is_typeArray(),"must be a type array");
   typeArrayOop t = typeArrayOop(obj);
   return t->object_size();
 }
 
-void typeArrayKlass::oop_follow_contents(oop obj) {
+void TypeArrayKlass::oop_follow_contents(oop obj) {
   assert(obj->is_typeArray(),"must be a type array");
   // Performance tweak: We skip iterating over the klass pointer since we
-  // know that Universe::typeArrayKlass never moves.
+  // know that Universe::TypeArrayKlass never moves.
 }
 
 #ifndef SERIALGC
-void typeArrayKlass::oop_follow_contents(ParCompactionManager* cm, oop obj) {
+void TypeArrayKlass::oop_follow_contents(ParCompactionManager* cm, oop obj) {
   assert(obj->is_typeArray(),"must be a type array");
   // Performance tweak: We skip iterating over the klass pointer since we
-  // know that Universe::typeArrayKlass never moves.
+  // know that Universe::TypeArrayKlass never moves.
 }
 #endif // SERIALGC
 
-int typeArrayKlass::oop_adjust_pointers(oop obj) {
+int TypeArrayKlass::oop_adjust_pointers(oop obj) {
   assert(obj->is_typeArray(),"must be a type array");
   typeArrayOop t = typeArrayOop(obj);
   // Performance tweak: We skip iterating over the klass pointer since we
-  // know that Universe::typeArrayKlass never moves.
+  // know that Universe::TypeArrayKlass never moves.
   return t->object_size();
 }
 
-int typeArrayKlass::oop_oop_iterate(oop obj, ExtendedOopClosure* blk) {
+int TypeArrayKlass::oop_oop_iterate(oop obj, ExtendedOopClosure* blk) {
   assert(obj->is_typeArray(),"must be a type array");
   typeArrayOop t = typeArrayOop(obj);
   // Performance tweak: We skip iterating over the klass pointer since we
-  // know that Universe::typeArrayKlass never moves.
+  // know that Universe::TypeArrayKlass never moves.
   return t->object_size();
 }
 
-int typeArrayKlass::oop_oop_iterate_m(oop obj, ExtendedOopClosure* blk, MemRegion mr) {
+int TypeArrayKlass::oop_oop_iterate_m(oop obj, ExtendedOopClosure* blk, MemRegion mr) {
   assert(obj->is_typeArray(),"must be a type array");
   typeArrayOop t = typeArrayOop(obj);
   // Performance tweak: We skip iterating over the klass pointer since we
-  // know that Universe::typeArrayKlass never moves.
+  // know that Universe::TypeArrayKlass never moves.
   return t->object_size();
 }
 
 #ifndef SERIALGC
-void typeArrayKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
+void TypeArrayKlass::oop_push_contents(PSPromotionManager* pm, oop obj) {
   ShouldNotReachHere();
   assert(obj->is_typeArray(),"must be a type array");
 }
 
 int
-typeArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
+TypeArrayKlass::oop_update_pointers(ParCompactionManager* cm, oop obj) {
   assert(obj->is_typeArray(),"must be a type array");
   return typeArrayOop(obj)->object_size();
 }
 #endif // SERIALGC
 
-void typeArrayKlass::initialize(TRAPS) {
+void TypeArrayKlass::initialize(TRAPS) {
   // Nothing to do. Having this function is handy since objArrayKlasses can be
-  // initialized by calling initialize on their bottom_klass, see objArrayKlass::initialize
+  // initialized by calling initialize on their bottom_klass, see ObjArrayKlass::initialize
 }
 
-const char* typeArrayKlass::external_name(BasicType type) {
+const char* TypeArrayKlass::external_name(BasicType type) {
   switch (type) {
     case T_BOOLEAN: return "[Z";
     case T_CHAR:    return "[C";
@@ -276,7 +276,7 @@ const char* typeArrayKlass::external_name(BasicType type) {
 
 // Printing
 
-void typeArrayKlass::print_on(outputStream* st) const {
+void TypeArrayKlass::print_on(outputStream* st) const {
 #ifndef PRODUCT
   assert(is_klass(), "must be klass");
   print_value_on(st);
@@ -284,7 +284,7 @@ void typeArrayKlass::print_on(outputStream* st) const {
 #endif //PRODUCT
 }
 
-void typeArrayKlass::print_value_on(outputStream* st) const {
+void TypeArrayKlass::print_value_on(outputStream* st) const {
   assert(is_klass(), "must be klass");
   st->print("{type array ");
   switch (element_type()) {
@@ -364,8 +364,8 @@ static void print_long_array(typeArrayOop ta, int print_len, outputStream* st) {
 }
 
 
-void typeArrayKlass::oop_print_on(oop obj, outputStream* st) {
-  arrayKlass::oop_print_on(obj, st);
+void TypeArrayKlass::oop_print_on(oop obj, outputStream* st) {
+  ArrayKlass::oop_print_on(obj, st);
   typeArrayOop ta = typeArrayOop(obj);
   int print_len = MIN2((intx) ta->length(), MaxElementPrintSize);
   switch (element_type()) {
@@ -381,12 +381,12 @@ void typeArrayKlass::oop_print_on(oop obj, outputStream* st) {
   }
   int remaining = ta->length() - print_len;
   if (remaining > 0) {
-    tty->print_cr(" - <%d more elements, increase MaxElementPrintSize to print>", remaining);
+    st->print_cr(" - <%d more elements, increase MaxElementPrintSize to print>", remaining);
   }
 }
 
 #endif // PRODUCT
 
-const char* typeArrayKlass::internal_name() const {
+const char* TypeArrayKlass::internal_name() const {
   return Klass::external_name();
 }
diff --git a/hotspot/src/share/vm/oops/typeArrayKlass.hpp b/hotspot/src/share/vm/oops/typeArrayKlass.hpp
index da45fa775c3..3fe8312a0ba 100644
--- a/hotspot/src/share/vm/oops/typeArrayKlass.hpp
+++ b/hotspot/src/share/vm/oops/typeArrayKlass.hpp
@@ -28,19 +28,19 @@
 #include "classfile/classLoaderData.hpp"
 #include "oops/arrayKlass.hpp"
 
-// A typeArrayKlass is the klass of a typeArray
+// A TypeArrayKlass is the klass of a typeArray
 // It contains the type and size of the elements
 
-class typeArrayKlass : public arrayKlass {
+class TypeArrayKlass : public ArrayKlass {
   friend class VMStructs;
  private:
   jint _max_length;            // maximum number of elements allowed in an array
 
   // Constructor
-  typeArrayKlass(BasicType type, Symbol* name);
-  static typeArrayKlass* allocate(ClassLoaderData* loader_data, BasicType type, Symbol* name, TRAPS);
+  TypeArrayKlass(BasicType type, Symbol* name);
+  static TypeArrayKlass* allocate(ClassLoaderData* loader_data, BasicType type, Symbol* name, TRAPS);
  public:
-  typeArrayKlass() {} // For dummy objects.
+  TypeArrayKlass() {} // For dummy objects.
 
   // instance variables
   jint max_length()                     { return _max_length; }
@@ -50,10 +50,10 @@ class typeArrayKlass : public arrayKlass {
   bool oop_is_typeArray_slow() const    { return true; }
 
   // klass allocation
-  static typeArrayKlass* create_klass(BasicType type, const char* name_str,
+  static TypeArrayKlass* create_klass(BasicType type, const char* name_str,
                                TRAPS);
   static inline Klass* create_klass(BasicType type, int scale, TRAPS) {
-    typeArrayKlass* tak = create_klass(type, external_name(type), CHECK_NULL);
+    TypeArrayKlass* tak = create_klass(type, external_name(type), CHECK_NULL);
     assert(scale == (1 << tak->log2_element_size()), "scale must check out");
     return tak;
   }
@@ -90,17 +90,17 @@ class typeArrayKlass : public arrayKlass {
 
  public:
   // Casting from Klass*
-  static typeArrayKlass* cast(Klass* k) {
-    assert(k->oop_is_typeArray(), "cast to typeArrayKlass");
-    return (typeArrayKlass*) k;
+  static TypeArrayKlass* cast(Klass* k) {
+    assert(k->oop_is_typeArray(), "cast to TypeArrayKlass");
+    return (TypeArrayKlass*) k;
   }
 
   // Naming
   static const char* external_name(BasicType type);
 
   // Sizing
-  static int header_size()  { return sizeof(typeArrayKlass)/HeapWordSize; }
-  int size() const          { return arrayKlass::static_size(header_size()); }
+  static int header_size()  { return sizeof(TypeArrayKlass)/HeapWordSize; }
+  int size() const          { return ArrayKlass::static_size(header_size()); }
 
   // Initialization (virtual from Klass)
   void initialize(TRAPS);
diff --git a/hotspot/src/share/vm/oops/typeArrayOop.hpp b/hotspot/src/share/vm/oops/typeArrayOop.hpp
index 62e9fa6cd79..cee2b8a5e2d 100644
--- a/hotspot/src/share/vm/oops/typeArrayOop.hpp
+++ b/hotspot/src/share/vm/oops/typeArrayOop.hpp
@@ -73,7 +73,7 @@ class typeArrayOopDesc : public arrayOopDesc {
   jfloat*   float_base()  const { return (jfloat*)  base(T_FLOAT); }
   jdouble*  double_base() const { return (jdouble*) base(T_DOUBLE); }
 
-  friend class typeArrayKlass;
+  friend class TypeArrayKlass;
 
  public:
   jbyte* byte_at_addr(int which) const {
@@ -190,7 +190,7 @@ class typeArrayOopDesc : public arrayOopDesc {
 
  public:
   int object_size() {
-    typeArrayKlass* tk = typeArrayKlass::cast(klass());
+    TypeArrayKlass* tk = TypeArrayKlass::cast(klass());
     return object_size(tk->layout_helper(), length());
   }
 };
diff --git a/hotspot/src/share/vm/opto/addnode.cpp b/hotspot/src/share/vm/opto/addnode.cpp
index ee6f6bc8426..6e54990281b 100644
--- a/hotspot/src/share/vm/opto/addnode.cpp
+++ b/hotspot/src/share/vm/opto/addnode.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -248,47 +248,47 @@ Node *AddINode::Ideal(PhaseGVN *phase, bool can_reshape) {
     const Type *t_sub1 = phase->type( in1->in(1) );
     const Type *t_2    = phase->type( in2        );
     if( t_sub1->singleton() && t_2->singleton() && t_sub1 != Type::TOP && t_2 != Type::TOP )
-      return new (phase->C, 3) SubINode(phase->makecon( add_ring( t_sub1, t_2 ) ),
+      return new (phase->C) SubINode(phase->makecon( add_ring( t_sub1, t_2 ) ),
                               in1->in(2) );
     // Convert "(a-b)+(c-d)" into "(a+c)-(b+d)"
     if( op2 == Op_SubI ) {
       // Check for dead cycle: d = (a-b)+(c-d)
       assert( in1->in(2) != this && in2->in(2) != this,
               "dead loop in AddINode::Ideal" );
-      Node *sub  = new (phase->C, 3) SubINode(NULL, NULL);
-      sub->init_req(1, phase->transform(new (phase->C, 3) AddINode(in1->in(1), in2->in(1) ) ));
-      sub->init_req(2, phase->transform(new (phase->C, 3) AddINode(in1->in(2), in2->in(2) ) ));
+      Node *sub  = new (phase->C) SubINode(NULL, NULL);
+      sub->init_req(1, phase->transform(new (phase->C) AddINode(in1->in(1), in2->in(1) ) ));
+      sub->init_req(2, phase->transform(new (phase->C) AddINode(in1->in(2), in2->in(2) ) ));
       return sub;
     }
     // Convert "(a-b)+(b+c)" into "(a+c)"
     if( op2 == Op_AddI && in1->in(2) == in2->in(1) ) {
       assert(in1->in(1) != this && in2->in(2) != this,"dead loop in AddINode::Ideal");
-      return new (phase->C, 3) AddINode(in1->in(1), in2->in(2));
+      return new (phase->C) AddINode(in1->in(1), in2->in(2));
     }
     // Convert "(a-b)+(c+b)" into "(a+c)"
     if( op2 == Op_AddI && in1->in(2) == in2->in(2) ) {
       assert(in1->in(1) != this && in2->in(1) != this,"dead loop in AddINode::Ideal");
-      return new (phase->C, 3) AddINode(in1->in(1), in2->in(1));
+      return new (phase->C) AddINode(in1->in(1), in2->in(1));
     }
     // Convert "(a-b)+(b-c)" into "(a-c)"
     if( op2 == Op_SubI && in1->in(2) == in2->in(1) ) {
       assert(in1->in(1) != this && in2->in(2) != this,"dead loop in AddINode::Ideal");
-      return new (phase->C, 3) SubINode(in1->in(1), in2->in(2));
+      return new (phase->C) SubINode(in1->in(1), in2->in(2));
     }
     // Convert "(a-b)+(c-a)" into "(c-b)"
     if( op2 == Op_SubI && in1->in(1) == in2->in(2) ) {
       assert(in1->in(2) != this && in2->in(1) != this,"dead loop in AddINode::Ideal");
-      return new (phase->C, 3) SubINode(in2->in(1), in1->in(2));
+      return new (phase->C) SubINode(in2->in(1), in1->in(2));
     }
   }
 
   // Convert "x+(0-y)" into "(x-y)"
   if( op2 == Op_SubI && phase->type(in2->in(1)) == TypeInt::ZERO )
-    return new (phase->C, 3) SubINode(in1, in2->in(2) );
+    return new (phase->C) SubINode(in1, in2->in(2) );
 
   // Convert "(0-y)+x" into "(x-y)"
   if( op1 == Op_SubI && phase->type(in1->in(1)) == TypeInt::ZERO )
-    return new (phase->C, 3) SubINode( in2, in1->in(2) );
+    return new (phase->C) SubINode( in2, in1->in(2) );
 
   // Convert (x>>>z)+y into (x+(y<<z))>>>z for small constant z and y.
   // Helps with array allocation math constant folding
@@ -309,8 +309,8 @@ Node *AddINode::Ideal(PhaseGVN *phase, bool can_reshape) {
     if( z < 5 && -5 < y && y < 0 ) {
       const Type *t_in11 = phase->type(in1->in(1));
       if( t_in11 != Type::TOP && (t_in11->is_int()->_lo >= -(y << z)) ) {
-        Node *a = phase->transform( new (phase->C, 3) AddINode( in1->in(1), phase->intcon(y<<z) ) );
-        return new (phase->C, 3) URShiftINode( a, in1->in(2) );
+        Node *a = phase->transform( new (phase->C) AddINode( in1->in(1), phase->intcon(y<<z) ) );
+        return new (phase->C) URShiftINode( a, in1->in(2) );
       }
     }
   }
@@ -381,47 +381,47 @@ Node *AddLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     const Type *t_sub1 = phase->type( in1->in(1) );
     const Type *t_2    = phase->type( in2        );
     if( t_sub1->singleton() && t_2->singleton() && t_sub1 != Type::TOP && t_2 != Type::TOP )
-      return new (phase->C, 3) SubLNode(phase->makecon( add_ring( t_sub1, t_2 ) ),
+      return new (phase->C) SubLNode(phase->makecon( add_ring( t_sub1, t_2 ) ),
                               in1->in(2) );
     // Convert "(a-b)+(c-d)" into "(a+c)-(b+d)"
     if( op2 == Op_SubL ) {
       // Check for dead cycle: d = (a-b)+(c-d)
       assert( in1->in(2) != this && in2->in(2) != this,
               "dead loop in AddLNode::Ideal" );
-      Node *sub  = new (phase->C, 3) SubLNode(NULL, NULL);
-      sub->init_req(1, phase->transform(new (phase->C, 3) AddLNode(in1->in(1), in2->in(1) ) ));
-      sub->init_req(2, phase->transform(new (phase->C, 3) AddLNode(in1->in(2), in2->in(2) ) ));
+      Node *sub  = new (phase->C) SubLNode(NULL, NULL);
+      sub->init_req(1, phase->transform(new (phase->C) AddLNode(in1->in(1), in2->in(1) ) ));
+      sub->init_req(2, phase->transform(new (phase->C) AddLNode(in1->in(2), in2->in(2) ) ));
       return sub;
     }
     // Convert "(a-b)+(b+c)" into "(a+c)"
     if( op2 == Op_AddL && in1->in(2) == in2->in(1) ) {
       assert(in1->in(1) != this && in2->in(2) != this,"dead loop in AddLNode::Ideal");
-      return new (phase->C, 3) AddLNode(in1->in(1), in2->in(2));
+      return new (phase->C) AddLNode(in1->in(1), in2->in(2));
     }
     // Convert "(a-b)+(c+b)" into "(a+c)"
     if( op2 == Op_AddL && in1->in(2) == in2->in(2) ) {
       assert(in1->in(1) != this && in2->in(1) != this,"dead loop in AddLNode::Ideal");
-      return new (phase->C, 3) AddLNode(in1->in(1), in2->in(1));
+      return new (phase->C) AddLNode(in1->in(1), in2->in(1));
     }
     // Convert "(a-b)+(b-c)" into "(a-c)"
     if( op2 == Op_SubL && in1->in(2) == in2->in(1) ) {
       assert(in1->in(1) != this && in2->in(2) != this,"dead loop in AddLNode::Ideal");
-      return new (phase->C, 3) SubLNode(in1->in(1), in2->in(2));
+      return new (phase->C) SubLNode(in1->in(1), in2->in(2));
     }
     // Convert "(a-b)+(c-a)" into "(c-b)"
     if( op2 == Op_SubL && in1->in(1) == in1->in(2) ) {
       assert(in1->in(2) != this && in2->in(1) != this,"dead loop in AddLNode::Ideal");
-      return new (phase->C, 3) SubLNode(in2->in(1), in1->in(2));
+      return new (phase->C) SubLNode(in2->in(1), in1->in(2));
     }
   }
 
   // Convert "x+(0-y)" into "(x-y)"
   if( op2 == Op_SubL && phase->type(in2->in(1)) == TypeLong::ZERO )
-    return new (phase->C, 3) SubLNode( in1, in2->in(2) );
+    return new (phase->C) SubLNode( in1, in2->in(2) );
 
   // Convert "(0-y)+x" into "(x-y)"
   if( op1 == Op_SubL && phase->type(in1->in(1)) == TypeInt::ZERO )
-    return new (phase->C, 3) SubLNode( in2, in1->in(2) );
+    return new (phase->C) SubLNode( in2, in1->in(2) );
 
   // Convert "X+X+X+X+X...+X+Y" into "k*X+Y" or really convert "X+(X+Y)"
   // into "(X<<1)+Y" and let shift-folding happen.
@@ -429,8 +429,8 @@ Node *AddLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
       in2->in(1) == in1 &&
       op1 != Op_ConL &&
       0 ) {
-    Node *shift = phase->transform(new (phase->C, 3) LShiftLNode(in1,phase->intcon(1)));
-    return new (phase->C, 3) AddLNode(shift,in2->in(2));
+    Node *shift = phase->transform(new (phase->C) LShiftLNode(in1,phase->intcon(1)));
+    return new (phase->C) AddLNode(shift,in2->in(2));
   }
 
   return AddNode::Ideal(phase, can_reshape);
@@ -590,7 +590,7 @@ Node *AddPNode::Ideal(PhaseGVN *phase, bool can_reshape) {
         offset  = phase->MakeConX(t2->get_con() + t12->get_con());
       } else {
         // Else move the constant to the right.  ((A+con)+B) into ((A+B)+con)
-        address = phase->transform(new (phase->C, 4) AddPNode(in(Base),addp->in(Address),in(Offset)));
+        address = phase->transform(new (phase->C) AddPNode(in(Base),addp->in(Address),in(Offset)));
         offset  = addp->in(Offset);
       }
       PhaseIterGVN *igvn = phase->is_IterGVN();
@@ -610,7 +610,7 @@ Node *AddPNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     // If this is a NULL+long form (from unsafe accesses), switch to a rawptr.
     if (phase->type(in(Address)) == TypePtr::NULL_PTR) {
       Node* offset = in(Offset);
-      return new (phase->C, 2) CastX2PNode(offset);
+      return new (phase->C) CastX2PNode(offset);
     }
   }
 
@@ -622,7 +622,7 @@ Node *AddPNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   if( add->Opcode() == Op_AddX && add->in(1) != add ) {
     const Type *t22 = phase->type( add->in(2) );
     if( t22->singleton() && (t22 != Type::TOP) ) {  // Right input is an add of a constant?
-      set_req(Address, phase->transform(new (phase->C, 4) AddPNode(in(Base),in(Address),add->in(1))));
+      set_req(Address, phase->transform(new (phase->C) AddPNode(in(Base),in(Address),add->in(1))));
       set_req(Offset, add->in(2));
       return this;              // Made progress
     }
@@ -847,7 +847,7 @@ Node *MinINode::Ideal(PhaseGVN *phase, bool can_reshape) {
   // to force a right-spline graph for the rest of MinINode::Ideal().
   if( l->Opcode() == Op_MinI ) {
     assert( l != l->in(1), "dead loop in MinINode::Ideal" );
-    r = phase->transform(new (phase->C, 3) MinINode(l->in(2),r));
+    r = phase->transform(new (phase->C) MinINode(l->in(2),r));
     l = l->in(1);
     set_req(1, l);
     set_req(2, r);
@@ -895,18 +895,18 @@ Node *MinINode::Ideal(PhaseGVN *phase, bool can_reshape) {
     }
 
     if( x->_idx > y->_idx )
-      return new (phase->C, 3) MinINode(r->in(1),phase->transform(new (phase->C, 3) MinINode(l,r->in(2))));
+      return new (phase->C) MinINode(r->in(1),phase->transform(new (phase->C) MinINode(l,r->in(2))));
 
     // See if covers: MIN2(x+c0,MIN2(y+c1,z))
     if( !phase->eqv(x,y) ) return NULL;
     // If (y == x) transform MIN2(x+c0, MIN2(x+c1,z)) into
     // MIN2(x+c0 or x+c1 which less, z).
-    return new (phase->C, 3) MinINode(phase->transform(new (phase->C, 3) AddINode(x,phase->intcon(MIN2(x_off,y_off)))),r->in(2));
+    return new (phase->C) MinINode(phase->transform(new (phase->C) AddINode(x,phase->intcon(MIN2(x_off,y_off)))),r->in(2));
   } else {
     // See if covers: MIN2(x+c0,y+c1)
     if( !phase->eqv(x,y) ) return NULL;
     // If (y == x) transform MIN2(x+c0,x+c1) into x+c0 or x+c1 which less.
-    return new (phase->C, 3) AddINode(x,phase->intcon(MIN2(x_off,y_off)));
+    return new (phase->C) AddINode(x,phase->intcon(MIN2(x_off,y_off)));
   }
 
 }
diff --git a/hotspot/src/share/vm/opto/block.cpp b/hotspot/src/share/vm/opto/block.cpp
index 3e6b7bf1e27..70f00ca50a2 100644
--- a/hotspot/src/share/vm/opto/block.cpp
+++ b/hotspot/src/share/vm/opto/block.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -378,7 +378,7 @@ PhaseCFG::PhaseCFG( Arena *a, RootNode *r, Matcher &m ) :
   // I'll need a few machine-specific GotoNodes.  Make an Ideal GotoNode,
   // then Match it into a machine-specific Node.  Then clone the machine
   // Node on demand.
-  Node *x = new (C, 1) GotoNode(NULL);
+  Node *x = new (C) GotoNode(NULL);
   x->init_req(0, x);
   _goto = m.match_tree(x);
   assert(_goto != NULL, "");
@@ -432,7 +432,7 @@ uint PhaseCFG::build_cfg() {
                !p->is_block_start() );
       // Make the block begin with one of Region or StartNode.
       if( !p->is_block_start() ) {
-        RegionNode *r = new (C, 2) RegionNode( 2 );
+        RegionNode *r = new (C) RegionNode( 2 );
         r->init_req(1, p);         // Insert RegionNode in the way
         proj->set_req(0, r);        // Insert RegionNode in the way
         p = r;
@@ -508,7 +508,7 @@ void PhaseCFG::insert_goto_at(uint block_no, uint succ_no) {
   // get ProjNode corresponding to the succ_no'th successor of the in block
   ProjNode* proj = in->_nodes[in->_nodes.size() - in->_num_succs + succ_no]->as_Proj();
   // create region for basic block
-  RegionNode* region = new (C, 2) RegionNode(2);
+  RegionNode* region = new (C) RegionNode(2);
   region->init_req(1, proj);
   // setup corresponding basic block
   Block* block = new (_bbs._arena) Block(_bbs._arena, region);
diff --git a/hotspot/src/share/vm/opto/block.hpp b/hotspot/src/share/vm/opto/block.hpp
index e3d8d3ef0f3..d0d67b7fcbf 100644
--- a/hotspot/src/share/vm/opto/block.hpp
+++ b/hotspot/src/share/vm/opto/block.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/opto/bytecodeInfo.cpp b/hotspot/src/share/vm/opto/bytecodeInfo.cpp
index 00632a23906..1c08a6ebf3b 100644
--- a/hotspot/src/share/vm/opto/bytecodeInfo.cpp
+++ b/hotspot/src/share/vm/opto/bytecodeInfo.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -439,9 +439,7 @@ WarmCallInfo* InlineTree::ok_to_inline(ciMethod* callee_method, JVMState* jvms,
   WarmCallInfo wci = *(initial_wci);
   failure_msg = try_to_inline(callee_method, caller_method, caller_bci, profile, &wci);
   if (failure_msg != NULL && C->log() != NULL) {
-    C->log()->begin_elem("inline_fail reason='");
-    C->log()->text("%s", failure_msg);
-    C->log()->end_elem("'");
+    C->log()->inline_fail(failure_msg);
   }
 
 #ifndef PRODUCT
diff --git a/hotspot/src/share/vm/opto/c2_globals.hpp b/hotspot/src/share/vm/opto/c2_globals.hpp
index c5c7768dccf..80996a5d713 100644
--- a/hotspot/src/share/vm/opto/c2_globals.hpp
+++ b/hotspot/src/share/vm/opto/c2_globals.hpp
@@ -85,7 +85,7 @@
           "Max vector size in bytes, "                                      \
           "actual size could be less depending on elements type")           \
                                                                             \
-  product(bool, AlignVector, false,                                         \
+  product(bool, AlignVector, true,                                          \
           "Perform vector store/load alignment in loop")                    \
                                                                             \
   product(intx, NumberOfLoopInstrToAlign, 4,                                \
@@ -535,7 +535,7 @@
   notproduct(bool, TraceSpilling, false,                                    \
           "Trace spilling")                                                 \
                                                                             \
-  notproduct(bool, TraceTypeProfile, false,                                 \
+  diagnostic(bool, TraceTypeProfile, false,                                 \
           "Trace type profile")                                             \
                                                                             \
   develop(bool, PoisonOSREntry, true,                                       \
diff --git a/hotspot/src/share/vm/opto/callGenerator.cpp b/hotspot/src/share/vm/opto/callGenerator.cpp
index 1c7b9ffeeb9..547096b3dfc 100644
--- a/hotspot/src/share/vm/opto/callGenerator.cpp
+++ b/hotspot/src/share/vm/opto/callGenerator.cpp
@@ -134,7 +134,7 @@ JVMState* DirectCallGenerator::generate(JVMState* jvms) {
     kit.C->log()->elem("direct_call bci='%d'", jvms->bci());
   }
 
-  CallStaticJavaNode *call = new (kit.C, tf()->domain()->cnt()) CallStaticJavaNode(tf(), target, method(), kit.bci());
+  CallStaticJavaNode *call = new (kit.C) CallStaticJavaNode(tf(), target, method(), kit.bci());
   _call_node = call;  // Save the call node in case we need it later
   if (!is_static) {
     // Make an explicit receiver null_check as part of this call.
@@ -221,7 +221,7 @@ JVMState* VirtualCallGenerator::generate(JVMState* jvms) {
          "no vtable calls if +UseInlineCaches ");
   address target = SharedRuntime::get_resolve_virtual_call_stub();
   // Normal inline cache used for call
-  CallDynamicJavaNode *call = new (kit.C, tf()->domain()->cnt()) CallDynamicJavaNode(tf(), target, method(), _vtable_index, kit.bci());
+  CallDynamicJavaNode *call = new (kit.C) CallDynamicJavaNode(tf(), target, method(), _vtable_index, kit.bci());
   kit.set_arguments_for_java_call(call);
   kit.set_edges_for_java_call(call);
   Node* ret = kit.set_results_for_java_call(call);
@@ -300,7 +300,7 @@ void LateInlineCallGenerator::do_late_inline() {
   Compile* C = Compile::current();
   JVMState* jvms     = call->jvms()->clone_shallow(C);
   uint size = call->req();
-  SafePointNode* map = new (C, size) SafePointNode(size, jvms);
+  SafePointNode* map = new (C) SafePointNode(size, jvms);
   for (uint i1 = 0; i1 < size; i1++) {
     map->init_req(i1, call->in(i1));
   }
@@ -551,7 +551,7 @@ JVMState* PredictedCallGenerator::generate(JVMState* jvms) {
 
   // Finish the diamond.
   kit.C->set_has_split_ifs(true); // Has chance for split-if optimization
-  RegionNode* region = new (kit.C, 3) RegionNode(3);
+  RegionNode* region = new (kit.C) RegionNode(3);
   region->init_req(1, kit.control());
   region->init_req(2, slow_map->control());
   kit.set_control(gvn.transform(region));
@@ -636,7 +636,7 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod*
           const TypeOopPtr* arg_type = arg->bottom_type()->isa_oopptr();
           const Type*       sig_type = TypeOopPtr::make_from_klass(signature->accessing_klass());
           if (arg_type != NULL && !arg_type->higher_equal(sig_type)) {
-            Node* cast_obj = gvn.transform(new (C, 2) CheckCastPPNode(kit.control(), arg, sig_type));
+            Node* cast_obj = gvn.transform(new (C) CheckCastPPNode(kit.control(), arg, sig_type));
             kit.set_argument(0, cast_obj);
           }
         }
@@ -648,7 +648,7 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod*
             const TypeOopPtr* arg_type = arg->bottom_type()->isa_oopptr();
             const Type*       sig_type = TypeOopPtr::make_from_klass(t->as_klass());
             if (arg_type != NULL && !arg_type->higher_equal(sig_type)) {
-              Node* cast_obj = gvn.transform(new (C, 2) CheckCastPPNode(kit.control(), arg, sig_type));
+              Node* cast_obj = gvn.transform(new (C) CheckCastPPNode(kit.control(), arg, sig_type));
               kit.set_argument(receiver_skip + i, cast_obj);
             }
           }
diff --git a/hotspot/src/share/vm/opto/callGenerator.hpp b/hotspot/src/share/vm/opto/callGenerator.hpp
index a578a425865..3cfd39df63e 100644
--- a/hotspot/src/share/vm/opto/callGenerator.hpp
+++ b/hotspot/src/share/vm/opto/callGenerator.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/opto/callnode.cpp b/hotspot/src/share/vm/opto/callnode.cpp
index 398497f9b61..067e9197d20 100644
--- a/hotspot/src/share/vm/opto/callnode.cpp
+++ b/hotspot/src/share/vm/opto/callnode.cpp
@@ -72,20 +72,20 @@ Node *StartNode::match( const ProjNode *proj, const Matcher *match ) {
   case TypeFunc::Control:
   case TypeFunc::I_O:
   case TypeFunc::Memory:
-    return new (match->C, 1) MachProjNode(this,proj->_con,RegMask::Empty,MachProjNode::unmatched_proj);
+    return new (match->C) MachProjNode(this,proj->_con,RegMask::Empty,MachProjNode::unmatched_proj);
   case TypeFunc::FramePtr:
-    return new (match->C, 1) MachProjNode(this,proj->_con,Matcher::c_frame_ptr_mask, Op_RegP);
+    return new (match->C) MachProjNode(this,proj->_con,Matcher::c_frame_ptr_mask, Op_RegP);
   case TypeFunc::ReturnAdr:
-    return new (match->C, 1) MachProjNode(this,proj->_con,match->_return_addr_mask,Op_RegP);
+    return new (match->C) MachProjNode(this,proj->_con,match->_return_addr_mask,Op_RegP);
   case TypeFunc::Parms:
   default: {
       uint parm_num = proj->_con - TypeFunc::Parms;
       const Type *t = _domain->field_at(proj->_con);
       if (t->base() == Type::Half)  // 2nd half of Longs and Doubles
-        return new (match->C, 1) ConNode(Type::TOP);
+        return new (match->C) ConNode(Type::TOP);
       uint ideal_reg = t->ideal_reg();
       RegMask &rm = match->_calling_convention_mask[parm_num];
-      return new (match->C, 1) MachProjNode(this,proj->_con,rm,ideal_reg);
+      return new (match->C) MachProjNode(this,proj->_con,rm,ideal_reg);
     }
   }
   return NULL;
@@ -625,12 +625,12 @@ Node *CallNode::match( const ProjNode *proj, const Matcher *match ) {
   case TypeFunc::Control:
   case TypeFunc::I_O:
   case TypeFunc::Memory:
-    return new (match->C, 1) MachProjNode(this,proj->_con,RegMask::Empty,MachProjNode::unmatched_proj);
+    return new (match->C) MachProjNode(this,proj->_con,RegMask::Empty,MachProjNode::unmatched_proj);
 
   case TypeFunc::Parms+1:       // For LONG & DOUBLE returns
     assert(tf()->_range->field_at(TypeFunc::Parms+1) == Type::HALF, "");
     // 2nd half of doubles and longs
-    return new (match->C, 1) MachProjNode(this,proj->_con, RegMask::Empty, (uint)OptoReg::Bad);
+    return new (match->C) MachProjNode(this,proj->_con, RegMask::Empty, (uint)OptoReg::Bad);
 
   case TypeFunc::Parms: {       // Normal returns
     uint ideal_reg = tf()->range()->field_at(TypeFunc::Parms)->ideal_reg();
@@ -640,7 +640,7 @@ Node *CallNode::match( const ProjNode *proj, const Matcher *match ) {
     RegMask rm = RegMask(regs.first());
     if( OptoReg::is_valid(regs.second()) )
       rm.Insert( regs.second() );
-    return new (match->C, 1) MachProjNode(this,proj->_con,rm,ideal_reg);
+    return new (match->C) MachProjNode(this,proj->_con,rm,ideal_reg);
   }
 
   case TypeFunc::ReturnAdr:
@@ -1175,10 +1175,10 @@ Node* AllocateArrayNode::Ideal(PhaseGVN *phase, bool can_reshape) {
         Node* nproj = catchproj->clone();
         igvn->register_new_node_with_optimizer(nproj);
 
-        Node *frame = new (phase->C, 1) ParmNode( phase->C->start(), TypeFunc::FramePtr );
+        Node *frame = new (phase->C) ParmNode( phase->C->start(), TypeFunc::FramePtr );
         frame = phase->transform(frame);
         // Halt & Catch Fire
-        Node *halt = new (phase->C, TypeFunc::Parms) HaltNode( nproj, frame );
+        Node *halt = new (phase->C) HaltNode( nproj, frame );
         phase->C->root()->add_req(halt);
         phase->transform(halt);
 
@@ -1218,7 +1218,7 @@ Node *AllocateArrayNode::make_ideal_length(const TypeOopPtr* oop_type, PhaseTran
       if (!allow_new_nodes) return NULL;
       // Create a cast which is control dependent on the initialization to
       // propagate the fact that the array length must be positive.
-      length = new (phase->C, 2) CastIINode(length, narrow_length_type);
+      length = new (phase->C) CastIINode(length, narrow_length_type);
       length->set_req(0, initialization()->proj_out(0));
     }
   }
diff --git a/hotspot/src/share/vm/opto/cfgnode.cpp b/hotspot/src/share/vm/opto/cfgnode.cpp
index 795673da240..24d51afd2fa 100644
--- a/hotspot/src/share/vm/opto/cfgnode.cpp
+++ b/hotspot/src/share/vm/opto/cfgnode.cpp
@@ -612,17 +612,17 @@ Node *RegionNode::Ideal(PhaseGVN *phase, bool can_reshape) {
                 convf2i->in(1) == bot_in ) {
                 // Matched pattern, including LShiftI; RShiftI, replace with integer compares
                 // max test
-                Node *cmp   = gvn->register_new_node_with_optimizer(new (phase->C, 3) CmpINode( convf2i, min ));
-                Node *boo   = gvn->register_new_node_with_optimizer(new (phase->C, 2) BoolNode( cmp, BoolTest::lt ));
-                IfNode *iff = (IfNode*)gvn->register_new_node_with_optimizer(new (phase->C, 2) IfNode( top_if->in(0), boo, PROB_UNLIKELY_MAG(5), top_if->_fcnt ));
-                Node *if_min= gvn->register_new_node_with_optimizer(new (phase->C, 1) IfTrueNode (iff));
-                Node *ifF   = gvn->register_new_node_with_optimizer(new (phase->C, 1) IfFalseNode(iff));
+                Node *cmp   = gvn->register_new_node_with_optimizer(new (phase->C) CmpINode( convf2i, min ));
+                Node *boo   = gvn->register_new_node_with_optimizer(new (phase->C) BoolNode( cmp, BoolTest::lt ));
+                IfNode *iff = (IfNode*)gvn->register_new_node_with_optimizer(new (phase->C) IfNode( top_if->in(0), boo, PROB_UNLIKELY_MAG(5), top_if->_fcnt ));
+                Node *if_min= gvn->register_new_node_with_optimizer(new (phase->C) IfTrueNode (iff));
+                Node *ifF   = gvn->register_new_node_with_optimizer(new (phase->C) IfFalseNode(iff));
                 // min test
-                cmp         = gvn->register_new_node_with_optimizer(new (phase->C, 3) CmpINode( convf2i, max ));
-                boo         = gvn->register_new_node_with_optimizer(new (phase->C, 2) BoolNode( cmp, BoolTest::gt ));
-                iff         = (IfNode*)gvn->register_new_node_with_optimizer(new (phase->C, 2) IfNode( ifF, boo, PROB_UNLIKELY_MAG(5), bot_if->_fcnt ));
-                Node *if_max= gvn->register_new_node_with_optimizer(new (phase->C, 1) IfTrueNode (iff));
-                ifF         = gvn->register_new_node_with_optimizer(new (phase->C, 1) IfFalseNode(iff));
+                cmp         = gvn->register_new_node_with_optimizer(new (phase->C) CmpINode( convf2i, max ));
+                boo         = gvn->register_new_node_with_optimizer(new (phase->C) BoolNode( cmp, BoolTest::gt ));
+                iff         = (IfNode*)gvn->register_new_node_with_optimizer(new (phase->C) IfNode( ifF, boo, PROB_UNLIKELY_MAG(5), bot_if->_fcnt ));
+                Node *if_max= gvn->register_new_node_with_optimizer(new (phase->C) IfTrueNode (iff));
+                ifF         = gvn->register_new_node_with_optimizer(new (phase->C) IfFalseNode(iff));
                 // update input edges to region node
                 set_req_X( min_idx, if_min, gvn );
                 set_req_X( max_idx, if_max, gvn );
@@ -681,7 +681,7 @@ const TypePtr* flatten_phi_adr_type(const TypePtr* at) {
 PhiNode* PhiNode::make(Node* r, Node* x, const Type *t, const TypePtr* at) {
   uint preds = r->req();   // Number of predecessor paths
   assert(t != Type::MEMORY || at == flatten_phi_adr_type(at), "flatten at");
-  PhiNode* p = new (Compile::current(), preds) PhiNode(r, t, at);
+  PhiNode* p = new (Compile::current()) PhiNode(r, t, at);
   for (uint j = 1; j < preds; j++) {
     // Fill in all inputs, except those which the region does not yet have
     if (r->in(j) != NULL)
@@ -699,7 +699,7 @@ PhiNode* PhiNode::make_blank(Node* r, Node* x) {
   const Type*    t  = x->bottom_type();
   const TypePtr* at = NULL;
   if (t == Type::MEMORY)  at = flatten_phi_adr_type(x->adr_type());
-  return new (Compile::current(), r->req()) PhiNode(r, t, at);
+  return new (Compile::current()) PhiNode(r, t, at);
 }
 
 
@@ -1205,9 +1205,9 @@ static Node *is_x2logic( PhaseGVN *phase, PhiNode *phi, int true_path ) {
   } else return NULL;
 
   // Build int->bool conversion
-  Node *n = new (phase->C, 2) Conv2BNode( cmp->in(1) );
+  Node *n = new (phase->C) Conv2BNode( cmp->in(1) );
   if( flipped )
-    n = new (phase->C, 3) XorINode( phase->transform(n), phase->intcon(1) );
+    n = new (phase->C) XorINode( phase->transform(n), phase->intcon(1) );
 
   return n;
 }
@@ -1266,9 +1266,9 @@ static Node* is_cond_add(PhaseGVN *phase, PhiNode *phi, int true_path) {
   if( q->is_Con() && phase->type(q) != TypeInt::ZERO && y->is_Con() )
     return NULL;
 
-  Node *cmplt = phase->transform( new (phase->C, 3) CmpLTMaskNode(p,q) );
-  Node *j_and   = phase->transform( new (phase->C, 3) AndINode(cmplt,y) );
-  return new (phase->C, 3) AddINode(j_and,x);
+  Node *cmplt = phase->transform( new (phase->C) CmpLTMaskNode(p,q) );
+  Node *j_and   = phase->transform( new (phase->C) AndINode(cmplt,y) );
+  return new (phase->C) AddINode(j_and,x);
 }
 
 //------------------------------is_absolute------------------------------------
@@ -1330,17 +1330,17 @@ static Node* is_absolute( PhaseGVN *phase, PhiNode *phi_root, int true_path) {
     if( sub->Opcode() != Op_SubF ||
         sub->in(2) != x ||
         phase->type(sub->in(1)) != tzero ) return NULL;
-    x = new (phase->C, 2) AbsFNode(x);
+    x = new (phase->C) AbsFNode(x);
     if (flip) {
-      x = new (phase->C, 3) SubFNode(sub->in(1), phase->transform(x));
+      x = new (phase->C) SubFNode(sub->in(1), phase->transform(x));
     }
   } else {
     if( sub->Opcode() != Op_SubD ||
         sub->in(2) != x ||
         phase->type(sub->in(1)) != tzero ) return NULL;
-    x = new (phase->C, 2) AbsDNode(x);
+    x = new (phase->C) AbsDNode(x);
     if (flip) {
-      x = new (phase->C, 3) SubDNode(sub->in(1), phase->transform(x));
+      x = new (phase->C) SubDNode(sub->in(1), phase->transform(x));
     }
   }
 
@@ -1386,7 +1386,7 @@ static Node* split_flow_path(PhaseGVN *phase, PhiNode *phi) {
     Node *n = phi->in(i);
     if( !n ) return NULL;
     if( phase->type(n) == Type::TOP ) return NULL;
-    if( n->Opcode() == Op_ConP || n->Opcode() == Op_ConN )
+    if( n->Opcode() == Op_ConP || n->Opcode() == Op_ConN || n->Opcode() == Op_ConNKlass )
       break;
   }
   if( i >= phi->req() )         // Only split for constants
@@ -1415,7 +1415,7 @@ static Node* split_flow_path(PhaseGVN *phase, PhiNode *phi) {
   // Now start splitting out the flow paths that merge the same value.
   // Split first the RegionNode.
   PhaseIterGVN *igvn = phase->is_IterGVN();
-  RegionNode *newr = new (phase->C, hit+1) RegionNode(hit+1);
+  RegionNode *newr = new (phase->C) RegionNode(hit+1);
   split_once(igvn, phi, val, r, newr);
 
   // Now split all other Phis than this one
@@ -1723,13 +1723,13 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) {
       }
       if (doit) {
         if (base == NULL) {
-          base = new (phase->C, in(0)->req()) PhiNode(in(0), type, NULL);
+          base = new (phase->C) PhiNode(in(0), type, NULL);
           for (uint i = 1; i < req(); i++) {
             base->init_req(i, in(i)->in(AddPNode::Base));
           }
           phase->is_IterGVN()->register_new_node_with_optimizer(base);
         }
-        return new (phase->C, 4) AddPNode(base, base, y);
+        return new (phase->C) AddPNode(base, base, y);
       }
     }
   }
@@ -1806,7 +1806,7 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) {
         // Phi(...MergeMem(m0, m1:AT1, m2:AT2)...) into
         //     MergeMem(Phi(...m0...), Phi:AT1(...m1...), Phi:AT2(...m2...))
         PhaseIterGVN *igvn = phase->is_IterGVN();
-        Node* hook = new (phase->C, 1) Node(1);
+        Node* hook = new (phase->C) Node(1);
         PhiNode* new_base = (PhiNode*) clone();
         // Must eagerly register phis, since they participate in loops.
         if (igvn) {
@@ -1875,17 +1875,19 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   }
 
 #ifdef _LP64
-  // Push DecodeN down through phi.
+  // Push DecodeN/DecodeNKlass down through phi.
   // The rest of phi graph will transform by split EncodeP node though phis up.
-  if (UseCompressedOops && can_reshape && progress == NULL) {
+  if ((UseCompressedOops || UseCompressedKlassPointers) && can_reshape && progress == NULL) {
     bool may_push = true;
     bool has_decodeN = false;
+    bool is_decodeN = false;
     for (uint i=1; i<req(); ++i) {// For all paths in
       Node *ii = in(i);
-      if (ii->is_DecodeN() && ii->bottom_type() == bottom_type()) {
+      if (ii->is_DecodeNarrowPtr() && ii->bottom_type() == bottom_type()) {
         // Do optimization if a non dead path exist.
         if (ii->in(1)->bottom_type() != Type::TOP) {
           has_decodeN = true;
+          is_decodeN = ii->is_DecodeN();
         }
       } else if (!ii->is_Phi()) {
         may_push = false;
@@ -1895,13 +1897,18 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     if (has_decodeN && may_push) {
       PhaseIterGVN *igvn = phase->is_IterGVN();
       // Make narrow type for new phi.
-      const Type* narrow_t = TypeNarrowOop::make(this->bottom_type()->is_ptr());
-      PhiNode* new_phi = new (phase->C, r->req()) PhiNode(r, narrow_t);
+      const Type* narrow_t;
+      if (is_decodeN) {
+        narrow_t = TypeNarrowOop::make(this->bottom_type()->is_ptr());
+      } else {
+        narrow_t = TypeNarrowKlass::make(this->bottom_type()->is_ptr());
+      }
+      PhiNode* new_phi = new (phase->C) PhiNode(r, narrow_t);
       uint orig_cnt = req();
       for (uint i=1; i<req(); ++i) {// For all paths in
         Node *ii = in(i);
         Node* new_ii = NULL;
-        if (ii->is_DecodeN()) {
+        if (ii->is_DecodeNarrowPtr()) {
           assert(ii->bottom_type() == bottom_type(), "sanity");
           new_ii = ii->in(1);
         } else {
@@ -1909,14 +1916,22 @@ Node *PhiNode::Ideal(PhaseGVN *phase, bool can_reshape) {
           if (ii->as_Phi() == this) {
             new_ii = new_phi;
           } else {
-            new_ii = new (phase->C, 2) EncodePNode(ii, narrow_t);
+            if (is_decodeN) {
+              new_ii = new (phase->C) EncodePNode(ii, narrow_t);
+            } else {
+              new_ii = new (phase->C) EncodePKlassNode(ii, narrow_t);
+            }
             igvn->register_new_node_with_optimizer(new_ii);
           }
         }
         new_phi->set_req(i, new_ii);
       }
       igvn->register_new_node_with_optimizer(new_phi, this);
-      progress = new (phase->C, 2) DecodeNNode(new_phi, bottom_type());
+      if (is_decodeN) {
+        progress = new (phase->C) DecodeNNode(new_phi, bottom_type());
+      } else {
+        progress = new (phase->C) DecodeNKlassNode(new_phi, bottom_type());
+      }
     }
   }
 #endif
diff --git a/hotspot/src/share/vm/opto/chaitin.cpp b/hotspot/src/share/vm/opto/chaitin.cpp
index 9e5234de615..e626a10d875 100644
--- a/hotspot/src/share/vm/opto/chaitin.cpp
+++ b/hotspot/src/share/vm/opto/chaitin.cpp
@@ -1588,7 +1588,7 @@ Node *PhaseChaitin::find_base_for_derived( Node **derived_base_map, Node *derive
 
   // Now we see we need a base-Phi here to merge the bases
   const Type *t = base->bottom_type();
-  base = new (C, derived->req()) PhiNode( derived->in(0), t );
+  base = new (C) PhiNode( derived->in(0), t );
   for( i = 1; i < derived->req(); i++ ) {
     base->init_req(i, find_base_for_derived(derived_base_map, derived->in(i), maxlrg));
     t = t->meet(base->in(i)->bottom_type());
diff --git a/hotspot/src/share/vm/opto/classes.hpp b/hotspot/src/share/vm/opto/classes.hpp
index 02c62f68ac7..3f726991dd0 100644
--- a/hotspot/src/share/vm/opto/classes.hpp
+++ b/hotspot/src/share/vm/opto/classes.hpp
@@ -83,8 +83,15 @@ macro(CompareAndSwapI)
 macro(CompareAndSwapL)
 macro(CompareAndSwapP)
 macro(CompareAndSwapN)
+macro(GetAndAddI)
+macro(GetAndAddL)
+macro(GetAndSetI)
+macro(GetAndSetL)
+macro(GetAndSetP)
+macro(GetAndSetN)
 macro(Con)
 macro(ConN)
+macro(ConNKlass)
 macro(ConD)
 macro(ConF)
 macro(ConI)
@@ -112,6 +119,7 @@ macro(CountTrailingZerosI)
 macro(CountTrailingZerosL)
 macro(CreateEx)
 macro(DecodeN)
+macro(DecodeNKlass)
 macro(DivD)
 macro(DivF)
 macro(DivI)
@@ -120,6 +128,7 @@ macro(DivMod)
 macro(DivModI)
 macro(DivModL)
 macro(EncodeP)
+macro(EncodePKlass)
 macro(ExpD)
 macro(FastLock)
 macro(FastUnlock)
@@ -141,7 +150,6 @@ macro(LoadD)
 macro(LoadD_unaligned)
 macro(LoadF)
 macro(LoadI)
-macro(LoadUI2L)
 macro(LoadKlass)
 macro(LoadNKlass)
 macro(LoadL)
@@ -227,6 +235,7 @@ macro(StoreI)
 macro(StoreL)
 macro(StoreP)
 macro(StoreN)
+macro(StoreNKlass)
 macro(StrComp)
 macro(StrEquals)
 macro(StrIndexOf)
@@ -262,6 +271,8 @@ macro(MulVF)
 macro(MulVD)
 macro(DivVF)
 macro(DivVD)
+macro(LShiftCntV)
+macro(RShiftCntV)
 macro(LShiftVB)
 macro(LShiftVS)
 macro(LShiftVI)
diff --git a/hotspot/src/share/vm/opto/compile.cpp b/hotspot/src/share/vm/opto/compile.cpp
index 292c52412a9..d870872a9d4 100644
--- a/hotspot/src/share/vm/opto/compile.cpp
+++ b/hotspot/src/share/vm/opto/compile.cpp
@@ -654,14 +654,14 @@ Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr
       const TypeTuple *domain = StartOSRNode::osr_domain();
       const TypeTuple *range = TypeTuple::make_range(method()->signature());
       init_tf(TypeFunc::make(domain, range));
-      StartNode* s = new (this, 2) StartOSRNode(root(), domain);
+      StartNode* s = new (this) StartOSRNode(root(), domain);
       initial_gvn()->set_type_bottom(s);
       init_start(s);
       cg = CallGenerator::for_osr(method(), entry_bci());
     } else {
       // Normal case.
       init_tf(TypeFunc::make(method()));
-      StartNode* s = new (this, 2) StartNode(root(), tf()->domain());
+      StartNode* s = new (this) StartNode(root(), tf()->domain());
       initial_gvn()->set_type_bottom(s);
       init_start(s);
       if (method()->intrinsic_id() == vmIntrinsics::_Reference_get && UseG1GC) {
@@ -825,8 +825,12 @@ Compile::Compile( ciEnv* ci_env, C2Compiler* compiler, ciMethod* target, int osr
                            &_handler_table, &_inc_table,
                            compiler,
                            env()->comp_level(),
-                           has_unsafe_access()
+                           has_unsafe_access(),
+                           SharedRuntime::is_wide_vector(max_vector_size())
                            );
+
+    if (log() != NULL) // Print code cache state into compiler log
+      log()->code_cache_state();
   }
 }
 
@@ -946,9 +950,9 @@ void Compile::Init(int aliaslevel) {
   // Globally visible Nodes
   // First set TOP to NULL to give safe behavior during creation of RootNode
   set_cached_top_node(NULL);
-  set_root(new (this, 3) RootNode());
+  set_root(new (this) RootNode());
   // Now that you have a Root to point to, create the real TOP
-  set_cached_top_node( new (this, 1) ConNode(Type::TOP) );
+  set_cached_top_node( new (this) ConNode(Type::TOP) );
   set_recent_alloc(NULL, NULL);
 
   // Create Debug Information Recorder to record scopes, oopmaps, etc.
@@ -963,6 +967,7 @@ void Compile::Init(int aliaslevel) {
   _trap_can_recompile = false;  // no traps emitted yet
   _major_progress = true; // start out assuming good things will happen
   set_has_unsafe_access(false);
+  set_max_vector_size(0);
   Copy::zero_to_bytes(_trap_hist, sizeof(_trap_hist));
   set_decompile_count(0);
 
@@ -2234,6 +2239,7 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc ) {
           nop != Op_CreateEx &&
           nop != Op_CheckCastPP &&
           nop != Op_DecodeN &&
+          nop != Op_DecodeNKlass &&
           !n->is_Mem() ) {
         Node *x = n->clone();
         call->set_req( TypeFunc::Parms, x );
@@ -2274,13 +2280,19 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc ) {
   case Op_CompareAndSwapL:
   case Op_CompareAndSwapP:
   case Op_CompareAndSwapN:
+  case Op_GetAndAddI:
+  case Op_GetAndAddL:
+  case Op_GetAndSetI:
+  case Op_GetAndSetL:
+  case Op_GetAndSetP:
+  case Op_GetAndSetN:
   case Op_StoreP:
   case Op_StoreN:
+  case Op_StoreNKlass:
   case Op_LoadB:
   case Op_LoadUB:
   case Op_LoadUS:
   case Op_LoadI:
-  case Op_LoadUI2L:
   case Op_LoadKlass:
   case Op_LoadNKlass:
   case Op_LoadL:
@@ -2310,7 +2322,7 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc ) {
             addp->in(AddPNode::Base) == n->in(AddPNode::Base),
             "Base pointers must match" );
 #ifdef _LP64
-    if (UseCompressedOops &&
+    if ((UseCompressedOops || UseCompressedKlassPointers) &&
         addp->Opcode() == Op_ConP &&
         addp == n->in(AddPNode::Base) &&
         n->in(AddPNode::Offset)->is_Con()) {
@@ -2319,16 +2331,18 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc ) {
       // instructions (4) then load 64-bits constant (7).
       // Do this transformation here since IGVN will convert ConN back to ConP.
       const Type* t = addp->bottom_type();
-      if (t->isa_oopptr()) {
+      if (t->isa_oopptr() || t->isa_klassptr()) {
         Node* nn = NULL;
 
+        int op = t->isa_oopptr() ? Op_ConN : Op_ConNKlass;
+
         // Look for existing ConN node of the same exact type.
         Compile* C = Compile::current();
         Node* r  = C->root();
         uint cnt = r->outcnt();
         for (uint i = 0; i < cnt; i++) {
           Node* m = r->raw_out(i);
-          if (m!= NULL && m->Opcode() == Op_ConN &&
+          if (m!= NULL && m->Opcode() == op &&
               m->bottom_type()->make_ptr() == t) {
             nn = m;
             break;
@@ -2337,7 +2351,11 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc ) {
         if (nn != NULL) {
           // Decode a narrow oop to match address
           // [R12 + narrow_oop_reg<<3 + offset]
-          nn = new (C,  2) DecodeNNode(nn, t);
+          if (t->isa_oopptr()) {
+            nn = new (C) DecodeNNode(nn, t);
+          } else {
+            nn = new (C) DecodeNKlassNode(nn, t);
+          }
           n->set_req(AddPNode::Base, nn);
           n->set_req(AddPNode::Address, nn);
           if (addp->outcnt() == 0) {
@@ -2392,22 +2410,24 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc ) {
   case Op_CmpP:
     // Do this transformation here to preserve CmpPNode::sub() and
     // other TypePtr related Ideal optimizations (for example, ptr nullness).
-    if (n->in(1)->is_DecodeN() || n->in(2)->is_DecodeN()) {
+    if (n->in(1)->is_DecodeNarrowPtr() || n->in(2)->is_DecodeNarrowPtr()) {
       Node* in1 = n->in(1);
       Node* in2 = n->in(2);
-      if (!in1->is_DecodeN()) {
+      if (!in1->is_DecodeNarrowPtr()) {
         in2 = in1;
         in1 = n->in(2);
       }
-      assert(in1->is_DecodeN(), "sanity");
+      assert(in1->is_DecodeNarrowPtr(), "sanity");
 
       Compile* C = Compile::current();
       Node* new_in2 = NULL;
-      if (in2->is_DecodeN()) {
+      if (in2->is_DecodeNarrowPtr()) {
+        assert(in2->Opcode() == in1->Opcode(), "must be same node type");
         new_in2 = in2->in(1);
       } else if (in2->Opcode() == Op_ConP) {
         const Type* t = in2->bottom_type();
         if (t == TypePtr::NULL_PTR) {
+          assert(in1->is_DecodeN(), "compare klass to null?");
           // Don't convert CmpP null check into CmpN if compressed
           // oops implicit null check is not generated.
           // This will allow to generate normal oop implicit null check.
@@ -2452,10 +2472,12 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc ) {
           //
         } else if (t->isa_oopptr()) {
           new_in2 = ConNode::make(C, t->make_narrowoop());
+        } else if (t->isa_klassptr()) {
+          new_in2 = ConNode::make(C, t->make_narrowklass());
         }
       }
       if (new_in2 != NULL) {
-        Node* cmpN = new (C, 3) CmpNNode(in1->in(1), new_in2);
+        Node* cmpN = new (C) CmpNNode(in1->in(1), new_in2);
         n->subsume_by( cmpN );
         if (in1->outcnt() == 0) {
           in1->disconnect_inputs(NULL);
@@ -2468,23 +2490,28 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc ) {
     break;
 
   case Op_DecodeN:
-    assert(!n->in(1)->is_EncodeP(), "should be optimized out");
+  case Op_DecodeNKlass:
+    assert(!n->in(1)->is_EncodeNarrowPtr(), "should be optimized out");
     // DecodeN could be pinned when it can't be fold into
     // an address expression, see the code for Op_CastPP above.
-    assert(n->in(0) == NULL || !Matcher::narrow_oop_use_complex_address(), "no control");
+    assert(n->in(0) == NULL || (UseCompressedOops && !Matcher::narrow_oop_use_complex_address()), "no control");
     break;
 
-  case Op_EncodeP: {
+  case Op_EncodeP:
+  case Op_EncodePKlass: {
     Node* in1 = n->in(1);
-    if (in1->is_DecodeN()) {
+    if (in1->is_DecodeNarrowPtr()) {
       n->subsume_by(in1->in(1));
     } else if (in1->Opcode() == Op_ConP) {
       Compile* C = Compile::current();
       const Type* t = in1->bottom_type();
       if (t == TypePtr::NULL_PTR) {
+        assert(t->isa_oopptr(), "null klass?");
         n->subsume_by(ConNode::make(C, TypeNarrowOop::NULL_PTR));
       } else if (t->isa_oopptr()) {
         n->subsume_by(ConNode::make(C, t->make_narrowoop()));
+      } else if (t->isa_klassptr()) {
+        n->subsume_by(ConNode::make(C, t->make_narrowklass()));
       }
     }
     if (in1->outcnt() == 0) {
@@ -2518,7 +2545,7 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc ) {
   }
 
   case Op_Phi:
-    if (n->as_Phi()->bottom_type()->isa_narrowoop()) {
+    if (n->as_Phi()->bottom_type()->isa_narrowoop() || n->as_Phi()->bottom_type()->isa_narrowklass()) {
       // The EncodeP optimization may create Phi with the same edges
       // for all paths. It is not handled well by Register Allocator.
       Node* unique_in = n->in(1);
@@ -2551,8 +2578,8 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc ) {
           n->subsume_by(divmod->mod_proj());
         } else {
           // replace a%b with a-((a/b)*b)
-          Node* mult = new (C, 3) MulINode(d, d->in(2));
-          Node* sub  = new (C, 3) SubINode(d->in(1), mult);
+          Node* mult = new (C) MulINode(d, d->in(2));
+          Node* sub  = new (C) SubINode(d->in(1), mult);
           n->subsume_by( sub );
         }
       }
@@ -2572,8 +2599,8 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc ) {
           n->subsume_by(divmod->mod_proj());
         } else {
           // replace a%b with a-((a/b)*b)
-          Node* mult = new (C, 3) MulLNode(d, d->in(2));
-          Node* sub  = new (C, 3) SubLNode(d->in(1), mult);
+          Node* mult = new (C) MulLNode(d, d->in(2));
+          Node* sub  = new (C) SubLNode(d->in(1), mult);
           n->subsume_by( sub );
         }
       }
@@ -2624,7 +2651,7 @@ static void final_graph_reshaping_impl( Node *n, Final_Reshape_Counts &frc ) {
       } else {
         if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
           Compile* C = Compile::current();
-          Node* shift = new (C, 3) AndINode(in2, ConNode::make(C, TypeInt::make(mask)));
+          Node* shift = new (C) AndINode(in2, ConNode::make(C, TypeInt::make(mask)));
           n->set_req(2, shift);
         }
       }
@@ -2681,12 +2708,13 @@ static void final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Re
   }
 
   // Skip next transformation if compressed oops are not used.
-  if (!UseCompressedOops || !Matcher::gen_narrow_oop_implicit_null_checks())
+  if ((UseCompressedOops && !Matcher::gen_narrow_oop_implicit_null_checks()) ||
+      (!UseCompressedOops && !UseCompressedKlassPointers))
     return;
 
-  // Go over safepoints nodes to skip DecodeN nodes for debug edges.
+  // Go over safepoints nodes to skip DecodeN/DecodeNKlass nodes for debug edges.
   // It could be done for an uncommon traps or any safepoints/calls
-  // if the DecodeN node is referenced only in a debug info.
+  // if the DecodeN/DecodeNKlass node is referenced only in a debug info.
   while (sfpt.size() > 0) {
     n = sfpt.pop();
     JVMState *jvms = n->as_SafePoint()->jvms();
@@ -2697,7 +2725,7 @@ static void final_graph_reshaping_walk( Node_Stack &nstack, Node *root, Final_Re
                         n->as_CallStaticJava()->uncommon_trap_request() != 0);
     for (int j = start; j < end; j++) {
       Node* in = n->in(j);
-      if (in->is_DecodeN()) {
+      if (in->is_DecodeNarrowPtr()) {
         bool safe_to_skip = true;
         if (!is_uncommon ) {
           // Is it safe to skip?
diff --git a/hotspot/src/share/vm/opto/compile.hpp b/hotspot/src/share/vm/opto/compile.hpp
index a594b0913d9..6bcf3d3da20 100644
--- a/hotspot/src/share/vm/opto/compile.hpp
+++ b/hotspot/src/share/vm/opto/compile.hpp
@@ -279,6 +279,7 @@ class Compile : public Phase {
   bool                  _has_split_ifs;         // True if the method _may_ have some split-if
   bool                  _has_unsafe_access;     // True if the method _may_ produce faults in unsafe loads or stores.
   bool                  _has_stringbuilder;     // True StringBuffers or StringBuilders are allocated
+  int                   _max_vector_size;       // Maximum size of generated vectors
   uint                  _trap_hist[trapHistLength];  // Cumulative traps
   bool                  _trap_can_recompile;    // Have we emitted a recompiling trap?
   uint                  _decompile_count;       // Cumulative decompilation counts.
@@ -443,6 +444,8 @@ class Compile : public Phase {
   void          set_has_unsafe_access(bool z)   { _has_unsafe_access = z; }
   bool              has_stringbuilder() const   { return _has_stringbuilder; }
   void          set_has_stringbuilder(bool z)   { _has_stringbuilder = z; }
+  int               max_vector_size() const     { return _max_vector_size; }
+  void          set_max_vector_size(int s)      { _max_vector_size = s; }
   void          set_trap_count(uint r, uint c)  { assert(r < trapHistLength, "oob");        _trap_hist[r] = c; }
   uint              trap_count(uint r) const    { assert(r < trapHistLength, "oob"); return _trap_hist[r]; }
   bool              trap_can_recompile() const  { return _trap_can_recompile; }
diff --git a/hotspot/src/share/vm/opto/connode.cpp b/hotspot/src/share/vm/opto/connode.cpp
index e038ccbc2d3..3ba08ae5cb0 100644
--- a/hotspot/src/share/vm/opto/connode.cpp
+++ b/hotspot/src/share/vm/opto/connode.cpp
@@ -45,16 +45,17 @@ uint ConNode::hash() const {
 //------------------------------make-------------------------------------------
 ConNode *ConNode::make( Compile* C, const Type *t ) {
   switch( t->basic_type() ) {
-  case T_INT:       return new (C, 1) ConINode( t->is_int() );
-  case T_LONG:      return new (C, 1) ConLNode( t->is_long() );
-  case T_FLOAT:     return new (C, 1) ConFNode( t->is_float_constant() );
-  case T_DOUBLE:    return new (C, 1) ConDNode( t->is_double_constant() );
-  case T_VOID:      return new (C, 1) ConNode ( Type::TOP );
-  case T_OBJECT:    return new (C, 1) ConPNode( t->is_ptr() );
-  case T_ARRAY:     return new (C, 1) ConPNode( t->is_aryptr() );
-  case T_ADDRESS:   return new (C, 1) ConPNode( t->is_ptr() );
-  case T_NARROWOOP: return new (C, 1) ConNNode( t->is_narrowoop() );
-  case T_METADATA:  return new (C, 1) ConPNode( t->is_ptr() );
+  case T_INT:         return new (C) ConINode( t->is_int() );
+  case T_LONG:        return new (C) ConLNode( t->is_long() );
+  case T_FLOAT:       return new (C) ConFNode( t->is_float_constant() );
+  case T_DOUBLE:      return new (C) ConDNode( t->is_double_constant() );
+  case T_VOID:        return new (C) ConNode ( Type::TOP );
+  case T_OBJECT:      return new (C) ConPNode( t->is_ptr() );
+  case T_ARRAY:       return new (C) ConPNode( t->is_aryptr() );
+  case T_ADDRESS:     return new (C) ConPNode( t->is_ptr() );
+  case T_NARROWOOP:   return new (C) ConNNode( t->is_narrowoop() );
+  case T_NARROWKLASS: return new (C) ConNKlassNode( t->is_narrowklass() );
+  case T_METADATA:    return new (C) ConPNode( t->is_ptr() );
     // Expected cases:  TypePtr::NULL_PTR, any is_rawptr()
     // Also seen: AnyPtr(TopPTR *+top); from command line:
     //   r -XX:+PrintOpto -XX:CIStart=285 -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=660
@@ -195,13 +196,13 @@ const Type *CMoveNode::Value( PhaseTransform *phase ) const {
 // from the inputs we do not need to specify it here.
 CMoveNode *CMoveNode::make( Compile *C, Node *c, Node *bol, Node *left, Node *right, const Type *t ) {
   switch( t->basic_type() ) {
-  case T_INT:     return new (C, 4) CMoveINode( bol, left, right, t->is_int() );
-  case T_FLOAT:   return new (C, 4) CMoveFNode( bol, left, right, t );
-  case T_DOUBLE:  return new (C, 4) CMoveDNode( bol, left, right, t );
-  case T_LONG:    return new (C, 4) CMoveLNode( bol, left, right, t->is_long() );
-  case T_OBJECT:  return new (C, 4) CMovePNode( c, bol, left, right, t->is_oopptr() );
-  case T_ADDRESS: return new (C, 4) CMovePNode( c, bol, left, right, t->is_ptr() );
-  case T_NARROWOOP: return new (C, 4) CMoveNNode( c, bol, left, right, t );
+  case T_INT:     return new (C) CMoveINode( bol, left, right, t->is_int() );
+  case T_FLOAT:   return new (C) CMoveFNode( bol, left, right, t );
+  case T_DOUBLE:  return new (C) CMoveDNode( bol, left, right, t );
+  case T_LONG:    return new (C) CMoveLNode( bol, left, right, t->is_long() );
+  case T_OBJECT:  return new (C) CMovePNode( c, bol, left, right, t->is_oopptr() );
+  case T_ADDRESS: return new (C) CMovePNode( c, bol, left, right, t->is_ptr() );
+  case T_NARROWOOP: return new (C) CMoveNNode( c, bol, left, right, t );
   default:
     ShouldNotReachHere();
     return NULL;
@@ -268,9 +269,9 @@ Node *CMoveINode::Ideal(PhaseGVN *phase, bool can_reshape) {
 #ifndef PRODUCT
   if( PrintOpto ) tty->print_cr("CMOV to I2B");
 #endif
-  Node *n = new (phase->C, 2) Conv2BNode( cmp->in(1) );
+  Node *n = new (phase->C) Conv2BNode( cmp->in(1) );
   if( flip )
-    n = new (phase->C, 3) XorINode( phase->transform(n), phase->intcon(1) );
+    n = new (phase->C) XorINode( phase->transform(n), phase->intcon(1) );
 
   return n;
 }
@@ -324,9 +325,9 @@ Node *CMoveFNode::Ideal(PhaseGVN *phase, bool can_reshape) {
       sub->in(2) != X ||
       phase->type(sub->in(1)) != TypeF::ZERO ) return NULL;
 
-  Node *abs = new (phase->C, 2) AbsFNode( X );
+  Node *abs = new (phase->C) AbsFNode( X );
   if( flip )
-    abs = new (phase->C, 3) SubFNode(sub->in(1), phase->transform(abs));
+    abs = new (phase->C) SubFNode(sub->in(1), phase->transform(abs));
 
   return abs;
 }
@@ -380,9 +381,9 @@ Node *CMoveDNode::Ideal(PhaseGVN *phase, bool can_reshape) {
       sub->in(2) != X ||
       phase->type(sub->in(1)) != TypeD::ZERO ) return NULL;
 
-  Node *abs = new (phase->C, 2) AbsDNode( X );
+  Node *abs = new (phase->C) AbsDNode( X );
   if( flip )
-    abs = new (phase->C, 3) SubDNode(sub->in(1), phase->transform(abs));
+    abs = new (phase->C) SubDNode(sub->in(1), phase->transform(abs));
 
   return abs;
 }
@@ -447,7 +448,7 @@ Node *ConstraintCastNode::Ideal_DU_postCCP( PhaseCCP *ccp ) {
 // If not converting int->oop, throw away cast after constant propagation
 Node *CastPPNode::Ideal_DU_postCCP( PhaseCCP *ccp ) {
   const Type *t = ccp->type(in(1));
-  if (!t->isa_oop_ptr() || (in(1)->is_DecodeN() && Matcher::gen_narrow_oop_implicit_null_checks())) {
+  if (!t->isa_oop_ptr() || ((in(1)->is_DecodeN()) && Matcher::gen_narrow_oop_implicit_null_checks())) {
     return NULL; // do not transform raw pointers or narrow oops
   }
   return ConstraintCastNode::Ideal_DU_postCCP(ccp);
@@ -480,7 +481,9 @@ static bool can_cause_alias(Node *n, PhaseTransform *phase) {
         opc == Op_CheckCastPP ||
         opc == Op_StorePConditional ||
         opc == Op_CompareAndSwapP ||
-        opc == Op_CompareAndSwapN;
+        opc == Op_CompareAndSwapN ||
+        opc == Op_GetAndSetP ||
+        opc == Op_GetAndSetN;
   }
   return possible_alias;
 }
@@ -605,15 +608,56 @@ const Type *EncodePNode::Value( PhaseTransform *phase ) const {
   if (t == Type::TOP) return Type::TOP;
   if (t == TypePtr::NULL_PTR) return TypeNarrowOop::NULL_PTR;
 
-  assert(t->isa_oop_ptr() || UseCompressedKlassPointers && t->isa_klassptr(), "only oopptr here");
+  assert(t->isa_oop_ptr(), "only oopptr here");
   return t->make_narrowoop();
 }
 
 
-Node *EncodePNode::Ideal_DU_postCCP( PhaseCCP *ccp ) {
+Node *EncodeNarrowPtrNode::Ideal_DU_postCCP( PhaseCCP *ccp ) {
   return MemNode::Ideal_common_DU_postCCP(ccp, this, in(1));
 }
 
+Node* DecodeNKlassNode::Identity(PhaseTransform* phase) {
+  const Type *t = phase->type( in(1) );
+  if( t == Type::TOP ) return in(1);
+
+  if (in(1)->is_EncodePKlass()) {
+    // (DecodeNKlass (EncodePKlass p)) -> p
+    return in(1)->in(1);
+  }
+  return this;
+}
+
+const Type *DecodeNKlassNode::Value( PhaseTransform *phase ) const {
+  const Type *t = phase->type( in(1) );
+  if (t == Type::TOP) return Type::TOP;
+  assert(t != TypeNarrowKlass::NULL_PTR, "null klass?");
+
+  assert(t->isa_narrowklass(), "only narrow klass ptr here");
+  return t->make_ptr();
+}
+
+Node* EncodePKlassNode::Identity(PhaseTransform* phase) {
+  const Type *t = phase->type( in(1) );
+  if( t == Type::TOP ) return in(1);
+
+  if (in(1)->is_DecodeNKlass()) {
+    // (EncodePKlass (DecodeNKlass p)) -> p
+    return in(1)->in(1);
+  }
+  return this;
+}
+
+const Type *EncodePKlassNode::Value( PhaseTransform *phase ) const {
+  const Type *t = phase->type( in(1) );
+  if (t == Type::TOP) return Type::TOP;
+  assert (t != TypePtr::NULL_PTR, "null klass?");
+
+  assert(UseCompressedKlassPointers && t->isa_klassptr(), "only klass ptr here");
+  return t->make_narrowklass();
+}
+
+
 //=============================================================================
 //------------------------------Identity---------------------------------------
 Node *Conv2BNode::Identity( PhaseTransform *phase ) {
@@ -959,11 +1003,11 @@ Node *ConvI2LNode::Ideal(PhaseGVN *phase, bool can_reshape) {
       ryhi = -rylo0;
     }
 
-    Node* cx = phase->transform( new (phase->C, 2) ConvI2LNode(x, TypeLong::make(rxlo, rxhi, widen)) );
-    Node* cy = phase->transform( new (phase->C, 2) ConvI2LNode(y, TypeLong::make(rylo, ryhi, widen)) );
+    Node* cx = phase->transform( new (phase->C) ConvI2LNode(x, TypeLong::make(rxlo, rxhi, widen)) );
+    Node* cy = phase->transform( new (phase->C) ConvI2LNode(y, TypeLong::make(rylo, ryhi, widen)) );
     switch (op) {
-    case Op_AddI:  return new (phase->C, 3) AddLNode(cx, cy);
-    case Op_SubI:  return new (phase->C, 3) SubLNode(cx, cy);
+    case Op_AddI:  return new (phase->C) AddLNode(cx, cy);
+    case Op_SubI:  return new (phase->C) SubLNode(cx, cy);
     default:       ShouldNotReachHere();
     }
   }
@@ -1037,9 +1081,9 @@ Node *ConvL2INode::Ideal(PhaseGVN *phase, bool can_reshape) {
     assert( x != andl && y != andl, "dead loop in ConvL2INode::Ideal" );
     if (phase->type(x) == Type::TOP)  return NULL;
     if (phase->type(y) == Type::TOP)  return NULL;
-    Node *add1 = phase->transform(new (phase->C, 2) ConvL2INode(x));
-    Node *add2 = phase->transform(new (phase->C, 2) ConvL2INode(y));
-    return new (phase->C, 3) AddINode(add1,add2);
+    Node *add1 = phase->transform(new (phase->C) ConvL2INode(x));
+    Node *add2 = phase->transform(new (phase->C) ConvL2INode(y));
+    return new (phase->C) AddINode(add1,add2);
   }
 
   // Disable optimization: LoadL->ConvL2I ==> LoadI.
@@ -1076,10 +1120,10 @@ static inline Node* addP_of_X2P(PhaseGVN *phase,
                                 Node* dispX,
                                 bool negate = false) {
   if (negate) {
-    dispX = new (phase->C, 3) SubXNode(phase->MakeConX(0), phase->transform(dispX));
+    dispX = new (phase->C) SubXNode(phase->MakeConX(0), phase->transform(dispX));
   }
-  return new (phase->C, 4) AddPNode(phase->C->top(),
-                          phase->transform(new (phase->C, 2) CastX2PNode(base)),
+  return new (phase->C) AddPNode(phase->C->top(),
+                          phase->transform(new (phase->C) CastX2PNode(base)),
                           phase->transform(dispX));
 }
 
diff --git a/hotspot/src/share/vm/opto/connode.hpp b/hotspot/src/share/vm/opto/connode.hpp
index 78a4427f23f..53ff820d8d5 100644
--- a/hotspot/src/share/vm/opto/connode.hpp
+++ b/hotspot/src/share/vm/opto/connode.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -58,7 +58,7 @@ public:
 
   // Factory method:
   static ConINode* make( Compile* C, int con ) {
-    return new (C, 1) ConINode( TypeInt::make(con) );
+    return new (C) ConINode( TypeInt::make(con) );
   }
 
 };
@@ -73,9 +73,9 @@ public:
   // Factory methods:
   static ConPNode* make( Compile *C ,address con ) {
     if (con == NULL)
-      return new (C, 1) ConPNode( TypePtr::NULL_PTR ) ;
+      return new (C) ConPNode( TypePtr::NULL_PTR ) ;
     else
-      return new (C, 1) ConPNode( TypeRawPtr::make(con) );
+      return new (C) ConPNode( TypeRawPtr::make(con) );
   }
 };
 
@@ -88,6 +88,14 @@ public:
   virtual int Opcode() const;
 };
 
+//------------------------------ConNKlassNode---------------------------------
+// Simple narrow klass constants
+class ConNKlassNode : public ConNode {
+public:
+  ConNKlassNode( const TypeNarrowKlass *t ) : ConNode(t) {}
+  virtual int Opcode() const;
+};
+
 
 //------------------------------ConLNode---------------------------------------
 // Simple long constants
@@ -98,7 +106,7 @@ public:
 
   // Factory method:
   static ConLNode* make( Compile *C ,jlong con ) {
-    return new (C, 1) ConLNode( TypeLong::make(con) );
+    return new (C) ConLNode( TypeLong::make(con) );
   }
 
 };
@@ -112,7 +120,7 @@ public:
 
   // Factory method:
   static ConFNode* make( Compile *C, float con  ) {
-    return new (C, 1) ConFNode( TypeF::make(con) );
+    return new (C) ConFNode( TypeF::make(con) );
   }
 
 };
@@ -126,7 +134,7 @@ public:
 
   // Factory method:
   static ConDNode* make( Compile *C, double con ) {
-    return new (C, 1) ConDNode( TypeD::make(con) );
+    return new (C) ConDNode( TypeD::make(con) );
   }
 
 };
@@ -270,42 +278,91 @@ public:
 };
 
 
+//------------------------------EncodeNarrowPtr--------------------------------
+class EncodeNarrowPtrNode : public TypeNode {
+ protected:
+  EncodeNarrowPtrNode(Node* value, const Type* type):
+    TypeNode(type, 2) {
+    init_class_id(Class_EncodeNarrowPtr);
+    init_req(0, NULL);
+    init_req(1, value);
+  }
+ public:
+  virtual uint  ideal_reg() const { return Op_RegN; }
+  virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp );
+};
+
 //------------------------------EncodeP--------------------------------
 // Encodes an oop pointers into its compressed form
 // Takes an extra argument which is the real heap base as a long which
 // may be useful for code generation in the backend.
-class EncodePNode : public TypeNode {
+class EncodePNode : public EncodeNarrowPtrNode {
  public:
   EncodePNode(Node* value, const Type* type):
-    TypeNode(type, 2) {
+    EncodeNarrowPtrNode(value, type) {
     init_class_id(Class_EncodeP);
-    init_req(0, NULL);
-    init_req(1, value);
   }
   virtual int Opcode() const;
   virtual Node *Identity( PhaseTransform *phase );
   virtual const Type *Value( PhaseTransform *phase ) const;
-  virtual uint  ideal_reg() const { return Op_RegN; }
+};
 
-  virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp );
+//------------------------------EncodePKlass--------------------------------
+// Encodes a klass pointer into its compressed form
+// Takes an extra argument which is the real heap base as a long which
+// may be useful for code generation in the backend.
+class EncodePKlassNode : public EncodeNarrowPtrNode {
+ public:
+  EncodePKlassNode(Node* value, const Type* type):
+    EncodeNarrowPtrNode(value, type) {
+    init_class_id(Class_EncodePKlass);
+  }
+  virtual int Opcode() const;
+  virtual Node *Identity( PhaseTransform *phase );
+  virtual const Type *Value( PhaseTransform *phase ) const;
+};
+
+//------------------------------DecodeNarrowPtr--------------------------------
+class DecodeNarrowPtrNode : public TypeNode {
+ protected:
+  DecodeNarrowPtrNode(Node* value, const Type* type):
+    TypeNode(type, 2) {
+    init_class_id(Class_DecodeNarrowPtr);
+    init_req(0, NULL);
+    init_req(1, value);
+  }
+ public:
+  virtual uint  ideal_reg() const { return Op_RegP; }
 };
 
 //------------------------------DecodeN--------------------------------
 // Converts a narrow oop into a real oop ptr.
 // Takes an extra argument which is the real heap base as a long which
 // may be useful for code generation in the backend.
-class DecodeNNode : public TypeNode {
+class DecodeNNode : public DecodeNarrowPtrNode {
  public:
   DecodeNNode(Node* value, const Type* type):
-    TypeNode(type, 2) {
+    DecodeNarrowPtrNode(value, type) {
     init_class_id(Class_DecodeN);
-    init_req(0, NULL);
-    init_req(1, value);
   }
   virtual int Opcode() const;
-  virtual Node *Identity( PhaseTransform *phase );
   virtual const Type *Value( PhaseTransform *phase ) const;
-  virtual uint  ideal_reg() const { return Op_RegP; }
+  virtual Node *Identity( PhaseTransform *phase );
+};
+
+//------------------------------DecodeNKlass--------------------------------
+// Converts a narrow klass pointer into a real klass ptr.
+// Takes an extra argument which is the real heap base as a long which
+// may be useful for code generation in the backend.
+class DecodeNKlassNode : public DecodeNarrowPtrNode {
+ public:
+  DecodeNKlassNode(Node* value, const Type* type):
+    DecodeNarrowPtrNode(value, type) {
+    init_class_id(Class_DecodeNKlass);
+  }
+  virtual int Opcode() const;
+  virtual const Type *Value( PhaseTransform *phase ) const;
+  virtual Node *Identity( PhaseTransform *phase );
 };
 
 //------------------------------Conv2BNode-------------------------------------
diff --git a/hotspot/src/share/vm/opto/divnode.cpp b/hotspot/src/share/vm/opto/divnode.cpp
index 14fa0790bb6..24f4fcb7e9e 100644
--- a/hotspot/src/share/vm/opto/divnode.cpp
+++ b/hotspot/src/share/vm/opto/divnode.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -104,7 +104,7 @@ static Node *transform_int_divide( PhaseGVN *phase, Node *dividend, jint divisor
     // division by +/- 1
     if (!d_pos) {
       // Just negate the value
-      q = new (phase->C, 3) SubINode(phase->intcon(0), dividend);
+      q = new (phase->C) SubINode(phase->intcon(0), dividend);
     }
   } else if ( is_power_of_2(d) ) {
     // division by +/- a power of 2
@@ -141,18 +141,18 @@ static Node *transform_int_divide( PhaseGVN *phase, Node *dividend, jint divisor
       // (-2+3)>>2 becomes 0, etc.
 
       // Compute 0 or -1, based on sign bit
-      Node *sign = phase->transform(new (phase->C, 3) RShiftINode(dividend, phase->intcon(N - 1)));
+      Node *sign = phase->transform(new (phase->C) RShiftINode(dividend, phase->intcon(N - 1)));
       // Mask sign bit to the low sign bits
-      Node *round = phase->transform(new (phase->C, 3) URShiftINode(sign, phase->intcon(N - l)));
+      Node *round = phase->transform(new (phase->C) URShiftINode(sign, phase->intcon(N - l)));
       // Round up before shifting
-      dividend = phase->transform(new (phase->C, 3) AddINode(dividend, round));
+      dividend = phase->transform(new (phase->C) AddINode(dividend, round));
     }
 
     // Shift for division
-    q = new (phase->C, 3) RShiftINode(dividend, phase->intcon(l));
+    q = new (phase->C) RShiftINode(dividend, phase->intcon(l));
 
     if (!d_pos) {
-      q = new (phase->C, 3) SubINode(phase->intcon(0), phase->transform(q));
+      q = new (phase->C) SubINode(phase->intcon(0), phase->transform(q));
     }
   } else {
     // Attempt the jint constant divide -> multiply transform found in
@@ -164,33 +164,33 @@ static Node *transform_int_divide( PhaseGVN *phase, Node *dividend, jint divisor
     jint shift_const;
     if (magic_int_divide_constants(d, magic_const, shift_const)) {
       Node *magic = phase->longcon(magic_const);
-      Node *dividend_long = phase->transform(new (phase->C, 2) ConvI2LNode(dividend));
+      Node *dividend_long = phase->transform(new (phase->C) ConvI2LNode(dividend));
 
       // Compute the high half of the dividend x magic multiplication
-      Node *mul_hi = phase->transform(new (phase->C, 3) MulLNode(dividend_long, magic));
+      Node *mul_hi = phase->transform(new (phase->C) MulLNode(dividend_long, magic));
 
       if (magic_const < 0) {
-        mul_hi = phase->transform(new (phase->C, 3) RShiftLNode(mul_hi, phase->intcon(N)));
-        mul_hi = phase->transform(new (phase->C, 2) ConvL2INode(mul_hi));
+        mul_hi = phase->transform(new (phase->C) RShiftLNode(mul_hi, phase->intcon(N)));
+        mul_hi = phase->transform(new (phase->C) ConvL2INode(mul_hi));
 
         // The magic multiplier is too large for a 32 bit constant. We've adjusted
         // it down by 2^32, but have to add 1 dividend back in after the multiplication.
         // This handles the "overflow" case described by Granlund and Montgomery.
-        mul_hi = phase->transform(new (phase->C, 3) AddINode(dividend, mul_hi));
+        mul_hi = phase->transform(new (phase->C) AddINode(dividend, mul_hi));
 
         // Shift over the (adjusted) mulhi
         if (shift_const != 0) {
-          mul_hi = phase->transform(new (phase->C, 3) RShiftINode(mul_hi, phase->intcon(shift_const)));
+          mul_hi = phase->transform(new (phase->C) RShiftINode(mul_hi, phase->intcon(shift_const)));
         }
       } else {
         // No add is required, we can merge the shifts together.
-        mul_hi = phase->transform(new (phase->C, 3) RShiftLNode(mul_hi, phase->intcon(N + shift_const)));
-        mul_hi = phase->transform(new (phase->C, 2) ConvL2INode(mul_hi));
+        mul_hi = phase->transform(new (phase->C) RShiftLNode(mul_hi, phase->intcon(N + shift_const)));
+        mul_hi = phase->transform(new (phase->C) ConvL2INode(mul_hi));
       }
 
       // Get a 0 or -1 from the sign of the dividend.
       Node *addend0 = mul_hi;
-      Node *addend1 = phase->transform(new (phase->C, 3) RShiftINode(dividend, phase->intcon(N-1)));
+      Node *addend1 = phase->transform(new (phase->C) RShiftINode(dividend, phase->intcon(N-1)));
 
       // If the divisor is negative, swap the order of the input addends;
       // this has the effect of negating the quotient.
@@ -200,7 +200,7 @@ static Node *transform_int_divide( PhaseGVN *phase, Node *dividend, jint divisor
 
       // Adjust the final quotient by subtracting -1 (adding 1)
       // from the mul_hi.
-      q = new (phase->C, 3) SubINode(addend0, addend1);
+      q = new (phase->C) SubINode(addend0, addend1);
     }
   }
 
@@ -259,7 +259,7 @@ static Node* long_by_long_mulhi(PhaseGVN* phase, Node* dividend, jlong magic_con
   // no need to synthesize it in ideal nodes.
   if (Matcher::has_match_rule(Op_MulHiL)) {
     Node* v = phase->longcon(magic_const);
-    return new (phase->C, 3) MulHiLNode(dividend, v);
+    return new (phase->C) MulHiLNode(dividend, v);
   }
 
   // Taken from Hacker's Delight, Fig. 8-2. Multiply high signed.
@@ -285,11 +285,11 @@ static Node* long_by_long_mulhi(PhaseGVN* phase, Node* dividend, jlong magic_con
   const int N = 64;
 
   // Dummy node to keep intermediate nodes alive during construction
-  Node* hook = new (phase->C, 4) Node(4);
+  Node* hook = new (phase->C) Node(4);
 
   // u0 = u & 0xFFFFFFFF;  u1 = u >> 32;
-  Node* u0 = phase->transform(new (phase->C, 3) AndLNode(dividend, phase->longcon(0xFFFFFFFF)));
-  Node* u1 = phase->transform(new (phase->C, 3) RShiftLNode(dividend, phase->intcon(N / 2)));
+  Node* u0 = phase->transform(new (phase->C) AndLNode(dividend, phase->longcon(0xFFFFFFFF)));
+  Node* u1 = phase->transform(new (phase->C) RShiftLNode(dividend, phase->intcon(N / 2)));
   hook->init_req(0, u0);
   hook->init_req(1, u1);
 
@@ -298,29 +298,29 @@ static Node* long_by_long_mulhi(PhaseGVN* phase, Node* dividend, jlong magic_con
   Node* v1 = phase->longcon(magic_const >> (N / 2));
 
   // w0 = u0*v0;
-  Node* w0 = phase->transform(new (phase->C, 3) MulLNode(u0, v0));
+  Node* w0 = phase->transform(new (phase->C) MulLNode(u0, v0));
 
   // t = u1*v0 + (w0 >> 32);
-  Node* u1v0 = phase->transform(new (phase->C, 3) MulLNode(u1, v0));
-  Node* temp = phase->transform(new (phase->C, 3) URShiftLNode(w0, phase->intcon(N / 2)));
-  Node* t    = phase->transform(new (phase->C, 3) AddLNode(u1v0, temp));
+  Node* u1v0 = phase->transform(new (phase->C) MulLNode(u1, v0));
+  Node* temp = phase->transform(new (phase->C) URShiftLNode(w0, phase->intcon(N / 2)));
+  Node* t    = phase->transform(new (phase->C) AddLNode(u1v0, temp));
   hook->init_req(2, t);
 
   // w1 = t & 0xFFFFFFFF;
-  Node* w1 = phase->transform(new (phase->C, 3) AndLNode(t, phase->longcon(0xFFFFFFFF)));
+  Node* w1 = phase->transform(new (phase->C) AndLNode(t, phase->longcon(0xFFFFFFFF)));
   hook->init_req(3, w1);
 
   // w2 = t >> 32;
-  Node* w2 = phase->transform(new (phase->C, 3) RShiftLNode(t, phase->intcon(N / 2)));
+  Node* w2 = phase->transform(new (phase->C) RShiftLNode(t, phase->intcon(N / 2)));
 
   // w1 = u0*v1 + w1;
-  Node* u0v1 = phase->transform(new (phase->C, 3) MulLNode(u0, v1));
-  w1         = phase->transform(new (phase->C, 3) AddLNode(u0v1, w1));
+  Node* u0v1 = phase->transform(new (phase->C) MulLNode(u0, v1));
+  w1         = phase->transform(new (phase->C) AddLNode(u0v1, w1));
 
   // return u1*v1 + w2 + (w1 >> 32);
-  Node* u1v1  = phase->transform(new (phase->C, 3) MulLNode(u1, v1));
-  Node* temp1 = phase->transform(new (phase->C, 3) AddLNode(u1v1, w2));
-  Node* temp2 = phase->transform(new (phase->C, 3) RShiftLNode(w1, phase->intcon(N / 2)));
+  Node* u1v1  = phase->transform(new (phase->C) MulLNode(u1, v1));
+  Node* temp1 = phase->transform(new (phase->C) AddLNode(u1v1, w2));
+  Node* temp2 = phase->transform(new (phase->C) RShiftLNode(w1, phase->intcon(N / 2)));
 
   // Remove the bogus extra edges used to keep things alive
   PhaseIterGVN* igvn = phase->is_IterGVN();
@@ -332,7 +332,7 @@ static Node* long_by_long_mulhi(PhaseGVN* phase, Node* dividend, jlong magic_con
     }
   }
 
-  return new (phase->C, 3) AddLNode(temp1, temp2);
+  return new (phase->C) AddLNode(temp1, temp2);
 }
 
 
@@ -355,7 +355,7 @@ static Node *transform_long_divide( PhaseGVN *phase, Node *dividend, jlong divis
     // division by +/- 1
     if (!d_pos) {
       // Just negate the value
-      q = new (phase->C, 3) SubLNode(phase->longcon(0), dividend);
+      q = new (phase->C) SubLNode(phase->longcon(0), dividend);
     }
   } else if ( is_power_of_2_long(d) ) {
 
@@ -394,18 +394,18 @@ static Node *transform_long_divide( PhaseGVN *phase, Node *dividend, jlong divis
       // (-2+3)>>2 becomes 0, etc.
 
       // Compute 0 or -1, based on sign bit
-      Node *sign = phase->transform(new (phase->C, 3) RShiftLNode(dividend, phase->intcon(N - 1)));
+      Node *sign = phase->transform(new (phase->C) RShiftLNode(dividend, phase->intcon(N - 1)));
       // Mask sign bit to the low sign bits
-      Node *round = phase->transform(new (phase->C, 3) URShiftLNode(sign, phase->intcon(N - l)));
+      Node *round = phase->transform(new (phase->C) URShiftLNode(sign, phase->intcon(N - l)));
       // Round up before shifting
-      dividend = phase->transform(new (phase->C, 3) AddLNode(dividend, round));
+      dividend = phase->transform(new (phase->C) AddLNode(dividend, round));
     }
 
     // Shift for division
-    q = new (phase->C, 3) RShiftLNode(dividend, phase->intcon(l));
+    q = new (phase->C) RShiftLNode(dividend, phase->intcon(l));
 
     if (!d_pos) {
-      q = new (phase->C, 3) SubLNode(phase->longcon(0), phase->transform(q));
+      q = new (phase->C) SubLNode(phase->longcon(0), phase->transform(q));
     }
   } else if ( !Matcher::use_asm_for_ldiv_by_con(d) ) { // Use hardware DIV instruction when
                                                        // it is faster than code generated below.
@@ -425,17 +425,17 @@ static Node *transform_long_divide( PhaseGVN *phase, Node *dividend, jlong divis
         // The magic multiplier is too large for a 64 bit constant. We've adjusted
         // it down by 2^64, but have to add 1 dividend back in after the multiplication.
         // This handles the "overflow" case described by Granlund and Montgomery.
-        mul_hi = phase->transform(new (phase->C, 3) AddLNode(dividend, mul_hi));
+        mul_hi = phase->transform(new (phase->C) AddLNode(dividend, mul_hi));
       }
 
       // Shift over the (adjusted) mulhi
       if (shift_const != 0) {
-        mul_hi = phase->transform(new (phase->C, 3) RShiftLNode(mul_hi, phase->intcon(shift_const)));
+        mul_hi = phase->transform(new (phase->C) RShiftLNode(mul_hi, phase->intcon(shift_const)));
       }
 
       // Get a 0 or -1 from the sign of the dividend.
       Node *addend0 = mul_hi;
-      Node *addend1 = phase->transform(new (phase->C, 3) RShiftLNode(dividend, phase->intcon(N-1)));
+      Node *addend1 = phase->transform(new (phase->C) RShiftLNode(dividend, phase->intcon(N-1)));
 
       // If the divisor is negative, swap the order of the input addends;
       // this has the effect of negating the quotient.
@@ -445,7 +445,7 @@ static Node *transform_long_divide( PhaseGVN *phase, Node *dividend, jlong divis
 
       // Adjust the final quotient by subtracting -1 (adding 1)
       // from the mul_hi.
-      q = new (phase->C, 3) SubLNode(addend0, addend1);
+      q = new (phase->C) SubLNode(addend0, addend1);
     }
   }
 
@@ -735,7 +735,7 @@ Node *DivFNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   assert( frexp((double)reciprocal, &exp) == 0.5, "reciprocal should be power of 2" );
 
   // return multiplication by the reciprocal
-  return (new (phase->C, 3) MulFNode(in(1), phase->makecon(TypeF::make(reciprocal))));
+  return (new (phase->C) MulFNode(in(1), phase->makecon(TypeF::make(reciprocal))));
 }
 
 //=============================================================================
@@ -829,7 +829,7 @@ Node *DivDNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   assert( frexp(reciprocal, &exp) == 0.5, "reciprocal should be power of 2" );
 
   // return multiplication by the reciprocal
-  return (new (phase->C, 3) MulDNode(in(1), phase->makecon(TypeD::make(reciprocal))));
+  return (new (phase->C) MulDNode(in(1), phase->makecon(TypeD::make(reciprocal))));
 }
 
 //=============================================================================
@@ -856,7 +856,7 @@ Node *ModINode::Ideal(PhaseGVN *phase, bool can_reshape) {
   if( !ti->is_con() ) return NULL;
   jint con = ti->get_con();
 
-  Node *hook = new (phase->C, 1) Node(1);
+  Node *hook = new (phase->C) Node(1);
 
   // First, special check for modulo 2^k-1
   if( con >= 0 && con < max_jint && is_power_of_2(con+1) ) {
@@ -876,24 +876,24 @@ Node *ModINode::Ideal(PhaseGVN *phase, bool can_reshape) {
       hook->init_req(0, x);       // Add a use to x to prevent him from dying
       // Generate code to reduce X rapidly to nearly 2^k-1.
       for( int i = 0; i < trip_count; i++ ) {
-        Node *xl = phase->transform( new (phase->C, 3) AndINode(x,divisor) );
-        Node *xh = phase->transform( new (phase->C, 3) RShiftINode(x,phase->intcon(k)) ); // Must be signed
-        x = phase->transform( new (phase->C, 3) AddINode(xh,xl) );
+        Node *xl = phase->transform( new (phase->C) AndINode(x,divisor) );
+        Node *xh = phase->transform( new (phase->C) RShiftINode(x,phase->intcon(k)) ); // Must be signed
+        x = phase->transform( new (phase->C) AddINode(xh,xl) );
         hook->set_req(0, x);
       }
 
       // Generate sign-fixup code.  Was original value positive?
       // int hack_res = (i >= 0) ? divisor : 1;
-      Node *cmp1 = phase->transform( new (phase->C, 3) CmpINode( in(1), phase->intcon(0) ) );
-      Node *bol1 = phase->transform( new (phase->C, 2) BoolNode( cmp1, BoolTest::ge ) );
-      Node *cmov1= phase->transform( new (phase->C, 4) CMoveINode(bol1, phase->intcon(1), divisor, TypeInt::POS) );
+      Node *cmp1 = phase->transform( new (phase->C) CmpINode( in(1), phase->intcon(0) ) );
+      Node *bol1 = phase->transform( new (phase->C) BoolNode( cmp1, BoolTest::ge ) );
+      Node *cmov1= phase->transform( new (phase->C) CMoveINode(bol1, phase->intcon(1), divisor, TypeInt::POS) );
       // if( x >= hack_res ) x -= divisor;
-      Node *sub  = phase->transform( new (phase->C, 3) SubINode( x, divisor ) );
-      Node *cmp2 = phase->transform( new (phase->C, 3) CmpINode( x, cmov1 ) );
-      Node *bol2 = phase->transform( new (phase->C, 2) BoolNode( cmp2, BoolTest::ge ) );
+      Node *sub  = phase->transform( new (phase->C) SubINode( x, divisor ) );
+      Node *cmp2 = phase->transform( new (phase->C) CmpINode( x, cmov1 ) );
+      Node *bol2 = phase->transform( new (phase->C) BoolNode( cmp2, BoolTest::ge ) );
       // Convention is to not transform the return value of an Ideal
       // since Ideal is expected to return a modified 'this' or a new node.
-      Node *cmov2= new (phase->C, 4) CMoveINode(bol2, x, sub, TypeInt::INT);
+      Node *cmov2= new (phase->C) CMoveINode(bol2, x, sub, TypeInt::INT);
       // cmov2 is now the mod
 
       // Now remove the bogus extra edges used to keep things alive
@@ -916,7 +916,7 @@ Node *ModINode::Ideal(PhaseGVN *phase, bool can_reshape) {
   jint pos_con = (con >= 0) ? con : -con;
 
   // integer Mod 1 is always 0
-  if( pos_con == 1 ) return new (phase->C, 1) ConINode(TypeInt::ZERO);
+  if( pos_con == 1 ) return new (phase->C) ConINode(TypeInt::ZERO);
 
   int log2_con = -1;
 
@@ -929,7 +929,7 @@ Node *ModINode::Ideal(PhaseGVN *phase, bool can_reshape) {
 
     // See if this can be masked, if the dividend is non-negative
     if( dti && dti->_lo >= 0 )
-      return ( new (phase->C, 3) AndINode( in(1), phase->intcon( pos_con-1 ) ) );
+      return ( new (phase->C) AndINode( in(1), phase->intcon( pos_con-1 ) ) );
   }
 
   // Save in(1) so that it cannot be changed or deleted
@@ -944,12 +944,12 @@ Node *ModINode::Ideal(PhaseGVN *phase, bool can_reshape) {
     Node *mult = NULL;
 
     if( log2_con >= 0 )
-      mult = phase->transform( new (phase->C, 3) LShiftINode( divide, phase->intcon( log2_con ) ) );
+      mult = phase->transform( new (phase->C) LShiftINode( divide, phase->intcon( log2_con ) ) );
     else
-      mult = phase->transform( new (phase->C, 3) MulINode( divide, phase->intcon( pos_con ) ) );
+      mult = phase->transform( new (phase->C) MulINode( divide, phase->intcon( pos_con ) ) );
 
     // Finally, subtract the multiplied divided value from the original
-    result = new (phase->C, 3) SubINode( in(1), mult );
+    result = new (phase->C) SubINode( in(1), mult );
   }
 
   // Now remove the bogus extra edges used to keep things alive
@@ -1027,7 +1027,7 @@ Node *ModLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   if( !tl->is_con() ) return NULL;
   jlong con = tl->get_con();
 
-  Node *hook = new (phase->C, 1) Node(1);
+  Node *hook = new (phase->C) Node(1);
 
   // Expand mod
   if( con >= 0 && con < max_jlong && is_power_of_2_long(con+1) ) {
@@ -1049,24 +1049,24 @@ Node *ModLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
       hook->init_req(0, x);       // Add a use to x to prevent him from dying
       // Generate code to reduce X rapidly to nearly 2^k-1.
       for( int i = 0; i < trip_count; i++ ) {
-        Node *xl = phase->transform( new (phase->C, 3) AndLNode(x,divisor) );
-        Node *xh = phase->transform( new (phase->C, 3) RShiftLNode(x,phase->intcon(k)) ); // Must be signed
-        x = phase->transform( new (phase->C, 3) AddLNode(xh,xl) );
+        Node *xl = phase->transform( new (phase->C) AndLNode(x,divisor) );
+        Node *xh = phase->transform( new (phase->C) RShiftLNode(x,phase->intcon(k)) ); // Must be signed
+        x = phase->transform( new (phase->C) AddLNode(xh,xl) );
         hook->set_req(0, x);    // Add a use to x to prevent him from dying
       }
 
       // Generate sign-fixup code.  Was original value positive?
       // long hack_res = (i >= 0) ? divisor : CONST64(1);
-      Node *cmp1 = phase->transform( new (phase->C, 3) CmpLNode( in(1), phase->longcon(0) ) );
-      Node *bol1 = phase->transform( new (phase->C, 2) BoolNode( cmp1, BoolTest::ge ) );
-      Node *cmov1= phase->transform( new (phase->C, 4) CMoveLNode(bol1, phase->longcon(1), divisor, TypeLong::LONG) );
+      Node *cmp1 = phase->transform( new (phase->C) CmpLNode( in(1), phase->longcon(0) ) );
+      Node *bol1 = phase->transform( new (phase->C) BoolNode( cmp1, BoolTest::ge ) );
+      Node *cmov1= phase->transform( new (phase->C) CMoveLNode(bol1, phase->longcon(1), divisor, TypeLong::LONG) );
       // if( x >= hack_res ) x -= divisor;
-      Node *sub  = phase->transform( new (phase->C, 3) SubLNode( x, divisor ) );
-      Node *cmp2 = phase->transform( new (phase->C, 3) CmpLNode( x, cmov1 ) );
-      Node *bol2 = phase->transform( new (phase->C, 2) BoolNode( cmp2, BoolTest::ge ) );
+      Node *sub  = phase->transform( new (phase->C) SubLNode( x, divisor ) );
+      Node *cmp2 = phase->transform( new (phase->C) CmpLNode( x, cmov1 ) );
+      Node *bol2 = phase->transform( new (phase->C) BoolNode( cmp2, BoolTest::ge ) );
       // Convention is to not transform the return value of an Ideal
       // since Ideal is expected to return a modified 'this' or a new node.
-      Node *cmov2= new (phase->C, 4) CMoveLNode(bol2, x, sub, TypeLong::LONG);
+      Node *cmov2= new (phase->C) CMoveLNode(bol2, x, sub, TypeLong::LONG);
       // cmov2 is now the mod
 
       // Now remove the bogus extra edges used to keep things alive
@@ -1089,7 +1089,7 @@ Node *ModLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   jlong pos_con = (con >= 0) ? con : -con;
 
   // integer Mod 1 is always 0
-  if( pos_con == 1 ) return new (phase->C, 1) ConLNode(TypeLong::ZERO);
+  if( pos_con == 1 ) return new (phase->C) ConLNode(TypeLong::ZERO);
 
   int log2_con = -1;
 
@@ -1102,7 +1102,7 @@ Node *ModLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
 
     // See if this can be masked, if the dividend is non-negative
     if( dtl && dtl->_lo >= 0 )
-      return ( new (phase->C, 3) AndLNode( in(1), phase->longcon( pos_con-1 ) ) );
+      return ( new (phase->C) AndLNode( in(1), phase->longcon( pos_con-1 ) ) );
   }
 
   // Save in(1) so that it cannot be changed or deleted
@@ -1117,12 +1117,12 @@ Node *ModLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     Node *mult = NULL;
 
     if( log2_con >= 0 )
-      mult = phase->transform( new (phase->C, 3) LShiftLNode( divide, phase->intcon( log2_con ) ) );
+      mult = phase->transform( new (phase->C) LShiftLNode( divide, phase->intcon( log2_con ) ) );
     else
-      mult = phase->transform( new (phase->C, 3) MulLNode( divide, phase->longcon( pos_con ) ) );
+      mult = phase->transform( new (phase->C) MulLNode( divide, phase->longcon( pos_con ) ) );
 
     // Finally, subtract the multiplied divided value from the original
-    result = new (phase->C, 3) SubLNode( in(1), mult );
+    result = new (phase->C) SubLNode( in(1), mult );
   }
 
   // Now remove the bogus extra edges used to keep things alive
@@ -1277,9 +1277,9 @@ DivModINode* DivModINode::make(Compile* C, Node* div_or_mod) {
   assert(n->Opcode() == Op_DivI || n->Opcode() == Op_ModI,
          "only div or mod input pattern accepted");
 
-  DivModINode* divmod = new (C, 3) DivModINode(n->in(0), n->in(1), n->in(2));
-  Node*        dproj  = new (C, 1) ProjNode(divmod, DivModNode::div_proj_num);
-  Node*        mproj  = new (C, 1) ProjNode(divmod, DivModNode::mod_proj_num);
+  DivModINode* divmod = new (C) DivModINode(n->in(0), n->in(1), n->in(2));
+  Node*        dproj  = new (C) ProjNode(divmod, DivModNode::div_proj_num);
+  Node*        mproj  = new (C) ProjNode(divmod, DivModNode::mod_proj_num);
   return divmod;
 }
 
@@ -1289,9 +1289,9 @@ DivModLNode* DivModLNode::make(Compile* C, Node* div_or_mod) {
   assert(n->Opcode() == Op_DivL || n->Opcode() == Op_ModL,
          "only div or mod input pattern accepted");
 
-  DivModLNode* divmod = new (C, 3) DivModLNode(n->in(0), n->in(1), n->in(2));
-  Node*        dproj  = new (C, 1) ProjNode(divmod, DivModNode::div_proj_num);
-  Node*        mproj  = new (C, 1) ProjNode(divmod, DivModNode::mod_proj_num);
+  DivModLNode* divmod = new (C) DivModLNode(n->in(0), n->in(1), n->in(2));
+  Node*        dproj  = new (C) ProjNode(divmod, DivModNode::div_proj_num);
+  Node*        mproj  = new (C) ProjNode(divmod, DivModNode::mod_proj_num);
   return divmod;
 }
 
@@ -1306,7 +1306,7 @@ Node *DivModINode::match( const ProjNode *proj, const Matcher *match ) {
     assert(proj->_con == mod_proj_num, "must be div or mod projection");
     rm = match->modI_proj_mask();
   }
-  return new (match->C, 1)MachProjNode(this, proj->_con, rm, ideal_reg);
+  return new (match->C)MachProjNode(this, proj->_con, rm, ideal_reg);
 }
 
 
@@ -1321,5 +1321,5 @@ Node *DivModLNode::match( const ProjNode *proj, const Matcher *match ) {
     assert(proj->_con == mod_proj_num, "must be div or mod projection");
     rm = match->modL_proj_mask();
   }
-  return new (match->C, 1)MachProjNode(this, proj->_con, rm, ideal_reg);
+  return new (match->C)MachProjNode(this, proj->_con, rm, ideal_reg);
 }
diff --git a/hotspot/src/share/vm/opto/doCall.cpp b/hotspot/src/share/vm/opto/doCall.cpp
index c8576dc507b..30a01f34b3a 100644
--- a/hotspot/src/share/vm/opto/doCall.cpp
+++ b/hotspot/src/share/vm/opto/doCall.cpp
@@ -40,11 +40,10 @@
 #include "prims/nativeLookup.hpp"
 #include "runtime/sharedRuntime.hpp"
 
-#ifndef PRODUCT
 void trace_type_profile(ciMethod *method, int depth, int bci, ciMethod *prof_method, ciKlass *prof_klass, int site_count, int receiver_count) {
-  if (TraceTypeProfile || PrintInlining || PrintOptoInlining) {
+  if (TraceTypeProfile || PrintInlining NOT_PRODUCT(|| PrintOptoInlining)) {
     if (!PrintInlining) {
-      if (!PrintOpto && !PrintCompilation) {
+      if (NOT_PRODUCT(!PrintOpto &&) !PrintCompilation) {
         method->print_short_name();
         tty->cr();
       }
@@ -56,7 +55,6 @@ void trace_type_profile(ciMethod *method, int depth, int bci, ciMethod *prof_met
     tty->cr();
   }
 }
-#endif
 
 CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool call_is_virtual,
                                        JVMState* jvms, bool allow_inline,
@@ -225,13 +223,13 @@ CallGenerator* Compile::call_generator(ciMethod* callee, int vtable_index, bool
           }
           if (miss_cg != NULL) {
             if (next_hit_cg != NULL) {
-              NOT_PRODUCT(trace_type_profile(jvms->method(), jvms->depth() - 1, jvms->bci(), next_receiver_method, profile.receiver(1), site_count, profile.receiver_count(1)));
+              trace_type_profile(jvms->method(), jvms->depth() - 1, jvms->bci(), next_receiver_method, profile.receiver(1), site_count, profile.receiver_count(1));
               // We don't need to record dependency on a receiver here and below.
               // Whenever we inline, the dependency is added by Parse::Parse().
               miss_cg = CallGenerator::for_predicted_call(profile.receiver(1), miss_cg, next_hit_cg, PROB_MAX);
             }
             if (miss_cg != NULL) {
-              NOT_PRODUCT(trace_type_profile(jvms->method(), jvms->depth() - 1, jvms->bci(), receiver_method, profile.receiver(0), site_count, receiver_count));
+              trace_type_profile(jvms->method(), jvms->depth() - 1, jvms->bci(), receiver_method, profile.receiver(0), site_count, receiver_count);
               CallGenerator* cg = CallGenerator::for_predicted_call(profile.receiver(0), miss_cg, hit_cg, profile.receiver_prob(0));
               if (cg != NULL)  return cg;
             }
@@ -514,15 +512,15 @@ void Parse::do_call() {
         } else if (rt == T_INT || is_subword_type(rt)) {
           // FIXME: This logic should be factored out.
           if (ct == T_BOOLEAN) {
-            retnode = _gvn.transform( new (C, 3) AndINode(retnode, intcon(0x1)) );
+            retnode = _gvn.transform( new (C) AndINode(retnode, intcon(0x1)) );
           } else if (ct == T_CHAR) {
-            retnode = _gvn.transform( new (C, 3) AndINode(retnode, intcon(0xFFFF)) );
+            retnode = _gvn.transform( new (C) AndINode(retnode, intcon(0xFFFF)) );
           } else if (ct == T_BYTE) {
-            retnode = _gvn.transform( new (C, 3) LShiftINode(retnode, intcon(24)) );
-            retnode = _gvn.transform( new (C, 3) RShiftINode(retnode, intcon(24)) );
+            retnode = _gvn.transform( new (C) LShiftINode(retnode, intcon(24)) );
+            retnode = _gvn.transform( new (C) RShiftINode(retnode, intcon(24)) );
           } else if (ct == T_SHORT) {
-            retnode = _gvn.transform( new (C, 3) LShiftINode(retnode, intcon(16)) );
-            retnode = _gvn.transform( new (C, 3) RShiftINode(retnode, intcon(16)) );
+            retnode = _gvn.transform( new (C) LShiftINode(retnode, intcon(16)) );
+            retnode = _gvn.transform( new (C) RShiftINode(retnode, intcon(16)) );
           } else {
             assert(ct == T_INT, err_msg_res("rt=%s, ct=%s", type2name(rt), type2name(ct)));
           }
@@ -532,7 +530,7 @@ void Parse::do_call() {
             const TypeOopPtr* arg_type = TypeOopPtr::make_from_klass(rtype->as_klass());
             const Type*       sig_type = TypeOopPtr::make_from_klass(ctype->as_klass());
             if (arg_type != NULL && !arg_type->higher_equal(sig_type)) {
-              Node* cast_obj = _gvn.transform(new (C, 2) CheckCastPPNode(control(), retnode, sig_type));
+              Node* cast_obj = _gvn.transform(new (C) CheckCastPPNode(control(), retnode, sig_type));
               pop();
               push(cast_obj);
             }
@@ -614,7 +612,7 @@ void Parse::catch_call_exceptions(ciExceptionHandlerStream& handlers) {
   }
 
   int len = bcis->length();
-  CatchNode *cn = new (C, 2) CatchNode(control(), i_o, len+1);
+  CatchNode *cn = new (C) CatchNode(control(), i_o, len+1);
   Node *catch_ = _gvn.transform(cn);
 
   // now branch with the exception state to each of the (potential)
@@ -625,14 +623,14 @@ void Parse::catch_call_exceptions(ciExceptionHandlerStream& handlers) {
     // Locals are just copied from before the call.
     // Get control from the CatchNode.
     int handler_bci = bcis->at(i);
-    Node* ctrl = _gvn.transform( new (C, 1) CatchProjNode(catch_, i+1,handler_bci));
+    Node* ctrl = _gvn.transform( new (C) CatchProjNode(catch_, i+1,handler_bci));
     // This handler cannot happen?
     if (ctrl == top())  continue;
     set_control(ctrl);
 
     // Create exception oop
     const TypeInstPtr* extype = extypes->at(i)->is_instptr();
-    Node *ex_oop = _gvn.transform(new (C, 2) CreateExNode(extypes->at(i), ctrl, i_o));
+    Node *ex_oop = _gvn.transform(new (C) CreateExNode(extypes->at(i), ctrl, i_o));
 
     // Handle unloaded exception classes.
     if (saw_unloaded->contains(handler_bci)) {
@@ -671,7 +669,7 @@ void Parse::catch_call_exceptions(ciExceptionHandlerStream& handlers) {
 
   // The first CatchProj is for the normal return.
   // (Note:  If this is a call to rethrow_Java, this node goes dead.)
-  set_control(_gvn.transform( new (C, 1) CatchProjNode(catch_, CatchProjNode::fall_through_index, CatchProjNode::no_handler_bci)));
+  set_control(_gvn.transform( new (C) CatchProjNode(catch_, CatchProjNode::fall_through_index, CatchProjNode::no_handler_bci)));
 }
 
 
@@ -722,7 +720,7 @@ void Parse::catch_inline_exceptions(SafePointNode* ex_map) {
     // I'm loading the class from, I can replace the LoadKlass with the
     // klass constant for the exception oop.
     if( ex_node->is_Phi() ) {
-      ex_klass_node = new (C, ex_node->req()) PhiNode( ex_node->in(0), TypeKlassPtr::OBJECT );
+      ex_klass_node = new (C) PhiNode( ex_node->in(0), TypeKlassPtr::OBJECT );
       for( uint i = 1; i < ex_node->req(); i++ ) {
         Node* p = basic_plus_adr( ex_node->in(i), ex_node->in(i), oopDesc::klass_offset_in_bytes() );
         Node* k = _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), p, TypeInstPtr::KLASS, TypeKlassPtr::OBJECT) );
@@ -788,7 +786,7 @@ void Parse::catch_inline_exceptions(SafePointNode* ex_map) {
       PreserveJVMState pjvms(this);
       const TypeInstPtr* tinst = TypeOopPtr::make_from_klass_unique(klass)->cast_to_ptr_type(TypePtr::NotNull)->is_instptr();
       assert(klass->has_subklass() || tinst->klass_is_exact(), "lost exactness");
-      Node* ex_oop = _gvn.transform(new (C, 2) CheckCastPPNode(control(), ex_node, tinst));
+      Node* ex_oop = _gvn.transform(new (C) CheckCastPPNode(control(), ex_node, tinst));
       push_ex_oop(ex_oop);      // Push exception oop for handler
 #ifndef PRODUCT
       if (PrintOpto && WizardMode) {
diff --git a/hotspot/src/share/vm/opto/domgraph.cpp b/hotspot/src/share/vm/opto/domgraph.cpp
index b3a367d53fb..9973cb562f8 100644
--- a/hotspot/src/share/vm/opto/domgraph.cpp
+++ b/hotspot/src/share/vm/opto/domgraph.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/opto/escape.cpp b/hotspot/src/share/vm/opto/escape.cpp
index 49206f7abad..9fd3180505d 100644
--- a/hotspot/src/share/vm/opto/escape.cpp
+++ b/hotspot/src/share/vm/opto/escape.cpp
@@ -282,6 +282,26 @@ bool ConnectionGraph::compute_escape() {
   return has_non_escaping_obj;
 }
 
+// Utility function for nodes that load an object
+void ConnectionGraph::add_objload_to_connection_graph(Node *n, Unique_Node_List *delayed_worklist) {
+  // Using isa_ptr() instead of isa_oopptr() for LoadP and Phi because
+  // ThreadLocal has RawPtr type.
+  const Type* t = _igvn->type(n);
+  if (t->make_ptr() != NULL) {
+    Node* adr = n->in(MemNode::Address);
+#ifdef ASSERT
+    if (!adr->is_AddP()) {
+      assert(_igvn->type(adr)->isa_rawptr(), "sanity");
+    } else {
+      assert((ptnode_adr(adr->_idx) == NULL ||
+              ptnode_adr(adr->_idx)->as_Field()->is_oop()), "sanity");
+    }
+#endif
+    add_local_var_and_edge(n, PointsToNode::NoEscape,
+                           adr, delayed_worklist);
+  }
+}
+
 // Populate Connection Graph with PointsTo nodes and create simple
 // connection graph edges.
 void ConnectionGraph::add_node_to_connection_graph(Node *n, Unique_Node_List *delayed_worklist) {
@@ -348,7 +368,9 @@ void ConnectionGraph::add_node_to_connection_graph(Node *n, Unique_Node_List *de
     case Op_CastPP:
     case Op_CheckCastPP:
     case Op_EncodeP:
-    case Op_DecodeN: {
+    case Op_DecodeN:
+    case Op_EncodePKlass:
+    case Op_DecodeNKlass: {
       add_local_var_and_edge(n, PointsToNode::NoEscape,
                              n->in(1), delayed_worklist);
       break;
@@ -361,7 +383,8 @@ void ConnectionGraph::add_node_to_connection_graph(Node *n, Unique_Node_List *de
       break;
     }
     case Op_ConP:
-    case Op_ConN: {
+    case Op_ConN:
+    case Op_ConNKlass: {
       // assume all oop constants globally escape except for null
       PointsToNode::EscapeState es;
       if (igvn->type(n) == TypePtr::NULL_PTR ||
@@ -387,22 +410,7 @@ void ConnectionGraph::add_node_to_connection_graph(Node *n, Unique_Node_List *de
     case Op_LoadP:
     case Op_LoadN:
     case Op_LoadPLocked: {
-      // Using isa_ptr() instead of isa_oopptr() for LoadP and Phi because
-      // ThreadLocal has RawPrt type.
-      const Type* t = igvn->type(n);
-      if (t->make_ptr() != NULL) {
-        Node* adr = n->in(MemNode::Address);
-#ifdef ASSERT
-        if (!adr->is_AddP()) {
-          assert(igvn->type(adr)->isa_rawptr(), "sanity");
-        } else {
-          assert((ptnode_adr(adr->_idx) == NULL ||
-                  ptnode_adr(adr->_idx)->as_Field()->is_oop()), "sanity");
-        }
-#endif
-        add_local_var_and_edge(n, PointsToNode::NoEscape,
-                               adr, delayed_worklist);
-      }
+      add_objload_to_connection_graph(n, delayed_worklist);
       break;
     }
     case Op_Parm: {
@@ -417,7 +425,7 @@ void ConnectionGraph::add_node_to_connection_graph(Node *n, Unique_Node_List *de
     }
     case Op_Phi: {
       // Using isa_ptr() instead of isa_oopptr() for LoadP and Phi because
-      // ThreadLocal has RawPrt type.
+      // ThreadLocal has RawPtr type.
       const Type* t = n->as_Phi()->type();
       if (t->make_ptr() != NULL) {
         add_local_var(n, PointsToNode::NoEscape);
@@ -446,8 +454,14 @@ void ConnectionGraph::add_node_to_connection_graph(Node *n, Unique_Node_List *de
       }
       break;
     }
+    case Op_GetAndSetP:
+    case Op_GetAndSetN: {
+      add_objload_to_connection_graph(n, delayed_worklist);
+      // fallthrough
+    }
     case Op_StoreP:
     case Op_StoreN:
+    case Op_StoreNKlass:
     case Op_StorePConditional:
     case Op_CompareAndSwapP:
     case Op_CompareAndSwapN: {
@@ -455,7 +469,7 @@ void ConnectionGraph::add_node_to_connection_graph(Node *n, Unique_Node_List *de
       const Type *adr_type = igvn->type(adr);
       adr_type = adr_type->make_ptr();
       if (adr_type->isa_oopptr() ||
-          (opcode == Op_StoreP || opcode == Op_StoreN) &&
+          (opcode == Op_StoreP || opcode == Op_StoreN || opcode == Op_StoreNKlass) &&
                         (adr_type == TypeRawPtr::NOTNULL &&
                          adr->in(AddPNode::Address)->is_Proj() &&
                          adr->in(AddPNode::Address)->in(0)->is_Allocate())) {
@@ -562,7 +576,9 @@ void ConnectionGraph::add_final_edges(Node *n) {
     case Op_CastPP:
     case Op_CheckCastPP:
     case Op_EncodeP:
-    case Op_DecodeN: {
+    case Op_DecodeN:
+    case Op_EncodePKlass:
+    case Op_DecodeNKlass: {
       add_local_var_and_edge(n, PointsToNode::NoEscape,
                              n->in(1), NULL);
       break;
@@ -585,7 +601,7 @@ void ConnectionGraph::add_final_edges(Node *n) {
     case Op_LoadN:
     case Op_LoadPLocked: {
       // Using isa_ptr() instead of isa_oopptr() for LoadP and Phi because
-      // ThreadLocal has RawPrt type.
+      // ThreadLocal has RawPtr type.
       const Type* t = _igvn->type(n);
       if (t->make_ptr() != NULL) {
         Node* adr = n->in(MemNode::Address);
@@ -596,7 +612,7 @@ void ConnectionGraph::add_final_edges(Node *n) {
     }
     case Op_Phi: {
       // Using isa_ptr() instead of isa_oopptr() for LoadP and Phi because
-      // ThreadLocal has RawPrt type.
+      // ThreadLocal has RawPtr type.
       const Type* t = n->as_Phi()->type();
       if (t->make_ptr() != NULL) {
         for (uint i = 1; i < n->req(); i++) {
@@ -636,14 +652,23 @@ void ConnectionGraph::add_final_edges(Node *n) {
     }
     case Op_StoreP:
     case Op_StoreN:
+    case Op_StoreNKlass:
     case Op_StorePConditional:
     case Op_CompareAndSwapP:
-    case Op_CompareAndSwapN: {
+    case Op_CompareAndSwapN:
+    case Op_GetAndSetP:
+    case Op_GetAndSetN: {
       Node* adr = n->in(MemNode::Address);
+      if (opcode == Op_GetAndSetP || opcode == Op_GetAndSetN) {
+        const Type* t = _igvn->type(n);
+        if (t->make_ptr() != NULL) {
+          add_local_var_and_edge(n, PointsToNode::NoEscape, adr, NULL);
+        }
+      }
       const Type *adr_type = _igvn->type(adr);
       adr_type = adr_type->make_ptr();
       if (adr_type->isa_oopptr() ||
-          (opcode == Op_StoreP || opcode == Op_StoreN) &&
+          (opcode == Op_StoreP || opcode == Op_StoreN || opcode == Op_StoreNKlass) &&
                         (adr_type == TypeRawPtr::NOTNULL &&
                          adr->in(AddPNode::Address)->is_Proj() &&
                          adr->in(AddPNode::Address)->in(0)->is_Allocate())) {
@@ -2070,7 +2095,7 @@ Node* ConnectionGraph::get_addp_base(Node *addp) {
     Node* uncast_base = base->uncast();
     int opcode = uncast_base->Opcode();
     assert(opcode == Op_ConP || opcode == Op_ThreadLocal ||
-           opcode == Op_CastX2P || uncast_base->is_DecodeN() ||
+           opcode == Op_CastX2P || uncast_base->is_DecodeNarrowPtr() ||
            (uncast_base->is_Mem() && uncast_base->bottom_type() == TypeRawPtr::NOTNULL) ||
            (uncast_base->is_Proj() && uncast_base->in(0)->is_Allocate()), "sanity");
   }
@@ -2819,8 +2844,8 @@ void ConnectionGraph::split_unique_types(GrowableArray<Node *>  &alloc_worklist)
         alloc_worklist.append_if_missing(use);
       } else if (use->is_Phi() ||
                  use->is_CheckCastPP() ||
-                 use->is_EncodeP() ||
-                 use->is_DecodeN() ||
+                 use->is_EncodeNarrowPtr() ||
+                 use->is_DecodeNarrowPtr() ||
                  (use->is_ConstraintCast() && use->Opcode() == Op_CastPP)) {
         alloc_worklist.append_if_missing(use);
 #ifdef ASSERT
diff --git a/hotspot/src/share/vm/opto/escape.hpp b/hotspot/src/share/vm/opto/escape.hpp
index 54e5f585364..78447f03062 100644
--- a/hotspot/src/share/vm/opto/escape.hpp
+++ b/hotspot/src/share/vm/opto/escape.hpp
@@ -371,6 +371,8 @@ private:
     _nodes.at_put(n->_idx, ptn);
   }
 
+  // Utility function for nodes that load an object
+  void add_objload_to_connection_graph(Node *n, Unique_Node_List *delayed_worklist);
   // Create PointsToNode node and add it to Connection Graph.
   void add_node_to_connection_graph(Node *n, Unique_Node_List *delayed_worklist);
 
diff --git a/hotspot/src/share/vm/opto/gcm.cpp b/hotspot/src/share/vm/opto/gcm.cpp
index 8b8f3115729..6cd2ecd237e 100644
--- a/hotspot/src/share/vm/opto/gcm.cpp
+++ b/hotspot/src/share/vm/opto/gcm.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/opto/generateOptoStub.cpp b/hotspot/src/share/vm/opto/generateOptoStub.cpp
index 31600a74905..56fc759f2d2 100644
--- a/hotspot/src/share/vm/opto/generateOptoStub.cpp
+++ b/hotspot/src/share/vm/opto/generateOptoStub.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -50,7 +50,7 @@ void GraphKit::gen_stub(address C_function,
   const TypeTuple *jrange  = C->tf()->range();
 
   // The procedure start
-  StartNode* start = new (C, 2) StartNode(root(), jdomain);
+  StartNode* start = new (C) StartNode(root(), jdomain);
   _gvn.set_type_bottom(start);
 
   // Make a map, with JVM state
@@ -63,7 +63,7 @@ void GraphKit::gen_stub(address C_function,
   jvms->set_monoff(max_map);
   jvms->set_endoff(max_map);
   {
-    SafePointNode *map = new (C, max_map) SafePointNode( max_map, jvms );
+    SafePointNode *map = new (C) SafePointNode( max_map, jvms );
     jvms->set_map(map);
     set_jvms(jvms);
     assert(map == this->map(), "kit.map is set");
@@ -72,7 +72,7 @@ void GraphKit::gen_stub(address C_function,
   // Make up the parameters
   uint i;
   for( i = 0; i < parm_cnt; i++ )
-    map()->init_req(i, _gvn.transform(new (C, 1) ParmNode(start, i)));
+    map()->init_req(i, _gvn.transform(new (C) ParmNode(start, i)));
   for( ; i<map()->req(); i++ )
     map()->init_req(i, top());      // For nicer debugging
 
@@ -80,7 +80,7 @@ void GraphKit::gen_stub(address C_function,
   set_all_memory(map()->memory());
 
   // Get base of thread-local storage area
-  Node* thread = _gvn.transform( new (C, 1) ThreadLocalNode() );
+  Node* thread = _gvn.transform( new (C) ThreadLocalNode() );
 
   const int NoAlias = Compile::AliasIdxBot;
 
@@ -160,7 +160,7 @@ void GraphKit::gen_stub(address C_function,
 
   //-----------------------------
   // Make the call node
-  CallRuntimeNode *call = new (C, c_sig->domain()->cnt())
+  CallRuntimeNode *call = new (C)
     CallRuntimeNode(c_sig, C_function, name, TypePtr::BOTTOM);
   //-----------------------------
 
@@ -186,23 +186,23 @@ void GraphKit::gen_stub(address C_function,
 
   //-----------------------------
   // Now set up the return results
-  set_control( _gvn.transform( new (C, 1) ProjNode(call,TypeFunc::Control)) );
-  set_i_o(     _gvn.transform( new (C, 1) ProjNode(call,TypeFunc::I_O    )) );
+  set_control( _gvn.transform( new (C) ProjNode(call,TypeFunc::Control)) );
+  set_i_o(     _gvn.transform( new (C) ProjNode(call,TypeFunc::I_O    )) );
   set_all_memory_call(call);
   if (range->cnt() > TypeFunc::Parms) {
-    Node* retnode = _gvn.transform( new (C, 1) ProjNode(call,TypeFunc::Parms) );
+    Node* retnode = _gvn.transform( new (C) ProjNode(call,TypeFunc::Parms) );
     // C-land is allowed to return sub-word values.  Convert to integer type.
     assert( retval != Type::TOP, "" );
     if (retval == TypeInt::BOOL) {
-      retnode = _gvn.transform( new (C, 3) AndINode(retnode, intcon(0xFF)) );
+      retnode = _gvn.transform( new (C) AndINode(retnode, intcon(0xFF)) );
     } else if (retval == TypeInt::CHAR) {
-      retnode = _gvn.transform( new (C, 3) AndINode(retnode, intcon(0xFFFF)) );
+      retnode = _gvn.transform( new (C) AndINode(retnode, intcon(0xFFFF)) );
     } else if (retval == TypeInt::BYTE) {
-      retnode = _gvn.transform( new (C, 3) LShiftINode(retnode, intcon(24)) );
-      retnode = _gvn.transform( new (C, 3) RShiftINode(retnode, intcon(24)) );
+      retnode = _gvn.transform( new (C) LShiftINode(retnode, intcon(24)) );
+      retnode = _gvn.transform( new (C) RShiftINode(retnode, intcon(24)) );
     } else if (retval == TypeInt::SHORT) {
-      retnode = _gvn.transform( new (C, 3) LShiftINode(retnode, intcon(16)) );
-      retnode = _gvn.transform( new (C, 3) RShiftINode(retnode, intcon(16)) );
+      retnode = _gvn.transform( new (C) LShiftINode(retnode, intcon(16)) );
+      retnode = _gvn.transform( new (C) RShiftINode(retnode, intcon(16)) );
     }
     map()->set_req( TypeFunc::Parms, retnode );
   }
@@ -247,21 +247,21 @@ void GraphKit::gen_stub(address C_function,
 
   Node* exit_memory = reset_memory();
 
-  Node* cmp = _gvn.transform( new (C, 3) CmpPNode(pending, null()) );
-  Node* bo  = _gvn.transform( new (C, 2) BoolNode(cmp, BoolTest::ne) );
+  Node* cmp = _gvn.transform( new (C) CmpPNode(pending, null()) );
+  Node* bo  = _gvn.transform( new (C) BoolNode(cmp, BoolTest::ne) );
   IfNode   *iff = create_and_map_if(control(), bo, PROB_MIN, COUNT_UNKNOWN);
 
-  Node* if_null     = _gvn.transform( new (C, 1) IfFalseNode(iff) );
-  Node* if_not_null = _gvn.transform( new (C, 1) IfTrueNode(iff)  );
+  Node* if_null     = _gvn.transform( new (C) IfFalseNode(iff) );
+  Node* if_not_null = _gvn.transform( new (C) IfTrueNode(iff)  );
 
   assert (StubRoutines::forward_exception_entry() != NULL, "must be generated before");
   Node *exc_target = makecon(TypeRawPtr::make( StubRoutines::forward_exception_entry() ));
-  Node *to_exc = new (C, TypeFunc::Parms+2) TailCallNode(if_not_null,
-                                  i_o(),
-                                  exit_memory,
-                                  frameptr(),
-                                  returnadr(),
-                                  exc_target, null());
+  Node *to_exc = new (C) TailCallNode(if_not_null,
+                                      i_o(),
+                                      exit_memory,
+                                      frameptr(),
+                                      returnadr(),
+                                      exc_target, null());
   root()->add_req(_gvn.transform(to_exc));  // bind to root to keep live
   C->init_start(start);
 
@@ -271,31 +271,31 @@ void GraphKit::gen_stub(address C_function,
   switch( is_fancy_jump ) {
   case 0:                       // Make a return instruction
     // Return to caller, free any space for return address
-    ret = new (C, TypeFunc::Parms) ReturnNode(TypeFunc::Parms, if_null,
-                         i_o(),
-                         exit_memory,
-                         frameptr(),
-                         returnadr());
+    ret = new (C) ReturnNode(TypeFunc::Parms, if_null,
+                             i_o(),
+                             exit_memory,
+                             frameptr(),
+                             returnadr());
     if (C->tf()->range()->cnt() > TypeFunc::Parms)
       ret->add_req( map()->in(TypeFunc::Parms) );
     break;
   case 1:    // This is a fancy tail-call jump.  Jump to computed address.
     // Jump to new callee; leave old return address alone.
-    ret = new (C, TypeFunc::Parms+2) TailCallNode(if_null,
-                           i_o(),
-                           exit_memory,
-                           frameptr(),
-                           returnadr(),
-                           target, map()->in(TypeFunc::Parms));
+    ret = new (C) TailCallNode(if_null,
+                               i_o(),
+                               exit_memory,
+                               frameptr(),
+                               returnadr(),
+                               target, map()->in(TypeFunc::Parms));
     break;
   case 2:                       // Pop return address & jump
     // Throw away old return address; jump to new computed address
     //assert(C_function == CAST_FROM_FN_PTR(address, OptoRuntime::rethrow_C), "fancy_jump==2 only for rethrow");
-    ret = new (C, TypeFunc::Parms+2) TailJumpNode(if_null,
-                           i_o(),
-                           exit_memory,
-                           frameptr(),
-                           target, map()->in(TypeFunc::Parms));
+    ret = new (C) TailJumpNode(if_null,
+                               i_o(),
+                               exit_memory,
+                               frameptr(),
+                               target, map()->in(TypeFunc::Parms));
     break;
   default:
     ShouldNotReachHere();
diff --git a/hotspot/src/share/vm/opto/graphKit.cpp b/hotspot/src/share/vm/opto/graphKit.cpp
index 20012262026..95d5357d7d3 100644
--- a/hotspot/src/share/vm/opto/graphKit.cpp
+++ b/hotspot/src/share/vm/opto/graphKit.cpp
@@ -280,7 +280,7 @@ JVMState* GraphKit::transfer_exceptions_into_jvms() {
       JVMState* jvms = new (C) JVMState(_method, NULL);
       jvms->set_bci(_bci);
       jvms->set_sp(_sp);
-      jvms->set_map(new (C, TypeFunc::Parms) SafePointNode(TypeFunc::Parms, jvms));
+      jvms->set_map(new (C) SafePointNode(TypeFunc::Parms, jvms));
       set_jvms(jvms);
       for (uint i = 0; i < map()->req(); i++)  map()->init_req(i, top());
       set_all_memory(top());
@@ -332,7 +332,7 @@ void GraphKit::combine_exception_states(SafePointNode* ex_map, SafePointNode* ph
   if (region->in(0) != hidden_merge_mark) {
     // The control input is not (yet) a specially-marked region in phi_map.
     // Make it so, and build some phis.
-    region = new (C, 2) RegionNode(2);
+    region = new (C) RegionNode(2);
     _gvn.set_type(region, Type::CONTROL);
     region->set_req(0, hidden_merge_mark);  // marks an internal ex-state
     region->init_req(1, phi_map->control());
@@ -481,13 +481,13 @@ void GraphKit::uncommon_trap_if_should_post_on_exceptions(Deoptimization::DeoptR
     // take the uncommon_trap in the BuildCutout below.
 
     // first must access the should_post_on_exceptions_flag in this thread's JavaThread
-    Node* jthread = _gvn.transform(new (C, 1) ThreadLocalNode());
+    Node* jthread = _gvn.transform(new (C) ThreadLocalNode());
     Node* adr = basic_plus_adr(top(), jthread, in_bytes(JavaThread::should_post_on_exceptions_flag_offset()));
     Node* should_post_flag = make_load(control(), adr, TypeInt::INT, T_INT, Compile::AliasIdxRaw, false);
 
     // Test the should_post_on_exceptions_flag vs. 0
-    Node* chk = _gvn.transform( new (C, 3) CmpINode(should_post_flag, intcon(0)) );
-    Node* tst = _gvn.transform( new (C, 2) BoolNode(chk, BoolTest::eq) );
+    Node* chk = _gvn.transform( new (C) CmpINode(should_post_flag, intcon(0)) );
+    Node* tst = _gvn.transform( new (C) BoolNode(chk, BoolTest::eq) );
 
     // Branch to slow_path if should_post_on_exceptions_flag was true
     { BuildCutout unless(this, tst, PROB_MAX);
@@ -656,8 +656,8 @@ BuildCutout::BuildCutout(GraphKit* kit, Node* p, float prob, float cnt)
   SafePointNode* outer_map = _map;   // preserved map is caller's
   SafePointNode* inner_map = kit->map();
   IfNode* iff = kit->create_and_map_if(outer_map->control(), p, prob, cnt);
-  outer_map->set_control(kit->gvn().transform( new (kit->C, 1) IfTrueNode(iff) ));
-  inner_map->set_control(kit->gvn().transform( new (kit->C, 1) IfFalseNode(iff) ));
+  outer_map->set_control(kit->gvn().transform( new (kit->C) IfTrueNode(iff) ));
+  inner_map->set_control(kit->gvn().transform( new (kit->C) IfFalseNode(iff) ));
 }
 BuildCutout::~BuildCutout() {
   GraphKit* kit = _kit;
@@ -1108,16 +1108,16 @@ bool GraphKit::compute_stack_effects(int& inputs, int& depth, bool for_parse) {
 Node* GraphKit::basic_plus_adr(Node* base, Node* ptr, Node* offset) {
   // short-circuit a common case
   if (offset == intcon(0))  return ptr;
-  return _gvn.transform( new (C, 4) AddPNode(base, ptr, offset) );
+  return _gvn.transform( new (C) AddPNode(base, ptr, offset) );
 }
 
 Node* GraphKit::ConvI2L(Node* offset) {
   // short-circuit a common case
   jint offset_con = find_int_con(offset, Type::OffsetBot);
   if (offset_con != Type::OffsetBot) {
-    return longcon((long) offset_con);
+    return longcon((jlong) offset_con);
   }
-  return _gvn.transform( new (C, 2) ConvI2LNode(offset));
+  return _gvn.transform( new (C) ConvI2LNode(offset));
 }
 Node* GraphKit::ConvL2I(Node* offset) {
   // short-circuit a common case
@@ -1125,7 +1125,7 @@ Node* GraphKit::ConvL2I(Node* offset) {
   if (offset_con != (jlong)Type::OffsetBot) {
     return intcon((int) offset_con);
   }
-  return _gvn.transform( new (C, 2) ConvL2INode(offset));
+  return _gvn.transform( new (C) ConvL2INode(offset));
 }
 
 //-------------------------load_object_klass-----------------------------------
@@ -1144,7 +1144,7 @@ Node* GraphKit::load_array_length(Node* array) {
   Node *alen;
   if (alloc == NULL) {
     Node *r_adr = basic_plus_adr(array, arrayOopDesc::length_offset_in_bytes());
-    alen = _gvn.transform( new (C, 3) LoadRangeNode(0, immutable_memory(), r_adr, TypeInt::POS));
+    alen = _gvn.transform( new (C) LoadRangeNode(0, immutable_memory(), r_adr, TypeInt::POS));
   } else {
     alen = alloc->Ideal_length();
     Node* ccast = alloc->make_ideal_length(_gvn.type(array)->is_oopptr(), &_gvn);
@@ -1177,8 +1177,8 @@ Node* GraphKit::null_check_common(Node* value, BasicType type,
   // Construct NULL check
   Node *chk = NULL;
   switch(type) {
-    case T_LONG   : chk = new (C, 3) CmpLNode(value, _gvn.zerocon(T_LONG)); break;
-    case T_INT    : chk = new (C, 3) CmpINode( value, _gvn.intcon(0)); break;
+    case T_LONG   : chk = new (C) CmpLNode(value, _gvn.zerocon(T_LONG)); break;
+    case T_INT    : chk = new (C) CmpINode( value, _gvn.intcon(0)); break;
     case T_ARRAY  : // fall through
       type = T_OBJECT;  // simplify further tests
     case T_OBJECT : {
@@ -1225,7 +1225,7 @@ Node* GraphKit::null_check_common(Node* value, BasicType type,
           return value;           // Elided null check quickly!
         }
       }
-      chk = new (C, 3) CmpPNode( value, null() );
+      chk = new (C) CmpPNode( value, null() );
       break;
     }
 
@@ -1235,7 +1235,7 @@ Node* GraphKit::null_check_common(Node* value, BasicType type,
   chk = _gvn.transform(chk);
 
   BoolTest::mask btest = assert_null ? BoolTest::eq : BoolTest::ne;
-  BoolNode *btst = new (C, 2) BoolNode( chk, btest);
+  BoolNode *btst = new (C) BoolNode( chk, btest);
   Node   *tst = _gvn.transform( btst );
 
   //-----------
@@ -1302,8 +1302,8 @@ Node* GraphKit::null_check_common(Node* value, BasicType type,
 
   if (null_control != NULL) {
     IfNode* iff = create_and_map_if(control(), tst, ok_prob, COUNT_UNKNOWN);
-    Node* null_true = _gvn.transform( new (C, 1) IfFalseNode(iff));
-    set_control(      _gvn.transform( new (C, 1) IfTrueNode(iff)));
+    Node* null_true = _gvn.transform( new (C) IfFalseNode(iff));
+    set_control(      _gvn.transform( new (C) IfTrueNode(iff)));
     if (null_true == top())
       explicit_null_checks_elided++;
     (*null_control) = null_true;
@@ -1355,7 +1355,7 @@ Node* GraphKit::cast_not_null(Node* obj, bool do_replace_in_map) {
   // Object is already not-null?
   if( t == t_not_null ) return obj;
 
-  Node *cast = new (C, 2) CastPPNode(obj,t_not_null);
+  Node *cast = new (C) CastPPNode(obj,t_not_null);
   cast->init_req(0, control());
   cast = _gvn.transform( cast );
 
@@ -1410,7 +1410,7 @@ void GraphKit::set_all_memory(Node* newmem) {
 
 //------------------------------set_all_memory_call----------------------------
 void GraphKit::set_all_memory_call(Node* call, bool separate_io_proj) {
-  Node* newmem = _gvn.transform( new (C, 1) ProjNode(call, TypeFunc::Memory, separate_io_proj) );
+  Node* newmem = _gvn.transform( new (C) ProjNode(call, TypeFunc::Memory, separate_io_proj) );
   set_all_memory(newmem);
 }
 
@@ -1614,9 +1614,9 @@ Node* GraphKit::array_element_address(Node* ary, Node* idx, BasicType elembt,
   int index_max = max_jint - 1;  // array size is max_jint, index is one less
   if (sizetype != NULL)  index_max = sizetype->_hi - 1;
   const TypeLong* lidxtype = TypeLong::make(CONST64(0), index_max, Type::WidenMax);
-  idx = _gvn.transform( new (C, 2) ConvI2LNode(idx, lidxtype) );
+  idx = _gvn.transform( new (C) ConvI2LNode(idx, lidxtype) );
 #endif
-  Node* scale = _gvn.transform( new (C, 3) LShiftXNode(idx, intcon(shift)) );
+  Node* scale = _gvn.transform( new (C) LShiftXNode(idx, intcon(shift)) );
   return basic_plus_adr(ary, base, scale);
 }
 
@@ -1664,8 +1664,8 @@ void GraphKit::set_edges_for_java_call(CallJavaNode* call, bool must_throw, bool
 
   // Re-use the current map to produce the result.
 
-  set_control(_gvn.transform(new (C, 1) ProjNode(call, TypeFunc::Control)));
-  set_i_o(    _gvn.transform(new (C, 1) ProjNode(call, TypeFunc::I_O    , separate_io_proj)));
+  set_control(_gvn.transform(new (C) ProjNode(call, TypeFunc::Control)));
+  set_i_o(    _gvn.transform(new (C) ProjNode(call, TypeFunc::I_O    , separate_io_proj)));
   set_all_memory_call(xcall, separate_io_proj);
 
   //return xcall;   // no need, caller already has it
@@ -1679,7 +1679,7 @@ Node* GraphKit::set_results_for_java_call(CallJavaNode* call, bool separate_io_p
   if (call->method() == NULL ||
       call->method()->return_type()->basic_type() == T_VOID)
         ret = top();
-  else  ret = _gvn.transform(new (C, 1) ProjNode(call, TypeFunc::Parms));
+  else  ret = _gvn.transform(new (C) ProjNode(call, TypeFunc::Parms));
 
   // Note:  Since any out-of-line call can produce an exception,
   // we always insert an I_O projection from the call into the result.
@@ -1690,8 +1690,8 @@ Node* GraphKit::set_results_for_java_call(CallJavaNode* call, bool separate_io_p
     // The caller requested separate projections be used by the fall
     // through and exceptional paths, so replace the projections for
     // the fall through path.
-    set_i_o(_gvn.transform( new (C, 1) ProjNode(call, TypeFunc::I_O) ));
-    set_all_memory(_gvn.transform( new (C, 1) ProjNode(call, TypeFunc::Memory) ));
+    set_i_o(_gvn.transform( new (C) ProjNode(call, TypeFunc::I_O) ));
+    set_all_memory(_gvn.transform( new (C) ProjNode(call, TypeFunc::Memory) ));
   }
   return ret;
 }
@@ -1731,13 +1731,13 @@ void GraphKit::set_predefined_output_for_runtime_call(Node* call,
                                                       Node* keep_mem,
                                                       const TypePtr* hook_mem) {
   // no i/o
-  set_control(_gvn.transform( new (C, 1) ProjNode(call,TypeFunc::Control) ));
+  set_control(_gvn.transform( new (C) ProjNode(call,TypeFunc::Control) ));
   if (keep_mem) {
     // First clone the existing memory state
     set_all_memory(keep_mem);
     if (hook_mem != NULL) {
       // Make memory for the call
-      Node* mem = _gvn.transform( new (C, 1) ProjNode(call, TypeFunc::Memory) );
+      Node* mem = _gvn.transform( new (C) ProjNode(call, TypeFunc::Memory) );
       // Set the RawPtr memory state only.  This covers all the heap top/GC stuff
       // We also use hook_mem to extract specific effects from arraycopy stubs.
       set_memory(mem, hook_mem);
@@ -1841,7 +1841,7 @@ void GraphKit::increment_counter(Node* counter_addr) {
   int adr_type = Compile::AliasIdxRaw;
   Node* ctrl = control();
   Node* cnt  = make_load(ctrl, counter_addr, TypeInt::INT, T_INT, adr_type);
-  Node* incr = _gvn.transform(new (C, 3) AddINode(cnt, _gvn.intcon(1)));
+  Node* incr = _gvn.transform(new (C) AddINode(cnt, _gvn.intcon(1)));
   store_to_memory( ctrl, counter_addr, incr, T_INT, adr_type );
 }
 
@@ -1957,7 +1957,7 @@ void GraphKit::uncommon_trap(int trap_request,
   // The debug info is the only real input to this call.
 
   // Halt-and-catch fire here.  The above call should never return!
-  HaltNode* halt = new(C, TypeFunc::Parms) HaltNode(control(), frameptr());
+  HaltNode* halt = new(C) HaltNode(control(), frameptr());
   _gvn.set_type_bottom(halt);
   root()->add_req(halt);
 
@@ -2013,7 +2013,7 @@ void GraphKit::round_double_result(ciMethod* dest_method) {
 Node* GraphKit::precision_rounding(Node* n) {
   return UseStrictFP && _method->flags().is_strict()
     && UseSSE == 0 && Matcher::strict_fp_requires_explicit_rounding
-    ? _gvn.transform( new (C, 2) RoundFloatNode(0, n) )
+    ? _gvn.transform( new (C) RoundFloatNode(0, n) )
     : n;
 }
 
@@ -2021,7 +2021,7 @@ Node* GraphKit::precision_rounding(Node* n) {
 Node* GraphKit::dprecision_rounding(Node *n) {
   return UseStrictFP && _method->flags().is_strict()
     && UseSSE <= 1 && Matcher::strict_fp_requires_explicit_rounding
-    ? _gvn.transform( new (C, 2) RoundDoubleNode(0, n) )
+    ? _gvn.transform( new (C) RoundDoubleNode(0, n) )
     : n;
 }
 
@@ -2029,7 +2029,7 @@ Node* GraphKit::dprecision_rounding(Node *n) {
 Node* GraphKit::dstore_rounding(Node* n) {
   return Matcher::strict_fp_requires_explicit_rounding
     && UseSSE <= 1
-    ? _gvn.transform( new (C, 2) RoundDoubleNode(0, n) )
+    ? _gvn.transform( new (C) RoundDoubleNode(0, n) )
     : n;
 }
 
@@ -2102,11 +2102,11 @@ Node* GraphKit::opt_iff(Node* region, Node* iff) {
   IfNode *opt_iff = _gvn.transform(iff)->as_If();
 
   // Fast path taken; set region slot 2
-  Node *fast_taken = _gvn.transform( new (C, 1) IfFalseNode(opt_iff) );
+  Node *fast_taken = _gvn.transform( new (C) IfFalseNode(opt_iff) );
   region->init_req(2,fast_taken); // Capture fast-control
 
   // Fast path not-taken, i.e. slow path
-  Node *slow_taken = _gvn.transform( new (C, 1) IfTrueNode(opt_iff) );
+  Node *slow_taken = _gvn.transform( new (C) IfTrueNode(opt_iff) );
   return slow_taken;
 }
 
@@ -2122,7 +2122,6 @@ Node* GraphKit::make_runtime_call(int flags,
                                   Node* parm4, Node* parm5,
                                   Node* parm6, Node* parm7) {
   // Slow-path call
-  int size = call_type->domain()->cnt();
   bool is_leaf = !(flags & RC_NO_LEAF);
   bool has_io  = (!is_leaf && !(flags & RC_NO_IO));
   if (call_name == NULL) {
@@ -2131,12 +2130,12 @@ Node* GraphKit::make_runtime_call(int flags,
   }
   CallNode* call;
   if (!is_leaf) {
-    call = new(C, size) CallStaticJavaNode(call_type, call_addr, call_name,
+    call = new(C) CallStaticJavaNode(call_type, call_addr, call_name,
                                            bci(), adr_type);
   } else if (flags & RC_NO_FP) {
-    call = new(C, size) CallLeafNoFPNode(call_type, call_addr, call_name, adr_type);
+    call = new(C) CallLeafNoFPNode(call_type, call_addr, call_name, adr_type);
   } else {
-    call = new(C, size) CallLeafNode(call_type, call_addr, call_name, adr_type);
+    call = new(C) CallLeafNode(call_type, call_addr, call_name, adr_type);
   }
 
   // The following is similar to set_edges_for_java_call,
@@ -2197,7 +2196,7 @@ Node* GraphKit::make_runtime_call(int flags,
   }
 
   if (has_io) {
-    set_i_o(_gvn.transform(new (C, 1) ProjNode(call, TypeFunc::I_O)));
+    set_i_o(_gvn.transform(new (C) ProjNode(call, TypeFunc::I_O)));
   }
   return call;
 
@@ -2238,10 +2237,10 @@ void GraphKit::make_slow_call_ex(Node* call, ciInstanceKlass* ex_klass, bool sep
   if (stopped())  return;
 
   // Make a catch node with just two handlers:  fall-through and catch-all
-  Node* i_o  = _gvn.transform( new (C, 1) ProjNode(call, TypeFunc::I_O, separate_io_proj) );
-  Node* catc = _gvn.transform( new (C, 2) CatchNode(control(), i_o, 2) );
-  Node* norm = _gvn.transform( new (C, 1) CatchProjNode(catc, CatchProjNode::fall_through_index, CatchProjNode::no_handler_bci) );
-  Node* excp = _gvn.transform( new (C, 1) CatchProjNode(catc, CatchProjNode::catch_all_index,    CatchProjNode::no_handler_bci) );
+  Node* i_o  = _gvn.transform( new (C) ProjNode(call, TypeFunc::I_O, separate_io_proj) );
+  Node* catc = _gvn.transform( new (C) CatchNode(control(), i_o, 2) );
+  Node* norm = _gvn.transform( new (C) CatchProjNode(catc, CatchProjNode::fall_through_index, CatchProjNode::no_handler_bci) );
+  Node* excp = _gvn.transform( new (C) CatchProjNode(catc, CatchProjNode::catch_all_index,    CatchProjNode::no_handler_bci) );
 
   { PreserveJVMState pjvms(this);
     set_control(excp);
@@ -2251,7 +2250,7 @@ void GraphKit::make_slow_call_ex(Node* call, ciInstanceKlass* ex_klass, bool sep
       // Create an exception state also.
       // Use an exact type if the caller has specified a specific exception.
       const Type* ex_type = TypeOopPtr::make_from_klass_unique(ex_klass)->cast_to_ptr_type(TypePtr::NotNull);
-      Node*       ex_oop  = new (C, 2) CreateExNode(ex_type, control(), i_o);
+      Node*       ex_oop  = new (C) CreateExNode(ex_type, control(), i_o);
       add_exception_state(make_exception_state(_gvn.transform(ex_oop)));
     }
   }
@@ -2301,11 +2300,11 @@ Node* GraphKit::gen_subtype_check(Node* subklass, Node* superklass) {
     case SSC_easy_test:
       {
         // Just do a direct pointer compare and be done.
-        Node* cmp = _gvn.transform( new(C, 3) CmpPNode(subklass, superklass) );
-        Node* bol = _gvn.transform( new(C, 2) BoolNode(cmp, BoolTest::eq) );
+        Node* cmp = _gvn.transform( new(C) CmpPNode(subklass, superklass) );
+        Node* bol = _gvn.transform( new(C) BoolNode(cmp, BoolTest::eq) );
         IfNode* iff = create_and_xform_if(control(), bol, PROB_STATIC_FREQUENT, COUNT_UNKNOWN);
-        set_control( _gvn.transform( new(C, 1) IfTrueNode (iff) ) );
-        return       _gvn.transform( new(C, 1) IfFalseNode(iff) );
+        set_control( _gvn.transform( new(C) IfTrueNode (iff) ) );
+        return       _gvn.transform( new(C) IfFalseNode(iff) );
       }
     case SSC_full_test:
       break;
@@ -2320,7 +2319,7 @@ Node* GraphKit::gen_subtype_check(Node* subklass, Node* superklass) {
 
   // First load the super-klass's check-offset
   Node *p1 = basic_plus_adr( superklass, superklass, in_bytes(Klass::super_check_offset_offset()) );
-  Node *chk_off = _gvn.transform( new (C, 3) LoadINode( NULL, memory(p1), p1, _gvn.type(p1)->is_ptr() ) );
+  Node *chk_off = _gvn.transform( new (C) LoadINode( NULL, memory(p1), p1, _gvn.type(p1)->is_ptr() ) );
   int cacheoff_con = in_bytes(Klass::secondary_super_cache_offset());
   bool might_be_cache = (find_int_con(chk_off, cacheoff_con) == cacheoff_con);
 
@@ -2331,7 +2330,7 @@ Node* GraphKit::gen_subtype_check(Node* subklass, Node* superklass) {
   // Worst-case type is a little odd: NULL is allowed as a result (usually
   // klass loads can never produce a NULL).
   Node *chk_off_X = ConvI2X(chk_off);
-  Node *p2 = _gvn.transform( new (C, 4) AddPNode(subklass,subklass,chk_off_X) );
+  Node *p2 = _gvn.transform( new (C) AddPNode(subklass,subklass,chk_off_X) );
   // For some types like interfaces the following loadKlass is from a 1-word
   // cache which is mutable so can't use immutable memory.  Other
   // types load from the super-class display table which is immutable.
@@ -2345,11 +2344,11 @@ Node* GraphKit::gen_subtype_check(Node* subklass, Node* superklass) {
   // See if we get an immediate positive hit.  Happens roughly 83% of the
   // time.  Test to see if the value loaded just previously from the subklass
   // is exactly the superklass.
-  Node *cmp1 = _gvn.transform( new (C, 3) CmpPNode( superklass, nkls ) );
-  Node *bol1 = _gvn.transform( new (C, 2) BoolNode( cmp1, BoolTest::eq ) );
+  Node *cmp1 = _gvn.transform( new (C) CmpPNode( superklass, nkls ) );
+  Node *bol1 = _gvn.transform( new (C) BoolNode( cmp1, BoolTest::eq ) );
   IfNode *iff1 = create_and_xform_if( control(), bol1, PROB_LIKELY(0.83f), COUNT_UNKNOWN );
-  Node *iftrue1 = _gvn.transform( new (C, 1) IfTrueNode ( iff1 ) );
-  set_control(    _gvn.transform( new (C, 1) IfFalseNode( iff1 ) ) );
+  Node *iftrue1 = _gvn.transform( new (C) IfTrueNode ( iff1 ) );
+  set_control(    _gvn.transform( new (C) IfFalseNode( iff1 ) ) );
 
   // Compile speed common case: Check for being deterministic right now.  If
   // chk_off is a constant and not equal to cacheoff then we are NOT a
@@ -2362,9 +2361,9 @@ Node* GraphKit::gen_subtype_check(Node* subklass, Node* superklass) {
   }
 
   // Gather the various success & failures here
-  RegionNode *r_ok_subtype = new (C, 4) RegionNode(4);
+  RegionNode *r_ok_subtype = new (C) RegionNode(4);
   record_for_igvn(r_ok_subtype);
-  RegionNode *r_not_subtype = new (C, 3) RegionNode(3);
+  RegionNode *r_not_subtype = new (C) RegionNode(3);
   record_for_igvn(r_not_subtype);
 
   r_ok_subtype->init_req(1, iftrue1);
@@ -2375,20 +2374,20 @@ Node* GraphKit::gen_subtype_check(Node* subklass, Node* superklass) {
   // cache.  If it points to the display (and NOT the cache) and the display
   // missed then it's not a subtype.
   Node *cacheoff = _gvn.intcon(cacheoff_con);
-  Node *cmp2 = _gvn.transform( new (C, 3) CmpINode( chk_off, cacheoff ) );
-  Node *bol2 = _gvn.transform( new (C, 2) BoolNode( cmp2, BoolTest::ne ) );
+  Node *cmp2 = _gvn.transform( new (C) CmpINode( chk_off, cacheoff ) );
+  Node *bol2 = _gvn.transform( new (C) BoolNode( cmp2, BoolTest::ne ) );
   IfNode *iff2 = create_and_xform_if( control(), bol2, PROB_LIKELY(0.63f), COUNT_UNKNOWN );
-  r_not_subtype->init_req(1, _gvn.transform( new (C, 1) IfTrueNode (iff2) ) );
-  set_control(                _gvn.transform( new (C, 1) IfFalseNode(iff2) ) );
+  r_not_subtype->init_req(1, _gvn.transform( new (C) IfTrueNode (iff2) ) );
+  set_control(                _gvn.transform( new (C) IfFalseNode(iff2) ) );
 
   // Check for self.  Very rare to get here, but it is taken 1/3 the time.
   // No performance impact (too rare) but allows sharing of secondary arrays
   // which has some footprint reduction.
-  Node *cmp3 = _gvn.transform( new (C, 3) CmpPNode( subklass, superklass ) );
-  Node *bol3 = _gvn.transform( new (C, 2) BoolNode( cmp3, BoolTest::eq ) );
+  Node *cmp3 = _gvn.transform( new (C) CmpPNode( subklass, superklass ) );
+  Node *bol3 = _gvn.transform( new (C) BoolNode( cmp3, BoolTest::eq ) );
   IfNode *iff3 = create_and_xform_if( control(), bol3, PROB_LIKELY(0.36f), COUNT_UNKNOWN );
-  r_ok_subtype->init_req(2, _gvn.transform( new (C, 1) IfTrueNode ( iff3 ) ) );
-  set_control(               _gvn.transform( new (C, 1) IfFalseNode( iff3 ) ) );
+  r_ok_subtype->init_req(2, _gvn.transform( new (C) IfTrueNode ( iff3 ) ) );
+  set_control(               _gvn.transform( new (C) IfFalseNode( iff3 ) ) );
 
   // -- Roads not taken here: --
   // We could also have chosen to perform the self-check at the beginning
@@ -2412,13 +2411,13 @@ Node* GraphKit::gen_subtype_check(Node* subklass, Node* superklass) {
   // The decision to inline or out-of-line this final check is platform
   // dependent, and is found in the AD file definition of PartialSubtypeCheck.
   Node* psc = _gvn.transform(
-    new (C, 3) PartialSubtypeCheckNode(control(), subklass, superklass) );
+    new (C) PartialSubtypeCheckNode(control(), subklass, superklass) );
 
-  Node *cmp4 = _gvn.transform( new (C, 3) CmpPNode( psc, null() ) );
-  Node *bol4 = _gvn.transform( new (C, 2) BoolNode( cmp4, BoolTest::ne ) );
+  Node *cmp4 = _gvn.transform( new (C) CmpPNode( psc, null() ) );
+  Node *bol4 = _gvn.transform( new (C) BoolNode( cmp4, BoolTest::ne ) );
   IfNode *iff4 = create_and_xform_if( control(), bol4, PROB_FAIR, COUNT_UNKNOWN );
-  r_not_subtype->init_req(2, _gvn.transform( new (C, 1) IfTrueNode (iff4) ) );
-  r_ok_subtype ->init_req(3, _gvn.transform( new (C, 1) IfFalseNode(iff4) ) );
+  r_not_subtype->init_req(2, _gvn.transform( new (C) IfTrueNode (iff4) ) );
+  r_ok_subtype ->init_req(3, _gvn.transform( new (C) IfFalseNode(iff4) ) );
 
   // Return false path; set default control to true path.
   set_control( _gvn.transform(r_ok_subtype) );
@@ -2482,18 +2481,18 @@ Node* GraphKit::type_check_receiver(Node* receiver, ciKlass* klass,
   const TypeKlassPtr* tklass = TypeKlassPtr::make(klass);
   Node* recv_klass = load_object_klass(receiver);
   Node* want_klass = makecon(tklass);
-  Node* cmp = _gvn.transform( new(C, 3) CmpPNode(recv_klass, want_klass) );
-  Node* bol = _gvn.transform( new(C, 2) BoolNode(cmp, BoolTest::eq) );
+  Node* cmp = _gvn.transform( new(C) CmpPNode(recv_klass, want_klass) );
+  Node* bol = _gvn.transform( new(C) BoolNode(cmp, BoolTest::eq) );
   IfNode* iff = create_and_xform_if(control(), bol, prob, COUNT_UNKNOWN);
-  set_control( _gvn.transform( new(C, 1) IfTrueNode (iff) ));
-  Node* fail = _gvn.transform( new(C, 1) IfFalseNode(iff) );
+  set_control( _gvn.transform( new(C) IfTrueNode (iff) ));
+  Node* fail = _gvn.transform( new(C) IfFalseNode(iff) );
 
   const TypeOopPtr* recv_xtype = tklass->as_instance_type();
   assert(recv_xtype->klass_is_exact(), "");
 
   // Subsume downstream occurrences of receiver with a cast to
   // recv_xtype, since now we know what the type will be.
-  Node* cast = new(C, 2) CheckCastPPNode(control(), receiver, recv_xtype);
+  Node* cast = new(C) CheckCastPPNode(control(), receiver, recv_xtype);
   (*casted_receiver) = _gvn.transform(cast);
   // (User must make the replace_in_map call.)
 
@@ -2580,8 +2579,8 @@ Node* GraphKit::gen_instanceof(Node* obj, Node* superklass) {
 
   // Make the merge point
   enum { _obj_path = 1, _fail_path, _null_path, PATH_LIMIT };
-  RegionNode* region = new(C, PATH_LIMIT) RegionNode(PATH_LIMIT);
-  Node*       phi    = new(C, PATH_LIMIT) PhiNode(region, TypeInt::BOOL);
+  RegionNode* region = new(C) RegionNode(PATH_LIMIT);
+  Node*       phi    = new(C) PhiNode(region, TypeInt::BOOL);
   C->set_has_split_ifs(true); // Has chance for split-if optimization
 
   ciProfileData* data = NULL;
@@ -2683,8 +2682,8 @@ Node* GraphKit::gen_checkcast(Node *obj, Node* superklass,
 
   // Make the merge point
   enum { _obj_path = 1, _null_path, PATH_LIMIT };
-  RegionNode* region = new (C, PATH_LIMIT) RegionNode(PATH_LIMIT);
-  Node*       phi    = new (C, PATH_LIMIT) PhiNode(region, toop);
+  RegionNode* region = new (C) RegionNode(PATH_LIMIT);
+  Node*       phi    = new (C) PhiNode(region, toop);
   C->set_has_split_ifs(true); // Has chance for split-if optimization
 
   // Use null-cast information if it is available
@@ -2733,7 +2732,7 @@ Node* GraphKit::gen_checkcast(Node *obj, Node* superklass,
     Node* not_subtype_ctrl = gen_subtype_check( obj_klass, superklass );
 
     // Plug in success path into the merge
-    cast_obj = _gvn.transform(new (C, 2) CheckCastPPNode(control(),
+    cast_obj = _gvn.transform(new (C) CheckCastPPNode(control(),
                                                          not_null_obj, toop));
     // Failure path ends in uncommon trap (or may be dead - failure impossible)
     if (failure_control == NULL) {
@@ -2787,7 +2786,7 @@ Node* GraphKit::insert_mem_bar(int opcode, Node* precedent) {
   mb->init_req(TypeFunc::Control, control());
   mb->init_req(TypeFunc::Memory,  reset_memory());
   Node* membar = _gvn.transform(mb);
-  set_control(_gvn.transform(new (C, 1) ProjNode(membar,TypeFunc::Control) ));
+  set_control(_gvn.transform(new (C) ProjNode(membar,TypeFunc::Control) ));
   set_all_memory_call(membar);
   return membar;
 }
@@ -2816,11 +2815,11 @@ Node* GraphKit::insert_mem_bar_volatile(int opcode, int alias_idx, Node* precede
     mb->set_req(TypeFunc::Memory, memory(alias_idx));
   }
   Node* membar = _gvn.transform(mb);
-  set_control(_gvn.transform(new (C, 1) ProjNode(membar, TypeFunc::Control)));
+  set_control(_gvn.transform(new (C) ProjNode(membar, TypeFunc::Control)));
   if (alias_idx == Compile::AliasIdxBot) {
-    merged_memory()->set_base_memory(_gvn.transform(new (C, 1) ProjNode(membar, TypeFunc::Memory)));
+    merged_memory()->set_base_memory(_gvn.transform(new (C) ProjNode(membar, TypeFunc::Memory)));
   } else {
-    set_memory(_gvn.transform(new (C, 1) ProjNode(membar, TypeFunc::Memory)),alias_idx);
+    set_memory(_gvn.transform(new (C) ProjNode(membar, TypeFunc::Memory)),alias_idx);
   }
   return membar;
 }
@@ -2840,10 +2839,10 @@ FastLockNode* GraphKit::shared_lock(Node* obj) {
   assert(dead_locals_are_killed(), "should kill locals before sync. point");
 
   // Box the stack location
-  Node* box = _gvn.transform(new (C, 1) BoxLockNode(next_monitor()));
+  Node* box = _gvn.transform(new (C) BoxLockNode(next_monitor()));
   Node* mem = reset_memory();
 
-  FastLockNode * flock = _gvn.transform(new (C, 3) FastLockNode(0, obj, box) )->as_FastLock();
+  FastLockNode * flock = _gvn.transform(new (C) FastLockNode(0, obj, box) )->as_FastLock();
   if (PrintPreciseBiasedLockingStatistics) {
     // Create the counters for this fast lock.
     flock->create_lock_counter(sync_jvms()); // sync_jvms used to get current bci
@@ -2853,7 +2852,7 @@ FastLockNode* GraphKit::shared_lock(Node* obj) {
   map()->push_monitor( flock );
 
   const TypeFunc *tf = LockNode::lock_type();
-  LockNode *lock = new (C, tf->domain()->cnt()) LockNode(C, tf);
+  LockNode *lock = new (C) LockNode(C, tf);
 
   lock->init_req( TypeFunc::Control, control() );
   lock->init_req( TypeFunc::Memory , mem );
@@ -2907,7 +2906,7 @@ void GraphKit::shared_unlock(Node* box, Node* obj) {
   insert_mem_bar(Op_MemBarReleaseLock);
 
   const TypeFunc *tf = OptoRuntime::complete_monitor_exit_Type();
-  UnlockNode *unlock = new (C, tf->domain()->cnt()) UnlockNode(C, tf);
+  UnlockNode *unlock = new (C) UnlockNode(C, tf);
   uint raw_idx = Compile::AliasIdxRaw;
   unlock->init_req( TypeFunc::Control, control() );
   unlock->init_req( TypeFunc::Memory , memory(raw_idx) );
@@ -2973,19 +2972,19 @@ Node* GraphKit::set_output_for_allocation(AllocateNode* alloc,
   alloc->set_req( TypeFunc::FramePtr, frameptr() );
   add_safepoint_edges(alloc);
   Node* allocx = _gvn.transform(alloc);
-  set_control( _gvn.transform(new (C, 1) ProjNode(allocx, TypeFunc::Control) ) );
+  set_control( _gvn.transform(new (C) ProjNode(allocx, TypeFunc::Control) ) );
   // create memory projection for i_o
-  set_memory ( _gvn.transform( new (C, 1) ProjNode(allocx, TypeFunc::Memory, true) ), rawidx );
+  set_memory ( _gvn.transform( new (C) ProjNode(allocx, TypeFunc::Memory, true) ), rawidx );
   make_slow_call_ex(allocx, env()->OutOfMemoryError_klass(), true);
 
   // create a memory projection as for the normal control path
-  Node* malloc = _gvn.transform(new (C, 1) ProjNode(allocx, TypeFunc::Memory));
+  Node* malloc = _gvn.transform(new (C) ProjNode(allocx, TypeFunc::Memory));
   set_memory(malloc, rawidx);
 
   // a normal slow-call doesn't change i_o, but an allocation does
   // we create a separate i_o projection for the normal control path
-  set_i_o(_gvn.transform( new (C, 1) ProjNode(allocx, TypeFunc::I_O, false) ) );
-  Node* rawoop = _gvn.transform( new (C, 1) ProjNode(allocx, TypeFunc::Parms) );
+  set_i_o(_gvn.transform( new (C) ProjNode(allocx, TypeFunc::I_O, false) ) );
+  Node* rawoop = _gvn.transform( new (C) ProjNode(allocx, TypeFunc::Parms) );
 
   // put in an initialization barrier
   InitializeNode* init = insert_mem_bar_volatile(Op_Initialize, rawidx,
@@ -3021,7 +3020,7 @@ Node* GraphKit::set_output_for_allocation(AllocateNode* alloc,
   }
 
   // Cast raw oop to the real thing...
-  Node* javaoop = new (C, 2) CheckCastPPNode(control(), rawoop, oop_type);
+  Node* javaoop = new (C) CheckCastPPNode(control(), rawoop, oop_type);
   javaoop = _gvn.transform(javaoop);
   C->set_recent_alloc(control(), javaoop);
   assert(just_allocated_object(control()) == javaoop, "just allocated");
@@ -3080,9 +3079,9 @@ Node* GraphKit::new_instance(Node* klass_node,
     // (It may be stress-tested by specifying StressReflectiveCode.)
     // Basically, we want to get into the VM is there's an illegal argument.
     Node* bit = intcon(Klass::_lh_instance_slow_path_bit);
-    initial_slow_test = _gvn.transform( new (C, 3) AndINode(layout_val, bit) );
+    initial_slow_test = _gvn.transform( new (C) AndINode(layout_val, bit) );
     if (extra_slow_test != intcon(0)) {
-      initial_slow_test = _gvn.transform( new (C, 3) OrINode(initial_slow_test, extra_slow_test) );
+      initial_slow_test = _gvn.transform( new (C) OrINode(initial_slow_test, extra_slow_test) );
     }
     // (Macro-expander will further convert this to a Bool, if necessary.)
   }
@@ -3099,7 +3098,7 @@ Node* GraphKit::new_instance(Node* klass_node,
     // Clear the low bits to extract layout_helper_size_in_bytes:
     assert((int)Klass::_lh_instance_slow_path_bit < BytesPerLong, "clear bit");
     Node* mask = MakeConX(~ (intptr_t)right_n_bits(LogBytesPerLong));
-    size = _gvn.transform( new (C, 3) AndXNode(size, mask) );
+    size = _gvn.transform( new (C) AndXNode(size, mask) );
   }
   if (return_size_val != NULL) {
     (*return_size_val) = size;
@@ -3120,11 +3119,10 @@ Node* GraphKit::new_instance(Node* klass_node,
   set_all_memory(mem); // Create new memory state
 
   AllocateNode* alloc
-    = new (C, AllocateNode::ParmLimit)
-        AllocateNode(C, AllocateNode::alloc_type(),
-                     control(), mem, i_o(),
-                     size, klass_node,
-                     initial_slow_test);
+    = new (C) AllocateNode(C, AllocateNode::alloc_type(),
+                           control(), mem, i_o(),
+                           size, klass_node,
+                           initial_slow_test);
 
   return set_output_for_allocation(alloc, oop_type);
 }
@@ -3147,8 +3145,8 @@ Node* GraphKit::new_array(Node* klass_node,     // array klass (maybe variable)
     // Optimistically assume that it is a subtype of Object[],
     // so that we can fold up all the address arithmetic.
     layout_con = Klass::array_layout_helper(T_OBJECT);
-    Node* cmp_lh = _gvn.transform( new(C, 3) CmpINode(layout_val, intcon(layout_con)) );
-    Node* bol_lh = _gvn.transform( new(C, 2) BoolNode(cmp_lh, BoolTest::eq) );
+    Node* cmp_lh = _gvn.transform( new(C) CmpINode(layout_val, intcon(layout_con)) );
+    Node* bol_lh = _gvn.transform( new(C) BoolNode(cmp_lh, BoolTest::eq) );
     { BuildCutout unless(this, bol_lh, PROB_MAX);
       _sp += nargs;
       uncommon_trap(Deoptimization::Reason_class_check,
@@ -3172,8 +3170,8 @@ Node* GraphKit::new_array(Node* klass_node,     // array klass (maybe variable)
     fast_size_limit <<= (LogBytesPerLong - log2_esize);
   }
 
-  Node* initial_slow_cmp  = _gvn.transform( new (C, 3) CmpUNode( length, intcon( fast_size_limit ) ) );
-  Node* initial_slow_test = _gvn.transform( new (C, 2) BoolNode( initial_slow_cmp, BoolTest::gt ) );
+  Node* initial_slow_cmp  = _gvn.transform( new (C) CmpUNode( length, intcon( fast_size_limit ) ) );
+  Node* initial_slow_test = _gvn.transform( new (C) BoolNode( initial_slow_cmp, BoolTest::gt ) );
   if (initial_slow_test->is_Bool()) {
     // Hide it behind a CMoveI, or else PhaseIdealLoop::split_up will get sick.
     initial_slow_test = initial_slow_test->as_Bool()->as_int_value(&_gvn);
@@ -3201,10 +3199,10 @@ Node* GraphKit::new_array(Node* klass_node,     // array klass (maybe variable)
   } else {
     Node* hss   = intcon(Klass::_lh_header_size_shift);
     Node* hsm   = intcon(Klass::_lh_header_size_mask);
-    Node* hsize = _gvn.transform( new(C, 3) URShiftINode(layout_val, hss) );
-    hsize       = _gvn.transform( new(C, 3) AndINode(hsize, hsm) );
+    Node* hsize = _gvn.transform( new(C) URShiftINode(layout_val, hss) );
+    hsize       = _gvn.transform( new(C) AndINode(hsize, hsm) );
     Node* mask  = intcon(round_mask);
-    header_size = _gvn.transform( new(C, 3) AddINode(hsize, mask) );
+    header_size = _gvn.transform( new(C) AddINode(hsize, mask) );
   }
 
   Node* elem_shift = NULL;
@@ -3229,7 +3227,7 @@ Node* GraphKit::new_array(Node* klass_node,     // array klass (maybe variable)
       jlong size_max = arrayOopDesc::max_array_length(T_BYTE);
       if (size_max > tllen->_hi)  size_max = tllen->_hi;
       const TypeLong* tlcon = TypeLong::make(CONST64(0), size_max, Type::WidenMin);
-      lengthx = _gvn.transform( new (C, 2) ConvI2LNode(length, tlcon));
+      lengthx = _gvn.transform( new (C) ConvI2LNode(length, tlcon));
     }
   }
 #endif
@@ -3240,11 +3238,11 @@ Node* GraphKit::new_array(Node* klass_node,     // array klass (maybe variable)
   // after a successful allocation.
   Node* abody = lengthx;
   if (elem_shift != NULL)
-    abody     = _gvn.transform( new(C, 3) LShiftXNode(lengthx, elem_shift) );
-  Node* size  = _gvn.transform( new(C, 3) AddXNode(headerx, abody) );
+    abody     = _gvn.transform( new(C) LShiftXNode(lengthx, elem_shift) );
+  Node* size  = _gvn.transform( new(C) AddXNode(headerx, abody) );
   if (round_mask != 0) {
     Node* mask = MakeConX(~round_mask);
-    size       = _gvn.transform( new(C, 3) AndXNode(size, mask) );
+    size       = _gvn.transform( new(C) AndXNode(size, mask) );
   }
   // else if round_mask == 0, the size computation is self-rounding
 
@@ -3262,12 +3260,11 @@ Node* GraphKit::new_array(Node* klass_node,     // array klass (maybe variable)
 
   // Create the AllocateArrayNode and its result projections
   AllocateArrayNode* alloc
-    = new (C, AllocateArrayNode::ParmLimit)
-        AllocateArrayNode(C, AllocateArrayNode::alloc_type(),
-                          control(), mem, i_o(),
-                          size, klass_node,
-                          initial_slow_test,
-                          length);
+    = new (C) AllocateArrayNode(C, AllocateArrayNode::alloc_type(),
+                                control(), mem, i_o(),
+                                size, klass_node,
+                                initial_slow_test,
+                                length);
 
   // Cast to correct type.  Note that the klass_node may be constant or not,
   // and in the latter case the actual array type will be inexact also.
@@ -3386,10 +3383,10 @@ void GraphKit::add_predicate_impl(Deoptimization::DeoptReason reason, int nargs)
   }
 
   Node *cont    = _gvn.intcon(1);
-  Node* opq     = _gvn.transform(new (C, 2) Opaque1Node(C, cont));
-  Node *bol     = _gvn.transform(new (C, 2) Conv2BNode(opq));
+  Node* opq     = _gvn.transform(new (C) Opaque1Node(C, cont));
+  Node *bol     = _gvn.transform(new (C) Conv2BNode(opq));
   IfNode* iff   = create_and_map_if(control(), bol, PROB_MAX, COUNT_UNKNOWN);
-  Node* iffalse = _gvn.transform(new (C, 1) IfFalseNode(iff));
+  Node* iffalse = _gvn.transform(new (C) IfFalseNode(iff));
   C->add_predicate_opaq(opq);
   {
     PreserveJVMState pjvms(this);
@@ -3397,7 +3394,7 @@ void GraphKit::add_predicate_impl(Deoptimization::DeoptReason reason, int nargs)
     _sp += nargs;
     uncommon_trap(reason, Deoptimization::Action_maybe_recompile);
   }
-  Node* iftrue = _gvn.transform(new (C, 1) IfTrueNode(iff));
+  Node* iftrue = _gvn.transform(new (C) IfTrueNode(iff));
   set_control(iftrue);
 }
 
@@ -3590,7 +3587,7 @@ void GraphKit::g1_write_barrier_pre(bool do_load,
 #ifdef _LP64
         // We could refine the type for what it's worth
         // const TypeLong* lidxtype = TypeLong::make(CONST64(0), get_size_from_queue);
-        next_indexX = _gvn.transform( new (C, 2) ConvI2LNode(next_index, TypeLong::make(0, max_jlong, Type::WidenMax)) );
+        next_indexX = _gvn.transform( new (C) ConvI2LNode(next_index, TypeLong::make(0, max_jlong, Type::WidenMax)) );
 #endif
 
         // Now get the buffer location we will log the previous value into and store it
@@ -3638,7 +3635,7 @@ void GraphKit::g1_mark_card(IdealKit& ideal,
 #ifdef _LP64
     // We could refine the type for what it's worth
     // const TypeLong* lidxtype = TypeLong::make(CONST64(0), get_size_from_queue);
-    next_indexX = _gvn.transform( new (C, 2) ConvI2LNode(next_index, TypeLong::make(0, max_jlong, Type::WidenMax)) );
+    next_indexX = _gvn.transform( new (C) ConvI2LNode(next_index, TypeLong::make(0, max_jlong, Type::WidenMax)) );
 #endif // _LP64
     Node* log_addr = __ AddP(no_base, buffer, next_indexX);
 
diff --git a/hotspot/src/share/vm/opto/graphKit.hpp b/hotspot/src/share/vm/opto/graphKit.hpp
index 2c09486c30e..ede5b92e68e 100644
--- a/hotspot/src/share/vm/opto/graphKit.hpp
+++ b/hotspot/src/share/vm/opto/graphKit.hpp
@@ -303,31 +303,31 @@ class GraphKit : public Phase {
 
 
   // Some convenient shortcuts for common nodes
-  Node* IfTrue(IfNode* iff)                   { return _gvn.transform(new (C,1) IfTrueNode(iff));      }
-  Node* IfFalse(IfNode* iff)                  { return _gvn.transform(new (C,1) IfFalseNode(iff));     }
+  Node* IfTrue(IfNode* iff)                   { return _gvn.transform(new (C) IfTrueNode(iff));      }
+  Node* IfFalse(IfNode* iff)                  { return _gvn.transform(new (C) IfFalseNode(iff));     }
 
-  Node* AddI(Node* l, Node* r)                { return _gvn.transform(new (C,3) AddINode(l, r));       }
-  Node* SubI(Node* l, Node* r)                { return _gvn.transform(new (C,3) SubINode(l, r));       }
-  Node* MulI(Node* l, Node* r)                { return _gvn.transform(new (C,3) MulINode(l, r));       }
-  Node* DivI(Node* ctl, Node* l, Node* r)     { return _gvn.transform(new (C,3) DivINode(ctl, l, r));  }
+  Node* AddI(Node* l, Node* r)                { return _gvn.transform(new (C) AddINode(l, r));       }
+  Node* SubI(Node* l, Node* r)                { return _gvn.transform(new (C) SubINode(l, r));       }
+  Node* MulI(Node* l, Node* r)                { return _gvn.transform(new (C) MulINode(l, r));       }
+  Node* DivI(Node* ctl, Node* l, Node* r)     { return _gvn.transform(new (C) DivINode(ctl, l, r));  }
 
-  Node* AndI(Node* l, Node* r)                { return _gvn.transform(new (C,3) AndINode(l, r));       }
-  Node* OrI(Node* l, Node* r)                 { return _gvn.transform(new (C,3) OrINode(l, r));        }
-  Node* XorI(Node* l, Node* r)                { return _gvn.transform(new (C,3) XorINode(l, r));       }
+  Node* AndI(Node* l, Node* r)                { return _gvn.transform(new (C) AndINode(l, r));       }
+  Node* OrI(Node* l, Node* r)                 { return _gvn.transform(new (C) OrINode(l, r));        }
+  Node* XorI(Node* l, Node* r)                { return _gvn.transform(new (C) XorINode(l, r));       }
 
-  Node* MaxI(Node* l, Node* r)                { return _gvn.transform(new (C,3) MaxINode(l, r));       }
-  Node* MinI(Node* l, Node* r)                { return _gvn.transform(new (C,3) MinINode(l, r));       }
+  Node* MaxI(Node* l, Node* r)                { return _gvn.transform(new (C) MaxINode(l, r));       }
+  Node* MinI(Node* l, Node* r)                { return _gvn.transform(new (C) MinINode(l, r));       }
 
-  Node* LShiftI(Node* l, Node* r)             { return _gvn.transform(new (C,3) LShiftINode(l, r));    }
-  Node* RShiftI(Node* l, Node* r)             { return _gvn.transform(new (C,3) RShiftINode(l, r));    }
-  Node* URShiftI(Node* l, Node* r)            { return _gvn.transform(new (C,3) URShiftINode(l, r));   }
+  Node* LShiftI(Node* l, Node* r)             { return _gvn.transform(new (C) LShiftINode(l, r));    }
+  Node* RShiftI(Node* l, Node* r)             { return _gvn.transform(new (C) RShiftINode(l, r));    }
+  Node* URShiftI(Node* l, Node* r)            { return _gvn.transform(new (C) URShiftINode(l, r));   }
 
-  Node* CmpI(Node* l, Node* r)                { return _gvn.transform(new (C,3) CmpINode(l, r));       }
-  Node* CmpL(Node* l, Node* r)                { return _gvn.transform(new (C,3) CmpLNode(l, r));       }
-  Node* CmpP(Node* l, Node* r)                { return _gvn.transform(new (C,3) CmpPNode(l, r));       }
-  Node* Bool(Node* cmp, BoolTest::mask relop) { return _gvn.transform(new (C,2) BoolNode(cmp, relop)); }
+  Node* CmpI(Node* l, Node* r)                { return _gvn.transform(new (C) CmpINode(l, r));       }
+  Node* CmpL(Node* l, Node* r)                { return _gvn.transform(new (C) CmpLNode(l, r));       }
+  Node* CmpP(Node* l, Node* r)                { return _gvn.transform(new (C) CmpPNode(l, r));       }
+  Node* Bool(Node* cmp, BoolTest::mask relop) { return _gvn.transform(new (C) BoolNode(cmp, relop)); }
 
-  Node* AddP(Node* b, Node* a, Node* o)       { return _gvn.transform(new (C,4) AddPNode(b, a, o));    }
+  Node* AddP(Node* b, Node* a, Node* o)       { return _gvn.transform(new (C) AddPNode(b, a, o));    }
 
   // Convert between int and long, and size_t.
   // (See macros ConvI2X, etc., in type.hpp for ConvI2X, etc.)
@@ -792,7 +792,7 @@ class GraphKit : public Phase {
 
   // Handy for making control flow
   IfNode* create_and_map_if(Node* ctrl, Node* tst, float prob, float cnt) {
-    IfNode* iff = new (C, 2) IfNode(ctrl, tst, prob, cnt);// New IfNode's
+    IfNode* iff = new (C) IfNode(ctrl, tst, prob, cnt);// New IfNode's
     _gvn.set_type(iff, iff->Value(&_gvn)); // Value may be known at parse-time
     // Place 'if' on worklist if it will be in graph
     if (!tst->is_Con())  record_for_igvn(iff);     // Range-check and Null-check removal is later
@@ -800,7 +800,7 @@ class GraphKit : public Phase {
   }
 
   IfNode* create_and_xform_if(Node* ctrl, Node* tst, float prob, float cnt) {
-    IfNode* iff = new (C, 2) IfNode(ctrl, tst, prob, cnt);// New IfNode's
+    IfNode* iff = new (C) IfNode(ctrl, tst, prob, cnt);// New IfNode's
     _gvn.transform(iff);                           // Value may be known at parse-time
     // Place 'if' on worklist if it will be in graph
     if (!tst->is_Con())  record_for_igvn(iff);     // Range-check and Null-check removal is later
diff --git a/hotspot/src/share/vm/opto/idealKit.cpp b/hotspot/src/share/vm/opto/idealKit.cpp
index 1cc4b2bd133..986f2e178ec 100644
--- a/hotspot/src/share/vm/opto/idealKit.cpp
+++ b/hotspot/src/share/vm/opto/idealKit.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -86,7 +86,7 @@ void IdealKit::if_then(Node* left, BoolTest::mask relop,
   }
   // Delay gvn.tranform on if-nodes until construction is finished
   // to prevent a constant bool input from discarding a control output.
-  IfNode* iff = delay_transform(new (C, 2) IfNode(ctrl(), bol, prob, cnt))->as_If();
+  IfNode* iff = delay_transform(new (C) IfNode(ctrl(), bol, prob, cnt))->as_If();
   Node* then  = IfTrue(iff);
   Node* elsen = IfFalse(iff);
   Node* else_cvstate = copy_cvstate();
@@ -205,7 +205,7 @@ Node* IdealKit::make_label(int goto_ct) {
   assert(_cvstate != NULL, "must declare variables before labels");
   Node* lab = new_cvstate();
   int sz = 1 + goto_ct + 1 /* fall thru */;
-  Node* reg = delay_transform(new (C, sz) RegionNode(sz));
+  Node* reg = delay_transform(new (C) RegionNode(sz));
   lab->init_req(TypeFunc::Control, reg);
   return lab;
 }
@@ -315,7 +315,7 @@ Node* IdealKit::delay_transform(Node* n) {
 //-----------------------------new_cvstate-----------------------------------
 Node* IdealKit::new_cvstate() {
   uint sz = _var_ct + first_var;
-  return new (C, sz) Node(sz);
+  return new (C) Node(sz);
 }
 
 //-----------------------------copy_cvstate-----------------------------------
@@ -413,7 +413,7 @@ Node* IdealKit::storeCM(Node* ctl, Node* adr, Node *val, Node* oop_store, int oo
 
   // Add required edge to oop_store, optimizer does not support precedence edges.
   // Convert required edge to precedence edge before allocation.
-  Node* st = new (C, 5) StoreCMNode(ctl, mem, adr, adr_type, val, oop_store, oop_adr_idx);
+  Node* st = new (C) StoreCMNode(ctl, mem, adr, adr_type, val, oop_store, oop_adr_idx);
 
   st = transform(st);
   set_memory(st, adr_idx);
@@ -513,8 +513,7 @@ void IdealKit::make_leaf_call(const TypeFunc *slow_call_type,
   uint adr_idx = C->get_alias_index(adr_type);
 
   // Slow-path leaf call
-  int size = slow_call_type->domain()->cnt();
-  CallNode *call =  (CallNode*)new (C, size) CallLeafNode( slow_call_type, slow_call, leaf_name, adr_type);
+  CallNode *call =  (CallNode*)new (C) CallLeafNode( slow_call_type, slow_call, leaf_name, adr_type);
 
   // Set fixed predefined input arguments
   call->init_req( TypeFunc::Control, ctrl() );
@@ -535,10 +534,10 @@ void IdealKit::make_leaf_call(const TypeFunc *slow_call_type,
 
   // Slow leaf call has no side-effects, sets few values
 
-  set_ctrl(transform( new (C, 1) ProjNode(call,TypeFunc::Control) ));
+  set_ctrl(transform( new (C) ProjNode(call,TypeFunc::Control) ));
 
   // Make memory for the call
-  Node* mem = _gvn.transform( new (C, 1) ProjNode(call, TypeFunc::Memory) );
+  Node* mem = _gvn.transform( new (C) ProjNode(call, TypeFunc::Memory) );
 
   // Set the RawPtr memory state only.
   set_memory(mem, adr_idx);
@@ -561,8 +560,7 @@ void IdealKit::make_leaf_call_no_fp(const TypeFunc *slow_call_type,
   uint adr_idx = C->get_alias_index(adr_type);
 
   // Slow-path leaf call
-  int size = slow_call_type->domain()->cnt();
-  CallNode *call =  (CallNode*)new (C, size) CallLeafNoFPNode( slow_call_type, slow_call, leaf_name, adr_type);
+  CallNode *call =  (CallNode*)new (C) CallLeafNoFPNode( slow_call_type, slow_call, leaf_name, adr_type);
 
   // Set fixed predefined input arguments
   call->init_req( TypeFunc::Control, ctrl() );
@@ -583,10 +581,10 @@ void IdealKit::make_leaf_call_no_fp(const TypeFunc *slow_call_type,
 
   // Slow leaf call has no side-effects, sets few values
 
-  set_ctrl(transform( new (C, 1) ProjNode(call,TypeFunc::Control) ));
+  set_ctrl(transform( new (C) ProjNode(call,TypeFunc::Control) ));
 
   // Make memory for the call
-  Node* mem = _gvn.transform( new (C, 1) ProjNode(call, TypeFunc::Memory) );
+  Node* mem = _gvn.transform( new (C) ProjNode(call, TypeFunc::Memory) );
 
   // Set the RawPtr memory state only.
   set_memory(mem, adr_idx);
diff --git a/hotspot/src/share/vm/opto/idealKit.hpp b/hotspot/src/share/vm/opto/idealKit.hpp
index 6787e533a64..15e4274db7c 100644
--- a/hotspot/src/share/vm/opto/idealKit.hpp
+++ b/hotspot/src/share/vm/opto/idealKit.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -175,39 +175,39 @@ class IdealKit: public StackObj {
   void declarations_done();
   void drain_delay_transform();
 
-  Node* IfTrue(IfNode* iff)  { return transform(new (C,1) IfTrueNode(iff)); }
-  Node* IfFalse(IfNode* iff) { return transform(new (C,1) IfFalseNode(iff)); }
+  Node* IfTrue(IfNode* iff)  { return transform(new (C) IfTrueNode(iff)); }
+  Node* IfFalse(IfNode* iff) { return transform(new (C) IfFalseNode(iff)); }
 
   // Data
   Node* ConI(jint k) { return (Node*)gvn().intcon(k); }
   Node* makecon(const Type *t)  const { return _gvn.makecon(t); }
 
-  Node* AddI(Node* l, Node* r) { return transform(new (C,3) AddINode(l, r)); }
-  Node* SubI(Node* l, Node* r) { return transform(new (C,3) SubINode(l, r)); }
-  Node* AndI(Node* l, Node* r) { return transform(new (C,3) AndINode(l, r)); }
-  Node* MaxI(Node* l, Node* r) { return transform(new (C,3) MaxINode(l, r)); }
-  Node* LShiftI(Node* l, Node* r) { return transform(new (C,3) LShiftINode(l, r)); }
-  Node* CmpI(Node* l, Node* r) { return transform(new (C,3) CmpINode(l, r)); }
-  Node* Bool(Node* cmp, BoolTest::mask relop) { return transform(new (C,2) BoolNode(cmp, relop)); }
+  Node* AddI(Node* l, Node* r) { return transform(new (C) AddINode(l, r)); }
+  Node* SubI(Node* l, Node* r) { return transform(new (C) SubINode(l, r)); }
+  Node* AndI(Node* l, Node* r) { return transform(new (C) AndINode(l, r)); }
+  Node* MaxI(Node* l, Node* r) { return transform(new (C) MaxINode(l, r)); }
+  Node* LShiftI(Node* l, Node* r) { return transform(new (C) LShiftINode(l, r)); }
+  Node* CmpI(Node* l, Node* r) { return transform(new (C) CmpINode(l, r)); }
+  Node* Bool(Node* cmp, BoolTest::mask relop) { return transform(new (C) BoolNode(cmp, relop)); }
   void  increment(IdealVariable& v, Node* j)  { set(v, AddI(value(v), j)); }
   void  decrement(IdealVariable& v, Node* j)  { set(v, SubI(value(v), j)); }
 
-  Node* CmpL(Node* l, Node* r) { return transform(new (C,3) CmpLNode(l, r)); }
+  Node* CmpL(Node* l, Node* r) { return transform(new (C) CmpLNode(l, r)); }
 
   // TLS
-  Node* thread()  {  return gvn().transform(new (C, 1) ThreadLocalNode()); }
+  Node* thread()  {  return gvn().transform(new (C) ThreadLocalNode()); }
 
   // Pointers
-  Node* AddP(Node *base, Node *ptr, Node *off) { return transform(new (C,4) AddPNode(base, ptr, off)); }
-  Node* CmpP(Node* l, Node* r) { return transform(new (C,3) CmpPNode(l, r)); }
+  Node* AddP(Node *base, Node *ptr, Node *off) { return transform(new (C) AddPNode(base, ptr, off)); }
+  Node* CmpP(Node* l, Node* r) { return transform(new (C) CmpPNode(l, r)); }
 #ifdef _LP64
-  Node* XorX(Node* l, Node* r) { return transform(new (C,3) XorLNode(l, r)); }
+  Node* XorX(Node* l, Node* r) { return transform(new (C) XorLNode(l, r)); }
 #else // _LP64
-  Node* XorX(Node* l, Node* r) { return transform(new (C,3) XorINode(l, r)); }
+  Node* XorX(Node* l, Node* r) { return transform(new (C) XorINode(l, r)); }
 #endif // _LP64
-  Node* URShiftX(Node* l, Node* r) { return transform(new (C,3) URShiftXNode(l, r)); }
+  Node* URShiftX(Node* l, Node* r) { return transform(new (C) URShiftXNode(l, r)); }
   Node* ConX(jint k) { return (Node*)gvn().MakeConX(k); }
-  Node* CastPX(Node* ctl, Node* p) { return transform(new (C,2) CastP2XNode(ctl, p)); }
+  Node* CastPX(Node* ctl, Node* p) { return transform(new (C) CastP2XNode(ctl, p)); }
   // Add a fixed offset to a pointer
   Node* basic_plus_adr(Node* base, Node* ptr, intptr_t offset);
 
diff --git a/hotspot/src/share/vm/opto/ifnode.cpp b/hotspot/src/share/vm/opto/ifnode.cpp
index c48e982bab9..b506a03f587 100644
--- a/hotspot/src/share/vm/opto/ifnode.cpp
+++ b/hotspot/src/share/vm/opto/ifnode.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -238,10 +238,10 @@ static Node* split_if(IfNode *iff, PhaseIterGVN *igvn) {
   Node* predicate_x = NULL;
   bool counted_loop = r->is_CountedLoop();
 
-  Node *region_c = new (igvn->C, req_c + 1) RegionNode(req_c + 1);
+  Node *region_c = new (igvn->C) RegionNode(req_c + 1);
   Node *phi_c    = con1;
   uint  len      = r->req();
-  Node *region_x = new (igvn->C, len - req_c) RegionNode(len - req_c);
+  Node *region_x = new (igvn->C) RegionNode(len - req_c);
   Node *phi_x    = PhiNode::make_blank(region_x, phi);
   for (uint i = 1, i_c = 1, i_x = 1; i < len; i++) {
     if (phi->in(i) == con1) {
@@ -272,7 +272,7 @@ static Node* split_if(IfNode *iff, PhaseIterGVN *igvn) {
   // Prevent the untimely death of phi_x.  Currently he has no uses.  He is
   // about to get one.  If this only use goes away, then phi_x will look dead.
   // However, he will be picking up some more uses down below.
-  Node *hook = new (igvn->C, 4) Node(4);
+  Node *hook = new (igvn->C) Node(4);
   hook->init_req(0, phi_x);
   hook->init_req(1, phi_c);
   phi_x = phase->transform( phi_x );
@@ -284,30 +284,30 @@ static Node* split_if(IfNode *iff, PhaseIterGVN *igvn) {
   cmp_x->set_req(2,con2);
   cmp_x = phase->transform(cmp_x);
   // Make the bool
-  Node *b_c = phase->transform(new (igvn->C, 2) BoolNode(cmp_c,b->_test._test));
-  Node *b_x = phase->transform(new (igvn->C, 2) BoolNode(cmp_x,b->_test._test));
+  Node *b_c = phase->transform(new (igvn->C) BoolNode(cmp_c,b->_test._test));
+  Node *b_x = phase->transform(new (igvn->C) BoolNode(cmp_x,b->_test._test));
   // Make the IfNode
-  IfNode *iff_c = new (igvn->C, 2) IfNode(region_c,b_c,iff->_prob,iff->_fcnt);
+  IfNode *iff_c = new (igvn->C) IfNode(region_c,b_c,iff->_prob,iff->_fcnt);
   igvn->set_type_bottom(iff_c);
   igvn->_worklist.push(iff_c);
   hook->init_req(2, iff_c);
 
-  IfNode *iff_x = new (igvn->C, 2) IfNode(region_x,b_x,iff->_prob, iff->_fcnt);
+  IfNode *iff_x = new (igvn->C) IfNode(region_x,b_x,iff->_prob, iff->_fcnt);
   igvn->set_type_bottom(iff_x);
   igvn->_worklist.push(iff_x);
   hook->init_req(3, iff_x);
 
   // Make the true/false arms
-  Node *iff_c_t = phase->transform(new (igvn->C, 1) IfTrueNode (iff_c));
-  Node *iff_c_f = phase->transform(new (igvn->C, 1) IfFalseNode(iff_c));
+  Node *iff_c_t = phase->transform(new (igvn->C) IfTrueNode (iff_c));
+  Node *iff_c_f = phase->transform(new (igvn->C) IfFalseNode(iff_c));
   if (predicate_c != NULL) {
     assert(predicate_x == NULL, "only one predicate entry expected");
     // Clone loop predicates to each path
     iff_c_t = igvn->clone_loop_predicates(predicate_c, iff_c_t, !counted_loop);
     iff_c_f = igvn->clone_loop_predicates(predicate_c, iff_c_f, !counted_loop);
   }
-  Node *iff_x_t = phase->transform(new (igvn->C, 1) IfTrueNode (iff_x));
-  Node *iff_x_f = phase->transform(new (igvn->C, 1) IfFalseNode(iff_x));
+  Node *iff_x_t = phase->transform(new (igvn->C) IfTrueNode (iff_x));
+  Node *iff_x_f = phase->transform(new (igvn->C) IfFalseNode(iff_x));
   if (predicate_x != NULL) {
     assert(predicate_c == NULL, "only one predicate entry expected");
     // Clone loop predicates to each path
@@ -316,14 +316,14 @@ static Node* split_if(IfNode *iff, PhaseIterGVN *igvn) {
   }
 
   // Merge the TRUE paths
-  Node *region_s = new (igvn->C, 3) RegionNode(3);
+  Node *region_s = new (igvn->C) RegionNode(3);
   igvn->_worklist.push(region_s);
   region_s->init_req(1, iff_c_t);
   region_s->init_req(2, iff_x_t);
   igvn->register_new_node_with_optimizer( region_s );
 
   // Merge the FALSE paths
-  Node *region_f = new (igvn->C, 3) RegionNode(3);
+  Node *region_f = new (igvn->C) RegionNode(3);
   igvn->_worklist.push(region_f);
   region_f->init_req(1, iff_c_f);
   region_f->init_req(2, iff_x_f);
@@ -438,7 +438,7 @@ static Node* split_if(IfNode *iff, PhaseIterGVN *igvn) {
 
   // Must return either the original node (now dead) or a new node
   // (Do not return a top here, since that would break the uniqueness of top.)
-  return new (igvn->C, 1) ConINode(TypeInt::ZERO);
+  return new (igvn->C) ConINode(TypeInt::ZERO);
 }
 
 //------------------------------is_range_check---------------------------------
@@ -541,16 +541,16 @@ static void adjust_check(Node* proj, Node* range, Node* index,
   // Compute a new check
   Node *new_add = gvn->intcon(off_lo);
   if( index ) {
-    new_add = off_lo ? gvn->transform(new (gvn->C, 3) AddINode( index, new_add )) : index;
+    new_add = off_lo ? gvn->transform(new (gvn->C) AddINode( index, new_add )) : index;
   }
   Node *new_cmp = (flip == 1)
-    ? new (gvn->C, 3) CmpUNode( new_add, range )
-    : new (gvn->C, 3) CmpUNode( range, new_add );
+    ? new (gvn->C) CmpUNode( new_add, range )
+    : new (gvn->C) CmpUNode( range, new_add );
   new_cmp = gvn->transform(new_cmp);
   // See if no need to adjust the existing check
   if( new_cmp == cmp ) return;
   // Else, adjust existing check
-  Node *new_bol = gvn->transform( new (gvn->C, 2) BoolNode( new_cmp, bol->as_Bool()->_test._test ) );
+  Node *new_bol = gvn->transform( new (gvn->C) BoolNode( new_cmp, bol->as_Bool()->_test._test ) );
   igvn->rehash_node_delayed( iff );
   iff->set_req_X( 1, new_bol, igvn );
 }
@@ -727,9 +727,9 @@ Node* IfNode::fold_compares(PhaseGVN* phase) {
             if (failtype->_hi != max_jint && failtype->_lo != min_jint && bound > 1) {
               // Merge the two compares into a single unsigned compare by building  (CmpU (n - lo) hi)
               BoolTest::mask cond = fail->as_Proj()->_con ? BoolTest::lt : BoolTest::ge;
-              Node* adjusted = phase->transform(new (phase->C, 3) SubINode(n, phase->intcon(failtype->_lo)));
-              Node* newcmp = phase->transform(new (phase->C, 3) CmpUNode(adjusted, phase->intcon(bound)));
-              Node* newbool = phase->transform(new (phase->C, 2) BoolNode(newcmp, cond));
+              Node* adjusted = phase->transform(new (phase->C) SubINode(n, phase->intcon(failtype->_lo)));
+              Node* newcmp = phase->transform(new (phase->C) CmpUNode(adjusted, phase->intcon(bound)));
+              Node* newbool = phase->transform(new (phase->C) BoolNode(newcmp, cond));
               phase->is_IterGVN()->replace_input_of(dom_iff, 1, phase->intcon(ctrl->as_Proj()->_con));
               phase->hash_delete(this);
               set_req(1, newbool);
@@ -1002,7 +1002,7 @@ Node *IfNode::Ideal(PhaseGVN *phase, bool can_reshape) {
 
   // Must return either the original node (now dead) or a new node
   // (Do not return a top here, since that would break the uniqueness of top.)
-  return new (phase->C, 1) ConINode(TypeInt::ZERO);
+  return new (phase->C) ConINode(TypeInt::ZERO);
 }
 
 //------------------------------dominated_by-----------------------------------
@@ -1098,7 +1098,7 @@ static IfNode* idealize_test(PhaseGVN* phase, IfNode* iff) {
 
   // Flip test to be canonical.  Requires flipping the IfFalse/IfTrue and
   // cloning the IfNode.
-  Node* new_b = phase->transform( new (phase->C, 2) BoolNode(b->in(1), bt.negate()) );
+  Node* new_b = phase->transform( new (phase->C) BoolNode(b->in(1), bt.negate()) );
   if( !new_b->is_Bool() ) return NULL;
   b = new_b->as_Bool();
 
@@ -1106,7 +1106,7 @@ static IfNode* idealize_test(PhaseGVN* phase, IfNode* iff) {
   assert( igvn, "Test is not canonical in parser?" );
 
   // The IF node never really changes, but it needs to be cloned
-  iff = new (phase->C, 2) IfNode( iff->in(0), b, 1.0-iff->_prob, iff->_fcnt);
+  iff = new (phase->C) IfNode( iff->in(0), b, 1.0-iff->_prob, iff->_fcnt);
 
   Node *prior = igvn->hash_find_insert(iff);
   if( prior ) {
@@ -1119,8 +1119,8 @@ static IfNode* idealize_test(PhaseGVN* phase, IfNode* iff) {
   igvn->_worklist.push(iff);
 
   // Now handle projections.  Cloning not required.
-  Node* new_if_f = (Node*)(new (phase->C, 1) IfFalseNode( iff ));
-  Node* new_if_t = (Node*)(new (phase->C, 1) IfTrueNode ( iff ));
+  Node* new_if_f = (Node*)(new (phase->C) IfFalseNode( iff ));
+  Node* new_if_t = (Node*)(new (phase->C) IfTrueNode ( iff ));
 
   igvn->register_new_node_with_optimizer(new_if_f);
   igvn->register_new_node_with_optimizer(new_if_t);
diff --git a/hotspot/src/share/vm/opto/lcm.cpp b/hotspot/src/share/vm/opto/lcm.cpp
index 2f272eb55c7..24a6a3182d0 100644
--- a/hotspot/src/share/vm/opto/lcm.cpp
+++ b/hotspot/src/share/vm/opto/lcm.cpp
@@ -164,6 +164,7 @@ void Block::implicit_null_check(PhaseCFG *cfg, Node *proj, Node *val, int allowe
     case Op_StoreL:
     case Op_StoreP:
     case Op_StoreN:
+    case Op_StoreNKlass:
       was_store = true;         // Memory op is a store op
       // Stores will have their address in slot 2 (memory in slot 1).
       // If the value being nul-checked is in another slot, it means we
@@ -369,7 +370,7 @@ void Block::implicit_null_check(PhaseCFG *cfg, Node *proj, Node *val, int allowe
     Node *tmp2 = _nodes[end_idx()+2];
     _nodes.map(end_idx()+1, tmp2);
     _nodes.map(end_idx()+2, tmp1);
-    Node *tmp = new (C, 1) Node(C->top()); // Use not NULL input
+    Node *tmp = new (C) Node(C->top()); // Use not NULL input
     tmp1->replace_by(tmp);
     tmp2->replace_by(tmp1);
     tmp->replace_by(tmp2);
@@ -612,7 +613,7 @@ uint Block::sched_call( Matcher &matcher, Block_Array &bbs, uint node_cnt, Node_
   // Set all registers killed and not already defined by the call.
   uint r_cnt = mcall->tf()->range()->cnt();
   int op = mcall->ideal_Opcode();
-  MachProjNode *proj = new (matcher.C, 1) MachProjNode( mcall, r_cnt+1, RegMask::Empty, MachProjNode::fat_proj );
+  MachProjNode *proj = new (matcher.C) MachProjNode( mcall, r_cnt+1, RegMask::Empty, MachProjNode::fat_proj );
   bbs.map(proj->_idx,this);
   _nodes.insert(node_cnt++, proj);
 
@@ -839,7 +840,7 @@ bool Block::schedule_local(PhaseCFG *cfg, Matcher &matcher, GrowableArray<int> &
       regs.Insert(matcher.c_frame_pointer());
       regs.OR(n->out_RegMask());
 
-      MachProjNode *proj = new (matcher.C, 1) MachProjNode( n, 1, RegMask::Empty, MachProjNode::fat_proj );
+      MachProjNode *proj = new (matcher.C) MachProjNode( n, 1, RegMask::Empty, MachProjNode::fat_proj );
       cfg->_bbs.map(proj->_idx,this);
       _nodes.insert(phi_cnt++, proj);
 
diff --git a/hotspot/src/share/vm/opto/library_call.cpp b/hotspot/src/share/vm/opto/library_call.cpp
index 832799a58c0..f34df79b476 100644
--- a/hotspot/src/share/vm/opto/library_call.cpp
+++ b/hotspot/src/share/vm/opto/library_call.cpp
@@ -65,6 +65,8 @@ class LibraryCallKit : public GraphKit {
  private:
   LibraryIntrinsic* _intrinsic;   // the library intrinsic being called
 
+  const TypeOopPtr* sharpen_unsafe_type(Compile::AliasType* alias_type, const TypePtr *adr_type, bool is_native_ptr = false);
+
  public:
   LibraryCallKit(JVMState* caller, LibraryIntrinsic* intrinsic)
     : GraphKit(caller),
@@ -241,7 +243,8 @@ class LibraryCallKit : public GraphKit {
                                     Node* src,  Node* src_offset,
                                     Node* dest, Node* dest_offset,
                                     Node* copy_length, bool dest_uninitialized);
-  bool inline_unsafe_CAS(BasicType type);
+  typedef enum { LS_xadd, LS_xchg, LS_cmpxchg } LoadStoreKind;
+  bool inline_unsafe_load_store(BasicType type,  LoadStoreKind kind);
   bool inline_unsafe_ordered_store(BasicType type);
   bool inline_fp_conversions(vmIntrinsics::ID id);
   bool inline_numberOfLeadingZeros(vmIntrinsics::ID id);
@@ -290,6 +293,11 @@ CallGenerator* Compile::make_vm_intrinsic(ciMethod* m, bool is_virtual) {
     case vmIntrinsics::_compareTo:
     case vmIntrinsics::_equals:
     case vmIntrinsics::_equalsC:
+    case vmIntrinsics::_getAndAddInt:
+    case vmIntrinsics::_getAndAddLong:
+    case vmIntrinsics::_getAndSetInt:
+    case vmIntrinsics::_getAndSetLong:
+    case vmIntrinsics::_getAndSetObject:
       break;  // InlineNatives does not control String.compareTo
     case vmIntrinsics::_Reference_get:
       break;  // InlineNatives does not control Reference.get
@@ -369,6 +377,42 @@ CallGenerator* Compile::make_vm_intrinsic(ciMethod* m, bool is_virtual) {
     // across safepoint since GC can change it value.
     break;
 
+  case vmIntrinsics::_compareAndSwapObject:
+#ifdef _LP64
+    if (!UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndSwapP)) return NULL;
+#endif
+    break;
+
+  case vmIntrinsics::_compareAndSwapLong:
+    if (!Matcher::match_rule_supported(Op_CompareAndSwapL)) return NULL;
+    break;
+
+  case vmIntrinsics::_getAndAddInt:
+    if (!Matcher::match_rule_supported(Op_GetAndAddI)) return NULL;
+    break;
+
+  case vmIntrinsics::_getAndAddLong:
+    if (!Matcher::match_rule_supported(Op_GetAndAddL)) return NULL;
+    break;
+
+  case vmIntrinsics::_getAndSetInt:
+    if (!Matcher::match_rule_supported(Op_GetAndSetI)) return NULL;
+    break;
+
+  case vmIntrinsics::_getAndSetLong:
+    if (!Matcher::match_rule_supported(Op_GetAndSetL)) return NULL;
+    break;
+
+  case vmIntrinsics::_getAndSetObject:
+#ifdef _LP64
+    if (!UseCompressedOops && !Matcher::match_rule_supported(Op_GetAndSetP)) return NULL;
+    if (UseCompressedOops && !Matcher::match_rule_supported(Op_GetAndSetN)) return NULL;
+    break;
+#else
+    if (!Matcher::match_rule_supported(Op_GetAndSetP)) return NULL;
+    break;
+#endif
+
  default:
     assert(id <= vmIntrinsics::LAST_COMPILER_INLINE, "caller responsibility");
     assert(id != vmIntrinsics::_Object_init && id != vmIntrinsics::_invoke, "enum out of order?");
@@ -620,11 +664,11 @@ bool LibraryCallKit::try_to_inline() {
     return inline_unsafe_prefetch(!is_native_ptr, is_store, is_static);
 
   case vmIntrinsics::_compareAndSwapObject:
-    return inline_unsafe_CAS(T_OBJECT);
+    return inline_unsafe_load_store(T_OBJECT, LS_cmpxchg);
   case vmIntrinsics::_compareAndSwapInt:
-    return inline_unsafe_CAS(T_INT);
+    return inline_unsafe_load_store(T_INT, LS_cmpxchg);
   case vmIntrinsics::_compareAndSwapLong:
-    return inline_unsafe_CAS(T_LONG);
+    return inline_unsafe_load_store(T_LONG, LS_cmpxchg);
 
   case vmIntrinsics::_putOrderedObject:
     return inline_unsafe_ordered_store(T_OBJECT);
@@ -633,6 +677,17 @@ bool LibraryCallKit::try_to_inline() {
   case vmIntrinsics::_putOrderedLong:
     return inline_unsafe_ordered_store(T_LONG);
 
+  case vmIntrinsics::_getAndAddInt:
+    return inline_unsafe_load_store(T_INT, LS_xadd);
+  case vmIntrinsics::_getAndAddLong:
+    return inline_unsafe_load_store(T_LONG, LS_xadd);
+  case vmIntrinsics::_getAndSetInt:
+    return inline_unsafe_load_store(T_INT, LS_xchg);
+  case vmIntrinsics::_getAndSetLong:
+    return inline_unsafe_load_store(T_LONG, LS_xchg);
+  case vmIntrinsics::_getAndSetObject:
+    return inline_unsafe_load_store(T_OBJECT, LS_xchg);
+
   case vmIntrinsics::_currentThread:
     return inline_native_currentThread();
   case vmIntrinsics::_isInterrupted:
@@ -759,7 +814,7 @@ Node* LibraryCallKit::generate_guard(Node* test, RegionNode* region, float true_
 
   IfNode* iff = create_and_map_if(control(), test, true_prob, COUNT_UNKNOWN);
 
-  Node* if_slow = _gvn.transform( new (C, 1) IfTrueNode(iff) );
+  Node* if_slow = _gvn.transform( new (C) IfTrueNode(iff) );
   if (if_slow == top()) {
     // The slow branch is never taken.  No need to build this guard.
     return NULL;
@@ -768,7 +823,7 @@ Node* LibraryCallKit::generate_guard(Node* test, RegionNode* region, float true_
   if (region != NULL)
     region->add_req(if_slow);
 
-  Node* if_fast = _gvn.transform( new (C, 1) IfFalseNode(iff) );
+  Node* if_fast = _gvn.transform( new (C) IfFalseNode(iff) );
   set_control(if_fast);
 
   return if_slow;
@@ -787,12 +842,12 @@ inline Node* LibraryCallKit::generate_negative_guard(Node* index, RegionNode* re
     return NULL;                // already stopped
   if (_gvn.type(index)->higher_equal(TypeInt::POS)) // [0,maxint]
     return NULL;                // index is already adequately typed
-  Node* cmp_lt = _gvn.transform( new (C, 3) CmpINode(index, intcon(0)) );
-  Node* bol_lt = _gvn.transform( new (C, 2) BoolNode(cmp_lt, BoolTest::lt) );
+  Node* cmp_lt = _gvn.transform( new (C) CmpINode(index, intcon(0)) );
+  Node* bol_lt = _gvn.transform( new (C) BoolNode(cmp_lt, BoolTest::lt) );
   Node* is_neg = generate_guard(bol_lt, region, PROB_MIN);
   if (is_neg != NULL && pos_index != NULL) {
     // Emulate effect of Parse::adjust_map_after_if.
-    Node* ccast = new (C, 2) CastIINode(index, TypeInt::POS);
+    Node* ccast = new (C) CastIINode(index, TypeInt::POS);
     ccast->set_req(0, control());
     (*pos_index) = _gvn.transform(ccast);
   }
@@ -805,13 +860,13 @@ inline Node* LibraryCallKit::generate_nonpositive_guard(Node* index, bool never_
     return NULL;                // already stopped
   if (_gvn.type(index)->higher_equal(TypeInt::POS1)) // [1,maxint]
     return NULL;                // index is already adequately typed
-  Node* cmp_le = _gvn.transform( new (C, 3) CmpINode(index, intcon(0)) );
+  Node* cmp_le = _gvn.transform( new (C) CmpINode(index, intcon(0)) );
   BoolTest::mask le_or_eq = (never_negative ? BoolTest::eq : BoolTest::le);
-  Node* bol_le = _gvn.transform( new (C, 2) BoolNode(cmp_le, le_or_eq) );
+  Node* bol_le = _gvn.transform( new (C) BoolNode(cmp_le, le_or_eq) );
   Node* is_notp = generate_guard(bol_le, NULL, PROB_MIN);
   if (is_notp != NULL && pos_index != NULL) {
     // Emulate effect of Parse::adjust_map_after_if.
-    Node* ccast = new (C, 2) CastIINode(index, TypeInt::POS1);
+    Node* ccast = new (C) CastIINode(index, TypeInt::POS1);
     ccast->set_req(0, control());
     (*pos_index) = _gvn.transform(ccast);
   }
@@ -843,9 +898,9 @@ inline Node* LibraryCallKit::generate_limit_guard(Node* offset,
     return NULL;                // common case of whole-array copy
   Node* last = subseq_length;
   if (!zero_offset)             // last += offset
-    last = _gvn.transform( new (C, 3) AddINode(last, offset));
-  Node* cmp_lt = _gvn.transform( new (C, 3) CmpUNode(array_length, last) );
-  Node* bol_lt = _gvn.transform( new (C, 2) BoolNode(cmp_lt, BoolTest::lt) );
+    last = _gvn.transform( new (C) AddINode(last, offset));
+  Node* cmp_lt = _gvn.transform( new (C) CmpUNode(array_length, last) );
+  Node* bol_lt = _gvn.transform( new (C) BoolNode(cmp_lt, BoolTest::lt) );
   Node* is_over = generate_guard(bol_lt, region, PROB_MIN);
   return is_over;
 }
@@ -855,7 +910,7 @@ inline Node* LibraryCallKit::generate_limit_guard(Node* offset,
 Node* LibraryCallKit::generate_current_thread(Node* &tls_output) {
   ciKlass*    thread_klass = env()->Thread_klass();
   const Type* thread_type  = TypeOopPtr::make_from_klass(thread_klass)->cast_to_ptr_type(TypePtr::NotNull);
-  Node* thread = _gvn.transform(new (C, 1) ThreadLocalNode());
+  Node* thread = _gvn.transform(new (C) ThreadLocalNode());
   Node* p = basic_plus_adr(top()/*!oop*/, thread, in_bytes(JavaThread::threadObj_offset()));
   Node* threadObj = make_load(NULL, p, thread_type, T_OBJECT);
   tls_output = thread;
@@ -890,18 +945,18 @@ Node* LibraryCallKit::make_string_method_node(int opcode, Node* str1, Node* str2
     // Get length of string 2
     str2_len = load_String_length(no_ctrl, str2);
 
-    result = new (C, 6) StrIndexOfNode(control(), memory(TypeAryPtr::CHARS),
+    result = new (C) StrIndexOfNode(control(), memory(TypeAryPtr::CHARS),
                                  str1_start, str1_len, str2_start, str2_len);
     break;
   case Op_StrComp:
     // Get length of string 2
     str2_len = load_String_length(no_ctrl, str2);
 
-    result = new (C, 6) StrCompNode(control(), memory(TypeAryPtr::CHARS),
+    result = new (C) StrCompNode(control(), memory(TypeAryPtr::CHARS),
                                  str1_start, str1_len, str2_start, str2_len);
     break;
   case Op_StrEquals:
-    result = new (C, 5) StrEqualsNode(control(), memory(TypeAryPtr::CHARS),
+    result = new (C) StrEqualsNode(control(), memory(TypeAryPtr::CHARS),
                                str1_start, str2_start, str1_len);
     break;
   default:
@@ -924,15 +979,15 @@ Node* LibraryCallKit::make_string_method_node(int opcode, Node* str1_start, Node
   Node* result = NULL;
   switch (opcode) {
   case Op_StrIndexOf:
-    result = new (C, 6) StrIndexOfNode(control(), memory(TypeAryPtr::CHARS),
+    result = new (C) StrIndexOfNode(control(), memory(TypeAryPtr::CHARS),
                                  str1_start, cnt1, str2_start, cnt2);
     break;
   case Op_StrComp:
-    result = new (C, 6) StrCompNode(control(), memory(TypeAryPtr::CHARS),
+    result = new (C) StrCompNode(control(), memory(TypeAryPtr::CHARS),
                                  str1_start, cnt1, str2_start, cnt2);
     break;
   case Op_StrEquals:
-    result = new (C, 5) StrEqualsNode(control(), memory(TypeAryPtr::CHARS),
+    result = new (C) StrEqualsNode(control(), memory(TypeAryPtr::CHARS),
                                  str1_start, str2_start, cnt1);
     break;
   default:
@@ -997,12 +1052,12 @@ bool LibraryCallKit::inline_string_equals() {
   }
 
   // paths (plus control) merge
-  RegionNode* region = new (C, 5) RegionNode(5);
-  Node* phi = new (C, 5) PhiNode(region, TypeInt::BOOL);
+  RegionNode* region = new (C) RegionNode(5);
+  Node* phi = new (C) PhiNode(region, TypeInt::BOOL);
 
   // does source == target string?
-  Node* cmp = _gvn.transform(new (C, 3) CmpPNode(receiver, argument));
-  Node* bol = _gvn.transform(new (C, 2) BoolNode(cmp, BoolTest::eq));
+  Node* cmp = _gvn.transform(new (C) CmpPNode(receiver, argument));
+  Node* bol = _gvn.transform(new (C) BoolNode(cmp, BoolTest::eq));
 
   Node* if_eq = generate_slow_guard(bol, NULL);
   if (if_eq != NULL) {
@@ -1018,8 +1073,8 @@ bool LibraryCallKit::inline_string_equals() {
     _sp += nargs;          // gen_instanceof might do an uncommon trap
     Node* inst = gen_instanceof(argument, makecon(TypeKlassPtr::make(klass)));
     _sp -= nargs;
-    Node* cmp  = _gvn.transform(new (C, 3) CmpINode(inst, intcon(1)));
-    Node* bol  = _gvn.transform(new (C, 2) BoolNode(cmp, BoolTest::ne));
+    Node* cmp  = _gvn.transform(new (C) CmpINode(inst, intcon(1)));
+    Node* bol  = _gvn.transform(new (C) BoolNode(cmp, BoolTest::ne));
 
     Node* inst_false = generate_guard(bol, NULL, PROB_MIN);
     //instanceOf == true, fallthrough
@@ -1034,7 +1089,7 @@ bool LibraryCallKit::inline_string_equals() {
     const TypeOopPtr* string_type = TypeOopPtr::make_from_klass(klass);
 
     // Properly cast the argument to String
-    argument = _gvn.transform(new (C, 2) CheckCastPPNode(control(), argument, string_type));
+    argument = _gvn.transform(new (C) CheckCastPPNode(control(), argument, string_type));
     // This path is taken only when argument's type is String:NotNull.
     argument = cast_not_null(argument, false);
 
@@ -1057,8 +1112,8 @@ bool LibraryCallKit::inline_string_equals() {
     Node* argument_cnt  = load_String_length(no_ctrl, argument);
 
     // Check for receiver count != argument count
-    Node* cmp = _gvn.transform( new(C, 3) CmpINode(receiver_cnt, argument_cnt) );
-    Node* bol = _gvn.transform( new(C, 2) BoolNode(cmp, BoolTest::ne) );
+    Node* cmp = _gvn.transform( new(C) CmpINode(receiver_cnt, argument_cnt) );
+    Node* bol = _gvn.transform( new(C) BoolNode(cmp, BoolTest::ne) );
     Node* if_ne = generate_slow_guard(bol, NULL);
     if (if_ne != NULL) {
       phi->init_req(4, intcon(0));
@@ -1093,7 +1148,7 @@ bool LibraryCallKit::inline_array_equals() {
   Node *argument1 = pop();
 
   Node* equals =
-    _gvn.transform(new (C, 4) AryEqNode(control(), memory(TypeAryPtr::CHARS),
+    _gvn.transform(new (C) AryEqNode(control(), memory(TypeAryPtr::CHARS),
                                         argument1, argument2) );
   push(equals);
   return true;
@@ -1268,8 +1323,8 @@ bool LibraryCallKit::inline_string_indexOf() {
     const TypeOopPtr* string_type = TypeOopPtr::make_from_klass(str_klass);
 
     // Make the merge point
-    RegionNode* result_rgn = new (C, 4) RegionNode(4);
-    Node*       result_phi = new (C, 4) PhiNode(result_rgn, TypeInt::INT);
+    RegionNode* result_rgn = new (C) RegionNode(4);
+    Node*       result_phi = new (C) PhiNode(result_rgn, TypeInt::INT);
     Node* no_ctrl  = NULL;
 
     // Get start addr of source string
@@ -1289,8 +1344,8 @@ bool LibraryCallKit::inline_string_indexOf() {
     Node* substr_cnt  = load_String_length(no_ctrl, argument);
 
     // Check for substr count > string count
-    Node* cmp = _gvn.transform( new(C, 3) CmpINode(substr_cnt, source_cnt) );
-    Node* bol = _gvn.transform( new(C, 2) BoolNode(cmp, BoolTest::gt) );
+    Node* cmp = _gvn.transform( new(C) CmpINode(substr_cnt, source_cnt) );
+    Node* bol = _gvn.transform( new(C) BoolNode(cmp, BoolTest::gt) );
     Node* if_gt = generate_slow_guard(bol, NULL);
     if (if_gt != NULL) {
       result_phi->init_req(2, intcon(-1));
@@ -1299,8 +1354,8 @@ bool LibraryCallKit::inline_string_indexOf() {
 
     if (!stopped()) {
       // Check for substr count == 0
-      cmp = _gvn.transform( new(C, 3) CmpINode(substr_cnt, intcon(0)) );
-      bol = _gvn.transform( new(C, 2) BoolNode(cmp, BoolTest::eq) );
+      cmp = _gvn.transform( new(C) CmpINode(substr_cnt, intcon(0)) );
+      bol = _gvn.transform( new(C) BoolNode(cmp, BoolTest::eq) );
       Node* if_zero = generate_slow_guard(bol, NULL);
       if (if_zero != NULL) {
         result_phi->init_req(3, intcon(0));
@@ -1401,7 +1456,7 @@ bool LibraryCallKit::inline_string_indexOf() {
 Node * LibraryCallKit::pop_math_arg() {
   Node *arg = pop_pair();
   if( Matcher::strict_fp_requires_explicit_rounding && UseSSE<=1 )
-    arg = _gvn.transform( new (C, 2) RoundDoubleNode(0, arg) );
+    arg = _gvn.transform( new (C) RoundDoubleNode(0, arg) );
   return arg;
 }
 
@@ -1415,13 +1470,13 @@ bool LibraryCallKit::inline_trig(vmIntrinsics::ID id) {
 
   switch (id) {
   case vmIntrinsics::_dsin:
-    trig = _gvn.transform((Node*)new (C, 2) SinDNode(arg));
+    trig = _gvn.transform((Node*)new (C) SinDNode(arg));
     break;
   case vmIntrinsics::_dcos:
-    trig = _gvn.transform((Node*)new (C, 2) CosDNode(arg));
+    trig = _gvn.transform((Node*)new (C) CosDNode(arg));
     break;
   case vmIntrinsics::_dtan:
-    trig = _gvn.transform((Node*)new (C, 2) TanDNode(arg));
+    trig = _gvn.transform((Node*)new (C) TanDNode(arg));
     break;
   default:
     assert(false, "bad intrinsic was passed in");
@@ -1465,17 +1520,17 @@ bool LibraryCallKit::inline_trig(vmIntrinsics::ID id) {
     // probably do the math inside the SIN encoding.
 
     // Make the merge point
-    RegionNode *r = new (C, 3) RegionNode(3);
-    Node *phi = new (C, 3) PhiNode(r,Type::DOUBLE);
+    RegionNode *r = new (C) RegionNode(3);
+    Node *phi = new (C) PhiNode(r,Type::DOUBLE);
 
     // Flatten arg so we need only 1 test
-    Node *abs = _gvn.transform(new (C, 2) AbsDNode(arg));
+    Node *abs = _gvn.transform(new (C) AbsDNode(arg));
     // Node for PI/4 constant
     Node *pi4 = makecon(TypeD::make(pi_4));
     // Check PI/4 : abs(arg)
-    Node *cmp = _gvn.transform(new (C, 3) CmpDNode(pi4,abs));
+    Node *cmp = _gvn.transform(new (C) CmpDNode(pi4,abs));
     // Check: If PI/4 < abs(arg) then go slow
-    Node *bol = _gvn.transform( new (C, 2) BoolNode( cmp, BoolTest::lt ) );
+    Node *bol = _gvn.transform( new (C) BoolNode( cmp, BoolTest::lt ) );
     // Branch either way
     IfNode *iff = create_and_xform_if(control(),bol, PROB_STATIC_FREQUENT, COUNT_UNKNOWN);
     set_control(opt_iff(r,iff));
@@ -1503,7 +1558,7 @@ bool LibraryCallKit::inline_trig(vmIntrinsics::ID id) {
       break;
     }
     assert(control()->in(0) == call, "");
-    Node* slow_result = _gvn.transform(new (C, 1) ProjNode(call,TypeFunc::Parms));
+    Node* slow_result = _gvn.transform(new (C) ProjNode(call,TypeFunc::Parms));
     r->init_req(1,control());
     phi->init_req(1,slow_result);
 
@@ -1524,7 +1579,7 @@ bool LibraryCallKit::inline_trig(vmIntrinsics::ID id) {
 bool LibraryCallKit::inline_sqrt(vmIntrinsics::ID id) {
   assert(id == vmIntrinsics::_dsqrt, "Not square root");
   _sp += arg_size();        // restore stack pointer
-  push_pair(_gvn.transform(new (C, 2) SqrtDNode(0, pop_math_arg())));
+  push_pair(_gvn.transform(new (C) SqrtDNode(0, pop_math_arg())));
   return true;
 }
 
@@ -1533,7 +1588,7 @@ bool LibraryCallKit::inline_sqrt(vmIntrinsics::ID id) {
 bool LibraryCallKit::inline_abs(vmIntrinsics::ID id) {
   assert(id == vmIntrinsics::_dabs, "Not absolute value");
   _sp += arg_size();        // restore stack pointer
-  push_pair(_gvn.transform(new (C, 2) AbsDNode(pop_math_arg())));
+  push_pair(_gvn.transform(new (C) AbsDNode(pop_math_arg())));
   return true;
 }
 
@@ -1542,9 +1597,9 @@ void LibraryCallKit::finish_pow_exp(Node* result, Node* x, Node* y, const TypeFu
   //result=(result.isNaN())? funcAddr():result;
   // Check: If isNaN() by checking result!=result? then either trap
   // or go to runtime
-  Node* cmpisnan = _gvn.transform(new (C, 3) CmpDNode(result,result));
+  Node* cmpisnan = _gvn.transform(new (C) CmpDNode(result,result));
   // Build the boolean node
-  Node* bolisnum = _gvn.transform( new (C, 2) BoolNode(cmpisnan, BoolTest::eq) );
+  Node* bolisnum = _gvn.transform( new (C) BoolNode(cmpisnan, BoolTest::eq) );
 
   if (!too_many_traps(Deoptimization::Reason_intrinsic)) {
     {
@@ -1565,12 +1620,12 @@ void LibraryCallKit::finish_pow_exp(Node* result, Node* x, Node* y, const TypeFu
     // to the runtime to properly handle corner cases
 
     IfNode* iff = create_and_xform_if(control(), bolisnum, PROB_STATIC_FREQUENT, COUNT_UNKNOWN);
-    Node* if_slow = _gvn.transform( new (C, 1) IfFalseNode(iff) );
-    Node* if_fast = _gvn.transform( new (C, 1) IfTrueNode(iff) );
+    Node* if_slow = _gvn.transform( new (C) IfFalseNode(iff) );
+    Node* if_fast = _gvn.transform( new (C) IfTrueNode(iff) );
 
     if (!if_slow->is_top()) {
-      RegionNode* result_region = new(C, 3) RegionNode(3);
-      PhiNode*    result_val = new (C, 3) PhiNode(result_region, Type::DOUBLE);
+      RegionNode* result_region = new(C) RegionNode(3);
+      PhiNode*    result_val = new (C) PhiNode(result_region, Type::DOUBLE);
 
       result_region->init_req(1, if_fast);
       result_val->init_req(1, result);
@@ -1581,9 +1636,9 @@ void LibraryCallKit::finish_pow_exp(Node* result, Node* x, Node* y, const TypeFu
       Node* rt = make_runtime_call(RC_LEAF, call_type, funcAddr, funcName,
                                    no_memory_effects,
                                    x, top(), y, y ? top() : NULL);
-      Node* value = _gvn.transform(new (C, 1) ProjNode(rt, TypeFunc::Parms+0));
+      Node* value = _gvn.transform(new (C) ProjNode(rt, TypeFunc::Parms+0));
 #ifdef ASSERT
-      Node* value_top = _gvn.transform(new (C, 1) ProjNode(rt, TypeFunc::Parms+1));
+      Node* value_top = _gvn.transform(new (C) ProjNode(rt, TypeFunc::Parms+1));
       assert(value_top == top(), "second value must be top");
 #endif
 
@@ -1604,7 +1659,7 @@ bool LibraryCallKit::inline_exp(vmIntrinsics::ID id) {
 
   _sp += arg_size();        // restore stack pointer
   Node *x = pop_math_arg();
-  Node *result = _gvn.transform(new (C, 2) ExpDNode(0,x));
+  Node *result = _gvn.transform(new (C) ExpDNode(0,x));
 
   finish_pow_exp(result, x, NULL, OptoRuntime::Math_D_D_Type(), CAST_FROM_FN_PTR(address, SharedRuntime::dexp), "EXP");
 
@@ -1643,58 +1698,58 @@ bool LibraryCallKit::inline_pow(vmIntrinsics::ID id) {
 
   if (!too_many_traps(Deoptimization::Reason_intrinsic)) {
     // Short form: skip the fancy tests and just check for NaN result.
-    result = _gvn.transform( new (C, 3) PowDNode(0, x, y) );
+    result = _gvn.transform( new (C) PowDNode(0, x, y) );
   } else {
     // If this inlining ever returned NaN in the past, include all
     // checks + call to the runtime.
 
     // Set the merge point for If node with condition of (x <= 0.0)
     // There are four possible paths to region node and phi node
-    RegionNode *r = new (C, 4) RegionNode(4);
-    Node *phi = new (C, 4) PhiNode(r, Type::DOUBLE);
+    RegionNode *r = new (C) RegionNode(4);
+    Node *phi = new (C) PhiNode(r, Type::DOUBLE);
 
     // Build the first if node: if (x <= 0.0)
     // Node for 0 constant
     Node *zeronode = makecon(TypeD::ZERO);
     // Check x:0
-    Node *cmp = _gvn.transform(new (C, 3) CmpDNode(x, zeronode));
+    Node *cmp = _gvn.transform(new (C) CmpDNode(x, zeronode));
     // Check: If (x<=0) then go complex path
-    Node *bol1 = _gvn.transform( new (C, 2) BoolNode( cmp, BoolTest::le ) );
+    Node *bol1 = _gvn.transform( new (C) BoolNode( cmp, BoolTest::le ) );
     // Branch either way
     IfNode *if1 = create_and_xform_if(control(),bol1, PROB_STATIC_INFREQUENT, COUNT_UNKNOWN);
     // Fast path taken; set region slot 3
-    Node *fast_taken = _gvn.transform( new (C, 1) IfFalseNode(if1) );
+    Node *fast_taken = _gvn.transform( new (C) IfFalseNode(if1) );
     r->init_req(3,fast_taken); // Capture fast-control
 
     // Fast path not-taken, i.e. slow path
-    Node *complex_path = _gvn.transform( new (C, 1) IfTrueNode(if1) );
+    Node *complex_path = _gvn.transform( new (C) IfTrueNode(if1) );
 
     // Set fast path result
-    Node *fast_result = _gvn.transform( new (C, 3) PowDNode(0, x, y) );
+    Node *fast_result = _gvn.transform( new (C) PowDNode(0, x, y) );
     phi->init_req(3, fast_result);
 
     // Complex path
     // Build the second if node (if y is long)
     // Node for (long)y
-    Node *longy = _gvn.transform( new (C, 2) ConvD2LNode(y));
+    Node *longy = _gvn.transform( new (C) ConvD2LNode(y));
     // Node for (double)((long) y)
-    Node *doublelongy= _gvn.transform( new (C, 2) ConvL2DNode(longy));
+    Node *doublelongy= _gvn.transform( new (C) ConvL2DNode(longy));
     // Check (double)((long) y) : y
-    Node *cmplongy= _gvn.transform(new (C, 3) CmpDNode(doublelongy, y));
+    Node *cmplongy= _gvn.transform(new (C) CmpDNode(doublelongy, y));
     // Check if (y isn't long) then go to slow path
 
-    Node *bol2 = _gvn.transform( new (C, 2) BoolNode( cmplongy, BoolTest::ne ) );
+    Node *bol2 = _gvn.transform( new (C) BoolNode( cmplongy, BoolTest::ne ) );
     // Branch either way
     IfNode *if2 = create_and_xform_if(complex_path,bol2, PROB_STATIC_INFREQUENT, COUNT_UNKNOWN);
-    Node* ylong_path = _gvn.transform( new (C, 1) IfFalseNode(if2));
+    Node* ylong_path = _gvn.transform( new (C) IfFalseNode(if2));
 
-    Node *slow_path = _gvn.transform( new (C, 1) IfTrueNode(if2) );
+    Node *slow_path = _gvn.transform( new (C) IfTrueNode(if2) );
 
     // Calculate DPow(abs(x), y)*(1 & (long)y)
     // Node for constant 1
     Node *conone = longcon(1);
     // 1& (long)y
-    Node *signnode= _gvn.transform( new (C, 3) AndLNode(conone, longy) );
+    Node *signnode= _gvn.transform( new (C) AndLNode(conone, longy) );
 
     // A huge number is always even. Detect a huge number by checking
     // if y + 1 == y and set integer to be tested for parity to 0.
@@ -1702,18 +1757,18 @@ bool LibraryCallKit::inline_pow(vmIntrinsics::ID id) {
     // (long)9.223372036854776E18 = max_jlong
     // (double)(long)9.223372036854776E18 = 9.223372036854776E18
     // max_jlong is odd but 9.223372036854776E18 is even
-    Node* yplus1 = _gvn.transform( new (C, 3) AddDNode(y, makecon(TypeD::make(1))));
-    Node *cmpyplus1= _gvn.transform(new (C, 3) CmpDNode(yplus1, y));
-    Node *bolyplus1 = _gvn.transform( new (C, 2) BoolNode( cmpyplus1, BoolTest::eq ) );
+    Node* yplus1 = _gvn.transform( new (C) AddDNode(y, makecon(TypeD::make(1))));
+    Node *cmpyplus1= _gvn.transform(new (C) CmpDNode(yplus1, y));
+    Node *bolyplus1 = _gvn.transform( new (C) BoolNode( cmpyplus1, BoolTest::eq ) );
     Node* correctedsign = NULL;
     if (ConditionalMoveLimit != 0) {
       correctedsign = _gvn.transform( CMoveNode::make(C, NULL, bolyplus1, signnode, longcon(0), TypeLong::LONG));
     } else {
       IfNode *ifyplus1 = create_and_xform_if(ylong_path,bolyplus1, PROB_FAIR, COUNT_UNKNOWN);
-      RegionNode *r = new (C, 3) RegionNode(3);
-      Node *phi = new (C, 3) PhiNode(r, TypeLong::LONG);
-      r->init_req(1, _gvn.transform( new (C, 1) IfFalseNode(ifyplus1)));
-      r->init_req(2, _gvn.transform( new (C, 1) IfTrueNode(ifyplus1)));
+      RegionNode *r = new (C) RegionNode(3);
+      Node *phi = new (C) PhiNode(r, TypeLong::LONG);
+      r->init_req(1, _gvn.transform( new (C) IfFalseNode(ifyplus1)));
+      r->init_req(2, _gvn.transform( new (C) IfTrueNode(ifyplus1)));
       phi->init_req(1, signnode);
       phi->init_req(2, longcon(0));
       correctedsign = _gvn.transform(phi);
@@ -1724,25 +1779,25 @@ bool LibraryCallKit::inline_pow(vmIntrinsics::ID id) {
     // zero node
     Node *conzero = longcon(0);
     // Check (1&(long)y)==0?
-    Node *cmpeq1 = _gvn.transform(new (C, 3) CmpLNode(correctedsign, conzero));
+    Node *cmpeq1 = _gvn.transform(new (C) CmpLNode(correctedsign, conzero));
     // Check if (1&(long)y)!=0?, if so the result is negative
-    Node *bol3 = _gvn.transform( new (C, 2) BoolNode( cmpeq1, BoolTest::ne ) );
+    Node *bol3 = _gvn.transform( new (C) BoolNode( cmpeq1, BoolTest::ne ) );
     // abs(x)
-    Node *absx=_gvn.transform( new (C, 2) AbsDNode(x));
+    Node *absx=_gvn.transform( new (C) AbsDNode(x));
     // abs(x)^y
-    Node *absxpowy = _gvn.transform( new (C, 3) PowDNode(0, absx, y) );
+    Node *absxpowy = _gvn.transform( new (C) PowDNode(0, absx, y) );
     // -abs(x)^y
-    Node *negabsxpowy = _gvn.transform(new (C, 2) NegDNode (absxpowy));
+    Node *negabsxpowy = _gvn.transform(new (C) NegDNode (absxpowy));
     // (1&(long)y)==1?-DPow(abs(x), y):DPow(abs(x), y)
     Node *signresult = NULL;
     if (ConditionalMoveLimit != 0) {
       signresult = _gvn.transform( CMoveNode::make(C, NULL, bol3, absxpowy, negabsxpowy, Type::DOUBLE));
     } else {
       IfNode *ifyeven = create_and_xform_if(ylong_path,bol3, PROB_FAIR, COUNT_UNKNOWN);
-      RegionNode *r = new (C, 3) RegionNode(3);
-      Node *phi = new (C, 3) PhiNode(r, Type::DOUBLE);
-      r->init_req(1, _gvn.transform( new (C, 1) IfFalseNode(ifyeven)));
-      r->init_req(2, _gvn.transform( new (C, 1) IfTrueNode(ifyeven)));
+      RegionNode *r = new (C) RegionNode(3);
+      Node *phi = new (C) PhiNode(r, Type::DOUBLE);
+      r->init_req(1, _gvn.transform( new (C) IfFalseNode(ifyeven)));
+      r->init_req(2, _gvn.transform( new (C) IfTrueNode(ifyeven)));
       phi->init_req(1, absxpowy);
       phi->init_req(2, negabsxpowy);
       signresult = _gvn.transform(phi);
@@ -1781,10 +1836,10 @@ bool LibraryCallKit::inline_trans(vmIntrinsics::ID id) {
 
   switch (id) {
   case vmIntrinsics::_dlog:
-    trans = _gvn.transform((Node*)new (C, 2) LogDNode(arg));
+    trans = _gvn.transform((Node*)new (C) LogDNode(arg));
     break;
   case vmIntrinsics::_dlog10:
-    trans = _gvn.transform((Node*)new (C, 2) Log10DNode(arg));
+    trans = _gvn.transform((Node*)new (C) Log10DNode(arg));
     break;
   default:
     assert(false, "bad intrinsic was passed in");
@@ -1815,9 +1870,9 @@ bool LibraryCallKit::runtime_math(const TypeFunc* call_type, address funcAddr, c
   Node* trig = make_runtime_call(RC_LEAF, call_type, funcAddr, funcName,
                                  no_memory_effects,
                                  a, top(), b, b ? top() : NULL);
-  Node* value = _gvn.transform(new (C, 1) ProjNode(trig, TypeFunc::Parms+0));
+  Node* value = _gvn.transform(new (C) ProjNode(trig, TypeFunc::Parms+0));
 #ifdef ASSERT
-  Node* value_top = _gvn.transform(new (C, 1) ProjNode(trig, TypeFunc::Parms+1));
+  Node* value_top = _gvn.transform(new (C) ProjNode(trig, TypeFunc::Parms+1));
   assert(value_top == top(), "second value must be top");
 #endif
 
@@ -1908,7 +1963,7 @@ LibraryCallKit::generate_min_max(vmIntrinsics::ID id, Node* x0, Node* y0) {
   int   cmp_op = Op_CmpI;
   Node* xkey = xvalue;
   Node* ykey = yvalue;
-  Node* ideal_cmpxy = _gvn.transform( new(C, 3) CmpINode(xkey, ykey) );
+  Node* ideal_cmpxy = _gvn.transform( new(C) CmpINode(xkey, ykey) );
   if (ideal_cmpxy->is_Cmp()) {
     // E.g., if we have CmpI(length - offset, count),
     // it might idealize to CmpI(length, count + offset)
@@ -2001,7 +2056,7 @@ LibraryCallKit::generate_min_max(vmIntrinsics::ID id, Node* x0, Node* y0) {
   default:
     if (cmpxy == NULL)
       cmpxy = ideal_cmpxy;
-    best_bol = _gvn.transform( new(C, 2) BoolNode(cmpxy, BoolTest::lt) );
+    best_bol = _gvn.transform( new(C) BoolNode(cmpxy, BoolTest::lt) );
     // and fall through:
   case BoolTest::lt:          // x < y
   case BoolTest::le:          // x <= y
@@ -2061,7 +2116,7 @@ LibraryCallKit::classify_unsafe_addr(Node* &base, Node* &offset) {
     return Type::AnyPtr;
   } else if (base_type == TypePtr::NULL_PTR) {
     // Since this is a NULL+long form, we have to switch to a rawptr.
-    base   = _gvn.transform( new (C, 2) CastX2PNode(offset) );
+    base   = _gvn.transform( new (C) CastX2PNode(offset) );
     offset = MakeConX(0);
     return Type::RawPtr;
   } else if (base_type->base() == Type::RawPtr) {
@@ -2106,10 +2161,10 @@ bool LibraryCallKit::inline_numberOfLeadingZeros(vmIntrinsics::ID id) {
   _sp += arg_size();  // restore stack pointer
   switch (id) {
   case vmIntrinsics::_numberOfLeadingZeros_i:
-    push(_gvn.transform(new (C, 2) CountLeadingZerosINode(pop())));
+    push(_gvn.transform(new (C) CountLeadingZerosINode(pop())));
     break;
   case vmIntrinsics::_numberOfLeadingZeros_l:
-    push(_gvn.transform(new (C, 2) CountLeadingZerosLNode(pop_pair())));
+    push(_gvn.transform(new (C) CountLeadingZerosLNode(pop_pair())));
     break;
   default:
     ShouldNotReachHere();
@@ -2127,10 +2182,10 @@ bool LibraryCallKit::inline_numberOfTrailingZeros(vmIntrinsics::ID id) {
   _sp += arg_size();  // restore stack pointer
   switch (id) {
   case vmIntrinsics::_numberOfTrailingZeros_i:
-    push(_gvn.transform(new (C, 2) CountTrailingZerosINode(pop())));
+    push(_gvn.transform(new (C) CountTrailingZerosINode(pop())));
     break;
   case vmIntrinsics::_numberOfTrailingZeros_l:
-    push(_gvn.transform(new (C, 2) CountTrailingZerosLNode(pop_pair())));
+    push(_gvn.transform(new (C) CountTrailingZerosLNode(pop_pair())));
     break;
   default:
     ShouldNotReachHere();
@@ -2148,10 +2203,10 @@ bool LibraryCallKit::inline_bitCount(vmIntrinsics::ID id) {
   _sp += arg_size();  // restore stack pointer
   switch (id) {
   case vmIntrinsics::_bitCount_i:
-    push(_gvn.transform(new (C, 2) PopCountINode(pop())));
+    push(_gvn.transform(new (C) PopCountINode(pop())));
     break;
   case vmIntrinsics::_bitCount_l:
-    push(_gvn.transform(new (C, 2) PopCountLNode(pop_pair())));
+    push(_gvn.transform(new (C) PopCountLNode(pop_pair())));
     break;
   default:
     ShouldNotReachHere();
@@ -2175,16 +2230,16 @@ bool LibraryCallKit::inline_reverseBytes(vmIntrinsics::ID id) {
   _sp += arg_size();  // restore stack pointer
   switch (id) {
   case vmIntrinsics::_reverseBytes_i:
-    push(_gvn.transform(new (C, 2) ReverseBytesINode(0, pop())));
+    push(_gvn.transform(new (C) ReverseBytesINode(0, pop())));
     break;
   case vmIntrinsics::_reverseBytes_l:
-    push_pair(_gvn.transform(new (C, 2) ReverseBytesLNode(0, pop_pair())));
+    push_pair(_gvn.transform(new (C) ReverseBytesLNode(0, pop_pair())));
     break;
   case vmIntrinsics::_reverseBytes_c:
-    push(_gvn.transform(new (C, 2) ReverseBytesUSNode(0, pop())));
+    push(_gvn.transform(new (C) ReverseBytesUSNode(0, pop())));
     break;
   case vmIntrinsics::_reverseBytes_s:
-    push(_gvn.transform(new (C, 2) ReverseBytesSNode(0, pop())));
+    push(_gvn.transform(new (C) ReverseBytesSNode(0, pop())));
     break;
   default:
     ;
@@ -2301,6 +2356,45 @@ void LibraryCallKit::insert_pre_barrier(Node* base_oop, Node* offset,
 // Interpret Unsafe.fieldOffset cookies correctly:
 extern jlong Unsafe_field_offset_to_byte_offset(jlong field_offset);
 
+const TypeOopPtr* LibraryCallKit::sharpen_unsafe_type(Compile::AliasType* alias_type, const TypePtr *adr_type, bool is_native_ptr) {
+  // Attempt to infer a sharper value type from the offset and base type.
+  ciKlass* sharpened_klass = NULL;
+
+  // See if it is an instance field, with an object type.
+  if (alias_type->field() != NULL) {
+    assert(!is_native_ptr, "native pointer op cannot use a java address");
+    if (alias_type->field()->type()->is_klass()) {
+      sharpened_klass = alias_type->field()->type()->as_klass();
+    }
+  }
+
+  // See if it is a narrow oop array.
+  if (adr_type->isa_aryptr()) {
+    if (adr_type->offset() >= objArrayOopDesc::base_offset_in_bytes()) {
+      const TypeOopPtr *elem_type = adr_type->is_aryptr()->elem()->isa_oopptr();
+      if (elem_type != NULL) {
+        sharpened_klass = elem_type->klass();
+      }
+    }
+  }
+
+  // The sharpened class might be unloaded if there is no class loader
+  // contraint in place.
+  if (sharpened_klass != NULL && sharpened_klass->is_loaded()) {
+    const TypeOopPtr* tjp = TypeOopPtr::make_from_klass(sharpened_klass);
+
+#ifndef PRODUCT
+    if (PrintIntrinsics || PrintInlining || PrintOptoInlining) {
+      tty->print("  from base type: ");  adr_type->dump();
+      tty->print("  sharpened value: ");  tjp->dump();
+    }
+#endif
+    // Sharpen the value type.
+    return tjp;
+  }
+  return NULL;
+}
+
 bool LibraryCallKit::inline_unsafe_access(bool is_native_ptr, bool is_store, BasicType type, bool is_volatile) {
   if (callee()->is_static())  return false;  // caller must have the capability!
 
@@ -2430,39 +2524,9 @@ bool LibraryCallKit::inline_unsafe_access(bool is_native_ptr, bool is_store, Bas
                            offset != top() && heap_base_oop != top();
 
   if (!is_store && type == T_OBJECT) {
-    // Attempt to infer a sharper value type from the offset and base type.
-    ciKlass* sharpened_klass = NULL;
-
-    // See if it is an instance field, with an object type.
-    if (alias_type->field() != NULL) {
-      assert(!is_native_ptr, "native pointer op cannot use a java address");
-      if (alias_type->field()->type()->is_klass()) {
-        sharpened_klass = alias_type->field()->type()->as_klass();
-      }
-    }
-
-    // See if it is a narrow oop array.
-    if (adr_type->isa_aryptr()) {
-      if (adr_type->offset() >= objArrayOopDesc::base_offset_in_bytes()) {
-        const TypeOopPtr *elem_type = adr_type->is_aryptr()->elem()->isa_oopptr();
-        if (elem_type != NULL) {
-          sharpened_klass = elem_type->klass();
-        }
-      }
-    }
-
-    if (sharpened_klass != NULL) {
-      const TypeOopPtr* tjp = TypeOopPtr::make_from_klass(sharpened_klass);
-
-      // Sharpen the value type.
+    const TypeOopPtr* tjp = sharpen_unsafe_type(alias_type, adr_type, is_native_ptr);
+    if (tjp != NULL) {
       value_type = tjp;
-
-#ifndef PRODUCT
-      if (PrintIntrinsics || PrintInlining || PrintOptoInlining) {
-        tty->print("  from base type:  ");   adr_type->dump();
-        tty->print("  sharpened value: "); value_type->dump();
-      }
-#endif
     }
   }
 
@@ -2522,7 +2586,7 @@ bool LibraryCallKit::inline_unsafe_access(bool is_native_ptr, bool is_store, Bas
       break;
     case T_ADDRESS:
       // Cast to an int type.
-      p = _gvn.transform( new (C, 2) CastP2XNode(NULL,p) );
+      p = _gvn.transform( new (C) CastP2XNode(NULL,p) );
       p = ConvX2L(p);
       push_pair(p);
       break;
@@ -2541,7 +2605,7 @@ bool LibraryCallKit::inline_unsafe_access(bool is_native_ptr, bool is_store, Bas
     case T_ADDRESS:
       // Repackage the long as a pointer.
       val = ConvL2X(val);
-      val = _gvn.transform( new (C, 2) CastX2PNode(val) );
+      val = _gvn.transform( new (C) CastX2PNode(val) );
       break;
     }
 
@@ -2663,9 +2727,9 @@ bool LibraryCallKit::inline_unsafe_prefetch(bool is_native_ptr, bool is_store, b
   // Generate the read or write prefetch
   Node *prefetch;
   if (is_store) {
-    prefetch = new (C, 3) PrefetchWriteNode(i_o(), adr);
+    prefetch = new (C) PrefetchWriteNode(i_o(), adr);
   } else {
-    prefetch = new (C, 3) PrefetchReadNode(i_o(), adr);
+    prefetch = new (C) PrefetchReadNode(i_o(), adr);
   }
   prefetch->init_req(0, control());
   set_i_o(_gvn.transform(prefetch));
@@ -2673,9 +2737,9 @@ bool LibraryCallKit::inline_unsafe_prefetch(bool is_native_ptr, bool is_store, b
   return true;
 }
 
-//----------------------------inline_unsafe_CAS----------------------------
+//----------------------------inline_unsafe_load_store----------------------------
 
-bool LibraryCallKit::inline_unsafe_CAS(BasicType type) {
+bool LibraryCallKit::inline_unsafe_load_store(BasicType type, LoadStoreKind kind) {
   // This basic scheme here is the same as inline_unsafe_access, but
   // differs in enough details that combining them would make the code
   // overly confusing.  (This is a true fact! I originally combined
@@ -2686,37 +2750,47 @@ bool LibraryCallKit::inline_unsafe_CAS(BasicType type) {
   if (callee()->is_static())  return false;  // caller must have the capability!
 
 #ifndef PRODUCT
+  BasicType rtype;
   {
     ResourceMark rm;
-    // Check the signatures.
     ciSignature* sig = signature();
+    rtype = sig->return_type()->basic_type();
+    if (kind == LS_xadd || kind == LS_xchg) {
+      // Check the signatures.
 #ifdef ASSERT
-    BasicType rtype = sig->return_type()->basic_type();
-    assert(rtype == T_BOOLEAN, "CAS must return boolean");
-    assert(sig->count() == 4, "CAS has 4 arguments");
-    assert(sig->type_at(0)->basic_type() == T_OBJECT, "CAS base is object");
-    assert(sig->type_at(1)->basic_type() == T_LONG, "CAS offset is long");
+      assert(rtype == type, "get and set must return the expected type");
+      assert(sig->count() == 3, "get and set has 3 arguments");
+      assert(sig->type_at(0)->basic_type() == T_OBJECT, "get and set base is object");
+      assert(sig->type_at(1)->basic_type() == T_LONG, "get and set offset is long");
+      assert(sig->type_at(2)->basic_type() == type, "get and set must take expected type as new value/delta");
 #endif // ASSERT
+    } else if (kind == LS_cmpxchg) {
+      // Check the signatures.
+#ifdef ASSERT
+      assert(rtype == T_BOOLEAN, "CAS must return boolean");
+      assert(sig->count() == 4, "CAS has 4 arguments");
+      assert(sig->type_at(0)->basic_type() == T_OBJECT, "CAS base is object");
+      assert(sig->type_at(1)->basic_type() == T_LONG, "CAS offset is long");
+#endif // ASSERT
+    } else {
+      ShouldNotReachHere();
+    }
   }
 #endif //PRODUCT
 
   // number of stack slots per value argument (1 or 2)
   int type_words = type2size[type];
 
-  // Cannot inline wide CAS on machines that don't support it natively
-  if (type2aelembytes(type) > BytesPerInt && !VM_Version::supports_cx8())
-    return false;
-
   C->set_has_unsafe_access(true);  // Mark eventual nmethod as "unsafe".
 
-  // Argument words:  "this" plus oop plus offset plus oldvalue plus newvalue;
-  int nargs = 1 + 1 + 2  + type_words + type_words;
+  // Argument words:  "this" plus oop plus offset (plus oldvalue) plus newvalue/delta;
+  int nargs = 1 + 1 + 2  + ((kind == LS_cmpxchg) ? type_words : 0) + type_words;
 
-  // pop arguments: newval, oldval, offset, base, and receiver
+  // pop arguments: newval, offset, base, and receiver
   debug_only(int saved_sp = _sp);
   _sp += nargs;
   Node* newval   = (type_words == 1) ? pop() : pop_pair();
-  Node* oldval   = (type_words == 1) ? pop() : pop_pair();
+  Node* oldval   = (kind == LS_cmpxchg) ? ((type_words == 1) ? pop() : pop_pair()) : NULL;
   Node *offset   = pop_pair();
   Node *base     = pop();
   Node *receiver = pop();
@@ -2740,16 +2814,24 @@ bool LibraryCallKit::inline_unsafe_CAS(BasicType type) {
   Node* adr = make_unsafe_address(base, offset);
   const TypePtr *adr_type = _gvn.type(adr)->isa_ptr();
 
-  // (Unlike inline_unsafe_access, there seems no point in trying
-  // to refine types. Just use the coarse types here.
+  // For CAS, unlike inline_unsafe_access, there seems no point in
+  // trying to refine types. Just use the coarse types here.
   const Type *value_type = Type::get_const_basic_type(type);
   Compile::AliasType* alias_type = C->alias_type(adr_type);
   assert(alias_type->index() != Compile::AliasIdxBot, "no bare pointers here");
+
+  if (kind == LS_xchg && type == T_OBJECT) {
+    const TypeOopPtr* tjp = sharpen_unsafe_type(alias_type, adr_type);
+    if (tjp != NULL) {
+      value_type = tjp;
+    }
+  }
+
   int alias_idx = C->get_alias_index(adr_type);
 
-  // Memory-model-wise, a CAS acts like a little synchronized block,
-  // so needs barriers on each side.  These don't translate into
-  // actual barriers on most machines, but we still need rest of
+  // Memory-model-wise, a LoadStore acts like a little synchronized
+  // block, so needs barriers on each side.  These don't translate
+  // into actual barriers on most machines, but we still need rest of
   // compiler to respect ordering.
 
   insert_mem_bar(Op_MemBarRelease);
@@ -2762,13 +2844,29 @@ bool LibraryCallKit::inline_unsafe_CAS(BasicType type) {
 
   // For now, we handle only those cases that actually exist: ints,
   // longs, and Object. Adding others should be straightforward.
-  Node* cas;
+  Node* load_store;
   switch(type) {
   case T_INT:
-    cas = _gvn.transform(new (C, 5) CompareAndSwapINode(control(), mem, adr, newval, oldval));
+    if (kind == LS_xadd) {
+      load_store = _gvn.transform(new (C) GetAndAddINode(control(), mem, adr, newval, adr_type));
+    } else if (kind == LS_xchg) {
+      load_store = _gvn.transform(new (C) GetAndSetINode(control(), mem, adr, newval, adr_type));
+    } else if (kind == LS_cmpxchg) {
+      load_store = _gvn.transform(new (C) CompareAndSwapINode(control(), mem, adr, newval, oldval));
+    } else {
+      ShouldNotReachHere();
+    }
     break;
   case T_LONG:
-    cas = _gvn.transform(new (C, 5) CompareAndSwapLNode(control(), mem, adr, newval, oldval));
+    if (kind == LS_xadd) {
+      load_store = _gvn.transform(new (C) GetAndAddLNode(control(), mem, adr, newval, adr_type));
+    } else if (kind == LS_xchg) {
+      load_store = _gvn.transform(new (C) GetAndSetLNode(control(), mem, adr, newval, adr_type));
+    } else if (kind == LS_cmpxchg) {
+      load_store = _gvn.transform(new (C) CompareAndSwapLNode(control(), mem, adr, newval, oldval));
+    } else {
+      ShouldNotReachHere();
+    }
     break;
   case T_OBJECT:
     // Transformation of a value which could be NULL pointer (CastPP #NULL)
@@ -2778,40 +2876,57 @@ bool LibraryCallKit::inline_unsafe_CAS(BasicType type) {
       newval = _gvn.makecon(TypePtr::NULL_PTR);
 
     // Reference stores need a store barrier.
-    // (They don't if CAS fails, but it isn't worth checking.)
     pre_barrier(true /* do_load*/,
                 control(), base, adr, alias_idx, newval, value_type->make_oopptr(),
                 NULL /* pre_val*/,
                 T_OBJECT);
 #ifdef _LP64
     if (adr->bottom_type()->is_ptr_to_narrowoop()) {
-      Node *newval_enc = _gvn.transform(new (C, 2) EncodePNode(newval, newval->bottom_type()->make_narrowoop()));
-      Node *oldval_enc = _gvn.transform(new (C, 2) EncodePNode(oldval, oldval->bottom_type()->make_narrowoop()));
-      cas = _gvn.transform(new (C, 5) CompareAndSwapNNode(control(), mem, adr,
-                                                          newval_enc, oldval_enc));
+      Node *newval_enc = _gvn.transform(new (C) EncodePNode(newval, newval->bottom_type()->make_narrowoop()));
+      if (kind == LS_xchg) {
+        load_store = _gvn.transform(new (C) GetAndSetNNode(control(), mem, adr,
+                                                              newval_enc, adr_type, value_type->make_narrowoop()));
+      } else {
+        assert(kind == LS_cmpxchg, "wrong LoadStore operation");
+        Node *oldval_enc = _gvn.transform(new (C) EncodePNode(oldval, oldval->bottom_type()->make_narrowoop()));
+        load_store = _gvn.transform(new (C) CompareAndSwapNNode(control(), mem, adr,
+                                                                   newval_enc, oldval_enc));
+      }
     } else
 #endif
     {
-      cas = _gvn.transform(new (C, 5) CompareAndSwapPNode(control(), mem, adr, newval, oldval));
+      if (kind == LS_xchg) {
+        load_store = _gvn.transform(new (C) GetAndSetPNode(control(), mem, adr, newval, adr_type, value_type->is_oopptr()));
+      } else {
+        assert(kind == LS_cmpxchg, "wrong LoadStore operation");
+        load_store = _gvn.transform(new (C) CompareAndSwapPNode(control(), mem, adr, newval, oldval));
+      }
     }
-    post_barrier(control(), cas, base, adr, alias_idx, newval, T_OBJECT, true);
+    post_barrier(control(), load_store, base, adr, alias_idx, newval, T_OBJECT, true);
     break;
   default:
     ShouldNotReachHere();
     break;
   }
 
-  // SCMemProjNodes represent the memory state of CAS. Their main
-  // role is to prevent CAS nodes from being optimized away when their
-  // results aren't used.
-  Node* proj = _gvn.transform( new (C, 1) SCMemProjNode(cas));
+  // SCMemProjNodes represent the memory state of a LoadStore. Their
+  // main role is to prevent LoadStore nodes from being optimized away
+  // when their results aren't used.
+  Node* proj = _gvn.transform( new (C) SCMemProjNode(load_store));
   set_memory(proj, alias_idx);
 
   // Add the trailing membar surrounding the access
   insert_mem_bar(Op_MemBarCPUOrder);
   insert_mem_bar(Op_MemBarAcquire);
 
-  push(cas);
+#ifdef _LP64
+  if (type == T_OBJECT && adr->bottom_type()->is_ptr_to_narrowoop() && kind == LS_xchg) {
+    load_store = _gvn.transform(new (C) DecodeNNode(load_store, load_store->bottom_type()->make_ptr()));
+  }
+#endif
+
+  assert(type2size[load_store->bottom_type()->basic_type()] == type2size[rtype], "result type should match");
+  push_node(load_store->bottom_type()->basic_type(), load_store);
   return true;
 }
 
@@ -2909,7 +3024,7 @@ bool LibraryCallKit::inline_unsafe_allocate() {
   // can generate code to load it as unsigned byte.
   Node* inst = make_load(NULL, insp, TypeInt::UBYTE, T_BOOLEAN);
   Node* bits = intcon(InstanceKlass::fully_initialized);
-  Node* test = _gvn.transform( new (C, 3) SubINode(inst, bits) );
+  Node* test = _gvn.transform( new (C) SubINode(inst, bits) );
   // The 'test' is non-zero if we need to take a slow path.
 
   Node* obj = new_instance(kls, test);
@@ -2938,9 +3053,9 @@ bool LibraryCallKit::inline_native_classID() {
   Node* insp = basic_plus_adr(kls, in_bytes(offset));
   Node* tvalue = make_load(NULL, insp, TypeLong::LONG, T_LONG);
   Node* bits = longcon(~0x03l); // ignore bit 0 & 1
-  Node* andl = _gvn.transform(new (C, 3) AndLNode(tvalue, bits));
+  Node* andl = _gvn.transform(new (C) AndLNode(tvalue, bits));
   Node* clsused = longcon(0x01l); // set the class bit
-  Node* orl = _gvn.transform(new (C, 3) OrLNode(tvalue, clsused));
+  Node* orl = _gvn.transform(new (C) OrLNode(tvalue, clsused));
 
   const TypePtr *adr_type = _gvn.type(insp)->isa_ptr();
   store_to_memory(control(), insp, orl, T_LONG, adr_type);
@@ -2977,9 +3092,9 @@ bool LibraryCallKit::inline_native_time_funcs(address funcAddr, const char* func
   const TypeFunc *tf = OptoRuntime::void_long_Type();
   const TypePtr* no_memory_effects = NULL;
   Node* time = make_runtime_call(RC_LEAF, tf, funcAddr, funcName, no_memory_effects);
-  Node* value = _gvn.transform(new (C, 1) ProjNode(time, TypeFunc::Parms+0));
+  Node* value = _gvn.transform(new (C) ProjNode(time, TypeFunc::Parms+0));
 #ifdef ASSERT
-  Node* value_top = _gvn.transform(new (C, 1) ProjNode(time, TypeFunc::Parms + 1));
+  Node* value_top = _gvn.transform(new (C) ProjNode(time, TypeFunc::Parms + 1));
   assert(value_top == top(), "second value must be top");
 #endif
   push_pair(value);
@@ -3008,10 +3123,10 @@ bool LibraryCallKit::inline_native_isInterrupted() {
 
   // We only go to the fast case code if we pass two guards.
   // Paths which do not pass are accumulated in the slow_region.
-  RegionNode* slow_region = new (C, 1) RegionNode(1);
+  RegionNode* slow_region = new (C) RegionNode(1);
   record_for_igvn(slow_region);
-  RegionNode* result_rgn = new (C, 4) RegionNode(1+3); // fast1, fast2, slow
-  PhiNode*    result_val = new (C, 4) PhiNode(result_rgn, TypeInt::BOOL);
+  RegionNode* result_rgn = new (C) RegionNode(1+3); // fast1, fast2, slow
+  PhiNode*    result_val = new (C) PhiNode(result_rgn, TypeInt::BOOL);
   enum { no_int_result_path   = 1,
          no_clear_result_path = 2,
          slow_result_path     = 3
@@ -3021,8 +3136,8 @@ bool LibraryCallKit::inline_native_isInterrupted() {
   Node* rec_thr = argument(0);
   Node* tls_ptr = NULL;
   Node* cur_thr = generate_current_thread(tls_ptr);
-  Node* cmp_thr = _gvn.transform( new (C, 3) CmpPNode(cur_thr, rec_thr) );
-  Node* bol_thr = _gvn.transform( new (C, 2) BoolNode(cmp_thr, BoolTest::ne) );
+  Node* cmp_thr = _gvn.transform( new (C) CmpPNode(cur_thr, rec_thr) );
+  Node* bol_thr = _gvn.transform( new (C) BoolNode(cmp_thr, BoolTest::ne) );
 
   bool known_current_thread = (_gvn.type(bol_thr) == TypeInt::ZERO);
   if (!known_current_thread)
@@ -3034,32 +3149,32 @@ bool LibraryCallKit::inline_native_isInterrupted() {
   p = basic_plus_adr(top()/*!oop*/, osthread, in_bytes(OSThread::interrupted_offset()));
   // Set the control input on the field _interrupted read to prevent it floating up.
   Node* int_bit = make_load(control(), p, TypeInt::BOOL, T_INT);
-  Node* cmp_bit = _gvn.transform( new (C, 3) CmpINode(int_bit, intcon(0)) );
-  Node* bol_bit = _gvn.transform( new (C, 2) BoolNode(cmp_bit, BoolTest::ne) );
+  Node* cmp_bit = _gvn.transform( new (C) CmpINode(int_bit, intcon(0)) );
+  Node* bol_bit = _gvn.transform( new (C) BoolNode(cmp_bit, BoolTest::ne) );
 
   IfNode* iff_bit = create_and_map_if(control(), bol_bit, PROB_UNLIKELY_MAG(3), COUNT_UNKNOWN);
 
   // First fast path:  if (!TLS._interrupted) return false;
-  Node* false_bit = _gvn.transform( new (C, 1) IfFalseNode(iff_bit) );
+  Node* false_bit = _gvn.transform( new (C) IfFalseNode(iff_bit) );
   result_rgn->init_req(no_int_result_path, false_bit);
   result_val->init_req(no_int_result_path, intcon(0));
 
   // drop through to next case
-  set_control( _gvn.transform(new (C, 1) IfTrueNode(iff_bit)) );
+  set_control( _gvn.transform(new (C) IfTrueNode(iff_bit)) );
 
   // (c) Or, if interrupt bit is set and clear_int is false, use 2nd fast path.
   Node* clr_arg = argument(1);
-  Node* cmp_arg = _gvn.transform( new (C, 3) CmpINode(clr_arg, intcon(0)) );
-  Node* bol_arg = _gvn.transform( new (C, 2) BoolNode(cmp_arg, BoolTest::ne) );
+  Node* cmp_arg = _gvn.transform( new (C) CmpINode(clr_arg, intcon(0)) );
+  Node* bol_arg = _gvn.transform( new (C) BoolNode(cmp_arg, BoolTest::ne) );
   IfNode* iff_arg = create_and_map_if(control(), bol_arg, PROB_FAIR, COUNT_UNKNOWN);
 
   // Second fast path:  ... else if (!clear_int) return true;
-  Node* false_arg = _gvn.transform( new (C, 1) IfFalseNode(iff_arg) );
+  Node* false_arg = _gvn.transform( new (C) IfFalseNode(iff_arg) );
   result_rgn->init_req(no_clear_result_path, false_arg);
   result_val->init_req(no_clear_result_path, intcon(1));
 
   // drop through to next case
-  set_control( _gvn.transform(new (C, 1) IfTrueNode(iff_arg)) );
+  set_control( _gvn.transform(new (C) IfTrueNode(iff_arg)) );
 
   // (d) Otherwise, go to the slow path.
   slow_region->add_req(control());
@@ -3147,9 +3262,9 @@ Node* LibraryCallKit::generate_access_flags_guard(Node* kls, int modifier_mask,
   Node* mods = make_load(NULL, modp, TypeInt::INT, T_INT);
   Node* mask = intcon(modifier_mask);
   Node* bits = intcon(modifier_bits);
-  Node* mbit = _gvn.transform( new (C, 3) AndINode(mods, mask) );
-  Node* cmp  = _gvn.transform( new (C, 3) CmpINode(mbit, bits) );
-  Node* bol  = _gvn.transform( new (C, 2) BoolNode(cmp, BoolTest::ne) );
+  Node* mbit = _gvn.transform( new (C) AndINode(mods, mask) );
+  Node* cmp  = _gvn.transform( new (C) CmpINode(mbit, bits) );
+  Node* bol  = _gvn.transform( new (C) BoolNode(cmp, BoolTest::ne) );
   return generate_fair_guard(bol, region);
 }
 Node* LibraryCallKit::generate_interface_guard(Node* kls, RegionNode* region) {
@@ -3222,9 +3337,9 @@ bool LibraryCallKit::inline_native_Class_query(vmIntrinsics::ID id) {
 #endif
 
   // Null-check the mirror, and the mirror's klass ptr (in case it is a primitive).
-  RegionNode* region = new (C, PATH_LIMIT) RegionNode(PATH_LIMIT);
+  RegionNode* region = new (C) RegionNode(PATH_LIMIT);
   record_for_igvn(region);
-  PhiNode* phi = new (C, PATH_LIMIT) PhiNode(region, return_type);
+  PhiNode* phi = new (C) PhiNode(region, return_type);
 
   // The mirror will never be null of Reflection.getClassAccessFlags, however
   // it may be null for Class.isInstance or Class.getModifiers. Throw a NPE
@@ -3322,7 +3437,7 @@ bool LibraryCallKit::inline_native_Class_query(vmIntrinsics::ID id) {
     if (generate_array_guard(kls, region) != NULL) {
       // Be sure to pin the oop load to the guard edge just created:
       Node* is_array_ctrl = region->in(region->req()-1);
-      Node* cma = basic_plus_adr(kls, in_bytes(arrayKlass::component_mirror_offset()));
+      Node* cma = basic_plus_adr(kls, in_bytes(ArrayKlass::component_mirror_offset()));
       Node* cmo = make_load(is_array_ctrl, cma, TypeInstPtr::MIRROR, T_OBJECT);
       phi->add_req(cmo);
     }
@@ -3372,8 +3487,8 @@ bool LibraryCallKit::inline_native_subtype_check() {
     PATH_LIMIT
   };
 
-  RegionNode* region = new (C, PATH_LIMIT) RegionNode(PATH_LIMIT);
-  Node*       phi    = new (C, PATH_LIMIT) PhiNode(region, TypeInt::BOOL);
+  RegionNode* region = new (C) RegionNode(PATH_LIMIT);
+  Node*       phi    = new (C) PhiNode(region, TypeInt::BOOL);
   record_for_igvn(region);
 
   const TypePtr* adr_type = TypeRawPtr::BOTTOM;   // memory type of loads
@@ -3424,8 +3539,8 @@ bool LibraryCallKit::inline_native_subtype_check() {
   set_control(region->in(_prim_0_path)); // go back to first null check
   if (!stopped()) {
     // Since superc is primitive, make a guard for the superc==subc case.
-    Node* cmp_eq = _gvn.transform( new (C, 3) CmpPNode(args[0], args[1]) );
-    Node* bol_eq = _gvn.transform( new (C, 2) BoolNode(cmp_eq, BoolTest::eq) );
+    Node* cmp_eq = _gvn.transform( new (C) CmpPNode(args[0], args[1]) );
+    Node* bol_eq = _gvn.transform( new (C) BoolNode(cmp_eq, BoolTest::eq) );
     generate_guard(bol_eq, region, PROB_FAIR);
     if (region->req() == PATH_LIMIT+1) {
       // A guard was added.  If the added guard is taken, superc==subc.
@@ -3491,11 +3606,11 @@ Node* LibraryCallKit::generate_array_guard_common(Node* kls, RegionNode* region,
                 ? ((jint)Klass::_lh_array_tag_type_value
                    <<    Klass::_lh_array_tag_shift)
                 : Klass::_lh_neutral_value);
-  Node* cmp = _gvn.transform( new(C, 3) CmpINode(layout_val, intcon(nval)) );
+  Node* cmp = _gvn.transform( new(C) CmpINode(layout_val, intcon(nval)) );
   BoolTest::mask btest = BoolTest::lt;  // correct for testing is_[obj]array
   // invert the test if we are looking for a non-array
   if (not_array)  btest = BoolTest(btest).negate();
-  Node* bol = _gvn.transform( new(C, 2) BoolNode(cmp, btest) );
+  Node* bol = _gvn.transform( new(C) BoolNode(cmp, btest) );
   return generate_fair_guard(bol, region);
 }
 
@@ -3513,12 +3628,12 @@ bool LibraryCallKit::inline_native_newArray() {
   if (stopped())  return true;
 
   enum { _normal_path = 1, _slow_path = 2, PATH_LIMIT };
-  RegionNode* result_reg = new(C, PATH_LIMIT) RegionNode(PATH_LIMIT);
-  PhiNode*    result_val = new(C, PATH_LIMIT) PhiNode(result_reg,
-                                                      TypeInstPtr::NOTNULL);
-  PhiNode*    result_io  = new(C, PATH_LIMIT) PhiNode(result_reg, Type::ABIO);
-  PhiNode*    result_mem = new(C, PATH_LIMIT) PhiNode(result_reg, Type::MEMORY,
-                                                      TypePtr::BOTTOM);
+  RegionNode* result_reg = new(C) RegionNode(PATH_LIMIT);
+  PhiNode*    result_val = new(C) PhiNode(result_reg,
+                                          TypeInstPtr::NOTNULL);
+  PhiNode*    result_io  = new(C) PhiNode(result_reg, Type::ABIO);
+  PhiNode*    result_mem = new(C) PhiNode(result_reg, Type::MEMORY,
+                                          TypePtr::BOTTOM);
 
   bool never_see_null = !too_many_traps(Deoptimization::Reason_null_check);
   Node* klass_node = load_array_klass_from_mirror(mirror, never_see_null,
@@ -3633,7 +3748,7 @@ bool LibraryCallKit::inline_array_copyOf(bool is_copyOfRange) {
                                               NULL, 0);
     klass_node = do_null_check(klass_node, T_OBJECT);
 
-    RegionNode* bailout = new (C, 1) RegionNode(1);
+    RegionNode* bailout = new (C) RegionNode(1);
     record_for_igvn(bailout);
 
     // Despite the generic type of Arrays.copyOf, the mirror might be int, int[], etc.
@@ -3643,7 +3758,7 @@ bool LibraryCallKit::inline_array_copyOf(bool is_copyOfRange) {
       // Improve the klass node's type from the new optimistic assumption:
       ciKlass* ak = ciArrayKlass::make(env()->Object_klass());
       const Type* akls = TypeKlassPtr::make(TypePtr::NotNull, ak, 0/*offset*/);
-      Node* cast = new (C, 2) CastPPNode(klass_node, akls);
+      Node* cast = new (C) CastPPNode(klass_node, akls);
       cast->init_req(0, control());
       klass_node = _gvn.transform(cast);
     }
@@ -3654,7 +3769,7 @@ bool LibraryCallKit::inline_array_copyOf(bool is_copyOfRange) {
 
     Node* length = end;
     if (_gvn.type(start) != TypeInt::ZERO) {
-      length = _gvn.transform( new (C, 3) SubINode(end, start) );
+      length = _gvn.transform( new (C) SubINode(end, start) );
     }
 
     // Bail out if length is negative.
@@ -3674,7 +3789,7 @@ bool LibraryCallKit::inline_array_copyOf(bool is_copyOfRange) {
 
       // How many elements will we copy from the original?
       // The answer is MinI(orig_length - start, length).
-      Node* orig_tail = _gvn.transform( new(C, 3) SubINode(orig_length, start) );
+      Node* orig_tail = _gvn.transform( new(C) SubINode(orig_length, start) );
       Node* moved = generate_min_max(vmIntrinsics::_min, orig_tail, length);
 
       newcopy = new_array(klass_node, length, 0);
@@ -3721,8 +3836,8 @@ Node* LibraryCallKit::generate_virtual_guard(Node* obj_klass,
   const TypePtr* native_call_addr = TypeMetadataPtr::make(method);
 
   Node* native_call = makecon(native_call_addr);
-  Node* chk_native  = _gvn.transform( new(C, 3) CmpPNode(target_call, native_call) );
-  Node* test_native = _gvn.transform( new(C, 2) BoolNode(chk_native, BoolTest::ne) );
+  Node* chk_native  = _gvn.transform( new(C) CmpPNode(target_call, native_call) );
+  Node* test_native = _gvn.transform( new(C) BoolNode(chk_native, BoolTest::ne) );
 
   return generate_slow_guard(test_native, slow_region);
 }
@@ -3744,13 +3859,12 @@ LibraryCallKit::generate_method_call(vmIntrinsics::ID method_id, bool is_virtual
   guarantee(method_id == method->intrinsic_id(), "must match");
 
   const TypeFunc* tf = TypeFunc::make(method);
-  int tfdc = tf->domain()->cnt();
   CallJavaNode* slow_call;
   if (is_static) {
     assert(!is_virtual, "");
-    slow_call = new(C, tfdc) CallStaticJavaNode(tf,
-                                SharedRuntime::get_resolve_static_call_stub(),
-                                method, bci());
+    slow_call = new(C) CallStaticJavaNode(tf,
+                           SharedRuntime::get_resolve_static_call_stub(),
+                           method, bci());
   } else if (is_virtual) {
     null_check_receiver(method);
     int vtable_index = Method::invalid_vtable_index;
@@ -3762,12 +3876,12 @@ LibraryCallKit::generate_method_call(vmIntrinsics::ID method_id, bool is_virtual
       // No need to use the linkResolver to get it.
        vtable_index = method->vtable_index();
     }
-    slow_call = new(C, tfdc) CallDynamicJavaNode(tf,
-                                SharedRuntime::get_resolve_virtual_call_stub(),
-                                method, vtable_index, bci());
+    slow_call = new(C) CallDynamicJavaNode(tf,
+                          SharedRuntime::get_resolve_virtual_call_stub(),
+                          method, vtable_index, bci());
   } else {  // neither virtual nor static:  opt_virtual
     null_check_receiver(method);
-    slow_call = new(C, tfdc) CallStaticJavaNode(tf,
+    slow_call = new(C) CallStaticJavaNode(tf,
                                 SharedRuntime::get_resolve_opt_virtual_call_stub(),
                                 method, bci());
     slow_call->set_optimized_virtual(true);
@@ -3786,12 +3900,12 @@ bool LibraryCallKit::inline_native_hashcode(bool is_virtual, bool is_static) {
 
   enum { _slow_path = 1, _fast_path, _null_path, PATH_LIMIT };
 
-  RegionNode* result_reg = new(C, PATH_LIMIT) RegionNode(PATH_LIMIT);
-  PhiNode*    result_val = new(C, PATH_LIMIT) PhiNode(result_reg,
-                                                      TypeInt::INT);
-  PhiNode*    result_io  = new(C, PATH_LIMIT) PhiNode(result_reg, Type::ABIO);
-  PhiNode*    result_mem = new(C, PATH_LIMIT) PhiNode(result_reg, Type::MEMORY,
-                                                      TypePtr::BOTTOM);
+  RegionNode* result_reg = new(C) RegionNode(PATH_LIMIT);
+  PhiNode*    result_val = new(C) PhiNode(result_reg,
+                                          TypeInt::INT);
+  PhiNode*    result_io  = new(C) PhiNode(result_reg, Type::ABIO);
+  PhiNode*    result_mem = new(C) PhiNode(result_reg, Type::MEMORY,
+                                          TypePtr::BOTTOM);
   Node* obj = NULL;
   if (!is_static) {
     // Check for hashing null object
@@ -3825,7 +3939,7 @@ bool LibraryCallKit::inline_native_hashcode(bool is_virtual, bool is_static) {
 
   // We only go to the fast case code if we pass a number of guards.  The
   // paths which do not pass are accumulated in the slow_region.
-  RegionNode* slow_region = new (C, 1) RegionNode(1);
+  RegionNode* slow_region = new (C) RegionNode(1);
   record_for_igvn(slow_region);
 
   // If this is a virtual call, we generate a funny guard.  We pull out
@@ -3844,10 +3958,10 @@ bool LibraryCallKit::inline_native_hashcode(bool is_virtual, bool is_static) {
 
   // Test the header to see if it is unlocked.
   Node *lock_mask      = _gvn.MakeConX(markOopDesc::biased_lock_mask_in_place);
-  Node *lmasked_header = _gvn.transform( new (C, 3) AndXNode(header, lock_mask) );
+  Node *lmasked_header = _gvn.transform( new (C) AndXNode(header, lock_mask) );
   Node *unlocked_val   = _gvn.MakeConX(markOopDesc::unlocked_value);
-  Node *chk_unlocked   = _gvn.transform( new (C, 3) CmpXNode( lmasked_header, unlocked_val));
-  Node *test_unlocked  = _gvn.transform( new (C, 2) BoolNode( chk_unlocked, BoolTest::ne) );
+  Node *chk_unlocked   = _gvn.transform( new (C) CmpXNode( lmasked_header, unlocked_val));
+  Node *test_unlocked  = _gvn.transform( new (C) BoolNode( chk_unlocked, BoolTest::ne) );
 
   generate_slow_guard(test_unlocked, slow_region);
 
@@ -3857,17 +3971,17 @@ bool LibraryCallKit::inline_native_hashcode(bool is_virtual, bool is_static) {
   // vm: see markOop.hpp.
   Node *hash_mask      = _gvn.intcon(markOopDesc::hash_mask);
   Node *hash_shift     = _gvn.intcon(markOopDesc::hash_shift);
-  Node *hshifted_header= _gvn.transform( new (C, 3) URShiftXNode(header, hash_shift) );
+  Node *hshifted_header= _gvn.transform( new (C) URShiftXNode(header, hash_shift) );
   // This hack lets the hash bits live anywhere in the mark object now, as long
   // as the shift drops the relevant bits into the low 32 bits.  Note that
   // Java spec says that HashCode is an int so there's no point in capturing
   // an 'X'-sized hashcode (32 in 32-bit build or 64 in 64-bit build).
   hshifted_header      = ConvX2I(hshifted_header);
-  Node *hash_val       = _gvn.transform( new (C, 3) AndINode(hshifted_header, hash_mask) );
+  Node *hash_val       = _gvn.transform( new (C) AndINode(hshifted_header, hash_mask) );
 
   Node *no_hash_val    = _gvn.intcon(markOopDesc::no_hash);
-  Node *chk_assigned   = _gvn.transform( new (C, 3) CmpINode( hash_val, no_hash_val));
-  Node *test_assigned  = _gvn.transform( new (C, 2) BoolNode( chk_assigned, BoolTest::eq) );
+  Node *chk_assigned   = _gvn.transform( new (C) CmpINode( hash_val, no_hash_val));
+  Node *test_assigned  = _gvn.transform( new (C) BoolNode( chk_assigned, BoolTest::eq) );
 
   generate_slow_guard(test_assigned, slow_region);
 
@@ -4071,31 +4185,31 @@ bool LibraryCallKit::inline_fp_conversions(vmIntrinsics::ID id) {
 
   switch (id) {
   case vmIntrinsics::_floatToRawIntBits:
-    push(_gvn.transform( new (C, 2) MoveF2INode(pop())));
+    push(_gvn.transform( new (C) MoveF2INode(pop())));
     break;
 
   case vmIntrinsics::_intBitsToFloat:
-    push(_gvn.transform( new (C, 2) MoveI2FNode(pop())));
+    push(_gvn.transform( new (C) MoveI2FNode(pop())));
     break;
 
   case vmIntrinsics::_doubleToRawLongBits:
-    push_pair(_gvn.transform( new (C, 2) MoveD2LNode(pop_pair())));
+    push_pair(_gvn.transform( new (C) MoveD2LNode(pop_pair())));
     break;
 
   case vmIntrinsics::_longBitsToDouble:
-    push_pair(_gvn.transform( new (C, 2) MoveL2DNode(pop_pair())));
+    push_pair(_gvn.transform( new (C) MoveL2DNode(pop_pair())));
     break;
 
   case vmIntrinsics::_doubleToLongBits: {
     Node* value = pop_pair();
 
     // two paths (plus control) merge in a wood
-    RegionNode *r = new (C, 3) RegionNode(3);
-    Node *phi = new (C, 3) PhiNode(r, TypeLong::LONG);
+    RegionNode *r = new (C) RegionNode(3);
+    Node *phi = new (C) PhiNode(r, TypeLong::LONG);
 
-    Node *cmpisnan = _gvn.transform( new (C, 3) CmpDNode(value, value));
+    Node *cmpisnan = _gvn.transform( new (C) CmpDNode(value, value));
     // Build the boolean node
-    Node *bolisnan = _gvn.transform( new (C, 2) BoolNode( cmpisnan, BoolTest::ne ) );
+    Node *bolisnan = _gvn.transform( new (C) BoolNode( cmpisnan, BoolTest::ne ) );
 
     // Branch either way.
     // NaN case is less traveled, which makes all the difference.
@@ -4103,7 +4217,7 @@ bool LibraryCallKit::inline_fp_conversions(vmIntrinsics::ID id) {
     Node *opt_isnan = _gvn.transform(ifisnan);
     assert( opt_isnan->is_If(), "Expect an IfNode");
     IfNode *opt_ifisnan = (IfNode*)opt_isnan;
-    Node *iftrue = _gvn.transform( new (C, 1) IfTrueNode(opt_ifisnan) );
+    Node *iftrue = _gvn.transform( new (C) IfTrueNode(opt_ifisnan) );
 
     set_control(iftrue);
 
@@ -4113,10 +4227,10 @@ bool LibraryCallKit::inline_fp_conversions(vmIntrinsics::ID id) {
     r->init_req(1, iftrue);
 
     // Else fall through
-    Node *iffalse = _gvn.transform( new (C, 1) IfFalseNode(opt_ifisnan) );
+    Node *iffalse = _gvn.transform( new (C) IfFalseNode(opt_ifisnan) );
     set_control(iffalse);
 
-    phi->init_req(2, _gvn.transform( new (C, 2) MoveD2LNode(value)));
+    phi->init_req(2, _gvn.transform( new (C) MoveD2LNode(value)));
     r->init_req(2, iffalse);
 
     // Post merge
@@ -4136,12 +4250,12 @@ bool LibraryCallKit::inline_fp_conversions(vmIntrinsics::ID id) {
     Node* value = pop();
 
     // two paths (plus control) merge in a wood
-    RegionNode *r = new (C, 3) RegionNode(3);
-    Node *phi = new (C, 3) PhiNode(r, TypeInt::INT);
+    RegionNode *r = new (C) RegionNode(3);
+    Node *phi = new (C) PhiNode(r, TypeInt::INT);
 
-    Node *cmpisnan = _gvn.transform( new (C, 3) CmpFNode(value, value));
+    Node *cmpisnan = _gvn.transform( new (C) CmpFNode(value, value));
     // Build the boolean node
-    Node *bolisnan = _gvn.transform( new (C, 2) BoolNode( cmpisnan, BoolTest::ne ) );
+    Node *bolisnan = _gvn.transform( new (C) BoolNode( cmpisnan, BoolTest::ne ) );
 
     // Branch either way.
     // NaN case is less traveled, which makes all the difference.
@@ -4149,7 +4263,7 @@ bool LibraryCallKit::inline_fp_conversions(vmIntrinsics::ID id) {
     Node *opt_isnan = _gvn.transform(ifisnan);
     assert( opt_isnan->is_If(), "Expect an IfNode");
     IfNode *opt_ifisnan = (IfNode*)opt_isnan;
-    Node *iftrue = _gvn.transform( new (C, 1) IfTrueNode(opt_ifisnan) );
+    Node *iftrue = _gvn.transform( new (C) IfTrueNode(opt_ifisnan) );
 
     set_control(iftrue);
 
@@ -4159,10 +4273,10 @@ bool LibraryCallKit::inline_fp_conversions(vmIntrinsics::ID id) {
     r->init_req(1, iftrue);
 
     // Else fall through
-    Node *iffalse = _gvn.transform( new (C, 1) IfFalseNode(opt_ifisnan) );
+    Node *iffalse = _gvn.transform( new (C) IfFalseNode(opt_ifisnan) );
     set_control(iffalse);
 
-    phi->init_req(2, _gvn.transform( new (C, 2) MoveF2INode(value)));
+    phi->init_req(2, _gvn.transform( new (C) MoveF2INode(value)));
     r->init_req(2, iffalse);
 
     // Post merge
@@ -4269,7 +4383,7 @@ void LibraryCallKit::copy_to_clone(Node* obj, Node* alloc_obj, Node* obj_size, b
   // 12 - 64-bit VM, compressed klass
   // 16 - 64-bit VM, normal klass
   if (base_off % BytesPerLong != 0) {
-    assert(UseCompressedOops, "");
+    assert(UseCompressedKlassPointers, "");
     if (is_array) {
       // Exclude length to copy by 8 bytes words.
       base_off += sizeof(int);
@@ -4284,8 +4398,8 @@ void LibraryCallKit::copy_to_clone(Node* obj, Node* alloc_obj, Node* obj_size, b
 
   // Compute the length also, if needed:
   Node* countx = size;
-  countx = _gvn.transform( new (C, 3) SubXNode(countx, MakeConX(base_off)) );
-  countx = _gvn.transform( new (C, 3) URShiftXNode(countx, intcon(LogBytesPerLong) ));
+  countx = _gvn.transform( new (C) SubXNode(countx, MakeConX(base_off)) );
+  countx = _gvn.transform( new (C) URShiftXNode(countx, intcon(LogBytesPerLong) ));
 
   const TypePtr* raw_adr_type = TypeRawPtr::BOTTOM;
   bool disjoint_bases = true;
@@ -4376,12 +4490,12 @@ bool LibraryCallKit::inline_native_clone(bool is_virtual) {
       _instance_path,     // plain instance allocation, plus arrayof_long_arraycopy
       PATH_LIMIT
     };
-    RegionNode* result_reg = new(C, PATH_LIMIT) RegionNode(PATH_LIMIT);
-    result_val             = new(C, PATH_LIMIT) PhiNode(result_reg,
-                                                        TypeInstPtr::NOTNULL);
-    PhiNode*    result_i_o = new(C, PATH_LIMIT) PhiNode(result_reg, Type::ABIO);
-    PhiNode*    result_mem = new(C, PATH_LIMIT) PhiNode(result_reg, Type::MEMORY,
-                                                        TypePtr::BOTTOM);
+    RegionNode* result_reg = new(C) RegionNode(PATH_LIMIT);
+    result_val             = new(C) PhiNode(result_reg,
+                                            TypeInstPtr::NOTNULL);
+    PhiNode*    result_i_o = new(C) PhiNode(result_reg, Type::ABIO);
+    PhiNode*    result_mem = new(C) PhiNode(result_reg, Type::MEMORY,
+                                            TypePtr::BOTTOM);
     record_for_igvn(result_reg);
 
     const TypePtr* raw_adr_type = TypeRawPtr::BOTTOM;
@@ -4437,7 +4551,7 @@ bool LibraryCallKit::inline_native_clone(bool is_virtual) {
 
     // We only go to the instance fast case code if we pass a number of guards.
     // The paths which do not pass are accumulated in the slow_region.
-    RegionNode* slow_region = new (C, 1) RegionNode(1);
+    RegionNode* slow_region = new (C) RegionNode(1);
     record_for_igvn(slow_region);
     if (!stopped()) {
       // It's an instance (we did array above).  Make the slow-path tests.
@@ -4607,7 +4721,7 @@ bool LibraryCallKit::inline_arraycopy() {
   // (8) dest_offset + length must not exceed length of dest.
   // (9) each element of an oop array must be assignable
 
-  RegionNode* slow_region = new (C, 1) RegionNode(1);
+  RegionNode* slow_region = new (C) RegionNode(1);
   record_for_igvn(slow_region);
 
   // (3) operands must not be null
@@ -4697,7 +4811,7 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type,
                                    RegionNode* slow_region) {
 
   if (slow_region == NULL) {
-    slow_region = new(C,1) RegionNode(1);
+    slow_region = new(C) RegionNode(1);
     record_for_igvn(slow_region);
   }
 
@@ -4745,9 +4859,9 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type,
          bcopy_path       = 5,  // copy primitive array by 64-bit blocks
          PATH_LIMIT       = 6
   };
-  RegionNode* result_region = new(C, PATH_LIMIT) RegionNode(PATH_LIMIT);
-  PhiNode*    result_i_o    = new(C, PATH_LIMIT) PhiNode(result_region, Type::ABIO);
-  PhiNode*    result_memory = new(C, PATH_LIMIT) PhiNode(result_region, Type::MEMORY, adr_type);
+  RegionNode* result_region = new(C) RegionNode(PATH_LIMIT);
+  PhiNode*    result_i_o    = new(C) PhiNode(result_region, Type::ABIO);
+  PhiNode*    result_memory = new(C) PhiNode(result_region, Type::MEMORY, adr_type);
   record_for_igvn(result_region);
   _gvn.set_type_bottom(result_i_o);
   _gvn.set_type_bottom(result_memory);
@@ -4821,7 +4935,7 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type,
     // are dest_head = dest[0..off] and dest_tail = dest[off+len..dest.length].
     Node* dest_size   = alloc->in(AllocateNode::AllocSize);
     Node* dest_length = alloc->in(AllocateNode::ALength);
-    Node* dest_tail   = _gvn.transform( new(C,3) AddINode(dest_offset,
+    Node* dest_tail   = _gvn.transform( new(C) AddINode(dest_offset,
                                                           copy_length) );
 
     // If there is a head section that needs zeroing, do it now.
@@ -4838,8 +4952,8 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type,
     // the copy to a more hardware-friendly word size of 64 bits.
     Node* tail_ctl = NULL;
     if (!stopped() && !dest_tail->eqv_uncast(dest_length)) {
-      Node* cmp_lt   = _gvn.transform( new(C,3) CmpINode(dest_tail, dest_length) );
-      Node* bol_lt   = _gvn.transform( new(C,2) BoolNode(cmp_lt, BoolTest::lt) );
+      Node* cmp_lt   = _gvn.transform( new(C) CmpINode(dest_tail, dest_length) );
+      Node* bol_lt   = _gvn.transform( new(C) BoolNode(cmp_lt, BoolTest::lt) );
       tail_ctl = generate_slow_guard(bol_lt, NULL);
       assert(tail_ctl != NULL || !stopped(), "must be an outcome");
     }
@@ -4873,8 +4987,8 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type,
                              dest_size);
       } else {
         // Make a local merge.
-        Node* done_ctl = new(C,3) RegionNode(3);
-        Node* done_mem = new(C,3) PhiNode(done_ctl, Type::MEMORY, adr_type);
+        Node* done_ctl = new(C) RegionNode(3);
+        Node* done_mem = new(C) PhiNode(done_ctl, Type::MEMORY, adr_type);
         done_ctl->init_req(1, notail_ctl);
         done_mem->init_req(1, memory(adr_type));
         generate_clear_array(adr_type, dest, basic_elem_type,
@@ -4920,7 +5034,7 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type,
       PreserveJVMState pjvms(this);
       set_control(not_subtype_ctrl);
       // (At this point we can assume disjoint_bases, since types differ.)
-      int ek_offset = in_bytes(objArrayKlass::element_klass_offset());
+      int ek_offset = in_bytes(ObjArrayKlass::element_klass_offset());
       Node* p1 = basic_plus_adr(dest_klass, ek_offset);
       Node* n1 = LoadKlassNode::make(_gvn, immutable_memory(), p1, TypeRawPtr::BOTTOM);
       Node* dest_elem_klass = _gvn.transform(n1);
@@ -4969,21 +5083,21 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type,
     // Clean up after the checked call.
     // The returned value is either 0 or -1^K,
     // where K = number of partially transferred array elements.
-    Node* cmp = _gvn.transform( new(C, 3) CmpINode(checked_value, intcon(0)) );
-    Node* bol = _gvn.transform( new(C, 2) BoolNode(cmp, BoolTest::eq) );
+    Node* cmp = _gvn.transform( new(C) CmpINode(checked_value, intcon(0)) );
+    Node* bol = _gvn.transform( new(C) BoolNode(cmp, BoolTest::eq) );
     IfNode* iff = create_and_map_if(control(), bol, PROB_MAX, COUNT_UNKNOWN);
 
     // If it is 0, we are done, so transfer to the end.
-    Node* checks_done = _gvn.transform( new(C, 1) IfTrueNode(iff) );
+    Node* checks_done = _gvn.transform( new(C) IfTrueNode(iff) );
     result_region->init_req(checked_path, checks_done);
     result_i_o   ->init_req(checked_path, checked_i_o);
     result_memory->init_req(checked_path, checked_mem);
 
     // If it is not zero, merge into the slow call.
-    set_control( _gvn.transform( new(C, 1) IfFalseNode(iff) ));
-    RegionNode* slow_reg2 = new(C, 3) RegionNode(3);
-    PhiNode*    slow_i_o2 = new(C, 3) PhiNode(slow_reg2, Type::ABIO);
-    PhiNode*    slow_mem2 = new(C, 3) PhiNode(slow_reg2, Type::MEMORY, adr_type);
+    set_control( _gvn.transform( new(C) IfFalseNode(iff) ));
+    RegionNode* slow_reg2 = new(C) RegionNode(3);
+    PhiNode*    slow_i_o2 = new(C) PhiNode(slow_reg2, Type::ABIO);
+    PhiNode*    slow_mem2 = new(C) PhiNode(slow_reg2, Type::MEMORY, adr_type);
     record_for_igvn(slow_reg2);
     slow_reg2  ->init_req(1, slow_control);
     slow_i_o2  ->init_req(1, slow_i_o);
@@ -5003,16 +5117,16 @@ LibraryCallKit::generate_arraycopy(const TypePtr* adr_type,
     } else {
       // We must continue the copy exactly where it failed, or else
       // another thread might see the wrong number of writes to dest.
-      Node* checked_offset = _gvn.transform( new(C, 3) XorINode(checked_value, intcon(-1)) );
-      Node* slow_offset    = new(C, 3) PhiNode(slow_reg2, TypeInt::INT);
+      Node* checked_offset = _gvn.transform( new(C) XorINode(checked_value, intcon(-1)) );
+      Node* slow_offset    = new(C) PhiNode(slow_reg2, TypeInt::INT);
       slow_offset->init_req(1, intcon(0));
       slow_offset->init_req(2, checked_offset);
       slow_offset  = _gvn.transform(slow_offset);
 
       // Adjust the arguments by the conditionally incoming offset.
-      Node* src_off_plus  = _gvn.transform( new(C, 3) AddINode(src_offset,  slow_offset) );
-      Node* dest_off_plus = _gvn.transform( new(C, 3) AddINode(dest_offset, slow_offset) );
-      Node* length_minus  = _gvn.transform( new(C, 3) SubINode(copy_length, slow_offset) );
+      Node* src_off_plus  = _gvn.transform( new(C) AddINode(src_offset,  slow_offset) );
+      Node* dest_off_plus = _gvn.transform( new(C) AddINode(dest_offset, slow_offset) );
+      Node* length_minus  = _gvn.transform( new(C) SubINode(copy_length, slow_offset) );
 
       // Tweak the node variables to adjust the code produced below:
       src_offset  = src_off_plus;
@@ -5233,10 +5347,10 @@ LibraryCallKit::generate_clear_array(const TypePtr* adr_type,
     int      end_round = (-1 << scale) & (BytesPerLong  - 1);
     Node*    end       = ConvI2X(slice_len);
     if (scale != 0)
-      end = _gvn.transform( new(C,3) LShiftXNode(end, intcon(scale) ));
+      end = _gvn.transform( new(C) LShiftXNode(end, intcon(scale) ));
     end_base += end_round;
-    end = _gvn.transform( new(C,3) AddXNode(end, MakeConX(end_base)) );
-    end = _gvn.transform( new(C,3) AndXNode(end, MakeConX(~end_round)) );
+    end = _gvn.transform( new(C) AddXNode(end, MakeConX(end_base)) );
+    end = _gvn.transform( new(C) AndXNode(end, MakeConX(~end_round)) );
     mem = ClearArrayNode::clear_memory(control(), mem, dest,
                                        start_con, end, &_gvn);
   } else if (start_con < 0 && dest_size != top()) {
@@ -5245,8 +5359,8 @@ LibraryCallKit::generate_clear_array(const TypePtr* adr_type,
     Node* start = slice_idx;
     start = ConvI2X(start);
     if (scale != 0)
-      start = _gvn.transform( new(C,3) LShiftXNode( start, intcon(scale) ));
-    start = _gvn.transform( new(C,3) AddXNode(start, MakeConX(abase)) );
+      start = _gvn.transform( new(C) LShiftXNode( start, intcon(scale) ));
+    start = _gvn.transform( new(C) AddXNode(start, MakeConX(abase)) );
     if ((bump_bit | clear_low) != 0) {
       int to_clear = (bump_bit | clear_low);
       // Align up mod 8, then store a jint zero unconditionally
@@ -5257,14 +5371,14 @@ LibraryCallKit::generate_clear_array(const TypePtr* adr_type,
         assert((abase & to_clear) == 0, "array base must be long-aligned");
       } else {
         // Bump 'start' up to (or past) the next jint boundary:
-        start = _gvn.transform( new(C,3) AddXNode(start, MakeConX(bump_bit)) );
+        start = _gvn.transform( new(C) AddXNode(start, MakeConX(bump_bit)) );
         assert((abase & clear_low) == 0, "array base must be int-aligned");
       }
       // Round bumped 'start' down to jlong boundary in body of array.
-      start = _gvn.transform( new(C,3) AndXNode(start, MakeConX(~to_clear)) );
+      start = _gvn.transform( new(C) AndXNode(start, MakeConX(~to_clear)) );
       if (bump_bit != 0) {
         // Store a zero to the immediately preceding jint:
-        Node* x1 = _gvn.transform( new(C,3) AddXNode(start, MakeConX(-bump_bit)) );
+        Node* x1 = _gvn.transform( new(C) AddXNode(start, MakeConX(-bump_bit)) );
         Node* p1 = basic_plus_adr(dest, x1);
         mem = StoreNode::make(_gvn, control(), mem, p1, adr_type, intcon(0), T_INT);
         mem = _gvn.transform(mem);
@@ -5331,8 +5445,8 @@ LibraryCallKit::generate_block_arraycopy(const TypePtr* adr_type,
   Node* sptr  = basic_plus_adr(src,  src_off);
   Node* dptr  = basic_plus_adr(dest, dest_off);
   Node* countx = dest_size;
-  countx = _gvn.transform( new (C, 3) SubXNode(countx, MakeConX(dest_off)) );
-  countx = _gvn.transform( new (C, 3) URShiftXNode(countx, intcon(LogBytesPerLong)) );
+  countx = _gvn.transform( new (C) SubXNode(countx, MakeConX(dest_off)) );
+  countx = _gvn.transform( new (C) URShiftXNode(countx, intcon(LogBytesPerLong)) );
 
   bool disjoint_bases = true;   // since alloc != NULL
   generate_unchecked_arraycopy(adr_type, T_LONG, disjoint_bases,
@@ -5382,7 +5496,7 @@ LibraryCallKit::generate_checkcast_arraycopy(const TypePtr* adr_type,
   // super_check_offset, for the desired klass.
   int sco_offset = in_bytes(Klass::super_check_offset_offset());
   Node* p3 = basic_plus_adr(dest_elem_klass, sco_offset);
-  Node* n3 = new(C, 3) LoadINode(NULL, memory(p3), p3, _gvn.type(p3)->is_ptr());
+  Node* n3 = new(C) LoadINode(NULL, memory(p3), p3, _gvn.type(p3)->is_ptr());
   Node* check_offset = ConvI2X(_gvn.transform(n3));
   Node* check_value  = dest_elem_klass;
 
@@ -5400,7 +5514,7 @@ LibraryCallKit::generate_checkcast_arraycopy(const TypePtr* adr_type,
                                  check_offset XTOP,
                                  check_value);
 
-  return _gvn.transform(new (C, 1) ProjNode(call, TypeFunc::Parms));
+  return _gvn.transform(new (C) ProjNode(call, TypeFunc::Parms));
 }
 
 
@@ -5422,7 +5536,7 @@ LibraryCallKit::generate_generic_arraycopy(const TypePtr* adr_type,
                     copyfunc_addr, "generic_arraycopy", adr_type,
                     src, src_offset, dest, dest_offset, copy_length);
 
-  return _gvn.transform(new (C, 1) ProjNode(call, TypeFunc::Parms));
+  return _gvn.transform(new (C) ProjNode(call, TypeFunc::Parms));
 }
 
 // Helper function; generates the fast out-of-line call to an arraycopy stub.
diff --git a/hotspot/src/share/vm/opto/live.cpp b/hotspot/src/share/vm/opto/live.cpp
index cdeed3b1f6e..5da41891583 100644
--- a/hotspot/src/share/vm/opto/live.cpp
+++ b/hotspot/src/share/vm/opto/live.cpp
@@ -331,6 +331,7 @@ void PhaseChaitin::verify_base_ptrs( ResourceArea *a ) const {
 #ifdef _LP64
                       UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_CastPP ||
                       UseCompressedOops && check->as_Mach()->ideal_Opcode() == Op_DecodeN ||
+                      UseCompressedKlassPointers && check->as_Mach()->ideal_Opcode() == Op_DecodeNKlass ||
 #endif
                       check->as_Mach()->ideal_Opcode() == Op_LoadP ||
                       check->as_Mach()->ideal_Opcode() == Op_LoadKlass)) {
diff --git a/hotspot/src/share/vm/opto/locknode.cpp b/hotspot/src/share/vm/opto/locknode.cpp
index 4147ed33dc7..1e6a6c20c84 100644
--- a/hotspot/src/share/vm/opto/locknode.cpp
+++ b/hotspot/src/share/vm/opto/locknode.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/opto/locknode.hpp b/hotspot/src/share/vm/opto/locknode.hpp
index 91b99bc0052..b11486590a9 100644
--- a/hotspot/src/share/vm/opto/locknode.hpp
+++ b/hotspot/src/share/vm/opto/locknode.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/opto/loopPredicate.cpp b/hotspot/src/share/vm/opto/loopPredicate.cpp
index 048cba894f3..a9867a5ee8a 100644
--- a/hotspot/src/share/vm/opto/loopPredicate.cpp
+++ b/hotspot/src/share/vm/opto/loopPredicate.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -159,7 +159,7 @@ ProjNode* PhaseIdealLoop::create_new_if_for_predicate(ProjNode* cont_proj, Node*
     assert(rgn->is_Call(), "must be call uct");
     CallNode* call = rgn->as_Call();
     IdealLoopTree* loop = get_loop(call);
-    rgn = new (C, 1) RegionNode(1);
+    rgn = new (C) RegionNode(1);
     rgn->add_req(uncommon_proj);
     register_control(rgn, loop, uncommon_proj);
     _igvn.hash_delete(call);
@@ -185,8 +185,8 @@ ProjNode* PhaseIdealLoop::create_new_if_for_predicate(ProjNode* cont_proj, Node*
   IfNode *new_iff = iff->clone()->as_If();
   new_iff->set_req(0, entry);
   register_control(new_iff, lp, entry);
-  Node *if_cont = new (C, 1) IfTrueNode(new_iff);
-  Node *if_uct  = new (C, 1) IfFalseNode(new_iff);
+  Node *if_cont = new (C) IfTrueNode(new_iff);
+  Node *if_uct  = new (C) IfFalseNode(new_iff);
   if (cont_proj->is_IfFalse()) {
     // Swap
     Node* tmp = if_uct; if_uct = if_cont; if_cont = tmp;
@@ -246,7 +246,7 @@ ProjNode* PhaseIterGVN::create_new_if_for_predicate(ProjNode* cont_proj, Node* n
   if (!rgn->is_Region()) { // create a region to guard the call
     assert(rgn->is_Call(), "must be call uct");
     CallNode* call = rgn->as_Call();
-    rgn = new (C, 1) RegionNode(1);
+    rgn = new (C) RegionNode(1);
     register_new_node_with_optimizer(rgn);
     rgn->add_req(uncommon_proj);
     hash_delete(call);
@@ -263,8 +263,8 @@ ProjNode* PhaseIterGVN::create_new_if_for_predicate(ProjNode* cont_proj, Node* n
   new_iff->set_req(0, new_entry);
 
   register_new_node_with_optimizer(new_iff);
-  Node *if_cont = new (C, 1) IfTrueNode(new_iff);
-  Node *if_uct  = new (C, 1) IfFalseNode(new_iff);
+  Node *if_cont = new (C) IfTrueNode(new_iff);
+  Node *if_uct  = new (C) IfFalseNode(new_iff);
   if (cont_proj->is_IfFalse()) {
     // Swap
     Node* tmp = if_uct; if_uct = if_cont; if_cont = tmp;
@@ -309,10 +309,10 @@ ProjNode* PhaseIdealLoop::clone_predicate(ProjNode* predicate_proj, Node* new_en
 
   // Match original condition since predicate's projections could be swapped.
   assert(predicate_proj->in(0)->in(1)->in(1)->Opcode()==Op_Opaque1, "must be");
-  Node* opq = new (igvn->C, 2) Opaque1Node(igvn->C, predicate_proj->in(0)->in(1)->in(1)->in(1));
+  Node* opq = new (igvn->C) Opaque1Node(igvn->C, predicate_proj->in(0)->in(1)->in(1)->in(1));
   igvn->C->add_predicate_opaq(opq);
 
-  Node* bol = new (igvn->C, 2) Conv2BNode(opq);
+  Node* bol = new (igvn->C) Conv2BNode(opq);
   if (loop_phase != NULL) {
     loop_phase->register_new_node(opq, ctrl);
     loop_phase->register_new_node(bol, ctrl);
@@ -660,11 +660,11 @@ BoolNode* PhaseIdealLoop::rc_predicate(IdealLoopTree *loop, Node* ctrl,
       // Calculate exact limit here.
       // Note, counted loop's test is '<' or '>'.
       limit = exact_limit(loop);
-      max_idx_expr = new (C, 3) SubINode(limit, stride);
+      max_idx_expr = new (C) SubINode(limit, stride);
       register_new_node(max_idx_expr, ctrl);
       if (TraceLoopPredicate) predString->print("(limit - stride) ");
     } else {
-      max_idx_expr = new (C, 3) SubINode(limit, stride);
+      max_idx_expr = new (C) SubINode(limit, stride);
       register_new_node(max_idx_expr, ctrl);
       if (TraceLoopPredicate) predString->print("(limit - stride) ");
     }
@@ -674,22 +674,22 @@ BoolNode* PhaseIdealLoop::rc_predicate(IdealLoopTree *loop, Node* ctrl,
 
   if (scale != 1) {
     ConNode* con_scale = _igvn.intcon(scale);
-    max_idx_expr = new (C, 3) MulINode(max_idx_expr, con_scale);
+    max_idx_expr = new (C) MulINode(max_idx_expr, con_scale);
     register_new_node(max_idx_expr, ctrl);
     if (TraceLoopPredicate) predString->print("* %d ", scale);
   }
 
   if (offset && (!offset->is_Con() || offset->get_int() != 0)){
-    max_idx_expr = new (C, 3) AddINode(max_idx_expr, offset);
+    max_idx_expr = new (C) AddINode(max_idx_expr, offset);
     register_new_node(max_idx_expr, ctrl);
     if (TraceLoopPredicate)
       if (offset->is_Con()) predString->print("+ %d ", offset->get_int());
       else predString->print("+ offset ");
   }
 
-  CmpUNode* cmp = new (C, 3) CmpUNode(max_idx_expr, range);
+  CmpUNode* cmp = new (C) CmpUNode(max_idx_expr, range);
   register_new_node(cmp, ctrl);
-  BoolNode* bol = new (C, 2) BoolNode(cmp, BoolTest::lt);
+  BoolNode* bol = new (C) BoolNode(cmp, BoolTest::lt);
   register_new_node(bol, ctrl);
 
   if (TraceLoopPredicate) {
@@ -805,7 +805,7 @@ bool PhaseIdealLoop::loop_predication_impl(IdealLoopTree *loop) {
       // Negate test if necessary
       bool negated = false;
       if (proj->_con != predicate_proj->_con) {
-        new_predicate_bol = new (C, 2) BoolNode(new_predicate_bol->in(1), new_predicate_bol->_test.negate());
+        new_predicate_bol = new (C) BoolNode(new_predicate_bol->in(1), new_predicate_bol->_test.negate());
         register_new_node(new_predicate_bol, ctrl);
         negated = true;
       }
diff --git a/hotspot/src/share/vm/opto/loopTransform.cpp b/hotspot/src/share/vm/opto/loopTransform.cpp
index 8d88242ffe3..b8b1a57a9fc 100644
--- a/hotspot/src/share/vm/opto/loopTransform.cpp
+++ b/hotspot/src/share/vm/opto/loopTransform.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -92,10 +92,10 @@ void IdealLoopTree::compute_exact_trip_count( PhaseIdealLoop *phase ) {
       limit_n != NULL && limit_n->is_Con()) {
     // Use longs to avoid integer overflow.
     int stride_con  = cl->stride_con();
-    long init_con   = cl->init_trip()->get_int();
-    long limit_con  = cl->limit()->get_int();
+    jlong init_con   = cl->init_trip()->get_int();
+    jlong limit_con  = cl->limit()->get_int();
     int stride_m    = stride_con - (stride_con > 0 ? 1 : -1);
-    long trip_count = (limit_con - init_con + stride_m)/stride_con;
+    jlong trip_count = (limit_con - init_con + stride_m)/stride_con;
     if (trip_count > 0 && (julong)trip_count < (julong)max_juint) {
       // Set exact trip count.
       cl->set_exact_trip_count((uint)trip_count);
@@ -224,24 +224,24 @@ Node* IdealLoopTree::reassociate_add_sub(Node* n1, PhaseIdealLoop *phase) {
   if (neg_inv1) {
     Node *zero = phase->_igvn.intcon(0);
     phase->set_ctrl(zero, phase->C->root());
-    n_inv1 = new (phase->C, 3) SubINode(zero, inv1);
+    n_inv1 = new (phase->C) SubINode(zero, inv1);
     phase->register_new_node(n_inv1, inv1_c);
   } else {
     n_inv1 = inv1;
   }
   Node* inv;
   if (neg_inv2) {
-    inv = new (phase->C, 3) SubINode(n_inv1, inv2);
+    inv = new (phase->C) SubINode(n_inv1, inv2);
   } else {
-    inv = new (phase->C, 3) AddINode(n_inv1, inv2);
+    inv = new (phase->C) AddINode(n_inv1, inv2);
   }
   phase->register_new_node(inv, phase->get_early_ctrl(inv));
 
   Node* addx;
   if (neg_x) {
-    addx = new (phase->C, 3) SubINode(inv, x);
+    addx = new (phase->C) SubINode(inv, x);
   } else {
-    addx = new (phase->C, 3) AddINode(x, inv);
+    addx = new (phase->C) AddINode(x, inv);
   }
   phase->register_new_node(addx, phase->get_ctrl(x));
   phase->_igvn.replace_node(n1, addx);
@@ -932,7 +932,7 @@ void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_
   post_end->_prob = PROB_FAIR;
 
   // Build the main-loop normal exit.
-  IfFalseNode *new_main_exit = new (C, 1) IfFalseNode(main_end);
+  IfFalseNode *new_main_exit = new (C) IfFalseNode(main_end);
   _igvn.register_new_node_with_optimizer( new_main_exit );
   set_idom(new_main_exit, main_end, dd_main_exit );
   set_loop(new_main_exit, loop->_parent);
@@ -942,15 +942,15 @@ void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_
   // (the main-loop trip-counter exit value) because we will be changing
   // the exit value (via unrolling) so we cannot constant-fold away the zero
   // trip guard until all unrolling is done.
-  Node *zer_opaq = new (C, 2) Opaque1Node(C, incr);
-  Node *zer_cmp  = new (C, 3) CmpINode( zer_opaq, limit );
-  Node *zer_bol  = new (C, 2) BoolNode( zer_cmp, b_test );
+  Node *zer_opaq = new (C) Opaque1Node(C, incr);
+  Node *zer_cmp  = new (C) CmpINode( zer_opaq, limit );
+  Node *zer_bol  = new (C) BoolNode( zer_cmp, b_test );
   register_new_node( zer_opaq, new_main_exit );
   register_new_node( zer_cmp , new_main_exit );
   register_new_node( zer_bol , new_main_exit );
 
   // Build the IfNode
-  IfNode *zer_iff = new (C, 2) IfNode( new_main_exit, zer_bol, PROB_FAIR, COUNT_UNKNOWN );
+  IfNode *zer_iff = new (C) IfNode( new_main_exit, zer_bol, PROB_FAIR, COUNT_UNKNOWN );
   _igvn.register_new_node_with_optimizer( zer_iff );
   set_idom(zer_iff, new_main_exit, dd_main_exit);
   set_loop(zer_iff, loop->_parent);
@@ -960,7 +960,7 @@ void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_
   set_idom(main_exit, zer_iff, dd_main_exit);
   set_idom(main_exit->unique_out(), zer_iff, dd_main_exit);
   // Make the true-path, must enter the post loop
-  Node *zer_taken = new (C, 1) IfTrueNode( zer_iff );
+  Node *zer_taken = new (C) IfTrueNode( zer_iff );
   _igvn.register_new_node_with_optimizer( zer_taken );
   set_idom(zer_taken, zer_iff, dd_main_exit);
   set_loop(zer_taken, loop->_parent);
@@ -1008,7 +1008,7 @@ void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_
   // Find the pre-loop normal exit.
   Node* pre_exit = pre_end->proj_out(false);
   assert( pre_exit->Opcode() == Op_IfFalse, "" );
-  IfFalseNode *new_pre_exit = new (C, 1) IfFalseNode(pre_end);
+  IfFalseNode *new_pre_exit = new (C) IfFalseNode(pre_end);
   _igvn.register_new_node_with_optimizer( new_pre_exit );
   set_idom(new_pre_exit, pre_end, dd_main_head);
   set_loop(new_pre_exit, loop->_parent);
@@ -1017,15 +1017,15 @@ void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_
   // pre-loop, the main-loop may not execute at all.  Later in life this
   // zero-trip guard will become the minimum-trip guard when we unroll
   // the main-loop.
-  Node *min_opaq = new (C, 2) Opaque1Node(C, limit);
-  Node *min_cmp  = new (C, 3) CmpINode( pre_incr, min_opaq );
-  Node *min_bol  = new (C, 2) BoolNode( min_cmp, b_test );
+  Node *min_opaq = new (C) Opaque1Node(C, limit);
+  Node *min_cmp  = new (C) CmpINode( pre_incr, min_opaq );
+  Node *min_bol  = new (C) BoolNode( min_cmp, b_test );
   register_new_node( min_opaq, new_pre_exit );
   register_new_node( min_cmp , new_pre_exit );
   register_new_node( min_bol , new_pre_exit );
 
   // Build the IfNode (assume the main-loop is executed always).
-  IfNode *min_iff = new (C, 2) IfNode( new_pre_exit, min_bol, PROB_ALWAYS, COUNT_UNKNOWN );
+  IfNode *min_iff = new (C) IfNode( new_pre_exit, min_bol, PROB_ALWAYS, COUNT_UNKNOWN );
   _igvn.register_new_node_with_optimizer( min_iff );
   set_idom(min_iff, new_pre_exit, dd_main_head);
   set_loop(min_iff, loop->_parent);
@@ -1036,7 +1036,7 @@ void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_
   set_idom(pre_exit, min_iff, dd_main_head);
   set_idom(pre_exit->unique_out(), min_iff, dd_main_head);
   // Make the true-path, must enter the main loop
-  Node *min_taken = new (C, 1) IfTrueNode( min_iff );
+  Node *min_taken = new (C) IfTrueNode( min_iff );
   _igvn.register_new_node_with_optimizer( min_taken );
   set_idom(min_taken, min_iff, dd_main_head);
   set_loop(min_taken, loop->_parent);
@@ -1066,11 +1066,11 @@ void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_
   // RCE and alignment may change this later.
   Node *cmp_end = pre_end->cmp_node();
   assert( cmp_end->in(2) == limit, "" );
-  Node *pre_limit = new (C, 3) AddINode( init, stride );
+  Node *pre_limit = new (C) AddINode( init, stride );
 
   // Save the original loop limit in this Opaque1 node for
   // use by range check elimination.
-  Node *pre_opaq  = new (C, 3) Opaque1Node(C, pre_limit, limit);
+  Node *pre_opaq  = new (C) Opaque1Node(C, pre_limit, limit);
 
   register_new_node( pre_limit, pre_head->in(0) );
   register_new_node( pre_opaq , pre_head->in(0) );
@@ -1095,19 +1095,19 @@ void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_
     BoolTest::mask new_test = (main_end->stride_con() > 0) ? BoolTest::lt : BoolTest::gt;
     // Modify pre loop end condition
     Node* pre_bol = pre_end->in(CountedLoopEndNode::TestValue)->as_Bool();
-    BoolNode* new_bol0 = new (C, 2) BoolNode(pre_bol->in(1), new_test);
+    BoolNode* new_bol0 = new (C) BoolNode(pre_bol->in(1), new_test);
     register_new_node( new_bol0, pre_head->in(0) );
     _igvn.hash_delete(pre_end);
     pre_end->set_req(CountedLoopEndNode::TestValue, new_bol0);
     // Modify main loop guard condition
     assert(min_iff->in(CountedLoopEndNode::TestValue) == min_bol, "guard okay");
-    BoolNode* new_bol1 = new (C, 2) BoolNode(min_bol->in(1), new_test);
+    BoolNode* new_bol1 = new (C) BoolNode(min_bol->in(1), new_test);
     register_new_node( new_bol1, new_pre_exit );
     _igvn.hash_delete(min_iff);
     min_iff->set_req(CountedLoopEndNode::TestValue, new_bol1);
     // Modify main loop end condition
     BoolNode* main_bol = main_end->in(CountedLoopEndNode::TestValue)->as_Bool();
-    BoolNode* new_bol2 = new (C, 2) BoolNode(main_bol->in(1), new_test);
+    BoolNode* new_bol2 = new (C) BoolNode(main_bol->in(1), new_test);
     register_new_node( new_bol2, main_end->in(CountedLoopEndNode::TestControl) );
     _igvn.hash_delete(main_end);
     main_end->set_req(CountedLoopEndNode::TestValue, new_bol2);
@@ -1212,16 +1212,16 @@ void PhaseIdealLoop::do_unroll( IdealLoopTree *loop, Node_List &old_new, bool ad
     } else if (loop_head->has_exact_trip_count() && init->is_Con()) {
       // Loop's limit is constant. Loop's init could be constant when pre-loop
       // become peeled iteration.
-      long init_con = init->get_int();
+      jlong init_con = init->get_int();
       // We can keep old loop limit if iterations count stays the same:
       //   old_trip_count == new_trip_count * 2
       // Note: since old_trip_count >= 2 then new_trip_count >= 1
       // so we also don't need to adjust zero trip test.
-      long limit_con  = limit->get_int();
+      jlong limit_con  = limit->get_int();
       // (stride_con*2) not overflow since stride_con <= 8.
       int new_stride_con = stride_con * 2;
       int stride_m    = new_stride_con - (stride_con > 0 ? 1 : -1);
-      long trip_count = (limit_con - init_con + stride_m)/new_stride_con;
+      jlong trip_count = (limit_con - init_con + stride_m)/new_stride_con;
       // New trip count should satisfy next conditions.
       assert(trip_count > 0 && (julong)trip_count < (julong)max_juint/2, "sanity");
       uint new_trip_count = (uint)trip_count;
@@ -1257,13 +1257,13 @@ void PhaseIdealLoop::do_unroll( IdealLoopTree *loop, Node_List &old_new, bool ad
           // zero trip guard limit will be different from loop limit.
           assert(has_ctrl(opaq), "should have it");
           Node* opaq_ctrl = get_ctrl(opaq);
-          limit = new (C, 2) Opaque2Node( C, limit );
+          limit = new (C) Opaque2Node( C, limit );
           register_new_node( limit, opaq_ctrl );
         }
         if (stride_con > 0 && ((limit_type->_lo - stride_con) < limit_type->_lo) ||
                    stride_con < 0 && ((limit_type->_hi - stride_con) > limit_type->_hi)) {
           // No underflow.
-          new_limit = new (C, 3) SubINode(limit, stride);
+          new_limit = new (C) SubINode(limit, stride);
         } else {
           // (limit - stride) may underflow.
           // Clamp the adjustment value with MININT or MAXINT:
@@ -1293,18 +1293,18 @@ void PhaseIdealLoop::do_unroll( IdealLoopTree *loop, Node_List &old_new, bool ad
             old_limit = bol->in(1)->in(1);
             // Adjust previous adjusted limit.
             adj_limit = limit->in(CMoveNode::IfFalse);
-            adj_limit = new (C, 3) SubINode(adj_limit, stride);
+            adj_limit = new (C) SubINode(adj_limit, stride);
           } else {
             old_limit = limit;
-            adj_limit = new (C, 3) SubINode(limit, stride);
+            adj_limit = new (C) SubINode(limit, stride);
           }
           assert(old_limit != NULL && adj_limit != NULL, "");
           register_new_node( adj_limit, ctrl ); // adjust amount
-          Node* adj_cmp = new (C, 3) CmpINode(old_limit, adj_limit);
+          Node* adj_cmp = new (C) CmpINode(old_limit, adj_limit);
           register_new_node( adj_cmp, ctrl );
-          Node* adj_bool = new (C, 2) BoolNode(adj_cmp, bt);
+          Node* adj_bool = new (C) BoolNode(adj_cmp, bt);
           register_new_node( adj_bool, ctrl );
-          new_limit = new (C, 4) CMoveINode(adj_bool, adj_limit, adj_max, TypeInt::INT);
+          new_limit = new (C) CMoveINode(adj_bool, adj_limit, adj_max, TypeInt::INT);
         }
         register_new_node(new_limit, ctrl);
       }
@@ -1366,24 +1366,24 @@ void PhaseIdealLoop::do_unroll( IdealLoopTree *loop, Node_List &old_new, bool ad
     // CountedLoop this is exact (stride divides limit-init exactly).
     // We are going to double the loop body, so we want to knock off any
     // odd iteration: (trip_cnt & ~1).  Then back compute a new limit.
-    Node *span = new (C, 3) SubINode( limit, init );
+    Node *span = new (C) SubINode( limit, init );
     register_new_node( span, ctrl );
-    Node *trip = new (C, 3) DivINode( 0, span, stride );
+    Node *trip = new (C) DivINode( 0, span, stride );
     register_new_node( trip, ctrl );
     Node *mtwo = _igvn.intcon(-2);
     set_ctrl(mtwo, C->root());
-    Node *rond = new (C, 3) AndINode( trip, mtwo );
+    Node *rond = new (C) AndINode( trip, mtwo );
     register_new_node( rond, ctrl );
-    Node *spn2 = new (C, 3) MulINode( rond, stride );
+    Node *spn2 = new (C) MulINode( rond, stride );
     register_new_node( spn2, ctrl );
-    new_limit = new (C, 3) AddINode( spn2, init );
+    new_limit = new (C) AddINode( spn2, init );
     register_new_node( new_limit, ctrl );
 
     // Hammer in the new limit
     Node *ctrl2 = loop_end->in(0);
-    Node *cmp2 = new (C, 3) CmpINode( loop_head->incr(), new_limit );
+    Node *cmp2 = new (C) CmpINode( loop_head->incr(), new_limit );
     register_new_node( cmp2, ctrl2 );
-    Node *bol2 = new (C, 2) BoolNode( cmp2, loop_end->test_trip() );
+    Node *bol2 = new (C) BoolNode( cmp2, loop_end->test_trip() );
     register_new_node( bol2, ctrl2 );
     _igvn.hash_delete(loop_end);
     loop_end->set_req(CountedLoopEndNode::TestValue, bol2);
@@ -1489,15 +1489,15 @@ bool IdealLoopTree::dominates_backedge(Node* ctrl) {
 // Helper function for add_constraint().
 Node* PhaseIdealLoop::adjust_limit(int stride_con, Node * scale, Node *offset, Node *rc_limit, Node *loop_limit, Node *pre_ctrl) {
   // Compute "I :: (limit-offset)/scale"
-  Node *con = new (C, 3) SubINode(rc_limit, offset);
+  Node *con = new (C) SubINode(rc_limit, offset);
   register_new_node(con, pre_ctrl);
-  Node *X = new (C, 3) DivINode(0, con, scale);
+  Node *X = new (C) DivINode(0, con, scale);
   register_new_node(X, pre_ctrl);
 
   // Adjust loop limit
   loop_limit = (stride_con > 0)
-               ? (Node*)(new (C, 3) MinINode(loop_limit, X))
-               : (Node*)(new (C, 3) MaxINode(loop_limit, X));
+               ? (Node*)(new (C) MinINode(loop_limit, X))
+               : (Node*)(new (C) MaxINode(loop_limit, X));
   register_new_node(loop_limit, pre_ctrl);
   return loop_limit;
 }
@@ -1558,9 +1558,9 @@ void PhaseIdealLoop::add_constraint( int stride_con, int scale_con, Node *offset
       // to avoid problem with scale == -1 (min_int/(-1) == min_int).
       Node* shift = _igvn.intcon(31);
       set_ctrl(shift, C->root());
-      Node* sign = new (C, 3) RShiftINode(offset, shift);
+      Node* sign = new (C) RShiftINode(offset, shift);
       register_new_node(sign, pre_ctrl);
-      offset = new (C, 3) AndINode(offset, sign);
+      offset = new (C) AndINode(offset, sign);
       register_new_node(offset, pre_ctrl);
     } else {
       assert(low_limit->get_int() == 0, "wrong low limit for range check");
@@ -1593,7 +1593,7 @@ void PhaseIdealLoop::add_constraint( int stride_con, int scale_con, Node *offset
     Node *one  = _igvn.intcon(1);
     set_ctrl(one, C->root());
 
-    Node *plus_one = new (C, 3) AddINode(offset, one);
+    Node *plus_one = new (C) AddINode(offset, one);
     register_new_node( plus_one, pre_ctrl );
     // Pass (-stride) to indicate pre_loop_cond = NOT(main_loop_cond);
     *pre_limit = adjust_limit((-stride_con), scale, plus_one, upper_limit, *pre_limit, pre_ctrl);
@@ -1611,9 +1611,9 @@ void PhaseIdealLoop::add_constraint( int stride_con, int scale_con, Node *offset
       // to avoid problem with scale == -1 (min_int/(-1) == min_int).
       Node* shift = _igvn.intcon(31);
       set_ctrl(shift, C->root());
-      Node* sign = new (C, 3) RShiftINode(plus_one, shift);
+      Node* sign = new (C) RShiftINode(plus_one, shift);
       register_new_node(sign, pre_ctrl);
-      plus_one = new (C, 3) AndINode(plus_one, sign);
+      plus_one = new (C) AndINode(plus_one, sign);
       register_new_node(plus_one, pre_ctrl);
     } else {
       assert(low_limit->get_int() == 0, "wrong low limit for range check");
@@ -1696,7 +1696,7 @@ bool PhaseIdealLoop::is_scaled_iv_plus_offset(Node* exp, Node* iv, int* p_scale,
                                    p_offset != NULL ? &offset2 : NULL, depth+1)) {
         if (p_offset != NULL) {
           Node *ctrl_off2 = get_ctrl(offset2);
-          Node* offset = new (C, 3) AddINode(offset2, exp->in(2));
+          Node* offset = new (C) AddINode(offset2, exp->in(2));
           register_new_node(offset, ctrl_off2);
           *p_offset = offset;
         }
@@ -1709,7 +1709,7 @@ bool PhaseIdealLoop::is_scaled_iv_plus_offset(Node* exp, Node* iv, int* p_scale,
         Node *zero = _igvn.intcon(0);
         set_ctrl(zero, C->root());
         Node *ctrl_off = get_ctrl(exp->in(2));
-        Node* offset = new (C, 3) SubINode(zero, exp->in(2));
+        Node* offset = new (C) SubINode(zero, exp->in(2));
         register_new_node(offset, ctrl_off);
         *p_offset = offset;
       }
@@ -1912,15 +1912,15 @@ void PhaseIdealLoop::do_range_check( IdealLoopTree *loop, Node_List &old_new ) {
         case BoolTest::ge:
           // Convert (I*scale+offset) >= Limit to (I*(-scale)+(-offset)) <= -Limit
           scale_con = -scale_con;
-          offset = new (C, 3) SubINode( zero, offset );
+          offset = new (C) SubINode( zero, offset );
           register_new_node( offset, pre_ctrl );
-          limit  = new (C, 3) SubINode( zero, limit  );
+          limit  = new (C) SubINode( zero, limit  );
           register_new_node( limit, pre_ctrl );
           // Fall into LE case
         case BoolTest::le:
           if (b_test._test != BoolTest::gt) {
             // Convert X <= Y to X < Y+1
-            limit = new (C, 3) AddINode( limit, one );
+            limit = new (C) AddINode( limit, one );
             register_new_node( limit, pre_ctrl );
           }
           // Fall into LT case
@@ -1971,8 +1971,8 @@ void PhaseIdealLoop::do_range_check( IdealLoopTree *loop, Node_List &old_new ) {
 
   // Update loop limits
   if (conditional_rc) {
-    pre_limit = (stride_con > 0) ? (Node*)new (C,3) MinINode(pre_limit, orig_limit)
-                                 : (Node*)new (C,3) MaxINode(pre_limit, orig_limit);
+    pre_limit = (stride_con > 0) ? (Node*)new (C) MinINode(pre_limit, orig_limit)
+                                 : (Node*)new (C) MaxINode(pre_limit, orig_limit);
     register_new_node(pre_limit, pre_ctrl);
   }
   _igvn.hash_delete(pre_opaq);
@@ -1987,16 +1987,16 @@ void PhaseIdealLoop::do_range_check( IdealLoopTree *loop, Node_List &old_new ) {
     Node *ctrl = get_ctrl(main_limit);
     Node *stride = cl->stride();
     Node *init = cl->init_trip();
-    Node *span = new (C, 3) SubINode(main_limit,init);
+    Node *span = new (C) SubINode(main_limit,init);
     register_new_node(span,ctrl);
     Node *rndup = _igvn.intcon(stride_con + ((stride_con>0)?-1:1));
-    Node *add = new (C, 3) AddINode(span,rndup);
+    Node *add = new (C) AddINode(span,rndup);
     register_new_node(add,ctrl);
-    Node *div = new (C, 3) DivINode(0,add,stride);
+    Node *div = new (C) DivINode(0,add,stride);
     register_new_node(div,ctrl);
-    Node *mul = new (C, 3) MulINode(div,stride);
+    Node *mul = new (C) MulINode(div,stride);
     register_new_node(mul,ctrl);
-    Node *newlim = new (C, 3) AddINode(mul,init);
+    Node *newlim = new (C) AddINode(mul,init);
     register_new_node(newlim,ctrl);
     main_limit = newlim;
   }
@@ -2167,7 +2167,7 @@ bool IdealLoopTree::policy_do_remove_empty_loop( PhaseIdealLoop *phase ) {
   }
   // Note: the final value after increment should not overflow since
   // counted loop has limit check predicate.
-  Node *final = new (phase->C, 3) SubINode( exact_limit, cl->stride() );
+  Node *final = new (phase->C) SubINode( exact_limit, cl->stride() );
   phase->register_new_node(final,cl->in(LoopNode::EntryControl));
   phase->_igvn.replace_node(phi,final);
   phase->C->set_major_progress();
@@ -2413,7 +2413,7 @@ bool PhaseIdealLoop::match_fill_loop(IdealLoopTree* lpt, Node*& store, Node*& st
         break;
       }
       int opc = n->Opcode();
-      if (opc == Op_StoreP || opc == Op_StoreN || opc == Op_StoreCM) {
+      if (opc == Op_StoreP || opc == Op_StoreN || opc == Op_StoreNKlass || opc == Op_StoreCM) {
         msg = "oop fills not handled";
         break;
       }
@@ -2651,20 +2651,20 @@ bool PhaseIdealLoop::intrinsify_fill(IdealLoopTree* lpt) {
   // Build an expression for the beginning of the copy region
   Node* index = head->init_trip();
 #ifdef _LP64
-  index = new (C, 2) ConvI2LNode(index);
+  index = new (C) ConvI2LNode(index);
   _igvn.register_new_node_with_optimizer(index);
 #endif
   if (shift != NULL) {
     // byte arrays don't require a shift but others do.
-    index = new (C, 3) LShiftXNode(index, shift->in(2));
+    index = new (C) LShiftXNode(index, shift->in(2));
     _igvn.register_new_node_with_optimizer(index);
   }
-  index = new (C, 4) AddPNode(base, base, index);
+  index = new (C) AddPNode(base, base, index);
   _igvn.register_new_node_with_optimizer(index);
-  Node* from = new (C, 4) AddPNode(base, index, offset);
+  Node* from = new (C) AddPNode(base, index, offset);
   _igvn.register_new_node_with_optimizer(from);
   // Compute the number of elements to copy
-  Node* len = new (C, 3) SubINode(head->limit(), head->init_trip());
+  Node* len = new (C) SubINode(head->limit(), head->init_trip());
   _igvn.register_new_node_with_optimizer(len);
 
   BasicType t = store->as_Mem()->memory_type();
@@ -2681,10 +2681,10 @@ bool PhaseIdealLoop::intrinsify_fill(IdealLoopTree* lpt) {
 
   // Convert float/double to int/long for fill routines
   if (t == T_FLOAT) {
-    store_value = new (C, 2) MoveF2INode(store_value);
+    store_value = new (C) MoveF2INode(store_value);
     _igvn.register_new_node_with_optimizer(store_value);
   } else if (t == T_DOUBLE) {
-    store_value = new (C, 2) MoveD2LNode(store_value);
+    store_value = new (C) MoveD2LNode(store_value);
     _igvn.register_new_node_with_optimizer(store_value);
   }
 
@@ -2692,13 +2692,12 @@ bool PhaseIdealLoop::intrinsify_fill(IdealLoopTree* lpt) {
   Node* result_ctrl;
   Node* result_mem;
   const TypeFunc* call_type = OptoRuntime::array_fill_Type();
-  int size = call_type->domain()->cnt();
-  CallLeafNode *call = new (C, size) CallLeafNoFPNode(call_type, fill,
-                                                      fill_name, TypeAryPtr::get_array_body_type(t));
+  CallLeafNode *call = new (C) CallLeafNoFPNode(call_type, fill,
+                                                fill_name, TypeAryPtr::get_array_body_type(t));
   call->init_req(TypeFunc::Parms+0, from);
   call->init_req(TypeFunc::Parms+1, store_value);
 #ifdef _LP64
-  len = new (C, 2) ConvI2LNode(len);
+  len = new (C) ConvI2LNode(len);
   _igvn.register_new_node_with_optimizer(len);
 #endif
   call->init_req(TypeFunc::Parms+2, len);
@@ -2711,9 +2710,9 @@ bool PhaseIdealLoop::intrinsify_fill(IdealLoopTree* lpt) {
   call->init_req( TypeFunc::ReturnAdr, C->start()->proj_out(TypeFunc::ReturnAdr) );
   call->init_req( TypeFunc::FramePtr, C->start()->proj_out(TypeFunc::FramePtr) );
   _igvn.register_new_node_with_optimizer(call);
-  result_ctrl = new (C, 1) ProjNode(call,TypeFunc::Control);
+  result_ctrl = new (C) ProjNode(call,TypeFunc::Control);
   _igvn.register_new_node_with_optimizer(result_ctrl);
-  result_mem = new (C, 1) ProjNode(call,TypeFunc::Memory);
+  result_mem = new (C) ProjNode(call,TypeFunc::Memory);
   _igvn.register_new_node_with_optimizer(result_mem);
 
   // If this fill is tightly coupled to an allocation and overwrites
diff --git a/hotspot/src/share/vm/opto/loopUnswitch.cpp b/hotspot/src/share/vm/opto/loopUnswitch.cpp
index 47e3990fd15..fc3380f4909 100644
--- a/hotspot/src/share/vm/opto/loopUnswitch.cpp
+++ b/hotspot/src/share/vm/opto/loopUnswitch.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -223,15 +223,15 @@ ProjNode* PhaseIdealLoop::create_slow_version_of_loop(IdealLoopTree *loop,
 
   Node *cont      = _igvn.intcon(1);
   set_ctrl(cont, C->root());
-  Node* opq       = new (C, 2) Opaque1Node(C, cont);
+  Node* opq       = new (C) Opaque1Node(C, cont);
   register_node(opq, outer_loop, entry, dom_depth(entry));
-  Node *bol       = new (C, 2) Conv2BNode(opq);
+  Node *bol       = new (C) Conv2BNode(opq);
   register_node(bol, outer_loop, entry, dom_depth(entry));
-  IfNode* iff = new (C, 2) IfNode(entry, bol, PROB_MAX, COUNT_UNKNOWN);
+  IfNode* iff = new (C) IfNode(entry, bol, PROB_MAX, COUNT_UNKNOWN);
   register_node(iff, outer_loop, entry, dom_depth(entry));
-  ProjNode* iffast = new (C, 1) IfTrueNode(iff);
+  ProjNode* iffast = new (C) IfTrueNode(iff);
   register_node(iffast, outer_loop, iff, dom_depth(iff));
-  ProjNode* ifslow = new (C, 1) IfFalseNode(iff);
+  ProjNode* ifslow = new (C) IfFalseNode(iff);
   register_node(ifslow, outer_loop, iff, dom_depth(iff));
 
   // Clone the loop body.  The clone becomes the fast loop.  The
diff --git a/hotspot/src/share/vm/opto/loopnode.cpp b/hotspot/src/share/vm/opto/loopnode.cpp
index 511cca449f7..a483f018019 100644
--- a/hotspot/src/share/vm/opto/loopnode.cpp
+++ b/hotspot/src/share/vm/opto/loopnode.cpp
@@ -328,12 +328,12 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
   const TypeInt* limit_t = gvn->type(limit)->is_int();
 
   if (stride_con > 0) {
-    long init_p = (long)init_t->_lo + stride_con;
-    if (init_p > (long)max_jint || init_p > (long)limit_t->_hi)
+    jlong init_p = (jlong)init_t->_lo + stride_con;
+    if (init_p > (jlong)max_jint || init_p > (jlong)limit_t->_hi)
       return false; // cyclic loop or this loop trips only once
   } else {
-    long init_p = (long)init_t->_hi + stride_con;
-    if (init_p < (long)min_jint || init_p < (long)limit_t->_lo)
+    jlong init_p = (jlong)init_t->_hi + stride_con;
+    if (init_p < (jlong)min_jint || init_p < (jlong)limit_t->_lo)
       return false; // cyclic loop or this loop trips only once
   }
 
@@ -343,7 +343,7 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
   assert(x->Opcode() == Op_Loop, "regular loops only");
   C->print_method("Before CountedLoop", 3);
 
-  Node *hook = new (C, 6) Node(6);
+  Node *hook = new (C) Node(6);
 
   if (LoopLimitCheck) {
 
@@ -406,11 +406,11 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
     Node* bol;
 
     if (stride_con > 0) {
-      cmp_limit = new (C, 3) CmpINode(limit, _igvn.intcon(max_jint - stride_m));
-      bol = new (C, 2) BoolNode(cmp_limit, BoolTest::le);
+      cmp_limit = new (C) CmpINode(limit, _igvn.intcon(max_jint - stride_m));
+      bol = new (C) BoolNode(cmp_limit, BoolTest::le);
     } else {
-      cmp_limit = new (C, 3) CmpINode(limit, _igvn.intcon(min_jint - stride_m));
-      bol = new (C, 2) BoolNode(cmp_limit, BoolTest::ge);
+      cmp_limit = new (C) CmpINode(limit, _igvn.intcon(min_jint - stride_m));
+      bol = new (C) BoolNode(cmp_limit, BoolTest::ge);
     }
     cmp_limit = _igvn.register_new_node_with_optimizer(cmp_limit);
     bol = _igvn.register_new_node_with_optimizer(bol);
@@ -447,7 +447,7 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
     // is converted to
     //   i = init; do {} while(++i < limit+1);
     //
-    limit = gvn->transform(new (C, 3) AddINode(limit, stride));
+    limit = gvn->transform(new (C) AddINode(limit, stride));
   }
 
   // Now we need to canonicalize loop condition.
@@ -466,7 +466,7 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
     // we can convert 'i <= limit' to 'i < limit+1' since stride != 0.
     //
     Node* one = (stride_con > 0) ? gvn->intcon( 1) : gvn->intcon(-1);
-    limit = gvn->transform(new (C, 3) AddINode(limit, one));
+    limit = gvn->transform(new (C) AddINode(limit, one));
     if (bt == BoolTest::le)
       bt = BoolTest::lt;
     else if (bt == BoolTest::ge)
@@ -482,7 +482,7 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
   // can directly point to the phi; in this case adjust the compare so that
   // it points to the incr by adjusting the limit.
   if (cmp->in(1) == phi || cmp->in(2) == phi)
-    limit = gvn->transform(new (C, 3) AddINode(limit,stride));
+    limit = gvn->transform(new (C) AddINode(limit,stride));
 
   // trip-count for +-tive stride should be: (limit - init_trip + stride - 1)/stride.
   // Final value for iterator should be: trip_count * stride + init_trip.
@@ -495,16 +495,16 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
     ShouldNotReachHere();
   case BoolTest::ne:            // Ahh, the case we desire
     if (stride_con == 1)
-      trip_count = gvn->transform(new (C, 3) SubINode(limit,init_trip));
+      trip_count = gvn->transform(new (C) SubINode(limit,init_trip));
     else if (stride_con == -1)
-      trip_count = gvn->transform(new (C, 3) SubINode(init_trip,limit));
+      trip_count = gvn->transform(new (C) SubINode(init_trip,limit));
     else
       ShouldNotReachHere();
     set_subtree_ctrl(trip_count);
     //_loop.map(trip_count->_idx,loop(limit));
     break;
   case BoolTest::le:            // Maybe convert to '<' case
-    limit = gvn->transform(new (C, 3) AddINode(limit,one_p));
+    limit = gvn->transform(new (C) AddINode(limit,one_p));
     set_subtree_ctrl( limit );
     hook->init_req(4, limit);
 
@@ -515,26 +515,26 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
   case BoolTest::lt: {          // Maybe convert to '!=' case
     if (stride_con < 0) // Count down loop rolls through MAXINT
       ShouldNotReachHere();
-    Node *range = gvn->transform(new (C, 3) SubINode(limit,init_trip));
+    Node *range = gvn->transform(new (C) SubINode(limit,init_trip));
     set_subtree_ctrl( range );
     hook->init_req(0, range);
 
-    Node *bias  = gvn->transform(new (C, 3) AddINode(range,stride));
+    Node *bias  = gvn->transform(new (C) AddINode(range,stride));
     set_subtree_ctrl( bias );
     hook->init_req(1, bias);
 
-    Node *bias1 = gvn->transform(new (C, 3) AddINode(bias,one_m));
+    Node *bias1 = gvn->transform(new (C) AddINode(bias,one_m));
     set_subtree_ctrl( bias1 );
     hook->init_req(2, bias1);
 
-    trip_count  = gvn->transform(new (C, 3) DivINode(0,bias1,stride));
+    trip_count  = gvn->transform(new (C) DivINode(0,bias1,stride));
     set_subtree_ctrl( trip_count );
     hook->init_req(3, trip_count);
     break;
   }
 
   case BoolTest::ge:            // Maybe convert to '>' case
-    limit = gvn->transform(new (C, 3) AddINode(limit,one_m));
+    limit = gvn->transform(new (C) AddINode(limit,one_m));
     set_subtree_ctrl( limit );
     hook->init_req(4 ,limit);
 
@@ -545,30 +545,30 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
   case BoolTest::gt: {          // Maybe convert to '!=' case
     if (stride_con > 0) // count up loop rolls through MININT
       ShouldNotReachHere();
-    Node *range = gvn->transform(new (C, 3) SubINode(limit,init_trip));
+    Node *range = gvn->transform(new (C) SubINode(limit,init_trip));
     set_subtree_ctrl( range );
     hook->init_req(0, range);
 
-    Node *bias  = gvn->transform(new (C, 3) AddINode(range,stride));
+    Node *bias  = gvn->transform(new (C) AddINode(range,stride));
     set_subtree_ctrl( bias );
     hook->init_req(1, bias);
 
-    Node *bias1 = gvn->transform(new (C, 3) AddINode(bias,one_p));
+    Node *bias1 = gvn->transform(new (C) AddINode(bias,one_p));
     set_subtree_ctrl( bias1 );
     hook->init_req(2, bias1);
 
-    trip_count  = gvn->transform(new (C, 3) DivINode(0,bias1,stride));
+    trip_count  = gvn->transform(new (C) DivINode(0,bias1,stride));
     set_subtree_ctrl( trip_count );
     hook->init_req(3, trip_count);
     break;
   }
   } // switch( bt )
 
-  Node *span = gvn->transform(new (C, 3) MulINode(trip_count,stride));
+  Node *span = gvn->transform(new (C) MulINode(trip_count,stride));
   set_subtree_ctrl( span );
   hook->init_req(5, span);
 
-  limit = gvn->transform(new (C, 3) AddINode(span,init_trip));
+  limit = gvn->transform(new (C) AddINode(span,init_trip));
   set_subtree_ctrl( limit );
 
   } // LoopLimitCheck
@@ -617,7 +617,7 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
   set_ctrl(test, iff->in(0));
 
   // Replace the old IfNode with a new LoopEndNode
-  Node *lex = _igvn.register_new_node_with_optimizer(new (C, 2) CountedLoopEndNode( iff->in(0), test, cl_prob, iff->as_If()->_fcnt ));
+  Node *lex = _igvn.register_new_node_with_optimizer(new (C) CountedLoopEndNode( iff->in(0), test, cl_prob, iff->as_If()->_fcnt ));
   IfNode *le = lex->as_If();
   uint dd = dom_depth(iff);
   set_idom(le, le->in(0), dd); // Update dominance for loop exit
@@ -628,8 +628,8 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
 
   // Need to swap loop-exit and loop-back control?
   if (iftrue_op == Op_IfFalse) {
-    Node *ift2=_igvn.register_new_node_with_optimizer(new (C, 1) IfTrueNode (le));
-    Node *iff2=_igvn.register_new_node_with_optimizer(new (C, 1) IfFalseNode(le));
+    Node *ift2=_igvn.register_new_node_with_optimizer(new (C) IfTrueNode (le));
+    Node *iff2=_igvn.register_new_node_with_optimizer(new (C) IfFalseNode(le));
 
     loop->_tail = back_control = ift2;
     set_loop(ift2, loop);
@@ -655,7 +655,7 @@ bool PhaseIdealLoop::is_counted_loop( Node *x, IdealLoopTree *loop ) {
   lazy_replace( iff, le ); // fix 'get_ctrl'
 
   // Now setup a new CountedLoopNode to replace the existing LoopNode
-  CountedLoopNode *l = new (C, 3) CountedLoopNode(init_control, back_control);
+  CountedLoopNode *l = new (C) CountedLoopNode(init_control, back_control);
   l->set_unswitch_count(x->as_Loop()->unswitch_count()); // Preserve
   // The following assert is approximately true, and defines the intention
   // of can_be_counted_loop.  It fails, however, because phase->type
@@ -716,20 +716,20 @@ Node* PhaseIdealLoop::exact_limit( IdealLoopTree *loop ) {
 #endif
   if (cl->has_exact_trip_count()) {
     // Simple case: loop has constant boundaries.
-    // Use longs to avoid integer overflow.
+    // Use jlongs to avoid integer overflow.
     int stride_con = cl->stride_con();
-    long  init_con = cl->init_trip()->get_int();
-    long limit_con = cl->limit()->get_int();
+    jlong  init_con = cl->init_trip()->get_int();
+    jlong limit_con = cl->limit()->get_int();
     julong trip_cnt = cl->trip_count();
-    long final_con = init_con + trip_cnt*stride_con;
+    jlong final_con = init_con + trip_cnt*stride_con;
     int final_int = (int)final_con;
     // The final value should be in integer range since the loop
     // is counted and the limit was checked for overflow.
-    assert(final_con == (long)final_int, "final value should be integer");
+    assert(final_con == (jlong)final_int, "final value should be integer");
     limit = _igvn.intcon(final_int);
   } else {
     // Create new LoopLimit node to get exact limit (final iv value).
-    limit = new (C, 4) LoopLimitNode(C, cl->init_trip(), cl->limit(), cl->stride());
+    limit = new (C) LoopLimitNode(C, cl->init_trip(), cl->limit(), cl->stride());
     register_new_node(limit, cl->in(LoopNode::EntryControl));
   }
   assert(limit != NULL, "sanity");
@@ -790,16 +790,16 @@ const Type *LoopLimitNode::Value( PhaseTransform *phase ) const {
     return NULL;  // Identity
 
   if (init_t->is_int()->is_con() && limit_t->is_int()->is_con()) {
-    // Use longs to avoid integer overflow.
-    long init_con   =  init_t->is_int()->get_con();
-    long limit_con  = limit_t->is_int()->get_con();
+    // Use jlongs to avoid integer overflow.
+    jlong init_con   =  init_t->is_int()->get_con();
+    jlong limit_con  = limit_t->is_int()->get_con();
     int  stride_m   = stride_con - (stride_con > 0 ? 1 : -1);
-    long trip_count = (limit_con - init_con + stride_m)/stride_con;
-    long final_con  = init_con + stride_con*trip_count;
+    jlong trip_count = (limit_con - init_con + stride_m)/stride_con;
+    jlong final_con  = init_con + stride_con*trip_count;
     int final_int = (int)final_con;
     // The final value should be in integer range since the loop
     // is counted and the limit was checked for overflow.
-    assert(final_con == (long)final_int, "final value should be integer");
+    assert(final_con == (jlong)final_int, "final value should be integer");
     return TypeInt::make(final_int);
   }
 
@@ -829,7 +829,7 @@ Node *LoopLimitNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   const TypeInt* init_t  = phase->type(in(Init) )->is_int();
   const TypeInt* limit_t = phase->type(in(Limit))->is_int();
   int stride_p;
-  long lim, ini;
+  jlong lim, ini;
   julong max;
   if (stride_con > 0) {
     stride_p = stride_con;
@@ -846,11 +846,11 @@ Node *LoopLimitNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   if (range <= max) {
     // Convert to integer expression if it is not overflow.
     Node* stride_m = phase->intcon(stride_con - (stride_con > 0 ? 1 : -1));
-    Node *range = phase->transform(new (phase->C, 3) SubINode(in(Limit), in(Init)));
-    Node *bias  = phase->transform(new (phase->C, 3) AddINode(range, stride_m));
-    Node *trip  = phase->transform(new (phase->C, 3) DivINode(0, bias, in(Stride)));
-    Node *span  = phase->transform(new (phase->C, 3) MulINode(trip, in(Stride)));
-    return new (phase->C, 3) AddINode(span, in(Init)); // exact limit
+    Node *range = phase->transform(new (phase->C) SubINode(in(Limit), in(Init)));
+    Node *bias  = phase->transform(new (phase->C) AddINode(range, stride_m));
+    Node *trip  = phase->transform(new (phase->C) DivINode(0, bias, in(Stride)));
+    Node *span  = phase->transform(new (phase->C) MulINode(trip, in(Stride)));
+    return new (phase->C) AddINode(span, in(Init)); // exact limit
   }
 
   if (is_power_of_2(stride_p) ||                // divisor is 2^n
@@ -858,13 +858,13 @@ Node *LoopLimitNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     // Convert to long expression to avoid integer overflow
     // and let igvn optimizer convert this division.
     //
-    Node*   init   = phase->transform( new (phase->C, 2) ConvI2LNode(in(Init)));
-    Node*  limit   = phase->transform( new (phase->C, 2) ConvI2LNode(in(Limit)));
+    Node*   init   = phase->transform( new (phase->C) ConvI2LNode(in(Init)));
+    Node*  limit   = phase->transform( new (phase->C) ConvI2LNode(in(Limit)));
     Node* stride   = phase->longcon(stride_con);
     Node* stride_m = phase->longcon(stride_con - (stride_con > 0 ? 1 : -1));
 
-    Node *range = phase->transform(new (phase->C, 3) SubLNode(limit, init));
-    Node *bias  = phase->transform(new (phase->C, 3) AddLNode(range, stride_m));
+    Node *range = phase->transform(new (phase->C) SubLNode(limit, init));
+    Node *bias  = phase->transform(new (phase->C) AddLNode(range, stride_m));
     Node *span;
     if (stride_con > 0 && is_power_of_2(stride_p)) {
       // bias >= 0 if stride >0, so if stride is 2^n we can use &(-stride)
@@ -875,14 +875,14 @@ Node *LoopLimitNode::Ideal(PhaseGVN *phase, bool can_reshape) {
       // only RCE predicate where exact limit is used and the predicate
       // will simply fail forcing recompilation.
       Node* neg_stride   = phase->longcon(-stride_con);
-      span = phase->transform(new (phase->C, 3) AndLNode(bias, neg_stride));
+      span = phase->transform(new (phase->C) AndLNode(bias, neg_stride));
     } else {
-      Node *trip  = phase->transform(new (phase->C, 3) DivLNode(0, bias, stride));
-      span = phase->transform(new (phase->C, 3) MulLNode(trip, stride));
+      Node *trip  = phase->transform(new (phase->C) DivLNode(0, bias, stride));
+      span = phase->transform(new (phase->C) MulLNode(trip, stride));
     }
     // Convert back to int
-    Node *span_int = phase->transform(new (phase->C, 2) ConvL2INode(span));
-    return new (phase->C, 3) AddINode(span_int, in(Init)); // exact limit
+    Node *span_int = phase->transform(new (phase->C) ConvL2INode(span));
+    return new (phase->C) AddINode(span_int, in(Init)); // exact limit
   }
 
   return NULL;    // No progress
@@ -1088,7 +1088,7 @@ void IdealLoopTree::split_fall_in( PhaseIdealLoop *phase, int fall_in_cnt ) {
   uint i;
 
   // Make a new RegionNode to be the landing pad.
-  Node *landing_pad = new (phase->C, fall_in_cnt+1) RegionNode( fall_in_cnt+1 );
+  Node *landing_pad = new (phase->C) RegionNode( fall_in_cnt+1 );
   phase->set_loop(landing_pad,_parent);
   // Gather all the fall-in control paths into the landing pad
   uint icnt = fall_in_cnt;
@@ -1174,7 +1174,7 @@ void IdealLoopTree::split_outer_loop( PhaseIdealLoop *phase ) {
 
   // Make a LoopNode for the outermost loop.
   Node *ctl = _head->in(LoopNode::EntryControl);
-  Node *outer = new (phase->C, 3) LoopNode( ctl, _head->in(outer_idx) );
+  Node *outer = new (phase->C) LoopNode( ctl, _head->in(outer_idx) );
   outer = igvn.register_new_node_with_optimizer(outer, _head);
   phase->set_created_loop_node();
 
@@ -1288,7 +1288,7 @@ void IdealLoopTree::merge_many_backedges( PhaseIdealLoop *phase ) {
 
   Node *hot_tail = NULL;
   // Make a Region for the merge point
-  Node *r = new (phase->C, 1) RegionNode(1);
+  Node *r = new (phase->C) RegionNode(1);
   for( i = 2; i < _head->req(); i++ ) {
     if( i != hot_idx )
       r->add_req( _head->in(i) );
@@ -1307,7 +1307,7 @@ void IdealLoopTree::merge_many_backedges( PhaseIdealLoop *phase ) {
       PhiNode* n = out->as_Phi();
       igvn.hash_delete(n);      // Delete from hash before hacking edges
       Node *hot_phi = NULL;
-      Node *phi = new (phase->C, r->req()) PhiNode(r, n->type(), n->adr_type());
+      Node *phi = new (phase->C) PhiNode(r, n->type(), n->adr_type());
       // Check all inputs for the ones to peel out
       uint j = 1;
       for( uint i = 2; i < n->req(); i++ ) {
@@ -1429,7 +1429,7 @@ bool IdealLoopTree::beautify_loops( PhaseIdealLoop *phase ) {
 
   } else if( !_head->is_Loop() && !_irreducible ) {
     // Make a new LoopNode to replace the old loop head
-    Node *l = new (phase->C, 3) LoopNode( _head->in(1), _head->in(2) );
+    Node *l = new (phase->C) LoopNode( _head->in(1), _head->in(2) );
     l = igvn.register_new_node_with_optimizer(l, _head);
     phase->set_created_loop_node();
     // Go ahead and replace _head
@@ -1671,16 +1671,16 @@ void PhaseIdealLoop::replace_parallel_iv(IdealLoopTree *loop) {
       // It is scaled by the 'ratio_con'.
       Node* ratio = _igvn.intcon(ratio_con);
       set_ctrl(ratio, C->root());
-      Node* ratio_init = new (C, 3) MulINode(init, ratio);
+      Node* ratio_init = new (C) MulINode(init, ratio);
       _igvn.register_new_node_with_optimizer(ratio_init, init);
       set_early_ctrl(ratio_init);
-      Node* diff = new (C, 3) SubINode(init2, ratio_init);
+      Node* diff = new (C) SubINode(init2, ratio_init);
       _igvn.register_new_node_with_optimizer(diff, init2);
       set_early_ctrl(diff);
-      Node* ratio_idx = new (C, 3) MulINode(phi, ratio);
+      Node* ratio_idx = new (C) MulINode(phi, ratio);
       _igvn.register_new_node_with_optimizer(ratio_idx, phi);
       set_ctrl(ratio_idx, cl);
-      Node* add = new (C, 3) AddINode(ratio_idx, diff);
+      Node* add = new (C) AddINode(ratio_idx, diff);
       _igvn.register_new_node_with_optimizer(add);
       set_ctrl(add, cl);
       _igvn.replace_node( phi2, add );
@@ -2677,10 +2677,10 @@ int PhaseIdealLoop::build_loop_tree_impl( Node *n, int pre_order ) {
 
         if (!_verify_only) {
           // Insert the NeverBranch between 'm' and it's control user.
-          NeverBranchNode *iff = new (C, 1) NeverBranchNode( m );
+          NeverBranchNode *iff = new (C) NeverBranchNode( m );
           _igvn.register_new_node_with_optimizer(iff);
           set_loop(iff, l);
-          Node *if_t = new (C, 1) CProjNode( iff, 0 );
+          Node *if_t = new (C) CProjNode( iff, 0 );
           _igvn.register_new_node_with_optimizer(if_t);
           set_loop(if_t, l);
 
@@ -2696,16 +2696,16 @@ int PhaseIdealLoop::build_loop_tree_impl( Node *n, int pre_order ) {
           cfg->set_req( k, if_t ); // Now point to NeverBranch
 
           // Now create the never-taken loop exit
-          Node *if_f = new (C, 1) CProjNode( iff, 1 );
+          Node *if_f = new (C) CProjNode( iff, 1 );
           _igvn.register_new_node_with_optimizer(if_f);
           set_loop(if_f, l);
           // Find frame ptr for Halt.  Relies on the optimizer
           // V-N'ing.  Easier and quicker than searching through
           // the program structure.
-          Node *frame = new (C, 1) ParmNode( C->start(), TypeFunc::FramePtr );
+          Node *frame = new (C) ParmNode( C->start(), TypeFunc::FramePtr );
           _igvn.register_new_node_with_optimizer(frame);
           // Halt & Catch Fire
-          Node *halt = new (C, TypeFunc::Parms) HaltNode( if_f, frame );
+          Node *halt = new (C) HaltNode( if_f, frame );
           _igvn.register_new_node_with_optimizer(halt);
           set_loop(halt, l);
           C->root()->add_req(halt);
diff --git a/hotspot/src/share/vm/opto/loopnode.hpp b/hotspot/src/share/vm/opto/loopnode.hpp
index 92f6912389c..42096c0daad 100644
--- a/hotspot/src/share/vm/opto/loopnode.hpp
+++ b/hotspot/src/share/vm/opto/loopnode.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/opto/loopopts.cpp b/hotspot/src/share/vm/opto/loopopts.cpp
index ee6c36d22df..015a063a815 100644
--- a/hotspot/src/share/vm/opto/loopopts.cpp
+++ b/hotspot/src/share/vm/opto/loopopts.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,7 +53,7 @@ Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) {
     int iid    = t_oop->instance_id();
     int index  = C->get_alias_index(t_oop);
     int offset = t_oop->offset();
-    phi = new (C,region->req()) PhiNode(region, type, NULL, iid, index, offset);
+    phi = new (C) PhiNode(region, type, NULL, iid, index, offset);
   } else {
     phi = PhiNode::make_blank(region, n);
   }
@@ -356,9 +356,9 @@ Node *PhaseIdealLoop::remix_address_expressions( Node *n ) {
         _igvn.type( add->in(1) ) != TypeInt::ZERO ) {
       Node *zero = _igvn.intcon(0);
       set_ctrl(zero, C->root());
-      Node *neg = new (C, 3) SubINode( _igvn.intcon(0), add->in(2) );
+      Node *neg = new (C) SubINode( _igvn.intcon(0), add->in(2) );
       register_new_node( neg, get_ctrl(add->in(2) ) );
-      add = new (C, 3) AddINode( add->in(1), neg );
+      add = new (C) AddINode( add->in(1), neg );
       register_new_node( add, add_ctrl );
     }
     if( add->Opcode() != Op_AddI ) return NULL;
@@ -384,14 +384,14 @@ Node *PhaseIdealLoop::remix_address_expressions( Node *n ) {
       return NULL;              // No invariant part of the add?
 
     // Yes!  Reshape address expression!
-    Node *inv_scale = new (C, 3) LShiftINode( add_invar, scale );
+    Node *inv_scale = new (C) LShiftINode( add_invar, scale );
     Node *inv_scale_ctrl =
       dom_depth(add_invar_ctrl) > dom_depth(scale_ctrl) ?
       add_invar_ctrl : scale_ctrl;
     register_new_node( inv_scale, inv_scale_ctrl );
-    Node *var_scale = new (C, 3) LShiftINode( add_var, scale );
+    Node *var_scale = new (C) LShiftINode( add_var, scale );
     register_new_node( var_scale, n_ctrl );
-    Node *var_add = new (C, 3) AddINode( var_scale, inv_scale );
+    Node *var_add = new (C) AddINode( var_scale, inv_scale );
     register_new_node( var_add, n_ctrl );
     _igvn.replace_node( n, var_add );
     return var_add;
@@ -423,10 +423,10 @@ Node *PhaseIdealLoop::remix_address_expressions( Node *n ) {
         IdealLoopTree *n23_loop = get_loop( n23_ctrl );
         if( n22loop != n_loop && n22loop->is_member(n_loop) &&
             n23_loop == n_loop ) {
-          Node *add1 = new (C, 4) AddPNode( n->in(1), n->in(2)->in(2), n->in(3) );
+          Node *add1 = new (C) AddPNode( n->in(1), n->in(2)->in(2), n->in(3) );
           // Stuff new AddP in the loop preheader
           register_new_node( add1, n_loop->_head->in(LoopNode::EntryControl) );
-          Node *add2 = new (C, 4) AddPNode( n->in(1), add1, n->in(2)->in(3) );
+          Node *add2 = new (C) AddPNode( n->in(1), add1, n->in(2)->in(3) );
           register_new_node( add2, n_ctrl );
           _igvn.replace_node( n, add2 );
           return add2;
@@ -444,10 +444,10 @@ Node *PhaseIdealLoop::remix_address_expressions( Node *n ) {
           Node *tmp = V; V = I; I = tmp;
         }
         if( !is_member(n_loop,get_ctrl(I)) ) {
-          Node *add1 = new (C, 4) AddPNode( n->in(1), n->in(2), I );
+          Node *add1 = new (C) AddPNode( n->in(1), n->in(2), I );
           // Stuff new AddP in the loop preheader
           register_new_node( add1, n_loop->_head->in(LoopNode::EntryControl) );
-          Node *add2 = new (C, 4) AddPNode( n->in(1), add1, V );
+          Node *add2 = new (C) AddPNode( n->in(1), add1, V );
           register_new_node( add2, n_ctrl );
           _igvn.replace_node( n, add2 );
           return add2;
@@ -550,7 +550,7 @@ Node *PhaseIdealLoop::conditional_move( Node *region ) {
     // This will likely Split-If, a higher-payoff operation.
     for (DUIterator_Fast kmax, k = phi->fast_outs(kmax); k < kmax; k++) {
       Node* use = phi->fast_out(k);
-      if (use->is_Cmp() || use->is_DecodeN() || use->is_EncodeP())
+      if (use->is_Cmp() || use->is_DecodeNarrowPtr() || use->is_EncodeNarrowPtr())
         cost += ConditionalMoveLimit;
       // Is there a use inside the loop?
       // Note: check only basic types since CMoveP is pinned.
@@ -1006,7 +1006,7 @@ void PhaseIdealLoop::split_if_with_blocks_post( Node *n ) {
             // to fold a StoreP and an AddP together (as part of an
             // address expression) and the AddP and StoreP have
             // different controls.
-            if( !x->is_Load() && !x->is_DecodeN() ) _igvn._worklist.yank(x);
+            if (!x->is_Load() && !x->is_DecodeNarrowPtr()) _igvn._worklist.yank(x);
           }
           _igvn.remove_dead_node(n);
         }
@@ -1094,9 +1094,8 @@ BoolNode *PhaseIdealLoop::clone_iff( PhiNode *phi, IdealLoopTree *loop ) {
   Node *sample_cmp  = sample_bool->in(1);
 
   // Make Phis to merge the Cmp's inputs.
-  int size = phi->in(0)->req();
-  PhiNode *phi1 = new (C, size) PhiNode( phi->in(0), Type::TOP );
-  PhiNode *phi2 = new (C, size) PhiNode( phi->in(0), Type::TOP );
+  PhiNode *phi1 = new (C) PhiNode( phi->in(0), Type::TOP );
+  PhiNode *phi2 = new (C) PhiNode( phi->in(0), Type::TOP );
   for( i = 1; i < phi->req(); i++ ) {
     Node *n1 = phi->in(i)->in(1)->in(1);
     Node *n2 = phi->in(i)->in(1)->in(2);
@@ -1163,9 +1162,8 @@ CmpNode *PhaseIdealLoop::clone_bool( PhiNode *phi, IdealLoopTree *loop ) {
   Node *sample_cmp = phi->in(1);
 
   // Make Phis to merge the Cmp's inputs.
-  int size = phi->in(0)->req();
-  PhiNode *phi1 = new (C, size) PhiNode( phi->in(0), Type::TOP );
-  PhiNode *phi2 = new (C, size) PhiNode( phi->in(0), Type::TOP );
+  PhiNode *phi1 = new (C) PhiNode( phi->in(0), Type::TOP );
+  PhiNode *phi2 = new (C) PhiNode( phi->in(0), Type::TOP );
   for( uint j = 1; j < phi->req(); j++ ) {
     Node *cmp_top = phi->in(j); // Inputs are all Cmp or TOP
     Node *n1, *n2;
@@ -1329,7 +1327,7 @@ void PhaseIdealLoop::clone_loop( IdealLoopTree *loop, Node_List &old_new, int dd
 
         // We need a Region to merge the exit from the peeled body and the
         // exit from the old loop body.
-        RegionNode *r = new (C, 3) RegionNode(3);
+        RegionNode *r = new (C) RegionNode(3);
         // Map the old use to the new merge point
         old_new.map( use->_idx, r );
         uint dd_r = MIN2(dom_depth(newuse),dom_depth(use));
@@ -1675,13 +1673,13 @@ ProjNode* PhaseIdealLoop::insert_if_before_proj(Node* left, bool Signed, BoolTes
   ProjNode* proj2 = proj_clone(proj, iff);
   register_node(proj2, loop, iff, ddepth);
 
-  Node* cmp = Signed ? (Node*) new (C,3)CmpINode(left, right) : (Node*) new (C,3)CmpUNode(left, right);
+  Node* cmp = Signed ? (Node*) new (C)CmpINode(left, right) : (Node*) new (C)CmpUNode(left, right);
   register_node(cmp, loop, proj2, ddepth);
 
-  BoolNode* bol = new (C,2)BoolNode(cmp, relop);
+  BoolNode* bol = new (C)BoolNode(cmp, relop);
   register_node(bol, loop, proj2, ddepth);
 
-  IfNode* new_if = new (C,2)IfNode(proj2, bol, iff->_prob, iff->_fcnt);
+  IfNode* new_if = new (C)IfNode(proj2, bol, iff->_prob, iff->_fcnt);
   register_node(new_if, loop, proj2, ddepth);
 
   proj->set_req(0, new_if); // reattach
@@ -1732,11 +1730,11 @@ RegionNode* PhaseIdealLoop::insert_region_before_proj(ProjNode* proj) {
   ProjNode* proj2 = proj_clone(proj, iff);
   register_node(proj2, loop, iff, ddepth);
 
-  RegionNode* reg = new (C,2)RegionNode(2);
+  RegionNode* reg = new (C)RegionNode(2);
   reg->set_req(1, proj2);
   register_node(reg, loop, iff, ddepth);
 
-  IfNode* dum_if = new (C,2)IfNode(reg, short_circuit_if(NULL, proj), iff->_prob, iff->_fcnt);
+  IfNode* dum_if = new (C)IfNode(reg, short_circuit_if(NULL, proj), iff->_prob, iff->_fcnt);
   register_node(dum_if, loop, reg, ddepth);
 
   proj->set_req(0, dum_if); // reattach
@@ -2547,7 +2545,7 @@ bool PhaseIdealLoop::partial_peel( IdealLoopTree *loop, Node_List &old_new ) {
 
   // Create new loop head for new phis and to hang
   // the nodes being moved (sinked) from the peel region.
-  LoopNode* new_head = new (C, 3) LoopNode(last_peel, last_peel);
+  LoopNode* new_head = new (C) LoopNode(last_peel, last_peel);
   new_head->set_unswitch_count(head->unswitch_count()); // Preserve
   _igvn.register_new_node_with_optimizer(new_head);
   assert(first_not_peeled->in(0) == last_peel, "last_peel <- first_not_peeled");
@@ -2746,11 +2744,11 @@ void PhaseIdealLoop::reorg_offsets(IdealLoopTree *loop) {
       if (dom_lca(exit, u_ctrl) != exit) continue;
       // Hit!  Refactor use to use the post-incremented tripcounter.
       // Compute a post-increment tripcounter.
-      Node *opaq = new (C, 2) Opaque2Node( C, cle->incr() );
+      Node *opaq = new (C) Opaque2Node( C, cle->incr() );
       register_new_node( opaq, u_ctrl );
       Node *neg_stride = _igvn.intcon(-cle->stride_con());
       set_ctrl(neg_stride, C->root());
-      Node *post = new (C, 3) AddINode( opaq, neg_stride);
+      Node *post = new (C) AddINode( opaq, neg_stride);
       register_new_node( post, u_ctrl );
       _igvn.rehash_node_delayed(use);
       for (uint j = 1; j < use->req(); j++) {
diff --git a/hotspot/src/share/vm/opto/machnode.cpp b/hotspot/src/share/vm/opto/machnode.cpp
index 2a5d9636949..30970102d5f 100644
--- a/hotspot/src/share/vm/opto/machnode.cpp
+++ b/hotspot/src/share/vm/opto/machnode.cpp
@@ -265,7 +265,8 @@ const Node* MachNode::get_base_and_disp(intptr_t &offset, const TypePtr* &adr_ty
     // See if it adds up to a base + offset.
     if (index != NULL) {
       const Type* t_index = index->bottom_type();
-      if (t_index->isa_narrowoop()) { // EncodeN, LoadN, LoadConN, LoadNKlass.
+      if (t_index->isa_narrowoop() || t_index->isa_narrowklass()) { // EncodeN, LoadN, LoadConN, LoadNKlass,
+                                                                    // EncodeNKlass, LoadConNklass.
         // Memory references through narrow oops have a
         // funny base so grab the type from the index:
         // [R12 + narrow_oop_reg<<3 + offset]
@@ -352,6 +353,10 @@ const class TypePtr *MachNode::adr_type() const {
     // 32-bit unscaled narrow oop can be the base of any address expression
     t = t->make_ptr();
   }
+  if (UseCompressedKlassPointers && Universe::narrow_klass_shift() == 0) {
+    // 32-bit unscaled narrow oop can be the base of any address expression
+    t = t->make_ptr();
+  }
   if (t->isa_intptr_t() && offset != 0 && offset != Type::OffsetBot) {
     // We cannot assert that the offset does not look oop-ish here.
     // Depending on the heap layout the cardmark base could land
diff --git a/hotspot/src/share/vm/opto/macro.cpp b/hotspot/src/share/vm/opto/macro.cpp
index a5250292b27..16987d97468 100644
--- a/hotspot/src/share/vm/opto/macro.cpp
+++ b/hotspot/src/share/vm/opto/macro.cpp
@@ -103,20 +103,20 @@ void PhaseMacroExpand::copy_call_debug_info(CallNode *oldcall, CallNode * newcal
 Node* PhaseMacroExpand::opt_bits_test(Node* ctrl, Node* region, int edge, Node* word, int mask, int bits, bool return_fast_path) {
   Node* cmp;
   if (mask != 0) {
-    Node* and_node = transform_later(new (C, 3) AndXNode(word, MakeConX(mask)));
-    cmp = transform_later(new (C, 3) CmpXNode(and_node, MakeConX(bits)));
+    Node* and_node = transform_later(new (C) AndXNode(word, MakeConX(mask)));
+    cmp = transform_later(new (C) CmpXNode(and_node, MakeConX(bits)));
   } else {
     cmp = word;
   }
-  Node* bol = transform_later(new (C, 2) BoolNode(cmp, BoolTest::ne));
-  IfNode* iff = new (C, 2) IfNode( ctrl, bol, PROB_MIN, COUNT_UNKNOWN );
+  Node* bol = transform_later(new (C) BoolNode(cmp, BoolTest::ne));
+  IfNode* iff = new (C) IfNode( ctrl, bol, PROB_MIN, COUNT_UNKNOWN );
   transform_later(iff);
 
   // Fast path taken.
-  Node *fast_taken = transform_later( new (C, 1) IfFalseNode(iff) );
+  Node *fast_taken = transform_later( new (C) IfFalseNode(iff) );
 
   // Fast path not-taken, i.e. slow path
-  Node *slow_taken = transform_later( new (C, 1) IfTrueNode(iff) );
+  Node *slow_taken = transform_later( new (C) IfTrueNode(iff) );
 
   if (return_fast_path) {
     region->init_req(edge, slow_taken); // Capture slow-control
@@ -141,10 +141,9 @@ void PhaseMacroExpand::copy_predefined_input_for_runtime_call(Node * ctrl, CallN
 CallNode* PhaseMacroExpand::make_slow_call(CallNode *oldcall, const TypeFunc* slow_call_type, address slow_call, const char* leaf_name, Node* slow_path, Node* parm0, Node* parm1) {
 
   // Slow-path call
-  int size = slow_call_type->domain()->cnt();
  CallNode *call = leaf_name
-   ? (CallNode*)new (C, size) CallLeafNode      ( slow_call_type, slow_call, leaf_name, TypeRawPtr::BOTTOM )
-   : (CallNode*)new (C, size) CallStaticJavaNode( slow_call_type, slow_call, OptoRuntime::stub_name(slow_call), oldcall->jvms()->bci(), TypeRawPtr::BOTTOM );
+   ? (CallNode*)new (C) CallLeafNode      ( slow_call_type, slow_call, leaf_name, TypeRawPtr::BOTTOM )
+   : (CallNode*)new (C) CallStaticJavaNode( slow_call_type, slow_call, OptoRuntime::stub_name(slow_call), oldcall->jvms()->bci(), TypeRawPtr::BOTTOM );
 
   // Slow path call has no side-effects, uses few values
   copy_predefined_input_for_runtime_call(slow_path, oldcall, call );
@@ -412,7 +411,7 @@ Node *PhaseMacroExpand::value_from_mem_phi(Node *mem, BasicType ft, const Type *
   GrowableArray <Node *> values(length, length, NULL, false);
 
   // create a new Phi for the value
-  PhiNode *phi = new (C, length) PhiNode(mem->in(0), phi_type, NULL, instance_id, alias_idx, offset);
+  PhiNode *phi = new (C) PhiNode(mem->in(0), phi_type, NULL, instance_id, alias_idx, offset);
   transform_later(phi);
   value_phis->push(phi, mem->_idx);
 
@@ -720,7 +719,7 @@ bool PhaseMacroExpand::scalar_replacement(AllocateNode *alloc, GrowableArray <Sa
     SafePointNode* sfpt = safepoints.pop();
     Node* mem = sfpt->memory();
     uint first_ind = sfpt->req();
-    SafePointScalarObjectNode* sobj = new (C, 1) SafePointScalarObjectNode(res_type,
+    SafePointScalarObjectNode* sobj = new (C) SafePointScalarObjectNode(res_type,
 #ifdef ASSERT
                                                  alloc,
 #endif
@@ -828,7 +827,7 @@ bool PhaseMacroExpand::scalar_replacement(AllocateNode *alloc, GrowableArray <Sa
         if (field_val->is_EncodeP()) {
           field_val = field_val->in(1);
         } else {
-          field_val = transform_later(new (C, 2) DecodeNNode(field_val, field_val->bottom_type()->make_ptr()));
+          field_val = transform_later(new (C) DecodeNNode(field_val, field_val->bottom_type()->make_ptr()));
         }
       }
       sfpt->add_req(field_val);
@@ -995,7 +994,7 @@ bool PhaseMacroExpand::eliminate_allocate_node(AllocateNode *alloc) {
 //---------------------------set_eden_pointers-------------------------
 void PhaseMacroExpand::set_eden_pointers(Node* &eden_top_adr, Node* &eden_end_adr) {
   if (UseTLAB) {                // Private allocation: load from TLS
-    Node* thread = transform_later(new (C, 1) ThreadLocalNode());
+    Node* thread = transform_later(new (C) ThreadLocalNode());
     int tlab_top_offset = in_bytes(JavaThread::tlab_top_offset());
     int tlab_end_offset = in_bytes(JavaThread::tlab_end_offset());
     eden_top_adr = basic_plus_adr(top()/*not oop*/, thread, tlab_top_offset);
@@ -1137,18 +1136,18 @@ void PhaseMacroExpand::expand_allocate_common(
   assert (initial_slow_test == NULL || !always_slow, "arguments must be consistent");
   // generate the initial test if necessary
   if (initial_slow_test != NULL ) {
-    slow_region = new (C, 3) RegionNode(3);
+    slow_region = new (C) RegionNode(3);
 
     // Now make the initial failure test.  Usually a too-big test but
     // might be a TRUE for finalizers or a fancy class check for
     // newInstance0.
-    IfNode *toobig_iff = new (C, 2) IfNode(ctrl, initial_slow_test, PROB_MIN, COUNT_UNKNOWN);
+    IfNode *toobig_iff = new (C) IfNode(ctrl, initial_slow_test, PROB_MIN, COUNT_UNKNOWN);
     transform_later(toobig_iff);
     // Plug the failing-too-big test into the slow-path region
-    Node *toobig_true = new (C, 1) IfTrueNode( toobig_iff );
+    Node *toobig_true = new (C) IfTrueNode( toobig_iff );
     transform_later(toobig_true);
     slow_region    ->init_req( too_big_or_final_path, toobig_true );
-    toobig_false = new (C, 1) IfFalseNode( toobig_iff );
+    toobig_false = new (C) IfFalseNode( toobig_iff );
     transform_later(toobig_false);
   } else {         // No initial test, just fall into next case
     toobig_false = ctrl;
@@ -1181,10 +1180,10 @@ void PhaseMacroExpand::expand_allocate_common(
     Node *eden_end = make_load(ctrl, mem, eden_end_adr, 0, TypeRawPtr::BOTTOM, T_ADDRESS);
 
     // allocate the Region and Phi nodes for the result
-    result_region = new (C, 3) RegionNode(3);
-    result_phi_rawmem = new (C, 3) PhiNode(result_region, Type::MEMORY, TypeRawPtr::BOTTOM);
-    result_phi_rawoop = new (C, 3) PhiNode(result_region, TypeRawPtr::BOTTOM);
-    result_phi_i_o    = new (C, 3) PhiNode(result_region, Type::ABIO); // I/O is used for Prefetch
+    result_region = new (C) RegionNode(3);
+    result_phi_rawmem = new (C) PhiNode(result_region, Type::MEMORY, TypeRawPtr::BOTTOM);
+    result_phi_rawoop = new (C) PhiNode(result_region, TypeRawPtr::BOTTOM);
+    result_phi_i_o    = new (C) PhiNode(result_region, Type::ABIO); // I/O is used for Prefetch
 
     // We need a Region for the loop-back contended case.
     enum { fall_in_path = 1, contended_loopback_path = 2 };
@@ -1194,8 +1193,8 @@ void PhaseMacroExpand::expand_allocate_common(
       contended_region = toobig_false;
       contended_phi_rawmem = mem;
     } else {
-      contended_region = new (C, 3) RegionNode(3);
-      contended_phi_rawmem = new (C, 3) PhiNode(contended_region, Type::MEMORY, TypeRawPtr::BOTTOM);
+      contended_region = new (C) RegionNode(3);
+      contended_phi_rawmem = new (C) PhiNode(contended_region, Type::MEMORY, TypeRawPtr::BOTTOM);
       // Now handle the passing-too-big test.  We fall into the contended
       // loop-back merge point.
       contended_region    ->init_req(fall_in_path, toobig_false);
@@ -1207,23 +1206,23 @@ void PhaseMacroExpand::expand_allocate_common(
     // Load(-locked) the heap top.
     // See note above concerning the control input when using a TLAB
     Node *old_eden_top = UseTLAB
-      ? new (C, 3) LoadPNode      (ctrl, contended_phi_rawmem, eden_top_adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM)
-      : new (C, 3) LoadPLockedNode(contended_region, contended_phi_rawmem, eden_top_adr);
+      ? new (C) LoadPNode      (ctrl, contended_phi_rawmem, eden_top_adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM)
+      : new (C) LoadPLockedNode(contended_region, contended_phi_rawmem, eden_top_adr);
 
     transform_later(old_eden_top);
     // Add to heap top to get a new heap top
-    Node *new_eden_top = new (C, 4) AddPNode(top(), old_eden_top, size_in_bytes);
+    Node *new_eden_top = new (C) AddPNode(top(), old_eden_top, size_in_bytes);
     transform_later(new_eden_top);
     // Check for needing a GC; compare against heap end
-    Node *needgc_cmp = new (C, 3) CmpPNode(new_eden_top, eden_end);
+    Node *needgc_cmp = new (C) CmpPNode(new_eden_top, eden_end);
     transform_later(needgc_cmp);
-    Node *needgc_bol = new (C, 2) BoolNode(needgc_cmp, BoolTest::ge);
+    Node *needgc_bol = new (C) BoolNode(needgc_cmp, BoolTest::ge);
     transform_later(needgc_bol);
-    IfNode *needgc_iff = new (C, 2) IfNode(contended_region, needgc_bol, PROB_UNLIKELY_MAG(4), COUNT_UNKNOWN);
+    IfNode *needgc_iff = new (C) IfNode(contended_region, needgc_bol, PROB_UNLIKELY_MAG(4), COUNT_UNKNOWN);
     transform_later(needgc_iff);
 
     // Plug the failing-heap-space-need-gc test into the slow-path region
-    Node *needgc_true = new (C, 1) IfTrueNode(needgc_iff);
+    Node *needgc_true = new (C) IfTrueNode(needgc_iff);
     transform_later(needgc_true);
     if (initial_slow_test) {
       slow_region->init_req(need_gc_path, needgc_true);
@@ -1234,7 +1233,7 @@ void PhaseMacroExpand::expand_allocate_common(
       slow_region = needgc_true;
     }
     // No need for a GC.  Setup for the Store-Conditional
-    Node *needgc_false = new (C, 1) IfFalseNode(needgc_iff);
+    Node *needgc_false = new (C) IfFalseNode(needgc_iff);
     transform_later(needgc_false);
 
     // Grab regular I/O before optional prefetch may change it.
@@ -1254,37 +1253,37 @@ void PhaseMacroExpand::expand_allocate_common(
     // memory state.
     if (UseTLAB) {
       Node* store_eden_top =
-        new (C, 4) StorePNode(needgc_false, contended_phi_rawmem, eden_top_adr,
+        new (C) StorePNode(needgc_false, contended_phi_rawmem, eden_top_adr,
                               TypeRawPtr::BOTTOM, new_eden_top);
       transform_later(store_eden_top);
       fast_oop_ctrl = needgc_false; // No contention, so this is the fast path
       fast_oop_rawmem = store_eden_top;
     } else {
       Node* store_eden_top =
-        new (C, 5) StorePConditionalNode(needgc_false, contended_phi_rawmem, eden_top_adr,
+        new (C) StorePConditionalNode(needgc_false, contended_phi_rawmem, eden_top_adr,
                                          new_eden_top, fast_oop/*old_eden_top*/);
       transform_later(store_eden_top);
-      Node *contention_check = new (C, 2) BoolNode(store_eden_top, BoolTest::ne);
+      Node *contention_check = new (C) BoolNode(store_eden_top, BoolTest::ne);
       transform_later(contention_check);
-      store_eden_top = new (C, 1) SCMemProjNode(store_eden_top);
+      store_eden_top = new (C) SCMemProjNode(store_eden_top);
       transform_later(store_eden_top);
 
       // If not using TLABs, check to see if there was contention.
-      IfNode *contention_iff = new (C, 2) IfNode (needgc_false, contention_check, PROB_MIN, COUNT_UNKNOWN);
+      IfNode *contention_iff = new (C) IfNode (needgc_false, contention_check, PROB_MIN, COUNT_UNKNOWN);
       transform_later(contention_iff);
-      Node *contention_true = new (C, 1) IfTrueNode(contention_iff);
+      Node *contention_true = new (C) IfTrueNode(contention_iff);
       transform_later(contention_true);
       // If contention, loopback and try again.
       contended_region->init_req(contended_loopback_path, contention_true);
       contended_phi_rawmem->init_req(contended_loopback_path, store_eden_top);
 
       // Fast-path succeeded with no contention!
-      Node *contention_false = new (C, 1) IfFalseNode(contention_iff);
+      Node *contention_false = new (C) IfFalseNode(contention_iff);
       transform_later(contention_false);
       fast_oop_ctrl = contention_false;
 
       // Bump total allocated bytes for this thread
-      Node* thread = new (C, 1) ThreadLocalNode();
+      Node* thread = new (C) ThreadLocalNode();
       transform_later(thread);
       Node* alloc_bytes_adr = basic_plus_adr(top()/*not oop*/, thread,
                                              in_bytes(JavaThread::allocated_bytes_offset()));
@@ -1293,10 +1292,10 @@ void PhaseMacroExpand::expand_allocate_common(
 #ifdef _LP64
       Node* alloc_size = size_in_bytes;
 #else
-      Node* alloc_size = new (C, 2) ConvI2LNode(size_in_bytes);
+      Node* alloc_size = new (C) ConvI2LNode(size_in_bytes);
       transform_later(alloc_size);
 #endif
-      Node* new_alloc_bytes = new (C, 3) AddLNode(alloc_bytes, alloc_size);
+      Node* new_alloc_bytes = new (C) AddLNode(alloc_bytes, alloc_size);
       transform_later(new_alloc_bytes);
       fast_oop_rawmem = make_store(fast_oop_ctrl, store_eden_top, alloc_bytes_adr,
                                    0, new_alloc_bytes, T_LONG);
@@ -1323,9 +1322,9 @@ void PhaseMacroExpand::expand_allocate_common(
 
         mb->init_req(TypeFunc::Memory, fast_oop_rawmem);
         mb->init_req(TypeFunc::Control, fast_oop_ctrl);
-        fast_oop_ctrl = new (C, 1) ProjNode(mb,TypeFunc::Control);
+        fast_oop_ctrl = new (C) ProjNode(mb,TypeFunc::Control);
         transform_later(fast_oop_ctrl);
-        fast_oop_rawmem = new (C, 1) ProjNode(mb,TypeFunc::Memory);
+        fast_oop_rawmem = new (C) ProjNode(mb,TypeFunc::Memory);
         transform_later(fast_oop_rawmem);
       } else {
         // Add the MemBarStoreStore after the InitializeNode so that
@@ -1339,9 +1338,9 @@ void PhaseMacroExpand::expand_allocate_common(
         MemBarNode* mb = MemBarNode::make(C, Op_MemBarStoreStore, Compile::AliasIdxBot);
         transform_later(mb);
 
-        Node* ctrl = new (C, 1) ProjNode(init,TypeFunc::Control);
+        Node* ctrl = new (C) ProjNode(init,TypeFunc::Control);
         transform_later(ctrl);
-        Node* mem = new (C, 1) ProjNode(init,TypeFunc::Memory);
+        Node* mem = new (C) ProjNode(init,TypeFunc::Memory);
         transform_later(mem);
 
         // The MemBarStoreStore depends on control and memory coming
@@ -1349,9 +1348,9 @@ void PhaseMacroExpand::expand_allocate_common(
         mb->init_req(TypeFunc::Memory, mem);
         mb->init_req(TypeFunc::Control, ctrl);
 
-        ctrl = new (C, 1) ProjNode(mb,TypeFunc::Control);
+        ctrl = new (C) ProjNode(mb,TypeFunc::Control);
         transform_later(ctrl);
-        mem = new (C, 1) ProjNode(mb,TypeFunc::Memory);
+        mem = new (C) ProjNode(mb,TypeFunc::Memory);
         transform_later(mem);
 
         // All nodes that depended on the InitializeNode for control
@@ -1365,13 +1364,13 @@ void PhaseMacroExpand::expand_allocate_common(
     if (C->env()->dtrace_extended_probes()) {
       // Slow-path call
       int size = TypeFunc::Parms + 2;
-      CallLeafNode *call = new (C, size) CallLeafNode(OptoRuntime::dtrace_object_alloc_Type(),
-                                                      CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc_base),
-                                                      "dtrace_object_alloc",
-                                                      TypeRawPtr::BOTTOM);
+      CallLeafNode *call = new (C) CallLeafNode(OptoRuntime::dtrace_object_alloc_Type(),
+                                                CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc_base),
+                                                "dtrace_object_alloc",
+                                                TypeRawPtr::BOTTOM);
 
       // Get base of thread-local storage area
-      Node* thread = new (C, 1) ThreadLocalNode();
+      Node* thread = new (C) ThreadLocalNode();
       transform_later(thread);
 
       call->init_req(TypeFunc::Parms+0, thread);
@@ -1382,9 +1381,9 @@ void PhaseMacroExpand::expand_allocate_common(
       call->init_req(TypeFunc::ReturnAdr, alloc->in(TypeFunc::ReturnAdr));
       call->init_req(TypeFunc::FramePtr, alloc->in(TypeFunc::FramePtr));
       transform_later(call);
-      fast_oop_ctrl = new (C, 1) ProjNode(call,TypeFunc::Control);
+      fast_oop_ctrl = new (C) ProjNode(call,TypeFunc::Control);
       transform_later(fast_oop_ctrl);
-      fast_oop_rawmem = new (C, 1) ProjNode(call,TypeFunc::Memory);
+      fast_oop_rawmem = new (C) ProjNode(call,TypeFunc::Memory);
       transform_later(fast_oop_rawmem);
     }
 
@@ -1399,11 +1398,10 @@ void PhaseMacroExpand::expand_allocate_common(
   }
 
   // Generate slow-path call
-  CallNode *call = new (C, slow_call_type->domain()->cnt())
-    CallStaticJavaNode(slow_call_type, slow_call_address,
-                       OptoRuntime::stub_name(slow_call_address),
-                       alloc->jvms()->bci(),
-                       TypePtr::BOTTOM);
+  CallNode *call = new (C) CallStaticJavaNode(slow_call_type, slow_call_address,
+                               OptoRuntime::stub_name(slow_call_address),
+                               alloc->jvms()->bci(),
+                               TypePtr::BOTTOM);
   call->init_req( TypeFunc::Control, slow_region );
   call->init_req( TypeFunc::I_O    , top() )     ;   // does no i/o
   call->init_req( TypeFunc::Memory , slow_mem ); // may gc ptrs
@@ -1457,7 +1455,7 @@ void PhaseMacroExpand::expand_allocate_common(
   // _memproj_catchall so we end up with a call that has only 1 memory projection.
   if (_memproj_catchall != NULL ) {
     if (_memproj_fallthrough == NULL) {
-      _memproj_fallthrough = new (C, 1) ProjNode(call, TypeFunc::Memory);
+      _memproj_fallthrough = new (C) ProjNode(call, TypeFunc::Memory);
       transform_later(_memproj_fallthrough);
     }
     for (DUIterator_Fast imax, i = _memproj_catchall->fast_outs(imax); i < imax; i++) {
@@ -1489,7 +1487,7 @@ void PhaseMacroExpand::expand_allocate_common(
   // _ioproj_catchall so we end up with a call that has only 1 i_o projection.
   if (_ioproj_catchall != NULL ) {
     if (_ioproj_fallthrough == NULL) {
-      _ioproj_fallthrough = new (C, 1) ProjNode(call, TypeFunc::I_O);
+      _ioproj_fallthrough = new (C) ProjNode(call, TypeFunc::I_O);
       transform_later(_ioproj_fallthrough);
     }
     for (DUIterator_Fast imax, i = _ioproj_catchall->fast_outs(imax); i < imax; i++) {
@@ -1623,46 +1621,46 @@ Node* PhaseMacroExpand::prefetch_allocation(Node* i_o, Node*& needgc_false,
       // As an allocation hits the watermark, we will prefetch starting
       // at a "distance" away from watermark.
 
-      Node *pf_region = new (C, 3) RegionNode(3);
-      Node *pf_phi_rawmem = new (C, 3) PhiNode( pf_region, Type::MEMORY,
+      Node *pf_region = new (C) RegionNode(3);
+      Node *pf_phi_rawmem = new (C) PhiNode( pf_region, Type::MEMORY,
                                                 TypeRawPtr::BOTTOM );
       // I/O is used for Prefetch
-      Node *pf_phi_abio = new (C, 3) PhiNode( pf_region, Type::ABIO );
+      Node *pf_phi_abio = new (C) PhiNode( pf_region, Type::ABIO );
 
-      Node *thread = new (C, 1) ThreadLocalNode();
+      Node *thread = new (C) ThreadLocalNode();
       transform_later(thread);
 
-      Node *eden_pf_adr = new (C, 4) AddPNode( top()/*not oop*/, thread,
+      Node *eden_pf_adr = new (C) AddPNode( top()/*not oop*/, thread,
                    _igvn.MakeConX(in_bytes(JavaThread::tlab_pf_top_offset())) );
       transform_later(eden_pf_adr);
 
-      Node *old_pf_wm = new (C, 3) LoadPNode( needgc_false,
+      Node *old_pf_wm = new (C) LoadPNode( needgc_false,
                                    contended_phi_rawmem, eden_pf_adr,
                                    TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM );
       transform_later(old_pf_wm);
 
       // check against new_eden_top
-      Node *need_pf_cmp = new (C, 3) CmpPNode( new_eden_top, old_pf_wm );
+      Node *need_pf_cmp = new (C) CmpPNode( new_eden_top, old_pf_wm );
       transform_later(need_pf_cmp);
-      Node *need_pf_bol = new (C, 2) BoolNode( need_pf_cmp, BoolTest::ge );
+      Node *need_pf_bol = new (C) BoolNode( need_pf_cmp, BoolTest::ge );
       transform_later(need_pf_bol);
-      IfNode *need_pf_iff = new (C, 2) IfNode( needgc_false, need_pf_bol,
+      IfNode *need_pf_iff = new (C) IfNode( needgc_false, need_pf_bol,
                                        PROB_UNLIKELY_MAG(4), COUNT_UNKNOWN );
       transform_later(need_pf_iff);
 
       // true node, add prefetchdistance
-      Node *need_pf_true = new (C, 1) IfTrueNode( need_pf_iff );
+      Node *need_pf_true = new (C) IfTrueNode( need_pf_iff );
       transform_later(need_pf_true);
 
-      Node *need_pf_false = new (C, 1) IfFalseNode( need_pf_iff );
+      Node *need_pf_false = new (C) IfFalseNode( need_pf_iff );
       transform_later(need_pf_false);
 
-      Node *new_pf_wmt = new (C, 4) AddPNode( top(), old_pf_wm,
+      Node *new_pf_wmt = new (C) AddPNode( top(), old_pf_wm,
                                     _igvn.MakeConX(AllocatePrefetchDistance) );
       transform_later(new_pf_wmt );
       new_pf_wmt->set_req(0, need_pf_true);
 
-      Node *store_new_wmt = new (C, 4) StorePNode( need_pf_true,
+      Node *store_new_wmt = new (C) StorePNode( need_pf_true,
                                        contended_phi_rawmem, eden_pf_adr,
                                        TypeRawPtr::BOTTOM, new_pf_wmt );
       transform_later(store_new_wmt);
@@ -1677,10 +1675,10 @@ Node* PhaseMacroExpand::prefetch_allocation(Node* i_o, Node*& needgc_false,
       uint distance = 0;
 
       for ( uint i = 0; i < lines; i++ ) {
-        prefetch_adr = new (C, 4) AddPNode( old_pf_wm, new_pf_wmt,
+        prefetch_adr = new (C) AddPNode( old_pf_wm, new_pf_wmt,
                                             _igvn.MakeConX(distance) );
         transform_later(prefetch_adr);
-        prefetch = new (C, 3) PrefetchAllocationNode( i_o, prefetch_adr );
+        prefetch = new (C) PrefetchAllocationNode( i_o, prefetch_adr );
         transform_later(prefetch);
         distance += step_size;
         i_o = prefetch;
@@ -1703,9 +1701,9 @@ Node* PhaseMacroExpand::prefetch_allocation(Node* i_o, Node*& needgc_false,
    } else if( UseTLAB && AllocatePrefetchStyle == 3 ) {
       // Insert a prefetch for each allocation.
       // This code is used for Sparc with BIS.
-      Node *pf_region = new (C, 3) RegionNode(3);
-      Node *pf_phi_rawmem = new (C, 3) PhiNode( pf_region, Type::MEMORY,
-                                                TypeRawPtr::BOTTOM );
+      Node *pf_region = new (C) RegionNode(3);
+      Node *pf_phi_rawmem = new (C) PhiNode( pf_region, Type::MEMORY,
+                                             TypeRawPtr::BOTTOM );
 
       // Generate several prefetch instructions.
       uint lines = (length != NULL) ? AllocatePrefetchLines : AllocateInstancePrefetchLines;
@@ -1713,29 +1711,29 @@ Node* PhaseMacroExpand::prefetch_allocation(Node* i_o, Node*& needgc_false,
       uint distance = AllocatePrefetchDistance;
 
       // Next cache address.
-      Node *cache_adr = new (C, 4) AddPNode(old_eden_top, old_eden_top,
+      Node *cache_adr = new (C) AddPNode(old_eden_top, old_eden_top,
                                             _igvn.MakeConX(distance));
       transform_later(cache_adr);
-      cache_adr = new (C, 2) CastP2XNode(needgc_false, cache_adr);
+      cache_adr = new (C) CastP2XNode(needgc_false, cache_adr);
       transform_later(cache_adr);
       Node* mask = _igvn.MakeConX(~(intptr_t)(step_size-1));
-      cache_adr = new (C, 3) AndXNode(cache_adr, mask);
+      cache_adr = new (C) AndXNode(cache_adr, mask);
       transform_later(cache_adr);
-      cache_adr = new (C, 2) CastX2PNode(cache_adr);
+      cache_adr = new (C) CastX2PNode(cache_adr);
       transform_later(cache_adr);
 
       // Prefetch
-      Node *prefetch = new (C, 3) PrefetchAllocationNode( contended_phi_rawmem, cache_adr );
+      Node *prefetch = new (C) PrefetchAllocationNode( contended_phi_rawmem, cache_adr );
       prefetch->set_req(0, needgc_false);
       transform_later(prefetch);
       contended_phi_rawmem = prefetch;
       Node *prefetch_adr;
       distance = step_size;
       for ( uint i = 1; i < lines; i++ ) {
-        prefetch_adr = new (C, 4) AddPNode( cache_adr, cache_adr,
+        prefetch_adr = new (C) AddPNode( cache_adr, cache_adr,
                                             _igvn.MakeConX(distance) );
         transform_later(prefetch_adr);
-        prefetch = new (C, 3) PrefetchAllocationNode( contended_phi_rawmem, prefetch_adr );
+        prefetch = new (C) PrefetchAllocationNode( contended_phi_rawmem, prefetch_adr );
         transform_later(prefetch);
         distance += step_size;
         contended_phi_rawmem = prefetch;
@@ -1749,10 +1747,10 @@ Node* PhaseMacroExpand::prefetch_allocation(Node* i_o, Node*& needgc_false,
       uint step_size = AllocatePrefetchStepSize;
       uint distance = AllocatePrefetchDistance;
       for ( uint i = 0; i < lines; i++ ) {
-        prefetch_adr = new (C, 4) AddPNode( old_eden_top, new_eden_top,
+        prefetch_adr = new (C) AddPNode( old_eden_top, new_eden_top,
                                             _igvn.MakeConX(distance) );
         transform_later(prefetch_adr);
-        prefetch = new (C, 3) PrefetchAllocationNode( i_o, prefetch_adr );
+        prefetch = new (C) PrefetchAllocationNode( i_o, prefetch_adr );
         // Do not let it float too high, since if eden_top == eden_end,
         // both might be null.
         if( i == 0 ) { // Set control for first prefetch, next follows it
@@ -2101,12 +2099,12 @@ void PhaseMacroExpand::expand_lock_node(LockNode *lock) {
      *  }
      */
 
-    region  = new (C, 5) RegionNode(5);
+    region  = new (C) RegionNode(5);
     // create a Phi for the memory state
-    mem_phi = new (C, 5) PhiNode( region, Type::MEMORY, TypeRawPtr::BOTTOM);
+    mem_phi = new (C) PhiNode( region, Type::MEMORY, TypeRawPtr::BOTTOM);
 
-    Node* fast_lock_region  = new (C, 3) RegionNode(3);
-    Node* fast_lock_mem_phi = new (C, 3) PhiNode( fast_lock_region, Type::MEMORY, TypeRawPtr::BOTTOM);
+    Node* fast_lock_region  = new (C) RegionNode(3);
+    Node* fast_lock_mem_phi = new (C) PhiNode( fast_lock_region, Type::MEMORY, TypeRawPtr::BOTTOM);
 
     // First, check mark word for the biased lock pattern.
     Node* mark_node = make_load(ctrl, mem, obj, oopDesc::mark_offset_in_bytes(), TypeX_X, TypeX_X->basic_type());
@@ -2127,7 +2125,7 @@ void PhaseMacroExpand::expand_lock_node(LockNode *lock) {
       Node* k_adr = basic_plus_adr(obj, oopDesc::klass_offset_in_bytes());
       klass_node = transform_later( LoadKlassNode::make(_igvn, mem, k_adr, _igvn.type(k_adr)->is_ptr()) );
 #ifdef _LP64
-      if (UseCompressedOops && klass_node->is_DecodeN()) {
+      if (UseCompressedKlassPointers && klass_node->is_DecodeNKlass()) {
         assert(klass_node->in(1)->Opcode() == Op_LoadNKlass, "sanity");
         klass_node->in(1)->init_req(0, ctrl);
       } else
@@ -2136,10 +2134,10 @@ void PhaseMacroExpand::expand_lock_node(LockNode *lock) {
     }
     Node *proto_node = make_load(ctrl, mem, klass_node, in_bytes(Klass::prototype_header_offset()), TypeX_X, TypeX_X->basic_type());
 
-    Node* thread = transform_later(new (C, 1) ThreadLocalNode());
-    Node* cast_thread = transform_later(new (C, 2) CastP2XNode(ctrl, thread));
-    Node* o_node = transform_later(new (C, 3) OrXNode(cast_thread, proto_node));
-    Node* x_node = transform_later(new (C, 3) XorXNode(o_node, mark_node));
+    Node* thread = transform_later(new (C) ThreadLocalNode());
+    Node* cast_thread = transform_later(new (C) CastP2XNode(ctrl, thread));
+    Node* o_node = transform_later(new (C) OrXNode(cast_thread, proto_node));
+    Node* x_node = transform_later(new (C) XorXNode(o_node, mark_node));
 
     // Get slow path - mark word does NOT match the value.
     Node* not_biased_ctrl =  opt_bits_test(ctrl, region, 3, x_node,
@@ -2162,17 +2160,17 @@ void PhaseMacroExpand::expand_lock_node(LockNode *lock) {
     // We are going to try to reset the mark of this object to the prototype
     // value and fall through to the CAS-based locking scheme.
     Node* adr = basic_plus_adr(obj, oopDesc::mark_offset_in_bytes());
-    Node* cas = new (C, 5) StoreXConditionalNode(not_biased_ctrl, mem, adr,
-                                                 proto_node, mark_node);
+    Node* cas = new (C) StoreXConditionalNode(not_biased_ctrl, mem, adr,
+                                              proto_node, mark_node);
     transform_later(cas);
-    Node* proj = transform_later( new (C, 1) SCMemProjNode(cas));
+    Node* proj = transform_later( new (C) SCMemProjNode(cas));
     fast_lock_mem_phi->init_req(2, proj);
 
 
     // Second, check epoch bits.
-    Node* rebiased_region  = new (C, 3) RegionNode(3);
-    Node* old_phi = new (C, 3) PhiNode( rebiased_region, TypeX_X);
-    Node* new_phi = new (C, 3) PhiNode( rebiased_region, TypeX_X);
+    Node* rebiased_region  = new (C) RegionNode(3);
+    Node* old_phi = new (C) PhiNode( rebiased_region, TypeX_X);
+    Node* new_phi = new (C) PhiNode( rebiased_region, TypeX_X);
 
     // Get slow path - mark word does NOT match epoch bits.
     Node* epoch_ctrl =  opt_bits_test(ctrl, rebiased_region, 1, x_node,
@@ -2189,9 +2187,9 @@ void PhaseMacroExpand::expand_lock_node(LockNode *lock) {
     Node* cmask   = MakeConX(markOopDesc::biased_lock_mask_in_place |
                              markOopDesc::age_mask_in_place |
                              markOopDesc::epoch_mask_in_place);
-    Node* old = transform_later(new (C, 3) AndXNode(mark_node, cmask));
-    cast_thread = transform_later(new (C, 2) CastP2XNode(ctrl, thread));
-    Node* new_mark = transform_later(new (C, 3) OrXNode(cast_thread, old));
+    Node* old = transform_later(new (C) AndXNode(mark_node, cmask));
+    cast_thread = transform_later(new (C) CastP2XNode(ctrl, thread));
+    Node* new_mark = transform_later(new (C) OrXNode(cast_thread, old));
     old_phi->init_req(1, old);
     new_phi->init_req(1, new_mark);
 
@@ -2201,10 +2199,10 @@ void PhaseMacroExpand::expand_lock_node(LockNode *lock) {
 
     // Try to acquire the bias of the object using an atomic operation.
     // If this fails we will go in to the runtime to revoke the object's bias.
-    cas = new (C, 5) StoreXConditionalNode(rebiased_region, mem, adr,
+    cas = new (C) StoreXConditionalNode(rebiased_region, mem, adr,
                                            new_phi, old_phi);
     transform_later(cas);
-    proj = transform_later( new (C, 1) SCMemProjNode(cas));
+    proj = transform_later( new (C) SCMemProjNode(cas));
 
     // Get slow path - Failed to CAS.
     not_biased_ctrl = opt_bits_test(rebiased_region, region, 4, cas, 0, 0);
@@ -2212,8 +2210,8 @@ void PhaseMacroExpand::expand_lock_node(LockNode *lock) {
     // region->in(4) is set to fast path - the object is rebiased to the current thread.
 
     // Failed to CAS.
-    slow_path  = new (C, 3) RegionNode(3);
-    Node *slow_mem = new (C, 3) PhiNode( slow_path, Type::MEMORY, TypeRawPtr::BOTTOM);
+    slow_path  = new (C) RegionNode(3);
+    Node *slow_mem = new (C) PhiNode( slow_path, Type::MEMORY, TypeRawPtr::BOTTOM);
 
     slow_path->init_req(1, not_biased_ctrl); // Capture slow-control
     slow_mem->init_req(1, proj);
@@ -2237,9 +2235,9 @@ void PhaseMacroExpand::expand_lock_node(LockNode *lock) {
     lock->set_req(TypeFunc::Memory, slow_mem);
 
   } else {
-    region  = new (C, 3) RegionNode(3);
+    region  = new (C) RegionNode(3);
     // create a Phi for the memory state
-    mem_phi = new (C, 3) PhiNode( region, Type::MEMORY, TypeRawPtr::BOTTOM);
+    mem_phi = new (C) PhiNode( region, Type::MEMORY, TypeRawPtr::BOTTOM);
 
     // Optimize test; set region slot 2
     slow_path = opt_bits_test(ctrl, region, 2, flock, 0, 0);
@@ -2270,7 +2268,7 @@ void PhaseMacroExpand::expand_lock_node(LockNode *lock) {
   transform_later(region);
   _igvn.replace_node(_fallthroughproj, region);
 
-  Node *memproj = transform_later( new(C, 1) ProjNode(call, TypeFunc::Memory) );
+  Node *memproj = transform_later( new(C) ProjNode(call, TypeFunc::Memory) );
   mem_phi->init_req(1, memproj );
   transform_later(mem_phi);
   _igvn.replace_node(_memproj_fallthrough, mem_phi);
@@ -2295,9 +2293,9 @@ void PhaseMacroExpand::expand_unlock_node(UnlockNode *unlock) {
   if (UseOptoBiasInlining) {
     // Check for biased locking unlock case, which is a no-op.
     // See the full description in MacroAssembler::biased_locking_exit().
-    region  = new (C, 4) RegionNode(4);
+    region  = new (C) RegionNode(4);
     // create a Phi for the memory state
-    mem_phi = new (C, 4) PhiNode( region, Type::MEMORY, TypeRawPtr::BOTTOM);
+    mem_phi = new (C) PhiNode( region, Type::MEMORY, TypeRawPtr::BOTTOM);
     mem_phi->init_req(3, mem);
 
     Node* mark_node = make_load(ctrl, mem, obj, oopDesc::mark_offset_in_bytes(), TypeX_X, TypeX_X->basic_type());
@@ -2305,12 +2303,12 @@ void PhaseMacroExpand::expand_unlock_node(UnlockNode *unlock) {
                          markOopDesc::biased_lock_mask_in_place,
                          markOopDesc::biased_lock_pattern);
   } else {
-    region  = new (C, 3) RegionNode(3);
+    region  = new (C) RegionNode(3);
     // create a Phi for the memory state
-    mem_phi = new (C, 3) PhiNode( region, Type::MEMORY, TypeRawPtr::BOTTOM);
+    mem_phi = new (C) PhiNode( region, Type::MEMORY, TypeRawPtr::BOTTOM);
   }
 
-  FastUnlockNode *funlock = new (C, 3) FastUnlockNode( ctrl, obj, box );
+  FastUnlockNode *funlock = new (C) FastUnlockNode( ctrl, obj, box );
   funlock = transform_later( funlock )->as_FastUnlock();
   // Optimize test; set region slot 2
   Node *slow_path = opt_bits_test(ctrl, region, 2, funlock, 0, 0);
@@ -2335,7 +2333,7 @@ void PhaseMacroExpand::expand_unlock_node(UnlockNode *unlock) {
   transform_later(region);
   _igvn.replace_node(_fallthroughproj, region);
 
-  Node *memproj = transform_later( new(C, 1) ProjNode(call, TypeFunc::Memory) );
+  Node *memproj = transform_later( new(C) ProjNode(call, TypeFunc::Memory) );
   mem_phi->init_req(1, memproj );
   mem_phi->init_req(2, mem);
   transform_later(mem_phi);
diff --git a/hotspot/src/share/vm/opto/macro.hpp b/hotspot/src/share/vm/opto/macro.hpp
index f521e3d35a2..ba35c497f2b 100644
--- a/hotspot/src/share/vm/opto/macro.hpp
+++ b/hotspot/src/share/vm/opto/macro.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,7 +52,7 @@ private:
     return basic_plus_adr(base, base, offset);
   }
   Node* basic_plus_adr(Node* base, Node* ptr, Node* offset) {
-    Node* adr = new (C, 4) AddPNode(base, ptr, offset);
+    Node* adr = new (C) AddPNode(base, ptr, offset);
     return transform_later(adr);
   }
   Node* transform_later(Node* n) {
diff --git a/hotspot/src/share/vm/opto/matcher.cpp b/hotspot/src/share/vm/opto/matcher.cpp
index bf4a345ce57..53924d0c9a0 100644
--- a/hotspot/src/share/vm/opto/matcher.cpp
+++ b/hotspot/src/share/vm/opto/matcher.cpp
@@ -727,7 +727,7 @@ void Matcher::Fixup_Save_On_Entry( ) {
         tail_call_rms[tail_call_edge_cnt].Insert(OptoReg::Name(i+1));
         tail_jump_rms[tail_jump_edge_cnt].Insert(OptoReg::Name(i+1));
         halt_rms     [     halt_edge_cnt].Insert(OptoReg::Name(i+1));
-        mproj = new (C, 1) MachProjNode( start, proj_cnt, ret_rms[ret_edge_cnt], Op_RegD );
+        mproj = new (C) MachProjNode( start, proj_cnt, ret_rms[ret_edge_cnt], Op_RegD );
         proj_cnt += 2;          // Skip 2 for doubles
       }
       else if( (i&1) == 1 &&    // Else check for high half of double
@@ -753,7 +753,7 @@ void Matcher::Fixup_Save_On_Entry( ) {
         tail_call_rms[tail_call_edge_cnt].Insert(OptoReg::Name(i+1));
         tail_jump_rms[tail_jump_edge_cnt].Insert(OptoReg::Name(i+1));
         halt_rms     [     halt_edge_cnt].Insert(OptoReg::Name(i+1));
-        mproj = new (C, 1) MachProjNode( start, proj_cnt, ret_rms[ret_edge_cnt], Op_RegL );
+        mproj = new (C) MachProjNode( start, proj_cnt, ret_rms[ret_edge_cnt], Op_RegL );
         proj_cnt += 2;          // Skip 2 for longs
       }
       else if( (i&1) == 1 &&    // Else check for high half of long
@@ -768,7 +768,7 @@ void Matcher::Fixup_Save_On_Entry( ) {
         mproj = C->top();
       } else {
         // Make a projection for it off the Start
-        mproj = new (C, 1) MachProjNode( start, proj_cnt++, ret_rms[ret_edge_cnt], _register_save_type[i] );
+        mproj = new (C) MachProjNode( start, proj_cnt++, ret_rms[ret_edge_cnt], _register_save_type[i] );
       }
 
       ret_edge_cnt ++;
@@ -821,13 +821,13 @@ void Matcher::init_spill_mask( Node *ret ) {
 
   // Compute generic short-offset Loads
 #ifdef _LP64
-  MachNode *spillCP = match_tree(new (C, 3) LoadNNode(NULL,mem,fp,atp,TypeInstPtr::BOTTOM));
+  MachNode *spillCP = match_tree(new (C) LoadNNode(NULL,mem,fp,atp,TypeInstPtr::BOTTOM));
 #endif
-  MachNode *spillI  = match_tree(new (C, 3) LoadINode(NULL,mem,fp,atp));
-  MachNode *spillL  = match_tree(new (C, 3) LoadLNode(NULL,mem,fp,atp));
-  MachNode *spillF  = match_tree(new (C, 3) LoadFNode(NULL,mem,fp,atp));
-  MachNode *spillD  = match_tree(new (C, 3) LoadDNode(NULL,mem,fp,atp));
-  MachNode *spillP  = match_tree(new (C, 3) LoadPNode(NULL,mem,fp,atp,TypeInstPtr::BOTTOM));
+  MachNode *spillI  = match_tree(new (C) LoadINode(NULL,mem,fp,atp));
+  MachNode *spillL  = match_tree(new (C) LoadLNode(NULL,mem,fp,atp));
+  MachNode *spillF  = match_tree(new (C) LoadFNode(NULL,mem,fp,atp));
+  MachNode *spillD  = match_tree(new (C) LoadDNode(NULL,mem,fp,atp));
+  MachNode *spillP  = match_tree(new (C) LoadPNode(NULL,mem,fp,atp,TypeInstPtr::BOTTOM));
   assert(spillI != NULL && spillL != NULL && spillF != NULL &&
          spillD != NULL && spillP != NULL, "");
 
@@ -844,19 +844,19 @@ void Matcher::init_spill_mask( Node *ret ) {
   // Vector regmasks.
   if (Matcher::vector_size_supported(T_BYTE,4)) {
     TypeVect::VECTS = TypeVect::make(T_BYTE, 4);
-    MachNode *spillVectS = match_tree(new (C, 3) LoadVectorNode(NULL,mem,fp,atp,TypeVect::VECTS));
+    MachNode *spillVectS = match_tree(new (C) LoadVectorNode(NULL,mem,fp,atp,TypeVect::VECTS));
     idealreg2regmask[Op_VecS] = &spillVectS->out_RegMask();
   }
   if (Matcher::vector_size_supported(T_FLOAT,2)) {
-    MachNode *spillVectD = match_tree(new (C, 3) LoadVectorNode(NULL,mem,fp,atp,TypeVect::VECTD));
+    MachNode *spillVectD = match_tree(new (C) LoadVectorNode(NULL,mem,fp,atp,TypeVect::VECTD));
     idealreg2regmask[Op_VecD] = &spillVectD->out_RegMask();
   }
   if (Matcher::vector_size_supported(T_FLOAT,4)) {
-    MachNode *spillVectX = match_tree(new (C, 3) LoadVectorNode(NULL,mem,fp,atp,TypeVect::VECTX));
+    MachNode *spillVectX = match_tree(new (C) LoadVectorNode(NULL,mem,fp,atp,TypeVect::VECTX));
     idealreg2regmask[Op_VecX] = &spillVectX->out_RegMask();
   }
   if (Matcher::vector_size_supported(T_FLOAT,8)) {
-    MachNode *spillVectY = match_tree(new (C, 3) LoadVectorNode(NULL,mem,fp,atp,TypeVect::VECTY));
+    MachNode *spillVectY = match_tree(new (C) LoadVectorNode(NULL,mem,fp,atp,TypeVect::VECTY));
     idealreg2regmask[Op_VecY] = &spillVectY->out_RegMask();
   }
 }
@@ -1058,7 +1058,7 @@ Node *Matcher::xform( Node *n, int max_stack ) {
         Node *m = n->in(i);          // Get input
         int op = m->Opcode();
         assert((op == Op_BoxLock) == jvms->is_monitor_use(i), "boxes only at monitor sites");
-        if( op == Op_ConI || op == Op_ConP || op == Op_ConN ||
+        if( op == Op_ConI || op == Op_ConP || op == Op_ConN || op == Op_ConNKlass ||
             op == Op_ConF || op == Op_ConD || op == Op_ConL
             // || op == Op_BoxLock  // %%%% enable this and remove (+++) in chaitin.cpp
             ) {
@@ -1303,7 +1303,7 @@ MachNode *Matcher::match_sfpt( SafePointNode *sfpt ) {
     // is excluded on the max-per-method basis, debug info cannot land in
     // this killed area.
     uint r_cnt = mcall->tf()->range()->cnt();
-    MachProjNode *proj = new (C, 1) MachProjNode( mcall, r_cnt+10000, RegMask::Empty, MachProjNode::fat_proj );
+    MachProjNode *proj = new (C) MachProjNode( mcall, r_cnt+10000, RegMask::Empty, MachProjNode::fat_proj );
     if (!RegMask::can_represent_arg(OptoReg::Name(out_arg_limit_per_call-1))) {
       C->record_method_not_compilable_all_tiers("unsupported outgoing calling sequence");
     } else {
@@ -1450,7 +1450,8 @@ static bool match_into_reg( const Node *n, Node *m, Node *control, int i, bool s
       if (j == max_scan)        // No post-domination before scan end?
         return true;            // Then break the match tree up
     }
-    if (m->is_DecodeN() && Matcher::narrow_oop_use_complex_address()) {
+    if ((m->is_DecodeN() && Matcher::narrow_oop_use_complex_address()) ||
+        (m->is_DecodeNKlass() && Matcher::narrow_klass_use_complex_address())) {
       // These are commonly used in address expressions and can
       // efficiently fold into them on X64 in some cases.
       return false;
@@ -1574,14 +1575,14 @@ Node *Matcher::Label_Root( const Node *n, State *svec, Node *control, const Node
 // program.  The register allocator is free to split uses later to
 // split live ranges.
 MachNode* Matcher::find_shared_node(Node* leaf, uint rule) {
-  if (!leaf->is_Con() && !leaf->is_DecodeN()) return NULL;
+  if (!leaf->is_Con() && !leaf->is_DecodeNarrowPtr()) return NULL;
 
   // See if this Con has already been reduced using this rule.
   if (_shared_nodes.Size() <= leaf->_idx) return NULL;
   MachNode* last = (MachNode*)_shared_nodes.at(leaf->_idx);
   if (last != NULL && rule == last->rule()) {
     // Don't expect control change for DecodeN
-    if (leaf->is_DecodeN())
+    if (leaf->is_DecodeNarrowPtr())
       return last;
     // Get the new space root.
     Node* xroot = new_node(C->root());
@@ -1671,12 +1672,12 @@ MachNode *Matcher::ReduceInst( State *s, int rule, Node *&mem ) {
       // DecodeN node consumed by an address may have different type
       // then its input. Don't compare types for such case.
       if (m->adr_type() != mach_at &&
-          (m->in(MemNode::Address)->is_DecodeN() ||
+          (m->in(MemNode::Address)->is_DecodeNarrowPtr() ||
            m->in(MemNode::Address)->is_AddP() &&
-           m->in(MemNode::Address)->in(AddPNode::Address)->is_DecodeN() ||
+           m->in(MemNode::Address)->in(AddPNode::Address)->is_DecodeNarrowPtr() ||
            m->in(MemNode::Address)->is_AddP() &&
            m->in(MemNode::Address)->in(AddPNode::Address)->is_AddP() &&
-           m->in(MemNode::Address)->in(AddPNode::Address)->in(AddPNode::Address)->is_DecodeN())) {
+           m->in(MemNode::Address)->in(AddPNode::Address)->in(AddPNode::Address)->is_DecodeNarrowPtr())) {
         mach_at = m->adr_type();
       }
       if (m->adr_type() != mach_at) {
@@ -1721,7 +1722,7 @@ MachNode *Matcher::ReduceInst( State *s, int rule, Node *&mem ) {
     guarantee(_proj_list.size() == num_proj, "no allocation during spill generation");
   }
 
-  if (leaf->is_Con() || leaf->is_DecodeN()) {
+  if (leaf->is_Con() || leaf->is_DecodeNarrowPtr()) {
     // Record the con for sharing
     _shared_nodes.map(leaf->_idx, ex);
   }
@@ -2038,7 +2039,7 @@ void Matcher::find_shared( Node *n ) {
           continue; // for(int i = ...)
         }
 
-        if( mop == Op_AddP && m->in(AddPNode::Base)->Opcode() == Op_DecodeN ) {
+        if( mop == Op_AddP && m->in(AddPNode::Base)->is_DecodeNarrowPtr()) {
           // Bases used in addresses must be shared but since
           // they are shared through a DecodeN they may appear
           // to have a single use so force sharing here.
@@ -2134,10 +2135,10 @@ void Matcher::find_shared( Node *n ) {
       case Op_CompareAndSwapP:
       case Op_CompareAndSwapN: {   // Convert trinary to binary-tree
         Node *newval = n->in(MemNode::ValueIn );
-        Node *oldval  = n->in(LoadStoreNode::ExpectedIn);
-        Node *pair = new (C, 3) BinaryNode( oldval, newval );
+        Node *oldval  = n->in(LoadStoreConditionalNode::ExpectedIn);
+        Node *pair = new (C) BinaryNode( oldval, newval );
         n->set_req(MemNode::ValueIn,pair);
-        n->del_req(LoadStoreNode::ExpectedIn);
+        n->del_req(LoadStoreConditionalNode::ExpectedIn);
         break;
       }
       case Op_CMoveD:              // Convert trinary to binary-tree
@@ -2150,22 +2151,22 @@ void Matcher::find_shared( Node *n ) {
         // we could move this code up next to the graph reshaping for IfNodes
         // or vice-versa, but I do not want to debug this for Ladybird.
         // 10/2/2000 CNC.
-        Node *pair1 = new (C, 3) BinaryNode(n->in(1),n->in(1)->in(1));
+        Node *pair1 = new (C) BinaryNode(n->in(1),n->in(1)->in(1));
         n->set_req(1,pair1);
-        Node *pair2 = new (C, 3) BinaryNode(n->in(2),n->in(3));
+        Node *pair2 = new (C) BinaryNode(n->in(2),n->in(3));
         n->set_req(2,pair2);
         n->del_req(3);
         break;
       }
       case Op_LoopLimit: {
-        Node *pair1 = new (C, 3) BinaryNode(n->in(1),n->in(2));
+        Node *pair1 = new (C) BinaryNode(n->in(1),n->in(2));
         n->set_req(1,pair1);
         n->set_req(2,n->in(3));
         n->del_req(3);
         break;
       }
       case Op_StrEquals: {
-        Node *pair1 = new (C, 3) BinaryNode(n->in(2),n->in(3));
+        Node *pair1 = new (C) BinaryNode(n->in(2),n->in(3));
         n->set_req(2,pair1);
         n->set_req(3,n->in(4));
         n->del_req(4);
@@ -2173,9 +2174,9 @@ void Matcher::find_shared( Node *n ) {
       }
       case Op_StrComp:
       case Op_StrIndexOf: {
-        Node *pair1 = new (C, 3) BinaryNode(n->in(2),n->in(3));
+        Node *pair1 = new (C) BinaryNode(n->in(2),n->in(3));
         n->set_req(2,pair1);
-        Node *pair2 = new (C, 3) BinaryNode(n->in(4),n->in(5));
+        Node *pair2 = new (C) BinaryNode(n->in(4),n->in(5));
         n->set_req(3,pair2);
         n->del_req(5);
         n->del_req(4);
@@ -2277,7 +2278,7 @@ void Matcher::validate_null_checks( ) {
     if (has_new_node(val)) {
       Node* new_val = new_node(val);
       if (is_decoden) {
-        assert(val->is_DecodeN() && val->in(0) == NULL, "sanity");
+        assert(val->is_DecodeNarrowPtr() && val->in(0) == NULL, "sanity");
         // Note: new_val may have a control edge if
         // the original ideal node DecodeN was matched before
         // it was unpinned in Matcher::collect_null_checks().
diff --git a/hotspot/src/share/vm/opto/matcher.hpp b/hotspot/src/share/vm/opto/matcher.hpp
index 51282db370f..280b8ad8865 100644
--- a/hotspot/src/share/vm/opto/matcher.hpp
+++ b/hotspot/src/share/vm/opto/matcher.hpp
@@ -261,6 +261,7 @@ public:
 
   // Vector ideal reg
   static const int vector_ideal_reg(int len);
+  static const int vector_shift_count_ideal_reg(int len);
 
   // CPU supports misaligned vectors store/load.
   static const bool misaligned_vectors_ok();
@@ -379,6 +380,7 @@ public:
   static const bool clone_shift_expressions;
 
   static bool narrow_oop_use_complex_address();
+  static bool narrow_klass_use_complex_address();
 
   // Generate implicit null check for narrow oops if it can fold
   // into address expression (x64).
diff --git a/hotspot/src/share/vm/opto/memnode.cpp b/hotspot/src/share/vm/opto/memnode.cpp
index 1cbe3175693..b83e6253b03 100644
--- a/hotspot/src/share/vm/opto/memnode.cpp
+++ b/hotspot/src/share/vm/opto/memnode.cpp
@@ -714,10 +714,12 @@ Node *MemNode::Ideal_common_DU_postCCP( PhaseCCP *ccp, Node* n, Node* adr ) {
         continue;
 
       case Op_DecodeN:         // No change to NULL-ness, so peek thru
+      case Op_DecodeNKlass:
         adr = adr->in(1);
         continue;
 
       case Op_EncodeP:
+      case Op_EncodePKlass:
         // EncodeP node's control edge could be set by this method
         // when EncodeP node depends on CastPP node.
         //
@@ -794,6 +796,7 @@ Node *MemNode::Ideal_common_DU_postCCP( PhaseCCP *ccp, Node* n, Node* adr ) {
       case Op_LoadNKlass:       // Loading from within a klass
       case Op_ConP:             // Loading from a klass
       case Op_ConN:             // Loading from a klass
+      case Op_ConNKlass:        // Loading from a klass
       case Op_CreateEx:         // Sucking up the guts of an exception oop
       case Op_Con:              // Reading from TLS
       case Op_CMoveP:           // CMoveP is pinned
@@ -883,25 +886,25 @@ Node *LoadNode::make( PhaseGVN& gvn, Node *ctl, Node *mem, Node *adr, const Type
           rt->isa_oopptr() || is_immutable_value(adr),
           "raw memory operations should have control edge");
   switch (bt) {
-  case T_BOOLEAN: return new (C, 3) LoadUBNode(ctl, mem, adr, adr_type, rt->is_int()    );
-  case T_BYTE:    return new (C, 3) LoadBNode (ctl, mem, adr, adr_type, rt->is_int()    );
-  case T_INT:     return new (C, 3) LoadINode (ctl, mem, adr, adr_type, rt->is_int()    );
-  case T_CHAR:    return new (C, 3) LoadUSNode(ctl, mem, adr, adr_type, rt->is_int()    );
-  case T_SHORT:   return new (C, 3) LoadSNode (ctl, mem, adr, adr_type, rt->is_int()    );
-  case T_LONG:    return new (C, 3) LoadLNode (ctl, mem, adr, adr_type, rt->is_long()   );
-  case T_FLOAT:   return new (C, 3) LoadFNode (ctl, mem, adr, adr_type, rt              );
-  case T_DOUBLE:  return new (C, 3) LoadDNode (ctl, mem, adr, adr_type, rt              );
-  case T_ADDRESS: return new (C, 3) LoadPNode (ctl, mem, adr, adr_type, rt->is_ptr()    );
+  case T_BOOLEAN: return new (C) LoadUBNode(ctl, mem, adr, adr_type, rt->is_int()    );
+  case T_BYTE:    return new (C) LoadBNode (ctl, mem, adr, adr_type, rt->is_int()    );
+  case T_INT:     return new (C) LoadINode (ctl, mem, adr, adr_type, rt->is_int()    );
+  case T_CHAR:    return new (C) LoadUSNode(ctl, mem, adr, adr_type, rt->is_int()    );
+  case T_SHORT:   return new (C) LoadSNode (ctl, mem, adr, adr_type, rt->is_int()    );
+  case T_LONG:    return new (C) LoadLNode (ctl, mem, adr, adr_type, rt->is_long()   );
+  case T_FLOAT:   return new (C) LoadFNode (ctl, mem, adr, adr_type, rt              );
+  case T_DOUBLE:  return new (C) LoadDNode (ctl, mem, adr, adr_type, rt              );
+  case T_ADDRESS: return new (C) LoadPNode (ctl, mem, adr, adr_type, rt->is_ptr()    );
   case T_OBJECT:
 #ifdef _LP64
     if (adr->bottom_type()->is_ptr_to_narrowoop()) {
-      Node* load  = gvn.transform(new (C, 3) LoadNNode(ctl, mem, adr, adr_type, rt->make_narrowoop()));
-      return new (C, 2) DecodeNNode(load, load->bottom_type()->make_ptr());
+      Node* load  = gvn.transform(new (C) LoadNNode(ctl, mem, adr, adr_type, rt->make_narrowoop()));
+      return new (C) DecodeNNode(load, load->bottom_type()->make_ptr());
     } else
 #endif
     {
-      assert(!adr->bottom_type()->is_ptr_to_narrowoop(), "should have got back a narrow oop");
-      return new (C, 3) LoadPNode(ctl, mem, adr, adr_type, rt->is_oopptr());
+      assert(!adr->bottom_type()->is_ptr_to_narrowoop() && !adr->bottom_type()->is_ptr_to_narrowklass(), "should have got back a narrow oop");
+      return new (C) LoadPNode(ctl, mem, adr, adr_type, rt->is_oopptr());
     }
   }
   ShouldNotReachHere();
@@ -910,7 +913,7 @@ Node *LoadNode::make( PhaseGVN& gvn, Node *ctl, Node *mem, Node *adr, const Type
 
 LoadLNode* LoadLNode::make_atomic(Compile *C, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, const Type* rt) {
   bool require_atomic = true;
-  return new (C, 3) LoadLNode(ctl, mem, adr, adr_type, rt->is_long(), require_atomic);
+  return new (C) LoadLNode(ctl, mem, adr, adr_type, rt->is_long(), require_atomic);
 }
 
 
@@ -1244,20 +1247,20 @@ Node* LoadNode::eliminate_autobox(PhaseGVN* phase) {
           // Add up all the offsets making of the address of the load
           Node* result = elements[0];
           for (int i = 1; i < count; i++) {
-            result = phase->transform(new (phase->C, 3) AddXNode(result, elements[i]));
+            result = phase->transform(new (phase->C) AddXNode(result, elements[i]));
           }
           // Remove the constant offset from the address and then
           // remove the scaling of the offset to recover the original index.
-          result = phase->transform(new (phase->C, 3) AddXNode(result, phase->MakeConX(-offset)));
+          result = phase->transform(new (phase->C) AddXNode(result, phase->MakeConX(-offset)));
           if (result->Opcode() == Op_LShiftX && result->in(2) == phase->intcon(shift)) {
             // Peel the shift off directly but wrap it in a dummy node
             // since Ideal can't return existing nodes
-            result = new (phase->C, 3) RShiftXNode(result->in(1), phase->intcon(0));
+            result = new (phase->C) RShiftXNode(result->in(1), phase->intcon(0));
           } else {
-            result = new (phase->C, 3) RShiftXNode(result, phase->intcon(shift));
+            result = new (phase->C) RShiftXNode(result, phase->intcon(shift));
           }
 #ifdef _LP64
-          result = new (phase->C, 2) ConvL2INode(phase->transform(result));
+          result = new (phase->C) ConvL2INode(phase->transform(result));
 #endif
           return result;
         }
@@ -1320,7 +1323,7 @@ Node *LoadNode::split_through_phi(PhaseGVN *phase) {
   int this_offset = addr_t->offset();
   int this_iid    = addr_t->is_oopptr()->instance_id();
   PhaseIterGVN *igvn = phase->is_IterGVN();
-  Node *phi = new (igvn->C, region->req()) PhiNode(region, this_type, NULL, this_iid, this_index, this_offset);
+  Node *phi = new (igvn->C) PhiNode(region, this_type, NULL, this_iid, this_index, this_offset);
   for (uint i = 1; i < region->req(); i++) {
     Node *x;
     Node* the_clone = NULL;
@@ -1671,9 +1674,9 @@ const Type *LoadNode::Value( PhaseTransform *phase ) const {
       }
       const Type* aift = load_array_final_field(tkls, klass);
       if (aift != NULL)  return aift;
-      if (tkls->offset() == in_bytes(arrayKlass::component_mirror_offset())
+      if (tkls->offset() == in_bytes(ArrayKlass::component_mirror_offset())
           && klass->is_array_klass()) {
-        // The field is arrayKlass::_component_mirror.  Return its (constant) value.
+        // The field is ArrayKlass::_component_mirror.  Return its (constant) value.
         // (Folds up aClassConstant.getComponentType, common in Arrays.copyOf.)
         assert(Opcode() == Op_LoadP, "must load an oop from _component_mirror");
         return TypeInstPtr::make(klass->as_array_klass()->component_mirror());
@@ -1771,8 +1774,8 @@ Node *LoadBNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   Node* mem = in(MemNode::Memory);
   Node* value = can_see_stored_value(mem,phase);
   if( value && !phase->type(value)->higher_equal( _type ) ) {
-    Node *result = phase->transform( new (phase->C, 3) LShiftINode(value, phase->intcon(24)) );
-    return new (phase->C, 3) RShiftINode(result, phase->intcon(24));
+    Node *result = phase->transform( new (phase->C) LShiftINode(value, phase->intcon(24)) );
+    return new (phase->C) RShiftINode(result, phase->intcon(24));
   }
   // Identity call will handle the case where truncation is not needed.
   return LoadNode::Ideal(phase, can_reshape);
@@ -1803,7 +1806,7 @@ Node* LoadUBNode::Ideal(PhaseGVN* phase, bool can_reshape) {
   Node* mem = in(MemNode::Memory);
   Node* value = can_see_stored_value(mem, phase);
   if (value && !phase->type(value)->higher_equal(_type))
-    return new (phase->C, 3) AndINode(value, phase->intcon(0xFF));
+    return new (phase->C) AndINode(value, phase->intcon(0xFF));
   // Identity call will handle the case where truncation is not needed.
   return LoadNode::Ideal(phase, can_reshape);
 }
@@ -1833,7 +1836,7 @@ Node *LoadUSNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   Node* mem = in(MemNode::Memory);
   Node* value = can_see_stored_value(mem,phase);
   if( value && !phase->type(value)->higher_equal( _type ) )
-    return new (phase->C, 3) AndINode(value,phase->intcon(0xFFFF));
+    return new (phase->C) AndINode(value,phase->intcon(0xFFFF));
   // Identity call will handle the case where truncation is not needed.
   return LoadNode::Ideal(phase, can_reshape);
 }
@@ -1863,8 +1866,8 @@ Node *LoadSNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   Node* mem = in(MemNode::Memory);
   Node* value = can_see_stored_value(mem,phase);
   if( value && !phase->type(value)->higher_equal( _type ) ) {
-    Node *result = phase->transform( new (phase->C, 3) LShiftINode(value, phase->intcon(16)) );
-    return new (phase->C, 3) RShiftINode(result, phase->intcon(16));
+    Node *result = phase->transform( new (phase->C) LShiftINode(value, phase->intcon(16)) );
+    return new (phase->C) RShiftINode(result, phase->intcon(16));
   }
   // Identity call will handle the case where truncation is not needed.
   return LoadNode::Ideal(phase, can_reshape);
@@ -1894,14 +1897,14 @@ Node *LoadKlassNode::make( PhaseGVN& gvn, Node *mem, Node *adr, const TypePtr* a
   const TypePtr *adr_type = adr->bottom_type()->isa_ptr();
   assert(adr_type != NULL, "expecting TypeKlassPtr");
 #ifdef _LP64
-  if (adr_type->is_ptr_to_narrowoop()) {
+  if (adr_type->is_ptr_to_narrowklass()) {
     assert(UseCompressedKlassPointers, "no compressed klasses");
-    Node* load_klass = gvn.transform(new (C, 3) LoadNKlassNode(ctl, mem, adr, at, tk->make_narrowoop()));
-    return new (C, 2) DecodeNNode(load_klass, load_klass->bottom_type()->make_ptr());
+    Node* load_klass = gvn.transform(new (C) LoadNKlassNode(ctl, mem, adr, at, tk->make_narrowklass()));
+    return new (C) DecodeNKlassNode(load_klass, load_klass->bottom_type()->make_ptr());
   }
 #endif
-  assert(!adr_type->is_ptr_to_narrowoop(), "should have got back a narrow oop");
-  return new (C, 3) LoadKlassNode(ctl, mem, adr, at, tk);
+  assert(!adr_type->is_ptr_to_narrowklass() && !adr_type->is_ptr_to_narrowoop(), "should have got back a narrow oop");
+  return new (C) LoadKlassNode(ctl, mem, adr, at, tk);
 }
 
 //------------------------------Value------------------------------------------
@@ -2014,7 +2017,7 @@ const Type *LoadNode::klass_value_common( PhaseTransform *phase ) const {
     if( !klass->is_loaded() )
       return _type;             // Bail out if not loaded
     if( klass->is_obj_array_klass() &&
-        tkls->offset() == in_bytes(objArrayKlass::element_klass_offset())) {
+        tkls->offset() == in_bytes(ObjArrayKlass::element_klass_offset())) {
       ciKlass* elem = klass->as_obj_array_klass()->element_klass();
       // // Always returning precise element type is incorrect,
       // // e.g., element type could be object and array may contain strings
@@ -2067,7 +2070,7 @@ Node* LoadNode::klass_identity_common(PhaseTransform *phase ) {
   }
 
   // Simplify k.java_mirror.as_klass to plain k, where k is a Klass*.
-  // Simplify ak.component_mirror.array_klass to plain ak, ak an arrayKlass.
+  // Simplify ak.component_mirror.array_klass to plain ak, ak an ArrayKlass.
   // See inline_native_Class_query for occurrences of these patterns.
   // Java Example:  x.getClass().isAssignableFrom(y)
   // Java Example:  Array.newInstance(x.getClass().getComponentType(), n)
@@ -2080,7 +2083,7 @@ Node* LoadNode::klass_identity_common(PhaseTransform *phase ) {
       && (offset == java_lang_Class::klass_offset_in_bytes() ||
           offset == java_lang_Class::array_klass_offset_in_bytes())) {
     // We are loading a special hidden field from a Class mirror,
-    // the field which points to its Klass or arrayKlass metaobject.
+    // the field which points to its Klass or ArrayKlass metaobject.
     if (base->is_Load()) {
       Node* adr2 = base->in(MemNode::Address);
       const TypeKlassPtr* tkls = phase->type(adr2)->isa_klassptr();
@@ -2091,7 +2094,7 @@ Node* LoadNode::klass_identity_common(PhaseTransform *phase ) {
           ) {
         int mirror_field = in_bytes(Klass::java_mirror_offset());
         if (offset == java_lang_Class::array_klass_offset_in_bytes()) {
-          mirror_field = in_bytes(arrayKlass::component_mirror_offset());
+          mirror_field = in_bytes(ArrayKlass::component_mirror_offset());
         }
         if (tkls->offset() == mirror_field) {
           return adr2->in(AddPNode::Base);
@@ -2110,7 +2113,7 @@ const Type *LoadNKlassNode::Value( PhaseTransform *phase ) const {
   if (t == Type::TOP)
     return t;
 
-  return t->make_narrowoop();
+  return t->make_narrowklass();
 }
 
 //------------------------------Identity---------------------------------------
@@ -2121,9 +2124,10 @@ Node* LoadNKlassNode::Identity( PhaseTransform *phase ) {
 
   const Type *t = phase->type( x );
   if( t == Type::TOP ) return x;
-  if( t->isa_narrowoop()) return x;
+  if( t->isa_narrowklass()) return x;
+  assert (!t->isa_narrowoop(), "no narrow oop here");
 
-  return phase->transform(new (phase->C, 2) EncodePNode(x, t->make_narrowoop()));
+  return phase->transform(new (phase->C) EncodePKlassNode(x, t->make_narrowklass()));
 }
 
 //------------------------------Value-----------------------------------------
@@ -2217,26 +2221,29 @@ StoreNode* StoreNode::make( PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, cons
 
   switch (bt) {
   case T_BOOLEAN:
-  case T_BYTE:    return new (C, 4) StoreBNode(ctl, mem, adr, adr_type, val);
-  case T_INT:     return new (C, 4) StoreINode(ctl, mem, adr, adr_type, val);
+  case T_BYTE:    return new (C) StoreBNode(ctl, mem, adr, adr_type, val);
+  case T_INT:     return new (C) StoreINode(ctl, mem, adr, adr_type, val);
   case T_CHAR:
-  case T_SHORT:   return new (C, 4) StoreCNode(ctl, mem, adr, adr_type, val);
-  case T_LONG:    return new (C, 4) StoreLNode(ctl, mem, adr, adr_type, val);
-  case T_FLOAT:   return new (C, 4) StoreFNode(ctl, mem, adr, adr_type, val);
-  case T_DOUBLE:  return new (C, 4) StoreDNode(ctl, mem, adr, adr_type, val);
+  case T_SHORT:   return new (C) StoreCNode(ctl, mem, adr, adr_type, val);
+  case T_LONG:    return new (C) StoreLNode(ctl, mem, adr, adr_type, val);
+  case T_FLOAT:   return new (C) StoreFNode(ctl, mem, adr, adr_type, val);
+  case T_DOUBLE:  return new (C) StoreDNode(ctl, mem, adr, adr_type, val);
   case T_METADATA:
   case T_ADDRESS:
   case T_OBJECT:
 #ifdef _LP64
-    if (adr->bottom_type()->is_ptr_to_narrowoop() ||
-        (UseCompressedKlassPointers && val->bottom_type()->isa_klassptr() &&
-         adr->bottom_type()->isa_rawptr())) {
-      val = gvn.transform(new (C, 2) EncodePNode(val, val->bottom_type()->make_narrowoop()));
-      return new (C, 4) StoreNNode(ctl, mem, adr, adr_type, val);
-    } else
+    if (adr->bottom_type()->is_ptr_to_narrowoop()) {
+      val = gvn.transform(new (C) EncodePNode(val, val->bottom_type()->make_narrowoop()));
+      return new (C) StoreNNode(ctl, mem, adr, adr_type, val);
+    } else if (adr->bottom_type()->is_ptr_to_narrowklass() ||
+               (UseCompressedKlassPointers && val->bottom_type()->isa_klassptr() &&
+                adr->bottom_type()->isa_rawptr())) {
+      val = gvn.transform(new (C) EncodePKlassNode(val, val->bottom_type()->make_narrowklass()));
+      return new (C) StoreNKlassNode(ctl, mem, adr, adr_type, val);
+    }
 #endif
     {
-      return new (C, 4) StorePNode(ctl, mem, adr, adr_type, val);
+      return new (C) StorePNode(ctl, mem, adr, adr_type, val);
     }
   }
   ShouldNotReachHere();
@@ -2245,7 +2252,7 @@ StoreNode* StoreNode::make( PhaseGVN& gvn, Node* ctl, Node* mem, Node* adr, cons
 
 StoreLNode* StoreLNode::make_atomic(Compile *C, Node* ctl, Node* mem, Node* adr, const TypePtr* adr_type, Node* val) {
   bool require_atomic = true;
-  return new (C, 4) StoreLNode(ctl, mem, adr, adr_type, val, require_atomic);
+  return new (C) StoreLNode(ctl, mem, adr, adr_type, val, require_atomic);
 }
 
 
@@ -2552,14 +2559,38 @@ const Type * SCMemProjNode::Value( PhaseTransform *phase ) const
 }
 
 //=============================================================================
-LoadStoreNode::LoadStoreNode( Node *c, Node *mem, Node *adr, Node *val, Node *ex ) : Node(5) {
+//----------------------------------LoadStoreNode------------------------------
+LoadStoreNode::LoadStoreNode( Node *c, Node *mem, Node *adr, Node *val, const TypePtr* at, const Type* rt, uint required )
+  : Node(required),
+    _type(rt),
+    _adr_type(at)
+{
   init_req(MemNode::Control, c  );
   init_req(MemNode::Memory , mem);
   init_req(MemNode::Address, adr);
   init_req(MemNode::ValueIn, val);
-  init_req(         ExpectedIn, ex );
   init_class_id(Class_LoadStore);
+}
 
+uint LoadStoreNode::ideal_reg() const {
+  return _type->ideal_reg();
+}
+
+bool LoadStoreNode::result_not_used() const {
+  for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
+    Node *x = fast_out(i);
+    if (x->Opcode() == Op_SCMemProj) continue;
+    return false;
+  }
+  return true;
+}
+
+uint LoadStoreNode::size_of() const { return sizeof(*this); }
+
+//=============================================================================
+//----------------------------------LoadStoreConditionalNode--------------------
+LoadStoreConditionalNode::LoadStoreConditionalNode( Node *c, Node *mem, Node *adr, Node *val, Node *ex ) : LoadStoreNode(c, mem, adr, val, NULL, TypeInt::BOOL, 5) {
+  init_req(ExpectedIn, ex );
 }
 
 //=============================================================================
@@ -2614,12 +2645,12 @@ Node *ClearArrayNode::Ideal(PhaseGVN *phase, bool can_reshape){
 
   Node *zero = phase->makecon(TypeLong::ZERO);
   Node *off  = phase->MakeConX(BytesPerLong);
-  mem = new (phase->C, 4) StoreLNode(in(0),mem,adr,atp,zero);
+  mem = new (phase->C) StoreLNode(in(0),mem,adr,atp,zero);
   count--;
   while( count-- ) {
     mem = phase->transform(mem);
-    adr = phase->transform(new (phase->C, 4) AddPNode(base,adr,off));
-    mem = new (phase->C, 4) StoreLNode(in(0),mem,adr,atp,zero);
+    adr = phase->transform(new (phase->C) AddPNode(base,adr,off));
+    mem = new (phase->C) StoreLNode(in(0),mem,adr,atp,zero);
   }
   return mem;
 }
@@ -2660,7 +2691,7 @@ Node* ClearArrayNode::clear_memory(Node* ctl, Node* mem, Node* dest,
 
   int unit = BytesPerLong;
   if ((offset % unit) != 0) {
-    Node* adr = new (C, 4) AddPNode(dest, dest, phase->MakeConX(offset));
+    Node* adr = new (C) AddPNode(dest, dest, phase->MakeConX(offset));
     adr = phase->transform(adr);
     const TypePtr* atp = TypeRawPtr::BOTTOM;
     mem = StoreNode::make(*phase, ctl, mem, adr, atp, phase->zerocon(T_INT), T_INT);
@@ -2690,16 +2721,16 @@ Node* ClearArrayNode::clear_memory(Node* ctl, Node* mem, Node* dest,
   // Scale to the unit required by the CPU:
   if (!Matcher::init_array_count_is_in_bytes) {
     Node* shift = phase->intcon(exact_log2(unit));
-    zbase = phase->transform( new(C,3) URShiftXNode(zbase, shift) );
-    zend  = phase->transform( new(C,3) URShiftXNode(zend,  shift) );
+    zbase = phase->transform( new(C) URShiftXNode(zbase, shift) );
+    zend  = phase->transform( new(C) URShiftXNode(zend,  shift) );
   }
 
-  Node* zsize = phase->transform( new(C,3) SubXNode(zend, zbase) );
+  Node* zsize = phase->transform( new(C) SubXNode(zend, zbase) );
   Node* zinit = phase->zerocon((unit == BytesPerLong) ? T_LONG : T_INT);
 
   // Bulk clear double-words
-  Node* adr = phase->transform( new(C,4) AddPNode(dest, dest, start_offset) );
-  mem = new (C, 4) ClearArrayNode(ctl, mem, zsize, adr);
+  Node* adr = phase->transform( new(C) AddPNode(dest, dest, start_offset) );
+  mem = new (C) ClearArrayNode(ctl, mem, zsize, adr);
   return phase->transform(mem);
 }
 
@@ -2723,7 +2754,7 @@ Node* ClearArrayNode::clear_memory(Node* ctl, Node* mem, Node* dest,
                        start_offset, phase->MakeConX(done_offset), phase);
   }
   if (done_offset < end_offset) { // emit the final 32-bit store
-    Node* adr = new (C, 4) AddPNode(dest, dest, phase->MakeConX(done_offset));
+    Node* adr = new (C) AddPNode(dest, dest, phase->MakeConX(done_offset));
     adr = phase->transform(adr);
     const TypePtr* atp = TypeRawPtr::BOTTOM;
     mem = StoreNode::make(*phase, ctl, mem, adr, atp, phase->zerocon(T_INT), T_INT);
@@ -2789,16 +2820,15 @@ uint MemBarNode::cmp( const Node &n ) const {
 
 //------------------------------make-------------------------------------------
 MemBarNode* MemBarNode::make(Compile* C, int opcode, int atp, Node* pn) {
-  int len = Precedent + (pn == NULL? 0: 1);
   switch (opcode) {
-  case Op_MemBarAcquire:   return new(C, len) MemBarAcquireNode(C,  atp, pn);
-  case Op_MemBarRelease:   return new(C, len) MemBarReleaseNode(C,  atp, pn);
-  case Op_MemBarAcquireLock: return new(C, len) MemBarAcquireLockNode(C,  atp, pn);
-  case Op_MemBarReleaseLock: return new(C, len) MemBarReleaseLockNode(C,  atp, pn);
-  case Op_MemBarVolatile:  return new(C, len) MemBarVolatileNode(C, atp, pn);
-  case Op_MemBarCPUOrder:  return new(C, len) MemBarCPUOrderNode(C, atp, pn);
-  case Op_Initialize:      return new(C, len) InitializeNode(C,     atp, pn);
-  case Op_MemBarStoreStore: return new(C, len) MemBarStoreStoreNode(C,  atp, pn);
+  case Op_MemBarAcquire:   return new(C) MemBarAcquireNode(C,  atp, pn);
+  case Op_MemBarRelease:   return new(C) MemBarReleaseNode(C,  atp, pn);
+  case Op_MemBarAcquireLock: return new(C) MemBarAcquireLockNode(C,  atp, pn);
+  case Op_MemBarReleaseLock: return new(C) MemBarReleaseLockNode(C,  atp, pn);
+  case Op_MemBarVolatile:  return new(C) MemBarVolatileNode(C, atp, pn);
+  case Op_MemBarCPUOrder:  return new(C) MemBarCPUOrderNode(C, atp, pn);
+  case Op_Initialize:      return new(C) InitializeNode(C,     atp, pn);
+  case Op_MemBarStoreStore: return new(C) MemBarStoreStoreNode(C,  atp, pn);
   default:                 ShouldNotReachHere(); return NULL;
   }
 }
@@ -2828,7 +2858,7 @@ Node *MemBarNode::Ideal(PhaseGVN *phase, bool can_reshape) {
         igvn->replace_node(proj_out(TypeFunc::Control), in(TypeFunc::Control));
         // Must return either the original node (now dead) or a new node
         // (Do not return a top here, since that would break the uniqueness of top.)
-        return new (phase->C, 1) ConINode(TypeInt::ZERO);
+        return new (phase->C) ConINode(TypeInt::ZERO);
       }
     }
   }
@@ -2849,7 +2879,7 @@ Node *MemBarNode::match( const ProjNode *proj, const Matcher *m ) {
   switch (proj->_con) {
   case TypeFunc::Control:
   case TypeFunc::Memory:
-    return new (m->C, 1) MachProjNode(this,proj->_con,RegMask::Empty,MachProjNode::unmatched_proj);
+    return new (m->C) MachProjNode(this,proj->_con,RegMask::Empty,MachProjNode::unmatched_proj);
   }
   ShouldNotReachHere();
   return NULL;
@@ -3193,7 +3223,7 @@ Node* InitializeNode::make_raw_address(intptr_t offset,
   Node* addr = in(RawAddress);
   if (offset != 0) {
     Compile* C = phase->C;
-    addr = phase->transform( new (C, 4) AddPNode(C->top(), addr,
+    addr = phase->transform( new (C) AddPNode(C->top(), addr,
                                                  phase->MakeConX(offset)) );
   }
   return addr;
@@ -3882,7 +3912,7 @@ MergeMemNode::MergeMemNode(Node *new_base) : Node(1+Compile::AliasIdxRaw) {
 // Make a new, untransformed MergeMem with the same base as 'mem'.
 // If mem is itself a MergeMem, populate the result with the same edges.
 MergeMemNode* MergeMemNode::make(Compile* C, Node* mem) {
-  return new(C, 1+Compile::AliasIdxRaw) MergeMemNode(mem);
+  return new(C) MergeMemNode(mem);
 }
 
 //------------------------------cmp--------------------------------------------
diff --git a/hotspot/src/share/vm/opto/memnode.hpp b/hotspot/src/share/vm/opto/memnode.hpp
index f79f615d18f..92a3d12feba 100644
--- a/hotspot/src/share/vm/opto/memnode.hpp
+++ b/hotspot/src/share/vm/opto/memnode.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -274,18 +274,6 @@ public:
   virtual BasicType memory_type() const { return T_INT; }
 };
 
-//------------------------------LoadUI2LNode-----------------------------------
-// Load an unsigned integer into long from memory
-class LoadUI2LNode : public LoadNode {
-public:
-  LoadUI2LNode(Node* c, Node* mem, Node* adr, const TypePtr* at, const TypeLong* t = TypeLong::UINT)
-    : LoadNode(c, mem, adr, at, t) {}
-  virtual int Opcode() const;
-  virtual uint ideal_reg() const { return Op_RegL; }
-  virtual int store_Opcode() const { return Op_StoreL; }
-  virtual BasicType memory_type() const { return T_LONG; }
-};
-
 //------------------------------LoadRangeNode----------------------------------
 // Load an array length from the array
 class LoadRangeNode : public LoadINode {
@@ -437,12 +425,12 @@ public:
 // Load a narrow Klass from an object.
 class LoadNKlassNode : public LoadNNode {
 public:
-  LoadNKlassNode( Node *c, Node *mem, Node *adr, const TypePtr *at, const TypeNarrowOop *tk )
+  LoadNKlassNode( Node *c, Node *mem, Node *adr, const TypePtr *at, const TypeNarrowKlass *tk )
     : LoadNNode(c,mem,adr,at,tk) {}
   virtual int Opcode() const;
   virtual uint ideal_reg() const { return Op_RegN; }
-  virtual int store_Opcode() const { return Op_StoreN; }
-  virtual BasicType memory_type() const { return T_NARROWOOP; }
+  virtual int store_Opcode() const { return Op_StoreNKlass; }
+  virtual BasicType memory_type() const { return T_NARROWKLASS; }
 
   virtual const Type *Value( PhaseTransform *phase ) const;
   virtual Node *Identity( PhaseTransform *phase );
@@ -593,6 +581,15 @@ public:
   virtual BasicType memory_type() const { return T_NARROWOOP; }
 };
 
+//------------------------------StoreNKlassNode--------------------------------------
+// Store narrow klass to memory
+class StoreNKlassNode : public StoreNNode {
+public:
+  StoreNKlassNode( Node *c, Node *mem, Node *adr, const TypePtr* at, Node *val ) : StoreNNode(c,mem,adr,at,val) {}
+  virtual int Opcode() const;
+  virtual BasicType memory_type() const { return T_NARROWKLASS; }
+};
+
 //------------------------------StoreCMNode-----------------------------------
 // Store card-mark byte to memory for CM
 // The last StoreCM before a SafePoint must be preserved and occur after its "oop" store
@@ -657,23 +654,36 @@ public:
 //------------------------------LoadStoreNode---------------------------
 // Note: is_Mem() method returns 'true' for this class.
 class LoadStoreNode : public Node {
+private:
+  const Type* const _type;      // What kind of value is loaded?
+  const TypePtr* _adr_type;     // What kind of memory is being addressed?
+  virtual uint size_of() const; // Size is bigger
+public:
+  LoadStoreNode( Node *c, Node *mem, Node *adr, Node *val, const TypePtr* at, const Type* rt, uint required );
+  virtual bool depends_only_on_test() const { return false; }
+  virtual uint match_edge(uint idx) const { return idx == MemNode::Address || idx == MemNode::ValueIn; }
+
+  virtual const Type *bottom_type() const { return _type; }
+  virtual uint ideal_reg() const;
+  virtual const class TypePtr *adr_type() const { return _adr_type; }  // returns bottom_type of address
+
+  bool result_not_used() const;
+};
+
+class LoadStoreConditionalNode : public LoadStoreNode {
 public:
   enum {
     ExpectedIn = MemNode::ValueIn+1 // One more input than MemNode
   };
-  LoadStoreNode( Node *c, Node *mem, Node *adr, Node *val, Node *ex);
-  virtual bool depends_only_on_test() const { return false; }
-  virtual const Type *bottom_type() const { return TypeInt::BOOL; }
-  virtual uint ideal_reg() const { return Op_RegI; }
-  virtual uint match_edge(uint idx) const { return idx == MemNode::Address || idx == MemNode::ValueIn; }
+  LoadStoreConditionalNode(Node *c, Node *mem, Node *adr, Node *val, Node *ex);
 };
 
 //------------------------------StorePConditionalNode---------------------------
 // Conditionally store pointer to memory, if no change since prior
 // load-locked.  Sets flags for success or failure of the store.
-class StorePConditionalNode : public LoadStoreNode {
+class StorePConditionalNode : public LoadStoreConditionalNode {
 public:
-  StorePConditionalNode( Node *c, Node *mem, Node *adr, Node *val, Node *ll ) : LoadStoreNode(c, mem, adr, val, ll) { }
+  StorePConditionalNode( Node *c, Node *mem, Node *adr, Node *val, Node *ll ) : LoadStoreConditionalNode(c, mem, adr, val, ll) { }
   virtual int Opcode() const;
   // Produces flags
   virtual uint ideal_reg() const { return Op_RegFlags; }
@@ -682,9 +692,9 @@ public:
 //------------------------------StoreIConditionalNode---------------------------
 // Conditionally store int to memory, if no change since prior
 // load-locked.  Sets flags for success or failure of the store.
-class StoreIConditionalNode : public LoadStoreNode {
+class StoreIConditionalNode : public LoadStoreConditionalNode {
 public:
-  StoreIConditionalNode( Node *c, Node *mem, Node *adr, Node *val, Node *ii ) : LoadStoreNode(c, mem, adr, val, ii) { }
+  StoreIConditionalNode( Node *c, Node *mem, Node *adr, Node *val, Node *ii ) : LoadStoreConditionalNode(c, mem, adr, val, ii) { }
   virtual int Opcode() const;
   // Produces flags
   virtual uint ideal_reg() const { return Op_RegFlags; }
@@ -693,9 +703,9 @@ public:
 //------------------------------StoreLConditionalNode---------------------------
 // Conditionally store long to memory, if no change since prior
 // load-locked.  Sets flags for success or failure of the store.
-class StoreLConditionalNode : public LoadStoreNode {
+class StoreLConditionalNode : public LoadStoreConditionalNode {
 public:
-  StoreLConditionalNode( Node *c, Node *mem, Node *adr, Node *val, Node *ll ) : LoadStoreNode(c, mem, adr, val, ll) { }
+  StoreLConditionalNode( Node *c, Node *mem, Node *adr, Node *val, Node *ll ) : LoadStoreConditionalNode(c, mem, adr, val, ll) { }
   virtual int Opcode() const;
   // Produces flags
   virtual uint ideal_reg() const { return Op_RegFlags; }
@@ -703,32 +713,75 @@ public:
 
 
 //------------------------------CompareAndSwapLNode---------------------------
-class CompareAndSwapLNode : public LoadStoreNode {
+class CompareAndSwapLNode : public LoadStoreConditionalNode {
 public:
-  CompareAndSwapLNode( Node *c, Node *mem, Node *adr, Node *val, Node *ex) : LoadStoreNode(c, mem, adr, val, ex) { }
+  CompareAndSwapLNode( Node *c, Node *mem, Node *adr, Node *val, Node *ex) : LoadStoreConditionalNode(c, mem, adr, val, ex) { }
   virtual int Opcode() const;
 };
 
 
 //------------------------------CompareAndSwapINode---------------------------
-class CompareAndSwapINode : public LoadStoreNode {
+class CompareAndSwapINode : public LoadStoreConditionalNode {
 public:
-  CompareAndSwapINode( Node *c, Node *mem, Node *adr, Node *val, Node *ex) : LoadStoreNode(c, mem, adr, val, ex) { }
+  CompareAndSwapINode( Node *c, Node *mem, Node *adr, Node *val, Node *ex) : LoadStoreConditionalNode(c, mem, adr, val, ex) { }
   virtual int Opcode() const;
 };
 
 
 //------------------------------CompareAndSwapPNode---------------------------
-class CompareAndSwapPNode : public LoadStoreNode {
+class CompareAndSwapPNode : public LoadStoreConditionalNode {
 public:
-  CompareAndSwapPNode( Node *c, Node *mem, Node *adr, Node *val, Node *ex) : LoadStoreNode(c, mem, adr, val, ex) { }
+  CompareAndSwapPNode( Node *c, Node *mem, Node *adr, Node *val, Node *ex) : LoadStoreConditionalNode(c, mem, adr, val, ex) { }
   virtual int Opcode() const;
 };
 
 //------------------------------CompareAndSwapNNode---------------------------
-class CompareAndSwapNNode : public LoadStoreNode {
+class CompareAndSwapNNode : public LoadStoreConditionalNode {
 public:
-  CompareAndSwapNNode( Node *c, Node *mem, Node *adr, Node *val, Node *ex) : LoadStoreNode(c, mem, adr, val, ex) { }
+  CompareAndSwapNNode( Node *c, Node *mem, Node *adr, Node *val, Node *ex) : LoadStoreConditionalNode(c, mem, adr, val, ex) { }
+  virtual int Opcode() const;
+};
+
+//------------------------------GetAndAddINode---------------------------
+class GetAndAddINode : public LoadStoreNode {
+public:
+  GetAndAddINode( Node *c, Node *mem, Node *adr, Node *val, const TypePtr* at ) : LoadStoreNode(c, mem, adr, val, at, TypeInt::INT, 4) { }
+  virtual int Opcode() const;
+};
+
+//------------------------------GetAndAddLNode---------------------------
+class GetAndAddLNode : public LoadStoreNode {
+public:
+  GetAndAddLNode( Node *c, Node *mem, Node *adr, Node *val, const TypePtr* at ) : LoadStoreNode(c, mem, adr, val, at, TypeLong::LONG, 4) { }
+  virtual int Opcode() const;
+};
+
+
+//------------------------------GetAndSetINode---------------------------
+class GetAndSetINode : public LoadStoreNode {
+public:
+  GetAndSetINode( Node *c, Node *mem, Node *adr, Node *val, const TypePtr* at ) : LoadStoreNode(c, mem, adr, val, at, TypeInt::INT, 4) { }
+  virtual int Opcode() const;
+};
+
+//------------------------------GetAndSetINode---------------------------
+class GetAndSetLNode : public LoadStoreNode {
+public:
+  GetAndSetLNode( Node *c, Node *mem, Node *adr, Node *val, const TypePtr* at ) : LoadStoreNode(c, mem, adr, val, at, TypeLong::LONG, 4) { }
+  virtual int Opcode() const;
+};
+
+//------------------------------GetAndSetPNode---------------------------
+class GetAndSetPNode : public LoadStoreNode {
+public:
+  GetAndSetPNode( Node *c, Node *mem, Node *adr, Node *val, const TypePtr* at, const Type* t ) : LoadStoreNode(c, mem, adr, val, at, t, 4) { }
+  virtual int Opcode() const;
+};
+
+//------------------------------GetAndSetNNode---------------------------
+class GetAndSetNNode : public LoadStoreNode {
+public:
+  GetAndSetNNode( Node *c, Node *mem, Node *adr, Node *val, const TypePtr* at, const Type* t ) : LoadStoreNode(c, mem, adr, val, at, t, 4) { }
   virtual int Opcode() const;
 };
 
diff --git a/hotspot/src/share/vm/opto/mulnode.cpp b/hotspot/src/share/vm/opto/mulnode.cpp
index f08631928c6..4572a265e57 100644
--- a/hotspot/src/share/vm/opto/mulnode.cpp
+++ b/hotspot/src/share/vm/opto/mulnode.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -198,22 +198,22 @@ Node *MulINode::Ideal(PhaseGVN *phase, bool can_reshape) {
   Node *res = NULL;
   jint bit1 = con & -con;       // Extract low bit
   if( bit1 == con ) {           // Found a power of 2?
-    res = new (phase->C, 3) LShiftINode( in(1), phase->intcon(log2_intptr(bit1)) );
+    res = new (phase->C) LShiftINode( in(1), phase->intcon(log2_intptr(bit1)) );
   } else {
 
     // Check for constant with 2 bits set
     jint bit2 = con-bit1;
     bit2 = bit2 & -bit2;          // Extract 2nd bit
     if( bit2 + bit1 == con ) {    // Found all bits in con?
-      Node *n1 = phase->transform( new (phase->C, 3) LShiftINode( in(1), phase->intcon(log2_intptr(bit1)) ) );
-      Node *n2 = phase->transform( new (phase->C, 3) LShiftINode( in(1), phase->intcon(log2_intptr(bit2)) ) );
-      res = new (phase->C, 3) AddINode( n2, n1 );
+      Node *n1 = phase->transform( new (phase->C) LShiftINode( in(1), phase->intcon(log2_intptr(bit1)) ) );
+      Node *n2 = phase->transform( new (phase->C) LShiftINode( in(1), phase->intcon(log2_intptr(bit2)) ) );
+      res = new (phase->C) AddINode( n2, n1 );
 
     } else if (is_power_of_2(con+1)) {
       // Sleezy: power-of-2 -1.  Next time be generic.
       jint temp = (jint) (con + 1);
-      Node *n1 = phase->transform( new (phase->C, 3) LShiftINode( in(1), phase->intcon(log2_intptr(temp)) ) );
-      res = new (phase->C, 3) SubINode( n1, in(1) );
+      Node *n1 = phase->transform( new (phase->C) LShiftINode( in(1), phase->intcon(log2_intptr(temp)) ) );
+      res = new (phase->C) SubINode( n1, in(1) );
     } else {
       return MulNode::Ideal(phase, can_reshape);
     }
@@ -221,7 +221,7 @@ Node *MulINode::Ideal(PhaseGVN *phase, bool can_reshape) {
 
   if( sign_flip ) {             // Need to negate result?
     res = phase->transform(res);// Transform, before making the zero con
-    res = new (phase->C, 3) SubINode(phase->intcon(0),res);
+    res = new (phase->C) SubINode(phase->intcon(0),res);
   }
 
   return res;                   // Return final result
@@ -294,22 +294,22 @@ Node *MulLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   Node *res = NULL;
   jlong bit1 = con & -con;      // Extract low bit
   if( bit1 == con ) {           // Found a power of 2?
-    res = new (phase->C, 3) LShiftLNode( in(1), phase->intcon(log2_long(bit1)) );
+    res = new (phase->C) LShiftLNode( in(1), phase->intcon(log2_long(bit1)) );
   } else {
 
     // Check for constant with 2 bits set
     jlong bit2 = con-bit1;
     bit2 = bit2 & -bit2;          // Extract 2nd bit
     if( bit2 + bit1 == con ) {    // Found all bits in con?
-      Node *n1 = phase->transform( new (phase->C, 3) LShiftLNode( in(1), phase->intcon(log2_long(bit1)) ) );
-      Node *n2 = phase->transform( new (phase->C, 3) LShiftLNode( in(1), phase->intcon(log2_long(bit2)) ) );
-      res = new (phase->C, 3) AddLNode( n2, n1 );
+      Node *n1 = phase->transform( new (phase->C) LShiftLNode( in(1), phase->intcon(log2_long(bit1)) ) );
+      Node *n2 = phase->transform( new (phase->C) LShiftLNode( in(1), phase->intcon(log2_long(bit2)) ) );
+      res = new (phase->C) AddLNode( n2, n1 );
 
     } else if (is_power_of_2_long(con+1)) {
       // Sleezy: power-of-2 -1.  Next time be generic.
       jlong temp = (jlong) (con + 1);
-      Node *n1 = phase->transform( new (phase->C, 3) LShiftLNode( in(1), phase->intcon(log2_long(temp)) ) );
-      res = new (phase->C, 3) SubLNode( n1, in(1) );
+      Node *n1 = phase->transform( new (phase->C) LShiftLNode( in(1), phase->intcon(log2_long(temp)) ) );
+      res = new (phase->C) SubLNode( n1, in(1) );
     } else {
       return MulNode::Ideal(phase, can_reshape);
     }
@@ -317,7 +317,7 @@ Node *MulLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
 
   if( sign_flip ) {             // Need to negate result?
     res = phase->transform(res);// Transform, before making the zero con
-    res = new (phase->C, 3) SubLNode(phase->longcon(0),res);
+    res = new (phase->C) SubLNode(phase->longcon(0),res);
   }
 
   return res;                   // Return final result
@@ -476,27 +476,27 @@ Node *AndINode::Ideal(PhaseGVN *phase, bool can_reshape) {
   // Masking bits off of a Character?  Hi bits are already zero.
   if( lop == Op_LoadUS &&
       (mask & 0xFFFF0000) )     // Can we make a smaller mask?
-    return new (phase->C, 3) AndINode(load,phase->intcon(mask&0xFFFF));
+    return new (phase->C) AndINode(load,phase->intcon(mask&0xFFFF));
 
   // Masking bits off of a Short?  Loading a Character does some masking
   if (lop == Op_LoadS && (mask & 0xFFFF0000) == 0 ) {
-    Node *ldus = new (phase->C, 3) LoadUSNode(load->in(MemNode::Control),
+    Node *ldus = new (phase->C) LoadUSNode(load->in(MemNode::Control),
                                               load->in(MemNode::Memory),
                                               load->in(MemNode::Address),
                                               load->adr_type());
     ldus = phase->transform(ldus);
-    return new (phase->C, 3) AndINode(ldus, phase->intcon(mask & 0xFFFF));
+    return new (phase->C) AndINode(ldus, phase->intcon(mask & 0xFFFF));
   }
 
   // Masking sign bits off of a Byte?  Do an unsigned byte load plus
   // an and.
   if (lop == Op_LoadB && (mask & 0xFFFFFF00) == 0) {
-    Node* ldub = new (phase->C, 3) LoadUBNode(load->in(MemNode::Control),
+    Node* ldub = new (phase->C) LoadUBNode(load->in(MemNode::Control),
                                               load->in(MemNode::Memory),
                                               load->in(MemNode::Address),
                                               load->adr_type());
     ldub = phase->transform(ldub);
-    return new (phase->C, 3) AndINode(ldub, phase->intcon(mask));
+    return new (phase->C) AndINode(ldub, phase->intcon(mask));
   }
 
   // Masking off sign bits?  Dont make them!
@@ -510,8 +510,8 @@ Node *AndINode::Ideal(PhaseGVN *phase, bool can_reshape) {
       // bits survive.  NO sign-extension bits survive the maskings.
       if( (sign_bits_mask & mask) == 0 ) {
         // Use zero-fill shift instead
-        Node *zshift = phase->transform(new (phase->C, 3) URShiftINode(load->in(1),load->in(2)));
-        return new (phase->C, 3) AndINode( zshift, in(2) );
+        Node *zshift = phase->transform(new (phase->C) URShiftINode(load->in(1),load->in(2)));
+        return new (phase->C) AndINode( zshift, in(2) );
       }
     }
   }
@@ -521,7 +521,7 @@ Node *AndINode::Ideal(PhaseGVN *phase, bool can_reshape) {
   // plus 1) and the mask is of the low order bit.  Skip the negate.
   if( lop == Op_SubI && mask == 1 && load->in(1) &&
       phase->type(load->in(1)) == TypeInt::ZERO )
-    return new (phase->C, 3) AndINode( load->in(2), in(2) );
+    return new (phase->C) AndINode( load->in(2), in(2) );
 
   return MulNode::Ideal(phase, can_reshape);
 }
@@ -599,29 +599,15 @@ Node *AndLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   Node* in1 = in(1);
   uint op = in1->Opcode();
 
-  // Masking sign bits off of an integer?  Do an unsigned integer to
-  // long load.
-  // NOTE: This check must be *before* we try to convert the AndLNode
-  // to an AndINode and commute it with ConvI2LNode because
-  // 0xFFFFFFFFL masks the whole integer and we get a sign extension,
-  // which is wrong.
-  if (op == Op_ConvI2L && in1->in(1)->Opcode() == Op_LoadI && mask == CONST64(0x00000000FFFFFFFF)) {
-    Node* load = in1->in(1);
-    return new (phase->C, 3) LoadUI2LNode(load->in(MemNode::Control),
-                                          load->in(MemNode::Memory),
-                                          load->in(MemNode::Address),
-                                          load->adr_type());
-  }
-
   // Are we masking a long that was converted from an int with a mask
   // that fits in 32-bits?  Commute them and use an AndINode.  Don't
   // convert masks which would cause a sign extension of the integer
   // value.  This check includes UI2L masks (0x00000000FFFFFFFF) which
   // would be optimized away later in Identity.
   if (op == Op_ConvI2L && (mask & CONST64(0xFFFFFFFF80000000)) == 0) {
-    Node* andi = new (phase->C, 3) AndINode(in1->in(1), phase->intcon(mask));
+    Node* andi = new (phase->C) AndINode(in1->in(1), phase->intcon(mask));
     andi = phase->transform(andi);
-    return new (phase->C, 2) ConvI2LNode(andi);
+    return new (phase->C) ConvI2LNode(andi);
   }
 
   // Masking off sign bits?  Dont make them!
@@ -635,8 +621,8 @@ Node *AndLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
       // bits survive.  NO sign-extension bits survive the maskings.
       if( (sign_bits_mask & mask) == 0 ) {
         // Use zero-fill shift instead
-        Node *zshift = phase->transform(new (phase->C, 3) URShiftLNode(in1->in(1), in1->in(2)));
-        return new (phase->C, 3) AndLNode(zshift, in(2));
+        Node *zshift = phase->transform(new (phase->C) URShiftLNode(in1->in(1), in1->in(2)));
+        return new (phase->C) AndLNode(zshift, in(2));
       }
     }
   }
@@ -674,9 +660,9 @@ Node *LShiftINode::Ideal(PhaseGVN *phase, bool can_reshape) {
       // and 'i2b' patterns which typically fold into 'StoreC/StoreB'.
       if( con < 16 ) {
         // Compute X << con0
-        Node *lsh = phase->transform( new (phase->C, 3) LShiftINode( add1->in(1), in(2) ) );
+        Node *lsh = phase->transform( new (phase->C) LShiftINode( add1->in(1), in(2) ) );
         // Compute X<<con0 + (con1<<con0)
-        return new (phase->C, 3) AddINode( lsh, phase->intcon(t12->get_con() << con));
+        return new (phase->C) AddINode( lsh, phase->intcon(t12->get_con() << con));
       }
     }
   }
@@ -685,7 +671,7 @@ Node *LShiftINode::Ideal(PhaseGVN *phase, bool can_reshape) {
   if( (add1_op == Op_RShiftI || add1_op == Op_URShiftI ) &&
       add1->in(2) == in(2) )
     // Convert to "(x & -(1<<c0))"
-    return new (phase->C, 3) AndINode(add1->in(1),phase->intcon( -(1<<con)));
+    return new (phase->C) AndINode(add1->in(1),phase->intcon( -(1<<con)));
 
   // Check for "((x>>c0) & Y)<<c0" which just masks off more low bits
   if( add1_op == Op_AndI ) {
@@ -694,8 +680,8 @@ Node *LShiftINode::Ideal(PhaseGVN *phase, bool can_reshape) {
     if( (add2_op == Op_RShiftI || add2_op == Op_URShiftI ) &&
         add2->in(2) == in(2) ) {
       // Convert to "(x & (Y<<c0))"
-      Node *y_sh = phase->transform( new (phase->C, 3) LShiftINode( add1->in(2), in(2) ) );
-      return new (phase->C, 3) AndINode( add2->in(1), y_sh );
+      Node *y_sh = phase->transform( new (phase->C) LShiftINode( add1->in(2), in(2) ) );
+      return new (phase->C) AndINode( add2->in(1), y_sh );
     }
   }
 
@@ -704,7 +690,7 @@ Node *LShiftINode::Ideal(PhaseGVN *phase, bool can_reshape) {
   const jint bits_mask = right_n_bits(BitsPerJavaInteger-con);
   if( add1_op == Op_AndI &&
       phase->type(add1->in(2)) == TypeInt::make( bits_mask ) )
-    return new (phase->C, 3) LShiftINode( add1->in(1), in(2) );
+    return new (phase->C) LShiftINode( add1->in(1), in(2) );
 
   return NULL;
 }
@@ -784,9 +770,9 @@ Node *LShiftLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     const TypeLong *t12 = phase->type(add1->in(2))->isa_long();
     if( t12 && t12->is_con() ){ // Left input is an add of a con?
       // Compute X << con0
-      Node *lsh = phase->transform( new (phase->C, 3) LShiftLNode( add1->in(1), in(2) ) );
+      Node *lsh = phase->transform( new (phase->C) LShiftLNode( add1->in(1), in(2) ) );
       // Compute X<<con0 + (con1<<con0)
-      return new (phase->C, 3) AddLNode( lsh, phase->longcon(t12->get_con() << con));
+      return new (phase->C) AddLNode( lsh, phase->longcon(t12->get_con() << con));
     }
   }
 
@@ -794,7 +780,7 @@ Node *LShiftLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   if( (add1_op == Op_RShiftL || add1_op == Op_URShiftL ) &&
       add1->in(2) == in(2) )
     // Convert to "(x & -(1<<c0))"
-    return new (phase->C, 3) AndLNode(add1->in(1),phase->longcon( -(CONST64(1)<<con)));
+    return new (phase->C) AndLNode(add1->in(1),phase->longcon( -(CONST64(1)<<con)));
 
   // Check for "((x>>c0) & Y)<<c0" which just masks off more low bits
   if( add1_op == Op_AndL ) {
@@ -803,8 +789,8 @@ Node *LShiftLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     if( (add2_op == Op_RShiftL || add2_op == Op_URShiftL ) &&
         add2->in(2) == in(2) ) {
       // Convert to "(x & (Y<<c0))"
-      Node *y_sh = phase->transform( new (phase->C, 3) LShiftLNode( add1->in(2), in(2) ) );
-      return new (phase->C, 3) AndLNode( add2->in(1), y_sh );
+      Node *y_sh = phase->transform( new (phase->C) LShiftLNode( add1->in(2), in(2) ) );
+      return new (phase->C) AndLNode( add2->in(1), y_sh );
     }
   }
 
@@ -813,7 +799,7 @@ Node *LShiftLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   const jlong bits_mask = ((jlong)CONST64(1) << (jlong)(BitsPerJavaLong - con)) - CONST64(1);
   if( add1_op == Op_AndL &&
       phase->type(add1->in(2)) == TypeLong::make( bits_mask ) )
-    return new (phase->C, 3) LShiftLNode( add1->in(1), in(2) );
+    return new (phase->C) LShiftLNode( add1->in(1), in(2) );
 
   return NULL;
 }
@@ -915,8 +901,8 @@ Node *RShiftINode::Ideal(PhaseGVN *phase, bool can_reshape) {
     Node *x = mask->in(1);
     jint maskbits = t3->get_con();
     // Convert to "(x >> shift) & (mask >> shift)"
-    Node *shr_nomask = phase->transform( new (phase->C, 3) RShiftINode(mask->in(1), in(2)) );
-    return new (phase->C, 3) AndINode(shr_nomask, phase->intcon( maskbits >> shift));
+    Node *shr_nomask = phase->transform( new (phase->C) RShiftINode(mask->in(1), in(2)) );
+    return new (phase->C) AndINode(shr_nomask, phase->intcon( maskbits >> shift));
   }
 
   // Check for "(short[i] <<16)>>16" which simply sign-extends
@@ -939,7 +925,7 @@ Node *RShiftINode::Ideal(PhaseGVN *phase, bool can_reshape) {
     }
     else if( ld->Opcode() == Op_LoadUS )
       // Replace zero-extension-load with sign-extension-load
-      return new (phase->C, 3) LoadSNode( ld->in(MemNode::Control),
+      return new (phase->C) LoadSNode( ld->in(MemNode::Control),
                                 ld->in(MemNode::Memory),
                                 ld->in(MemNode::Address),
                                 ld->adr_type());
@@ -1124,7 +1110,7 @@ Node *URShiftINode::Ideal(PhaseGVN *phase, bool can_reshape) {
       const int con2 = t12->get_con() & 31; // Shift count is always masked
       const int con3 = con+con2;
       if( con3 < 32 )           // Only merge shifts if total is < 32
-        return new (phase->C, 3) URShiftINode( in(1)->in(1), phase->intcon(con3) );
+        return new (phase->C) URShiftINode( in(1)->in(1), phase->intcon(con3) );
     }
   }
 
@@ -1137,9 +1123,9 @@ Node *URShiftINode::Ideal(PhaseGVN *phase, bool can_reshape) {
     Node *lshl = add->in(1);
     if( lshl->Opcode() == Op_LShiftI &&
         phase->type(lshl->in(2)) == t2 ) {
-      Node *y_z = phase->transform( new (phase->C, 3) URShiftINode(add->in(2),in(2)) );
-      Node *sum = phase->transform( new (phase->C, 3) AddINode( lshl->in(1), y_z ) );
-      return new (phase->C, 3) AndINode( sum, phase->intcon(mask) );
+      Node *y_z = phase->transform( new (phase->C) URShiftINode(add->in(2),in(2)) );
+      Node *sum = phase->transform( new (phase->C) AddINode( lshl->in(1), y_z ) );
+      return new (phase->C) AndINode( sum, phase->intcon(mask) );
     }
   }
 
@@ -1152,8 +1138,8 @@ Node *URShiftINode::Ideal(PhaseGVN *phase, bool can_reshape) {
     if( t3 && t3->is_con() ) { // Right input is a constant
       jint mask2 = t3->get_con();
       mask2 >>= con;  // *signed* shift downward (high-order zeroes do not help)
-      Node *newshr = phase->transform( new (phase->C, 3) URShiftINode(andi->in(1), in(2)) );
-      return new (phase->C, 3) AndINode(newshr, phase->intcon(mask2));
+      Node *newshr = phase->transform( new (phase->C) URShiftINode(andi->in(1), in(2)) );
+      return new (phase->C) AndINode(newshr, phase->intcon(mask2));
       // The negative values are easier to materialize than positive ones.
       // A typical case from address arithmetic is ((x & ~15) >> 4).
       // It's better to change that to ((x >> 4) & ~0) versus
@@ -1165,7 +1151,7 @@ Node *URShiftINode::Ideal(PhaseGVN *phase, bool can_reshape) {
   Node *shl = in(1);
   if( in1_op == Op_LShiftI &&
       phase->type(shl->in(2)) == t2 )
-    return new (phase->C, 3) AndINode( shl->in(1), phase->intcon(mask) );
+    return new (phase->C) AndINode( shl->in(1), phase->intcon(mask) );
 
   return NULL;
 }
@@ -1270,9 +1256,9 @@ Node *URShiftLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     Node *lshl = add->in(1);
     if( lshl->Opcode() == Op_LShiftL &&
         phase->type(lshl->in(2)) == t2 ) {
-      Node *y_z = phase->transform( new (phase->C, 3) URShiftLNode(add->in(2),in(2)) );
-      Node *sum = phase->transform( new (phase->C, 3) AddLNode( lshl->in(1), y_z ) );
-      return new (phase->C, 3) AndLNode( sum, phase->longcon(mask) );
+      Node *y_z = phase->transform( new (phase->C) URShiftLNode(add->in(2),in(2)) );
+      Node *sum = phase->transform( new (phase->C) AddLNode( lshl->in(1), y_z ) );
+      return new (phase->C) AndLNode( sum, phase->longcon(mask) );
     }
   }
 
@@ -1285,8 +1271,8 @@ Node *URShiftLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     if( t3 && t3->is_con() ) { // Right input is a constant
       jlong mask2 = t3->get_con();
       mask2 >>= con;  // *signed* shift downward (high-order zeroes do not help)
-      Node *newshr = phase->transform( new (phase->C, 3) URShiftLNode(andi->in(1), in(2)) );
-      return new (phase->C, 3) AndLNode(newshr, phase->longcon(mask2));
+      Node *newshr = phase->transform( new (phase->C) URShiftLNode(andi->in(1), in(2)) );
+      return new (phase->C) AndLNode(newshr, phase->longcon(mask2));
     }
   }
 
@@ -1294,7 +1280,7 @@ Node *URShiftLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   Node *shl = in(1);
   if( shl->Opcode() == Op_LShiftL &&
       phase->type(shl->in(2)) == t2 )
-    return new (phase->C, 3) AndLNode( shl->in(1), phase->longcon(mask) );
+    return new (phase->C) AndLNode( shl->in(1), phase->longcon(mask) );
 
   return NULL;
 }
diff --git a/hotspot/src/share/vm/opto/node.cpp b/hotspot/src/share/vm/opto/node.cpp
index 880576016bd..cc35098e823 100644
--- a/hotspot/src/share/vm/opto/node.cpp
+++ b/hotspot/src/share/vm/opto/node.cpp
@@ -296,6 +296,14 @@ inline int Node::Init(int req, Compile* C) {
   assert(Compile::current() == C, "must use operator new(Compile*)");
   int idx = C->next_unique();
 
+  // Allocate memory for the necessary number of edges.
+  if (req > 0) {
+    // Allocate space for _in array to have double alignment.
+    _in = (Node **) ((char *) (C->node_arena()->Amalloc_D(req * sizeof(void*))));
+#ifdef ASSERT
+    _in[req-1] = this; // magic cookie for assertion check
+#endif
+  }
   // If there are default notes floating around, capture them:
   Node_Notes* nn = C->default_node_notes();
   if (nn != NULL)  init_node_notes(C, idx, nn);
@@ -1004,15 +1012,15 @@ const Type *Node::Value( PhaseTransform * ) const {
 //    set_req(2, phase->intcon(7));
 //    return this;
 // Example: reshape "X*4" into "X<<2"
-//    return new (C,3) LShiftINode(in(1), phase->intcon(2));
+//    return new (C) LShiftINode(in(1), phase->intcon(2));
 //
 // You must call 'phase->transform(X)' on any new Nodes X you make, except
 // for the returned root node.  Example: reshape "X*31" with "(X<<5)-X".
-//    Node *shift=phase->transform(new(C,3)LShiftINode(in(1),phase->intcon(5)));
-//    return new (C,3) AddINode(shift, in(1));
+//    Node *shift=phase->transform(new(C)LShiftINode(in(1),phase->intcon(5)));
+//    return new (C) AddINode(shift, in(1));
 //
 // When making a Node for a constant use 'phase->makecon' or 'phase->intcon'.
-// These forms are faster than 'phase->transform(new (C,1) ConNode())' and Do
+// These forms are faster than 'phase->transform(new (C) ConNode())' and Do
 // The Right Thing with def-use info.
 //
 // You cannot bury the 'this' Node inside of a graph reshape.  If the reshaped
diff --git a/hotspot/src/share/vm/opto/node.hpp b/hotspot/src/share/vm/opto/node.hpp
index 759c0bcd6d9..f746f2e42af 100644
--- a/hotspot/src/share/vm/opto/node.hpp
+++ b/hotspot/src/share/vm/opto/node.hpp
@@ -62,8 +62,12 @@ class ConstraintCastNode;
 class ConNode;
 class CountedLoopNode;
 class CountedLoopEndNode;
+class DecodeNarrowPtrNode;
 class DecodeNNode;
+class DecodeNKlassNode;
+class EncodeNarrowPtrNode;
 class EncodePNode;
+class EncodePKlassNode;
 class FastLockNode;
 class FastUnlockNode;
 class IfNode;
@@ -217,18 +221,6 @@ public:
     return (void*)n;
   }
 
-  // New Operator that takes a Compile pointer, this will eventually
-  // be the "new" New operator.
-  inline void* operator new( size_t x, Compile* C, int y) {
-    Node* n = (Node*)C->node_arena()->Amalloc_D(x + y*sizeof(void*));
-    n->_in = (Node**)(((char*)n) + x);
-#ifdef ASSERT
-    n->_in[y-1] = n; // magic cookie for assertion check
-#endif
-    n->_out = (Node**)C;
-    return (void*)n;
-  }
-
   // Delete is a NOP
   void operator delete( void *ptr ) {}
   // Fancy destructor; eagerly attempt to reclaim Node numberings and storage
@@ -597,8 +589,12 @@ public:
       DEFINE_CLASS_ID(CheckCastPP, Type, 2)
       DEFINE_CLASS_ID(CMove, Type, 3)
       DEFINE_CLASS_ID(SafePointScalarObject, Type, 4)
-      DEFINE_CLASS_ID(DecodeN, Type, 5)
-      DEFINE_CLASS_ID(EncodeP, Type, 6)
+      DEFINE_CLASS_ID(DecodeNarrowPtr, Type, 5)
+        DEFINE_CLASS_ID(DecodeN, DecodeNarrowPtr, 0)
+        DEFINE_CLASS_ID(DecodeNKlass, DecodeNarrowPtr, 1)
+      DEFINE_CLASS_ID(EncodeNarrowPtr, Type, 6)
+        DEFINE_CLASS_ID(EncodeP, EncodeNarrowPtr, 0)
+        DEFINE_CLASS_ID(EncodePKlass, EncodeNarrowPtr, 1)
 
     DEFINE_CLASS_ID(Proj,  Node, 3)
       DEFINE_CLASS_ID(CatchProj, Proj, 0)
@@ -718,8 +714,12 @@ public:
   DEFINE_CLASS_QUERY(Cmp)
   DEFINE_CLASS_QUERY(CountedLoop)
   DEFINE_CLASS_QUERY(CountedLoopEnd)
+  DEFINE_CLASS_QUERY(DecodeNarrowPtr)
   DEFINE_CLASS_QUERY(DecodeN)
+  DEFINE_CLASS_QUERY(DecodeNKlass)
+  DEFINE_CLASS_QUERY(EncodeNarrowPtr)
   DEFINE_CLASS_QUERY(EncodeP)
+  DEFINE_CLASS_QUERY(EncodePKlass)
   DEFINE_CLASS_QUERY(FastLock)
   DEFINE_CLASS_QUERY(FastUnlock)
   DEFINE_CLASS_QUERY(If)
diff --git a/hotspot/src/share/vm/opto/output.cpp b/hotspot/src/share/vm/opto/output.cpp
index 89b62127edf..f16bbc6fb55 100644
--- a/hotspot/src/share/vm/opto/output.cpp
+++ b/hotspot/src/share/vm/opto/output.cpp
@@ -265,9 +265,9 @@ void Compile::Insert_zap_nodes() {
 Node* Compile::call_zap_node(MachSafePointNode* node_to_check, int block_no) {
   const TypeFunc *tf = OptoRuntime::zap_dead_locals_Type();
   CallStaticJavaNode* ideal_node =
-    new (this, tf->domain()->cnt()) CallStaticJavaNode( tf,
+    new (this) CallStaticJavaNode( tf,
          OptoRuntime::zap_dead_locals_stub(_method->flags().is_native()),
-                            "call zap dead locals stub", 0, TypePtr::BOTTOM);
+                       "call zap dead locals stub", 0, TypePtr::BOTTOM);
   // We need to copy the OopMap from the site we're zapping at.
   // We have to make a copy, because the zap site might not be
   // a call site, and zap_dead is a call site.
@@ -1869,7 +1869,9 @@ void Compile::ScheduleAndBundle() {
   if (!do_scheduling())
     return;
 
-  assert(MaxVectorSize <= 8, "scheduling code works only with pairs");
+  // Scheduling code works only with pairs (8 bytes) maximum.
+  if (max_vector_size() > 8)
+    return;
 
   NOT_PRODUCT( TracePhase t2("isched", &_t_instrSched, TimeCompiler); )
 
@@ -2682,7 +2684,7 @@ void Scheduling::anti_do_def( Block *b, Node *def, OptoReg::Name def_reg, int is
     if ( _pinch_free_list.size() > 0) {
       pinch = _pinch_free_list.pop();
     } else {
-      pinch = new (_cfg->C, 1) Node(1); // Pinch point to-be
+      pinch = new (_cfg->C) Node(1); // Pinch point to-be
     }
     if (pinch->_idx >= _regalloc->node_regs_max_index()) {
       _cfg->C->record_method_not_compilable("too many D-U pinch points");
diff --git a/hotspot/src/share/vm/opto/parse.hpp b/hotspot/src/share/vm/opto/parse.hpp
index 620c8370db1..23dd261b9c1 100644
--- a/hotspot/src/share/vm/opto/parse.hpp
+++ b/hotspot/src/share/vm/opto/parse.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/opto/parse1.cpp b/hotspot/src/share/vm/opto/parse1.cpp
index 8eb86d7bf13..d0b52f554ec 100644
--- a/hotspot/src/share/vm/opto/parse1.cpp
+++ b/hotspot/src/share/vm/opto/parse1.cpp
@@ -107,10 +107,10 @@ Node *Parse::fetch_interpreter_state(int index,
   // doubles on Sparc.  Intel can handle them just fine directly.
   Node *l;
   switch( bt ) {                // Signature is flattened
-  case T_INT:     l = new (C, 3) LoadINode( ctl, mem, adr, TypeRawPtr::BOTTOM ); break;
-  case T_FLOAT:   l = new (C, 3) LoadFNode( ctl, mem, adr, TypeRawPtr::BOTTOM ); break;
-  case T_ADDRESS: l = new (C, 3) LoadPNode( ctl, mem, adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM  ); break;
-  case T_OBJECT:  l = new (C, 3) LoadPNode( ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInstPtr::BOTTOM ); break;
+  case T_INT:     l = new (C) LoadINode( ctl, mem, adr, TypeRawPtr::BOTTOM ); break;
+  case T_FLOAT:   l = new (C) LoadFNode( ctl, mem, adr, TypeRawPtr::BOTTOM ); break;
+  case T_ADDRESS: l = new (C) LoadPNode( ctl, mem, adr, TypeRawPtr::BOTTOM, TypeRawPtr::BOTTOM  ); break;
+  case T_OBJECT:  l = new (C) LoadPNode( ctl, mem, adr, TypeRawPtr::BOTTOM, TypeInstPtr::BOTTOM ); break;
   case T_LONG:
   case T_DOUBLE: {
     // Since arguments are in reverse order, the argument address 'adr'
@@ -118,12 +118,12 @@ Node *Parse::fetch_interpreter_state(int index,
     adr = basic_plus_adr( local_addrs_base, local_addrs, -(index+1)*wordSize );
     if( Matcher::misaligned_doubles_ok ) {
       l = (bt == T_DOUBLE)
-        ? (Node*)new (C, 3) LoadDNode( ctl, mem, adr, TypeRawPtr::BOTTOM )
-        : (Node*)new (C, 3) LoadLNode( ctl, mem, adr, TypeRawPtr::BOTTOM );
+        ? (Node*)new (C) LoadDNode( ctl, mem, adr, TypeRawPtr::BOTTOM )
+        : (Node*)new (C) LoadLNode( ctl, mem, adr, TypeRawPtr::BOTTOM );
     } else {
       l = (bt == T_DOUBLE)
-        ? (Node*)new (C, 3) LoadD_unalignedNode( ctl, mem, adr, TypeRawPtr::BOTTOM )
-        : (Node*)new (C, 3) LoadL_unalignedNode( ctl, mem, adr, TypeRawPtr::BOTTOM );
+        ? (Node*)new (C) LoadD_unalignedNode( ctl, mem, adr, TypeRawPtr::BOTTOM )
+        : (Node*)new (C) LoadL_unalignedNode( ctl, mem, adr, TypeRawPtr::BOTTOM );
     }
     break;
   }
@@ -147,11 +147,11 @@ Node* Parse::check_interpreter_type(Node* l, const Type* type,
   if (type == TypePtr::NULL_PTR ||
       (tp != NULL && !tp->klass()->is_loaded())) {
     // Value must be null, not a real oop.
-    Node* chk = _gvn.transform( new (C, 3) CmpPNode(l, null()) );
-    Node* tst = _gvn.transform( new (C, 2) BoolNode(chk, BoolTest::eq) );
+    Node* chk = _gvn.transform( new (C) CmpPNode(l, null()) );
+    Node* tst = _gvn.transform( new (C) BoolNode(chk, BoolTest::eq) );
     IfNode* iff = create_and_map_if(control(), tst, PROB_MAX, COUNT_UNKNOWN);
-    set_control(_gvn.transform( new (C, 1) IfTrueNode(iff) ));
-    Node* bad_type = _gvn.transform( new (C, 1) IfFalseNode(iff) );
+    set_control(_gvn.transform( new (C) IfTrueNode(iff) ));
+    Node* bad_type = _gvn.transform( new (C) IfFalseNode(iff) );
     bad_type_exit->control()->add_req(bad_type);
     l = null();
   }
@@ -218,7 +218,7 @@ void Parse::load_interpreter_state(Node* osr_buf) {
   Node *monitors_addr = basic_plus_adr(osr_buf, osr_buf, (max_locals+mcnt*2-1)*wordSize);
   for (index = 0; index < mcnt; index++) {
     // Make a BoxLockNode for the monitor.
-    Node *box = _gvn.transform(new (C, 1) BoxLockNode(next_monitor()));
+    Node *box = _gvn.transform(new (C) BoxLockNode(next_monitor()));
 
 
     // Displaced headers and locked objects are interleaved in the
@@ -233,7 +233,7 @@ void Parse::load_interpreter_state(Node* osr_buf) {
 
     // Build a bogus FastLockNode (no code will be generated) and push the
     // monitor into our debug info.
-    const FastLockNode *flock = _gvn.transform(new (C, 3) FastLockNode( 0, lock_object, box ))->as_FastLock();
+    const FastLockNode *flock = _gvn.transform(new (C) FastLockNode( 0, lock_object, box ))->as_FastLock();
     map()->push_monitor(flock);
 
     // If the lock is our method synchronization lock, tuck it away in
@@ -323,7 +323,7 @@ void Parse::load_interpreter_state(Node* osr_buf) {
   // Now that the interpreter state is loaded, make sure it will match
   // at execution time what the compiler is expecting now:
   SafePointNode* bad_type_exit = clone_map();
-  bad_type_exit->set_control(new (C, 1) RegionNode(1));
+  bad_type_exit->set_control(new (C) RegionNode(1));
 
   assert(osr_block->flow()->jsrs()->size() == 0, "should be no jsrs live at osr point");
   for (index = 0; index < max_locals; index++) {
@@ -372,7 +372,8 @@ void Parse::load_interpreter_state(Node* osr_buf) {
     // in the CFG, which typeflow had previously ignored.
     // E.g., Object x = coldAtFirst() && notReached()? "str": new Integer(123).
     // This x will be typed as Integer if notReached is not yet linked.
-    uncommon_trap(Deoptimization::Reason_unreached,
+    // It could also happen due to a problem in ciTypeFlow analysis.
+    uncommon_trap(Deoptimization::Reason_constraint,
                   Deoptimization::Action_reinterpret);
     set_map(types_are_good);
   }
@@ -647,7 +648,7 @@ void Parse::do_all_blocks() {
           add_predicate();
           // Add new region for back branches.
           int edges = block->pred_count() - block->preds_parsed() + 1; // +1 for original region
-          RegionNode *r = new (C, edges+1) RegionNode(edges+1);
+          RegionNode *r = new (C) RegionNode(edges+1);
           _gvn.set_type(r, Type::CONTROL);
           record_for_igvn(r);
           r->init_req(edges, control());
@@ -714,14 +715,14 @@ void Parse::build_exits() {
   _exits.clean_stack(_exits.sp());
   _exits.sync_jvms();
 
-  RegionNode* region = new (C, 1) RegionNode(1);
+  RegionNode* region = new (C) RegionNode(1);
   record_for_igvn(region);
   gvn().set_type_bottom(region);
   _exits.set_control(region);
 
   // Note:  iophi and memphi are not transformed until do_exits.
-  Node* iophi  = new (C, region->req()) PhiNode(region, Type::ABIO);
-  Node* memphi = new (C, region->req()) PhiNode(region, Type::MEMORY, TypePtr::BOTTOM);
+  Node* iophi  = new (C) PhiNode(region, Type::ABIO);
+  Node* memphi = new (C) PhiNode(region, Type::MEMORY, TypePtr::BOTTOM);
   _exits.set_i_o(iophi);
   _exits.set_all_memory(memphi);
 
@@ -736,7 +737,7 @@ void Parse::build_exits() {
       ret_type = TypeOopPtr::BOTTOM;
     }
     int         ret_size = type2size[ret_type->basic_type()];
-    Node*       ret_phi  = new (C, region->req()) PhiNode(region, ret_type);
+    Node*       ret_phi  = new (C) PhiNode(region, ret_type);
     _exits.ensure_stack(ret_size);
     assert((int)(tf()->range()->cnt() - TypeFunc::Parms) == ret_size, "good tf range");
     assert(method()->return_type()->size() == ret_size, "tf agrees w/ method");
@@ -753,7 +754,7 @@ JVMState* Compile::build_start_state(StartNode* start, const TypeFunc* tf) {
   int        arg_size = tf->domain()->cnt();
   int        max_size = MAX2(arg_size, (int)tf->range()->cnt());
   JVMState*  jvms     = new (this) JVMState(max_size - TypeFunc::Parms);
-  SafePointNode* map  = new (this, max_size) SafePointNode(max_size, NULL);
+  SafePointNode* map  = new (this) SafePointNode(max_size, NULL);
   record_for_igvn(map);
   assert(arg_size == TypeFunc::Parms + (is_osr_compilation() ? 1 : method()->arg_size()), "correct arg_size");
   Node_Notes* old_nn = default_node_notes();
@@ -767,7 +768,7 @@ JVMState* Compile::build_start_state(StartNode* start, const TypeFunc* tf) {
   }
   uint i;
   for (i = 0; i < (uint)arg_size; i++) {
-    Node* parm = initial_gvn()->transform(new (this, 1) ParmNode(start, i));
+    Node* parm = initial_gvn()->transform(new (this) ParmNode(start, i));
     map->init_req(i, parm);
     // Record all these guys for later GVN.
     record_for_igvn(parm);
@@ -798,7 +799,7 @@ Node_Notes* Parse::make_node_notes(Node_Notes* caller_nn) {
 //--------------------------return_values--------------------------------------
 void Compile::return_values(JVMState* jvms) {
   GraphKit kit(jvms);
-  Node* ret = new (this, TypeFunc::Parms) ReturnNode(TypeFunc::Parms,
+  Node* ret = new (this) ReturnNode(TypeFunc::Parms,
                              kit.control(),
                              kit.i_o(),
                              kit.reset_memory(),
@@ -826,7 +827,7 @@ void Compile::rethrow_exceptions(JVMState* jvms) {
   // Load my combined exception state into the kit, with all phis transformed:
   SafePointNode* ex_map = kit.combine_and_pop_all_exception_states();
   Node* ex_oop = kit.use_exception_state(ex_map);
-  RethrowNode* exit = new (this, TypeFunc::Parms + 1) RethrowNode(kit.control(),
+  RethrowNode* exit = new (this) RethrowNode(kit.control(),
                                       kit.i_o(), kit.reset_memory(),
                                       kit.frameptr(), kit.returnadr(),
                                       // like a return but with exception input
@@ -1020,7 +1021,7 @@ SafePointNode* Parse::create_entry_map() {
 
   // Create an initial safepoint to hold JVM state during parsing
   JVMState* jvms = new (C) JVMState(method(), _caller->has_method() ? _caller : NULL);
-  set_map(new (C, len) SafePointNode(len, jvms));
+  set_map(new (C) SafePointNode(len, jvms));
   jvms->set_map(map());
   record_for_igvn(map());
   assert(jvms->endoff() == len, "correct jvms sizing");
@@ -1380,8 +1381,7 @@ void Parse::do_one_block() {
       // that occur during parsing of this BC.  If there is no log
       // output until the next context string, this context string
       // will be silently ignored.
-      log->context()->reset();
-      log->context()->print_cr("<bc code='%d' bci='%d'/>", (int)bc(), bci());
+      log->set_context("bc code='%d' bci='%d'", (int)bc(), bci());
     }
 
     if (block()->has_trap_at(bci())) {
@@ -1410,7 +1410,8 @@ void Parse::do_one_block() {
 
     NOT_PRODUCT( parse_histogram()->record_change(); );
 
-    if (log != NULL)  log->context()->reset();  // done w/ this one
+    if (log != NULL)
+      log->clear_context();  // skip marker if nothing was printed
 
     // Fall into next bytecode.  Each bytecode normally has 1 sequential
     // successor which is typically made ready by visiting this bytecode.
@@ -1528,7 +1529,7 @@ void Parse::merge_common(Parse::Block* target, int pnum) {
       // later lazily.
       int edges = target->pred_count();
       if (edges < pnum)  edges = pnum;  // might be a new path!
-      RegionNode *r = new (C, edges+1) RegionNode(edges+1);
+      RegionNode *r = new (C) RegionNode(edges+1);
       gvn().set_type(r, Type::CONTROL);
       record_for_igvn(r);
       // zap all inputs to NULL for debugging (done in Node(uint) constructor)
@@ -1923,19 +1924,19 @@ void Parse::call_register_finalizer() {
   Node* access_flags_addr = basic_plus_adr(klass, klass, in_bytes(Klass::access_flags_offset()));
   Node* access_flags = make_load(NULL, access_flags_addr, TypeInt::INT, T_INT);
 
-  Node* mask  = _gvn.transform(new (C, 3) AndINode(access_flags, intcon(JVM_ACC_HAS_FINALIZER)));
-  Node* check = _gvn.transform(new (C, 3) CmpINode(mask, intcon(0)));
-  Node* test  = _gvn.transform(new (C, 2) BoolNode(check, BoolTest::ne));
+  Node* mask  = _gvn.transform(new (C) AndINode(access_flags, intcon(JVM_ACC_HAS_FINALIZER)));
+  Node* check = _gvn.transform(new (C) CmpINode(mask, intcon(0)));
+  Node* test  = _gvn.transform(new (C) BoolNode(check, BoolTest::ne));
 
   IfNode* iff = create_and_map_if(control(), test, PROB_MAX, COUNT_UNKNOWN);
 
-  RegionNode* result_rgn = new (C, 3) RegionNode(3);
+  RegionNode* result_rgn = new (C) RegionNode(3);
   record_for_igvn(result_rgn);
 
-  Node *skip_register = _gvn.transform(new (C, 1) IfFalseNode(iff));
+  Node *skip_register = _gvn.transform(new (C) IfFalseNode(iff));
   result_rgn->init_req(1, skip_register);
 
-  Node *needs_register = _gvn.transform(new (C, 1) IfTrueNode(iff));
+  Node *needs_register = _gvn.transform(new (C) IfTrueNode(iff));
   set_control(needs_register);
   if (stopped()) {
     // There is no slow path.
@@ -2013,7 +2014,7 @@ void Parse::return_current(Node* value) {
         // sharpen the type eagerly; this eases certain assert checking
         if (tp->higher_equal(TypeInstPtr::NOTNULL))
           tr = tr->join(TypeInstPtr::NOTNULL)->is_instptr();
-        value = _gvn.transform(new (C, 2) CheckCastPPNode(0,value,tr));
+        value = _gvn.transform(new (C) CheckCastPPNode(0,value,tr));
       }
     }
     phi->add_req(value);
@@ -2048,7 +2049,7 @@ void Parse::add_safepoint() {
   kill_dead_locals();
 
   // Clone the JVM State
-  SafePointNode *sfpnt = new (C, parms) SafePointNode(parms, NULL);
+  SafePointNode *sfpnt = new (C) SafePointNode(parms, NULL);
 
   // Capture memory state BEFORE a SafePoint.  Since we can block at a
   // SafePoint we need our GC state to be safe; i.e. we need all our current
diff --git a/hotspot/src/share/vm/opto/parse2.cpp b/hotspot/src/share/vm/opto/parse2.cpp
index af514850bbb..af91156dad3 100644
--- a/hotspot/src/share/vm/opto/parse2.cpp
+++ b/hotspot/src/share/vm/opto/parse2.cpp
@@ -127,9 +127,9 @@ Node* Parse::array_addressing(BasicType type, int vals, const Type* *result2) {
       Node* len = load_array_length(ary);
 
       // Test length vs index (standard trick using unsigned compare)
-      Node* chk = _gvn.transform( new (C, 3) CmpUNode(idx, len) );
+      Node* chk = _gvn.transform( new (C) CmpUNode(idx, len) );
       BoolTest::mask btest = BoolTest::lt;
-      tst = _gvn.transform( new (C, 2) BoolNode(chk, btest) );
+      tst = _gvn.transform( new (C) BoolNode(chk, btest) );
     }
     // Branch to failure if out of bounds
     { BuildCutout unless(this, tst, PROB_MAX);
@@ -165,15 +165,15 @@ Node* Parse::array_addressing(BasicType type, int vals, const Type* *result2) {
 
 // returns IfNode
 IfNode* Parse::jump_if_fork_int(Node* a, Node* b, BoolTest::mask mask) {
-  Node   *cmp = _gvn.transform( new (C, 3) CmpINode( a, b)); // two cases: shiftcount > 32 and shiftcount <= 32
-  Node   *tst = _gvn.transform( new (C, 2) BoolNode( cmp, mask));
+  Node   *cmp = _gvn.transform( new (C) CmpINode( a, b)); // two cases: shiftcount > 32 and shiftcount <= 32
+  Node   *tst = _gvn.transform( new (C) BoolNode( cmp, mask));
   IfNode *iff = create_and_map_if( control(), tst, ((mask == BoolTest::eq) ? PROB_STATIC_INFREQUENT : PROB_FAIR), COUNT_UNKNOWN );
   return iff;
 }
 
 // return Region node
 Node* Parse::jump_if_join(Node* iffalse, Node* iftrue) {
-  Node *region  = new (C, 3) RegionNode(3); // 2 results
+  Node *region  = new (C) RegionNode(3); // 2 results
   record_for_igvn(region);
   region->init_req(1, iffalse);
   region->init_req(2, iftrue );
@@ -188,28 +188,28 @@ Node* Parse::jump_if_join(Node* iffalse, Node* iftrue) {
 void Parse::jump_if_true_fork(IfNode *iff, int dest_bci_if_true, int prof_table_index) {
   // True branch, use existing map info
   { PreserveJVMState pjvms(this);
-    Node *iftrue  = _gvn.transform( new (C, 1) IfTrueNode (iff) );
+    Node *iftrue  = _gvn.transform( new (C) IfTrueNode (iff) );
     set_control( iftrue );
     profile_switch_case(prof_table_index);
     merge_new_path(dest_bci_if_true);
   }
 
   // False branch
-  Node *iffalse = _gvn.transform( new (C, 1) IfFalseNode(iff) );
+  Node *iffalse = _gvn.transform( new (C) IfFalseNode(iff) );
   set_control( iffalse );
 }
 
 void Parse::jump_if_false_fork(IfNode *iff, int dest_bci_if_true, int prof_table_index) {
   // True branch, use existing map info
   { PreserveJVMState pjvms(this);
-    Node *iffalse  = _gvn.transform( new (C, 1) IfFalseNode (iff) );
+    Node *iffalse  = _gvn.transform( new (C) IfFalseNode (iff) );
     set_control( iffalse );
     profile_switch_case(prof_table_index);
     merge_new_path(dest_bci_if_true);
   }
 
   // False branch
-  Node *iftrue = _gvn.transform( new (C, 1) IfTrueNode(iff) );
+  Node *iftrue = _gvn.transform( new (C) IfTrueNode(iff) );
   set_control( iftrue );
 }
 
@@ -437,14 +437,14 @@ bool Parse::create_jump_tables(Node* key_val, SwitchRange* lo, SwitchRange* hi)
 
   // Normalize table lookups to zero
   int lowval = lo->lo();
-  key_val = _gvn.transform( new (C, 3) SubINode(key_val, _gvn.intcon(lowval)) );
+  key_val = _gvn.transform( new (C) SubINode(key_val, _gvn.intcon(lowval)) );
 
   // Generate a guard to protect against input keyvals that aren't
   // in the switch domain.
   if (needs_guard) {
     Node*   size = _gvn.intcon(num_cases);
-    Node*   cmp = _gvn.transform( new (C, 3) CmpUNode(key_val, size) );
-    Node*   tst = _gvn.transform( new (C, 2) BoolNode(cmp, BoolTest::ge) );
+    Node*   cmp = _gvn.transform( new (C) CmpUNode(key_val, size) );
+    Node*   tst = _gvn.transform( new (C) BoolNode(cmp, BoolTest::ge) );
     IfNode* iff = create_and_map_if( control(), tst, PROB_FAIR, COUNT_UNKNOWN);
     jump_if_true_fork(iff, default_dest, NullTableIndex);
   }
@@ -457,21 +457,21 @@ bool Parse::create_jump_tables(Node* key_val, SwitchRange* lo, SwitchRange* hi)
   // Clean the 32-bit int into a real 64-bit offset.
   // Otherwise, the jint value 0 might turn into an offset of 0x0800000000.
   const TypeLong* lkeytype = TypeLong::make(CONST64(0), num_cases-1, Type::WidenMin);
-  key_val       = _gvn.transform( new (C, 2) ConvI2LNode(key_val, lkeytype) );
+  key_val       = _gvn.transform( new (C) ConvI2LNode(key_val, lkeytype) );
 #endif
   // Shift the value by wordsize so we have an index into the table, rather
   // than a switch value
   Node *shiftWord = _gvn.MakeConX(wordSize);
-  key_val = _gvn.transform( new (C, 3) MulXNode( key_val, shiftWord));
+  key_val = _gvn.transform( new (C) MulXNode( key_val, shiftWord));
 
   // Create the JumpNode
-  Node* jtn = _gvn.transform( new (C, 2) JumpNode(control(), key_val, num_cases) );
+  Node* jtn = _gvn.transform( new (C) JumpNode(control(), key_val, num_cases) );
 
   // These are the switch destinations hanging off the jumpnode
   int i = 0;
   for (SwitchRange* r = lo; r <= hi; r++) {
     for (int j = r->lo(); j <= r->hi(); j++, i++) {
-      Node* input = _gvn.transform(new (C, 1) JumpProjNode(jtn, i, r->dest(), j - lowval));
+      Node* input = _gvn.transform(new (C) JumpProjNode(jtn, i, r->dest(), j - lowval));
       {
         PreserveJVMState pjvms(this);
         set_control(input);
@@ -572,8 +572,8 @@ void Parse::jump_switch_ranges(Node* key_val, SwitchRange *lo, SwitchRange *hi,
         // two comparisons of same values--should enable 1 test for 2 branches
         // Use BoolTest::le instead of BoolTest::gt
         IfNode *iff_le  = jump_if_fork_int(key_val, test_val, BoolTest::le);
-        Node   *iftrue  = _gvn.transform( new (C, 1) IfTrueNode(iff_le) );
-        Node   *iffalse = _gvn.transform( new (C, 1) IfFalseNode(iff_le) );
+        Node   *iftrue  = _gvn.transform( new (C) IfTrueNode(iff_le) );
+        Node   *iffalse = _gvn.transform( new (C) IfFalseNode(iff_le) );
         { PreserveJVMState pjvms(this);
           set_control(iffalse);
           jump_switch_ranges(key_val, mid+1, hi, switch_depth+1);
@@ -589,8 +589,8 @@ void Parse::jump_switch_ranges(Node* key_val, SwitchRange *lo, SwitchRange *hi,
       if (mid == hi) {
         jump_if_true_fork(iff_ge, mid->dest(), mid->table_index());
       } else {
-        Node *iftrue  = _gvn.transform( new (C, 1) IfTrueNode(iff_ge) );
-        Node *iffalse = _gvn.transform( new (C, 1) IfFalseNode(iff_ge) );
+        Node *iftrue  = _gvn.transform( new (C) IfTrueNode(iff_ge) );
+        Node *iffalse = _gvn.transform( new (C) IfFalseNode(iff_ge) );
         { PreserveJVMState pjvms(this);
           set_control(iftrue);
           jump_switch_ranges(key_val, mid, hi, switch_depth+1);
@@ -645,7 +645,7 @@ void Parse::modf() {
                               CAST_FROM_FN_PTR(address, SharedRuntime::frem),
                               "frem", NULL, //no memory effects
                               f1, f2);
-  Node* res = _gvn.transform(new (C, 1) ProjNode(c, TypeFunc::Parms + 0));
+  Node* res = _gvn.transform(new (C) ProjNode(c, TypeFunc::Parms + 0));
 
   push(res);
 }
@@ -657,10 +657,10 @@ void Parse::modd() {
                               CAST_FROM_FN_PTR(address, SharedRuntime::drem),
                               "drem", NULL, //no memory effects
                               d1, top(), d2, top());
-  Node* res_d   = _gvn.transform(new (C, 1) ProjNode(c, TypeFunc::Parms + 0));
+  Node* res_d   = _gvn.transform(new (C) ProjNode(c, TypeFunc::Parms + 0));
 
 #ifdef ASSERT
-  Node* res_top = _gvn.transform(new (C, 1) ProjNode(c, TypeFunc::Parms + 1));
+  Node* res_top = _gvn.transform(new (C) ProjNode(c, TypeFunc::Parms + 1));
   assert(res_top == top(), "second value must be top");
 #endif
 
@@ -674,7 +674,7 @@ void Parse::l2f() {
                               CAST_FROM_FN_PTR(address, SharedRuntime::l2f),
                               "l2f", NULL, //no memory effects
                               f1, f2);
-  Node* res = _gvn.transform(new (C, 1) ProjNode(c, TypeFunc::Parms + 0));
+  Node* res = _gvn.transform(new (C) ProjNode(c, TypeFunc::Parms + 0));
 
   push(res);
 }
@@ -701,17 +701,17 @@ void Parse::do_irem() {
         // Sigh, must handle negative dividends
         Node *zero = _gvn.intcon(0);
         IfNode *ifff = jump_if_fork_int(a, zero, BoolTest::lt);
-        Node *iff = _gvn.transform( new (C, 1) IfFalseNode(ifff) );
-        Node *ift = _gvn.transform( new (C, 1) IfTrueNode (ifff) );
+        Node *iff = _gvn.transform( new (C) IfFalseNode(ifff) );
+        Node *ift = _gvn.transform( new (C) IfTrueNode (ifff) );
         Node *reg = jump_if_join(ift, iff);
         Node *phi = PhiNode::make(reg, NULL, TypeInt::INT);
         // Negative path; negate/and/negate
-        Node *neg = _gvn.transform( new (C, 3) SubINode(zero, a) );
-        Node *andn= _gvn.transform( new (C, 3) AndINode(neg, mask) );
-        Node *negn= _gvn.transform( new (C, 3) SubINode(zero, andn) );
+        Node *neg = _gvn.transform( new (C) SubINode(zero, a) );
+        Node *andn= _gvn.transform( new (C) AndINode(neg, mask) );
+        Node *negn= _gvn.transform( new (C) SubINode(zero, andn) );
         phi->init_req(1, negn);
         // Fast positive case
-        Node *andx = _gvn.transform( new (C, 3) AndINode(a, mask) );
+        Node *andx = _gvn.transform( new (C) AndINode(a, mask) );
         phi->init_req(2, andx);
         // Push the merge
         push( _gvn.transform(phi) );
@@ -720,7 +720,7 @@ void Parse::do_irem() {
     }
   }
   // Default case
-  push( _gvn.transform( new (C, 3) ModINode(control(),a,b) ) );
+  push( _gvn.transform( new (C) ModINode(control(),a,b) ) );
 }
 
 // Handle jsr and jsr_w bytecode
@@ -997,7 +997,7 @@ void Parse::do_ifnull(BoolTest::mask btest, Node *c) {
   explicit_null_checks_inserted++;
 
   // Generate real control flow
-  Node   *tst = _gvn.transform( new (C, 2) BoolNode( c, btest ) );
+  Node   *tst = _gvn.transform( new (C) BoolNode( c, btest ) );
 
   // Sanity check the probability value
   assert(prob > 0.0f,"Bad probability in Parser");
@@ -1006,7 +1006,7 @@ void Parse::do_ifnull(BoolTest::mask btest, Node *c) {
   assert(iff->_prob > 0.0f,"Optimizer made bad probability in parser");
   // True branch
   { PreserveJVMState pjvms(this);
-    Node* iftrue  = _gvn.transform( new (C, 1) IfTrueNode (iff) );
+    Node* iftrue  = _gvn.transform( new (C) IfTrueNode (iff) );
     set_control(iftrue);
 
     if (stopped()) {            // Path is dead?
@@ -1026,7 +1026,7 @@ void Parse::do_ifnull(BoolTest::mask btest, Node *c) {
   }
 
   // False branch
-  Node* iffalse = _gvn.transform( new (C, 1) IfFalseNode(iff) );
+  Node* iffalse = _gvn.transform( new (C) IfFalseNode(iff) );
   set_control(iffalse);
 
   if (stopped()) {              // Path is dead?
@@ -1089,7 +1089,7 @@ void Parse::do_if(BoolTest::mask btest, Node* c) {
   }
   assert(btest != BoolTest::eq, "!= is the only canonical exact test");
 
-  Node* tst0 = new (C, 2) BoolNode(c, btest);
+  Node* tst0 = new (C) BoolNode(c, btest);
   Node* tst = _gvn.transform(tst0);
   BoolTest::mask taken_btest   = BoolTest::illegal;
   BoolTest::mask untaken_btest = BoolTest::illegal;
@@ -1120,8 +1120,8 @@ void Parse::do_if(BoolTest::mask btest, Node* c) {
   float true_prob = (taken_if_true ? prob : untaken_prob);
   IfNode* iff = create_and_map_if(control(), tst, true_prob, cnt);
   assert(iff->_prob > 0.0f,"Optimizer made bad probability in parser");
-  Node* taken_branch   = new (C, 1) IfTrueNode(iff);
-  Node* untaken_branch = new (C, 1) IfFalseNode(iff);
+  Node* taken_branch   = new (C) IfTrueNode(iff);
+  Node* untaken_branch = new (C) IfFalseNode(iff);
   if (!taken_if_true) {  // Finish conversion to canonical form
     Node* tmp      = taken_branch;
     taken_branch   = untaken_branch;
@@ -1239,7 +1239,7 @@ void Parse::adjust_map_after_if(BoolTest::mask btest, Node* c, float prob,
 
 static Node* extract_obj_from_klass_load(PhaseGVN* gvn, Node* n) {
   Node* ldk;
-  if (n->is_DecodeN()) {
+  if (n->is_DecodeNKlass()) {
     if (n->in(1)->Opcode() != Op_LoadNKlass) {
       return NULL;
     } else {
@@ -1285,7 +1285,7 @@ void Parse::sharpen_type_after_if(BoolTest::mask btest,
           JVMState* jvms = this->jvms();
           if (obj_in_map >= 0 &&
               (jvms->is_loc(obj_in_map) || jvms->is_stk(obj_in_map))) {
-            TypeNode* ccast = new (C, 2) CheckCastPPNode(control(), obj, tboth);
+            TypeNode* ccast = new (C) CheckCastPPNode(control(), obj, tboth);
             const Type* tcc = ccast->as_Type()->type();
             assert(tcc != obj_type && tcc->higher_equal(obj_type), "must improve");
             // Delay transform() call to allow recovery of pre-cast value
@@ -1320,10 +1320,10 @@ void Parse::sharpen_type_after_if(BoolTest::mask btest,
       const Type* tboth = tcon->join(tval);
       if (tboth == tval)  break;        // Nothing to gain.
       if (tcon->isa_int()) {
-        ccast = new (C, 2) CastIINode(val, tboth);
+        ccast = new (C) CastIINode(val, tboth);
       } else if (tcon == TypePtr::NULL_PTR) {
         // Cast to null, but keep the pointer identity temporarily live.
-        ccast = new (C, 2) CastPPNode(val, tboth);
+        ccast = new (C) CastPPNode(val, tboth);
       } else {
         const TypeF* tf = tcon->isa_float_constant();
         const TypeD* td = tcon->isa_double_constant();
@@ -1738,59 +1738,59 @@ void Parse::do_one_bytecode() {
     if (stopped())  return;
     b = pop();
     a = pop();
-    push( _gvn.transform( new (C, 3) DivINode(control(),a,b) ) );
+    push( _gvn.transform( new (C) DivINode(control(),a,b) ) );
     break;
   case Bytecodes::_imul:
     b = pop(); a = pop();
-    push( _gvn.transform( new (C, 3) MulINode(a,b) ) );
+    push( _gvn.transform( new (C) MulINode(a,b) ) );
     break;
   case Bytecodes::_iadd:
     b = pop(); a = pop();
-    push( _gvn.transform( new (C, 3) AddINode(a,b) ) );
+    push( _gvn.transform( new (C) AddINode(a,b) ) );
     break;
   case Bytecodes::_ineg:
     a = pop();
-    push( _gvn.transform( new (C, 3) SubINode(_gvn.intcon(0),a)) );
+    push( _gvn.transform( new (C) SubINode(_gvn.intcon(0),a)) );
     break;
   case Bytecodes::_isub:
     b = pop(); a = pop();
-    push( _gvn.transform( new (C, 3) SubINode(a,b) ) );
+    push( _gvn.transform( new (C) SubINode(a,b) ) );
     break;
   case Bytecodes::_iand:
     b = pop(); a = pop();
-    push( _gvn.transform( new (C, 3) AndINode(a,b) ) );
+    push( _gvn.transform( new (C) AndINode(a,b) ) );
     break;
   case Bytecodes::_ior:
     b = pop(); a = pop();
-    push( _gvn.transform( new (C, 3) OrINode(a,b) ) );
+    push( _gvn.transform( new (C) OrINode(a,b) ) );
     break;
   case Bytecodes::_ixor:
     b = pop(); a = pop();
-    push( _gvn.transform( new (C, 3) XorINode(a,b) ) );
+    push( _gvn.transform( new (C) XorINode(a,b) ) );
     break;
   case Bytecodes::_ishl:
     b = pop(); a = pop();
-    push( _gvn.transform( new (C, 3) LShiftINode(a,b) ) );
+    push( _gvn.transform( new (C) LShiftINode(a,b) ) );
     break;
   case Bytecodes::_ishr:
     b = pop(); a = pop();
-    push( _gvn.transform( new (C, 3) RShiftINode(a,b) ) );
+    push( _gvn.transform( new (C) RShiftINode(a,b) ) );
     break;
   case Bytecodes::_iushr:
     b = pop(); a = pop();
-    push( _gvn.transform( new (C, 3) URShiftINode(a,b) ) );
+    push( _gvn.transform( new (C) URShiftINode(a,b) ) );
     break;
 
   case Bytecodes::_fneg:
     a = pop();
-    b = _gvn.transform(new (C, 2) NegFNode (a));
+    b = _gvn.transform(new (C) NegFNode (a));
     push(b);
     break;
 
   case Bytecodes::_fsub:
     b = pop();
     a = pop();
-    c = _gvn.transform( new (C, 3) SubFNode(a,b) );
+    c = _gvn.transform( new (C) SubFNode(a,b) );
     d = precision_rounding(c);
     push( d );
     break;
@@ -1798,7 +1798,7 @@ void Parse::do_one_bytecode() {
   case Bytecodes::_fadd:
     b = pop();
     a = pop();
-    c = _gvn.transform( new (C, 3) AddFNode(a,b) );
+    c = _gvn.transform( new (C) AddFNode(a,b) );
     d = precision_rounding(c);
     push( d );
     break;
@@ -1806,7 +1806,7 @@ void Parse::do_one_bytecode() {
   case Bytecodes::_fmul:
     b = pop();
     a = pop();
-    c = _gvn.transform( new (C, 3) MulFNode(a,b) );
+    c = _gvn.transform( new (C) MulFNode(a,b) );
     d = precision_rounding(c);
     push( d );
     break;
@@ -1814,7 +1814,7 @@ void Parse::do_one_bytecode() {
   case Bytecodes::_fdiv:
     b = pop();
     a = pop();
-    c = _gvn.transform( new (C, 3) DivFNode(0,a,b) );
+    c = _gvn.transform( new (C) DivFNode(0,a,b) );
     d = precision_rounding(c);
     push( d );
     break;
@@ -1824,7 +1824,7 @@ void Parse::do_one_bytecode() {
       // Generate a ModF node.
       b = pop();
       a = pop();
-      c = _gvn.transform( new (C, 3) ModFNode(0,a,b) );
+      c = _gvn.transform( new (C) ModFNode(0,a,b) );
       d = precision_rounding(c);
       push( d );
     }
@@ -1837,7 +1837,7 @@ void Parse::do_one_bytecode() {
   case Bytecodes::_fcmpl:
     b = pop();
     a = pop();
-    c = _gvn.transform( new (C, 3) CmpF3Node( a, b));
+    c = _gvn.transform( new (C) CmpF3Node( a, b));
     push(c);
     break;
   case Bytecodes::_fcmpg:
@@ -1849,40 +1849,40 @@ void Parse::do_one_bytecode() {
     // as well by using CmpF3 which implements unordered-lesser instead of
     // unordered-greater semantics.  Finally, commute the result bits.  Result
     // is same as using a CmpF3Greater except we did it with CmpF3 alone.
-    c = _gvn.transform( new (C, 3) CmpF3Node( b, a));
-    c = _gvn.transform( new (C, 3) SubINode(_gvn.intcon(0),c) );
+    c = _gvn.transform( new (C) CmpF3Node( b, a));
+    c = _gvn.transform( new (C) SubINode(_gvn.intcon(0),c) );
     push(c);
     break;
 
   case Bytecodes::_f2i:
     a = pop();
-    push(_gvn.transform(new (C, 2) ConvF2INode(a)));
+    push(_gvn.transform(new (C) ConvF2INode(a)));
     break;
 
   case Bytecodes::_d2i:
     a = pop_pair();
-    b = _gvn.transform(new (C, 2) ConvD2INode(a));
+    b = _gvn.transform(new (C) ConvD2INode(a));
     push( b );
     break;
 
   case Bytecodes::_f2d:
     a = pop();
-    b = _gvn.transform( new (C, 2) ConvF2DNode(a));
+    b = _gvn.transform( new (C) ConvF2DNode(a));
     push_pair( b );
     break;
 
   case Bytecodes::_d2f:
     a = pop_pair();
-    b = _gvn.transform( new (C, 2) ConvD2FNode(a));
+    b = _gvn.transform( new (C) ConvD2FNode(a));
     // This breaks _227_mtrt (speed & correctness) and _222_mpegaudio (speed)
-    //b = _gvn.transform(new (C, 2) RoundFloatNode(0, b) );
+    //b = _gvn.transform(new (C) RoundFloatNode(0, b) );
     push( b );
     break;
 
   case Bytecodes::_l2f:
     if (Matcher::convL2FSupported()) {
       a = pop_pair();
-      b = _gvn.transform( new (C, 2) ConvL2FNode(a));
+      b = _gvn.transform( new (C) ConvL2FNode(a));
       // For i486.ad, FILD doesn't restrict precision to 24 or 53 bits.
       // Rather than storing the result into an FP register then pushing
       // out to memory to round, the machine instruction that implements
@@ -1897,7 +1897,7 @@ void Parse::do_one_bytecode() {
 
   case Bytecodes::_l2d:
     a = pop_pair();
-    b = _gvn.transform( new (C, 2) ConvL2DNode(a));
+    b = _gvn.transform( new (C) ConvL2DNode(a));
     // For i486.ad, rounding is always necessary (see _l2f above).
     // c = dprecision_rounding(b);
     c = _gvn.transform(b);
@@ -1906,20 +1906,20 @@ void Parse::do_one_bytecode() {
 
   case Bytecodes::_f2l:
     a = pop();
-    b = _gvn.transform( new (C, 2) ConvF2LNode(a));
+    b = _gvn.transform( new (C) ConvF2LNode(a));
     push_pair(b);
     break;
 
   case Bytecodes::_d2l:
     a = pop_pair();
-    b = _gvn.transform( new (C, 2) ConvD2LNode(a));
+    b = _gvn.transform( new (C) ConvD2LNode(a));
     push_pair(b);
     break;
 
   case Bytecodes::_dsub:
     b = pop_pair();
     a = pop_pair();
-    c = _gvn.transform( new (C, 3) SubDNode(a,b) );
+    c = _gvn.transform( new (C) SubDNode(a,b) );
     d = dprecision_rounding(c);
     push_pair( d );
     break;
@@ -1927,7 +1927,7 @@ void Parse::do_one_bytecode() {
   case Bytecodes::_dadd:
     b = pop_pair();
     a = pop_pair();
-    c = _gvn.transform( new (C, 3) AddDNode(a,b) );
+    c = _gvn.transform( new (C) AddDNode(a,b) );
     d = dprecision_rounding(c);
     push_pair( d );
     break;
@@ -1935,7 +1935,7 @@ void Parse::do_one_bytecode() {
   case Bytecodes::_dmul:
     b = pop_pair();
     a = pop_pair();
-    c = _gvn.transform( new (C, 3) MulDNode(a,b) );
+    c = _gvn.transform( new (C) MulDNode(a,b) );
     d = dprecision_rounding(c);
     push_pair( d );
     break;
@@ -1943,14 +1943,14 @@ void Parse::do_one_bytecode() {
   case Bytecodes::_ddiv:
     b = pop_pair();
     a = pop_pair();
-    c = _gvn.transform( new (C, 3) DivDNode(0,a,b) );
+    c = _gvn.transform( new (C) DivDNode(0,a,b) );
     d = dprecision_rounding(c);
     push_pair( d );
     break;
 
   case Bytecodes::_dneg:
     a = pop_pair();
-    b = _gvn.transform(new (C, 2) NegDNode (a));
+    b = _gvn.transform(new (C) NegDNode (a));
     push_pair(b);
     break;
 
@@ -1961,7 +1961,7 @@ void Parse::do_one_bytecode() {
       a = pop_pair();
       // a % b
 
-      c = _gvn.transform( new (C, 3) ModDNode(0,a,b) );
+      c = _gvn.transform( new (C) ModDNode(0,a,b) );
       d = dprecision_rounding(c);
       push_pair( d );
     }
@@ -1974,7 +1974,7 @@ void Parse::do_one_bytecode() {
   case Bytecodes::_dcmpl:
     b = pop_pair();
     a = pop_pair();
-    c = _gvn.transform( new (C, 3) CmpD3Node( a, b));
+    c = _gvn.transform( new (C) CmpD3Node( a, b));
     push(c);
     break;
 
@@ -1987,8 +1987,8 @@ void Parse::do_one_bytecode() {
     // unordered-lesser instead of unordered-greater semantics.
     // Finally, negate the result bits.  Result is same as using a
     // CmpD3Greater except we did it with CmpD3 alone.
-    c = _gvn.transform( new (C, 3) CmpD3Node( b, a));
-    c = _gvn.transform( new (C, 3) SubINode(_gvn.intcon(0),c) );
+    c = _gvn.transform( new (C) CmpD3Node( b, a));
+    c = _gvn.transform( new (C) SubINode(_gvn.intcon(0),c) );
     push(c);
     break;
 
@@ -1997,44 +1997,44 @@ void Parse::do_one_bytecode() {
   case Bytecodes::_land:
     b = pop_pair();
     a = pop_pair();
-    c = _gvn.transform( new (C, 3) AndLNode(a,b) );
+    c = _gvn.transform( new (C) AndLNode(a,b) );
     push_pair(c);
     break;
   case Bytecodes::_lor:
     b = pop_pair();
     a = pop_pair();
-    c = _gvn.transform( new (C, 3) OrLNode(a,b) );
+    c = _gvn.transform( new (C) OrLNode(a,b) );
     push_pair(c);
     break;
   case Bytecodes::_lxor:
     b = pop_pair();
     a = pop_pair();
-    c = _gvn.transform( new (C, 3) XorLNode(a,b) );
+    c = _gvn.transform( new (C) XorLNode(a,b) );
     push_pair(c);
     break;
 
   case Bytecodes::_lshl:
     b = pop();                  // the shift count
     a = pop_pair();             // value to be shifted
-    c = _gvn.transform( new (C, 3) LShiftLNode(a,b) );
+    c = _gvn.transform( new (C) LShiftLNode(a,b) );
     push_pair(c);
     break;
   case Bytecodes::_lshr:
     b = pop();                  // the shift count
     a = pop_pair();             // value to be shifted
-    c = _gvn.transform( new (C, 3) RShiftLNode(a,b) );
+    c = _gvn.transform( new (C) RShiftLNode(a,b) );
     push_pair(c);
     break;
   case Bytecodes::_lushr:
     b = pop();                  // the shift count
     a = pop_pair();             // value to be shifted
-    c = _gvn.transform( new (C, 3) URShiftLNode(a,b) );
+    c = _gvn.transform( new (C) URShiftLNode(a,b) );
     push_pair(c);
     break;
   case Bytecodes::_lmul:
     b = pop_pair();
     a = pop_pair();
-    c = _gvn.transform( new (C, 3) MulLNode(a,b) );
+    c = _gvn.transform( new (C) MulLNode(a,b) );
     push_pair(c);
     break;
 
@@ -2046,7 +2046,7 @@ void Parse::do_one_bytecode() {
     if (stopped())  return;
     b = pop_pair();
     a = pop_pair();
-    c = _gvn.transform( new (C, 3) ModLNode(control(),a,b) );
+    c = _gvn.transform( new (C) ModLNode(control(),a,b) );
     push_pair(c);
     break;
 
@@ -2058,20 +2058,20 @@ void Parse::do_one_bytecode() {
     if (stopped())  return;
     b = pop_pair();
     a = pop_pair();
-    c = _gvn.transform( new (C, 3) DivLNode(control(),a,b) );
+    c = _gvn.transform( new (C) DivLNode(control(),a,b) );
     push_pair(c);
     break;
 
   case Bytecodes::_ladd:
     b = pop_pair();
     a = pop_pair();
-    c = _gvn.transform( new (C, 3) AddLNode(a,b) );
+    c = _gvn.transform( new (C) AddLNode(a,b) );
     push_pair(c);
     break;
   case Bytecodes::_lsub:
     b = pop_pair();
     a = pop_pair();
-    c = _gvn.transform( new (C, 3) SubLNode(a,b) );
+    c = _gvn.transform( new (C) SubLNode(a,b) );
     push_pair(c);
     break;
   case Bytecodes::_lcmp:
@@ -2102,58 +2102,58 @@ void Parse::do_one_bytecode() {
     }
     b = pop_pair();
     a = pop_pair();
-    c = _gvn.transform( new (C, 3) CmpL3Node( a, b ));
+    c = _gvn.transform( new (C) CmpL3Node( a, b ));
     push(c);
     break;
 
   case Bytecodes::_lneg:
     a = pop_pair();
-    b = _gvn.transform( new (C, 3) SubLNode(longcon(0),a));
+    b = _gvn.transform( new (C) SubLNode(longcon(0),a));
     push_pair(b);
     break;
   case Bytecodes::_l2i:
     a = pop_pair();
-    push( _gvn.transform( new (C, 2) ConvL2INode(a)));
+    push( _gvn.transform( new (C) ConvL2INode(a)));
     break;
   case Bytecodes::_i2l:
     a = pop();
-    b = _gvn.transform( new (C, 2) ConvI2LNode(a));
+    b = _gvn.transform( new (C) ConvI2LNode(a));
     push_pair(b);
     break;
   case Bytecodes::_i2b:
     // Sign extend
     a = pop();
-    a = _gvn.transform( new (C, 3) LShiftINode(a,_gvn.intcon(24)) );
-    a = _gvn.transform( new (C, 3) RShiftINode(a,_gvn.intcon(24)) );
+    a = _gvn.transform( new (C) LShiftINode(a,_gvn.intcon(24)) );
+    a = _gvn.transform( new (C) RShiftINode(a,_gvn.intcon(24)) );
     push( a );
     break;
   case Bytecodes::_i2s:
     a = pop();
-    a = _gvn.transform( new (C, 3) LShiftINode(a,_gvn.intcon(16)) );
-    a = _gvn.transform( new (C, 3) RShiftINode(a,_gvn.intcon(16)) );
+    a = _gvn.transform( new (C) LShiftINode(a,_gvn.intcon(16)) );
+    a = _gvn.transform( new (C) RShiftINode(a,_gvn.intcon(16)) );
     push( a );
     break;
   case Bytecodes::_i2c:
     a = pop();
-    push( _gvn.transform( new (C, 3) AndINode(a,_gvn.intcon(0xFFFF)) ) );
+    push( _gvn.transform( new (C) AndINode(a,_gvn.intcon(0xFFFF)) ) );
     break;
 
   case Bytecodes::_i2f:
     a = pop();
-    b = _gvn.transform( new (C, 2) ConvI2FNode(a) ) ;
+    b = _gvn.transform( new (C) ConvI2FNode(a) ) ;
     c = precision_rounding(b);
     push (b);
     break;
 
   case Bytecodes::_i2d:
     a = pop();
-    b = _gvn.transform( new (C, 2) ConvI2DNode(a));
+    b = _gvn.transform( new (C) ConvI2DNode(a));
     push_pair(b);
     break;
 
   case Bytecodes::_iinc:        // Increment local
     i = iter().get_index();     // Get local index
-    set_local( i, _gvn.transform( new (C, 3) AddINode( _gvn.intcon(iter().get_iinc_con()), local(i) ) ) );
+    set_local( i, _gvn.transform( new (C) AddINode( _gvn.intcon(iter().get_iinc_con()), local(i) ) ) );
     break;
 
   // Exit points of synchronized methods must have an unlock node
@@ -2225,7 +2225,7 @@ void Parse::do_one_bytecode() {
     maybe_add_safepoint(iter().get_dest());
     a = null();
     b = pop();
-    c = _gvn.transform( new (C, 3) CmpPNode(b, a) );
+    c = _gvn.transform( new (C) CmpPNode(b, a) );
     do_ifnull(btest, c);
     break;
 
@@ -2236,7 +2236,7 @@ void Parse::do_one_bytecode() {
     maybe_add_safepoint(iter().get_dest());
     a = pop();
     b = pop();
-    c = _gvn.transform( new (C, 3) CmpPNode(b, a) );
+    c = _gvn.transform( new (C) CmpPNode(b, a) );
     do_if(btest, c);
     break;
 
@@ -2251,7 +2251,7 @@ void Parse::do_one_bytecode() {
     maybe_add_safepoint(iter().get_dest());
     a = _gvn.intcon(0);
     b = pop();
-    c = _gvn.transform( new (C, 3) CmpINode(b, a) );
+    c = _gvn.transform( new (C) CmpINode(b, a) );
     do_if(btest, c);
     break;
 
@@ -2266,7 +2266,7 @@ void Parse::do_one_bytecode() {
     maybe_add_safepoint(iter().get_dest());
     a = pop();
     b = pop();
-    c = _gvn.transform( new (C, 3) CmpINode( b, a ) );
+    c = _gvn.transform( new (C) CmpINode( b, a ) );
     do_if(btest, c);
     break;
 
diff --git a/hotspot/src/share/vm/opto/parse3.cpp b/hotspot/src/share/vm/opto/parse3.cpp
index 6d6fd07c6d9..119fe7d1922 100644
--- a/hotspot/src/share/vm/opto/parse3.cpp
+++ b/hotspot/src/share/vm/opto/parse3.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -510,7 +510,7 @@ void Parse::do_multianewarray() {
                           dims);
   }
 
-  Node* res = _gvn.transform(new (C, 1) ProjNode(c, TypeFunc::Parms));
+  Node* res = _gvn.transform(new (C) ProjNode(c, TypeFunc::Parms));
 
   const Type* type = TypeOopPtr::make_from_klass_raw(array_klass);
 
@@ -524,7 +524,7 @@ void Parse::do_multianewarray() {
 
     // We cannot sharpen the nested sub-arrays, since the top level is mutable.
 
-  Node* cast = _gvn.transform( new (C, 2) CheckCastPPNode(control(), res, type) );
+  Node* cast = _gvn.transform( new (C) CheckCastPPNode(control(), res, type) );
   push(cast);
 
   // Possible improvements:
diff --git a/hotspot/src/share/vm/opto/parseHelper.cpp b/hotspot/src/share/vm/opto/parseHelper.cpp
index e562d27729a..19b0f513366 100644
--- a/hotspot/src/share/vm/opto/parseHelper.cpp
+++ b/hotspot/src/share/vm/opto/parseHelper.cpp
@@ -43,7 +43,7 @@ void GraphKit::make_dtrace_method_entry_exit(ciMethod* method, bool is_entry) {
   const char     *call_name    = is_entry ? "dtrace_method_entry" : "dtrace_method_exit";
 
   // Get base of thread-local storage area
-  Node* thread = _gvn.transform( new (C, 1) ThreadLocalNode() );
+  Node* thread = _gvn.transform( new (C) ThreadLocalNode() );
 
   // Get method
   const TypePtr* method_type = TypeMetadataPtr::make(method);
@@ -175,8 +175,8 @@ void Parse::array_store_check() {
     // Make a constant out of the inexact array klass
     const TypeKlassPtr *extak = tak->cast_to_exactness(true)->is_klassptr();
     Node* con = makecon(extak);
-    Node* cmp = _gvn.transform(new (C, 3) CmpPNode( array_klass, con ));
-    Node* bol = _gvn.transform(new (C, 2) BoolNode( cmp, BoolTest::eq ));
+    Node* cmp = _gvn.transform(new (C) CmpPNode( array_klass, con ));
+    Node* bol = _gvn.transform(new (C) BoolNode( cmp, BoolTest::eq ));
     Node* ctrl= control();
     { BuildCutout unless(this, bol, PROB_MAX);
       uncommon_trap(Deoptimization::Reason_array_check,
@@ -200,7 +200,7 @@ void Parse::array_store_check() {
   // Come here for polymorphic array klasses
 
   // Extract the array element class
-  int element_klass_offset = in_bytes(objArrayKlass::element_klass_offset());
+  int element_klass_offset = in_bytes(ObjArrayKlass::element_klass_offset());
   Node *p2 = basic_plus_adr(array_klass, array_klass, element_klass_offset);
   Node *a_e_klass = _gvn.transform( LoadKlassNode::make(_gvn, immutable_memory(), p2, tak) );
 
@@ -215,8 +215,8 @@ void Parse::emit_guard_for_new(ciInstanceKlass* klass) {
   //   if (klass->_init_thread != current_thread ||
   //       klass->_init_state != being_initialized)
   //      uncommon_trap
-  Node* cur_thread = _gvn.transform( new (C, 1) ThreadLocalNode() );
-  Node* merge = new (C, 3) RegionNode(3);
+  Node* cur_thread = _gvn.transform( new (C) ThreadLocalNode() );
+  Node* merge = new (C) RegionNode(3);
   _gvn.set_type(merge, Type::CONTROL);
   Node* kls = makecon(TypeKlassPtr::make(klass));
 
@@ -322,9 +322,9 @@ void Parse::test_counter_against_threshold(Node* cnt, int limit) {
 
   // Test invocation count vs threshold
   Node *threshold = makecon(TypeInt::make(limit));
-  Node *chk   = _gvn.transform( new (C, 3) CmpUNode( cnt, threshold) );
+  Node *chk   = _gvn.transform( new (C) CmpUNode( cnt, threshold) );
   BoolTest::mask btest = BoolTest::lt;
-  Node *tst   = _gvn.transform( new (C, 2) BoolNode( chk, btest) );
+  Node *tst   = _gvn.transform( new (C) BoolNode( chk, btest) );
   // Branch to failure if threshold exceeded
   { BuildCutout unless(this, tst, PROB_ALWAYS);
     uncommon_trap(Deoptimization::Reason_age,
@@ -348,7 +348,7 @@ void Parse::increment_and_test_invocation_counter(int limit) {
   test_counter_against_threshold(cnt, limit);
 
   // Add one to the counter and store
-  Node* incr = _gvn.transform(new (C, 3) AddINode(cnt, _gvn.intcon(1)));
+  Node* incr = _gvn.transform(new (C) AddINode(cnt, _gvn.intcon(1)));
   store_to_memory( NULL, adr_node, incr, T_INT, adr_type );
 }
 
@@ -369,8 +369,8 @@ Node* Parse::method_data_addressing(ciMethodData* md, ciProfileData* data, ByteS
 
   if (stride != 0) {
     Node* str = _gvn.MakeConX(stride);
-    Node* scale = _gvn.transform( new (C, 3) MulXNode( idx, str ) );
-    ptr   = _gvn.transform( new (C, 4) AddPNode( mdo, ptr, scale ) );
+    Node* scale = _gvn.transform( new (C) MulXNode( idx, str ) );
+    ptr   = _gvn.transform( new (C) AddPNode( mdo, ptr, scale ) );
   }
 
   return ptr;
@@ -382,7 +382,7 @@ void Parse::increment_md_counter_at(ciMethodData* md, ciProfileData* data, ByteS
 
   const TypePtr* adr_type = _gvn.type(adr_node)->is_ptr();
   Node* cnt  = make_load(NULL, adr_node, TypeInt::INT, T_INT, adr_type);
-  Node* incr = _gvn.transform(new (C, 3) AddINode(cnt, _gvn.intcon(DataLayout::counter_increment)));
+  Node* incr = _gvn.transform(new (C) AddINode(cnt, _gvn.intcon(DataLayout::counter_increment)));
   store_to_memory(NULL, adr_node, incr, T_INT, adr_type );
 }
 
@@ -402,7 +402,7 @@ void Parse::set_md_flag_at(ciMethodData* md, ciProfileData* data, int flag_const
 
   const TypePtr* adr_type = _gvn.type(adr_node)->is_ptr();
   Node* flags = make_load(NULL, adr_node, TypeInt::BYTE, T_BYTE, adr_type);
-  Node* incr = _gvn.transform(new (C, 3) OrINode(flags, _gvn.intcon(flag_constant)));
+  Node* incr = _gvn.transform(new (C) OrINode(flags, _gvn.intcon(flag_constant)));
   store_to_memory(NULL, adr_node, incr, T_BYTE, adr_type);
 }
 
diff --git a/hotspot/src/share/vm/opto/phaseX.cpp b/hotspot/src/share/vm/opto/phaseX.cpp
index 0fbcf4d09e1..849327cf8bb 100644
--- a/hotspot/src/share/vm/opto/phaseX.cpp
+++ b/hotspot/src/share/vm/opto/phaseX.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -48,7 +48,7 @@ NodeHash::NodeHash(uint est_max_size) :
   _total_insert_probes(0), _total_inserts(0),
   _insert_probes(0), _grows(0) {
   // _sentinel must be in the current node space
-  _sentinel = new (Compile::current(), 1) ProjNode(NULL, TypeFunc::Control);
+  _sentinel = new (Compile::current()) ProjNode(NULL, TypeFunc::Control);
   memset(_table,0,sizeof(Node*)*_max);
 }
 
@@ -63,7 +63,7 @@ NodeHash::NodeHash(Arena *arena, uint est_max_size) :
   _total_insert_probes(0), _total_inserts(0),
   _insert_probes(0), _grows(0) {
   // _sentinel must be in the current node space
-  _sentinel = new (Compile::current(), 1) ProjNode(NULL, TypeFunc::Control);
+  _sentinel = new (Compile::current()) ProjNode(NULL, TypeFunc::Control);
   memset(_table,0,sizeof(Node*)*_max);
 }
 
@@ -1246,7 +1246,7 @@ void PhaseIterGVN::subsume_node( Node *old, Node *nn ) {
   }
 
   // Smash all inputs to 'old', isolating him completely
-  Node *temp = new (C, 1) Node(1);
+  Node *temp = new (C) Node(1);
   temp->init_req(0,nn);     // Add a use to nn to prevent him from dying
   remove_dead_node( old );
   temp->del_req(0);         // Yank bogus edge
diff --git a/hotspot/src/share/vm/opto/phaseX.hpp b/hotspot/src/share/vm/opto/phaseX.hpp
index 8068e6d5484..3fc8a956653 100644
--- a/hotspot/src/share/vm/opto/phaseX.hpp
+++ b/hotspot/src/share/vm/opto/phaseX.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -497,8 +497,8 @@ public:
 #ifndef PRODUCT
 protected:
   // Sub-quadratic implementation of VerifyIterativeGVN.
-  unsigned long _verify_counter;
-  unsigned long _verify_full_passes;
+  julong _verify_counter;
+  julong _verify_full_passes;
   enum { _verify_window_size = 30 };
   Node* _verify_window[_verify_window_size];
   void verify_step(Node* n);
diff --git a/hotspot/src/share/vm/opto/reg_split.cpp b/hotspot/src/share/vm/opto/reg_split.cpp
index 5e0dad80dc0..fe720e89334 100644
--- a/hotspot/src/share/vm/opto/reg_split.cpp
+++ b/hotspot/src/share/vm/opto/reg_split.cpp
@@ -646,7 +646,7 @@ uint PhaseChaitin::Split(uint maxlrg, ResourceArea* split_arena) {
           // create a new phi node and insert it into the block
           // type is taken from left over pointer to a predecessor
           assert(n3,"No non-NULL reaching DEF for a Phi");
-          phi = new (C, b->num_preds()) PhiNode(b->head(), n3->bottom_type());
+          phi = new (C) PhiNode(b->head(), n3->bottom_type());
           // initialize the Reaches entry for this LRG
           Reachblock[slidx] = phi;
 
diff --git a/hotspot/src/share/vm/opto/runtime.cpp b/hotspot/src/share/vm/opto/runtime.cpp
index e33c042e184..bb050533d22 100644
--- a/hotspot/src/share/vm/opto/runtime.cpp
+++ b/hotspot/src/share/vm/opto/runtime.cpp
@@ -286,13 +286,13 @@ JRT_BLOCK_ENTRY(void, OptoRuntime::new_array_C(Klass* array_type, int len, JavaT
   if (Klass::cast(array_type)->oop_is_typeArray()) {
     // The oopFactory likes to work with the element type.
     // (We could bypass the oopFactory, since it doesn't add much value.)
-    BasicType elem_type = typeArrayKlass::cast(array_type)->element_type();
+    BasicType elem_type = TypeArrayKlass::cast(array_type)->element_type();
     result = oopFactory::new_typeArray(elem_type, len, THREAD);
   } else {
     // Although the oopFactory likes to work with the elem_type,
     // the compiler prefers the array_type, since it must already have
     // that latter value in hand for the fast path.
-    Klass* elem_type = objArrayKlass::cast(array_type)->element_klass();
+    Klass* elem_type = ObjArrayKlass::cast(array_type)->element_klass();
     result = oopFactory::new_objArray(elem_type, len, THREAD);
   }
 
@@ -323,7 +323,7 @@ JRT_BLOCK_ENTRY(void, OptoRuntime::new_array_nozero_C(Klass* array_type, int len
 
   assert(Klass::cast(array_type)->oop_is_typeArray(), "should be called only for type array");
   // The oopFactory likes to work with the element type.
-  BasicType elem_type = typeArrayKlass::cast(array_type)->element_type();
+  BasicType elem_type = TypeArrayKlass::cast(array_type)->element_type();
   result = oopFactory::new_typeArray_nozero(elem_type, len, THREAD);
 
   // Pass oops back through thread local storage.  Our apparent type to Java
@@ -344,7 +344,7 @@ JRT_BLOCK_ENTRY(void, OptoRuntime::new_array_nozero_C(Klass* array_type, int len
       is_deoptimized_caller_frame(thread)) {
     // Zero array here if the caller is deoptimized.
     int size = ((typeArrayOop)result)->object_size();
-    BasicType elem_type = typeArrayKlass::cast(array_type)->element_type();
+    BasicType elem_type = TypeArrayKlass::cast(array_type)->element_type();
     const size_t hs = arrayOopDesc::header_size(elem_type);
     // Align to next 8 bytes to avoid trashing arrays's length.
     const size_t aligned_hs = align_object_offset(hs);
@@ -370,7 +370,7 @@ JRT_ENTRY(void, OptoRuntime::multianewarray2_C(Klass* elem_type, int len1, int l
   jint dims[2];
   dims[0] = len1;
   dims[1] = len2;
-  oop obj = arrayKlass::cast(elem_type)->multi_allocate(2, dims, THREAD);
+  oop obj = ArrayKlass::cast(elem_type)->multi_allocate(2, dims, THREAD);
   deoptimize_caller_frame(thread, HAS_PENDING_EXCEPTION);
   thread->set_vm_result(obj);
 JRT_END
@@ -386,7 +386,7 @@ JRT_ENTRY(void, OptoRuntime::multianewarray3_C(Klass* elem_type, int len1, int l
   dims[0] = len1;
   dims[1] = len2;
   dims[2] = len3;
-  oop obj = arrayKlass::cast(elem_type)->multi_allocate(3, dims, THREAD);
+  oop obj = ArrayKlass::cast(elem_type)->multi_allocate(3, dims, THREAD);
   deoptimize_caller_frame(thread, HAS_PENDING_EXCEPTION);
   thread->set_vm_result(obj);
 JRT_END
@@ -403,7 +403,7 @@ JRT_ENTRY(void, OptoRuntime::multianewarray4_C(Klass* elem_type, int len1, int l
   dims[1] = len2;
   dims[2] = len3;
   dims[3] = len4;
-  oop obj = arrayKlass::cast(elem_type)->multi_allocate(4, dims, THREAD);
+  oop obj = ArrayKlass::cast(elem_type)->multi_allocate(4, dims, THREAD);
   deoptimize_caller_frame(thread, HAS_PENDING_EXCEPTION);
   thread->set_vm_result(obj);
 JRT_END
@@ -421,7 +421,7 @@ JRT_ENTRY(void, OptoRuntime::multianewarray5_C(Klass* elem_type, int len1, int l
   dims[2] = len3;
   dims[3] = len4;
   dims[4] = len5;
-  oop obj = arrayKlass::cast(elem_type)->multi_allocate(5, dims, THREAD);
+  oop obj = ArrayKlass::cast(elem_type)->multi_allocate(5, dims, THREAD);
   deoptimize_caller_frame(thread, HAS_PENDING_EXCEPTION);
   thread->set_vm_result(obj);
 JRT_END
@@ -438,7 +438,7 @@ JRT_ENTRY(void, OptoRuntime::multianewarrayN_C(Klass* elem_type, arrayOopDesc* d
   jint *c_dims = NEW_RESOURCE_ARRAY(jint, len);
   Copy::conjoint_jints_atomic(j_dims, c_dims, len);
 
-  oop obj = arrayKlass::cast(elem_type)->multi_allocate(len, c_dims, THREAD);
+  oop obj = ArrayKlass::cast(elem_type)->multi_allocate(len, c_dims, THREAD);
   deoptimize_caller_frame(thread, HAS_PENDING_EXCEPTION);
   thread->set_vm_result(obj);
 JRT_END
diff --git a/hotspot/src/share/vm/opto/split_if.cpp b/hotspot/src/share/vm/opto/split_if.cpp
index bd5eec94215..134c8734798 100644
--- a/hotspot/src/share/vm/opto/split_if.cpp
+++ b/hotspot/src/share/vm/opto/split_if.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,7 @@ Node *PhaseIdealLoop::split_thru_region( Node *n, Node *region ) {
   uint wins = 0;
   assert( n->is_CFG(), "" );
   assert( region->is_Region(), "" );
-  Node *r = new (C, region->req()) RegionNode( region->req() );
+  Node *r = new (C) RegionNode( region->req() );
   IdealLoopTree *loop = get_loop( n );
   for( uint i = 1; i < region->req(); i++ ) {
     Node *x = n->clone();
diff --git a/hotspot/src/share/vm/opto/stringopts.cpp b/hotspot/src/share/vm/opto/stringopts.cpp
index 803b1389932..6be806acc12 100644
--- a/hotspot/src/share/vm/opto/stringopts.cpp
+++ b/hotspot/src/share/vm/opto/stringopts.cpp
@@ -69,7 +69,7 @@ class StringConcat : public ResourceObj {
     _multiple(false),
     _string_alloc(NULL),
     _stringopts(stringopts) {
-    _arguments = new (_stringopts->C, 1) Node(1);
+    _arguments = new (_stringopts->C) Node(1);
     _arguments->del_req(0);
   }
 
@@ -220,11 +220,10 @@ class StringConcat : public ResourceObj {
       // Build a new call using the jvms state of the allocate
       address call_addr = SharedRuntime::uncommon_trap_blob()->entry_point();
       const TypeFunc* call_type = OptoRuntime::uncommon_trap_Type();
-      int size = call_type->domain()->cnt();
       const TypePtr* no_memory_effects = NULL;
       Compile* C = _stringopts->C;
-      CallStaticJavaNode* call = new (C, size) CallStaticJavaNode(call_type, call_addr, "uncommon_trap",
-                                                                  jvms->bci(), no_memory_effects);
+      CallStaticJavaNode* call = new (C) CallStaticJavaNode(call_type, call_addr, "uncommon_trap",
+                                                            jvms->bci(), no_memory_effects);
       for (int e = 0; e < TypeFunc::Parms; e++) {
         call->init_req(e, uct->in(e));
       }
@@ -969,9 +968,9 @@ Node* PhaseStringOpts::fetch_static_field(GraphKit& kit, ciField* field) {
 }
 
 Node* PhaseStringOpts::int_stringSize(GraphKit& kit, Node* arg) {
-  RegionNode *final_merge = new (C, 3) RegionNode(3);
+  RegionNode *final_merge = new (C) RegionNode(3);
   kit.gvn().set_type(final_merge, Type::CONTROL);
-  Node* final_size = new (C, 3) PhiNode(final_merge, TypeInt::INT);
+  Node* final_size = new (C) PhiNode(final_merge, TypeInt::INT);
   kit.gvn().set_type(final_size, TypeInt::INT);
 
   IfNode* iff = kit.create_and_map_if(kit.control(),
@@ -988,11 +987,11 @@ Node* PhaseStringOpts::int_stringSize(GraphKit& kit, Node* arg) {
   } else {
 
     // int size = (i < 0) ? stringSize(-i) + 1 : stringSize(i);
-    RegionNode *r = new (C, 3) RegionNode(3);
+    RegionNode *r = new (C) RegionNode(3);
     kit.gvn().set_type(r, Type::CONTROL);
-    Node *phi = new (C, 3) PhiNode(r, TypeInt::INT);
+    Node *phi = new (C) PhiNode(r, TypeInt::INT);
     kit.gvn().set_type(phi, TypeInt::INT);
-    Node *size = new (C, 3) PhiNode(r, TypeInt::INT);
+    Node *size = new (C) PhiNode(r, TypeInt::INT);
     kit.gvn().set_type(size, TypeInt::INT);
     Node* chk = __ CmpI(arg, __ intcon(0));
     Node* p = __ Bool(chk, BoolTest::lt);
@@ -1017,11 +1016,11 @@ Node* PhaseStringOpts::int_stringSize(GraphKit& kit, Node* arg) {
     // Add loop predicate first.
     kit.add_predicate();
 
-    RegionNode *loop = new (C, 3) RegionNode(3);
+    RegionNode *loop = new (C) RegionNode(3);
     loop->init_req(1, kit.control());
     kit.gvn().set_type(loop, Type::CONTROL);
 
-    Node *index = new (C, 3) PhiNode(loop, TypeInt::INT);
+    Node *index = new (C) PhiNode(loop, TypeInt::INT);
     index->init_req(1, __ intcon(0));
     kit.gvn().set_type(index, TypeInt::INT);
     kit.set_control(loop);
@@ -1054,7 +1053,7 @@ Node* PhaseStringOpts::int_stringSize(GraphKit& kit, Node* arg) {
 }
 
 void PhaseStringOpts::int_getChars(GraphKit& kit, Node* arg, Node* char_array, Node* start, Node* end) {
-  RegionNode *final_merge = new (C, 4) RegionNode(4);
+  RegionNode *final_merge = new (C) RegionNode(4);
   kit.gvn().set_type(final_merge, Type::CONTROL);
   Node *final_mem = PhiNode::make(final_merge, kit.memory(char_adr_idx), Type::MEMORY, TypeAryPtr::CHARS);
   kit.gvn().set_type(final_mem, Type::MEMORY);
@@ -1104,11 +1103,11 @@ void PhaseStringOpts::int_getChars(GraphKit& kit, Node* arg, Node* char_array, N
                                         __ Bool(__ CmpI(arg, __ intcon(0)), BoolTest::lt),
                                         PROB_FAIR, COUNT_UNKNOWN);
 
-    RegionNode *merge = new (C, 3) RegionNode(3);
+    RegionNode *merge = new (C) RegionNode(3);
     kit.gvn().set_type(merge, Type::CONTROL);
-    i = new (C, 3) PhiNode(merge, TypeInt::INT);
+    i = new (C) PhiNode(merge, TypeInt::INT);
     kit.gvn().set_type(i, TypeInt::INT);
-    sign = new (C, 3) PhiNode(merge, TypeInt::INT);
+    sign = new (C) PhiNode(merge, TypeInt::INT);
     kit.gvn().set_type(sign, TypeInt::INT);
 
     merge->init_req(1, __ IfTrue(iff));
@@ -1137,10 +1136,10 @@ void PhaseStringOpts::int_getChars(GraphKit& kit, Node* arg, Node* char_array, N
     // Add loop predicate first.
     kit.add_predicate();
 
-    RegionNode *head = new (C, 3) RegionNode(3);
+    RegionNode *head = new (C) RegionNode(3);
     head->init_req(1, kit.control());
     kit.gvn().set_type(head, Type::CONTROL);
-    Node *i_phi = new (C, 3) PhiNode(head, TypeInt::INT);
+    Node *i_phi = new (C) PhiNode(head, TypeInt::INT);
     i_phi->init_req(1, i);
     kit.gvn().set_type(i_phi, TypeInt::INT);
     charPos = PhiNode::make(head, charPos);
@@ -1261,7 +1260,7 @@ void PhaseStringOpts::replace_string_concat(StringConcat* sc) {
   // as a shim for the insertion of the new code.
   JVMState* jvms     = sc->begin()->jvms()->clone_shallow(C);
   uint size = sc->begin()->req();
-  SafePointNode* map = new (C, size) SafePointNode(size, jvms);
+  SafePointNode* map = new (C) SafePointNode(size, jvms);
 
   // copy the control and memory state from the final call into our
   // new starting state.  This allows any preceeding tests to feed
@@ -1306,12 +1305,12 @@ void PhaseStringOpts::replace_string_concat(StringConcat* sc) {
 
   // Create a region for the overflow checks to merge into.
   int args = MAX2(sc->num_arguments(), 1);
-  RegionNode* overflow = new (C, args) RegionNode(args);
+  RegionNode* overflow = new (C) RegionNode(args);
   kit.gvn().set_type(overflow, Type::CONTROL);
 
   // Create a hook node to hold onto the individual sizes since they
   // are need for the copying phase.
-  Node* string_sizes = new (C, args) Node(args);
+  Node* string_sizes = new (C) Node(args);
 
   Node* length = __ intcon(0);
   for (int argi = 0; argi < sc->num_arguments(); argi++) {
@@ -1355,9 +1354,9 @@ void PhaseStringOpts::replace_string_concat(StringConcat* sc) {
         } else if (!type->higher_equal(TypeInstPtr::NOTNULL)) {
           // s = s != null ? s : "null";
           // length = length + (s.count - s.offset);
-          RegionNode *r = new (C, 3) RegionNode(3);
+          RegionNode *r = new (C) RegionNode(3);
           kit.gvn().set_type(r, Type::CONTROL);
-          Node *phi = new (C, 3) PhiNode(r, type);
+          Node *phi = new (C) PhiNode(r, type);
           kit.gvn().set_type(phi, phi->bottom_type());
           Node* p = __ Bool(__ CmpP(arg, kit.null()), BoolTest::ne);
           IfNode* iff = kit.create_and_map_if(kit.control(), p, PROB_MIN, COUNT_UNKNOWN);
diff --git a/hotspot/src/share/vm/opto/subnode.cpp b/hotspot/src/share/vm/opto/subnode.cpp
index 9ecd2db7db9..cbfe7775108 100644
--- a/hotspot/src/share/vm/opto/subnode.cpp
+++ b/hotspot/src/share/vm/opto/subnode.cpp
@@ -149,7 +149,7 @@ Node *SubINode::Ideal(PhaseGVN *phase, bool can_reshape){
   if( t2->base() == Type::Int ){        // Might be bottom or top...
     const TypeInt *i = t2->is_int();
     if( i->is_con() )
-      return new (phase->C, 3) AddINode(in1, phase->intcon(-i->get_con()));
+      return new (phase->C) AddINode(in1, phase->intcon(-i->get_con()));
   }
 
   // Convert "(x+c0) - y" into (x-y) + c0"
@@ -158,8 +158,8 @@ Node *SubINode::Ideal(PhaseGVN *phase, bool can_reshape){
   if( op1 == Op_AddI && ok_to_convert(in1, in2) ) {
     const Type *tadd = phase->type( in1->in(2) );
     if( tadd->singleton() && tadd != Type::TOP ) {
-      Node *sub2 = phase->transform( new (phase->C, 3) SubINode( in1->in(1), in2 ));
-      return new (phase->C, 3) AddINode( sub2, in1->in(2) );
+      Node *sub2 = phase->transform( new (phase->C) SubINode( in1->in(1), in2 ));
+      return new (phase->C) AddINode( sub2, in1->in(2) );
     }
   }
 
@@ -171,9 +171,9 @@ Node *SubINode::Ideal(PhaseGVN *phase, bool can_reshape){
     Node* in22 = in2->in(2);
     const TypeInt* tcon = phase->type(in22)->isa_int();
     if (tcon != NULL && tcon->is_con()) {
-      Node* sub2 = phase->transform( new (phase->C, 3) SubINode(in1, in21) );
+      Node* sub2 = phase->transform( new (phase->C) SubINode(in1, in21) );
       Node* neg_c0 = phase->intcon(- tcon->get_con());
-      return new (phase->C, 3) AddINode(sub2, neg_c0);
+      return new (phase->C) AddINode(sub2, neg_c0);
     }
   }
 
@@ -191,47 +191,47 @@ Node *SubINode::Ideal(PhaseGVN *phase, bool can_reshape){
   // Convert "x - (x+y)" into "-y"
   if( op2 == Op_AddI &&
       phase->eqv( in1, in2->in(1) ) )
-    return new (phase->C, 3) SubINode( phase->intcon(0),in2->in(2));
+    return new (phase->C) SubINode( phase->intcon(0),in2->in(2));
   // Convert "(x-y) - x" into "-y"
   if( op1 == Op_SubI &&
       phase->eqv( in1->in(1), in2 ) )
-    return new (phase->C, 3) SubINode( phase->intcon(0),in1->in(2));
+    return new (phase->C) SubINode( phase->intcon(0),in1->in(2));
   // Convert "x - (y+x)" into "-y"
   if( op2 == Op_AddI &&
       phase->eqv( in1, in2->in(2) ) )
-    return new (phase->C, 3) SubINode( phase->intcon(0),in2->in(1));
+    return new (phase->C) SubINode( phase->intcon(0),in2->in(1));
 
   // Convert "0 - (x-y)" into "y-x"
   if( t1 == TypeInt::ZERO && op2 == Op_SubI )
-    return new (phase->C, 3) SubINode( in2->in(2), in2->in(1) );
+    return new (phase->C) SubINode( in2->in(2), in2->in(1) );
 
   // Convert "0 - (x+con)" into "-con-x"
   jint con;
   if( t1 == TypeInt::ZERO && op2 == Op_AddI &&
       (con = in2->in(2)->find_int_con(0)) != 0 )
-    return new (phase->C, 3) SubINode( phase->intcon(-con), in2->in(1) );
+    return new (phase->C) SubINode( phase->intcon(-con), in2->in(1) );
 
   // Convert "(X+A) - (X+B)" into "A - B"
   if( op1 == Op_AddI && op2 == Op_AddI && in1->in(1) == in2->in(1) )
-    return new (phase->C, 3) SubINode( in1->in(2), in2->in(2) );
+    return new (phase->C) SubINode( in1->in(2), in2->in(2) );
 
   // Convert "(A+X) - (B+X)" into "A - B"
   if( op1 == Op_AddI && op2 == Op_AddI && in1->in(2) == in2->in(2) )
-    return new (phase->C, 3) SubINode( in1->in(1), in2->in(1) );
+    return new (phase->C) SubINode( in1->in(1), in2->in(1) );
 
   // Convert "(A+X) - (X+B)" into "A - B"
   if( op1 == Op_AddI && op2 == Op_AddI && in1->in(2) == in2->in(1) )
-    return new (phase->C, 3) SubINode( in1->in(1), in2->in(2) );
+    return new (phase->C) SubINode( in1->in(1), in2->in(2) );
 
   // Convert "(X+A) - (B+X)" into "A - B"
   if( op1 == Op_AddI && op2 == Op_AddI && in1->in(1) == in2->in(2) )
-    return new (phase->C, 3) SubINode( in1->in(2), in2->in(1) );
+    return new (phase->C) SubINode( in1->in(2), in2->in(1) );
 
   // Convert "A-(B-C)" into (A+C)-B", since add is commutative and generally
   // nicer to optimize than subtract.
   if( op2 == Op_SubI && in2->outcnt() == 1) {
-    Node *add1 = phase->transform( new (phase->C, 3) AddINode( in1, in2->in(2) ) );
-    return new (phase->C, 3) SubINode( add1, in2->in(1) );
+    Node *add1 = phase->transform( new (phase->C) AddINode( in1, in2->in(2) ) );
+    return new (phase->C) SubINode( add1, in2->in(1) );
   }
 
   return NULL;
@@ -278,7 +278,7 @@ Node *SubLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   // Convert "x-c0" into "x+ -c0".
   if( i &&                      // Might be bottom or top...
       i->is_con() )
-    return new (phase->C, 3) AddLNode(in1, phase->longcon(-i->get_con()));
+    return new (phase->C) AddLNode(in1, phase->longcon(-i->get_con()));
 
   // Convert "(x+c0) - y" into (x-y) + c0"
   // Do not collapse (x+c0)-y if "+" is a loop increment or
@@ -287,8 +287,8 @@ Node *SubLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     Node *in11 = in1->in(1);
     const Type *tadd = phase->type( in1->in(2) );
     if( tadd->singleton() && tadd != Type::TOP ) {
-      Node *sub2 = phase->transform( new (phase->C, 3) SubLNode( in11, in2 ));
-      return new (phase->C, 3) AddLNode( sub2, in1->in(2) );
+      Node *sub2 = phase->transform( new (phase->C) SubLNode( in11, in2 ));
+      return new (phase->C) AddLNode( sub2, in1->in(2) );
     }
   }
 
@@ -299,9 +299,9 @@ Node *SubLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     Node* in22 = in2->in(2);
     const TypeLong* tcon = phase->type(in22)->isa_long();
     if (tcon != NULL && tcon->is_con()) {
-      Node* sub2 = phase->transform( new (phase->C, 3) SubLNode(in1, in21) );
+      Node* sub2 = phase->transform( new (phase->C) SubLNode(in1, in21) );
       Node* neg_c0 = phase->longcon(- tcon->get_con());
-      return new (phase->C, 3) AddLNode(sub2, neg_c0);
+      return new (phase->C) AddLNode(sub2, neg_c0);
     }
   }
 
@@ -319,28 +319,28 @@ Node *SubLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
   // Convert "x - (x+y)" into "-y"
   if( op2 == Op_AddL &&
       phase->eqv( in1, in2->in(1) ) )
-    return new (phase->C, 3) SubLNode( phase->makecon(TypeLong::ZERO), in2->in(2));
+    return new (phase->C) SubLNode( phase->makecon(TypeLong::ZERO), in2->in(2));
   // Convert "x - (y+x)" into "-y"
   if( op2 == Op_AddL &&
       phase->eqv( in1, in2->in(2) ) )
-    return new (phase->C, 3) SubLNode( phase->makecon(TypeLong::ZERO),in2->in(1));
+    return new (phase->C) SubLNode( phase->makecon(TypeLong::ZERO),in2->in(1));
 
   // Convert "0 - (x-y)" into "y-x"
   if( phase->type( in1 ) == TypeLong::ZERO && op2 == Op_SubL )
-    return new (phase->C, 3) SubLNode( in2->in(2), in2->in(1) );
+    return new (phase->C) SubLNode( in2->in(2), in2->in(1) );
 
   // Convert "(X+A) - (X+B)" into "A - B"
   if( op1 == Op_AddL && op2 == Op_AddL && in1->in(1) == in2->in(1) )
-    return new (phase->C, 3) SubLNode( in1->in(2), in2->in(2) );
+    return new (phase->C) SubLNode( in1->in(2), in2->in(2) );
 
   // Convert "(A+X) - (B+X)" into "A - B"
   if( op1 == Op_AddL && op2 == Op_AddL && in1->in(2) == in2->in(2) )
-    return new (phase->C, 3) SubLNode( in1->in(1), in2->in(1) );
+    return new (phase->C) SubLNode( in1->in(1), in2->in(1) );
 
   // Convert "A-(B-C)" into (A+C)-B"
   if( op2 == Op_SubL && in2->outcnt() == 1) {
-    Node *add1 = phase->transform( new (phase->C, 3) AddLNode( in1, in2->in(2) ) );
-    return new (phase->C, 3) SubLNode( add1, in2->in(1) );
+    Node *add1 = phase->transform( new (phase->C) AddLNode( in1, in2->in(2) ) );
+    return new (phase->C) SubLNode( add1, in2->in(1) );
   }
 
   return NULL;
@@ -407,7 +407,7 @@ Node *SubFNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     // Convert "x - (x+y)" into "-y"
     if( in(2)->is_Add() &&
         phase->eqv(in(1),in(2)->in(1) ) )
-      return new (phase->C, 3) SubFNode( phase->makecon(TypeF::ZERO),in(2)->in(2));
+      return new (phase->C) SubFNode( phase->makecon(TypeF::ZERO),in(2)->in(2));
   }
 
   // Cannot replace 0.0-X with -X because a 'fsub' bytecode computes
@@ -450,7 +450,7 @@ Node *SubDNode::Ideal(PhaseGVN *phase, bool can_reshape){
     // Convert "x - (x+y)" into "-y"
     if( in(2)->is_Add() &&
         phase->eqv(in(1),in(2)->in(1) ) )
-      return new (phase->C, 3) SubDNode( phase->makecon(TypeD::ZERO),in(2)->in(2));
+      return new (phase->C) SubDNode( phase->makecon(TypeD::ZERO),in(2)->in(2));
   }
 
   // Cannot replace 0.0-X with -X because a 'dsub' bytecode computes
@@ -581,11 +581,11 @@ Node *CmpINode::Ideal( PhaseGVN *phase, bool can_reshape ) {
   if (phase->type(in(2))->higher_equal(TypeInt::ZERO)) {
     switch (in(1)->Opcode()) {
     case Op_CmpL3:              // Collapse a CmpL3/CmpI into a CmpL
-      return new (phase->C, 3) CmpLNode(in(1)->in(1),in(1)->in(2));
+      return new (phase->C) CmpLNode(in(1)->in(1),in(1)->in(2));
     case Op_CmpF3:              // Collapse a CmpF3/CmpI into a CmpF
-      return new (phase->C, 3) CmpFNode(in(1)->in(1),in(1)->in(2));
+      return new (phase->C) CmpFNode(in(1)->in(1),in(1)->in(2));
     case Op_CmpD3:              // Collapse a CmpD3/CmpI into a CmpD
-      return new (phase->C, 3) CmpDNode(in(1)->in(1),in(1)->in(2));
+      return new (phase->C) CmpDNode(in(1)->in(1),in(1)->in(2));
     //case Op_SubI:
       // If (x - y) cannot overflow, then ((x - y) <?> 0)
       // can be turned into (x <?> y).
@@ -789,7 +789,7 @@ Node *CmpPNode::Ideal( PhaseGVN *phase, bool can_reshape ) {
 
   // Now check for LoadKlass on left.
   Node* ldk1 = in(1);
-  if (ldk1->is_DecodeN()) {
+  if (ldk1->is_DecodeNKlass()) {
     ldk1 = ldk1->in(1);
     if (ldk1->Opcode() != Op_LoadNKlass )
       return NULL;
@@ -814,7 +814,7 @@ Node *CmpPNode::Ideal( PhaseGVN *phase, bool can_reshape ) {
 
   // Check for a LoadKlass from primary supertype array.
   // Any nested loadklass from loadklass+con must be from the p.s. array.
-  if (ldk2->is_DecodeN()) {
+  if (ldk2->is_DecodeNKlass()) {
     // Keep ldk2 as DecodeN since it could be used in CmpP below.
     if (ldk2->in(1)->Opcode() != Op_LoadNKlass )
       return NULL;
@@ -1023,8 +1023,8 @@ Node *CmpDNode::Ideal(PhaseGVN *phase, bool can_reshape){
         new_in2 = tmp;
       }
       CmpFNode *new_cmp = (Opcode() == Op_CmpD3)
-        ? new (phase->C, 3) CmpF3Node( new_in1, new_in2 )
-        : new (phase->C, 3) CmpFNode ( new_in1, new_in2 ) ;
+        ? new (phase->C) CmpF3Node( new_in1, new_in2 )
+        : new (phase->C) CmpFNode ( new_in1, new_in2 ) ;
       return new_cmp;           // Changed to CmpFNode
     }
     // Testing value required the precision of a double
@@ -1085,7 +1085,7 @@ static Node *clone_cmp( Node *cmp, Node *cmp1, Node *cmp2, PhaseGVN *gvn, BoolTe
   ncmp->set_req(1,cmp1);
   ncmp->set_req(2,cmp2);
   ncmp = gvn->transform( ncmp );
-  return new (gvn->C, 2) BoolNode( ncmp, test );
+  return new (gvn->C) BoolNode( ncmp, test );
 }
 
 //-------------------------------make_predicate--------------------------------
@@ -1106,9 +1106,9 @@ Node* BoolNode::make_predicate(Node* test_value, PhaseGVN* phase) {
     // Else fall through.  The CMove gets in the way of the test.
     // It should be the case that make_predicate(bol->as_int_value()) == bol.
   }
-  Node* cmp = new (C, 3) CmpINode(test_value, phase->intcon(0));
+  Node* cmp = new (C) CmpINode(test_value, phase->intcon(0));
   cmp = phase->transform(cmp);
-  Node* bol = new (C, 2) BoolNode(cmp, BoolTest::ne);
+  Node* bol = new (C) BoolNode(cmp, BoolTest::ne);
   return phase->transform(bol);
 }
 
@@ -1124,7 +1124,7 @@ Node* BoolNode::as_int_value(PhaseGVN* phase) {
 //----------------------------------negate-------------------------------------
 BoolNode* BoolNode::negate(PhaseGVN* phase) {
   Compile* C = phase->C;
-  return new (C, 2) BoolNode(in(1), _test.negate());
+  return new (C) BoolNode(in(1), _test.negate());
 }
 
 
@@ -1158,7 +1158,7 @@ Node *BoolNode::Ideal(PhaseGVN *phase, bool can_reshape) {
     // Swap inputs to the clone
     cmp->swap_edges(1, 2);
     cmp = phase->transform( cmp );
-    return new (phase->C, 2) BoolNode( cmp, _test.commute() );
+    return new (phase->C) BoolNode( cmp, _test.commute() );
   }
 
   // Change "bool eq/ne (cmp (xor X 1) 0)" into "bool ne/eq (cmp X 0)".
@@ -1175,8 +1175,8 @@ Node *BoolNode::Ideal(PhaseGVN *phase, bool can_reshape) {
       phase->type( j_xor->in(2) ) == TypeInt::ONE &&
       (_test._test == BoolTest::eq ||
        _test._test == BoolTest::ne) ) {
-    Node *ncmp = phase->transform(new (phase->C, 3) CmpINode(j_xor->in(1),cmp2));
-    return new (phase->C, 2) BoolNode( ncmp, _test.negate() );
+    Node *ncmp = phase->transform(new (phase->C) CmpINode(j_xor->in(1),cmp2));
+    return new (phase->C) BoolNode( ncmp, _test.negate() );
   }
 
   // Change "bool eq/ne (cmp (Conv2B X) 0)" into "bool eq/ne (cmp X 0)".
@@ -1187,10 +1187,10 @@ Node *BoolNode::Ideal(PhaseGVN *phase, bool can_reshape) {
       (_test._test == BoolTest::eq ||
        _test._test == BoolTest::ne) ) {
     Node *ncmp = phase->transform(phase->type(c2b->in(1))->isa_int()
-       ? (Node*)new (phase->C, 3) CmpINode(c2b->in(1),cmp2)
-       : (Node*)new (phase->C, 3) CmpPNode(c2b->in(1),phase->makecon(TypePtr::NULL_PTR))
+       ? (Node*)new (phase->C) CmpINode(c2b->in(1),cmp2)
+       : (Node*)new (phase->C) CmpPNode(c2b->in(1),phase->makecon(TypePtr::NULL_PTR))
     );
-    return new (phase->C, 2) BoolNode( ncmp, _test._test );
+    return new (phase->C) BoolNode( ncmp, _test._test );
   }
 
   // Comparing a SubI against a zero is equal to comparing the SubI
@@ -1200,8 +1200,8 @@ Node *BoolNode::Ideal(PhaseGVN *phase, bool can_reshape) {
         (cop == Op_CmpI) &&
         (cmp1->Opcode() == Op_SubI) &&
         ( cmp2_type == TypeInt::ZERO ) ) {
-    Node *ncmp = phase->transform( new (phase->C, 3) CmpINode(cmp1->in(1),cmp1->in(2)));
-    return new (phase->C, 2) BoolNode( ncmp, _test._test );
+    Node *ncmp = phase->transform( new (phase->C) CmpINode(cmp1->in(1),cmp1->in(2)));
+    return new (phase->C) BoolNode( ncmp, _test._test );
   }
 
   // Change (-A vs 0) into (A vs 0) by commuting the test.  Disallow in the
@@ -1212,8 +1212,8 @@ Node *BoolNode::Ideal(PhaseGVN *phase, bool can_reshape) {
       cmp2_type == TypeInt::ZERO &&
       phase->type( cmp1->in(1) ) == TypeInt::ZERO &&
       phase->type( cmp1->in(2) )->higher_equal(TypeInt::SYMINT) ) {
-    Node *ncmp = phase->transform( new (phase->C, 3) CmpINode(cmp1->in(2),cmp2));
-    return new (phase->C, 2) BoolNode( ncmp, _test.commute() );
+    Node *ncmp = phase->transform( new (phase->C) CmpINode(cmp1->in(2),cmp2));
+    return new (phase->C) BoolNode( ncmp, _test.commute() );
   }
 
   //  The transformation below is not valid for either signed or unsigned
diff --git a/hotspot/src/share/vm/opto/subnode.hpp b/hotspot/src/share/vm/opto/subnode.hpp
index 2b33e90f9e5..862519d054e 100644
--- a/hotspot/src/share/vm/opto/subnode.hpp
+++ b/hotspot/src/share/vm/opto/subnode.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/opto/superword.cpp b/hotspot/src/share/vm/opto/superword.cpp
index 8d640c1e6c2..ffc5394bb09 100644
--- a/hotspot/src/share/vm/opto/superword.cpp
+++ b/hotspot/src/share/vm/opto/superword.cpp
@@ -481,12 +481,19 @@ int SuperWord::get_iv_adjustment(MemNode* mem_ref) {
   int vw       = vector_width_in_bytes(mem_ref);
   assert(vw > 1, "sanity");
   int stride_sign   = (scale * iv_stride()) > 0 ? 1 : -1;
-  int iv_adjustment = (stride_sign * vw - (offset % vw)) % vw;
+  // At least one iteration is executed in pre-loop by default. As result
+  // several iterations are needed to align memory operations in main-loop even
+  // if offset is 0.
+  int iv_adjustment_in_bytes = (stride_sign * vw - (offset % vw));
+  int elt_size = align_to_ref_p.memory_size();
+  assert(((ABS(iv_adjustment_in_bytes) % elt_size) == 0),
+         err_msg_res("(%d) should be divisible by (%d)", iv_adjustment_in_bytes, elt_size));
+  int iv_adjustment = iv_adjustment_in_bytes/elt_size;
 
 #ifndef PRODUCT
   if (TraceSuperWord)
     tty->print_cr("\noffset = %d iv_adjust = %d elt_size = %d scale = %d iv_stride = %d vect_size %d",
-                  offset, iv_adjustment, align_to_ref_p.memory_size(), scale, iv_stride(), vw);
+                  offset, iv_adjustment, elt_size, scale, iv_stride(), vw);
 #endif
   return iv_adjustment;
 }
@@ -1080,23 +1087,22 @@ bool SuperWord::profitable(Node_List* p) {
   uint start, end;
   VectorNode::vector_operands(p0, &start, &end);
 
-  // Return false if some input is not vector and inside block
+  // Return false if some inputs are not vectors or vectors with different
+  // size or alignment.
+  // Also, for now, return false if not scalar promotion case when inputs are
+  // the same. Later, implement PackNode and allow differing, non-vector inputs
+  // (maybe just the ones from outside the block.)
   for (uint i = start; i < end; i++) {
-    if (!is_vector_use(p0, i)) {
-      // For now, return false if not scalar promotion case (inputs are the same.)
-      // Later, implement PackNode and allow differing, non-vector inputs
-      // (maybe just the ones from outside the block.)
-      if (!same_inputs(p, i)) {
-        return false;
-      }
-    }
+    if (!is_vector_use(p0, i))
+      return false;
   }
   if (VectorNode::is_shift(p0)) {
-    // For now, return false if shift count is vector because
-    // hw does not support it.
-    if (is_vector_use(p0, 2))
+    // For now, return false if shift count is vector or not scalar promotion
+    // case (different shift counts) because it is not supported yet.
+    Node* cnt = p0->in(2);
+    Node_List* cnt_pk = my_pack(cnt);
+    if (cnt_pk != NULL)
       return false;
-    // For the same reason return false if different shift counts.
     if (!same_inputs(p, 2))
       return false;
   }
@@ -1350,11 +1356,14 @@ void SuperWord::output() {
     insert_extracts(_packset.at(i));
   }
 
+  Compile* C = _phase->C;
+  uint max_vlen_in_bytes = 0;
   for (int i = 0; i < _block.length(); i++) {
     Node* n = _block.at(i);
     Node_List* p = my_pack(n);
     if (p && n == executed_last(p)) {
       uint vlen = p->size();
+      uint vlen_in_bytes = 0;
       Node* vn = NULL;
       Node* low_adr = p->at(0);
       Node* first   = executed_first(p);
@@ -1364,7 +1373,8 @@ void SuperWord::output() {
         Node* mem = first->in(MemNode::Memory);
         Node* adr = low_adr->in(MemNode::Address);
         const TypePtr* atyp = n->adr_type();
-        vn = LoadVectorNode::make(_phase->C, opc, ctl, mem, adr, atyp, vlen, velt_basic_type(n));
+        vn = LoadVectorNode::make(C, opc, ctl, mem, adr, atyp, vlen, velt_basic_type(n));
+        vlen_in_bytes = vn->as_LoadVector()->memory_size();
       } else if (n->is_Store()) {
         // Promote value to be stored to vector
         Node* val = vector_opd(p, MemNode::ValueIn);
@@ -1372,7 +1382,8 @@ void SuperWord::output() {
         Node* mem = first->in(MemNode::Memory);
         Node* adr = low_adr->in(MemNode::Address);
         const TypePtr* atyp = n->adr_type();
-        vn = StoreVectorNode::make(_phase->C, opc, ctl, mem, adr, atyp, val, vlen);
+        vn = StoreVectorNode::make(C, opc, ctl, mem, adr, atyp, val, vlen);
+        vlen_in_bytes = vn->as_StoreVector()->memory_size();
       } else if (n->req() == 3) {
         // Promote operands to vector
         Node* in1 = vector_opd(p, 1);
@@ -1383,18 +1394,23 @@ void SuperWord::output() {
           in1 = in2;
           in2 = tmp;
         }
-        vn = VectorNode::make(_phase->C, opc, in1, in2, vlen, velt_basic_type(n));
+        vn = VectorNode::make(C, opc, in1, in2, vlen, velt_basic_type(n));
+        vlen_in_bytes = vn->as_Vector()->length_in_bytes();
       } else {
         ShouldNotReachHere();
       }
       assert(vn != NULL, "sanity");
-      _phase->_igvn.register_new_node_with_optimizer(vn);
+      _igvn.register_new_node_with_optimizer(vn);
       _phase->set_ctrl(vn, _phase->get_ctrl(p->at(0)));
       for (uint j = 0; j < p->size(); j++) {
         Node* pm = p->at(j);
         _igvn.replace_node(pm, vn);
       }
       _igvn._worklist.push(vn);
+
+      if (vlen_in_bytes > max_vlen_in_bytes) {
+        max_vlen_in_bytes = vlen_in_bytes;
+      }
 #ifdef ASSERT
       if (TraceNewVectors) {
         tty->print("new Vector node: ");
@@ -1403,6 +1419,7 @@ void SuperWord::output() {
 #endif
     }
   }
+  C->set_max_vector_size(max_vlen_in_bytes);
 }
 
 //------------------------------vector_opd---------------------------
@@ -1418,10 +1435,9 @@ Node* SuperWord::vector_opd(Node_List* p, int opd_idx) {
       return opd; // input is matching vector
     }
     if ((opd_idx == 2) && VectorNode::is_shift(p0)) {
-      // No vector is needed for shift count.
-      // Vector instructions do not mask shift count, do it here.
       Compile* C = _phase->C;
       Node* cnt = opd;
+      // Vector instructions do not mask shift count, do it here.
       juint mask = (p0->bottom_type() == TypeInt::INT) ? (BitsPerInt - 1) : (BitsPerLong - 1);
       const TypeInt* t = opd->find_int_type();
       if (t != NULL && t->is_con()) {
@@ -1432,17 +1448,17 @@ Node* SuperWord::vector_opd(Node_List* p, int opd_idx) {
       } else {
         if (t == NULL || t->_lo < 0 || t->_hi > (int)mask) {
           cnt = ConNode::make(C, TypeInt::make(mask));
-          _phase->_igvn.register_new_node_with_optimizer(cnt);
-          cnt = new (C, 3) AndINode(opd, cnt);
-          _phase->_igvn.register_new_node_with_optimizer(cnt);
+          _igvn.register_new_node_with_optimizer(cnt);
+          cnt = new (C) AndINode(opd, cnt);
+          _igvn.register_new_node_with_optimizer(cnt);
           _phase->set_ctrl(cnt, _phase->get_ctrl(opd));
         }
         assert(opd->bottom_type()->isa_int(), "int type only");
-        // Move non constant shift count into XMM register.
-        cnt = new (_phase->C, 2) MoveI2FNode(cnt);
+        // Move non constant shift count into vector register.
+        cnt = VectorNode::shift_count(C, p0, cnt, vlen, velt_basic_type(p0));
       }
       if (cnt != opd) {
-        _phase->_igvn.register_new_node_with_optimizer(cnt);
+        _igvn.register_new_node_with_optimizer(cnt);
         _phase->set_ctrl(cnt, _phase->get_ctrl(opd));
       }
       return cnt;
@@ -1454,7 +1470,7 @@ Node* SuperWord::vector_opd(Node_List* p, int opd_idx) {
     const Type* p0_t = velt_type(p0);
     VectorNode* vn = VectorNode::scalar2vector(_phase->C, opd, vlen, p0_t);
 
-    _phase->_igvn.register_new_node_with_optimizer(vn);
+    _igvn.register_new_node_with_optimizer(vn);
     _phase->set_ctrl(vn, _phase->get_ctrl(opd));
 #ifdef ASSERT
     if (TraceNewVectors) {
@@ -1477,13 +1493,13 @@ Node* SuperWord::vector_opd(Node_List* p, int opd_idx) {
     assert(opd_bt == in->bottom_type()->basic_type(), "all same type");
     pk->add_opd(in);
   }
-  _phase->_igvn.register_new_node_with_optimizer(pk);
+  _igvn.register_new_node_with_optimizer(pk);
   _phase->set_ctrl(pk, _phase->get_ctrl(opd));
 #ifdef ASSERT
-    if (TraceNewVectors) {
-      tty->print("new Vector node: ");
-      pk->dump();
-    }
+  if (TraceNewVectors) {
+    tty->print("new Vector node: ");
+    pk->dump();
+  }
 #endif
   return pk;
 }
@@ -1524,7 +1540,7 @@ void SuperWord::insert_extracts(Node_List* p) {
     int def_pos = alignment(def) / data_size(def);
 
     Node* ex = ExtractNode::make(_phase->C, def, def_pos, velt_basic_type(def));
-    _phase->_igvn.register_new_node_with_optimizer(ex);
+    _igvn.register_new_node_with_optimizer(ex);
     _phase->set_ctrl(ex, _phase->get_ctrl(def));
     _igvn.replace_input_of(use, idx, ex);
     _igvn._worklist.push(def);
@@ -1805,7 +1821,7 @@ void SuperWord::compute_vector_element_type() {
 
 //------------------------------memory_alignment---------------------------
 // Alignment within a vector memory reference
-int SuperWord::memory_alignment(MemNode* s, int iv_adjust_in_bytes) {
+int SuperWord::memory_alignment(MemNode* s, int iv_adjust) {
   SWPointer p(s, this);
   if (!p.valid()) {
     return bottom_align;
@@ -1815,7 +1831,7 @@ int SuperWord::memory_alignment(MemNode* s, int iv_adjust_in_bytes) {
     return bottom_align; // No vectors for this type
   }
   int offset  = p.offset_in_bytes();
-  offset     += iv_adjust_in_bytes;
+  offset     += iv_adjust*p.memory_size();
   int off_rem = offset % vw;
   int off_mod = off_rem >= 0 ? off_rem : off_rem + vw;
   return off_mod;
@@ -1838,7 +1854,7 @@ const Type* SuperWord::container_type(Node* n) {
 
 bool SuperWord::same_velt_type(Node* n1, Node* n2) {
   const Type* vt1 = velt_type(n1);
-  const Type* vt2 = velt_type(n1);
+  const Type* vt2 = velt_type(n2);
   if (vt1->basic_type() == T_INT && vt2->basic_type() == T_INT) {
     // Compare vectors element sizes for integer types.
     return data_size(n1) == data_size(n2);
@@ -2003,73 +2019,73 @@ void SuperWord::align_initial_loop_index(MemNode* align_to_ref) {
   if (align_to_ref_p.invar() != NULL) {
     // incorporate any extra invariant piece producing (offset +/- invar) >>> log2(elt)
     Node* log2_elt = _igvn.intcon(exact_log2(elt_size));
-    Node* aref     = new (_phase->C, 3) URShiftINode(align_to_ref_p.invar(), log2_elt);
-    _phase->_igvn.register_new_node_with_optimizer(aref);
+    Node* aref     = new (_phase->C) URShiftINode(align_to_ref_p.invar(), log2_elt);
+    _igvn.register_new_node_with_optimizer(aref);
     _phase->set_ctrl(aref, pre_ctrl);
     if (align_to_ref_p.negate_invar()) {
-      e = new (_phase->C, 3) SubINode(e, aref);
+      e = new (_phase->C) SubINode(e, aref);
     } else {
-      e = new (_phase->C, 3) AddINode(e, aref);
+      e = new (_phase->C) AddINode(e, aref);
     }
-    _phase->_igvn.register_new_node_with_optimizer(e);
+    _igvn.register_new_node_with_optimizer(e);
     _phase->set_ctrl(e, pre_ctrl);
   }
   if (vw > ObjectAlignmentInBytes) {
     // incorporate base e +/- base && Mask >>> log2(elt)
-    Node* xbase = new(_phase->C, 2) CastP2XNode(NULL, align_to_ref_p.base());
-    _phase->_igvn.register_new_node_with_optimizer(xbase);
+    Node* xbase = new(_phase->C) CastP2XNode(NULL, align_to_ref_p.base());
+    _igvn.register_new_node_with_optimizer(xbase);
 #ifdef _LP64
-    xbase  = new (_phase->C, 2) ConvL2INode(xbase);
-    _phase->_igvn.register_new_node_with_optimizer(xbase);
+    xbase  = new (_phase->C) ConvL2INode(xbase);
+    _igvn.register_new_node_with_optimizer(xbase);
 #endif
     Node* mask = _igvn.intcon(vw-1);
-    Node* masked_xbase  = new (_phase->C, 3) AndINode(xbase, mask);
-    _phase->_igvn.register_new_node_with_optimizer(masked_xbase);
+    Node* masked_xbase  = new (_phase->C) AndINode(xbase, mask);
+    _igvn.register_new_node_with_optimizer(masked_xbase);
     Node* log2_elt = _igvn.intcon(exact_log2(elt_size));
-    Node* bref     = new (_phase->C, 3) URShiftINode(masked_xbase, log2_elt);
-    _phase->_igvn.register_new_node_with_optimizer(bref);
+    Node* bref     = new (_phase->C) URShiftINode(masked_xbase, log2_elt);
+    _igvn.register_new_node_with_optimizer(bref);
     _phase->set_ctrl(bref, pre_ctrl);
-    e = new (_phase->C, 3) AddINode(e, bref);
-    _phase->_igvn.register_new_node_with_optimizer(e);
+    e = new (_phase->C) AddINode(e, bref);
+    _igvn.register_new_node_with_optimizer(e);
     _phase->set_ctrl(e, pre_ctrl);
   }
 
   // compute e +/- lim0
   if (scale < 0) {
-    e = new (_phase->C, 3) SubINode(e, lim0);
+    e = new (_phase->C) SubINode(e, lim0);
   } else {
-    e = new (_phase->C, 3) AddINode(e, lim0);
+    e = new (_phase->C) AddINode(e, lim0);
   }
-  _phase->_igvn.register_new_node_with_optimizer(e);
+  _igvn.register_new_node_with_optimizer(e);
   _phase->set_ctrl(e, pre_ctrl);
 
   if (stride * scale > 0) {
     // compute V - (e +/- lim0)
     Node* va  = _igvn.intcon(v_align);
-    e = new (_phase->C, 3) SubINode(va, e);
-    _phase->_igvn.register_new_node_with_optimizer(e);
+    e = new (_phase->C) SubINode(va, e);
+    _igvn.register_new_node_with_optimizer(e);
     _phase->set_ctrl(e, pre_ctrl);
   }
   // compute N = (exp) % V
   Node* va_msk = _igvn.intcon(v_align - 1);
-  Node* N = new (_phase->C, 3) AndINode(e, va_msk);
-  _phase->_igvn.register_new_node_with_optimizer(N);
+  Node* N = new (_phase->C) AndINode(e, va_msk);
+  _igvn.register_new_node_with_optimizer(N);
   _phase->set_ctrl(N, pre_ctrl);
 
   //   substitute back into (1), so that new limit
   //     lim = lim0 + N
   Node* lim;
   if (stride < 0) {
-    lim = new (_phase->C, 3) SubINode(lim0, N);
+    lim = new (_phase->C) SubINode(lim0, N);
   } else {
-    lim = new (_phase->C, 3) AddINode(lim0, N);
+    lim = new (_phase->C) AddINode(lim0, N);
   }
-  _phase->_igvn.register_new_node_with_optimizer(lim);
+  _igvn.register_new_node_with_optimizer(lim);
   _phase->set_ctrl(lim, pre_ctrl);
   Node* constrained =
-    (stride > 0) ? (Node*) new (_phase->C,3) MinINode(lim, orig_limit)
-                 : (Node*) new (_phase->C,3) MaxINode(lim, orig_limit);
-  _phase->_igvn.register_new_node_with_optimizer(constrained);
+    (stride > 0) ? (Node*) new (_phase->C) MinINode(lim, orig_limit)
+                 : (Node*) new (_phase->C) MaxINode(lim, orig_limit);
+  _igvn.register_new_node_with_optimizer(constrained);
   _phase->set_ctrl(constrained, pre_ctrl);
   _igvn.hash_delete(pre_opaq);
   pre_opaq->set_req(1, constrained);
diff --git a/hotspot/src/share/vm/opto/superword.hpp b/hotspot/src/share/vm/opto/superword.hpp
index 050ce9ea2df..45c0f9a8351 100644
--- a/hotspot/src/share/vm/opto/superword.hpp
+++ b/hotspot/src/share/vm/opto/superword.hpp
@@ -400,7 +400,7 @@ class SuperWord : public ResourceObj {
   // Return the node executed last in pack p.
   Node* executed_last(Node_List* p);
   // Alignment within a vector memory reference
-  int memory_alignment(MemNode* s, int iv_adjust_in_bytes);
+  int memory_alignment(MemNode* s, int iv_adjust);
   // (Start, end] half-open range defining which operands are vector
   void vector_opd_range(Node* n, uint* start, uint* end);
   // Smallest type containing range of values
diff --git a/hotspot/src/share/vm/opto/type.cpp b/hotspot/src/share/vm/opto/type.cpp
index 0a82b2f6ad9..f982799f634 100644
--- a/hotspot/src/share/vm/opto/type.cpp
+++ b/hotspot/src/share/vm/opto/type.cpp
@@ -57,6 +57,7 @@ Type::TypeInfo Type::_type_info[Type::lastype] = {
   { Bad,             T_LONG,       "long:",         false, Op_RegL,              relocInfo::none          },  // Long
   { Half,            T_VOID,       "half",          false, 0,                    relocInfo::none          },  // Half
   { Bad,             T_NARROWOOP,  "narrowoop:",    false, Op_RegN,              relocInfo::none          },  // NarrowOop
+  { Bad,             T_NARROWKLASS,"narrowklass:",  false, Op_RegN,              relocInfo::none          },  // NarrowKlass
   { Bad,             T_ILLEGAL,    "tuple:",        false, Node::NotAMachineReg, relocInfo::none          },  // Tuple
   { Bad,             T_ARRAY,      "array:",        false, Node::NotAMachineReg, relocInfo::none          },  // Array
 
@@ -332,6 +333,8 @@ void Type::Initialize_shared(Compile* current) {
   TypeNarrowOop::NULL_PTR = TypeNarrowOop::make( TypePtr::NULL_PTR );
   TypeNarrowOop::BOTTOM   = TypeNarrowOop::make( TypeInstPtr::BOTTOM );
 
+  TypeNarrowKlass::NULL_PTR = TypeNarrowKlass::make( TypePtr::NULL_PTR );
+
   mreg2type[Op_Node] = Type::BOTTOM;
   mreg2type[Op_Set ] = 0;
   mreg2type[Op_RegN] = TypeNarrowOop::BOTTOM;
@@ -395,34 +398,36 @@ void Type::Initialize_shared(Compile* current) {
   longpair[1] = TypeLong::LONG;
   TypeTuple::LONG_PAIR = TypeTuple::make(2, longpair);
 
-  _const_basic_type[T_NARROWOOP] = TypeNarrowOop::BOTTOM;
-  _const_basic_type[T_BOOLEAN] = TypeInt::BOOL;
-  _const_basic_type[T_CHAR]    = TypeInt::CHAR;
-  _const_basic_type[T_BYTE]    = TypeInt::BYTE;
-  _const_basic_type[T_SHORT]   = TypeInt::SHORT;
-  _const_basic_type[T_INT]     = TypeInt::INT;
-  _const_basic_type[T_LONG]    = TypeLong::LONG;
-  _const_basic_type[T_FLOAT]   = Type::FLOAT;
-  _const_basic_type[T_DOUBLE]  = Type::DOUBLE;
-  _const_basic_type[T_OBJECT]  = TypeInstPtr::BOTTOM;
-  _const_basic_type[T_ARRAY]   = TypeInstPtr::BOTTOM; // there is no separate bottom for arrays
-  _const_basic_type[T_VOID]    = TypePtr::NULL_PTR;   // reflection represents void this way
-  _const_basic_type[T_ADDRESS] = TypeRawPtr::BOTTOM;  // both interpreter return addresses & random raw ptrs
-  _const_basic_type[T_CONFLICT]= Type::BOTTOM;        // why not?
+  _const_basic_type[T_NARROWOOP]   = TypeNarrowOop::BOTTOM;
+  _const_basic_type[T_NARROWKLASS] = Type::BOTTOM;
+  _const_basic_type[T_BOOLEAN]     = TypeInt::BOOL;
+  _const_basic_type[T_CHAR]        = TypeInt::CHAR;
+  _const_basic_type[T_BYTE]        = TypeInt::BYTE;
+  _const_basic_type[T_SHORT]       = TypeInt::SHORT;
+  _const_basic_type[T_INT]         = TypeInt::INT;
+  _const_basic_type[T_LONG]        = TypeLong::LONG;
+  _const_basic_type[T_FLOAT]       = Type::FLOAT;
+  _const_basic_type[T_DOUBLE]      = Type::DOUBLE;
+  _const_basic_type[T_OBJECT]      = TypeInstPtr::BOTTOM;
+  _const_basic_type[T_ARRAY]       = TypeInstPtr::BOTTOM; // there is no separate bottom for arrays
+  _const_basic_type[T_VOID]        = TypePtr::NULL_PTR;   // reflection represents void this way
+  _const_basic_type[T_ADDRESS]     = TypeRawPtr::BOTTOM;  // both interpreter return addresses & random raw ptrs
+  _const_basic_type[T_CONFLICT]    = Type::BOTTOM;        // why not?
 
-  _zero_type[T_NARROWOOP] = TypeNarrowOop::NULL_PTR;
-  _zero_type[T_BOOLEAN] = TypeInt::ZERO;     // false == 0
-  _zero_type[T_CHAR]    = TypeInt::ZERO;     // '\0' == 0
-  _zero_type[T_BYTE]    = TypeInt::ZERO;     // 0x00 == 0
-  _zero_type[T_SHORT]   = TypeInt::ZERO;     // 0x0000 == 0
-  _zero_type[T_INT]     = TypeInt::ZERO;
-  _zero_type[T_LONG]    = TypeLong::ZERO;
-  _zero_type[T_FLOAT]   = TypeF::ZERO;
-  _zero_type[T_DOUBLE]  = TypeD::ZERO;
-  _zero_type[T_OBJECT]  = TypePtr::NULL_PTR;
-  _zero_type[T_ARRAY]   = TypePtr::NULL_PTR; // null array is null oop
-  _zero_type[T_ADDRESS] = TypePtr::NULL_PTR; // raw pointers use the same null
-  _zero_type[T_VOID]    = Type::TOP;         // the only void value is no value at all
+  _zero_type[T_NARROWOOP]   = TypeNarrowOop::NULL_PTR;
+  _zero_type[T_NARROWKLASS] = TypeNarrowKlass::NULL_PTR;
+  _zero_type[T_BOOLEAN]     = TypeInt::ZERO;     // false == 0
+  _zero_type[T_CHAR]        = TypeInt::ZERO;     // '\0' == 0
+  _zero_type[T_BYTE]        = TypeInt::ZERO;     // 0x00 == 0
+  _zero_type[T_SHORT]       = TypeInt::ZERO;     // 0x0000 == 0
+  _zero_type[T_INT]         = TypeInt::ZERO;
+  _zero_type[T_LONG]        = TypeLong::ZERO;
+  _zero_type[T_FLOAT]       = TypeF::ZERO;
+  _zero_type[T_DOUBLE]      = TypeD::ZERO;
+  _zero_type[T_OBJECT]      = TypePtr::NULL_PTR;
+  _zero_type[T_ARRAY]       = TypePtr::NULL_PTR; // null array is null oop
+  _zero_type[T_ADDRESS]     = TypePtr::NULL_PTR; // raw pointers use the same null
+  _zero_type[T_VOID]        = Type::TOP;         // the only void value is no value at all
 
   // get_zero_type() should not happen for T_CONFLICT
   _zero_type[T_CONFLICT]= NULL;
@@ -563,9 +568,14 @@ const Type *Type::meet( const Type *t ) const {
     const Type* result = make_ptr()->meet(t->make_ptr());
     return result->make_narrowoop();
   }
+  if (isa_narrowklass() && t->isa_narrowklass()) {
+    const Type* result = make_ptr()->meet(t->make_ptr());
+    return result->make_narrowklass();
+  }
 
   const Type *mt = xmeet(t);
   if (isa_narrowoop() || t->isa_narrowoop()) return mt;
+  if (isa_narrowklass() || t->isa_narrowklass()) return mt;
 #ifdef ASSERT
   assert( mt == t->xmeet(this), "meet not commutative" );
   const Type* dual_join = mt->_dual;
@@ -635,6 +645,9 @@ const Type *Type::xmeet( const Type *t ) const {
   case NarrowOop:
     return t->xmeet(this);
 
+  case NarrowKlass:
+    return t->xmeet(this);
+
   case Bad:                     // Type check
   default:                      // Bogus type not in lattice
     typerr(t);
@@ -693,6 +706,7 @@ const Type::TYPES Type::dual_type[Type::lastype] = {
   Bad,          // Long - handled in v-call
   Half,         // Half
   Bad,          // NarrowOop - handled in v-call
+  Bad,          // NarrowKlass - handled in v-call
 
   Bad,          // Tuple - handled in v-call
   Bad,          // Array - handled in v-call
@@ -756,6 +770,8 @@ void Type::dump_on(outputStream *st) const {
   dump2(d,1, st);
   if (is_ptr_to_narrowoop()) {
     st->print(" [narrow]");
+  } else if (is_ptr_to_narrowklass()) {
+    st->print(" [narrowklass]");
   }
 }
 #endif
@@ -838,6 +854,7 @@ const Type *TypeF::xmeet( const Type *t ) const {
   case MetadataPtr:
   case KlassPtr:
   case NarrowOop:
+  case NarrowKlass:
   case Int:
   case Long:
   case DoubleTop:
@@ -955,6 +972,7 @@ const Type *TypeD::xmeet( const Type *t ) const {
   case MetadataPtr:
   case KlassPtr:
   case NarrowOop:
+  case NarrowKlass:
   case Int:
   case Long:
   case FloatTop:
@@ -1109,6 +1127,7 @@ const Type *TypeInt::xmeet( const Type *t ) const {
   case MetadataPtr:
   case KlassPtr:
   case NarrowOop:
+  case NarrowKlass:
   case Long:
   case FloatTop:
   case FloatCon:
@@ -1366,6 +1385,7 @@ const Type *TypeLong::xmeet( const Type *t ) const {
   case MetadataPtr:
   case KlassPtr:
   case NarrowOop:
+  case NarrowKlass:
   case Int:
   case FloatTop:
   case FloatCon:
@@ -2096,6 +2116,7 @@ const Type *TypePtr::xmeet( const Type *t ) const {
   case DoubleCon:
   case DoubleBot:
   case NarrowOop:
+  case NarrowKlass:
   case Bottom:                  // Ye Olde Default
     return Type::BOTTOM;
   case Top:
@@ -2350,17 +2371,18 @@ TypeOopPtr::TypeOopPtr( TYPES t, PTR ptr, ciKlass* k, bool xk, ciObject* o, int
     _const_oop(o), _klass(k),
     _klass_is_exact(xk),
     _is_ptr_to_narrowoop(false),
+    _is_ptr_to_narrowklass(false),
     _instance_id(instance_id) {
 #ifdef _LP64
-  if (UseCompressedOops && _offset != 0) {
+  if (_offset != 0) {
     if (_offset == oopDesc::klass_offset_in_bytes()) {
-      _is_ptr_to_narrowoop = UseCompressedKlassPointers;
+      _is_ptr_to_narrowklass = UseCompressedKlassPointers;
     } else if (klass() == NULL) {
       // Array with unknown body type
       assert(this->isa_aryptr(), "only arrays without klass");
-      _is_ptr_to_narrowoop = true;
+      _is_ptr_to_narrowoop = UseCompressedOops;
     } else if (this->isa_aryptr()) {
-      _is_ptr_to_narrowoop = (klass()->is_obj_array_klass() &&
+      _is_ptr_to_narrowoop = (UseCompressedOops && klass()->is_obj_array_klass() &&
                              _offset != arrayOopDesc::length_offset_in_bytes());
     } else if (klass()->is_instance_klass()) {
       ciInstanceKlass* ik = klass()->as_instance_klass();
@@ -2369,7 +2391,7 @@ TypeOopPtr::TypeOopPtr( TYPES t, PTR ptr, ciKlass* k, bool xk, ciObject* o, int
         // Perm objects don't use compressed references
       } else if (_offset == OffsetBot || _offset == OffsetTop) {
         // unsafe access
-        _is_ptr_to_narrowoop = true;
+        _is_ptr_to_narrowoop = UseCompressedOops;
       } else { // exclude unsafe ops
         assert(this->isa_instptr(), "must be an instance ptr.");
 
@@ -2387,22 +2409,22 @@ TypeOopPtr::TypeOopPtr( TYPES t, PTR ptr, ciKlass* k, bool xk, ciObject* o, int
           ciField* field = k->get_field_by_offset(_offset, true);
           assert(field != NULL, "missing field");
           BasicType basic_elem_type = field->layout_type();
-          _is_ptr_to_narrowoop = (basic_elem_type == T_OBJECT ||
-                                  basic_elem_type == T_ARRAY);
+          _is_ptr_to_narrowoop = UseCompressedOops && (basic_elem_type == T_OBJECT ||
+                                                       basic_elem_type == T_ARRAY);
         } else {
           // Instance fields which contains a compressed oop references.
           field = ik->get_field_by_offset(_offset, false);
           if (field != NULL) {
             BasicType basic_elem_type = field->layout_type();
-            _is_ptr_to_narrowoop = (basic_elem_type == T_OBJECT ||
-                                    basic_elem_type == T_ARRAY);
+            _is_ptr_to_narrowoop = UseCompressedOops && (basic_elem_type == T_OBJECT ||
+                                                         basic_elem_type == T_ARRAY);
           } else if (klass()->equals(ciEnv::current()->Object_klass())) {
             // Compile::find_alias_type() cast exactness on all types to verify
             // that it does not affect alias type.
-            _is_ptr_to_narrowoop = true;
+            _is_ptr_to_narrowoop = UseCompressedOops;
           } else {
             // Type for the copy start in LibraryCallKit::inline_native_clone().
-            _is_ptr_to_narrowoop = true;
+            _is_ptr_to_narrowoop = UseCompressedOops;
           }
         }
       }
@@ -2475,6 +2497,7 @@ const Type *TypeOopPtr::xmeet( const Type *t ) const {
   case DoubleCon:
   case DoubleBot:
   case NarrowOop:
+  case NarrowKlass:
   case Bottom:                  // Ye Olde Default
     return Type::BOTTOM;
   case Top:
@@ -2925,6 +2948,7 @@ const Type *TypeInstPtr::xmeet( const Type *t ) const {
   case DoubleCon:
   case DoubleBot:
   case NarrowOop:
+  case NarrowKlass:
   case Bottom:                  // Ye Olde Default
     return Type::BOTTOM;
   case Top:
@@ -3353,6 +3377,7 @@ static jint max_array_length(BasicType etype) {
     case T_NARROWOOP:
       etype = T_OBJECT;
       break;
+    case T_NARROWKLASS:
     case T_CONFLICT:
     case T_ILLEGAL:
     case T_VOID:
@@ -3425,6 +3450,7 @@ const Type *TypeAryPtr::xmeet( const Type *t ) const {
   case DoubleCon:
   case DoubleBot:
   case NarrowOop:
+  case NarrowKlass:
   case Bottom:                  // Ye Olde Default
     return Type::BOTTOM;
   case Top:
@@ -3671,23 +3697,27 @@ const TypePtr *TypeAryPtr::add_offset( intptr_t offset ) const {
 
 
 //=============================================================================
-const TypeNarrowOop *TypeNarrowOop::BOTTOM;
-const TypeNarrowOop *TypeNarrowOop::NULL_PTR;
-
-
-const TypeNarrowOop* TypeNarrowOop::make(const TypePtr* type) {
-  return (const TypeNarrowOop*)(new TypeNarrowOop(type))->hashcons();
-}
 
 //------------------------------hash-------------------------------------------
 // Type-specific hashing function.
-int TypeNarrowOop::hash(void) const {
+int TypeNarrowPtr::hash(void) const {
   return _ptrtype->hash() + 7;
 }
 
+bool TypeNarrowPtr::singleton(void) const {    // TRUE if type is a singleton
+  return _ptrtype->singleton();
+}
 
-bool TypeNarrowOop::eq( const Type *t ) const {
-  const TypeNarrowOop* tc = t->isa_narrowoop();
+bool TypeNarrowPtr::empty(void) const {
+  return _ptrtype->empty();
+}
+
+intptr_t TypeNarrowPtr::get_con() const {
+  return _ptrtype->get_con();
+}
+
+bool TypeNarrowPtr::eq( const Type *t ) const {
+  const TypeNarrowPtr* tc = isa_same_narrowptr(t);
   if (tc != NULL) {
     if (_ptrtype->base() != tc->_ptrtype->base()) {
       return false;
@@ -3697,22 +3727,46 @@ bool TypeNarrowOop::eq( const Type *t ) const {
   return false;
 }
 
-bool TypeNarrowOop::singleton(void) const {    // TRUE if type is a singleton
-  return _ptrtype->singleton();
+const Type *TypeNarrowPtr::xdual() const {    // Compute dual right now.
+  const TypePtr* odual = _ptrtype->dual()->is_ptr();
+  return make_same_narrowptr(odual);
 }
 
-bool TypeNarrowOop::empty(void) const {
-  return _ptrtype->empty();
+
+const Type *TypeNarrowPtr::filter( const Type *kills ) const {
+  if (isa_same_narrowptr(kills)) {
+    const Type* ft =_ptrtype->filter(is_same_narrowptr(kills)->_ptrtype);
+    if (ft->empty())
+      return Type::TOP;           // Canonical empty value
+    if (ft->isa_ptr()) {
+      return make_hash_same_narrowptr(ft->isa_ptr());
+    }
+    return ft;
+  } else if (kills->isa_ptr()) {
+    const Type* ft = _ptrtype->join(kills);
+    if (ft->empty())
+      return Type::TOP;           // Canonical empty value
+    return ft;
+  } else {
+    return Type::TOP;
+  }
 }
 
 //------------------------------xmeet------------------------------------------
 // Compute the MEET of two types.  It returns a new Type object.
-const Type *TypeNarrowOop::xmeet( const Type *t ) const {
+const Type *TypeNarrowPtr::xmeet( const Type *t ) const {
   // Perform a fast test for common case; meeting the same types together.
   if( this == t ) return this;  // Meeting same type-rep?
 
+  if (t->base() == base()) {
+    const Type* result = _ptrtype->xmeet(t->make_ptr());
+    if (result->isa_ptr()) {
+      return make_hash_same_narrowptr(result->is_ptr());
+    }
+    return result;
+  }
 
-  // Current "this->_base" is OopPtr
+  // Current "this->_base" is NarrowKlass or NarrowOop
   switch (t->base()) {          // switch on original type
 
   case Int:                     // Mixing ints & oops happens when javac
@@ -3730,20 +3784,14 @@ const Type *TypeNarrowOop::xmeet( const Type *t ) const {
   case AryPtr:
   case MetadataPtr:
   case KlassPtr:
+  case NarrowOop:
+  case NarrowKlass:
 
   case Bottom:                  // Ye Olde Default
     return Type::BOTTOM;
   case Top:
     return this;
 
-  case NarrowOop: {
-    const Type* result = _ptrtype->xmeet(t->make_ptr());
-    if (result->isa_ptr()) {
-      return TypeNarrowOop::make(result->is_ptr());
-    }
-    return result;
-  }
-
   default:                      // All else is a mistake
     typerr(t);
 
@@ -3752,42 +3800,40 @@ const Type *TypeNarrowOop::xmeet( const Type *t ) const {
   return this;
 }
 
-const Type *TypeNarrowOop::xdual() const {    // Compute dual right now.
-  const TypePtr* odual = _ptrtype->dual()->is_ptr();
-  return new TypeNarrowOop(odual);
-}
-
-const Type *TypeNarrowOop::filter( const Type *kills ) const {
-  if (kills->isa_narrowoop()) {
-    const Type* ft =_ptrtype->filter(kills->is_narrowoop()->_ptrtype);
-    if (ft->empty())
-      return Type::TOP;           // Canonical empty value
-    if (ft->isa_ptr()) {
-      return make(ft->isa_ptr());
-    }
-    return ft;
-  } else if (kills->isa_ptr()) {
-    const Type* ft = _ptrtype->join(kills);
-    if (ft->empty())
-      return Type::TOP;           // Canonical empty value
-    return ft;
-  } else {
-    return Type::TOP;
-  }
-}
-
-
-intptr_t TypeNarrowOop::get_con() const {
-  return _ptrtype->get_con();
-}
-
 #ifndef PRODUCT
-void TypeNarrowOop::dump2( Dict & d, uint depth, outputStream *st ) const {
-  st->print("narrowoop: ");
+void TypeNarrowPtr::dump2( Dict & d, uint depth, outputStream *st ) const {
   _ptrtype->dump2(d, depth, st);
 }
 #endif
 
+const TypeNarrowOop *TypeNarrowOop::BOTTOM;
+const TypeNarrowOop *TypeNarrowOop::NULL_PTR;
+
+
+const TypeNarrowOop* TypeNarrowOop::make(const TypePtr* type) {
+  return (const TypeNarrowOop*)(new TypeNarrowOop(type))->hashcons();
+}
+
+
+#ifndef PRODUCT
+void TypeNarrowOop::dump2( Dict & d, uint depth, outputStream *st ) const {
+  st->print("narrowoop: ");
+  TypeNarrowPtr::dump2(d, depth, st);
+}
+#endif
+
+const TypeNarrowKlass *TypeNarrowKlass::NULL_PTR;
+
+const TypeNarrowKlass* TypeNarrowKlass::make(const TypePtr* type) {
+  return (const TypeNarrowKlass*)(new TypeNarrowKlass(type))->hashcons();
+}
+
+#ifndef PRODUCT
+void TypeNarrowKlass::dump2( Dict & d, uint depth, outputStream *st ) const {
+  st->print("narrowklass: ");
+  TypeNarrowPtr::dump2(d, depth, st);
+}
+#endif
 
 
 //------------------------------eq---------------------------------------------
@@ -3878,6 +3924,7 @@ const Type *TypeMetadataPtr::xmeet( const Type *t ) const {
   case DoubleCon:
   case DoubleBot:
   case NarrowOop:
+  case NarrowKlass:
   case Bottom:                  // Ye Olde Default
     return Type::BOTTOM;
   case Top:
@@ -4169,6 +4216,7 @@ const Type    *TypeKlassPtr::xmeet( const Type *t ) const {
   case DoubleCon:
   case DoubleBot:
   case NarrowOop:
+  case NarrowKlass:
   case Bottom:                  // Ye Olde Default
     return Type::BOTTOM;
   case Top:
diff --git a/hotspot/src/share/vm/opto/type.hpp b/hotspot/src/share/vm/opto/type.hpp
index 666c78f5c10..39bbf0306a9 100644
--- a/hotspot/src/share/vm/opto/type.hpp
+++ b/hotspot/src/share/vm/opto/type.hpp
@@ -48,7 +48,9 @@ class   TypeD;
 class   TypeF;
 class   TypeInt;
 class   TypeLong;
-class   TypeNarrowOop;
+class   TypeNarrowPtr;
+class     TypeNarrowOop;
+class     TypeNarrowKlass;
 class   TypeAry;
 class   TypeTuple;
 class   TypeVect;
@@ -81,6 +83,7 @@ public:
     Long,                       // Long integer range (lo-hi)
     Half,                       // Placeholder half of doubleword
     NarrowOop,                  // Compressed oop pointer
+    NarrowKlass,                // Compressed klass pointer
 
     Tuple,                      // Method signature or object layout
     Array,                      // Array types
@@ -229,6 +232,7 @@ public:
   // Returns true if this pointer points at memory which contains a
   // compressed oop references.
   bool is_ptr_to_narrowoop() const;
+  bool is_ptr_to_narrowklass() const;
 
   // Convenience access
   float getf() const;
@@ -252,6 +256,8 @@ public:
   const TypeRawPtr *is_rawptr() const;           // Asserts is rawptr
   const TypeNarrowOop  *is_narrowoop() const;    // Java-style GC'd pointer
   const TypeNarrowOop  *isa_narrowoop() const;   // Returns NULL if not oop ptr type
+  const TypeNarrowKlass *is_narrowklass() const; // compressed klass pointer
+  const TypeNarrowKlass *isa_narrowklass() const;// Returns NULL if not oop ptr type
   const TypeOopPtr   *isa_oopptr() const;        // Returns NULL if not oop ptr type
   const TypeOopPtr   *is_oopptr() const;         // Java-style GC'd pointer
   const TypeInstPtr  *isa_instptr() const;       // Returns NULL if not InstPtr
@@ -278,6 +284,10 @@ public:
   // of this pointer type.
   const TypeNarrowOop* make_narrowoop() const;
 
+  // Returns this compressed klass pointer or the equivalent
+  // compressed version of this pointer type.
+  const TypeNarrowKlass* make_narrowklass() const;
+
   // Special test for register pressure heuristic
   bool is_floatingpoint() const;        // True if Float or Double base type
 
@@ -670,7 +680,7 @@ class TypeVectY : public TypeVect {
 // Otherwise the _base will indicate which subset of pointers is affected,
 // and the class will be inherited from.
 class TypePtr : public Type {
-  friend class TypeNarrowOop;
+  friend class TypeNarrowPtr;
 public:
   enum PTR { TopPTR, AnyNull, Constant, Null, NotNull, BotPTR, lastPTR };
 protected:
@@ -781,6 +791,7 @@ protected:
   // Does the type exclude subclasses of the klass?  (Inexact == polymorphic.)
   bool          _klass_is_exact;
   bool          _is_ptr_to_narrowoop;
+  bool          _is_ptr_to_narrowklass;
 
   // If not InstanceTop or InstanceBot, indicates that this is
   // a particular instance of this type which is distinct.
@@ -825,6 +836,7 @@ public:
   // Returns true if this pointer points at memory which contains a
   // compressed oop references.
   bool is_ptr_to_narrowoop_nv() const { return _is_ptr_to_narrowoop; }
+  bool is_ptr_to_narrowklass_nv() const { return _is_ptr_to_narrowklass; }
 
   bool is_known_instance()       const { return _instance_id > 0; }
   int  instance_id()             const { return _instance_id; }
@@ -1122,22 +1134,21 @@ public:
 #endif
 };
 
-//------------------------------TypeNarrowOop----------------------------------
-// A compressed reference to some kind of Oop.  This type wraps around
-// a preexisting TypeOopPtr and forwards most of it's operations to
-// the underlying type.  It's only real purpose is to track the
-// oopness of the compressed oop value when we expose the conversion
-// between the normal and the compressed form.
-class TypeNarrowOop : public Type {
+class TypeNarrowPtr : public Type {
 protected:
   const TypePtr* _ptrtype; // Could be TypePtr::NULL_PTR
 
-  TypeNarrowOop( const TypePtr* ptrtype): Type(NarrowOop),
-    _ptrtype(ptrtype) {
+  TypeNarrowPtr(TYPES t, const TypePtr* ptrtype): _ptrtype(ptrtype),
+                                                  Type(t) {
     assert(ptrtype->offset() == 0 ||
            ptrtype->offset() == OffsetBot ||
            ptrtype->offset() == OffsetTop, "no real offsets");
   }
+
+  virtual const TypeNarrowPtr *isa_same_narrowptr(const Type *t) const = 0;
+  virtual const TypeNarrowPtr *is_same_narrowptr(const Type *t) const = 0;
+  virtual const TypeNarrowPtr *make_same_narrowptr(const TypePtr *t) const = 0;
+  virtual const TypeNarrowPtr *make_hash_same_narrowptr(const TypePtr *t) const = 0;
 public:
   virtual bool eq( const Type *t ) const;
   virtual int  hash() const;             // Type specific hashing
@@ -1153,17 +1164,51 @@ public:
 
   virtual bool empty(void) const;        // TRUE if type is vacuous
 
+  // returns the equivalent ptr type for this compressed pointer
+  const TypePtr *get_ptrtype() const {
+    return _ptrtype;
+  }
+
+#ifndef PRODUCT
+  virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
+#endif
+};
+
+//------------------------------TypeNarrowOop----------------------------------
+// A compressed reference to some kind of Oop.  This type wraps around
+// a preexisting TypeOopPtr and forwards most of it's operations to
+// the underlying type.  It's only real purpose is to track the
+// oopness of the compressed oop value when we expose the conversion
+// between the normal and the compressed form.
+class TypeNarrowOop : public TypeNarrowPtr {
+protected:
+  TypeNarrowOop( const TypePtr* ptrtype): TypeNarrowPtr(NarrowOop, ptrtype) {
+  }
+
+  virtual const TypeNarrowPtr *isa_same_narrowptr(const Type *t) const {
+    return t->isa_narrowoop();
+  }
+
+  virtual const TypeNarrowPtr *is_same_narrowptr(const Type *t) const {
+    return t->is_narrowoop();
+  }
+
+  virtual const TypeNarrowPtr *make_same_narrowptr(const TypePtr *t) const {
+    return new TypeNarrowOop(t);
+  }
+
+  virtual const TypeNarrowPtr *make_hash_same_narrowptr(const TypePtr *t) const {
+    return (const TypeNarrowPtr*)((new TypeNarrowOop(t))->hashcons());
+  }
+
+public:
+
   static const TypeNarrowOop *make( const TypePtr* type);
 
   static const TypeNarrowOop* make_from_constant(ciObject* con, bool require_constant = false) {
     return make(TypeOopPtr::make_from_constant(con, require_constant));
   }
 
-  // returns the equivalent ptr type for this compressed pointer
-  const TypePtr *get_ptrtype() const {
-    return _ptrtype;
-  }
-
   static const TypeNarrowOop *BOTTOM;
   static const TypeNarrowOop *NULL_PTR;
 
@@ -1172,6 +1217,42 @@ public:
 #endif
 };
 
+//------------------------------TypeNarrowKlass----------------------------------
+// A compressed reference to klass pointer.  This type wraps around a
+// preexisting TypeKlassPtr and forwards most of it's operations to
+// the underlying type.
+class TypeNarrowKlass : public TypeNarrowPtr {
+protected:
+  TypeNarrowKlass( const TypePtr* ptrtype): TypeNarrowPtr(NarrowKlass, ptrtype) {
+  }
+
+  virtual const TypeNarrowPtr *isa_same_narrowptr(const Type *t) const {
+    return t->isa_narrowklass();
+  }
+
+  virtual const TypeNarrowPtr *is_same_narrowptr(const Type *t) const {
+    return t->is_narrowklass();
+  }
+
+  virtual const TypeNarrowPtr *make_same_narrowptr(const TypePtr *t) const {
+    return new TypeNarrowKlass(t);
+  }
+
+  virtual const TypeNarrowPtr *make_hash_same_narrowptr(const TypePtr *t) const {
+    return (const TypeNarrowPtr*)((new TypeNarrowKlass(t))->hashcons());
+  }
+
+public:
+  static const TypeNarrowKlass *make( const TypePtr* type);
+
+  // static const TypeNarrowKlass *BOTTOM;
+  static const TypeNarrowKlass *NULL_PTR;
+
+#ifndef PRODUCT
+  virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
+#endif
+};
+
 //------------------------------TypeFunc---------------------------------------
 // Class of Array Types
 class TypeFunc : public Type {
@@ -1221,6 +1302,14 @@ inline bool Type::is_ptr_to_narrowoop() const {
 #endif
 }
 
+inline bool Type::is_ptr_to_narrowklass() const {
+#ifdef _LP64
+  return (isa_oopptr() != NULL && is_oopptr()->is_ptr_to_narrowklass_nv());
+#else
+  return false;
+#endif
+}
+
 inline float Type::getf() const {
   assert( _base == FloatCon, "Not a FloatCon" );
   return ((TypeF*)this)->_f;
@@ -1346,6 +1435,15 @@ inline const TypeNarrowOop *Type::isa_narrowoop() const {
   return (_base == NarrowOop) ? (TypeNarrowOop*)this : NULL;
 }
 
+inline const TypeNarrowKlass *Type::is_narrowklass() const {
+  assert(_base == NarrowKlass, "Not a narrow oop" ) ;
+  return (TypeNarrowKlass*)this;
+}
+
+inline const TypeNarrowKlass *Type::isa_narrowklass() const {
+  return (_base == NarrowKlass) ? (TypeNarrowKlass*)this : NULL;
+}
+
 inline const TypeMetadataPtr *Type::is_metadataptr() const {
   // MetadataPtr is the first and CPCachePtr the last
   assert(_base == MetadataPtr, "Not a metadata pointer" ) ;
@@ -1367,7 +1465,8 @@ inline const TypeKlassPtr *Type::is_klassptr() const {
 
 inline const TypePtr* Type::make_ptr() const {
   return (_base == NarrowOop) ? is_narrowoop()->get_ptrtype() :
-                                (isa_ptr() ? is_ptr() : NULL);
+    ((_base == NarrowKlass) ? is_narrowklass()->get_ptrtype() :
+     (isa_ptr() ? is_ptr() : NULL));
 }
 
 inline const TypeOopPtr* Type::make_oopptr() const {
@@ -1379,6 +1478,11 @@ inline const TypeNarrowOop* Type::make_narrowoop() const {
                                 (isa_ptr() ? TypeNarrowOop::make(is_ptr()) : NULL);
 }
 
+inline const TypeNarrowKlass* Type::make_narrowklass() const {
+  return (_base == NarrowKlass) ? is_narrowklass() :
+                                (isa_ptr() ? TypeNarrowKlass::make(is_ptr()) : NULL);
+}
+
 inline bool Type::is_floatingpoint() const {
   if( (_base == FloatCon)  || (_base == FloatBot) ||
       (_base == DoubleCon) || (_base == DoubleBot) )
diff --git a/hotspot/src/share/vm/opto/vectornode.cpp b/hotspot/src/share/vm/opto/vectornode.cpp
index 7c8e521997a..d0955a819e1 100644
--- a/hotspot/src/share/vm/opto/vectornode.cpp
+++ b/hotspot/src/share/vm/opto/vectornode.cpp
@@ -243,50 +243,52 @@ void VectorNode::vector_operands(Node* n, uint* start, uint* end) {
 VectorNode* VectorNode::make(Compile* C, int opc, Node* n1, Node* n2, uint vlen, BasicType bt) {
   const TypeVect* vt = TypeVect::make(bt, vlen);
   int vopc = VectorNode::opcode(opc, bt);
+  // This method should not be called for unimplemented vectors.
+  guarantee(vopc > 0, err_msg_res("Vector for '%s' is not implemented", NodeClassNames[opc]));
 
   switch (vopc) {
-  case Op_AddVB: return new (C, 3) AddVBNode(n1, n2, vt);
-  case Op_AddVS: return new (C, 3) AddVSNode(n1, n2, vt);
-  case Op_AddVI: return new (C, 3) AddVINode(n1, n2, vt);
-  case Op_AddVL: return new (C, 3) AddVLNode(n1, n2, vt);
-  case Op_AddVF: return new (C, 3) AddVFNode(n1, n2, vt);
-  case Op_AddVD: return new (C, 3) AddVDNode(n1, n2, vt);
+  case Op_AddVB: return new (C) AddVBNode(n1, n2, vt);
+  case Op_AddVS: return new (C) AddVSNode(n1, n2, vt);
+  case Op_AddVI: return new (C) AddVINode(n1, n2, vt);
+  case Op_AddVL: return new (C) AddVLNode(n1, n2, vt);
+  case Op_AddVF: return new (C) AddVFNode(n1, n2, vt);
+  case Op_AddVD: return new (C) AddVDNode(n1, n2, vt);
 
-  case Op_SubVB: return new (C, 3) SubVBNode(n1, n2, vt);
-  case Op_SubVS: return new (C, 3) SubVSNode(n1, n2, vt);
-  case Op_SubVI: return new (C, 3) SubVINode(n1, n2, vt);
-  case Op_SubVL: return new (C, 3) SubVLNode(n1, n2, vt);
-  case Op_SubVF: return new (C, 3) SubVFNode(n1, n2, vt);
-  case Op_SubVD: return new (C, 3) SubVDNode(n1, n2, vt);
+  case Op_SubVB: return new (C) SubVBNode(n1, n2, vt);
+  case Op_SubVS: return new (C) SubVSNode(n1, n2, vt);
+  case Op_SubVI: return new (C) SubVINode(n1, n2, vt);
+  case Op_SubVL: return new (C) SubVLNode(n1, n2, vt);
+  case Op_SubVF: return new (C) SubVFNode(n1, n2, vt);
+  case Op_SubVD: return new (C) SubVDNode(n1, n2, vt);
 
-  case Op_MulVS: return new (C, 3) MulVSNode(n1, n2, vt);
-  case Op_MulVI: return new (C, 3) MulVINode(n1, n2, vt);
-  case Op_MulVF: return new (C, 3) MulVFNode(n1, n2, vt);
-  case Op_MulVD: return new (C, 3) MulVDNode(n1, n2, vt);
+  case Op_MulVS: return new (C) MulVSNode(n1, n2, vt);
+  case Op_MulVI: return new (C) MulVINode(n1, n2, vt);
+  case Op_MulVF: return new (C) MulVFNode(n1, n2, vt);
+  case Op_MulVD: return new (C) MulVDNode(n1, n2, vt);
 
-  case Op_DivVF: return new (C, 3) DivVFNode(n1, n2, vt);
-  case Op_DivVD: return new (C, 3) DivVDNode(n1, n2, vt);
+  case Op_DivVF: return new (C) DivVFNode(n1, n2, vt);
+  case Op_DivVD: return new (C) DivVDNode(n1, n2, vt);
 
-  case Op_LShiftVB: return new (C, 3) LShiftVBNode(n1, n2, vt);
-  case Op_LShiftVS: return new (C, 3) LShiftVSNode(n1, n2, vt);
-  case Op_LShiftVI: return new (C, 3) LShiftVINode(n1, n2, vt);
-  case Op_LShiftVL: return new (C, 3) LShiftVLNode(n1, n2, vt);
+  case Op_LShiftVB: return new (C) LShiftVBNode(n1, n2, vt);
+  case Op_LShiftVS: return new (C) LShiftVSNode(n1, n2, vt);
+  case Op_LShiftVI: return new (C) LShiftVINode(n1, n2, vt);
+  case Op_LShiftVL: return new (C) LShiftVLNode(n1, n2, vt);
 
-  case Op_RShiftVB: return new (C, 3) RShiftVBNode(n1, n2, vt);
-  case Op_RShiftVS: return new (C, 3) RShiftVSNode(n1, n2, vt);
-  case Op_RShiftVI: return new (C, 3) RShiftVINode(n1, n2, vt);
-  case Op_RShiftVL: return new (C, 3) RShiftVLNode(n1, n2, vt);
+  case Op_RShiftVB: return new (C) RShiftVBNode(n1, n2, vt);
+  case Op_RShiftVS: return new (C) RShiftVSNode(n1, n2, vt);
+  case Op_RShiftVI: return new (C) RShiftVINode(n1, n2, vt);
+  case Op_RShiftVL: return new (C) RShiftVLNode(n1, n2, vt);
 
-  case Op_URShiftVB: return new (C, 3) URShiftVBNode(n1, n2, vt);
-  case Op_URShiftVS: return new (C, 3) URShiftVSNode(n1, n2, vt);
-  case Op_URShiftVI: return new (C, 3) URShiftVINode(n1, n2, vt);
-  case Op_URShiftVL: return new (C, 3) URShiftVLNode(n1, n2, vt);
+  case Op_URShiftVB: return new (C) URShiftVBNode(n1, n2, vt);
+  case Op_URShiftVS: return new (C) URShiftVSNode(n1, n2, vt);
+  case Op_URShiftVI: return new (C) URShiftVINode(n1, n2, vt);
+  case Op_URShiftVL: return new (C) URShiftVLNode(n1, n2, vt);
 
-  case Op_AndV: return new (C, 3) AndVNode(n1, n2, vt);
-  case Op_OrV:  return new (C, 3) OrVNode (n1, n2, vt);
-  case Op_XorV: return new (C, 3) XorVNode(n1, n2, vt);
+  case Op_AndV: return new (C) AndVNode(n1, n2, vt);
+  case Op_OrV:  return new (C) OrVNode (n1, n2, vt);
+  case Op_XorV: return new (C) XorVNode(n1, n2, vt);
   }
-  ShouldNotReachHere();
+  fatal(err_msg_res("Missed vector creation for '%s'", NodeClassNames[vopc]));
   return NULL;
 
 }
@@ -299,20 +301,38 @@ VectorNode* VectorNode::scalar2vector(Compile* C, Node* s, uint vlen, const Type
   switch (bt) {
   case T_BOOLEAN:
   case T_BYTE:
-    return new (C, 2) ReplicateBNode(s, vt);
+    return new (C) ReplicateBNode(s, vt);
   case T_CHAR:
   case T_SHORT:
-    return new (C, 2) ReplicateSNode(s, vt);
+    return new (C) ReplicateSNode(s, vt);
   case T_INT:
-    return new (C, 2) ReplicateINode(s, vt);
+    return new (C) ReplicateINode(s, vt);
   case T_LONG:
-    return new (C, 2) ReplicateLNode(s, vt);
+    return new (C) ReplicateLNode(s, vt);
   case T_FLOAT:
-    return new (C, 2) ReplicateFNode(s, vt);
+    return new (C) ReplicateFNode(s, vt);
   case T_DOUBLE:
-    return new (C, 2) ReplicateDNode(s, vt);
+    return new (C) ReplicateDNode(s, vt);
   }
-  ShouldNotReachHere();
+  fatal(err_msg_res("Type '%s' is not supported for vectors", type2name(bt)));
+  return NULL;
+}
+
+VectorNode* VectorNode::shift_count(Compile* C, Node* shift, Node* cnt, uint vlen, BasicType bt) {
+  assert(VectorNode::is_shift(shift) && !cnt->is_Con(), "only variable shift count");
+  // Match shift count type with shift vector type.
+  const TypeVect* vt = TypeVect::make(bt, vlen);
+  switch (shift->Opcode()) {
+  case Op_LShiftI:
+  case Op_LShiftL:
+    return new (C) LShiftCntVNode(cnt, vt);
+  case Op_RShiftI:
+  case Op_RShiftL:
+  case Op_URShiftI:
+  case Op_URShiftL:
+    return new (C) RShiftCntVNode(cnt, vt);
+  }
+  fatal(err_msg_res("Missed vector creation for '%s'", NodeClassNames[shift->Opcode()]));
   return NULL;
 }
 
@@ -322,20 +342,20 @@ PackNode* PackNode::make(Compile* C, Node* s, uint vlen, BasicType bt) {
   switch (bt) {
   case T_BOOLEAN:
   case T_BYTE:
-    return new (C, 2) PackBNode(s, vt);
+    return new (C) PackBNode(s, vt);
   case T_CHAR:
   case T_SHORT:
-    return new (C, 2) PackSNode(s, vt);
+    return new (C) PackSNode(s, vt);
   case T_INT:
-    return new (C, 2) PackINode(s, vt);
+    return new (C) PackINode(s, vt);
   case T_LONG:
-    return new (C, 2) PackLNode(s, vt);
+    return new (C) PackLNode(s, vt);
   case T_FLOAT:
-    return new (C, 2) PackFNode(s, vt);
+    return new (C) PackFNode(s, vt);
   case T_DOUBLE:
-    return new (C, 2) PackDNode(s, vt);
+    return new (C) PackDNode(s, vt);
   }
-  ShouldNotReachHere();
+  fatal(err_msg_res("Type '%s' is not supported for vectors", type2name(bt)));
   return NULL;
 }
 
@@ -358,20 +378,20 @@ PackNode* PackNode::binary_tree_pack(Compile* C, int lo, int hi) {
     switch (bt) {
     case T_BOOLEAN:
     case T_BYTE:
-      return new (C, 3) PackSNode(n1, n2, TypeVect::make(T_SHORT, 2));
+      return new (C) PackSNode(n1, n2, TypeVect::make(T_SHORT, 2));
     case T_CHAR:
     case T_SHORT:
-      return new (C, 3) PackINode(n1, n2, TypeVect::make(T_INT, 2));
+      return new (C) PackINode(n1, n2, TypeVect::make(T_INT, 2));
     case T_INT:
-      return new (C, 3) PackLNode(n1, n2, TypeVect::make(T_LONG, 2));
+      return new (C) PackLNode(n1, n2, TypeVect::make(T_LONG, 2));
     case T_LONG:
-      return new (C, 3) Pack2LNode(n1, n2, TypeVect::make(T_LONG, 2));
+      return new (C) Pack2LNode(n1, n2, TypeVect::make(T_LONG, 2));
     case T_FLOAT:
-      return new (C, 3) PackDNode(n1, n2, TypeVect::make(T_DOUBLE, 2));
+      return new (C) PackDNode(n1, n2, TypeVect::make(T_DOUBLE, 2));
     case T_DOUBLE:
-      return new (C, 3) Pack2DNode(n1, n2, TypeVect::make(T_DOUBLE, 2));
+      return new (C) Pack2DNode(n1, n2, TypeVect::make(T_DOUBLE, 2));
     }
-    ShouldNotReachHere();
+    fatal(err_msg_res("Type '%s' is not supported for vectors", type2name(bt)));
   }
   return NULL;
 }
@@ -380,15 +400,14 @@ PackNode* PackNode::binary_tree_pack(Compile* C, int lo, int hi) {
 LoadVectorNode* LoadVectorNode::make(Compile* C, int opc, Node* ctl, Node* mem,
                                      Node* adr, const TypePtr* atyp, uint vlen, BasicType bt) {
   const TypeVect* vt = TypeVect::make(bt, vlen);
-  return new (C, 3) LoadVectorNode(ctl, mem, adr, atyp, vt);
-  return NULL;
+  return new (C) LoadVectorNode(ctl, mem, adr, atyp, vt);
 }
 
 // Return the vector version of a scalar store node.
 StoreVectorNode* StoreVectorNode::make(Compile* C, int opc, Node* ctl, Node* mem,
                                        Node* adr, const TypePtr* atyp, Node* val,
                                        uint vlen) {
-  return new (C, 4) StoreVectorNode(ctl, mem, adr, atyp, val);
+  return new (C) StoreVectorNode(ctl, mem, adr, atyp, val);
 }
 
 // Extract a scalar element of vector.
@@ -397,23 +416,23 @@ Node* ExtractNode::make(Compile* C, Node* v, uint position, BasicType bt) {
   ConINode* pos = ConINode::make(C, (int)position);
   switch (bt) {
   case T_BOOLEAN:
-    return new (C, 3) ExtractUBNode(v, pos);
+    return new (C) ExtractUBNode(v, pos);
   case T_BYTE:
-    return new (C, 3) ExtractBNode(v, pos);
+    return new (C) ExtractBNode(v, pos);
   case T_CHAR:
-    return new (C, 3) ExtractCNode(v, pos);
+    return new (C) ExtractCNode(v, pos);
   case T_SHORT:
-    return new (C, 3) ExtractSNode(v, pos);
+    return new (C) ExtractSNode(v, pos);
   case T_INT:
-    return new (C, 3) ExtractINode(v, pos);
+    return new (C) ExtractINode(v, pos);
   case T_LONG:
-    return new (C, 3) ExtractLNode(v, pos);
+    return new (C) ExtractLNode(v, pos);
   case T_FLOAT:
-    return new (C, 3) ExtractFNode(v, pos);
+    return new (C) ExtractFNode(v, pos);
   case T_DOUBLE:
-    return new (C, 3) ExtractDNode(v, pos);
+    return new (C) ExtractDNode(v, pos);
   }
-  ShouldNotReachHere();
+  fatal(err_msg_res("Type '%s' is not supported for vectors", type2name(bt)));
   return NULL;
 }
 
diff --git a/hotspot/src/share/vm/opto/vectornode.hpp b/hotspot/src/share/vm/opto/vectornode.hpp
index 02521bbe1db..ba84406f1d7 100644
--- a/hotspot/src/share/vm/opto/vectornode.hpp
+++ b/hotspot/src/share/vm/opto/vectornode.hpp
@@ -29,7 +29,7 @@
 #include "opto/node.hpp"
 #include "opto/opcodes.hpp"
 
-//------------------------------VectorNode--------------------------------------
+//------------------------------VectorNode-------------------------------------
 // Vector Operation
 class VectorNode : public TypeNode {
  public:
@@ -53,7 +53,7 @@ class VectorNode : public TypeNode {
   virtual uint ideal_reg() const { return Matcher::vector_ideal_reg(vect_type()->length_in_bytes()); }
 
   static VectorNode* scalar2vector(Compile* C, Node* s, uint vlen, const Type* opd_t);
-
+  static VectorNode* shift_count(Compile* C, Node* shift, Node* cnt, uint vlen, BasicType bt);
   static VectorNode* make(Compile* C, int opc, Node* n1, Node* n2, uint vlen, BasicType bt);
 
   static int  opcode(int opc, BasicType bt);
@@ -64,9 +64,9 @@ class VectorNode : public TypeNode {
   static void vector_operands(Node* n, uint* start, uint* end);
 };
 
-//===========================Vector=ALU=Operations====================================
+//===========================Vector=ALU=Operations=============================
 
-//------------------------------AddVBNode---------------------------------------
+//------------------------------AddVBNode--------------------------------------
 // Vector add byte
 class AddVBNode : public VectorNode {
  public:
@@ -74,7 +74,7 @@ class AddVBNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------AddVSNode---------------------------------------
+//------------------------------AddVSNode--------------------------------------
 // Vector add char/short
 class AddVSNode : public VectorNode {
  public:
@@ -82,7 +82,7 @@ class AddVSNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------AddVINode---------------------------------------
+//------------------------------AddVINode--------------------------------------
 // Vector add int
 class AddVINode : public VectorNode {
  public:
@@ -90,7 +90,7 @@ class AddVINode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------AddVLNode---------------------------------------
+//------------------------------AddVLNode--------------------------------------
 // Vector add long
 class AddVLNode : public VectorNode {
  public:
@@ -98,7 +98,7 @@ class AddVLNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------AddVFNode---------------------------------------
+//------------------------------AddVFNode--------------------------------------
 // Vector add float
 class AddVFNode : public VectorNode {
  public:
@@ -106,7 +106,7 @@ class AddVFNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------AddVDNode---------------------------------------
+//------------------------------AddVDNode--------------------------------------
 // Vector add double
 class AddVDNode : public VectorNode {
  public:
@@ -114,7 +114,7 @@ class AddVDNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------SubVBNode---------------------------------------
+//------------------------------SubVBNode--------------------------------------
 // Vector subtract byte
 class SubVBNode : public VectorNode {
  public:
@@ -122,7 +122,7 @@ class SubVBNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------SubVSNode---------------------------------------
+//------------------------------SubVSNode--------------------------------------
 // Vector subtract short
 class SubVSNode : public VectorNode {
  public:
@@ -130,7 +130,7 @@ class SubVSNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------SubVINode---------------------------------------
+//------------------------------SubVINode--------------------------------------
 // Vector subtract int
 class SubVINode : public VectorNode {
  public:
@@ -138,7 +138,7 @@ class SubVINode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------SubVLNode---------------------------------------
+//------------------------------SubVLNode--------------------------------------
 // Vector subtract long
 class SubVLNode : public VectorNode {
  public:
@@ -146,7 +146,7 @@ class SubVLNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------SubVFNode---------------------------------------
+//------------------------------SubVFNode--------------------------------------
 // Vector subtract float
 class SubVFNode : public VectorNode {
  public:
@@ -154,7 +154,7 @@ class SubVFNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------SubVDNode---------------------------------------
+//------------------------------SubVDNode--------------------------------------
 // Vector subtract double
 class SubVDNode : public VectorNode {
  public:
@@ -162,7 +162,7 @@ class SubVDNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------MulVSNode---------------------------------------
+//------------------------------MulVSNode--------------------------------------
 // Vector multiply short
 class MulVSNode : public VectorNode {
  public:
@@ -170,7 +170,7 @@ class MulVSNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------MulVINode---------------------------------------
+//------------------------------MulVINode--------------------------------------
 // Vector multiply int
 class MulVINode : public VectorNode {
  public:
@@ -178,7 +178,7 @@ class MulVINode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------MulVFNode---------------------------------------
+//------------------------------MulVFNode--------------------------------------
 // Vector multiply float
 class MulVFNode : public VectorNode {
  public:
@@ -186,7 +186,7 @@ class MulVFNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------MulVDNode---------------------------------------
+//------------------------------MulVDNode--------------------------------------
 // Vector multiply double
 class MulVDNode : public VectorNode {
  public:
@@ -194,7 +194,7 @@ class MulVDNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------DivVFNode---------------------------------------
+//------------------------------DivVFNode--------------------------------------
 // Vector divide float
 class DivVFNode : public VectorNode {
  public:
@@ -202,7 +202,7 @@ class DivVFNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------DivVDNode---------------------------------------
+//------------------------------DivVDNode--------------------------------------
 // Vector Divide double
 class DivVDNode : public VectorNode {
  public:
@@ -210,7 +210,7 @@ class DivVDNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------LShiftVBNode---------------------------------------
+//------------------------------LShiftVBNode-----------------------------------
 // Vector left shift bytes
 class LShiftVBNode : public VectorNode {
  public:
@@ -218,7 +218,7 @@ class LShiftVBNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------LShiftVSNode---------------------------------------
+//------------------------------LShiftVSNode-----------------------------------
 // Vector left shift shorts
 class LShiftVSNode : public VectorNode {
  public:
@@ -226,7 +226,7 @@ class LShiftVSNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------LShiftVINode---------------------------------------
+//------------------------------LShiftVINode-----------------------------------
 // Vector left shift ints
 class LShiftVINode : public VectorNode {
  public:
@@ -234,7 +234,7 @@ class LShiftVINode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------LShiftVLNode---------------------------------------
+//------------------------------LShiftVLNode-----------------------------------
 // Vector left shift longs
 class LShiftVLNode : public VectorNode {
  public:
@@ -242,7 +242,7 @@ class LShiftVLNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------RShiftVBNode---------------------------------------
+//------------------------------RShiftVBNode-----------------------------------
 // Vector right arithmetic (signed) shift bytes
 class RShiftVBNode : public VectorNode {
  public:
@@ -250,7 +250,7 @@ class RShiftVBNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------RShiftVSNode---------------------------------------
+//------------------------------RShiftVSNode-----------------------------------
 // Vector right arithmetic (signed) shift shorts
 class RShiftVSNode : public VectorNode {
  public:
@@ -258,7 +258,7 @@ class RShiftVSNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------RShiftVINode---------------------------------------
+//------------------------------RShiftVINode-----------------------------------
 // Vector right arithmetic (signed) shift ints
 class RShiftVINode : public VectorNode {
  public:
@@ -266,7 +266,7 @@ class RShiftVINode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------RShiftVLNode---------------------------------------
+//------------------------------RShiftVLNode-----------------------------------
 // Vector right arithmetic (signed) shift longs
 class RShiftVLNode : public VectorNode {
  public:
@@ -274,7 +274,7 @@ class RShiftVLNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------URShiftVBNode---------------------------------------
+//------------------------------URShiftVBNode----------------------------------
 // Vector right logical (unsigned) shift bytes
 class URShiftVBNode : public VectorNode {
  public:
@@ -282,7 +282,7 @@ class URShiftVBNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------URShiftVSNode---------------------------------------
+//------------------------------URShiftVSNode----------------------------------
 // Vector right logical (unsigned) shift shorts
 class URShiftVSNode : public VectorNode {
  public:
@@ -290,7 +290,7 @@ class URShiftVSNode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------URShiftVINode---------------------------------------
+//------------------------------URShiftVINode----------------------------------
 // Vector right logical (unsigned) shift ints
 class URShiftVINode : public VectorNode {
  public:
@@ -298,7 +298,7 @@ class URShiftVINode : public VectorNode {
   virtual int Opcode() const;
 };
 
-//------------------------------URShiftVLNode---------------------------------------
+//------------------------------URShiftVLNode----------------------------------
 // Vector right logical (unsigned) shift longs
 class URShiftVLNode : public VectorNode {
  public:
@@ -306,6 +306,24 @@ class URShiftVLNode : public VectorNode {
   virtual int Opcode() const;
 };
 
+//------------------------------LShiftCntVNode---------------------------------
+// Vector left shift count
+class LShiftCntVNode : public VectorNode {
+ public:
+  LShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {}
+  virtual int Opcode() const;
+  virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); }
+};
+
+//------------------------------RShiftCntVNode---------------------------------
+// Vector right shift count
+class RShiftCntVNode : public VectorNode {
+ public:
+  RShiftCntVNode(Node* cnt, const TypeVect* vt) : VectorNode(cnt,vt) {}
+  virtual int Opcode() const;
+  virtual uint ideal_reg() const { return Matcher::vector_shift_count_ideal_reg(vect_type()->length_in_bytes()); }
+};
+
 
 //------------------------------AndVNode---------------------------------------
 // Vector and integer
@@ -452,7 +470,7 @@ class PackNode : public VectorNode {
   static PackNode* make(Compile* C, Node* s, uint vlen, BasicType bt);
 };
 
-//------------------------------PackBNode---------------------------------------
+//------------------------------PackBNode--------------------------------------
 // Pack byte scalars into vector
 class PackBNode : public PackNode {
  public:
@@ -460,7 +478,7 @@ class PackBNode : public PackNode {
   virtual int Opcode() const;
 };
 
-//------------------------------PackSNode---------------------------------------
+//------------------------------PackSNode--------------------------------------
 // Pack short scalars into a vector
 class PackSNode : public PackNode {
  public:
@@ -469,7 +487,7 @@ class PackSNode : public PackNode {
   virtual int Opcode() const;
 };
 
-//------------------------------PackINode---------------------------------------
+//------------------------------PackINode--------------------------------------
 // Pack integer scalars into a vector
 class PackINode : public PackNode {
  public:
@@ -478,7 +496,7 @@ class PackINode : public PackNode {
   virtual int Opcode() const;
 };
 
-//------------------------------PackLNode---------------------------------------
+//------------------------------PackLNode--------------------------------------
 // Pack long scalars into a vector
 class PackLNode : public PackNode {
  public:
@@ -487,7 +505,7 @@ class PackLNode : public PackNode {
   virtual int Opcode() const;
 };
 
-//------------------------------Pack2LNode--------------------------------------
+//------------------------------Pack2LNode-------------------------------------
 // Pack 2 long scalars into a vector
 class Pack2LNode : public PackNode {
  public:
@@ -495,7 +513,7 @@ class Pack2LNode : public PackNode {
   virtual int Opcode() const;
 };
 
-//------------------------------PackFNode---------------------------------------
+//------------------------------PackFNode--------------------------------------
 // Pack float scalars into vector
 class PackFNode : public PackNode {
  public:
@@ -504,7 +522,7 @@ class PackFNode : public PackNode {
   virtual int Opcode() const;
 };
 
-//------------------------------PackDNode---------------------------------------
+//------------------------------PackDNode--------------------------------------
 // Pack double scalars into a vector
 class PackDNode : public PackNode {
  public:
@@ -513,7 +531,7 @@ class PackDNode : public PackNode {
   virtual int Opcode() const;
 };
 
-//------------------------------Pack2DNode--------------------------------------
+//------------------------------Pack2DNode-------------------------------------
 // Pack 2 double scalars into a vector
 class Pack2DNode : public PackNode {
  public:
@@ -522,9 +540,9 @@ class Pack2DNode : public PackNode {
 };
 
 
-//========================Extract_Scalar_from_Vector===============================
+//========================Extract_Scalar_from_Vector===========================
 
-//------------------------------ExtractNode---------------------------------------
+//------------------------------ExtractNode------------------------------------
 // Extract a scalar from a vector at position "pos"
 class ExtractNode : public Node {
  public:
@@ -537,7 +555,7 @@ class ExtractNode : public Node {
   static Node* make(Compile* C, Node* v, uint position, BasicType bt);
 };
 
-//------------------------------ExtractBNode---------------------------------------
+//------------------------------ExtractBNode-----------------------------------
 // Extract a byte from a vector at position "pos"
 class ExtractBNode : public ExtractNode {
  public:
@@ -547,7 +565,7 @@ class ExtractBNode : public ExtractNode {
   virtual uint ideal_reg() const { return Op_RegI; }
 };
 
-//------------------------------ExtractUBNode--------------------------------------
+//------------------------------ExtractUBNode----------------------------------
 // Extract a boolean from a vector at position "pos"
 class ExtractUBNode : public ExtractNode {
  public:
@@ -557,7 +575,7 @@ class ExtractUBNode : public ExtractNode {
   virtual uint ideal_reg() const { return Op_RegI; }
 };
 
-//------------------------------ExtractCNode---------------------------------------
+//------------------------------ExtractCNode-----------------------------------
 // Extract a char from a vector at position "pos"
 class ExtractCNode : public ExtractNode {
  public:
@@ -567,7 +585,7 @@ class ExtractCNode : public ExtractNode {
   virtual uint ideal_reg() const { return Op_RegI; }
 };
 
-//------------------------------ExtractSNode---------------------------------------
+//------------------------------ExtractSNode-----------------------------------
 // Extract a short from a vector at position "pos"
 class ExtractSNode : public ExtractNode {
  public:
@@ -577,7 +595,7 @@ class ExtractSNode : public ExtractNode {
   virtual uint ideal_reg() const { return Op_RegI; }
 };
 
-//------------------------------ExtractINode---------------------------------------
+//------------------------------ExtractINode-----------------------------------
 // Extract an int from a vector at position "pos"
 class ExtractINode : public ExtractNode {
  public:
@@ -587,7 +605,7 @@ class ExtractINode : public ExtractNode {
   virtual uint ideal_reg() const { return Op_RegI; }
 };
 
-//------------------------------ExtractLNode---------------------------------------
+//------------------------------ExtractLNode-----------------------------------
 // Extract a long from a vector at position "pos"
 class ExtractLNode : public ExtractNode {
  public:
@@ -597,7 +615,7 @@ class ExtractLNode : public ExtractNode {
   virtual uint ideal_reg() const { return Op_RegL; }
 };
 
-//------------------------------ExtractFNode---------------------------------------
+//------------------------------ExtractFNode-----------------------------------
 // Extract a float from a vector at position "pos"
 class ExtractFNode : public ExtractNode {
  public:
@@ -607,7 +625,7 @@ class ExtractFNode : public ExtractNode {
   virtual uint ideal_reg() const { return Op_RegF; }
 };
 
-//------------------------------ExtractDNode---------------------------------------
+//------------------------------ExtractDNode-----------------------------------
 // Extract a double from a vector at position "pos"
 class ExtractDNode : public ExtractNode {
  public:
diff --git a/hotspot/src/share/vm/prims/forte.hpp b/hotspot/src/share/vm/prims/forte.hpp
index 9631faeb164..29a8a6854fa 100644
--- a/hotspot/src/share/vm/prims/forte.hpp
+++ b/hotspot/src/share/vm/prims/forte.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
 class Forte : AllStatic {
  public:
    static void register_stub(const char* name, address start, address end)
-                                                 KERNEL_RETURN;
+                                                 NOT_JVMTI_RETURN;
                                                  // register internal VM stub
 };
 
diff --git a/hotspot/src/share/vm/prims/jni.cpp b/hotspot/src/share/vm/prims/jni.cpp
index c9450e9dc83..3f7bc7011f8 100644
--- a/hotspot/src/share/vm/prims/jni.cpp
+++ b/hotspot/src/share/vm/prims/jni.cpp
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2820,10 +2821,9 @@ JNI_END
 JNI_QUICK_ENTRY(void, jni_Set##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID, Argument value)) \
   JNIWrapper("Set" XSTR(Result) "Field"); \
 \
-  HS_DTRACE_PROBE_CDECL_N(hotspot_jni, Set##Result##Field__entry, \
-    ( JNIEnv*, jobject, jfieldID FP_SELECT_##Result(COMMA Argument,/*empty*/) ) ); \
-  HS_DTRACE_PROBE_N(hotspot_jni, Set##Result##Field__entry, \
-    ( env, obj, fieldID FP_SELECT_##Result(COMMA value,/*empty*/) ) ); \
+  FP_SELECT_##Result( \
+    DTRACE_PROBE4(hotspot_jni, Set##Result##Field__entry, env, obj, fieldID, value), \
+    DTRACE_PROBE3(hotspot_jni, Set##Result##Field__entry, env, obj, fieldID)); \
 \
   oop o = JNIHandles::resolve_non_null(obj); \
   Klass* k = o->klass(); \
@@ -3003,9 +3003,9 @@ JNI_ENTRY(jobject, jni_GetStaticObjectField(JNIEnv *env, jclass clazz, jfieldID
   HOTSPOT_JNI_GETSTATICOBJECTFIELD_ENTRY(
                                          env, clazz, (uintptr_t) fieldID);
 #endif /* USDT2 */
-#ifndef JNICHECK_KERNEL
+#if INCLUDE_JNI_CHECK
   DEBUG_ONLY(Klass* param_k = jniCheck::validate_class(thread, clazz);)
-#endif // JNICHECK_KERNEL
+#endif // INCLUDE_JNI_CHECK
   JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID);
   assert(id->is_static_field_id(), "invalid static field id");
   // Keep JVMTI addition small and only check enabled flag here.
@@ -3130,10 +3130,9 @@ JNI_END
 \
 JNI_ENTRY(void, jni_SetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value)) \
   JNIWrapper("SetStatic" XSTR(Result) "Field"); \
-  HS_DTRACE_PROBE_CDECL_N(hotspot_jni, SetStatic##Result##Field__entry,\
-    ( JNIEnv*, jclass, jfieldID FP_SELECT_##Result(COMMA Argument,/*empty*/) ) ); \
-  HS_DTRACE_PROBE_N(hotspot_jni, SetStatic##Result##Field__entry, \
-    ( env, clazz, fieldID FP_SELECT_##Result(COMMA value,/*empty*/) ) ); \
+  FP_SELECT_##Result( \
+     DTRACE_PROBE4(hotspot_jni, SetStatic##Result##Field__entry, env, clazz, fieldID, value), \
+     DTRACE_PROBE3(hotspot_jni, SetStatic##Result##Field__entry, env, clazz, fieldID)); \
 \
   JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); \
   assert(id->is_static_field_id(), "invalid static field id"); \
@@ -3442,8 +3441,8 @@ JNI_ENTRY(jobjectArray, jni_NewObjectArray(JNIEnv *env, jsize length, jclass ele
   KlassHandle ek(THREAD, java_lang_Class::as_Klass(JNIHandles::resolve_non_null(elementClass)));
   Klass* ako = Klass::cast(ek())->array_klass(CHECK_NULL);
   KlassHandle ak = KlassHandle(THREAD, ako);
-  objArrayKlass::cast(ak())->initialize(CHECK_NULL);
-  objArrayOop result = objArrayKlass::cast(ak())->allocate(length, CHECK_NULL);
+  ObjArrayKlass::cast(ak())->initialize(CHECK_NULL);
+  objArrayOop result = ObjArrayKlass::cast(ak())->allocate(length, CHECK_NULL);
   oop initial_value = JNIHandles::resolve(initialElement);
   if (initial_value != NULL) {  // array already initialized with NULL
     for (int index = 0; index < length; index++) {
@@ -3502,7 +3501,7 @@ JNI_ENTRY(void, jni_SetObjectArrayElement(JNIEnv *env, jobjectArray array, jsize
   objArrayOop a = objArrayOop(JNIHandles::resolve_non_null(array));
   oop v = JNIHandles::resolve(value);
   if (a->is_within_bounds(index)) {
-    if (v == NULL || v->is_a(objArrayKlass::cast(a->klass())->element_klass())) {
+    if (v == NULL || v->is_a(ObjArrayKlass::cast(a->klass())->element_klass())) {
       a->obj_at_put(index, v);
     } else {
       THROW(vmSymbols::java_lang_ArrayStoreException());
@@ -3787,7 +3786,7 @@ jni_Get##Result##ArrayRegion(JNIEnv *env, ElementType##Array array, jsize start,
     THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException()); \
   } else { \
     if (len > 0) { \
-      int sc = typeArrayKlass::cast(src->klass())->log2_element_size(); \
+      int sc = TypeArrayKlass::cast(src->klass())->log2_element_size(); \
       memcpy((u_char*) buf, \
              (u_char*) src->Tag##_at_addr(start), \
              len << sc);                          \
@@ -3822,7 +3821,7 @@ jni_Get##Result##ArrayRegion(JNIEnv *env, ElementType##Array array, jsize start,
     THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException()); \
   } else { \
     if (len > 0) { \
-      int sc = typeArrayKlass::cast(src->klass())->log2_element_size(); \
+      int sc = TypeArrayKlass::cast(src->klass())->log2_element_size(); \
       memcpy((u_char*) buf, \
              (u_char*) src->Tag##_at_addr(start), \
              len << sc);                          \
@@ -3871,7 +3870,7 @@ jni_Set##Result##ArrayRegion(JNIEnv *env, ElementType##Array array, jsize start,
     THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException()); \
   } else { \
     if (len > 0) { \
-      int sc = typeArrayKlass::cast(dst->klass())->log2_element_size(); \
+      int sc = TypeArrayKlass::cast(dst->klass())->log2_element_size(); \
       memcpy((u_char*) dst->Tag##_at_addr(start), \
              (u_char*) buf, \
              len << sc);    \
@@ -3906,7 +3905,7 @@ jni_Set##Result##ArrayRegion(JNIEnv *env, ElementType##Array array, jsize start,
     THROW(vmSymbols::java_lang_ArrayIndexOutOfBoundsException()); \
   } else { \
     if (len > 0) { \
-      int sc = typeArrayKlass::cast(dst->klass())->log2_element_size(); \
+      int sc = TypeArrayKlass::cast(dst->klass())->log2_element_size(); \
       memcpy((u_char*) dst->Tag##_at_addr(start), \
              (u_char*) buf, \
              len << sc);    \
@@ -3951,6 +3950,7 @@ DEFINE_SETSCALARARRAYREGION(T_DOUBLE,  jdouble,  Double,  double
 // SetNativeMethodPrefix(es) functions in the JVM TI Spec for details.
 static Method* find_prefixed_native(KlassHandle k,
                                       Symbol* name, Symbol* signature, TRAPS) {
+#if INCLUDE_JVMTI
   ResourceMark rm(THREAD);
   Method* method;
   int name_len = name->utf8_length();
@@ -3982,6 +3982,7 @@ static Method* find_prefixed_native(KlassHandle k,
     name_len = trial_len;
     name_str = trial_name_str;
   }
+#endif // INCLUDE_JVMTI
   return NULL; // not found
 }
 
@@ -4251,7 +4252,7 @@ JNI_ENTRY(void*, jni_GetPrimitiveArrayCritical(JNIEnv *env, jarray array, jboole
   if (a->is_objArray()) {
     type = T_OBJECT;
   } else {
-    type = typeArrayKlass::cast(a->klass())->element_type();
+    type = TypeArrayKlass::cast(a->klass())->element_type();
   }
   void* ret = arrayOop(a)->base(type);
 #ifndef USDT2
@@ -4975,11 +4976,9 @@ void quicken_jni_functions() {
 
 // Returns the function structure
 struct JNINativeInterface_* jni_functions() {
-#ifndef JNICHECK_KERNEL
+#if INCLUDE_JNI_CHECK
   if (CheckJNICalls) return jni_functions_check();
-#else  // JNICHECK_KERNEL
-  if (CheckJNICalls) warning("-Xcheck:jni is not supported in kernel vm.");
-#endif // JNICHECK_KERNEL
+#endif // INCLUDE_JNI_CHECK
   return &jni_NativeInterface;
 }
 
diff --git a/hotspot/src/share/vm/prims/jniCheck.cpp b/hotspot/src/share/vm/prims/jniCheck.cpp
index 8182f8b56a1..aa8475f065f 100644
--- a/hotspot/src/share/vm/prims/jniCheck.cpp
+++ b/hotspot/src/share/vm/prims/jniCheck.cpp
@@ -290,7 +290,7 @@ checkArray(JavaThread* thr, jarray jArray, int elementType)
 
   if (elementType != -1) {
     if (aOop->is_typeArray()) {
-      BasicType array_type = typeArrayKlass::cast(aOop->klass())->element_type();
+      BasicType array_type = TypeArrayKlass::cast(aOop->klass())->element_type();
       if (array_type != elementType)
         ReportJNIFatalError(thr, fatal_element_type_mismatch);
       } else if (aOop->is_objArray()) {
diff --git a/hotspot/src/share/vm/prims/jniExport.hpp b/hotspot/src/share/vm/prims/jniExport.hpp
index 841b3dc5ccc..9c93de8c72d 100644
--- a/hotspot/src/share/vm/prims/jniExport.hpp
+++ b/hotspot/src/share/vm/prims/jniExport.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/prims/jvm.cpp b/hotspot/src/share/vm/prims/jvm.cpp
index 63748cf36d1..34e1683ab27 100644
--- a/hotspot/src/share/vm/prims/jvm.cpp
+++ b/hotspot/src/share/vm/prims/jvm.cpp
@@ -1048,7 +1048,7 @@ JVM_ENTRY(jobjectArray, JVM_GetClassSigners(JNIEnv *env, jclass cls))
   if (signers == NULL) return NULL;
 
   // copy of the signers array
-  Klass* element = objArrayKlass::cast(signers->klass())->element_klass();
+  Klass* element = ObjArrayKlass::cast(signers->klass())->element_klass();
   objArrayOop signers_copy = oopFactory::new_objArray(element, signers->length(), CHECK_NULL);
   for (int index = 0; index < signers->length(); index++) {
     signers_copy->obj_at_put(index, signers->obj_at(index));
@@ -3302,10 +3302,10 @@ JVM_ENTRY(jobject, JVM_AllocateNewArray(JNIEnv *env, jobject obj, jclass currCla
 
   if (k->oop_is_typeArray()) {
     // typeArray
-    result = typeArrayKlass::cast(k)->allocate(length, CHECK_NULL);
+    result = TypeArrayKlass::cast(k)->allocate(length, CHECK_NULL);
   } else if (k->oop_is_objArray()) {
     // objArray
-    objArrayKlass* oak = objArrayKlass::cast(k);
+    ObjArrayKlass* oak = ObjArrayKlass::cast(k);
     oak->initialize(CHECK_NULL); // make sure class is initialized (matches Classic VM behavior)
     result = oak->allocate(length, CHECK_NULL);
   } else {
@@ -4193,7 +4193,7 @@ JVM_ENTRY(jobjectArray, JVM_DumpThreads(JNIEnv *env, jclass threadClass, jobject
   }
 
   // check if threads is not an array of objects of Thread class
-  Klass* k = objArrayKlass::cast(ah->klass())->element_klass();
+  Klass* k = ObjArrayKlass::cast(ah->klass())->element_klass();
   if (k != SystemDictionary::Thread_klass()) {
     THROW_(vmSymbols::java_lang_IllegalArgumentException(), 0);
   }
diff --git a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp
index b37870653d9..01beff1b4bb 100644
--- a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.cpp
@@ -43,7 +43,7 @@
 #ifdef TARGET_ARCH_ppc
 # include "bytes_ppc.hpp"
 #endif
-// FIXME: add Deprecated, LVTT attributes
+// FIXME: add Deprecated attribute
 // FIXME: fix Synthetic attribute
 // FIXME: per Serguei, add error return handling for ConstantPool::copy_cpool_bytes()
 
@@ -135,6 +135,7 @@ void JvmtiClassFileReconstituter::write_code_attribute(methodHandle method) {
   u2 line_num_cnt = 0;
   int stackmap_len = 0;
   int local_variable_table_length = 0;
+  int local_variable_type_table_length = 0;
 
   // compute number and length of attributes
   int attr_count = 0;
@@ -171,8 +172,8 @@ void JvmtiClassFileReconstituter::write_code_attribute(methodHandle method) {
   }
   if (method->has_localvariable_table()) {
     local_variable_table_length = method->localvariable_table_length();
-    ++attr_count;
     if (local_variable_table_length != 0) {
+      ++attr_count;
       // Compute the size of the local variable table attribute (VM stores raw):
       // LocalVariableTable_attribute {
       //   u2 attribute_name_index;
@@ -186,6 +187,31 @@ void JvmtiClassFileReconstituter::write_code_attribute(methodHandle method) {
       //     u2 index;
       //   }
       attr_size += 2 + 4 + 2 + local_variable_table_length * (2 + 2 + 2 + 2 + 2);
+
+      // Local variables with generic signatures must have LVTT entries
+      LocalVariableTableElement *elem = method->localvariable_table_start();
+      for (int idx = 0; idx < local_variable_table_length; idx++) {
+        if (elem[idx].signature_cp_index != 0) {
+          local_variable_type_table_length++;
+        }
+      }
+
+      if (local_variable_type_table_length != 0) {
+        ++attr_count;
+        // Compute the size of the local variable type table attribute (VM stores raw):
+        // LocalVariableTypeTable_attribute {
+        //   u2 attribute_name_index;
+        //   u4 attribute_length;
+        //   u2 local_variable_type_table_length;
+        //   {
+        //     u2 start_pc;
+        //     u2 length;
+        //     u2 name_index;
+        //     u2 signature_index;
+        //     u2 index;
+        //   }
+        attr_size += 2 + 4 + 2 + local_variable_type_table_length * (2 + 2 + 2 + 2 + 2);
+      }
     }
   }
 
@@ -223,6 +249,9 @@ void JvmtiClassFileReconstituter::write_code_attribute(methodHandle method) {
   if (local_variable_table_length != 0) {
     write_local_variable_table_attribute(method, local_variable_table_length);
   }
+  if (local_variable_type_table_length != 0) {
+    write_local_variable_type_table_attribute(method, local_variable_type_table_length);
+  }
 }
 
 // Write Exceptions attribute
@@ -387,7 +416,7 @@ void JvmtiClassFileReconstituter::write_line_number_table_attribute(methodHandle
   }
 }
 
-// Write LineNumberTable attribute
+// Write LocalVariableTable attribute
 // JVMSpec|   LocalVariableTable_attribute {
 // JVMSpec|     u2 attribute_name_index;
 // JVMSpec|     u4 attribute_length;
@@ -417,6 +446,39 @@ void JvmtiClassFileReconstituter::write_local_variable_table_attribute(methodHan
     }
 }
 
+// Write LocalVariableTypeTable attribute
+// JVMSpec|   LocalVariableTypeTable_attribute {
+// JVMSpec|     u2 attribute_name_index;
+// JVMSpec|     u4 attribute_length;
+// JVMSpec|     u2 local_variable_type_table_length;
+// JVMSpec|     { u2 start_pc;
+// JVMSpec|       u2 length;
+// JVMSpec|       u2 name_index;
+// JVMSpec|       u2 signature_index;
+// JVMSpec|       u2 index;
+// JVMSpec|     } local_variable_type_table[local_variable_type_table_length];
+// JVMSpec|   }
+void JvmtiClassFileReconstituter::write_local_variable_type_table_attribute(methodHandle method, u2 num_entries) {
+    write_attribute_name_index("LocalVariableTypeTable");
+    write_u4(2 + num_entries * (2 + 2 + 2 + 2 + 2));
+    write_u2(num_entries);
+
+    LocalVariableTableElement *elem = method->localvariable_table_start();
+    for (int j=0; j<method->localvariable_table_length(); j++) {
+      if (elem->signature_cp_index > 0) {
+        // Local variable has a generic signature - write LVTT attribute entry
+        write_u2(elem->start_bci);
+        write_u2(elem->length);
+        write_u2(elem->name_cp_index);
+        write_u2(elem->signature_cp_index);
+        write_u2(elem->slot);
+        num_entries--;
+      }
+      elem++;
+    }
+    assert(num_entries == 0, "just checking");
+}
+
 // Write stack map table attribute
 // JSR-202|   StackMapTable_attribute {
 // JSR-202|     u2 attribute_name_index;
diff --git a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.hpp b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.hpp
index 0904d17fab9..365bcd756f8 100644
--- a/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.hpp
+++ b/hotspot/src/share/vm/prims/jvmtiClassFileReconstituter.hpp
@@ -120,6 +120,7 @@ class JvmtiClassFileReconstituter : public JvmtiConstantPoolReconstituter {
   u2 line_number_table_entries(methodHandle method);
   void write_line_number_table_attribute(methodHandle method, u2 num_entries);
   void write_local_variable_table_attribute(methodHandle method, u2 num_entries);
+  void write_local_variable_type_table_attribute(methodHandle method, u2 num_entries);
   void write_stackmap_table_attribute(methodHandle method, int stackmap_table_len);
   u2 inner_classes_attribute_length();
   void write_inner_classes_attribute(int length);
diff --git a/hotspot/src/share/vm/prims/jvmtiCodeBlobEvents.cpp b/hotspot/src/share/vm/prims/jvmtiCodeBlobEvents.cpp
index 3a9a4ea1c55..c46afdc1074 100644
--- a/hotspot/src/share/vm/prims/jvmtiCodeBlobEvents.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiCodeBlobEvents.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/prims/jvmtiEnter.xsl b/hotspot/src/share/vm/prims/jvmtiEnter.xsl
index 6b867e676da..a1d128b1377 100644
--- a/hotspot/src/share/vm/prims/jvmtiEnter.xsl
+++ b/hotspot/src/share/vm/prims/jvmtiEnter.xsl
@@ -1,6 +1,6 @@
 <?xml version="1.0"?> 
 <!--
- Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 
  This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,8 @@
   <xsl:call-template name="sourceHeader"/>
   <xsl:text>
 # include "precompiled.hpp"
+# include "utilities/macros.hpp"
+#if INCLUDE_JVMTI
 # include "prims/jvmtiEnter.hpp"
 # include "prims/jvmtiRawMonitor.hpp"
 # include "prims/jvmtiUtil.hpp"
@@ -247,6 +249,7 @@ struct jvmtiInterface_1_ jvmti</xsl:text>
 
   <xsl:text>
 };
+#endif // INCLUDE_JVMTI
 </xsl:text>
 </xsl:template>
 
@@ -469,7 +472,7 @@ static jvmtiError JNICALL
 </xsl:text>
 
   <xsl:if test="not(contains(@jkernel,'yes'))">
-  <xsl:text>&#xA;#ifdef JVMTI_KERNEL &#xA;</xsl:text>
+  <xsl:text>&#xA;#if !INCLUDE_JVMTI &#xA;</xsl:text>
   <xsl:text>  return JVMTI_ERROR_NOT_AVAILABLE; &#xA;</xsl:text>
   <xsl:text>#else &#xA;</xsl:text>
   </xsl:if>
@@ -596,7 +599,7 @@ static jvmtiError JNICALL
 </xsl:text>
 
   <xsl:if test="not(contains(@jkernel,'yes'))">
-  <xsl:text>#endif // JVMTI_KERNEL&#xA;</xsl:text>
+  <xsl:text>#endif // INCLUDE_JVMTI&#xA;</xsl:text>
   </xsl:if>
 
   <xsl:text>}&#xA;</xsl:text>
diff --git a/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp b/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp
index 669b7d511d0..6150c944eb1 100644
--- a/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp
+++ b/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp
@@ -56,7 +56,9 @@ class JvmtiEnvBase : public CHeapObj<mtInternal> {
 
  private:
 
+#if INCLUDE_JVMTI
   static JvmtiEnvBase*     _head_environment;  // head of environment list
+#endif // INCLUDE_JVMTI
 
   static bool              _globally_initialized;
   static jvmtiPhase        _phase;
@@ -129,7 +131,10 @@ class JvmtiEnvBase : public CHeapObj<mtInternal> {
   friend class JvmtiEnvIterator;
   JvmtiEnv* next_environment()                     { return (JvmtiEnv*)_next; }
   void set_next_environment(JvmtiEnvBase* env)     { _next = env; }
-  static JvmtiEnv* head_environment()              { return (JvmtiEnv*)_head_environment; }
+  static JvmtiEnv* head_environment()              {
+    JVMTI_ONLY(return (JvmtiEnv*)_head_environment);
+    NOT_JVMTI(return NULL);
+  }
 
  public:
 
diff --git a/hotspot/src/share/vm/prims/jvmtiExport.hpp b/hotspot/src/share/vm/prims/jvmtiExport.hpp
index 31581a766a3..7dcab683149 100644
--- a/hotspot/src/share/vm/prims/jvmtiExport.hpp
+++ b/hotspot/src/share/vm/prims/jvmtiExport.hpp
@@ -46,21 +46,18 @@ class JvmtiEnv;
 class JvmtiThreadState;
 class AttachOperation;
 
-#ifndef JVMTI_KERNEL
-#define JVMTI_SUPPORT_FLAG(key)                                         \
-  private:                                                              \
-  static bool  _##key;                                                  \
-  public:                                                               \
-  inline static void set_##key(bool on)       { _##key = (on != 0); }   \
-  inline static bool key()                    { return _##key; }
-#else  // JVMTI_KERNEL
 #define JVMTI_SUPPORT_FLAG(key)                                           \
   private:                                                                \
-  const static bool _##key = false;                                       \
+  static bool  _##key;                                                    \
   public:                                                                 \
-  inline static void set_##key(bool on)       { report_unsupported(on); } \
-  inline static bool key()                    { return _##key; }
-#endif // JVMTI_KERNEL
+  inline static void set_##key(bool on) {                                 \
+    JVMTI_ONLY(_##key = (on != 0));                                       \
+    NOT_JVMTI(report_unsupported(on));                                    \
+  }                                                                       \
+  inline static bool key() {                                              \
+    JVMTI_ONLY(return _##key);                                            \
+    NOT_JVMTI(return false);                                              \
+  }
 
 
 // This class contains the JVMTI interface for the rest of hotspot.
@@ -68,6 +65,8 @@ class AttachOperation;
 class JvmtiExport : public AllStatic {
   friend class VMStructs;
  private:
+
+#if INCLUDE_JVMTI
   static int         _field_access_count;
   static int         _field_modification_count;
 
@@ -75,6 +74,7 @@ class JvmtiExport : public AllStatic {
   static bool        _can_hotswap_or_post_breakpoint;
   static bool        _can_modify_any_class;
   static bool        _can_walk_any_space;
+#endif // INCLUDE_JVMTI
 
   JVMTI_SUPPORT_FLAG(can_get_source_debug_extension)
   JVMTI_SUPPORT_FLAG(can_maintain_original_method_order)
@@ -125,10 +125,18 @@ class JvmtiExport : public AllStatic {
 
   // these should only be called by the friend class
   friend class JvmtiManageCapabilities;
-  inline static void set_can_modify_any_class(bool on)                 { _can_modify_any_class = (on != 0); }
-  inline static void set_can_access_local_variables(bool on)           { _can_access_local_variables = (on != 0); }
-  inline static void set_can_hotswap_or_post_breakpoint(bool on)       { _can_hotswap_or_post_breakpoint = (on != 0); }
-  inline static void set_can_walk_any_space(bool on)                   { _can_walk_any_space = (on != 0); }
+  inline static void set_can_modify_any_class(bool on) {
+    JVMTI_ONLY(_can_modify_any_class = (on != 0);)
+  }
+  inline static void set_can_access_local_variables(bool on) {
+    JVMTI_ONLY(_can_access_local_variables = (on != 0);)
+  }
+  inline static void set_can_hotswap_or_post_breakpoint(bool on) {
+    JVMTI_ONLY(_can_hotswap_or_post_breakpoint = (on != 0);)
+  }
+  inline static void set_can_walk_any_space(bool on) {
+    JVMTI_ONLY(_can_walk_any_space = (on != 0);)
+  }
 
   enum {
     JVMTI_VERSION_MASK   = 0x70000000,
@@ -144,7 +152,7 @@ class JvmtiExport : public AllStatic {
   // posts a DynamicCodeGenerated event (internal/private implementation).
   // The public post_dynamic_code_generated* functions make use of the
   // internal implementation.  Also called from JvmtiDeferredEvent::post()
-  static void post_dynamic_code_generated_internal(const char *name, const void *code_begin, const void *code_end) KERNEL_RETURN;
+  static void post_dynamic_code_generated_internal(const char *name, const void *code_begin, const void *code_end) NOT_JVMTI_RETURN;
 
  private:
 
@@ -154,9 +162,9 @@ class JvmtiExport : public AllStatic {
 
   static void post_compiled_method_load(JvmtiEnv* env, const jmethodID method, const jint length,
                                         const void *code_begin, const jint map_length,
-                                        const jvmtiAddrLocationMap* map) KERNEL_RETURN;
+                                        const jvmtiAddrLocationMap* map) NOT_JVMTI_RETURN;
   static void post_dynamic_code_generated(JvmtiEnv* env, const char *name, const void *code_begin,
-                                          const void *code_end) KERNEL_RETURN;
+                                          const void *code_end) NOT_JVMTI_RETURN;
 
   // The RedefineClasses() API breaks some invariants in the "regular"
   // system. For example, there are sanity checks when GC'ing nmethods
@@ -178,9 +186,8 @@ class JvmtiExport : public AllStatic {
   static bool _has_redefined_a_class;
   friend class VM_RedefineClasses;
   inline static void set_has_redefined_a_class() {
-    _has_redefined_a_class = true;
+    JVMTI_ONLY(_has_redefined_a_class = true;)
   }
-
   // Flag to indicate if the compiler has recorded all dependencies. When the
   // can_redefine_classes capability is enabled in the OnLoad phase then the compiler
   // records all dependencies from startup. However if the capability is first
@@ -191,7 +198,8 @@ class JvmtiExport : public AllStatic {
 
  public:
   inline static bool has_redefined_a_class() {
-    return _has_redefined_a_class;
+    JVMTI_ONLY(return _has_redefined_a_class);
+    NOT_JVMTI(return false);
   }
 
   inline static bool all_dependencies_are_recorded() {
@@ -204,120 +212,141 @@ class JvmtiExport : public AllStatic {
 
 
   // let JVMTI know that the JVM_OnLoad code is running
-  static void enter_onload_phase();
+  static void enter_onload_phase() NOT_JVMTI_RETURN;
 
   // let JVMTI know that the VM isn't up yet (and JVM_OnLoad code isn't running)
-  static void enter_primordial_phase();
+  static void enter_primordial_phase() NOT_JVMTI_RETURN;
 
   // let JVMTI know that the VM isn't up yet but JNI is live
-  static void enter_start_phase();
+  static void enter_start_phase() NOT_JVMTI_RETURN;
 
   // let JVMTI know that the VM is fully up and running now
-  static void enter_live_phase();
+  static void enter_live_phase() NOT_JVMTI_RETURN;
 
   // ------ can_* conditions (below) are set at OnLoad and never changed ------------
-  inline static bool can_modify_any_class()                       { return _can_modify_any_class; }
-  inline static bool can_access_local_variables()                 { return _can_access_local_variables; }
-  inline static bool can_hotswap_or_post_breakpoint()             { return _can_hotswap_or_post_breakpoint; }
-  inline static bool can_walk_any_space()                         { return _can_walk_any_space; }
+  inline static bool can_modify_any_class()                       {
+    JVMTI_ONLY(return _can_modify_any_class);
+    NOT_JVMTI(return false);
+  }
+  inline static bool can_access_local_variables()                 {
+    JVMTI_ONLY(return _can_access_local_variables);
+    NOT_JVMTI(return false);
+  }
+  inline static bool can_hotswap_or_post_breakpoint()             {
+    JVMTI_ONLY(return _can_hotswap_or_post_breakpoint);
+    NOT_JVMTI(return false);
+  }
+  inline static bool can_walk_any_space()                         {
+    JVMTI_ONLY(return _can_walk_any_space);
+    NOT_JVMTI(return false);
+  }
 
   // field access management
-  static address  get_field_access_count_addr();
+  static address  get_field_access_count_addr() NOT_JVMTI_RETURN_(0);
 
   // field modification management
-  static address  get_field_modification_count_addr();
+  static address  get_field_modification_count_addr() NOT_JVMTI_RETURN_(0);
 
   // -----------------
 
-  static bool is_jvmti_version(jint version)                      { return (version & JVMTI_VERSION_MASK) == JVMTI_VERSION_VALUE; }
-  static bool is_jvmdi_version(jint version)                      { return (version & JVMTI_VERSION_MASK) == JVMDI_VERSION_VALUE; }
-  static jint get_jvmti_interface(JavaVM *jvm, void **penv, jint version);
+  static bool is_jvmti_version(jint version)                      {
+    JVMTI_ONLY(return (version & JVMTI_VERSION_MASK) == JVMTI_VERSION_VALUE);
+    NOT_JVMTI(return false);
+  }
+  static bool is_jvmdi_version(jint version)                      {
+    JVMTI_ONLY(return (version & JVMTI_VERSION_MASK) == JVMDI_VERSION_VALUE);
+    NOT_JVMTI(return false);
+  }
+  static jint get_jvmti_interface(JavaVM *jvm, void **penv, jint version) NOT_JVMTI_RETURN_(0);
   static void decode_version_values(jint version, int * major, int * minor,
-                                    int * micro);
+                                    int * micro) NOT_JVMTI_RETURN;
 
   // single stepping management methods
-  static void at_single_stepping_point(JavaThread *thread, Method* method, address location) KERNEL_RETURN;
-  static void expose_single_stepping(JavaThread *thread) KERNEL_RETURN;
-  static bool hide_single_stepping(JavaThread *thread) KERNEL_RETURN_(false);
+  static void at_single_stepping_point(JavaThread *thread, Method* method, address location) NOT_JVMTI_RETURN;
+  static void expose_single_stepping(JavaThread *thread) NOT_JVMTI_RETURN;
+  static bool hide_single_stepping(JavaThread *thread) NOT_JVMTI_RETURN_(false);
 
   // Methods that notify the debugger that something interesting has happened in the VM.
-  static void post_vm_start              ();
-  static void post_vm_initialized        ();
-  static void post_vm_death              ();
+  static void post_vm_start              () NOT_JVMTI_RETURN;
+  static void post_vm_initialized        () NOT_JVMTI_RETURN;
+  static void post_vm_death              () NOT_JVMTI_RETURN;
 
-  static void post_single_step           (JavaThread *thread, Method* method, address location) KERNEL_RETURN;
-  static void post_raw_breakpoint        (JavaThread *thread, Method* method, address location) KERNEL_RETURN;
+  static void post_single_step           (JavaThread *thread, Method* method, address location) NOT_JVMTI_RETURN;
+  static void post_raw_breakpoint        (JavaThread *thread, Method* method, address location) NOT_JVMTI_RETURN;
 
-  static void post_exception_throw       (JavaThread *thread, Method* method, address location, oop exception) KERNEL_RETURN;
-  static void notice_unwind_due_to_exception (JavaThread *thread, Method* method, address location, oop exception, bool in_handler_frame) KERNEL_RETURN;
+  static void post_exception_throw       (JavaThread *thread, Method* method, address location, oop exception) NOT_JVMTI_RETURN;
+  static void notice_unwind_due_to_exception (JavaThread *thread, Method* method, address location, oop exception, bool in_handler_frame) NOT_JVMTI_RETURN;
 
   static oop jni_GetField_probe          (JavaThread *thread, jobject jobj,
     oop obj, Klass* klass, jfieldID fieldID, bool is_static)
-    KERNEL_RETURN_(NULL);
+    NOT_JVMTI_RETURN_(NULL);
   static oop jni_GetField_probe_nh       (JavaThread *thread, jobject jobj,
     oop obj, Klass* klass, jfieldID fieldID, bool is_static)
-    KERNEL_RETURN_(NULL);
+    NOT_JVMTI_RETURN_(NULL);
   static void post_field_access_by_jni   (JavaThread *thread, oop obj,
-    Klass* klass, jfieldID fieldID, bool is_static) KERNEL_RETURN;
+    Klass* klass, jfieldID fieldID, bool is_static) NOT_JVMTI_RETURN;
   static void post_field_access          (JavaThread *thread, Method* method,
-    address location, KlassHandle field_klass, Handle object, jfieldID field) KERNEL_RETURN;
+    address location, KlassHandle field_klass, Handle object, jfieldID field) NOT_JVMTI_RETURN;
   static oop jni_SetField_probe          (JavaThread *thread, jobject jobj,
     oop obj, Klass* klass, jfieldID fieldID, bool is_static, char sig_type,
-    jvalue *value) KERNEL_RETURN_(NULL);
+    jvalue *value) NOT_JVMTI_RETURN_(NULL);
   static oop jni_SetField_probe_nh       (JavaThread *thread, jobject jobj,
     oop obj, Klass* klass, jfieldID fieldID, bool is_static, char sig_type,
-    jvalue *value) KERNEL_RETURN_(NULL);
+    jvalue *value) NOT_JVMTI_RETURN_(NULL);
   static void post_field_modification_by_jni(JavaThread *thread, oop obj,
     Klass* klass, jfieldID fieldID, bool is_static, char sig_type,
     jvalue *value);
   static void post_raw_field_modification(JavaThread *thread, Method* method,
     address location, KlassHandle field_klass, Handle object, jfieldID field,
-    char sig_type, jvalue *value) KERNEL_RETURN;
+    char sig_type, jvalue *value) NOT_JVMTI_RETURN;
 
-  static void post_method_entry          (JavaThread *thread, Method* method, frame current_frame) KERNEL_RETURN;
-  static void post_method_exit           (JavaThread *thread, Method* method, frame current_frame) KERNEL_RETURN;
+  static void post_method_entry          (JavaThread *thread, Method* method, frame current_frame) NOT_JVMTI_RETURN;
+  static void post_method_exit           (JavaThread *thread, Method* method, frame current_frame) NOT_JVMTI_RETURN;
 
-  static void post_class_load            (JavaThread *thread, Klass* klass) KERNEL_RETURN;
-  static void post_class_unload          (Klass* klass) KERNEL_RETURN;
-  static void post_class_prepare         (JavaThread *thread, Klass* klass) KERNEL_RETURN;
+  static void post_class_load            (JavaThread *thread, Klass* klass) NOT_JVMTI_RETURN;
+  static void post_class_unload          (Klass* klass) NOT_JVMTI_RETURN;
+  static void post_class_prepare         (JavaThread *thread, Klass* klass) NOT_JVMTI_RETURN;
 
-  static void post_thread_start          (JavaThread *thread) KERNEL_RETURN;
-  static void post_thread_end            (JavaThread *thread) KERNEL_RETURN;
+  static void post_thread_start          (JavaThread *thread) NOT_JVMTI_RETURN;
+  static void post_thread_end            (JavaThread *thread) NOT_JVMTI_RETURN;
 
   // Support for java.lang.instrument agent loading.
   static bool _should_post_class_file_load_hook;
   inline static void set_should_post_class_file_load_hook(bool on)     { _should_post_class_file_load_hook = on;  }
-  inline static bool should_post_class_file_load_hook()           { return _should_post_class_file_load_hook; }
+  inline static bool should_post_class_file_load_hook()           {
+    JVMTI_ONLY(return _should_post_class_file_load_hook);
+    NOT_JVMTI(return false;)
+  }
   static void post_class_file_load_hook(Symbol* h_name, Handle class_loader,
                                         Handle h_protection_domain,
                                         unsigned char **data_ptr, unsigned char **end_ptr,
                                         unsigned char **cached_data_ptr,
-                                        jint *cached_length_ptr);
-  static void post_native_method_bind(Method* method, address* function_ptr) KERNEL_RETURN;
-  static void post_compiled_method_load(nmethod *nm) KERNEL_RETURN;
-  static void post_dynamic_code_generated(const char *name, const void *code_begin, const void *code_end) KERNEL_RETURN;
+                                        jint *cached_length_ptr) NOT_JVMTI_RETURN;
+  static void post_native_method_bind(Method* method, address* function_ptr) NOT_JVMTI_RETURN;
+  static void post_compiled_method_load(nmethod *nm) NOT_JVMTI_RETURN;
+  static void post_dynamic_code_generated(const char *name, const void *code_begin, const void *code_end) NOT_JVMTI_RETURN;
 
   // used to post a CompiledMethodUnload event
-  static void post_compiled_method_unload(jmethodID mid, const void *code_begin) KERNEL_RETURN;
+  static void post_compiled_method_unload(jmethodID mid, const void *code_begin) NOT_JVMTI_RETURN;
 
   // similiar to post_dynamic_code_generated except that it can be used to
   // post a DynamicCodeGenerated event while holding locks in the VM. Any event
   // posted using this function is recorded by the enclosing event collector
   // -- JvmtiDynamicCodeEventCollector.
-  static void post_dynamic_code_generated_while_holding_locks(const char* name, address code_begin, address code_end) KERNEL_RETURN;
+  static void post_dynamic_code_generated_while_holding_locks(const char* name, address code_begin, address code_end) NOT_JVMTI_RETURN;
 
-  static void post_garbage_collection_finish() KERNEL_RETURN;
-  static void post_garbage_collection_start() KERNEL_RETURN;
-  static void post_data_dump() KERNEL_RETURN;
-  static void post_monitor_contended_enter(JavaThread *thread, ObjectMonitor *obj_mntr) KERNEL_RETURN;
-  static void post_monitor_contended_entered(JavaThread *thread, ObjectMonitor *obj_mntr) KERNEL_RETURN;
-  static void post_monitor_wait(JavaThread *thread, oop obj, jlong timeout) KERNEL_RETURN;
-  static void post_monitor_waited(JavaThread *thread, ObjectMonitor *obj_mntr, jboolean timed_out) KERNEL_RETURN;
-  static void post_object_free(JvmtiEnv* env, jlong tag) KERNEL_RETURN;
-  static void post_resource_exhausted(jint resource_exhausted_flags, const char* detail) KERNEL_RETURN;
-  static void record_vm_internal_object_allocation(oop object) KERNEL_RETURN;
+  static void post_garbage_collection_finish() NOT_JVMTI_RETURN;
+  static void post_garbage_collection_start() NOT_JVMTI_RETURN;
+  static void post_data_dump() NOT_JVMTI_RETURN;
+  static void post_monitor_contended_enter(JavaThread *thread, ObjectMonitor *obj_mntr) NOT_JVMTI_RETURN;
+  static void post_monitor_contended_entered(JavaThread *thread, ObjectMonitor *obj_mntr) NOT_JVMTI_RETURN;
+  static void post_monitor_wait(JavaThread *thread, oop obj, jlong timeout) NOT_JVMTI_RETURN;
+  static void post_monitor_waited(JavaThread *thread, ObjectMonitor *obj_mntr, jboolean timed_out) NOT_JVMTI_RETURN;
+  static void post_object_free(JvmtiEnv* env, jlong tag) NOT_JVMTI_RETURN;
+  static void post_resource_exhausted(jint resource_exhausted_flags, const char* detail) NOT_JVMTI_RETURN;
+  static void record_vm_internal_object_allocation(oop object) NOT_JVMTI_RETURN;
   // Post objects collected by vm_object_alloc_event_collector.
-  static void post_vm_object_alloc(JavaThread *thread, oop object) KERNEL_RETURN;
+  static void post_vm_object_alloc(JavaThread *thread, oop object) NOT_JVMTI_RETURN;
   // Collects vm internal objects for later event posting.
   inline static void vm_object_alloc_event_collector(oop object) {
     if (should_post_vm_object_alloc()) {
@@ -331,21 +360,19 @@ class JvmtiExport : public AllStatic {
     }
   }
 
-  static void cleanup_thread             (JavaThread* thread) KERNEL_RETURN;
+  static void cleanup_thread             (JavaThread* thread) NOT_JVMTI_RETURN;
 
-  static void oops_do(OopClosure* f) KERNEL_RETURN;
-  static void weak_oops_do(BoolObjectClosure* b, OopClosure* f) KERNEL_RETURN;
-  static void gc_epilogue() KERNEL_RETURN;
+  static void oops_do(OopClosure* f) NOT_JVMTI_RETURN;
+  static void weak_oops_do(BoolObjectClosure* b, OopClosure* f) NOT_JVMTI_RETURN;
+  static void gc_epilogue() NOT_JVMTI_RETURN;
 
-  static void transition_pending_onload_raw_monitors() KERNEL_RETURN;
+  static void transition_pending_onload_raw_monitors() NOT_JVMTI_RETURN;
 
-#ifndef SERVICES_KERNEL
   // attach support
-  static jint load_agent_library(AttachOperation* op, outputStream* out);
-#endif // SERVICES_KERNEL
+  static jint load_agent_library(AttachOperation* op, outputStream* out) NOT_JVMTI_RETURN_(JNI_ERR);
 
   // SetNativeMethodPrefix support
-  static char** get_all_native_method_prefixes(int* count_ptr);
+  static char** get_all_native_method_prefixes(int* count_ptr) NOT_JVMTI_RETURN_(NULL);
 };
 
 // Support class used by JvmtiDynamicCodeEventCollector and others. It
@@ -408,8 +435,8 @@ class JvmtiDynamicCodeEventCollector : public JvmtiEventCollector {
   void register_stub(const char* name, address start, address end);
 
  public:
-  JvmtiDynamicCodeEventCollector()  KERNEL_RETURN;
-  ~JvmtiDynamicCodeEventCollector() KERNEL_RETURN;
+  JvmtiDynamicCodeEventCollector()  NOT_JVMTI_RETURN;
+  ~JvmtiDynamicCodeEventCollector() NOT_JVMTI_RETURN;
   bool is_dynamic_code_event()   { return true; }
 
 };
@@ -441,8 +468,8 @@ class JvmtiVMObjectAllocEventCollector : public JvmtiEventCollector {
   static void oops_do_for_all_threads(OopClosure* f);
 
  public:
-  JvmtiVMObjectAllocEventCollector()  KERNEL_RETURN;
-  ~JvmtiVMObjectAllocEventCollector() KERNEL_RETURN;
+  JvmtiVMObjectAllocEventCollector()  NOT_JVMTI_RETURN;
+  ~JvmtiVMObjectAllocEventCollector() NOT_JVMTI_RETURN;
   bool is_vm_object_alloc_event()   { return true; }
 
   bool is_enabled()                 { return _enable; }
@@ -472,16 +499,16 @@ class NoJvmtiVMObjectAllocMark : public StackObj {
   bool was_enabled()    { return _collector != NULL; }
 
  public:
-  NoJvmtiVMObjectAllocMark() KERNEL_RETURN;
-  ~NoJvmtiVMObjectAllocMark() KERNEL_RETURN;
+  NoJvmtiVMObjectAllocMark() NOT_JVMTI_RETURN;
+  ~NoJvmtiVMObjectAllocMark() NOT_JVMTI_RETURN;
 };
 
 
 // Base class for reporting GC events to JVMTI.
 class JvmtiGCMarker : public StackObj {
  public:
-  JvmtiGCMarker() KERNEL_RETURN;
-  ~JvmtiGCMarker() KERNEL_RETURN;
+  JvmtiGCMarker() NOT_JVMTI_RETURN;
+  ~JvmtiGCMarker() NOT_JVMTI_RETURN;
 };
 
 // JvmtiHideSingleStepping is a helper class for hiding
diff --git a/hotspot/src/share/vm/prims/jvmtiExtensions.cpp b/hotspot/src/share/vm/prims/jvmtiExtensions.cpp
index 9f6a1b101ec..15f61b70bf9 100644
--- a/hotspot/src/share/vm/prims/jvmtiExtensions.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiExtensions.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/prims/jvmtiImpl.hpp b/hotspot/src/share/vm/prims/jvmtiImpl.hpp
index d91fa9c9e76..d785930be0d 100644
--- a/hotspot/src/share/vm/prims/jvmtiImpl.hpp
+++ b/hotspot/src/share/vm/prims/jvmtiImpl.hpp
@@ -481,15 +481,15 @@ class JvmtiDeferredEvent VALUE_OBJ_CLASS_SPEC {
 
   // Factory methods
   static JvmtiDeferredEvent compiled_method_load_event(nmethod* nm)
-    KERNEL_RETURN_(JvmtiDeferredEvent());
+    NOT_JVMTI_RETURN_(JvmtiDeferredEvent());
   static JvmtiDeferredEvent compiled_method_unload_event(nmethod* nm,
-      jmethodID id, const void* code) KERNEL_RETURN_(JvmtiDeferredEvent());
+      jmethodID id, const void* code) NOT_JVMTI_RETURN_(JvmtiDeferredEvent());
   static JvmtiDeferredEvent dynamic_code_generated_event(
       const char* name, const void* begin, const void* end)
-          KERNEL_RETURN_(JvmtiDeferredEvent());
+          NOT_JVMTI_RETURN_(JvmtiDeferredEvent());
 
   // Actually posts the event.
-  void post() KERNEL_RETURN;
+  void post() NOT_JVMTI_RETURN;
 };
 
 /**
@@ -520,13 +520,13 @@ class JvmtiDeferredEventQueue : AllStatic {
   static volatile QueueNode* _pending_list;  // Uses CAS for read/update
 
   // Transfers events from the _pending_list to the _queue.
-  static void process_pending_events() KERNEL_RETURN;
+  static void process_pending_events() NOT_JVMTI_RETURN;
 
  public:
   // Must be holding Service_lock when calling these
-  static bool has_events() KERNEL_RETURN_(false);
-  static void enqueue(const JvmtiDeferredEvent& event) KERNEL_RETURN;
-  static JvmtiDeferredEvent dequeue() KERNEL_RETURN_(JvmtiDeferredEvent());
+  static bool has_events() NOT_JVMTI_RETURN_(false);
+  static void enqueue(const JvmtiDeferredEvent& event) NOT_JVMTI_RETURN;
+  static JvmtiDeferredEvent dequeue() NOT_JVMTI_RETURN_(JvmtiDeferredEvent());
 
   // Used to enqueue events without using a lock, for times (such as during
   // safepoint) when we can't or don't want to lock the Service_lock.
@@ -534,7 +534,7 @@ class JvmtiDeferredEventQueue : AllStatic {
   // Events will be held off to the side until there's a call to
   // dequeue(), enqueue(), or process_pending_events() (all of which require
   // the holding of the Service_lock), and will be enqueued at that time.
-  static void add_pending_event(const JvmtiDeferredEvent&) KERNEL_RETURN;
+  static void add_pending_event(const JvmtiDeferredEvent&) NOT_JVMTI_RETURN;
 };
 
 // Utility macro that checks for NULL pointers:
diff --git a/hotspot/src/share/vm/prims/jvmtiRawMonitor.cpp b/hotspot/src/share/vm/prims/jvmtiRawMonitor.cpp
index 9031bbb290a..12e69b369b0 100644
--- a/hotspot/src/share/vm/prims/jvmtiRawMonitor.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiRawMonitor.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
index ef614ff41af..44be3d5f27b 100644
--- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.cpp
@@ -2606,7 +2606,7 @@ void VM_RedefineClasses::set_new_constant_pool(
 
 
 void VM_RedefineClasses::adjust_array_vtable(Klass* k_oop) {
-  arrayKlass* ak = arrayKlass::cast(k_oop);
+  ArrayKlass* ak = ArrayKlass::cast(k_oop);
   bool trace_name_printed = false;
   ak->vtable()->adjust_method_entries(_matching_old_methods,
                                       _matching_new_methods,
diff --git a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.hpp b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.hpp
index 00381c2afb6..7164413c8fa 100644
--- a/hotspot/src/share/vm/prims/jvmtiRedefineClasses.hpp
+++ b/hotspot/src/share/vm/prims/jvmtiRedefineClasses.hpp
@@ -495,9 +495,9 @@ class VM_RedefineClasses: public VM_Operation {
 class MetadataOnStackMark : public StackObj {
   NOT_PRODUCT(static bool _is_active;)
  public:
-  MetadataOnStackMark();
-  ~MetadataOnStackMark();
-  static void record(Metadata* m);
+  MetadataOnStackMark() NOT_JVMTI_RETURN;
+  ~MetadataOnStackMark() NOT_JVMTI_RETURN;
+  static void record(Metadata* m) NOT_JVMTI_RETURN;
 };
 
 #endif // SHARE_VM_PRIMS_JVMTIREDEFINECLASSES_HPP
diff --git a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp
index cd91a0c8d7f..22871642434 100644
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.cpp
@@ -1075,7 +1075,7 @@ static jint invoke_array_primitive_value_callback(jvmtiArrayPrimitiveValueCallba
 
   // get base address of first element
   typeArrayOop array = typeArrayOop(obj);
-  BasicType type = typeArrayKlass::cast(array->klass())->element_type();
+  BasicType type = TypeArrayKlass::cast(array->klass())->element_type();
   void* elements = array->base(type);
 
   // jvmtiPrimitiveType is defined so this mapping is always correct
@@ -2750,7 +2750,7 @@ inline bool VM_HeapWalkOperation::iterate_over_array(oop o) {
   objArrayOop array = objArrayOop(o);
 
   // array reference to its class
-  oop mirror = objArrayKlass::cast(array->klass())->java_mirror();
+  oop mirror = ObjArrayKlass::cast(array->klass())->java_mirror();
   if (!CallbackInvoker::report_class_reference(o, mirror)) {
     return false;
   }
@@ -2862,9 +2862,8 @@ inline bool VM_HeapWalkOperation::iterate_over_class(oop java_class) {
           oop entry;
           if (tag.is_string()) {
             entry = pool->resolved_string_at(i);
-            // If the entry is non-null it it resolved.
+            // If the entry is non-null it is resolved.
             if (entry == NULL) continue;
-            assert(java_lang_String::is_instance(entry), "must be string");
           } else {
             entry = Klass::cast(pool->resolved_klass_at(i))->java_mirror();
           }
diff --git a/hotspot/src/share/vm/prims/jvmtiTagMap.hpp b/hotspot/src/share/vm/prims/jvmtiTagMap.hpp
index ede639efe7e..6435f6251c7 100644
--- a/hotspot/src/share/vm/prims/jvmtiTagMap.hpp
+++ b/hotspot/src/share/vm/prims/jvmtiTagMap.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -125,7 +125,7 @@ class JvmtiTagMap :  public CHeapObj<mtInternal> {
                                    jlong** tag_result_ptr);
 
   static void weak_oops_do(
-      BoolObjectClosure* is_alive, OopClosure* f) KERNEL_RETURN;
+      BoolObjectClosure* is_alive, OopClosure* f) NOT_JVMTI_RETURN;
 };
 
 #endif // SHARE_VM_PRIMS_JVMTITAGMAP_HPP
diff --git a/hotspot/src/share/vm/prims/jvmtiThreadState.hpp b/hotspot/src/share/vm/prims/jvmtiThreadState.hpp
index c2aff2c9250..b72d4952afc 100644
--- a/hotspot/src/share/vm/prims/jvmtiThreadState.hpp
+++ b/hotspot/src/share/vm/prims/jvmtiThreadState.hpp
@@ -391,7 +391,7 @@ class JvmtiThreadState : public CHeapObj<mtInternal> {
   static ByteSize earlyret_oop_offset()   { return byte_offset_of(JvmtiThreadState, _earlyret_oop); }
   static ByteSize earlyret_value_offset() { return byte_offset_of(JvmtiThreadState, _earlyret_value); }
 
-  void oops_do(OopClosure* f); // GC support
+  void oops_do(OopClosure* f) NOT_JVMTI_RETURN; // GC support
 
 public:
   void set_should_post_on_exceptions(bool val) { _thread->set_should_post_on_exceptions_flag(val ? JNI_TRUE : JNI_FALSE); }
diff --git a/hotspot/src/share/vm/prims/jvmtiUtil.cpp b/hotspot/src/share/vm/prims/jvmtiUtil.cpp
index 425ca1d9803..0ae652ba6e0 100644
--- a/hotspot/src/share/vm/prims/jvmtiUtil.cpp
+++ b/hotspot/src/share/vm/prims/jvmtiUtil.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/prims/methodHandles.cpp b/hotspot/src/share/vm/prims/methodHandles.cpp
index 98d379b671f..bd587439b1a 100644
--- a/hotspot/src/share/vm/prims/methodHandles.cpp
+++ b/hotspot/src/share/vm/prims/methodHandles.cpp
@@ -563,15 +563,6 @@ static oop field_signature_type_or_null(Symbol* s) {
       return Klass::cast(SystemDictionary::Class_klass())->java_mirror();
     } else if (s == vmSymbols::string_signature()) {
       return Klass::cast(SystemDictionary::String_klass())->java_mirror();
-    } else {
-      int len = s->utf8_length();
-      if (s->byte_at(0) == 'L' && s->byte_at(len-1) == ';') {
-        TempNewSymbol cname = SymbolTable::probe((const char*)&s->bytes()[1], len-2);
-        if (cname == NULL)  return NULL;
-        Klass* wkk = SystemDictionary::find_well_known_klass(cname);
-        if (wkk == NULL)  return NULL;
-        return Klass::cast(wkk)->java_mirror();
-      }
     }
   }
   return NULL;
diff --git a/hotspot/src/share/vm/prims/methodHandles.hpp b/hotspot/src/share/vm/prims/methodHandles.hpp
index 9b77b413f74..2e45bac1c60 100644
--- a/hotspot/src/share/vm/prims/methodHandles.hpp
+++ b/hotspot/src/share/vm/prims/methodHandles.hpp
@@ -196,7 +196,27 @@ public:
 # include "methodHandles_ppc.hpp"
 #endif
 
-
+  // Tracing
+  static void trace_method_handle(MacroAssembler* _masm, const char* adaptername) PRODUCT_RETURN;
+  static void trace_method_handle_interpreter_entry(MacroAssembler* _masm, vmIntrinsics::ID iid) {
+    if (TraceMethodHandles) {
+      const char* name = vmIntrinsics::name_at(iid);
+      if (*name == '_')  name += 1;
+      const size_t len = strlen(name) + 50;
+      char* qname = NEW_C_HEAP_ARRAY(char, len, mtInternal);
+      const char* suffix = "";
+      if (is_signature_polymorphic(iid)) {
+        if (is_signature_polymorphic_static(iid))
+          suffix = "/static";
+        else
+          suffix = "/private";
+      }
+      jio_snprintf(qname, len, "MethodHandle::interpreter_entry::%s%s", name, suffix);
+      trace_method_handle(_masm, qname);
+      // Note:  Don't free the allocated char array because it's used
+      // during runtime.
+    }
+  }
 };
 
 
diff --git a/hotspot/src/share/vm/prims/nativeLookup.cpp b/hotspot/src/share/vm/prims/nativeLookup.cpp
index daadd1de0e6..54b6ce5eaf4 100644
--- a/hotspot/src/share/vm/prims/nativeLookup.cpp
+++ b/hotspot/src/share/vm/prims/nativeLookup.cpp
@@ -328,6 +328,7 @@ address NativeLookup::lookup_critical_entry(methodHandle method) {
 // native implementation again.
 // See SetNativeMethodPrefix in the JVM TI Spec for more details.
 address NativeLookup::lookup_entry_prefixed(methodHandle method, bool& in_base_library, TRAPS) {
+#if INCLUDE_JVMTI
   ResourceMark rm(THREAD);
 
   int prefix_count;
@@ -358,6 +359,7 @@ address NativeLookup::lookup_entry_prefixed(methodHandle method, bool& in_base_l
       }
     }
   }
+#endif // INCLUDE_JVMTI
   return NULL;
 }
 
diff --git a/hotspot/src/share/vm/prims/unsafe.cpp b/hotspot/src/share/vm/prims/unsafe.cpp
index c91a827e581..051c85975e1 100644
--- a/hotspot/src/share/vm/prims/unsafe.cpp
+++ b/hotspot/src/share/vm/prims/unsafe.cpp
@@ -802,7 +802,7 @@ static void getBaseAndScale(int& base, int& scale, jclass acls, TRAPS) {
     base  = arrayOopDesc::base_offset_in_bytes(T_OBJECT);
     scale = heapOopSize;
   } else if (k->oop_is_typeArray()) {
-    typeArrayKlass* tak = typeArrayKlass::cast(k);
+    TypeArrayKlass* tak = TypeArrayKlass::cast(k);
     base  = tak->array_header_in_bytes();
     assert(base == arrayOopDesc::base_offset_in_bytes(tak->element_type()), "array_header_size semantics ok");
     scale = (1 << tak->log2_element_size());
diff --git a/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp b/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp
index 9f4135f9246..ce5804a6052 100644
--- a/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp
+++ b/hotspot/src/share/vm/runtime/advancedThresholdPolicy.cpp
@@ -30,12 +30,12 @@
 // Print an event.
 void AdvancedThresholdPolicy::print_specific(EventType type, methodHandle mh, methodHandle imh,
                                              int bci, CompLevel level) {
-  tty->print(" rate: ");
+  tty->print(" rate=");
   if (mh->prev_time() == 0) tty->print("n/a");
   else tty->print("%f", mh->rate());
 
-  tty->print(" k: %.2lf,%.2lf", threshold_scale(CompLevel_full_profile, Tier3LoadFeedback),
-                                threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback));
+  tty->print(" k=%.2lf,%.2lf", threshold_scale(CompLevel_full_profile, Tier3LoadFeedback),
+                               threshold_scale(CompLevel_full_optimization, Tier4LoadFeedback));
 
 }
 
@@ -156,7 +156,7 @@ bool AdvancedThresholdPolicy::is_method_profiled(Method* method) {
 // Called with the queue locked and with at least one element
 CompileTask* AdvancedThresholdPolicy::select_task(CompileQueue* compile_queue) {
   CompileTask *max_task = NULL;
-  Method* max_method;
+  Method* max_method = NULL;
   jlong t = os::javaTimeMillis();
   // Iterate through the queue and find a method with a maximum rate.
   for (CompileTask* task = compile_queue->first(); task != NULL;) {
diff --git a/hotspot/src/share/vm/runtime/arguments.cpp b/hotspot/src/share/vm/runtime/arguments.cpp
index 6c8d94dc362..3869f1ff8b1 100644
--- a/hotspot/src/share/vm/runtime/arguments.cpp
+++ b/hotspot/src/share/vm/runtime/arguments.cpp
@@ -1066,7 +1066,7 @@ void Arguments::set_tiered_flags() {
   }
 }
 
-#ifndef KERNEL
+#if INCLUDE_ALTERNATE_GCS
 static void disable_adaptive_size_policy(const char* collector_name) {
   if (UseAdaptiveSizePolicy) {
     if (FLAG_IS_CMDLINE(UseAdaptiveSizePolicy)) {
@@ -1112,7 +1112,7 @@ void Arguments::set_parnew_gc_flags() {
     // AlwaysTenure flag should make ParNew promote all at first collection.
     // See CR 6362902.
     if (AlwaysTenure) {
-      FLAG_SET_CMDLINE(intx, MaxTenuringThreshold, 0);
+      FLAG_SET_CMDLINE(uintx, MaxTenuringThreshold, 0);
     }
     // When using compressed oops, we use local overflow stacks,
     // rather than using a global overflow list chained through
@@ -1141,7 +1141,7 @@ void Arguments::set_cms_and_parnew_gc_flags() {
     FLAG_SET_ERGO(bool, UseParNewGC, true);
   }
 
-  // Turn off AdaptiveSizePolicy for CMS until it is complete.
+  // Turn off AdaptiveSizePolicy by default for cms until it is complete.
   disable_adaptive_size_policy("UseConcMarkSweepGC");
 
   // In either case, adjust ParallelGCThreads and/or UseParNewGC
@@ -1231,7 +1231,7 @@ void Arguments::set_cms_and_parnew_gc_flags() {
   // promote all objects surviving "tenuring_default" scavenges.
   if (FLAG_IS_DEFAULT(MaxTenuringThreshold) &&
       FLAG_IS_DEFAULT(SurvivorRatio)) {
-    FLAG_SET_ERGO(intx, MaxTenuringThreshold, tenuring_default);
+    FLAG_SET_ERGO(uintx, MaxTenuringThreshold, tenuring_default);
   }
   // If we decided above (or user explicitly requested)
   // `promote all' (via MaxTenuringThreshold := 0),
@@ -1283,7 +1283,7 @@ void Arguments::set_cms_and_parnew_gc_flags() {
     tty->print_cr("ConcGCThreads: %u", ConcGCThreads);
   }
 }
-#endif // KERNEL
+#endif // INCLUDE_ALTERNATE_GCS
 
 void set_object_alignment() {
   // Object alignment.
@@ -1300,10 +1300,10 @@ void set_object_alignment() {
   // Oop encoding heap max
   OopEncodingHeapMax = (uint64_t(max_juint) + 1) << LogMinObjAlignmentInBytes;
 
-#ifndef KERNEL
+#if INCLUDE_ALTERNATE_GCS
   // Set CMS global values
   CompactibleFreeListSpace::set_cms_values();
-#endif // KERNEL
+#endif // INCLUDE_ALTERNATE_GCS
 }
 
 bool verify_object_alignment() {
@@ -1423,10 +1423,9 @@ void Arguments::set_ergonomics_flags() {
     FLAG_SET_DEFAULT(UseCompressedKlassPointers, false);
   } else {
     // Turn on UseCompressedKlassPointers too
-    // The compiler is broken for this so turn it on when the compiler is fixed.
-    // if (FLAG_IS_DEFAULT(UseCompressedKlassPointers)) {
-    //   FLAG_SET_ERGO(bool, UseCompressedKlassPointers, true);
-    // }
+    if (FLAG_IS_DEFAULT(UseCompressedKlassPointers)) {
+      FLAG_SET_ERGO(bool, UseCompressedKlassPointers, true);
+    }
     // Set the ClassMetaspaceSize to something that will not need to be
     // expanded, since it cannot be expanded.
     if (UseCompressedKlassPointers && FLAG_IS_DEFAULT(ClassMetaspaceSize)) {
@@ -1991,6 +1990,17 @@ bool Arguments::check_vm_args_consistency() {
   }
 #endif // SPARC
 
+  if (PrintNMTStatistics) {
+#if INCLUDE_NMT
+    if (MemTracker::tracking_level() == MemTracker::NMT_off) {
+#endif // INCLUDE_NMT
+      warning("PrintNMTStatistics is disabled, because native memory tracking is not enabled");
+      PrintNMTStatistics = false;
+#if INCLUDE_NMT
+    }
+#endif
+  }
+
   return status;
 }
 
@@ -2215,12 +2225,12 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args,
           size_t len2 = strlen(pos+1) + 1; // options start after ':'.  Final zero must be copied.
           options = (char*)memcpy(NEW_C_HEAP_ARRAY(char, len2, mtInternal), pos+1, len2);
         }
-#ifdef JVMTI_KERNEL
+#if !INCLUDE_JVMTI
         if ((strcmp(name, "hprof") == 0) || (strcmp(name, "jdwp") == 0)) {
-          warning("profiling and debugging agents are not supported with Kernel VM");
+          warning("profiling and debugging agents are not supported in this VM");
         } else
-#endif // JVMTI_KERNEL
-        add_init_library(name, options);
+#endif // !INCLUDE_JVMTI
+          add_init_library(name, options);
       }
     // -agentlib and -agentpath
     } else if (match_option(option, "-agentlib:", &tail) ||
@@ -2235,20 +2245,24 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args,
         if(pos != NULL) {
           options = strcpy(NEW_C_HEAP_ARRAY(char, strlen(pos + 1) + 1, mtInternal), pos + 1);
         }
-#ifdef JVMTI_KERNEL
+#if !INCLUDE_JVMTI
         if ((strcmp(name, "hprof") == 0) || (strcmp(name, "jdwp") == 0)) {
-          warning("profiling and debugging agents are not supported with Kernel VM");
+          warning("profiling and debugging agents are not supported in this VM");
         } else
-#endif // JVMTI_KERNEL
+#endif // !INCLUDE_JVMTI
         add_init_agent(name, options, is_absolute_path);
 
       }
     // -javaagent
     } else if (match_option(option, "-javaagent:", &tail)) {
+#if !INCLUDE_JVMTI
+      warning("Instrumentation agents are not supported in this VM");
+#else
       if(tail != NULL) {
         char *options = strcpy(NEW_C_HEAP_ARRAY(char, strlen(tail) + 1, mtInternal), tail);
         add_init_agent("instrument", options, false);
       }
+#endif // !INCLUDE_JVMTI
     // -Xnoclassgc
     } else if (match_option(option, "-Xnoclassgc", &tail)) {
       FLAG_SET_CMDLINE(bool, ClassUnloading, false);
@@ -2380,12 +2394,12 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args,
           // EVM option, ignore silently for compatibility
     // -Xprof
     } else if (match_option(option, "-Xprof", &tail)) {
-#ifndef FPROF_KERNEL
+#if INCLUDE_FPROF
       _has_profile = true;
-#else // FPROF_KERNEL
+#else // INCLUDE_FPROF
       // do we have to exit?
-      warning("Kernel VM does not support flat profiling.");
-#endif // FPROF_KERNEL
+      warning("Flat profiling is not supported in this VM.");
+#endif // INCLUDE_FPROF
     // -Xaprof
     } else if (match_option(option, "-Xaprof", &tail)) {
       _has_alloc_profile = true;
@@ -2433,6 +2447,9 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args,
 #if defined(KERNEL)
       vm_exit_during_initialization(
           "Dumping a shared archive is not supported on the Kernel JVM.", NULL);
+#elif !INCLUDE_CDS
+      vm_exit_during_initialization(
+          "Dumping a shared archive is not supported in this VM.", NULL);
 #else
       FLAG_SET_CMDLINE(bool, DumpSharedSpaces, true);
       set_mode_flags(_int);     // Prevent compilation, which creates objects
@@ -2485,7 +2502,11 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args,
     // JNI hooks
     } else if (match_option(option, "-Xcheck", &tail)) {
       if (!strcmp(tail, ":jni")) {
+#if !INCLUDE_JNI_CHECK
+        warning("JNI CHECKING is not supported in this VM");
+#else
         CheckJNICalls = true;
+#endif // INCLUDE_JNI_CHECK
       } else if (is_bad_option(option, args->ignoreUnrecognized,
                                      "check")) {
         return JNI_EINVAL;
@@ -3040,7 +3061,11 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
       vm_exit(0);
     }
     if (match_option(option, "-XX:NativeMemoryTracking", &tail)) {
+#if INCLUDE_NMT
       MemTracker::init_tracking_options(tail);
+#else
+      warning("Native Memory Tracking is not supported in this VM");
+#endif
     }
 
 
@@ -3103,6 +3128,21 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
   UNSUPPORTED_OPTION(UseG1GC, "G1 GC");
 #endif
 
+#if !INCLUDE_ALTERNATE_GCS
+  if (UseParallelGC) {
+    warning("Parallel GC is not supported in this VM.  Using Serial GC.");
+  }
+  if (UseParallelOldGC) {
+    warning("Parallel Old GC is not supported in this VM.  Using Serial GC.");
+  }
+  if (UseConcMarkSweepGC) {
+    warning("Concurrent Mark Sweep GC is not supported in this VM.  Using Serial GC.");
+  }
+  if (UseParNewGC) {
+    warning("Par New GC is not supported in this VM.  Using Serial GC.");
+  }
+#endif // INCLUDE_ALTERNATE_GCS
+
 #ifndef PRODUCT
   if (TraceBytecodesAt != 0) {
     TraceBytecodes = true;
@@ -3151,9 +3191,9 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
 #ifdef SERIALGC
   force_serial_gc();
 #endif // SERIALGC
-#ifdef KERNEL
+#if !INCLUDE_CDS
   no_shared_spaces();
-#endif // KERNEL
+#endif // INCLUDE_CDS
 
   // Set flags based on ergonomics.
   set_ergonomics_flags();
@@ -3175,9 +3215,10 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
     }
   }
 
-#ifndef KERNEL
   // Set heap size based on available physical memory
   set_heap_size();
+
+#if INCLUDE_ALTERNATE_GCS
   // Set per-collector flags
   if (UseParallelGC || UseParallelOldGC) {
     set_parallel_gc_flags();
@@ -3188,7 +3229,7 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
   } else if (UseG1GC) {
     set_g1_gc_flags();
   }
-#endif // KERNEL
+#endif // INCLUDE_ALTERNATE_GCS
 
 #ifdef SERIALGC
   assert(verify_serial_gc_flags(), "SerialGC unset");
diff --git a/hotspot/src/share/vm/runtime/arguments.hpp b/hotspot/src/share/vm/runtime/arguments.hpp
index e78e45c912c..1dbb5eb2221 100644
--- a/hotspot/src/share/vm/runtime/arguments.hpp
+++ b/hotspot/src/share/vm/runtime/arguments.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/runtime/biasedLocking.cpp b/hotspot/src/share/vm/runtime/biasedLocking.cpp
index 469f4619472..3d9c279a2ae 100644
--- a/hotspot/src/share/vm/runtime/biasedLocking.cpp
+++ b/hotspot/src/share/vm/runtime/biasedLocking.cpp
@@ -154,7 +154,7 @@ static BiasedLocking::Condition revoke_bias(oop obj, bool allow_rebias, bool is_
     return BiasedLocking::NOT_BIASED;
   }
 
-  int age = mark->age();
+  uint age = mark->age();
   markOop   biased_prototype = markOopDesc::biased_locking_prototype()->set_age(age);
   markOop unbiased_prototype = markOopDesc::prototype()->set_age(age);
 
diff --git a/hotspot/src/share/vm/runtime/compilationPolicy.cpp b/hotspot/src/share/vm/runtime/compilationPolicy.cpp
index 8689c8c1bd3..940978cf7d9 100644
--- a/hotspot/src/share/vm/runtime/compilationPolicy.cpp
+++ b/hotspot/src/share/vm/runtime/compilationPolicy.cpp
@@ -394,28 +394,27 @@ void NonTieredCompPolicy::trace_osr_request(methodHandle method, nmethod* osr, i
 // SimpleCompPolicy - compile current method
 
 void SimpleCompPolicy::method_invocation_event(methodHandle m, JavaThread* thread) {
-  int hot_count = m->invocation_count();
+  const int comp_level = CompLevel_highest_tier;
+  const int hot_count = m->invocation_count();
   reset_counter_for_invocation_event(m);
   const char* comment = "count";
 
   if (is_compilation_enabled() && can_be_compiled(m)) {
     nmethod* nm = m->code();
     if (nm == NULL ) {
-      const char* comment = "count";
-      CompileBroker::compile_method(m, InvocationEntryBci, CompLevel_highest_tier,
-                                    m, hot_count, comment, thread);
+      CompileBroker::compile_method(m, InvocationEntryBci, comp_level, m, hot_count, comment, thread);
     }
   }
 }
 
 void SimpleCompPolicy::method_back_branch_event(methodHandle m, int bci, JavaThread* thread) {
-  int hot_count = m->backedge_count();
+  const int comp_level = CompLevel_highest_tier;
+  const int hot_count = m->backedge_count();
   const char* comment = "backedge_count";
 
-  if (is_compilation_enabled() && !m->is_not_osr_compilable() && can_be_compiled(m)) {
-    CompileBroker::compile_method(m, bci, CompLevel_highest_tier,
-                                  m, hot_count, comment, thread);
-    NOT_PRODUCT(trace_osr_completion(m->lookup_osr_nmethod_for(bci, CompLevel_highest_tier, true));)
+  if (is_compilation_enabled() && !m->is_not_osr_compilable(comp_level) && can_be_compiled(m)) {
+    CompileBroker::compile_method(m, bci, comp_level, m, hot_count, comment, thread);
+    NOT_PRODUCT(trace_osr_completion(m->lookup_osr_nmethod_for(bci, comp_level, true));)
   }
 }
 // StackWalkCompPolicy - walk up stack to find a suitable method to compile
@@ -426,7 +425,8 @@ const char* StackWalkCompPolicy::_msg = NULL;
 
 // Consider m for compilation
 void StackWalkCompPolicy::method_invocation_event(methodHandle m, JavaThread* thread) {
-  int hot_count = m->invocation_count();
+  const int comp_level = CompLevel_highest_tier;
+  const int hot_count = m->invocation_count();
   reset_counter_for_invocation_event(m);
   const char* comment = "count";
 
@@ -457,20 +457,20 @@ void StackWalkCompPolicy::method_invocation_event(methodHandle m, JavaThread* th
       if (TimeCompilationPolicy) accumulated_time()->stop();
       assert(top != NULL, "findTopInlinableFrame returned null");
       if (TraceCompilationPolicy) top->print();
-      CompileBroker::compile_method(top->top_method(), InvocationEntryBci, CompLevel_highest_tier,
+      CompileBroker::compile_method(top->top_method(), InvocationEntryBci, comp_level,
                                     m, hot_count, comment, thread);
     }
   }
 }
 
 void StackWalkCompPolicy::method_back_branch_event(methodHandle m, int bci, JavaThread* thread) {
-  int hot_count = m->backedge_count();
+  const int comp_level = CompLevel_highest_tier;
+  const int hot_count = m->backedge_count();
   const char* comment = "backedge_count";
 
-  if (is_compilation_enabled() && !m->is_not_osr_compilable() && can_be_compiled(m)) {
-    CompileBroker::compile_method(m, bci, CompLevel_highest_tier, m, hot_count, comment, thread);
-
-    NOT_PRODUCT(trace_osr_completion(m->lookup_osr_nmethod_for(bci, CompLevel_highest_tier, true));)
+  if (is_compilation_enabled() && !m->is_not_osr_compilable(comp_level) && can_be_compiled(m)) {
+    CompileBroker::compile_method(m, bci, comp_level, m, hot_count, comment, thread);
+    NOT_PRODUCT(trace_osr_completion(m->lookup_osr_nmethod_for(bci, comp_level, true));)
   }
 }
 
diff --git a/hotspot/src/share/vm/runtime/deoptimization.cpp b/hotspot/src/share/vm/runtime/deoptimization.cpp
index 4fdd9dedaeb..962b9882762 100644
--- a/hotspot/src/share/vm/runtime/deoptimization.cpp
+++ b/hotspot/src/share/vm/runtime/deoptimization.cpp
@@ -233,6 +233,7 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
         return_value = Handle(thread, result);
         assert(Universe::heap()->is_in_or_null(result), "must be heap pointer");
         if (TraceDeoptimization) {
+          ttyLocker ttyl;
           tty->print_cr("SAVED OOP RESULT " INTPTR_FORMAT " in thread " INTPTR_FORMAT, result, thread);
         }
       }
@@ -493,6 +494,7 @@ Deoptimization::UnrollBlock* Deoptimization::fetch_unroll_info_helper(JavaThread
 
   if (array->frames() > 1) {
     if (VerifyStack && TraceDeoptimization) {
+      ttyLocker ttyl;
       tty->print_cr("Deoptimizing method containing inlining");
     }
   }
@@ -573,6 +575,7 @@ JRT_LEAF(BasicType, Deoptimization::unpack_frames(JavaThread* thread, int exec_m
 
 #ifndef PRODUCT
   if (TraceDeoptimization) {
+    ttyLocker ttyl;
     tty->print_cr("DEOPT UNPACKING thread " INTPTR_FORMAT " vframeArray " INTPTR_FORMAT " mode %d", thread, array, exec_mode);
   }
 #endif
@@ -755,12 +758,12 @@ bool Deoptimization::realloc_objects(JavaThread* thread, frame* fr, GrowableArra
       InstanceKlass* ik = InstanceKlass::cast(k());
       obj = ik->allocate_instance(CHECK_(false));
     } else if (k->oop_is_typeArray()) {
-      typeArrayKlass* ak = typeArrayKlass::cast(k());
+      TypeArrayKlass* ak = TypeArrayKlass::cast(k());
       assert(sv->field_size() % type2size[ak->element_type()] == 0, "non-integral array length");
       int len = sv->field_size() / type2size[ak->element_type()];
       obj = ak->allocate(len, CHECK_(false));
     } else if (k->oop_is_objArray()) {
-      objArrayKlass* ak = objArrayKlass::cast(k());
+      ObjArrayKlass* ak = ObjArrayKlass::cast(k());
       obj = ak->allocate(sv->field_size(), CHECK_(false));
     }
 
@@ -923,7 +926,7 @@ void Deoptimization::reassign_fields(frame* fr, RegisterMap* reg_map, GrowableAr
       FieldReassigner reassign(fr, reg_map, sv, obj());
       ik->do_nonstatic_fields(&reassign);
     } else if (k->oop_is_typeArray()) {
-      typeArrayKlass* ak = typeArrayKlass::cast(k());
+      TypeArrayKlass* ak = TypeArrayKlass::cast(k());
       reassign_type_array_elements(fr, reg_map, sv, (typeArrayOop) obj(), ak->element_type());
     } else if (k->oop_is_objArray()) {
       reassign_object_array_elements(fr, reg_map, sv, (objArrayOop) obj());
@@ -1322,9 +1325,9 @@ JRT_ENTRY(void, Deoptimization::uncommon_trap_inner(JavaThread* thread, jint tra
       if (TraceDeoptimization) {  // make noise on the tty
         tty->print("Uncommon trap occurred in");
         nm->method()->print_short_name(tty);
-        tty->print(" (@" INTPTR_FORMAT ") thread=%d reason=%s action=%s unloaded_class_index=%d",
+        tty->print(" (@" INTPTR_FORMAT ") thread=" UINTX_FORMAT " reason=%s action=%s unloaded_class_index=%d",
                    fr.pc(),
-                   (int) os::current_thread_id(),
+                   os::current_thread_id(),
                    trap_reason_name(reason),
                    trap_action_name(action),
                    unloaded_class_index);
diff --git a/hotspot/src/share/vm/runtime/dtraceJSDT.hpp b/hotspot/src/share/vm/runtime/dtraceJSDT.hpp
index 670eabfef44..67b766ae944 100644
--- a/hotspot/src/share/vm/runtime/dtraceJSDT.hpp
+++ b/hotspot/src/share/vm/runtime/dtraceJSDT.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/runtime/fprofiler.hpp b/hotspot/src/share/vm/runtime/fprofiler.hpp
index 5cab0a2655a..725e5fcaf01 100644
--- a/hotspot/src/share/vm/runtime/fprofiler.hpp
+++ b/hotspot/src/share/vm/runtime/fprofiler.hpp
@@ -65,15 +65,15 @@ public:
   // For now, the only thread-specific region is the class loader.
   enum Region { noRegion, classLoaderRegion, extraRegion, maxRegion };
 
-  ThreadProfilerMark(Region)  KERNEL_RETURN;
-  ~ThreadProfilerMark()       KERNEL_RETURN;
+  ThreadProfilerMark(Region)  NOT_FPROF_RETURN;
+  ~ThreadProfilerMark()       NOT_FPROF_RETURN;
 
 private:
   ThreadProfiler* _pp;
   Region _r;
 };
 
-#ifndef FPROF_KERNEL
+#if INCLUDE_FPROF
 
 class IntervalData VALUE_OBJ_CLASS_SPEC {
   // Just to keep these things all together
@@ -119,29 +119,29 @@ public:
   static void print_header(outputStream* st);
   void print_data(outputStream* st);
 };
-#endif // FPROF_KERNEL
+#endif // INCLUDE_FPROF
 
 class ThreadProfiler: public CHeapObj<mtInternal> {
 public:
-  ThreadProfiler()    KERNEL_RETURN;
-  ~ThreadProfiler()   KERNEL_RETURN;
+  ThreadProfiler()    NOT_FPROF_RETURN;
+  ~ThreadProfiler()   NOT_FPROF_RETURN;
 
   // Resets the profiler
-  void reset()        KERNEL_RETURN;
+  void reset()        NOT_FPROF_RETURN;
 
   // Activates the profiler for a certain thread
-  void engage()       KERNEL_RETURN;
+  void engage()       NOT_FPROF_RETURN;
 
   // Deactivates the profiler
-  void disengage()    KERNEL_RETURN;
+  void disengage()    NOT_FPROF_RETURN;
 
   // Prints the collected profiling information
-  void print(const char* thread_name) KERNEL_RETURN;
+  void print(const char* thread_name) NOT_FPROF_RETURN;
 
   // Garbage Collection Support
-  void oops_do(OopClosure* f)         KERNEL_RETURN;
+  void oops_do(OopClosure* f)         NOT_FPROF_RETURN;
 
-#ifndef FPROF_KERNEL
+#if INCLUDE_FPROF
 private:
   // for recording ticks.
   friend class ProfilerNode;
@@ -225,39 +225,39 @@ private:
   IntervalData* interval_data_ref() {
     return &_interval_data;
   }
-#endif // FPROF_KERNEL
+#endif // INCLUDE_FPROF
 };
 
 class FlatProfiler: AllStatic {
 public:
-  static void reset() KERNEL_RETURN ;
-  static void engage(JavaThread* mainThread, bool fullProfile) KERNEL_RETURN ;
-  static void disengage() KERNEL_RETURN ;
-  static void print(int unused) KERNEL_RETURN ;
-  static bool is_active() KERNEL_RETURN_(false) ;
+  static void reset() NOT_FPROF_RETURN ;
+  static void engage(JavaThread* mainThread, bool fullProfile) NOT_FPROF_RETURN ;
+  static void disengage() NOT_FPROF_RETURN ;
+  static void print(int unused) NOT_FPROF_RETURN ;
+  static bool is_active() NOT_FPROF_RETURN_(false) ;
 
   // This is NULL if each thread has its own thread profiler,
   // else this is the single thread profiler used by all threads.
   // In particular it makes a difference during garbage collection,
   // where you only want to traverse each thread profiler once.
-  static ThreadProfiler* get_thread_profiler() KERNEL_RETURN_(NULL);
+  static ThreadProfiler* get_thread_profiler() NOT_FPROF_RETURN_(NULL);
 
   // Garbage Collection Support
-  static void oops_do(OopClosure* f) KERNEL_RETURN ;
+  static void oops_do(OopClosure* f) NOT_FPROF_RETURN ;
 
   // Support for disassembler to inspect the PCRecorder
 
   // Returns the start address for a given pc
   // NULL is returned if the PCRecorder is inactive
-  static address bucket_start_for(address pc) KERNEL_RETURN_(NULL);
+  static address bucket_start_for(address pc) NOT_FPROF_RETURN_(NULL);
 
   enum { MillisecsPerTick = 10 };   // ms per profiling ticks
 
   // Returns the number of ticks recorded for the bucket
   // pc belongs to.
-  static int bucket_count_for(address pc) KERNEL_RETURN_(0);
+  static int bucket_count_for(address pc) NOT_FPROF_RETURN_(0);
 
-#ifndef FPROF_KERNEL
+#if INCLUDE_FPROF
 
  private:
   static bool full_profile() {
@@ -324,7 +324,7 @@ public:
   static void interval_reset();       // reset interval data.
   enum {interval_print_size = 10};
   static IntervalData* interval_data;
-#endif // FPROF_KERNEL
+#endif // INCLUDE_FPROF
 };
 
 #endif // SHARE_VM_RUNTIME_FPROFILER_HPP
diff --git a/hotspot/src/share/vm/runtime/globals.hpp b/hotspot/src/share/vm/runtime/globals.hpp
index e4a97abbd5f..e073cbcd007 100644
--- a/hotspot/src/share/vm/runtime/globals.hpp
+++ b/hotspot/src/share/vm/runtime/globals.hpp
@@ -473,7 +473,7 @@ class CommandLineFlags {
   develop(bool, CleanChunkPoolAsync, falseInEmbedded,                       \
           "Whether to clean the chunk pool asynchronously")                 \
                                                                             \
-  /* Temporary: See 6948537 */                                             \
+  /* Temporary: See 6948537 */                                              \
   experimental(bool, UseMemSetInBOT, true,                                  \
           "(Unstable) uses memset in BOT updates in GC code")               \
                                                                             \
@@ -863,6 +863,9 @@ class CommandLineFlags {
   product(ccstr, NativeMemoryTracking, "off",                               \
           "Native memory tracking options")                                 \
                                                                             \
+  diagnostic(bool, PrintNMTStatistics, false,                               \
+          "Print native memory tracking summary data if it is on")          \
+                                                                            \
   diagnostic(bool, LogCompilation, false,                                   \
           "Log compilation activity in detail to hotspot.log or LogFile")   \
                                                                             \
@@ -997,9 +1000,6 @@ class CommandLineFlags {
   product(bool, ClassUnloading, true,                                       \
           "Do unloading of classes")                                        \
                                                                             \
-  diagnostic(bool, LinkWellKnownClasses, false,                             \
-          "Resolve a well known class as soon as its name is seen")         \
-                                                                            \
   develop(bool, DisableStartThread, false,                                  \
           "Disable starting of additional Java threads "                    \
           "(for debugging only)")                                           \
@@ -1063,9 +1063,6 @@ class CommandLineFlags {
                                                                             \
   product(bool, MonitorInUseLists, false, "Track Monitors for Deflation")   \
                                                                             \
-  product(intx, Atomics, 0,                                                 \
-          "(Unsafe,Unstable) Diagnostic - Controls emission of atomics")    \
-                                                                            \
   product(intx, SyncFlags, 0, "(Unsafe,Unstable) Experimental Sync flags" ) \
                                                                             \
   product(intx, SyncVerbose, 0, "(Unstable)" )                              \
@@ -1623,7 +1620,7 @@ class CommandLineFlags {
           "Use BinaryTreeDictionary as default in the CMS generation")      \
                                                                             \
   product(uintx, CMSIndexedFreeListReplenish, 4,                            \
-          "Replenish an indexed free list with this number of chunks")     \
+          "Replenish an indexed free list with this number of chunks")      \
                                                                             \
   product(bool, CMSReplenishIntermediate, true,                             \
           "Replenish all intermediate free-list caches")                    \
@@ -2049,7 +2046,7 @@ class CommandLineFlags {
   product(uintx, TenuredGenerationSizeSupplementDecay, 2,                   \
           "Decay factor to TenuredGenerationSizeIncrement")                 \
                                                                             \
-  product(uintx, MaxGCPauseMillis, max_uintx,                           \
+  product(uintx, MaxGCPauseMillis, max_uintx,                               \
           "Adaptive size policy maximum GC pause time goal in msec, "       \
           "or (G1 Only) the max. GC time per MMU time slice")               \
                                                                             \
@@ -2263,7 +2260,7 @@ class CommandLineFlags {
   develop(bool, TraceGCTaskQueue, false,                                    \
           "Trace actions of the GC task queues")                            \
                                                                             \
-  diagnostic(bool, TraceGCTaskThread, false,                                   \
+  diagnostic(bool, TraceGCTaskThread, false,                                \
           "Trace actions of the GC task threads")                           \
                                                                             \
   product(bool, PrintParallelOldGCPhaseTimes, false,                        \
@@ -2329,7 +2326,7 @@ class CommandLineFlags {
   develop(bool, CITimeEach, false,                                          \
           "display timing information after each successful compilation")   \
                                                                             \
-  develop(bool, CICountOSR, true,                                           \
+  develop(bool, CICountOSR, false,                                          \
           "use a separate counter when assigning ids to osr compilations")  \
                                                                             \
   develop(bool, CICompileNatives, true,                                     \
@@ -2778,7 +2775,7 @@ class CommandLineFlags {
   product(intx, SafepointTimeoutDelay, 10000,                               \
           "Delay in milliseconds for option SafepointTimeout")              \
                                                                             \
-  product(intx, NmethodSweepFraction, 16,                                    \
+  product(intx, NmethodSweepFraction, 16,                                   \
           "Number of invocations of sweeper to cover all nmethods")         \
                                                                             \
   product(intx, NmethodSweepCheckInterval, 5,                               \
@@ -2901,7 +2898,7 @@ class CommandLineFlags {
           "if non-zero, start verifying C heap after Nth call to "          \
           "malloc/realloc/free")                                            \
                                                                             \
-  product(intx, TypeProfileWidth,     2,                                   \
+  product(intx, TypeProfileWidth,     2,                                    \
           "number of receiver types to record in call/cast profile")        \
                                                                             \
   develop(intx, BciProfileWidth,      2,                                    \
@@ -3009,10 +3006,10 @@ class CommandLineFlags {
   product(uintx, MinHeapDeltaBytes, ScaleForWordSize(128*K),                \
           "Min change in heap space due to GC (in bytes)")                  \
                                                                             \
-  product(uintx, MinMetaspaceExpansion, ScaleForWordSize(256*K),             \
+  product(uintx, MinMetaspaceExpansion, ScaleForWordSize(256*K),            \
           "Min expansion of permanent heap (in bytes)")                     \
                                                                             \
-  product(uintx, MaxMetaspaceExpansion, ScaleForWordSize(4*M),               \
+  product(uintx, MaxMetaspaceExpansion, ScaleForWordSize(4*M),              \
           "Max expansion of permanent heap without full GC (in bytes)")     \
                                                                             \
   product(intx, QueuedAllocationWarningCount, 0,                            \
@@ -3025,10 +3022,10 @@ class CommandLineFlags {
   diagnostic(intx, VerifyGCLevel,     0,                                    \
           "Generation level at which to start +VerifyBefore/AfterGC")       \
                                                                             \
-  product(intx, MaxTenuringThreshold,    15,                                \
+  product(uintx, MaxTenuringThreshold,    15,                               \
           "Maximum value for tenuring threshold")                           \
                                                                             \
-  product(intx, InitialTenuringThreshold,     7,                            \
+  product(uintx, InitialTenuringThreshold,    7,                            \
           "Initial value for tenuring threshold")                           \
                                                                             \
   product(intx, TargetSurvivorRatio,    50,                                 \
@@ -3062,6 +3059,9 @@ class CommandLineFlags {
   develop(uintx, GCExpandToAllocateDelayMillis, 0,                          \
           "Delay in ms between expansion and allocation")                   \
                                                                             \
+  develop(uintx, GCWorkerDelayMillis, 0,                                    \
+          "Delay in ms in scheduling GC workers")                           \
+                                                                            \
   product(intx, DeferThrSuspendLoopCount,     4000,                         \
           "(Unstable) Number of times to iterate in safepoint loop "        \
           " before blocking VM threads ")                                   \
diff --git a/hotspot/src/share/vm/runtime/globals_extension.hpp b/hotspot/src/share/vm/runtime/globals_extension.hpp
index 064b489b642..4d8666821a3 100644
--- a/hotspot/src/share/vm/runtime/globals_extension.hpp
+++ b/hotspot/src/share/vm/runtime/globals_extension.hpp
@@ -94,9 +94,9 @@
 typedef enum {
  RUNTIME_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_EXPERIMENTAL_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER, RUNTIME_MANAGEABLE_FLAG_MEMBER, RUNTIME_PRODUCT_RW_FLAG_MEMBER, RUNTIME_LP64_PRODUCT_FLAG_MEMBER)
  RUNTIME_OS_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER)
-#ifndef KERNEL
+#if INCLUDE_ALTERNATE_GCS
  G1_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER, RUNTIME_PD_DEVELOP_FLAG_MEMBER, RUNTIME_PRODUCT_FLAG_MEMBER, RUNTIME_PD_PRODUCT_FLAG_MEMBER, RUNTIME_DIAGNOSTIC_FLAG_MEMBER, RUNTIME_EXPERIMENTAL_FLAG_MEMBER, RUNTIME_NOTPRODUCT_FLAG_MEMBER, RUNTIME_MANAGEABLE_FLAG_MEMBER, RUNTIME_PRODUCT_RW_FLAG_MEMBER)
-#endif
+#endif // INCLUDE_ALTERNATE_GCS
 #ifdef COMPILER1
  C1_FLAGS(C1_DEVELOP_FLAG_MEMBER, C1_PD_DEVELOP_FLAG_MEMBER, C1_PRODUCT_FLAG_MEMBER, C1_PD_PRODUCT_FLAG_MEMBER, C1_NOTPRODUCT_FLAG_MEMBER)
 #endif
@@ -187,7 +187,7 @@ typedef enum {
                   RUNTIME_PD_PRODUCT_FLAG_MEMBER_WITH_TYPE,
                   RUNTIME_DIAGNOSTIC_FLAG_MEMBER_WITH_TYPE,
                   RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE)
-#ifndef KERNEL
+#if INCLUDE_ALTERNATE_GCS
  G1_FLAGS(RUNTIME_DEVELOP_FLAG_MEMBER_WITH_TYPE,
           RUNTIME_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
           RUNTIME_PRODUCT_FLAG_MEMBER_WITH_TYPE,
@@ -197,7 +197,7 @@ typedef enum {
           RUNTIME_NOTPRODUCT_FLAG_MEMBER_WITH_TYPE,
           RUNTIME_MANAGEABLE_FLAG_MEMBER_WITH_TYPE,
           RUNTIME_PRODUCT_RW_FLAG_MEMBER_WITH_TYPE)
-#endif // KERNEL
+#endif // INCLUDE_ALTERNATE_GCS
 #ifdef COMPILER1
  C1_FLAGS(C1_DEVELOP_FLAG_MEMBER_WITH_TYPE,
           C1_PD_DEVELOP_FLAG_MEMBER_WITH_TYPE,
diff --git a/hotspot/src/share/vm/runtime/init.cpp b/hotspot/src/share/vm/runtime/init.cpp
index b7e6f4a66db..541cb08676f 100644
--- a/hotspot/src/share/vm/runtime/init.cpp
+++ b/hotspot/src/share/vm/runtime/init.cpp
@@ -114,9 +114,9 @@ jint init_globals() {
   universe2_init();  // dependent on codeCache_init and stubRoutines_init1
   referenceProcessor_init();
   jni_handles_init();
-#ifndef VM_STRUCTS_KERNEL
+#if INCLUDE_VM_STRUCTS
   vmStructs_init();
-#endif // VM_STRUCTS_KERNEL
+#endif // INCLUDE_VM_STRUCTS
 
   vtableStubs_init();
   InlineCacheBuffer_init();
diff --git a/hotspot/src/share/vm/runtime/interfaceSupport.hpp b/hotspot/src/share/vm/runtime/interfaceSupport.hpp
index 2875ee0eb83..1f1ffa8eb58 100644
--- a/hotspot/src/share/vm/runtime/interfaceSupport.hpp
+++ b/hotspot/src/share/vm/runtime/interfaceSupport.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/runtime/java.cpp b/hotspot/src/share/vm/runtime/java.cpp
index 8b3aab39a65..d40794529d6 100644
--- a/hotspot/src/share/vm/runtime/java.cpp
+++ b/hotspot/src/share/vm/runtime/java.cpp
@@ -56,6 +56,8 @@
 #include "runtime/task.hpp"
 #include "runtime/timer.hpp"
 #include "runtime/vm_operations.hpp"
+#include "services/memReporter.hpp"
+#include "services/memTracker.hpp"
 #include "trace/tracing.hpp"
 #include "trace/traceEventTypes.hpp"
 #include "utilities/dtrace.hpp"
@@ -359,6 +361,15 @@ void print_statistics() {
   }
 #endif // COMPILER2
 #endif // ENABLE_ZAP_DEAD_LOCALS
+  // Native memory tracking data
+  if (PrintNMTStatistics) {
+    if (MemTracker::is_on()) {
+      BaselineTTYOutputer outputer(tty);
+      MemTracker::print_memory_usage(outputer, K, false);
+    } else {
+      tty->print_cr(MemTracker::reason());
+    }
+  }
 }
 
 #else // PRODUCT MODE STATISTICS
@@ -376,6 +387,16 @@ void print_statistics() {
   if (PrintBiasedLockingStatistics) {
     BiasedLocking::print_counters();
   }
+
+  // Native memory tracking data
+  if (PrintNMTStatistics) {
+    if (MemTracker::is_on()) {
+      BaselineTTYOutputer outputer(tty);
+      MemTracker::print_memory_usage(outputer, K, false);
+    } else {
+      tty->print_cr(MemTracker::reason());
+    }
+  }
 }
 
 #endif
diff --git a/hotspot/src/share/vm/runtime/java.hpp b/hotspot/src/share/vm/runtime/java.hpp
index 1d2b45b6967..7d88062ccc8 100644
--- a/hotspot/src/share/vm/runtime/java.hpp
+++ b/hotspot/src/share/vm/runtime/java.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/runtime/monitorChunk.cpp b/hotspot/src/share/vm/runtime/monitorChunk.cpp
index f8793fdeaee..a7e0237d8ec 100644
--- a/hotspot/src/share/vm/runtime/monitorChunk.cpp
+++ b/hotspot/src/share/vm/runtime/monitorChunk.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/runtime/monitorChunk.hpp b/hotspot/src/share/vm/runtime/monitorChunk.hpp
index eca92a6b4a7..13540e512f7 100644
--- a/hotspot/src/share/vm/runtime/monitorChunk.hpp
+++ b/hotspot/src/share/vm/runtime/monitorChunk.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/runtime/mutex.hpp b/hotspot/src/share/vm/runtime/mutex.hpp
index 7d2cd82724f..fc2c434f9f2 100644
--- a/hotspot/src/share/vm/runtime/mutex.hpp
+++ b/hotspot/src/share/vm/runtime/mutex.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/runtime/os.cpp b/hotspot/src/share/vm/runtime/os.cpp
index 6689cd4dc3c..550e64a2754 100644
--- a/hotspot/src/share/vm/runtime/os.cpp
+++ b/hotspot/src/share/vm/runtime/os.cpp
@@ -201,14 +201,21 @@ OSReturn os::set_priority(Thread* thread, ThreadPriority p) {
   }
 }
 
-
+// The mapping from OS priority back to Java priority may be inexact because
+// Java priorities can map M:1 with native priorities. If you want the definite
+// Java priority then use JavaThread::java_priority()
 OSReturn os::get_priority(const Thread* const thread, ThreadPriority& priority) {
   int p;
   int os_prio;
   OSReturn ret = get_native_priority(thread, &os_prio);
   if (ret != OS_OK) return ret;
 
-  for (p = MaxPriority; p > MinPriority && java_to_os_priority[p] > os_prio; p--) ;
+  if (java_to_os_priority[MaxPriority] > java_to_os_priority[MinPriority]) {
+    for (p = MaxPriority; p > MinPriority && java_to_os_priority[p] > os_prio; p--) ;
+  } else {
+    // niceness values are in reverse order
+    for (p = MaxPriority; p > MinPriority && java_to_os_priority[p] < os_prio; p--) ;
+  }
   priority = (ThreadPriority)p;
   return OS_OK;
 }
@@ -871,6 +878,7 @@ void os::print_location(outputStream* st, intptr_t x, bool verbose) {
         st->print(" for ");
         nm->method()->print_value_on(st);
       }
+      st->cr();
       nm->print_nmethod(verbose);
       return;
     }
@@ -891,7 +899,11 @@ void os::print_location(outputStream* st, intptr_t x, bool verbose) {
       print = true;
     }
     if (print) {
-      st->print_cr(INTPTR_FORMAT " is an oop", addr);
+      if (p == (HeapWord*) addr) {
+        st->print_cr(INTPTR_FORMAT " is an oop", addr);
+      } else {
+        st->print_cr(INTPTR_FORMAT " is pointing into object: " INTPTR_FORMAT, addr, p);
+      }
       oop(p)->print_on(st);
       return;
     }
diff --git a/hotspot/src/share/vm/runtime/os.hpp b/hotspot/src/share/vm/runtime/os.hpp
index 508edba8a3e..bb5d6ea9e28 100644
--- a/hotspot/src/share/vm/runtime/os.hpp
+++ b/hotspot/src/share/vm/runtime/os.hpp
@@ -387,7 +387,7 @@ class os: AllStatic {
   static void pd_start_thread(Thread* thread);
   static void start_thread(Thread* thread);
 
-  static void initialize_thread();
+  static void initialize_thread(Thread* thr);
   static void free_thread(OSThread* osthread);
 
   // thread id on Linux/64bit is 64bit, on Windows and Solaris, it's 32bit
diff --git a/hotspot/src/share/vm/runtime/park.cpp b/hotspot/src/share/vm/runtime/park.cpp
index 8d91d0b6887..6fb0224ff44 100644
--- a/hotspot/src/share/vm/runtime/park.cpp
+++ b/hotspot/src/share/vm/runtime/park.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/runtime/perfData.cpp b/hotspot/src/share/vm/runtime/perfData.cpp
index 10e62cb29ef..ddb565b074c 100644
--- a/hotspot/src/share/vm/runtime/perfData.cpp
+++ b/hotspot/src/share/vm/runtime/perfData.cpp
@@ -588,6 +588,10 @@ bool PerfDataList::by_name(void* name, PerfData* pd) {
 
 PerfData* PerfDataList::find_by_name(const char* name) {
 
+  // if add_item hasn't been called the list won't be initialized
+  if (this == NULL)
+    return NULL;
+
   int i = _set->find((void*)name, PerfDataList::by_name);
 
   if (i >= 0 && i <= _set->length())
diff --git a/hotspot/src/share/vm/runtime/perfMemory.cpp b/hotspot/src/share/vm/runtime/perfMemory.cpp
index 26ef55e5f58..0685cbd1845 100644
--- a/hotspot/src/share/vm/runtime/perfMemory.cpp
+++ b/hotspot/src/share/vm/runtime/perfMemory.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/runtime/reflection.cpp b/hotspot/src/share/vm/runtime/reflection.cpp
index 2c5d26ed9f0..a999eadb254 100644
--- a/hotspot/src/share/vm/runtime/reflection.cpp
+++ b/hotspot/src/share/vm/runtime/reflection.cpp
@@ -212,7 +212,7 @@ BasicType Reflection::array_get(jvalue* value, arrayOop a, int index, TRAPS) {
     return T_OBJECT;
   } else {
     assert(a->is_typeArray(), "just checking");
-    BasicType type = typeArrayKlass::cast(a->klass())->element_type();
+    BasicType type = TypeArrayKlass::cast(a->klass())->element_type();
     switch (type) {
       case T_BOOLEAN:
         value->z = typeArrayOop(a)->bool_at(index);
@@ -254,7 +254,7 @@ void Reflection::array_set(jvalue* value, arrayOop a, int index, BasicType value
     if (value_type == T_OBJECT) {
       oop obj = (oop) value->l;
       if (obj != NULL) {
-        Klass* element_klass = objArrayKlass::cast(a->klass())->element_klass();
+        Klass* element_klass = ObjArrayKlass::cast(a->klass())->element_klass();
         if (!obj->is_a(element_klass)) {
           THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "array element type mismatch");
         }
@@ -263,7 +263,7 @@ void Reflection::array_set(jvalue* value, arrayOop a, int index, BasicType value
     }
   } else {
     assert(a->is_typeArray(), "just checking");
-    BasicType array_type = typeArrayKlass::cast(a->klass())->element_type();
+    BasicType array_type = TypeArrayKlass::cast(a->klass())->element_type();
     if (array_type != value_type) {
       // The widen operation can potentially throw an exception, but cannot block,
       // so typeArrayOop a is safe if the call succeeds.
@@ -313,7 +313,7 @@ Klass* Reflection::basic_type_mirror_to_arrayklass(oop basic_type_mirror, TRAPS)
 
 
 oop Reflection:: basic_type_arrayklass_to_mirror(Klass* basic_type_arrayklass, TRAPS) {
-  BasicType type = typeArrayKlass::cast(basic_type_arrayklass)->element_type();
+  BasicType type = TypeArrayKlass::cast(basic_type_arrayklass)->element_type();
   return Universe::java_mirror(type);
 }
 
@@ -327,10 +327,10 @@ arrayOop Reflection::reflect_new_array(oop element_mirror, jint length, TRAPS) {
   }
   if (java_lang_Class::is_primitive(element_mirror)) {
     Klass* tak = basic_type_mirror_to_arrayklass(element_mirror, CHECK_NULL);
-    return typeArrayKlass::cast(tak)->allocate(length, THREAD);
+    return TypeArrayKlass::cast(tak)->allocate(length, THREAD);
   } else {
     Klass* k = java_lang_Class::as_Klass(element_mirror);
-    if (Klass::cast(k)->oop_is_array() && arrayKlass::cast(k)->dimension() >= MAX_DIM) {
+    if (Klass::cast(k)->oop_is_array() && ArrayKlass::cast(k)->dimension() >= MAX_DIM) {
       THROW_0(vmSymbols::java_lang_IllegalArgumentException());
     }
     return oopFactory::new_objArray(k, length, THREAD);
@@ -340,7 +340,7 @@ arrayOop Reflection::reflect_new_array(oop element_mirror, jint length, TRAPS) {
 
 arrayOop Reflection::reflect_new_multi_array(oop element_mirror, typeArrayOop dim_array, TRAPS) {
   assert(dim_array->is_typeArray(), "just checking");
-  assert(typeArrayKlass::cast(dim_array->klass())->element_type() == T_INT, "just checking");
+  assert(TypeArrayKlass::cast(dim_array->klass())->element_type() == T_INT, "just checking");
 
   if (element_mirror == NULL) {
     THROW_0(vmSymbols::java_lang_NullPointerException());
@@ -367,7 +367,7 @@ arrayOop Reflection::reflect_new_multi_array(oop element_mirror, typeArrayOop di
   } else {
     klass = java_lang_Class::as_Klass(element_mirror);
     if (Klass::cast(klass)->oop_is_array()) {
-      int k_dim = arrayKlass::cast(klass)->dimension();
+      int k_dim = ArrayKlass::cast(klass)->dimension();
       if (k_dim + len > MAX_DIM) {
         THROW_0(vmSymbols::java_lang_IllegalArgumentException());
       }
@@ -375,7 +375,7 @@ arrayOop Reflection::reflect_new_multi_array(oop element_mirror, typeArrayOop di
     }
   }
   klass = Klass::cast(klass)->array_klass(dim, CHECK_NULL);
-  oop obj = arrayKlass::cast(klass)->multi_allocate(len, dimensions, THREAD);
+  oop obj = ArrayKlass::cast(klass)->multi_allocate(len, dimensions, THREAD);
   assert(obj->is_array(), "just checking");
   return arrayOop(obj);
 }
@@ -391,17 +391,17 @@ oop Reflection::array_component_type(oop mirror, TRAPS) {
     return NULL;
   }
 
-  oop result = arrayKlass::cast(klass)->component_mirror();
+  oop result = ArrayKlass::cast(klass)->component_mirror();
 #ifdef ASSERT
   oop result2 = NULL;
-  if (arrayKlass::cast(klass)->dimension() == 1) {
+  if (ArrayKlass::cast(klass)->dimension() == 1) {
     if (Klass::cast(klass)->oop_is_typeArray()) {
       result2 = basic_type_arrayklass_to_mirror(klass, CHECK_NULL);
     } else {
-      result2 = Klass::cast(objArrayKlass::cast(klass)->element_klass())->java_mirror();
+      result2 = Klass::cast(ObjArrayKlass::cast(klass)->element_klass())->java_mirror();
     }
   } else {
-    Klass* lower_dim = arrayKlass::cast(klass)->lower_dimension();
+    Klass* lower_dim = ArrayKlass::cast(klass)->lower_dimension();
     assert(Klass::cast(lower_dim)->oop_is_array(), "just checking");
     result2 = Klass::cast(lower_dim)->java_mirror();
   }
diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.cpp b/hotspot/src/share/vm/runtime/sharedRuntime.cpp
index d730251b7b2..7a7c97e13fc 100644
--- a/hotspot/src/share/vm/runtime/sharedRuntime.cpp
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.cpp
@@ -88,6 +88,7 @@ RuntimeStub*        SharedRuntime::_resolve_virtual_call_blob;
 RuntimeStub*        SharedRuntime::_resolve_static_call_blob;
 
 DeoptimizationBlob* SharedRuntime::_deopt_blob;
+SafepointBlob*      SharedRuntime::_polling_page_vectors_safepoint_handler_blob;
 SafepointBlob*      SharedRuntime::_polling_page_safepoint_handler_blob;
 SafepointBlob*      SharedRuntime::_polling_page_return_handler_blob;
 
@@ -104,8 +105,14 @@ void SharedRuntime::generate_stubs() {
   _resolve_virtual_call_blob           = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_virtual_call_C),      "resolve_virtual_call");
   _resolve_static_call_blob            = generate_resolve_blob(CAST_FROM_FN_PTR(address, SharedRuntime::resolve_static_call_C),       "resolve_static_call");
 
-  _polling_page_safepoint_handler_blob = generate_handler_blob(CAST_FROM_FN_PTR(address, SafepointSynchronize::handle_polling_page_exception), false);
-  _polling_page_return_handler_blob    = generate_handler_blob(CAST_FROM_FN_PTR(address, SafepointSynchronize::handle_polling_page_exception), true);
+#ifdef COMPILER2
+  // Vectors are generated only by C2.
+  if (is_wide_vector(MaxVectorSize)) {
+    _polling_page_vectors_safepoint_handler_blob = generate_handler_blob(CAST_FROM_FN_PTR(address, SafepointSynchronize::handle_polling_page_exception), POLL_AT_VECTOR_LOOP);
+  }
+#endif // COMPILER2
+  _polling_page_safepoint_handler_blob = generate_handler_blob(CAST_FROM_FN_PTR(address, SafepointSynchronize::handle_polling_page_exception), POLL_AT_LOOP);
+  _polling_page_return_handler_blob    = generate_handler_blob(CAST_FROM_FN_PTR(address, SafepointSynchronize::handle_polling_page_exception), POLL_AT_RETURN);
 
   generate_deopt_blob();
 
@@ -535,10 +542,15 @@ address SharedRuntime::get_poll_stub(address pc) {
     "Only polling locations are used for safepoint");
 
   bool at_poll_return = ((nmethod*)cb)->is_at_poll_return(pc);
+  bool has_wide_vectors = ((nmethod*)cb)->has_wide_vectors();
   if (at_poll_return) {
     assert(SharedRuntime::polling_page_return_handler_blob() != NULL,
            "polling page return stub not created yet");
     stub = SharedRuntime::polling_page_return_handler_blob()->entry_point();
+  } else if (has_wide_vectors) {
+    assert(SharedRuntime::polling_page_vectors_safepoint_handler_blob() != NULL,
+           "polling page vectors safepoint stub not created yet");
+    stub = SharedRuntime::polling_page_vectors_safepoint_handler_blob()->entry_point();
   } else {
     assert(SharedRuntime::polling_page_safepoint_handler_blob() != NULL,
            "polling page safepoint stub not created yet");
@@ -1618,6 +1630,31 @@ methodHandle SharedRuntime::reresolve_call_site(JavaThread *thread, TRAPS) {
   return callee_method;
 }
 
+#ifdef ASSERT
+void SharedRuntime::check_member_name_argument_is_last_argument(methodHandle method,
+                                                                const BasicType* sig_bt,
+                                                                const VMRegPair* regs) {
+  ResourceMark rm;
+  const int total_args_passed = method->size_of_parameters();
+  const VMRegPair*    regs_with_member_name = regs;
+        VMRegPair* regs_without_member_name = NEW_RESOURCE_ARRAY(VMRegPair, total_args_passed - 1);
+
+  const int member_arg_pos = total_args_passed - 1;
+  assert(member_arg_pos >= 0 && member_arg_pos < total_args_passed, "oob");
+  assert(sig_bt[member_arg_pos] == T_OBJECT, "dispatch argument must be an object");
+
+  const bool is_outgoing = method->is_method_handle_intrinsic();
+  int comp_args_on_stack = java_calling_convention(sig_bt, regs_without_member_name, total_args_passed - 1, is_outgoing);
+
+  for (int i = 0; i < member_arg_pos; i++) {
+    VMReg a =    regs_with_member_name[i].first();
+    VMReg b = regs_without_member_name[i].first();
+    assert(a->value() == b->value(), err_msg_res("register allocation mismatch: a=%d, b=%d", a->value(), b->value()));
+  }
+  assert(regs_with_member_name[member_arg_pos].first()->is_valid(), "bad member arg");
+}
+#endif
+
 // ---------------------------------------------------------------------------
 // We are calling the interpreter via a c2i. Normally this would mean that
 // we were called by a compiled method. However we could have lost a race
@@ -2423,6 +2460,7 @@ AdapterHandlerEntry* AdapterHandlerLibrary::get_adapter(methodHandle method) {
 #ifndef PRODUCT
     // debugging suppport
     if (PrintAdapterHandlers || PrintStubCode) {
+      ttyLocker ttyl;
       entry->print_adapter_on(tty);
       tty->print_cr("i2c argument handler #%d for: %s %s (%d bytes generated)",
                     _adapters->number_of_entries(), (method->is_static() ? "static" : "receiver"),
@@ -2430,8 +2468,10 @@ AdapterHandlerEntry* AdapterHandlerLibrary::get_adapter(methodHandle method) {
       tty->print_cr("c2i argument handler starts at %p",entry->get_c2i_entry());
       if (Verbose || PrintStubCode) {
         address first_pc = entry->base_address();
-        if (first_pc != NULL)
+        if (first_pc != NULL) {
           Disassembler::decode(first_pc, first_pc + insts_size);
+          tty->cr();
+        }
       }
     }
 #endif
@@ -2546,10 +2586,10 @@ nmethod *AdapterHandlerLibrary::create_native_wrapper(methodHandle method, int c
       MacroAssembler _masm(&buffer);
 
       // Fill in the signature array, for the calling-convention call.
-      int total_args_passed = method->size_of_parameters();
+      const int total_args_passed = method->size_of_parameters();
 
-      BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType,total_args_passed);
-      VMRegPair*   regs = NEW_RESOURCE_ARRAY(VMRegPair,total_args_passed);
+      BasicType* sig_bt = NEW_RESOURCE_ARRAY(BasicType, total_args_passed);
+      VMRegPair*   regs = NEW_RESOURCE_ARRAY(VMRegPair, total_args_passed);
       int i=0;
       if( !method->is_static() )  // Pass in receiver first
         sig_bt[i++] = T_OBJECT;
@@ -2559,7 +2599,7 @@ nmethod *AdapterHandlerLibrary::create_native_wrapper(methodHandle method, int c
         if( ss.type() == T_LONG || ss.type() == T_DOUBLE )
           sig_bt[i++] = T_VOID;   // Longs & doubles take 2 Java slots
       }
-      assert( i==total_args_passed, "" );
+      assert(i == total_args_passed, "");
       BasicType ret_type = ss.type();
 
       // Now get the compiled-Java layout as input (or output) arguments.
@@ -2572,9 +2612,8 @@ nmethod *AdapterHandlerLibrary::create_native_wrapper(methodHandle method, int c
       nm = SharedRuntime::generate_native_wrapper(&_masm,
                                                   method,
                                                   compile_id,
-                                                  total_args_passed,
-                                                  comp_args_on_stack,
-                                                  sig_bt,regs,
+                                                  sig_bt,
+                                                  regs,
                                                   ret_type);
     }
   }
@@ -2666,7 +2705,7 @@ void SharedRuntime::get_utf(oopDesc* src, address dst) {
   int          jlsLen    = java_lang_String::length(src);
   jchar*       jlsPos    = (jlsLen == 0) ? NULL :
                                            jlsValue->char_at_addr(jlsOffset);
-  assert(typeArrayKlass::cast(jlsValue->klass())->element_type() == T_CHAR, "compressed string");
+  assert(TypeArrayKlass::cast(jlsValue->klass())->element_type() == T_CHAR, "compressed string");
   (void) UNICODE::as_utf8(jlsPos, jlsLen, (char *)dst, max_dtrace_string_size);
 }
 #endif // ndef HAVE_DTRACE_H
diff --git a/hotspot/src/share/vm/runtime/sharedRuntime.hpp b/hotspot/src/share/vm/runtime/sharedRuntime.hpp
index 014ec503cbe..54448890e0b 100644
--- a/hotspot/src/share/vm/runtime/sharedRuntime.hpp
+++ b/hotspot/src/share/vm/runtime/sharedRuntime.hpp
@@ -62,6 +62,7 @@ class SharedRuntime: AllStatic {
 
   static DeoptimizationBlob* _deopt_blob;
 
+  static SafepointBlob*      _polling_page_vectors_safepoint_handler_blob;
   static SafepointBlob*      _polling_page_safepoint_handler_blob;
   static SafepointBlob*      _polling_page_return_handler_blob;
 
@@ -75,7 +76,8 @@ class SharedRuntime: AllStatic {
 #endif // !PRODUCT
 
  private:
-  static SafepointBlob* generate_handler_blob(address call_ptr, bool cause_return);
+  enum { POLL_AT_RETURN,  POLL_AT_LOOP, POLL_AT_VECTOR_LOOP };
+  static SafepointBlob* generate_handler_blob(address call_ptr, int poll_type);
   static RuntimeStub*   generate_resolve_blob(address destination, const char* name);
 
  public:
@@ -223,6 +225,7 @@ class SharedRuntime: AllStatic {
 
   static SafepointBlob* polling_page_return_handler_blob()     { return _polling_page_return_handler_blob; }
   static SafepointBlob* polling_page_safepoint_handler_blob()  { return _polling_page_safepoint_handler_blob; }
+  static SafepointBlob* polling_page_vectors_safepoint_handler_blob()  { return _polling_page_vectors_safepoint_handler_blob; }
 
   // Counters
 #ifndef PRODUCT
@@ -345,7 +348,11 @@ class SharedRuntime: AllStatic {
   // the bottom of the frame the first 16 words will be skipped and SharedInfo::stack0
   // will be just above it. (
   // return value is the maximum number of VMReg stack slots the convention will use.
-  static int java_calling_convention(const BasicType *sig_bt, VMRegPair *regs, int total_args_passed, int is_outgoing);
+  static int java_calling_convention(const BasicType* sig_bt, VMRegPair* regs, int total_args_passed, int is_outgoing);
+
+  static void check_member_name_argument_is_last_argument(methodHandle method,
+                                                          const BasicType* sig_bt,
+                                                          const VMRegPair* regs) NOT_DEBUG_RETURN;
 
   // Ditto except for calling C
   static int c_calling_convention(const BasicType *sig_bt, VMRegPair *regs, int total_args_passed);
@@ -412,6 +419,10 @@ class SharedRuntime: AllStatic {
   // when an interrupt occurs.
   static uint out_preserve_stack_slots();
 
+  // Is vector's size (in bytes) bigger than a size saved by default?
+  // For example, on x86 16 bytes XMM registers are saved by default.
+  static bool is_wide_vector(int size);
+
   // Save and restore a native result
   static void    save_native_result(MacroAssembler *_masm, BasicType ret_type, int frame_slots );
   static void restore_native_result(MacroAssembler *_masm, BasicType ret_type, int frame_slots );
@@ -425,13 +436,11 @@ class SharedRuntime: AllStatic {
   // The wrapper may contain special-case code if the given method
   // is a JNI critical method, or a compiled method handle adapter,
   // such as _invokeBasic, _linkToVirtual, etc.
-  static nmethod *generate_native_wrapper(MacroAssembler* masm,
+  static nmethod* generate_native_wrapper(MacroAssembler* masm,
                                           methodHandle method,
                                           int compile_id,
-                                          int total_args_passed,
-                                          int max_arg,
-                                          BasicType *sig_bt,
-                                          VMRegPair *regs,
+                                          BasicType* sig_bt,
+                                          VMRegPair* regs,
                                           BasicType ret_type );
 
   // Block before entering a JNI critical method
diff --git a/hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp b/hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp
index ecf3d01dff8..fbb0f89c380 100644
--- a/hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp
+++ b/hotspot/src/share/vm/runtime/simpleThresholdPolicy.cpp
@@ -43,11 +43,11 @@ void SimpleThresholdPolicy::print_counters(const char* prefix, methodHandle mh)
     mdo_invocations_start = mdh->invocation_count_start();
     mdo_backedges_start = mdh->backedge_count_start();
   }
-  tty->print(" %stotal: %d,%d %smdo: %d(%d),%d(%d)", prefix,
+  tty->print(" %stotal=%d,%d %smdo=%d(%d),%d(%d)", prefix,
       invocation_count, backedge_count, prefix,
       mdo_invocations, mdo_invocations_start,
       mdo_backedges, mdo_backedges_start);
-  tty->print(" %smax levels: %d,%d", prefix,
+  tty->print(" %smax levels=%d,%d", prefix,
       mh->highest_comp_level(), mh->highest_osr_comp_level());
 }
 
@@ -85,7 +85,7 @@ void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodH
     tty->print("unknown");
   }
 
-  tty->print(" level: %d ", level);
+  tty->print(" level=%d ", level);
 
   ResourceMark rm;
   char *method_name = mh->name_and_sig_as_C_string();
@@ -95,8 +95,8 @@ void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodH
     tty->print(" [%s]] ", inlinee_name);
   }
   else tty->print("] ");
-  tty->print("@%d queues: %d,%d", bci, CompileBroker::queue_size(CompLevel_full_profile),
-                                       CompileBroker::queue_size(CompLevel_full_optimization));
+  tty->print("@%d queues=%d,%d", bci, CompileBroker::queue_size(CompLevel_full_profile),
+                                      CompileBroker::queue_size(CompLevel_full_optimization));
 
   print_specific(type, mh, imh, bci, level);
 
@@ -105,25 +105,30 @@ void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodH
     if (inlinee_event) {
       print_counters("inlinee ", imh);
     }
-    tty->print(" compilable: ");
+    tty->print(" compilable=");
     bool need_comma = false;
     if (!mh->is_not_compilable(CompLevel_full_profile)) {
       tty->print("c1");
       need_comma = true;
     }
+    if (!mh->is_not_osr_compilable(CompLevel_full_profile)) {
+      if (need_comma) tty->print(",");
+      tty->print("c1-osr");
+      need_comma = true;
+    }
     if (!mh->is_not_compilable(CompLevel_full_optimization)) {
-      if (need_comma) tty->print(", ");
+      if (need_comma) tty->print(",");
       tty->print("c2");
       need_comma = true;
     }
-    if (!mh->is_not_osr_compilable()) {
-      if (need_comma) tty->print(", ");
-      tty->print("osr");
+    if (!mh->is_not_osr_compilable(CompLevel_full_optimization)) {
+      if (need_comma) tty->print(",");
+      tty->print("c2-osr");
     }
-    tty->print(" status:");
+    tty->print(" status=");
     if (mh->queued_for_compilation()) {
-      tty->print(" in queue");
-    } else tty->print(" idle");
+      tty->print("in-queue");
+    } else tty->print("idle");
   }
   tty->print_cr("]");
 }
@@ -223,7 +228,7 @@ void SimpleThresholdPolicy::compile(methodHandle mh, int bci, CompLevel level, J
     }
     return;
   }
-  if (bci != InvocationEntryBci && mh->is_not_osr_compilable()) {
+  if (bci != InvocationEntryBci && mh->is_not_osr_compilable(level)) {
     return;
   }
   if (!CompileBroker::compilation_is_in_queue(mh, bci)) {
diff --git a/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp b/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp
index 3fb5161f8fa..d9f81b1d5cc 100644
--- a/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp
+++ b/hotspot/src/share/vm/runtime/stubCodeGenerator.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/runtime/stubRoutines.cpp b/hotspot/src/share/vm/runtime/stubRoutines.cpp
index 4900eaeafdc..5ca4ba59916 100644
--- a/hotspot/src/share/vm/runtime/stubRoutines.cpp
+++ b/hotspot/src/share/vm/runtime/stubRoutines.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -421,6 +421,7 @@ address StubRoutines::select_fill_function(BasicType t, bool aligned, const char
   case T_ARRAY:
   case T_OBJECT:
   case T_NARROWOOP:
+  case T_NARROWKLASS:
   case T_ADDRESS:
     // Currently unsupported
     return NULL;
diff --git a/hotspot/src/share/vm/runtime/task.hpp b/hotspot/src/share/vm/runtime/task.hpp
index 206442d765b..4bdcad54c3e 100644
--- a/hotspot/src/share/vm/runtime/task.hpp
+++ b/hotspot/src/share/vm/runtime/task.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/runtime/thread.cpp b/hotspot/src/share/vm/runtime/thread.cpp
index 500010aa305..6c46e129835 100644
--- a/hotspot/src/share/vm/runtime/thread.cpp
+++ b/hotspot/src/share/vm/runtime/thread.cpp
@@ -308,19 +308,27 @@ void Thread::initialize_thread_local_storage() {
 
   // initialize structure dependent on thread local storage
   ThreadLocalStorage::set_thread(this);
-
-  // set up any platform-specific state.
-  os::initialize_thread();
 }
 
 void Thread::record_stack_base_and_size() {
   set_stack_base(os::current_stack_base());
   set_stack_size(os::current_stack_size());
+  // CR 7190089: on Solaris, primordial thread's stack is adjusted
+  // in initialize_thread(). Without the adjustment, stack size is
+  // incorrect if stack is set to unlimited (ulimit -s unlimited).
+  // So far, only Solaris has real implementation of initialize_thread().
+  //
+  // set up any platform-specific state.
+  os::initialize_thread(this);
 
-  // record thread's native stack, stack grows downward
-  address low_stack_addr = stack_base() - stack_size();
-  MemTracker::record_thread_stack(low_stack_addr, stack_size(), this,
-             CURRENT_PC);
+#if INCLUDE_NMT
+   // record thread's native stack, stack grows downward
+  if (MemTracker::is_on()) {
+    address stack_low_addr = stack_base() - stack_size();
+    MemTracker::record_thread_stack(stack_low_addr, stack_size(), this,
+      CURRENT_PC);
+  }
+#endif // INCLUDE_NMT
 }
 
 
@@ -332,10 +340,12 @@ Thread::~Thread() {
   // record_stack_base_and_size called. Although, we would like to ensure
   // that all started threads do call record_stack_base_and_size(), there is
   // not proper way to enforce that.
+#if INCLUDE_NMT
   if (_stack_base != NULL) {
     address low_stack_addr = stack_base() - stack_size();
     MemTracker::release_thread_stack(low_stack_addr, stack_size(), this);
   }
+#endif // INCLUDE_NMT
 
   // deallocate data structures
   delete resource_area();
@@ -836,7 +846,11 @@ void Thread::metadata_do(void f(Metadata*)) {
 void Thread::print_on(outputStream* st) const {
   // get_priority assumes osthread initialized
   if (osthread() != NULL) {
-    st->print("prio=%d tid=" INTPTR_FORMAT " ", get_priority(this), this);
+    int os_prio;
+    if (os::get_native_priority(this, &os_prio) == OS_OK) {
+      st->print("os_prio=%d ", os_prio);
+    }
+    st->print("tid=" INTPTR_FORMAT " ", this);
     osthread()->print_on(st);
   }
   debug_only(if (WizardMode) print_owned_locks_on(st);)
@@ -1347,7 +1361,9 @@ void JavaThread::initialize() {
   set_monitor_chunks(NULL);
   set_next(NULL);
   set_thread_state(_thread_new);
+#if INCLUDE_NMT
   set_recorder(NULL);
+#endif
   _terminated = _not_terminated;
   _privileged_stack_top = NULL;
   _array_for_gc = NULL;
@@ -2573,6 +2589,12 @@ void JavaThread::deoptimized_wrt_marked_nmethods() {
   StackFrameStream fst(this, UseBiasedLocking);
   for(; !fst.is_done(); fst.next()) {
     if (fst.current()->should_be_deoptimized()) {
+      if (LogCompilation && xtty != NULL) {
+        nmethod* nm = fst.current()->cb()->as_nmethod_or_null();
+        xtty->elem("deoptimized thread='" UINTX_FORMAT "' compile_id='%d'",
+                   this->name(), nm != NULL ? nm->compile_id() : -1);
+      }
+
       Deoptimization::deoptimize(this, *fst.current(), fst.register_map());
     }
   }
@@ -2743,7 +2765,11 @@ void JavaThread::print_thread_state() const {
 void JavaThread::print_on(outputStream *st) const {
   st->print("\"%s\" ", get_thread_name());
   oop thread_oop = threadObj();
-  if (thread_oop != NULL && java_lang_Thread::is_daemon(thread_oop))  st->print("daemon ");
+  if (thread_oop != NULL) {
+    st->print("#" INT64_FORMAT " ", java_lang_Thread::thread_id(thread_oop));
+    if (java_lang_Thread::is_daemon(thread_oop))  st->print("daemon ");
+    st->print("prio=%d ", java_lang_Thread::priority(thread_oop));
+  }
   Thread::print_on(st);
   // print guess for valid stack memory region (assume 4K pages); helps lock debugging
   st->print_cr("[" INTPTR_FORMAT "]", (intptr_t)last_Java_sp() & ~right_n_bits(12));
@@ -3509,7 +3535,9 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
 #endif /* USDT2 */
 
   // record VM initialization completion time
+#if INCLUDE_MANAGEMENT
   Management::record_vm_init_completed();
+#endif // INCLUDE_MANAGEMENT
 
   // Compute system loader. Note that this has to occur after set_init_completed, since
   // valid exceptions may be thrown in the process.
@@ -3570,9 +3598,14 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
   }
 
   // initialize compiler(s)
+#if defined(COMPILER1) || defined(COMPILER2)
   CompileBroker::compilation_init();
+#endif
 
+#if INCLUDE_MANAGEMENT
   Management::initialize(THREAD);
+#endif // INCLUDE_MANAGEMENT
+
   if (HAS_PENDING_EXCEPTION) {
     // management agent fails to start possibly due to
     // configuration problem and is responsible for printing
@@ -3742,6 +3775,7 @@ void Threads::create_vm_init_agents() {
   AgentLibrary* agent;
 
   JvmtiExport::enter_onload_phase();
+
   for (agent = Arguments::agents(); agent != NULL; agent = agent->next()) {
     OnLoadEntry_t  on_load_entry = lookup_agent_on_load(agent);
 
@@ -4270,8 +4304,10 @@ void Threads::print_on(outputStream* st, bool print_stacks, bool internal_format
   st->cr();
   Universe::heap()->print_gc_threads_on(st);
   WatcherThread* wt = WatcherThread::watcher_thread();
-  if (wt != NULL) wt->print_on(st);
-  st->cr();
+  if (wt != NULL) {
+    wt->print_on(st);
+    st->cr();
+  }
   CompileBroker::print_compiler_threads_on(st);
   st->flush();
 }
diff --git a/hotspot/src/share/vm/runtime/thread.hpp b/hotspot/src/share/vm/runtime/thread.hpp
index 434afd9b289..ec2f7852fe0 100644
--- a/hotspot/src/share/vm/runtime/thread.hpp
+++ b/hotspot/src/share/vm/runtime/thread.hpp
@@ -41,7 +41,11 @@
 #include "runtime/stubRoutines.hpp"
 #include "runtime/threadLocalStorage.hpp"
 #include "runtime/unhandledOops.hpp"
+
+#if INCLUDE_NMT
 #include "services/memRecorder.hpp"
+#endif // INCLUDE_NMT
+
 #include "trace/tracing.hpp"
 #include "utilities/exceptions.hpp"
 #include "utilities/top.hpp"
@@ -1038,6 +1042,7 @@ class JavaThread: public Thread {
   bool do_not_unlock_if_synchronized()             { return _do_not_unlock_if_synchronized; }
   void set_do_not_unlock_if_synchronized(bool val) { _do_not_unlock_if_synchronized = val; }
 
+#if INCLUDE_NMT
   // native memory tracking
   inline MemRecorder* get_recorder() const          { return (MemRecorder*)_recorder; }
   inline void         set_recorder(MemRecorder* rc) { _recorder = (volatile MemRecorder*)rc; }
@@ -1045,6 +1050,7 @@ class JavaThread: public Thread {
  private:
   // per-thread memory recorder
   volatile MemRecorder* _recorder;
+#endif // INCLUDE_NMT
 
   // Suspend/resume support for JavaThread
  private:
diff --git a/hotspot/src/share/vm/runtime/timer.cpp b/hotspot/src/share/vm/runtime/timer.cpp
index 3afa77a8a88..640fb50fefb 100644
--- a/hotspot/src/share/vm/runtime/timer.cpp
+++ b/hotspot/src/share/vm/runtime/timer.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/runtime/vmStructs.cpp b/hotspot/src/share/vm/runtime/vmStructs.cpp
index 2866e57b457..51e3ab5f753 100644
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp
@@ -230,6 +230,15 @@ static inline uint64_t cast_uint64_t(size_t x)
   return x;
 }
 
+#if INCLUDE_JVMTI
+  #define JVMTI_STRUCTS(static_field) \
+    static_field(JvmtiExport,                     _can_access_local_variables,                  bool)                                  \
+    static_field(JvmtiExport,                     _can_hotswap_or_post_breakpoint,              bool)                                  \
+    static_field(JvmtiExport,                     _can_post_on_exceptions,                      bool)                                  \
+    static_field(JvmtiExport,                     _can_walk_any_space,                          bool)
+#else
+  #define JVMTI_STRUCTS(static_field)
+#endif // INCLUDE_JVMTI
 
 typedef HashtableEntry<intptr_t, mtInternal>  IntptrHashtableEntry;
 typedef Hashtable<intptr_t, mtInternal>       IntptrHashtable;
@@ -268,12 +277,12 @@ typedef TwoOopHashtable<Symbol*, mtClass>     SymbolTwoOopHashtable;
   volatile_nonstatic_field(oopDesc,            _metadata._klass,                              Klass*)                                \
   volatile_nonstatic_field(oopDesc,            _metadata._compressed_klass,                   narrowOop)                             \
      static_field(oopDesc,                     _bs,                                           BarrierSet*)                           \
-  nonstatic_field(arrayKlass,                  _dimension,                                    int)                                   \
-  volatile_nonstatic_field(arrayKlass,         _higher_dimension,                             Klass*)                                \
-  volatile_nonstatic_field(arrayKlass,         _lower_dimension,                              Klass*)                                \
-  nonstatic_field(arrayKlass,                  _vtable_len,                                   int)                                   \
-  nonstatic_field(arrayKlass,                  _alloc_size,                                   juint)                                 \
-  nonstatic_field(arrayKlass,                  _component_mirror,                             oop)                                   \
+  nonstatic_field(ArrayKlass,                  _dimension,                                    int)                                   \
+  volatile_nonstatic_field(ArrayKlass,         _higher_dimension,                             Klass*)                                \
+  volatile_nonstatic_field(ArrayKlass,         _lower_dimension,                              Klass*)                                \
+  nonstatic_field(ArrayKlass,                  _vtable_len,                                   int)                                   \
+  nonstatic_field(ArrayKlass,                  _alloc_size,                                   juint)                                 \
+  nonstatic_field(ArrayKlass,                  _component_mirror,                             oop)                                   \
   nonstatic_field(CompiledICHolder,     _holder_method,                                Method*)                        \
   nonstatic_field(CompiledICHolder,     _holder_klass,                                 Klass*)                                \
   nonstatic_field(ConstantPool,         _tags,                                         Array<u1>*)                            \
@@ -379,13 +388,13 @@ typedef TwoOopHashtable<Symbol*, mtClass>     SymbolTwoOopHashtable;
   nonstatic_field(ConstMethod,          _signature_index,                              u2)                                    \
   nonstatic_field(ConstMethod,          _method_idnum,                                 u2)                                    \
   nonstatic_field(ConstMethod,          _generic_signature_index,                      u2)                                    \
-  nonstatic_field(objArrayKlass,               _element_klass,                                Klass*)                                \
-  nonstatic_field(objArrayKlass,               _bottom_klass,                                 Klass*)                                \
+  nonstatic_field(ObjArrayKlass,               _element_klass,                                Klass*)                                \
+  nonstatic_field(ObjArrayKlass,               _bottom_klass,                                 Klass*)                                \
   volatile_nonstatic_field(Symbol,             _refcount,                                     int)                                   \
   nonstatic_field(Symbol,                      _identity_hash,                                int)                                   \
   nonstatic_field(Symbol,                      _length,                                       unsigned short)                        \
   unchecked_nonstatic_field(Symbol,            _body,                                         sizeof(jbyte)) /* NOTE: no type */     \
-  nonstatic_field(typeArrayKlass,              _max_length,                                   int)                                   \
+  nonstatic_field(TypeArrayKlass,              _max_length,                                   int)                                   \
                                                                                                                                      \
   /***********************/                                                                                                          \
   /* Constant Pool Cache */                                                                                                          \
@@ -454,6 +463,8 @@ typedef TwoOopHashtable<Symbol*, mtClass>     SymbolTwoOopHashtable;
      static_field(Universe,                    _narrow_oop._base,                             address)                               \
      static_field(Universe,                    _narrow_oop._shift,                            int)                                   \
      static_field(Universe,                    _narrow_oop._use_implicit_null_checks,         bool)                                  \
+     static_field(Universe,                    _narrow_klass._base,                           address)                               \
+     static_field(Universe,                    _narrow_klass._shift,                          int)                                   \
                                                                                                                                      \
   /**********************************************************************************/                                               \
   /* Generation and Space hierarchies                                               */                                               \
@@ -508,7 +519,7 @@ typedef TwoOopHashtable<Symbol*, mtClass>     SymbolTwoOopHashtable;
   nonstatic_field(ContiguousSpace,             _saved_mark_word,                              HeapWord*)                             \
                                                                                                                                      \
   nonstatic_field(DefNewGeneration,            _next_gen,                                     Generation*)                           \
-  nonstatic_field(DefNewGeneration,            _tenuring_threshold,                           int)                                   \
+  nonstatic_field(DefNewGeneration,            _tenuring_threshold,                           uint)                                   \
   nonstatic_field(DefNewGeneration,            _age_table,                                    ageTable)                              \
   nonstatic_field(DefNewGeneration,            _eden_space,                                   EdenSpace*)                            \
   nonstatic_field(DefNewGeneration,            _from_space,                                   ContiguousSpace*)                      \
@@ -1170,10 +1181,7 @@ typedef TwoOopHashtable<Symbol*, mtClass>     SymbolTwoOopHashtable;
   /* JVMTI */                                                                                                                        \
   /*************************/                                                                                                        \
                                                                                                                                      \
-  static_field(JvmtiExport,                     _can_access_local_variables,                  bool)                                  \
-  static_field(JvmtiExport,                     _can_hotswap_or_post_breakpoint,              bool)                                  \
-  static_field(JvmtiExport,                     _can_post_on_exceptions,                      bool)                                  \
-  static_field(JvmtiExport,                     _can_walk_any_space,                          bool)                                  \
+  JVMTI_STRUCTS(static_field)                                                                                                        \
                                                                                                                                      \
   /*************/                                                                                                                    \
   /* Arguments */                                                                                                                    \
@@ -1370,9 +1378,9 @@ typedef TwoOopHashtable<Symbol*, mtClass>     SymbolTwoOopHashtable;
   declare_toplevel_type(MetaspaceObj)                                     \
     declare_type(Metadata, MetaspaceObj)                                  \
     declare_type(Klass, Metadata)                                         \
-           declare_type(arrayKlass, Klass)                                \
-           declare_type(objArrayKlass, arrayKlass)                        \
-           declare_type(typeArrayKlass, arrayKlass)                       \
+           declare_type(ArrayKlass, Klass)                                \
+           declare_type(ObjArrayKlass, ArrayKlass)                        \
+           declare_type(TypeArrayKlass, ArrayKlass)                       \
       declare_type(InstanceKlass, Klass)                                  \
         declare_type(InstanceClassLoaderKlass, InstanceKlass)             \
         declare_type(InstanceMirrorKlass, InstanceKlass)                  \
@@ -1727,6 +1735,8 @@ typedef TwoOopHashtable<Symbol*, mtClass>     SymbolTwoOopHashtable;
   declare_c2_type(CMoveNNode, CMoveNode)                                  \
   declare_c2_type(EncodePNode, TypeNode)                                  \
   declare_c2_type(DecodeNNode, TypeNode)                                  \
+  declare_c2_type(EncodePKlassNode, TypeNode)                             \
+  declare_c2_type(DecodeNKlassNode, TypeNode)                             \
   declare_c2_type(ConstraintCastNode, TypeNode)                           \
   declare_c2_type(CastIINode, ConstraintCastNode)                         \
   declare_c2_type(CastPPNode, ConstraintCastNode)                         \
@@ -1823,6 +1833,7 @@ typedef TwoOopHashtable<Symbol*, mtClass>     SymbolTwoOopHashtable;
   declare_c2_type(StoreDNode, StoreNode)                                  \
   declare_c2_type(StorePNode, StoreNode)                                  \
   declare_c2_type(StoreNNode, StoreNode)                                  \
+  declare_c2_type(StoreNKlassNode, StoreNode)                             \
   declare_c2_type(StoreCMNode, StoreNode)                                 \
   declare_c2_type(LoadPLockedNode, LoadPNode)                             \
   declare_c2_type(SCMemProjNode, ProjNode)                                \
@@ -1905,6 +1916,8 @@ typedef TwoOopHashtable<Symbol*, mtClass>     SymbolTwoOopHashtable;
   declare_c2_type(SubVLNode, VectorNode)                                  \
   declare_c2_type(SubVFNode, VectorNode)                                  \
   declare_c2_type(SubVDNode, VectorNode)                                  \
+  declare_c2_type(MulVSNode, VectorNode)                                  \
+  declare_c2_type(MulVINode, VectorNode)                                  \
   declare_c2_type(MulVFNode, VectorNode)                                  \
   declare_c2_type(MulVDNode, VectorNode)                                  \
   declare_c2_type(DivVFNode, VectorNode)                                  \
@@ -1912,9 +1925,15 @@ typedef TwoOopHashtable<Symbol*, mtClass>     SymbolTwoOopHashtable;
   declare_c2_type(LShiftVBNode, VectorNode)                               \
   declare_c2_type(LShiftVSNode, VectorNode)                               \
   declare_c2_type(LShiftVINode, VectorNode)                               \
+  declare_c2_type(LShiftVLNode, VectorNode)                               \
   declare_c2_type(RShiftVBNode, VectorNode)                               \
   declare_c2_type(RShiftVSNode, VectorNode)                               \
   declare_c2_type(RShiftVINode, VectorNode)                               \
+  declare_c2_type(RShiftVLNode, VectorNode)                               \
+  declare_c2_type(URShiftVBNode, VectorNode)                              \
+  declare_c2_type(URShiftVSNode, VectorNode)                              \
+  declare_c2_type(URShiftVINode, VectorNode)                              \
+  declare_c2_type(URShiftVLNode, VectorNode)                              \
   declare_c2_type(AndVNode, VectorNode)                                   \
   declare_c2_type(OrVNode, VectorNode)                                    \
   declare_c2_type(XorVNode, VectorNode)                                   \
@@ -1937,6 +1956,8 @@ typedef TwoOopHashtable<Symbol*, mtClass>     SymbolTwoOopHashtable;
   declare_c2_type(Pack2DNode, PackNode)                                   \
   declare_c2_type(ExtractNode, Node)                                      \
   declare_c2_type(ExtractBNode, ExtractNode)                              \
+  declare_c2_type(ExtractUBNode, ExtractNode)                             \
+  declare_c2_type(ExtractCNode, ExtractNode)                              \
   declare_c2_type(ExtractSNode, ExtractNode)                              \
   declare_c2_type(ExtractINode, ExtractNode)                              \
   declare_c2_type(ExtractLNode, ExtractNode)                              \
@@ -2182,7 +2203,7 @@ typedef TwoOopHashtable<Symbol*, mtClass>     SymbolTwoOopHashtable;
   declare_constant(JVM_ACC_HAS_LOOPS)                                     \
   declare_constant(JVM_ACC_LOOPS_FLAG_INIT)                               \
   declare_constant(JVM_ACC_QUEUED)                                        \
-  declare_constant(JVM_ACC_NOT_OSR_COMPILABLE)                            \
+  declare_constant(JVM_ACC_NOT_C2_OSR_COMPILABLE)                         \
   declare_constant(JVM_ACC_HAS_LINE_NUMBER_TABLE)                         \
   declare_constant(JVM_ACC_HAS_CHECKED_EXCEPTIONS)                        \
   declare_constant(JVM_ACC_HAS_JSRS)                                      \
diff --git a/hotspot/src/share/vm/runtime/vmThread.hpp b/hotspot/src/share/vm/runtime/vmThread.hpp
index acf95842bf1..30e45ee265b 100644
--- a/hotspot/src/share/vm/runtime/vmThread.hpp
+++ b/hotspot/src/share/vm/runtime/vmThread.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/runtime/vm_version.cpp b/hotspot/src/share/vm/runtime/vm_version.cpp
index 2d51b6781ad..bb110ee1529 100644
--- a/hotspot/src/share/vm/runtime/vm_version.cpp
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,6 +45,10 @@
 const char* Abstract_VM_Version::_s_vm_release = Abstract_VM_Version::vm_release();
 const char* Abstract_VM_Version::_s_internal_vm_info_string = Abstract_VM_Version::internal_vm_info_string();
 bool Abstract_VM_Version::_supports_cx8 = false;
+bool Abstract_VM_Version::_supports_atomic_getset4 = false;
+bool Abstract_VM_Version::_supports_atomic_getset8 = false;
+bool Abstract_VM_Version::_supports_atomic_getadd4 = false;
+bool Abstract_VM_Version::_supports_atomic_getadd8 = false;
 unsigned int Abstract_VM_Version::_logical_processors_per_package = 1U;
 int Abstract_VM_Version::_reserve_for_allocation_prefetch = 0;
 
@@ -106,24 +110,26 @@ void Abstract_VM_Version::initialize() {
   #define VMLP ""
 #endif
 
-#ifdef KERNEL
-  #define VMTYPE "Kernel"
-#else // KERNEL
-#ifdef TIERED
-  #define VMTYPE "Server"
-#else // TIERED
-#ifdef ZERO
-#ifdef SHARK
-  #define VMTYPE "Shark"
-#else // SHARK
-  #define VMTYPE "Zero"
-#endif // SHARK
-#else // ZERO
-   #define VMTYPE COMPILER1_PRESENT("Client")   \
-                  COMPILER2_PRESENT("Server")
-#endif // ZERO
-#endif // TIERED
-#endif // KERNEL
+#ifndef VMTYPE
+  #ifdef KERNEL
+    #define VMTYPE "Kernel"
+  #else // KERNEL
+  #ifdef TIERED
+    #define VMTYPE "Server"
+  #else // TIERED
+  #ifdef ZERO
+  #ifdef SHARK
+    #define VMTYPE "Shark"
+  #else // SHARK
+    #define VMTYPE "Zero"
+  #endif // SHARK
+  #else // ZERO
+     #define VMTYPE COMPILER1_PRESENT("Client")   \
+                    COMPILER2_PRESENT("Server")
+  #endif // ZERO
+  #endif // TIERED
+  #endif // KERNEL
+#endif
 
 #ifndef HOTSPOT_VM_DISTRO
   #error HOTSPOT_VM_DISTRO must be defined
diff --git a/hotspot/src/share/vm/runtime/vm_version.hpp b/hotspot/src/share/vm/runtime/vm_version.hpp
index 0d35522b606..c901b260de5 100644
--- a/hotspot/src/share/vm/runtime/vm_version.hpp
+++ b/hotspot/src/share/vm/runtime/vm_version.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -37,6 +37,10 @@ class Abstract_VM_Version: AllStatic {
   static const char*  _s_internal_vm_info_string;
   // These are set by machine-dependent initializations
   static bool         _supports_cx8;
+  static bool         _supports_atomic_getset4;
+  static bool         _supports_atomic_getset8;
+  static bool         _supports_atomic_getadd4;
+  static bool         _supports_atomic_getadd8;
   static unsigned int _logical_processors_per_package;
   static int          _vm_major_version;
   static int          _vm_minor_version;
@@ -75,6 +79,13 @@ class Abstract_VM_Version: AllStatic {
 
   // does HW support an 8-byte compare-exchange operation?
   static bool supports_cx8()  {return _supports_cx8;}
+  // does HW support atomic get-and-set or atomic get-and-add?  Used
+  // to guide intrinsification decisions for Unsafe atomic ops
+  static bool supports_atomic_getset4()  {return _supports_atomic_getset4;}
+  static bool supports_atomic_getset8()  {return _supports_atomic_getset8;}
+  static bool supports_atomic_getadd4()  {return _supports_atomic_getadd4;}
+  static bool supports_atomic_getadd8()  {return _supports_atomic_getadd8;}
+
   static unsigned int logical_processors_per_package() {
     return _logical_processors_per_package;
   }
diff --git a/hotspot/src/share/vm/services/attachListener.cpp b/hotspot/src/share/vm/services/attachListener.cpp
index 91378b5d78c..983f3f95fe1 100644
--- a/hotspot/src/share/vm/services/attachListener.cpp
+++ b/hotspot/src/share/vm/services/attachListener.cpp
@@ -88,7 +88,7 @@ static jint get_properties(AttachOperation* op, outputStream* out, Symbol* seria
   // The result should be a [B
   oop res = (oop)result.get_jobject();
   assert(res->is_typeArray(), "just checking");
-  assert(typeArrayKlass::cast(res->klass())->element_type() == T_BYTE, "just checking");
+  assert(TypeArrayKlass::cast(res->klass())->element_type() == T_BYTE, "just checking");
 
   // copy the bytes to the output stream
   typeArrayOop ba = typeArrayOop(res);
diff --git a/hotspot/src/share/vm/services/attachListener.hpp b/hotspot/src/share/vm/services/attachListener.hpp
index e39c3fde3f9..1916e8cacb8 100644
--- a/hotspot/src/share/vm/services/attachListener.hpp
+++ b/hotspot/src/share/vm/services/attachListener.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,21 +52,21 @@ struct AttachOperationFunctionInfo {
 
 class AttachListener: AllStatic {
  public:
-  static void init()  KERNEL_RETURN;
-  static void abort() KERNEL_RETURN;
+  static void init()  NOT_SERVICES_RETURN;
+  static void abort() NOT_SERVICES_RETURN;
 
   // invoke to perform clean-up tasks when all clients detach
-  static void detachall() KERNEL_RETURN;
+  static void detachall() NOT_SERVICES_RETURN;
 
   // indicates if the Attach Listener needs to be created at startup
-  static bool init_at_startup() KERNEL_RETURN_(false);
+  static bool init_at_startup() NOT_SERVICES_RETURN_(false);
 
   // indicates if we have a trigger to start the Attach Listener
-  static bool is_init_trigger() KERNEL_RETURN_(false);
+  static bool is_init_trigger() NOT_SERVICES_RETURN_(false);
 
-#ifdef SERVICES_KERNEL
+#if !INCLUDE_SERVICES
   static bool is_attach_supported()             { return false; }
-#else // SERVICES_KERNEL
+#else
  private:
   static volatile bool _initialized;
 
@@ -94,10 +94,10 @@ class AttachListener: AllStatic {
 
   // dequeue the next operation
   static AttachOperation* dequeue();
-#endif // SERVICES_KERNEL
+#endif // !INCLUDE_SERVICES
 };
 
-#ifndef SERVICES_KERNEL
+#if INCLUDE_SERVICES
 class AttachOperation: public CHeapObj<mtInternal> {
  public:
   enum {
@@ -151,6 +151,6 @@ class AttachOperation: public CHeapObj<mtInternal> {
   // complete operation by sending result code and any result data to the client
   virtual void complete(jint result, bufferedStream* result_stream) = 0;
 };
-#endif // SERVICES_KERNEL
+#endif // INCLUDE_SERVICES
 
 #endif // SHARE_VM_SERVICES_ATTACHLISTENER_HPP
diff --git a/hotspot/src/share/vm/services/classLoadingService.cpp b/hotspot/src/share/vm/services/classLoadingService.cpp
index 071e9f2fed4..04dfca89211 100644
--- a/hotspot/src/share/vm/services/classLoadingService.cpp
+++ b/hotspot/src/share/vm/services/classLoadingService.cpp
@@ -78,6 +78,7 @@ HS_DTRACE_PROBE_DECL4(hotspot, class__unloaded, char*, int, oop, bool);
 
 #endif
 
+#if INCLUDE_MANAGEMENT
 // counters for classes loaded from class files
 PerfCounter*    ClassLoadingService::_classes_loaded_count = NULL;
 PerfCounter*    ClassLoadingService::_classes_unloaded_count = NULL;
@@ -239,3 +240,5 @@ LoadedClassesEnumerator::LoadedClassesEnumerator(Thread* cur_thread) {
   // FIXME: Exclude array klasses for now
   // Universe::basic_type_classes_do(&add_loaded_class);
 }
+
+#endif // INCLUDE_MANAGEMENT
diff --git a/hotspot/src/share/vm/services/classLoadingService.hpp b/hotspot/src/share/vm/services/classLoadingService.hpp
index 6d1405b0af8..a18534d4759 100644
--- a/hotspot/src/share/vm/services/classLoadingService.hpp
+++ b/hotspot/src/share/vm/services/classLoadingService.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -55,7 +55,7 @@ public:
 
   static bool get_verbose() { return TraceClassLoading; }
   static bool set_verbose(bool verbose);
-  static void reset_trace_class_unloading();
+  static void reset_trace_class_unloading() NOT_MANAGEMENT_RETURN;
 
   static jlong loaded_class_count() {
     return _classes_loaded_count->get_value() + _shared_classes_loaded_count->get_value();
@@ -102,13 +102,16 @@ public:
     return (UsePerfData ? _class_methods_size->get_value() : -1);
   }
 
-  static void notify_class_loaded(InstanceKlass* k, bool shared_class);
+  static void notify_class_loaded(InstanceKlass* k, bool shared_class)
+      NOT_MANAGEMENT_RETURN;
   // All unloaded classes are non-shared
-  static void notify_class_unloaded(InstanceKlass* k);
+  static void notify_class_unloaded(InstanceKlass* k) NOT_MANAGEMENT_RETURN;
   static void add_class_method_size(int size) {
+#if INCLUDE_MANAGEMENT
     if (UsePerfData) {
       _class_methods_size->inc(size);
     }
+#endif // INCLUDE_MANAGEMENT
   }
 };
 
diff --git a/hotspot/src/share/vm/services/diagnosticCommand.cpp b/hotspot/src/share/vm/services/diagnosticCommand.cpp
index 9be87ee3dc0..52a098a2613 100644
--- a/hotspot/src/share/vm/services/diagnosticCommand.cpp
+++ b/hotspot/src/share/vm/services/diagnosticCommand.cpp
@@ -43,9 +43,9 @@ void DCmdRegistrant::register_dcmds(){
   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<VMUptimeDCmd>(true, false));
   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<SystemGCDCmd>(true, false));
   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<RunFinalizationDCmd>(true, false));
-#ifndef SERVICES_KERNEL   // Heap dumping not supported
+#if INCLUDE_SERVICES // Heap dumping supported
   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<HeapDumpDCmd>(true, false));
-#endif // SERVICES_KERNEL
+#endif // INCLUDE_SERVICES
   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ClassHistogramDCmd>(true, false));
   DCmdFactory::register_DCmdFactory(new DCmdFactoryImpl<ThreadDumpDCmd>(true, false));
 
@@ -204,7 +204,7 @@ void PrintSystemPropertiesDCmd::execute(TRAPS) {
   // The result should be a [B
   oop res = (oop)result.get_jobject();
   assert(res->is_typeArray(), "just checking");
-  assert(typeArrayKlass::cast(res->klass())->element_type() == T_BYTE, "just checking");
+  assert(TypeArrayKlass::cast(res->klass())->element_type() == T_BYTE, "just checking");
 
   // copy the bytes to the output stream
   typeArrayOop ba = typeArrayOop(res);
@@ -252,7 +252,7 @@ void RunFinalizationDCmd::execute(TRAPS) {
                          vmSymbols::void_method_signature(), CHECK);
 }
 
-#ifndef SERVICES_KERNEL   // Heap dumping not supported
+#if INCLUDE_SERVICES // Heap dumping supported
 HeapDumpDCmd::HeapDumpDCmd(outputStream* output, bool heap) :
                            DCmdWithParser(output, heap),
   _filename("filename","Name of the dump file", "STRING",true),
@@ -292,7 +292,7 @@ int HeapDumpDCmd::num_arguments() {
     return 0;
   }
 }
-#endif // SERVICES_KERNEL
+#endif // INCLUDE_SERVICES
 
 ClassHistogramDCmd::ClassHistogramDCmd(outputStream* output, bool heap) :
                                        DCmdWithParser(output, heap),
diff --git a/hotspot/src/share/vm/services/diagnosticCommand.hpp b/hotspot/src/share/vm/services/diagnosticCommand.hpp
index cf4134f4123..99d75a92f33 100644
--- a/hotspot/src/share/vm/services/diagnosticCommand.hpp
+++ b/hotspot/src/share/vm/services/diagnosticCommand.hpp
@@ -155,7 +155,7 @@ public:
     virtual void execute(TRAPS);
 };
 
-#ifndef SERVICES_KERNEL   // Heap dumping not supported
+#if INCLUDE_SERVICES   // Heap dumping supported
 // See also: dump_heap in attachListener.cpp
 class HeapDumpDCmd : public DCmdWithParser {
 protected:
@@ -176,7 +176,7 @@ public:
   static int num_arguments();
   virtual void execute(TRAPS);
 };
-#endif // SERVICES_KERNEL
+#endif // INCLUDE_SERVICES
 
 // See also: inspeactheap in attachListener.cpp
 class ClassHistogramDCmd : public DCmdWithParser {
diff --git a/hotspot/src/share/vm/services/g1MemoryPool.cpp b/hotspot/src/share/vm/services/g1MemoryPool.cpp
index af862372f80..61411ce4128 100644
--- a/hotspot/src/share/vm/services/g1MemoryPool.cpp
+++ b/hotspot/src/share/vm/services/g1MemoryPool.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/services/g1MemoryPool.hpp b/hotspot/src/share/vm/services/g1MemoryPool.hpp
index 912e747b094..c84ecb2d555 100644
--- a/hotspot/src/share/vm/services/g1MemoryPool.hpp
+++ b/hotspot/src/share/vm/services/g1MemoryPool.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/services/heapDumper.cpp b/hotspot/src/share/vm/services/heapDumper.cpp
index 64f0251b661..fe3f50df64a 100644
--- a/hotspot/src/share/vm/services/heapDumper.cpp
+++ b/hotspot/src/share/vm/services/heapDumper.cpp
@@ -933,7 +933,7 @@ void DumperSupport::dump_class_and_array_classes(DumpWriter* writer, Klass* k) {
   k = klass->array_klass_or_null();
   while (k != NULL) {
     Klass* klass = Klass::cast(k);
-    assert(klass->oop_is_objArray(), "not an objArrayKlass");
+    assert(klass->oop_is_objArray(), "not an ObjArrayKlass");
 
     writer->write_u1(HPROF_GC_CLASS_DUMP);
     writer->write_classID(klass);
@@ -1016,7 +1016,7 @@ void DumperSupport::dump_object_array(DumpWriter* writer, objArrayOop array) {
 
 // creates HPROF_GC_PRIM_ARRAY_DUMP record for the given type array
 void DumperSupport::dump_prim_array(DumpWriter* writer, typeArrayOop array) {
-  BasicType type = typeArrayKlass::cast(array->klass())->element_type();
+  BasicType type = TypeArrayKlass::cast(array->klass())->element_type();
 
   writer->write_u1(HPROF_GC_PRIM_ARRAY_DUMP);
   writer->write_objectID(array);
diff --git a/hotspot/src/share/vm/services/heapDumper.hpp b/hotspot/src/share/vm/services/heapDumper.hpp
index 94cb24d3130..0bf6ba7bec7 100644
--- a/hotspot/src/share/vm/services/heapDumper.hpp
+++ b/hotspot/src/share/vm/services/heapDumper.hpp
@@ -76,9 +76,9 @@ class HeapDumper : public StackObj {
   // returns error message (resource allocated), or NULL if no error
   char* error_as_C_string() const;
 
-  static void dump_heap()    KERNEL_RETURN;
+  static void dump_heap()    NOT_SERVICES_RETURN;
 
-  static void dump_heap_from_oome()    KERNEL_RETURN;
+  static void dump_heap_from_oome()    NOT_SERVICES_RETURN;
 };
 
 #endif // SHARE_VM_SERVICES_HEAPDUMPER_HPP
diff --git a/hotspot/src/share/vm/services/lowMemoryDetector.hpp b/hotspot/src/share/vm/services/lowMemoryDetector.hpp
index 311a3a418f6..3dda4f1ba5a 100644
--- a/hotspot/src/share/vm/services/lowMemoryDetector.hpp
+++ b/hotspot/src/share/vm/services/lowMemoryDetector.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/services/management.cpp b/hotspot/src/share/vm/services/management.cpp
index d44499f0a7a..2a95468e70f 100644
--- a/hotspot/src/share/vm/services/management.cpp
+++ b/hotspot/src/share/vm/services/management.cpp
@@ -72,12 +72,22 @@ jmmOptionalSupport Management::_optional_support = {0};
 TimeStamp Management::_stamp;
 
 void management_init() {
+#if INCLUDE_MANAGEMENT
   Management::init();
   ThreadService::init();
   RuntimeService::init();
   ClassLoadingService::init();
+#else
+  ThreadService::init();
+  // Make sure the VM version is initialized
+  // This is normally called by RuntimeService::init().
+  // Since that is conditionalized out, we need to call it here.
+  Abstract_VM_Version::initialize();
+#endif // INCLUDE_MANAGEMENT
 }
 
+#if INCLUDE_MANAGEMENT
+
 void Management::init() {
   EXCEPTION_MARK;
 
@@ -112,10 +122,10 @@ void Management::init() {
 
   _optional_support.isBootClassPathSupported = 1;
   _optional_support.isObjectMonitorUsageSupported = 1;
-#ifndef SERVICES_KERNEL
+#if INCLUDE_SERVICES
   // This depends on the heap inspector
   _optional_support.isSynchronizerUsageSupported = 1;
-#endif // SERVICES_KERNEL
+#endif // INCLUDE_SERVICES
   _optional_support.isThreadAllocatedMemorySupported = 1;
 
   // Registration of the diagnostic commands
@@ -426,7 +436,7 @@ static void validate_thread_id_array(typeArrayHandle ids_ah, TRAPS) {
 static void validate_thread_info_array(objArrayHandle infoArray_h, TRAPS) {
   // check if the element of infoArray is of type ThreadInfo class
   Klass* threadinfo_klass = Management::java_lang_management_ThreadInfo_klass(CHECK);
-  Klass* element_klass = objArrayKlass::cast(infoArray_h->klass())->element_klass();
+  Klass* element_klass = ObjArrayKlass::cast(infoArray_h->klass())->element_klass();
   if (element_klass != threadinfo_klass) {
     THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
               "infoArray element type is not ThreadInfo class");
@@ -1715,7 +1725,7 @@ JVM_ENTRY(jint, jmm_GetVMGlobals(JNIEnv *env,
     objArrayOop ta = objArrayOop(JNIHandles::resolve_non_null(names));
     objArrayHandle names_ah(THREAD, ta);
     // Make sure we have a String array
-    Klass* element_klass = objArrayKlass::cast(names_ah->klass())->element_klass();
+    Klass* element_klass = ObjArrayKlass::cast(names_ah->klass())->element_klass();
     if (element_klass != SystemDictionary::String_klass()) {
       THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(),
                  "Array element type is not String class", 0);
@@ -1804,31 +1814,37 @@ JVM_END
 
 class ThreadTimesClosure: public ThreadClosure {
  private:
-  objArrayOop _names;
+  objArrayHandle _names_strings;
+  char **_names_chars;
   typeArrayOop _times;
   int _names_len;
   int _times_len;
   int _count;
 
  public:
-  ThreadTimesClosure(objArrayOop names, typeArrayOop times);
+  ThreadTimesClosure(objArrayHandle names, typeArrayOop times);
+  ~ThreadTimesClosure();
   virtual void do_thread(Thread* thread);
+  void do_unlocked();
   int count() { return _count; }
 };
 
-ThreadTimesClosure::ThreadTimesClosure(objArrayOop names,
+ThreadTimesClosure::ThreadTimesClosure(objArrayHandle names,
                                        typeArrayOop times) {
-  assert(names != NULL, "names was NULL");
+  assert(names() != NULL, "names was NULL");
   assert(times != NULL, "times was NULL");
-  _names = names;
+  _names_strings = names;
   _names_len = names->length();
+  _names_chars = NEW_C_HEAP_ARRAY(char*, _names_len, mtInternal);
   _times = times;
   _times_len = times->length();
   _count = 0;
 }
 
+//
+// Called with Threads_lock held
+//
 void ThreadTimesClosure::do_thread(Thread* thread) {
-  Handle s;
   assert(thread != NULL, "thread was NULL");
 
   // exclude externally visible JavaThreads
@@ -1842,16 +1858,32 @@ void ThreadTimesClosure::do_thread(Thread* thread) {
   }
 
   EXCEPTION_MARK;
+  ResourceMark rm(THREAD); // thread->name() uses ResourceArea
 
   assert(thread->name() != NULL, "All threads should have a name");
-  s = java_lang_String::create_from_str(thread->name(), CHECK);
-  _names->obj_at_put(_count, s());
-
+  _names_chars[_count] = strdup(thread->name());
   _times->long_at_put(_count, os::is_thread_cpu_time_supported() ?
                         os::thread_cpu_time(thread) : -1);
   _count++;
 }
 
+// Called without Threads_lock, we can allocate String objects.
+void ThreadTimesClosure::do_unlocked() {
+
+  EXCEPTION_MARK;
+  for (int i = 0; i < _count; i++) {
+    Handle s = java_lang_String::create_from_str(_names_chars[i],  CHECK);
+    _names_strings->obj_at_put(i, s());
+  }
+}
+
+ThreadTimesClosure::~ThreadTimesClosure() {
+  for (int i = 0; i < _count; i++) {
+    free(_names_chars[i]);
+  }
+  FREE_C_HEAP_ARRAY(char *, _names_chars, mtInternal);
+}
+
 // Fills names with VM internal thread names and times with the corresponding
 // CPU times.  If names or times is NULL, a NullPointerException is thrown.
 // If the element type of names is not String, an IllegalArgumentException is
@@ -1869,7 +1901,7 @@ JVM_ENTRY(jint, jmm_GetInternalThreadTimes(JNIEnv *env,
   objArrayHandle names_ah(THREAD, na);
 
   // Make sure we have a String array
-  Klass* element_klass = objArrayKlass::cast(names_ah->klass())->element_klass();
+  Klass* element_klass = ObjArrayKlass::cast(names_ah->klass())->element_klass();
   if (element_klass != SystemDictionary::String_klass()) {
     THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(),
                "Array element type is not String class", 0);
@@ -1878,12 +1910,12 @@ JVM_ENTRY(jint, jmm_GetInternalThreadTimes(JNIEnv *env,
   typeArrayOop ta = typeArrayOop(JNIHandles::resolve_non_null(times));
   typeArrayHandle times_ah(THREAD, ta);
 
-  ThreadTimesClosure ttc(names_ah(), times_ah());
+  ThreadTimesClosure ttc(names_ah, times_ah());
   {
     MutexLockerEx ml(Threads_lock);
     Threads::threads_do(&ttc);
   }
-
+  ttc.do_unlocked();
   return ttc.count();
 JVM_END
 
@@ -1986,7 +2018,7 @@ static objArrayOop get_memory_usage_objArray(jobjectArray array, int length, TRA
 
   // check if the element of array is of type MemoryUsage class
   Klass* usage_klass = Management::java_lang_management_MemoryUsage_klass(CHECK_0);
-  Klass* element_klass = objArrayKlass::cast(array_h->klass())->element_klass();
+  Klass* element_klass = ObjArrayKlass::cast(array_h->klass())->element_klass();
   if (element_klass != usage_klass) {
     THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(),
                "The element type is not MemoryUsage class", 0);
@@ -2086,7 +2118,7 @@ JVM_END
 
 // Dump heap - Returns 0 if succeeds.
 JVM_ENTRY(jint, jmm_DumpHeap0(JNIEnv *env, jstring outputfile, jboolean live))
-#ifndef SERVICES_KERNEL
+#if INCLUDE_SERVICES
   ResourceMark rm(THREAD);
   oop on = JNIHandles::resolve_external_guard(outputfile);
   if (on == NULL) {
@@ -2104,9 +2136,9 @@ JVM_ENTRY(jint, jmm_DumpHeap0(JNIEnv *env, jstring outputfile, jboolean live))
     THROW_MSG_(vmSymbols::java_io_IOException(), errmsg, -1);
   }
   return 0;
-#else  // SERVICES_KERNEL
+#else  // INCLUDE_SERVICES
   return -1;
-#endif // SERVICES_KERNEL
+#endif // INCLUDE_SERVICES
 JVM_END
 
 JVM_ENTRY(jobjectArray, jmm_GetDiagnosticCommands(JNIEnv *env))
@@ -2134,7 +2166,7 @@ JVM_ENTRY(void, jmm_GetDiagnosticCommandInfo(JNIEnv *env, jobjectArray cmds,
   objArrayHandle cmds_ah(THREAD, ca);
 
   // Make sure we have a String array
-  Klass* element_klass = objArrayKlass::cast(cmds_ah->klass())->element_klass();
+  Klass* element_klass = ObjArrayKlass::cast(cmds_ah->klass())->element_klass();
   if (element_klass != SystemDictionary::String_klass()) {
     THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
                "Array element type is not String class");
@@ -2273,10 +2305,13 @@ const struct jmmInterface_1_ jmm_interface = {
   jmm_GetDiagnosticCommandArgumentsInfo,
   jmm_ExecuteDiagnosticCommand
 };
+#endif // INCLUDE_MANAGEMENT
 
 void* Management::get_jmm_interface(int version) {
+#if INCLUDE_MANAGEMENT
   if (version == JMM_VERSION_1_0) {
     return (void*) &jmm_interface;
   }
+#endif // INCLUDE_MANAGEMENT
   return NULL;
 }
diff --git a/hotspot/src/share/vm/services/management.hpp b/hotspot/src/share/vm/services/management.hpp
index 96f2f583b60..74fcb5b4ca1 100644
--- a/hotspot/src/share/vm/services/management.hpp
+++ b/hotspot/src/share/vm/services/management.hpp
@@ -58,16 +58,17 @@ public:
   static void init();
   static void initialize(TRAPS);
 
-  static jlong ticks_to_ms(jlong ticks);
-  static jlong timestamp();
+  static jlong ticks_to_ms(jlong ticks) NOT_MANAGEMENT_RETURN_(0L);
+  static jlong timestamp() NOT_MANAGEMENT_RETURN_(0L);
 
-  static void  oops_do(OopClosure* f);
+  static void  oops_do(OopClosure* f) NOT_MANAGEMENT_RETURN;
   static void* get_jmm_interface(int version);
   static void  get_optional_support(jmmOptionalSupport* support);
 
   static void get_loaded_classes(JavaThread* cur_thread, GrowableArray<KlassHandle>* klass_handle_array);
 
-  static void  record_vm_startup_time(jlong begin, jlong duration);
+  static void  record_vm_startup_time(jlong begin, jlong duration)
+      NOT_MANAGEMENT_RETURN;
   static void  record_vm_init_completed() {
     // Initialize the timestamp to get the current time
     _vm_init_done_time->set_value(os::javaTimeMillis());
@@ -85,14 +86,19 @@ public:
 
   // methods to return a Klass*.
   static Klass* java_lang_management_ThreadInfo_klass(TRAPS);
-  static Klass* java_lang_management_MemoryUsage_klass(TRAPS);
+  static Klass* java_lang_management_MemoryUsage_klass(TRAPS)
+      NOT_MANAGEMENT_RETURN_(NULL);
   static Klass* java_lang_management_MemoryPoolMXBean_klass(TRAPS);
   static Klass* java_lang_management_MemoryManagerMXBean_klass(TRAPS);
   static Klass* java_lang_management_GarbageCollectorMXBean_klass(TRAPS);
-  static Klass* sun_management_Sensor_klass(TRAPS);
-  static Klass* sun_management_ManagementFactory_klass(TRAPS);
-  static Klass* sun_management_GarbageCollectorImpl_klass(TRAPS);
-  static Klass* com_sun_management_GcInfo_klass(TRAPS);
+  static Klass* sun_management_Sensor_klass(TRAPS)
+      NOT_MANAGEMENT_RETURN_(NULL);
+  static Klass* sun_management_ManagementFactory_klass(TRAPS)
+      NOT_MANAGEMENT_RETURN_(NULL);
+  static Klass* sun_management_GarbageCollectorImpl_klass(TRAPS)
+      NOT_MANAGEMENT_RETURN_(NULL);
+  static Klass* com_sun_management_GcInfo_klass(TRAPS)
+      NOT_MANAGEMENT_RETURN_(NULL);
 
   static instanceOop create_thread_info_instance(ThreadSnapshot* snapshot, TRAPS);
   static instanceOop create_thread_info_instance(ThreadSnapshot* snapshot, objArrayHandle monitors_array, typeArrayHandle depths_array, objArrayHandle synchronizers_array, TRAPS);
diff --git a/hotspot/src/share/vm/services/memReporter.hpp b/hotspot/src/share/vm/services/memReporter.hpp
index 4ce64ba2d31..4595b2797b3 100644
--- a/hotspot/src/share/vm/services/memReporter.hpp
+++ b/hotspot/src/share/vm/services/memReporter.hpp
@@ -30,6 +30,8 @@
 #include "services/memTracker.hpp"
 #include "utilities/ostream.hpp"
 
+#if INCLUDE_NMT
+
 /*
  * MemBaselineReporter reports data to this outputer class,
  * ReportOutputer is responsible for format, store and redirect
@@ -265,4 +267,6 @@ class BaselineTTYOutputer : public BaselineOutputer {
 };
 
 
+#endif // INCLUDE_NMT
+
 #endif // SHARE_VM_SERVICES_MEM_REPORTER_HPP
diff --git a/hotspot/src/share/vm/services/memTracker.cpp b/hotspot/src/share/vm/services/memTracker.cpp
index befee59858f..2af6e10d627 100644
--- a/hotspot/src/share/vm/services/memTracker.cpp
+++ b/hotspot/src/share/vm/services/memTracker.cpp
@@ -71,8 +71,13 @@ void MemTracker::init_tracking_options(const char* option_line) {
   _tracking_level = NMT_off;
   if (strncmp(option_line, "=summary", 8) == 0) {
     _tracking_level = NMT_summary;
-  } else if (strncmp(option_line, "=detail", 8) == 0) {
+  } else if (strncmp(option_line, "=detail", 7) == 0) {
     _tracking_level = NMT_detail;
+  } else {
+    char msg[255];
+    //+1 to remove the '=' character
+    jio_snprintf(msg, 255, "Unknown option given to XX:NativeMemoryTracking: %s", option_line+1);
+    vm_exit_during_initialization(msg, NULL);
   }
 }
 
@@ -341,6 +346,7 @@ void MemTracker::release_thread_recorder(MemRecorder* rec) {
  */
 void MemTracker::create_memory_record(address addr, MEMFLAGS flags,
     size_t size, address pc, Thread* thread) {
+  assert(addr != NULL, "Sanity check");
   if (!shutdown_in_progress()) {
     // single thread, we just write records direct to global recorder,'
     // with any lock
diff --git a/hotspot/src/share/vm/services/memTracker.hpp b/hotspot/src/share/vm/services/memTracker.hpp
index c565e9e072c..62637d8a8a5 100644
--- a/hotspot/src/share/vm/services/memTracker.hpp
+++ b/hotspot/src/share/vm/services/memTracker.hpp
@@ -25,6 +25,80 @@
 #ifndef SHARE_VM_SERVICES_MEM_TRACKER_HPP
 #define SHARE_VM_SERVICES_MEM_TRACKER_HPP
 
+#include "utilities/macros.hpp"
+
+#if !INCLUDE_NMT
+
+#include "utilities/ostream.hpp"
+
+class BaselineOutputer : public StackObj {
+
+};
+
+class BaselineTTYOutputer : public BaselineOutputer {
+  public:
+    BaselineTTYOutputer(outputStream* st) { }
+};
+
+class MemTracker : AllStatic {
+  public:
+   enum ShutdownReason {
+      NMT_shutdown_none,     // no shutdown requested
+      NMT_shutdown_user,     // user requested shutdown
+      NMT_normal,            // normal shutdown, process exit
+      NMT_out_of_memory,     // shutdown due to out of memory
+      NMT_initialization,    // shutdown due to initialization failure
+      NMT_use_malloc_only,   // can not combine NMT with UseMallocOnly flag
+      NMT_error_reporting,   // shutdown by vmError::report_and_die()
+      NMT_out_of_generation, // running out of generation queue
+      NMT_sequence_overflow  // overflow the sequence number
+   };
+
+
+  public:
+   static inline void init_tracking_options(const char* option_line) { }
+   static inline bool is_on()   { return false; }
+   static const char* reason()  { return "Native memory tracking is not implemented"; }
+   static inline bool can_walk_stack() { return false; }
+
+   static inline void bootstrap_single_thread() { }
+   static inline void bootstrap_multi_thread() { }
+   static inline void start() { }
+
+   static inline void record_malloc(address addr, size_t size, MEMFLAGS flags,
+        address pc = 0, Thread* thread = NULL) { }
+   static inline void record_free(address addr, MEMFLAGS flags, Thread* thread = NULL) { }
+   static inline void record_realloc(address old_addr, address new_addr, size_t size,
+        MEMFLAGS flags, address pc = 0, Thread* thread = NULL) { }
+   static inline void record_arena_size(address addr, size_t size) { }
+   static inline void record_virtual_memory_reserve(address addr, size_t size,
+        address pc = 0, Thread* thread = NULL) { }
+   static inline void record_virtual_memory_commit(address addr, size_t size,
+        address pc = 0, Thread* thread = NULL) { }
+   static inline void record_virtual_memory_uncommit(address addr, size_t size,
+        Thread* thread = NULL) { }
+   static inline void record_virtual_memory_release(address addr, size_t size,
+        Thread* thread = NULL) { }
+   static inline void record_virtual_memory_type(address base, MEMFLAGS flags,
+        Thread* thread = NULL) { }
+   static inline bool baseline() { return false; }
+   static inline bool has_baseline() { return false; }
+
+   static void shutdown(ShutdownReason reason) { }
+   static inline bool shutdown_in_progress() {  }
+   static bool print_memory_usage(BaselineOutputer& out, size_t unit,
+            bool summary_only = true) { }
+   static bool compare_memory_usage(BaselineOutputer& out, size_t unit,
+            bool summary_only = true) { }
+
+   static inline void sync() { }
+   static inline void thread_exiting(JavaThread* thread) { }
+
+};
+
+
+#else // !INCLUDE_NMT
+
 #include "memory/allocation.hpp"
 #include "runtime/globals.hpp"
 #include "runtime/mutex.hpp"
@@ -85,7 +159,7 @@ class MemTracker : AllStatic {
     NMT_shutdown                         // shutdown
   };
 
-
+ public:
   // native memory tracking level
   enum NMTLevel {
     NMT_off,              // native memory tracking is off
@@ -93,7 +167,6 @@ class MemTracker : AllStatic {
     NMT_detail            // track callsite also
   };
 
- public:
    enum ShutdownReason {
      NMT_shutdown_none,     // no shutdown requested
      NMT_shutdown_user,     // user requested shutdown
@@ -117,6 +190,10 @@ class MemTracker : AllStatic {
       _state >= NMT_bootstrapping_single_thread);
   }
 
+  static inline enum NMTLevel tracking_level() {
+    return _tracking_level;
+  }
+
   // user readable reason for shutting down NMT
   static const char* reason() {
     switch(_reason) {
@@ -185,6 +262,7 @@ class MemTracker : AllStatic {
   static inline void record_malloc(address addr, size_t size, MEMFLAGS flags,
                             address pc = 0, Thread* thread = NULL) {
     if (NMT_CAN_TRACK(flags)) {
+      assert(size > 0, "Sanity check");
       create_memory_record(addr, (flags|MemPointerRecord::malloc_tag()), size, pc, thread);
     }
   }
@@ -198,6 +276,7 @@ class MemTracker : AllStatic {
   static inline void record_realloc(address old_addr, address new_addr, size_t size,
        MEMFLAGS flags, address pc = 0, Thread* thread = NULL) {
     if (is_on()) {
+      assert(size > 0, "Sanity check");
       record_free(old_addr, flags, thread);
       record_malloc(new_addr, size, flags, pc, thread);
     }
@@ -208,6 +287,7 @@ class MemTracker : AllStatic {
     // we add a positive offset to arena address, so we can have arena size record
     // sorted after arena record
     if (is_on() && !UseMallocOnly) {
+      assert(addr != NULL, "Sanity check");
       create_memory_record((addr + sizeof(void*)), MemPointerRecord::arena_size_tag(), size,
         0, NULL);
     }
@@ -217,7 +297,7 @@ class MemTracker : AllStatic {
   static inline void record_virtual_memory_reserve(address addr, size_t size,
                             address pc = 0, Thread* thread = NULL) {
     if (is_on()) {
-      assert(size > 0, "reserve szero size");
+      assert(size > 0, "Sanity check");
       create_memory_record(addr, MemPointerRecord::virtual_memory_reserve_tag(),
                            size, pc, thread);
     }
@@ -248,6 +328,7 @@ class MemTracker : AllStatic {
   static inline void record_virtual_memory_commit(address addr, size_t size,
                             address pc = 0, Thread* thread = NULL) {
     if (is_on()) {
+      assert(size > 0, "Sanity check");
       create_memory_record(addr, MemPointerRecord::virtual_memory_commit_tag(),
                            size, DEBUG_CALLER_PC, thread);
     }
@@ -257,6 +338,7 @@ class MemTracker : AllStatic {
   static inline void record_virtual_memory_uncommit(address addr, size_t size,
                             Thread* thread = NULL) {
     if (is_on()) {
+      assert(size > 0, "Sanity check");
       create_memory_record(addr, MemPointerRecord::virtual_memory_uncommit_tag(),
                            size, DEBUG_CALLER_PC, thread);
     }
@@ -266,6 +348,7 @@ class MemTracker : AllStatic {
   static inline void record_virtual_memory_release(address addr, size_t size,
                             Thread* thread = NULL) {
     if (is_on()) {
+      assert(size > 0, "Sanity check");
       create_memory_record(addr, MemPointerRecord::virtual_memory_release_tag(),
                            size, DEBUG_CALLER_PC, thread);
     }
@@ -402,4 +485,6 @@ class MemTracker : AllStatic {
   static enum ShutdownReason       _reason;
 };
 
+#endif // !INCLUDE_NMT
+
 #endif // SHARE_VM_SERVICES_MEM_TRACKER_HPP
diff --git a/hotspot/src/share/vm/services/memoryManager.hpp b/hotspot/src/share/vm/services/memoryManager.hpp
index bb6a8112d4a..370d830e977 100644
--- a/hotspot/src/share/vm/services/memoryManager.hpp
+++ b/hotspot/src/share/vm/services/memoryManager.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/services/runtimeService.cpp b/hotspot/src/share/vm/services/runtimeService.cpp
index 6ff1c6857fe..bba6a95af73 100644
--- a/hotspot/src/share/vm/services/runtimeService.cpp
+++ b/hotspot/src/share/vm/services/runtimeService.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -35,6 +35,7 @@ HS_DTRACE_PROBE_DECL(hs_private, safepoint__begin);
 HS_DTRACE_PROBE_DECL(hs_private, safepoint__end);
 #endif /* !USDT2 */
 
+#if INCLUDE_MANAGEMENT
 TimeStamp RuntimeService::_app_timer;
 TimeStamp RuntimeService::_safepoint_timer;
 PerfCounter*  RuntimeService::_sync_time_ticks = NULL;
@@ -101,9 +102,9 @@ void RuntimeService::init() {
     memset((void*) capabilities, '0', len);
     capabilities[len-1] = '\0';
     capabilities[0] = AttachListener::is_attach_supported() ? '1' : '0';
-#ifdef KERNEL
+#if INCLUDE_SERVICES
     capabilities[1] = '1';
-#endif // KERNEL
+#endif // INCLUDE_SERVICES
     PerfDataManager::create_string_constant(SUN_RT, "jvmCapabilities",
                                             capabilities, CHECK);
   }
@@ -205,3 +206,5 @@ void RuntimeService::record_thread_interrupt_signaled_count() {
     _thread_interrupt_signaled_count->inc();
   }
 }
+
+#endif // INCLUDE_MANAGEMENT
diff --git a/hotspot/src/share/vm/services/runtimeService.hpp b/hotspot/src/share/vm/services/runtimeService.hpp
index 0e5d6c36d23..8de0ebf6ffc 100644
--- a/hotspot/src/share/vm/services/runtimeService.hpp
+++ b/hotspot/src/share/vm/services/runtimeService.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,15 +53,15 @@ public:
   static double last_application_time_sec()    { return _app_timer.seconds(); }
 
   // callbacks
-  static void record_safepoint_begin();
-  static void record_safepoint_synchronized();
-  static void record_safepoint_end();
-  static void record_application_start();
+  static void record_safepoint_begin() NOT_MANAGEMENT_RETURN;
+  static void record_safepoint_synchronized() NOT_MANAGEMENT_RETURN;
+  static void record_safepoint_end() NOT_MANAGEMENT_RETURN;
+  static void record_application_start() NOT_MANAGEMENT_RETURN;
 
   // interruption events
-  static void record_interrupted_before_count();
-  static void record_interrupted_during_count();
-  static void record_thread_interrupt_signaled_count();
+  static void record_interrupted_before_count() NOT_MANAGEMENT_RETURN;
+  static void record_interrupted_during_count() NOT_MANAGEMENT_RETURN;
+  static void record_thread_interrupt_signaled_count() NOT_MANAGEMENT_RETURN;
 };
 
 #endif // SHARE_VM_SERVICES_RUNTIMESERVICE_HPP
diff --git a/hotspot/src/share/vm/services/threadService.cpp b/hotspot/src/share/vm/services/threadService.cpp
index dd33b7a6d5f..b1c92c0b110 100644
--- a/hotspot/src/share/vm/services/threadService.cpp
+++ b/hotspot/src/share/vm/services/threadService.cpp
@@ -250,7 +250,7 @@ Handle ThreadService::dump_stack_traces(GrowableArray<instanceHandle>* threads,
 
   ResourceMark rm(THREAD);
   Klass* k = SystemDictionary::resolve_or_fail(vmSymbols::java_lang_StackTraceElement_array(), true, CHECK_NH);
-  objArrayKlass* ik = objArrayKlass::cast(k);
+  ObjArrayKlass* ik = ObjArrayKlass::cast(k);
   objArrayOop r = oopFactory::new_objArray(ik, num_threads, CHECK_NH);
   objArrayHandle result_obj(THREAD, r);
 
diff --git a/hotspot/src/share/vm/shark/sharkRuntime.cpp b/hotspot/src/share/vm/shark/sharkRuntime.cpp
index 14a886bc58b..fd9916e111b 100644
--- a/hotspot/src/share/vm/shark/sharkRuntime.cpp
+++ b/hotspot/src/share/vm/shark/sharkRuntime.cpp
@@ -129,7 +129,7 @@ JRT_ENTRY(void, SharkRuntime::multianewarray(JavaThread* thread,
                                              int         ndims,
                                              int*        dims))
   Klass* klass = method(thread)->constants()->klass_at(index, CHECK);
-  oop obj = arrayKlass::cast(klass)->multi_allocate(ndims, dims, CHECK);
+  oop obj = ArrayKlass::cast(klass)->multi_allocate(ndims, dims, CHECK);
   thread->set_vm_result(obj);
 JRT_END
 
diff --git a/hotspot/src/share/vm/trace/tracing.hpp b/hotspot/src/share/vm/trace/tracing.hpp
index dcf0e5eb893..c56e2dc2dc8 100644
--- a/hotspot/src/share/vm/trace/tracing.hpp
+++ b/hotspot/src/share/vm/trace/tracing.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/accessFlags.hpp b/hotspot/src/share/vm/utilities/accessFlags.hpp
index 13f38c375e6..c2729eb1b5f 100644
--- a/hotspot/src/share/vm/utilities/accessFlags.hpp
+++ b/hotspot/src/share/vm/utilities/accessFlags.hpp
@@ -47,7 +47,7 @@ enum {
   JVM_ACC_QUEUED                  = 0x01000000,     // Queued for compilation
   JVM_ACC_NOT_C2_COMPILABLE       = 0x02000000,
   JVM_ACC_NOT_C1_COMPILABLE       = 0x04000000,
-  JVM_ACC_NOT_OSR_COMPILABLE      = 0x08000000,
+  JVM_ACC_NOT_C2_OSR_COMPILABLE   = 0x08000000,
   JVM_ACC_HAS_LINE_NUMBER_TABLE   = 0x00100000,
   JVM_ACC_HAS_CHECKED_EXCEPTIONS  = 0x00400000,
   JVM_ACC_HAS_JSRS                = 0x00800000,
@@ -121,9 +121,9 @@ class AccessFlags VALUE_OBJ_CLASS_SPEC {
   bool has_loops               () const { return (_flags & JVM_ACC_HAS_LOOPS              ) != 0; }
   bool loops_flag_init         () const { return (_flags & JVM_ACC_LOOPS_FLAG_INIT        ) != 0; }
   bool queued_for_compilation  () const { return (_flags & JVM_ACC_QUEUED                 ) != 0; }
-  bool is_not_c1_compilable () const    { return (_flags & JVM_ACC_NOT_C1_COMPILABLE      ) != 0; }
-  bool is_not_c2_compilable () const    { return (_flags & JVM_ACC_NOT_C2_COMPILABLE      ) != 0; }
-  bool is_not_osr_compilable   () const { return (_flags & JVM_ACC_NOT_OSR_COMPILABLE     ) != 0; }
+  bool is_not_c1_compilable    () const { return (_flags & JVM_ACC_NOT_C1_COMPILABLE      ) != 0; }
+  bool is_not_c2_compilable    () const { return (_flags & JVM_ACC_NOT_C2_COMPILABLE      ) != 0; }
+  bool is_not_c2_osr_compilable() const { return (_flags & JVM_ACC_NOT_C2_OSR_COMPILABLE  ) != 0; }
   bool has_linenumber_table    () const { return (_flags & JVM_ACC_HAS_LINE_NUMBER_TABLE  ) != 0; }
   bool has_checked_exceptions  () const { return (_flags & JVM_ACC_HAS_CHECKED_EXCEPTIONS ) != 0; }
   bool has_jsrs                () const { return (_flags & JVM_ACC_HAS_JSRS               ) != 0; }
@@ -186,7 +186,7 @@ class AccessFlags VALUE_OBJ_CLASS_SPEC {
   void set_loops_flag_init()           { atomic_set_bits(JVM_ACC_LOOPS_FLAG_INIT);         }
   void set_not_c1_compilable()         { atomic_set_bits(JVM_ACC_NOT_C1_COMPILABLE);       }
   void set_not_c2_compilable()         { atomic_set_bits(JVM_ACC_NOT_C2_COMPILABLE);       }
-  void set_not_osr_compilable()        { atomic_set_bits(JVM_ACC_NOT_OSR_COMPILABLE);      }
+  void set_not_c2_osr_compilable()     { atomic_set_bits(JVM_ACC_NOT_C2_OSR_COMPILABLE);   }
   void set_has_linenumber_table()      { atomic_set_bits(JVM_ACC_HAS_LINE_NUMBER_TABLE);   }
   void set_has_checked_exceptions()    { atomic_set_bits(JVM_ACC_HAS_CHECKED_EXCEPTIONS);  }
   void set_has_jsrs()                  { atomic_set_bits(JVM_ACC_HAS_JSRS);                }
diff --git a/hotspot/src/share/vm/utilities/array.cpp b/hotspot/src/share/vm/utilities/array.cpp
index b1c7a61d970..5b51a947c1f 100644
--- a/hotspot/src/share/vm/utilities/array.cpp
+++ b/hotspot/src/share/vm/utilities/array.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/decoder.cpp b/hotspot/src/share/vm/utilities/decoder.cpp
index 4a9266f0b07..5489fe6fefb 100644
--- a/hotspot/src/share/vm/utilities/decoder.cpp
+++ b/hotspot/src/share/vm/utilities/decoder.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/decoder_elf.cpp b/hotspot/src/share/vm/utilities/decoder_elf.cpp
index d5733a8735a..6e23f5eebe3 100644
--- a/hotspot/src/share/vm/utilities/decoder_elf.cpp
+++ b/hotspot/src/share/vm/utilities/decoder_elf.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/dtrace.hpp b/hotspot/src/share/vm/utilities/dtrace.hpp
index 799cd728274..0e260fe09b6 100644
--- a/hotspot/src/share/vm/utilities/dtrace.hpp
+++ b/hotspot/src/share/vm/utilities/dtrace.hpp
@@ -1,5 +1,6 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2012 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,13 +33,17 @@
 #define DTRACE_ONLY(x) x
 #define NOT_DTRACE(x)
 
+#if defined(SOLARIS)
 // Work around dtrace tail call bug 6672627 until it is fixed in solaris 10.
 #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() \
   do { volatile size_t dtrace_workaround_tail_call_bug = 1; } while (0)
 
-#if defined(SOLARIS)
+#define USDT1 1
+#elif defined(LINUX)
+#define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG()
 #define USDT1 1
 #elif defined(__APPLE__)
+#define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG()
 #define USDT2 1
 #include <sys/types.h>
 #include "dtracefiles/hotspot.h"
@@ -63,6 +68,11 @@
 #define DTRACE_PROBE3(a,b,c,d,e) {;}
 #define DTRACE_PROBE4(a,b,c,d,e,f) {;}
 #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;}
+#define DTRACE_PROBE6(a,b,c,d,e,f,g,h) {;}
+#define DTRACE_PROBE7(a,b,c,d,e,f,g,h,i) {;}
+#define DTRACE_PROBE8(a,b,c,d,e,f,g,h,i,j) {;}
+#define DTRACE_PROBE9(a,b,c,d,e,f,g,h,i,j,k) {;}
+#define DTRACE_PROBE10(a,b,c,d,e,f,g,h,i,j,k,l) {;}
 
 #else /* USDT2 */
 
@@ -76,10 +86,18 @@
 #define HS_DTRACE_PROBE_FN(provider,name)\
   __dtrace_##provider##___##name
 
+#ifdef SOLARIS
+// Solaris dtrace needs actual extern function decls.
 #define HS_DTRACE_PROBE_DECL_N(provider,name,args) \
   DTRACE_ONLY(extern "C" void HS_DTRACE_PROBE_FN(provider,name) args)
 #define HS_DTRACE_PROBE_CDECL_N(provider,name,args) \
   DTRACE_ONLY(extern void HS_DTRACE_PROBE_FN(provider,name) args)
+#else
+// Systemtap dtrace compatible probes on GNU/Linux don't.
+// If dtrace is disabled this macro becomes NULL
+#define HS_DTRACE_PROBE_DECL_N(provider,name,args)
+#define HS_DTRACE_PROBE_CDECL_N(provider,name,args)
+#endif
 
 /* Dtrace probe declarations */
 #define HS_DTRACE_PROBE_DECL(provider,name) \
@@ -118,6 +136,8 @@
     uintptr_t,uintptr_t,uintptr_t))
 
 /* Dtrace probe definitions */
+#if defined(SOLARIS)
+// Solaris dtrace uses actual function calls.
 #define HS_DTRACE_PROBE_N(provider,name, args) \
   DTRACE_ONLY(HS_DTRACE_PROBE_FN(provider,name) args)
 
@@ -153,6 +173,33 @@
   HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\
     (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\
     (uintptr_t)a8,(uintptr_t)a9))
+#else
+// Systemtap dtrace compatible probes on GNU/Linux use direct macros.
+// If dtrace is disabled this macro becomes NULL
+#define HS_DTRACE_PROBE(provider,name) HS_DTRACE_PROBE0(provider,name)
+#define HS_DTRACE_PROBE0(provider,name)\
+  DTRACE_PROBE(provider,name)
+#define HS_DTRACE_PROBE1(provider,name,a0)\
+  DTRACE_PROBE1(provider,name,a0)
+#define HS_DTRACE_PROBE2(provider,name,a0,a1)\
+  DTRACE_PROBE2(provider,name,a0,a1)
+#define HS_DTRACE_PROBE3(provider,name,a0,a1,a2)\
+  DTRACE_PROBE3(provider,name,a0,a1,a2)
+#define HS_DTRACE_PROBE4(provider,name,a0,a1,a2,a3)\
+  DTRACE_PROBE4(provider,name,a0,a1,a2,a3)
+#define HS_DTRACE_PROBE5(provider,name,a0,a1,a2,a3,a4)\
+  DTRACE_PROBE5(provider,name,a0,a1,a2,a3,a4)
+#define HS_DTRACE_PROBE6(provider,name,a0,a1,a2,a3,a4,a5)\
+  DTRACE_PROBE6(provider,name,a0,a1,a2,a3,a4,a5)
+#define HS_DTRACE_PROBE7(provider,name,a0,a1,a2,a3,a4,a5,a6)\
+  DTRACE_PROBE7(provider,name,a0,a1,a2,a3,a4,a5,a6)
+#define HS_DTRACE_PROBE8(provider,name,a0,a1,a2,a3,a4,a5,a6,a7)\
+  DTRACE_PROBE8(provider,name,a0,a1,a2,a3,a4,a5,a6,a7)
+#define HS_DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)\
+  DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)
+#define HS_DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9)\
+  DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9)
+#endif
 
 #endif /* !USDT2 */
 
diff --git a/hotspot/src/share/vm/utilities/elfFile.cpp b/hotspot/src/share/vm/utilities/elfFile.cpp
index 5faaf83b53a..155a78f5d04 100644
--- a/hotspot/src/share/vm/utilities/elfFile.cpp
+++ b/hotspot/src/share/vm/utilities/elfFile.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/elfFile.hpp b/hotspot/src/share/vm/utilities/elfFile.hpp
index f0cba8b6d08..60f2a880482 100644
--- a/hotspot/src/share/vm/utilities/elfFile.hpp
+++ b/hotspot/src/share/vm/utilities/elfFile.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/elfStringTable.cpp b/hotspot/src/share/vm/utilities/elfStringTable.cpp
index cba67ddf646..6a07a7db35c 100644
--- a/hotspot/src/share/vm/utilities/elfStringTable.cpp
+++ b/hotspot/src/share/vm/utilities/elfStringTable.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/elfStringTable.hpp b/hotspot/src/share/vm/utilities/elfStringTable.hpp
index a4cdfc07854..bb671481b43 100644
--- a/hotspot/src/share/vm/utilities/elfStringTable.hpp
+++ b/hotspot/src/share/vm/utilities/elfStringTable.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/elfSymbolTable.cpp b/hotspot/src/share/vm/utilities/elfSymbolTable.cpp
index 5301d5a32a5..079c2b81da8 100644
--- a/hotspot/src/share/vm/utilities/elfSymbolTable.cpp
+++ b/hotspot/src/share/vm/utilities/elfSymbolTable.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/elfSymbolTable.hpp b/hotspot/src/share/vm/utilities/elfSymbolTable.hpp
index 4a23cfdeeda..b4e43fd1cd6 100644
--- a/hotspot/src/share/vm/utilities/elfSymbolTable.hpp
+++ b/hotspot/src/share/vm/utilities/elfSymbolTable.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/globalDefinitions.cpp b/hotspot/src/share/vm/utilities/globalDefinitions.cpp
index cfec229eea5..778fd500ec0 100644
--- a/hotspot/src/share/vm/utilities/globalDefinitions.cpp
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.cpp
@@ -111,11 +111,12 @@ void basic_types_init() {
       case T_DOUBLE:
       case T_LONG:
       case T_OBJECT:
-      case T_ADDRESS:   // random raw pointer
-      case T_METADATA:  // metadata pointer
-      case T_NARROWOOP: // compressed pointer
-      case T_CONFLICT:  // might as well support a bottom type
-      case T_VOID:      // padding or other unaddressed word
+      case T_ADDRESS:     // random raw pointer
+      case T_METADATA:    // metadata pointer
+      case T_NARROWOOP:   // compressed pointer
+      case T_NARROWKLASS: // compressed klass pointer
+      case T_CONFLICT:    // might as well support a bottom type
+      case T_VOID:        // padding or other unaddressed word
         // layout type must map to itself
         assert(vt == ft, "");
         break;
@@ -179,7 +180,7 @@ void basic_types_init() {
 
 
 // Map BasicType to signature character
-char type2char_tab[T_CONFLICT+1]={ 0, 0, 0, 0, 'Z', 'C', 'F', 'D', 'B', 'S', 'I', 'J', 'L', '[', 'V', 0, 0, 0, 0};
+char type2char_tab[T_CONFLICT+1]={ 0, 0, 0, 0, 'Z', 'C', 'F', 'D', 'B', 'S', 'I', 'J', 'L', '[', 'V', 0, 0, 0, 0, 0};
 
 // Map BasicType to Java type name
 const char* type2name_tab[T_CONFLICT+1] = {
@@ -198,6 +199,7 @@ const char* type2name_tab[T_CONFLICT+1] = {
   "*address*",
   "*narrowoop*",
   "*metadata*",
+  "*narrowklass*",
   "*conflict*"
 };
 
@@ -213,7 +215,7 @@ BasicType name2type(const char* name) {
 
 
 // Map BasicType to size in words
-int type2size[T_CONFLICT+1]={ -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, -1};
+int type2size[T_CONFLICT+1]={ -1, 0, 0, 0, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, -1};
 
 BasicType type2field[T_CONFLICT+1] = {
   (BasicType)0,            // 0,
@@ -234,7 +236,8 @@ BasicType type2field[T_CONFLICT+1] = {
   T_ADDRESS,               // T_ADDRESS  = 15,
   T_NARROWOOP,             // T_NARROWOOP= 16,
   T_METADATA,              // T_METADATA = 17,
-  T_CONFLICT               // T_CONFLICT = 18,
+  T_NARROWKLASS,           // T_NARROWKLASS = 18,
+  T_CONFLICT               // T_CONFLICT = 19,
 };
 
 
@@ -257,30 +260,32 @@ BasicType type2wfield[T_CONFLICT+1] = {
   T_ADDRESS, // T_ADDRESS  = 15,
   T_NARROWOOP, // T_NARROWOOP  = 16,
   T_METADATA,  // T_METADATA   = 17,
-  T_CONFLICT // T_CONFLICT = 18,
+  T_NARROWKLASS, // T_NARROWKLASS  = 18,
+  T_CONFLICT // T_CONFLICT = 19,
 };
 
 
 int _type2aelembytes[T_CONFLICT+1] = {
-  0,                      // 0
-  0,                      // 1
-  0,                      // 2
-  0,                      // 3
-  T_BOOLEAN_aelem_bytes,  // T_BOOLEAN  =  4,
-  T_CHAR_aelem_bytes,     // T_CHAR     =  5,
-  T_FLOAT_aelem_bytes,    // T_FLOAT    =  6,
-  T_DOUBLE_aelem_bytes,   // T_DOUBLE   =  7,
-  T_BYTE_aelem_bytes,     // T_BYTE     =  8,
-  T_SHORT_aelem_bytes,    // T_SHORT    =  9,
-  T_INT_aelem_bytes,      // T_INT      = 10,
-  T_LONG_aelem_bytes,     // T_LONG     = 11,
-  T_OBJECT_aelem_bytes,   // T_OBJECT   = 12,
-  T_ARRAY_aelem_bytes,    // T_ARRAY    = 13,
-  0,                      // T_VOID     = 14,
-  T_OBJECT_aelem_bytes,   // T_ADDRESS  = 15,
-  T_NARROWOOP_aelem_bytes,// T_NARROWOOP= 16,
-  T_OBJECT_aelem_bytes,   // T_METADATA = 17,
-  0                       // T_CONFLICT = 18,
+  0,                         // 0
+  0,                         // 1
+  0,                         // 2
+  0,                         // 3
+  T_BOOLEAN_aelem_bytes,     // T_BOOLEAN  =  4,
+  T_CHAR_aelem_bytes,        // T_CHAR     =  5,
+  T_FLOAT_aelem_bytes,       // T_FLOAT    =  6,
+  T_DOUBLE_aelem_bytes,      // T_DOUBLE   =  7,
+  T_BYTE_aelem_bytes,        // T_BYTE     =  8,
+  T_SHORT_aelem_bytes,       // T_SHORT    =  9,
+  T_INT_aelem_bytes,         // T_INT      = 10,
+  T_LONG_aelem_bytes,        // T_LONG     = 11,
+  T_OBJECT_aelem_bytes,      // T_OBJECT   = 12,
+  T_ARRAY_aelem_bytes,       // T_ARRAY    = 13,
+  0,                         // T_VOID     = 14,
+  T_OBJECT_aelem_bytes,      // T_ADDRESS  = 15,
+  T_NARROWOOP_aelem_bytes,   // T_NARROWOOP= 16,
+  T_OBJECT_aelem_bytes,      // T_METADATA = 17,
+  T_NARROWKLASS_aelem_bytes, // T_NARROWKLASS= 18,
+  0                          // T_CONFLICT = 19,
 };
 
 #ifdef ASSERT
diff --git a/hotspot/src/share/vm/utilities/globalDefinitions.hpp b/hotspot/src/share/vm/utilities/globalDefinitions.hpp
index 9909dd8ebab..0c8ad4af862 100644
--- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp
@@ -347,6 +347,14 @@ extern int MinObjAlignmentInBytesMask;
 extern int LogMinObjAlignment;
 extern int LogMinObjAlignmentInBytes;
 
+const int LogKlassAlignmentInBytes = 3;
+const int LogKlassAlignment        = LogKlassAlignmentInBytes - LogHeapWordSize;
+const int KlassAlignmentInBytes    = 1 << LogKlassAlignmentInBytes;
+const int KlassAlignment           = KlassAlignmentInBytes / HeapWordSize;
+
+// Klass encoding metaspace max size
+const uint64_t KlassEncodingMetaspaceMax = (uint64_t(max_juint) + 1) << LogKlassAlignmentInBytes;
+
 // Machine dependent stuff
 
 #ifdef TARGET_ARCH_x86
@@ -481,22 +489,23 @@ void basic_types_init(); // cannot define here; uses assert
 
 // NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/runtime/BasicType.java
 enum BasicType {
-  T_BOOLEAN  =  4,
-  T_CHAR     =  5,
-  T_FLOAT    =  6,
-  T_DOUBLE   =  7,
-  T_BYTE     =  8,
-  T_SHORT    =  9,
-  T_INT      = 10,
-  T_LONG     = 11,
-  T_OBJECT   = 12,
-  T_ARRAY    = 13,
-  T_VOID     = 14,
-  T_ADDRESS  = 15,
-  T_NARROWOOP= 16,
-  T_METADATA = 17,
-  T_CONFLICT = 18, // for stack value type with conflicting contents
-  T_ILLEGAL  = 99
+  T_BOOLEAN     =  4,
+  T_CHAR        =  5,
+  T_FLOAT       =  6,
+  T_DOUBLE      =  7,
+  T_BYTE        =  8,
+  T_SHORT       =  9,
+  T_INT         = 10,
+  T_LONG        = 11,
+  T_OBJECT      = 12,
+  T_ARRAY       = 13,
+  T_VOID        = 14,
+  T_ADDRESS     = 15,
+  T_NARROWOOP   = 16,
+  T_METADATA    = 17,
+  T_NARROWKLASS = 18,
+  T_CONFLICT    = 19, // for stack value type with conflicting contents
+  T_ILLEGAL     = 99
 };
 
 inline bool is_java_primitive(BasicType t) {
@@ -544,18 +553,19 @@ extern size_t lcm(size_t a, size_t b);
 
 // NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/runtime/BasicType.java
 enum BasicTypeSize {
-  T_BOOLEAN_size = 1,
-  T_CHAR_size    = 1,
-  T_FLOAT_size   = 1,
-  T_DOUBLE_size  = 2,
-  T_BYTE_size    = 1,
-  T_SHORT_size   = 1,
-  T_INT_size     = 1,
-  T_LONG_size    = 2,
-  T_OBJECT_size  = 1,
-  T_ARRAY_size   = 1,
-  T_NARROWOOP_size = 1,
-  T_VOID_size    = 0
+  T_BOOLEAN_size     = 1,
+  T_CHAR_size        = 1,
+  T_FLOAT_size       = 1,
+  T_DOUBLE_size      = 2,
+  T_BYTE_size        = 1,
+  T_SHORT_size       = 1,
+  T_INT_size         = 1,
+  T_LONG_size        = 2,
+  T_OBJECT_size      = 1,
+  T_ARRAY_size       = 1,
+  T_NARROWOOP_size   = 1,
+  T_NARROWKLASS_size = 1,
+  T_VOID_size        = 0
 };
 
 
@@ -567,23 +577,24 @@ extern BasicType type2wfield[T_CONFLICT+1];
 
 // size in bytes
 enum ArrayElementSize {
-  T_BOOLEAN_aelem_bytes = 1,
-  T_CHAR_aelem_bytes    = 2,
-  T_FLOAT_aelem_bytes   = 4,
-  T_DOUBLE_aelem_bytes  = 8,
-  T_BYTE_aelem_bytes    = 1,
-  T_SHORT_aelem_bytes   = 2,
-  T_INT_aelem_bytes     = 4,
-  T_LONG_aelem_bytes    = 8,
+  T_BOOLEAN_aelem_bytes     = 1,
+  T_CHAR_aelem_bytes        = 2,
+  T_FLOAT_aelem_bytes       = 4,
+  T_DOUBLE_aelem_bytes      = 8,
+  T_BYTE_aelem_bytes        = 1,
+  T_SHORT_aelem_bytes       = 2,
+  T_INT_aelem_bytes         = 4,
+  T_LONG_aelem_bytes        = 8,
 #ifdef _LP64
-  T_OBJECT_aelem_bytes  = 8,
-  T_ARRAY_aelem_bytes   = 8,
+  T_OBJECT_aelem_bytes      = 8,
+  T_ARRAY_aelem_bytes       = 8,
 #else
-  T_OBJECT_aelem_bytes  = 4,
-  T_ARRAY_aelem_bytes   = 4,
+  T_OBJECT_aelem_bytes      = 4,
+  T_ARRAY_aelem_bytes       = 4,
 #endif
-  T_NARROWOOP_aelem_bytes = 4,
-  T_VOID_aelem_bytes    = 0
+  T_NARROWOOP_aelem_bytes   = 4,
+  T_NARROWKLASS_aelem_bytes = 4,
+  T_VOID_aelem_bytes        = 0
 };
 
 extern int _type2aelembytes[T_CONFLICT+1]; // maps a BasicType to nof bytes used by its array element
diff --git a/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp b/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp
index 22e99cb3da8..d6056fcb1f0 100644
--- a/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp
+++ b/hotspot/src/share/vm/utilities/globalDefinitions_visCPP.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/growableArray.cpp b/hotspot/src/share/vm/utilities/growableArray.cpp
index 7da659e6f68..d8aa925cb1b 100644
--- a/hotspot/src/share/vm/utilities/growableArray.cpp
+++ b/hotspot/src/share/vm/utilities/growableArray.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/histogram.cpp b/hotspot/src/share/vm/utilities/histogram.cpp
index 114d4ac3f41..5bc7c59e90d 100644
--- a/hotspot/src/share/vm/utilities/histogram.cpp
+++ b/hotspot/src/share/vm/utilities/histogram.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/histogram.hpp b/hotspot/src/share/vm/utilities/histogram.hpp
index 5090aa059d4..a969ed4578c 100644
--- a/hotspot/src/share/vm/utilities/histogram.hpp
+++ b/hotspot/src/share/vm/utilities/histogram.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/intHisto.cpp b/hotspot/src/share/vm/utilities/intHisto.cpp
index a8508c93458..deff0156792 100644
--- a/hotspot/src/share/vm/utilities/intHisto.cpp
+++ b/hotspot/src/share/vm/utilities/intHisto.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/intHisto.hpp b/hotspot/src/share/vm/utilities/intHisto.hpp
index 2d5d2834e4d..cc4ab9ea969 100644
--- a/hotspot/src/share/vm/utilities/intHisto.hpp
+++ b/hotspot/src/share/vm/utilities/intHisto.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/macros.hpp b/hotspot/src/share/vm/utilities/macros.hpp
index 27e2a703782..e0e853c3c13 100644
--- a/hotspot/src/share/vm/utilities/macros.hpp
+++ b/hotspot/src/share/vm/utilities/macros.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,26 +34,131 @@
 // Makes a string of the macro expansion of a
 #define XSTR(a) STR(a)
 
-// KERNEL variant
-#ifdef KERNEL
-#define COMPILER1
-#define SERIALGC
+// -DINCLUDE_<something>=0 | 1 can be specified on the command line to include
+// or exclude functionality.
 
-#define JVMTI_KERNEL
-#define FPROF_KERNEL
-#define VM_STRUCTS_KERNEL
-#define JNICHECK_KERNEL
-#define SERVICES_KERNEL
+#ifndef INCLUDE_JVMTI
+#define INCLUDE_JVMTI 1
+#endif  // INCLUDE_JVMTI
 
-#define KERNEL_RETURN        {}
-#define KERNEL_RETURN_(code) { return code; }
+#if INCLUDE_JVMTI
+#define JVMTI_ONLY(x) x
+#define NOT_JVMTI(x)
+#define NOT_JVMTI_RETURN
+#define NOT_JVMTI_RETURN_(code) /* next token must be ; */
+#else
+#define JVMTI_ONLY(x)
+#define NOT_JVMTI(x) x
+#define NOT_JVMTI_RETURN { return; }
+#define NOT_JVMTI_RETURN_(code) { return code; }
+#endif // INCLUDE_JVMTI
 
-#else  // KERNEL
+#ifndef INCLUDE_FPROF
+#define INCLUDE_FPROF 1
+#endif
 
-#define KERNEL_RETURN        /* next token must be ; */
-#define KERNEL_RETURN_(code) /* next token must be ; */
+#if INCLUDE_FPROF
+#define NOT_FPROF_RETURN        /* next token must be ; */
+#define NOT_FPROF_RETURN_(code) /* next token must be ; */
+#else
+#define NOT_FPROF_RETURN                {}
+#define NOT_FPROF_RETURN_(code) { return code; }
+#endif // INCLUDE_FPROF
 
-#endif // KERNEL
+#ifndef INCLUDE_VM_STRUCTS
+#define INCLUDE_VM_STRUCTS 1
+#endif
+
+#if INCLUDE_VM_STRUCTS
+#define NOT_VM_STRUCTS_RETURN        /* next token must be ; */
+#define NOT_VM_STRUCTS_RETURN_(code) /* next token must be ; */
+#else
+#define NOT_VM_STRUCTS_RETURN           {}
+#define NOT_VM_STRUCTS_RETURN_(code) { return code; }
+#endif // INCLUDE_VM_STRUCTS
+
+#ifndef INCLUDE_JNI_CHECK
+#define INCLUDE_JNI_CHECK 1
+#endif
+
+#if INCLUDE_JNI_CHECK
+#define NOT_JNI_CHECK_RETURN        /* next token must be ; */
+#define NOT_JNI_CHECK_RETURN_(code) /* next token must be ; */
+#else
+#define NOT_JNI_CHECK_RETURN            {}
+#define NOT_JNI_CHECK_RETURN_(code) { return code; }
+#endif // INCLUDE_JNI_CHECK
+
+#ifndef INCLUDE_SERVICES
+#define INCLUDE_SERVICES 1
+#endif
+
+#if INCLUDE_SERVICES
+#define NOT_SERVICES_RETURN        /* next token must be ; */
+#define NOT_SERVICES_RETURN_(code) /* next token must be ; */
+#else
+#define NOT_SERVICES_RETURN             {}
+#define NOT_SERVICES_RETURN_(code) { return code; }
+#endif // INCLUDE_SERVICES
+
+#ifndef INCLUDE_CDS
+#define INCLUDE_CDS 1
+#endif
+
+#if INCLUDE_CDS
+#define CDS_ONLY(x) x
+#define NOT_CDS(x)
+#define NOT_CDS_RETURN        /* next token must be ; */
+#define NOT_CDS_RETURN_(code) /* next token must be ; */
+#else
+#define CDS_ONLY(x)
+#define NOT_CDS(x) x
+#define NOT_CDS_RETURN          {}
+#define NOT_CDS_RETURN_(code) { return code; }
+#endif // INCLUDE_CDS
+
+#ifndef INCLUDE_MANAGEMENT
+#define INCLUDE_MANAGEMENT 1
+#endif // INCLUDE_MANAGEMENT
+
+#if INCLUDE_MANAGEMENT
+#define NOT_MANAGEMENT_RETURN        /* next token must be ; */
+#define NOT_MANAGEMENT_RETURN_(code) /* next token must be ; */
+#else
+#define NOT_MANAGEMENT_RETURN        {}
+#define NOT_MANAGEMENT_RETURN_(code) { return code; }
+#endif // INCLUDE_MANAGEMENT
+
+/*
+ * When INCLUDE_ALTERNATE_GCS is false the only garbage collectors
+ * included in the JVM are defaultNewGeneration and markCompact.
+ *
+ * When INCLUDE_ALTERNATE_GCS is true all garbage collectors are
+ * included in the JVM.
+ */
+#ifndef INCLUDE_ALTERNATE_GCS
+#define INCLUDE_ALTERNATE_GCS 1
+#endif // INCLUDE_ALTERNATE_GCS
+
+#if INCLUDE_ALTERNATE_GCS
+#define NOT_ALTERNATE_GCS_RETURN        /* next token must be ; */
+#define NOT_ALTERNATE_GCS_RETURN_(code) /* next token must be ; */
+#else
+#define NOT_ALTERNATE_GCS_RETURN        {}
+#define NOT_ALTERNATE_GCS_RETURN_(code) { return code; }
+#endif // INCLUDE_ALTERNATE_GCS
+
+#ifndef INCLUDE_NMT
+#define INCLUDE_NMT 1
+#endif // INCLUDE_NMT
+
+#if INCLUDE_NMT
+#define NOT_NMT_RETURN        /* next token must be ; */
+#define NOT_NMT_RETURN_(code) /* next token must be ; */
+#else
+#define NOT_NMT_RETURN        {}
+#define NOT_NMT_RETURN_(code) { return code; }
+#endif // INCLUDE_NMT
 
 // COMPILER1 variant
 #ifdef COMPILER1
diff --git a/hotspot/src/share/vm/utilities/ostream.cpp b/hotspot/src/share/vm/utilities/ostream.cpp
index 7fc1ea38422..2b6e2eeb853 100644
--- a/hotspot/src/share/vm/utilities/ostream.cpp
+++ b/hotspot/src/share/vm/utilities/ostream.cpp
@@ -759,7 +759,7 @@ intx defaultStream::hold(intx writer_id) {
     if (has_log) {
       _log_file->bol();
       // output a hint where this output is coming from:
-      _log_file->print_cr("<writer thread='"INTX_FORMAT"'/>", writer_id);
+      _log_file->print_cr("<writer thread='" UINTX_FORMAT "'/>", writer_id);
     }
     _last_writer = writer_id;
   }
diff --git a/hotspot/src/share/vm/utilities/preserveException.cpp b/hotspot/src/share/vm/utilities/preserveException.cpp
index 0248eed107a..e092b740e19 100644
--- a/hotspot/src/share/vm/utilities/preserveException.cpp
+++ b/hotspot/src/share/vm/utilities/preserveException.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/stack.hpp b/hotspot/src/share/vm/utilities/stack.hpp
index 1cf85a51ac9..4814bf92f2f 100644
--- a/hotspot/src/share/vm/utilities/stack.hpp
+++ b/hotspot/src/share/vm/utilities/stack.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/stack.inline.hpp b/hotspot/src/share/vm/utilities/stack.inline.hpp
index f53fd3c2c02..7fe7d1db32d 100644
--- a/hotspot/src/share/vm/utilities/stack.inline.hpp
+++ b/hotspot/src/share/vm/utilities/stack.inline.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/taskqueue.hpp b/hotspot/src/share/vm/utilities/taskqueue.hpp
index 9d67af456ff..4dde2c4bcde 100644
--- a/hotspot/src/share/vm/utilities/taskqueue.hpp
+++ b/hotspot/src/share/vm/utilities/taskqueue.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/vmError.hpp b/hotspot/src/share/vm/utilities/vmError.hpp
index 6d84e1498e6..5e33b1177f6 100644
--- a/hotspot/src/share/vm/utilities/vmError.hpp
+++ b/hotspot/src/share/vm/utilities/vmError.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/workgroup.cpp b/hotspot/src/share/vm/utilities/workgroup.cpp
index 4952058b484..3225ccacbb8 100644
--- a/hotspot/src/share/vm/utilities/workgroup.cpp
+++ b/hotspot/src/share/vm/utilities/workgroup.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/src/share/vm/utilities/workgroup.hpp b/hotspot/src/share/vm/utilities/workgroup.hpp
index 9bd34e6bc82..362640f47a7 100644
--- a/hotspot/src/share/vm/utilities/workgroup.hpp
+++ b/hotspot/src/share/vm/utilities/workgroup.hpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/compiler/6859338/Test6859338.java b/hotspot/test/compiler/6859338/Test6859338.java
index f68b1f0a0d2..03d68126f66 100644
--- a/hotspot/test/compiler/6859338/Test6859338.java
+++ b/hotspot/test/compiler/6859338/Test6859338.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/compiler/7116216/StackOverflow.java b/hotspot/test/compiler/7116216/StackOverflow.java
index d77658ae74a..934eb598a6e 100644
--- a/hotspot/test/compiler/7116216/StackOverflow.java
+++ b/hotspot/test/compiler/7116216/StackOverflow.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
diff --git a/hotspot/test/compiler/7196199/Test7196199.java b/hotspot/test/compiler/7196199/Test7196199.java
new file mode 100644
index 00000000000..6aa35369a31
--- /dev/null
+++ b/hotspot/test/compiler/7196199/Test7196199.java
@@ -0,0 +1,189 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/**
+ * @test
+ * @bug 7196199
+ * @summary java/text/Bidi/Bug6665028.java failed: Bidi run count incorrect
+ *
+ * @run main/othervm/timeout=400 -Xmx32m -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation -XX:CompileCommand=exclude,Test7196199.test -XX:+SafepointALot -XX:GuaranteedSafepointInterval=100 Test7196199
+ */
+
+
+public class Test7196199 {
+  private static final int ARRLEN = 97;
+  private static final int ITERS  = 5000;
+  private static final int INI_ITERS  = 1000;
+  private static final int SFP_ITERS  = 10000;
+  private static final float SFP_ITERS_F  = 10000.f;
+  private static final float VALUE = 15.f;
+  public static void main(String args[]) {
+    int errn = test();
+    if (errn > 0) {
+      System.err.println("FAILED: " + errn + " errors");
+      System.exit(97);
+    }
+    System.out.println("PASSED");
+  }
+
+  static int test() {
+    float[] a0 = new float[ARRLEN];
+    float[] a1 = new float[ARRLEN];
+    // Initialize
+    for (int i=0; i<ARRLEN; i++) {
+      a0[i] = 0.f;
+      a1[i] = (float)i;
+    }
+    System.out.println("Warmup");
+    for (int i=0; i<INI_ITERS; i++) {
+      test_incrc(a0);
+      test_incrv(a0, VALUE);
+      test_addc(a0, a1);
+      test_addv(a0, a1, VALUE);
+    }
+    // Test and verify results
+    System.out.println("Verification");
+    int errn = 0;
+    for (int i=0; i<ARRLEN; i++)
+      a0[i] = 0.f;
+
+    System.out.println("  test_incrc");
+    for (int j=0; j<ITERS; j++) {
+      test_incrc(a0);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_incrc: ", i, a0[i], VALUE*SFP_ITERS_F);
+        a0[i] = 0.f; // Reset
+      }
+    }
+
+    System.out.println("  test_incrv");
+    for (int j=0; j<ITERS; j++) {
+      test_incrv(a0, VALUE);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_incrv: ", i, a0[i], VALUE*SFP_ITERS_F);
+        a0[i] = 0.f; // Reset
+      }
+    }
+
+    System.out.println("  test_addc");
+    for (int j=0; j<ITERS; j++) {
+      test_addc(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_addc: ", i, a0[i], ((float)i + VALUE)*SFP_ITERS_F);
+        a0[i] = 0.f; // Reset
+      }
+    }
+
+    System.out.println("  test_addv");
+    for (int j=0; j<ITERS; j++) {
+      test_addv(a0, a1, VALUE);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_addv: ", i, a0[i], ((float)i + VALUE)*SFP_ITERS_F);
+        a0[i] = 0.f; // Reset
+      }
+    }
+
+    if (errn > 0)
+      return errn;
+
+    System.out.println("Time");
+    long start, end;
+
+    start = System.currentTimeMillis();
+    for (int i=0; i<INI_ITERS; i++) {
+      test_incrc(a0);
+    }
+    end = System.currentTimeMillis();
+    System.out.println("test_incrc: " + (end - start));
+
+    start = System.currentTimeMillis();
+    for (int i=0; i<INI_ITERS; i++) {
+      test_incrv(a0, VALUE);
+    }
+    end = System.currentTimeMillis();
+    System.out.println("test_incrv: " + (end - start));
+
+    start = System.currentTimeMillis();
+    for (int i=0; i<INI_ITERS; i++) {
+      test_addc(a0, a1);
+    }
+    end = System.currentTimeMillis();
+    System.out.println("test_addc: " + (end - start));
+
+    start = System.currentTimeMillis();
+    for (int i=0; i<INI_ITERS; i++) {
+      test_addv(a0, a1, VALUE);
+    }
+    end = System.currentTimeMillis();
+    System.out.println("test_addv: " + (end - start));
+
+    return errn;
+  }
+
+  static void test_incrc(float[] a0) {
+    // Non-counted loop with safepoint.
+    for (long l = 0; l < SFP_ITERS; l++) {
+      // Counted and vectorized loop.
+      for (int i = 0; i < a0.length; i+=1) {
+        a0[i] += VALUE;
+      }
+    }
+  }
+  static void test_incrv(float[] a0, float b) {
+    // Non-counted loop with safepoint.
+    for (long l = 0; l < SFP_ITERS; l++) {
+      // Counted and vectorized loop.
+      for (int i = 0; i < a0.length; i+=1) {
+        a0[i] += b;
+      }
+    }
+  }
+  static void test_addc(float[] a0, float[] a1) {
+    // Non-counted loop with safepoint.
+    for (long l = 0; l < SFP_ITERS; l++) {
+      // Counted and vectorized loop.
+      for (int i = 0; i < a0.length; i+=1) {
+        a0[i] += a1[i]+VALUE;
+      }
+    }
+  }
+  static void test_addv(float[] a0, float[] a1, float b) {
+    // Non-counted loop with safepoint.
+    for (long l = 0; l < SFP_ITERS; l++) {
+      // Counted and vectorized loop.
+      for (int i = 0; i < a0.length; i+=1) {
+        a0[i] += a1[i]+b;
+      }
+    }
+  }
+
+  static int verify(String text, int i, float elem, float val) {
+    if (elem != val) {
+      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
+      return 1;
+    }
+    return 0;
+  }
+}
+
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FlushDecoder.java b/hotspot/test/compiler/7199742/Test7199742.java
similarity index 60%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FlushDecoder.java
rename to hotspot/test/compiler/7199742/Test7199742.java
index 0c2891b89d8..7f29e96ccb5 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/FlushDecoder.java
+++ b/hotspot/test/compiler/7199742/Test7199742.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,17 +22,33 @@
  *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+/**
+ * @test
+ * @bug 7199742
+ * @summary A lot of C2 OSR compilations of the same method's bci
+ *
+ * @run main/othervm -Xmx32m -Xbatch Test7199742
+ */
 
-import sun.jvm.hotspot.asm.*;
-
-class FlushDecoder extends MemoryInstructionDecoder {
-    FlushDecoder() {
-        super(FLUSH, "flush", RTLDT_UNKNOWN);
+public class Test7199742 {
+  private static final int ITERS  = 10000000;
+  public static void main(String args[]) {
+    Test7199742 t = new Test7199742();
+    for (int i=0; i<10; i++) {
+      test(t, 7);
     }
-
-    Instruction decodeMemoryInstruction(int instruction, SPARCRegisterIndirectAddress addr,
-                      SPARCRegister rd, SPARCInstructionFactory factory) {
-        return factory.newFlushInstruction(addr);
+  }
+  static Test7199742 test(Test7199742 t, int m) {
+    int i = -(ITERS/2);
+    if (i == 0) return null;
+    Test7199742 v = null;
+    while(i < ITERS) {
+      if ((i&m) == 0) {
+        v = t;
+      }
+      i++;
     }
+    return v;
+  }
 }
+
diff --git a/hotspot/test/compiler/7200264/Test7200264.sh b/hotspot/test/compiler/7200264/Test7200264.sh
new file mode 100644
index 00000000000..4276a8f134b
--- /dev/null
+++ b/hotspot/test/compiler/7200264/Test7200264.sh
@@ -0,0 +1,164 @@
+#!/bin/sh
+# 
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# 
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+# 
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+# 
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+# 
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+# 
+# 
+
+if [ "${TESTSRC}" = "" ]
+then
+  echo "TESTSRC not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+echo "TESTSRC=${TESTSRC}"
+if [ "${TESTJAVA}" = "" ]
+then
+  echo "TESTJAVA not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+echo "TESTJAVA=${TESTJAVA}"
+if [ "${TESTCLASSES}" = "" ]
+then
+  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
+  exit 1
+fi
+echo "TESTCLASSES=${TESTCLASSES}"
+echo "CLASSPATH=${CLASSPATH}"
+
+# set platform-dependent variables
+OS=`uname -s`
+case "$OS" in
+  SunOS | Linux | Darwin )
+    NULL=/dev/null
+    PS=":"
+    FS="/"
+    ;;
+  Windows_* )
+    NULL=NUL
+    PS=";"
+    FS="\\"
+    ;;
+  CYGWIN_* )
+    NULL=/dev/null
+    PS=";"
+    FS="/"
+    ;;
+  * )
+    echo "Unrecognized system!"
+    exit 1;
+    ;;
+esac
+
+
+${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xinternalversion | sed 's/amd64/x86/' | grep "x86" | grep "Server VM" | grep "debug"
+
+# Only test fastdebug Server VM on x86
+if [ $? != 0 ]
+then
+    echo "Test Passed"
+    exit 0
+fi
+
+# grep for support integer multiply vectors (cpu with SSE4.1)
+${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -XX:+PrintMiscellaneous -XX:+Verbose -version | grep "cores per cpu" | grep "sse4.1"
+
+if [ $? != 0 ]
+then
+    SSE=2
+else
+    SSE=4
+fi
+
+cp ${TESTSRC}${FS}TestIntVect.java .
+${TESTJAVA}${FS}bin${FS}javac -d . TestIntVect.java
+
+${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Xbatch -XX:-TieredCompilation -XX:CICompilerCount=1 -XX:+PrintCompilation -XX:+TraceNewVectors TestIntVect > test.out 2>&1
+
+COUNT=`grep AddVI test.out | wc -l | awk '{print $1}'`
+if [ $COUNT -lt 4 ]
+then
+    echo "Test Failed: AddVI $COUNT < 4"
+    exit 1
+fi
+
+# AddVI is generated for test_subc
+COUNT=`grep SubVI test.out | wc -l | awk '{print $1}'`
+if [ $COUNT -lt 4 ]
+then
+    echo "Test Failed: SubVI $COUNT < 4"
+    exit 1
+fi
+
+# MulVI is only supported with SSE4.1.
+if [ $SSE -gt 3 ]
+then
+# LShiftVI+SubVI is generated for test_mulc
+COUNT=`grep MulVI test.out | wc -l | awk '{print $1}'`
+if [ $COUNT -lt 2 ]
+then
+    echo "Test Failed: MulVI $COUNT < 2"
+    exit 1
+fi
+fi
+
+COUNT=`grep AndV test.out | wc -l | awk '{print $1}'`
+if [ $COUNT -lt 3 ]
+then
+    echo "Test Failed: AndV $COUNT < 3"
+    exit 1
+fi
+
+COUNT=`grep OrV test.out | wc -l | awk '{print $1}'`
+if [ $COUNT -lt 3 ]
+then
+    echo "Test Failed: OrV $COUNT < 3"
+    exit 1
+fi
+
+COUNT=`grep XorV test.out | wc -l | awk '{print $1}'`
+if [ $COUNT -lt 3 ]
+then
+    echo "Test Failed: XorV $COUNT < 3"
+    exit 1
+fi
+
+# LShiftVI+SubVI is generated for test_mulc
+COUNT=`grep LShiftVI test.out | wc -l | awk '{print $1}'`
+if [ $COUNT -lt 5 ]
+then
+    echo "Test Failed: LShiftVI $COUNT < 5"
+    exit 1
+fi
+
+COUNT=`grep RShiftVI test.out | sed '/URShiftVI/d' | wc -l | awk '{print $1}'`
+if [ $COUNT -lt 3 ]
+then
+    echo "Test Failed: RShiftVI $COUNT < 3"
+    exit 1
+fi
+
+COUNT=`grep URShiftVI test.out | wc -l | awk '{print $1}'`
+if [ $COUNT -lt 3 ]
+then
+    echo "Test Failed: URShiftVI $COUNT < 3"
+    exit 1
+fi
+
diff --git a/hotspot/test/compiler/7200264/TestIntVect.java b/hotspot/test/compiler/7200264/TestIntVect.java
new file mode 100644
index 00000000000..f85d4ff395e
--- /dev/null
+++ b/hotspot/test/compiler/7200264/TestIntVect.java
@@ -0,0 +1,650 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/**
+ * @test
+ * @bug 7200264
+ * @summary 7192963 changes disabled shift vectors
+ *
+ * @run shell Test7200264.sh
+ */
+
+/*
+ * Copy of test/compiler/6340864/TestIntVect.java without performance tests.
+ */
+public class TestIntVect {
+  private static final int ARRLEN = 997;
+  private static final int ITERS  = 11000;
+  private static final int ADD_INIT = Integer.MAX_VALUE-500;
+  private static final int BIT_MASK = 0xEC80F731;
+  private static final int VALUE = 15;
+  private static final int SHIFT = 32;
+
+  public static void main(String args[]) {
+    System.out.println("Testing Integer vectors");
+    int errn = test();
+    if (errn > 0) {
+      System.err.println("FAILED: " + errn + " errors");
+      System.exit(97);
+    }
+    System.out.println("PASSED");
+  }
+
+  static int test() {
+    int[] a0 = new int[ARRLEN];
+    int[] a1 = new int[ARRLEN];
+    int[] a2 = new int[ARRLEN];
+    int[] a3 = new int[ARRLEN];
+    int[] a4 = new int[ARRLEN];
+    long[] p2 = new long[ARRLEN/2];
+    // Initialize
+    int gold_sum = 0;
+    for (int i=0; i<ARRLEN; i++) {
+      int val = (int)(ADD_INIT+i);
+      gold_sum += val;
+      a1[i] = val;
+      a2[i] = (int)VALUE;
+      a3[i] = (int)-VALUE;
+      a4[i] = (int)BIT_MASK;
+    }
+    System.out.println("Warmup");
+    for (int i=0; i<ITERS; i++) {
+      test_sum(a1);
+      test_addc(a0, a1);
+      test_addv(a0, a1, (int)VALUE);
+      test_adda(a0, a1, a2);
+      test_subc(a0, a1);
+      test_subv(a0, a1, (int)VALUE);
+      test_suba(a0, a1, a2);
+      test_mulc(a0, a1);
+      test_mulv(a0, a1, (int)VALUE);
+      test_mula(a0, a1, a2);
+      test_divc(a0, a1);
+      test_divv(a0, a1, (int)VALUE);
+      test_diva(a0, a1, a2);
+      test_mulc_n(a0, a1);
+      test_mulv(a0, a1, (int)-VALUE);
+      test_mula(a0, a1, a3);
+      test_divc_n(a0, a1);
+      test_divv(a0, a1, (int)-VALUE);
+      test_diva(a0, a1, a3);
+      test_andc(a0, a1);
+      test_andv(a0, a1, (int)BIT_MASK);
+      test_anda(a0, a1, a4);
+      test_orc(a0, a1);
+      test_orv(a0, a1, (int)BIT_MASK);
+      test_ora(a0, a1, a4);
+      test_xorc(a0, a1);
+      test_xorv(a0, a1, (int)BIT_MASK);
+      test_xora(a0, a1, a4);
+      test_sllc(a0, a1);
+      test_sllv(a0, a1, VALUE);
+      test_srlc(a0, a1);
+      test_srlv(a0, a1, VALUE);
+      test_srac(a0, a1);
+      test_srav(a0, a1, VALUE);
+      test_sllc_n(a0, a1);
+      test_sllv(a0, a1, -VALUE);
+      test_srlc_n(a0, a1);
+      test_srlv(a0, a1, -VALUE);
+      test_srac_n(a0, a1);
+      test_srav(a0, a1, -VALUE);
+      test_sllc_o(a0, a1);
+      test_sllv(a0, a1, SHIFT);
+      test_srlc_o(a0, a1);
+      test_srlv(a0, a1, SHIFT);
+      test_srac_o(a0, a1);
+      test_srav(a0, a1, SHIFT);
+      test_sllc_on(a0, a1);
+      test_sllv(a0, a1, -SHIFT);
+      test_srlc_on(a0, a1);
+      test_srlv(a0, a1, -SHIFT);
+      test_srac_on(a0, a1);
+      test_srav(a0, a1, -SHIFT);
+      test_pack2(p2, a1);
+      test_unpack2(a0, p2);
+      test_pack2_swap(p2, a1);
+      test_unpack2_swap(a0, p2);
+    }
+    // Test and verify results
+    System.out.println("Verification");
+    int errn = 0;
+    {
+      int sum = test_sum(a1);
+      if (sum != gold_sum) {
+        System.err.println("test_sum:  " + sum + " != " + gold_sum);
+        errn++;
+      }
+
+      test_addc(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_addc: ", i, a0[i], (int)((int)(ADD_INIT+i)+VALUE));
+      }
+      test_addv(a0, a1, (int)VALUE);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_addv: ", i, a0[i], (int)((int)(ADD_INIT+i)+VALUE));
+      }
+      test_adda(a0, a1, a2);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_adda: ", i, a0[i], (int)((int)(ADD_INIT+i)+VALUE));
+      }
+
+      test_subc(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_subc: ", i, a0[i], (int)((int)(ADD_INIT+i)-VALUE));
+      }
+      test_subv(a0, a1, (int)VALUE);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_subv: ", i, a0[i], (int)((int)(ADD_INIT+i)-VALUE));
+      }
+      test_suba(a0, a1, a2);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_suba: ", i, a0[i], (int)((int)(ADD_INIT+i)-VALUE));
+      }
+
+      test_mulc(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_mulc: ", i, a0[i], (int)((int)(ADD_INIT+i)*VALUE));
+      }
+      test_mulv(a0, a1, (int)VALUE);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_mulv: ", i, a0[i], (int)((int)(ADD_INIT+i)*VALUE));
+      }
+      test_mula(a0, a1, a2);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_mula: ", i, a0[i], (int)((int)(ADD_INIT+i)*VALUE));
+      }
+
+      test_divc(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_divc: ", i, a0[i], (int)((int)(ADD_INIT+i)/VALUE));
+      }
+      test_divv(a0, a1, (int)VALUE);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_divv: ", i, a0[i], (int)((int)(ADD_INIT+i)/VALUE));
+      }
+      test_diva(a0, a1, a2);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_diva: ", i, a0[i], (int)((int)(ADD_INIT+i)/VALUE));
+      }
+
+      test_mulc_n(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_mulc_n: ", i, a0[i], (int)((int)(ADD_INIT+i)*(-VALUE)));
+      }
+      test_mulv(a0, a1, (int)-VALUE);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_mulv_n: ", i, a0[i], (int)((int)(ADD_INIT+i)*(-VALUE)));
+      }
+      test_mula(a0, a1, a3);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_mula_n: ", i, a0[i], (int)((int)(ADD_INIT+i)*(-VALUE)));
+      }
+
+      test_divc_n(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_divc_n: ", i, a0[i], (int)((int)(ADD_INIT+i)/(-VALUE)));
+      }
+      test_divv(a0, a1, (int)-VALUE);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_divv_n: ", i, a0[i], (int)((int)(ADD_INIT+i)/(-VALUE)));
+      }
+      test_diva(a0, a1, a3);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_diva_n: ", i, a0[i], (int)((int)(ADD_INIT+i)/(-VALUE)));
+      }
+
+      test_andc(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_andc: ", i, a0[i], (int)((int)(ADD_INIT+i)&BIT_MASK));
+      }
+      test_andv(a0, a1, (int)BIT_MASK);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_andv: ", i, a0[i], (int)((int)(ADD_INIT+i)&BIT_MASK));
+      }
+      test_anda(a0, a1, a4);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_anda: ", i, a0[i], (int)((int)(ADD_INIT+i)&BIT_MASK));
+      }
+
+      test_orc(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_orc: ", i, a0[i], (int)((int)(ADD_INIT+i)|BIT_MASK));
+      }
+      test_orv(a0, a1, (int)BIT_MASK);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_orv: ", i, a0[i], (int)((int)(ADD_INIT+i)|BIT_MASK));
+      }
+      test_ora(a0, a1, a4);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_ora: ", i, a0[i], (int)((int)(ADD_INIT+i)|BIT_MASK));
+      }
+
+      test_xorc(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_xorc: ", i, a0[i], (int)((int)(ADD_INIT+i)^BIT_MASK));
+      }
+      test_xorv(a0, a1, (int)BIT_MASK);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_xorv: ", i, a0[i], (int)((int)(ADD_INIT+i)^BIT_MASK));
+      }
+      test_xora(a0, a1, a4);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_xora: ", i, a0[i], (int)((int)(ADD_INIT+i)^BIT_MASK));
+      }
+
+      test_sllc(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_sllc: ", i, a0[i], (int)((int)(ADD_INIT+i)<<VALUE));
+      }
+      test_sllv(a0, a1, VALUE);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_sllv: ", i, a0[i], (int)((int)(ADD_INIT+i)<<VALUE));
+      }
+
+      test_srlc(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srlc: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>VALUE));
+      }
+      test_srlv(a0, a1, VALUE);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srlv: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>VALUE));
+      }
+
+      test_srac(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srac: ", i, a0[i], (int)((int)(ADD_INIT+i)>>VALUE));
+      }
+      test_srav(a0, a1, VALUE);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srav: ", i, a0[i], (int)((int)(ADD_INIT+i)>>VALUE));
+      }
+
+      test_sllc_n(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_sllc_n: ", i, a0[i], (int)((int)(ADD_INIT+i)<<(-VALUE)));
+      }
+      test_sllv(a0, a1, -VALUE);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_sllv_n: ", i, a0[i], (int)((int)(ADD_INIT+i)<<(-VALUE)));
+      }
+
+      test_srlc_n(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srlc_n: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>(-VALUE)));
+      }
+      test_srlv(a0, a1, -VALUE);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srlv_n: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>(-VALUE)));
+      }
+
+      test_srac_n(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srac_n: ", i, a0[i], (int)((int)(ADD_INIT+i)>>(-VALUE)));
+      }
+      test_srav(a0, a1, -VALUE);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srav_n: ", i, a0[i], (int)((int)(ADD_INIT+i)>>(-VALUE)));
+      }
+
+      test_sllc_o(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_sllc_o: ", i, a0[i], (int)((int)(ADD_INIT+i)<<SHIFT));
+      }
+      test_sllv(a0, a1, SHIFT);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_sllv_o: ", i, a0[i], (int)((int)(ADD_INIT+i)<<SHIFT));
+      }
+
+      test_srlc_o(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srlc_o: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>SHIFT));
+      }
+      test_srlv(a0, a1, SHIFT);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srlv_o: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>SHIFT));
+      }
+
+      test_srac_o(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srac_o: ", i, a0[i], (int)((int)(ADD_INIT+i)>>SHIFT));
+      }
+      test_srav(a0, a1, SHIFT);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srav_o: ", i, a0[i], (int)((int)(ADD_INIT+i)>>SHIFT));
+      }
+
+      test_sllc_on(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_sllc_on: ", i, a0[i], (int)((int)(ADD_INIT+i)<<(-SHIFT)));
+      }
+      test_sllv(a0, a1, -SHIFT);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_sllv_on: ", i, a0[i], (int)((int)(ADD_INIT+i)<<(-SHIFT)));
+      }
+
+      test_srlc_on(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srlc_on: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>(-SHIFT)));
+      }
+      test_srlv(a0, a1, -SHIFT);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srlv_on: ", i, a0[i], (int)((int)(ADD_INIT+i)>>>(-SHIFT)));
+      }
+
+      test_srac_on(a0, a1);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srac_on: ", i, a0[i], (int)((int)(ADD_INIT+i)>>(-SHIFT)));
+      }
+      test_srav(a0, a1, -SHIFT);
+      for (int i=0; i<ARRLEN; i++) {
+        errn += verify("test_srav_on: ", i, a0[i], (int)((int)(ADD_INIT+i)>>(-SHIFT)));
+      }
+
+      test_pack2(p2, a1);
+      for (int i=0; i<ARRLEN/2; i++) {
+        errn += verify("test_pack2: ", i, p2[i], ((long)(ADD_INIT+2*i) & 0xFFFFFFFFl) | ((long)(ADD_INIT+2*i+1) << 32));
+      }
+      for (int i=0; i<ARRLEN; i++) {
+        a0[i] = -1;
+      }
+      test_unpack2(a0, p2);
+      for (int i=0; i<(ARRLEN&(-2)); i++) {
+        errn += verify("test_unpack2: ", i, a0[i], (ADD_INIT+i));
+      }
+
+      test_pack2_swap(p2, a1);
+      for (int i=0; i<ARRLEN/2; i++) {
+        errn += verify("test_pack2_swap: ", i, p2[i], ((long)(ADD_INIT+2*i+1) & 0xFFFFFFFFl) | ((long)(ADD_INIT+2*i) << 32));
+      }
+      for (int i=0; i<ARRLEN; i++) {
+        a0[i] = -1;
+      }
+      test_unpack2_swap(a0, p2);
+      for (int i=0; i<(ARRLEN&(-2)); i++) {
+        errn += verify("test_unpack2_swap: ", i, a0[i], (ADD_INIT+i));
+      }
+
+    }
+
+    return errn;
+  }
+
+  static int test_sum(int[] a1) {
+    int sum = 0;
+    for (int i = 0; i < a1.length; i+=1) {
+      sum += a1[i];
+    }
+    return sum;
+  }
+
+  static void test_addc(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]+VALUE);
+    }
+  }
+  static void test_addv(int[] a0, int[] a1, int b) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]+b);
+    }
+  }
+  static void test_adda(int[] a0, int[] a1, int[] a2) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]+a2[i]);
+    }
+  }
+
+  static void test_subc(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]-VALUE);
+    }
+  }
+  static void test_subv(int[] a0, int[] a1, int b) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]-b);
+    }
+  }
+  static void test_suba(int[] a0, int[] a1, int[] a2) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]-a2[i]);
+    }
+  }
+
+  static void test_mulc(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]*VALUE);
+    }
+  }
+  static void test_mulc_n(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]*(-VALUE));
+    }
+  }
+  static void test_mulv(int[] a0, int[] a1, int b) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]*b);
+    }
+  }
+  static void test_mula(int[] a0, int[] a1, int[] a2) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]*a2[i]);
+    }
+  }
+
+  static void test_divc(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]/VALUE);
+    }
+  }
+  static void test_divc_n(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]/(-VALUE));
+    }
+  }
+  static void test_divv(int[] a0, int[] a1, int b) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]/b);
+    }
+  }
+  static void test_diva(int[] a0, int[] a1, int[] a2) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]/a2[i]);
+    }
+  }
+
+  static void test_andc(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]&BIT_MASK);
+    }
+  }
+  static void test_andv(int[] a0, int[] a1, int b) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]&b);
+    }
+  }
+  static void test_anda(int[] a0, int[] a1, int[] a2) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]&a2[i]);
+    }
+  }
+
+  static void test_orc(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]|BIT_MASK);
+    }
+  }
+  static void test_orv(int[] a0, int[] a1, int b) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]|b);
+    }
+  }
+  static void test_ora(int[] a0, int[] a1, int[] a2) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]|a2[i]);
+    }
+  }
+
+  static void test_xorc(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]^BIT_MASK);
+    }
+  }
+  static void test_xorv(int[] a0, int[] a1, int b) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]^b);
+    }
+  }
+  static void test_xora(int[] a0, int[] a1, int[] a2) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]^a2[i]);
+    }
+  }
+
+  static void test_sllc(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]<<VALUE);
+    }
+  }
+  static void test_sllc_n(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]<<(-VALUE));
+    }
+  }
+  static void test_sllc_o(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]<<SHIFT);
+    }
+  }
+  static void test_sllc_on(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]<<(-SHIFT));
+    }
+  }
+  static void test_sllv(int[] a0, int[] a1, int b) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]<<b);
+    }
+  }
+
+  static void test_srlc(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]>>>VALUE);
+    }
+  }
+  static void test_srlc_n(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]>>>(-VALUE));
+    }
+  }
+  static void test_srlc_o(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]>>>SHIFT);
+    }
+  }
+  static void test_srlc_on(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]>>>(-SHIFT));
+    }
+  }
+  static void test_srlv(int[] a0, int[] a1, int b) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]>>>b);
+    }
+  }
+
+  static void test_srac(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]>>VALUE);
+    }
+  }
+  static void test_srac_n(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]>>(-VALUE));
+    }
+  }
+  static void test_srac_o(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]>>SHIFT);
+    }
+  }
+  static void test_srac_on(int[] a0, int[] a1) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]>>(-SHIFT));
+    }
+  }
+  static void test_srav(int[] a0, int[] a1, int b) {
+    for (int i = 0; i < a0.length; i+=1) {
+      a0[i] = (int)(a1[i]>>b);
+    }
+  }
+
+  static void test_pack2(long[] p2, int[] a1) {
+    if (p2.length*2 > a1.length) return;
+    for (int i = 0; i < p2.length; i+=1) {
+      long l0 = (long)a1[i*2+0];
+      long l1 = (long)a1[i*2+1];
+      p2[i] = (l1 << 32) | (l0 & 0xFFFFFFFFl);
+    }
+  }
+  static void test_unpack2(int[] a0, long[] p2) {
+    if (p2.length*2 > a0.length) return;
+    for (int i = 0; i < p2.length; i+=1) {
+      long l = p2[i];
+      a0[i*2+0] = (int)(l & 0xFFFFFFFFl);
+      a0[i*2+1] = (int)(l >> 32);
+    }
+  }
+  static void test_pack2_swap(long[] p2, int[] a1) {
+    if (p2.length*2 > a1.length) return;
+    for (int i = 0; i < p2.length; i+=1) {
+      long l0 = (long)a1[i*2+0];
+      long l1 = (long)a1[i*2+1];
+      p2[i] = (l0 << 32) | (l1 & 0xFFFFFFFFl);
+    }
+  }
+  static void test_unpack2_swap(int[] a0, long[] p2) {
+    if (p2.length*2 > a0.length) return;
+    for (int i = 0; i < p2.length; i+=1) {
+      long l = p2[i];
+      a0[i*2+0] = (int)(l >> 32);
+      a0[i*2+1] = (int)(l & 0xFFFFFFFFl);
+    }
+  }
+
+  static int verify(String text, int i, int elem, int val) {
+    if (elem != val) {
+      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
+      return 1;
+    }
+    return 0;
+  }
+
+  static int verify(String text, int i, long elem, long val) {
+    if (elem != val) {
+      System.err.println(text + "[" + i + "] = " + Long.toHexString(elem) + " != " + Long.toHexString(val));
+      return 1;
+    }
+    return 0;
+  }
+}
diff --git a/hotspot/test/runtime/7194254/Test7194254.java b/hotspot/test/runtime/7194254/Test7194254.java
new file mode 100644
index 00000000000..356077b3bd7
--- /dev/null
+++ b/hotspot/test/runtime/7194254/Test7194254.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug     7194254
+ * @summary Creates several threads with different java priorities and checks
+ *      whether jstack reports correct priorities for them.
+ *
+ * @run main Test7194254
+ */
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CyclicBarrier;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+public class Test7194254 {
+
+    public static void main(String[] args) throws Exception {
+        final int NUMBER_OF_JAVA_PRIORITIES =
+                Thread.MAX_PRIORITY - Thread.MIN_PRIORITY + 1;
+        final CyclicBarrier barrier =
+                new CyclicBarrier(NUMBER_OF_JAVA_PRIORITIES + 1);
+
+        for (int p = Thread.MIN_PRIORITY; p <= Thread.MAX_PRIORITY; ++p) {
+            final int priority = p;
+            new Thread("Priority=" + p) {
+                {
+                    setPriority(priority);
+                }
+                public void run() {
+                    try {
+                        barrier.await(); // 1st
+                        barrier.await(); // 2nd
+                    } catch (Exception exc) {
+                        // ignore
+                    }
+                }
+            }.start();
+        }
+        barrier.await(); // 1st
+
+        int matches = 0;
+        List<String> failed = new ArrayList<>();
+        try {
+            String pid = getPid();
+            String jstack = System.getProperty("java.home") + "/../bin/jstack";
+            Process process = new ProcessBuilder(jstack, pid)
+                    .redirectErrorStream(true).start();
+            Pattern pattern = Pattern.compile(
+                    "\\\"Priority=(\\d+)\\\".* prio=(\\d+).*");
+            try (BufferedReader reader = new BufferedReader(
+                    new InputStreamReader(process.getInputStream()))) {
+                String line;
+                while((line = reader.readLine()) != null) {
+                    Matcher matcher = pattern.matcher(line);
+                    if (matcher.matches()) {
+                        matches += 1;
+                        String expected = matcher.group(1);
+                        String actual = matcher.group(2);
+                        if (!expected.equals(actual)) {
+                            failed.add(line);
+                        }
+                    }
+                }
+            }
+            barrier.await(); // 2nd
+        } finally {
+            barrier.reset();
+        }
+
+        if (matches != NUMBER_OF_JAVA_PRIORITIES) {
+            throw new AssertionError("matches: expected " +
+                    NUMBER_OF_JAVA_PRIORITIES + ", but was " + matches);
+        }
+        if (!failed.isEmpty()) {
+            throw new AssertionError(failed.size() + ":" + failed);
+        }
+        System.out.println("Test passes.");
+    }
+
+    static String getPid() {
+        RuntimeMXBean runtimebean = ManagementFactory.getRuntimeMXBean();
+        String vmname = runtimebean.getName();
+        int i = vmname.indexOf('@');
+        if (i != -1) {
+            vmname = vmname.substring(0, i);
+        }
+        return vmname;
+    }
+
+}
+
diff --git a/hotspot/test/runtime/7196045/Test7196045.java b/hotspot/test/runtime/7196045/Test7196045.java
new file mode 100644
index 00000000000..59704f72590
--- /dev/null
+++ b/hotspot/test/runtime/7196045/Test7196045.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+/*
+ * @test
+ * @bug 7196045
+ * @summary Possible JVM deadlock in ThreadTimesClosure when using HotspotInternal non-public API.
+ * @run main/othervm Test7196045
+ */
+
+import java.lang.management.ManagementFactory;
+import javax.management.JMException;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+
+public class Test7196045 {
+
+    public static long duration = 1000 * 60 * 2;
+    private static final String HOTSPOT_INTERNAL = "sun.management:type=HotspotInternal";
+
+    public static void main(String[] args) {
+
+        MBeanServer server = ManagementFactory.getPlatformMBeanServer();
+        ObjectName objName= null;
+        try {
+            ObjectName hotspotInternal = new ObjectName(HOTSPOT_INTERNAL);
+            try {
+                server.registerMBean(new sun.management.HotspotInternal(), hotspotInternal);
+            } catch (JMException e) {
+                throw new RuntimeException("HotSpotWatcher: Failed to register the HotspotInternal MBean" + e);
+            }
+            objName= new ObjectName("sun.management:type=HotspotThreading");
+
+        } catch (MalformedObjectNameException e1) {
+            throw new RuntimeException("Bad object name" + e1);
+        }
+
+        long endTime = System.currentTimeMillis() + duration;
+        long i = 0;
+        while (true) {
+            try {
+                server.getAttribute(objName, "InternalThreadCpuTimes");
+            } catch (Exception ex) {
+                System.err.println("Exception while getting attribute: " + ex);
+            }
+            i++;
+            if (i % 10000 == 0) {
+                System.out.println("Successful iterations: " + i);
+            }
+            if (System.currentTimeMillis() > endTime) {
+                break;
+            }
+        }
+        System.out.println("PASSED.");
+    }
+}
diff --git a/hotspot/test/serviceability/7170638/SDTProbesGNULinuxTest.sh b/hotspot/test/serviceability/7170638/SDTProbesGNULinuxTest.sh
new file mode 100644
index 00000000000..1fd79d6b6d8
--- /dev/null
+++ b/hotspot/test/serviceability/7170638/SDTProbesGNULinuxTest.sh
@@ -0,0 +1,68 @@
+# 
+#  Copyright (c) 2012, Red Hat, Inc.
+#  DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+# 
+#  This code is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU General Public License version 2 only, as
+#  published by the Free Software Foundation.
+# 
+#  This code is distributed in the hope that it will be useful, but WITHOUT
+#  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+#  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+#  version 2 for more details (a copy is included in the LICENSE file that
+#  accompanied this code).
+# 
+#  You should have received a copy of the GNU General Public License version
+#  2 along with this work; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+# 
+#  Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+#  or visit www.oracle.com if you need additional information or have any
+#  questions.
+# 
+
+# @test SDTProbesGNULinuxTest.sh
+# @bug 7170638
+# @summary Test SDT probes available on GNU/Linux when DTRACE_ENABLED
+# @run shell SDTProbesGNULinuxTest.sh
+
+# This test only matters on GNU/Linux, others trivially PASS.
+OS=`uname -s`
+case "$OS" in
+  Linux )
+    ;;
+  *)
+    echo "Not testing on anything but GNU/Linux. PASSED"
+    exit 0;
+    ;;
+esac
+
+# Where is our java (parent) directory? 
+if [ "${TESTJAVA}" = "" ]; then
+  PARENT=$(dirname $(readlink -f $(which java)))
+  TESTJAVA=`dirname ${PARENT}`
+  echo "TESTJAVA directory not set, using " ${TESTJAVA}
+fi
+
+# This test only matters when build with DTRACE_ENABLED. 
+${TESTJAVA}/bin/java -XX:+ExtendedDTraceProbes -version
+if [ "$?" != "0" ]; then
+  echo "Not build using DTRACE_ENABLED. PASSED"
+  exit 0
+fi
+
+# Test all available libjvm.so variants
+for libjvm in $(find ${TESTJAVA} -name libjvm.so); do
+  echo "Testing ${libjvm}"
+  # Check whether the SDT probes are compiled in.
+  readelf -S ${libjvm} | grep '.note.stapsdt'
+  if [ "$?" != "0" ]; then
+    echo "Failed: ${libjvm} doesn't contain SDT probes."
+    exit 1
+  fi
+  # We could iterate over all SDT probes and test them individually
+  # with readelf -n, but older readelf versions don't understand them.
+done
+
+echo "Passed."
+exit 0
diff --git a/jaxp/.hgtags b/jaxp/.hgtags
index d771225990a..c07ba52711e 100644
--- a/jaxp/.hgtags
+++ b/jaxp/.hgtags
@@ -179,3 +179,6 @@ bd3c00d5761408954cc29ffb82016a76cbc90b43 jdk8-b52
 7c2363666890c6675194948fbcd74d81ddb84298 jdk8-b55
 f19d63b2119a0092f016203981ffef5cc31bc3c5 jdk8-b56
 7c9475c7618cb131bcd7470f859bf43c5e5f9905 jdk8-b57
+1cb19abb3f7b40bf233b349cd2f51f02d37a9f5b jdk8-b58
+af9e8b0f1900b631a8a0fcccff9f1514fe58c808 jdk8-b59
+2d1dff5310daaf226421a8c92823cb8afcf35f31 jdk8-b60
diff --git a/jaxws/.hgtags b/jaxws/.hgtags
index 35c70368912..f0a4da5c4ba 100644
--- a/jaxws/.hgtags
+++ b/jaxws/.hgtags
@@ -179,3 +179,6 @@ f62bc618122e87a8bea69865cc02074e9d850426 jdk8-b52
 109c9e1f2d8546e9954e1b7be9a37a4396434544 jdk8-b55
 7813455ccdb08c3ee6051161176821325a5d44d7 jdk8-b56
 b51b611209f159f94dd2ce3dc2c56daa6d6ac1df jdk8-b57
+cac4c393706343df778a13dc6c84cad0f8c237c9 jdk8-b58
+ae107401be116f9e384d3a23192f543828e03da5 jdk8-b59
+5c5a65ad5291b7cefcdc308f627cf2b195cf2b69 jdk8-b60
diff --git a/jdk/.hgtags b/jdk/.hgtags
index 10a54421901..804a1e63a0c 100644
--- a/jdk/.hgtags
+++ b/jdk/.hgtags
@@ -179,3 +179,6 @@ e8569a473cee7f4955bd9e76a9bdf6c6a07ced27 jdk8-b52
 1f3f4b333341873f00da3dee85e4879f0e89c9bb jdk8-b55
 2e9eeef2909b33c9224a024afddb61ccb0b77f14 jdk8-b56
 51594d095a4bcffac4a314bf6e148214501399e0 jdk8-b57
+d94613ac03d8de375ef60493e2bb76dbd30d875d jdk8-b58
+abad1f417bd3df4296631fc943cd3b7f5062c88a jdk8-b59
+cec8fa02f15634acd7d02d04b0b2d8c044cdbaaa jdk8-b60
diff --git a/jdk/make/java/java/FILES_java.gmk b/jdk/make/java/java/FILES_java.gmk
index 20f0e121615..efbf73b744d 100644
--- a/jdk/make/java/java/FILES_java.gmk
+++ b/jdk/make/java/java/FILES_java.gmk
@@ -213,6 +213,7 @@ JAVA_JAVA_java = \
             sun/util/locale/provider/DateFormatSymbolsProviderImpl.java \
             sun/util/locale/provider/DecimalFormatSymbolsProviderImpl.java \
             sun/util/locale/provider/DictionaryBasedBreakIterator.java \
+            sun/util/locale/provider/FallbackLocaleProviderAdapter.java \
             sun/util/locale/provider/HostLocaleProviderAdapter.java \
             sun/util/locale/provider/HostLocaleProviderAdapterImpl.java \
             sun/util/locale/provider/JRELocaleConstants.java \
@@ -235,6 +236,7 @@ JAVA_JAVA_java = \
     java/util/Observer.java \
     java/util/Properties.java \
         java/util/InvalidPropertiesFormatException.java \
+	sun/util/spi/XmlPropertiesProvider.java \
     java/util/PropertyPermission.java \
     java/util/PropertyResourceBundle.java \
     java/util/Random.java \
diff --git a/jdk/make/java/nio/mapfile-bsd b/jdk/make/java/nio/mapfile-bsd
index 070646b708e..45b23ab8652 100644
--- a/jdk/make/java/nio/mapfile-bsd
+++ b/jdk/make/java/nio/mapfile-bsd
@@ -108,6 +108,7 @@ SUNWprivate_1.1 {
 		Java_sun_nio_ch_Net_setInterface6;
 		Java_sun_nio_ch_Net_getInterface6;
 		Java_sun_nio_ch_Net_shutdown;
+		Java_sun_nio_ch_Net_poll;
                 Java_sun_nio_ch_PollArrayWrapper_interrupt;
                 Java_sun_nio_ch_PollArrayWrapper_poll0;
                 Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
diff --git a/jdk/make/java/nio/mapfile-linux b/jdk/make/java/nio/mapfile-linux
index 4cc3b2910c1..37999cb7e3b 100644
--- a/jdk/make/java/nio/mapfile-linux
+++ b/jdk/make/java/nio/mapfile-linux
@@ -116,6 +116,7 @@ SUNWprivate_1.1 {
 		Java_sun_nio_ch_Net_setInterface6;
 		Java_sun_nio_ch_Net_getInterface6;
 		Java_sun_nio_ch_Net_shutdown;
+		Java_sun_nio_ch_Net_poll;
                 Java_sun_nio_ch_PollArrayWrapper_interrupt;
                 Java_sun_nio_ch_PollArrayWrapper_poll0;
                 Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
diff --git a/jdk/make/java/nio/mapfile-solaris b/jdk/make/java/nio/mapfile-solaris
index e05ea725fe1..beb13e25d6f 100644
--- a/jdk/make/java/nio/mapfile-solaris
+++ b/jdk/make/java/nio/mapfile-solaris
@@ -104,6 +104,7 @@ SUNWprivate_1.1 {
 		Java_sun_nio_ch_Net_setInterface6;
 		Java_sun_nio_ch_Net_getInterface6;
 		Java_sun_nio_ch_Net_shutdown;
+		Java_sun_nio_ch_Net_poll;
                 Java_sun_nio_ch_PollArrayWrapper_interrupt;
                 Java_sun_nio_ch_PollArrayWrapper_poll0;
                 Java_sun_nio_ch_ServerSocketChannelImpl_accept0;
diff --git a/jdk/make/javax/crypto/Makefile b/jdk/make/javax/crypto/Makefile
index f9089f902d3..e446e46406f 100644
--- a/jdk/make/javax/crypto/Makefile
+++ b/jdk/make/javax/crypto/Makefile
@@ -158,7 +158,12 @@ include $(BUILDDIR)/common/Classes.gmk
 #
 
 ifdef OPENJDK
-all: build-jar install-jar build-policy install-limited
+ifdef UNLIMITED_CRYPTO
+POLICY = install-unlimited
+else
+POLICY = install-limited
+endif
+all: build-jar install-jar build-policy $(POLICY)
 else  # OPENJDK
 ifeq ($(strip $(FILES_java)),)
 all:
diff --git a/jdk/make/sun/util/Makefile b/jdk/make/sun/util/Makefile
index 48bb89ee2c4..ed7f47c8a59 100644
--- a/jdk/make/sun/util/Makefile
+++ b/jdk/make/sun/util/Makefile
@@ -41,3 +41,20 @@ AUTO_FILES_JAVA_DIRS = sun/util/xml
 #
 include $(BUILDDIR)/common/Classes.gmk
 
+#
+# Rules for XML properties provider configuration file
+#
+SERVICEDIR = $(CLASSBINDIR)/META-INF/services
+FILES_copy = $(SERVICEDIR)/sun.util.spi.XmlPropertiesProvider
+
+copy-files: $(FILES_copy)
+
+$(SERVICEDIR)/%: $(SHARE_SRC)/classes/sun/util/xml/META-INF/services/%
+	$(install-file)
+
+build: copy-files
+
+clean::
+	$(RM) $(FILES_copy)
+
+
diff --git a/jdk/src/macosx/native/apple/security/KeystoreImpl.m b/jdk/src/macosx/native/apple/security/KeystoreImpl.m
index d8dfff37449..1e26771eb1a 100644
--- a/jdk/src/macosx/native/apple/security/KeystoreImpl.m
+++ b/jdk/src/macosx/native/apple/security/KeystoreImpl.m
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -337,7 +337,6 @@ static void addIdentitiesToKeystore(JNIEnv *env, jobject keyStore)
             // Call back to the Java object to create Java objects corresponding to this security object.
             jlong nativeKeyRef = ptr_to_jlong(privateKeyRef);
             JNFCallVoidMethod(env, keyStore, jm_createKeyEntry, alias, creationDate, nativeKeyRef, certRefArray, javaCertArray);
-            break;
         }
     } while (searchResult == noErr);
 
diff --git a/jdk/src/macosx/native/sun/awt/CTextPipe.m b/jdk/src/macosx/native/sun/awt/CTextPipe.m
index bfe9ad6262f..6b1da8dea2b 100644
--- a/jdk/src/macosx/native/sun/awt/CTextPipe.m
+++ b/jdk/src/macosx/native/sun/awt/CTextPipe.m
@@ -142,8 +142,11 @@ void JavaCT_DrawGlyphVector
     // get our baseline transform and font
     CGContextRef cgRef = qsdo->cgRef;
     CGAffineTransform ctmText = CGContextGetTextMatrix(cgRef);
-    //CGFontRef cgFont = CGContextGetFont(cgRef);
 
+    /* Save and restore of graphics context is done before the iteration.  
+       This seems to work using our test case (see bug ID 7158350) so we are restoring it at
+       the end of the for loop.  If we find out that save/restore outside the loop
+       doesn't work on all cases then we will move the Save/Restore inside the loop.*/
     CGContextSaveGState(cgRef);
     CGAffineTransform invTx = CGAffineTransformInvert(strike->fTx);
 
@@ -210,13 +213,9 @@ void JavaCT_DrawGlyphVector
         pt.x += advances[i].width;
         pt.y += advances[i].height;
 
-        // reset the font on the context after striking a unicode with CoreText
-        if (uniChar != 0)
-        {
-           // CGContextSetFont(cgRef, cgFont);
-            CGContextSaveGState(cgRef);
-        }
     }
+    // reset the font on the context after striking a unicode with CoreText
+    CGContextRestoreGState(cgRef);
 }
 
 // Using the Quartz Surface Data context, draw a hot-substituted character run
diff --git a/jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java b/jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java
index 8a655b9d586..2f2a4944173 100644
--- a/jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java
+++ b/jdk/src/share/classes/com/sun/security/auth/module/Krb5LoginModule.java
@@ -1064,12 +1064,17 @@ public class Krb5LoginModule implements LoginModule {
 
             if (storeKey) {
                 if (encKeys == null) {
-                    if (!privCredSet.contains(ktab)) {
-                        privCredSet.add(ktab);
-                        // Compatibility; also add keys to privCredSet
-                        for (KerberosKey key: ktab.getKeys(kerbClientPrinc)) {
-                            privCredSet.add(new Krb5Util.KeysFromKeyTab(key));
+                    if (ktab != null) {
+                        if (!privCredSet.contains(ktab)) {
+                            privCredSet.add(ktab);
+                            // Compatibility; also add keys to privCredSet
+                            for (KerberosKey key: ktab.getKeys(kerbClientPrinc)) {
+                                privCredSet.add(new Krb5Util.KeysFromKeyTab(key));
+                            }
                         }
+                    } else {
+                        succeeded = false;
+                        throw new LoginException("No key to store");
                     }
                 } else {
                     for (int i = 0; i < kerbKeys.length; i ++) {
diff --git a/jdk/src/share/classes/java/io/FilePermission.java b/jdk/src/share/classes/java/io/FilePermission.java
index b2ba8bdf752..97ca19597ad 100644
--- a/jdk/src/share/classes/java/io/FilePermission.java
+++ b/jdk/src/share/classes/java/io/FilePermission.java
@@ -76,7 +76,7 @@ import sun.security.util.SecurityConstants;
  * <P>
  * Be careful when granting FilePermissions. Think about the implications
  * of granting read and especially write access to various files and
- * directories. The "&lt;&lt;ALL FILES>>" permission with write action is
+ * directories. The "&lt;&lt;ALL FILES&gt;&gt;" permission with write action is
  * especially dangerous. This grants permission to write to the entire
  * file system. One thing this effectively allows is replacement of the
  * system binary, including the JVM runtime environment.
@@ -180,9 +180,7 @@ public final class FilePermission extends Permission implements Serializable {
      * @param mask the actions mask to use.
      *
      */
-    private void init(int mask)
-    {
-
+    private void init(int mask) {
         if ((mask & ALL) != mask)
                 throw new IllegalArgumentException("invalid actions mask");
 
@@ -274,9 +272,7 @@ public final class FilePermission extends Permission implements Serializable {
      *          If actions is <code>null</code>, empty or contains an action
      *          other than the specified possible actions.
      */
-
-    public FilePermission(String path, String actions)
-    {
+    public FilePermission(String path, String actions) {
         super(path);
         init(getMask(actions));
     }
@@ -293,8 +289,7 @@ public final class FilePermission extends Permission implements Serializable {
      */
 
     // package private for use by the FilePermissionCollection add method
-    FilePermission(String path, int mask)
-    {
+    FilePermission(String path, int mask) {
         super(path);
         init(mask);
     }
@@ -337,7 +332,6 @@ public final class FilePermission extends Permission implements Serializable {
      * this FilePermission's path also implies that FilePermission's path.
      *
      * @param that the FilePermission to check against.
-     * @param exact return immediately if the masks are not equal
      * @return the effective mask
      */
     boolean impliesIgnoreMask(FilePermission that) {
@@ -412,7 +406,6 @@ public final class FilePermission extends Permission implements Serializable {
      *
      * @return a hash code value for this object.
      */
-
     public int hashCode() {
         return this.cpath.hashCode();
     }
@@ -424,7 +417,6 @@ public final class FilePermission extends Permission implements Serializable {
      * @return the actions mask.
      */
     private static int getMask(String actions) {
-
         int mask = NONE;
 
         // Null action valid?
@@ -552,7 +544,6 @@ public final class FilePermission extends Permission implements Serializable {
      *
      * @return the actions mask.
      */
-
     int getMask() {
         return mask;
     }
@@ -564,8 +555,7 @@ public final class FilePermission extends Permission implements Serializable {
      *
      * @return the canonical string representation of the actions.
      */
-    private static String getActions(int mask)
-    {
+    private static String getActions(int mask) {
         StringBuilder sb = new StringBuilder();
         boolean comma = false;
 
@@ -610,15 +600,13 @@ public final class FilePermission extends Permission implements Serializable {
      *
      * @return the canonical string representation of the actions.
      */
-    public String getActions()
-    {
+    public String getActions() {
         if (actions == null)
             actions = getActions(this.mask);
 
         return actions;
     }
 
-
     /**
      * Returns a new PermissionCollection object for storing FilePermission
      * objects.
@@ -650,7 +638,6 @@ public final class FilePermission extends Permission implements Serializable {
      * @return a new PermissionCollection object suitable for storing
      * FilePermissions.
      */
-
     public PermissionCollection newPermissionCollection() {
         return new FilePermissionCollection();
     }
@@ -712,22 +699,20 @@ public final class FilePermission extends Permission implements Serializable {
  */
 
 final class FilePermissionCollection extends PermissionCollection
-implements Serializable {
-
+    implements Serializable
+{
     // Not serialized; see serialization section at end of class
     private transient List<Permission> perms;
 
     /**
-     * Create an empty FilePermissions object.
-     *
+     * Create an empty FilePermissionCollection object.
      */
-
     public FilePermissionCollection() {
         perms = new ArrayList<>();
     }
 
     /**
-     * Adds a permission to the FilePermissions. The key for the hash is
+     * Adds a permission to the FilePermissionCollection. The key for the hash is
      * permission.path.
      *
      * @param permission the Permission object to add.
@@ -738,9 +723,7 @@ implements Serializable {
      * @exception SecurityException - if this FilePermissionCollection object
      *                                has been marked readonly
      */
-
-    public void add(Permission permission)
-    {
+    public void add(Permission permission) {
         if (! (permission instanceof FilePermission))
             throw new IllegalArgumentException("invalid permission: "+
                                                permission);
@@ -757,16 +740,14 @@ implements Serializable {
      * Check and see if this set of permissions implies the permissions
      * expressed in "permission".
      *
-     * @param p the Permission object to compare
+     * @param permission the Permission object to compare
      *
      * @return true if "permission" is a proper subset of a permission in
      * the set, false if not.
      */
-
-    public boolean implies(Permission permission)
-    {
+    public boolean implies(Permission permission) {
         if (! (permission instanceof FilePermission))
-                return false;
+            return false;
 
         FilePermission fp = (FilePermission) permission;
 
@@ -795,7 +776,6 @@ implements Serializable {
      *
      * @return an enumeration of all the FilePermission objects.
      */
-
     public Enumeration<Permission> elements() {
         // Convert Iterator into Enumeration
         synchronized (this) {
@@ -841,8 +821,9 @@ implements Serializable {
     /*
      * Reads in a Vector of FilePermissions and saves them in the perms field.
      */
-    private void readObject(ObjectInputStream in) throws IOException,
-    ClassNotFoundException {
+    private void readObject(ObjectInputStream in)
+        throws IOException, ClassNotFoundException
+    {
         // Don't call defaultReadObject()
 
         // Read in serialized fields
diff --git a/jdk/src/share/classes/java/io/ObjectOutputStream.java b/jdk/src/share/classes/java/io/ObjectOutputStream.java
index 52e590fd78e..c49dcdad483 100644
--- a/jdk/src/share/classes/java/io/ObjectOutputStream.java
+++ b/jdk/src/share/classes/java/io/ObjectOutputStream.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -484,7 +484,7 @@ public class ObjectOutputStream
      * stream.  The state is reset to be the same as a new ObjectOutputStream.
      * The current point in the stream is marked as reset so the corresponding
      * ObjectInputStream will be reset at the same point.  Objects previously
-     * written to the stream will not be refered to as already being in the
+     * written to the stream will not be referred to as already being in the
      * stream.  They will be written to the stream again.
      *
      * @throws  IOException if reset() is invoked while serializing an object.
diff --git a/jdk/src/share/classes/java/io/PrintWriter.java b/jdk/src/share/classes/java/io/PrintWriter.java
index 102c3a29abc..2db17d0e76c 100644
--- a/jdk/src/share/classes/java/io/PrintWriter.java
+++ b/jdk/src/share/classes/java/io/PrintWriter.java
@@ -784,7 +784,7 @@ public class PrintWriter extends Writer {
      *         <tt>null</tt> argument depends on the <a
      *         href="../util/Formatter.html#syntax">conversion</a>.
      *
-     * @throws  IllegalFormatException
+     * @throws  java.util.IllegalFormatException
      *          If a format string contains an illegal syntax, a format
      *          specifier that is incompatible with the given arguments,
      *          insufficient arguments given the format string, or other
@@ -835,7 +835,7 @@ public class PrintWriter extends Writer {
      *         <tt>null</tt> argument depends on the <a
      *         href="../util/Formatter.html#syntax">conversion</a>.
      *
-     * @throws  IllegalFormatException
+     * @throws  java.util.IllegalFormatException
      *          If a format string contains an illegal syntax, a format
      *          specifier that is incompatible with the given arguments,
      *          insufficient arguments given the format string, or other
@@ -879,7 +879,7 @@ public class PrintWriter extends Writer {
      *         <tt>null</tt> argument depends on the <a
      *         href="../util/Formatter.html#syntax">conversion</a>.
      *
-     * @throws  IllegalFormatException
+     * @throws  java.util.IllegalFormatException
      *          If a format string contains an illegal syntax, a format
      *          specifier that is incompatible with the given arguments,
      *          insufficient arguments given the format string, or other
@@ -939,7 +939,7 @@ public class PrintWriter extends Writer {
      *         <tt>null</tt> argument depends on the <a
      *         href="../util/Formatter.html#syntax">conversion</a>.
      *
-     * @throws  IllegalFormatException
+     * @throws  java.util.IllegalFormatException
      *          If a format string contains an illegal syntax, a format
      *          specifier that is incompatible with the given arguments,
      *          insufficient arguments given the format string, or other
diff --git a/jdk/src/share/classes/java/io/Reader.java b/jdk/src/share/classes/java/io/Reader.java
index e2248c41218..076055c7304 100644
--- a/jdk/src/share/classes/java/io/Reader.java
+++ b/jdk/src/share/classes/java/io/Reader.java
@@ -91,7 +91,7 @@ public abstract class Reader implements Readable, Closeable {
      *         -1 if this source of characters is at its end
      * @throws IOException if an I/O error occurs
      * @throws NullPointerException if target is null
-     * @throws ReadOnlyBufferException if target is a read only buffer
+     * @throws java.nio.ReadOnlyBufferException if target is a read only buffer
      * @since 1.5
      */
     public int read(java.nio.CharBuffer target) throws IOException {
diff --git a/jdk/src/share/classes/java/lang/Class.java b/jdk/src/share/classes/java/lang/Class.java
index 267d7d45722..ec9d9725655 100644
--- a/jdk/src/share/classes/java/lang/Class.java
+++ b/jdk/src/share/classes/java/lang/Class.java
@@ -2970,7 +2970,7 @@ public final
     /**
      * Returns a map from simple name to enum constant.  This package-private
      * method is used internally by Enum to implement
-     *     public static <T extends Enum<T>> T valueOf(Class<T>, String)
+     * {@code public static <T extends Enum<T>> T valueOf(Class<T>, String)}
      * efficiently.  Note that the map is returned by this method is
      * created lazily on first use.  Typically it won't ever get created.
      */
diff --git a/jdk/src/share/classes/java/lang/InheritableThreadLocal.java b/jdk/src/share/classes/java/lang/InheritableThreadLocal.java
index 859e651dd0d..ea287b7497d 100644
--- a/jdk/src/share/classes/java/lang/InheritableThreadLocal.java
+++ b/jdk/src/share/classes/java/lang/InheritableThreadLocal.java
@@ -76,7 +76,6 @@ public class InheritableThreadLocal<T> extends ThreadLocal<T> {
      *
      * @param t the current thread
      * @param firstValue value for the initial entry of the table.
-     * @param map the map to store.
      */
     void createMap(Thread t, T firstValue) {
         t.inheritableThreadLocals = new ThreadLocalMap(this, firstValue);
diff --git a/jdk/src/share/classes/java/lang/Integer.java b/jdk/src/share/classes/java/lang/Integer.java
index 48ef1bbbbfb..0943a347368 100644
--- a/jdk/src/share/classes/java/lang/Integer.java
+++ b/jdk/src/share/classes/java/lang/Integer.java
@@ -752,7 +752,7 @@ public final class Integer extends Number implements Comparable<Integer> {
      * -128 and 127 (inclusive) as required by JLS.
      *
      * The cache is initialized on first usage.  The size of the cache
-     * may be controlled by the -XX:AutoBoxCacheMax=<size> option.
+     * may be controlled by the {@code -XX:AutoBoxCacheMax=<size>} option.
      * During VM initialization, java.lang.Integer.IntegerCache.high property
      * may be set and saved in the private system properties in the
      * sun.misc.VM class.
diff --git a/jdk/src/share/classes/java/lang/Package.java b/jdk/src/share/classes/java/lang/Package.java
index f7af97a6590..58fd8e20c1b 100644
--- a/jdk/src/share/classes/java/lang/Package.java
+++ b/jdk/src/share/classes/java/lang/Package.java
@@ -316,7 +316,7 @@ public class Package implements java.lang.reflect.AnnotatedElement {
      * attributes are defined in the manifests that accompany
      * the classes.
      *
-     * @param class the class to get the package of.
+     * @param c the class to get the package of.
      * @return the package of the class. It may be null if no package
      *          information is available from the archive or codebase.  */
     static Package getPackage(Class<?> c) {
@@ -411,14 +411,13 @@ public class Package implements java.lang.reflect.AnnotatedElement {
     /**
      * Construct a package instance with the specified version
      * information.
-     * @param pkgName the name of the package
+     * @param name the name of the package
      * @param spectitle the title of the specification
      * @param specversion the version of the specification
      * @param specvendor the organization that maintains the specification
      * @param impltitle the title of the implementation
      * @param implversion the version of the implementation
      * @param implvendor the organization that maintains the implementation
-     * @return a new package for containing the specified information.
      */
     Package(String name,
             String spectitle, String specversion, String specvendor,
diff --git a/jdk/src/share/classes/java/lang/StrictMath.java b/jdk/src/share/classes/java/lang/StrictMath.java
index 1a06f761571..ced79c7473f 100644
--- a/jdk/src/share/classes/java/lang/StrictMath.java
+++ b/jdk/src/share/classes/java/lang/StrictMath.java
@@ -365,7 +365,7 @@ public final class StrictMath {
      * @param a the value to be floored or ceiled
      * @param negativeBoundary result for values in (-1, 0)
      * @param positiveBoundary result for values in (0, 1)
-     * @param increment value to add when the argument is non-integral
+     * @param sign the sign of the result
      */
     private static double floorOrCeil(double a,
                                       double negativeBoundary,
@@ -811,7 +811,7 @@ public final class StrictMath {
      * @param value the long value
      * @return the argument as an int
      * @throws ArithmeticException if the {@code argument} overflows an int
-     * @see Math#toIntExact(int)
+     * @see Math#toIntExact(long)
      * @since 1.8
      */
     public static int toIntExact(long value) {
diff --git a/jdk/src/share/classes/java/lang/String.java b/jdk/src/share/classes/java/lang/String.java
index ea27b357ebd..f9550874c9e 100644
--- a/jdk/src/share/classes/java/lang/String.java
+++ b/jdk/src/share/classes/java/lang/String.java
@@ -2782,7 +2782,7 @@ public final class String
      *         <tt>null</tt> argument depends on the <a
      *         href="../util/Formatter.html#syntax">conversion</a>.
      *
-     * @throws  IllegalFormatException
+     * @throws  java.util.IllegalFormatException
      *          If a format string contains an illegal syntax, a format
      *          specifier that is incompatible with the given arguments,
      *          insufficient arguments given the format string, or other
@@ -2826,7 +2826,7 @@ public final class String
      *         <tt>null</tt> argument depends on the <a
      *         href="../util/Formatter.html#syntax">conversion</a>.
      *
-     * @throws  IllegalFormatException
+     * @throws  java.util.IllegalFormatException
      *          If a format string contains an illegal syntax, a format
      *          specifier that is incompatible with the given arguments,
      *          insufficient arguments given the format string, or other
diff --git a/jdk/src/share/classes/java/lang/System.java b/jdk/src/share/classes/java/lang/System.java
index 95693767b24..2384e01bca1 100644
--- a/jdk/src/share/classes/java/lang/System.java
+++ b/jdk/src/share/classes/java/lang/System.java
@@ -545,7 +545,7 @@ public final class System {
      * <tr><td><code>java.version</code></td>
      *     <td>Java Runtime Environment version</td></tr>
      * <tr><td><code>java.vendor</code></td>
-     *     <td>Java Runtime Environment vendor</td></tr
+     *     <td>Java Runtime Environment vendor</td></tr>
      * <tr><td><code>java.vendor.url</code></td>
      *     <td>Java vendor URL</td></tr>
      * <tr><td><code>java.home</code></td>
diff --git a/jdk/src/share/classes/java/lang/ThreadGroup.java b/jdk/src/share/classes/java/lang/ThreadGroup.java
index 8b93210aafa..195b1c2fdec 100644
--- a/jdk/src/share/classes/java/lang/ThreadGroup.java
+++ b/jdk/src/share/classes/java/lang/ThreadGroup.java
@@ -918,9 +918,6 @@ class ThreadGroup implements Thread.UncaughtExceptionHandler {
      *
      * @param  t
      *         the Thread whose start method was invoked
-     *
-     * @param  failed
-     *         true if the thread could not be started successfully
      */
     void threadStartFailed(Thread t) {
         synchronized(this) {
diff --git a/jdk/src/share/classes/java/lang/ThreadLocal.java b/jdk/src/share/classes/java/lang/ThreadLocal.java
index e5c6e1f78b5..20a665787d5 100644
--- a/jdk/src/share/classes/java/lang/ThreadLocal.java
+++ b/jdk/src/share/classes/java/lang/ThreadLocal.java
@@ -47,8 +47,8 @@ import java.util.concurrent.atomic.AtomicInteger;
  *     private static final AtomicInteger nextId = new AtomicInteger(0);
  *
  *     // Thread local variable containing each thread's ID
- *     private static final ThreadLocal&lt;Integer> threadId =
- *         new ThreadLocal&lt;Integer>() {
+ *     private static final ThreadLocal&lt;Integer&gt; threadId =
+ *         new ThreadLocal&lt;Integer&gt;() {
  *             &#64;Override protected Integer initialValue() {
  *                 return nextId.getAndIncrement();
  *         }
@@ -222,7 +222,6 @@ public class ThreadLocal<T> {
      *
      * @param t the current thread
      * @param firstValue value for the initial entry of the map
-     * @param map the map to store.
      */
     void createMap(Thread t, T firstValue) {
         t.threadLocals = new ThreadLocalMap(this, firstValue);
diff --git a/jdk/src/share/classes/java/lang/management/ThreadInfo.java b/jdk/src/share/classes/java/lang/management/ThreadInfo.java
index d64effd69e2..9ea54347bd1 100644
--- a/jdk/src/share/classes/java/lang/management/ThreadInfo.java
+++ b/jdk/src/share/classes/java/lang/management/ThreadInfo.java
@@ -147,8 +147,9 @@ public class ThreadInfo {
      * @param waitedCount   Number of times waited on a lock
      * @param waitedTime    Approx time waited on a lock
      * @param stackTrace    Thread stack trace
-     * @param lockedMonitors List of locked monitors
-     * @param lockedSynchronizers List of locked synchronizers
+     * @param monitors      List of locked monitors
+     * @param stackDepths   List of stack depths
+     * @param synchronizers List of locked synchronizers
      */
     private ThreadInfo(Thread t, int state, Object lockObj, Thread lockOwner,
                        long blockedCount, long blockedTime,
diff --git a/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java b/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java
index 32d1e709475..349c9a00836 100644
--- a/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java
+++ b/jdk/src/share/classes/java/net/AbstractPlainDatagramSocketImpl.java
@@ -48,11 +48,6 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl
     protected InetAddress connectedAddress = null;
     private int connectedPort = -1;
 
-    /* cached socket options */
-    private int multicastInterface = 0;
-    private boolean loopbackMode = true;
-    private int ttl = -1;
-
     private static final String os = AccessController.doPrivileged(
         new sun.security.action.GetPropertyAction("os.name")
     );
@@ -104,7 +99,7 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl
     /**
      * Sends a datagram packet. The packet contains the data and the
      * destination address to send the packet to.
-     * @param packet to be sent.
+     * @param p the packet to be sent.
      */
     protected abstract void send(DatagramPacket p) throws IOException;
 
@@ -135,13 +130,13 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl
 
     /**
      * Peek at the packet to see who it is from.
-     * @param return the address which the packet came from.
+     * @param i the address to populate with the sender address
      */
     protected abstract int peek(InetAddress i) throws IOException;
     protected abstract int peekData(DatagramPacket p) throws IOException;
     /**
      * Receive the datagram packet.
-     * @param Packet Received.
+     * @param p the packet to receive into
      */
     protected synchronized void receive(DatagramPacket p)
         throws IOException {
@@ -153,7 +148,7 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl
 
     /**
      * Set the TTL (time-to-live) option.
-     * @param TTL to be set.
+     * @param ttl TTL to be set.
      */
     protected abstract void setTimeToLive(int ttl) throws IOException;
 
@@ -164,7 +159,7 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl
 
     /**
      * Set the TTL (time-to-live) option.
-     * @param TTL to be set.
+     * @param ttl TTL to be set.
      */
     @Deprecated
     protected abstract void setTTL(byte ttl) throws IOException;
@@ -177,7 +172,7 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl
 
     /**
      * Join the multicast group.
-     * @param multicast address to join.
+     * @param inetaddr multicast address to join.
      */
     protected void join(InetAddress inetaddr) throws IOException {
         join(inetaddr, null);
@@ -185,14 +180,14 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl
 
     /**
      * Leave the multicast group.
-     * @param multicast address to leave.
+     * @param inetaddr multicast address to leave.
      */
     protected void leave(InetAddress inetaddr) throws IOException {
         leave(inetaddr, null);
     }
     /**
      * Join the multicast group.
-     * @param multicast address to join.
+     * @param mcastaddr multicast address to join.
      * @param netIf specifies the local interface to receive multicast
      *        datagram packets
      * @throws  IllegalArgumentException if mcastaddr is null or is a
@@ -212,7 +207,7 @@ abstract class AbstractPlainDatagramSocketImpl extends DatagramSocketImpl
 
     /**
      * Leave the multicast group.
-     * @param multicast address to leave.
+     * @param mcastaddr  multicast address to leave.
      * @param netIf specified the local interface to leave the group at
      * @throws  IllegalArgumentException if mcastaddr is null or is a
      *          SocketAddress subclass not supported by this socket
diff --git a/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java b/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java
index e3373e821b0..7495805947f 100644
--- a/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java
+++ b/jdk/src/share/classes/java/net/AbstractPlainSocketImpl.java
@@ -368,7 +368,7 @@ abstract class AbstractPlainSocketImpl extends SocketImpl
     /**
      * Binds the socket to the specified address of the specified local port.
      * @param address the address
-     * @param port the port
+     * @param lport the port
      */
     protected synchronized void bind(InetAddress address, int lport)
         throws IOException
diff --git a/jdk/src/share/classes/java/net/DatagramSocket.java b/jdk/src/share/classes/java/net/DatagramSocket.java
index 9e3bec3e402..749cf7820ff 100644
--- a/jdk/src/share/classes/java/net/DatagramSocket.java
+++ b/jdk/src/share/classes/java/net/DatagramSocket.java
@@ -105,7 +105,7 @@ class DatagramSocket implements java.io.Closeable {
      * Connects this socket to a remote socket address (IP address + port number).
      * Binds socket if not already bound.
      * <p>
-     * @param   addr    The remote address.
+     * @param   address The remote address.
      * @param   port    The remote port
      * @throws  SocketException if binding the socket fails.
      */
diff --git a/jdk/src/share/classes/java/net/Inet4Address.java b/jdk/src/share/classes/java/net/Inet4Address.java
index 190b56353ee..5e98724a302 100644
--- a/jdk/src/share/classes/java/net/Inet4Address.java
+++ b/jdk/src/share/classes/java/net/Inet4Address.java
@@ -177,7 +177,6 @@ class Inet4Address extends InetAddress {
      * a loopback address; or false otherwise.
      * @since 1.4
      */
-    private static final int loopback = 2130706433; /* 127.0.0.1 */
     public boolean isLoopbackAddress() {
         /* 127.x.x.x */
         byte[] byteAddr = getAddress();
diff --git a/jdk/src/share/classes/java/net/SocketInputStream.java b/jdk/src/share/classes/java/net/SocketInputStream.java
index 219cf0ab020..c6cefc7257b 100644
--- a/jdk/src/share/classes/java/net/SocketInputStream.java
+++ b/jdk/src/share/classes/java/net/SocketInputStream.java
@@ -112,7 +112,7 @@ class SocketInputStream extends FileInputStream
      * <i>length</i> bytes of data.
      * @param b the buffer into which the data is read
      * @param off the start offset of the data
-     * @param len the maximum number of bytes read
+     * @param length the maximum number of bytes read
      * @return the actual number of bytes read, -1 is
      *          returned when the end of the stream is reached.
      * @exception IOException If an I/O error has occurred.
@@ -209,7 +209,7 @@ class SocketInputStream extends FileInputStream
 
     /**
      * Skips n bytes of input.
-     * @param n the number of bytes to skip
+     * @param numbytes the number of bytes to skip
      * @return  the actual number of bytes skipped.
      * @exception IOException If an I/O error has occurred.
      */
diff --git a/jdk/src/share/classes/java/net/SocketPermission.java b/jdk/src/share/classes/java/net/SocketPermission.java
index da9abee01f6..02b86f171bc 100644
--- a/jdk/src/share/classes/java/net/SocketPermission.java
+++ b/jdk/src/share/classes/java/net/SocketPermission.java
@@ -138,7 +138,7 @@ import sun.security.util.Debug;
  */
 
 public final class SocketPermission extends Permission
-implements java.io.Serializable
+    implements java.io.Serializable
 {
     private static final long serialVersionUID = -7204263841984476862L;
 
@@ -232,8 +232,7 @@ implements java.io.Serializable
         trustNameService = tmp.booleanValue();
     }
 
-    private static synchronized Debug getDebug()
-    {
+    private static synchronized Debug getDebug() {
         if (!debugInit) {
             debug = Debug.getInstance("access");
             debugInit = true;
@@ -288,8 +287,7 @@ implements java.io.Serializable
         defaultDeny = true;
     }
 
-    private static String getHost(String host)
-    {
+    private static String getHost(String host) {
         if (host.equals("")) {
             return "localhost";
         } else {
@@ -679,8 +677,8 @@ implements java.io.Serializable
     }
 
     private boolean authorizedIPv4(String cname, byte[] addr) {
-            String authHost = "";
-            InetAddress auth;
+        String authHost = "";
+        InetAddress auth;
 
         try {
             authHost = "auth." +
@@ -708,8 +706,8 @@ implements java.io.Serializable
     }
 
     private boolean authorizedIPv6(String cname, byte[] addr) {
-            String authHost = "";
-            InetAddress auth;
+        String authHost = "";
+        InetAddress auth;
 
         try {
             StringBuffer sb = new StringBuffer(39);
@@ -810,7 +808,6 @@ implements java.io.Serializable
      * @return true if the specified permission is implied by this object,
      * false if not.
      */
-
     public boolean implies(Permission p) {
         int i,j;
 
@@ -844,12 +841,11 @@ implements java.io.Serializable
      *      to find a match based on the IP addresses in both objects.
      * <li> Attempt to match on the canonical hostnames of both objects.
      * </ul>
-     * @param p the incoming permission request
+     * @param that the incoming permission request
      *
      * @return true if "permission" is a proper subset of the current object,
      * false if not.
      */
-
     boolean impliesIgnoreMask(SocketPermission that) {
         int i,j;
 
@@ -1229,7 +1225,7 @@ else its the cname?
  */
 
 final class SocketPermissionCollection extends PermissionCollection
-implements Serializable
+    implements Serializable
 {
     // Not serialized; see serialization section at end of class
     private transient List<SocketPermission> perms;
@@ -1255,9 +1251,7 @@ implements Serializable
      * @exception SecurityException - if this SocketPermissionCollection object
      *                                has been marked readonly
      */
-
-    public void add(Permission permission)
-    {
+    public void add(Permission permission) {
         if (! (permission instanceof SocketPermission))
             throw new IllegalArgumentException("invalid permission: "+
                                                permission);
@@ -1276,7 +1270,7 @@ implements Serializable
      * Check and see if this collection of permissions implies the permissions
      * expressed in "permission".
      *
-     * @param p the Permission object to compare
+     * @param permission the Permission object to compare
      *
      * @return true if "permission" is a proper subset of a permission in
      * the collection, false if not.
@@ -1369,8 +1363,9 @@ implements Serializable
     /*
      * Reads in a Vector of SocketPermissions and saves them in the perms field.
      */
-    private void readObject(ObjectInputStream in) throws IOException,
-    ClassNotFoundException {
+    private void readObject(ObjectInputStream in)
+        throws IOException, ClassNotFoundException
+    {
         // Don't call in.defaultReadObject()
 
         // Read in serialized fields
diff --git a/jdk/src/share/classes/java/net/SocksSocketImpl.java b/jdk/src/share/classes/java/net/SocksSocketImpl.java
index 4fb61efe633..f87f0744962 100644
--- a/jdk/src/share/classes/java/net/SocksSocketImpl.java
+++ b/jdk/src/share/classes/java/net/SocksSocketImpl.java
@@ -644,7 +644,7 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts {
      * means "accept incoming connection from", so the SocketAddress is the
      * the one of the host we do accept connection from.
      *
-     * @param      addr   the Socket address of the remote host.
+     * @param      saddr   the Socket address of the remote host.
      * @exception  IOException  if an I/O error occurs when binding this socket.
      */
     protected synchronized void socksBind(InetSocketAddress saddr) throws IOException {
diff --git a/jdk/src/share/classes/java/net/URLConnection.java b/jdk/src/share/classes/java/net/URLConnection.java
index cc747a8eef0..d198578a26b 100644
--- a/jdk/src/share/classes/java/net/URLConnection.java
+++ b/jdk/src/share/classes/java/net/URLConnection.java
@@ -1241,10 +1241,9 @@ public abstract class URLConnection {
 
     /**
      * Gets the Content Handler appropriate for this connection.
-     * @param connection the connection to use.
      */
     synchronized ContentHandler getContentHandler()
-    throws UnknownServiceException
+        throws UnknownServiceException
     {
         String contentType = stripOffParameters(getContentType());
         ContentHandler handler = null;
diff --git a/jdk/src/share/classes/java/nio/X-Buffer.java.template b/jdk/src/share/classes/java/nio/X-Buffer.java.template
index 4150b1edcba..322692428d7 100644
--- a/jdk/src/share/classes/java/nio/X-Buffer.java.template
+++ b/jdk/src/share/classes/java/nio/X-Buffer.java.template
@@ -741,6 +741,8 @@ public abstract class $Type$Buffer
     public $Type$Buffer put($Type$Buffer src) {
         if (src == this)
             throw new IllegalArgumentException();
+        if (isReadOnly())
+            throw new ReadOnlyBufferException();
         int n = src.remaining();
         if (n > remaining())
             throw new BufferOverflowException();
@@ -888,6 +890,8 @@ public abstract class $Type$Buffer
      */
     public $Type$Buffer put(String src, int start, int end) {
         checkBounds(start, end - start, src.length());
+        if (isReadOnly())
+            throw new ReadOnlyBufferException();
         if (end - start > remaining())
             throw new BufferOverflowException();
         for (int i = start; i < end; i++)
diff --git a/jdk/src/share/classes/java/nio/channels/Channels.java b/jdk/src/share/classes/java/nio/channels/Channels.java
index c1ad782d0e4..7f0266b438b 100644
--- a/jdk/src/share/classes/java/nio/channels/Channels.java
+++ b/jdk/src/share/classes/java/nio/channels/Channels.java
@@ -84,7 +84,7 @@ public final class Channels {
     /**
      * Write all remaining bytes in buffer to the given channel.
      *
-     * @throws  IllegalBlockingException
+     * @throws  IllegalBlockingModeException
      *          If the channel is selectable and configured non-blocking.
      */
     private static void writeFully(WritableByteChannel ch, ByteBuffer bb)
diff --git a/jdk/src/share/classes/java/nio/file/FileSystem.java b/jdk/src/share/classes/java/nio/file/FileSystem.java
index 9091f4aae6e..707d1750da2 100644
--- a/jdk/src/share/classes/java/nio/file/FileSystem.java
+++ b/jdk/src/share/classes/java/nio/file/FileSystem.java
@@ -347,7 +347,7 @@ public abstract class FileSystem
      *   <td><tt>C:&#92;&#92;*</tt>
      *   <td>Matches <tt>C:&#92;foo</tt> and <tt>C:&#92;bar</tt> on the Windows
      *   platform (note that the backslash is escaped; as a string literal in the
-     *   Java Language the pattern would be <tt>"C:&#92;&#92;&#92;&#92*"</tt>) </td>
+     *   Java Language the pattern would be <tt>"C:&#92;&#92;&#92;&#92;*"</tt>) </td>
      * </tr>
      *
      * </table>
diff --git a/jdk/src/share/classes/java/nio/file/Files.java b/jdk/src/share/classes/java/nio/file/Files.java
index e3449b048e2..1e15e770fbf 100644
--- a/jdk/src/share/classes/java/nio/file/Files.java
+++ b/jdk/src/share/classes/java/nio/file/Files.java
@@ -510,7 +510,7 @@ public final class Files {
      * <pre>
      *     DirectoryStream.Filter&lt;Path&gt; filter = new DirectoryStream.Filter&lt;Path&gt;() {
      *         public boolean accept(Path file) throws IOException {
-     *             return (Files.size(file) > 8192L);
+     *             return (Files.size(file) &gt; 8192L);
      *         }
      *     };
      *     Path dir = ...
@@ -1592,7 +1592,7 @@ public final class Files {
      *     Path path = ...
      *     AclFileAttributeView view = Files.getFileAttributeView(path, AclFileAttributeView.class);
      *     if (view != null) {
-     *         List&lt;AclEntry&gt acl = view.getAcl();
+     *         List&lt;AclEntry&gt; acl = view.getAcl();
      *         :
      *     }
      * </pre>
diff --git a/jdk/src/share/classes/java/nio/file/Path.java b/jdk/src/share/classes/java/nio/file/Path.java
index afe07a387d6..eec1e631c35 100644
--- a/jdk/src/share/classes/java/nio/file/Path.java
+++ b/jdk/src/share/classes/java/nio/file/Path.java
@@ -522,7 +522,7 @@ public interface Path
      *
      * @return  a {@code Path} object representing the absolute path
      *
-     * @throws  IOError
+     * @throws  java.io.IOError
      *          if an I/O error occurs
      * @throws  SecurityException
      *          In the case of the default provider, a security manager
diff --git a/jdk/src/share/classes/java/nio/file/attribute/AclFileAttributeView.java b/jdk/src/share/classes/java/nio/file/attribute/AclFileAttributeView.java
index f82ed445ae1..aefa8f95ba3 100644
--- a/jdk/src/share/classes/java/nio/file/attribute/AclFileAttributeView.java
+++ b/jdk/src/share/classes/java/nio/file/attribute/AclFileAttributeView.java
@@ -85,7 +85,7 @@ import java.io.IOException;
  *         .build();
  *
  *     // read ACL, insert ACE, re-write ACL
- *     List&lt;AclEntry&gt acl = view.getAcl();
+ *     List&lt;AclEntry&gt; acl = view.getAcl();
  *     acl.add(0, entry);   // insert before any DENY entries
  *     view.setAcl(acl);
  * </pre>
diff --git a/jdk/src/share/classes/java/nio/file/attribute/FileTime.java b/jdk/src/share/classes/java/nio/file/attribute/FileTime.java
index 988ad2177ef..fbc90b72c35 100644
--- a/jdk/src/share/classes/java/nio/file/attribute/FileTime.java
+++ b/jdk/src/share/classes/java/nio/file/attribute/FileTime.java
@@ -310,7 +310,7 @@ public final class FileTime
         private final long days;
 
         /**
-         * The excess (in nanoseconds); can be negative if days <= 0.
+         * The excess (in nanoseconds); can be negative if days &lt;= 0.
          */
         private final long excessNanos;
 
diff --git a/jdk/src/share/classes/java/security/AllPermission.java b/jdk/src/share/classes/java/security/AllPermission.java
index 0c56f089eb5..bbfe954c9dc 100644
--- a/jdk/src/share/classes/java/security/AllPermission.java
+++ b/jdk/src/share/classes/java/security/AllPermission.java
@@ -62,9 +62,7 @@ public final class AllPermission extends Permission {
     /**
      * Creates a new AllPermission object.
      */
-
-    public AllPermission()
-    {
+    public AllPermission() {
         super("<all permissions>");
     }
 
@@ -77,8 +75,7 @@ public final class AllPermission extends Permission {
      * @param name ignored
      * @param actions ignored.
      */
-    public AllPermission(String name, String actions)
-    {
+    public AllPermission(String name, String actions) {
         this();
     }
 
@@ -120,8 +117,7 @@ public final class AllPermission extends Permission {
      *
      * @return the actions.
      */
-    public String getActions()
-    {
+    public String getActions() {
         return "<all actions>";
     }
 
@@ -133,7 +129,6 @@ public final class AllPermission extends Permission {
      * @return a new PermissionCollection object suitable for
      * storing AllPermissions.
      */
-
     public PermissionCollection newPermissionCollection() {
         return new AllPermissionCollection();
     }
@@ -157,8 +152,8 @@ public final class AllPermission extends Permission {
  */
 
 final class AllPermissionCollection
-extends PermissionCollection
-implements java.io.Serializable
+    extends PermissionCollection
+    implements java.io.Serializable
 {
 
     // use serialVersionUID from JDK 1.2.2 for interoperability
@@ -188,8 +183,7 @@ implements java.io.Serializable
      *                                has been marked readonly
      */
 
-    public void add(Permission permission)
-    {
+    public void add(Permission permission) {
         if (! (permission instanceof AllPermission))
             throw new IllegalArgumentException("invalid permission: "+
                                                permission);
@@ -203,13 +197,12 @@ implements java.io.Serializable
      * Check and see if this set of permissions implies the permissions
      * expressed in "permission".
      *
-     * @param p the Permission object to compare
+     * @param permission the Permission object to compare
      *
      * @return always returns true.
      */
 
-    public boolean implies(Permission permission)
-    {
+    public boolean implies(Permission permission) {
         return all_allowed; // No sync; staleness OK
     }
 
@@ -219,8 +212,7 @@ implements java.io.Serializable
      *
      * @return an enumeration of all the AllPermission objects.
      */
-    public Enumeration<Permission> elements()
-    {
+    public Enumeration<Permission> elements() {
         return new Enumeration<Permission>() {
             private boolean hasMore = all_allowed;
 
diff --git a/jdk/src/share/classes/java/security/BasicPermission.java b/jdk/src/share/classes/java/security/BasicPermission.java
index e6a28cbb2a7..7a3d981eb27 100644
--- a/jdk/src/share/classes/java/security/BasicPermission.java
+++ b/jdk/src/share/classes/java/security/BasicPermission.java
@@ -68,7 +68,7 @@ import java.io.IOException;
  */
 
 public abstract class BasicPermission extends Permission
-implements java.io.Serializable
+    implements java.io.Serializable
 {
 
     private static final long serialVersionUID = 6279438298436773498L;
@@ -84,10 +84,8 @@ implements java.io.Serializable
 
     /**
      * initialize a BasicPermission object. Common to all constructors.
-     *
      */
-    private void init(String name)
-    {
+    private void init(String name) {
         if (name == null)
             throw new NullPointerException("name can't be null");
 
@@ -129,9 +127,7 @@ implements java.io.Serializable
      * @throws NullPointerException if <code>name</code> is <code>null</code>.
      * @throws IllegalArgumentException if <code>name</code> is empty.
      */
-
-    public BasicPermission(String name)
-    {
+    public BasicPermission(String name) {
         super(name);
         init(name);
     }
@@ -148,8 +144,7 @@ implements java.io.Serializable
      * @throws NullPointerException if <code>name</code> is <code>null</code>.
      * @throws IllegalArgumentException if <code>name</code> is empty.
      */
-    public BasicPermission(String name, String actions)
-    {
+    public BasicPermission(String name, String actions) {
         super(name);
         init(name);
     }
@@ -238,8 +233,7 @@ implements java.io.Serializable
      *
      * @return the empty string "".
      */
-    public String getActions()
-    {
+    public String getActions() {
         return "";
     }
 
@@ -296,7 +290,6 @@ implements java.io.Serializable
  *
  * @see java.security.Permission
  * @see java.security.Permissions
- * @see java.security.PermissionsImpl
  *
  *
  * @author Roland Schemers
@@ -305,8 +298,8 @@ implements java.io.Serializable
  */
 
 final class BasicPermissionCollection
-extends PermissionCollection
-implements java.io.Serializable
+    extends PermissionCollection
+    implements java.io.Serializable
 {
 
     private static final long serialVersionUID = 739301742472979399L;
@@ -360,9 +353,7 @@ implements java.io.Serializable
      * @exception SecurityException - if this BasicPermissionCollection object
      *                                has been marked readonly
      */
-
-    public void add(Permission permission)
-    {
+    public void add(Permission permission) {
         if (! (permission instanceof BasicPermission))
             throw new IllegalArgumentException("invalid permission: "+
                                                permission);
@@ -398,16 +389,14 @@ implements java.io.Serializable
      * Check and see if this set of permissions implies the permissions
      * expressed in "permission".
      *
-     * @param p the Permission object to compare
+     * @param permission the Permission object to compare
      *
      * @return true if "permission" is a proper subset of a permission in
      * the set, false if not.
      */
-
-    public boolean implies(Permission permission)
-    {
+    public boolean implies(Permission permission) {
         if (! (permission instanceof BasicPermission))
-                return false;
+            return false;
 
         BasicPermission bp = (BasicPermission) permission;
 
@@ -468,7 +457,6 @@ implements java.io.Serializable
      *
      * @return an enumeration of all the BasicPermission objects.
      */
-
     public Enumeration<Permission> elements() {
         // Convert Iterator of Map values into an Enumeration
         synchronized (this) {
diff --git a/jdk/src/share/classes/java/security/CodeSource.java b/jdk/src/share/classes/java/security/CodeSource.java
index 94cdcef59e4..7ab76111417 100644
--- a/jdk/src/share/classes/java/security/CodeSource.java
+++ b/jdk/src/share/classes/java/security/CodeSource.java
@@ -207,7 +207,7 @@ public class CodeSource implements java.io.Serializable {
      * Returns the code signers associated with this CodeSource.
      * <p>
      * If this CodeSource object was created using the
-     * {@link #CodeSource(URL url, Certificate[] certs)}
+     * {@link #CodeSource(URL url, java.security.cert.Certificate[] certs)}
      * constructor then its certificate chains are extracted and used to
      * create an array of CodeSigner objects. Note that only X.509 certificates
      * are examined - all other certificate types are ignored.
diff --git a/jdk/src/share/classes/java/security/KeyStore.java b/jdk/src/share/classes/java/security/KeyStore.java
index 26faa9ca92e..010344bde3f 100644
--- a/jdk/src/share/classes/java/security/KeyStore.java
+++ b/jdk/src/share/classes/java/security/KeyStore.java
@@ -32,6 +32,7 @@ import java.security.cert.CertificateException;
 import java.util.*;
 import javax.crypto.SecretKey;
 
+import javax.security.auth.DestroyFailedException;
 import javax.security.auth.callback.*;
 
 /**
@@ -278,8 +279,7 @@ public class KeyStore {
          * @exception DestroyFailedException if this method was unable
          *      to clear the password
          */
-        public synchronized void destroy()
-                throws javax.security.auth.DestroyFailedException {
+        public synchronized void destroy() throws DestroyFailedException {
             destroyed = true;
             if (password != null) {
                 Arrays.fill(password, ' ');
diff --git a/jdk/src/share/classes/java/security/cert/PKIXRevocationChecker.java b/jdk/src/share/classes/java/security/cert/PKIXRevocationChecker.java
index a97f834c372..ba85686c5db 100644
--- a/jdk/src/share/classes/java/security/cert/PKIXRevocationChecker.java
+++ b/jdk/src/share/classes/java/security/cert/PKIXRevocationChecker.java
@@ -50,7 +50,7 @@ import java.util.Set;
  * status of certificates with OCSP and CRLs. By default, OCSP is the
  * preferred mechanism for checking revocation status, with CRLs as the
  * fallback mechanism. However, this preference can be switched to CRLs with
- * the {@link Option.PREFER_CRLS} option.
+ * the {@link Option#PREFER_CRLS PREFER_CRLS} option.
  *
  * <p>A {@code PKIXRevocationChecker} is obtained by calling the
  * {@link CertPathValidator#getRevocationChecker getRevocationChecker} method
diff --git a/jdk/src/share/classes/java/sql/CallableStatement.java b/jdk/src/share/classes/java/sql/CallableStatement.java
index 2f2a77594e1..460b0285894 100644
--- a/jdk/src/share/classes/java/sql/CallableStatement.java
+++ b/jdk/src/share/classes/java/sql/CallableStatement.java
@@ -1562,7 +1562,7 @@ public interface CallableStatement extends PreparedStatement {
      * @param parameterName the name of the parameter
      * @return the parameter value in full precision.  If the value is
      * SQL <code>NULL</code>, the result is <code>null</code>.
-     * @exception SQLExceptionif parameterName does not correspond to a named
+     * @exception SQLException if parameterName does not correspond to a named
      * parameter;  if a database access error occurs or
      * this method is called on a closed <code>CallableStatement</code>
      * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
diff --git a/jdk/src/share/classes/java/text/CollationElementIterator.java b/jdk/src/share/classes/java/text/CollationElementIterator.java
index 62b6a12c387..5ab68769ef6 100644
--- a/jdk/src/share/classes/java/text/CollationElementIterator.java
+++ b/jdk/src/share/classes/java/text/CollationElementIterator.java
@@ -119,7 +119,7 @@ public final class CollationElementIterator
      * on the predefined collation rules.  If the source string is empty,
      * NULLORDER will be returned on the calls to next().
      * @param sourceText the source string.
-     * @param order the collation object.
+     * @param owner the collation object.
      */
     CollationElementIterator(String sourceText, RuleBasedCollator owner) {
         this.owner = owner;
@@ -137,7 +137,7 @@ public final class CollationElementIterator
      * on the predefined collation rules.  If the source string is empty,
      * NULLORDER will be returned on the calls to next().
      * @param sourceText the source string.
-     * @param order the collation object.
+     * @param owner the collation object.
      */
     CollationElementIterator(CharacterIterator sourceText, RuleBasedCollator owner) {
         this.owner = owner;
diff --git a/jdk/src/share/classes/java/text/DecimalFormat.java b/jdk/src/share/classes/java/text/DecimalFormat.java
index 760253fb198..6d19bedcbf6 100644
--- a/jdk/src/share/classes/java/text/DecimalFormat.java
+++ b/jdk/src/share/classes/java/text/DecimalFormat.java
@@ -529,9 +529,25 @@ public class DecimalFormat extends NumberFormat {
     @Override
     public StringBuffer format(double number, StringBuffer result,
                                FieldPosition fieldPosition) {
-        fieldPosition.setBeginIndex(0);
-        fieldPosition.setEndIndex(0);
+        // If fieldPosition is a DontCareFieldPosition instance we can
+        // try to go to fast-path code.
+        boolean tryFastPath = false;
+        if (fieldPosition == DontCareFieldPosition.INSTANCE)
+            tryFastPath = true;
+        else {
+            fieldPosition.setBeginIndex(0);
+            fieldPosition.setEndIndex(0);
+        }
 
+        if (tryFastPath) {
+            String tempResult = fastFormat(number);
+            if (tempResult != null) {
+                result.append(tempResult);
+                return result;
+            }
+        }
+
+        // if fast-path could not work, we fallback to standard code.
         return format(number, result, fieldPosition.getFieldDelegate());
     }
 
@@ -869,6 +885,720 @@ public class DecimalFormat extends NumberFormat {
         return delegate.getIterator(sb.toString());
     }
 
+    // ==== Begin fast-path formating logic for double =========================
+
+    /* Fast-path formatting will be used for format(double ...) methods iff a
+     * number of conditions are met (see checkAndSetFastPathStatus()):
+     * - Only if instance properties meet the right predefined conditions.
+     * - The abs value of the double to format is <= Integer.MAX_VALUE.
+     *
+     * The basic approach is to split the binary to decimal conversion of a
+     * double value into two phases:
+     * * The conversion of the integer portion of the double.
+     * * The conversion of the fractional portion of the double
+     *   (limited to two or three digits).
+     *
+     * The isolation and conversion of the integer portion of the double is
+     * straightforward. The conversion of the fraction is more subtle and relies
+     * on some rounding properties of double to the decimal precisions in
+     * question.  Using the terminology of BigDecimal, this fast-path algorithm
+     * is applied when a double value has a magnitude less than Integer.MAX_VALUE
+     * and rounding is to nearest even and the destination format has two or
+     * three digits of *scale* (digits after the decimal point).
+     *
+     * Under a rounding to nearest even policy, the returned result is a digit
+     * string of a number in the (in this case decimal) destination format
+     * closest to the exact numerical value of the (in this case binary) input
+     * value.  If two destination format numbers are equally distant, the one
+     * with the last digit even is returned.  To compute such a correctly rounded
+     * value, some information about digits beyond the smallest returned digit
+     * position needs to be consulted.
+     *
+     * In general, a guard digit, a round digit, and a sticky *bit* are needed
+     * beyond the returned digit position.  If the discarded portion of the input
+     * is sufficiently large, the returned digit string is incremented.  In round
+     * to nearest even, this threshold to increment occurs near the half-way
+     * point between digits.  The sticky bit records if there are any remaining
+     * trailing digits of the exact input value in the new format; the sticky bit
+     * is consulted only in close to half-way rounding cases.
+     *
+     * Given the computation of the digit and bit values, rounding is then
+     * reduced to a table lookup problem.  For decimal, the even/odd cases look
+     * like this:
+     *
+     * Last   Round   Sticky
+     * 6      5       0      => 6   // exactly halfway, return even digit.
+     * 6      5       1      => 7   // a little bit more than halfway, round up.
+     * 7      5       0      => 8   // exactly halfway, round up to even.
+     * 7      5       1      => 8   // a little bit more than halfway, round up.
+     * With analogous entries for other even and odd last-returned digits.
+     *
+     * However, decimal negative powers of 5 smaller than 0.5 are *not* exactly
+     * representable as binary fraction.  In particular, 0.005 (the round limit
+     * for a two-digit scale) and 0.0005 (the round limit for a three-digit
+     * scale) are not representable. Therefore, for input values near these cases
+     * the sticky bit is known to be set which reduces the rounding logic to:
+     *
+     * Last   Round   Sticky
+     * 6      5       1      => 7   // a little bit more than halfway, round up.
+     * 7      5       1      => 8   // a little bit more than halfway, round up.
+     *
+     * In other words, if the round digit is 5, the sticky bit is known to be
+     * set.  If the round digit is something other than 5, the sticky bit is not
+     * relevant.  Therefore, some of the logic about whether or not to increment
+     * the destination *decimal* value can occur based on tests of *binary*
+     * computations of the binary input number.
+     */
+
+    /**
+     * Check validity of using fast-path for this instance. If fast-path is valid
+     * for this instance, sets fast-path state as true and initializes fast-path
+     * utility fields as needed.
+     *
+     * This method is supposed to be called rarely, otherwise that will break the
+     * fast-path performance. That means avoiding frequent changes of the
+     * properties of the instance, since for most properties, each time a change
+     * happens, a call to this method is needed at the next format call.
+     *
+     * FAST-PATH RULES:
+     *  Similar to the default DecimalFormat instantiation case.
+     *  More precisely:
+     *  - HALF_EVEN rounding mode,
+     *  - isGroupingUsed() is true,
+     *  - groupingSize of 3,
+     *  - multiplier is 1,
+     *  - Decimal separator not mandatory,
+     *  - No use of exponential notation,
+     *  - minimumIntegerDigits is exactly 1 and maximumIntegerDigits at least 10
+     *  - For number of fractional digits, the exact values found in the default case:
+     *     Currency : min = max = 2.
+     *     Decimal  : min = 0. max = 3.
+     *
+     */
+    private void checkAndSetFastPathStatus() {
+
+        boolean fastPathWasOn = isFastPath;
+
+        if ((roundingMode == RoundingMode.HALF_EVEN) &&
+            (isGroupingUsed()) &&
+            (groupingSize == 3) &&
+            (multiplier == 1) &&
+            (!decimalSeparatorAlwaysShown) &&
+            (!useExponentialNotation)) {
+
+            // The fast-path algorithm is semi-hardcoded against
+            //  minimumIntegerDigits and maximumIntegerDigits.
+            isFastPath = ((minimumIntegerDigits == 1) &&
+                          (maximumIntegerDigits >= 10));
+
+            // The fast-path algorithm is hardcoded against
+            //  minimumFractionDigits and maximumFractionDigits.
+            if (isFastPath) {
+                if (isCurrencyFormat) {
+                    if ((minimumFractionDigits != 2) ||
+                        (maximumFractionDigits != 2))
+                        isFastPath = false;
+                } else if ((minimumFractionDigits != 0) ||
+                           (maximumFractionDigits != 3))
+                    isFastPath = false;
+            }
+        } else
+            isFastPath = false;
+
+        // Since some instance properties may have changed while still falling
+        // in the fast-path case, we need to reinitialize fastPathData anyway.
+        if (isFastPath) {
+            // We need to instantiate fastPathData if not already done.
+            if (fastPathData == null)
+                fastPathData = new FastPathData();
+
+            // Sets up the locale specific constants used when formatting.
+            // '0' is our default representation of zero.
+            fastPathData.zeroDelta = symbols.getZeroDigit() - '0';
+            fastPathData.groupingChar = symbols.getGroupingSeparator();
+
+            // Sets up fractional constants related to currency/decimal pattern.
+            fastPathData.fractionalMaxIntBound = (isCurrencyFormat) ? 99 : 999;
+            fastPathData.fractionalScaleFactor = (isCurrencyFormat) ? 100.0d : 1000.0d;
+
+            // Records the need for adding prefix or suffix
+            fastPathData.positiveAffixesRequired =
+                (positivePrefix.length() != 0) || (positiveSuffix.length() != 0);
+            fastPathData.negativeAffixesRequired =
+                (negativePrefix.length() != 0) || (negativeSuffix.length() != 0);
+
+            // Creates a cached char container for result, with max possible size.
+            int maxNbIntegralDigits = 10;
+            int maxNbGroups = 3;
+            int containerSize =
+                Math.max(positivePrefix.length(), negativePrefix.length()) +
+                maxNbIntegralDigits + maxNbGroups + 1 + maximumFractionDigits +
+                Math.max(positiveSuffix.length(), negativeSuffix.length());
+
+            fastPathData.fastPathContainer = new char[containerSize];
+
+            // Sets up prefix and suffix char arrays constants.
+            fastPathData.charsPositiveSuffix = positiveSuffix.toCharArray();
+            fastPathData.charsNegativeSuffix = negativeSuffix.toCharArray();
+            fastPathData.charsPositivePrefix = positivePrefix.toCharArray();
+            fastPathData.charsNegativePrefix = negativePrefix.toCharArray();
+
+            // Sets up fixed index positions for integral and fractional digits.
+            // Sets up decimal point in cached result container.
+            int longestPrefixLength =
+                Math.max(positivePrefix.length(), negativePrefix.length());
+            int decimalPointIndex =
+                maxNbIntegralDigits + maxNbGroups + longestPrefixLength;
+
+            fastPathData.integralLastIndex    = decimalPointIndex - 1;
+            fastPathData.fractionalFirstIndex = decimalPointIndex + 1;
+            fastPathData.fastPathContainer[decimalPointIndex] =
+                isCurrencyFormat ?
+                symbols.getMonetaryDecimalSeparator() :
+                symbols.getDecimalSeparator();
+
+        } else if (fastPathWasOn) {
+            // Previous state was fast-path and is no more.
+            // Resets cached array constants.
+            fastPathData.fastPathContainer = null;
+            fastPathData.charsPositiveSuffix = null;
+            fastPathData.charsNegativeSuffix = null;
+            fastPathData.charsPositivePrefix = null;
+            fastPathData.charsNegativePrefix = null;
+        }
+
+        fastPathCheckNeeded = false;
+    }
+
+    /**
+     * Returns true if rounding-up must be done on {@code scaledFractionalPartAsInt},
+     * false otherwise.
+     *
+     * This is a utility method that takes correct half-even rounding decision on
+     * passed fractional value at the scaled decimal point (2 digits for currency
+     * case and 3 for decimal case), when the approximated fractional part after
+     * scaled decimal point is exactly 0.5d.  This is done by means of exact
+     * calculations on the {@code fractionalPart} floating-point value.
+     *
+     * This method is supposed to be called by private {@code fastDoubleFormat}
+     * method only.
+     *
+     * The algorithms used for the exact calculations are :
+     *
+     * The <b><i>FastTwoSum</i></b> algorithm, from T.J.Dekker, described in the
+     * papers  "<i>A  Floating-Point   Technique  for  Extending  the  Available
+     * Precision</i>"  by Dekker, and  in "<i>Adaptive  Precision Floating-Point
+     * Arithmetic and Fast Robust Geometric Predicates</i>" from J.Shewchuk.
+     *
+     * A modified version of <b><i>Sum2S</i></b> cascaded summation described in
+     * "<i>Accurate Sum and Dot Product</i>" from Takeshi Ogita and All.  As
+     * Ogita says in this paper this is an equivalent of the Kahan-Babuska's
+     * summation algorithm because we order the terms by magnitude before summing
+     * them. For this reason we can use the <i>FastTwoSum</i> algorithm rather
+     * than the more expensive Knuth's <i>TwoSum</i>.
+     *
+     * We do this to avoid a more expensive exact "<i>TwoProduct</i>" algorithm,
+     * like those described in Shewchuk's paper above. See comments in the code
+     * below.
+     *
+     * @param  fractionalPart The  fractional value  on which  we  take rounding
+     * decision.
+     * @param scaledFractionalPartAsInt The integral part of the scaled
+     * fractional value.
+     *
+     * @return the decision that must be taken regarding half-even rounding.
+     */
+    private boolean exactRoundUp(double fractionalPart,
+                                 int scaledFractionalPartAsInt) {
+
+        /* exactRoundUp() method is called by fastDoubleFormat() only.
+         * The precondition expected to be verified by the passed parameters is :
+         * scaledFractionalPartAsInt ==
+         *     (int) (fractionalPart * fastPathData.fractionalScaleFactor).
+         * This is ensured by fastDoubleFormat() code.
+         */
+
+        /* We first calculate roundoff error made by fastDoubleFormat() on
+         * the scaled fractional part. We do this with exact calculation on the
+         * passed fractionalPart. Rounding decision will then be taken from roundoff.
+         */
+
+        /* ---- TwoProduct(fractionalPart, scale factor (i.e. 1000.0d or 100.0d)).
+         *
+         * The below is an optimized exact "TwoProduct" calculation of passed
+         * fractional part with scale factor, using Ogita's Sum2S cascaded
+         * summation adapted as Kahan-Babuska equivalent by using FastTwoSum
+         * (much faster) rather than Knuth's TwoSum.
+         *
+         * We can do this because we order the summation from smallest to
+         * greatest, so that FastTwoSum can be used without any additional error.
+         *
+         * The "TwoProduct" exact calculation needs 17 flops. We replace this by
+         * a cascaded summation of FastTwoSum calculations, each involving an
+         * exact multiply by a power of 2.
+         *
+         * Doing so saves overall 4 multiplications and 1 addition compared to
+         * using traditional "TwoProduct".
+         *
+         * The scale factor is either 100 (currency case) or 1000 (decimal case).
+         * - when 1000, we replace it by (1024 - 16 - 8) = 1000.
+         * - when 100,  we replace it by (128  - 32 + 4) =  100.
+         * Every multiplication by a power of 2 (1024, 128, 32, 16, 8, 4) is exact.
+         *
+         */
+        double approxMax;    // Will always be positive.
+        double approxMedium; // Will always be negative.
+        double approxMin;
+
+        double fastTwoSumApproximation = 0.0d;
+        double fastTwoSumRoundOff = 0.0d;
+        double bVirtual = 0.0d;
+
+        if (isCurrencyFormat) {
+            // Scale is 100 = 128 - 32 + 4.
+            // Multiply by 2**n is a shift. No roundoff. No error.
+            approxMax    = fractionalPart * 128.00d;
+            approxMedium = - (fractionalPart * 32.00d);
+            approxMin    = fractionalPart * 4.00d;
+        } else {
+            // Scale is 1000 = 1024 - 16 - 8.
+            // Multiply by 2**n is a shift. No roundoff. No error.
+            approxMax    = fractionalPart * 1024.00d;
+            approxMedium = - (fractionalPart * 16.00d);
+            approxMin    = - (fractionalPart * 8.00d);
+        }
+
+        // Shewchuk/Dekker's FastTwoSum(approxMedium, approxMin).
+        assert(-approxMedium >= Math.abs(approxMin));
+        fastTwoSumApproximation = approxMedium + approxMin;
+        bVirtual = fastTwoSumApproximation - approxMedium;
+        fastTwoSumRoundOff = approxMin - bVirtual;
+        double approxS1 = fastTwoSumApproximation;
+        double roundoffS1 = fastTwoSumRoundOff;
+
+        // Shewchuk/Dekker's FastTwoSum(approxMax, approxS1);
+        assert(approxMax >= Math.abs(approxS1));
+        fastTwoSumApproximation = approxMax + approxS1;
+        bVirtual = fastTwoSumApproximation - approxMax;
+        fastTwoSumRoundOff = approxS1 - bVirtual;
+        double roundoff1000 = fastTwoSumRoundOff;
+        double approx1000 = fastTwoSumApproximation;
+        double roundoffTotal = roundoffS1 + roundoff1000;
+
+        // Shewchuk/Dekker's FastTwoSum(approx1000, roundoffTotal);
+        assert(approx1000 >= Math.abs(roundoffTotal));
+        fastTwoSumApproximation = approx1000 + roundoffTotal;
+        bVirtual = fastTwoSumApproximation - approx1000;
+
+        // Now we have got the roundoff for the scaled fractional
+        double scaledFractionalRoundoff = roundoffTotal - bVirtual;
+
+        // ---- TwoProduct(fractionalPart, scale (i.e. 1000.0d or 100.0d)) end.
+
+        /* ---- Taking the rounding decision
+         *
+         * We take rounding decision based on roundoff and half-even rounding
+         * rule.
+         *
+         * The above TwoProduct gives us the exact roundoff on the approximated
+         * scaled fractional, and we know that this approximation is exactly
+         * 0.5d, since that has already been tested by the caller
+         * (fastDoubleFormat).
+         *
+         * Decision comes first from the sign of the calculated exact roundoff.
+         * - Since being exact roundoff, it cannot be positive with a scaled
+         *   fractional less than 0.5d, as well as negative with a scaled
+         *   fractional greater than 0.5d. That leaves us with following 3 cases.
+         * - positive, thus scaled fractional == 0.500....0fff ==> round-up.
+         * - negative, thus scaled fractional == 0.499....9fff ==> don't round-up.
+         * - is zero,  thus scaled fractioanl == 0.5 ==> half-even rounding applies :
+         *    we round-up only if the integral part of the scaled fractional is odd.
+         *
+         */
+        if (scaledFractionalRoundoff > 0.0) {
+            return true;
+        } else if (scaledFractionalRoundoff < 0.0) {
+            return false;
+        } else if ((scaledFractionalPartAsInt & 1) != 0) {
+            return true;
+        }
+
+        return false;
+
+        // ---- Taking the rounding decision end
+    }
+
+    /**
+     * Collects integral digits from passed {@code number}, while setting
+     * grouping chars as needed. Updates {@code firstUsedIndex} accordingly.
+     *
+     * Loops downward starting from {@code backwardIndex} position (inclusive).
+     *
+     * @param number  The int value from which we collect digits.
+     * @param digitsBuffer The char array container where digits and grouping chars
+     *  are stored.
+     * @param backwardIndex the position from which we start storing digits in
+     *  digitsBuffer.
+     *
+     */
+    private void collectIntegralDigits(int number,
+                                       char[] digitsBuffer,
+                                       int backwardIndex) {
+        int index = backwardIndex;
+        int q;
+        int r;
+        while (number > 999) {
+            // Generates 3 digits per iteration.
+            q = number / 1000;
+            r = number - (q << 10) + (q << 4) + (q << 3); // -1024 +16 +8 = 1000.
+            number = q;
+
+            digitsBuffer[index--] = DigitArrays.DigitOnes1000[r];
+            digitsBuffer[index--] = DigitArrays.DigitTens1000[r];
+            digitsBuffer[index--] = DigitArrays.DigitHundreds1000[r];
+            digitsBuffer[index--] = fastPathData.groupingChar;
+        }
+
+        // Collects last 3 or less digits.
+        digitsBuffer[index] = DigitArrays.DigitOnes1000[number];
+        if (number > 9) {
+            digitsBuffer[--index]  = DigitArrays.DigitTens1000[number];
+            if (number > 99)
+                digitsBuffer[--index]   = DigitArrays.DigitHundreds1000[number];
+        }
+
+        fastPathData.firstUsedIndex = index;
+    }
+
+    /**
+     * Collects the 2 (currency) or 3 (decimal) fractional digits from passed
+     * {@code number}, starting at {@code startIndex} position
+     * inclusive.  There is no punctuation to set here (no grouping chars).
+     * Updates {@code fastPathData.lastFreeIndex} accordingly.
+     *
+     *
+     * @param number  The int value from which we collect digits.
+     * @param digitsBuffer The char array container where digits are stored.
+     * @param startIndex the position from which we start storing digits in
+     *  digitsBuffer.
+     *
+     */
+    private void collectFractionalDigits(int number,
+                                         char[] digitsBuffer,
+                                         int startIndex) {
+        int index = startIndex;
+
+        char digitOnes = DigitArrays.DigitOnes1000[number];
+        char digitTens = DigitArrays.DigitTens1000[number];
+
+        if (isCurrencyFormat) {
+            // Currency case. Always collects fractional digits.
+            digitsBuffer[index++] = digitTens;
+            digitsBuffer[index++] = digitOnes;
+        } else if (number != 0) {
+            // Decimal case. Hundreds will always be collected
+            digitsBuffer[index++] = DigitArrays.DigitHundreds1000[number];
+
+            // Ending zeros won't be collected.
+            if (digitOnes != '0') {
+                digitsBuffer[index++] = digitTens;
+                digitsBuffer[index++] = digitOnes;
+            } else if (digitTens != '0')
+                digitsBuffer[index++] = digitTens;
+
+        } else
+            // This is decimal pattern and fractional part is zero.
+            // We must remove decimal point from result.
+            index--;
+
+        fastPathData.lastFreeIndex = index;
+    }
+
+    /**
+     * Internal utility.
+     * Adds the passed {@code prefix} and {@code suffix} to {@code container}.
+     *
+     * @param container  Char array container which to prepend/append the
+     *  prefix/suffix.
+     * @param prefix     Char sequence to prepend as a prefix.
+     * @param suffix     Char sequence to append as a suffix.
+     *
+     */
+    //    private void addAffixes(boolean isNegative, char[] container) {
+    private void addAffixes(char[] container, char[] prefix, char[] suffix) {
+
+        // We add affixes only if needed (affix length > 0).
+        int pl = prefix.length;
+        int sl = suffix.length;
+        if (pl != 0) prependPrefix(prefix, pl, container);
+        if (sl != 0) appendSuffix(suffix, sl, container);
+
+    }
+
+    /**
+     * Prepends the passed {@code prefix} chars to given result
+     * {@code container}.  Updates {@code fastPathData.firstUsedIndex}
+     * accordingly.
+     *
+     * @param prefix The prefix characters to prepend to result.
+     * @param len The number of chars to prepend.
+     * @param container Char array container which to prepend the prefix
+     */
+    private void prependPrefix(char[] prefix,
+                               int len,
+                               char[] container) {
+
+        fastPathData.firstUsedIndex -= len;
+        int startIndex = fastPathData.firstUsedIndex;
+
+        // If prefix to prepend is only 1 char long, just assigns this char.
+        // If prefix is less or equal 4, we use a dedicated algorithm that
+        //  has shown to run faster than System.arraycopy.
+        // If more than 4, we use System.arraycopy.
+        if (len == 1)
+            container[startIndex] = prefix[0];
+        else if (len <= 4) {
+            int dstLower = startIndex;
+            int dstUpper = dstLower + len - 1;
+            int srcUpper = len - 1;
+            container[dstLower] = prefix[0];
+            container[dstUpper] = prefix[srcUpper];
+
+            if (len > 2)
+                container[++dstLower] = prefix[1];
+            if (len == 4)
+                container[--dstUpper] = prefix[2];
+        } else
+            System.arraycopy(prefix, 0, container, startIndex, len);
+    }
+
+    /**
+     * Appends the passed {@code suffix} chars to given result
+     * {@code container}.  Updates {@code fastPathData.lastFreeIndex}
+     * accordingly.
+     *
+     * @param suffix The suffix characters to append to result.
+     * @param len The number of chars to append.
+     * @param container Char array container which to append the suffix
+     */
+    private void appendSuffix(char[] suffix,
+                              int len,
+                              char[] container) {
+
+        int startIndex = fastPathData.lastFreeIndex;
+
+        // If suffix to append is only 1 char long, just assigns this char.
+        // If suffix is less or equal 4, we use a dedicated algorithm that
+        //  has shown to run faster than System.arraycopy.
+        // If more than 4, we use System.arraycopy.
+        if (len == 1)
+            container[startIndex] = suffix[0];
+        else if (len <= 4) {
+            int dstLower = startIndex;
+            int dstUpper = dstLower + len - 1;
+            int srcUpper = len - 1;
+            container[dstLower] = suffix[0];
+            container[dstUpper] = suffix[srcUpper];
+
+            if (len > 2)
+                container[++dstLower] = suffix[1];
+            if (len == 4)
+                container[--dstUpper] = suffix[2];
+        } else
+            System.arraycopy(suffix, 0, container, startIndex, len);
+
+        fastPathData.lastFreeIndex += len;
+    }
+
+    /**
+     * Converts digit chars from {@code digitsBuffer} to current locale.
+     *
+     * Must be called before adding affixes since we refer to
+     * {@code fastPathData.firstUsedIndex} and {@code fastPathData.lastFreeIndex},
+     * and do not support affixes (for speed reason).
+     *
+     * We loop backward starting from last used index in {@code fastPathData}.
+     *
+     * @param digitsBuffer The char array container where the digits are stored.
+     */
+    private void localizeDigits(char[] digitsBuffer) {
+
+        // We will localize only the digits, using the groupingSize,
+        // and taking into account fractional part.
+
+        // First take into account fractional part.
+        int digitsCounter =
+            fastPathData.lastFreeIndex - fastPathData.fractionalFirstIndex;
+
+        // The case when there is no fractional digits.
+        if (digitsCounter < 0)
+            digitsCounter = groupingSize;
+
+        // Only the digits remains to localize.
+        for (int cursor = fastPathData.lastFreeIndex - 1;
+             cursor >= fastPathData.firstUsedIndex;
+             cursor--) {
+            if (digitsCounter != 0) {
+                // This is a digit char, we must localize it.
+                digitsBuffer[cursor] += fastPathData.zeroDelta;
+                digitsCounter--;
+            } else {
+                // Decimal separator or grouping char. Reinit counter only.
+                digitsCounter = groupingSize;
+            }
+        }
+    }
+
+    /**
+     * This is the main entry point for the fast-path format algorithm.
+     *
+     * At this point we are sure to be in the expected conditions to run it.
+     * This algorithm builds the formatted result and puts it in the dedicated
+     * {@code fastPathData.fastPathContainer}.
+     *
+     * @param d the double value to be formatted.
+     * @param negative Flag precising if {@code d} is negative.
+     */
+    private void fastDoubleFormat(double d,
+                                  boolean negative) {
+
+        char[] container = fastPathData.fastPathContainer;
+
+        /*
+         * The principle of the algorithm is to :
+         * - Break the passed double into its integral and fractional parts
+         *    converted into integers.
+         * - Then decide if rounding up must be applied or not by following
+         *    the half-even rounding rule, first using approximated scaled
+         *    fractional part.
+         * - For the difficult cases (approximated scaled fractional part
+         *    being exactly 0.5d), we refine the rounding decision by calling
+         *    exactRoundUp utility method that both calculates the exact roundoff
+         *    on the approximation and takes correct rounding decision.
+         * - We round-up the fractional part if needed, possibly propagating the
+         *    rounding to integral part if we meet a "all-nine" case for the
+         *    scaled fractional part.
+         * - We then collect digits from the resulting integral and fractional
+         *   parts, also setting the required grouping chars on the fly.
+         * - Then we localize the collected digits if needed, and
+         * - Finally prepend/append prefix/suffix if any is needed.
+         */
+
+        // Exact integral part of d.
+        int integralPartAsInt = (int) d;
+
+        // Exact fractional part of d (since we subtract it's integral part).
+        double exactFractionalPart = d - (double) integralPartAsInt;
+
+        // Approximated scaled fractional part of d (due to multiplication).
+        double scaledFractional =
+            exactFractionalPart * fastPathData.fractionalScaleFactor;
+
+        // Exact integral part of scaled fractional above.
+        int fractionalPartAsInt = (int) scaledFractional;
+
+        // Exact fractional part of scaled fractional above.
+        scaledFractional = scaledFractional - (double) fractionalPartAsInt;
+
+        // Only when scaledFractional is exactly 0.5d do we have to do exact
+        // calculations and take fine-grained rounding decision, since
+        // approximated results above may lead to incorrect decision.
+        // Otherwise comparing against 0.5d (strictly greater or less) is ok.
+        boolean roundItUp = false;
+        if (scaledFractional >= 0.5d) {
+            if (scaledFractional == 0.5d)
+                // Rounding need fine-grained decision.
+                roundItUp = exactRoundUp(exactFractionalPart, fractionalPartAsInt);
+            else
+                roundItUp = true;
+
+            if (roundItUp) {
+                // Rounds up both fractional part (and also integral if needed).
+                if (fractionalPartAsInt < fastPathData.fractionalMaxIntBound) {
+                    fractionalPartAsInt++;
+                } else {
+                    // Propagates rounding to integral part since "all nines" case.
+                    fractionalPartAsInt = 0;
+                    integralPartAsInt++;
+                }
+            }
+        }
+
+        // Collecting digits.
+        collectFractionalDigits(fractionalPartAsInt, container,
+                                fastPathData.fractionalFirstIndex);
+        collectIntegralDigits(integralPartAsInt, container,
+                              fastPathData.integralLastIndex);
+
+        // Localizing digits.
+        if (fastPathData.zeroDelta != 0)
+            localizeDigits(container);
+
+        // Adding prefix and suffix.
+        if (negative) {
+            if (fastPathData.negativeAffixesRequired)
+                addAffixes(container,
+                           fastPathData.charsNegativePrefix,
+                           fastPathData.charsNegativeSuffix);
+        } else if (fastPathData.positiveAffixesRequired)
+            addAffixes(container,
+                       fastPathData.charsPositivePrefix,
+                       fastPathData.charsPositiveSuffix);
+    }
+
+    /**
+     * A fast-path shortcut of format(double) to be called by NumberFormat, or by
+     * format(double, ...) public methods.
+     *
+     * If instance can be applied fast-path and passed double is not NaN or
+     * Infinity, is in the integer range, we call {@code fastDoubleFormat}
+     * after changing {@code d} to its positive value if necessary.
+     *
+     * Otherwise returns null by convention since fast-path can't be exercized.
+     *
+     * @param d The double value to be formatted
+     *
+     * @return the formatted result for {@code d} as a string.
+     */
+    String fastFormat(double d) {
+        // (Re-)Evaluates fast-path status if needed.
+        if (fastPathCheckNeeded)
+            checkAndSetFastPathStatus();
+
+        if (!isFastPath )
+            // DecimalFormat instance is not in a fast-path state.
+            return null;
+
+        if (!Double.isFinite(d))
+            // Should not use fast-path for Infinity and NaN.
+            return null;
+
+        // Extracts and records sign of double value, possibly changing it
+        // to a positive one, before calling fastDoubleFormat().
+        boolean negative = false;
+        if (d < 0.0d) {
+            negative = true;
+            d = -d;
+        } else if (d == 0.0d) {
+            negative = (Math.copySign(1.0d, d) == -1.0d);
+            d = +0.0d;
+        }
+
+        if (d > MAX_INT_AS_DOUBLE)
+            // Filters out values that are outside expected fast-path range
+            return null;
+        else
+            fastDoubleFormat(d, negative);
+
+        // Returns a new string from updated fastPathContainer.
+        return new String(fastPathData.fastPathContainer,
+                          fastPathData.firstUsedIndex,
+                          fastPathData.lastFreeIndex - fastPathData.firstUsedIndex);
+
+    }
+
+    // ======== End fast-path formating logic for double =========================
+
     /**
      * Complete the formatting of a finite number.  On entry, the digitList must
      * be filled in with the correct digits.
@@ -1168,8 +1898,7 @@ public class DecimalFormat extends NumberFormat {
         if (isNegative) {
             append(result, negativeSuffix, delegate,
                    getNegativeSuffixFieldPositions(), Field.SIGN);
-        }
-        else {
+        } else {
             append(result, positiveSuffix, delegate,
                    getPositiveSuffixFieldPositions(), Field.SIGN);
         }
@@ -1557,8 +2286,7 @@ public class DecimalFormat extends NumberFormat {
                         sawExponent = true;
                     }
                     break; // Whether we fail or succeed, we exit this loop
-                }
-                else {
+                } else {
                     break;
                 }
             }
@@ -1653,6 +2381,7 @@ public class DecimalFormat extends NumberFormat {
             // don't allow multiple references
             symbols = (DecimalFormatSymbols) newSymbols.clone();
             expandAffixes();
+            fastPathCheckNeeded = true;
         } catch (Exception foo) {
             // should never happen
         }
@@ -1674,6 +2403,7 @@ public class DecimalFormat extends NumberFormat {
         positivePrefix = newValue;
         posPrefixPattern = null;
         positivePrefixFieldPositions = null;
+        fastPathCheckNeeded = true;
     }
 
     /**
@@ -1688,8 +2418,7 @@ public class DecimalFormat extends NumberFormat {
         if (positivePrefixFieldPositions == null) {
             if (posPrefixPattern != null) {
                 positivePrefixFieldPositions = expandAffix(posPrefixPattern);
-            }
-            else {
+            } else {
                 positivePrefixFieldPositions = EmptyFieldPositionArray;
             }
         }
@@ -1711,6 +2440,7 @@ public class DecimalFormat extends NumberFormat {
     public void setNegativePrefix (String newValue) {
         negativePrefix = newValue;
         negPrefixPattern = null;
+        fastPathCheckNeeded = true;
     }
 
     /**
@@ -1725,8 +2455,7 @@ public class DecimalFormat extends NumberFormat {
         if (negativePrefixFieldPositions == null) {
             if (negPrefixPattern != null) {
                 negativePrefixFieldPositions = expandAffix(negPrefixPattern);
-            }
-            else {
+            } else {
                 negativePrefixFieldPositions = EmptyFieldPositionArray;
             }
         }
@@ -1748,6 +2477,7 @@ public class DecimalFormat extends NumberFormat {
     public void setPositiveSuffix (String newValue) {
         positiveSuffix = newValue;
         posSuffixPattern = null;
+        fastPathCheckNeeded = true;
     }
 
     /**
@@ -1762,8 +2492,7 @@ public class DecimalFormat extends NumberFormat {
         if (positiveSuffixFieldPositions == null) {
             if (posSuffixPattern != null) {
                 positiveSuffixFieldPositions = expandAffix(posSuffixPattern);
-            }
-            else {
+            } else {
                 positiveSuffixFieldPositions = EmptyFieldPositionArray;
             }
         }
@@ -1785,6 +2514,7 @@ public class DecimalFormat extends NumberFormat {
     public void setNegativeSuffix (String newValue) {
         negativeSuffix = newValue;
         negSuffixPattern = null;
+        fastPathCheckNeeded = true;
     }
 
     /**
@@ -1799,8 +2529,7 @@ public class DecimalFormat extends NumberFormat {
         if (negativeSuffixFieldPositions == null) {
             if (negSuffixPattern != null) {
                 negativeSuffixFieldPositions = expandAffix(negSuffixPattern);
-            }
-            else {
+            } else {
                 negativeSuffixFieldPositions = EmptyFieldPositionArray;
             }
         }
@@ -1834,6 +2563,16 @@ public class DecimalFormat extends NumberFormat {
         multiplier = newValue;
         bigDecimalMultiplier = null;
         bigIntegerMultiplier = null;
+        fastPathCheckNeeded = true;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setGroupingUsed(boolean newValue) {
+        super.setGroupingUsed(newValue);
+        fastPathCheckNeeded = true;
     }
 
     /**
@@ -1860,6 +2599,7 @@ public class DecimalFormat extends NumberFormat {
      */
     public void setGroupingSize (int newValue) {
         groupingSize = (byte)newValue;
+        fastPathCheckNeeded = true;
     }
 
     /**
@@ -1878,6 +2618,7 @@ public class DecimalFormat extends NumberFormat {
      */
     public void setDecimalSeparatorAlwaysShown(boolean newValue) {
         decimalSeparatorAlwaysShown = newValue;
+        fastPathCheckNeeded = true;
     }
 
     /**
@@ -1908,6 +2649,20 @@ public class DecimalFormat extends NumberFormat {
         DecimalFormat other = (DecimalFormat) super.clone();
         other.symbols = (DecimalFormatSymbols) symbols.clone();
         other.digitList = (DigitList) digitList.clone();
+
+        // Fast-path is almost stateless algorithm. The only logical state is the
+        // isFastPath flag. In addition fastPathCheckNeeded is a sentinel flag
+        // that forces recalculation of all fast-path fields when set to true.
+        //
+        // There is thus no need to clone all the fast-path fields.
+        // We just only need to set fastPathCheckNeeded to true when cloning,
+        // and init fastPathData to null as if it were a truly new instance.
+        // Every fast-path field will be recalculated (only once) at next usage of
+        // fast-path algorithm.
+        other.fastPathCheckNeeded = true;
+        other.isFastPath = false;
+        other.fastPathData = null;
+
         return other;
     }
 
@@ -1917,8 +2672,10 @@ public class DecimalFormat extends NumberFormat {
     @Override
     public boolean equals(Object obj)
     {
-        if (obj == null) return false;
-        if (!super.equals(obj)) return false; // super does class check
+        if (obj == null)
+            return false;
+        if (!super.equals(obj))
+            return false; // super does class check
         DecimalFormat other = (DecimalFormat) obj;
         return ((posPrefixPattern == other.posPrefixPattern &&
                  positivePrefix.equals(other.positivePrefix))
@@ -2206,8 +2963,7 @@ public class DecimalFormat extends NumberFormat {
                 || affix.indexOf(symbols.getPatternSeparator()) >= 0
                 || affix.indexOf(symbols.getMinusSign()) >= 0
                 || affix.indexOf(CURRENCY_SIGN) >= 0;
-        }
-        else {
+        } else {
             needQuote = affix.indexOf(PATTERN_ZERO_DIGIT) >= 0
                 || affix.indexOf(PATTERN_GROUPING_SEPARATOR) >= 0
                 || affix.indexOf(PATTERN_DECIMAL_SEPARATOR) >= 0
@@ -2694,6 +3450,7 @@ public class DecimalFormat extends NumberFormat {
             super.setMinimumIntegerDigits((minimumIntegerDigits > DOUBLE_INTEGER_DIGITS) ?
                 DOUBLE_INTEGER_DIGITS : minimumIntegerDigits);
         }
+        fastPathCheckNeeded = true;
     }
 
     /**
@@ -2714,6 +3471,7 @@ public class DecimalFormat extends NumberFormat {
             super.setMaximumIntegerDigits((maximumIntegerDigits > DOUBLE_INTEGER_DIGITS) ?
                 DOUBLE_INTEGER_DIGITS : maximumIntegerDigits);
         }
+        fastPathCheckNeeded = true;
     }
 
     /**
@@ -2734,6 +3492,7 @@ public class DecimalFormat extends NumberFormat {
             super.setMinimumFractionDigits((minimumFractionDigits > DOUBLE_FRACTION_DIGITS) ?
                 DOUBLE_FRACTION_DIGITS : minimumFractionDigits);
         }
+        fastPathCheckNeeded = true;
     }
 
     /**
@@ -2754,6 +3513,7 @@ public class DecimalFormat extends NumberFormat {
             super.setMaximumFractionDigits((maximumFractionDigits > DOUBLE_FRACTION_DIGITS) ?
                 DOUBLE_FRACTION_DIGITS : maximumFractionDigits);
         }
+        fastPathCheckNeeded = true;
     }
 
     /**
@@ -2843,6 +3603,7 @@ public class DecimalFormat extends NumberFormat {
                 expandAffixes();
             }
         }
+        fastPathCheckNeeded = true;
     }
 
     /**
@@ -2873,6 +3634,7 @@ public class DecimalFormat extends NumberFormat {
 
         this.roundingMode = roundingMode;
         digitList.setRoundingMode(roundingMode);
+        fastPathCheckNeeded = true;
     }
 
     /**
@@ -2924,9 +3686,18 @@ public class DecimalFormat extends NumberFormat {
         stream.defaultReadObject();
         digitList = new DigitList();
 
+        // We force complete fast-path reinitialization when the instance is
+        // deserialized. See clone() comment on fastPathCheckNeeded.
+        fastPathCheckNeeded = true;
+        isFastPath = false;
+        fastPathData = null;
+
         if (serialVersionOnStream < 4) {
             setRoundingMode(RoundingMode.HALF_EVEN);
+        } else {
+            setRoundingMode(getRoundingMode());
         }
+
         // We only need to check the maximum counts because NumberFormat
         // .readObject has already ensured that the maximum is greater than the
         // minimum count.
@@ -3195,6 +3966,77 @@ public class DecimalFormat extends NumberFormat {
      */
     private RoundingMode roundingMode = RoundingMode.HALF_EVEN;
 
+    // ------ DecimalFormat fields for fast-path for double algorithm  ------
+
+    /**
+     * Helper inner utility class for storing the data used in the fast-path
+     * algorithm. Almost all fields related to fast-path are encapsulated in
+     * this class.
+     *
+     * Any {@code DecimalFormat} instance has a {@code fastPathData}
+     * reference field that is null unless both the properties of the instance
+     * are such that the instance is in the "fast-path" state, and a format call
+     * has been done at least once while in this state.
+     *
+     * Almost all fields are related to the "fast-path" state only and don't
+     * change until one of the instance properties is changed.
+     *
+     * {@code firstUsedIndex} and {@code lastFreeIndex} are the only
+     * two fields that are used and modified while inside a call to
+     * {@code fastDoubleFormat}.
+     *
+     */
+    private static class FastPathData {
+        // --- Temporary fields used in fast-path, shared by several methods.
+
+        /** The first unused index at the end of the formatted result. */
+        int lastFreeIndex;
+
+        /** The first used index at the beginning of the formatted result */
+        int firstUsedIndex;
+
+        // --- State fields related to fast-path status. Changes due to a
+        //     property change only. Set by checkAndSetFastPathStatus() only.
+
+        /** Difference between locale zero and default zero representation. */
+        int  zeroDelta;
+
+        /** Locale char for grouping separator. */
+        char groupingChar;
+
+        /**  Fixed index position of last integral digit of formatted result */
+        int integralLastIndex;
+
+        /**  Fixed index position of first fractional digit of formatted result */
+        int fractionalFirstIndex;
+
+        /** Fractional constants depending on decimal|currency state */
+        double fractionalScaleFactor;
+        int fractionalMaxIntBound;
+
+
+        /** The char array buffer that will contain the formatted result */
+        char[] fastPathContainer;
+
+        /** Suffixes recorded as char array for efficiency. */
+        char[] charsPositivePrefix;
+        char[] charsNegativePrefix;
+        char[] charsPositiveSuffix;
+        char[] charsNegativeSuffix;
+        boolean positiveAffixesRequired = true;
+        boolean negativeAffixesRequired = true;
+    }
+
+    /** The format fast-path status of the instance. Logical state. */
+    private transient boolean isFastPath = false;
+
+    /** Flag stating need of check and reinit fast-path status on next format call. */
+    private transient boolean fastPathCheckNeeded = true;
+
+    /** DecimalFormat reference to its FastPathData */
+    private transient FastPathData fastPathData;
+
+
     //----------------------------------------------------------------------
 
     static final int currentSerialVersion = 4;
@@ -3228,6 +4070,54 @@ public class DecimalFormat extends NumberFormat {
     // CONSTANTS
     //----------------------------------------------------------------------
 
+    // ------ Fast-Path for double Constants ------
+
+    /** Maximum valid integer value for applying fast-path algorithm */
+    private static final double MAX_INT_AS_DOUBLE = (double) Integer.MAX_VALUE;
+
+    /**
+     * The digit arrays used in the fast-path methods for collecting digits.
+     * Using 3 constants arrays of chars ensures a very fast collection of digits
+     */
+    private static class DigitArrays {
+        static final char[] DigitOnes1000 = new char[1000];
+        static final char[] DigitTens1000 = new char[1000];
+        static final char[] DigitHundreds1000 = new char[1000];
+
+        // initialize on demand holder class idiom for arrays of digits
+        static {
+            int tenIndex = 0;
+            int hundredIndex = 0;
+            char digitOne = '0';
+            char digitTen = '0';
+            char digitHundred = '0';
+            for (int i = 0;  i < 1000; i++ ) {
+
+                DigitOnes1000[i] = digitOne;
+                if (digitOne == '9')
+                    digitOne = '0';
+                else
+                    digitOne++;
+
+                DigitTens1000[i] = digitTen;
+                if (i == (tenIndex + 9)) {
+                    tenIndex += 10;
+                    if (digitTen == '9')
+                        digitTen = '0';
+                    else
+                        digitTen++;
+                }
+
+                DigitHundreds1000[i] = digitHundred;
+                if (i == (hundredIndex + 99)) {
+                    digitHundred++;
+                    hundredIndex += 100;
+                }
+            }
+        }
+    }
+    // ------ Fast-Path for double Constants end ------
+
     // Constants for characters used in programmatic (unlocalized) patterns.
     private static final char       PATTERN_ZERO_DIGIT         = '0';
     private static final char       PATTERN_GROUPING_SEPARATOR = ',';
diff --git a/jdk/src/share/classes/java/text/DigitList.java b/jdk/src/share/classes/java/text/DigitList.java
index ec489dbd4e9..1f866e4f767 100644
--- a/jdk/src/share/classes/java/text/DigitList.java
+++ b/jdk/src/share/classes/java/text/DigitList.java
@@ -62,7 +62,7 @@ import java.math.RoundingMode;
  * derived by placing all the digits of the list to the right of the
  * decimal point, by 10^exponent.
  *
- * @see  Locale
+ * @see  java.util.Locale
  * @see  Format
  * @see  NumberFormat
  * @see  DecimalFormat
diff --git a/jdk/src/share/classes/java/text/Format.java b/jdk/src/share/classes/java/text/Format.java
index 2eec6671842..ad7d95a53bf 100644
--- a/jdk/src/share/classes/java/text/Format.java
+++ b/jdk/src/share/classes/java/text/Format.java
@@ -370,7 +370,7 @@ public abstract class Format implements Serializable, Cloneable {
      * Delegates should NOT assume that the <code>Format</code> will notify
      * the delegate of fields in any particular order.
      *
-     * @see FieldPosition.Delegate
+     * @see FieldPosition#getFieldDelegate
      * @see CharacterIteratorFieldDelegate
      */
     interface FieldDelegate {
diff --git a/jdk/src/share/classes/java/text/NumberFormat.java b/jdk/src/share/classes/java/text/NumberFormat.java
index ae9b3dfa3df..e155b81b60c 100644
--- a/jdk/src/share/classes/java/text/NumberFormat.java
+++ b/jdk/src/share/classes/java/text/NumberFormat.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -286,10 +286,21 @@ public abstract class NumberFormat extends Format  {
      * @see java.text.Format#format
      */
     public final String format(double number) {
+        // Use fast-path for double result if that works
+        String result = fastFormat(number);
+        if (result != null)
+            return result;
+
         return format(number, new StringBuffer(),
                       DontCareFieldPosition.INSTANCE).toString();
     }
 
+    /*
+     * fastFormat() is supposed to be implemented in concrete subclasses only.
+     * Default implem always returns null.
+     */
+    String fastFormat(double number) { return null; }
+
    /**
      * Specialization of format.
      * @exception        ArithmeticException if rounding is needed with rounding
diff --git a/jdk/src/share/classes/java/text/RBCollationTables.java b/jdk/src/share/classes/java/text/RBCollationTables.java
index aa349e68d6a..8285fa79e2b 100644
--- a/jdk/src/share/classes/java/text/RBCollationTables.java
+++ b/jdk/src/share/classes/java/text/RBCollationTables.java
@@ -192,13 +192,12 @@ final class RBCollationTables {
       *
       * @see CollationElementIterator#getMaxExpansion
       */
-    int getMaxExpansion(int order)
-    {
+    int getMaxExpansion(int order) {
         int result = 1;
 
         if (expandTable != null) {
             // Right now this does a linear search through the entire
-            // expandsion table.  If a collator had a large number of expansions,
+            // expansion table.  If a collator had a large number of expansions,
             // this could cause a performance problem, but in practise that
             // rarely happens
             for (int i = 0; i < expandTable.size(); i++) {
@@ -215,20 +214,19 @@ final class RBCollationTables {
     }
 
     /**
-     *  Get the entry of hash table of the expanding string in the collation
-     *  table.
-     *  @param idx the index of the expanding string value list
+     * Get the entry of hash table of the expanding string in the collation
+     * table.
+     * @param idx the index of the expanding string value list
      */
-    final int[] getExpandValueList(int order) {
-        return expandTable.elementAt(order - EXPANDCHARINDEX);
+    final int[] getExpandValueList(int idx) {
+        return expandTable.elementAt(idx - EXPANDCHARINDEX);
     }
 
     /**
-     *  Get the comarison order of a character from the collation table.
-     *  @return the comparison order of a character.
+     * Get the comarison order of a character from the collation table.
+     * @return the comparison order of a character.
      */
-    int getUnicodeOrder(int ch)
-    {
+    int getUnicodeOrder(int ch) {
         return mapping.elementAt(ch);
     }
 
diff --git a/jdk/src/share/classes/java/text/RBTableBuilder.java b/jdk/src/share/classes/java/text/RBTableBuilder.java
index a78872949d6..d8ff4fe7069 100644
--- a/jdk/src/share/classes/java/text/RBTableBuilder.java
+++ b/jdk/src/share/classes/java/text/RBTableBuilder.java
@@ -71,7 +71,7 @@ final class RBTableBuilder {
      * This is the main function that actually builds the tables and
      * stores them back in the RBCollationTables object.  It is called
      * ONLY by the RBCollationTables constructor.
-     * @see java.util.RuleBasedCollator#RuleBasedCollator
+     * @see RuleBasedCollator#RuleBasedCollator
      * @exception ParseException If the rules format is incorrect.
      */
 
diff --git a/jdk/src/share/classes/java/text/SimpleDateFormat.java b/jdk/src/share/classes/java/text/SimpleDateFormat.java
index b2751d20f13..b434b6b782a 100644
--- a/jdk/src/share/classes/java/text/SimpleDateFormat.java
+++ b/jdk/src/share/classes/java/text/SimpleDateFormat.java
@@ -1787,7 +1787,7 @@ public class SimpleDateFormat extends DateFormat {
      * timeFields. Returns -start (for ParsePosition) if failed.
      * @param text the time text to be parsed.
      * @param start where to start parsing.
-     * @param ch the pattern character for the date field text to be parsed.
+     * @param patternCharIndex the index of the pattern character.
      * @param count the count of a pattern character.
      * @param obeyCount if true, then the next field directly abuts this one,
      * and we should use the count to know when to stop parsing.
diff --git a/jdk/src/share/classes/java/util/Calendar.java b/jdk/src/share/classes/java/util/Calendar.java
index 602115ae10b..d8c407bdb3e 100644
--- a/jdk/src/share/classes/java/util/Calendar.java
+++ b/jdk/src/share/classes/java/util/Calendar.java
@@ -1788,7 +1788,6 @@ public abstract class Calendar implements Serializable, Cloneable, Comparable<Ca
      *
      * @return a bit mask of selected fields
      * @see #isExternallySet(int)
-     * @see #setInternallySetState(int)
      */
     final int selectFields() {
         // This implementation has been taken from the GregorianCalendar class.
diff --git a/jdk/src/share/classes/java/util/Currency.java b/jdk/src/share/classes/java/util/Currency.java
index 45e5747f069..5f2a2143952 100644
--- a/jdk/src/share/classes/java/util/Currency.java
+++ b/jdk/src/share/classes/java/util/Currency.java
@@ -665,7 +665,7 @@ public final class Currency implements Serializable {
      *
      * @param pattern regex pattern for the properties
      * @param ctry country code
-     * @param data currency data.  This is a comma separated string that
+     * @param curdata currency data.  This is a comma separated string that
      *    consists of "three-letter alphabet code", "three-digit numeric code",
      *    and "one-digit (0,1,2, or 3) default fraction digit".
      *    For example, "JPZ,392,0".
diff --git a/jdk/src/share/classes/java/util/Formatter.java b/jdk/src/share/classes/java/util/Formatter.java
index 65d34fa7dd9..483a0f24e26 100644
--- a/jdk/src/share/classes/java/util/Formatter.java
+++ b/jdk/src/share/classes/java/util/Formatter.java
@@ -918,7 +918,7 @@ import sun.misc.FormattedFloatingDecimal;
  *     <p> If the {@code '0'} flag is given then the output will be padded
  *     with leading zeros to the field width following any indication of sign.
  *
- *     <p> If {@code '('}, {@code '+'}, '&nbsp&nbsp;', or {@code ','} flags
+ *     <p> If {@code '('}, {@code '+'}, '&nbsp;&nbsp;', or {@code ','} flags
  *     are given then a {@link FormatFlagsConversionMismatchException} will be
  *     thrown.
  *
diff --git a/jdk/src/share/classes/java/util/JapaneseImperialCalendar.java b/jdk/src/share/classes/java/util/JapaneseImperialCalendar.java
index f277efe8c2d..566d59ade2c 100644
--- a/jdk/src/share/classes/java/util/JapaneseImperialCalendar.java
+++ b/jdk/src/share/classes/java/util/JapaneseImperialCalendar.java
@@ -1932,7 +1932,7 @@ class JapaneseImperialCalendar extends Calendar {
      * Computes the fixed date under either the Gregorian or the
      * Julian calendar, using the given year and the specified calendar fields.
      *
-     * @param cal the CalendarSystem to be used for the date calculation
+     * @param era era index
      * @param year the normalized year number, with 0 indicating the
      * year 1 BCE, -1 indicating 2 BCE, etc.
      * @param fieldMask the calendar fields to be used for the date calculation
@@ -2141,7 +2141,7 @@ class JapaneseImperialCalendar extends Calendar {
      * Returns the length of the specified month in the specified
      * Gregorian year. The year number must be normalized.
      *
-     * @see #isLeapYear(int)
+     * @see GregorianCalendar#isLeapYear(int)
      */
     private int monthLength(int month, int gregorianYear) {
         return CalendarUtils.isGregorianLeapYear(gregorianYear) ?
@@ -2152,7 +2152,7 @@ class JapaneseImperialCalendar extends Calendar {
      * Returns the length of the specified month in the year provided
      * by internalGet(YEAR).
      *
-     * @see #isLeapYear(int)
+     * @see GregorianCalendar#isLeapYear(int)
      */
     private int monthLength(int month) {
         assert jdate.isNormalized();
diff --git a/jdk/src/share/classes/java/util/JumboEnumSet.java b/jdk/src/share/classes/java/util/JumboEnumSet.java
index d2f3e83f7b1..67985118269 100644
--- a/jdk/src/share/classes/java/util/JumboEnumSet.java
+++ b/jdk/src/share/classes/java/util/JumboEnumSet.java
@@ -345,7 +345,7 @@ class JumboEnumSet<E extends Enum<E>> extends EnumSet<E> {
      * the same size, and every member of the given set is contained in
      * this set.
      *
-     * @param e object to be compared for equality with this set
+     * @param o object to be compared for equality with this set
      * @return <tt>true</tt> if the specified object is equal to this set
      */
     public boolean equals(Object o) {
diff --git a/jdk/src/share/classes/java/util/Locale.java b/jdk/src/share/classes/java/util/Locale.java
index 7e932f38da1..9d469e4660c 100644
--- a/jdk/src/share/classes/java/util/Locale.java
+++ b/jdk/src/share/classes/java/util/Locale.java
@@ -55,6 +55,7 @@ import sun.util.locale.BaseLocale;
 import sun.util.locale.InternalLocaleBuilder;
 import sun.util.locale.LanguageTag;
 import sun.util.locale.LocaleExtensions;
+import sun.util.locale.LocaleMatcher;
 import sun.util.locale.LocaleObjectCache;
 import sun.util.locale.LocaleSyntaxException;
 import sun.util.locale.LocaleUtils;
@@ -71,10 +72,11 @@ import sun.util.resources.OpenListResourceBundle;
  * according to the customs and conventions of the user's native country,
  * region, or culture.
  *
- * <p> The <code>Locale</code> class implements identifiers
- * interchangeable with BCP 47 (IETF BCP 47, "Tags for Identifying
- * Languages"), with support for the LDML (UTS#35, "Unicode Locale
- * Data Markup Language") BCP 47-compatible extensions for locale data
+ * <p> The {@code Locale} class implements IETF BCP 47 which is composed of
+ * <a href="http://tools.ietf.org/html/rfc4647">RFC 4647 "Matching of Language
+ * Tags"</a> and <a href="http://tools.ietf.org/html/rfc5646">RFC 5646 "Tags
+ * for Identifying Languages"</a> with support for the LDML (UTS#35, "Unicode
+ * Locale Data Markup Language") BCP 47-compatible extensions for locale data
  * exchange.
  *
  * <p> A <code>Locale</code> object logically consists of the fields
@@ -267,6 +269,77 @@ import sun.util.resources.OpenListResourceBundle;
  * </pre>
  * </blockquote>
  *
+ * <h4><a name="LocaleMatching">Locale Matching</a></h4>
+ *
+ * <p>If an application or a system is internationalized and provides localized
+ * resources for multiple locales, it sometimes needs to find one or more
+ * locales (or language tags) which meet each user's specific preferences. Note
+ * that a term "language tag" is used interchangeably with "locale" in this
+ * locale matching documentation.
+ *
+ * <p>In order to do matching a user's preferred locales to a set of language
+ * tags, <a href="http://tools.ietf.org/html/rfc4647">RFC 4647 Matching of
+ * Language Tags</a> defines two mechanisms: filtering and lookup.
+ * <em>Filtering</em> is used to get all matching locales, whereas
+ * <em>lookup</em> is to choose the best matching locale.
+ * Matching is done case-insensitively. These matching mechanisms are described
+ * in the following sections.
+ *
+ * <p>A user's preference is called a <em>Language Priority List</em> and is
+ * expressed as a list of language ranges. There are syntactically two types of
+ * language ranges: basic and extended. See
+ * {@link Locale.LanguageRange Locale.LanguageRange} for details.
+ *
+ * <h5>Filtering</h5>
+ *
+ * <p>The filtering operation returns all matching language tags. It is defined
+ * in RFC 4647 as follows:
+ * "In filtering, each language range represents the least specific language
+ * tag (that is, the language tag with fewest number of subtags) that is an
+ * acceptable match. All of the language tags in the matching set of tags will
+ * have an equal or greater number of subtags than the language range. Every
+ * non-wildcard subtag in the language range will appear in every one of the
+ * matching language tags."
+ *
+ * <p>There are two types of filtering: filtering for basic language ranges
+ * (called "basic filtering") and filtering for extended language ranges
+ * (called "extended filtering"). They may return different results by what
+ * kind of language ranges are included in the given Language Priority List.
+ * {@link Locale.FilteringMode} is a parameter to specify how filtering should
+ * be done.
+ *
+ * <h5>Lookup</h5>
+ *
+ * <p>The lookup operation returns the best matching language tags. It is
+ * defined in RFC 4647 as follows:
+ * "By contrast with filtering, each language range represents the most
+ * specific tag that is an acceptable match.  The first matching tag found,
+ * according to the user's priority, is considered the closest match and is the
+ * item returned."
+ *
+ * <p>For example, if a Language Priority List consists of two language ranges,
+ * {@code "zh-Hant-TW"} and {@code "en-US"}, in prioritized order, lookup
+ * method progressively searches the language tags below in order to find the
+ * best matching language tag.
+ * <blockquote>
+ * <pre>
+ *    1. zh-Hant-TW
+ *    2. zh-Hant
+ *    3. zh
+ *    4. en-US
+ *    5. en
+ * </pre>
+ * </blockquote>
+ * If there is a language tag which matches completely to a language range
+ * above, the language tag is returned.
+ *
+ * <p>{@code "*"} is the special language range, and it is ignored in lookup.
+ *
+ * <p>If multiple language tags match as a result of the subtag {@code '*'}
+ * included in a language range, the first matching language tag returned by
+ * an {@link Iterator} over a {@link Collection} of language tags is treated as
+ * the best matching one.
+ *
  * <h4>Use of Locale</h4>
  *
  * <p>Once you've created a <code>Locale</code> you can query it for information
@@ -1419,7 +1492,7 @@ public final class Locale implements Cloneable, Serializable {
      *    // returns "ja-JP-u-ca-japanese-x-lvariant-JP"
      *    Locale.forLanguageTag("th-TH-x-lvariant-TH").toLanguageTag();
      *    // returns "th-TH-u-nu-thai-x-lvariant-TH"
-     * <pre></ul>
+     * </pre></ul>
      *
      * <p>This implements the 'Language-Tag' production of BCP47, and
      * so supports grandfathered (regular and irregular) as well as
@@ -2070,7 +2143,7 @@ public final class Locale implements Cloneable, Serializable {
      * @param in the <code>ObjectInputStream</code> to read
      * @throws IOException
      * @throws ClassNotFoundException
-     * @throws IllformdLocaleException
+     * @throws IllformedLocaleException
      * @since 1.7
      */
     private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
@@ -2574,4 +2647,611 @@ public final class Locale implements Cloneable, Serializable {
             return Locale.getInstance(baseloc, extensions);
         }
     }
+
+    /**
+     * This enum provides constants to select a filtering mode for locale
+     * matching. Refer to <a href="http://tools.ietf.org/html/rfc4647">RFC 4647
+     * Matching of Language Tags</a> for details.
+     *
+     * <p>As an example, think of two Language Priority Lists each of which
+     * includes only one language range and a set of following language tags:
+     *
+     * <pre>
+     *    de (German)
+     *    de-DE (German, Germany)
+     *    de-Deva (German, in Devanagari script)
+     *    de-Deva-DE (German, in Devanagari script, Germany)
+     *    de-DE-1996 (German, Germany, orthography of 1996)
+     *    de-Latn-DE (German, in Latin script, Germany)
+     *    de-Latn-DE-1996 (German, in Latin script, Germany, orthography of 1996)
+     * </pre>
+     *
+     * The filtering method will behave as follows:
+     *
+     * <table cellpadding=2>
+     * <tr>
+     * <th>Filtering Mode</th>
+     * <th>Language Priority List: {@code "de-DE"}</th>
+     * <th>Language Priority List: {@code "de-*-DE"}</th>
+     * </tr>
+     * <tr>
+     * <td valign=top>
+     * {@link FilteringMode#AUTOSELECT_FILTERING AUTOSELECT_FILTERING}
+     * </td>
+     * <td valign=top>
+     * Performs <em>basic</em> filtering and returns {@code "de-DE"} and
+     * {@code "de-DE-1996"}.
+     * </td>
+     * <td valign=top>
+     * Performs <em>extended</em> filtering and returns {@code "de-DE"},
+     * {@code "de-Deva-DE"}, {@code "de-DE-1996"}, {@code "de-Latn-DE"}, and
+     * {@code "de-Latn-DE-1996"}.
+     * </td>
+     * </tr>
+     * <tr>
+     * <td valign=top>
+     * {@link FilteringMode#EXTENDED_FILTERING EXTENDED_FILTERING}
+     * </td>
+     * <td valign=top>
+     * Performs <em>extended</em> filtering and returns {@code "de-DE"},
+     * {@code "de-Deva-DE"}, {@code "de-DE-1996"}, {@code "de-Latn-DE"}, and
+     * {@code "de-Latn-DE-1996"}.
+     * </td>
+     * <td valign=top>Same as above.</td>
+     * </tr>
+     * <tr>
+     * <td valign=top>
+     * {@link FilteringMode#IGNORE_EXTENDED_RANGES IGNORE_EXTENDED_RANGES}
+     * </td>
+     * <td valign=top>
+     * Performs <em>basic</em> filtering and returns {@code "de-DE"} and
+     * {@code "de-DE-1996"}.
+     * </td>
+     * <td valign=top>
+     * Performs <em>basic</em> filtering and returns {@code null} because
+     * nothing matches.
+     * </td>
+     * </tr>
+     * <tr>
+     * <td valign=top>
+     * {@link FilteringMode#MAP_EXTENDED_RANGES MAP_EXTENDED_RANGES}
+     * </td>
+     * <td valign=top>Same as above.</td>
+     * <td valign=top>
+     * Performs <em>basic</em> filtering and returns {@code "de-DE"} and
+     * {@code "de-DE-1996"} because {@code "de-*-DE"} is mapped to
+     * {@code "de-DE"}.
+     * </td>
+     * </tr>
+     * <tr>
+     * <td valign=top>
+     * {@link FilteringMode#REJECT_EXTENDED_RANGES REJECT_EXTENDED_RANGES}
+     * </td>
+     * <td valign=top>Same as above.</td>
+     * <td valign=top>
+     * Throws {@link IllegalArgumentException} because {@code "de-*-DE"} is
+     * not a valid basic language range.
+     * </td>
+     * </tr>
+     * </table>
+     *
+     * @see #filter(List, Collection, FilteringMode)
+     * @see #filterTags(List, Collection, FilteringMode)
+     *
+     * @since 1.8
+     */
+    public static enum FilteringMode {
+        /**
+         * Specifies automatic filtering mode based on the given Language
+         * Priority List consisting of language ranges. If all of the ranges
+         * are basic, basic filtering is selected. Otherwise, extended
+         * filtering is selected.
+         */
+        AUTOSELECT_FILTERING,
+
+        /**
+         * Specifies extended filtering.
+         */
+        EXTENDED_FILTERING,
+
+        /**
+         * Specifies basic filtering: Note that any extended language ranges
+         * included in the given Language Priority List are ignored.
+         */
+        IGNORE_EXTENDED_RANGES,
+
+        /**
+         * Specifies basic filtering: If any extended language ranges are
+         * included in the given Language Priority List, they are mapped to the
+         * basic language range. Specifically, a language range starting with a
+         * subtag {@code "*"} is treated as a language range {@code "*"}. For
+         * example, {@code "*-US"} is treated as {@code "*"}. If {@code "*"} is
+         * not the first subtag, {@code "*"} and extra {@code "-"} are removed.
+         * For example, {@code "ja-*-JP"} is mapped to {@code "ja-JP"}.
+         */
+        MAP_EXTENDED_RANGES,
+
+        /**
+         * Specifies basic filtering: If any extended language ranges are
+         * included in the given Language Priority List, the list is rejected
+         * and the filtering method throws {@link IllegalArgumentException}.
+         */
+        REJECT_EXTENDED_RANGES
+    };
+
+    /**
+     * This class expresses a <em>Language Range</em> defined in
+     * <a href="http://tools.ietf.org/html/rfc4647">RFC 4647 Matching of
+     * Language Tags</a>. A language range is an identifier which is used to
+     * select language tag(s) meeting specific requirements by using the
+     * mechanisms described in <a href="Locale.html#LocaleMatching">Locale
+     * Matching</a>. A list which represents a user's preferences and consists
+     * of language ranges is called a <em>Language Priority List</em>.
+     *
+     * <p>There are two types of language ranges: basic and extended. In RFC
+     * 4647, the syntax of language ranges is expressed in
+     * <a href="http://tools.ietf.org/html/rfc4234">ABNF</a> as follows:
+     * <blockquote>
+     * <pre>
+     *     basic-language-range    = (1*8ALPHA *("-" 1*8alphanum)) / "*"
+     *     extended-language-range = (1*8ALPHA / "*")
+     *                               *("-" (1*8alphanum / "*"))
+     *     alphanum                = ALPHA / DIGIT
+     * </pre>
+     * </blockquote>
+     * For example, {@code "en"} (English), {@code "ja-JP"} (Japanese, Japan),
+     * {@code "*"} (special language range which matches any language tag) are
+     * basic language ranges, whereas {@code "*-CH"} (any languages,
+     * Switzerland), {@code "es-*"} (Spanish, any regions), and
+     * {@code "zh-Hant-*"} (Traditional Chinese, any regions) are extended
+     * language ranges.
+     *
+     * @see #filter
+     * @see #filterTags
+     * @see #lookup
+     * @see #lookupTag
+     *
+     * @since 1.8
+     */
+    public static final class LanguageRange {
+
+       /**
+        * A constant holding the maximum value of weight, 1.0, which indicates
+        * that the language range is a good fit for the user.
+        */
+        public static final double MAX_WEIGHT = 1.0;
+
+       /**
+        * A constant holding the minimum value of weight, 0.0, which indicates
+        * that the language range is not a good fit for the user.
+        */
+        public static final double MIN_WEIGHT = 0.0;
+
+        private final String range;
+        private final double weight;
+
+        private volatile int hash = 0;
+
+        /**
+         * Constructs a {@code LanguageRange} using the given {@code range}.
+         * Note that no validation is done against the IANA Language Subtag
+         * Registry at time of construction.
+         *
+         * <p>This is equivalent to {@code LanguageRange(range, MAX_WEIGHT)}.
+         *
+         * @param range a language range
+         * @throws NullPointerException if the given {@code range} is
+         *     {@code null}
+         */
+        public LanguageRange(String range) {
+            this(range, MAX_WEIGHT);
+        }
+
+        /**
+         * Constructs a {@code LanguageRange} using the given {@code range} and
+         * {@code weight}. Note that no validation is done against the IANA
+         * Language Subtag Registry at time of construction.
+         *
+         * @param range  a language range
+         * @param weight a weight value between {@code MIN_WEIGHT} and
+         *     {@code MAX_WEIGHT}
+         * @throws NullPointerException if the given {@code range} is
+         *     {@code null}
+         * @throws IllegalArgumentException if the given {@code weight} is less
+         *     than {@code MIN_WEIGHT} or greater than {@code MAX_WEIGHT}
+         */
+        public LanguageRange(String range, double weight) {
+            if (range == null) {
+                throw new NullPointerException();
+            }
+            if (weight < MIN_WEIGHT || weight > MAX_WEIGHT) {
+                throw new IllegalArgumentException("weight=" + weight);
+            }
+
+            range = range.toLowerCase();
+
+            // Do syntax check.
+            boolean isIllFormed = false;
+            String[] subtags = range.split("-");
+            if (isSubtagIllFormed(subtags[0], true)
+                || range.endsWith("-")) {
+                isIllFormed = true;
+            } else {
+                for (int i = 1; i < subtags.length; i++) {
+                    if (isSubtagIllFormed(subtags[i], false)) {
+                        isIllFormed = true;
+                    }
+                    break;
+                }
+            }
+            if (isIllFormed) {
+                throw new IllegalArgumentException("range=" + range);
+            }
+
+            this.range = range;
+            this.weight = weight;
+        }
+
+        private static boolean isSubtagIllFormed(String subtag,
+                                                 boolean isFirstSubtag) {
+            if (subtag.equals("") || subtag.length() > 8) {
+                return true;
+            } else if (subtag.equals("*")) {
+                return false;
+            }
+            char[] charArray = subtag.toCharArray();
+            if (isFirstSubtag) { // ALPHA
+                for (char c : charArray) {
+                    if (c < 'a' || c > 'z') {
+                        return true;
+                    }
+                }
+            } else { // ALPHA / DIGIT
+                for (char c : charArray) {
+                    if (c < '0' || (c > '9' && c < 'a') || c > 'z') {
+                        return true;
+                    }
+                }
+            }
+            return false;
+        }
+
+        /**
+         * Returns the language range of this {@code LanguageRange}.
+         *
+         * @return the language range.
+         */
+        public String getRange() {
+            return range;
+        }
+
+        /**
+         * Returns the weight of this {@code LanguageRange}.
+         *
+         * @return the weight value.
+         */
+        public double getWeight() {
+            return weight;
+        }
+
+        /**
+         * Parses the given {@code ranges} to generate a Language Priority List.
+         *
+         * <p>This method performs a syntactic check for each language range in
+         * the given {@code ranges} but doesn't do validation using the IANA
+         * Language Subtag Registry.
+         *
+         * <p>The {@code ranges} to be given can take one of the following
+         * forms:
+         *
+         * <pre>
+         *   "Accept-Language: ja,en;q=0.4"  (weighted list with Accept-Language prefix)
+         *   "ja,en;q=0.4"                   (weighted list)
+         *   "ja,en"                         (prioritized list)
+         * </pre>
+         *
+         * In a weighted list, each language range is given a weight value.
+         * The weight value is identical to the "quality value" in
+         * <a href="http://tools.ietf.org/html/rfc2616">RFC 2616</a>, and it
+         * expresses how much the user prefers  the language. A weight value is
+         * specified after a corresponding language range followed by
+         * {@code ";q="}, and the default weight value is {@code MAX_WEIGHT}
+         * when it is omitted.
+         *
+         * <p>Unlike a weighted list, language ranges in a prioritized list
+         * are sorted in the descending order based on its priority. The first
+         * language range has the highest priority and meets the user's
+         * preference most.
+         *
+         * <p>In either case, language ranges are sorted in descending order in
+         * the Language Priority List based on priority or weight. If a
+         * language range appears in the given {@code ranges} more than once,
+         * only the first one is included on the Language Priority List.
+         *
+         * <p>The returned list consists of language ranges from the given
+         * {@code ranges} and their equivalents found in the IANA Language
+         * Subtag Registry. For example, if the given {@code ranges} is
+         * {@code "Accept-Language: iw,en-us;q=0.7,en;q=0.3"}, the elements in
+         * the list to be returned are:
+         *
+         * <pre>
+         *  <b>Range</b>                                   <b>Weight</b>
+         *    "iw" (older tag for Hebrew)             1.0
+         *    "he" (new preferred code for Hebrew)    1.0
+         *    "en-us" (English, United States)        0.7
+         *    "en" (English)                          0.3
+         * </pre>
+         *
+         * Two language ranges, {@code "iw"} and {@code "he"}, have the same
+         * highest priority in the list. By adding {@code "he"} to the user's
+         * Language Priority List, locale-matching method can find Hebrew as a
+         * matching locale (or language tag) even if the application or system
+         * offers only {@code "he"} as a supported locale (or language tag).
+         *
+         * @param ranges a list of comma-separated language ranges or a list of
+         *     language ranges in the form of the "Accept-Language" header
+         *     defined in <a href="http://tools.ietf.org/html/rfc2616">RFC
+         *     2616</a>
+         * @return a Language Priority List consisting of language ranges
+         *     included in the given {@code ranges} and their equivalent
+         *     language ranges if available. The list is modifiable.
+         * @throws NullPointerException if {@code ranges} is null
+         * @throws IllegalArgumentException if a language range or a weight
+         *     found in the given {@code ranges} is ill-formed
+         */
+        public static List<LanguageRange> parse(String ranges) {
+            return LocaleMatcher.parse(ranges);
+        }
+
+        /**
+         * Parses the given {@code ranges} to generate a Language Priority
+         * List, and then customizes the list using the given {@code map}.
+         * This method is equivalent to
+         * {@code mapEquivalents(parse(ranges), map)}.
+         *
+         * @param ranges a list of comma-separated language ranges or a list
+         *     of language ranges in the form of the "Accept-Language" header
+         *     defined in <a href="http://tools.ietf.org/html/rfc2616">RFC
+         *     2616</a>
+         * @param map a map containing information to customize language ranges
+         * @return a Language Priority List with customization. The list is
+         * @throws NullPointerException if {@code ranges} is null
+         * @throws IllegalArgumentException if a language range or a weight
+         *     found in the given {@code ranges} is ill-formed
+         * @see #parse(String)
+         * @see #mapEquivalents
+         */
+        public static List<LanguageRange> parse(String ranges,
+                                                Map<String, List<String>> map) {
+            return mapEquivalents(parse(ranges), map);
+        }
+
+        /**
+         * Generates a new customized Language Priority List using the given
+         * {@code priorityList} and {@code map}. If the given {@code map} is
+         * empty, this method returns a copy of the given {@code priorityList}.
+         *
+         * <p>In the map, a key represents a language range whereas a value is
+         * a list of equivalents of it. {@code '*'} cannot be used in the map.
+         * Each equivalent language range has the same weight value as its
+         * original language range.
+         *
+         * <pre>
+         *  An example of map:
+         *    <b>Key</b>                            <b>Value</b>
+         *      "zh" (Chinese)                 "zh",
+         *                                     "zh-Hans"(Simplified Chinese)
+         *      "zh-HK" (Chinese, Hong Kong)   "zh-HK"
+         *      "zh-TW" (Chinese, Taiwan)      "zh-TW"
+         * </pre>
+         *
+         * The customization is performed after modification using the IANA
+         * Language Subtag Registry.
+         *
+         * <p>For example, if a user's Language Priority List consists of five
+         * language ranges ({@code "zh"}, {@code "zh-CN"}, {@code "en"},
+         * {@code "zh-TW"}, and {@code "zh-HK"}), the newly generated Language
+         * Priority List which is customized using the above map example will
+         * consists of {@code "zh"}, {@code "zh-Hans"}, {@code "zh-CN"},
+         * {@code "zh-Hans-CN"}, {@code "en"}, {@code "zh-TW"}, and
+         * {@code "zh-HK"}.
+         *
+         * <p>{@code "zh-HK"} and {@code "zh-TW"} aren't converted to
+         * {@code "zh-Hans-HK"} nor {@code "zh-Hans-TW"} even if they are
+         * included in the Language Priority List. In this example, mapping
+         * is used to clearly distinguish Simplified Chinese and Traditional
+         * Chinese.
+         *
+         * <p>If the {@code "zh"}-to-{@code "zh"} mapping isn't included in the
+         * map, a simple replacement will be performed and the customized list
+         * won't include {@code "zh"} and {@code "zh-CN"}.
+         *
+         * @param priorityList user's Language Priority List
+         * @param map a map containing information to customize language ranges
+         * @return a new Language Priority List with customization. The list is
+         *     modifiable.
+         * @throws NullPointerException if {@code priorityList} is {@code null}
+         * @see #parse(String, Map)
+         */
+        public static List<LanguageRange> mapEquivalents(
+                                              List<LanguageRange>priorityList,
+                                              Map<String, List<String>> map) {
+            return LocaleMatcher.mapEquivalents(priorityList, map);
+        }
+
+        /**
+         * Returns a hash code value for the object.
+         *
+         * @return  a hash code value for this object.
+         */
+        @Override
+        public int hashCode() {
+            if (hash == 0) {
+                int result = 17;
+                result = 37*result + range.hashCode();
+                long bitsWeight = Double.doubleToLongBits(weight);
+                result = 37*result + (int)(bitsWeight ^ (bitsWeight >>> 32));
+                hash = result;
+            }
+            return hash;
+        }
+
+        /**
+         * Compares this object to the specified object. The result is true if
+         * and only if the argument is not {@code null} and is a
+         * {@code LanguageRange} object that contains the same {@code range}
+         * and {@code weight} values as this object.
+         *
+         * @param obj the object to compare with
+         * @return  {@code true} if this object's {@code range} and
+         *     {@code weight} are the same as the {@code obj}'s; {@code false}
+         *     otherwise.
+         */
+        @Override
+        public boolean equals(Object obj) {
+            if (this == obj) {
+                return true;
+            }
+            if (!(obj instanceof LanguageRange)) {
+                return false;
+            }
+            LanguageRange other = (LanguageRange)obj;
+            return hash == other.hash
+                   && range.equals(other.range)
+                   && weight == other.weight;
+        }
+    }
+
+    /**
+     * Returns a list of matching {@code Locale} instances using the filtering
+     * mechanism defined in RFC 4647.
+     *
+     * @param priorityList user's Language Priority List in which each language
+     *     tag is sorted in descending order based on priority or weight
+     * @param locales {@code Locale} instances used for matching
+     * @param mode filtering mode
+     * @return a list of {@code Locale} instances for matching language tags
+     *     sorted in descending order based on priority or weight, or an empty
+     *     list if nothing matches. The list is modifiable.
+     * @throws NullPointerException if {@code priorityList} or {@code locales}
+     *     is {@code null}
+     * @throws IllegalArgumentException if one or more extended language ranges
+     *     are included in the given list when
+     *     {@link FilteringMode#REJECT_EXTENDED_RANGES} is specified
+     *
+     * @since 1.8
+     */
+    public static List<Locale> filter(List<LanguageRange> priorityList,
+                                      Collection<Locale> locales,
+                                      FilteringMode mode) {
+        return LocaleMatcher.filter(priorityList, locales, mode);
+    }
+
+    /**
+     * Returns a list of matching {@code Locale} instances using the filtering
+     * mechanism defined in RFC 4647. This is equivalent to
+     * {@link #filter(List, Collection, FilteringMode)} when {@code mode} is
+     * {@link FilteringMode#AUTOSELECT_FILTERING}.
+     *
+     * @param priorityList user's Language Priority List in which each language
+     *     tag is sorted in descending order based on priority or weight
+     * @param locales {@code Locale} instances used for matching
+     * @return a list of {@code Locale} instances for matching language tags
+     *     sorted in descending order based on priority or weight, or an empty
+     *     list if nothing matches. The list is modifiable.
+     * @throws NullPointerException if {@code priorityList} or {@code locales}
+     *     is {@code null}
+     *
+     * @since 1.8
+     */
+    public static List<Locale> filter(List<LanguageRange> priorityList,
+                                      Collection<Locale> locales) {
+        return filter(priorityList, locales, FilteringMode.AUTOSELECT_FILTERING);
+    }
+
+    /**
+     * Returns a list of matching languages tags using the basic filtering
+     * mechanism defined in RFC 4647.
+     *
+     * @param priorityList user's Language Priority List in which each language
+     *     tag is sorted in descending order based on priority or weight
+     * @param tags language tags
+     * @param mode filtering mode
+     * @return a list of matching language tags sorted in descending order
+     *     based on priority or weight, or an empty list if nothing matches.
+     *     The list is modifiable.
+     * @throws NullPointerException if {@code priorityList} or {@code tags} is
+     *     {@code null}
+     * @throws IllegalArgumentException if one or more extended language ranges
+     *     are included in the given list when
+     *     {@link FilteringMode#REJECT_EXTENDED_RANGES} is specified
+     *
+     * @since 1.8
+     */
+    public static List<String> filterTags(List<LanguageRange> priorityList,
+                                          Collection<String> tags,
+                                          FilteringMode mode) {
+        return LocaleMatcher.filterTags(priorityList, tags, mode);
+    }
+
+    /**
+     * Returns a list of matching languages tags using the basic filtering
+     * mechanism defined in RFC 4647. This is equivalent to
+     * {@link #filterTags(List, Collection, FilteringMode)} when {@code mode}
+     * is {@link FilteringMode#AUTOSELECT_FILTERING}.
+     *
+     * @param priorityList user's Language Priority List in which each language
+     *     tag is sorted in descending order based on priority or weight
+     * @param tags language tags
+     * @return a list of matching language tags sorted in descending order
+     *     based on priority or weight, or an empty list if nothing matches.
+     *     The list is modifiable.
+     * @throws NullPointerException if {@code priorityList} or {@code tags} is
+     *     {@code null}
+     *
+     * @since 1.8
+     */
+    public static List<String> filterTags(List<LanguageRange> priorityList,
+                                          Collection<String> tags) {
+        return filterTags(priorityList, tags, FilteringMode.AUTOSELECT_FILTERING);
+    }
+
+    /**
+     * Returns a {@code Locale} instance for the best-matching language
+     * tag using the lookup mechanism defined in RFC 4647.
+     *
+     * @param priorityList user's Language Priority List in which each language
+     *     tag is sorted in descending order based on priority or weight
+     * @param locales {@code Locale} instances used for matching
+     * @return the best matching <code>Locale</code> instance chosen based on
+     *     priority or weight, or {@code null} if nothing matches.
+     * @throws NullPointerException if {@code priorityList} or {@code tags} is
+     *     {@code null}
+     *
+     * @since 1.8
+     */
+    public static Locale lookup(List<LanguageRange> priorityList,
+                                Collection<Locale> locales) {
+        return LocaleMatcher.lookup(priorityList, locales);
+    }
+
+    /**
+     * Returns the best-matching language tag using the lookup mechanism
+     * defined in RFC 4647.
+     *
+     * @param priorityList user's Language Priority List in which each language
+     *     tag is sorted in descending order based on priority or weight
+     * @param tags language tangs used for matching
+     * @return the best matching language tag chosen based on priority or
+     *     weight, or {@code null} if nothing matches.
+     * @throws NullPointerException if {@code priorityList} or {@code tags} is
+     *     {@code null}
+     *
+     * @since 1.8
+     */
+    public static String lookupTag(List<LanguageRange> priorityList,
+                                   Collection<String> tags) {
+        return LocaleMatcher.lookupTag(priorityList, tags);
+    }
+
 }
diff --git a/jdk/src/share/classes/java/util/Properties.java b/jdk/src/share/classes/java/util/Properties.java
index c2fdad48cda..c8bdab7c273 100644
--- a/jdk/src/share/classes/java/util/Properties.java
+++ b/jdk/src/share/classes/java/util/Properties.java
@@ -34,7 +34,10 @@ import java.io.Reader;
 import java.io.Writer;
 import java.io.OutputStreamWriter;
 import java.io.BufferedWriter;
-import java.lang.reflect.*;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+import sun.util.spi.XmlPropertiesProvider;
 
 /**
  * The {@code Properties} class represents a persistent set of
@@ -866,7 +869,7 @@ class Properties extends Hashtable<Object,Object> {
     {
         if (in == null)
             throw new NullPointerException();
-        XMLUtils.load(this, in);
+        XmlSupport.load(this, in);
         in.close();
     }
 
@@ -934,7 +937,7 @@ class Properties extends Hashtable<Object,Object> {
     {
         if (os == null)
             throw new NullPointerException();
-        XMLUtils.save(this, os, comment, encoding);
+        XmlSupport.save(this, os, comment, encoding);
     }
 
     /**
@@ -1113,59 +1116,82 @@ class Properties extends Hashtable<Object,Object> {
         '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'
     };
 
+    /**
+     * Supporting class for loading/storing properties in XML format.
+     *
+     * <p> The {@code load} and {@code store} methods defined here delegate to a
+     * system-wide {@code XmlPropertiesProvider}. On first invocation of either
+     * method then the system-wide provider is located as follows: </p>
+     *
+     * <ol>
+     *   <li> If the system property {@code sun.util.spi.XmlPropertiesProvider}
+     *   is defined then it is taken to be the full-qualified name of a concrete
+     *   provider class. The class is loaded with the system class loader as the
+     *   initiating loader. If it cannot be loaded or instantiated using a zero
+     *   argument constructor then an unspecified error is thrown. </li>
+     *
+     *   <li> If the system property is not defined then the service-provider
+     *   loading facility defined by the {@link ServiceLoader} class is used to
+     *   locate a provider with the system class loader as the initiating
+     *   loader and {@code sun.util.spi.XmlPropertiesProvider} as the service
+     *   type. If this process fails then an unspecified error is thrown. If
+     *   there is more than one service provider installed then it is
+     *   not specified as to which provider will be used. </li>
+     *
+     *   <li> If the provider is not found by the above means then a system
+     *   default provider will be instantiated and used. </li>
+     * </ol>
+     */
+    private static class XmlSupport {
 
-    private static class XMLUtils {
-        private static Method load = null;
-        private static Method save = null;
-        static {
+        private static XmlPropertiesProvider loadProviderFromProperty(ClassLoader cl) {
+            String cn = System.getProperty("sun.util.spi.XmlPropertiesProvider");
+            if (cn == null)
+                return null;
             try {
-                // reference sun.util.xml.Utils reflectively
-                // to allow the Properties class be compiled in
-                // the absence of XML
-                Class<?> c = Class.forName("sun.util.xml.XMLUtils", true, null);
-                load = c.getMethod("load", Properties.class, InputStream.class);
-                save = c.getMethod("save", Properties.class, OutputStream.class,
-                                   String.class, String.class);
-            } catch (ClassNotFoundException cnf) {
-                throw new AssertionError(cnf);
-            } catch (NoSuchMethodException e) {
-                throw new AssertionError(e);
+                Class<?> c = Class.forName(cn, true, cl);
+                return (XmlPropertiesProvider)c.newInstance();
+            } catch (ClassNotFoundException |
+                     IllegalAccessException |
+                     InstantiationException x) {
+                throw new ServiceConfigurationError(null, x);
             }
         }
 
-        static void invoke(Method m, Object... args) throws IOException {
-            try {
-                m.invoke(null, args);
-            } catch (IllegalAccessException e) {
-                throw new AssertionError(e);
-            } catch (InvocationTargetException e) {
-                Throwable t = e.getCause();
-                if (t instanceof RuntimeException)
-                    throw (RuntimeException)t;
-
-                if (t instanceof IOException) {
-                    throw (IOException)t;
-                } else {
-                    throw new AssertionError(t);
-                }
-            }
+        private static XmlPropertiesProvider loadProviderAsService(ClassLoader cl) {
+            Iterator<XmlPropertiesProvider> iterator =
+                 ServiceLoader.load(XmlPropertiesProvider.class, cl).iterator();
+            return iterator.hasNext() ? iterator.next() : null;
         }
 
+        private static XmlPropertiesProvider loadProvider() {
+            return AccessController.doPrivileged(
+                new PrivilegedAction<XmlPropertiesProvider>() {
+                    public XmlPropertiesProvider run() {
+                        ClassLoader cl = ClassLoader.getSystemClassLoader();
+                        XmlPropertiesProvider provider = loadProviderFromProperty(cl);
+                        if (provider != null)
+                            return provider;
+                        provider = loadProviderAsService(cl);
+                        if (provider != null)
+                            return provider;
+                        throw new InternalError("No fallback");
+                }});
+        }
+
+        private static final XmlPropertiesProvider PROVIDER = loadProvider();
+
         static void load(Properties props, InputStream in)
             throws IOException, InvalidPropertiesFormatException
         {
-            if (load == null)
-                throw new InternalError("sun.util.xml.XMLUtils not found");
-            invoke(load, props, in);
+            PROVIDER.load(props, in);
         }
 
         static void save(Properties props, OutputStream os, String comment,
                          String encoding)
             throws IOException
         {
-            if (save == null)
-                throw new InternalError("sun.util.xml.XMLUtils not found");
-            invoke(save, props, os, comment, encoding);
+            PROVIDER.store(props, os, comment, encoding);
         }
     }
 }
diff --git a/jdk/src/share/classes/java/util/PropertyPermission.java b/jdk/src/share/classes/java/util/PropertyPermission.java
index aed6f5c48c7..de8a23d7794 100644
--- a/jdk/src/share/classes/java/util/PropertyPermission.java
+++ b/jdk/src/share/classes/java/util/PropertyPermission.java
@@ -130,18 +130,15 @@ public final class PropertyPermission extends BasicPermission {
      * @param mask the actions mask to use.
      *
      */
-
-    private void init(int mask)
-    {
-
+    private void init(int mask) {
         if ((mask & ALL) != mask)
-                throw new IllegalArgumentException("invalid actions mask");
+            throw new IllegalArgumentException("invalid actions mask");
 
         if (mask == NONE)
-                throw new IllegalArgumentException("invalid actions mask");
+            throw new IllegalArgumentException("invalid actions mask");
 
         if (getName() == null)
-                throw new NullPointerException("name can't be null");
+            throw new NullPointerException("name can't be null");
 
         this.mask = mask;
     }
@@ -160,9 +157,7 @@ public final class PropertyPermission extends BasicPermission {
      * @throws IllegalArgumentException if <code>name</code> is empty or if
      * <code>actions</code> is invalid.
      */
-
-    public PropertyPermission(String name, String actions)
-    {
+    public PropertyPermission(String name, String actions) {
         super(name,actions);
         init(getMask(actions));
     }
@@ -196,7 +191,6 @@ public final class PropertyPermission extends BasicPermission {
         return ((this.mask & that.mask) == that.mask) && super.implies(that);
     }
 
-
     /**
      * Checks two PropertyPermission objects for equality. Checks that <i>obj</i> is
      * a PropertyPermission, and has the same name and actions as this object.
@@ -226,16 +220,14 @@ public final class PropertyPermission extends BasicPermission {
      *
      * @return a hash code value for this object.
      */
-
     public int hashCode() {
         return this.getName().hashCode();
     }
 
-
     /**
      * Converts an actions String to an actions mask.
      *
-     * @param action the action string.
+     * @param actions the action string.
      * @return the actions mask.
      */
     private static int getMask(String actions) {
@@ -332,8 +324,7 @@ public final class PropertyPermission extends BasicPermission {
      *
      * @return the canonical string representation of the actions.
      */
-    static String getActions(int mask)
-    {
+    static String getActions(int mask) {
         StringBuilder sb = new StringBuilder();
         boolean comma = false;
 
@@ -359,8 +350,7 @@ public final class PropertyPermission extends BasicPermission {
      *
      * @return the canonical string representation of the actions.
      */
-    public String getActions()
-    {
+    public String getActions() {
         if (actions == null)
             actions = getActions(this.mask);
 
@@ -373,7 +363,6 @@ public final class PropertyPermission extends BasicPermission {
      *
      * @return the actions mask.
      */
-
     int getMask() {
         return mask;
     }
@@ -386,7 +375,6 @@ public final class PropertyPermission extends BasicPermission {
      * @return a new PermissionCollection object suitable for storing
      * PropertyPermissions.
      */
-
     public PermissionCollection newPermissionCollection() {
         return new PropertyPermissionCollection();
     }
@@ -436,7 +424,7 @@ public final class PropertyPermission extends BasicPermission {
  * @serial include
  */
 final class PropertyPermissionCollection extends PermissionCollection
-implements Serializable
+    implements Serializable
 {
 
     /**
@@ -454,10 +442,8 @@ implements Serializable
     private boolean all_allowed;
 
     /**
-     * Create an empty PropertyPermissions object.
-     *
+     * Create an empty PropertyPermissionCollection object.
      */
-
     public PropertyPermissionCollection() {
         perms = new HashMap<>(32);     // Capacity for default policy
         all_allowed = false;
@@ -475,9 +461,7 @@ implements Serializable
      * @exception SecurityException - if this PropertyPermissionCollection
      *                                object has been marked readonly
      */
-
-    public void add(Permission permission)
-    {
+    public void add(Permission permission) {
         if (! (permission instanceof PropertyPermission))
             throw new IllegalArgumentException("invalid permission: "+
                                                permission);
@@ -514,14 +498,12 @@ implements Serializable
      * Check and see if this set of permissions implies the permissions
      * expressed in "permission".
      *
-     * @param p the Permission object to compare
+     * @param permission the Permission object to compare
      *
      * @return true if "permission" is a proper subset of a permission in
      * the set, false if not.
      */
-
-    public boolean implies(Permission permission)
-    {
+    public boolean implies(Permission permission) {
         if (! (permission instanceof PropertyPermission))
                 return false;
 
@@ -655,8 +637,9 @@ implements Serializable
      * Reads in a Hashtable of PropertyPermissions and saves them in the
      * perms field. Reads in all_allowed.
      */
-    private void readObject(ObjectInputStream in) throws IOException,
-    ClassNotFoundException {
+    private void readObject(ObjectInputStream in)
+        throws IOException, ClassNotFoundException
+    {
         // Don't call defaultReadObject()
 
         // Read in serialized fields
diff --git a/jdk/src/share/classes/java/util/RegularEnumSet.java b/jdk/src/share/classes/java/util/RegularEnumSet.java
index 63f5f52e664..bf01c51932e 100644
--- a/jdk/src/share/classes/java/util/RegularEnumSet.java
+++ b/jdk/src/share/classes/java/util/RegularEnumSet.java
@@ -289,7 +289,7 @@ class RegularEnumSet<E extends Enum<E>> extends EnumSet<E> {
      * the same size, and every member of the given set is contained in
      * this set.
      *
-     * @param e object to be compared for equality with this set
+     * @param o object to be compared for equality with this set
      * @return <tt>true</tt> if the specified object is equal to this set
      */
     public boolean equals(Object o) {
diff --git a/jdk/src/share/classes/java/util/Scanner.java b/jdk/src/share/classes/java/util/Scanner.java
index e80b27a393b..4530371ac12 100644
--- a/jdk/src/share/classes/java/util/Scanner.java
+++ b/jdk/src/share/classes/java/util/Scanner.java
@@ -568,9 +568,8 @@ public final class Scanner implements Iterator<String>, Closeable {
      * Constructs a <code>Scanner</code> that returns values scanned
      * from the specified source delimited by the specified pattern.
      *
-     * @param  source A character source implementing the Readable interface
+     * @param source A character source implementing the Readable interface
      * @param pattern A delimiting pattern
-     * @return A scanner with the specified source and pattern
      */
     private Scanner(Readable source, Pattern pattern) {
         assert source != null : "source should not be null";
diff --git a/jdk/src/share/classes/java/util/ServiceLoader.java b/jdk/src/share/classes/java/util/ServiceLoader.java
index 62aa9dd2453..067537a213d 100644
--- a/jdk/src/share/classes/java/util/ServiceLoader.java
+++ b/jdk/src/share/classes/java/util/ServiceLoader.java
@@ -213,7 +213,7 @@ public final class ServiceLoader<S>
     }
 
     private ServiceLoader(Class<S> svc, ClassLoader cl) {
-        service = svc;
+        service = Objects.requireNonNull(svc, "Service interface cannot be null");
         loader = cl;
         reload();
     }
diff --git a/jdk/src/share/classes/java/util/TimeZone.java b/jdk/src/share/classes/java/util/TimeZone.java
index 3613328cafe..648191a471a 100644
--- a/jdk/src/share/classes/java/util/TimeZone.java
+++ b/jdk/src/share/classes/java/util/TimeZone.java
@@ -221,7 +221,7 @@ abstract public class TimeZone implements Serializable, Cloneable {
      * @param date the milliseconds (since January 1, 1970,
      * 00:00:00.000 GMT) at which the time zone offset and daylight
      * saving amount are found
-     * @param offset an array of int where the raw GMT offset
+     * @param offsets an array of int where the raw GMT offset
      * (offset[0]) and daylight saving amount (offset[1]) are stored,
      * or null if those values are not needed. The method assumes that
      * the length of the given array is two or larger.
diff --git a/jdk/src/share/classes/java/util/logging/Logging.java b/jdk/src/share/classes/java/util/logging/Logging.java
index 6221a7e6917..2492349188e 100644
--- a/jdk/src/share/classes/java/util/logging/Logging.java
+++ b/jdk/src/share/classes/java/util/logging/Logging.java
@@ -41,8 +41,8 @@ import java.util.ArrayList;
  * @since 1.5
  *
  * @see javax.management
- * @see java.util.Logger
- * @see java.util.LogManager
+ * @see Logger
+ * @see LogManager
  */
 class Logging implements LoggingMXBean {
 
diff --git a/jdk/src/share/classes/java/util/prefs/XmlSupport.java b/jdk/src/share/classes/java/util/prefs/XmlSupport.java
index 08f19d82df2..e47f0401a80 100644
--- a/jdk/src/share/classes/java/util/prefs/XmlSupport.java
+++ b/jdk/src/share/classes/java/util/prefs/XmlSupport.java
@@ -92,7 +92,7 @@ class XmlSupport {
      * @throws BackingStoreException if preference data cannot be read from
      *         backing store.
      * @throws IllegalStateException if this node (or an ancestor) has been
-     *         removed with the {@link #removeNode()} method.
+     *         removed with the {@link Preferences#removeNode()} method.
      */
     static void export(OutputStream os, final Preferences p, boolean subTree)
         throws IOException, BackingStoreException {
diff --git a/jdk/src/share/classes/javax/crypto/CryptoAllPermission.java b/jdk/src/share/classes/javax/crypto/CryptoAllPermission.java
index ad5e7fb7b45..08ea242449d 100644
--- a/jdk/src/share/classes/javax/crypto/CryptoAllPermission.java
+++ b/jdk/src/share/classes/javax/crypto/CryptoAllPermission.java
@@ -136,8 +136,7 @@ final class CryptoAllPermissionCollection extends PermissionCollection
      * @exception SecurityException - if this CryptoAllPermissionCollection
      * object has been marked readonly
      */
-    public void add(Permission permission)
-    {
+    public void add(Permission permission) {
         if (isReadOnly())
             throw new SecurityException("attempt to add a Permission to " +
                                         "a readonly PermissionCollection");
@@ -152,13 +151,12 @@ final class CryptoAllPermissionCollection extends PermissionCollection
      * Check and see if this set of permissions implies the permissions
      * expressed in "permission".
      *
-     * @param p the Permission object to compare
+     * @param permission the Permission object to compare
      *
      * @return true if the given permission is implied by this
      * CryptoAllPermissionCollection.
      */
-    public boolean implies(Permission permission)
-    {
+    public boolean implies(Permission permission) {
         if (!(permission instanceof CryptoPermission)) {
             return false;
         }
diff --git a/jdk/src/share/classes/javax/crypto/CryptoPermission.java b/jdk/src/share/classes/javax/crypto/CryptoPermission.java
index 6241e5fdb43..b259bec0ec2 100644
--- a/jdk/src/share/classes/javax/crypto/CryptoPermission.java
+++ b/jdk/src/share/classes/javax/crypto/CryptoPermission.java
@@ -471,8 +471,8 @@ class CryptoPermission extends java.security.Permission {
  * @author Sharon Liu
  */
 final class CryptoPermissionCollection extends PermissionCollection
-implements Serializable {
-
+    implements Serializable
+{
     private static final long serialVersionUID = -511215555898802763L;
 
     private Vector<Permission> permissions;
@@ -493,8 +493,7 @@ implements Serializable {
      * @exception SecurityException - if this CryptoPermissionCollection
      * object has been marked <i>readOnly</i>.
      */
-    public void add(Permission permission)
-    {
+    public void add(Permission permission) {
         if (isReadOnly())
             throw new SecurityException("attempt to add a Permission " +
                                         "to a readonly PermissionCollection");
@@ -506,10 +505,10 @@ implements Serializable {
     }
 
     /**
-      * Check and see if this CryptoPermission object implies
-      * the given Permission object.
+     * Check and see if this CryptoPermission object implies
+     * the given Permission object.
      *
-     * @param p the Permission object to compare
+     * @param permission the Permission object to compare
      *
      * @return true if the given permission  is implied by this
      * CryptoPermissionCollection, false if not.
@@ -538,8 +537,7 @@ implements Serializable {
      * @return an enumeration of all the CryptoPermission objects.
      */
 
-    public Enumeration<Permission> elements()
-    {
+    public Enumeration<Permission> elements() {
         return permissions.elements();
     }
 }
diff --git a/jdk/src/share/classes/javax/crypto/CryptoPolicyParser.java b/jdk/src/share/classes/javax/crypto/CryptoPolicyParser.java
index e44d3299f62..617d2a44ccc 100644
--- a/jdk/src/share/classes/javax/crypto/CryptoPolicyParser.java
+++ b/jdk/src/share/classes/javax/crypto/CryptoPolicyParser.java
@@ -54,7 +54,7 @@ import java.lang.reflect.*;
  * @author Sharon Liu
  *
  * @see java.security.Permissions
- * @see java.security.spec.AlgrithomParameterSpec
+ * @see java.security.spec.AlgorithmParameterSpec
  * @see javax.crypto.CryptoPermission
  * @see javax.crypto.CryptoAllPermission
  * @see javax.crypto.CryptoPermissions
diff --git a/jdk/src/share/classes/javax/crypto/NullCipherSpi.java b/jdk/src/share/classes/javax/crypto/NullCipherSpi.java
index 7f429c14f79..15c27d6f5b7 100644
--- a/jdk/src/share/classes/javax/crypto/NullCipherSpi.java
+++ b/jdk/src/share/classes/javax/crypto/NullCipherSpi.java
@@ -33,7 +33,7 @@ import java.security.spec.*;
  * tranform the plaintext.
  *
  * @author  Li Gong
- * @see Nullcipher
+ * @see NullCipher
  *
  * @since 1.4
  */
diff --git a/jdk/src/share/classes/javax/management/loading/MLet.java b/jdk/src/share/classes/javax/management/loading/MLet.java
index 3d6a5b71aa2..b1dc72aa64a 100644
--- a/jdk/src/share/classes/javax/management/loading/MLet.java
+++ b/jdk/src/share/classes/javax/management/loading/MLet.java
@@ -798,7 +798,7 @@ public class MLet extends java.net.URLClassLoader
       * Allows the m-let to perform any operations it needs before being unregistered
       * by the MBean server.
       *
-      * @exception java.langException This exception should be caught
+      * @exception java.lang.Exception This exception should be caught
       * by the MBean server and re-thrown as an
       * MBeanRegistrationException.
       */
diff --git a/jdk/src/share/classes/javax/management/modelmbean/ModelMBeanAttributeInfo.java b/jdk/src/share/classes/javax/management/modelmbean/ModelMBeanAttributeInfo.java
index 4b13db02973..ec820138692 100644
--- a/jdk/src/share/classes/javax/management/modelmbean/ModelMBeanAttributeInfo.java
+++ b/jdk/src/share/classes/javax/management/modelmbean/ModelMBeanAttributeInfo.java
@@ -189,7 +189,7 @@ public class ModelMBeanAttributeInfo
          *          May be null if the property is write-only.
          * @param setter The method used for writing the attribute value.
          *          May be null if the attribute is read-only.
-         * @exception IntrospectionException There is a consistency
+         * @exception javax.management.IntrospectionException There is a consistency
          * problem in the definition of this attribute.
          *
          */
@@ -233,7 +233,7 @@ public class ModelMBeanAttributeInfo
          * it is null, then a default descriptor will be created.  If
          * the descriptor does not contain the field "displayName" this field is added
          * in the descriptor with its default value.
-         * @exception IntrospectionException There is a consistency
+         * @exception javax.management.IntrospectionException There is a consistency
          * problem in the definition of this attribute.
          * @exception RuntimeOperationsException Wraps an
          * IllegalArgumentException. The descriptor is invalid, or descriptor
diff --git a/jdk/src/share/classes/javax/management/openmbean/CompositeDataInvocationHandler.java b/jdk/src/share/classes/javax/management/openmbean/CompositeDataInvocationHandler.java
index 691fdbaa9c8..77190544324 100644
--- a/jdk/src/share/classes/javax/management/openmbean/CompositeDataInvocationHandler.java
+++ b/jdk/src/share/classes/javax/management/openmbean/CompositeDataInvocationHandler.java
@@ -124,11 +124,6 @@ public class CompositeDataInvocationHandler implements InvocationHandler {
        <p>Construct a handler backed by the given {@code
        CompositeData}.</p>
 
-       @param mbsc the {@code MBeanServerConnection} related to this
-       {@code CompositeData}.  This is only relevant if a method in
-       the interface for which this is an invocation handler returns
-       a type that is an MXBean interface.  Otherwise, it can be null.
-
        @param compositeData the {@code CompositeData} that will supply
        information to getters.
 
diff --git a/jdk/src/share/classes/javax/naming/spi/NamingManager.java b/jdk/src/share/classes/javax/naming/spi/NamingManager.java
index 13bd5299116..fb4f6852726 100644
--- a/jdk/src/share/classes/javax/naming/spi/NamingManager.java
+++ b/jdk/src/share/classes/javax/naming/spi/NamingManager.java
@@ -416,7 +416,7 @@ public class NamingManager {
      *                  specified.
      *                  See the <code>getObjectInstance</code> method for
      *                  details.
-     * @param ctx       The context relative to which <code>name</code> is
+     * @param nameCtx   The context relative to which <code>name</code> is
      *                  specified, or null for the default initial context.
      *                  See the <code>getObjectInstance</code> method for
      *                  details.
diff --git a/jdk/src/share/classes/javax/security/auth/kerberos/DelegationPermission.java b/jdk/src/share/classes/javax/security/auth/kerberos/DelegationPermission.java
index 3304ac872dc..6a712d0a0bb 100644
--- a/jdk/src/share/classes/javax/security/auth/kerberos/DelegationPermission.java
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/DelegationPermission.java
@@ -178,7 +178,6 @@ public final class DelegationPermission extends BasicPermission
      *
      * @return a hash code value for this object.
      */
-
     public int hashCode() {
         return getName().hashCode();
     }
@@ -278,12 +277,11 @@ final class KrbDelegationPermissionCollection extends PermissionCollection
      * Check and see if this collection of permissions implies the permissions
      * expressed in "permission".
      *
-     * @param p the Permission object to compare
+     * @param permission the Permission object to compare
      *
      * @return true if "permission" is a proper subset of a permission in
      * the collection, false if not.
      */
-
     public boolean implies(Permission permission) {
         if (! (permission instanceof DelegationPermission))
                 return false;
@@ -310,7 +308,6 @@ final class KrbDelegationPermissionCollection extends PermissionCollection
      * @exception SecurityException - if this PermissionCollection object
      *                                has been marked readonly
      */
-
     public void add(Permission permission) {
         if (! (permission instanceof DelegationPermission))
             throw new IllegalArgumentException("invalid permission: "+
@@ -329,7 +326,6 @@ final class KrbDelegationPermissionCollection extends PermissionCollection
      *
      * @return an enumeration of all the DelegationPermission objects.
      */
-
     public Enumeration<Permission> elements() {
         // Convert Iterator into Enumeration
         synchronized (this) {
@@ -376,8 +372,9 @@ final class KrbDelegationPermissionCollection extends PermissionCollection
      * Reads in a Vector of DelegationPermissions and saves them in the perms field.
      */
     @SuppressWarnings("unchecked")
-    private void readObject(ObjectInputStream in) throws IOException,
-    ClassNotFoundException {
+    private void readObject(ObjectInputStream in)
+        throws IOException, ClassNotFoundException
+    {
         // Don't call defaultReadObject()
 
         // Read in serialized fields
diff --git a/jdk/src/share/classes/javax/security/auth/kerberos/ServicePermission.java b/jdk/src/share/classes/javax/security/auth/kerberos/ServicePermission.java
index a22e8cc4221..da6c9fe3fa9 100644
--- a/jdk/src/share/classes/javax/security/auth/kerberos/ServicePermission.java
+++ b/jdk/src/share/classes/javax/security/auth/kerberos/ServicePermission.java
@@ -259,7 +259,6 @@ public final class ServicePermission extends Permission
      * Always returns present actions in the following order:
      * initiate, accept.
      */
-
     public String getActions() {
         if (actions == null)
             actions = getActions(this.mask);
@@ -280,7 +279,6 @@ public final class ServicePermission extends Permission
      * @return a new PermissionCollection object suitable for storing
      * ServicePermissions.
      */
-
     public PermissionCollection newPermissionCollection() {
         return new KrbServicePermissionCollection();
     }
@@ -290,7 +288,6 @@ public final class ServicePermission extends Permission
      *
      * @return the actions mask.
      */
-
     int getMask() {
         return mask;
     }
@@ -301,7 +298,6 @@ public final class ServicePermission extends Permission
      * @param action the action string
      * @return the action mask
      */
-
     private static int getMask(String action) {
 
         if (action == null) {
@@ -468,12 +464,11 @@ final class KrbServicePermissionCollection extends PermissionCollection
      * Check and see if this collection of permissions implies the permissions
      * expressed in "permission".
      *
-     * @param p the Permission object to compare
+     * @param permission the Permission object to compare
      *
      * @return true if "permission" is a proper subset of a permission in
      * the collection, false if not.
      */
-
     public boolean implies(Permission permission) {
         if (! (permission instanceof ServicePermission))
                 return false;
@@ -517,7 +512,6 @@ final class KrbServicePermissionCollection extends PermissionCollection
      * @exception SecurityException - if this PermissionCollection object
      *                                has been marked readonly
      */
-
     public void add(Permission permission) {
         if (! (permission instanceof ServicePermission))
             throw new IllegalArgumentException("invalid permission: "+
@@ -584,8 +578,9 @@ final class KrbServicePermissionCollection extends PermissionCollection
      * Reads in a Vector of ServicePermissions and saves them in the perms field.
      */
     @SuppressWarnings("unchecked")
-    private void readObject(ObjectInputStream in) throws IOException,
-    ClassNotFoundException {
+    private void readObject(ObjectInputStream in)
+        throws IOException, ClassNotFoundException
+    {
         // Don't call defaultReadObject()
 
         // Read in serialized fields
diff --git a/jdk/src/share/classes/javax/sql/ConnectionPoolDataSource.java b/jdk/src/share/classes/javax/sql/ConnectionPoolDataSource.java
index cdaa3290fcd..9664fcc833d 100644
--- a/jdk/src/share/classes/javax/sql/ConnectionPoolDataSource.java
+++ b/jdk/src/share/classes/javax/sql/ConnectionPoolDataSource.java
@@ -48,7 +48,7 @@ public interface ConnectionPoolDataSource  extends CommonDataSource {
    *         connection to the database that this
    *         <code>ConnectionPoolDataSource</code> object represents
    * @exception SQLException if a database access error occurs
-   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
+   * @exception java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support
    * this method
    * @since 1.4
    */
@@ -64,7 +64,7 @@ public interface ConnectionPoolDataSource  extends CommonDataSource {
    *         connection to the database that this
    *         <code>ConnectionPoolDataSource</code> object represents
    * @exception SQLException if a database access error occurs
-   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
+   * @exception java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support
    * this method
    * @since 1.4
    */
diff --git a/jdk/src/share/classes/javax/sql/PooledConnection.java b/jdk/src/share/classes/javax/sql/PooledConnection.java
index e5d9ec44225..799b46d83fd 100644
--- a/jdk/src/share/classes/javax/sql/PooledConnection.java
+++ b/jdk/src/share/classes/javax/sql/PooledConnection.java
@@ -102,7 +102,7 @@ public interface PooledConnection {
    * @return  a <code>Connection</code> object that is a handle to
    *          this <code>PooledConnection</code> object
    * @exception SQLException if a database access error occurs
-   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
+   * @exception java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support
    * this method
    * @since 1.4
    */
@@ -117,7 +117,7 @@ public interface PooledConnection {
    * information.
    *
    * @exception SQLException if a database access error occurs
-   * @exception SQLFeatureNotSupportedException if the JDBC driver does not support
+   * @exception java.sql.SQLFeatureNotSupportedException if the JDBC driver does not support
    * this method
    * @since 1.4
    */
diff --git a/jdk/src/share/classes/javax/sql/rowset/spi/SyncProvider.java b/jdk/src/share/classes/javax/sql/rowset/spi/SyncProvider.java
index 81425998889..f18ab57f100 100644
--- a/jdk/src/share/classes/javax/sql/rowset/spi/SyncProvider.java
+++ b/jdk/src/share/classes/javax/sql/rowset/spi/SyncProvider.java
@@ -293,7 +293,7 @@ public abstract class SyncProvider {
      *           SyncProvider.DATASOURCE_TABLE_LOCK,
      *           SyncProvider.DATASOURCE_DB_LOCK
      * </pre>
-     * @throws SyncProviderExceptiom if an error occurs determining the data
+     * @throws SyncProviderException if an error occurs determining the data
      *        source locking level.
      * @see #setDataSourceLock
 
diff --git a/jdk/src/share/classes/sun/net/www/http/HttpClient.java b/jdk/src/share/classes/sun/net/www/http/HttpClient.java
index 140cc9191f2..cfbc9329387 100644
--- a/jdk/src/share/classes/sun/net/www/http/HttpClient.java
+++ b/jdk/src/share/classes/sun/net/www/http/HttpClient.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1994, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -36,6 +36,7 @@ import sun.net.www.MeteredStream;
 import sun.net.www.ParseUtil;
 import sun.net.www.protocol.http.HttpURLConnection;
 import sun.util.logging.PlatformLogger;
+import static sun.net.www.protocol.http.HttpURLConnection.TunnelState.*;
 
 /**
  * @author Herb Jellinek
@@ -244,16 +245,17 @@ public class HttpClient extends NetworkClient {
      */
     public static HttpClient New(URL url)
     throws IOException {
-        return HttpClient.New(url, Proxy.NO_PROXY, -1, true);
+        return HttpClient.New(url, Proxy.NO_PROXY, -1, true, null);
     }
 
     public static HttpClient New(URL url, boolean useCache)
         throws IOException {
-        return HttpClient.New(url, Proxy.NO_PROXY, -1, useCache);
+        return HttpClient.New(url, Proxy.NO_PROXY, -1, useCache, null);
     }
 
-    public static HttpClient New(URL url, Proxy p, int to, boolean useCache)
-        throws IOException {
+    public static HttpClient New(URL url, Proxy p, int to, boolean useCache,
+        HttpURLConnection httpuc) throws IOException
+    {
         if (p == null) {
             p = Proxy.NO_PROXY;
         }
@@ -261,6 +263,13 @@ public class HttpClient extends NetworkClient {
         /* see if one's already around */
         if (useCache) {
             ret = kac.get(url, null);
+            if (ret != null && httpuc != null &&
+                httpuc.streaming() &&
+                httpuc.getRequestMethod() == "POST") {
+                if (!ret.available())
+                    ret = null;
+            }
+
             if (ret != null) {
                 if ((ret.proxy != null && ret.proxy.equals(p)) ||
                     (ret.proxy == null && p == null)) {
@@ -268,6 +277,8 @@ public class HttpClient extends NetworkClient {
                         ret.cachedHttpClient = true;
                         assert ret.inCache;
                         ret.inCache = false;
+                        if (httpuc != null && ret.needsTunneling())
+                            httpuc.setTunnelState(TUNNELING);
                         PlatformLogger logger = HttpURLConnection.getHttpLogger();
                         if (logger.isLoggable(PlatformLogger.FINEST)) {
                             logger.finest("KeepAlive stream retrieved from the cache, " + ret);
@@ -302,20 +313,25 @@ public class HttpClient extends NetworkClient {
         return ret;
     }
 
-    public static HttpClient New(URL url, Proxy p, int to) throws IOException {
-        return New(url, p, to, true);
+    public static HttpClient New(URL url, Proxy p, int to,
+        HttpURLConnection httpuc) throws IOException
+    {
+        return New(url, p, to, true, httpuc);
     }
 
     public static HttpClient New(URL url, String proxyHost, int proxyPort,
                                  boolean useCache)
         throws IOException {
-        return New(url, newHttpProxy(proxyHost, proxyPort, "http"), -1, useCache);
+        return New(url, newHttpProxy(proxyHost, proxyPort, "http"),
+            -1, useCache, null);
     }
 
     public static HttpClient New(URL url, String proxyHost, int proxyPort,
-                                 boolean useCache, int to)
+                                 boolean useCache, int to,
+                                 HttpURLConnection httpuc)
         throws IOException {
-        return New(url, newHttpProxy(proxyHost, proxyPort, "http"), to, useCache);
+        return New(url, newHttpProxy(proxyHost, proxyPort, "http"),
+            to, useCache, httpuc);
     }
 
     /* return it to the cache as still usable, if:
@@ -344,6 +360,34 @@ public class HttpClient extends NetworkClient {
         }
     }
 
+    protected synchronized boolean available() throws IOException {
+        boolean available = true;
+        int old = serverSocket.getSoTimeout();
+        serverSocket.setSoTimeout(1);
+        BufferedInputStream tmpbuf =
+            new BufferedInputStream(serverSocket.getInputStream());
+
+        PlatformLogger logger = HttpURLConnection.getHttpLogger();
+        try {
+            int r = tmpbuf.read();
+            if (r == -1) {
+                if (logger.isLoggable(PlatformLogger.FINEST)) {
+                    logger.finest("HttpClient.available(): " +
+                        "read returned -1: not available");
+                }
+                available = false;
+            }
+        } catch (SocketTimeoutException e) {
+            if (logger.isLoggable(PlatformLogger.FINEST)) {
+                logger.finest("HttpClient.available(): " +
+                    "SocketTimeout: its available");
+            }
+        } finally {
+            serverSocket.setSoTimeout(old);
+        }
+        return available;
+    }
+
     protected synchronized void putInKeepAliveCache() {
         if (inCache) {
             assert false : "Duplicate put to keep alive cache";
diff --git a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
index 50cecb0e079..87fdaa82bf2 100644
--- a/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
+++ b/jdk/src/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -351,7 +351,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
     private HttpClient reuseClient = null;
 
     /* Tunnel states */
-    enum TunnelState {
+    public enum TunnelState {
         /* No tunnel */
         NONE,
 
@@ -662,7 +662,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
      */
     protected void setNewClient (URL url, boolean useCache)
         throws IOException {
-        http = HttpClient.New(url, null, -1, useCache, connectTimeout);
+        http = HttpClient.New(url, null, -1, useCache, connectTimeout, this);
         http.setReadTimeout(readTimeout);
     }
 
@@ -703,7 +703,8 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
                                            String proxyHost, int proxyPort,
                                            boolean useCache)
         throws IOException {
-        http = HttpClient.New (url, proxyHost, proxyPort, useCache, connectTimeout);
+        http = HttpClient.New (url, proxyHost, proxyPort, useCache,
+            connectTimeout, this);
         http.setReadTimeout(readTimeout);
     }
 
@@ -994,14 +995,14 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
     // subclass HttpsClient will overwrite & return an instance of HttpsClient
     protected HttpClient getNewHttpClient(URL url, Proxy p, int connectTimeout)
         throws IOException {
-        return HttpClient.New(url, p, connectTimeout);
+        return HttpClient.New(url, p, connectTimeout, this);
     }
 
     // subclass HttpsClient will overwrite & return an instance of HttpsClient
     protected HttpClient getNewHttpClient(URL url, Proxy p,
                                           int connectTimeout, boolean useCache)
         throws IOException {
-        return HttpClient.New(url, p, connectTimeout, useCache);
+        return HttpClient.New(url, p, connectTimeout, useCache, this);
     }
 
     private void expect100Continue() throws IOException {
@@ -1144,7 +1145,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
         }
     }
 
-    private boolean streaming () {
+    public boolean streaming () {
         return (fixedContentLength != -1) || (fixedContentLengthLong != -1) ||
                (chunkLength != -1);
     }
@@ -1739,7 +1740,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
      *
      * @param  the state
      */
-    void setTunnelState(TunnelState tunnelState) {
+    public void setTunnelState(TunnelState tunnelState) {
         this.tunnelState = tunnelState;
     }
 
diff --git a/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java b/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java
index cd65cb99a4b..3d60a38d74c 100644
--- a/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java
+++ b/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java
@@ -1059,6 +1059,28 @@ class DatagramChannelImpl
         return translateReadyOps(ops, 0, sk);
     }
 
+    // package-private
+    int poll(int events, long timeout) throws IOException {
+        assert Thread.holdsLock(blockingLock()) && !isBlocking();
+
+        synchronized (readLock) {
+            int n = 0;
+            try {
+                begin();
+                synchronized (stateLock) {
+                    if (!isOpen())
+                        return 0;
+                    readerThread = NativeThread.current();
+                }
+                n = Net.poll(fd, events, timeout);
+            } finally {
+                readerThread = 0;
+                end(n > 0);
+            }
+            return n;
+        }
+    }
+
     /**
      * Translates an interest operation set into a native poll event set
      */
diff --git a/jdk/src/share/classes/sun/nio/ch/DatagramSocketAdaptor.java b/jdk/src/share/classes/sun/nio/ch/DatagramSocketAdaptor.java
index dcd507a2e9f..92ea5870ca4 100644
--- a/jdk/src/share/classes/sun/nio/ch/DatagramSocketAdaptor.java
+++ b/jdk/src/share/classes/sun/nio/ch/DatagramSocketAdaptor.java
@@ -176,40 +176,31 @@ public class DatagramSocketAdaptor
             return dc.receive(bb);
         }
 
-        // Implement timeout with a selector
-        SelectionKey sk = null;
-        Selector sel = null;
         dc.configureBlocking(false);
         try {
             int n;
             SocketAddress sender;
             if ((sender = dc.receive(bb)) != null)
                 return sender;
-            sel = Util.getTemporarySelector(dc);
-            sk = dc.register(sel, SelectionKey.OP_READ);
             long to = timeout;
             for (;;) {
                 if (!dc.isOpen())
                      throw new ClosedChannelException();
                 long st = System.currentTimeMillis();
-                int ns = sel.select(to);
-                if (ns > 0 && sk.isReadable()) {
+                int result = dc.poll(PollArrayWrapper.POLLIN, to);
+                if (result > 0 &&
+                        ((result & PollArrayWrapper.POLLIN) != 0)) {
                     if ((sender = dc.receive(bb)) != null)
                         return sender;
                 }
-                sel.selectedKeys().remove(sk);
                 to -= System.currentTimeMillis() - st;
                 if (to <= 0)
                     throw new SocketTimeoutException();
 
             }
         } finally {
-            if (sk != null)
-                sk.cancel();
             if (dc.isOpen())
                 dc.configureBlocking(true);
-            if (sel != null)
-                Util.releaseTemporarySelector(sel);
         }
     }
 
diff --git a/jdk/src/share/classes/sun/nio/ch/Net.java b/jdk/src/share/classes/sun/nio/ch/Net.java
index 9f2d1f01776..48c971bc710 100644
--- a/jdk/src/share/classes/sun/nio/ch/Net.java
+++ b/jdk/src/share/classes/sun/nio/ch/Net.java
@@ -409,6 +409,9 @@ public class Net {
                                              int level, int opt, int arg)
         throws IOException;
 
+    static native int poll(FileDescriptor fd, int events, long timeout)
+        throws IOException;
+
     // -- Multicast support --
 
 
diff --git a/jdk/src/share/classes/sun/nio/ch/ServerSocketAdaptor.java b/jdk/src/share/classes/sun/nio/ch/ServerSocketAdaptor.java
index f897d3460db..a3a88ce2ca2 100644
--- a/jdk/src/share/classes/sun/nio/ch/ServerSocketAdaptor.java
+++ b/jdk/src/share/classes/sun/nio/ch/ServerSocketAdaptor.java
@@ -102,37 +102,26 @@ public class ServerSocketAdaptor                        // package-private
                     return sc.socket();
                 }
 
-                // Implement timeout with a selector
-                SelectionKey sk = null;
-                Selector sel = null;
                 ssc.configureBlocking(false);
                 try {
                     SocketChannel sc;
                     if ((sc = ssc.accept()) != null)
                         return sc.socket();
-                    sel = Util.getTemporarySelector(ssc);
-                    sk = ssc.register(sel, SelectionKey.OP_ACCEPT);
                     long to = timeout;
                     for (;;) {
                         if (!ssc.isOpen())
                             throw new ClosedChannelException();
                         long st = System.currentTimeMillis();
-                        int ns = sel.select(to);
-                        if (ns > 0 &&
-                            sk.isAcceptable() && ((sc = ssc.accept()) != null))
+                        int result = ssc.poll(PollArrayWrapper.POLLIN, to);
+                        if (result > 0 && ((sc = ssc.accept()) != null))
                             return sc.socket();
-                        sel.selectedKeys().remove(sk);
                         to -= System.currentTimeMillis() - st;
                         if (to <= 0)
                             throw new SocketTimeoutException();
                     }
                 } finally {
-                    if (sk != null)
-                        sk.cancel();
                     if (ssc.isOpen())
                         ssc.configureBlocking(true);
-                    if (sel != null)
-                        Util.releaseTemporarySelector(sel);
                 }
 
             } catch (Exception x) {
diff --git a/jdk/src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java b/jdk/src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java
index a7f90a9660c..728d865b878 100644
--- a/jdk/src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java
+++ b/jdk/src/share/classes/sun/nio/ch/ServerSocketChannelImpl.java
@@ -324,6 +324,28 @@ class ServerSocketChannelImpl
         return translateReadyOps(ops, 0, sk);
     }
 
+    // package-private
+    int poll(int events, long timeout) throws IOException {
+        assert Thread.holdsLock(blockingLock()) && !isBlocking();
+
+        synchronized (lock) {
+            int n = 0;
+            try {
+                begin();
+                synchronized (stateLock) {
+                    if (!isOpen())
+                        return 0;
+                    thread = NativeThread.current();
+                }
+                n = Net.poll(fd, events, timeout);
+            } finally {
+                thread = 0;
+                end(n > 0);
+            }
+            return n;
+        }
+    }
+
     /**
      * Translates an interest operation set into a native poll event set
      */
diff --git a/jdk/src/share/classes/sun/nio/ch/SocketAdaptor.java b/jdk/src/share/classes/sun/nio/ch/SocketAdaptor.java
index 2fbc517193c..ab3dbcf379b 100644
--- a/jdk/src/share/classes/sun/nio/ch/SocketAdaptor.java
+++ b/jdk/src/share/classes/sun/nio/ch/SocketAdaptor.java
@@ -97,25 +97,19 @@ public class SocketAdaptor
                     return;
                 }
 
-                // Implement timeout with a selector
-                SelectionKey sk = null;
-                Selector sel = null;
                 sc.configureBlocking(false);
                 try {
                     if (sc.connect(remote))
                         return;
-                    sel = Util.getTemporarySelector(sc);
-                    sk = sc.register(sel, SelectionKey.OP_CONNECT);
                     long to = timeout;
                     for (;;) {
                         if (!sc.isOpen())
                             throw new ClosedChannelException();
                         long st = System.currentTimeMillis();
-                        int ns = sel.select(to);
-                        if (ns > 0 &&
-                            sk.isConnectable() && sc.finishConnect())
+
+                        int result = sc.poll(PollArrayWrapper.POLLCONN, to);
+                        if (result > 0 && sc.finishConnect())
                             break;
-                        sel.selectedKeys().remove(sk);
                         to -= System.currentTimeMillis() - st;
                         if (to <= 0) {
                             try {
@@ -125,12 +119,8 @@ public class SocketAdaptor
                         }
                     }
                 } finally {
-                    if (sk != null)
-                        sk.cancel();
                     if (sc.isOpen())
                         sc.configureBlocking(true);
-                    if (sel != null)
-                        Util.releaseTemporarySelector(sel);
                 }
 
             } catch (Exception x) {
@@ -199,39 +189,29 @@ public class SocketAdaptor
                     throw new IllegalBlockingModeException();
                 if (timeout == 0)
                     return sc.read(bb);
-
-                // Implement timeout with a selector
-                SelectionKey sk = null;
-                Selector sel = null;
                 sc.configureBlocking(false);
+
                 try {
                     int n;
                     if ((n = sc.read(bb)) != 0)
                         return n;
-                    sel = Util.getTemporarySelector(sc);
-                    sk = sc.register(sel, SelectionKey.OP_READ);
                     long to = timeout;
                     for (;;) {
                         if (!sc.isOpen())
                             throw new ClosedChannelException();
                         long st = System.currentTimeMillis();
-                        int ns = sel.select(to);
-                        if (ns > 0 && sk.isReadable()) {
+                        int result = sc.poll(PollArrayWrapper.POLLIN, to);
+                        if (result > 0) {
                             if ((n = sc.read(bb)) != 0)
                                 return n;
                         }
-                        sel.selectedKeys().remove(sk);
                         to -= System.currentTimeMillis() - st;
                         if (to <= 0)
                             throw new SocketTimeoutException();
                     }
                 } finally {
-                    if (sk != null)
-                        sk.cancel();
                     if (sc.isOpen())
                         sc.configureBlocking(true);
-                    if (sel != null)
-                        Util.releaseTemporarySelector(sel);
                 }
 
             }
diff --git a/jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java b/jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java
index f0f72551614..9696038ecbf 100644
--- a/jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java
+++ b/jdk/src/share/classes/sun/nio/ch/SocketChannelImpl.java
@@ -914,6 +914,28 @@ class SocketChannelImpl
         return translateReadyOps(ops, 0, sk);
     }
 
+    // package-private
+    int poll(int events, long timeout) throws IOException {
+        assert Thread.holdsLock(blockingLock()) && !isBlocking();
+
+        synchronized (readLock) {
+            int n = 0;
+            try {
+                begin();
+                synchronized (stateLock) {
+                    if (!isOpen())
+                        return 0;
+                    readerThread = NativeThread.current();
+                }
+                n = Net.poll(fd, events, timeout);
+            } finally {
+                readerCleanup();
+                end(n > 0);
+            }
+            return n;
+        }
+    }
+
     /**
      * Translates an interest operation set into a native poll event set
      */
diff --git a/jdk/src/share/classes/sun/nio/ch/Util.java b/jdk/src/share/classes/sun/nio/ch/Util.java
index 1d8f6000c48..73f71898a73 100644
--- a/jdk/src/share/classes/sun/nio/ch/Util.java
+++ b/jdk/src/share/classes/sun/nio/ch/Util.java
@@ -218,66 +218,6 @@ public class Util {
         ((DirectBuffer)buf).cleaner().clean();
     }
 
-    private static class SelectorWrapper {
-        private Selector sel;
-        private SelectorWrapper (Selector sel) {
-            this.sel = sel;
-            Cleaner.create(this, new Closer(sel));
-        }
-        private static class Closer implements Runnable {
-            private Selector sel;
-            private Closer (Selector sel) {
-                this.sel = sel;
-            }
-            public void run () {
-                try {
-                    sel.close();
-                } catch (Throwable th) {
-                    throw new Error(th);
-                }
-            }
-        }
-        public Selector get() { return sel;}
-    }
-
-    // Per-thread cached selector
-    private static ThreadLocal<SoftReference<SelectorWrapper>> localSelector
-        = new ThreadLocal<SoftReference<SelectorWrapper>>();
-    // Hold a reference to the selWrapper object to prevent it from
-    // being cleaned when the temporary selector wrapped is on lease.
-    private static ThreadLocal<SelectorWrapper> localSelectorWrapper
-        = new ThreadLocal<SelectorWrapper>();
-
-    // When finished, invoker must ensure that selector is empty
-    // by cancelling any related keys and explicitly releasing
-    // the selector by invoking releaseTemporarySelector()
-    static Selector getTemporarySelector(SelectableChannel sc)
-        throws IOException
-    {
-        SoftReference<SelectorWrapper> ref = localSelector.get();
-        SelectorWrapper selWrapper = null;
-        Selector sel = null;
-        if (ref == null
-            || ((selWrapper = ref.get()) == null)
-            || ((sel = selWrapper.get()) == null)
-            || (sel.provider() != sc.provider())) {
-            sel = sc.provider().openSelector();
-            selWrapper = new SelectorWrapper(sel);
-            localSelector.set(new SoftReference<SelectorWrapper>(selWrapper));
-        }
-        localSelectorWrapper.set(selWrapper);
-        return sel;
-    }
-
-    static void releaseTemporarySelector(Selector sel)
-        throws IOException
-    {
-        // Selector should be empty
-        sel.selectNow();                // Flush cancelled keys
-        assert sel.keys().isEmpty() : "Temporary selector not empty";
-        localSelectorWrapper.set(null);
-    }
-
 
     // -- Random stuff --
 
diff --git a/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java b/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java
index c7d62ff6b46..44121fb2cda 100644
--- a/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java
+++ b/jdk/src/share/classes/sun/security/pkcs11/P11Cipher.java
@@ -193,9 +193,9 @@ final class P11Cipher extends CipherSpi {
             } else { // DES, DESede, Blowfish
                 blockSize = 8;
             }
-            this.blockMode =
-                (algoParts.length > 1 ? parseMode(algoParts[1]) : MODE_ECB);
         }
+        this.blockMode =
+            (algoParts.length > 1 ? parseMode(algoParts[1]) : MODE_ECB);
         String defPadding = (blockSize == 0 ? "NoPadding" : "PKCS5Padding");
         String paddingStr =
                 (algoParts.length > 2 ? algoParts[2] : defPadding);
diff --git a/jdk/src/share/classes/sun/security/provider/DSAKeyPairGenerator.java b/jdk/src/share/classes/sun/security/provider/DSAKeyPairGenerator.java
index 579d60e0fea..e4be7594be2 100644
--- a/jdk/src/share/classes/sun/security/provider/DSAKeyPairGenerator.java
+++ b/jdk/src/share/classes/sun/security/provider/DSAKeyPairGenerator.java
@@ -82,7 +82,9 @@ implements java.security.interfaces.DSAKeyPairGenerator {
     }
 
     public void initialize(int modlen, SecureRandom random) {
-        initialize(modlen, false, random);
+        // generate new parameters when no precomputed ones available.
+        initialize(modlen, true, random);
+        this.forceNewParameters = false;
     }
 
     /**
diff --git a/jdk/src/share/classes/sun/security/provider/DSAParameterGenerator.java b/jdk/src/share/classes/sun/security/provider/DSAParameterGenerator.java
index 9c6be21d580..ac50e96f268 100644
--- a/jdk/src/share/classes/sun/security/provider/DSAParameterGenerator.java
+++ b/jdk/src/share/classes/sun/security/provider/DSAParameterGenerator.java
@@ -116,12 +116,13 @@ public class DSAParameterGenerator extends AlgorithmParameterGeneratorSpi {
             throw new InvalidAlgorithmParameterException("Invalid parameter");
         }
         DSAGenParameterSpec dsaGenParams = (DSAGenParameterSpec) genParamSpec;
-        if (dsaGenParams.getPrimePLength() > 2048) {
+        int primePLen = dsaGenParams.getPrimePLength();
+        if (primePLen > 2048) {
             throw new InvalidParameterException
-                ("Prime size should be 512 - 1024, or 2048");
+                ("No support for prime size " + primePLen);
         }
         // directly initialize using the already validated values
-        this.valueL = dsaGenParams.getPrimePLength();
+        this.valueL = primePLen;
         this.valueN = dsaGenParams.getSubprimeQLength();
         this.seedLen = dsaGenParams.getSeedLength();
         this.random = random;
diff --git a/jdk/src/share/classes/sun/security/provider/ParameterCache.java b/jdk/src/share/classes/sun/security/provider/ParameterCache.java
index 419bbd68522..0edff492d5c 100644
--- a/jdk/src/share/classes/sun/security/provider/ParameterCache.java
+++ b/jdk/src/share/classes/sun/security/provider/ParameterCache.java
@@ -146,9 +146,14 @@ public final class ParameterCache {
                    InvalidAlgorithmParameterException {
         AlgorithmParameterGenerator gen =
                 AlgorithmParameterGenerator.getInstance("DSA");
-        DSAGenParameterSpec genParams =
-            new DSAGenParameterSpec(primeLen, subprimeLen);
-        gen.init(genParams, random);
+        // Use init(int size, SecureRandom random) for legacy DSA key sizes
+        if (primeLen < 1024) {
+            gen.init(primeLen, random);
+        } else {
+            DSAGenParameterSpec genParams =
+                new DSAGenParameterSpec(primeLen, subprimeLen);
+            gen.init(genParams, random);
+        }
         AlgorithmParameters params = gen.generateParameters();
         DSAParameterSpec spec = params.getParameterSpec(DSAParameterSpec.class);
         return spec;
@@ -159,8 +164,9 @@ public final class ParameterCache {
         dsaCache = new ConcurrentHashMap<Integer,DSAParameterSpec>();
 
         /*
-         * We support precomputed parameter for 512, 768 and 1024 bit
-         * moduli. In this file we provide both the seed and counter
+         * We support precomputed parameter for legacy 512, 768 bit moduli,
+         * and (L, N) combinations of (1024, 160), (2048, 224), (2048, 256).
+         * In this file we provide both the seed and counter
          * value of the generation process for each of these seeds,
          * for validation purposes. We also include the test vectors
          * from the DSA specification, FIPS 186, and the FIPS 186
diff --git a/jdk/src/share/classes/sun/security/ssl/HandshakeMessage.java b/jdk/src/share/classes/sun/security/ssl/HandshakeMessage.java
index 4b952fe9ed8..c4cca9edba0 100644
--- a/jdk/src/share/classes/sun/security/ssl/HandshakeMessage.java
+++ b/jdk/src/share/classes/sun/security/ssl/HandshakeMessage.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -132,7 +132,7 @@ public abstract class HandshakeMessage {
      */
     final void write(HandshakeOutStream s) throws IOException {
         int len = messageLength();
-        if (len > (1 << 24)) {
+        if (len >= Record.OVERFLOW_OF_INT24) {
             throw new SSLException("Handshake message too big"
                 + ", type = " + messageType() + ", len = " + len);
         }
diff --git a/jdk/src/share/classes/sun/security/ssl/HandshakeOutStream.java b/jdk/src/share/classes/sun/security/ssl/HandshakeOutStream.java
index 9a7cb5b3c94..25aeed68a59 100644
--- a/jdk/src/share/classes/sun/security/ssl/HandshakeOutStream.java
+++ b/jdk/src/share/classes/sun/security/ssl/HandshakeOutStream.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -153,10 +153,12 @@ public class HandshakeOutStream extends OutputStream {
      */
 
     void putInt8(int i) throws IOException {
+        checkOverflow(i, Record.OVERFLOW_OF_INT08);
         r.write(i);
     }
 
     void putInt16(int i) throws IOException {
+        checkOverflow(i, Record.OVERFLOW_OF_INT16);
         if (r.availableDataBytes() < 2) {
             flush();
         }
@@ -165,6 +167,7 @@ public class HandshakeOutStream extends OutputStream {
     }
 
     void putInt24(int i) throws IOException {
+        checkOverflow(i, Record.OVERFLOW_OF_INT24);
         if (r.availableDataBytes() < 3) {
             flush();
         }
@@ -191,6 +194,8 @@ public class HandshakeOutStream extends OutputStream {
         if (b == null) {
             putInt8(0);
             return;
+        } else {
+            checkOverflow(b.length, Record.OVERFLOW_OF_INT08);
         }
         putInt8(b.length);
         write(b, 0, b.length);
@@ -200,6 +205,8 @@ public class HandshakeOutStream extends OutputStream {
         if (b == null) {
             putInt16(0);
             return;
+        } else {
+            checkOverflow(b.length, Record.OVERFLOW_OF_INT16);
         }
         putInt16(b.length);
         write(b, 0, b.length);
@@ -209,8 +216,19 @@ public class HandshakeOutStream extends OutputStream {
         if (b == null) {
             putInt24(0);
             return;
+        } else {
+            checkOverflow(b.length, Record.OVERFLOW_OF_INT24);
         }
         putInt24(b.length);
         write(b, 0, b.length);
     }
+
+    private void checkOverflow(int length, int overflow) {
+        if (length >= overflow) {
+            // internal_error alert will be triggered
+            throw new RuntimeException(
+                    "Field length overflow, the field length (" +
+                    length + ") should be less than " + overflow);
+        }
+    }
 }
diff --git a/jdk/src/share/classes/sun/security/ssl/Record.java b/jdk/src/share/classes/sun/security/ssl/Record.java
index 92c8a3ebbe0..0494d9a4583 100644
--- a/jdk/src/share/classes/sun/security/ssl/Record.java
+++ b/jdk/src/share/classes/sun/security/ssl/Record.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -110,4 +110,10 @@ interface Record {
                                     + maxPadding        // padding
                                     + trailerSize;      // MAC
 
+    /*
+     * The overflow values of integers of 8, 16 and 24 bits.
+     */
+    static final int OVERFLOW_OF_INT08 = (1 << 8);
+    static final int OVERFLOW_OF_INT16 = (1 << 16);
+    static final int OVERFLOW_OF_INT24 = (1 << 24);
 }
diff --git a/jdk/src/share/classes/sun/text/SupplementaryCharacterData.java b/jdk/src/share/classes/sun/text/SupplementaryCharacterData.java
index d1e3b40986e..91c1bea9a57 100644
--- a/jdk/src/share/classes/sun/text/SupplementaryCharacterData.java
+++ b/jdk/src/share/classes/sun/text/SupplementaryCharacterData.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,11 @@ package sun.text;
  */
 public final class SupplementaryCharacterData implements Cloneable {
 
+    /**
+     * A token used as a character-category value to identify ignore characters
+     */
+    private static final byte IGNORE = -1;
+
     /**
      * An array for supplementary characters and values.
      * Lower one byte is used to keep a byte-value.
@@ -78,7 +83,8 @@ public final class SupplementaryCharacterData implements Cloneable {
             } else if (index > (end-1)) {
                 i = k;
             } else {
-                return dataTable[k] & 0xFF;
+                int v = dataTable[k] & 0xFF;
+                return (v == 0xFF) ? IGNORE : v;
             }
         }
     }
diff --git a/jdk/src/share/classes/sun/util/locale/LocaleEquivalentMaps.java b/jdk/src/share/classes/sun/util/locale/LocaleEquivalentMaps.java
new file mode 100644
index 00000000000..3133fd34ba7
--- /dev/null
+++ b/jdk/src/share/classes/sun/util/locale/LocaleEquivalentMaps.java
@@ -0,0 +1,204 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.util.locale;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Locale equivalent map for BCP47 Locale matching
+ */
+final class LocaleEquivalentMaps {
+
+    static final Map<String, String> singleEquivMap;
+    static final Map<String, String[]> multiEquivsMap;
+    static final Map<String, String> regionVariantEquivMap;
+
+    static {
+        singleEquivMap = new HashMap<>();
+        multiEquivsMap = new HashMap<>();
+        regionVariantEquivMap = new HashMap<>();
+
+        // This is an auto-generated file and should not be manually edited.
+        //   LSR Revision: 2012-09-04
+        singleEquivMap.put("ami", "i-ami");
+        singleEquivMap.put("art-lojban", "jbo");
+        singleEquivMap.put("ase", "sgn-us");
+        singleEquivMap.put("ayx", "nun");
+        singleEquivMap.put("bfi", "sgn-gb");
+        singleEquivMap.put("bjd", "drl");
+        singleEquivMap.put("bnn", "i-bnn");
+        singleEquivMap.put("bzs", "sgn-br");
+        singleEquivMap.put("cjr", "mom");
+        singleEquivMap.put("cka", "cmr");
+        singleEquivMap.put("cmk", "xch");
+        singleEquivMap.put("cmn-hans", "zh-cmn-hans");
+        singleEquivMap.put("cmn-hant", "zh-cmn-hant");
+        singleEquivMap.put("cmr", "cka");
+        singleEquivMap.put("csn", "sgn-co");
+        singleEquivMap.put("dev", "gav");
+        singleEquivMap.put("drh", "khk");
+        singleEquivMap.put("drl", "bjd");
+        singleEquivMap.put("dse", "sgn-nl");
+        singleEquivMap.put("dsl", "sgn-dk");
+        singleEquivMap.put("fsl", "sgn-fr");
+        singleEquivMap.put("gan", "zh-gan");
+        singleEquivMap.put("gav", "dev");
+        singleEquivMap.put("gsg", "sgn-de");
+        singleEquivMap.put("gss", "sgn-gr");
+        singleEquivMap.put("he", "iw");
+        singleEquivMap.put("hle", "sca");
+        singleEquivMap.put("hrr", "jal");
+        singleEquivMap.put("hsn", "zh-xiang");
+        singleEquivMap.put("i-ami", "ami");
+        singleEquivMap.put("i-bnn", "bnn");
+        singleEquivMap.put("i-klingon", "tlh");
+        singleEquivMap.put("i-lux", "lb");
+        singleEquivMap.put("i-navajo", "nv");
+        singleEquivMap.put("i-pwn", "pwn");
+        singleEquivMap.put("i-tao", "tao");
+        singleEquivMap.put("i-tay", "tay");
+        singleEquivMap.put("i-tsu", "tsu");
+        singleEquivMap.put("ibi", "opa");
+        singleEquivMap.put("id", "in");
+        singleEquivMap.put("in", "id");
+        singleEquivMap.put("ise", "sgn-it");
+        singleEquivMap.put("isg", "sgn-ie");
+        singleEquivMap.put("iw", "he");
+        singleEquivMap.put("jal", "hrr");
+        singleEquivMap.put("jbo", "art-lojban");
+        singleEquivMap.put("ji", "yi");
+        singleEquivMap.put("jsl", "sgn-jp");
+        singleEquivMap.put("jv", "jw");
+        singleEquivMap.put("jw", "jv");
+        singleEquivMap.put("kgh", "kml");
+        singleEquivMap.put("khk", "drh");
+        singleEquivMap.put("kml", "kgh");
+        singleEquivMap.put("lb", "i-lux");
+        singleEquivMap.put("lcq", "ppr");
+        singleEquivMap.put("lrr", "yma");
+        singleEquivMap.put("mfs", "sgn-mx");
+        singleEquivMap.put("mo", "ro");
+        singleEquivMap.put("mom", "cjr");
+        singleEquivMap.put("nan", "zh-min-nan");
+        singleEquivMap.put("nb", "no-bok");
+        singleEquivMap.put("ncs", "sgn-ni");
+        singleEquivMap.put("nn", "no-nyn");
+        singleEquivMap.put("no-bok", "nb");
+        singleEquivMap.put("no-nyn", "nn");
+        singleEquivMap.put("nsl", "sgn-no");
+        singleEquivMap.put("nun", "ayx");
+        singleEquivMap.put("nv", "i-navajo");
+        singleEquivMap.put("opa", "ibi");
+        singleEquivMap.put("ppr", "lcq");
+        singleEquivMap.put("psr", "sgn-pt");
+        singleEquivMap.put("pwn", "i-pwn");
+        singleEquivMap.put("ras", "tie");
+        singleEquivMap.put("ro", "mo");
+        singleEquivMap.put("sca", "hle");
+        singleEquivMap.put("sfb", "sgn-be-fr");
+        singleEquivMap.put("sfs", "sgn-za");
+        singleEquivMap.put("sgg", "sgn-ch-de");
+        singleEquivMap.put("sgn-be-fr", "sfb");
+        singleEquivMap.put("sgn-be-nl", "vgt");
+        singleEquivMap.put("sgn-br", "bzs");
+        singleEquivMap.put("sgn-ch-de", "sgg");
+        singleEquivMap.put("sgn-co", "csn");
+        singleEquivMap.put("sgn-de", "gsg");
+        singleEquivMap.put("sgn-dk", "dsl");
+        singleEquivMap.put("sgn-es", "ssp");
+        singleEquivMap.put("sgn-fr", "fsl");
+        singleEquivMap.put("sgn-gb", "bfi");
+        singleEquivMap.put("sgn-gr", "gss");
+        singleEquivMap.put("sgn-ie", "isg");
+        singleEquivMap.put("sgn-it", "ise");
+        singleEquivMap.put("sgn-jp", "jsl");
+        singleEquivMap.put("sgn-mx", "mfs");
+        singleEquivMap.put("sgn-ni", "ncs");
+        singleEquivMap.put("sgn-nl", "dse");
+        singleEquivMap.put("sgn-no", "nsl");
+        singleEquivMap.put("sgn-pt", "psr");
+        singleEquivMap.put("sgn-se", "swl");
+        singleEquivMap.put("sgn-us", "ase");
+        singleEquivMap.put("sgn-za", "sfs");
+        singleEquivMap.put("ssp", "sgn-es");
+        singleEquivMap.put("swl", "sgn-se");
+        singleEquivMap.put("tao", "i-tao");
+        singleEquivMap.put("tay", "i-tay");
+        singleEquivMap.put("tie", "ras");
+        singleEquivMap.put("tkk", "twm");
+        singleEquivMap.put("tlh", "i-klingon");
+        singleEquivMap.put("tlw", "weo");
+        singleEquivMap.put("tsu", "i-tsu");
+        singleEquivMap.put("twm", "tkk");
+        singleEquivMap.put("vgt", "sgn-be-nl");
+        singleEquivMap.put("weo", "tlw");
+        singleEquivMap.put("wuu", "zh-wuu");
+        singleEquivMap.put("xch", "cmk");
+        singleEquivMap.put("yi", "ji");
+        singleEquivMap.put("yma", "lrr");
+        singleEquivMap.put("yue", "zh-yue");
+        singleEquivMap.put("zh-cmn-hans", "cmn-hans");
+        singleEquivMap.put("zh-cmn-hant", "cmn-hant");
+        singleEquivMap.put("zh-gan", "gan");
+        singleEquivMap.put("zh-min-nan", "nan");
+        singleEquivMap.put("zh-wuu", "wuu");
+        singleEquivMap.put("zh-xiang", "hsn");
+        singleEquivMap.put("zh-yue", "yue");
+
+        multiEquivsMap.put("ccq", new String[] {"rki", "ybd"});
+        multiEquivsMap.put("cmn", new String[] {"zh-guoyu", "zh-cmn"});
+        multiEquivsMap.put("drw", new String[] {"prs", "tnf"});
+        multiEquivsMap.put("hak", new String[] {"i-hak", "zh-hakka"});
+        multiEquivsMap.put("i-hak", new String[] {"hak", "zh-hakka"});
+        multiEquivsMap.put("mry", new String[] {"mst", "myt"});
+        multiEquivsMap.put("mst", new String[] {"mry", "myt"});
+        multiEquivsMap.put("myt", new String[] {"mry", "mst"});
+        multiEquivsMap.put("prs", new String[] {"drw", "tnf"});
+        multiEquivsMap.put("rki", new String[] {"ccq", "ybd"});
+        multiEquivsMap.put("tnf", new String[] {"prs", "drw"});
+        multiEquivsMap.put("ybd", new String[] {"rki", "ccq"});
+        multiEquivsMap.put("zh-cmn", new String[] {"cmn", "zh-guoyu"});
+        multiEquivsMap.put("zh-guoyu", new String[] {"cmn", "zh-cmn"});
+        multiEquivsMap.put("zh-hakka", new String[] {"hak", "i-hak"});
+
+        regionVariantEquivMap.put("-alalc97", "-heploc");
+        regionVariantEquivMap.put("-bu", "-mm");
+        regionVariantEquivMap.put("-cd", "-zr");
+        regionVariantEquivMap.put("-dd", "-de");
+        regionVariantEquivMap.put("-de", "-dd");
+        regionVariantEquivMap.put("-fr", "-fx");
+        regionVariantEquivMap.put("-fx", "-fr");
+        regionVariantEquivMap.put("-heploc", "-alalc97");
+        regionVariantEquivMap.put("-mm", "-bu");
+        regionVariantEquivMap.put("-tl", "-tp");
+        regionVariantEquivMap.put("-tp", "-tl");
+        regionVariantEquivMap.put("-yd", "-ye");
+        regionVariantEquivMap.put("-ye", "-yd");
+        regionVariantEquivMap.put("-zr", "-cd");
+    }
+
+}
diff --git a/jdk/src/share/classes/sun/util/locale/LocaleMatcher.java b/jdk/src/share/classes/sun/util/locale/LocaleMatcher.java
new file mode 100644
index 00000000000..9f3f01c3d61
--- /dev/null
+++ b/jdk/src/share/classes/sun/util/locale/LocaleMatcher.java
@@ -0,0 +1,455 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.util.locale;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Locale.*;
+import static java.util.Locale.FilteringMode.*;
+import static java.util.Locale.LanguageRange.*;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * Implementation for BCP47 Locale matching
+ *
+ */
+public final class LocaleMatcher {
+
+    public static List<Locale> filter(List<LanguageRange> priorityList,
+                                      Collection<Locale> locales,
+                                      FilteringMode mode) {
+        if (priorityList.isEmpty() || locales.isEmpty()) {
+            return new ArrayList<>(); // need to return a empty mutable List
+        }
+
+        // Create a list of language tags to be matched.
+        List<String> tags = new ArrayList<>();
+        for (Locale locale : locales) {
+            tags.add(locale.toLanguageTag());
+        }
+
+        // Filter language tags.
+        List<String> filteredTags = filterTags(priorityList, tags, mode);
+
+        // Create a list of matching locales.
+        List<Locale> filteredLocales = new ArrayList<>(filteredTags.size());
+        for (String tag : filteredTags) {
+              filteredLocales.add(Locale.forLanguageTag(tag));
+        }
+
+        return filteredLocales;
+    }
+
+    public static List<String> filterTags(List<LanguageRange> priorityList,
+                                          Collection<String> tags,
+                                          FilteringMode mode) {
+        if (priorityList.isEmpty() || tags.isEmpty()) {
+            return new ArrayList<>(); // need to return a empty mutable List
+        }
+
+        ArrayList<LanguageRange> list;
+        if (mode == EXTENDED_FILTERING) {
+            return filterExtended(priorityList, tags);
+        } else {
+            list = new ArrayList<>();
+            for (LanguageRange lr : priorityList) {
+                String range = lr.getRange();
+                if (range.startsWith("*-")
+                    || range.indexOf("-*") != -1) { // Extended range
+                    if (mode == AUTOSELECT_FILTERING) {
+                        return filterExtended(priorityList, tags);
+                    } else if (mode == MAP_EXTENDED_RANGES) {
+                        if (range.charAt(0) == '*') {
+                            range = "*";
+                        } else {
+                            range = range.replaceAll("-[*]", "");
+                        }
+                        list.add(new LanguageRange(range, lr.getWeight()));
+                    } else if (mode == REJECT_EXTENDED_RANGES) {
+                        throw new IllegalArgumentException("An extended range \""
+                                      + range
+                                      + "\" found in REJECT_EXTENDED_RANGES mode.");
+                    }
+                } else { // Basic range
+                    list.add(lr);
+                }
+            }
+
+            return filterBasic(list, tags);
+        }
+    }
+
+    private static List<String> filterBasic(List<LanguageRange> priorityList,
+                                            Collection<String> tags) {
+        List<String> list = new ArrayList<>();
+        for (LanguageRange lr : priorityList) {
+            String range = lr.getRange();
+            if (range.equals("*")) {
+                return new ArrayList<String>(tags);
+            } else {
+                for (String tag : tags) {
+                    tag = tag.toLowerCase();
+                    if (tag.startsWith(range)) {
+                        int len = range.length();
+                        if ((tag.length() == len || tag.charAt(len) == '-')
+                            && !list.contains(tag)) {
+                            list.add(tag);
+                        }
+                    }
+                }
+            }
+        }
+
+        return list;
+    }
+
+    private static List<String> filterExtended(List<LanguageRange> priorityList,
+                                               Collection<String> tags) {
+        List<String> list = new ArrayList<>();
+        for (LanguageRange lr : priorityList) {
+            String range = lr.getRange();
+            if (range.equals("*")) {
+                return new ArrayList<String>(tags);
+            }
+            String[] rangeSubtags = range.split("-");
+            for (String tag : tags) {
+                tag = tag.toLowerCase();
+                String[] tagSubtags = tag.split("-");
+                if (!rangeSubtags[0].equals(tagSubtags[0])
+                    && !rangeSubtags[0].equals("*")) {
+                    continue;
+                }
+
+                int rangeIndex = 1;
+                int tagIndex = 1;
+
+                while (rangeIndex < rangeSubtags.length
+                       && tagIndex < tagSubtags.length) {
+                   if (rangeSubtags[rangeIndex].equals("*")) {
+                       rangeIndex++;
+                   } else if (rangeSubtags[rangeIndex].equals(tagSubtags[tagIndex])) {
+                       rangeIndex++;
+                       tagIndex++;
+                   } else if (tagSubtags[tagIndex].length() == 1
+                              && !tagSubtags[tagIndex].equals("*")) {
+                       break;
+                   } else {
+                       tagIndex++;
+                   }
+               }
+
+               if (rangeSubtags.length == rangeIndex && !list.contains(tag)) {
+                   list.add(tag);
+               }
+            }
+        }
+
+        return list;
+    }
+
+    public static Locale lookup(List<LanguageRange> priorityList,
+                                Collection<Locale> locales) {
+        if (priorityList.isEmpty() || locales.isEmpty()) {
+            return null;
+        }
+
+        // Create a list of language tags to be matched.
+        List<String> tags = new ArrayList<>();
+        for (Locale locale : locales) {
+            tags.add(locale.toLanguageTag());
+        }
+
+        // Look up a language tags.
+        String lookedUpTag = lookupTag(priorityList, tags);
+
+        if (lookedUpTag == null) {
+            return null;
+        } else {
+            return Locale.forLanguageTag(lookedUpTag);
+        }
+    }
+
+    public static String lookupTag(List<LanguageRange> priorityList,
+                                   Collection<String> tags) {
+        if (priorityList.isEmpty() || tags.isEmpty()) {
+            return null;
+        }
+
+        for (LanguageRange lr : priorityList) {
+            String range = lr.getRange();
+
+            // Special language range ("*") is ignored in lookup.
+            if (range.equals("*")) {
+                continue;
+            }
+
+            String rangeForRegex = range.replaceAll("\\x2A", "\\\\p{Alnum}*");
+            while (rangeForRegex.length() > 0) {
+                for (String tag : tags) {
+                    tag = tag.toLowerCase();
+                    if (tag.matches(rangeForRegex)) {
+                        return tag;
+                    }
+                }
+
+                // Truncate from the end....
+                int index = rangeForRegex.lastIndexOf('-');
+                if (index >= 0) {
+                    rangeForRegex = rangeForRegex.substring(0, index);
+
+                    // if range ends with an extension key, truncate it.
+                    if (rangeForRegex.lastIndexOf('-') == rangeForRegex.length()-2) {
+                        rangeForRegex =
+                            rangeForRegex.substring(0, rangeForRegex.length()-2);
+                    }
+                } else {
+                    rangeForRegex = "";
+                }
+            }
+        }
+
+        return null;
+    }
+
+    public static List<LanguageRange> parse(String ranges) {
+        ranges = ranges.replaceAll(" ", "").toLowerCase();
+        if (ranges.startsWith("accept-language:")) {
+            ranges = ranges.substring(16); // delete unnecessary prefix
+        }
+
+        String[] langRanges = ranges.split(",");
+        List<LanguageRange> list = new ArrayList<>(langRanges.length);
+        List<String> tempList = new ArrayList<>();
+        int numOfRanges = 0;
+
+        for (String range : langRanges) {
+            int index;
+            String r;
+            double w;
+
+            if ((index = range.indexOf(";q=")) == -1) {
+                r = range;
+                w = MAX_WEIGHT;
+            } else {
+                r = range.substring(0, index);
+                index += 3;
+                try {
+                    w = Double.parseDouble(range.substring(index));
+                }
+                catch (Exception e) {
+                    throw new IllegalArgumentException("weight=\""
+                                  + range.substring(index)
+                                  + "\" for language range \"" + r + "\"");
+                }
+
+                if (w < MIN_WEIGHT || w > MAX_WEIGHT) {
+                    throw new IllegalArgumentException("weight=" + w
+                                  + " for language range \"" + r
+                                  + "\". It must be between " + MIN_WEIGHT
+                                  + " and " + MAX_WEIGHT + ".");
+                }
+            }
+
+            if (!tempList.contains(r)) {
+                LanguageRange lr = new LanguageRange(r, w);
+                index = numOfRanges;
+                for (int j = 0; j < numOfRanges; j++) {
+                    if (list.get(j).getWeight() < w) {
+                        index = j;
+                        break;
+                    }
+                }
+                list.add(index, lr);
+                numOfRanges++;
+                tempList.add(r);
+
+                // Check if the range has an equivalent using IANA LSR data.
+                // If yes, add it to the User's Language Priority List as well.
+
+                // aa-XX -> aa-YY
+                String equivalent;
+                if ((equivalent = getEquivalentForRegionAndVariant(r)) != null
+                    && !tempList.contains(equivalent)) {
+                    list.add(index+1, new LanguageRange(equivalent, w));
+                    numOfRanges++;
+                    tempList.add(equivalent);
+                }
+
+                String[] equivalents;
+                if ((equivalents = getEquivalentsForLanguage(r)) != null) {
+                    for (String equiv: equivalents) {
+                        // aa-XX -> bb-XX(, cc-XX)
+                        if (!tempList.contains(equiv)) {
+                            list.add(index+1, new LanguageRange(equiv, w));
+                            numOfRanges++;
+                            tempList.add(equiv);
+                        }
+
+                        // bb-XX -> bb-YY(, cc-YY)
+                        equivalent = getEquivalentForRegionAndVariant(equiv);
+                        if (equivalent != null
+                            && !tempList.contains(equivalent)) {
+                            list.add(index+1, new LanguageRange(equivalent, w));
+                            numOfRanges++;
+                            tempList.add(equivalent);
+                        }
+                    }
+                }
+            }
+        }
+
+        return list;
+    }
+
+    private static String[] getEquivalentsForLanguage(String range) {
+        String r = range;
+
+        while (r.length() > 0) {
+            if (LocaleEquivalentMaps.singleEquivMap.containsKey(r)) {
+                String equiv = LocaleEquivalentMaps.singleEquivMap.get(r);
+                // Return immediately for performance if the first matching
+                // subtag is found.
+                return new String[] {range.replaceFirst(r, equiv)};
+            } else if (LocaleEquivalentMaps.multiEquivsMap.containsKey(r)) {
+                String[] equivs = LocaleEquivalentMaps.multiEquivsMap.get(r);
+                for (int i = 0; i < equivs.length; i++) {
+                    equivs[i] = range.replaceFirst(r, equivs[i]);
+                }
+                return equivs;
+            }
+
+            // Truncate the last subtag simply.
+            int index = r.lastIndexOf('-');
+            if (index == -1) {
+                break;
+            }
+            r = r.substring(0, index);
+        }
+
+        return null;
+    }
+
+    private static String getEquivalentForRegionAndVariant(String range) {
+        int extensionKeyIndex = getExtentionKeyIndex(range);
+
+        for (String subtag : LocaleEquivalentMaps.regionVariantEquivMap.keySet()) {
+            int index;
+            if ((index = range.indexOf(subtag)) != -1) {
+                // Check if the matching text is a valid region or variant.
+                if (extensionKeyIndex != Integer.MIN_VALUE
+                    && index > extensionKeyIndex) {
+                    continue;
+                }
+
+                int len = index + subtag.length();
+                if (range.length() == len || range.charAt(len) == '-') {
+                    return range.replaceFirst(subtag, LocaleEquivalentMaps.regionVariantEquivMap.get(subtag));
+                }
+            }
+        }
+
+        return null;
+    }
+
+    private static int getExtentionKeyIndex(String s) {
+        char[] c = s.toCharArray();
+        int index = Integer.MIN_VALUE;
+        for (int i = 1; i < c.length; i++) {
+            if (c[i] == '-') {
+                if (i - index == 2) {
+                    return index;
+                } else {
+                    index = i;
+                }
+            }
+        }
+        return Integer.MIN_VALUE;
+    }
+
+    public static List<LanguageRange> mapEquivalents(
+                                          List<LanguageRange>priorityList,
+                                          Map<String, List<String>> map) {
+        if (priorityList.isEmpty()) {
+            return new ArrayList<>(); // need to return a empty mutable List
+        }
+        if (map == null || map.isEmpty()) {
+            return new ArrayList<LanguageRange>(priorityList);
+        }
+
+        // Create a map, key=originalKey.toLowerCaes(), value=originalKey
+        Map<String, String> keyMap = new HashMap<>();
+        for (String key : map.keySet()) {
+            keyMap.put(key.toLowerCase(), key);
+        }
+
+        List<LanguageRange> list = new ArrayList<>();
+        for (LanguageRange lr : priorityList) {
+            String range = lr.getRange();
+            String r = range;
+            boolean hasEquivalent = false;
+
+            while (r.length() > 0) {
+                if (keyMap.containsKey(r)) {
+                    hasEquivalent = true;
+                    List<String> equivalents = map.get(keyMap.get(r));
+                    if (equivalents != null) {
+                        int len = r.length();
+                        for (String equivalent : equivalents) {
+                            list.add(new LanguageRange(equivalent.toLowerCase()
+                                     + range.substring(len),
+                                     lr.getWeight()));
+                        }
+                    }
+                    // Return immediately if the first matching subtag is found.
+                    break;
+                }
+
+                // Truncate the last subtag simply.
+                int index = r.lastIndexOf('-');
+                if (index == -1) {
+                    break;
+                }
+                r = r.substring(0, index);
+            }
+
+            if (!hasEquivalent) {
+                list.add(lr);
+            }
+        }
+
+        return list;
+    }
+
+    private LocaleMatcher() {}
+
+}
diff --git a/jdk/src/share/classes/sun/util/locale/provider/CalendarDataProviderImpl.java b/jdk/src/share/classes/sun/util/locale/provider/CalendarDataProviderImpl.java
index 95da90c56a3..48ef4712ee5 100644
--- a/jdk/src/share/classes/sun/util/locale/provider/CalendarDataProviderImpl.java
+++ b/jdk/src/share/classes/sun/util/locale/provider/CalendarDataProviderImpl.java
@@ -137,7 +137,7 @@ public class CalendarDataProviderImpl extends CalendarDataProvider implements Av
 
     @Override
     public boolean isSupportedLocale(Locale locale) {
-        if (locale == Locale.ROOT) {
+        if (Locale.ROOT.equals(locale)) {
             return true;
         }
         String calendarType = null;
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/CallDecoder.java b/jdk/src/share/classes/sun/util/locale/provider/FallbackLocaleProviderAdapter.java
similarity index 60%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/CallDecoder.java
rename to jdk/src/share/classes/sun/util/locale/provider/FallbackLocaleProviderAdapter.java
index b561ece78e7..e045f875197 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/CallDecoder.java
+++ b/jdk/src/share/classes/sun/util/locale/provider/FallbackLocaleProviderAdapter.java
@@ -1,10 +1,12 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
  *
  * This code is distributed in the hope that it will be useful, but WITHOUT
  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
@@ -19,17 +21,22 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+package sun.util.locale.provider;
 
-import sun.jvm.hotspot.asm.*;
+/**
+ * FallbackProviderAdapter implementation.
+ *
+ * @author Naoto Sato
+ */
+public class FallbackLocaleProviderAdapter extends JRELocaleProviderAdapter {
 
-class CallDecoder extends InstructionDecoder {
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        // sign extend, word align the offset
-        int offset = (instruction & DISP_30_MASK) << 2;
-        return factory.newCallInstruction(new PCRelativeAddress(offset));
+    /**
+     * Returns the type of this LocaleProviderAdapter
+     */
+    @Override
+    public LocaleProviderAdapter.Type getAdapterType() {
+        return Type.FALLBACK;
     }
 }
diff --git a/jdk/src/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java b/jdk/src/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java
index 737f23bb83f..34ed5b890e2 100644
--- a/jdk/src/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java
+++ b/jdk/src/share/classes/sun/util/locale/provider/JRELocaleProviderAdapter.java
@@ -71,7 +71,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter {
      */
     @Override
     public LocaleProviderAdapter.Type getAdapterType() {
-        return LocaleProviderAdapter.Type.JRE;
+        return Type.JRE;
     }
 
     /**
@@ -125,7 +125,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter {
     public BreakIteratorProvider getBreakIteratorProvider() {
         if (breakIteratorProvider == null) {
             BreakIteratorProvider provider = new BreakIteratorProviderImpl(getAdapterType(),
-                                                            getLanguateTagSet("FormatData"));
+                                                            getLanguageTagSet("FormatData"));
             synchronized (this) {
                 if (breakIteratorProvider == null) {
                     breakIteratorProvider = provider;
@@ -139,7 +139,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter {
     public CollatorProvider getCollatorProvider() {
         if (collatorProvider == null) {
             CollatorProvider provider = new CollatorProviderImpl(getAdapterType(),
-                                                getLanguateTagSet("CollationData"));
+                                                getLanguageTagSet("CollationData"));
             synchronized (this) {
                 if (collatorProvider == null) {
                     collatorProvider = provider;
@@ -153,7 +153,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter {
     public DateFormatProvider getDateFormatProvider() {
         if (dateFormatProvider == null) {
             DateFormatProvider provider = new DateFormatProviderImpl(getAdapterType(),
-                                                    getLanguateTagSet("FormatData"));
+                                                    getLanguageTagSet("FormatData"));
             synchronized (this) {
                 if (dateFormatProvider == null) {
                     dateFormatProvider = provider;
@@ -167,7 +167,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter {
     public DateFormatSymbolsProvider getDateFormatSymbolsProvider() {
         if (dateFormatSymbolsProvider == null) {
             DateFormatSymbolsProvider provider = new DateFormatSymbolsProviderImpl(getAdapterType(),
-                                                                getLanguateTagSet("FormatData"));
+                                                                getLanguageTagSet("FormatData"));
             synchronized (this) {
                 if (dateFormatSymbolsProvider == null) {
                     dateFormatSymbolsProvider = provider;
@@ -180,7 +180,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter {
     @Override
     public DecimalFormatSymbolsProvider getDecimalFormatSymbolsProvider() {
         if (decimalFormatSymbolsProvider == null) {
-            DecimalFormatSymbolsProvider provider = new DecimalFormatSymbolsProviderImpl(getAdapterType(), getLanguateTagSet("FormatData"));
+            DecimalFormatSymbolsProvider provider = new DecimalFormatSymbolsProviderImpl(getAdapterType(), getLanguageTagSet("FormatData"));
             synchronized (this) {
                 if (decimalFormatSymbolsProvider == null) {
                     decimalFormatSymbolsProvider = provider;
@@ -194,7 +194,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter {
     public NumberFormatProvider getNumberFormatProvider() {
         if (numberFormatProvider == null) {
             NumberFormatProvider provider = new NumberFormatProviderImpl(getAdapterType(),
-                                                        getLanguateTagSet("FormatData"));
+                                                        getLanguageTagSet("FormatData"));
             synchronized (this) {
                 if (numberFormatProvider == null) {
                     numberFormatProvider = provider;
@@ -211,7 +211,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter {
     public CurrencyNameProvider getCurrencyNameProvider() {
         if (currencyNameProvider == null) {
             CurrencyNameProvider provider = new CurrencyNameProviderImpl(getAdapterType(),
-                                            getLanguateTagSet("CurrencyNames"));
+                                            getLanguageTagSet("CurrencyNames"));
             synchronized (this) {
                 if (currencyNameProvider == null) {
                     currencyNameProvider = provider;
@@ -225,7 +225,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter {
     public LocaleNameProvider getLocaleNameProvider() {
         if (localeNameProvider == null) {
             LocaleNameProvider provider = new LocaleNameProviderImpl(getAdapterType(),
-                                                    getLanguateTagSet("LocaleNames"));
+                                                    getLanguageTagSet("LocaleNames"));
             synchronized (this) {
                 if (localeNameProvider == null) {
                     localeNameProvider = provider;
@@ -239,7 +239,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter {
     public TimeZoneNameProvider getTimeZoneNameProvider() {
         if (timeZoneNameProvider == null) {
             TimeZoneNameProvider provider = new TimeZoneNameProviderImpl(getAdapterType(),
-                                                    getLanguateTagSet("TimeZoneNames"));
+                                                    getLanguageTagSet("TimeZoneNames"));
             synchronized (this) {
                 if (timeZoneNameProvider == null) {
                     timeZoneNameProvider = provider;
@@ -253,8 +253,8 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter {
     public CalendarDataProvider getCalendarDataProvider() {
         if (calendarDataProvider == null) {
             Set<String> set = new HashSet<>();
-            set.addAll(getLanguateTagSet("FormatData"));
-            set.addAll(getLanguateTagSet("CalendarData"));
+            set.addAll(getLanguageTagSet("FormatData"));
+            set.addAll(getLanguageTagSet("CalendarData"));
             CalendarDataProvider provider = new CalendarDataProviderImpl(getAdapterType(),
                                                                          set);
             synchronized (this) {
@@ -302,7 +302,7 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter {
         return AvailableJRELocales.localeList.clone();
     }
 
-    public Set<String> getLanguateTagSet(String category) {
+    public Set<String> getLanguageTagSet(String category) {
         Set<String> tagset = langtagSets.get(category);
         if (tagset == null) {
             tagset = createLanguageTagSet(category);
@@ -328,6 +328,10 @@ public class JRELocaleProviderAdapter extends LocaleProviderAdapter {
             }
             tagset.add(token);
         }
+
+        // ensure en-US is there (mandated by the spec, e.g. Collator.getAvailableLocales())
+        tagset.add("en-US");
+
         return tagset;
     }
 
diff --git a/jdk/src/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java b/jdk/src/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java
index a0dbb7e50cb..7db4560f81c 100644
--- a/jdk/src/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java
+++ b/jdk/src/share/classes/sun/util/locale/provider/LocaleProviderAdapter.java
@@ -59,7 +59,8 @@ public abstract class LocaleProviderAdapter {
         JRE("sun.util.resources", "sun.text.resources"),
         CLDR("sun.util.resources.cldr", "sun.text.resources.cldr"),
         SPI,
-        HOST;
+        HOST,
+        FALLBACK("sun.util.resources", "sun.text.resources");
 
         private final String UTIL_RESOURCES_PACKAGE;
         private final String TEXT_RESOURCES_PACKAGE;
@@ -111,41 +112,49 @@ public abstract class LocaleProviderAdapter {
      */
     private static LocaleProviderAdapter hostLocaleProviderAdapter = null;
 
+    /**
+     * FALLBACK Locale Data Adapter instance. It's basically the same with JRE, but only kicks
+     * in for the root locale.
+     */
+    private static LocaleProviderAdapter fallbackLocaleProviderAdapter = null;
+
     static {
         String order = AccessController.doPrivileged(
                            new sun.security.action.GetPropertyAction("java.locale.providers"));
-                    // Override adapterPreference with the properties one
-                    if (order != null && order.length() != 0) {
-                        String[] types = order.split(",");
-                        List<Type> typeList = new ArrayList<>();
-                        for (String type : types) {
-                            try {
-                            Type aType = Type.valueOf(type.trim().toUpperCase(Locale.ROOT));
+        // Override adapterPreference with the properties one
+        if (order != null && order.length() != 0) {
+            String[] types = order.split(",");
+            List<Type> typeList = new ArrayList<>();
+            for (String type : types) {
+                try {
+                    Type aType = Type.valueOf(type.trim().toUpperCase(Locale.ROOT));
 
-                                // load adapter if necessary
-                                switch (aType) {
-                                case CLDR:
-                        cldrLocaleProviderAdapter = new CLDRLocaleProviderAdapter();
-                                    break;
-                                case HOST:
-                        hostLocaleProviderAdapter = new HostLocaleProviderAdapter();
-                                    break;
-                                }
-                                typeList.add(aType);
-                } catch (// could be caused by the user specifying wrong
-                                     // provider name or format in the system property
-                                     IllegalArgumentException |
-                                     UnsupportedOperationException e) {
-                                LocaleServiceProviderPool.config(LocaleProviderAdapter.class, e.toString());
-                            }
-                        }
-
-                        if (!typeList.contains(Type.JRE)) {
-                            // Append JRE as the last resort.
-                            typeList.add(Type.JRE);
-                        }
-                        adapterPreference = typeList.toArray(new Type[0]);
+                    // load adapter if necessary
+                    switch (aType) {
+                        case CLDR:
+                            cldrLocaleProviderAdapter = new CLDRLocaleProviderAdapter();
+                            break;
+                        case HOST:
+                            hostLocaleProviderAdapter = new HostLocaleProviderAdapter();
+                            break;
                     }
+                    typeList.add(aType);
+                } catch (IllegalArgumentException | UnsupportedOperationException e) {
+                    // could be caused by the user specifying wrong
+                    // provider name or format in the system property
+                    LocaleServiceProviderPool.config(LocaleProviderAdapter.class, e.toString());
+                }
+            }
+
+            if (!typeList.isEmpty()) {
+                if (!typeList.contains(Type.JRE)) {
+                    // Append FALLBACK as the last resort.
+                    fallbackLocaleProviderAdapter = new FallbackLocaleProviderAdapter();
+                    typeList.add(Type.FALLBACK);
+                }
+                adapterPreference = typeList.toArray(new Type[0]);
+            }
+        }
     }
 
 
@@ -162,6 +171,8 @@ public abstract class LocaleProviderAdapter {
             return spiLocaleProviderAdapter;
         case HOST:
             return hostLocaleProviderAdapter;
+        case FALLBACK:
+            return fallbackLocaleProviderAdapter;
         default:
             throw new InternalError("unknown locale data adapter type");
         }
@@ -173,7 +184,7 @@ public abstract class LocaleProviderAdapter {
 
     public static LocaleProviderAdapter getResourceBundleBased() {
         for (Type type : getAdapterPreference()) {
-            if (type == Type.JRE || type == Type.CLDR) {
+            if (type == Type.JRE || type == Type.CLDR || type == Type.FALLBACK) {
                 return forType(type);
             }
         }
@@ -218,8 +229,8 @@ public abstract class LocaleProviderAdapter {
             }
         }
 
-        // returns the adapter for JRE as the last resort
-        return jreLocaleProviderAdapter;
+        // returns the adapter for FALLBACK as the last resort
+        return fallbackLocaleProviderAdapter;
     }
 
     private static LocaleProviderAdapter findAdapter(Class<? extends LocaleServiceProvider> providerClass,
@@ -238,18 +249,24 @@ public abstract class LocaleProviderAdapter {
 
     /**
      * A utility method for implementing the default LocaleServiceProvider.isSupportedLocale
-     * for the JRE and CLDR adapters.
+     * for the JRE, CLDR, and FALLBACK adapters.
      */
     static boolean isSupportedLocale(Locale locale, LocaleProviderAdapter.Type type, Set<String> langtags) {
-        assert type == Type.JRE || type == Type.CLDR;
-        if (locale == Locale.ROOT) {
+        assert type == Type.JRE || type == Type.CLDR || type == Type.FALLBACK;
+        if (Locale.ROOT.equals(locale)) {
             return true;
         }
+
+        if (type == Type.FALLBACK) {
+            // no other locales except ROOT are supported for FALLBACK
+            return false;
+        }
+
         locale = locale.stripExtensions();
         if (langtags.contains(locale.toLanguageTag())) {
             return true;
         }
-        if (type == LocaleProviderAdapter.Type.JRE) {
+        if (type == Type.JRE) {
             String oldname = locale.toString().replace('_', '-');
             return langtags.contains(oldname);
         }
diff --git a/jdk/src/share/classes/sun/util/spi/XmlPropertiesProvider.java b/jdk/src/share/classes/sun/util/spi/XmlPropertiesProvider.java
new file mode 100644
index 00000000000..42194daba29
--- /dev/null
+++ b/jdk/src/share/classes/sun/util/spi/XmlPropertiesProvider.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package sun.util.spi;
+
+import java.util.Properties;
+import java.util.InvalidPropertiesFormatException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.IOException;
+
+/**
+ * Service-provider class for loading and storing {@link Properites} in XML
+ * format.
+ *
+ * @see Properties#loadFromXML
+ * @see Properties#storeToXML
+ */
+
+public abstract class XmlPropertiesProvider {
+
+    /**
+     * Initializes a new instance of this class.
+     */
+    protected XmlPropertiesProvider() {
+        // do nothing for now
+    }
+
+    /**
+     * Loads all of the properties represented by the XML document on the
+     * specified input stream into a properties table.
+     *
+     * @param props the properties table to populate
+     * @param in the input stream from which to read the XML document
+     * @throws IOException if reading from the specified input stream fails
+     * @throws InvalidPropertiesFormatException Data on input stream does not
+     *         constitute a valid XML document with the mandated document type.
+     *
+     * @see Properties#loadFromXML
+     */
+    public abstract void load(Properties props, InputStream in)
+        throws IOException, InvalidPropertiesFormatException;
+
+    /**
+     * Emits an XML document representing all of the properties in a given
+     * table.
+     *
+     * @param props the properies to store
+     * @param out the output stream on which to emit the XML document.
+     * @param comment  a description of the property list, can be @{code null}
+     * @param encoding the name of a supported character encoding
+     *
+     * @throws IOException if writing to the specified output stream fails
+     * @throws NullPointerException if {@code out} is null.
+     * @throws ClassCastException  if this {@code Properties} object
+     *         contains any keys or values that are not
+     *         {@code Strings}.
+     *
+     * @see Properties#storeToXML
+     */
+    public abstract void store(Properties props, OutputStream out,
+                               String comment, String encoding)
+        throws IOException;
+}
diff --git a/jdk/src/share/classes/sun/util/xml/META-INF/services/sun.util.spi.XmlPropertiesProvider b/jdk/src/share/classes/sun/util/xml/META-INF/services/sun.util.spi.XmlPropertiesProvider
new file mode 100644
index 00000000000..28693bbcd56
--- /dev/null
+++ b/jdk/src/share/classes/sun/util/xml/META-INF/services/sun.util.spi.XmlPropertiesProvider
@@ -0,0 +1 @@
+sun.util.xml.PlatformXmlPropertiesProvider
diff --git a/jdk/src/share/classes/sun/util/xml/XMLUtils.java b/jdk/src/share/classes/sun/util/xml/PlatformXmlPropertiesProvider.java
similarity index 93%
rename from jdk/src/share/classes/sun/util/xml/XMLUtils.java
rename to jdk/src/share/classes/sun/util/xml/PlatformXmlPropertiesProvider.java
index 07677334db8..f4e4010b282 100644
--- a/jdk/src/share/classes/sun/util/xml/XMLUtils.java
+++ b/jdk/src/share/classes/sun/util/xml/PlatformXmlPropertiesProvider.java
@@ -28,22 +28,22 @@ package sun.util.xml;
 import java.io.*;
 import java.util.*;
 import org.xml.sax.*;
-import org.xml.sax.helpers.*;
 import org.w3c.dom.*;
 import javax.xml.parsers.*;
 import javax.xml.transform.*;
 import javax.xml.transform.dom.*;
 import javax.xml.transform.stream.*;
 
+import sun.util.spi.XmlPropertiesProvider;
+
 /**
- * A class used to aid in Properties load and save in XML. Keeping this
- * code outside of Properties helps reduce the number of classes loaded
- * when Properties is loaded.
+ * A {@code XmlPropertiesProvider} implementation that uses the JAXP API
+ * for parsing.
  *
  * @author  Michael McCloskey
  * @since   1.3
  */
-public class XMLUtils {
+public class PlatformXmlPropertiesProvider extends XmlPropertiesProvider {
 
     // XML loading and saving methods for Properties
 
@@ -67,7 +67,8 @@ public class XMLUtils {
      */
     private static final String EXTERNAL_XML_VERSION = "1.0";
 
-    public static void load(Properties props, InputStream in)
+    @Override
+    public void load(Properties props, InputStream in)
         throws IOException, InvalidPropertiesFormatException
     {
         Document doc = null;
@@ -121,8 +122,9 @@ public class XMLUtils {
         }
     }
 
-    public static void save(Properties props, OutputStream os, String comment,
-                     String encoding)
+    @Override
+    public void store(Properties props, OutputStream os, String comment,
+                      String encoding)
         throws IOException
     {
         DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
@@ -172,9 +174,7 @@ public class XMLUtils {
         try {
             t.transform(doms, sr);
         } catch (TransformerException te) {
-            IOException ioe = new IOException();
-            ioe.initCause(te);
-            throw ioe;
+            throw new IOException(te);
         }
     }
 
diff --git a/jdk/src/solaris/classes/sun/java2d/xr/XRDrawImage.java b/jdk/src/solaris/classes/sun/java2d/xr/XRDrawImage.java
index 15f69f10523..149edb79d06 100644
--- a/jdk/src/solaris/classes/sun/java2d/xr/XRDrawImage.java
+++ b/jdk/src/solaris/classes/sun/java2d/xr/XRDrawImage.java
@@ -27,6 +27,7 @@ package sun.java2d.xr;
 
 import java.awt.*;
 import java.awt.geom.*;
+import java.awt.image.*;
 
 import sun.java2d.*;
 import sun.java2d.loops.*;
@@ -45,8 +46,8 @@ public class XRDrawImage extends DrawImage {
         SurfaceData srcData = dstData.getSourceSurfaceData(img,
                 SunGraphics2D.TRANSFORM_GENERIC, sg.imageComp, bgColor);
 
-        if (srcData != null && !isBgOperation(srcData, bgColor))  { // TODO: Do we bail out on bgBlits?
-        //      && srcData instanceof XRSurfaceData) {
+        if (srcData != null && !isBgOperation(srcData, bgColor)
+                && interpType <= AffineTransformOp.TYPE_BILINEAR) {
             SurfaceType srcType = srcData.getSurfaceType();
             SurfaceType dstType = dstData.getSurfaceType();
 
diff --git a/jdk/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java b/jdk/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java
index de2c3b05235..be03cc70900 100644
--- a/jdk/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java
+++ b/jdk/src/solaris/classes/sun/nio/ch/DevPollArrayWrapper.java
@@ -68,7 +68,7 @@ class DevPollArrayWrapper {
     static final short REVENT_OFFSET = 6;
 
     // Special value to indicate that an update should be ignored
-    static final byte  CANCELLED     = (byte)-1;
+    static final byte  IGNORE        = (byte)-1;
 
     // Maximum number of open file descriptors
     static final int   OPEN_MAX      = IOUtil.fdLimit();
@@ -192,15 +192,15 @@ class DevPollArrayWrapper {
 
             // events are stored as bytes for efficiency reasons
             byte b = (byte)mask;
-            assert (b == mask) && (b != CANCELLED);
+            assert (b == mask) && (b != IGNORE);
             setUpdateEvents(fd, b);
         }
     }
 
     void release(int fd) {
         synchronized (updateLock) {
-            // cancel any pending update for this file descriptor
-            setUpdateEvents(fd, CANCELLED);
+            // ignore any pending update for this file descriptor
+            setUpdateEvents(fd, IGNORE);
 
             // remove from /dev/poll
             if (registered.get(fd)) {
@@ -236,32 +236,40 @@ class DevPollArrayWrapper {
             while (j < updateCount) {
                 int fd = updateDescriptors[j];
                 short events = getUpdateEvents(fd);
-                boolean isRegistered = registered.get(fd);
+                boolean wasRegistered = registered.get(fd);
 
                 // events = 0 => POLLREMOVE or do-nothing
-                if (events != CANCELLED) {
+                if (events != IGNORE) {
                     if (events == 0) {
-                        if (isRegistered) {
+                        if (wasRegistered) {
                             events = POLLREMOVE;
                             registered.clear(fd);
                         } else {
-                            events = CANCELLED;
+                            events = IGNORE;
                         }
                     } else {
-                        if (!isRegistered) {
+                        if (!wasRegistered) {
                             registered.set(fd);
                         }
                     }
                 }
 
                 // populate pollfd array with updated event
-                if (events != CANCELLED) {
+                if (events != IGNORE) {
+                    // insert POLLREMOVE if changing events
+                    if (wasRegistered && events != POLLREMOVE) {
+                        putPollFD(pollArray, index, fd, POLLREMOVE);
+                        index++;
+                    }
                     putPollFD(pollArray, index, fd, events);
                     index++;
-                    if (index >= NUM_POLLFDS) {
+                    if (index >= (NUM_POLLFDS-1)) {
                         registerMultiple(wfd, pollArray.address(), index);
                         index = 0;
                     }
+
+                    // events for this fd now up to date
+                    setUpdateEvents(fd, IGNORE);
                 }
                 j++;
             }
diff --git a/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java b/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java
index 0571227d95c..3f0bcb9976d 100644
--- a/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java
+++ b/jdk/src/solaris/classes/sun/nio/fs/LinuxFileStore.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -145,6 +145,9 @@ class LinuxFileStore
             }
             return xattrEnabled;
         }
+        // POSIX attributes not supported on FAT
+        if (type == PosixFileAttributeView.class && entry().fstype().equals("vfat"))
+            return false;
         return super.supportsFileAttributeView(type);
     }
 
diff --git a/jdk/src/solaris/native/java/net/Inet4AddressImpl.c b/jdk/src/solaris/native/java/net/Inet4AddressImpl.c
index 84f739ed50e..58798c7f827 100644
--- a/jdk/src/solaris/native/java/net/Inet4AddressImpl.c
+++ b/jdk/src/solaris/native/java/net/Inet4AddressImpl.c
@@ -647,9 +647,10 @@ ping4(JNIEnv *env, jint fd, struct sockaddr_in* him, jint timeout,
 #ifdef __linux__
         if (errno != EINVAL && errno != EHOSTUNREACH)
           /*
-           * On some Linuxes, when bound to the loopback interface, sendto
-           * will fail and errno will be set to EINVAL or EHOSTUNREACH.
-           * When that happens, don't throw an exception, just return false.
+           * On some Linux versions, when a socket is bound to the loopback
+           * interface, sendto will fail and errno will be set to
+           * EINVAL or EHOSTUNREACH. When that happens, don't throw an
+           * exception, just return false.
            */
 #endif /*__linux__ */
           NET_ThrowNew(env, errno, "Can't send ICMP packet");
@@ -813,9 +814,10 @@ Java_java_net_Inet4AddressImpl_isReachable0(JNIEnv *env, jobject this,
         case EINVAL:
         case EHOSTUNREACH:
           /*
-           * On some Linuxes, when bound to the loopback interface, connect
-           * will fail and errno will be set to EINVAL or EHOSTUNREACH.
-           * When that happens, don't throw an exception, just return false.
+           * On some Linux versions, when a socket is bound to the loopback
+           * interface, connect will fail and errno will be set to EINVAL
+           * or EHOSTUNREACH.  When that happens, don't throw an exception,
+           * just return false.
            */
 #endif /* __linux__ */
           close(fd);
diff --git a/jdk/src/solaris/native/java/net/Inet6AddressImpl.c b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c
index 17be097e9e3..6b7e233d940 100644
--- a/jdk/src/solaris/native/java/net/Inet6AddressImpl.c
+++ b/jdk/src/solaris/native/java/net/Inet6AddressImpl.c
@@ -336,13 +336,7 @@ Java_java_net_Inet6AddressImpl_lookupAllHostAddr(JNIEnv *env, jobject this,
                 }
                 (*env)->SetByteArrayRegion(env, ipaddress, 0, 16,
                                            (jbyte *)&(((struct sockaddr_in6*)iterator->ai_addr)->sin6_addr));
-#ifdef __linux__
-                if (!kernelIsV22()) {
-                    scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id;
-                }
-#else
                 scope = ((struct sockaddr_in6*)iterator->ai_addr)->sin6_scope_id;
-#endif
                 if (scope != 0) { /* zero is default value, no need to set */
                     (*env)->SetIntField(env, iaObj, ia6_scopeidID, scope);
                     (*env)->SetBooleanField(env, iaObj, ia6_scopeidsetID, JNI_TRUE);
@@ -507,8 +501,9 @@ ping6(JNIEnv *env, jint fd, struct sockaddr_in6* him, jint timeout,
 #ifdef __linux__
         if (errno != EINVAL && errno != EHOSTUNREACH)
           /*
-           * On some Linuxes, when bound to the loopback interface, sendto
-           * will fail and errno will be set to EINVAL or EHOSTUNREACH.
+           * On some Linux versions, when a socket is  bound to the
+           * loopback interface, sendto will fail and errno will be
+           * set to EINVAL or EHOSTUNREACH.
            * When that happens, don't throw an exception, just return false.
            */
 #endif /*__linux__ */
@@ -623,7 +618,7 @@ Java_java_net_Inet6AddressImpl_isReachable0(JNIEnv *env, jobject this,
      * If we can create a RAW socket, then when can use the ICMP ECHO_REQUEST
      * otherwise we'll try a tcp socket to the Echo port (7).
      * Note that this is empiric, and not connecting could mean it's blocked
-     * or the echo servioe has been disabled.
+     * or the echo service has been disabled.
      */
 
     fd = JVM_Socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6);
@@ -680,9 +675,10 @@ Java_java_net_Inet6AddressImpl_isReachable0(JNIEnv *env, jobject this,
         case EINVAL:
         case EHOSTUNREACH:
           /*
-           * On some Linuxes, when bound to the loopback interface, connect
-           * will fail and errno will be set to EINVAL or EHOSTUNREACH.
-           * When that happens, don't throw an exception, just return false.
+           * On some Linux versions, when  a socket is bound to the
+           * loopback interface, connect will fail and errno will
+           * be set to EINVAL or EHOSTUNREACH.  When that happens,
+           * don't throw an exception, just return false.
            */
 #endif /* __linux__ */
           close(fd);
diff --git a/jdk/src/solaris/native/java/net/NetworkInterface.c b/jdk/src/solaris/native/java/net/NetworkInterface.c
index 9ebea2bf517..1a9419e0d40 100644
--- a/jdk/src/solaris/native/java/net/NetworkInterface.c
+++ b/jdk/src/solaris/native/java/net/NetworkInterface.c
@@ -769,14 +769,14 @@ static netif *enumInterfaces(JNIEnv *env) {
         return NULL;
     }
 
-    /* return partial list if exception occure in the middle of process ???*/
+    /* return partial list if an exception occurs in the middle of process ???*/
 
     /*
      * If IPv6 is available then enumerate IPv6 addresses.
      */
 #ifdef AF_INET6
 
-        /* User can disable ipv6 expicitly by -Djava.net.preferIPv4Stack=true,
+        /* User can disable ipv6 explicitly by -Djava.net.preferIPv4Stack=true,
          * so we have to call ipv6_available()
          */
         if (ipv6_available()) {
@@ -887,7 +887,7 @@ netif *addif(JNIEnv *env, int sock, const char * if_name, netif *ifs, struct soc
     addrP->next = 0;
     if (family == AF_INET) {
       /*
-       * Deal with brodcast addr & subnet mask
+       * Deal with broadcast addr & subnet mask
        */
        struct sockaddr * brdcast_to = (struct sockaddr *) ((char *) addrP + sizeof(netaddr) + addr_size);
        addrP->brdcast = getBroadcast(env, sock, name,  brdcast_to );
@@ -898,7 +898,7 @@ netif *addif(JNIEnv *env, int sock, const char * if_name, netif *ifs, struct soc
      }
 
     /**
-     * Deal with virtual interface with colon notaion e.g. eth0:1
+     * Deal with virtual interface with colon notation e.g. eth0:1
      */
     name_colonP = strchr(name, ':');
     if (name_colonP != NULL) {
@@ -1327,13 +1327,13 @@ static int openSocketWithFallback(JNIEnv *env, const char *ifname){
    }
 
      /**
-      * Solaris requires that we have IPv6 socket to query an
-      * interface without IPv4 address - check it here
-      * POSIX 1 require the kernell to return ENOTTY if the call is
-      * unappropriate for device e.g. NETMASK for device having IPv6
-      * only address but not all devices follows the standart so
-      * fallback on any error.  It's not an ecology friendly but more
-      * reliable.
+      * Solaris requires that we have an IPv6 socket to query an
+      * interface without an IPv4 address - check it here.
+      * POSIX 1 require the kernel to return ENOTTY if the call is
+      * inappropriate for a device e.g. the NETMASK for a device having IPv6
+      * only address but not all devices follow the standard so
+      * fall back on any error. It's not an ecologically friendly gesture
+      * but more reliable.
       */
 
     if (! alreadyV6 ){
@@ -1359,7 +1359,7 @@ static int openSocketWithFallback(JNIEnv *env, const char *ifname){
 
 /*
  * Enumerates and returns all IPv4 interfaces
- * (linux verison)
+ * (linux verision)
  */
 
 static netif *enumIPv4Interfaces(JNIEnv *env, int sock, netif *ifs) {
diff --git a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
index 19316fd4663..40b375de56b 100644
--- a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
+++ b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c
@@ -73,16 +73,6 @@ static jfieldID pdsi_connected;
 static jfieldID pdsi_connectedAddress;
 static jfieldID pdsi_connectedPort;
 
-#ifdef __linux__
-static jboolean isOldKernel;
-#endif
-
-#if defined(__linux__) && defined(AF_INET6)
-static jfieldID pdsi_multicastInterfaceID;
-static jfieldID pdsi_loopbackID;
-static jfieldID pdsi_ttlID;
-#endif
-
 extern void setDefaultScopeID(JNIEnv *env, struct sockaddr *him);
 extern int getDefaultScopeID(JNIEnv *env);
 
@@ -174,41 +164,6 @@ Java_java_net_PlainDatagramSocketImpl_init(JNIEnv *env, jclass cls) {
     Java_java_net_Inet6Address_init(env, 0);
     Java_java_net_NetworkInterface_init(env, 0);
 
-#ifdef __linux__
-    /*
-     * We need to determine if this is a 2.2 kernel.
-     */
-    if (uname(&sysinfo) == 0) {
-        sysinfo.release[3] = '\0';
-        isOldKernel = (strcmp(sysinfo.release, "2.2") == 0);
-    } else {
-        /*
-         * uname failed - move to plan B and examine /proc/version
-         * If this fails assume that /proc has changed and that
-         * this must be new /proc format and hence new kernel.
-         */
-        FILE *fP;
-        isOldKernel = JNI_FALSE;
-        if ((fP = fopen("/proc/version", "r")) != NULL) {
-            char ver[25];
-            if (fgets(ver, sizeof(ver), fP) != NULL) {
-                isOldKernel = (strstr(ver, "2.2.") != NULL);
-            }
-            fclose(fP);
-        }
-    }
-
-#ifdef AF_INET6
-    pdsi_multicastInterfaceID = (*env)->GetFieldID(env, cls, "multicastInterface", "I");
-    CHECK_NULL(pdsi_multicastInterfaceID);
-    pdsi_loopbackID = (*env)->GetFieldID(env, cls, "loopbackMode", "Z");
-    CHECK_NULL(pdsi_loopbackID);
-    pdsi_ttlID = (*env)->GetFieldID(env, cls, "ttl", "I");
-    CHECK_NULL(pdsi_ttlID);
-#endif
-
-#endif
-
 }
 
 /*
@@ -257,7 +212,7 @@ Java_java_net_PlainDatagramSocketImpl_bind0(JNIEnv *env, jobject this,
         return;
     }
 
-    /* intialize the local port */
+    /* initialize the local port */
     if (localport == 0) {
         /* Now that we're a connected socket, let's extract the port number
          * that the system chose for us and store it in the Socket object.
@@ -308,20 +263,14 @@ Java_java_net_PlainDatagramSocketImpl_connect0(JNIEnv *env, jobject this,
       return;
     }
 
-#ifdef __linux__
-    if (isOldKernel) {
-        int t = 0;
-        setsockopt(fd, SOL_SOCKET, SO_BSDCOMPAT, (char*) &t, sizeof(int));
-    } else
-#endif
     setDefaultScopeID(env, (struct sockaddr *)&rmtaddr);
-    {
-        if (JVM_Connect(fd, (struct sockaddr *)&rmtaddr, len) == -1) {
-            NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException",
-                            "Connect failed");
-            return;
-        }
+
+    if (JVM_Connect(fd, (struct sockaddr *)&rmtaddr, len) == -1) {
+        NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException",
+                        "Connect failed");
+        return;
     }
+
 }
 
 /*
@@ -347,12 +296,6 @@ Java_java_net_PlainDatagramSocketImpl_disconnect0(JNIEnv *env, jobject this, jin
     fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
 
 #if defined(__linux__) || defined(_ALLBSD_SOURCE)
-#ifdef __linux__
-    if (isOldKernel) {
-        int t = 1;
-        setsockopt(fd, SOL_SOCKET, SO_BSDCOMPAT, (char*) &t, sizeof(int));
-    } else {
-#endif /* __linux__ */
         memset(&addr, 0, sizeof(addr));
 #ifdef AF_INET6
         if (ipv6_available()) {
@@ -369,14 +312,10 @@ Java_java_net_PlainDatagramSocketImpl_disconnect0(JNIEnv *env, jobject this, jin
         JVM_Connect(fd, (struct sockaddr *)&addr, len);
 
 #ifdef __linux__
-        // After disconnecting a UDP socket, Linux kernel will set
-        // local port to zero if the port number comes from implicit
-        // bind. Successive send/recv on the same socket will fail.
-        // So bind again with former port number here.
         int localPort = 0;
-        if (JVM_GetSockName(fd, (struct sockaddr *)&addr, &len) == -1) {
+        if (JVM_GetSockName(fd, (struct sockaddr *)&addr, &len) == -1)
             return;
-        }
+
         localPort = NET_GetPortFromSockaddr((struct sockaddr *)&addr);
         if (localPort == 0) {
             localPort = (*env)->GetIntField(env, this, pdsi_localPortID);
@@ -388,9 +327,10 @@ Java_java_net_PlainDatagramSocketImpl_disconnect0(JNIEnv *env, jobject this, jin
             {
                 ((struct sockaddr_in*)&addr)->sin_port = htons(localPort);
             }
+
             NET_Bind(fd, (struct sockaddr *)&addr, len);
         }
-    }
+
 #endif
 #else
     JVM_Connect(fd, 0, 0);
@@ -448,11 +388,7 @@ Java_java_net_PlainDatagramSocketImpl_send(JNIEnv *env, jobject this,
     packetBufferOffset = (*env)->GetIntField(env, packet, dp_offsetID);
     packetBufferLen = (*env)->GetIntField(env, packet, dp_lengthID);
 
-#ifdef __linux__
-    if (connected && !isOldKernel) {
-#else
     if (connected) {
-#endif
         /* arg to NET_Sendto () null in this case */
         len = 0;
         rmtaddrP = 0;
@@ -466,14 +402,14 @@ Java_java_net_PlainDatagramSocketImpl_send(JNIEnv *env, jobject this,
 
     if (packetBufferLen > MAX_BUFFER_LEN) {
         /* When JNI-ifying the JDK's IO routines, we turned
-         * read's and write's of byte arrays of size greater
+         * reads and writes of byte arrays of size greater
          * than 2048 bytes into several operations of size 2048.
          * This saves a malloc()/memcpy()/free() for big
          * buffers.  This is OK for file IO and TCP, but that
          * strategy violates the semantics of a datagram protocol.
          * (one big send) != (several smaller sends).  So here
-         * we *must* alloc the buffer.  Note it needn't be bigger
-         * than 65,536 (0xFFFF) the max size of an IP packet.
+         * we *must* allocate the buffer.  Note it needn't be bigger
+         * than 65,536 (0xFFFF), the max size of an IP packet.
          * Anything bigger should be truncated anyway.
          *
          * We may want to use a smarter allocation scheme at some
@@ -621,7 +557,7 @@ Java_java_net_PlainDatagramSocketImpl_peek(JNIEnv *env, jobject this,
 #else
     family = AF_INET;
 #endif
-    if (family == AF_INET) { /* this api can't handle IPV6 addresses */
+    if (family == AF_INET) { /* this API can't handle IPV6 addresses */
         int address = (*env)->GetIntField(env, iaObj, ia_addressID);
         (*env)->SetIntField(env, addressObj, ia_addressID, address);
     }
@@ -695,14 +631,14 @@ Java_java_net_PlainDatagramSocketImpl_peekData(JNIEnv *env, jobject this,
     if (packetBufferLen > MAX_BUFFER_LEN) {
 
         /* When JNI-ifying the JDK's IO routines, we turned
-         * read's and write's of byte arrays of size greater
+         * reads and writes of byte arrays of size greater
          * than 2048 bytes into several operations of size 2048.
          * This saves a malloc()/memcpy()/free() for big
          * buffers.  This is OK for file IO and TCP, but that
          * strategy violates the semantics of a datagram protocol.
          * (one big send) != (several smaller sends).  So here
-         * we *must* alloc the buffer.  Note it needn't be bigger
-         * than 65,536 (0xFFFF) the max size of an IP packet.
+         * we *must* allocate the buffer.  Note it needn't be bigger
+         * than 65,536 (0xFFFF), the max size of an IP packet.
          * anything bigger is truncated anyway.
          *
          * We may want to use a smarter allocation scheme at some
@@ -855,14 +791,14 @@ Java_java_net_PlainDatagramSocketImpl_receive0(JNIEnv *env, jobject this,
     if (packetBufferLen > MAX_BUFFER_LEN) {
 
         /* When JNI-ifying the JDK's IO routines, we turned
-         * read's and write's of byte arrays of size greater
+         * reads and writes of byte arrays of size greater
          * than 2048 bytes into several operations of size 2048.
          * This saves a malloc()/memcpy()/free() for big
          * buffers.  This is OK for file IO and TCP, but that
          * strategy violates the semantics of a datagram protocol.
          * (one big send) != (several smaller sends).  So here
-         * we *must* alloc the buffer.  Note it needn't be bigger
-         * than 65,536 (0xFFFF) the max size of an IP packet.
+         * we *must* allocate the buffer.  Note it needn't be bigger
+         * than 65,536 (0xFFFF) the max size of an IP packet,
          * anything bigger is truncated anyway.
          *
          * We may want to use a smarter allocation scheme at some
@@ -883,24 +819,6 @@ Java_java_net_PlainDatagramSocketImpl_receive0(JNIEnv *env, jobject this,
         fullPacket = &(BUF[0]);
     }
 
-#ifdef __linux__
-    /*
-     * On Linux with the 2.2 kernel we simulate connected datagrams by
-     * discarding packets
-     */
-    if (isOldKernel) {
-        connected = (*env)->GetBooleanField(env, this, pdsi_connected);
-        if (connected) {
-            connectedAddress = (*env)->GetObjectField(env, this, pdsi_connectedAddress);
-            connectedPort = (*env)->GetIntField(env, this, pdsi_connectedPort);
-
-            if (timeout) {
-                prevTime = JVM_CurrentTimeMillis(env, 0);
-            }
-        }
-    }
-#endif
-
     do {
         retry = JNI_FALSE;
 
@@ -933,14 +851,6 @@ Java_java_net_PlainDatagramSocketImpl_receive0(JNIEnv *env, jobject this,
             }
         }
 
-        /*
-         * Security Note: For Linux 2.2 with connected datagrams ensure that
-         * you receive into the stack/heap allocated buffer - do not attempt
-         * to receive directly into DatagramPacket's byte array.
-         * (ie: if the virtual machine support pinning don't use
-         * GetByteArrayElements or a JNI critical section and receive
-         * directly into the byte array)
-         */
         len = SOCKADDR_LEN;
         n = NET_RecvFrom(fd, fullPacket, packetBufferLen, 0,
                          (struct sockaddr *)&remote_addr, &len);
@@ -970,47 +880,6 @@ Java_java_net_PlainDatagramSocketImpl_receive0(JNIEnv *env, jobject this,
             int port;
             jobject packetAddress;
 
-            /*
-             * If we are connected then we know that the datagram that we have
-             * received is from the address that we are connected too. However
-             * on Linux with 2.2 kernel we have to simulate this behaviour by
-             * discarding any datagrams that aren't from the connected address.
-             */
-#ifdef __linux__
-            if (isOldKernel && connected) {
-
-                if (NET_GetPortFromSockaddr((struct sockaddr *)&remote_addr) != connectedPort ||
-                    !NET_SockaddrEqualsInetAddress(env, (struct sockaddr *)&remote_addr, connectedAddress)) {
-
-                    /*
-                     * Discard the datagram as it's not from the connected
-                     * address
-                     */
-                    retry = JNI_TRUE;
-
-                    /*
-                     * Adjust timeout if necessary to ensure that we adhere to
-                     * timeout semantics.
-                     */
-                    if (timeout) {
-                        jlong newTime = JVM_CurrentTimeMillis(env, 0);
-                        timeout -= (newTime - prevTime);
-                        if (timeout <= 0) {
-                            JNU_ThrowByName(env, JNU_JAVANETPKG "SocketTimeoutException",
-                                    "Receive timed out");
-                            if (mallocedPacket) {
-                                free(fullPacket);
-                            }
-                            return;
-                        }
-                        prevTime = newTime;
-                    }
-
-                    continue;
-                }
-            }
-#endif
-
             /*
              * success - fill in received address...
              *
@@ -1112,27 +981,16 @@ Java_java_net_PlainDatagramSocketImpl_datagramSocketCreate(JNIEnv *env,
 
      setsockopt(fd, SOL_SOCKET, SO_BROADCAST, (char*) &t, sizeof(int));
 
-#ifdef __linux__
-    if (isOldKernel) {
-        setsockopt(fd, SOL_SOCKET, SO_BSDCOMPAT, (char*) &t, sizeof(int));
-    }
-
-#ifdef AF_INET6
+#if defined (__linux__) && defined (AF_INET6)
     /*
      * On Linux for IPv6 sockets we must set the hop limit
-     * to 1 to be compatible with default ttl of 1 for IPv4 sockets.
+     * to 1 to be compatible with default TTL of 1 for IPv4 sockets.
      */
     if (domain == AF_INET6) {
         int ttl = 1;
         setsockopt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, (char *)&ttl,
                    sizeof(ttl));
-
-        if (isOldKernel) {
-            (*env)->SetIntField(env, this, pdsi_ttlID, ttl);
-        }
     }
-#endif
-
 #endif /* __linux__ */
 
     (*env)->SetIntField(env, fdObj, IO_fd_fdID, fd);
@@ -1250,16 +1108,6 @@ static void mcast_set_if_by_if_v6(JNIEnv *env, jobject this, int fd, jobject val
         return;
     }
 
-#ifdef __linux__
-    /*
-     * Linux 2.2 kernel doesn't support IPV6_MULTICAST_IF socket
-     * option so record index for later retrival.
-     */
-    if (isOldKernel) {
-        (*env)->SetIntField(env, this, pdsi_multicastInterfaceID,
-                            (jint)index);
-    }
-#endif
 }
 #endif /* AF_INET6 */
 
@@ -1326,8 +1174,6 @@ static void mcast_set_if_by_addr_v6(JNIEnv *env, jobject this, int fd, jobject v
  *              InetAddress is bound
  *              Set outgoing multicast interface using
  *              IPPROTO_IPV6/IPV6_MULTICAST_IF
- *              On Linux 2.2 record interface index as can't
- *              query the multicast interface.
  *
  * SockOptions.IF_MULTICAST_IF2 :-
  *      value is a NetworkInterface
@@ -1338,8 +1184,6 @@ static void mcast_set_if_by_addr_v6(JNIEnv *env, jobject this, int fd, jobject v
  *      IPv6:   Obtain NetworkInterface.index
  *              Set outgoing multicast interface using
  *              IPPROTO_IPV6/IPV6_MULTICAST_IF
- *              On Linux 2.2 record interface index as can't
- *              query the multicast interface.
  *
  */
 static void setMulticastInterface(JNIEnv *env, jobject this, int fd,
@@ -1436,15 +1280,6 @@ static void mcast_set_loop_v6(JNIEnv *env, jobject this, int fd, jobject value)
         return;
     }
 
-#ifdef __linux__
-    /*
-     * Can't query IPV6_MULTICAST_LOOP on Linux 2.2 kernel so
-     * store it in impl so that we can simulate getsockopt.
-     */
-    if (isOldKernel) {
-        (*env)->SetBooleanField(env, this, pdsi_loopbackID, on);
-    }
-#endif
 }
 #endif  /* AF_INET6 */
 
@@ -1507,7 +1342,7 @@ Java_java_net_PlainDatagramSocketImpl_socketSetOption(JNIEnv *env,
     }
 
     /*
-     * Setting the multicast interface handled seperately
+     * Setting the multicast interface handled separately
      */
     if (opt == java_net_SocketOptions_IP_MULTICAST_IF ||
         opt == java_net_SocketOptions_IP_MULTICAST_IF2) {
@@ -1594,8 +1429,7 @@ Java_java_net_PlainDatagramSocketImpl_socketSetOption(JNIEnv *env,
  *              Create InetAddress
  *              IP_MULTICAST_IF returns struct ip_mreqn on 2.2
  *              kernel but struct in_addr on 2.4 kernel
- *      IPv6:   Query IPPROTO_IPV6 / IPV6_MULTICAST_IF or
- *              obtain from impl is Linux 2.2 kernel
+ *      IPv6:   Query IPPROTO_IPV6 / IPV6_MULTICAST_IF
  *              If index == 0 return InetAddress representing
  *              anyLocalAddress.
  *              If index > 0 query NetworkInterface by index
@@ -1641,14 +1475,6 @@ jobject getMulticastInterface(JNIEnv *env, jobject this, int fd, jint opt) {
         struct in_addr *inP = &in;
         int len = sizeof(struct in_addr);
 
-#ifdef __linux__
-        struct ip_mreqn mreqn;
-        if (isOldKernel) {
-            inP = (struct in_addr *)&mreqn;
-            len = sizeof(struct ip_mreqn);
-        }
-#endif
-
         if (JVM_GetSockOpt(fd, IPPROTO_IP, IP_MULTICAST_IF,
                            (char *)inP, &len) < 0) {
             NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException",
@@ -1672,12 +1498,7 @@ jobject getMulticastInterface(JNIEnv *env, jobject this, int fd, jint opt) {
         addr = (*env)->NewObject(env, inet4_class, inet4_ctrID, 0);
         CHECK_NULL_RETURN(addr, NULL);
 
-#ifdef __linux__
-        (*env)->SetIntField(env, addr, inet4_addrID,
-                (isOldKernel ? ntohl(mreqn.imr_address.s_addr) : ntohl(in.s_addr)) );
-#else
         (*env)->SetIntField(env, addr, inet4_addrID, ntohl(in.s_addr));
-#endif
 
         /*
          * For IP_MULTICAST_IF return InetAddress
@@ -1746,22 +1567,11 @@ jobject getMulticastInterface(JNIEnv *env, jobject this, int fd, jint opt) {
         jobject addr;
         jobject ni;
 
-#ifdef __linux__
-        /*
-         * Linux 2.2 kernel doesn't support IPV6_MULTICAST_IF socke option
-         * so use cached index.
-         */
-        if (isOldKernel) {
-            index = (*env)->GetIntField(env, this, pdsi_multicastInterfaceID);
-        } else
-#endif
-        {
-            if (JVM_GetSockOpt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF,
-                               (char*)&index, &len) < 0) {
-                NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException",
-                               "Error getting socket option");
-                return NULL;
-            }
+        if (JVM_GetSockOpt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF,
+                           (char*)&index, &len) < 0) {
+            NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException",
+                           "Error getting socket option");
+            return NULL;
         }
 
         if (ni_class == NULL) {
@@ -1877,7 +1687,7 @@ Java_java_net_PlainDatagramSocketImpl_socketGetOption(JNIEnv *env, jobject this,
     }
 
     /*
-     * Handle IP_MULTICAST_IF seperately
+     * Handle IP_MULTICAST_IF separately
      */
     if (opt == java_net_SocketOptions_IP_MULTICAST_IF ||
         opt == java_net_SocketOptions_IP_MULTICAST_IF2) {
@@ -1916,18 +1726,6 @@ Java_java_net_PlainDatagramSocketImpl_socketGetOption(JNIEnv *env, jobject this,
         return NULL;
     }
 
-    /*
-     * IP_MULTICAST_LOOP socket option isn't available on Linux 2.2
-     * kernel with IPv6 so return value stored in impl.
-     */
-#if defined(AF_INET6) && defined(__linux__)
-    if (isOldKernel && opt == java_net_SocketOptions_IP_MULTICAST_LOOP &&
-        level == IPPROTO_IPV6) {
-        int mode = (int)(*env)->GetBooleanField(env, this, pdsi_loopbackID);
-        return createBoolean(env, mode);
-    }
-#endif
-
     if (opt == java_net_SocketOptions_IP_MULTICAST_LOOP &&
         level == IPPROTO_IP) {
         optlen = sizeof(optval.c);
@@ -1961,7 +1759,7 @@ Java_java_net_PlainDatagramSocketImpl_socketGetOption(JNIEnv *env, jobject this,
 
     }
 
-    /* should never rearch here */
+    /* should never reach here */
     return NULL;
 }
 
@@ -2025,15 +1823,12 @@ Java_java_net_PlainDatagramSocketImpl_setTimeToLive(JNIEnv *env, jobject this,
     } else {
         fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
     }
-    /* setsockopt to be correct ttl */
+    /* setsockopt to be correct TTL */
 #ifdef AF_INET6
 #ifdef __linux__
     setTTL(env, fd, ttl);
     if (ipv6_available()) {
         setHopLimit(env, fd, ttl);
-        if (isOldKernel) {
-            (*env)->SetIntField(env, this, pdsi_ttlID, ttl);
-        }
     }
 #else  /*  __linux__ not defined */
     if (ipv6_available()) {
@@ -2076,21 +1871,12 @@ Java_java_net_PlainDatagramSocketImpl_getTimeToLive(JNIEnv *env, jobject this) {
     } else {
         fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
     }
-    /* getsockopt of ttl */
+    /* getsockopt of TTL */
 #ifdef AF_INET6
     if (ipv6_available()) {
         int ttl = 0;
         int len = sizeof(ttl);
 
-#ifdef __linux__
-        /*
-         * Linux 2.2 kernel doesn't support IPV6_MULTICAST_HOPS socket option
-         */
-        if (isOldKernel) {
-            return (*env)->GetIntField(env, this, pdsi_ttlID);
-        }
-#endif
-
         if (JVM_GetSockOpt(fd, IPPROTO_IPV6, IPV6_MULTICAST_HOPS,
                                (char*)&ttl, &len) < 0) {
                 NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException",
@@ -2258,14 +2044,10 @@ static void mcast_join_leave(JNIEnv *env, jobject this,
                 int index;
                 int len = sizeof(index);
 
-                if (isOldKernel) {
-                    index = (*env)->GetIntField(env, this, pdsi_multicastInterfaceID);
-                } else {
-                    if (JVM_GetSockOpt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF,
-                                       (char*)&index, &len) < 0) {
-                        NET_ThrowCurrent(env, "getsockopt IPV6_MULTICAST_IF failed");
-                        return;
-                    }
+                if (JVM_GetSockOpt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF,
+                                   (char*)&index, &len) < 0) {
+                    NET_ThrowCurrent(env, "getsockopt IPV6_MULTICAST_IF failed");
+                    return;
                 }
 
                 mname.imr_multiaddr.s_addr = htonl((*env)->GetIntField(env, iaObj, ia_addressID));
@@ -2279,21 +2061,13 @@ static void mcast_join_leave(JNIEnv *env, jobject this,
                 struct in_addr *inP = &in;
                 socklen_t len = sizeof(struct in_addr);
 
-#ifdef __linux__
-                struct ip_mreqn mreqn;
-                if (isOldKernel) {
-                    inP = (struct in_addr *)&mreqn;
-                    len = sizeof(struct ip_mreqn);
-                }
-#endif
                 if (getsockopt(fd, IPPROTO_IP, IP_MULTICAST_IF, (char *)inP, &len) < 0) {
                     NET_ThrowCurrent(env, "getsockopt IP_MULTICAST_IF failed");
                     return;
                 }
 
 #ifdef __linux__
-                mname.imr_address.s_addr =
-                    (isOldKernel ? mreqn.imr_address.s_addr : in.s_addr);
+                mname.imr_address.s_addr = in.s_addr;
 
 #else
                 mname.imr_interface.s_addr = in.s_addr;
@@ -2314,10 +2088,10 @@ static void mcast_join_leave(JNIEnv *env, jobject this,
              * If IP_ADD_MEMBERSHIP returns ENOPROTOOPT on Linux and we've got
              * IPv6 enabled then it's possible that the kernel has been fixed
              * so we switch to IPV6_ADD_MEMBERSHIP socket option.
-             * As of 2.4.7 kernel IPV6_ADD_MEMERSHIP can't handle IPv4-mapped
-             * addresses so we have to use IP_ADD_MEMERSHIP for IPv4 multicast
+             * As of 2.4.7 kernel IPV6_ADD_MEMBERSHIP can't handle IPv4-mapped
+             * addresses so we have to use IP_ADD_MEMBERSHIP for IPv4 multicast
              * groups. However if the socket is an IPv6 socket then then setsockopt
-             * should reurn ENOPROTOOPT. We assume this will be fixed in Linux
+             * should return ENOPROTOOPT. We assume this will be fixed in Linux
              * at some stage.
              */
 #if defined(__linux__) && defined(AF_INET6)
@@ -2385,20 +2159,10 @@ static void mcast_join_leave(JNIEnv *env, jobject this,
             int index;
             int len = sizeof(index);
 
-#ifdef __linux__
-            /*
-             * 2.2 kernel doens't support IPV6_MULTICAST_IF socket option
-             */
-            if (isOldKernel) {
-                index = (*env)->GetIntField(env, this, pdsi_multicastInterfaceID);
-            } else
-#endif
-            {
-                if (JVM_GetSockOpt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF,
-                                 (char*)&index, &len) < 0) {
-                    NET_ThrowCurrent(env, "getsockopt IPV6_MULTICAST_IF failed");
-                    return;
-                }
+            if (JVM_GetSockOpt(fd, IPPROTO_IPV6, IPV6_MULTICAST_IF,
+                             (char*)&index, &len) < 0) {
+                NET_ThrowCurrent(env, "getsockopt IPV6_MULTICAST_IF failed");
+               return;
             }
 
 #ifdef __linux__
@@ -2408,7 +2172,7 @@ static void mcast_join_leave(JNIEnv *env, jobject this,
              * subsequent leave groups to fail as there is no match. Thus we
              * pick the interface if there is a matching route.
              */
-            if (index == 0 && !isOldKernel) {
+            if (index == 0) {
                 int rt_index = getDefaultIPv6Interface(&(mname6.ipv6mr_multiaddr));
                 if (rt_index > 0) {
                     index = rt_index;
diff --git a/jdk/src/solaris/native/java/net/PlainSocketImpl.c b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
index 82616f2a0f5..a284ab42d12 100644
--- a/jdk/src/solaris/native/java/net/PlainSocketImpl.c
+++ b/jdk/src/solaris/native/java/net/PlainSocketImpl.c
@@ -128,7 +128,7 @@ static int getFD(JNIEnv *env, jobject this) {
 
 /*
  * The initroto function is called whenever PlainSocketImpl is
- * loaded, to cache fieldIds for efficiency. This is called everytime
+ * loaded, to cache field IDs for efficiency. This is called every time
  * the Java class is loaded.
  *
  * Class:     java_net_PlainSocketImpl
@@ -589,7 +589,7 @@ Java_java_net_PlainSocketImpl_socketBind(JNIEnv *env, jobject this,
     /* set the address */
     (*env)->SetObjectField(env, this, psi_addressID, iaObj);
 
-    /* intialize the local port */
+    /* initialize the local port */
     if (localport == 0) {
         /* Now that we're a connected socket, let's extract the port number
          * that the system chose for us and store it in the Socket object.
@@ -909,7 +909,7 @@ Java_java_net_PlainSocketImpl_socketSetOption(JNIEnv *env, jobject this,
     }
 
     /*
-     * SO_TIMEOUT is a no-op on Solaris/Linux
+     * SO_TIMEOUT is a NOOP on Solaris/Linux
      */
     if (cmd == java_net_SocketOptions_SO_TIMEOUT) {
         return;
diff --git a/jdk/src/solaris/native/java/net/SocketInputStream.c b/jdk/src/solaris/native/java/net/SocketInputStream.c
index 1e115cea93f..6ae368e4939 100644
--- a/jdk/src/solaris/native/java/net/SocketInputStream.c
+++ b/jdk/src/solaris/native/java/net/SocketInputStream.c
@@ -67,14 +67,14 @@ Java_java_net_SocketInputStream_socketRead0(JNIEnv *env, jobject this,
     jint fd, nread;
 
     if (IS_NULL(fdObj)) {
-        /* should't this be a NullPointerException? -br */
+        /* shouldn't this be a NullPointerException? -br */
         JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
                         "Socket closed");
         return -1;
     } else {
         fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID);
         /* Bug 4086704 - If the Socket associated with this file descriptor
-         * was closed (sysCloseFD), the the file descriptor is set to -1.
+         * was closed (sysCloseFD), then the file descriptor is set to -1.
          */
         if (fd == -1) {
             JNU_ThrowByName(env, "java/net/SocketException", "Socket closed");
diff --git a/jdk/src/solaris/native/java/net/bsd_close.c b/jdk/src/solaris/native/java/net/bsd_close.c
index 594d4242213..f1e24bd6de1 100644
--- a/jdk/src/solaris/native/java/net/bsd_close.c
+++ b/jdk/src/solaris/native/java/net/bsd_close.c
@@ -68,7 +68,7 @@ static int fdCount;
 
 /*
  * This limit applies if getlimit() returns unlimited.
- * Unfortunately, this means if someone wants a higher limt
+ * Unfortunately, this means if someone wants a higher limit
  * then they have to set an explicit limit, higher than this,
  * which is probably counter-intuitive.
  */
diff --git a/jdk/src/solaris/native/java/net/net_util_md.c b/jdk/src/solaris/native/java/net/net_util_md.c
index e08de49eb80..7df6f3e9823 100644
--- a/jdk/src/solaris/native/java/net/net_util_md.c
+++ b/jdk/src/solaris/native/java/net/net_util_md.c
@@ -169,7 +169,7 @@ getParam(char *driver, char *param)
  * for Solaris versions that do not support the ioctl() in getParam().
  * Ugly, but only called once (for each sotype).
  *
- * As an optimisation, we make a guess using the default values for Solaris
+ * As an optimization, we make a guess using the default values for Solaris
  * assuming they haven't been modified with ndd.
  */
 
@@ -217,23 +217,7 @@ static int findMaxBuf(int fd, int opt, int sotype) {
 #endif
 
 #ifdef __linux__
-static int kernelV22 = 0;
 static int vinit = 0;
-
-int kernelIsV22 () {
-    if (!vinit) {
-        struct utsname sysinfo;
-        if (uname(&sysinfo) == 0) {
-            sysinfo.release[3] = '\0';
-            if (strcmp(sysinfo.release, "2.2") == 0) {
-                kernelV22 = JNI_TRUE;
-            }
-        }
-        vinit = 1;
-    }
-    return kernelV22;
-}
-
 static int kernelV24 = 0;
 static int vinit24 = 0;
 
@@ -253,17 +237,11 @@ int kernelIsV24 () {
 
 int getScopeID (struct sockaddr *him) {
     struct sockaddr_in6 *hext = (struct sockaddr_in6 *)him;
-    if (kernelIsV22()) {
-        return 0;
-    }
     return hext->sin6_scope_id;
 }
 
 int cmpScopeID (unsigned int scope, struct sockaddr *him) {
     struct sockaddr_in6 *hext = (struct sockaddr_in6 *)him;
-    if (kernelIsV22()) {
-        return 1;       /* scope is ignored for comparison in 2.2 kernel */
-    }
     return hext->sin6_scope_id == scope;
 }
 
@@ -843,15 +821,14 @@ NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port, struct sockaddr
          * address needs to be routed via the loopback interface. In this case,
          * we override the specified value with that of the loopback interface.
          * If no cached value exists and no value was specified by user, then
-         * we try to determine a value ffrom the routing table. In all these
+         * we try to determine a value from the routing table. In all these
          * cases the used value is cached for further use.
          */
 #ifdef __linux__
         if (IN6_IS_ADDR_LINKLOCAL(&(him6->sin6_addr))) {
             int cached_scope_id = 0, scope_id = 0;
-            int old_kernel = kernelIsV22();
 
-            if (ia6_cachedscopeidID && !old_kernel) {
+            if (ia6_cachedscopeidID) {
                 cached_scope_id = (int)(*env)->GetIntField(env, iaObj, ia6_cachedscopeidID);
                 /* if cached value exists then use it. Otherwise, check
                  * if scope is set in the address.
@@ -891,13 +868,11 @@ NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port, struct sockaddr
              * of sockaddr_in6.
              */
 
-            if (!old_kernel) {
-                struct sockaddr_in6 *him6 =
-                        (struct sockaddr_in6 *)him;
-                him6->sin6_scope_id = cached_scope_id != 0 ?
-                                            cached_scope_id    : scope_id;
-                *len = sizeof(struct sockaddr_in6);
-            }
+            struct sockaddr_in6 *him6 =
+                    (struct sockaddr_in6 *)him;
+            him6->sin6_scope_id = cached_scope_id != 0 ?
+                                        cached_scope_id    : scope_id;
+            *len = sizeof(struct sockaddr_in6);
         }
 #else
         /* handle scope_id for solaris */
@@ -1208,7 +1183,7 @@ int getDefaultIPv6Interface(struct in6_addr *target_addr) {
 
 /*
  * Wrapper for getsockopt system routine - does any necessary
- * pre/post processing to deal with OS specific oddies :-
+ * pre/post processing to deal with OS specific oddities :-
  *
  * IP_TOS is a no-op with IPv6 sockets as it's setup when
  * the connection is established.
@@ -1287,7 +1262,7 @@ NET_GetSockOpt(int fd, int level, int opt, void *result,
  *
  * For IP_TOS socket option need to mask off bits as this
  * aren't automatically masked by the kernel and results in
- * an error. In addition IP_TOS is a noop with IPv6 as it
+ * an error. In addition IP_TOS is a NOOP with IPv6 as it
  * should be setup as connection time.
  */
 int
@@ -1321,7 +1296,7 @@ NET_SetSockOpt(int fd, int level, int  opt, const void *arg,
 
     /*
      * IPPROTO/IP_TOS :-
-     * 1. IPv6 on Solaris/Mac OS: no-op and will be set
+     * 1. IPv6 on Solaris/Mac OS: NOOP and will be set
      *    in flowinfo field when connecting TCP socket,
      *    or sending UDP packet.
      * 2. IPv6 on Linux: By default Linux ignores flowinfo
diff --git a/jdk/src/solaris/native/java/net/net_util_md.h b/jdk/src/solaris/native/java/net/net_util_md.h
index 8d835b25dd8..e905752ad15 100644
--- a/jdk/src/solaris/native/java/net/net_util_md.h
+++ b/jdk/src/solaris/native/java/net/net_util_md.h
@@ -144,7 +144,6 @@ extern jint NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout);
  *  Utilities
  */
 #ifdef __linux__
-extern int kernelIsV22();
 extern int kernelIsV24();
 #endif
 
diff --git a/jdk/src/solaris/native/sun/nio/ch/Net.c b/jdk/src/solaris/native/sun/nio/ch/Net.c
index 2f01af33efa..907baff1ba8 100644
--- a/jdk/src/solaris/native/sun/nio/ch/Net.c
+++ b/jdk/src/solaris/native/sun/nio/ch/Net.c
@@ -38,6 +38,7 @@
 #include "net_util_md.h"
 #include "nio_util.h"
 #include "nio.h"
+#include "sun_nio_ch_PollArrayWrapper.h"
 
 #ifdef _ALLBSD_SOURCE
 
@@ -627,6 +628,26 @@ Java_sun_nio_ch_Net_shutdown(JNIEnv *env, jclass cl, jobject fdo, jint jhow)
         handleSocketError(env, errno);
 }
 
+JNIEXPORT jint JNICALL
+Java_sun_nio_ch_Net_poll(JNIEnv* env, jclass this, jobject fdo, jint events, jlong timeout)
+{
+    struct pollfd pfd;
+    int rv;
+    pfd.fd = fdval(env, fdo);
+    pfd.events = events;
+    rv = poll(&pfd, 1, timeout);
+
+    if (rv >= 0) {
+        return pfd.revents;
+    } else if (errno == EINTR) {
+        return IOS_INTERRUPTED;
+    } else if (rv < 0) {
+        handleSocketError(env, errno);
+        return IOS_THROWN;
+    }
+}
+
+
 /* Declared in nio_util.h */
 
 jint
diff --git a/jdk/src/windows/native/sun/nio/ch/Net.c b/jdk/src/windows/native/sun/nio/ch/Net.c
index 55c03a28b5b..36a5d2b302c 100644
--- a/jdk/src/windows/native/sun/nio/ch/Net.c
+++ b/jdk/src/windows/native/sun/nio/ch/Net.c
@@ -35,6 +35,7 @@
 #include "net_util.h"
 
 #include "sun_nio_ch_Net.h"
+#include "sun_nio_ch_PollArrayWrapper.h"
 
 /**
  * Definitions to allow for building with older SDK include files.
@@ -524,3 +525,49 @@ Java_sun_nio_ch_Net_shutdown(JNIEnv *env, jclass cl, jobject fdo, jint jhow) {
         NET_ThrowNew(env, WSAGetLastError(), "shutdown");
     }
 }
+
+JNIEXPORT jint JNICALL
+Java_sun_nio_ch_Net_poll(JNIEnv* env, jclass this, jobject fdo, jint events, jlong timeout)
+{
+    int rv;
+    int revents = 0;
+    struct timeval t;
+    int lastError = 0;
+    fd_set rd, wr, ex;
+    jint fd = fdval(env, fdo);
+
+    t.tv_sec = timeout / 1000;
+    t.tv_usec = (timeout % 1000) * 1000;
+
+    FD_ZERO(&rd);
+    FD_ZERO(&wr);
+    FD_ZERO(&ex);
+    if (events & sun_nio_ch_PollArrayWrapper_POLLIN) {
+        FD_SET(fd, &rd);
+    }
+    if (events & sun_nio_ch_PollArrayWrapper_POLLOUT ||
+        events & sun_nio_ch_PollArrayWrapper_POLLCONN) {
+        FD_SET(fd, &wr);
+    }
+    FD_SET(fd, &ex);
+
+    rv = select(fd+1, &rd, &wr, &ex, &t);
+
+    /* save last winsock error */
+    if (rv == SOCKET_ERROR) {
+        handleSocketError(env, lastError);
+        return IOS_THROWN;
+    } else if (rv >= 0) {
+        rv = 0;
+        if (FD_ISSET(fd, &rd)) {
+            rv |= sun_nio_ch_PollArrayWrapper_POLLIN;
+        }
+        if (FD_ISSET(fd, &wr)) {
+            rv |= sun_nio_ch_PollArrayWrapper_POLLOUT;
+        }
+        if (FD_ISSET(fd, &ex)) {
+            rv |= sun_nio_ch_PollArrayWrapper_POLLERR;
+        }
+    }
+    return rv;
+}
diff --git a/jdk/src/windows/native/sun/util/locale/provider/HostLocaleProviderAdapter_md.c b/jdk/src/windows/native/sun/util/locale/provider/HostLocaleProviderAdapter_md.c
index ca29a2a064f..e507a6fb598 100644
--- a/jdk/src/windows/native/sun/util/locale/provider/HostLocaleProviderAdapter_md.c
+++ b/jdk/src/windows/native/sun/util/locale/provider/HostLocaleProviderAdapter_md.c
@@ -209,31 +209,26 @@ JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapte
  */
 JNIEXPORT jstring JNICALL Java_sun_util_locale_provider_HostLocaleProviderAdapterImpl_getDateTimePattern
   (JNIEnv *env, jclass cls, jint dateStyle, jint timeStyle, jstring jlangtag) {
-    WCHAR datePattern[BUFLEN];
-    WCHAR timePattern[BUFLEN];
+    WCHAR pattern[BUFLEN];
     const jchar *langtag = (*env)->GetStringChars(env, jlangtag, JNI_FALSE);
 
-    datePattern[0] = L'\0';
-    timePattern[0] = L'\0';
+    pattern[0] = L'\0';
 
     if (dateStyle == 0 || dateStyle == 1) {
-        getLocaleInfoWrapper(langtag, LOCALE_SLONGDATE, datePattern, BUFLEN);
+        getLocaleInfoWrapper(langtag, LOCALE_SLONGDATE, pattern, BUFLEN);
     } else if (dateStyle == 2 || dateStyle == 3) {
-        getLocaleInfoWrapper(langtag, LOCALE_SSHORTDATE, datePattern, BUFLEN);
+        getLocaleInfoWrapper(langtag, LOCALE_SSHORTDATE, pattern, BUFLEN);
     }
 
     if (timeStyle == 0 || timeStyle == 1) {
-        getLocaleInfoWrapper(langtag, LOCALE_STIMEFORMAT, timePattern, BUFLEN);
+        getLocaleInfoWrapper(langtag, LOCALE_STIMEFORMAT, pattern, BUFLEN);
     } else if (timeStyle == 2 || timeStyle == 3) {
-        getLocaleInfoWrapper(langtag, LOCALE_SSHORTTIME, timePattern, BUFLEN);
+        getLocaleInfoWrapper(langtag, LOCALE_SSHORTTIME, pattern, BUFLEN);
     }
 
-    wcscat(datePattern, L" ");
-    wcscat(datePattern, timePattern);
-
     (*env)->ReleaseStringChars(env, jlangtag, langtag);
 
-    return (*env)->NewString(env, datePattern, wcslen(datePattern));
+    return (*env)->NewString(env, pattern, wcslen(pattern));
 }
 
 /*
diff --git a/jdk/src/windows/native/sun/windows/awt_InputMethod.cpp b/jdk/src/windows/native/sun/windows/awt_InputMethod.cpp
index e661aa04831..b2d12c05aeb 100644
--- a/jdk/src/windows/native/sun/windows/awt_InputMethod.cpp
+++ b/jdk/src/windows/native/sun/windows/awt_InputMethod.cpp
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -517,10 +517,10 @@ JNIEXPORT jstring JNICALL Java_sun_awt_windows_WInputMethod_getNativeIMMDescript
     jstring infojStr = NULL;
 
     if ((buffSize = ::ImmGetDescription(hkl, szImmDescription, 0)) > 0) {
-        szImmDescription = (LPTSTR) safe_Malloc(buffSize * sizeof(TCHAR));
+        szImmDescription = (LPTSTR) safe_Malloc((buffSize+1) * sizeof(TCHAR));
 
         if (szImmDescription != NULL) {
-            ImmGetDescription(hkl, szImmDescription, buffSize);
+            ImmGetDescription(hkl, szImmDescription, (buffSize+1));
 
             infojStr = JNU_NewStringPlatform(env, szImmDescription);
 
diff --git a/jdk/test/ProblemList.txt b/jdk/test/ProblemList.txt
index 53868b81260..35aaa99f931 100644
--- a/jdk/test/ProblemList.txt
+++ b/jdk/test/ProblemList.txt
@@ -153,9 +153,6 @@ javax/management/loading/LibraryLoader/LibraryLoaderTest.java	windows-all
 # 7144846
 javax/management/remote/mandatory/connection/ReconnectTest.java	generic-all
 
-# 7158614, locks up Windows machines at least
-sun/management/jmxremote/startstop/JMXStartStopTest.sh		windows-all
-
 # 7120365
 javax/management/remote/mandatory/notif/DiffHBTest.java 	generic-all
 
diff --git a/jdk/test/java/nio/Buffer/Basic-X.java.template b/jdk/test/java/nio/Buffer/Basic-X.java.template
index 54435c2c49f..1548a9f8277 100644
--- a/jdk/test/java/nio/Buffer/Basic-X.java.template
+++ b/jdk/test/java/nio/Buffer/Basic-X.java.template
@@ -335,7 +335,7 @@ public class Basic$Type$
         fail(problem + String.format(": x=%s y=%s", x, y), xb, yb);
     }
 
-    private static void tryCatch(Buffer b, Class ex, Runnable thunk) {
+    private static void tryCatch(Buffer b, Class<?> ex, Runnable thunk) {
         boolean caught = false;
         try {
             thunk.run();
@@ -350,7 +350,7 @@ public class Basic$Type$
             fail(ex.getName() + " not thrown", b);
     }
 
-    private static void tryCatch($type$ [] t, Class ex, Runnable thunk) {
+    private static void tryCatch($type$ [] t, Class<?> ex, Runnable thunk) {
         tryCatch($Type$Buffer.wrap(t), ex, thunk);
     }
 
@@ -681,6 +681,14 @@ public class Basic$Type$
                     bulkPutBuffer(rb);
                 }});
 
+        // put($Type$Buffer) should not change source position
+        final $Type$Buffer src = $Type$Buffer.allocate(1);
+        tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
+                public void run() {
+                    rb.put(src);
+                 }});
+        ck(src, src.position(), 0);
+
         tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
                 public void run() {
                     rb.compact();
@@ -744,6 +752,22 @@ public class Basic$Type$
 
 #end[byte]
 
+#if[char]
+
+        // 7199551
+        tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
+            public void run() {
+                String s = new String(new char[rb.remaining() + 1]);
+                rb.put(s);
+            }});
+        tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
+            public void run() {
+                String s = new String(new char[rb.remaining() + 1]);
+                rb.append(s);
+            }});
+
+#end[char]
+
         if (rb.getClass().getName().startsWith("java.nio.Heap")) {
 
             tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
diff --git a/jdk/test/java/nio/Buffer/Basic.java b/jdk/test/java/nio/Buffer/Basic.java
index 86c1b443612..0dba4c123b4 100644
--- a/jdk/test/java/nio/Buffer/Basic.java
+++ b/jdk/test/java/nio/Buffer/Basic.java
@@ -25,7 +25,7 @@
  * @summary Unit test for buffers
  * @bug 4413135 4414911 4416536 4416562 4418782 4471053 4472779 4490253 4523725
  *      4526177 4463011 4660660 4661219 4663521 4782970 4804304 4938424 6231529
- *      6221101 6234263 6535542 6591971 6593946 6795561 7190219
+ *      6221101 6234263 6535542 6591971 6593946 6795561 7190219 7199551
  * @author Mark Reinhold
  */
 
diff --git a/jdk/test/java/nio/Buffer/BasicByte.java b/jdk/test/java/nio/Buffer/BasicByte.java
index 34856fa14b4..861a4335b5b 100644
--- a/jdk/test/java/nio/Buffer/BasicByte.java
+++ b/jdk/test/java/nio/Buffer/BasicByte.java
@@ -335,7 +335,7 @@ public class BasicByte
         fail(problem + String.format(": x=%s y=%s", x, y), xb, yb);
     }
 
-    private static void tryCatch(Buffer b, Class ex, Runnable thunk) {
+    private static void tryCatch(Buffer b, Class<?> ex, Runnable thunk) {
         boolean caught = false;
         try {
             thunk.run();
@@ -350,7 +350,7 @@ public class BasicByte
             fail(ex.getName() + " not thrown", b);
     }
 
-    private static void tryCatch(byte [] t, Class ex, Runnable thunk) {
+    private static void tryCatch(byte [] t, Class<?> ex, Runnable thunk) {
         tryCatch(ByteBuffer.wrap(t), ex, thunk);
     }
 
@@ -681,6 +681,14 @@ public class BasicByte
                     bulkPutBuffer(rb);
                 }});
 
+        // put(ByteBuffer) should not change source position
+        final ByteBuffer src = ByteBuffer.allocate(1);
+        tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
+                public void run() {
+                    rb.put(src);
+                 }});
+        ck(src, src.position(), 0);
+
         tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
                 public void run() {
                     rb.compact();
@@ -744,6 +752,22 @@ public class BasicByte
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
         if (rb.getClass().getName().startsWith("java.nio.Heap")) {
 
             tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
diff --git a/jdk/test/java/nio/Buffer/BasicChar.java b/jdk/test/java/nio/Buffer/BasicChar.java
index d06772a961c..b89916101bf 100644
--- a/jdk/test/java/nio/Buffer/BasicChar.java
+++ b/jdk/test/java/nio/Buffer/BasicChar.java
@@ -335,7 +335,7 @@ public class BasicChar
         fail(problem + String.format(": x=%s y=%s", x, y), xb, yb);
     }
 
-    private static void tryCatch(Buffer b, Class ex, Runnable thunk) {
+    private static void tryCatch(Buffer b, Class<?> ex, Runnable thunk) {
         boolean caught = false;
         try {
             thunk.run();
@@ -350,7 +350,7 @@ public class BasicChar
             fail(ex.getName() + " not thrown", b);
     }
 
-    private static void tryCatch(char [] t, Class ex, Runnable thunk) {
+    private static void tryCatch(char [] t, Class<?> ex, Runnable thunk) {
         tryCatch(CharBuffer.wrap(t), ex, thunk);
     }
 
@@ -681,6 +681,14 @@ public class BasicChar
                     bulkPutBuffer(rb);
                 }});
 
+        // put(CharBuffer) should not change source position
+        final CharBuffer src = CharBuffer.allocate(1);
+        tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
+                public void run() {
+                    rb.put(src);
+                 }});
+        ck(src, src.position(), 0);
+
         tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
                 public void run() {
                     rb.compact();
@@ -741,6 +749,22 @@ public class BasicChar
 
 
 
+
+
+
+
+
+        // 7199551
+        tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
+            public void run() {
+                String s = new String(new char[rb.remaining() + 1]);
+                rb.put(s);
+            }});
+        tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
+            public void run() {
+                String s = new String(new char[rb.remaining() + 1]);
+                rb.append(s);
+            }});
 
 
 
diff --git a/jdk/test/java/nio/Buffer/BasicDouble.java b/jdk/test/java/nio/Buffer/BasicDouble.java
index 8ff9eb1f716..97efe8f6847 100644
--- a/jdk/test/java/nio/Buffer/BasicDouble.java
+++ b/jdk/test/java/nio/Buffer/BasicDouble.java
@@ -335,7 +335,7 @@ public class BasicDouble
         fail(problem + String.format(": x=%s y=%s", x, y), xb, yb);
     }
 
-    private static void tryCatch(Buffer b, Class ex, Runnable thunk) {
+    private static void tryCatch(Buffer b, Class<?> ex, Runnable thunk) {
         boolean caught = false;
         try {
             thunk.run();
@@ -350,7 +350,7 @@ public class BasicDouble
             fail(ex.getName() + " not thrown", b);
     }
 
-    private static void tryCatch(double [] t, Class ex, Runnable thunk) {
+    private static void tryCatch(double [] t, Class<?> ex, Runnable thunk) {
         tryCatch(DoubleBuffer.wrap(t), ex, thunk);
     }
 
@@ -681,6 +681,14 @@ public class BasicDouble
                     bulkPutBuffer(rb);
                 }});
 
+        // put(DoubleBuffer) should not change source position
+        final DoubleBuffer src = DoubleBuffer.allocate(1);
+        tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
+                public void run() {
+                    rb.put(src);
+                 }});
+        ck(src, src.position(), 0);
+
         tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
                 public void run() {
                     rb.compact();
@@ -727,6 +735,22 @@ public class BasicDouble
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
diff --git a/jdk/test/java/nio/Buffer/BasicFloat.java b/jdk/test/java/nio/Buffer/BasicFloat.java
index 98e1989f2a1..2f954934a05 100644
--- a/jdk/test/java/nio/Buffer/BasicFloat.java
+++ b/jdk/test/java/nio/Buffer/BasicFloat.java
@@ -335,7 +335,7 @@ public class BasicFloat
         fail(problem + String.format(": x=%s y=%s", x, y), xb, yb);
     }
 
-    private static void tryCatch(Buffer b, Class ex, Runnable thunk) {
+    private static void tryCatch(Buffer b, Class<?> ex, Runnable thunk) {
         boolean caught = false;
         try {
             thunk.run();
@@ -350,7 +350,7 @@ public class BasicFloat
             fail(ex.getName() + " not thrown", b);
     }
 
-    private static void tryCatch(float [] t, Class ex, Runnable thunk) {
+    private static void tryCatch(float [] t, Class<?> ex, Runnable thunk) {
         tryCatch(FloatBuffer.wrap(t), ex, thunk);
     }
 
@@ -681,6 +681,14 @@ public class BasicFloat
                     bulkPutBuffer(rb);
                 }});
 
+        // put(FloatBuffer) should not change source position
+        final FloatBuffer src = FloatBuffer.allocate(1);
+        tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
+                public void run() {
+                    rb.put(src);
+                 }});
+        ck(src, src.position(), 0);
+
         tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
                 public void run() {
                     rb.compact();
@@ -727,6 +735,22 @@ public class BasicFloat
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
diff --git a/jdk/test/java/nio/Buffer/BasicInt.java b/jdk/test/java/nio/Buffer/BasicInt.java
index 571d62f61bc..a9ce0fb450b 100644
--- a/jdk/test/java/nio/Buffer/BasicInt.java
+++ b/jdk/test/java/nio/Buffer/BasicInt.java
@@ -335,7 +335,7 @@ public class BasicInt
         fail(problem + String.format(": x=%s y=%s", x, y), xb, yb);
     }
 
-    private static void tryCatch(Buffer b, Class ex, Runnable thunk) {
+    private static void tryCatch(Buffer b, Class<?> ex, Runnable thunk) {
         boolean caught = false;
         try {
             thunk.run();
@@ -350,7 +350,7 @@ public class BasicInt
             fail(ex.getName() + " not thrown", b);
     }
 
-    private static void tryCatch(int [] t, Class ex, Runnable thunk) {
+    private static void tryCatch(int [] t, Class<?> ex, Runnable thunk) {
         tryCatch(IntBuffer.wrap(t), ex, thunk);
     }
 
@@ -681,6 +681,14 @@ public class BasicInt
                     bulkPutBuffer(rb);
                 }});
 
+        // put(IntBuffer) should not change source position
+        final IntBuffer src = IntBuffer.allocate(1);
+        tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
+                public void run() {
+                    rb.put(src);
+                 }});
+        ck(src, src.position(), 0);
+
         tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
                 public void run() {
                     rb.compact();
@@ -727,6 +735,22 @@ public class BasicInt
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
diff --git a/jdk/test/java/nio/Buffer/BasicLong.java b/jdk/test/java/nio/Buffer/BasicLong.java
index 7ea5d0326ff..82fb25b8a2d 100644
--- a/jdk/test/java/nio/Buffer/BasicLong.java
+++ b/jdk/test/java/nio/Buffer/BasicLong.java
@@ -335,7 +335,7 @@ public class BasicLong
         fail(problem + String.format(": x=%s y=%s", x, y), xb, yb);
     }
 
-    private static void tryCatch(Buffer b, Class ex, Runnable thunk) {
+    private static void tryCatch(Buffer b, Class<?> ex, Runnable thunk) {
         boolean caught = false;
         try {
             thunk.run();
@@ -350,7 +350,7 @@ public class BasicLong
             fail(ex.getName() + " not thrown", b);
     }
 
-    private static void tryCatch(long [] t, Class ex, Runnable thunk) {
+    private static void tryCatch(long [] t, Class<?> ex, Runnable thunk) {
         tryCatch(LongBuffer.wrap(t), ex, thunk);
     }
 
@@ -681,6 +681,14 @@ public class BasicLong
                     bulkPutBuffer(rb);
                 }});
 
+        // put(LongBuffer) should not change source position
+        final LongBuffer src = LongBuffer.allocate(1);
+        tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
+                public void run() {
+                    rb.put(src);
+                 }});
+        ck(src, src.position(), 0);
+
         tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
                 public void run() {
                     rb.compact();
@@ -727,6 +735,22 @@ public class BasicLong
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
diff --git a/jdk/test/java/nio/Buffer/BasicShort.java b/jdk/test/java/nio/Buffer/BasicShort.java
index 176a53fe544..9f8579d7510 100644
--- a/jdk/test/java/nio/Buffer/BasicShort.java
+++ b/jdk/test/java/nio/Buffer/BasicShort.java
@@ -335,7 +335,7 @@ public class BasicShort
         fail(problem + String.format(": x=%s y=%s", x, y), xb, yb);
     }
 
-    private static void tryCatch(Buffer b, Class ex, Runnable thunk) {
+    private static void tryCatch(Buffer b, Class<?> ex, Runnable thunk) {
         boolean caught = false;
         try {
             thunk.run();
@@ -350,7 +350,7 @@ public class BasicShort
             fail(ex.getName() + " not thrown", b);
     }
 
-    private static void tryCatch(short [] t, Class ex, Runnable thunk) {
+    private static void tryCatch(short [] t, Class<?> ex, Runnable thunk) {
         tryCatch(ShortBuffer.wrap(t), ex, thunk);
     }
 
@@ -681,6 +681,14 @@ public class BasicShort
                     bulkPutBuffer(rb);
                 }});
 
+        // put(ShortBuffer) should not change source position
+        final ShortBuffer src = ShortBuffer.allocate(1);
+        tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
+                public void run() {
+                    rb.put(src);
+                 }});
+        ck(src, src.position(), 0);
+
         tryCatch(b, ReadOnlyBufferException.class, new Runnable() {
                 public void run() {
                     rb.compact();
@@ -727,6 +735,22 @@ public class BasicShort
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 
 
 
diff --git a/jdk/test/java/nio/channels/Selector/ChangingInterests.java b/jdk/test/java/nio/channels/Selector/ChangingInterests.java
new file mode 100644
index 00000000000..59f62100676
--- /dev/null
+++ b/jdk/test/java/nio/channels/Selector/ChangingInterests.java
@@ -0,0 +1,190 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 7200742
+ * @summary Test that Selector doesn't spin when changing interest ops
+ */
+
+import java.net.*;
+import java.nio.ByteBuffer;
+import java.nio.channels.*;
+import static java.nio.channels.SelectionKey.*;
+import java.io.IOException;
+
+public class ChangingInterests {
+
+    static int OPS[] = { 0, OP_WRITE, OP_READ, (OP_WRITE|OP_READ) };
+
+    static String toOpsString(int ops) {
+        String s = "";
+        if ((ops & OP_READ) > 0)
+            s += "POLLIN";
+        if ((ops & OP_WRITE) > 0) {
+            if (s.length() > 0)
+                s += "|";
+            s += "POLLOUT";
+        }
+        if (s.length() == 0)
+            s = "0";
+        return "(" + s + ")";
+    }
+
+    static void write1(SocketChannel peer) throws IOException {
+        peer.write(ByteBuffer.wrap(new byte[1]));
+        // give time for other end to be readable
+        try {
+            Thread.sleep(50);
+        } catch (InterruptedException ignore) { }
+    }
+
+    static void drain(SocketChannel sc) throws IOException {
+        ByteBuffer buf = ByteBuffer.allocate(100);
+        int n;
+        while ((n = sc.read(buf)) > 0) {
+            buf.rewind();
+        }
+    }
+
+    /**
+     * Changes the given key's interest set from one set to another and then
+     * checks the selected key set and the key's channel.
+     */
+    static void testChange(SelectionKey key, int from, int to) throws IOException {
+        Selector sel = key.selector();
+        assertTrue(sel.keys().size() == 1, "Only one channel should be registered");
+
+        // ensure that channel is registered with the "from" interest set
+        key.interestOps(from);
+        sel.selectNow();
+        sel.selectedKeys().clear();
+
+        // change to the "to" interest set
+        key.interestOps(to);
+        System.out.println("select...");
+        int selected = sel.selectNow();
+        System.out.println("" + selected + " channel(s) selected");
+
+        int expected = (to == 0) ? 0 : 1;
+        assertTrue(selected == expected, "Expected " + expected);
+
+        // check selected keys
+        for (SelectionKey k: sel.selectedKeys()) {
+            assertTrue(k == key, "Unexpected key selected");
+
+            boolean readable = k.isReadable();
+            boolean writable = k.isWritable();
+
+            System.out.println("key readable: " + readable);
+            System.out.println("key writable: " + writable);
+
+            if ((to & OP_READ) == 0) {
+                assertTrue(!readable, "Not expected to be readable");
+            } else {
+                assertTrue(readable, "Expected to be readable");
+            }
+
+            if ((to & OP_WRITE) == 0) {
+                assertTrue(!writable, "Not expected to be writable");
+            } else {
+                assertTrue(writable, "Expected to be writable");
+            }
+
+            sel.selectedKeys().clear();
+        }
+    }
+
+    /**
+     * Tests that given Selector's select method blocks.
+     */
+    static void testForSpin(Selector sel) throws IOException {
+        System.out.println("Test for spin...");
+        long start = System.currentTimeMillis();
+        int count = 3;
+        while (count-- > 0) {
+            int selected = sel.select(1000);
+            System.out.println("" + selected + " channel(s) selected");
+            assertTrue(selected == 0, "Channel should not be selected");
+        }
+        long dur = System.currentTimeMillis() - start;
+        assertTrue(dur > 1000, "select was too short");
+    }
+
+    public static void main(String[] args) throws IOException {
+        InetAddress lh = InetAddress.getLocalHost();
+
+        // create loopback connection
+        ServerSocketChannel ssc =
+            ServerSocketChannel.open().bind(new InetSocketAddress(0));
+
+        final SocketChannel sc = SocketChannel.open();
+        sc.connect(new InetSocketAddress(lh, ssc.socket().getLocalPort()));
+        SocketChannel peer = ssc.accept();
+
+        sc.configureBlocking(false);
+
+        // ensure that channel "sc" is readable
+        write1(peer);
+
+        try (Selector sel = Selector.open()) {
+            SelectionKey key = sc.register(sel, 0);
+            sel.selectNow();
+
+            // test all transitions
+            for (int from: OPS) {
+                for (int to: OPS) {
+
+                    System.out.println(toOpsString(from) + " -> " + toOpsString(to));
+
+                    testChange(key, from, to);
+
+                    // if the interst ops is now 0 then Selector should not spin
+                    if (to == 0)
+                        testForSpin(sel);
+
+                    // if interest ops is now OP_READ then make non-readable
+                    // and test that Selector does not spin.
+                    if (to == OP_READ) {
+                        System.out.println("Drain channel...");
+                        drain(sc);
+                        testForSpin(sel);
+                        System.out.println("Make channel readable again");
+                        write1(peer);
+                    }
+
+                    System.out.println();
+                }
+            }
+
+        } finally {
+            sc.close();
+            peer.close();
+            ssc.close();
+        }
+    }
+
+    static void assertTrue(boolean v, String msg) {
+        if (!v) throw new RuntimeException(msg);
+    }
+
+}
diff --git a/jdk/test/java/nio/channels/etc/AdaptorCloseAndInterrupt.java b/jdk/test/java/nio/channels/etc/AdaptorCloseAndInterrupt.java
new file mode 100644
index 00000000000..8d99fde7a41
--- /dev/null
+++ b/jdk/test/java/nio/channels/etc/AdaptorCloseAndInterrupt.java
@@ -0,0 +1,221 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 7184932
+ * @summary Test asynchronous close and interrupt of timed socket adapter methods
+ */
+
+import java.io.*;
+import java.nio.*;
+import java.nio.channels.*;
+import java.nio.channels.spi.AbstractSelectableChannel;
+import java.net.*;
+import java.util.concurrent.Callable;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.Random;
+
+
+public class AdaptorCloseAndInterrupt {
+    private static final ScheduledExecutorService pool =
+        Executors.newScheduledThreadPool(1);
+    final ServerSocketChannel listener;
+    final DatagramChannel peer;
+    final int port;
+
+    public AdaptorCloseAndInterrupt() {
+        listener = null;
+        peer = null;
+        port = -1;
+    }
+
+    public AdaptorCloseAndInterrupt(ServerSocketChannel listener) {
+        this.listener = listener;
+        this.port = listener.socket().getLocalPort();
+        this.peer = null;
+    }
+
+    public AdaptorCloseAndInterrupt(DatagramChannel listener) {
+        this.peer = listener;
+        this.port = peer.socket().getLocalPort();
+        this.listener = null;
+    }
+
+    public static void main(String args[]) throws Exception {
+        try {
+            try (ServerSocketChannel listener = ServerSocketChannel.open()) {
+                listener.socket().bind(null);
+                new AdaptorCloseAndInterrupt(listener).scReadAsyncClose();
+                new AdaptorCloseAndInterrupt(listener).scReadAsyncInterrupt();
+            }
+
+            try (DatagramChannel peer = DatagramChannel.open()) {
+                peer.socket().bind(null);
+                new AdaptorCloseAndInterrupt(peer).dcReceiveAsyncClose();
+                new AdaptorCloseAndInterrupt(peer).dcReceiveAsyncInterrupt();
+            }
+
+            new AdaptorCloseAndInterrupt().ssAcceptAsyncClose();
+            new AdaptorCloseAndInterrupt().ssAcceptAsyncInterrupt();
+        } finally {
+            pool.shutdown();
+        }
+        System.out.println("Test Passed");
+    }
+
+    void scReadAsyncClose() throws IOException {
+        try {
+            SocketChannel sc = SocketChannel.open(new InetSocketAddress(
+                "127.0.0.1", port));
+            sc.socket().setSoTimeout(30*1000);
+
+            doAsyncClose(sc);
+
+            try {
+                sc.socket().getInputStream().read(new byte[100]);
+                throw new RuntimeException("read should not have completed");
+            } catch (ClosedChannelException expected) {}
+
+            if (!sc.socket().isClosed())
+                throw new RuntimeException("socket is not closed");
+        } finally {
+            // accept connection and close it.
+            listener.accept().close();
+        }
+    }
+
+    void scReadAsyncInterrupt() throws IOException {
+        try {
+            final SocketChannel sc = SocketChannel.open(new InetSocketAddress(
+                "127.0.0.1", port));
+            sc.socket().setSoTimeout(30*1000);
+
+            doAsyncInterrupt();
+
+            try {
+                sc.socket().getInputStream().read(new byte[100]);
+                throw new RuntimeException("read should not have completed");
+            } catch (ClosedByInterruptException expected) {
+                Thread.currentThread().interrupted();
+            }
+
+            if (!sc.socket().isClosed())
+                throw new RuntimeException("socket is not closed");
+        } finally {
+            // accept connection and close it.
+            listener.accept().close();
+        }
+    }
+
+    void dcReceiveAsyncClose() throws IOException {
+        DatagramChannel dc = DatagramChannel.open();
+        dc.connect(new InetSocketAddress(
+            "127.0.0.1", port));
+        dc.socket().setSoTimeout(30*1000);
+
+        doAsyncClose(dc);
+
+        try {
+            dc.socket().receive(new DatagramPacket(new byte[100], 100));
+            throw new RuntimeException("receive should not have completed");
+        } catch (ClosedChannelException expected) {}
+
+        if (!dc.socket().isClosed())
+            throw new RuntimeException("socket is not closed");
+    }
+
+    void dcReceiveAsyncInterrupt() throws IOException {
+        DatagramChannel dc = DatagramChannel.open();
+        dc.connect(new InetSocketAddress(
+            "127.0.0.1", port));
+        dc.socket().setSoTimeout(30*1000);
+
+        doAsyncInterrupt();
+
+        try {
+            dc.socket().receive(new DatagramPacket(new byte[100], 100));
+            throw new RuntimeException("receive should not have completed");
+        } catch (ClosedByInterruptException expected) {
+            Thread.currentThread().interrupted();
+        }
+
+        if (!dc.socket().isClosed())
+            throw new RuntimeException("socket is not closed");
+    }
+
+    void ssAcceptAsyncClose() throws IOException {
+        ServerSocketChannel ssc = ServerSocketChannel.open();
+        ssc.socket().bind(null);
+        ssc.socket().setSoTimeout(30*1000);
+
+        doAsyncClose(ssc);
+
+        try {
+            ssc.socket().accept();
+            throw new RuntimeException("accept should not have completed");
+        } catch (ClosedChannelException expected) {}
+
+        if (!ssc.socket().isClosed())
+            throw new RuntimeException("socket is not closed");
+    }
+
+    void ssAcceptAsyncInterrupt() throws IOException {
+        ServerSocketChannel ssc = ServerSocketChannel.open();
+        ssc.socket().bind(null);
+        ssc.socket().setSoTimeout(30*1000);
+
+        doAsyncInterrupt();
+
+        try {
+            ssc.socket().accept();
+            throw new RuntimeException("accept should not have completed");
+        } catch (ClosedByInterruptException expected) {
+            Thread.currentThread().interrupted();
+        }
+
+        if (!ssc.socket().isClosed())
+            throw new RuntimeException("socket is not closed");
+    }
+
+    void doAsyncClose(final AbstractSelectableChannel sc) {
+        AdaptorCloseAndInterrupt.pool.schedule(new Callable<Void>() {
+            public Void call() throws Exception {
+                sc.close();
+                return null;
+            }
+        }, new Random().nextInt(1000), TimeUnit.MILLISECONDS);
+    }
+
+    void doAsyncInterrupt() {
+        final Thread current = Thread.currentThread();
+        AdaptorCloseAndInterrupt.pool.schedule(new Callable<Void>() {
+            public Void call() throws Exception {
+                current.interrupt();
+                return null;
+            }
+        }, new Random().nextInt(1000), TimeUnit.MILLISECONDS);
+    }
+
+}
diff --git a/jdk/test/java/nio/file/Files/CopyAndMove.java b/jdk/test/java/nio/file/Files/CopyAndMove.java
index 0becc686719..48ecb0dfcbc 100644
--- a/jdk/test/java/nio/file/Files/CopyAndMove.java
+++ b/jdk/test/java/nio/file/Files/CopyAndMove.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -22,7 +22,7 @@
  */
 
 /* @test
- * @bug 4313887 6838333 6917021 7006126
+ * @bug 4313887 6838333 6917021 7006126 6950237
  * @summary Unit test for java.nio.file.Files copy and move methods
  * @library ..
  * @build CopyAndMove PassThroughFileSystem
@@ -41,12 +41,14 @@ import java.util.*;
 public class CopyAndMove {
     static final Random rand = new Random();
     static boolean heads() { return rand.nextBoolean(); }
+    private static boolean testPosixAttributes = false;
 
     public static void main(String[] args) throws Exception {
         Path dir1 = TestUtil.createTemporaryDirectory();
         try {
 
             // Same directory
+            testPosixAttributes = getFileStore(dir1).supportsFileAttributeView("posix");
             testCopyFileToFile(dir1, dir1, TestUtil.supportsLinks(dir1));
             testMove(dir1, dir1, TestUtil.supportsLinks(dir1));
 
@@ -57,6 +59,8 @@ public class CopyAndMove {
             try {
                 boolean testSymbolicLinks =
                     TestUtil.supportsLinks(dir1) && TestUtil.supportsLinks(dir2);
+                testPosixAttributes = getFileStore(dir1).supportsFileAttributeView("posix") &&
+                                      getFileStore(dir2).supportsFileAttributeView("posix");
                 testCopyFileToFile(dir1, dir2, testSymbolicLinks);
                 testMove(dir1, dir2, testSymbolicLinks);
             } finally {
@@ -65,6 +69,8 @@ public class CopyAndMove {
 
             // Target is location associated with custom provider
             Path dir3 = PassThroughFileSystem.create().getPath(dir1.toString());
+            testPosixAttributes = getFileStore(dir1).supportsFileAttributeView("posix") &&
+                                  getFileStore(dir3).supportsFileAttributeView("posix");
             testCopyFileToFile(dir1, dir3, false);
             testMove(dir1, dir3, false);
 
@@ -90,7 +96,12 @@ public class CopyAndMove {
         if (!attrs1.isSymbolicLink()) {
             long time1 = attrs1.lastModifiedTime().toMillis();
             long time2 = attrs2.lastModifiedTime().toMillis();
-            assertTrue(time1 == time2);
+
+            if (time1 != time2) {
+                System.err.format("File time for %s is %s\n", attrs1.fileKey(), attrs1.lastModifiedTime());
+                System.err.format("File time for %s is %s\n", attrs2.fileKey(), attrs2.lastModifiedTime());
+                assertTrue(false);
+            }
         }
 
         // check size
@@ -207,7 +218,10 @@ public class CopyAndMove {
         if (source.getFileSystem().provider() == target.getFileSystem().provider()) {
 
             // verify POSIX attributes
-            if (posixAttributes != null && !basicAttributes.isSymbolicLink()) {
+            if (posixAttributes != null &&
+                !basicAttributes.isSymbolicLink() &&
+                testPosixAttributes)
+            {
                 checkPosixAttributes(posixAttributes,
                     readAttributes(target, PosixFileAttributes.class, NOFOLLOW_LINKS));
             }
@@ -636,7 +650,9 @@ public class CopyAndMove {
 
                 // check POSIX attributes are copied
                 String os = System.getProperty("os.name");
-                if (os.equals("SunOS") || os.equals("Linux")) {
+                if ((os.equals("SunOS") || os.equals("Linux")) &&
+                    testPosixAttributes)
+                {
                     checkPosixAttributes(
                         readAttributes(source, PosixFileAttributes.class, linkOptions),
                         readAttributes(target, PosixFileAttributes.class, linkOptions));
diff --git a/jdk/test/java/text/BreakIterator/Bug7104012.java b/jdk/test/java/text/BreakIterator/Bug7104012.java
new file mode 100644
index 00000000000..ced84b9edb7
--- /dev/null
+++ b/jdk/test/java/text/BreakIterator/Bug7104012.java
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/*
+ * @test
+ * @bug 7104012
+ * @summary Confirm that AIOBE is not thrown.
+ */
+
+import java.text.*;
+import java.util.*;
+
+public class Bug7104012 {
+
+    public static void main(String[] args) {
+        boolean err = false;
+
+        List<String> data = new ArrayList<>();
+        data.add("\udb40");
+        data.add(" \udb40");
+        data.add("\udc53");
+        data.add(" \udc53");
+        data.add(" \udb40\udc53");
+        data.add("\udb40\udc53");
+        data.add("ABC \udb40\udc53 123");
+        data.add("\udb40\udc53 ABC \udb40\udc53");
+
+        for (Locale locale : Locale.getAvailableLocales()) {
+            List<BreakIterator> breakIterators = new ArrayList<>();
+            breakIterators.add(BreakIterator.getCharacterInstance(locale));
+            breakIterators.add(BreakIterator.getLineInstance(locale));
+            breakIterators.add(BreakIterator.getSentenceInstance(locale));
+            breakIterators.add(BreakIterator.getWordInstance(locale));
+
+            for (BreakIterator bi : breakIterators) {
+                for (String str : data) {
+                    try {
+                        bi.setText(str);
+                        bi.first();
+                        while (bi.next() != BreakIterator.DONE) { }
+                        bi.last();
+                        while (bi.previous() != BreakIterator.DONE) { }
+                    }
+                    catch (ArrayIndexOutOfBoundsException ex) {
+                        System.out.println("    " + data.indexOf(str)
+                            + ": BreakIterator(" + locale
+                            + ") threw AIOBE.");
+                        err = true;
+                    }
+                }
+            }
+        }
+
+        if (err) {
+            throw new RuntimeException("Unexpected exeption.");
+        }
+    }
+
+}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9IntRegisterBranchDecoder.java b/jdk/test/java/text/Collator/Bug7200119.java
similarity index 68%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9IntRegisterBranchDecoder.java
rename to jdk/test/java/text/Collator/Bug7200119.java
index ad8057316b7..74ffc304123 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/V9IntRegisterBranchDecoder.java
+++ b/jdk/test/java/text/Collator/Bug7200119.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,19 +19,22 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+/*
+ * @test
+ * @bug 7200119
+ * @summary verify that getAvailableLocales() contains Locale.US
+ */
+import java.text.*;
+import java.util.*;
 
-import sun.jvm.hotspot.asm.*;
+public class Bug7200119 {
+    public static void main(String[] args) {
+        List<Locale> avail = Arrays.asList(Collator.getAvailableLocales());
 
-class V9IntRegisterBranchDecoder extends V9RegisterBranchDecoder {
-    static final String integerRegisterConditionNames[] = {
-        null, "brz", "brlez", "brlz", null, "brnz", "brgz", "brgez"
-    };
-
-    String getRegisterConditionName(int index) {
-        return integerRegisterConditionNames[index];
+        if (!avail.contains(Locale.US)) {
+            throw new RuntimeException("Failed.");
+        }
     }
 }
diff --git a/jdk/test/java/text/Format/DecimalFormat/Bug7196316.java b/jdk/test/java/text/Format/DecimalFormat/Bug7196316.java
new file mode 100644
index 00000000000..91d1d12fac2
--- /dev/null
+++ b/jdk/test/java/text/Format/DecimalFormat/Bug7196316.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/*
+ * @test
+ * @bug 7196316
+ * @summary Confirm that a non-default rounding mode is used even after deserialization.
+ */
+
+
+import java.io.*;
+import java.math.*;
+import java.text.*;
+
+public class Bug7196316 {
+
+    private static final String filename = "bug7196316.ser";
+
+    public static void main(String[] args) throws Exception {
+        DecimalFormat df;
+        RoundingMode mode = RoundingMode.DOWN;
+        double given = 6.6;
+        String expected;
+        String actual;
+
+        try (ObjectOutputStream os
+                 = new ObjectOutputStream(new FileOutputStream(filename))) {
+            df = new DecimalFormat("#");
+            df.setRoundingMode(mode);
+            expected = df.format(given);
+            os.writeObject(df);
+        }
+
+        try (ObjectInputStream is
+                 = new ObjectInputStream(new FileInputStream(filename))) {
+            df = (DecimalFormat)is.readObject();
+        }
+
+        RoundingMode newMode = df.getRoundingMode();
+        if (mode != newMode) {
+            throw new RuntimeException("Unexpected roundig mode: " + newMode);
+        } else {
+            actual = df.format(given);
+            if (!expected.equals(actual)) {
+                throw new RuntimeException("Unexpected formatted result: \""
+                              + actual + "\"");
+            } else {
+                System.out.println("Passed: Expected rounding mode (" + newMode
+                    + ") & formatted result: \"" + actual + "\"");
+            }
+        }
+    }
+
+}
diff --git a/jdk/test/java/text/Format/DecimalFormat/FormatMicroBenchmark.java b/jdk/test/java/text/Format/DecimalFormat/FormatMicroBenchmark.java
new file mode 100644
index 00000000000..cd8648a70ce
--- /dev/null
+++ b/jdk/test/java/text/Format/DecimalFormat/FormatMicroBenchmark.java
@@ -0,0 +1,926 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7050528
+ * @summary Set of micro-benchmarks testing throughput of java.text.DecimalFormat.format()
+ * @author Olivier Lagneau
+ * @run main FormatMicroBenchmark
+ */
+
+/* This is a set of micro-benchmarks testing throughput of java.text.DecimalFormat.format().
+ * It never fails.
+ *
+ * Usage and arguments:
+ *  - Run with no argument skips the whole benchmark and exits.
+ *  - Run with "-help" as first argument calls the usage() method and exits.
+ *  - Run with "-doit" runs the benchmark with summary details.
+ *  - Run with "-verbose" provides additional details on the run.
+ *
+ * Example run :
+ *   java -Xms500m -Xmx500m -XX:NewSize=400m FormatMicroBenchmark -doit -verbose
+ *
+ * Running with jtreg:
+ *  The jtreg header "run" tag options+args must be changed to avoid skipping
+ *  the execution. here is an example of run options:
+ *  "main/othervm -Xms500m -Xmx500m -XX:NewSize=400m FormatMicroBenchmark -doit"
+ *
+ * Note:
+ *  - Vm options -Xms, -Xmx, -XX:NewSize must be set correctly for
+ *    getting reliable numbers. Otherwise GC activity may corrupt results.
+ *    As of jdk80b48 using "-Xms500m -Xmx500m -XX:NewSize=400m" covers
+ *    all cases.
+ *  - Optionally using "-XX:+printGC" option provides information that
+ *    helps checking any GC activity while benches are run.
+ *
+ * Vm Options:
+ *  - Vm options to use (as of jdk80b48):
+ *     fast-path case :     -Xms128m -Xmx128m -XX:NewSize=100m
+ *     non fast-path case:  -Xms500m -Xmx500m -XX:NewSize=400m
+ *    or use worst case (non fast-path above) with both types of algorithm.
+ *
+ *  - use -XX:+PrintGC to verify memory consumption of the benchmarks.
+ *    (See "Checking Memory Consumption" below).
+ *
+ * Description:
+ *
+ *  Fast-path algorithm for format(double...)  call stack is very different  of
+ *  the standard call stack. Where the  standard algorithm for formating double
+ *  uses internal class sun.misc.FloatingDecimal and its dtoa(double) method to
+ *  provide digits,  fast-path embeds its own  algorithm for  binary to decimal
+ *  string conversion.
+ *
+ *  FloatingDecimal always converts completely  the passed double to  a string.
+ *  Fast-path converts  only to the needed digits  since it follows constraints
+ *  on both the pattern rule,  the  DecimalFormat instance properties, and  the
+ *  passed double.
+ *
+ *  Micro benchmarks below measure  the throughput for formating double  values
+ *  using NumberFormat.format(double)  call stack.  The  standard DecimalFormat
+ *  call stack as well as the  fast-path algorithm implementation are sensitive
+ *  to the nature of the passed double values regarding throughput performance.
+ *
+ *  These benchmarks are useful both  for measuring the global performance gain
+ *  of fast-path and to check that any modification done on fast-path algorithm
+ *  does not bring any regression in the performance boost of fast-path.
+ *
+ *  Note  that these benchmarks  will provide numbers  without any knowledge of
+ *  the  implementation of DecimalFormat class. So  to check regression any run
+ *  should be compared to another reference run with  a previous JDK, wether or
+ *  not this previous reference JDK contains fast-path implementation.
+ *
+ *  The eight benchmarks below are dedicated to measure throughput on different
+ *  kinds of double that all fall in the fast-path case (all in Integer range):
+ *
+ *  - Integer case : used double values are all "integer-like" (ex: -12345.0).
+ *    This is the benchFormatInteger micro-benchmark.
+ *
+ *  - Fractional case : double values are "fractional" (ex: -0.12345).
+ *    This is the benchFormatFractional micro-benchmark.
+ *
+ *  - Small integral case : like Integer case but double values are all limited
+ *    in their magnitude, from -500.0 to 500.0 if the number of iterations N is
+ *    set to 500000.
+ *    This is the benchFormatSmallIntegral micro-benchmark.
+ *
+ *  - Fractional All Nines : doubles values have fractional part that is very
+ *    close to "999" (decimal pattern), or "99" (currency pattern),
+ *    or "0000...".
+ *    This is the benchFormatFractionalAllNines micro-benchmark.
+ *
+ *  - All Nines : double values are such that both integral and fractional
+ *    part consist only of '9' digits. None of these values are rounded up.
+ *    This is the benchFormatAllNines micro-benchmark.
+ *
+ *  - Fair simple case : calling J the loop variable and iterating over
+ *    the N number of iterations, used double values are computed as
+ *    d = (double) J + J*seed
+ *    where seed is a very small value that adds a fractional part and adds a
+ *    small number to integral part. Provides fairly distributed double values.
+ *    This is the benchFormatFairSimple micro-benchmark.
+ *
+ *  - Fair case : this is a combination of small integral case and fair simple
+ *    case. Double values are limited in their magnitude but follow a parabolic
+ *    curve y = x**2 / K, keeping large magnitude only for large values of J.
+ *    The intent is trying to reproduce a distribution of double values as could
+ *    be found in a business application, with most values in either the low
+ *    range or the high range.
+ *    This is the benchFormatFair micro-benchmark.
+ *
+ *  - Tie cases: values are very close to a tie case (iii...ii.fff5)
+ *    That is the worst situation that can happen for Fast-path algorithm when
+ *    considering throughput.
+ *    This is the benchFormatTie micro-benchmark.
+ *
+ *  For  all  of  the micro-benchmarks,  the  throughput load   of the eventual
+ *  additional computations inside the loop is calculated  prior to running the
+ *  benchmark, and provided in the output.  That may be  useful since this load
+ *  may vary for each architecture or machine configuration.
+ *
+ *  The "-verbose" flag,  when set, provides the  throughput  load numbers, the
+ *  time spent for  each run of  a benchmark, as  well as an estimation  of the
+ *  memory consumed  by the  runs.  Beware of  incremental  GCs, see  "Checking
+ *  Memory  Consumption" section below. Every run   should be done with correct
+ *  ms, mx, and NewSize vm options to get fully reliable numbers.
+ *
+ *  The output provides the  mean time needed for  a benchmark after the server
+ *  jit compiler has done its optimization work if  any. Thus only the last but
+ *  first three runs are taken into account in the time measurement (server jit
+ *  compiler shows  to have  done full  optimization  in  most cases  after the
+ *  second run, given a base number of iterations set to 500000).
+ *
+ *  The program cleans up memory (stabilizeMemory() method) between each run of
+ *  the benchmarks to make sure that  no garbage collection activity happens in
+ *  measurements. However that does not  preclude incremental GCs activity that
+ *  may  happen during the micro-benchmark if  -Xms, -Xmx, and NewSize options
+ *  have not been tuned and set correctly.
+ *
+ * Checking Memory Consumption:
+ *
+ *  For getting confidence  in the throughput numbers, there  must not give any
+ *  GC activity during the benchmark runs. That  means that specific VM options
+ *  related to memory must be tuned for any given implementation of the JDK.
+ *
+ *  Running with "-verbose" arguments will provide  clues of the memory consumed
+ *  but  is   not enough,  since  any   unexpected  incremental  GC  may  lower
+ *  artificially the estimation of the memory consumption.
+ *
+ *  Options to  set are -Xms, -Xmx,  -XX:NewSize, plus -XX:+PrintGC to evaluate
+ *  correctly  the  values of  these options. When  running "-verbose", varying
+ *  numbers reported for memory consumption may  indicate bad choices for these
+ *  options.
+ *
+ *  For jdk80b25, fast-path shows a consuption of ~60Mbs for 500000 iterations
+ *  while a jdk without fast-path will consume ~260Mbs for each benchmark run.
+ *  Indeed these values will vary depending on the jdk used.
+ *
+ *  Correct option settings found jdk80b48 were :
+ *     fast-path :     -Xms128m -Xmx128m -XX:NewSize=100m
+ *     non fast-path : -Xms500m -Xmx500m -XX:NewSize=400m
+ *  Greater values can be provided safely but not smaller ones.
+ * ----------------------------------------------------------------------
+ */
+
+import java.util.*;
+import java.text.NumberFormat;
+import java.text.DecimalFormat;
+
+public class FormatMicroBenchmark {
+
+    // The number of times the bench method will be run (must be at least 4).
+    private static final int NB_RUNS = 20;
+
+    // The bench* methods below all iterates over [-MAX_RANGE , +MAX_RANGE] integer values.
+    private static final int MAX_RANGE = 500000;
+
+    // Flag for more details on each bench run (default is no).
+    private static boolean Verbose = false;
+
+    // Should we really execute the benches ? (no by default).
+    private static boolean DoIt = false;
+
+    // Prints out a message describing how to run the program.
+    private static void usage() {
+        System.out.println(
+            "This is a set of micro-benchmarks testing throughput of " +
+            "java.text.DecimalFormat.format(). It never fails.\n\n" +
+            "Usage and arguments:\n" +
+            " - Run with no argument skips the whole benchmark and exits.\n" +
+            " - Run with \"-help\" as first argument prints this message and exits.\n" +
+            " - Run with \"-doit\" runs the benchmark with summary details.\n" +
+            " - Run with \"-verbose\" provides additional details on the run.\n\n" +
+            "Example run :\n" +
+            "   java -Xms500m -Xmx500m -XX:NewSize=400m FormatMicroBenchmark -doit -verbose\n\n" +
+            "Note: \n" +
+            " - Vm options -Xms, -Xmx, -XX:NewSize must be set correctly for \n" +
+            "   getting reliable numbers. Otherwise GC activity may corrupt results.\n" +
+            "   As of jdk80b48 using \"-Xms500m -Xmx500m -XX:NewSize=400m\" covers \n" +
+            "   all cases.\n" +
+            " - Optionally using \"-XX:+printGC\" option provides information that \n" +
+            "   helps checking any GC activity while benches are run.\n\n" +
+            "Look at the heading comments and description in source code for " +
+            "detailed information.\n");
+    }
+
+    /* We will call stabilizeMemory before each call of benchFormat***().
+     * This in turn tries to clean up as much memory as possible.
+     * As a safe bound we limit number of System.gc() calls to 10,
+     * but most of the time two calls to System.gc() will be enough.
+     * If memory reporting is asked for, the method returns the difference
+     * of free memory between entering an leaving the method.
+     */
+    private static long stabilizeMemory(boolean reportConsumedMemory) {
+        final long oneMegabyte = 1024L * 1024L;
+
+        long refMemory = 0;
+        long initialMemoryLeft = Runtime.getRuntime().freeMemory();
+        long currMemoryLeft = initialMemoryLeft;
+        int nbGCCalls = 0;
+
+        do {
+            nbGCCalls++;
+
+            refMemory = currMemoryLeft;
+            System.gc();
+            currMemoryLeft = Runtime.getRuntime().freeMemory();
+
+        } while ((Math.abs(currMemoryLeft - refMemory) > oneMegabyte) &&
+                 (nbGCCalls < 10));
+
+        if (Verbose &&
+            reportConsumedMemory)
+            System.out.println("Memory consumed by previous run : " +
+                               (currMemoryLeft - initialMemoryLeft)/oneMegabyte + "Mbs.");
+
+        return currMemoryLeft;
+    }
+
+
+    // ---------- Integer only based bench --------------------
+    private static final String INTEGER_BENCH = "benchFormatInteger";
+    private static String benchFormatInteger(NumberFormat nf) {
+        String str = "";
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++)
+            str = nf.format((double) j);
+        return str;
+    }
+
+    // This reproduces the throughput load added in benchFormatInteger
+    static double integerThroughputLoad() {
+        double d = 0.0d;
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++) {
+            d = (double) j;
+        }
+        return d;
+    }
+
+    // Runs integerThroughputLoad and calculate its mean load
+    static void calculateIntegerThroughputLoad() {
+        int nbRuns = NB_RUNS;
+        long elapsedTime = 0;
+        double foo;
+
+        for (int i = 1; i <= nbRuns; i++) {
+
+            long startTime = System.nanoTime();
+            foo = integerThroughputLoad();
+            long estimatedTime = System.nanoTime() - startTime;
+            if (i > 3) elapsedTime += estimatedTime / 1000;
+        }
+
+
+        if (Verbose)
+            System.out.println(
+               "calculated throughput load for " + INTEGER_BENCH +
+               " bench is = " + (elapsedTime / (nbRuns - 3)) + " microseconds");
+    }
+
+    // ---------- Fractional only based bench --------------------
+    private static final String FRACTIONAL_BENCH = "benchFormatFractional";
+    private static String benchFormatFractional(NumberFormat nf) {
+        String str = "";
+        double floatingN = 1.0d / (double) MAX_RANGE;
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++)
+            str = nf.format(floatingN * (double) j);
+        return str;
+    }
+
+    // This reproduces the throughput load added in benchFormatFractional
+    static double fractionalThroughputLoad() {
+        double d = 0.0d;
+        double floatingN = 1.0d / (double) MAX_RANGE;
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++) {
+            d = floatingN * (double) j;
+        }
+        return d;
+    }
+
+    // Runs fractionalThroughputLoad and calculate its mean load
+    static void calculateFractionalThroughputLoad() {
+        int nbRuns = NB_RUNS;
+        long elapsedTime = 0;
+        double foo;
+
+        for (int i = 1; i <= nbRuns; i++) {
+
+            long startTime = System.nanoTime();
+            foo = fractionalThroughputLoad();
+            long estimatedTime = System.nanoTime() - startTime;
+            if (i > 3) elapsedTime += estimatedTime / 1000;
+        }
+
+        if (Verbose)
+        System.out.println(
+            "calculated throughput load for " + FRACTIONAL_BENCH +
+            " bench is = " + (elapsedTime / (nbRuns - 3)) + " microseconds");
+    }
+
+    // ---------- An Small Integral bench --------------------
+    //  that limits the magnitude of tested double values
+    private static final String SMALL_INTEGRAL_BENCH = "benchFormatSmallIntegral";
+    private static String benchFormatSmallIntegral(NumberFormat nf) {
+        String str = "";
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++)
+            str = nf.format(((double) j) / 1000.0d);
+        return str;
+    }
+
+    // This reproduces the throughput load added in benchFormatSmallIntegral
+    static double smallIntegralThroughputLoad() {
+        double d = 0.0d;
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++) {
+            d = (double) j / 1000.0d;
+        }
+        return d;
+    }
+
+    // Runs small_integralThroughputLoad and calculate its mean load
+    static void calculateSmallIntegralThroughputLoad() {
+        int nbRuns = NB_RUNS;
+        long elapsedTime = 0;
+        double foo;
+
+        for (int i = 1; i <= nbRuns; i++) {
+
+            long startTime = System.nanoTime();
+            foo = smallIntegralThroughputLoad();
+            long estimatedTime = System.nanoTime() - startTime;
+            if (i > 3) elapsedTime += estimatedTime / 1000;
+        }
+
+        if (Verbose)
+        System.out.println(
+            "calculated throughput load for " + SMALL_INTEGRAL_BENCH +
+            " bench is = " + (elapsedTime / (nbRuns - 3)) + " microseconds");
+    }
+
+    // ---------- A fair and simple bench --------------------
+    private static final String FAIR_SIMPLE_BENCH = "benchFormatFairSimple";
+    private static String benchFormatFairSimple(NumberFormat nf, boolean isCurrency) {
+        String str = "";
+        double seed = isCurrency ?  0.0010203040506070809 : 0.00010203040506070809;
+        double d = (double) -MAX_RANGE;
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++) {
+            d = d  + 1.0d + seed;
+            str = nf.format(d);
+        }
+        return str;
+    }
+
+    // This reproduces the throughput load added in benchFormatFairSimple
+    static double fairSimpleThroughputLoad() {
+        double seed =  0.00010203040506070809;
+        double delta = 0.0d;
+        double d = (double) -MAX_RANGE;
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++) {
+            d = d + 1.0d + seed;
+        }
+        return d;
+    }
+
+    // Runs fairThroughputLoad and calculate its mean load
+    static void calculateFairSimpleThroughputLoad() {
+        int nbRuns = NB_RUNS;
+        long elapsedTime = 0;
+        double foo;
+
+        for (int i = 1; i <= nbRuns; i++) {
+
+            long startTime = System.nanoTime();
+            foo = fairSimpleThroughputLoad();
+            long estimatedTime = System.nanoTime() - startTime;
+            if (i > 3) elapsedTime += estimatedTime / 1000;
+        }
+
+        if (Verbose)
+        System.out.println(
+            "calculated throughput load for " + FAIR_SIMPLE_BENCH +
+            " bench is = " + (elapsedTime / (nbRuns - 3)) + " microseconds");
+    }
+
+    // ---------- Fractional part is only made of nines bench --------------
+    private static final String FRACTIONAL_ALL_NINES_BENCH = "benchFormatFractionalAllNines";
+    private static String benchFormatFractionalAllNines(NumberFormat nf, boolean isCurrency) {
+        String str = "";
+        double fractionalEven = isCurrency ?  0.993000001 : 0.99930000001;
+        double fractionalOdd  = isCurrency ?  0.996000001 : 0.99960000001;
+        double fractional;
+        double d;
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++) {
+            if ((j & 1) == 0)
+                fractional = fractionalEven;
+            else
+                fractional = fractionalOdd;
+            if ( j >= 0)
+                d = (double ) j + fractional;
+            else d = (double) j - fractional;
+            str = nf.format(d);
+        }
+        return str;
+    }
+
+    // This reproduces the throughput load added in benchFormatFractionalAllNines
+    static double fractionalAllNinesThroughputLoad() {
+        double fractionalEven = 0.99930000001;
+        double fractionalOdd  = 0.99960000001;
+        double fractional;
+        double d = 0.0d;
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++) {
+            if ((j & 1) == 0)
+                fractional = fractionalEven;
+            else fractional = fractionalOdd;
+            if ( j >= 0)
+                d = (double ) j + fractional;
+            else d = (double) j - fractional;
+        }
+        return d;
+    }
+
+    // Runs fractionalAllNinesThroughputLoad and calculate its mean load
+    static void calculateFractionalAllNinesThroughputLoad() {
+        int nbRuns = NB_RUNS;
+        long elapsedTime = 0;
+        double foo;
+
+        for (int i = 1; i <= nbRuns; i++) {
+
+            long startTime = System.nanoTime();
+            foo = fractionalAllNinesThroughputLoad();
+            long estimatedTime = System.nanoTime() - startTime;
+            if (i > 3) elapsedTime += estimatedTime / 1000;
+        }
+
+        if (Verbose)
+            System.out.println(
+               "calculated throughput load for " + FRACTIONAL_ALL_NINES_BENCH +
+               " bench is = " + (elapsedTime / (nbRuns - 3)) + " microseconds");
+    }
+
+    // ---------- Number is only made of nines bench --------------
+    private static final String ALL_NINES_BENCH = "benchFormatAllNines";
+    private static String benchFormatAllNines(NumberFormat nf, boolean isCurrency) {
+        String str = "";
+        double[] decimaAllNines =
+            {9.9993, 99.9993, 999.9993, 9999.9993, 99999.9993,
+             999999.9993, 9999999.9993, 99999999.9993, 999999999.9993};
+        double[] currencyAllNines =
+            {9.993, 99.993, 999.993, 9999.993, 99999.993,
+             999999.993, 9999999.993, 99999999.993, 999999999.993};
+        double[] valuesArray = (isCurrency) ? currencyAllNines : decimaAllNines;
+        double seed = 1.0 / (double) MAX_RANGE;
+        double d;
+        int id;
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++) {
+            id = (j >=  0) ? j % 9 : -j % 9;
+            if ((j & 1) == 0)
+                d = valuesArray[id] + id * seed;
+            else
+                d = valuesArray[id] - id * seed;
+            str = nf.format(d);
+        }
+        return str;
+    }
+
+    // This reproduces the throughput load added in benchFormatAllNines
+    static double allNinesThroughputLoad() {
+        double[] decimaAllNines =
+            {9.9993, 99.9993, 999.9993, 9999.9993, 99999.9993,
+             999999.9993, 9999999.9993, 99999999.9993, 999999999.9993};
+        double[] valuesArray = decimaAllNines;
+        double seed = 1.0 / (double) MAX_RANGE;
+        double d = 0.0d;
+        int id;
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++) {
+            id = (j >=  0) ? j % 9 : -j % 9;
+            if ((j & 1) == 0)
+                d = valuesArray[id] + id * seed;
+            else
+                d = valuesArray[id] - id * seed;
+        }
+        return d;
+    }
+
+    // Runs allNinesThroughputLoad and calculate its mean load
+    static void calculateAllNinesThroughputLoad() {
+        int nbRuns = NB_RUNS;
+        long elapsedTime = 0;
+        double foo;
+
+        for (int i = 1; i <= nbRuns; i++) {
+
+            long startTime = System.nanoTime();
+            foo = allNinesThroughputLoad();
+            long estimatedTime = System.nanoTime() - startTime;
+            if (i > 3) elapsedTime += estimatedTime / 1000;
+        }
+
+        if (Verbose)
+            System.out.println(
+               "calculated throughput load for " + ALL_NINES_BENCH +
+               " bench is = " + (elapsedTime / (nbRuns - 3)) + " microseconds");
+    }
+
+
+
+    // --- A fair bench trying (hopefully) to reproduce business applicatons  ---
+
+    /*  benchFormatFair uses the following formula :
+     *   y = F(x) = sign(x) * x**2 * ((1000/MAX_RANGE)**2).
+     *
+     *  which converts in the loop as (if j is the loop index) :
+     *   x = double(j)
+     *   k = 1000.0d * double(MAX_RANGE)
+     *   y = sign(j) * x**2 * k**2
+     *
+     *  This is a flattened parabolic curve where only the j values
+     *  in [-1000, 1000] will provide y results in [-1, +1] interval,
+     *  and for abs(j) >= 1000 the result y will be greater than 1.
+     *
+     *  The difference with benchFormatSmallIntegral is that since y results
+     *  follow a parabolic curve the magnitude of y grows much more rapidly
+     *  and closer to j values when abs(j) >= 1000:
+     *   - for |j| < 1000,  SmallIntegral(j) < 1.0 and fair(j) < 1.0
+     *   - for j in [1000, 10000[
+     *      SmallIntegral(j) is in [1, 10[
+     *      Fair(j) is in [4, 400[
+     *   - for j in [10000,100000[
+     *      SmallIntegral(j) is in [10, 100[
+     *      Fair(j) is in [400,40000[
+     *   - for j in [100000,1000000[
+     *      SmallIntegral(j) is in [100, 1000[
+     *      Fair(j) is in [40000, 4000000[
+     *
+     *  Since double values for j less than 100000 provide only 4 digits in the
+     *  integral, values greater than 250000 provide at least 6 digits, and 500000
+     *  computes to 1000000, the distribution is roughly half with less than 5
+     *  digits and half with at least 6 digits in the integral part.
+     *
+     *  Compared to FairSimple bench, this represents an application where 20% of
+     *  the double values to format are less than 40000.0 absolute value.
+     *
+     *  Fair(j) is close to the magnitude of j when j > 100000 and is hopefully
+     *  more representative of what may be found in general in business apps.
+     *  (assumption : there will be mainly either small or large values, and
+     *   less values in middle range).
+     *
+     *  We could get even more precise distribution of values using formula :
+     *   y = sign(x) * abs(x)**n * ((1000 / MAX_RANGE)**n) where n > 2,
+     *  or even well-known statistics function to fine target such distribution,
+     *  but we have considred that the throughput load for calculating y would
+     *  then be too high. We thus restrain the use of a power of 2 formula.
+     */
+
+    private static final String FAIR_BENCH = "benchFormatFair";
+    private static String benchFormatFair(NumberFormat nf) {
+        String str = "";
+        double k = 1000.0d / (double) MAX_RANGE;
+        k *= k;
+
+        double d;
+        double absj;
+        double jPowerOf2;
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++) {
+            absj = (double) j;
+            jPowerOf2 = absj * absj;
+            d = k * jPowerOf2;
+            if (j < 0) d = -d;
+            str = nf.format(d);
+        }
+        return str;
+    }
+
+    // This is the exact throughput load added in benchFormatFair
+    static double fairThroughputLoad() {
+        double k = 1000.0d / (double) MAX_RANGE;
+        k *= k;
+
+        double d = 0.0d;
+        double absj;
+        double jPowerOf2;
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++) {
+            absj = (double) j;
+            jPowerOf2 = absj * absj;
+            d = k * jPowerOf2;
+            if (j < 0) d = -d;
+        }
+        return d;
+    }
+
+    // Runs fairThroughputLoad and calculate its mean load
+    static void calculateFairThroughputLoad() {
+        int nbRuns = NB_RUNS;
+        long elapsedTime = 0;
+        double foo;
+
+        for (int i = 1; i <= nbRuns; i++) {
+
+            long startTime = System.nanoTime();
+            foo = fairThroughputLoad();
+            long estimatedTime = System.nanoTime() - startTime;
+            if (i > 3) elapsedTime += estimatedTime / 1000;
+        }
+
+        if (Verbose)
+            System.out.println(
+               "calculated throughput load for " + FAIR_BENCH +
+               " bench is = " + (elapsedTime / (nbRuns - 3)) + " microseconds");
+    }
+
+    // ---------- All double values are very close to a tie --------------------
+    // i.e. like 123.1235 (for decimal case) or 123.125 (for currency case).
+
+    private static final String TIE_BENCH = "benchFormatTie";
+    private static String benchFormatTie(NumberFormat nf, boolean isCurrency) {
+        double d;
+        String str = "";
+        double fractionaScaling = (isCurrency) ? 1000.0d : 10000.0d;
+        int fixedFractionalPart = (isCurrency) ? 125 : 1235;
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++) {
+            d = (((double) j * fractionaScaling) +
+                 (double) fixedFractionalPart) / fractionaScaling;
+            str = nf.format(d);
+        }
+        return str;
+    }
+
+    // This is the exact throughput load added in benchFormatTie
+    static double tieThroughputLoad(boolean isCurrency) {
+        double d = 0.0d;
+        double fractionaScaling = (isCurrency) ? 1000.0d : 10000.0d;
+        int fixedFractionalPart = (isCurrency) ? 125 : 1235;
+        for (int j = - MAX_RANGE; j <= MAX_RANGE; j++) {
+            d = (((double) j * fractionaScaling) +
+                 (double) fixedFractionalPart) / fractionaScaling;
+        }
+        return d;
+    }
+
+    // Runs tieThroughputLoad and calculate its mean load
+    static void calculateTieThroughputLoad(boolean isCurrency) {
+        int nbRuns = NB_RUNS;
+        long elapsedTime = 0;
+        double foo;
+
+        for (int i = 1; i <= nbRuns; i++) {
+
+            long startTime = System.nanoTime();
+            foo = tieThroughputLoad(isCurrency);
+            long estimatedTime = System.nanoTime() - startTime;
+            if (i > 3) elapsedTime += estimatedTime / 1000;
+        }
+
+        if (Verbose)
+            System.out.println(
+               "calculated throughput load for " + TIE_BENCH +
+               " bench is = " + (elapsedTime / (nbRuns - 3)) + " microseconds");
+    }
+
+
+    // Print statistics for passed times results of benchName.
+    static void printPerfResults(long[] times, String benchName) {
+        int nbBenches = times.length;
+
+        long totalTimeSpent = 0;
+        long meanTimeSpent;
+
+        double variance = 0;
+        double standardDeviation = 0;
+
+        // Calculates mean spent time
+        for (int i = 1; i <= nbBenches; i++)
+            totalTimeSpent += times[i-1];
+        meanTimeSpent = totalTimeSpent / nbBenches;
+
+        // Calculates standard deviation
+        for (int j = 1; j <= nbBenches; j++)
+            variance += Math.pow(((double)times[j-1] - (double)meanTimeSpent), 2);
+        variance = variance / (double) times.length;
+        standardDeviation = Math.sqrt(variance) / meanTimeSpent;
+
+        // Print result and statistics for benchName
+        System.out.println(
+           "Statistics (starting at 4th bench) for bench " + benchName +
+           "\n for last " + nbBenches +
+           " runs out of " + NB_RUNS +
+           " , each with 2x" + MAX_RANGE + " format(double) calls : " +
+           "\n  mean exec time = " + meanTimeSpent + " microseconds" +
+           "\n  standard deviation = " + String.format("%.3f", standardDeviation) + "% \n");
+    }
+
+    public static void main(String[] args) {
+
+        if (args.length >= 1) {
+            // Parse args, just checks expected ones. Ignore others or dups.
+            if (args[0].equals("-help")) {
+                usage();
+                return;
+            }
+
+            for (String s : args) {
+                if (s.equals("-doit"))
+                    DoIt = true;
+                else if (s.equals("-verbose"))
+                    Verbose = true;
+            }
+        } else {
+            // No arguments, skips the benchmarks and exits.
+            System.out.println(
+                "Test skipped with success by default. See -help for details.");
+            return;
+        }
+
+        if (!DoIt) {
+            if (Verbose)
+                usage();
+            System.out.println(
+                "Test skipped and considered successful.");
+            return;
+        }
+
+        System.out.println("Single Threaded micro benchmark evaluating " +
+                           "the throughput of java.text.DecimalFormat.format() call stack.\n");
+
+        String fooString = "";
+
+        // Run benches for decimal instance
+        DecimalFormat df = (DecimalFormat) NumberFormat.getInstance(Locale.US);
+        System.out.println("Running with a decimal instance of DecimalFormat.");
+
+        calculateIntegerThroughputLoad();
+        fooString =
+            BenchType.INTEGER_BENCH.runBenchAndPrintStatistics(NB_RUNS, df, false);
+
+        calculateFractionalThroughputLoad();
+        fooString =
+            BenchType.FRACTIONAL_BENCH.runBenchAndPrintStatistics(NB_RUNS, df, false);
+
+        calculateSmallIntegralThroughputLoad();
+        fooString =
+            BenchType.SMALL_INTEGRAL_BENCH.runBenchAndPrintStatistics(NB_RUNS, df, false);
+
+        calculateFractionalAllNinesThroughputLoad();
+        fooString =
+            BenchType.FRACTIONAL_ALL_NINES_BENCH.runBenchAndPrintStatistics(NB_RUNS, df, false);
+
+        calculateAllNinesThroughputLoad();
+        fooString =
+            BenchType.ALL_NINES_BENCH.runBenchAndPrintStatistics(NB_RUNS, df, false);
+
+        calculateFairSimpleThroughputLoad();
+        fooString =
+            BenchType.FAIR_SIMPLE_BENCH.runBenchAndPrintStatistics(NB_RUNS, df, false);
+
+        calculateFairThroughputLoad();
+        fooString =
+            BenchType.FAIR_BENCH.runBenchAndPrintStatistics(NB_RUNS, df, false);
+
+        calculateTieThroughputLoad(false);
+        fooString =
+            BenchType.TIE_BENCH.runBenchAndPrintStatistics(NB_RUNS, df, false);
+
+        // Run benches for currency instance
+        DecimalFormat cf = (DecimalFormat) NumberFormat.getCurrencyInstance(Locale.US);
+        System.out.println("Running with a currency instance of DecimalFormat.");
+
+        calculateIntegerThroughputLoad();
+        fooString =
+            BenchType.INTEGER_BENCH.runBenchAndPrintStatistics(NB_RUNS, cf, false);
+
+        calculateFractionalThroughputLoad();
+        fooString =
+            BenchType.FRACTIONAL_BENCH.runBenchAndPrintStatistics(NB_RUNS, cf, false);
+
+        calculateSmallIntegralThroughputLoad();
+        fooString =
+            BenchType.SMALL_INTEGRAL_BENCH.runBenchAndPrintStatistics(NB_RUNS, cf, false);
+
+        calculateFractionalAllNinesThroughputLoad();
+        fooString =
+            BenchType.FRACTIONAL_ALL_NINES_BENCH.runBenchAndPrintStatistics(NB_RUNS, cf, false);
+
+        calculateAllNinesThroughputLoad();
+        fooString =
+            BenchType.ALL_NINES_BENCH.runBenchAndPrintStatistics(NB_RUNS, cf, false);
+
+        calculateFairSimpleThroughputLoad();
+        fooString =
+            BenchType.FAIR_SIMPLE_BENCH.runBenchAndPrintStatistics(NB_RUNS, cf, false);
+
+        calculateFairThroughputLoad();
+        fooString =
+            BenchType.FAIR_BENCH.runBenchAndPrintStatistics(NB_RUNS, cf, false);
+
+        calculateTieThroughputLoad(false);
+        fooString =
+            BenchType.TIE_BENCH.runBenchAndPrintStatistics(NB_RUNS, cf, false);
+
+    }
+
+    // This class to factorise what would be duplicated otherwise.
+    static enum BenchType {
+
+        INTEGER_BENCH("benchFormatInteger"),
+        FRACTIONAL_BENCH("benchFormatFractional"),
+        SMALL_INTEGRAL_BENCH("benchFormatSmallIntegral"),
+        FAIR_SIMPLE_BENCH("benchFormatFairSimple"),
+        FRACTIONAL_ALL_NINES_BENCH("benchFormatFractionalAllNines"),
+        ALL_NINES_BENCH("benchFormatAllNines"),
+        FAIR_BENCH("benchFormatFair"),
+        TIE_BENCH("benchFormatTie");
+
+        private final String name;
+
+        BenchType(String name) {
+            this.name = name;
+        }
+
+        String runBenchAndPrintStatistics(int nbRuns,
+                         NumberFormat nf,
+                         boolean isCurrency) {
+
+            // We eliminate the first 3 runs in the time measurements
+            // to let C2 do complete compilation and optimization work.
+            long[] elapsedTimes = new long[nbRuns - 3];
+
+            System.out.println("Now running " + nbRuns + " times bench " + name);
+
+            String str = "";
+            for (int i = 1; i <= nbRuns; i++) {
+
+                stabilizeMemory(false);
+                long startTime = System.nanoTime();
+
+                switch(this) {
+                case INTEGER_BENCH :
+                    str = benchFormatInteger(nf);
+                    break;
+                case FRACTIONAL_BENCH :
+                    str = benchFormatFractional(nf);
+                    break;
+                case SMALL_INTEGRAL_BENCH :
+                    str = benchFormatSmallIntegral(nf);
+                    break;
+                case FRACTIONAL_ALL_NINES_BENCH :
+                    str = benchFormatFractionalAllNines(nf, isCurrency);
+                    break;
+                case ALL_NINES_BENCH :
+                    str = benchFormatAllNines(nf, isCurrency);
+                    break;
+                case FAIR_SIMPLE_BENCH :
+                    str = benchFormatFairSimple(nf, isCurrency);
+                    break;
+                case FAIR_BENCH :
+                    str = benchFormatFair(nf);
+                    break;
+                case TIE_BENCH :
+                    str = benchFormatTie(nf, isCurrency);
+                    break;
+
+                default:
+                }
+
+
+                long estimatedTime = System.nanoTime() - startTime;
+                if (i > 3)
+                    elapsedTimes[i-4] = estimatedTime / 1000;
+
+                if (Verbose)
+                    System.out.println(
+                                       "calculated time for " + name +
+                                       " bench " + i + " is = " +
+                                       (estimatedTime / 1000) + " microseconds");
+                else System.out.print(".");
+
+                stabilizeMemory(true);
+            }
+
+            System.out.println(name + " Done.");
+
+            printPerfResults(elapsedTimes, name);
+
+            return str;
+        }
+    }
+
+}
diff --git a/jdk/test/java/text/Format/DecimalFormat/GoldenDoubleValues.java b/jdk/test/java/text/Format/DecimalFormat/GoldenDoubleValues.java
new file mode 100644
index 00000000000..10cf74d69eb
--- /dev/null
+++ b/jdk/test/java/text/Format/DecimalFormat/GoldenDoubleValues.java
@@ -0,0 +1,965 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* Set of constants and values used in RoundingAndPropertyTest.java.
+ *
+ * There are 5 different information in this class:
+ * - TestLocale is the locale used by RoundingAndPropertyTest regression test
+ *   when calling DecimalFormat.format() on either the set of DecimalGoldenValues
+ *   or CurrencyGoldenValues.
+ *   See main method of RoundingAndPropertyTest.
+ *
+ * - FullLocalizationTestLocale is the locale used by RoundingAndPropertyTest
+ *   regression test when calling DecimalFormat.format() on the set of values
+ *   (DecimalLocalizationValues) used to test that localization of digits
+ *   happens correctly when needed.
+ *   See main method of RoundingAndPropertyTest.
+ *
+ * - DecimalLocalizationValues is an array containing all the double values used
+ *   to check that localization of digits happens correctly when needed.
+ *   See RoundingAndPropertyTest.testLocalizationValues() method.
+ *
+ * - DecimalGoldenValues and CurrencyGoldenValues are arrays containing all the
+ *   double values that will be used as input when checking correctness of
+ *   results returned by DecimalFormat.format().
+ *   2 arrays are needed since decimal and currency formatting patterns require
+ *   a different number of digits after decimal point.
+ *   See RoundingAndPropertyTest.testGoldenValues() method.
+ *
+ * - PROPERTY_CHECK_POSITIVE_VALUE and PROPERTY_CHECK_NEGATIVE_VALUE are the
+ *   double values used for testing the validity of the property changes call
+ *   in the fast-path case. The locale used in that case is TestLocale.
+ *   See RoundingAndPropertyTest.testSettersAndFastPath() method.
+ */
+
+import java.util.*;
+
+class GoldenDoubleValues {
+
+    // TestLocale is the testing locale used by RoundingAndPropertyTest test,
+    // when testing the golden double values
+    static final Locale TestLocale = new Locale("en", "US");
+
+
+    // FullTestLocale is the testing locale used by RoundingAndPropertyTest test,
+    // when testing full localization of double values.
+    static final Locale FullLocalizationTestLocale = new Locale("hi", "IN");
+
+
+    /* Below are the two double values used for exercising the changes of
+     * of DecimalFormat properties and symbols. These values are also used
+     * as golden values (see golden arrays below).
+     */
+
+    /* PROPERTY_CHECK_NEGATIVE_VALUE is the negative double value used for
+     * testing the validity of the property changes for fast-path.
+     * See testSettersAndFastPath() in RoundingAndPropertyTest test.
+     */
+    static final double PROPERTY_CHECK_NEGATIVE_VALUE = -2147483646.2334997d;
+
+    /* PROPERTY_CHECK_POSITIVE_VALUE is the positive double value used for
+     * testing the validity of the property changes for fast-path.
+     * See testSettersAndFastPath() in RoundingAndPropertyTest test.
+     */
+    static final double PROPERTY_CHECK_POSITIVE_VALUE =  2147483646.2335003d;
+
+    /* --- Array of double values to test localization ------------------------
+     *
+     * For most locales, effective localization does not happen on digits, i.e.
+     * the digits are not changed due to localization. In order to check that
+     * fast-path localize correctly digits in such a case, the array of double
+     * values below deals with all the case of localization that may happen on
+     * digits
+     */
+    static final double[] DecimalLocalizationValues = {
+        1.123,
+        12.123,
+        123.123,
+        1234.123,
+        12345.123,
+        123456.123,
+        1234567.123,
+        12345678.123,
+        123456789.123,
+        1234567890.123,
+        1234.0,
+        1234.9,
+        1234.99,
+        1234.999
+    };
+
+
+    /* --- Arrays of golden double values ----------------------------------
+     *
+     * The   GoldenValues arrays  are used   as input values   for checking the
+     * correctness  of  the    DecimalFormat.format()  call  results  done   in
+     * RoundingAndPropertyTest regression test. The results are compared to the
+     * expected ones  found in  GoldenFormattedValues.  For each value   in the
+     * arrays  there  is   a corresponding    expected  string  result   found,
+     * represented as an array  of unicode values, at  the same index  in the
+     * related GoldenFormattedValues array.  The string returned by  the format
+     * call and the found in GoldenFormattedValues array  must be equal for the
+     * result to be considered valid.
+     * See RoundingAndPropertyTest.testGoldenValues() method.
+     *
+     * We  need 2  such  GoldenValues  arrays  since the decimal  and  currency
+     * formatting rules require different number of digits after decimal point.
+     *
+     * Thus we have two different arrays of golden values:
+     *  - DecimalGoldenValues for the decimal case.
+     *  - CurrencyGoldenValues for the currency case.
+     *
+     * They are associated to related GoldenFormattedValues arrays, generated by
+     * running RoundingAndPropertyTest with a "gengold" argument:
+     *  - DecimalGoldenFormattedValues for the decimal case.
+     *  - CurrencyGoldenFormattedValues for the currency case.
+     * These two generated arrays are found in GoldenFormattedValues.java file.
+     *
+     * The  impact of the formatting rules  is as follows,  because the pattern
+     * rule for  the  fractional  part is different   for  decimal and currency
+     * patterns:
+     *  - in decimal case one must output the first non-zero 3 digits of
+     *    fractional part 1.1232 => "1.123" and 1.12016789 => "1.12"
+     *  - in currency case the first 2 fractional digits are always output
+     *    1.1232 => "1.12" and 1.0016789 => "1.00"
+     *
+     * Thus we  need a different  number of  fractional digits when  we specify
+     * below the golden double values to check, and most of the decimal and
+     * currency golden values differ only in the number of fractional digits.
+     *
+     * The list below exercises almost all code pathes of the fast-path
+     * algorithm except localization of digits.
+     */
+
+    // --- The set of golden values for the Decimal formatting case --------
+    static final double[] DecimalGoldenValues = {
+        // Testing of specific values
+        +0.0,
+        -0.0,
+        Double.MIN_VALUE,
+        Double.MIN_NORMAL,
+        PROPERTY_CHECK_NEGATIVE_VALUE,
+        PROPERTY_CHECK_POSITIVE_VALUE,
+        -2147483647.9996,
+        2147483647.9996,
+        -1999999999.9994997,
+        1999999999.9995003,
+        // Testing fast-path range checks (all outside bounds)
+        Double.NaN,
+        Double.POSITIVE_INFINITY,
+        Double.NEGATIVE_INFINITY,
+        Double.MAX_VALUE,
+        -9876543210.9876543,
+        9876543210.9876543,
+        -1234567890.1234567E128,
+        1234567890.1234567E128,
+        // Testing of integral string size
+        1.123,
+        12.123,
+        123.123,
+        1234.123,
+        12345.123,
+        123456.123,
+        1234567.123,
+        12345678.123,
+        123456789.123,
+        1234567890.123,
+        -1.123,
+        -12.123,
+        -123.123,
+        -1234.123,
+        -12345.123,
+        -123456.123,
+        -1234567.123,
+        -12345678.123,
+        -123456789.123,
+        -1234567890.123,
+        // Testing of fractional string size
+        0.1,
+        0.12,
+        0.123,
+        0.1234,
+        10.1,
+        10.12,
+        10.123,
+        10.1234,
+        100.1,
+        100.12,
+        100.123,
+        100.1234,
+        1000.1,
+        1000.12,
+        1000.123,
+        1000.1234,
+        10000.1,
+        10000.12,
+        10000.123,
+        10000.1234,
+        100000.1,
+        100000.12,
+        100000.123,
+        100000.1234,
+        1000000.1,
+        1000000.12,
+        1000000.123,
+        1000000.1234,
+        10000000.1,
+        10000000.12,
+        10000000.123,
+        10000000.1234,
+        100000000.1,
+        100000000.12,
+        100000000.123,
+        100000000.1234,
+        1000000000.1,
+        1000000000.12,
+        1000000000.123,
+        1000000000.1234,
+        -0.1,
+        -0.12,
+        -0.123,
+        -0.1234,
+        -10.1,
+        -10.12,
+        -10.123,
+        -10.1234,
+        -100.1,
+        -100.12,
+        -100.123,
+        -100.1234,
+        -1000.1,
+        -1000.12,
+        -1000.123,
+        -1000.1234,
+        -10000.1,
+        -10000.12,
+        -10000.123,
+        -10000.1234,
+        -100000.1,
+        -100000.12,
+        -100000.123,
+        -100000.1234,
+        -1000000.1,
+        -1000000.12,
+        -1000000.123,
+        -1000000.1234,
+        -10000000.1,
+        -10000000.12,
+        -10000000.123,
+        -10000000.1234,
+        -100000000.1,
+        -100000000.12,
+        -100000000.123,
+        -100000000.1234,
+        -1000000000.1,
+        -1000000000.12,
+        -1000000000.123,
+        -1000000000.1234,
+        // Testing of special rounding cases
+        1.9993,
+        12.9993,
+        123.9993,
+        1234.9993,
+        12345.9993,
+        123456.9993,
+        1234567.9993,
+        12345678.9993,
+        123456789.9993,
+        1234567890.9993,
+        1.9996,
+        12.9996,
+        123.9996,
+        1234.9996,
+        12345.9996,
+        123456.9996,
+        1234567.9996,
+        12345678.9996,
+        123456789.9996,
+        1234567890.9996,
+        -1.9993,
+        -12.9993,
+        -123.9993,
+        -1234.9993,
+        -12345.9993,
+        -123456.9993,
+        -1234567.9993,
+        -12345678.9993,
+        -123456789.9993,
+        -1234567890.9993,
+        -1.9996,
+        -12.9996,
+        -123.9996,
+        -1234.9996,
+        -12345.9996,
+        -123456.9996,
+        -1234567.9996,
+        -12345678.9996,
+        -123456789.9996,
+        -1234567890.9996,
+        109.9996,
+        1099.9996,
+        10999.9996,
+        109999.9996,
+        1099999.9996,
+        10999999.9996,
+        109999999.9996,
+        1099999999.9996,
+        -109.9996,
+        -1099.9996,
+        -10999.9996,
+        -109999.9996,
+        -1099999.9996,
+        -10999999.9996,
+        -109999999.9996,
+        -1099999999.9996,
+        1.9996,
+        19.9996,
+        199.9996,
+        1999.9996,
+        19999.9996,
+        199999.9996,
+        1999999.9996,
+        19999999.9996,
+        199999999.9996,
+        1999999999.9996,
+        -1.9996,
+        -19.9996,
+        -199.9996,
+        -1999.9996,
+        -19999.9996,
+        -199999.9996,
+        -1999999.9996,
+        -19999999.9996,
+        -199999999.9996,
+        -1999999999.9996,
+        // Testing for all nines cases
+        9.9996,
+        99.9996,
+        999.9996,
+        9999.9996,
+        99999.9996,
+        999999.9996,
+        9999999.9996,
+        99999999.9996,
+        999999999.9996,
+        9.999,
+        99.999,
+        999.999,
+        9999.999,
+        99999.999,
+        999999.999,
+        9999999.999,
+        99999999.999,
+        999999999.999,
+        -9.9996,
+        -99.9996,
+        -999.9996,
+        -9999.9996,
+        -99999.9996,
+        -999999.9996,
+        -9999999.9996,
+        -99999999.9996,
+        -999999999.9996,
+        -9.999,
+        -99.999,
+        -999.999,
+        -9999.999,
+        -99999.999,
+        -999999.999,
+        -9999999.999,
+        -99999999.999,
+        -999999999.999,
+        // Testing for no Fractional part cases
+        1.0,
+        12.0,
+        123.0,
+        1234.0,
+        12345.0,
+        123456.0,
+        1234567.0,
+        12345678.0,
+        123456789.0,
+        1234567890.0,
+        -1.0,
+        -12.0,
+        -123.0,
+        -1234.0,
+        -12345.0,
+        -123456.0,
+        -1234567.0,
+        -12345678.0,
+        -123456789.0,
+        -1234567890.0,
+        // Testing of tricky cases
+        -2599.399999990123,
+        -2599.339999990123,
+        -2599.333999990123,
+        1.000099999999818,
+        1.000199999999818,
+        1.000299999999818,
+        1.000399999999818,
+        1.000499999999818,
+        1.000599999999818,
+        1.000699999999818,
+        1.000799999999818,
+        1.000899999999818,
+        1.000999999999818,
+        1.2224999999999980,
+        1.2224999999999981,
+        1.2224999999999982,
+        1.2224999999999983,
+        1.2224999999999984,
+        1.2224999999999985,
+        1.2224999999999986,
+        1.2224999999999987,
+        1.2224999999999988,
+        1.2224999999999989,
+        1.2224999999999990,
+        1.2224999999999991,
+        1.2224999999999992,
+        1.2224999999999993,
+        1.2224999999999994,
+        1.2224999999999995,
+        1.2224999999999996,
+        1.2224999999999997,
+        1.2224999999999998,
+        // 1.2225 and 1.2224999999999999 have the same double approximation
+        1.2225,
+        1.2225000000000001,
+        1.2225000000000002,
+        1.2225000000000003,
+        1.2225000000000004,
+        1.2225000000000005,
+        1.2225000000000006,
+        1.2225000000000007,
+        1.2225000000000008,
+        1.2225000000000009,
+        1.2225000000000010,
+        1.2225000000000011,
+        1.2225000000000012,
+        1.2225000000000013,
+        1.2225000000000014,
+        1.2225000000000015,
+        1.2225000000000016,
+        1.2225000000000017,
+        1.2225000000000018,
+        1.2225000000000019,
+        // Tricky rounding cases around tie values
+        100913.67050000005,
+        199999.99895901306,
+        251846.3465,
+        253243.8825000001,
+        365045.85349999997,
+        314734.9615,
+        541133.9755,
+        858372.1225,
+        1000999.9995000001,
+        1347505.7825,
+        3358844.1975,
+        9997979.4085,
+        9993743.1585,
+        9938671.9085,
+        3385302.5465,
+        3404642.6605,
+        3431280.0865,
+        3438756.4754999997,
+        3446053.7874999996,
+        3457917.5125,
+        3465393.9014999997,
+        3484734.0154999997,
+        3492031.3274999997,
+        3503895.0525,
+        3511371.4414999997,
+        3518668.7534999996,
+        3530532.4785,
+        3538008.8674999997,
+        3545306.1794999996,
+        3557169.9045,
+        3557348.9814999998,
+        3564646.2934999997,
+        3583986.4074999997,
+        3591283.7194999997,
+        3603147.4445,
+        3610623.8334999997,
+        3617921.1454999996,
+        3629784.8705,
+        3637261.2594999997,
+        3656422.2965,
+        3656601.3734999998,
+        3663898.6854999997,
+        3675762.4105,
+        3683238.7994999997,
+        3690536.1114999996,
+        3702399.8365,
+        3709876.2254999997,
+        3717173.5374999996,
+        3729037.2625,
+        3736513.6514999997,
+        3755853.7654999997,
+        3763151.0774999997,
+        3775014.8025,
+        3782491.1914999997,
+        3789788.5034999996,
+        3801652.2285,
+        3809128.6174999997,
+        3816425.9294999996,
+        3828289.6545,
+        3828468.7314999998,
+        3835766.0434999997,
+        3855106.1574999997,
+        3862403.4694999997,
+        3874267.1945,
+        3881743.5834999997,
+        3889040.8954999996,
+        3900904.6205,
+        3908381.0094999997,
+        3927542.0465,
+        3927721.1234999998,
+        3935018.4354999997,
+        3946882.1605,
+        3954358.5494999997,
+        3961655.8614999996,
+        3973519.5865,
+        3980995.9754999997,
+        3988293.2874999996,
+        4000157.0125,
+        4007633.4014999997,
+        4026973.5154999997,
+        4034270.8274999997,
+        4046134.5525,
+        4053610.9414999997,
+        4060908.2534999996,
+        4072771.9785,
+        4080248.3674999997,
+        4087545.6794999996,
+        4099409.4045,
+        4099588.4814999998,
+        4106885.7934999997,
+        4126225.9074999997,
+        4133523.2194999997,
+        4145386.9445,
+        4152863.3334999997,
+        4160160.6454999996,
+        4172024.3705,
+        4179500.7594999997,
+        4198661.7965,
+        4203407.2865,
+        4210704.5985,
+        4213435.4975
+    };
+
+    // --- The set of golden values for the currency formatting case --------
+    static final double[] CurrencyGoldenValues = {
+        // Testing of specific values
+        +0.0,
+        -0.0,
+        Double.MIN_VALUE,
+        Double.MIN_NORMAL,
+        PROPERTY_CHECK_NEGATIVE_VALUE,
+        PROPERTY_CHECK_POSITIVE_VALUE,
+        -2147483647.996,
+        2147483647.996,
+        -1999999999.9949997,
+        1999999999.9950003,
+        // Testing fast-path range checks (all outside bounds)
+        Double.NaN,
+        Double.POSITIVE_INFINITY,
+        Double.NEGATIVE_INFINITY,
+        Double.MAX_VALUE,
+        -9876543210.9876543,
+        9876543210.9876543,
+        -1234567890.1234567E128,
+        1234567890.1234567E128,
+        // Testing of integral string size
+        1.12,
+        12.12,
+        123.12,
+        1234.12,
+        12345.12,
+        123456.12,
+        1234567.12,
+        12345678.12,
+        123456789.12,
+        1234567890.12,
+        -1.12,
+        -12.12,
+        -123.12,
+        -1234.12,
+        -12345.12,
+        -123456.12,
+        -1234567.12,
+        -12345678.12,
+        -123456789.12,
+        -1234567890.12,
+        // Testing of fractional string size
+        0.1,
+        0.12,
+        0.123,
+        10.1,
+        10.12,
+        10.123,
+        100.1,
+        100.12,
+        100.123,
+        1000.1,
+        1000.12,
+        1000.123,
+        10000.1,
+        10000.12,
+        10000.123,
+        100000.1,
+        100000.12,
+        100000.123,
+        1000000.1,
+        1000000.12,
+        1000000.123,
+        10000000.1,
+        10000000.12,
+        10000000.123,
+        100000000.1,
+        100000000.12,
+        100000000.123,
+        1000000000.1,
+        1000000000.12,
+        1000000000.123,
+        -0.1,
+        -0.12,
+        -0.123,
+        -10.1,
+        -10.12,
+        -10.123,
+        -100.1,
+        -100.12,
+        -100.123,
+        -1000.1,
+        -1000.12,
+        -1000.123,
+        -10000.1,
+        -10000.12,
+        -10000.123,
+        -100000.1,
+        -100000.12,
+        -100000.123,
+        -1000000.1,
+        -1000000.12,
+        -1000000.123,
+        -10000000.1,
+        -10000000.12,
+        -10000000.123,
+        -100000000.1,
+        -100000000.12,
+        -100000000.123,
+        -1000000000.1,
+        -1000000000.12,
+        -1000000000.123,
+        // Testing of special rounding cases
+        1.993,
+        12.993,
+        123.993,
+        1234.993,
+        12345.993,
+        123456.993,
+        1234567.993,
+        12345678.993,
+        123456789.993,
+        1234567890.993,
+        1.996,
+        12.996,
+        123.996,
+        1234.996,
+        12345.996,
+        123456.996,
+        1234567.996,
+        12345678.996,
+        123456789.996,
+        1234567890.996,
+        -1.993,
+        -12.993,
+        -123.993,
+        -1234.993,
+        -12345.993,
+        -123456.993,
+        -1234567.993,
+        -12345678.993,
+        -123456789.993,
+        -1234567890.993,
+        -1.996,
+        -12.996,
+        -123.996,
+        -1234.996,
+        -12345.996,
+        -123456.996,
+        -1234567.996,
+        -12345678.996,
+        -123456789.996,
+        -1234567890.996,
+        109.996,
+        1099.996,
+        10999.996,
+        109999.996,
+        1099999.996,
+        10999999.996,
+        109999999.996,
+        1099999999.996,
+        -109.996,
+        -1099.996,
+        -10999.996,
+        -109999.996,
+        -1099999.996,
+        -10999999.996,
+        -109999999.996,
+        -1099999999.996,
+        1.996,
+        19.996,
+        199.996,
+        1999.996,
+        19999.996,
+        199999.996,
+        1999999.996,
+        19999999.996,
+        199999999.996,
+        1999999999.996,
+        -1.996,
+        -19.996,
+        -199.996,
+        -1999.996,
+        -19999.996,
+        -199999.996,
+        -1999999.996,
+        -19999999.996,
+        -199999999.996,
+        -1999999999.996,
+        // Testing of all nines cases
+        9.996,
+        99.996,
+        999.996,
+        9999.996,
+        99999.996,
+        999999.996,
+        9999999.996,
+        99999999.996,
+        999999999.996,
+        9.99,
+        99.99,
+        999.99,
+        9999.99,
+        99999.99,
+        999999.99,
+        9999999.99,
+        99999999.99,
+        999999999.99,
+        -9.996,
+        -99.996,
+        -999.996,
+        -9999.996,
+        -99999.996,
+        -999999.996,
+        -9999999.996,
+        -99999999.996,
+        -999999999.996,
+        -9.99,
+        -99.99,
+        -999.99,
+        -9999.99,
+        -99999.99,
+        -999999.99,
+        -9999999.99,
+        -99999999.99,
+        -999999999.99,
+        // Testing of no Fractional part cases
+        1.0,
+        12.0,
+        123.0,
+        1234.0,
+        12345.0,
+        123456.0,
+        1234567.0,
+        12345678.0,
+        123456789.0,
+        1234567890.0,
+        -1.0,
+        -12.0,
+        -123.0,
+        -1234.0,
+        -12345.0,
+        -123456.0,
+        -1234567.0,
+        -12345678.0,
+        -123456789.0,
+        -1234567890.0,
+        // Testing of tricky cases
+        -2599.399999990123,
+        -2599.339999990123,
+        -2599.333999990123,
+        1.000999999999818,
+        1.001999999999818,
+        1.002999999999818,
+        1.003999999999818,
+        1.004999999999818,
+        1.005999999999818,
+        1.006999999999818,
+        1.007999999999818,
+        1.008999999999818,
+        1.009999999999818,
+        1.224999999999980,
+        1.224999999999981,
+        1.224999999999982,
+        1.224999999999983,
+        1.224999999999984,
+        1.224999999999985,
+        1.224999999999986,
+        1.224999999999987,
+        1.224999999999988,
+        1.224999999999989,
+        1.224999999999990,
+        1.224999999999991,
+        1.224999999999992,
+        1.224999999999993,
+        1.224999999999994,
+        1.224999999999995,
+        1.224999999999996,
+        1.224999999999997,
+        1.224999999999998,
+        1.224999999999999,
+        1.225,
+        1.225000000000001,
+        1.225000000000002,
+        1.225000000000003,
+        1.225000000000004,
+        1.225000000000005,
+        1.225000000000006,
+        1.225000000000007,
+        1.225000000000008,
+        1.225000000000009,
+        1.225000000000010,
+        1.225000000000011,
+        1.225000000000012,
+        1.225000000000013,
+        1.225000000000014,
+        1.225000000000015,
+        1.225000000000016,
+        1.225000000000017,
+        1.225000000000018,
+        1.225000000000019,
+        // Tricky rounding cases around tie values
+        1009136.7050000005,
+        2518463.465,
+        2532438.825000001,
+        3650458.5349999997,
+        3147349.615,
+        5411339.755,
+        8583721.225,
+        13475057.825,
+        33588441.975,
+        99979794.085,
+        99937431.585,
+        99386719.085,
+        33853025.465,
+        34046426.605,
+        34312800.865,
+        34387564.754999997,
+        34460537.874999996,
+        34579175.125,
+        34653939.014999997,
+        34847340.154999997,
+        34920313.274999997,
+        35038950.525,
+        35113714.414999997,
+        35186687.534999996,
+        35305324.785,
+        35380088.674999997,
+        35453061.794999996,
+        35571699.045,
+        35573489.814999998,
+        35646462.934999997,
+        35839864.074999997,
+        35912837.194999997,
+        36031474.445,
+        36106238.334999997,
+        36179211.454999996,
+        36297848.705,
+        36372612.594999997,
+        36564222.965,
+        36566013.734999998,
+        36638986.854999997,
+        36757624.105,
+        36832387.994999997,
+        36905361.114999996,
+        37023998.365,
+        37098762.254999997,
+        37171735.374999996,
+        37290372.625,
+        37365136.514999997,
+        37558537.654999997,
+        37631510.774999997,
+        37750148.025,
+        37824911.914999997,
+        37897885.034999996,
+        38016522.285,
+        38091286.174999997,
+        38164259.294999996,
+        38282896.545,
+        38284687.314999998,
+        38357660.434999997,
+        38551061.574999997,
+        38624034.694999997,
+        38742671.945,
+        38817435.834999997,
+        38890408.954999996,
+        39009046.205,
+        39083810.094999997,
+        39275420.465,
+        39277211.234999998,
+        39350184.354999997,
+        39468821.605,
+        39543585.494999997,
+        39616558.614999996,
+        39735195.865,
+        39809959.754999997,
+        39882932.874999996,
+        40001570.125,
+        40076334.014999997,
+        40269735.154999997,
+        40342708.274999997,
+        40461345.525,
+        40536109.414999997,
+        40609082.534999996,
+        40727719.785,
+        40802483.674999997,
+        40875456.794999996,
+        40994094.045,
+        40995884.814999998,
+        41068857.934999997,
+        41262259.074999997,
+        41335232.194999997,
+        41453869.445,
+        41528633.334999997,
+        41601606.454999996,
+        41720243.705,
+        41795007.594999997,
+        41986617.965,
+        42034072.865,
+        42107045.985,
+        42134354.975
+    };
+}
diff --git a/jdk/test/java/text/Format/DecimalFormat/GoldenFormattedValues.java b/jdk/test/java/text/Format/DecimalFormat/GoldenFormattedValues.java
new file mode 100644
index 00000000000..83cde2d37a1
--- /dev/null
+++ b/jdk/test/java/text/Format/DecimalFormat/GoldenFormattedValues.java
@@ -0,0 +1,868 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* This is a machine generated file - Please DO NOT EDIT !
+ * Change RoundingAndPropertyTest instead,
+ * and run with "-gengold" argument to regenerate (without copyright header).
+ */
+
+/* This file contains the set of result Strings expected from calling inside
+ * RoundingAndPropertyTest the method NumberFormat.format() upon the set of
+ * double values provided in GoldenDoubleValues.java. It contains three arrays,
+ * each containing arrays of unicode values representing the expected string
+ * result when calling format() on the corresponding (i.e. same index) double
+ * value found in GoldenDoubleValues arrays :
+ * - DecimalDigitsLocalizedFormattedValues corresponds to DecimalLocalizationValues,
+ *   when using FullLocalizationTestLocale to format.
+ * - DecimalGoldenFormattedValues corresponds to DecimalGoldenValues, when used
+ *   in the decimal pattern case together with TestLocale.
+ * - CurrencyGoldenFormattedValues corresponds to CurrencyGoldenValues. when used
+ *   in the currency pattern case together with TestLocale.
+ * Please see documentation in RoundingAndPropertyTest.java for more details.
+ *
+ * This file generated by running RoundingAndPropertyTest with "-gengold" argument.
+ */
+
+class GoldenFormattedValues {
+
+    // The formatted values below were generated from golden values
+    // listed in GoldenDoubleValues.java, using the following jvm version :
+    //   Oracle Corporation Java HotSpot(TM) Server VM 1.8.0-ea
+    //   locale for golden double values : en_US
+    //   locale for testing digit localization : hi_IN
+
+    // The array of int[] unicode values storing the expected results
+    // when experiencing full localization of digits on DecimalLocalizationValues.
+    static int[][] DecimalDigitsLocalizedFormattedValues = {
+        { 2407, 46, 2407, 2408, 2409 },
+        { 2407, 2408, 46, 2407, 2408, 2409 },
+        { 2407, 2408, 2409, 46, 2407, 2408, 2409 },
+        { 2407, 44, 2408, 2409, 2410, 46, 2407, 2408, 2409 },
+        { 2407, 2408, 44, 2409, 2410, 2411, 46, 2407, 2408, 2409 },
+        { 2407, 2408, 2409, 44, 2410, 2411, 2412, 46, 2407, 2408, 2409 },
+        { 2407, 44, 2408, 2409, 2410, 44, 2411, 2412, 2413, 46, 2407, 2408, 2409 },
+        { 2407, 2408, 44, 2409, 2410, 2411, 44, 2412, 2413, 2414, 46, 2407, 2408, 2409 },
+        { 2407, 2408, 2409, 44, 2410, 2411, 2412, 44, 2413, 2414, 2415, 46, 2407, 2408, 2409 },
+        { 2407, 44, 2408, 2409, 2410, 44, 2411, 2412, 2413, 44, 2414, 2415, 2406, 46, 2407, 2408, 2409 },
+        { 2407, 44, 2408, 2409, 2410 },
+        { 2407, 44, 2408, 2409, 2410, 46, 2415 },
+        { 2407, 44, 2408, 2409, 2410, 46, 2415, 2415 },
+        { 2407, 44, 2408, 2409, 2410, 46, 2415, 2415, 2415 },
+    };
+
+    // The array of int[] unicode values storing the expected results
+    // when calling Decimal.format(double) on the decimal GoldenDoubleValues.
+    static int[][] DecimalGoldenFormattedValues = {
+        { 48 },
+        { 45, 48 },
+        { 48 },
+        { 48 },
+        { 45, 50, 44, 49, 52, 55, 44, 52, 56, 51, 44, 54, 52, 54, 46, 50, 51, 51 },
+        { 50, 44, 49, 52, 55, 44, 52, 56, 51, 44, 54, 52, 54, 46, 50, 51, 52 },
+        { 45, 50, 44, 49, 52, 55, 44, 52, 56, 51, 44, 54, 52, 56 },
+        { 50, 44, 49, 52, 55, 44, 52, 56, 51, 44, 54, 52, 56 },
+        { 45, 49, 44, 57, 57, 57, 44, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57, 57 },
+        { 50, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 65533 },
+        { 8734 },
+        { 45, 8734 },
+        { 49, 55, 57, 44, 55, 54, 57, 44, 51, 49, 51, 44, 52, 56, 54, 44, 50, 51, 49, 44, 53, 55, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 45, 57, 44, 56, 55, 54, 44, 53, 52, 51, 44, 50, 49, 48, 46, 57, 56, 56 },
+        { 57, 44, 56, 55, 54, 44, 53, 52, 51, 44, 50, 49, 48, 46, 57, 56, 56 },
+        { 45, 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57, 44, 48, 49, 50, 44, 51, 52, 53, 44, 54, 55, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57, 44, 48, 49, 50, 44, 51, 52, 53, 44, 54, 55, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 49, 46, 49, 50, 51 },
+        { 49, 50, 46, 49, 50, 51 },
+        { 49, 50, 51, 46, 49, 50, 51 },
+        { 49, 44, 50, 51, 52, 46, 49, 50, 51 },
+        { 49, 50, 44, 51, 52, 53, 46, 49, 50, 51 },
+        { 49, 50, 51, 44, 52, 53, 54, 46, 49, 50, 51 },
+        { 49, 44, 50, 51, 52, 44, 53, 54, 55, 46, 49, 50, 51 },
+        { 49, 50, 44, 51, 52, 53, 44, 54, 55, 56, 46, 49, 50, 51 },
+        { 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57, 46, 49, 50, 51 },
+        { 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 48, 46, 49, 50, 51 },
+        { 45, 49, 46, 49, 50, 51 },
+        { 45, 49, 50, 46, 49, 50, 51 },
+        { 45, 49, 50, 51, 46, 49, 50, 51 },
+        { 45, 49, 44, 50, 51, 52, 46, 49, 50, 51 },
+        { 45, 49, 50, 44, 51, 52, 53, 46, 49, 50, 51 },
+        { 45, 49, 50, 51, 44, 52, 53, 54, 46, 49, 50, 51 },
+        { 45, 49, 44, 50, 51, 52, 44, 53, 54, 55, 46, 49, 50, 51 },
+        { 45, 49, 50, 44, 51, 52, 53, 44, 54, 55, 56, 46, 49, 50, 51 },
+        { 45, 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57, 46, 49, 50, 51 },
+        { 45, 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 48, 46, 49, 50, 51 },
+        { 48, 46, 49 },
+        { 48, 46, 49, 50 },
+        { 48, 46, 49, 50, 51 },
+        { 48, 46, 49, 50, 51 },
+        { 49, 48, 46, 49 },
+        { 49, 48, 46, 49, 50 },
+        { 49, 48, 46, 49, 50, 51 },
+        { 49, 48, 46, 49, 50, 51 },
+        { 49, 48, 48, 46, 49 },
+        { 49, 48, 48, 46, 49, 50 },
+        { 49, 48, 48, 46, 49, 50, 51 },
+        { 49, 48, 48, 46, 49, 50, 51 },
+        { 49, 44, 48, 48, 48, 46, 49 },
+        { 49, 44, 48, 48, 48, 46, 49, 50 },
+        { 49, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 49, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 49, 48, 44, 48, 48, 48, 46, 49 },
+        { 49, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 49, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 49, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 49, 48, 48, 44, 48, 48, 48, 46, 49 },
+        { 49, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 49, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 49, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49 },
+        { 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49 },
+        { 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49 },
+        { 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49 },
+        { 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 45, 48, 46, 49 },
+        { 45, 48, 46, 49, 50 },
+        { 45, 48, 46, 49, 50, 51 },
+        { 45, 48, 46, 49, 50, 51 },
+        { 45, 49, 48, 46, 49 },
+        { 45, 49, 48, 46, 49, 50 },
+        { 45, 49, 48, 46, 49, 50, 51 },
+        { 45, 49, 48, 46, 49, 50, 51 },
+        { 45, 49, 48, 48, 46, 49 },
+        { 45, 49, 48, 48, 46, 49, 50 },
+        { 45, 49, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 44, 48, 48, 48, 46, 49 },
+        { 45, 49, 44, 48, 48, 48, 46, 49, 50 },
+        { 45, 49, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 48, 44, 48, 48, 48, 46, 49 },
+        { 45, 49, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 45, 49, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 48, 48, 44, 48, 48, 48, 46, 49 },
+        { 45, 49, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 45, 49, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49 },
+        { 45, 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 45, 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49 },
+        { 45, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 45, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49 },
+        { 45, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 45, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49 },
+        { 45, 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 45, 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 45, 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 51 },
+        { 49, 46, 57, 57, 57 },
+        { 49, 50, 46, 57, 57, 57 },
+        { 49, 50, 51, 46, 57, 57, 57 },
+        { 49, 44, 50, 51, 52, 46, 57, 57, 57 },
+        { 49, 50, 44, 51, 52, 53, 46, 57, 57, 57 },
+        { 49, 50, 51, 44, 52, 53, 54, 46, 57, 57, 57 },
+        { 49, 44, 50, 51, 52, 44, 53, 54, 55, 46, 57, 57, 57 },
+        { 49, 50, 44, 51, 52, 53, 44, 54, 55, 56, 46, 57, 57, 57 },
+        { 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57, 46, 57, 57, 57 },
+        { 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 48, 46, 57, 57, 57 },
+        { 50 },
+        { 49, 51 },
+        { 49, 50, 52 },
+        { 49, 44, 50, 51, 53 },
+        { 49, 50, 44, 51, 52, 54 },
+        { 49, 50, 51, 44, 52, 53, 55 },
+        { 49, 44, 50, 51, 52, 44, 53, 54, 56 },
+        { 49, 50, 44, 51, 52, 53, 44, 54, 55, 57 },
+        { 49, 50, 51, 44, 52, 53, 54, 44, 55, 57, 48 },
+        { 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 49 },
+        { 45, 49, 46, 57, 57, 57 },
+        { 45, 49, 50, 46, 57, 57, 57 },
+        { 45, 49, 50, 51, 46, 57, 57, 57 },
+        { 45, 49, 44, 50, 51, 52, 46, 57, 57, 57 },
+        { 45, 49, 50, 44, 51, 52, 53, 46, 57, 57, 57 },
+        { 45, 49, 50, 51, 44, 52, 53, 54, 46, 57, 57, 57 },
+        { 45, 49, 44, 50, 51, 52, 44, 53, 54, 55, 46, 57, 57, 57 },
+        { 45, 49, 50, 44, 51, 52, 53, 44, 54, 55, 56, 46, 57, 57, 57 },
+        { 45, 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57, 46, 57, 57, 57 },
+        { 45, 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 48, 46, 57, 57, 57 },
+        { 45, 50 },
+        { 45, 49, 51 },
+        { 45, 49, 50, 52 },
+        { 45, 49, 44, 50, 51, 53 },
+        { 45, 49, 50, 44, 51, 52, 54 },
+        { 45, 49, 50, 51, 44, 52, 53, 55 },
+        { 45, 49, 44, 50, 51, 52, 44, 53, 54, 56 },
+        { 45, 49, 50, 44, 51, 52, 53, 44, 54, 55, 57 },
+        { 45, 49, 50, 51, 44, 52, 53, 54, 44, 55, 57, 48 },
+        { 45, 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 49 },
+        { 49, 49, 48 },
+        { 49, 44, 49, 48, 48 },
+        { 49, 49, 44, 48, 48, 48 },
+        { 49, 49, 48, 44, 48, 48, 48 },
+        { 49, 44, 49, 48, 48, 44, 48, 48, 48 },
+        { 49, 49, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 49, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 49, 44, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 45, 49, 49, 48 },
+        { 45, 49, 44, 49, 48, 48 },
+        { 45, 49, 49, 44, 48, 48, 48 },
+        { 45, 49, 49, 48, 44, 48, 48, 48 },
+        { 45, 49, 44, 49, 48, 48, 44, 48, 48, 48 },
+        { 45, 49, 49, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 45, 49, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 45, 49, 44, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 50 },
+        { 50, 48 },
+        { 50, 48, 48 },
+        { 50, 44, 48, 48, 48 },
+        { 50, 48, 44, 48, 48, 48 },
+        { 50, 48, 48, 44, 48, 48, 48 },
+        { 50, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 50, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 50, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 50, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 45, 50 },
+        { 45, 50, 48 },
+        { 45, 50, 48, 48 },
+        { 45, 50, 44, 48, 48, 48 },
+        { 45, 50, 48, 44, 48, 48, 48 },
+        { 45, 50, 48, 48, 44, 48, 48, 48 },
+        { 45, 50, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 45, 50, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 45, 50, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 45, 50, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 49, 48 },
+        { 49, 48, 48 },
+        { 49, 44, 48, 48, 48 },
+        { 49, 48, 44, 48, 48, 48 },
+        { 49, 48, 48, 44, 48, 48, 48 },
+        { 49, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 49, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 57, 46, 57, 57, 57 },
+        { 57, 57, 46, 57, 57, 57 },
+        { 57, 57, 57, 46, 57, 57, 57 },
+        { 57, 44, 57, 57, 57, 46, 57, 57, 57 },
+        { 57, 57, 44, 57, 57, 57, 46, 57, 57, 57 },
+        { 57, 57, 57, 44, 57, 57, 57, 46, 57, 57, 57 },
+        { 57, 44, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57, 57 },
+        { 57, 57, 44, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57, 57 },
+        { 57, 57, 57, 44, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57, 57 },
+        { 45, 49, 48 },
+        { 45, 49, 48, 48 },
+        { 45, 49, 44, 48, 48, 48 },
+        { 45, 49, 48, 44, 48, 48, 48 },
+        { 45, 49, 48, 48, 44, 48, 48, 48 },
+        { 45, 49, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 45, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 45, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 45, 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48 },
+        { 45, 57, 46, 57, 57, 57 },
+        { 45, 57, 57, 46, 57, 57, 57 },
+        { 45, 57, 57, 57, 46, 57, 57, 57 },
+        { 45, 57, 44, 57, 57, 57, 46, 57, 57, 57 },
+        { 45, 57, 57, 44, 57, 57, 57, 46, 57, 57, 57 },
+        { 45, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57, 57 },
+        { 45, 57, 44, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57, 57 },
+        { 45, 57, 57, 44, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57, 57 },
+        { 45, 57, 57, 57, 44, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57, 57 },
+        { 49 },
+        { 49, 50 },
+        { 49, 50, 51 },
+        { 49, 44, 50, 51, 52 },
+        { 49, 50, 44, 51, 52, 53 },
+        { 49, 50, 51, 44, 52, 53, 54 },
+        { 49, 44, 50, 51, 52, 44, 53, 54, 55 },
+        { 49, 50, 44, 51, 52, 53, 44, 54, 55, 56 },
+        { 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57 },
+        { 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 48 },
+        { 45, 49 },
+        { 45, 49, 50 },
+        { 45, 49, 50, 51 },
+        { 45, 49, 44, 50, 51, 52 },
+        { 45, 49, 50, 44, 51, 52, 53 },
+        { 45, 49, 50, 51, 44, 52, 53, 54 },
+        { 45, 49, 44, 50, 51, 52, 44, 53, 54, 55 },
+        { 45, 49, 50, 44, 51, 52, 53, 44, 54, 55, 56 },
+        { 45, 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57 },
+        { 45, 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 48 },
+        { 45, 50, 44, 53, 57, 57, 46, 52 },
+        { 45, 50, 44, 53, 57, 57, 46, 51, 52 },
+        { 45, 50, 44, 53, 57, 57, 46, 51, 51, 52 },
+        { 49 },
+        { 49 },
+        { 49 },
+        { 49 },
+        { 49 },
+        { 49, 46, 48, 48, 49 },
+        { 49, 46, 48, 48, 49 },
+        { 49, 46, 48, 48, 49 },
+        { 49, 46, 48, 48, 49 },
+        { 49, 46, 48, 48, 49 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 50 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 46, 50, 50, 51 },
+        { 49, 48, 48, 44, 57, 49, 51, 46, 54, 55, 49 },
+        { 49, 57, 57, 44, 57, 57, 57, 46, 57, 57, 57 },
+        { 50, 53, 49, 44, 56, 52, 54, 46, 51, 52, 55 },
+        { 50, 53, 51, 44, 50, 52, 51, 46, 56, 56, 51 },
+        { 51, 54, 53, 44, 48, 52, 53, 46, 56, 53, 51 },
+        { 51, 49, 52, 44, 55, 51, 52, 46, 57, 54, 49 },
+        { 53, 52, 49, 44, 49, 51, 51, 46, 57, 55, 53 },
+        { 56, 53, 56, 44, 51, 55, 50, 46, 49, 50, 51 },
+        { 49, 44, 48, 48, 49, 44, 48, 48, 48 },
+        { 49, 44, 51, 52, 55, 44, 53, 48, 53, 46, 55, 56, 50 },
+        { 51, 44, 51, 53, 56, 44, 56, 52, 52, 46, 49, 57, 55 },
+        { 57, 44, 57, 57, 55, 44, 57, 55, 57, 46, 52, 48, 57 },
+        { 57, 44, 57, 57, 51, 44, 55, 52, 51, 46, 49, 53, 57 },
+        { 57, 44, 57, 51, 56, 44, 54, 55, 49, 46, 57, 48, 57 },
+        { 51, 44, 51, 56, 53, 44, 51, 48, 50, 46, 53, 52, 55 },
+        { 51, 44, 52, 48, 52, 44, 54, 52, 50, 46, 54, 54, 49 },
+        { 51, 44, 52, 51, 49, 44, 50, 56, 48, 46, 48, 56, 55 },
+        { 51, 44, 52, 51, 56, 44, 55, 53, 54, 46, 52, 55, 53 },
+        { 51, 44, 52, 52, 54, 44, 48, 53, 51, 46, 55, 56, 55 },
+        { 51, 44, 52, 53, 55, 44, 57, 49, 55, 46, 53, 49, 51 },
+        { 51, 44, 52, 54, 53, 44, 51, 57, 51, 46, 57, 48, 49 },
+        { 51, 44, 52, 56, 52, 44, 55, 51, 52, 46, 48, 49, 53 },
+        { 51, 44, 52, 57, 50, 44, 48, 51, 49, 46, 51, 50, 55 },
+        { 51, 44, 53, 48, 51, 44, 56, 57, 53, 46, 48, 53, 51 },
+        { 51, 44, 53, 49, 49, 44, 51, 55, 49, 46, 52, 52, 49 },
+        { 51, 44, 53, 49, 56, 44, 54, 54, 56, 46, 55, 53, 51 },
+        { 51, 44, 53, 51, 48, 44, 53, 51, 50, 46, 52, 55, 57 },
+        { 51, 44, 53, 51, 56, 44, 48, 48, 56, 46, 56, 54, 55 },
+        { 51, 44, 53, 52, 53, 44, 51, 48, 54, 46, 49, 55, 57 },
+        { 51, 44, 53, 53, 55, 44, 49, 54, 57, 46, 57, 48, 53 },
+        { 51, 44, 53, 53, 55, 44, 51, 52, 56, 46, 57, 56, 49 },
+        { 51, 44, 53, 54, 52, 44, 54, 52, 54, 46, 50, 57, 51 },
+        { 51, 44, 53, 56, 51, 44, 57, 56, 54, 46, 52, 48, 55 },
+        { 51, 44, 53, 57, 49, 44, 50, 56, 51, 46, 55, 49, 57 },
+        { 51, 44, 54, 48, 51, 44, 49, 52, 55, 46, 52, 52, 53 },
+        { 51, 44, 54, 49, 48, 44, 54, 50, 51, 46, 56, 51, 51 },
+        { 51, 44, 54, 49, 55, 44, 57, 50, 49, 46, 49, 52, 53 },
+        { 51, 44, 54, 50, 57, 44, 55, 56, 52, 46, 56, 55, 49 },
+        { 51, 44, 54, 51, 55, 44, 50, 54, 49, 46, 50, 53, 57 },
+        { 51, 44, 54, 53, 54, 44, 52, 50, 50, 46, 50, 57, 55 },
+        { 51, 44, 54, 53, 54, 44, 54, 48, 49, 46, 51, 55, 51 },
+        { 51, 44, 54, 54, 51, 44, 56, 57, 56, 46, 54, 56, 53 },
+        { 51, 44, 54, 55, 53, 44, 55, 54, 50, 46, 52, 49, 49 },
+        { 51, 44, 54, 56, 51, 44, 50, 51, 56, 46, 55, 57, 57 },
+        { 51, 44, 54, 57, 48, 44, 53, 51, 54, 46, 49, 49, 49 },
+        { 51, 44, 55, 48, 50, 44, 51, 57, 57, 46, 56, 51, 55 },
+        { 51, 44, 55, 48, 57, 44, 56, 55, 54, 46, 50, 50, 53 },
+        { 51, 44, 55, 49, 55, 44, 49, 55, 51, 46, 53, 51, 55 },
+        { 51, 44, 55, 50, 57, 44, 48, 51, 55, 46, 50, 54, 51 },
+        { 51, 44, 55, 51, 54, 44, 53, 49, 51, 46, 54, 53, 49 },
+        { 51, 44, 55, 53, 53, 44, 56, 53, 51, 46, 55, 54, 53 },
+        { 51, 44, 55, 54, 51, 44, 49, 53, 49, 46, 48, 55, 55 },
+        { 51, 44, 55, 55, 53, 44, 48, 49, 52, 46, 56, 48, 51 },
+        { 51, 44, 55, 56, 50, 44, 52, 57, 49, 46, 49, 57, 49 },
+        { 51, 44, 55, 56, 57, 44, 55, 56, 56, 46, 53, 48, 51 },
+        { 51, 44, 56, 48, 49, 44, 54, 53, 50, 46, 50, 50, 57 },
+        { 51, 44, 56, 48, 57, 44, 49, 50, 56, 46, 54, 49, 55 },
+        { 51, 44, 56, 49, 54, 44, 52, 50, 53, 46, 57, 50, 57 },
+        { 51, 44, 56, 50, 56, 44, 50, 56, 57, 46, 54, 53, 53 },
+        { 51, 44, 56, 50, 56, 44, 52, 54, 56, 46, 55, 51, 49 },
+        { 51, 44, 56, 51, 53, 44, 55, 54, 54, 46, 48, 52, 51 },
+        { 51, 44, 56, 53, 53, 44, 49, 48, 54, 46, 49, 53, 55 },
+        { 51, 44, 56, 54, 50, 44, 52, 48, 51, 46, 52, 54, 57 },
+        { 51, 44, 56, 55, 52, 44, 50, 54, 55, 46, 49, 57, 53 },
+        { 51, 44, 56, 56, 49, 44, 55, 52, 51, 46, 53, 56, 51 },
+        { 51, 44, 56, 56, 57, 44, 48, 52, 48, 46, 56, 57, 53 },
+        { 51, 44, 57, 48, 48, 44, 57, 48, 52, 46, 54, 50, 49 },
+        { 51, 44, 57, 48, 56, 44, 51, 56, 49, 46, 48, 48, 57 },
+        { 51, 44, 57, 50, 55, 44, 53, 52, 50, 46, 48, 52, 55 },
+        { 51, 44, 57, 50, 55, 44, 55, 50, 49, 46, 49, 50, 51 },
+        { 51, 44, 57, 51, 53, 44, 48, 49, 56, 46, 52, 51, 53 },
+        { 51, 44, 57, 52, 54, 44, 56, 56, 50, 46, 49, 54, 49 },
+        { 51, 44, 57, 53, 52, 44, 51, 53, 56, 46, 53, 52, 57 },
+        { 51, 44, 57, 54, 49, 44, 54, 53, 53, 46, 56, 54, 49 },
+        { 51, 44, 57, 55, 51, 44, 53, 49, 57, 46, 53, 56, 55 },
+        { 51, 44, 57, 56, 48, 44, 57, 57, 53, 46, 57, 55, 53 },
+        { 51, 44, 57, 56, 56, 44, 50, 57, 51, 46, 50, 56, 55 },
+        { 52, 44, 48, 48, 48, 44, 49, 53, 55, 46, 48, 49, 51 },
+        { 52, 44, 48, 48, 55, 44, 54, 51, 51, 46, 52, 48, 49 },
+        { 52, 44, 48, 50, 54, 44, 57, 55, 51, 46, 53, 49, 53 },
+        { 52, 44, 48, 51, 52, 44, 50, 55, 48, 46, 56, 50, 55 },
+        { 52, 44, 48, 52, 54, 44, 49, 51, 52, 46, 53, 53, 51 },
+        { 52, 44, 48, 53, 51, 44, 54, 49, 48, 46, 57, 52, 49 },
+        { 52, 44, 48, 54, 48, 44, 57, 48, 56, 46, 50, 53, 51 },
+        { 52, 44, 48, 55, 50, 44, 55, 55, 49, 46, 57, 55, 57 },
+        { 52, 44, 48, 56, 48, 44, 50, 52, 56, 46, 51, 54, 55 },
+        { 52, 44, 48, 56, 55, 44, 53, 52, 53, 46, 54, 55, 57 },
+        { 52, 44, 48, 57, 57, 44, 52, 48, 57, 46, 52, 48, 53 },
+        { 52, 44, 48, 57, 57, 44, 53, 56, 56, 46, 52, 56, 49 },
+        { 52, 44, 49, 48, 54, 44, 56, 56, 53, 46, 55, 57, 51 },
+        { 52, 44, 49, 50, 54, 44, 50, 50, 53, 46, 57, 48, 55 },
+        { 52, 44, 49, 51, 51, 44, 53, 50, 51, 46, 50, 49, 57 },
+        { 52, 44, 49, 52, 53, 44, 51, 56, 54, 46, 57, 52, 53 },
+        { 52, 44, 49, 53, 50, 44, 56, 54, 51, 46, 51, 51, 51 },
+        { 52, 44, 49, 54, 48, 44, 49, 54, 48, 46, 54, 52, 53 },
+        { 52, 44, 49, 55, 50, 44, 48, 50, 52, 46, 51, 55, 49 },
+        { 52, 44, 49, 55, 57, 44, 53, 48, 48, 46, 55, 53, 57 },
+        { 52, 44, 49, 57, 56, 44, 54, 54, 49, 46, 55, 57, 55 },
+        { 52, 44, 50, 48, 51, 44, 52, 48, 55, 46, 50, 56, 55 },
+        { 52, 44, 50, 49, 48, 44, 55, 48, 52, 46, 53, 57, 57 },
+        { 52, 44, 50, 49, 51, 44, 52, 51, 53, 46, 52, 57, 55 },
+    };
+
+    // The array of int[] unicode values storing the expected results
+    // when calling Decimal.format(double) on the currency GoldenDoubleValues.
+    static int[][] CurrencyGoldenFormattedValues = {
+        { 36, 48, 46, 48, 48 },
+        { 40, 36, 48, 46, 48, 48, 41 },
+        { 36, 48, 46, 48, 48 },
+        { 36, 48, 46, 48, 48 },
+        { 40, 36, 50, 44, 49, 52, 55, 44, 52, 56, 51, 44, 54, 52, 54, 46, 50, 51, 41 },
+        { 36, 50, 44, 49, 52, 55, 44, 52, 56, 51, 44, 54, 52, 54, 46, 50, 51 },
+        { 40, 36, 50, 44, 49, 52, 55, 44, 52, 56, 51, 44, 54, 52, 56, 46, 48, 48, 41 },
+        { 36, 50, 44, 49, 52, 55, 44, 52, 56, 51, 44, 54, 52, 56, 46, 48, 48 },
+        { 40, 36, 49, 44, 57, 57, 57, 44, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57, 41 },
+        { 36, 50, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 65533 },
+        { 36, 8734 },
+        { 40, 36, 8734, 41 },
+        { 36, 49, 55, 57, 44, 55, 54, 57, 44, 51, 49, 51, 44, 52, 56, 54, 44, 50, 51, 49, 44, 53, 55, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 40, 36, 57, 44, 56, 55, 54, 44, 53, 52, 51, 44, 50, 49, 48, 46, 57, 57, 41 },
+        { 36, 57, 44, 56, 55, 54, 44, 53, 52, 51, 44, 50, 49, 48, 46, 57, 57 },
+        { 40, 36, 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57, 44, 48, 49, 50, 44, 51, 52, 53, 44, 54, 55, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 36, 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57, 44, 48, 49, 50, 44, 51, 52, 53, 44, 54, 55, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 49, 46, 49, 50 },
+        { 36, 49, 50, 46, 49, 50 },
+        { 36, 49, 50, 51, 46, 49, 50 },
+        { 36, 49, 44, 50, 51, 52, 46, 49, 50 },
+        { 36, 49, 50, 44, 51, 52, 53, 46, 49, 50 },
+        { 36, 49, 50, 51, 44, 52, 53, 54, 46, 49, 50 },
+        { 36, 49, 44, 50, 51, 52, 44, 53, 54, 55, 46, 49, 50 },
+        { 36, 49, 50, 44, 51, 52, 53, 44, 54, 55, 56, 46, 49, 50 },
+        { 36, 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57, 46, 49, 50 },
+        { 36, 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 48, 46, 49, 50 },
+        { 40, 36, 49, 46, 49, 50, 41 },
+        { 40, 36, 49, 50, 46, 49, 50, 41 },
+        { 40, 36, 49, 50, 51, 46, 49, 50, 41 },
+        { 40, 36, 49, 44, 50, 51, 52, 46, 49, 50, 41 },
+        { 40, 36, 49, 50, 44, 51, 52, 53, 46, 49, 50, 41 },
+        { 40, 36, 49, 50, 51, 44, 52, 53, 54, 46, 49, 50, 41 },
+        { 40, 36, 49, 44, 50, 51, 52, 44, 53, 54, 55, 46, 49, 50, 41 },
+        { 40, 36, 49, 50, 44, 51, 52, 53, 44, 54, 55, 56, 46, 49, 50, 41 },
+        { 40, 36, 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57, 46, 49, 50, 41 },
+        { 40, 36, 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 48, 46, 49, 50, 41 },
+        { 36, 48, 46, 49, 48 },
+        { 36, 48, 46, 49, 50 },
+        { 36, 48, 46, 49, 50 },
+        { 36, 49, 48, 46, 49, 48 },
+        { 36, 49, 48, 46, 49, 50 },
+        { 36, 49, 48, 46, 49, 50 },
+        { 36, 49, 48, 48, 46, 49, 48 },
+        { 36, 49, 48, 48, 46, 49, 50 },
+        { 36, 49, 48, 48, 46, 49, 50 },
+        { 36, 49, 44, 48, 48, 48, 46, 49, 48 },
+        { 36, 49, 44, 48, 48, 48, 46, 49, 50 },
+        { 36, 49, 44, 48, 48, 48, 46, 49, 50 },
+        { 36, 49, 48, 44, 48, 48, 48, 46, 49, 48 },
+        { 36, 49, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 36, 49, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 36, 49, 48, 48, 44, 48, 48, 48, 46, 49, 48 },
+        { 36, 49, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 36, 49, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 48 },
+        { 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 36, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 48 },
+        { 36, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 36, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 36, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 48 },
+        { 36, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 36, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 48 },
+        { 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50 },
+        { 40, 36, 48, 46, 49, 48, 41 },
+        { 40, 36, 48, 46, 49, 50, 41 },
+        { 40, 36, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 48, 46, 49, 48, 41 },
+        { 40, 36, 49, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 48, 48, 46, 49, 48, 41 },
+        { 40, 36, 49, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 44, 48, 48, 48, 46, 49, 48, 41 },
+        { 40, 36, 49, 44, 48, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 44, 48, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 48, 44, 48, 48, 48, 46, 49, 48, 41 },
+        { 40, 36, 49, 48, 44, 48, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 48, 44, 48, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 48, 48, 44, 48, 48, 48, 46, 49, 48, 41 },
+        { 40, 36, 49, 48, 48, 44, 48, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 48, 48, 44, 48, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 48, 41 },
+        { 40, 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 48, 41 },
+        { 40, 36, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 48, 41 },
+        { 40, 36, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 48, 41 },
+        { 40, 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 41 },
+        { 40, 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 49, 50, 41 },
+        { 36, 49, 46, 57, 57 },
+        { 36, 49, 50, 46, 57, 57 },
+        { 36, 49, 50, 51, 46, 57, 57 },
+        { 36, 49, 44, 50, 51, 52, 46, 57, 57 },
+        { 36, 49, 50, 44, 51, 52, 53, 46, 57, 57 },
+        { 36, 49, 50, 51, 44, 52, 53, 54, 46, 57, 57 },
+        { 36, 49, 44, 50, 51, 52, 44, 53, 54, 55, 46, 57, 57 },
+        { 36, 49, 50, 44, 51, 52, 53, 44, 54, 55, 56, 46, 57, 57 },
+        { 36, 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57, 46, 57, 57 },
+        { 36, 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 48, 46, 57, 57 },
+        { 36, 50, 46, 48, 48 },
+        { 36, 49, 51, 46, 48, 48 },
+        { 36, 49, 50, 52, 46, 48, 48 },
+        { 36, 49, 44, 50, 51, 53, 46, 48, 48 },
+        { 36, 49, 50, 44, 51, 52, 54, 46, 48, 48 },
+        { 36, 49, 50, 51, 44, 52, 53, 55, 46, 48, 48 },
+        { 36, 49, 44, 50, 51, 52, 44, 53, 54, 56, 46, 48, 48 },
+        { 36, 49, 50, 44, 51, 52, 53, 44, 54, 55, 57, 46, 48, 48 },
+        { 36, 49, 50, 51, 44, 52, 53, 54, 44, 55, 57, 48, 46, 48, 48 },
+        { 36, 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 49, 46, 48, 48 },
+        { 40, 36, 49, 46, 57, 57, 41 },
+        { 40, 36, 49, 50, 46, 57, 57, 41 },
+        { 40, 36, 49, 50, 51, 46, 57, 57, 41 },
+        { 40, 36, 49, 44, 50, 51, 52, 46, 57, 57, 41 },
+        { 40, 36, 49, 50, 44, 51, 52, 53, 46, 57, 57, 41 },
+        { 40, 36, 49, 50, 51, 44, 52, 53, 54, 46, 57, 57, 41 },
+        { 40, 36, 49, 44, 50, 51, 52, 44, 53, 54, 55, 46, 57, 57, 41 },
+        { 40, 36, 49, 50, 44, 51, 52, 53, 44, 54, 55, 56, 46, 57, 57, 41 },
+        { 40, 36, 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57, 46, 57, 57, 41 },
+        { 40, 36, 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 48, 46, 57, 57, 41 },
+        { 40, 36, 50, 46, 48, 48, 41 },
+        { 40, 36, 49, 51, 46, 48, 48, 41 },
+        { 40, 36, 49, 50, 52, 46, 48, 48, 41 },
+        { 40, 36, 49, 44, 50, 51, 53, 46, 48, 48, 41 },
+        { 40, 36, 49, 50, 44, 51, 52, 54, 46, 48, 48, 41 },
+        { 40, 36, 49, 50, 51, 44, 52, 53, 55, 46, 48, 48, 41 },
+        { 40, 36, 49, 44, 50, 51, 52, 44, 53, 54, 56, 46, 48, 48, 41 },
+        { 40, 36, 49, 50, 44, 51, 52, 53, 44, 54, 55, 57, 46, 48, 48, 41 },
+        { 40, 36, 49, 50, 51, 44, 52, 53, 54, 44, 55, 57, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 49, 46, 48, 48, 41 },
+        { 36, 49, 49, 48, 46, 48, 48 },
+        { 36, 49, 44, 49, 48, 48, 46, 48, 48 },
+        { 36, 49, 49, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 49, 49, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 49, 44, 49, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 49, 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 49, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 49, 44, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 40, 36, 49, 49, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 44, 49, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 49, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 49, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 44, 49, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 44, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 36, 50, 46, 48, 48 },
+        { 36, 50, 48, 46, 48, 48 },
+        { 36, 50, 48, 48, 46, 48, 48 },
+        { 36, 50, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 50, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 50, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 50, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 50, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 50, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 50, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 40, 36, 50, 46, 48, 48, 41 },
+        { 40, 36, 50, 48, 46, 48, 48, 41 },
+        { 40, 36, 50, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 50, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 50, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 50, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 50, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 50, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 50, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 50, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 36, 49, 48, 46, 48, 48 },
+        { 36, 49, 48, 48, 46, 48, 48 },
+        { 36, 49, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 49, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 49, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48 },
+        { 36, 57, 46, 57, 57 },
+        { 36, 57, 57, 46, 57, 57 },
+        { 36, 57, 57, 57, 46, 57, 57 },
+        { 36, 57, 44, 57, 57, 57, 46, 57, 57 },
+        { 36, 57, 57, 44, 57, 57, 57, 46, 57, 57 },
+        { 36, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57 },
+        { 36, 57, 44, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57 },
+        { 36, 57, 57, 44, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57 },
+        { 36, 57, 57, 57, 44, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57 },
+        { 40, 36, 49, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 49, 44, 48, 48, 48, 44, 48, 48, 48, 44, 48, 48, 48, 46, 48, 48, 41 },
+        { 40, 36, 57, 46, 57, 57, 41 },
+        { 40, 36, 57, 57, 46, 57, 57, 41 },
+        { 40, 36, 57, 57, 57, 46, 57, 57, 41 },
+        { 40, 36, 57, 44, 57, 57, 57, 46, 57, 57, 41 },
+        { 40, 36, 57, 57, 44, 57, 57, 57, 46, 57, 57, 41 },
+        { 40, 36, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57, 41 },
+        { 40, 36, 57, 44, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57, 41 },
+        { 40, 36, 57, 57, 44, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57, 41 },
+        { 40, 36, 57, 57, 57, 44, 57, 57, 57, 44, 57, 57, 57, 46, 57, 57, 41 },
+        { 36, 49, 46, 48, 48 },
+        { 36, 49, 50, 46, 48, 48 },
+        { 36, 49, 50, 51, 46, 48, 48 },
+        { 36, 49, 44, 50, 51, 52, 46, 48, 48 },
+        { 36, 49, 50, 44, 51, 52, 53, 46, 48, 48 },
+        { 36, 49, 50, 51, 44, 52, 53, 54, 46, 48, 48 },
+        { 36, 49, 44, 50, 51, 52, 44, 53, 54, 55, 46, 48, 48 },
+        { 36, 49, 50, 44, 51, 52, 53, 44, 54, 55, 56, 46, 48, 48 },
+        { 36, 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57, 46, 48, 48 },
+        { 36, 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 48, 46, 48, 48 },
+        { 40, 36, 49, 46, 48, 48, 41 },
+        { 40, 36, 49, 50, 46, 48, 48, 41 },
+        { 40, 36, 49, 50, 51, 46, 48, 48, 41 },
+        { 40, 36, 49, 44, 50, 51, 52, 46, 48, 48, 41 },
+        { 40, 36, 49, 50, 44, 51, 52, 53, 46, 48, 48, 41 },
+        { 40, 36, 49, 50, 51, 44, 52, 53, 54, 46, 48, 48, 41 },
+        { 40, 36, 49, 44, 50, 51, 52, 44, 53, 54, 55, 46, 48, 48, 41 },
+        { 40, 36, 49, 50, 44, 51, 52, 53, 44, 54, 55, 56, 46, 48, 48, 41 },
+        { 40, 36, 49, 50, 51, 44, 52, 53, 54, 44, 55, 56, 57, 46, 48, 48, 41 },
+        { 40, 36, 49, 44, 50, 51, 52, 44, 53, 54, 55, 44, 56, 57, 48, 46, 48, 48, 41 },
+        { 40, 36, 50, 44, 53, 57, 57, 46, 52, 48, 41 },
+        { 40, 36, 50, 44, 53, 57, 57, 46, 51, 52, 41 },
+        { 40, 36, 50, 44, 53, 57, 57, 46, 51, 51, 41 },
+        { 36, 49, 46, 48, 48 },
+        { 36, 49, 46, 48, 48 },
+        { 36, 49, 46, 48, 48 },
+        { 36, 49, 46, 48, 48 },
+        { 36, 49, 46, 48, 48 },
+        { 36, 49, 46, 48, 49 },
+        { 36, 49, 46, 48, 49 },
+        { 36, 49, 46, 48, 49 },
+        { 36, 49, 46, 48, 49 },
+        { 36, 49, 46, 48, 49 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 50 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 46, 50, 51 },
+        { 36, 49, 44, 48, 48, 57, 44, 49, 51, 54, 46, 55, 49 },
+        { 36, 50, 44, 53, 49, 56, 44, 52, 54, 51, 46, 52, 54 },
+        { 36, 50, 44, 53, 51, 50, 44, 52, 51, 56, 46, 56, 51 },
+        { 36, 51, 44, 54, 53, 48, 44, 52, 53, 56, 46, 53, 51 },
+        { 36, 51, 44, 49, 52, 55, 44, 51, 52, 57, 46, 54, 50 },
+        { 36, 53, 44, 52, 49, 49, 44, 51, 51, 57, 46, 55, 53 },
+        { 36, 56, 44, 53, 56, 51, 44, 55, 50, 49, 46, 50, 50 },
+        { 36, 49, 51, 44, 52, 55, 53, 44, 48, 53, 55, 46, 56, 50 },
+        { 36, 51, 51, 44, 53, 56, 56, 44, 52, 52, 49, 46, 57, 56 },
+        { 36, 57, 57, 44, 57, 55, 57, 44, 55, 57, 52, 46, 48, 56 },
+        { 36, 57, 57, 44, 57, 51, 55, 44, 52, 51, 49, 46, 53, 56 },
+        { 36, 57, 57, 44, 51, 56, 54, 44, 55, 49, 57, 46, 48, 56 },
+        { 36, 51, 51, 44, 56, 53, 51, 44, 48, 50, 53, 46, 52, 55 },
+        { 36, 51, 52, 44, 48, 52, 54, 44, 52, 50, 54, 46, 54, 48 },
+        { 36, 51, 52, 44, 51, 49, 50, 44, 56, 48, 48, 46, 56, 55 },
+        { 36, 51, 52, 44, 51, 56, 55, 44, 53, 54, 52, 46, 55, 53 },
+        { 36, 51, 52, 44, 52, 54, 48, 44, 53, 51, 55, 46, 56, 55 },
+        { 36, 51, 52, 44, 53, 55, 57, 44, 49, 55, 53, 46, 49, 50 },
+        { 36, 51, 52, 44, 54, 53, 51, 44, 57, 51, 57, 46, 48, 50 },
+        { 36, 51, 52, 44, 56, 52, 55, 44, 51, 52, 48, 46, 49, 53 },
+        { 36, 51, 52, 44, 57, 50, 48, 44, 51, 49, 51, 46, 50, 55 },
+        { 36, 51, 53, 44, 48, 51, 56, 44, 57, 53, 48, 46, 53, 50 },
+        { 36, 51, 53, 44, 49, 49, 51, 44, 55, 49, 52, 46, 52, 49 },
+        { 36, 51, 53, 44, 49, 56, 54, 44, 54, 56, 55, 46, 53, 51 },
+        { 36, 51, 53, 44, 51, 48, 53, 44, 51, 50, 52, 46, 55, 56 },
+        { 36, 51, 53, 44, 51, 56, 48, 44, 48, 56, 56, 46, 54, 55 },
+        { 36, 51, 53, 44, 52, 53, 51, 44, 48, 54, 49, 46, 55, 57 },
+        { 36, 51, 53, 44, 53, 55, 49, 44, 54, 57, 57, 46, 48, 53 },
+        { 36, 51, 53, 44, 53, 55, 51, 44, 52, 56, 57, 46, 56, 49 },
+        { 36, 51, 53, 44, 54, 52, 54, 44, 52, 54, 50, 46, 57, 51 },
+        { 36, 51, 53, 44, 56, 51, 57, 44, 56, 54, 52, 46, 48, 55 },
+        { 36, 51, 53, 44, 57, 49, 50, 44, 56, 51, 55, 46, 50, 48 },
+        { 36, 51, 54, 44, 48, 51, 49, 44, 52, 55, 52, 46, 52, 53 },
+        { 36, 51, 54, 44, 49, 48, 54, 44, 50, 51, 56, 46, 51, 51 },
+        { 36, 51, 54, 44, 49, 55, 57, 44, 50, 49, 49, 46, 52, 53 },
+        { 36, 51, 54, 44, 50, 57, 55, 44, 56, 52, 56, 46, 55, 48 },
+        { 36, 51, 54, 44, 51, 55, 50, 44, 54, 49, 50, 46, 53, 57 },
+        { 36, 51, 54, 44, 53, 54, 52, 44, 50, 50, 50, 46, 57, 55 },
+        { 36, 51, 54, 44, 53, 54, 54, 44, 48, 49, 51, 46, 55, 51 },
+        { 36, 51, 54, 44, 54, 51, 56, 44, 57, 56, 54, 46, 56, 53 },
+        { 36, 51, 54, 44, 55, 53, 55, 44, 54, 50, 52, 46, 49, 48 },
+        { 36, 51, 54, 44, 56, 51, 50, 44, 51, 56, 55, 46, 57, 57 },
+        { 36, 51, 54, 44, 57, 48, 53, 44, 51, 54, 49, 46, 49, 49 },
+        { 36, 51, 55, 44, 48, 50, 51, 44, 57, 57, 56, 46, 51, 55 },
+        { 36, 51, 55, 44, 48, 57, 56, 44, 55, 54, 50, 46, 50, 53 },
+        { 36, 51, 55, 44, 49, 55, 49, 44, 55, 51, 53, 46, 51, 55 },
+        { 36, 51, 55, 44, 50, 57, 48, 44, 51, 55, 50, 46, 54, 50 },
+        { 36, 51, 55, 44, 51, 54, 53, 44, 49, 51, 54, 46, 53, 50 },
+        { 36, 51, 55, 44, 53, 53, 56, 44, 53, 51, 55, 46, 54, 53 },
+        { 36, 51, 55, 44, 54, 51, 49, 44, 53, 49, 48, 46, 55, 55 },
+        { 36, 51, 55, 44, 55, 53, 48, 44, 49, 52, 56, 46, 48, 50 },
+        { 36, 51, 55, 44, 56, 50, 52, 44, 57, 49, 49, 46, 57, 49 },
+        { 36, 51, 55, 44, 56, 57, 55, 44, 56, 56, 53, 46, 48, 51 },
+        { 36, 51, 56, 44, 48, 49, 54, 44, 53, 50, 50, 46, 50, 56 },
+        { 36, 51, 56, 44, 48, 57, 49, 44, 50, 56, 54, 46, 49, 55 },
+        { 36, 51, 56, 44, 49, 54, 52, 44, 50, 53, 57, 46, 50, 57 },
+        { 36, 51, 56, 44, 50, 56, 50, 44, 56, 57, 54, 46, 53, 53 },
+        { 36, 51, 56, 44, 50, 56, 52, 44, 54, 56, 55, 46, 51, 49 },
+        { 36, 51, 56, 44, 51, 53, 55, 44, 54, 54, 48, 46, 52, 51 },
+        { 36, 51, 56, 44, 53, 53, 49, 44, 48, 54, 49, 46, 53, 55 },
+        { 36, 51, 56, 44, 54, 50, 52, 44, 48, 51, 52, 46, 55, 48 },
+        { 36, 51, 56, 44, 55, 52, 50, 44, 54, 55, 49, 46, 57, 53 },
+        { 36, 51, 56, 44, 56, 49, 55, 44, 52, 51, 53, 46, 56, 51 },
+        { 36, 51, 56, 44, 56, 57, 48, 44, 52, 48, 56, 46, 57, 53 },
+        { 36, 51, 57, 44, 48, 48, 57, 44, 48, 52, 54, 46, 50, 48 },
+        { 36, 51, 57, 44, 48, 56, 51, 44, 56, 49, 48, 46, 48, 57 },
+        { 36, 51, 57, 44, 50, 55, 53, 44, 52, 50, 48, 46, 52, 55 },
+        { 36, 51, 57, 44, 50, 55, 55, 44, 50, 49, 49, 46, 50, 51 },
+        { 36, 51, 57, 44, 51, 53, 48, 44, 49, 56, 52, 46, 51, 53 },
+        { 36, 51, 57, 44, 52, 54, 56, 44, 56, 50, 49, 46, 54, 48 },
+        { 36, 51, 57, 44, 53, 52, 51, 44, 53, 56, 53, 46, 52, 57 },
+        { 36, 51, 57, 44, 54, 49, 54, 44, 53, 53, 56, 46, 54, 49 },
+        { 36, 51, 57, 44, 55, 51, 53, 44, 49, 57, 53, 46, 56, 55 },
+        { 36, 51, 57, 44, 56, 48, 57, 44, 57, 53, 57, 46, 55, 53 },
+        { 36, 51, 57, 44, 56, 56, 50, 44, 57, 51, 50, 46, 56, 55 },
+        { 36, 52, 48, 44, 48, 48, 49, 44, 53, 55, 48, 46, 49, 50 },
+        { 36, 52, 48, 44, 48, 55, 54, 44, 51, 51, 52, 46, 48, 50 },
+        { 36, 52, 48, 44, 50, 54, 57, 44, 55, 51, 53, 46, 49, 53 },
+        { 36, 52, 48, 44, 51, 52, 50, 44, 55, 48, 56, 46, 50, 55 },
+        { 36, 52, 48, 44, 52, 54, 49, 44, 51, 52, 53, 46, 53, 50 },
+        { 36, 52, 48, 44, 53, 51, 54, 44, 49, 48, 57, 46, 52, 49 },
+        { 36, 52, 48, 44, 54, 48, 57, 44, 48, 56, 50, 46, 53, 51 },
+        { 36, 52, 48, 44, 55, 50, 55, 44, 55, 49, 57, 46, 55, 56 },
+        { 36, 52, 48, 44, 56, 48, 50, 44, 52, 56, 51, 46, 54, 55 },
+        { 36, 52, 48, 44, 56, 55, 53, 44, 52, 53, 54, 46, 55, 57 },
+        { 36, 52, 48, 44, 57, 57, 52, 44, 48, 57, 52, 46, 48, 53 },
+        { 36, 52, 48, 44, 57, 57, 53, 44, 56, 56, 52, 46, 56, 49 },
+        { 36, 52, 49, 44, 48, 54, 56, 44, 56, 53, 55, 46, 57, 51 },
+        { 36, 52, 49, 44, 50, 54, 50, 44, 50, 53, 57, 46, 48, 55 },
+        { 36, 52, 49, 44, 51, 51, 53, 44, 50, 51, 50, 46, 50, 48 },
+        { 36, 52, 49, 44, 52, 53, 51, 44, 56, 54, 57, 46, 52, 53 },
+        { 36, 52, 49, 44, 53, 50, 56, 44, 54, 51, 51, 46, 51, 51 },
+        { 36, 52, 49, 44, 54, 48, 49, 44, 54, 48, 54, 46, 52, 53 },
+        { 36, 52, 49, 44, 55, 50, 48, 44, 50, 52, 51, 46, 55, 48 },
+        { 36, 52, 49, 44, 55, 57, 53, 44, 48, 48, 55, 46, 53, 57 },
+        { 36, 52, 49, 44, 57, 56, 54, 44, 54, 49, 55, 46, 57, 55 },
+        { 36, 52, 50, 44, 48, 51, 52, 44, 48, 55, 50, 46, 56, 55 },
+        { 36, 52, 50, 44, 49, 48, 55, 44, 48, 52, 53, 46, 57, 56 },
+        { 36, 52, 50, 44, 49, 51, 52, 44, 51, 53, 52, 46, 57, 56 },
+    };
+
+}
diff --git a/jdk/test/java/text/Format/DecimalFormat/RoundingAndPropertyTest.java b/jdk/test/java/text/Format/DecimalFormat/RoundingAndPropertyTest.java
new file mode 100644
index 00000000000..68b2c31e213
--- /dev/null
+++ b/jdk/test/java/text/Format/DecimalFormat/RoundingAndPropertyTest.java
@@ -0,0 +1,795 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/* @test
+ * @bug 7050528
+ * @summary Test java.text.DecimalFormat fast-path for format(double...)
+ * @author Olivier Lagneau
+ * @run main RoundingAndPropertyTest
+ *
+ */
+
+/* -----------------------------------------------------------------------------
+ * Note :
+ *  Since fast-path algorithm   does not modify  any feature  of DecimalFormat,
+ *  some tests or  values in this program  may have to be adapted/added/removed
+ *  when any change has been done in the fast-path source  code, because the
+ *  conditions for exercising fast-path may change.
+ *
+ *  This is specially true if the set of constraints to fall in the fast-path
+ *  case is relaxed in any manner.
+ *
+ * Usage :
+ *  - Run main without any argument to test against a set of golden values and
+ *    associated results hard-coded in the source code. That will do the tests
+ *    described below
+ *    See below comment section named "Description".
+ *
+ *  or
+ *
+ *  - Run main with string argument "-gengold" to output source code of
+ *    GoldenFormattedValues.java class file with the jdk version used while
+ *    generating the code.
+ *    See below comment section named : "Modifying Golden Values".
+ *
+ *  In case of error while running the test, a Runtime exception is generated
+ *  providing the numbers of errors detected (format of golden values checks and
+ *  property changes checks), and the program exit.
+ *
+ * Description :
+ *
+ *  This test first checks that localization of digits is done correctly when
+ *  calling DecimalFormat.format() on the array of values DecimalLocalizationValues
+ *  found in GoldenDoubleValues, using the locale FullLocalizationTestLocale
+ *  (from GoldenDoubleValues) that implies localization of digits. it checks the
+ *  the results against expected returned string. In case of formatting error,
+ *  it provides a message informing which value was wrongly formatted.
+ *
+ *  Then it checks the results of  calling NumberFormat.format(double) on a set
+ *  of  predefined golden values and  checks results against expected returned
+ *  string.  It does this both for the  decimal case, with an instance returned
+ *  NumberFormat.getInstance() call and for the currency case, with an instance
+ *  returned by NumberFormat.getCurrencyInstance(). Almost all the tested  double
+ *  values satisfy the constraints assumed by the fast-path algorithm for
+ *  format(double ...). Some  are voluntarily outside the scope of fast-path to
+ *  check that the algorithm correctly eliminate them. In case of formatting
+ *  error a message provides information on the golden value raising the error
+ *  (value, exact decimal value (using BidDecimal), expected result, formatted result).
+ *
+ *  Last  the test checks the status and  behavior of a DecimalFormat instance
+ *  when changing  properties that  make this  instance  satisfy/invalidate its
+ *  fast-path status, depending on the predefined  set of fast-path constraints.
+ *
+ *  The golden  results are predefined arrays  of  int[] containing the unicode
+ *  ints of the chars  in  the expected  formatted  string, when  using  locale
+ *  provided in  GoldenDoubleValues class. The   results are those obtained  by
+ *  using a reference jdk  version (for example  one that does not contains the
+ *  DecimalFormat fast-path algorithm, like jdk80-b25).
+ *
+ *  The double values from which we get golden results are stored inside two
+ *  arrays of double values:
+ *  - DecimalGoldenValues  for testing NumberFormat.getInstance().
+ *  - CurrencyGoldenValues for testing NumberFormat.getCurrencyInstance().
+ *  These arrays are located in GoldenDoubleValues.java source file.
+ *
+ *  For each double value in the arrays above, there is an associated golden
+ *  result. These results are stored in arrays of int[]:
+ *  - DecimalGoldenFormattedValues  for expected decimal golden results.
+ *  - CurrencyGoldenFormattedValues for expected currency golden results.
+ *  - DecimalDigitsLocalizedFormattedValues for expected localized digit results.
+ *
+ *  We store the results in int[] arrays containing the expected unicode values
+ *  because the  compiler that will compile the  containing java file may use a
+ *  different locale than the one registered in GoldenDoubleValues.java.  These
+ *  arrays are  located in  a  separate GoldenFormattedValues.java  source file
+ *  that is generated  by  RoundingAndPropertyTest using  "-gengold"  parameter.
+ *  See below "Modifying Golden Values".
+ *
+ *  The golden value arrays can be expanded, modified ... to test additional
+ *  or different double values. In that case, the source file of class
+ *  GoldenFormattedValues must be regenerated to replace the existing one..
+ *
+ * Modifying Golden Values :
+ *
+ *  In order to ease further modification of the list of double values checked
+ *  and associated golden results, the test includes the method
+ *  generatesGoldenFormattedValuesClass() that writes on standard output stream
+ *  the source code for GoldenFormattedValues class that includes the expected
+ *  results arrays.
+ *
+ *  Here are the steps to follow for updating/modifying golden values and results:
+ *   1- Edit GoldenDoubleValues.java to add/remove/modify golden or localization
+ *      values.
+ *   2- Run main with "-gengold" string argument with a target jdk.
+ *      (at the creation of this test file, the target jdk used was jdk1.8.0-ea).
+ *   2- Copy this java code that has been writen on standard output and replace
+ *      GoldenFormattedValues.java contents by the generated output.
+ *   3- Check that this updated code compiles.
+ *  [4]- If needed replaces existing GoldenDoubleValues and GoldenFormattedValues
+ *      files in jdk/test section, respectively by the one modified at step 1 and
+ *      generated at step 2.
+ * -----------------------------------------------------------------------------
+ */
+
+import java.util.*;
+import java.text.NumberFormat;
+import java.text.DecimalFormat;
+import java.text.DecimalFormatSymbols;
+import java.math.RoundingMode;
+import java.math.BigDecimal;
+
+
+public class RoundingAndPropertyTest {
+
+
+    // Prints on standard output stream the unicode values of chars as a
+    // comma-separated list of int values
+    private static void printUnicodeValuesArray(char[] chars) {
+        for (int i = 0; i < chars.length; i++) {
+            System.out.print((int) chars[i]);
+            if (i != (chars.length - 1))
+                System.out.print(", ");
+        }
+    }
+
+    // Converts given array of unicode values as an array of chars.
+    // Returns this converted array.
+    private static char[] getCharsFromUnicodeArray(int[] unicodeValues) {
+        char[] chars = new char[unicodeValues.length];
+
+        for (int i = 0; i < unicodeValues.length; i++) {
+            chars[i] = (char) unicodeValues[i];
+        }
+        return chars;
+    }
+
+    /* Prints on standard output stream the java code of resulting
+     * GoldenFormattedValues class for the golden values found in
+     * class GoldenDoubleValues.
+     */
+    private static void generatesGoldenFormattedValuesClass() {
+
+        String fourWhiteSpaces    = "    ";
+        String eightWhiteSpaces   = "        ";
+
+        // Prints header without Copyright header.
+        System.out.println("/* This is a machine generated file - Please DO NOT EDIT !");
+        System.out.println(" * Change RoundingAndPropertyTest instead,");
+        System.out.println(" * and run with \"-gengold\" argument to regenerate (without copyright header).");
+        System.out.println(" */");
+        System.out.println();
+
+        System.out.println("/* This file contains the set of result Strings expected from calling inside");
+        System.out.println(" * RoundingAndPropertyTest the method NumberFormat.format() upon the set of");
+        System.out.println(" * double values provided in GoldenDoubleValues.java. It contains three arrays,");
+        System.out.println(" * each containing arrays of unicode values representing the expected string");
+        System.out.println(" * result when calling format() on the corresponding (i.e. same index) double");
+        System.out.println(" * value found in GoldenDoubleValues arrays :");
+        System.out.println(" * - DecimalDigitsLocalizedFormattedValues corresponds to DecimalLocalizationValues,");
+        System.out.println(" *   when using FullLocalizationTestLocale to format.");
+        System.out.println(" * - DecimalGoldenFormattedValues corresponds to DecimalGoldenValues, when used");
+        System.out.println(" *   in the decimal pattern case together with TestLocale.");
+        System.out.println(" * - CurrencyGoldenFormattedValues corresponds to CurrencyGoldenValues. when used");
+        System.out.println(" *   in the currency pattern case together with TestLocale.");
+        System.out.println(" * Please see documentation in RoundingAndPropertyTest.java for more details.");
+        System.out.println(" *");
+        System.out.println(" * This file generated by running RoundingAndPropertyTest with \"-gengold\" argument.");
+        System.out.println(" */");
+        System.out.println();
+
+        // Prints beginning of class GoldenFormattedValues.
+        System.out.println("class GoldenFormattedValues {");
+        System.out.println();
+        System.out.println(
+            fourWhiteSpaces +
+            "// The formatted values below were generated from golden values");
+        System.out.print(
+            fourWhiteSpaces +
+            "// listed in GoldenDoubleValues.java,");
+        System.out.println(" using the following jvm version :");
+        System.out.println(
+            fourWhiteSpaces + "//   " +
+            System.getProperty("java.vendor") +
+            " " +
+            System.getProperty("java.vm.name") +
+            " " +
+            System.getProperty("java.version"));
+        System.out.println(
+            fourWhiteSpaces +
+            "//   locale for golden double values : " + GoldenDoubleValues.TestLocale);
+        System.out.println(
+            fourWhiteSpaces +
+            "//   locale for testing digit localization : " + GoldenDoubleValues.FullLocalizationTestLocale);
+        System.out.println();
+
+        // Prints the expected results when digit localization happens
+        System.out.println(
+            fourWhiteSpaces +
+            "// The array of int[] unicode values storing the expected results");
+        System.out.print(
+            fourWhiteSpaces +
+            "// when experiencing full localization of digits");
+        System.out.println(" on DecimalLocalizationValues.");
+        System.out.println(
+            fourWhiteSpaces +
+            "static int[][] DecimalDigitsLocalizedFormattedValues = {");
+        NumberFormat df =
+            NumberFormat.getInstance(GoldenDoubleValues.FullLocalizationTestLocale);
+        for (int i = 0;
+             i < GoldenDoubleValues.DecimalLocalizationValues.length;
+             i++) {
+            double d = GoldenDoubleValues.DecimalLocalizationValues[i];
+            String formatted = df.format(d);
+            char[] decFmtChars = formatted.toCharArray();
+
+            System.out.print(eightWhiteSpaces + "{ ");
+            printUnicodeValuesArray(decFmtChars);
+            System.out.println(" },");
+        }
+        System.out.println(fourWhiteSpaces + "};");
+        System.out.println();
+
+        // Prints the golden expected results for the decimal pattern case
+        System.out.println(
+            fourWhiteSpaces +
+            "// The array of int[] unicode values storing the expected results");
+        System.out.print(
+            fourWhiteSpaces +
+            "// when calling Decimal.format(double)");
+        System.out.println(" on the decimal GoldenDoubleValues.");
+        System.out.println(
+            fourWhiteSpaces +
+            "static int[][] DecimalGoldenFormattedValues = {");
+        df = NumberFormat.getInstance(GoldenDoubleValues.TestLocale);
+        for (int i = 0;
+             i < GoldenDoubleValues.DecimalGoldenValues.length;
+             i++) {
+            double d = GoldenDoubleValues.DecimalGoldenValues[i];
+            String formatted = df.format(d);
+            char[] decFmtChars = formatted.toCharArray();
+
+            System.out.print(eightWhiteSpaces + "{ ");
+            printUnicodeValuesArray(decFmtChars);
+            System.out.println(" },");
+        }
+        System.out.println(fourWhiteSpaces + "};");
+        System.out.println();
+
+        // Prints the golden expected results for the currency pattern case
+        System.out.println(
+            fourWhiteSpaces +
+            "// The array of int[] unicode values storing the expected results");
+        System.out.print(
+            fourWhiteSpaces +
+            "// when calling Decimal.format(double)");
+        System.out.println(" on the currency GoldenDoubleValues.");
+        System.out.println(
+            fourWhiteSpaces +
+            "static int[][] CurrencyGoldenFormattedValues = {");
+        NumberFormat cf =
+            NumberFormat.getCurrencyInstance(GoldenDoubleValues.TestLocale);
+        for (int i = 0;
+             i < GoldenDoubleValues.CurrencyGoldenValues.length;
+             i++) {
+            double d = GoldenDoubleValues.CurrencyGoldenValues[i];
+            String formatted = cf.format(d);
+            char[] decFmtChars = formatted.toCharArray();
+
+            System.out.print(eightWhiteSpaces + "{ ");
+            printUnicodeValuesArray(decFmtChars);
+            System.out.println(" },");
+        }
+        System.out.println(fourWhiteSpaces + "};");
+        System.out.println();
+
+        // Prints end of GoldenFormattedValues class.
+        System.out.println("}");
+    }
+
+    private static int testLocalizationValues() {
+
+        DecimalFormat df = (DecimalFormat)
+            NumberFormat.getInstance(GoldenDoubleValues.FullLocalizationTestLocale);
+
+        double[] localizationValues = GoldenDoubleValues.DecimalLocalizationValues;
+        int size = localizationValues.length;
+        int successCounter = 0;
+        int failureCounter = 0;
+        for (int i = 0; i < size; i++) {
+
+            double d = localizationValues[i];
+            String formatted = df.format(d);
+
+            char[] expectedUnicodeArray =
+                getCharsFromUnicodeArray(
+                    GoldenFormattedValues.DecimalDigitsLocalizedFormattedValues[i]);
+            String expected = new String(expectedUnicodeArray);
+
+            if (!formatted.equals(expected)) {
+                failureCounter++;
+                System.out.println(
+                    "--- Localization error for value d = " + d +
+                    ". Exact value = " + new BigDecimal(d).toString() +
+                    ". Expected result = " + expected +
+                    ". Output result = " + formatted);
+            } else successCounter++;
+        }
+        System.out.println("Checked positively " + successCounter +
+                           " golden decimal values out of " + size +
+                           " tests. There were " + failureCounter +
+                           " format failure");
+
+        return failureCounter;
+    }
+
+    private static int testGoldenValues(java.text.DecimalFormat df,
+                                        java.text.DecimalFormat cf) {
+
+        double[] goldenDecimalValues = GoldenDoubleValues.DecimalGoldenValues;
+        int decimalSize = goldenDecimalValues.length;
+        int decimalSuccessCounter = 0;
+        int decimalFailureCounter = 0;
+        for (int i = 0; i < decimalSize; i++) {
+
+            double d = goldenDecimalValues[i];
+            String formatted = df.format(d);
+
+            char[] expectedUnicodeArray =
+                getCharsFromUnicodeArray(
+                    GoldenFormattedValues.DecimalGoldenFormattedValues[i]);
+            String expected = new String(expectedUnicodeArray);
+
+            if (!formatted.equals(expected)) {
+                decimalFailureCounter++;
+                System.out.println(
+                    "--- Error for golden value d = " + d +
+                    ". Exact value = " + new BigDecimal(d).toString() +
+                    ". Expected result = " + expected +
+                    ". Output result = " + formatted);
+            } else decimalSuccessCounter++;
+        }
+        System.out.println("Checked positively " + decimalSuccessCounter +
+                           " golden decimal values out of " + decimalSize +
+                           " tests. There were " + decimalFailureCounter +
+                           " format failure");
+
+        double[] goldenCurrencyValues = GoldenDoubleValues.CurrencyGoldenValues;
+        int currencySize = goldenCurrencyValues.length;
+        int currencySuccessCounter = 0;
+        int currencyFailureCounter = 0;
+        for (int i = 0; i < currencySize; i++) {
+            double d = goldenCurrencyValues[i];
+            String formatted = cf.format(d);
+
+            char[] expectedUnicodeArray =
+                getCharsFromUnicodeArray(
+                    GoldenFormattedValues.CurrencyGoldenFormattedValues[i]);
+            String expected = new String(expectedUnicodeArray);
+
+            if (!formatted.equals(expected)) {
+                currencyFailureCounter++;
+                System.out.println(
+                    "--- Error for golden value d = " + d +
+                    ". Exact value = " + new BigDecimal(d).toString() +
+                    ". Expected result = " + expected +
+                    ". Output result = " + formatted);
+            } else currencySuccessCounter++;
+        }
+        System.out.println("Checked positively " + currencySuccessCounter +
+                           " golden currency values out of " + currencySize +
+                           " tests. There were " + currencyFailureCounter +
+                           " format failure");
+
+        return (decimalFailureCounter + currencyFailureCounter);
+    }
+
+    // Checks that the two passed s1 and s2 string are equal, and prints
+    // out message in case of error.
+    private static boolean resultsEqual(String propertyName,
+                                        String s1,
+                                        String s2) {
+
+        boolean equality = s1.equals(s2);
+        if (!equality)
+            System.out.println(
+                "\n*** Error while reverting to default " +
+                propertyName + " property.\n" +
+                "    initial output = " + s1 +
+                ". reverted output = " + s2 + ".");
+        else System.out.println(" Test passed.");
+
+        return equality;
+
+    }
+
+    /* This methods checks the behaviour of the management of properties
+     * of a DecimalFormat instance that satisfies fast-path constraints.
+     *
+     * It does this by comparing the results of the format(double) output
+     * obtained from initial fast-path state with the output provided by
+     * the same instance that has been pushed and exercised outside
+     * fast-path rules and finally "reverted" to its initial fast-path state.
+     *
+     * The schema of actions is this :
+     *  - Call format(double) on a known DecimalFormat fast-path instance,
+     *    and store this result.
+     *  - Record the current state of a given property.
+     *  - Change the property to invalidate the fast-path state.
+     *  - Call again format(double) on the instance.
+     *  - Revert state of property to validate again fast-path context.
+     *  - Call format(double) again.
+     *  - Check that first and last call to format(double) provide same result
+     *  - Record failure if any.
+     *  - Do the same for another property with the same instance.
+     * So all the property changes are chained one after the other on only the
+     * same instance.
+     *
+     * Some properties that currently do not influence the fast-path state
+     * are also tested. This is not useful with current fast-path source
+     * but is here for testing the whole set of properties. This is the case
+     * for prefixes and suffixes, and parseBigDecimal properties.
+     */
+    private static int testSettersAndFastPath(DecimalFormat df,
+                                               boolean isCurrency) {
+
+        final double d1 = GoldenDoubleValues.PROPERTY_CHECK_POSITIVE_VALUE;
+        final double d2 = GoldenDoubleValues.PROPERTY_CHECK_NEGATIVE_VALUE;
+
+        int errors = 0;
+        boolean testSucceeded = false;
+        String firstFormatResult;
+        String secondFormatResult;
+        String propertyName;
+
+        // ---- positivePrefix property test ----
+        testSucceeded = false;
+        propertyName = "positivePrefix";
+        System.out.print("Checking " + propertyName + " property.");
+        String initialPrefix = df.getPositivePrefix();
+        firstFormatResult = df.format(d1);
+        df.setPositivePrefix("positivePrefix:");
+        df.format(d1);
+        df.setPositivePrefix(initialPrefix);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- positiveSuffix property test ----
+        testSucceeded = false;
+        propertyName = "positiveSuffix";
+        System.out.print("Checking " + propertyName + " property.");
+        String initialSuffix = df.getPositiveSuffix();
+        firstFormatResult = df.format(d1);
+        df.setPositiveSuffix("positiveSuffix:");
+        df.format(d1);
+        df.setPositiveSuffix(initialSuffix);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName,firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- negativePrefix property test ----
+        testSucceeded = false;
+        propertyName = "negativePrefix";
+        System.out.print("Checking " + propertyName + " property.");
+        initialPrefix = df.getNegativePrefix();
+        firstFormatResult = df.format(d1);
+        df.setNegativePrefix("negativePrefix:");
+        df.format(d1);
+        df.setNegativePrefix(initialPrefix);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- negativeSuffix property test ----
+        testSucceeded = false;
+        propertyName = "negativeSuffix";
+        System.out.print("Checking " + propertyName + " property.");
+        initialSuffix = df.getNegativeSuffix();
+        firstFormatResult = df.format(d1);
+        df.setNegativeSuffix("negativeSuffix:");
+        df.format(d1);
+        df.setNegativeSuffix(initialSuffix);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- multiplier property test ----
+        testSucceeded = false;
+        propertyName = "multiplier";
+        System.out.print("Checking " + propertyName + " property.");
+        int initialMultiplier = df.getMultiplier();
+        firstFormatResult = df.format(d1);
+        df.setMultiplier(10);
+        df.format(d1);
+        df.setMultiplier(initialMultiplier);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- groupingUsed property test ----
+        testSucceeded = false;
+        propertyName = "groupingUsed";
+        System.out.print("Checking " + propertyName + " property.");
+        boolean initialGroupingUsed = df.isGroupingUsed();
+        firstFormatResult = df.format(d1);
+        df.setGroupingUsed(!initialGroupingUsed);
+        df.format(d1);
+        df.setGroupingUsed(initialGroupingUsed);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- groupingSize property test ----
+        testSucceeded = false;
+        propertyName = "groupingSize";
+        System.out.print("Checking " + propertyName + " property.");
+        int initialGroupingSize = df.getGroupingSize();
+        firstFormatResult = df.format(d1);
+        df.setGroupingSize(initialGroupingSize + 1);
+        df.format(d1);
+        df.setGroupingSize(initialGroupingSize);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- decimalSeparatorAlwaysShown property test ----
+        testSucceeded = false;
+        propertyName = "decimalSeparatorAlwaysShown";
+        System.out.print("Checking " + propertyName + " property.");
+        boolean initialDSShown = df.isDecimalSeparatorAlwaysShown();
+        firstFormatResult = df.format(d1);
+        df.setDecimalSeparatorAlwaysShown(!initialDSShown);
+        df.format(d1);
+        df.setDecimalSeparatorAlwaysShown(initialDSShown);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- parseBigDecimal property test ----
+        testSucceeded = false;
+        propertyName = "parseBigDecimal";
+        System.out.print("Checking " + propertyName + " property.");
+        boolean initialParseBigdecimal = df.isParseBigDecimal();
+        firstFormatResult = df.format(d1);
+        df.setParseBigDecimal(!initialParseBigdecimal);
+        df.format(d1);
+        df.setParseBigDecimal(initialParseBigdecimal);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- maximumIntegerDigits property test ----
+        testSucceeded = false;
+        propertyName = "maximumIntegerDigits";
+        System.out.print("Checking " + propertyName + " property.");
+        int initialMaxIDs = df.getMaximumIntegerDigits();
+        firstFormatResult = df.format(d1);
+        df.setMaximumIntegerDigits(8);
+        df.format(d1);
+        df.setMaximumIntegerDigits(initialMaxIDs);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- minimumIntegerDigits property test ----
+        testSucceeded = false;
+        propertyName = "minimumIntegerDigits";
+        System.out.print("Checking " + propertyName + " property.");
+        int initialMinIDs = df.getMinimumIntegerDigits();
+        firstFormatResult = df.format(d1);
+        df.setMinimumIntegerDigits(2);
+        df.format(d1);
+        df.setMinimumIntegerDigits(initialMinIDs);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- maximumFractionDigits property test ----
+        testSucceeded = false;
+        propertyName = "maximumFractionDigits";
+        System.out.print("Checking " + propertyName + " property.");
+        firstFormatResult = df.format(d1);
+        df.setMaximumFractionDigits(8);
+        df.format(d1);
+        if (isCurrency) {
+            df.setMinimumFractionDigits(2);
+            df.setMaximumFractionDigits(2);
+        } else {
+            df.setMinimumFractionDigits(0);
+            df.setMaximumFractionDigits(3);
+        }
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- minimumFractionDigits property test ----
+        testSucceeded = false;
+        propertyName = "minimumFractionDigits";
+        System.out.print("Checking " + propertyName + " property.");
+        firstFormatResult = df.format(d1);
+        df.setMinimumFractionDigits(1);
+        df.format(d1);
+        if (isCurrency) {
+            df.setMinimumFractionDigits(2);
+            df.setMaximumFractionDigits(2);
+        } else {
+            df.setMinimumFractionDigits(0);
+            df.setMaximumFractionDigits(3);
+        }
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- currency property test ----
+        testSucceeded = false;
+        propertyName = "currency";
+        System.out.print("Checking " + propertyName + " property.");
+        Currency initialCurrency = df.getCurrency();
+        Currency japanCur = java.util.Currency.getInstance(Locale.JAPAN);
+        firstFormatResult = df.format(d1);
+        df.setCurrency(japanCur);
+        df.format(d1);
+        df.setCurrency(initialCurrency);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- roundingMode property test ----
+        testSucceeded = false;
+        propertyName = "roundingMode";
+        System.out.print("Checking " + propertyName + " property.");
+        RoundingMode initialRMode = df.getRoundingMode();
+        firstFormatResult = df.format(d1);
+        df.setRoundingMode(RoundingMode.HALF_UP);
+        df.format(d1);
+        df.setRoundingMode(RoundingMode.HALF_EVEN);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        // ---- decimalFormatSymbols property test ----
+        testSucceeded = false;
+        propertyName = "decimalFormatSymbols";
+        System.out.print("Checking " + propertyName + " property.");
+        DecimalFormatSymbols initialDecimalFormatSymbols = df.getDecimalFormatSymbols();
+        firstFormatResult = df.format(d1);
+        Locale bizarreLocale = new Locale("fr", "FR");
+        DecimalFormatSymbols unusualSymbols = new DecimalFormatSymbols(bizarreLocale);
+        unusualSymbols.setDecimalSeparator('@');
+        unusualSymbols.setGroupingSeparator('|');
+        df.setDecimalFormatSymbols(unusualSymbols);
+        df.format(d1);
+        df.setDecimalFormatSymbols(initialDecimalFormatSymbols);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        testSucceeded = false;
+        System.out.print("Checking " + propertyName + " property.");
+        initialDecimalFormatSymbols = df.getDecimalFormatSymbols();
+        firstFormatResult = df.format(d1);
+        Locale japanLocale = Locale.JAPAN;
+        unusualSymbols = new DecimalFormatSymbols(japanLocale);
+        unusualSymbols.setDecimalSeparator('9');
+        unusualSymbols.setGroupingSeparator('0');
+        df.setDecimalFormatSymbols(unusualSymbols);
+        df.format(d1);
+        df.setDecimalFormatSymbols(initialDecimalFormatSymbols);
+        secondFormatResult = df.format(d1);
+        testSucceeded =
+            resultsEqual(propertyName, firstFormatResult, secondFormatResult);
+        if (!testSucceeded)
+            errors++;
+
+        return errors;
+    }
+
+    // Main for RoundingAndPropertyTest. We test first the golden values,
+    // and then the property setters and getters.
+    public static void main(String[] args) {
+
+        if ((args.length >= 1) &&
+            (args[0].equals("-gengold")))
+            generatesGoldenFormattedValuesClass();
+        else {
+            System.out.println("\nChecking correctness of formatting with digit localization.");
+            System.out.println("=============================================================");
+            int localizationErrors = testLocalizationValues();
+            if (localizationErrors != 0)
+                System.out.println("*** Failure in localization tests : " +
+                                   localizationErrors + " errors detected ");
+            else System.out.println(" Tests for full localization of digits all passed.");
+
+            DecimalFormat df = (DecimalFormat)
+                NumberFormat.getInstance(GoldenDoubleValues.TestLocale);
+            DecimalFormat cf = (DecimalFormat)
+                NumberFormat.getCurrencyInstance(GoldenDoubleValues.TestLocale);
+
+            System.out.println("\nChecking correctness of formating for golden values.");
+            System.out.println("=============================================================");
+            int goldenValuesErrors = testGoldenValues(df,cf);
+            if (goldenValuesErrors != 0)
+                System.out.println("*** Failure in goldenValues tests : " +
+                                   goldenValuesErrors + " errors detected ");
+            else System.out.println(" Tests for golden values all passed.");
+
+            System.out.println("\nChecking behavior of property changes for decimal case.");
+            System.out.println("=============================================================");
+            int decimalTestsErrors = testSettersAndFastPath(df, false);
+            if (decimalTestsErrors != 0)
+                System.out.println("*** Failure in decimal property changes tests : " +
+                                   decimalTestsErrors + " errors detected ");
+            else System.out.println(" Tests for decimal property changes all passed.");
+
+            System.out.println("\nChecking behavior of property changes for currency case.");
+            System.out.println("=============================================================");
+            int currencyTestsErrors = testSettersAndFastPath(cf, true);
+            if (currencyTestsErrors != 0)
+                System.out.println("*** Failure in currency property changes tests : " +
+                                   currencyTestsErrors + " errors detected ");
+            else System.out.println(" Tests for currency property chamges all passed.");
+
+            if ((localizationErrors > 0) ||
+                (goldenValuesErrors > 0) ||
+                (decimalTestsErrors > 0) ||
+                (currencyTestsErrors > 0))
+                throw new RuntimeException(
+                    "Failed with " +
+                    (localizationErrors + goldenValuesErrors +
+                     decimalTestsErrors + currencyTestsErrors) +
+                    " error(s).");
+        }
+    }
+}
diff --git a/jdk/test/java/util/Locale/Bug7069824.java b/jdk/test/java/util/Locale/Bug7069824.java
new file mode 100644
index 00000000000..f170630a25c
--- /dev/null
+++ b/jdk/test/java/util/Locale/Bug7069824.java
@@ -0,0 +1,1006 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7069824
+ * @summary Verify implementation for Locale matching.
+ * @run main Bug7069824
+ */
+
+import java.util.*;
+import java.util.Locale.*;
+import static java.util.Locale.FilteringMode.*;
+import static java.util.Locale.LanguageRange.*;
+
+public class Bug7069824 {
+
+    static boolean err = false;
+
+    public static void main(String[] args) {
+        testLanguageRange();
+        testLocale();
+
+        if (err) {
+            throw new RuntimeException("Failed.");
+        }
+    }
+
+    private static void testLanguageRange() {
+        System.out.println("Test LanguageRange class...");
+        testConstants();
+        testConstructors();
+        testMethods();
+    }
+
+    private static void testLocale() {
+        System.out.println("Test Locale class...");
+        test_filter();
+        test_filterTags();
+        test_lookup();
+        test_lookupTag();
+    }
+
+    private static void testConstants() {
+        boolean error = false;
+
+        if (MIN_WEIGHT != 0.0) {
+            error = true;
+            System.err.println("    MIN_WEIGHT should be 0.0 but got "
+                + MIN_WEIGHT);
+        }
+
+        if (MAX_WEIGHT != 1.0) {
+            error = true;
+            System.err.println("    MAX_WEIGHT should be 1.0 but got "
+                + MAX_WEIGHT);
+        }
+
+        if (error) {
+            err = true;
+            System.err.println("  testConstants() failed.");
+        } else {
+            System.out.println("  testConstants() passed.");
+        }
+    }
+
+    private static void testConstructors() {
+        boolean error = false;
+
+        LanguageRange lr;
+        String range;
+        double weight;
+
+        range = null;
+        try {
+            lr = new LanguageRange(range);
+            error = true;
+            System.err.println("    NPE should be thrown for LanguageRange("
+                + range + ").");
+        }
+        catch (NullPointerException ex) {
+        }
+
+        range = null;
+        weight = 0.8;
+        try {
+            lr = new LanguageRange(range, weight);
+            error = true;
+            System.err.println("    NPE should be thrown for LanguageRange("
+                + range + ", " + weight + ").");
+        }
+        catch (NullPointerException ex) {
+        }
+
+        range = "elvish";
+        try {
+            lr = new LanguageRange(range);
+        }
+        catch (Exception ex) {
+            error = true;
+            System.err.println("    " + ex
+                + " should not be thrown for LanguageRange(" + range + ").");
+        }
+
+        range = "de-DE";
+        try {
+            lr = new LanguageRange(range);
+        }
+        catch (Exception ex) {
+            error = true;
+            System.err.println("    " + ex
+                + " should not be thrown for LanguageRange(" + range + ").");
+        }
+
+        range = "ar";
+        weight = 0.8;
+        try {
+            lr = new LanguageRange(range, weight);
+        }
+        catch (Exception ex) {
+            error = true;
+            System.err.println("    " + ex
+                + " should not be thrown for LanguageRange(" + range + ", "
+                + weight + ").");
+        }
+
+        range = "ja";
+        weight = -0.8;
+        try {
+            lr = new LanguageRange(range, weight);
+            error = true;
+            System.err.println("    IAE should be thrown for LanguageRange("
+                + range + ", " + weight + ").");
+        }
+        catch (IllegalArgumentException ex) {
+        }
+
+        range = "Elvish";
+        weight = 3.0;
+        try {
+            lr = new LanguageRange(range, weight);
+            error = true;
+            System.err.println("    IAE should be thrown for LanguageRange("
+                + range + ", " + weight + ").");
+        }
+        catch (IllegalArgumentException ex) {
+        }
+
+        String[] illformedRanges = {"-ja", "ja--JP", "en-US-", "a4r", "ar*",
+            "ar-*EG", "", "abcdefghijklmn", "ja-J=", "ja-opqrstuvwxyz"};
+        for (String r : illformedRanges) {
+            try {
+                lr = new LanguageRange(r);
+                error = true;
+                System.err.println("    IAE should be thrown for LanguageRange("
+                    + r + ").");
+            }
+            catch (IllegalArgumentException ex) {
+            }
+        }
+
+
+        if (error) {
+            err = true;
+            System.err.println("  testConstructors() failed.");
+        } else {
+            System.out.println("  testConstructors() passed.");
+        }
+    }
+
+    private static void testMethods() {
+        test_getRange();
+        test_getWeight();
+        test_equals();
+        test_parse();
+        test_mapEquivalents();
+    }
+
+    private static void test_getRange() {
+        boolean error = false;
+
+        String range = "ja";
+        double weight = 0.5;
+        LanguageRange lr = new LanguageRange(range, weight);
+        if (!lr.getRange().equals(range)) {
+             error = true;
+             System.err.println("    LanguageRange.getRange() returned unexpected value. Expected: "
+                 + range + ", got: " + lr.getRange());
+        }
+
+        range = "en-US";
+        weight = 0.5;
+        lr = new LanguageRange(range, weight);
+        if (!lr.getRange().equals(range.toLowerCase())) {
+             error = true;
+             System.err.println("    LanguageRange.getRange() returned unexpected value. Expected: "
+                 + range + ", got: " + lr.getRange());
+        }
+
+        if (error) {
+            err = true;
+            System.err.println("  test_getRange() failed.");
+        } else {
+            System.out.println("  test_getRange() passed.");
+        }
+    }
+
+    private static void test_getWeight() {
+        boolean error = false;
+
+        String range = "ja";
+        double weight = 0.5;
+        LanguageRange lr = new LanguageRange(range, weight);
+        if (lr.getWeight() != weight) {
+             error = true;
+             System.err.println("    LanguageRange.getWeight() returned unexpected value. Expected: "
+                 + weight + ", got: " + lr.getWeight());
+        }
+
+        range = "ja";
+        weight = MAX_WEIGHT; // default
+        lr = new LanguageRange(range);
+        if (!lr.getRange().equals(range) || lr.getWeight() != MAX_WEIGHT) {
+             error = true;
+             System.err.println("    LanguageRange.getWeight() returned unexpected value. Expected: "
+                 + weight + ", got: " + lr.getWeight());
+        }
+
+        if (error) {
+            err = true;
+            System.err.println("  test_getWeight() failed.");
+        } else {
+            System.out.println("  test_getWeight() passed.");
+        }
+    }
+
+    private static void test_equals() {
+        boolean error = false;
+
+        LanguageRange lr1 = new LanguageRange("ja", 1.0);
+        LanguageRange lr2 = new LanguageRange("ja");
+        LanguageRange lr3 = new LanguageRange("ja", 0.1);
+        LanguageRange lr4 = new LanguageRange("en", 1.0);
+
+        if (!lr1.equals(lr2)) {
+            error = true;
+            System.err.println("    LanguageRange(LR(ja, 1.0)).equals(LR(ja)) should return true.");
+        }
+
+        if (lr1.equals(lr3)) {
+            error = true;
+            System.err.println("    LanguageRange(LR(ja, 1.0)).equals(LR(ja, 0.1)) should return false.");
+        }
+
+        if (lr1.equals(lr4)) {
+            error = true;
+            System.err.println("    LanguageRange(LR(ja, 1.0)).equals(LR(en, 1.0)) should return false.");
+        }
+
+        if (lr1.equals(null)) {
+            error = true;
+            System.err.println("    LanguageRange(LR(ja, 1.0)).equals(null) should return false.");
+        }
+
+        if (lr1.equals("")) {
+            error = true;
+            System.err.println("    LanguageRange(LR(ja, 1.0)).equals(\"\") should return false.");
+
+        }
+
+        if (error) {
+            err = true;
+            System.err.println("  test_equals() failed.");
+        } else {
+            System.out.println("  test_equals() passed.");
+        }
+    }
+
+    private static void test_parse() {
+        boolean error = false;
+
+        List<LanguageRange> list;
+        String str = null;
+        try {
+            list = LanguageRange.parse(str);
+            error = true;
+            System.err.println("    NPE should be thrown for parse("
+                + str + ").");
+        }
+        catch (NullPointerException ex) {
+        }
+
+        str = "";
+        try {
+            list = LanguageRange.parse("");
+            error = true;
+            System.err.println("    IAE should be thrown for parse("
+                + str + ").");
+        }
+        catch (IllegalArgumentException ex) {
+        }
+
+        str = "ja;q=3";
+        try {
+            list = LanguageRange.parse(str);
+            error = true;
+            System.err.println("IAE should be thrown for parse("
+                 + str + ").");
+        }
+        catch (IllegalArgumentException ex) {
+        }
+
+        str = "Accept-Language: fr-FX,de-DE;q=0.5, fr-tp-x-FOO;q=0.1,"
+                  + "en-X-tp;q=0.6,en-FR;q=.7,de-de;q=0.8, iw;q=0.4, "
+                  + "he;q=0.4, de-de;q=0.5,ja, in-tpp, in-tp;q=0.2";
+        ArrayList<LanguageRange> expected = new ArrayList<>();
+        expected.add(new LanguageRange("fr-fx", 1.0));
+        expected.add(new LanguageRange("fr-fr", 1.0));
+        expected.add(new LanguageRange("ja", 1.0));
+        expected.add(new LanguageRange("in-tpp", 1.0));
+        expected.add(new LanguageRange("id-tpp", 1.0));
+        expected.add(new LanguageRange("en-fr", 0.7));
+        expected.add(new LanguageRange("en-fx", 0.7));
+        expected.add(new LanguageRange("en-x-tp", 0.6));
+        expected.add(new LanguageRange("de-de", 0.5));
+        expected.add(new LanguageRange("de-dd", 0.5));
+        expected.add(new LanguageRange("iw", 0.4));
+        expected.add(new LanguageRange("he", 0.4));
+        expected.add(new LanguageRange("in-tp", 0.2));
+        expected.add(new LanguageRange("id-tl", 0.2));
+        expected.add(new LanguageRange("id-tp", 0.2));
+        expected.add(new LanguageRange("in-tl", 0.2));
+        expected.add(new LanguageRange("fr-tp-x-foo", 0.1));
+        expected.add(new LanguageRange("fr-tl-x-foo", 0.1));
+        List<LanguageRange> got = LanguageRange.parse(str);
+        if (!areEqual(expected, got)) {
+            error = true;
+            System.err.println("    #1 parse() test failed.");
+        }
+
+        str = "Accept-Language: hak-CN;q=0.8, no-bok-NO;q=0.9, no-nyn, cmn-CN;q=0.1";
+        expected = new ArrayList<>();
+        expected.add(new LanguageRange("no-nyn", 1.0));
+        expected.add(new LanguageRange("nn", 1.0));
+        expected.add(new LanguageRange("no-bok-no", 0.9));
+        expected.add(new LanguageRange("nb-no", 0.9));
+        expected.add(new LanguageRange("hak-CN", 0.8));
+        expected.add(new LanguageRange("zh-hakka-CN", 0.8));
+        expected.add(new LanguageRange("i-hak-CN", 0.8));
+        expected.add(new LanguageRange("cmn-CN", 0.1));
+        expected.add(new LanguageRange("zh-cmn-CN", 0.1));
+        expected.add(new LanguageRange("zh-guoyu-CN", 0.1));
+        got = LanguageRange.parse(str);
+        if (!areEqual(expected, got)) {
+            error = true;
+            System.err.println("    #2 parse() test failed.");
+        }
+
+        str = "Accept-Language: rki;q=0.4, no-bok-NO;q=0.9, ccq;q=0.5";
+        expected = new ArrayList<>();
+        expected.add(new LanguageRange("no-bok-no", 0.9));
+        expected.add(new LanguageRange("nb-no", 0.9));
+        expected.add(new LanguageRange("rki", 0.4));
+        expected.add(new LanguageRange("ybd", 0.4));
+        expected.add(new LanguageRange("ccq", 0.4));
+        got = LanguageRange.parse(str);
+        if (!areEqual(expected, got)) {
+            error = true;
+            System.err.println("    #3 parse() test failed.");
+        }
+
+        if (error) {
+            err = true;
+            System.err.println("  test_parse() failed.");
+        } else {
+            System.out.println("  test_parse() passed.");
+        }
+    }
+
+    private static boolean areEqual(List<LanguageRange> expected,
+                                    List<LanguageRange> got) {
+        boolean error = false;
+
+        int expectedSize = expected.size();
+        int actualSize = got.size();
+
+        if (expectedSize != actualSize) {
+            error = true;
+
+            System.err.println("  Expected size=" + expectedSize);
+            for (LanguageRange lr : expected) {
+                System.err.println("    range=" + lr.getRange()
+                    + ", weight=" + lr.getWeight());
+            }
+
+            System.out.println("  Actual size=" + actualSize);
+            for (LanguageRange lr : got) {
+                System.err.println("    range=" + lr.getRange()
+                    + ", weight=" + lr.getWeight());
+            }
+        } else {
+            for (int i = 0; i < expectedSize; i++) {
+                LanguageRange lr1 = expected.get(i);
+                LanguageRange lr2 = got.get(i);
+
+                if (!lr1.getRange().equals(lr2.getRange())
+                    || lr1.getWeight() != lr2.getWeight()) {
+                    error = true;
+                    System.err.println("  " + i + ": Expected: range=" + lr1.getRange()
+                        + ", weight=" + lr1.getWeight());
+                    System.err.println("  " + i + ": Actual:   range=" + lr2.getRange()
+                        + ", weight=" + lr2.getWeight());
+                }
+            }
+        }
+
+        return !error;
+    }
+
+    private static void test_mapEquivalents() {
+        boolean error = false;
+
+        String ranges = "zh, zh-TW;q=0.8, ar;q=0.9, EN, zh-HK, ja-JP;q=0.2, es;q=0.4";
+        List<LanguageRange> priorityList = LanguageRange.parse(ranges);
+        HashMap<String, List<String>> map = null;
+
+        try {
+            List<LanguageRange> list =
+                LanguageRange.mapEquivalents(priorityList, null);
+        }
+        catch (Exception ex) {
+             error = true;
+             System.err.println(ex
+                 + " should not be thrown for mapEquivalents(priorityList, null).");
+        }
+
+        map = new HashMap<>();
+        try {
+            List<LanguageRange> list =
+                LanguageRange.mapEquivalents(priorityList, map);
+        }
+        catch (Exception ex) {
+             error = true;
+             System.err.println(ex
+                 + " should not be thrown for mapEquivalents(priorityList, empty map).");
+        }
+
+        ArrayList<String> equivalentList = new ArrayList<>();
+        equivalentList.add("ja");
+        equivalentList.add("ja-Hira");
+        map.put("ja", equivalentList);
+        try {
+            List<LanguageRange> list = LanguageRange.mapEquivalents(null, map);
+             error = true;
+             System.err.println("NPE should be thrown for mapEquivalents(null, map).");
+        }
+        catch (NullPointerException ex) {
+        }
+
+        map = new LinkedHashMap<>();
+        ArrayList<String> equivalentList1 = new ArrayList<>();
+        equivalentList1.add("ja");
+        equivalentList1.add("ja-Hira");
+        map.put("ja", equivalentList1);
+        ArrayList<String> equivalentList2 = new ArrayList<>();
+        equivalentList2.add("zh-Hans");
+        equivalentList2.add("zh-Hans-CN");
+        equivalentList2.add("zh-CN");
+        map.put("zh", equivalentList2);
+        ArrayList<String> equivalentList3 = new ArrayList<>();
+        equivalentList3.add("zh-TW");
+        equivalentList3.add("zh-Hant");
+        map.put("zh-TW", equivalentList3);
+        map.put("es", null);
+        ArrayList<String> equivalentList4 = new ArrayList<>();
+        map.put("en", equivalentList4);
+        ArrayList<String> equivalentList5 = new ArrayList<>();
+        equivalentList5.add("de");
+        map.put("zh-HK", equivalentList5);
+
+        ArrayList<LanguageRange> expected = new ArrayList<>();
+        expected.add(new LanguageRange("zh-hans", 1.0));
+        expected.add(new LanguageRange("zh-hans-cn", 1.0));
+        expected.add(new LanguageRange("zh-cn", 1.0));
+        expected.add(new LanguageRange("de", 1.0));
+        expected.add(new LanguageRange("ar", 0.9));
+        expected.add(new LanguageRange("zh-tw", 0.8));
+        expected.add(new LanguageRange("zh-hant", 0.8));
+        expected.add(new LanguageRange("ja-jp", 0.2));
+        expected.add(new LanguageRange("ja-hira-jp", 0.2));
+        List<LanguageRange> got =
+            LanguageRange.mapEquivalents(priorityList, map);
+
+        if (!areEqual(expected, got)) {
+            error = true;
+        }
+
+        if (error) {
+            err = true;
+            System.err.println("  test_mapEquivalents() failed.");
+        } else {
+            System.out.println("  test_mapEquivalents() passed.");
+        }
+    }
+
+    private static void test_filter() {
+        boolean error = false;
+
+        String ranges = "ja-JP, fr-FR";
+        String tags = "de-DE, en, ja-JP-hepburn, fr, he, ja-Latn-JP";
+        FilteringMode mode = EXTENDED_FILTERING;
+
+        List<LanguageRange> priorityList = LanguageRange.parse(ranges);
+        List<Locale> tagList = generateLocales(tags);
+        String actualLocales =
+            showLocales(Locale.filter(priorityList, tagList, mode));
+        String expectedLocales = "ja-JP-hepburn, ja-Latn-JP";
+
+        if (!expectedLocales.equals(actualLocales)) {
+            error = true;
+            showErrorMessage("#1 filter(" + mode + ")",
+                             ranges, tags, expectedLocales, actualLocales);
+        }
+
+
+        ranges = "ja-*-JP, fr-FR";
+        tags = "de-DE, en, ja-JP-hepburn, fr, he, ja-Latn-JP";
+        mode = EXTENDED_FILTERING;
+
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLocales(tags);
+        actualLocales = showLocales(Locale.filter(priorityList, tagList, mode));
+        expectedLocales = "ja-JP-hepburn, ja-Latn-JP";
+
+        if (!expectedLocales.equals(actualLocales)) {
+            error = true;
+            showErrorMessage("#2 filter(" + mode + ")",
+                             ranges, tags, expectedLocales, actualLocales);
+        }
+
+
+        ranges = "ja-*-JP, fr-FR, de-de;q=0.2";
+        tags = "de-DE, en, ja-JP-hepburn, de-de, fr, he, ja-Latn-JP";
+        mode = AUTOSELECT_FILTERING;
+
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLocales(tags);
+        actualLocales = showLocales(Locale.filter(priorityList, tagList, mode));
+        expectedLocales = "ja-JP-hepburn, ja-Latn-JP, de-DE";
+
+        if (!expectedLocales.equals(actualLocales)) {
+            error = true;
+            showErrorMessage("#3 filter(" + mode + ")",
+                             ranges, tags,expectedLocales, actualLocales);
+        }
+
+        ranges = "ja-JP, fr-FR, de-de;q=0.2";
+        tags = "de-DE, en, ja-JP-hepburn, de-de, fr, he, ja-Latn-JP";
+        mode = AUTOSELECT_FILTERING;
+
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLocales(tags);
+        actualLocales = showLocales(Locale.filter(priorityList, tagList, mode));
+        expectedLocales = "ja-JP-hepburn, de-DE";
+
+        if (!expectedLocales.equals(actualLocales)) {
+            error = true;
+            showErrorMessage("#4 filter(" + mode + ")",
+                             ranges, tags, expectedLocales, actualLocales);
+        }
+
+
+        ranges = "en;q=0.2, ja-*-JP, fr-JP";
+        tags = "de-DE, en, ja-JP-hepburn, fr, he, ja-Latn-JP";
+        mode = IGNORE_EXTENDED_RANGES;
+
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLocales(tags);
+        actualLocales = showLocales(Locale.filter(priorityList, tagList, mode));
+        expectedLocales = "en";
+
+        if (!expectedLocales.equals(actualLocales)) {
+            error = true;
+            showErrorMessage("#5 filter(" + mode + ")",
+                             ranges, tags, expectedLocales, actualLocales);
+        }
+
+
+        ranges = "en;q=0.2, ja-*-JP, fr-JP";
+        tags = "de-DE, en, ja-JP-hepburn, fr, he, ja-Latn-JP";
+        mode = MAP_EXTENDED_RANGES;
+
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLocales(tags);
+        actualLocales = showLocales(Locale.filter(priorityList, tagList, mode));
+        expectedLocales = "ja-JP-hepburn, en";
+
+        if (!expectedLocales.equals(actualLocales)) {
+            error = true;
+            showErrorMessage("#6 filter(" + mode + ")",
+                             ranges, tags, expectedLocales, actualLocales);
+        }
+
+
+        ranges = "en;q=0.2, ja-JP, fr-JP";
+        tags = "de-DE, en, ja-JP-hepburn, fr, he, ja-Latn-JP";
+        mode = REJECT_EXTENDED_RANGES;
+
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLocales(tags);
+        actualLocales = showLocales(Locale.filter(priorityList, tagList, mode));
+        expectedLocales = "ja-JP-hepburn, en";
+
+        if (!expectedLocales.equals(actualLocales)) {
+            error = true;
+            showErrorMessage("#7 filter(" + mode + ")",
+                             ranges, tags, expectedLocales, actualLocales);
+        }
+
+
+        ranges = "en;q=0.2, ja-*-JP, fr-JP";
+        tags = "de-DE, en, ja-JP-hepburn, fr, he, ja-Latn-JP";
+        mode = REJECT_EXTENDED_RANGES;
+
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLocales(tags);
+        try {
+            actualLocales =
+                showLocales(Locale.filter(priorityList, tagList, mode));
+            error = true;
+            System.out.println("IAE should be thrown for filter("
+                + mode + ").");
+        }
+        catch (IllegalArgumentException ex) {
+        }
+
+
+        ranges = "en;q=0.2, ja-*-JP, fr-JP";
+        tags = null;
+        mode = REJECT_EXTENDED_RANGES;
+
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLocales(tags);
+        try {
+            actualLocales =
+                showLocales(Locale.filter(priorityList, tagList, mode));
+            error = true;
+            System.out.println("NPE should be thrown for filter(tags=null).");
+        }
+        catch (NullPointerException ex) {
+        }
+
+
+        ranges = null;
+        tags = "de-DE, en, ja-JP-hepburn, fr, he, ja-Latn-JP";
+        mode = REJECT_EXTENDED_RANGES;
+
+        try {
+            priorityList = LanguageRange.parse(ranges);
+            tagList = generateLocales(tags);
+            actualLocales =
+                showLocales(Locale.filter(priorityList, tagList, mode));
+            error = true;
+            System.out.println("NPE should be thrown for filter(ranges=null).");
+        }
+        catch (NullPointerException ex) {
+        }
+
+
+        ranges = "en;q=0.2, ja-*-JP, fr-JP";
+        tags = "";
+        mode = REJECT_EXTENDED_RANGES;
+
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLocales(tags);
+        try {
+            actualLocales =
+                showLocales(Locale.filter(priorityList, tagList, mode));
+        }
+        catch (Exception ex) {
+            error = true;
+            System.out.println(ex
+                + " should not be thrown for filter(" + ranges + ", \"\").");
+        }
+
+
+        if (error) {
+            err = true;
+            System.out.println("  test_filter() failed.");
+        } else {
+            System.out.println("  test_filter() passed.");
+        }
+    }
+
+    private static void test_filterTags() {
+        boolean error = false;
+
+        String ranges = "en;q=0.2, *;q=0.6, ja";
+        String tags = "de-DE, en, ja-JP-hepburn, fr-JP, he";
+
+        List<LanguageRange> priorityList = LanguageRange.parse(ranges);
+        List<String> tagList = generateLanguageTags(tags);
+        String actualTags =
+            showLanguageTags(Locale.filterTags(priorityList, tagList));
+        String expectedTags = tags;
+
+        if (!expectedTags.equals(actualTags)) {
+            error = true;
+            showErrorMessage("#1 filterTags()",
+                             ranges, tags, expectedTags, actualTags);
+        }
+
+
+        ranges = "en;q=0.2, ja-JP, fr-JP";
+        tags = "de-DE, en, ja-JP-hepburn, fr, he";
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLanguageTags(tags);
+        actualTags = showLanguageTags(Locale.filterTags(priorityList, tagList));
+        expectedTags = "ja-jp-hepburn, en";
+
+        if (!expectedTags.equals(actualTags)) {
+            error = true;
+            showErrorMessage("#2 filterTags()",
+                             ranges, tags, expectedTags, actualTags);
+        }
+
+
+        ranges = "de-DE";
+        tags = "de-DE, de-de, de-Latn-DE, de-Latf-DE, de-DE-x-goethe, "
+               + "de-Latn-DE-1996, de-Deva-DE, de, de-x-DE, de-Deva";
+        FilteringMode mode = MAP_EXTENDED_RANGES;
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLanguageTags(tags);
+        actualTags = showLanguageTags(Locale.filterTags(priorityList, tagList, mode));
+        expectedTags = "de-de, de-de-x-goethe";
+
+        if (!expectedTags.equals(actualTags)) {
+            error = true;
+            showErrorMessage("#3 filterTags(" + mode + ")",
+                             ranges, tags, expectedTags, actualTags);
+        }
+
+
+        ranges = "de-DE";
+        tags = "de-DE, de-de, de-Latn-DE, de-Latf-DE, de-DE-x-goethe, "
+               + "de-Latn-DE-1996, de-Deva-DE, de, de-x-DE, de-Deva";
+        mode = EXTENDED_FILTERING;
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLanguageTags(tags);
+        actualTags = showLanguageTags(Locale.filterTags(priorityList, tagList, mode));
+        expectedTags = "de-de, de-latn-de, de-latf-de, de-de-x-goethe, "
+                       + "de-latn-de-1996, de-deva-de";
+
+        if (!expectedTags.equals(actualTags)) {
+            error = true;
+            showErrorMessage("#4 filterTags(" + mode + ")",
+                             ranges, tags, expectedTags, actualTags);
+        }
+
+
+        ranges = "de-*-DE";
+        tags = "de-DE, de-de, de-Latn-DE, de-Latf-DE, de-DE-x-goethe, "
+               + "de-Latn-DE-1996, de-Deva-DE, de, de-x-DE, de-Deva";
+        mode = EXTENDED_FILTERING;
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLanguageTags(tags);
+        actualTags = showLanguageTags(Locale.filterTags(priorityList, tagList, mode));
+        expectedTags = "de-de, de-latn-de, de-latf-de, de-de-x-goethe, "
+                       + "de-latn-de-1996, de-deva-de";
+
+        if (!expectedTags.equals(actualTags)) {
+            error = true;
+            showErrorMessage("#5 filterTags(" + mode + ")",
+                             ranges, tags, expectedTags, actualTags);
+        }
+
+        if (error) {
+            err = true;
+            System.out.println("  test_filterTags() failed.");
+        } else {
+            System.out.println("  test_filterTags() passed.");
+        }
+    }
+
+    private static void test_lookup() {
+        boolean error = false;
+
+        String ranges = "en;q=0.2, *-JP;q=0.6, iw";
+        String tags = "de-DE, en, ja-JP-hepburn, fr-JP, he";
+        List<LanguageRange> priorityList = LanguageRange.parse(ranges);
+        List<Locale> localeList = generateLocales(tags);
+        String actualLocale =
+            Locale.lookup(priorityList, localeList).toLanguageTag();
+        String expectedLocale ="he";
+
+        if (!expectedLocale.equals(actualLocale)) {
+            error = true;
+            showErrorMessage("#1 lookup()", ranges, tags, expectedLocale, actualLocale);
+        }
+
+
+        ranges = "en;q=0.2, *-JP;q=0.6, iw";
+        tags = "de-DE, he-IL, en, iw";
+        priorityList = LanguageRange.parse(ranges);
+        localeList = generateLocales(tags);
+        actualLocale = Locale.lookup(priorityList, localeList).toLanguageTag();
+        expectedLocale = "he";
+
+        if (!expectedLocale.equals(actualLocale)) {
+            error = true;
+            showErrorMessage("#2 lookup()", ranges, tags, expectedLocale, actualLocale);
+        }
+
+
+        ranges = "en;q=0.2, ja-*-JP-x-foo;q=0.6, iw";
+        tags = "de-DE, fr, en, ja-Latn-JP";
+        priorityList = LanguageRange.parse(ranges);
+        localeList = generateLocales(tags);
+        actualLocale = Locale.lookup(priorityList, localeList).toLanguageTag();
+        expectedLocale = "ja-Latn-JP";
+
+        if (!expectedLocale.equals(actualLocale)) {
+            error = true;
+            showErrorMessage("#3 lookup()", ranges, tags, expectedLocale, actualLocale);
+        }
+
+        if (error) {
+            err = true;
+            System.out.println("  test_lookup() failed.");
+        } else {
+            System.out.println("  test_lookup() passed.");
+        }
+    }
+
+    private static void test_lookupTag() {
+        boolean error = false;
+
+        String ranges = "en, *";
+        String tags = "es, de, ja-JP";
+        List<LanguageRange> priorityList = LanguageRange.parse(ranges);
+        List<String> tagList = generateLanguageTags(tags);
+        String actualTag = Locale.lookupTag(priorityList, tagList);
+        String expectedTag = null;
+
+        if (actualTag != null) {
+            error = true;
+            showErrorMessage("#1 lookupTag()", ranges, tags, expectedTag, actualTag);
+        }
+
+
+        ranges= "en;q=0.2, *-JP";
+        tags = "de-DE, en, ja-JP-hepburn, fr-JP, en-JP";
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLanguageTags(tags);
+        actualTag = Locale.lookupTag(priorityList, tagList);
+        expectedTag = "fr-jp";
+
+        if (!expectedTag.equals(actualTag)) {
+            error = true;
+            showErrorMessage("#2 lookupTag()", ranges, tags, expectedTag, actualTag);
+        }
+
+
+        ranges = "en;q=0.2, ar-MO, iw";
+        tags = "de-DE, he, fr-JP";
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLanguageTags(tags);
+        actualTag = Locale.lookupTag(priorityList, tagList);
+        expectedTag = "he";
+
+        if (!expectedTag.equals(actualTag)) {
+            error = true;
+            showErrorMessage("#3 lookupTag()", ranges, tags, expectedTag, actualTag);
+        }
+
+
+        ranges = "en;q=0.2, ar-MO, he";
+        tags = "de-DE, iw, fr-JP";
+        priorityList = LanguageRange.parse(ranges);
+        tagList = generateLanguageTags(tags);
+        actualTag = Locale.lookupTag(priorityList, tagList);
+        expectedTag = "iw";
+
+        if (!expectedTag.equals(actualTag)) {
+            error = true;
+            showErrorMessage("#4 lookupTag()", ranges, tags, expectedTag, actualTag);
+        }
+
+        if (error) {
+            err = true;
+            System.out.println("  test_lookupTag() failed.");
+        } else {
+            System.out.println("  test_lookupTag() passed.");
+        }
+    }
+
+    private static List<Locale> generateLocales(String tags) {
+        if (tags == null) {
+            return null;
+        }
+
+        List<Locale> localeList = new ArrayList<>();
+        if (tags.equals("")) {
+            return localeList;
+        }
+        String[] t = tags.split(", ");
+        for (String tag : t) {
+            localeList.add(Locale.forLanguageTag(tag));
+        }
+        return localeList;
+    }
+
+    private static List<String> generateLanguageTags(String tags) {
+        List<String> tagList = new ArrayList<>();
+        String[] t = tags.split(", ");
+        for (String tag : t) {
+            tagList.add(tag);
+        }
+        return tagList;
+    }
+
+    private static String showPriorityList(List<LanguageRange> priorityList) {
+        StringBuilder sb = new StringBuilder();
+
+        Iterator<LanguageRange> itr = priorityList.iterator();
+        LanguageRange lr;
+        if (itr.hasNext()) {
+            lr = itr.next();
+            sb.append(lr.getRange());
+            sb.append(";q=");
+            sb.append(lr.getWeight());
+        }
+        while (itr.hasNext()) {
+            sb.append(", ");
+            lr = itr.next();
+            sb.append(lr.getRange());
+            sb.append(";q=");
+            sb.append(lr.getWeight());
+        }
+
+        return sb.toString();
+    }
+
+    private static String showLanguageTags(List<String> tags) {
+        StringBuilder sb = new StringBuilder();
+
+        Iterator<String> itr = tags.iterator();
+        if (itr.hasNext()) {
+            sb.append(itr.next());
+        }
+        while (itr.hasNext()) {
+            sb.append(", ");
+            sb.append(itr.next());
+        }
+
+        return sb.toString().trim();
+    }
+
+    private static String showLocales(List<Locale> locales) {
+        StringBuilder sb = new StringBuilder();
+
+        Iterator<Locale> itr = locales.iterator();
+        if (itr.hasNext()) {
+            sb.append(itr.next().toLanguageTag());
+        }
+        while (itr.hasNext()) {
+            sb.append(", ");
+            sb.append(itr.next().toLanguageTag());
+        }
+
+        return sb.toString().trim();
+    }
+
+    private static void showErrorMessage(String methodName,
+                                         String priorityList,
+                                         String tags,
+                                         String expectedTags,
+                                         String actualTags) {
+        System.out.println("\nIncorrect " + methodName + " result.");
+        System.out.println("  Priority list  :  " + priorityList);
+        System.out.println("  Language tags  :  " + tags);
+        System.out.println("  Expected value : " + expectedTags);
+        System.out.println("  Actual value   : " + actualTags);
+    }
+
+}
diff --git a/jdk/test/java/util/Locale/LocaleProviders.java b/jdk/test/java/util/Locale/LocaleProviders.java
index 5e38087626e..98a999b39d4 100644
--- a/jdk/test/java/util/Locale/LocaleProviders.java
+++ b/jdk/test/java/util/Locale/LocaleProviders.java
@@ -20,15 +20,45 @@
  * or visit www.oracle.com if you need additional information or have any
  * questions.
  */
-import java.text.spi.DateFormatProvider;
-import java.util.Locale;
+import java.text.*;
+import java.text.spi.*;
+import java.util.*;
 import sun.util.locale.provider.LocaleProviderAdapter;
 
 public class LocaleProviders {
 
     public static void main(String[] args) {
-        String expected = args[0];
-        Locale testLocale = new Locale(args[1], args[2]);
+        String methodName = args[0];
+
+        switch (methodName) {
+            case "getPlatformLocale":
+                if (args[1].equals("format")) {
+                    getPlatformLocale(Locale.Category.FORMAT);
+                } else {
+                    getPlatformLocale(Locale.Category.DISPLAY);
+                }
+                break;
+
+            case "adapterTest":
+                adapterTest(args[1], args[2], (args.length >= 4 ? args[3] : ""));
+                break;
+
+            case "bug7198834Test":
+                bug7198834Test();
+                break;
+
+            default:
+                throw new RuntimeException("Test method '"+methodName+"' not found.");
+        }
+    }
+
+    static void getPlatformLocale(Locale.Category cat) {
+        Locale defloc = Locale.getDefault(cat);
+        System.out.printf("%s,%s\n", defloc.getLanguage(), defloc.getCountry());
+    }
+
+    static void adapterTest(String expected, String lang, String ctry) {
+        Locale testLocale = new Locale(lang, ctry);
         String preference = System.getProperty("java.locale.providers", "");
         LocaleProviderAdapter lda = LocaleProviderAdapter.getAdapter(DateFormatProvider.class, testLocale);
         LocaleProviderAdapter.Type type = lda.getAdapterType();
@@ -37,4 +67,18 @@ public class LocaleProviders {
             throw new RuntimeException("Returned locale data adapter is not correct.");
         }
     }
+
+    static void bug7198834Test() {
+        LocaleProviderAdapter lda = LocaleProviderAdapter.getAdapter(DateFormatProvider.class, Locale.US);
+        LocaleProviderAdapter.Type type = lda.getAdapterType();
+        if (type == LocaleProviderAdapter.Type.HOST && System.getProperty("os.name").startsWith("Windows")) {
+            DateFormat df = DateFormat.getDateInstance(DateFormat.FULL, Locale.US);
+            String date = df.format(new Date());
+            if (date.charAt(date.length()-1) == ' ') {
+                throw new RuntimeException("Windows Host Locale Provider returns a trailing space.");
+            }
+        } else {
+            System.out.println("Windows HOST locale adapter not found. Ignoring this test.");
+        }
+    }
 }
diff --git a/jdk/test/java/util/Locale/LocaleProviders.sh b/jdk/test/java/util/Locale/LocaleProviders.sh
index 921db0bd212..703d1f0f8a3 100644
--- a/jdk/test/java/util/Locale/LocaleProviders.sh
+++ b/jdk/test/java/util/Locale/LocaleProviders.sh
@@ -23,7 +23,7 @@
 #!/bin/sh
 #
 # @test
-# @bug 6336885
+# @bug 6336885 7196799 7197573 7198834
 # @summary tests for "java.locale.providers" system property
 # @compile -XDignore.symbol.file LocaleProviders.java
 # @run shell/timeout=600 LocaleProviders.sh
@@ -65,9 +65,21 @@ case "$OS" in
     ;;
 esac
 
+# get the platform default locales
+PLATDEF=`${TESTJAVA}${FS}bin${FS}java -classpath ${TESTCLASSES} LocaleProviders getPlatformLocale display`
+DEFLANG=`echo ${PLATDEF} | sed -e "s/,.*//"`
+DEFCTRY=`echo ${PLATDEF} | sed -e "s/.*,//"`
+echo "DEFLANG=${DEFLANG}"
+echo "DEFCTRY=${DEFCTRY}"
+PLATDEF=`${TESTJAVA}${FS}bin${FS}java -classpath ${TESTCLASSES} LocaleProviders getPlatformLocale format`
+DEFFMTLANG=`echo ${PLATDEF} | sed -e "s/,.*//"`
+DEFFMTCTRY=`echo ${PLATDEF} | sed -e "s/.*,//"`
+echo "DEFFMTLANG=${DEFFMTLANG}"
+echo "DEFFMTCTRY=${DEFFMTCTRY}"
+
 runTest()
 {
-    RUNCMD="${TESTJAVA}${FS}bin${FS}java -classpath ${TESTCLASSES} -Duser.language=$DEFLANG -Duser.country=$DEFCTRY -Djava.locale.providers=$PREFLIST LocaleProviders $EXPECTED $TESTLANG $TESTCTRY"
+    RUNCMD="${TESTJAVA}${FS}bin${FS}java -classpath ${TESTCLASSES} -Djava.locale.providers=$PREFLIST LocaleProviders $METHODNAME $PARAM1 $PARAM2 $PARAM3"
     echo ${RUNCMD}
     ${RUNCMD}
     result=$?
@@ -81,65 +93,110 @@ runTest()
 }
 
 # testing HOST is selected for the default locale, if specified on Windows or MacOSX
-DEFLANG=en
-DEFCTRY=US
-PREFLIST=HOST
+METHODNAME=adapterTest
+PREFLIST=HOST,JRE
 case "$OS" in
   Windows_NT* )
     WINVER=`uname -r`
     if [ "${WINVER}" = "5" ]
     then
-      EXPECTED=JRE
+      PARAM1=JRE
     else
-      EXPECTED=HOST
+      PARAM1=HOST
     fi
     ;;
   CYGWIN_NT-6* | Darwin )
-    EXPECTED=HOST
+    PARAM1=HOST
     ;;
   * )
-    EXPECTED=JRE
+    PARAM1=JRE
     ;;
 esac
-TESTLANG=en
-TESTCTRY=US
+PARAM2=${DEFLANG}
+PARAM3=${DEFCTRY}
 runTest
 
 # testing HOST is NOT selected for the non-default locale, if specified
-DEFLANG=en
-DEFCTRY=US
-PREFLIST=HOST
-EXPECTED=JRE
-TESTLANG=en
-TESTCTRY=GB
+METHODNAME=adapterTest
+PREFLIST=HOST,JRE
+PARAM1=JRE
+# Try to find the locale JRE supports which is not the platform default (HOST supports that one)
+if [ "${DEFLANG}" != "en" ] && [ "${DEFFMTLANG}" != "en" ]; then
+  PARAM2=en
+  PARAM3=US
+elif [ "${DEFLANG}" != "ja" ] && [ "${DEFFMTLANG}" != "ja" ]; then 
+  PARAM2=ja
+  PARAM3=JP
+else
+  PARAM2=zh
+  PARAM3=CN
+fi
 runTest
 
 # testing SPI is NOT selected, as there is none.
-PREFLIST=SPI
-EXPECTED=JRE
-TESTLANG=en
-TESTCTRY=US
+METHODNAME=adapterTest
+PREFLIST=SPI,JRE
+PARAM1=JRE
+PARAM2=en
+PARAM3=US
 runTest
 
 # testing the order, variaton #1. This assumes en_GB DateFormat data are available both in JRE & CLDR
-PREFLIST=CLDR
-EXPECTED=CLDR
-TESTLANG=en
-TESTCTRY=GB
+METHODNAME=adapterTest
+PREFLIST=CLDR,JRE
+PARAM1=CLDR
+PARAM2=en
+PARAM3=GB
 runTest
 
 # testing the order, variaton #2. This assumes en_GB DateFormat data are available both in JRE & CLDR
+METHODNAME=adapterTest
 PREFLIST=JRE,CLDR
-EXPECTED=JRE
-TESTLANG=en
-TESTCTRY=GB
+PARAM1=JRE
+PARAM2=en
+PARAM3=GB
 runTest
 
 # testing the order, variaton #3 for non-existent locale in JRE assuming "haw" is not in JRE.
+METHODNAME=adapterTest
 PREFLIST=JRE,CLDR
-EXPECTED=CLDR
-TESTLANG=haw
-TESTCTRY=GB
+PARAM1=CLDR
+PARAM2=haw
+PARAM3=GB
+runTest
+
+# testing the order, variaton #4 for the bug 7196799. CLDR's "zh" data should be used in "zh_CN"
+METHODNAME=adapterTest
+PREFLIST=CLDR
+PARAM1=CLDR
+PARAM2=zh
+PARAM3=CN
+runTest
+
+# testing FALLBACK provider. SPI and invalid one cases.
+METHODNAME=adapterTest
+PREFLIST=SPI
+PARAM1=FALLBACK
+PARAM2=en
+PARAM3=US
+runTest
+PREFLIST=FOO
+PARAM1=JRE
+PARAM2=en
+PARAM3=US
+runTest
+PREFLIST=BAR,SPI
+PARAM1=FALLBACK
+PARAM2=en
+PARAM3=US
+runTest
+
+# testing 7198834 fix. Only works on Windows Vista or upper.
+METHODNAME=bug7198834Test
+PREFLIST=HOST
+PARAM1=
+PARAM2=
+PARAM3=
 runTest
 
 exit $result
diff --git a/jdk/test/java/util/Locale/tools/EquivMapsGenerator.java b/jdk/test/java/util/Locale/tools/EquivMapsGenerator.java
new file mode 100644
index 00000000000..e08e1317beb
--- /dev/null
+++ b/jdk/test/java/util/Locale/tools/EquivMapsGenerator.java
@@ -0,0 +1,251 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.io.*;
+import java.nio.charset.*;
+import java.nio.file.*;
+import java.util.*;
+
+public class EquivMapsGenerator {
+
+    /*
+     * IANA Language Subtag Registry file downloaded from
+     *     http://www.iana.org/assignments/language-subtag-registry
+     */
+    private static final String DEFAULT_LSR_FILE =
+        "language-subtag-registry.txt";
+
+    private static boolean verbose = false;
+
+    public static void main(String[] args) throws Exception {
+        String fileLSR = DEFAULT_LSR_FILE;
+
+        for (int i = 0; i < args.length; i++) {
+            String s = args[i];
+            if (s.equals("-lsr")) {
+                fileLSR = args[++i];
+            } else if (s.equals("-verbose")) {
+                verbose = true;
+            }
+        }
+
+        readLSRfile(fileLSR);
+        generateEquivalentMap();
+        generateSourceCode();
+    }
+
+    private static String LSRrevisionDate;
+    private static Map<String, StringBuilder> initialLanguageMap =
+        new TreeMap<>();
+    private static Map<String, StringBuilder> initialRegionVariantMap =
+        new TreeMap<>();
+
+    private static Map<String, String> sortedLanguageMap1 = new TreeMap<>();
+    private static Map<String, String[]> sortedLanguageMap2 = new TreeMap<>();
+    private static Map<String, String> sortedRegionVariantMap =
+        new TreeMap<>();
+
+    private static void readLSRfile(String filename) throws Exception {
+        String type = null;
+        String tag = null;
+        String preferred = null;
+        int mappingNum = 0;
+
+        for (String line : Files.readAllLines(Paths.get(filename),
+                                              Charset.forName("UTF-8"))) {
+            line = line.toLowerCase();
+            int index = line.indexOf(' ')+1;
+            if (line.startsWith("file-date:")) {
+                LSRrevisionDate = line.substring(index);
+                if (verbose) {
+                    System.out.println("LSR revision date=" + LSRrevisionDate);
+                }
+            } else if (line.startsWith("type:")) {
+                type = line.substring(index);
+            } else if (line.startsWith("tag:") || line.startsWith("subtag:")) {
+                tag = line.substring(index);
+            } else if (line.startsWith("preferred-value:")
+                       && !type.equals("extlang")) {
+                preferred = line.substring(index);
+                mappingNum++;
+                processDeprecatedData(type, tag, preferred);
+            } else if (line.equals("%%")) {
+                type = null;
+                tag = null;
+                preferred = null;
+            }
+        }
+
+        if (verbose) {
+            System.out.println("readLSRfile(" + filename + ")");
+            System.out.println("  Total number of mapping=" + mappingNum);
+            System.out.println("\n  Map for language. Size="
+                + initialLanguageMap.size());
+
+            for (String key : initialLanguageMap.keySet()) {
+                System.out.println("    " + key + ": \""
+                    + initialLanguageMap.get(key) + "\"");
+            }
+
+            System.out.println("\n  Map for region and variant. Size="
+                + initialRegionVariantMap.size());
+
+            for (String key : initialRegionVariantMap.keySet()) {
+                System.out.println("    " + key + ": \""
+                    + initialRegionVariantMap.get(key) + "\"");
+            }
+        }
+    }
+
+    private static void processDeprecatedData(String type,
+                                              String tag,
+                                              String preferred) {
+        StringBuilder sb;
+        if (type.equals("region") || type.equals("variant")) {
+            if (!initialRegionVariantMap.containsKey(preferred)) {
+                sb = new StringBuilder("-");
+                sb.append(preferred);
+                sb.append(",-");
+                sb.append(tag);
+                initialRegionVariantMap.put("-"+preferred, sb);
+            } else {
+                throw new RuntimeException("New case, need implementation."
+                    + " A region/variant subtag \"" + preferred
+                    + "\" is registered for more than one subtags.");
+            }
+        } else { // language, grandfahered, and redundant
+            if (!initialLanguageMap.containsKey(preferred)) {
+                sb = new StringBuilder(preferred);
+                sb.append(',');
+                sb.append(tag);
+                initialLanguageMap.put(preferred, sb);
+            } else {
+                sb = initialLanguageMap.get(preferred);
+                sb.append(',');
+                sb.append(tag);
+                initialLanguageMap.put(preferred, sb);
+            }
+        }
+    }
+
+    private static void generateEquivalentMap() {
+        String[] subtags;
+        for (String preferred : initialLanguageMap.keySet()) {
+            subtags = initialLanguageMap.get(preferred).toString().split(",");
+
+            if (subtags.length == 2) {
+                sortedLanguageMap1.put(subtags[0], subtags[1]);
+                sortedLanguageMap1.put(subtags[1], subtags[0]);
+            } else if (subtags.length == 3) {
+                sortedLanguageMap2.put(subtags[0],
+                                     new String[]{subtags[1], subtags[2]});
+                sortedLanguageMap2.put(subtags[1],
+                                     new String[]{subtags[0], subtags[2]});
+                sortedLanguageMap2.put(subtags[2],
+                                     new String[]{subtags[0], subtags[1]});
+            } else {
+                    throw new RuntimeException("New case, need implementation."
+                        + " A language subtag \"" + preferred
+                        + "\" is registered for more than two subtags. ");
+            }
+        }
+
+        for (String preferred : initialRegionVariantMap.keySet()) {
+            subtags =
+                initialRegionVariantMap.get(preferred).toString().split(",");
+
+            sortedRegionVariantMap.put(subtags[0], subtags[1]);
+            sortedRegionVariantMap.put(subtags[1], subtags[0]);
+        }
+
+        if (verbose) {
+            System.out.println("generateEquivalentMap()");
+            System.out.println("  \nSorted map for language subtags which have only one equivalent. Size="
+                + sortedLanguageMap1.size());
+            for (String key : sortedLanguageMap1.keySet()) {
+                System.out.println("    " + key + ": \""
+                    + sortedLanguageMap1.get(key) + "\"");
+            }
+
+            System.out.println("\n  Sorted map for language subtags which have multiple equivalents. Size="
+                + sortedLanguageMap2.size());
+            for (String key : sortedLanguageMap2.keySet()) {
+                String[] s = sortedLanguageMap2.get(key);
+                System.out.println("    " + key + ": \""
+                    + s[0] + "\", \"" + s[1] + "\"");
+            }
+
+            System.out.println("\n  Sorted map for region and variant subtags. Size="
+                + sortedRegionVariantMap.size());
+            for (String key : sortedRegionVariantMap.keySet()) {
+                System.out.println("    " + key + ": \""
+                    + sortedRegionVariantMap.get(key) + "\"");
+            }
+        }
+        System.out.println();
+    }
+
+    private final static String headerText =
+        "final class LocaleEquivalentMaps {\n\n"
+        + "    static final Map<String, String> singleEquivMap;\n"
+        + "    static final Map<String, String[]> multiEquivsMap;\n"
+        + "    static final Map<String, String> regionVariantEquivMap;\n\n"
+        + "    static {\n"
+        + "        singleEquivMap = new HashMap<>();\n"
+        + "        multiEquivsMap = new HashMap<>();\n"
+        + "        regionVariantEquivMap = new HashMap<>();\n\n"
+        + "        // This is an auto-generated file and should not be manually edited.\n";
+
+    private final static String footerText =
+        "    }\n\n"
+        + "}";
+
+    private static void generateSourceCode() {
+        System.out.println(headerText
+            + "        //   LSR Revision: " + LSRrevisionDate);
+
+        for (String key : sortedLanguageMap1.keySet()) {
+            String value = sortedLanguageMap1.get(key);
+            System.out.println("        singleEquivMap.put(\""
+                + key + "\", \"" + value + "\");");
+        }
+        System.out.println();
+        for (String key : sortedLanguageMap2.keySet()) {
+            String[] values = sortedLanguageMap2.get(key);
+            System.out.println("        multiEquivsMap.put(\""
+                + key + "\", new String[] {\"" + values[0] + "\", \""
+                + values[1] + "\"});");
+        }
+        System.out.println();
+        for (String key : sortedRegionVariantMap.keySet()) {
+            String value = sortedRegionVariantMap.get(key);
+            System.out.println("        regionVariantEquivMap.put(\""
+                + key + "\", \"" + value + "\");");
+        }
+
+        System.out.println(footerText);
+    }
+
+}
diff --git a/jdk/test/java/util/Locale/tools/language-subtag-registry.txt b/jdk/test/java/util/Locale/tools/language-subtag-registry.txt
new file mode 100644
index 00000000000..d7e1d33c182
--- /dev/null
+++ b/jdk/test/java/util/Locale/tools/language-subtag-registry.txt
@@ -0,0 +1,45975 @@
+File-Date: 2012-09-04
+%%
+Type: language
+Subtag: aa
+Description: Afar
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ab
+Description: Abkhazian
+Added: 2005-10-16
+Suppress-Script: Cyrl
+%%
+Type: language
+Subtag: ae
+Description: Avestan
+Added: 2005-10-16
+%%
+Type: language
+Subtag: af
+Description: Afrikaans
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: ak
+Description: Akan
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: am
+Description: Amharic
+Added: 2005-10-16
+Suppress-Script: Ethi
+%%
+Type: language
+Subtag: an
+Description: Aragonese
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ar
+Description: Arabic
+Added: 2005-10-16
+Suppress-Script: Arab
+Scope: macrolanguage
+%%
+Type: language
+Subtag: as
+Description: Assamese
+Added: 2005-10-16
+Suppress-Script: Beng
+%%
+Type: language
+Subtag: av
+Description: Avaric
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ay
+Description: Aymara
+Added: 2005-10-16
+Suppress-Script: Latn
+Scope: macrolanguage
+%%
+Type: language
+Subtag: az
+Description: Azerbaijani
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: ba
+Description: Bashkir
+Added: 2005-10-16
+%%
+Type: language
+Subtag: be
+Description: Belarusian
+Added: 2005-10-16
+Suppress-Script: Cyrl
+%%
+Type: language
+Subtag: bg
+Description: Bulgarian
+Added: 2005-10-16
+Suppress-Script: Cyrl
+%%
+Type: language
+Subtag: bh
+Description: Bihari languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: bi
+Description: Bislama
+Added: 2005-10-16
+%%
+Type: language
+Subtag: bm
+Description: Bambara
+Added: 2005-10-16
+%%
+Type: language
+Subtag: bn
+Description: Bengali
+Added: 2005-10-16
+Suppress-Script: Beng
+%%
+Type: language
+Subtag: bo
+Description: Tibetan
+Added: 2005-10-16
+%%
+Type: language
+Subtag: br
+Description: Breton
+Added: 2005-10-16
+%%
+Type: language
+Subtag: bs
+Description: Bosnian
+Added: 2005-10-16
+Suppress-Script: Latn
+Macrolanguage: sh
+%%
+Type: language
+Subtag: ca
+Description: Catalan
+Description: Valencian
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: ce
+Description: Chechen
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ch
+Description: Chamorro
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: co
+Description: Corsican
+Added: 2005-10-16
+%%
+Type: language
+Subtag: cr
+Description: Cree
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: cs
+Description: Czech
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: cu
+Description: Church Slavic
+Description: Church Slavonic
+Description: Old Bulgarian
+Description: Old Church Slavonic
+Description: Old Slavonic
+Added: 2005-10-16
+%%
+Type: language
+Subtag: cv
+Description: Chuvash
+Added: 2005-10-16
+%%
+Type: language
+Subtag: cy
+Description: Welsh
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: da
+Description: Danish
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: de
+Description: German
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: dv
+Description: Dhivehi
+Description: Divehi
+Description: Maldivian
+Added: 2005-10-16
+Suppress-Script: Thaa
+%%
+Type: language
+Subtag: dz
+Description: Dzongkha
+Added: 2005-10-16
+Suppress-Script: Tibt
+%%
+Type: language
+Subtag: ee
+Description: Ewe
+Added: 2005-10-16
+%%
+Type: language
+Subtag: el
+Description: Modern Greek (1453-)
+Added: 2005-10-16
+Suppress-Script: Grek
+%%
+Type: language
+Subtag: en
+Description: English
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: eo
+Description: Esperanto
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: es
+Description: Spanish
+Description: Castilian
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: et
+Description: Estonian
+Added: 2005-10-16
+Suppress-Script: Latn
+Scope: macrolanguage
+%%
+Type: language
+Subtag: eu
+Description: Basque
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: fa
+Description: Persian
+Added: 2005-10-16
+Suppress-Script: Arab
+Scope: macrolanguage
+%%
+Type: language
+Subtag: ff
+Description: Fulah
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: fi
+Description: Finnish
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: fj
+Description: Fijian
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: fo
+Description: Faroese
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: fr
+Description: French
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: fy
+Description: Western Frisian
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: ga
+Description: Irish
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: gd
+Description: Scottish Gaelic
+Description: Gaelic
+Added: 2005-10-16
+%%
+Type: language
+Subtag: gl
+Description: Galician
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: gn
+Description: Guarani
+Added: 2005-10-16
+Suppress-Script: Latn
+Scope: macrolanguage
+%%
+Type: language
+Subtag: gu
+Description: Gujarati
+Added: 2005-10-16
+Suppress-Script: Gujr
+%%
+Type: language
+Subtag: gv
+Description: Manx
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: ha
+Description: Hausa
+Added: 2005-10-16
+%%
+Type: language
+Subtag: he
+Description: Hebrew
+Added: 2005-10-16
+Suppress-Script: Hebr
+%%
+Type: language
+Subtag: hi
+Description: Hindi
+Added: 2005-10-16
+Suppress-Script: Deva
+%%
+Type: language
+Subtag: ho
+Description: Hiri Motu
+Added: 2005-10-16
+%%
+Type: language
+Subtag: hr
+Description: Croatian
+Added: 2005-10-16
+Suppress-Script: Latn
+Macrolanguage: sh
+%%
+Type: language
+Subtag: ht
+Description: Haitian
+Description: Haitian Creole
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: hu
+Description: Hungarian
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: hy
+Description: Armenian
+Added: 2005-10-16
+Suppress-Script: Armn
+%%
+Type: language
+Subtag: hz
+Description: Herero
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ia
+Description: Interlingua (International Auxiliary Language
+  Association)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: id
+Description: Indonesian
+Added: 2005-10-16
+Suppress-Script: Latn
+Macrolanguage: ms
+%%
+Type: language
+Subtag: ie
+Description: Interlingue
+Description: Occidental
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ig
+Description: Igbo
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ii
+Description: Sichuan Yi
+Description: Nuosu
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ik
+Description: Inupiaq
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: in
+Description: Indonesian
+Added: 2005-10-16
+Deprecated: 1989-01-01
+Preferred-Value: id
+Suppress-Script: Latn
+Macrolanguage: ms
+%%
+Type: language
+Subtag: io
+Description: Ido
+Added: 2005-10-16
+%%
+Type: language
+Subtag: is
+Description: Icelandic
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: it
+Description: Italian
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: iu
+Description: Inuktitut
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: iw
+Description: Hebrew
+Added: 2005-10-16
+Deprecated: 1989-01-01
+Preferred-Value: he
+Suppress-Script: Hebr
+%%
+Type: language
+Subtag: ja
+Description: Japanese
+Added: 2005-10-16
+Suppress-Script: Jpan
+%%
+Type: language
+Subtag: ji
+Description: Yiddish
+Added: 2005-10-16
+Deprecated: 1989-01-01
+Preferred-Value: yi
+%%
+Type: language
+Subtag: jv
+Description: Javanese
+Added: 2005-10-16
+%%
+Type: language
+Subtag: jw
+Description: Javanese
+Added: 2005-10-16
+Deprecated: 2001-08-13
+Preferred-Value: jv
+Comments: published by error in Table 1 of ISO 639:1988
+%%
+Type: language
+Subtag: ka
+Description: Georgian
+Added: 2005-10-16
+Suppress-Script: Geor
+%%
+Type: language
+Subtag: kg
+Description: Kongo
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: ki
+Description: Kikuyu
+Description: Gikuyu
+Added: 2005-10-16
+%%
+Type: language
+Subtag: kj
+Description: Kuanyama
+Description: Kwanyama
+Added: 2005-10-16
+%%
+Type: language
+Subtag: kk
+Description: Kazakh
+Added: 2005-10-16
+Suppress-Script: Cyrl
+%%
+Type: language
+Subtag: kl
+Description: Kalaallisut
+Description: Greenlandic
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: km
+Description: Central Khmer
+Added: 2005-10-16
+Suppress-Script: Khmr
+%%
+Type: language
+Subtag: kn
+Description: Kannada
+Added: 2005-10-16
+Suppress-Script: Knda
+%%
+Type: language
+Subtag: ko
+Description: Korean
+Added: 2005-10-16
+Suppress-Script: Kore
+%%
+Type: language
+Subtag: kr
+Description: Kanuri
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: ks
+Description: Kashmiri
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ku
+Description: Kurdish
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: kv
+Description: Komi
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: kw
+Description: Cornish
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ky
+Description: Kirghiz
+Description: Kyrgyz
+Added: 2005-10-16
+%%
+Type: language
+Subtag: la
+Description: Latin
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: lb
+Description: Luxembourgish
+Description: Letzeburgesch
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: lg
+Description: Ganda
+Added: 2005-10-16
+%%
+Type: language
+Subtag: li
+Description: Limburgan
+Description: Limburger
+Description: Limburgish
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ln
+Description: Lingala
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: lo
+Description: Lao
+Added: 2005-10-16
+Suppress-Script: Laoo
+%%
+Type: language
+Subtag: lt
+Description: Lithuanian
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: lu
+Description: Luba-Katanga
+Added: 2005-10-16
+%%
+Type: language
+Subtag: lv
+Description: Latvian
+Added: 2005-10-16
+Suppress-Script: Latn
+Scope: macrolanguage
+%%
+Type: language
+Subtag: mg
+Description: Malagasy
+Added: 2005-10-16
+Suppress-Script: Latn
+Scope: macrolanguage
+%%
+Type: language
+Subtag: mh
+Description: Marshallese
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: mi
+Description: Maori
+Added: 2005-10-16
+%%
+Type: language
+Subtag: mk
+Description: Macedonian
+Added: 2005-10-16
+Suppress-Script: Cyrl
+%%
+Type: language
+Subtag: ml
+Description: Malayalam
+Added: 2005-10-16
+Suppress-Script: Mlym
+%%
+Type: language
+Subtag: mn
+Description: Mongolian
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: mo
+Description: Moldavian
+Description: Moldovan
+Added: 2005-10-16
+Deprecated: 2008-11-22
+Preferred-Value: ro
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: mr
+Description: Marathi
+Added: 2005-10-16
+Suppress-Script: Deva
+%%
+Type: language
+Subtag: ms
+Description: Malay (macrolanguage)
+Added: 2005-10-16
+Suppress-Script: Latn
+Scope: macrolanguage
+%%
+Type: language
+Subtag: mt
+Description: Maltese
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: my
+Description: Burmese
+Added: 2005-10-16
+Suppress-Script: Mymr
+%%
+Type: language
+Subtag: na
+Description: Nauru
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: nb
+Description: Norwegian Bokmål
+Added: 2005-10-16
+Suppress-Script: Latn
+Macrolanguage: no
+%%
+Type: language
+Subtag: nd
+Description: North Ndebele
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: ne
+Description: Nepali (macrolanguage)
+Added: 2005-10-16
+Suppress-Script: Deva
+Scope: macrolanguage
+%%
+Type: language
+Subtag: ng
+Description: Ndonga
+Added: 2005-10-16
+%%
+Type: language
+Subtag: nl
+Description: Dutch
+Description: Flemish
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: nn
+Description: Norwegian Nynorsk
+Added: 2005-10-16
+Suppress-Script: Latn
+Macrolanguage: no
+%%
+Type: language
+Subtag: no
+Description: Norwegian
+Added: 2005-10-16
+Suppress-Script: Latn
+Scope: macrolanguage
+%%
+Type: language
+Subtag: nr
+Description: South Ndebele
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: nv
+Description: Navajo
+Description: Navaho
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ny
+Description: Nyanja
+Description: Chewa
+Description: Chichewa
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: oc
+Description: Occitan (post 1500)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: oj
+Description: Ojibwa
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: om
+Description: Oromo
+Added: 2005-10-16
+Suppress-Script: Latn
+Scope: macrolanguage
+%%
+Type: language
+Subtag: or
+Description: Oriya (macrolanguage)
+Added: 2005-10-16
+Suppress-Script: Orya
+Scope: macrolanguage
+%%
+Type: language
+Subtag: os
+Description: Ossetian
+Description: Ossetic
+Added: 2005-10-16
+%%
+Type: language
+Subtag: pa
+Description: Panjabi
+Description: Punjabi
+Added: 2005-10-16
+Suppress-Script: Guru
+%%
+Type: language
+Subtag: pi
+Description: Pali
+Added: 2005-10-16
+%%
+Type: language
+Subtag: pl
+Description: Polish
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: ps
+Description: Pushto
+Description: Pashto
+Added: 2005-10-16
+Suppress-Script: Arab
+Scope: macrolanguage
+%%
+Type: language
+Subtag: pt
+Description: Portuguese
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: qu
+Description: Quechua
+Added: 2005-10-16
+Suppress-Script: Latn
+Scope: macrolanguage
+%%
+Type: language
+Subtag: rm
+Description: Romansh
+Suppress-Script: Latn
+Added: 2005-10-16
+%%
+Type: language
+Subtag: rn
+Description: Rundi
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: ro
+Description: Romanian
+Description: Moldavian
+Description: Moldovan
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: ru
+Description: Russian
+Added: 2005-10-16
+Suppress-Script: Cyrl
+%%
+Type: language
+Subtag: rw
+Description: Kinyarwanda
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: sa
+Description: Sanskrit
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sc
+Description: Sardinian
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: sd
+Description: Sindhi
+Added: 2005-10-16
+%%
+Type: language
+Subtag: se
+Description: Northern Sami
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sg
+Description: Sango
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: sh
+Description: Serbo-Croatian
+Added: 2005-10-16
+Scope: macrolanguage
+Comments: sr, hr, bs are preferred for most modern uses
+%%
+Type: language
+Subtag: si
+Description: Sinhala
+Description: Sinhalese
+Added: 2005-10-16
+Suppress-Script: Sinh
+%%
+Type: language
+Subtag: sk
+Description: Slovak
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: sl
+Description: Slovenian
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: sm
+Description: Samoan
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: sn
+Description: Shona
+Added: 2005-10-16
+%%
+Type: language
+Subtag: so
+Description: Somali
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: sq
+Description: Albanian
+Added: 2005-10-16
+Suppress-Script: Latn
+Scope: macrolanguage
+%%
+Type: language
+Subtag: sr
+Description: Serbian
+Added: 2005-10-16
+Macrolanguage: sh
+%%
+Type: language
+Subtag: ss
+Description: Swati
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: st
+Description: Southern Sotho
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: su
+Description: Sundanese
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sv
+Description: Swedish
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: sw
+Description: Swahili (macrolanguage)
+Added: 2005-10-16
+Suppress-Script: Latn
+Scope: macrolanguage
+%%
+Type: language
+Subtag: ta
+Description: Tamil
+Added: 2005-10-16
+Suppress-Script: Taml
+%%
+Type: language
+Subtag: te
+Description: Telugu
+Added: 2005-10-16
+Suppress-Script: Telu
+%%
+Type: language
+Subtag: tg
+Description: Tajik
+Added: 2005-10-16
+%%
+Type: language
+Subtag: th
+Description: Thai
+Added: 2005-10-16
+Suppress-Script: Thai
+%%
+Type: language
+Subtag: ti
+Description: Tigrinya
+Added: 2005-10-16
+Suppress-Script: Ethi
+%%
+Type: language
+Subtag: tk
+Description: Turkmen
+Added: 2005-10-16
+%%
+Type: language
+Subtag: tl
+Description: Tagalog
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: tn
+Description: Tswana
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: to
+Description: Tonga (Tonga Islands)
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: tr
+Description: Turkish
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: ts
+Description: Tsonga
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: tt
+Description: Tatar
+Added: 2005-10-16
+%%
+Type: language
+Subtag: tw
+Description: Twi
+Added: 2005-10-16
+Macrolanguage: ak
+%%
+Type: language
+Subtag: ty
+Description: Tahitian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ug
+Description: Uighur
+Description: Uyghur
+Added: 2005-10-16
+%%
+Type: language
+Subtag: uk
+Description: Ukrainian
+Added: 2005-10-16
+Suppress-Script: Cyrl
+%%
+Type: language
+Subtag: ur
+Description: Urdu
+Added: 2005-10-16
+Suppress-Script: Arab
+%%
+Type: language
+Subtag: uz
+Description: Uzbek
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: ve
+Description: Venda
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: vi
+Description: Vietnamese
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: vo
+Description: Volapük
+Added: 2005-10-16
+%%
+Type: language
+Subtag: wa
+Description: Walloon
+Added: 2005-10-16
+%%
+Type: language
+Subtag: wo
+Description: Wolof
+Added: 2005-10-16
+%%
+Type: language
+Subtag: xh
+Description: Xhosa
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: yi
+Description: Yiddish
+Added: 2005-10-16
+Suppress-Script: Hebr
+Scope: macrolanguage
+%%
+Type: language
+Subtag: yo
+Description: Yoruba
+Added: 2005-10-16
+%%
+Type: language
+Subtag: za
+Description: Zhuang
+Description: Chuang
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: zh
+Description: Chinese
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: zu
+Description: Zulu
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: aaa
+Description: Ghotuo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aab
+Description: Alumu-Tesu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aac
+Description: Ari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aad
+Description: Amal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aae
+Description: Arbëreshë Albanian
+Added: 2009-07-29
+Macrolanguage: sq
+%%
+Type: language
+Subtag: aaf
+Description: Aranadan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aag
+Description: Ambrak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aah
+Description: Abu' Arapesh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aai
+Description: Arifama-Miniafia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aak
+Description: Ankave
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aal
+Description: Afade
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aam
+Description: Aramanik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aan
+Description: Anambé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aao
+Description: Algerian Saharan Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: aap
+Description: Pará Arára
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aaq
+Description: Eastern Abnaki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aas
+Description: Aasáx
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aat
+Description: Arvanitika Albanian
+Added: 2009-07-29
+Macrolanguage: sq
+%%
+Type: language
+Subtag: aau
+Description: Abau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aav
+Description: Austro-Asiatic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: aaw
+Description: Solong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aax
+Description: Mandobo Atas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aaz
+Description: Amarasi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aba
+Description: Abé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abb
+Description: Bankon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abc
+Description: Ambala Ayta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abd
+Description: Manide
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abe
+Description: Western Abnaki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abf
+Description: Abai Sungai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abg
+Description: Abaga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abh
+Description: Tajiki Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: abi
+Description: Abidji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abj
+Description: Aka-Bea
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abl
+Description: Lampung Nyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abm
+Description: Abanyom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abn
+Description: Abua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abo
+Description: Abon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abp
+Description: Abellen Ayta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abq
+Description: Abaza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abr
+Description: Abron
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abs
+Description: Ambonese Malay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abt
+Description: Ambulas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abu
+Description: Abure
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abv
+Description: Baharna Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: abw
+Description: Pal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abx
+Description: Inabaknon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aby
+Description: Aneme Wake
+Added: 2009-07-29
+%%
+Type: language
+Subtag: abz
+Description: Abui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aca
+Description: Achagua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: acb
+Description: Áncá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: acd
+Description: Gikyode
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ace
+Description: Achinese
+Added: 2005-10-16
+%%
+Type: language
+Subtag: acf
+Description: Saint Lucian Creole French
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ach
+Description: Acoli
+Added: 2005-10-16
+%%
+Type: language
+Subtag: aci
+Description: Aka-Cari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ack
+Description: Aka-Kora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: acl
+Description: Akar-Bale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: acm
+Description: Mesopotamian Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: acn
+Description: Achang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: acp
+Description: Eastern Acipa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: acq
+Description: Ta'izzi-Adeni Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: acr
+Description: Achi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: acs
+Description: Acroá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: act
+Description: Achterhoeks
+Added: 2009-07-29
+%%
+Type: language
+Subtag: acu
+Description: Achuar-Shiwiar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: acv
+Description: Achumawi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: acw
+Description: Hijazi Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: acx
+Description: Omani Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: acy
+Description: Cypriot Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: acz
+Description: Acheron
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ada
+Description: Adangme
+Added: 2005-10-16
+%%
+Type: language
+Subtag: adb
+Description: Adabe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: add
+Description: Dzodinka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ade
+Description: Adele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: adf
+Description: Dhofari Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: adg
+Description: Andegerebinha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: adh
+Description: Adhola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: adi
+Description: Adi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: adj
+Description: Adioukrou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: adl
+Description: Galo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: adn
+Description: Adang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ado
+Description: Abu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: adp
+Description: Adap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: adq
+Description: Adangbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: adr
+Description: Adonara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ads
+Description: Adamorobe Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: adt
+Description: Adnyamathanha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: adu
+Description: Aduge
+Added: 2009-07-29
+%%
+Type: language
+Subtag: adw
+Description: Amundava
+Added: 2009-07-29
+%%
+Type: language
+Subtag: adx
+Description: Amdo Tibetan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ady
+Description: Adyghe
+Description: Adygei
+Added: 2005-10-16
+%%
+Type: language
+Subtag: adz
+Description: Adzera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aea
+Description: Areba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aeb
+Description: Tunisian Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: aec
+Description: Saidi Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: aed
+Description: Argentine Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aee
+Description: Northeast Pashayi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aek
+Description: Haeke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ael
+Description: Ambele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aem
+Description: Arem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aen
+Description: Armenian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aeq
+Description: Aer
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aer
+Description: Eastern Arrernte
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aes
+Description: Alsea
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aeu
+Description: Akeu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aew
+Description: Ambakich
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aey
+Description: Amele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aez
+Description: Aeka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: afa
+Description: Afro-Asiatic languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: afb
+Description: Gulf Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: afd
+Description: Andai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: afe
+Description: Putukwam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: afg
+Description: Afghan Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: afh
+Description: Afrihili
+Added: 2005-10-16
+%%
+Type: language
+Subtag: afi
+Description: Akrukay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: afk
+Description: Nanubae
+Added: 2009-07-29
+%%
+Type: language
+Subtag: afn
+Description: Defaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: afo
+Description: Eloyi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: afp
+Description: Tapei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: afs
+Description: Afro-Seminole Creole
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aft
+Description: Afitti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: afu
+Description: Awutu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: afz
+Description: Obokuitai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aga
+Description: Aguano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agb
+Description: Legbo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agc
+Description: Agatu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agd
+Description: Agarabi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: age
+Description: Angal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agf
+Description: Arguni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agg
+Description: Angor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agh
+Description: Ngelima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agi
+Description: Agariya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agj
+Description: Argobba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agk
+Description: Isarog Agta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agl
+Description: Fembe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agm
+Description: Angaataha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agn
+Description: Agutaynen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ago
+Description: Tainae
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agp
+Description: Paranan
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Comments: see apf, prf
+%%
+Type: language
+Subtag: agq
+Description: Aghem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agr
+Description: Aguaruna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ags
+Description: Esimbi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agt
+Description: Central Cagayan Agta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agu
+Description: Aguacateco
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agv
+Description: Remontado Dumagat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agw
+Description: Kahua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agx
+Description: Aghul
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agy
+Description: Southern Alta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: agz
+Description: Mt. Iriga Agta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aha
+Description: Ahanta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ahb
+Description: Axamb
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ahg
+Description: Qimant
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ahh
+Description: Aghu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ahi
+Description: Tiagbamrin Aizi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ahk
+Description: Akha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ahl
+Description: Igo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ahm
+Description: Mobumrin Aizi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ahn
+Description: Àhàn
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aho
+Description: Ahom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ahp
+Description: Aproumu Aizi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ahr
+Description: Ahirani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ahs
+Description: Ashe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aht
+Description: Ahtena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aia
+Description: Arosi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aib
+Description: Ainu (China)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aic
+Description: Ainbai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aid
+Description: Alngith
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aie
+Description: Amara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aif
+Description: Agi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aig
+Description: Antigua and Barbuda Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aih
+Description: Ai-Cham
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aii
+Description: Assyrian Neo-Aramaic
+Added: 2009-07-29
+Macrolanguage: syr
+%%
+Type: language
+Subtag: aij
+Description: Lishanid Noshan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aik
+Description: Ake
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ail
+Description: Aimele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aim
+Description: Aimol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ain
+Description: Ainu (Japan)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: aio
+Description: Aiton
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aip
+Description: Burumakok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aiq
+Description: Aimaq
+Added: 2009-07-29
+%%
+Type: language
+Subtag: air
+Description: Airoran
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ais
+Description: Nataoran Amis
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ait
+Description: Arikem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aiw
+Description: Aari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aix
+Description: Aighon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aiy
+Description: Ali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aja
+Description: Aja (Sudan)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ajg
+Description: Aja (Benin)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aji
+Description: Ajië
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ajn
+Description: Andajin
+Added: 2012-08-12
+%%
+Type: language
+Subtag: ajp
+Description: South Levantine Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: ajt
+Description: Judeo-Tunisian Arabic
+Added: 2009-07-29
+Macrolanguage: jrb
+%%
+Type: language
+Subtag: aju
+Description: Judeo-Moroccan Arabic
+Added: 2009-07-29
+Macrolanguage: jrb
+%%
+Type: language
+Subtag: ajw
+Description: Ajawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ajz
+Description: Amri Karbi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akb
+Description: Batak Angkola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akc
+Description: Mpur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akd
+Description: Ukpet-Ehom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ake
+Description: Akawaio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akf
+Description: Akpa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akg
+Description: Anakalangu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akh
+Description: Angal Heneng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aki
+Description: Aiome
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akj
+Description: Aka-Jeru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akk
+Description: Akkadian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: akl
+Description: Aklanon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akm
+Description: Aka-Bo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ako
+Description: Akurio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akp
+Description: Siwu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akq
+Description: Ak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akr
+Description: Araki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aks
+Description: Akaselem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akt
+Description: Akolet
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aku
+Description: Akum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akv
+Description: Akhvakh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akw
+Description: Akwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akx
+Description: Aka-Kede
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aky
+Description: Aka-Kol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: akz
+Description: Alabama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ala
+Description: Alago
+Added: 2009-07-29
+%%
+Type: language
+Subtag: alc
+Description: Qawasqar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ald
+Description: Alladian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ale
+Description: Aleut
+Added: 2005-10-16
+%%
+Type: language
+Subtag: alf
+Description: Alege
+Added: 2009-07-29
+%%
+Type: language
+Subtag: alg
+Description: Algonquian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: alh
+Description: Alawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ali
+Description: Amaimon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: alj
+Description: Alangan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: alk
+Description: Alak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: all
+Description: Allar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: alm
+Description: Amblong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aln
+Description: Gheg Albanian
+Added: 2009-07-29
+Macrolanguage: sq
+%%
+Type: language
+Subtag: alo
+Description: Larike-Wakasihu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: alp
+Description: Alune
+Added: 2009-07-29
+%%
+Type: language
+Subtag: alq
+Description: Algonquin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: alr
+Description: Alutor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: als
+Description: Tosk Albanian
+Added: 2009-07-29
+Macrolanguage: sq
+%%
+Type: language
+Subtag: alt
+Description: Southern Altai
+Added: 2005-10-16
+%%
+Type: language
+Subtag: alu
+Description: 'Are'are
+Added: 2009-07-29
+%%
+Type: language
+Subtag: alv
+Description: Atlantic-Congo languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: alw
+Description: Alaba-K’abeena
+Description: Wanbasana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: alx
+Description: Amol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aly
+Description: Alyawarr
+Added: 2009-07-29
+%%
+Type: language
+Subtag: alz
+Description: Alur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ama
+Description: Amanayé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amb
+Description: Ambo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amc
+Description: Amahuaca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ame
+Description: Yanesha'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amf
+Description: Hamer-Banna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amg
+Description: Amurdak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ami
+Description: Amis
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amj
+Description: Amdang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amk
+Description: Ambai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aml
+Description: War-Jaintia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amm
+Description: Ama (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amn
+Description: Amanab
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amo
+Description: Amo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amp
+Description: Alamblak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amq
+Description: Amahai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amr
+Description: Amarakaeri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ams
+Description: Southern Amami-Oshima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amt
+Description: Amto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amu
+Description: Guerrero Amuzgo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amv
+Description: Ambelau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amw
+Description: Western Neo-Aramaic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amx
+Description: Anmatyerre
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amy
+Description: Ami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: amz
+Description: Atampaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ana
+Description: Andaqui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: anb
+Description: Andoa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: anc
+Description: Ngas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: and
+Description: Ansus
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ane
+Description: Xârâcùù
+Added: 2009-07-29
+%%
+Type: language
+Subtag: anf
+Description: Animere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ang
+Description: Old English (ca. 450-1100)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: anh
+Description: Nend
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ani
+Description: Andi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: anj
+Description: Anor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ank
+Description: Goemai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: anl
+Description: Anu-Hkongso Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: anm
+Description: Anal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ann
+Description: Obolo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ano
+Description: Andoque
+Added: 2009-07-29
+%%
+Type: language
+Subtag: anp
+Description: Angika
+Added: 2006-03-08
+%%
+Type: language
+Subtag: anq
+Description: Jarawa (India)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: anr
+Description: Andh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ans
+Description: Anserma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ant
+Description: Antakarinya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: anu
+Description: Anuak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: anv
+Description: Denya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: anw
+Description: Anaang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: anx
+Description: Andra-Hus
+Added: 2009-07-29
+%%
+Type: language
+Subtag: any
+Description: Anyin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: anz
+Description: Anem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aoa
+Description: Angolar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aob
+Description: Abom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aoc
+Description: Pemon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aod
+Description: Andarum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aoe
+Description: Angal Enen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aof
+Description: Bragat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aog
+Description: Angoram
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aoh
+Description: Arma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aoi
+Description: Anindilyakwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aoj
+Description: Mufian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aok
+Description: Arhö
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aol
+Description: Alor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aom
+Description: Ömie
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aon
+Description: Bumbita Arapesh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aor
+Description: Aore
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aos
+Description: Taikat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aot
+Description: A'tong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aou
+Description: A'ou
+Added: 2012-08-12
+%%
+Type: language
+Subtag: aox
+Description: Atorada
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aoz
+Description: Uab Meto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apa
+Description: Apache languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: apb
+Description: Sa'a
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apc
+Description: North Levantine Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: apd
+Description: Sudanese Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: ape
+Description: Bukiyip
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apf
+Description: Pahanan Agta
+Added: 2010-03-11
+%%
+Type: language
+Subtag: apg
+Description: Ampanang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aph
+Description: Athpariya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: api
+Description: Apiaká
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apj
+Description: Jicarilla Apache
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apk
+Description: Kiowa Apache
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apl
+Description: Lipan Apache
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apm
+Description: Mescalero-Chiricahua Apache
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apn
+Description: Apinayé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apo
+Description: Ambul
+Added: 2009-07-29
+%%
+Type: language
+Subtag: app
+Description: Apma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apq
+Description: A-Pucikwar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apr
+Description: Arop-Lokep
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aps
+Description: Arop-Sissano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apt
+Description: Apatani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apu
+Description: Apurinã
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apv
+Description: Alapmunte
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apw
+Description: Western Apache
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apx
+Description: Aputai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apy
+Description: Apalaí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: apz
+Description: Safeyoka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aqa
+Description: Alacalufan languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: aqc
+Description: Archi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aqd
+Description: Ampari Dogon
+Added: 2011-08-16
+%%
+Type: language
+Subtag: aqg
+Description: Arigidi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aql
+Description: Algic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: aqm
+Description: Atohwaim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aqn
+Description: Northern Alta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aqp
+Description: Atakapa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aqr
+Description: Arhâ
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aqz
+Description: Akuntsu
+Added: 2010-03-11
+%%
+Type: language
+Subtag: arb
+Description: Standard Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: arc
+Description: Official Aramaic (700-300 BCE)
+Description: Imperial Aramaic (700-300 BCE)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ard
+Description: Arabana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: are
+Description: Western Arrarnta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: arh
+Description: Arhuaco
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ari
+Description: Arikara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: arj
+Description: Arapaso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ark
+Description: Arikapú
+Added: 2009-07-29
+%%
+Type: language
+Subtag: arl
+Description: Arabela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: arn
+Description: Mapudungun
+Description: Mapuche
+Added: 2005-10-16
+%%
+Type: language
+Subtag: aro
+Description: Araona
+Added: 2009-07-29
+%%
+Type: language
+Subtag: arp
+Description: Arapaho
+Added: 2005-10-16
+%%
+Type: language
+Subtag: arq
+Description: Algerian Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: arr
+Description: Karo (Brazil)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ars
+Description: Najdi Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: art
+Description: Artificial languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: aru
+Description: Aruá (Amazonas State)
+Description: Arawá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: arv
+Description: Arbore
+Added: 2009-07-29
+%%
+Type: language
+Subtag: arw
+Description: Arawak
+Added: 2005-10-16
+%%
+Type: language
+Subtag: arx
+Description: Aruá (Rodonia State)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ary
+Description: Moroccan Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: arz
+Description: Egyptian Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: asa
+Description: Asu (Tanzania)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asb
+Description: Assiniboine
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asc
+Description: Casuarina Coast Asmat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asd
+Description: Asas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ase
+Description: American Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asf
+Description: Australian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asg
+Description: Cishingini
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ash
+Description: Abishira
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asi
+Description: Buruwai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asj
+Description: Nsari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ask
+Description: Ashkun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asl
+Description: Asilulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asn
+Description: Xingú Asuriní
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aso
+Description: Dano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asp
+Description: Algerian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asq
+Description: Austrian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asr
+Description: Asuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ass
+Description: Ipulo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ast
+Description: Asturian
+Description: Asturleonese
+Description: Bable
+Description: Leonese
+Added: 2005-10-16
+%%
+Type: language
+Subtag: asu
+Description: Tocantins Asurini
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asv
+Description: Asoa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asw
+Description: Australian Aborigines Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asx
+Description: Muratayak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asy
+Description: Yaosakor Asmat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: asz
+Description: As
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ata
+Description: Pele-Ata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atb
+Description: Zaiwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atc
+Description: Atsahuaca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atd
+Description: Ata Manobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ate
+Description: Atemble
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atg
+Description: Ivbie North-Okpela-Arhe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ath
+Description: Athapascan languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: ati
+Description: Attié
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atj
+Description: Atikamekw
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atk
+Description: Ati
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atl
+Description: Mt. Iraya Agta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atm
+Description: Ata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atn
+Description: Ashtiani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ato
+Description: Atong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atp
+Description: Pudtol Atta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atq
+Description: Aralle-Tabulahan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atr
+Description: Waimiri-Atroari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ats
+Description: Gros Ventre
+Added: 2009-07-29
+%%
+Type: language
+Subtag: att
+Description: Pamplona Atta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atu
+Description: Reel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atv
+Description: Northern Altai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atw
+Description: Atsugewi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atx
+Description: Arutani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aty
+Description: Aneityum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: atz
+Description: Arta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aua
+Description: Asumboa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aub
+Description: Alugu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: auc
+Description: Waorani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aud
+Description: Anuta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aue
+Description: =/Kx'au//'ein
+Added: 2009-07-29
+%%
+Type: language
+Subtag: auf
+Description: Arauan languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: aug
+Description: Aguna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: auh
+Description: Aushi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aui
+Description: Anuki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: auj
+Description: Awjilah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: auk
+Description: Heyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aul
+Description: Aulua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aum
+Description: Asu (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aun
+Description: Molmo One
+Added: 2009-07-29
+%%
+Type: language
+Subtag: auo
+Description: Auyokawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aup
+Description: Makayam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: auq
+Description: Anus
+Description: Korur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aur
+Description: Aruek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aus
+Description: Australian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: aut
+Description: Austral
+Added: 2009-07-29
+%%
+Type: language
+Subtag: auu
+Description: Auye
+Added: 2009-07-29
+%%
+Type: language
+Subtag: auw
+Description: Awyi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aux
+Description: Aurá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: auy
+Description: Awiyaana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: auz
+Description: Uzbeki Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: avb
+Description: Avau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: avd
+Description: Alviri-Vidari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: avi
+Description: Avikam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: avk
+Description: Kotava
+Added: 2009-07-29
+%%
+Type: language
+Subtag: avl
+Description: Eastern Egyptian Bedawi Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: avm
+Description: Angkamuthi
+Added: 2012-08-12
+%%
+Type: language
+Subtag: avn
+Description: Avatime
+Added: 2009-07-29
+%%
+Type: language
+Subtag: avo
+Description: Agavotaguerra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: avs
+Description: Aushiri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: avt
+Description: Au
+Added: 2009-07-29
+%%
+Type: language
+Subtag: avu
+Description: Avokaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: avv
+Description: Avá-Canoeiro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awa
+Description: Awadhi
+Added: 2005-10-16
+%%
+Type: language
+Subtag: awb
+Description: Awa (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awc
+Description: Cicipu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awd
+Description: Arawakan languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: awe
+Description: Awetí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awg
+Description: Anguthimri
+Added: 2012-08-12
+%%
+Type: language
+Subtag: awh
+Description: Awbono
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awi
+Description: Aekyom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awk
+Description: Awabakal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awm
+Description: Arawum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awn
+Description: Awngi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awo
+Description: Awak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awr
+Description: Awera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aws
+Description: South Awyu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awt
+Description: Araweté
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awu
+Description: Central Awyu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awv
+Description: Jair Awyu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aww
+Description: Awun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awx
+Description: Awara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: awy
+Description: Edera Awyu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: axb
+Description: Abipon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: axe
+Description: Ayerrerenge
+Added: 2012-08-12
+%%
+Type: language
+Subtag: axg
+Description: Mato Grosso Arára
+Added: 2009-07-29
+%%
+Type: language
+Subtag: axk
+Description: Yaka (Central African Republic)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: axm
+Description: Middle Armenian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: axx
+Description: Xaragure
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aya
+Description: Awar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ayb
+Description: Ayizo Gbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ayc
+Description: Southern Aymara
+Added: 2009-07-29
+Macrolanguage: ay
+%%
+Type: language
+Subtag: ayd
+Description: Ayabadhu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aye
+Description: Ayere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ayg
+Description: Ginyanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ayh
+Description: Hadrami Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: ayi
+Description: Leyigha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ayk
+Description: Akuku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ayl
+Description: Libyan Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: ayn
+Description: Sanaani Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: ayo
+Description: Ayoreo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ayp
+Description: North Mesopotamian Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: ayq
+Description: Ayi (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ayr
+Description: Central Aymara
+Added: 2009-07-29
+Macrolanguage: ay
+%%
+Type: language
+Subtag: ays
+Description: Sorsogon Ayta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ayt
+Description: Magbukun Ayta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ayu
+Description: Ayu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ayx
+Description: Ayi (China)
+Added: 2009-07-29
+Deprecated: 2011-08-16
+Preferred-Value: nun
+%%
+Type: language
+Subtag: ayy
+Description: Tayabas Ayta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ayz
+Description: Mai Brat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: aza
+Description: Azha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: azb
+Description: South Azerbaijani
+Added: 2009-07-29
+Macrolanguage: az
+%%
+Type: language
+Subtag: azc
+Description: Uto-Aztecan languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: azd
+Description: Eastern Durango Nahuatl
+Added: 2012-08-12
+%%
+Type: language
+Subtag: azg
+Description: San Pedro Amuzgos Amuzgo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: azj
+Description: North Azerbaijani
+Added: 2009-07-29
+Macrolanguage: az
+%%
+Type: language
+Subtag: azm
+Description: Ipalapa Amuzgo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: azn
+Description: Western Durango Nahuatl
+Added: 2012-08-12
+%%
+Type: language
+Subtag: azo
+Description: Awing
+Added: 2009-07-29
+%%
+Type: language
+Subtag: azt
+Description: Faire Atta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: azz
+Description: Highland Puebla Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: baa
+Description: Babatana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bab
+Description: Bainouk-Gunyuño
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bac
+Description: Badui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bad
+Description: Banda languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: bae
+Description: Baré
+Added: 2009-07-29
+%%
+Type: language
+Subtag: baf
+Description: Nubaca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bag
+Description: Tuki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bah
+Description: Bahamas Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bai
+Description: Bamileke languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: baj
+Description: Barakai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bal
+Description: Baluchi
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: ban
+Description: Balinese
+Added: 2005-10-16
+%%
+Type: language
+Subtag: bao
+Description: Waimaha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bap
+Description: Bantawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bar
+Description: Bavarian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bas
+Description: Basa (Cameroon)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: bat
+Description: Baltic languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: bau
+Description: Bada (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bav
+Description: Vengo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: baw
+Description: Bambili-Bambui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bax
+Description: Bamun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bay
+Description: Batuley
+Added: 2009-07-29
+%%
+Type: language
+Subtag: baz
+Description: Tunen
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see nvo, tvu
+%%
+Type: language
+Subtag: bba
+Description: Baatonum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbb
+Description: Barai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbc
+Description: Batak Toba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbd
+Description: Bau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbe
+Description: Bangba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbf
+Description: Baibai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbg
+Description: Barama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbh
+Description: Bugan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbi
+Description: Barombi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbj
+Description: Ghomálá'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbk
+Description: Babanki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbl
+Description: Bats
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbm
+Description: Babango
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbn
+Description: Uneapa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbo
+Description: Northern Bobo Madaré
+Description: Konabéré
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbp
+Description: West Central Banda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbq
+Description: Bamali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbr
+Description: Girawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbs
+Description: Bakpinka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbt
+Description: Mburku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbu
+Description: Kulung (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbv
+Description: Karnai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbw
+Description: Baba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbx
+Description: Bubia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bby
+Description: Befang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bbz
+Description: Babalia Creole Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: bca
+Description: Central Bai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcb
+Description: Bainouk-Samik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcc
+Description: Southern Balochi
+Added: 2009-07-29
+Macrolanguage: bal
+%%
+Type: language
+Subtag: bcd
+Description: North Babar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bce
+Description: Bamenyam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcf
+Description: Bamu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcg
+Description: Baga Binari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bch
+Description: Bariai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bci
+Description: Baoulé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcj
+Description: Bardi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bck
+Description: Bunaba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcl
+Description: Central Bikol
+Added: 2009-07-29
+Macrolanguage: bik
+%%
+Type: language
+Subtag: bcm
+Description: Bannoni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcn
+Description: Bali (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bco
+Description: Kaluli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcp
+Description: Bali (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcq
+Description: Bench
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcr
+Description: Babine
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcs
+Description: Kohumono
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bct
+Description: Bendi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcu
+Description: Awad Bing
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcv
+Description: Shoo-Minda-Nye
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcw
+Description: Bana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcy
+Description: Bacama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bcz
+Description: Bainouk-Gunyaamolo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bda
+Description: Bayot
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdb
+Description: Basap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdc
+Description: Emberá-Baudó
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdd
+Description: Bunama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bde
+Description: Bade
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdf
+Description: Biage
+Added: 2010-03-11
+%%
+Type: language
+Subtag: bdg
+Description: Bonggi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdh
+Description: Baka (Sudan)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdi
+Description: Burun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdj
+Description: Bai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdk
+Description: Budukh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdl
+Description: Indonesian Bajau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdm
+Description: Buduma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdn
+Description: Baldemu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdo
+Description: Morom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdp
+Description: Bende
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdq
+Description: Bahnar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdr
+Description: West Coast Bajau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bds
+Description: Burunge
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdt
+Description: Bokoto
+Added: 2009-07-29
+Macrolanguage: gba
+%%
+Type: language
+Subtag: bdu
+Description: Oroko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdv
+Description: Bodo Parja
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdw
+Description: Baham
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdx
+Description: Budong-Budong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdy
+Description: Bandjalang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bdz
+Description: Badeshi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bea
+Description: Beaver
+Added: 2009-07-29
+%%
+Type: language
+Subtag: beb
+Description: Bebele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bec
+Description: Iceve-Maci
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bed
+Description: Bedoanas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bee
+Description: Byangsi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bef
+Description: Benabena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: beg
+Description: Belait
+Added: 2009-07-29
+%%
+Type: language
+Subtag: beh
+Description: Biali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bei
+Description: Bekati'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bej
+Description: Beja
+Description: Bedawiyet
+Added: 2005-10-16
+%%
+Type: language
+Subtag: bek
+Description: Bebeli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bem
+Description: Bemba (Zambia)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: beo
+Description: Beami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bep
+Description: Besoa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: beq
+Description: Beembe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ber
+Description: Berber languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: bes
+Description: Besme
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bet
+Description: Guiberoua Béte
+Added: 2009-07-29
+%%
+Type: language
+Subtag: beu
+Description: Blagar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bev
+Description: Daloa Bété
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bew
+Description: Betawi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bex
+Description: Jur Modo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bey
+Description: Beli (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bez
+Description: Bena (Tanzania)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfa
+Description: Bari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfb
+Description: Pauri Bareli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfc
+Description: Northern Bai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfd
+Description: Bafut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfe
+Description: Betaf
+Description: Tena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bff
+Description: Bofi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfg
+Description: Busang Kayan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfh
+Description: Blafe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfi
+Description: British Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfj
+Description: Bafanji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfk
+Description: Ban Khor Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfl
+Description: Banda-Ndélé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfm
+Description: Mmen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfn
+Description: Bunak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfo
+Description: Malba Birifor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfp
+Description: Beba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfq
+Description: Badaga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfr
+Description: Bazigar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfs
+Description: Southern Bai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bft
+Description: Balti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfu
+Description: Gahri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfw
+Description: Bondo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfx
+Description: Bantayanon
+Added: 2010-03-11
+%%
+Type: language
+Subtag: bfy
+Description: Bagheli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bfz
+Description: Mahasu Pahari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bga
+Description: Gwamhi-Wuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgb
+Description: Bobongko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgc
+Description: Haryanvi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgd
+Description: Rathwi Bareli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bge
+Description: Bauria
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgf
+Description: Bangandu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgg
+Description: Bugun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgi
+Description: Giangan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgj
+Description: Bangolan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgk
+Description: Bit
+Description: Buxinhua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgl
+Description: Bo (Laos)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgm
+Description: Baga Mboteni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgn
+Description: Western Balochi
+Added: 2009-07-29
+Macrolanguage: bal
+%%
+Type: language
+Subtag: bgo
+Description: Baga Koga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgp
+Description: Eastern Balochi
+Added: 2009-07-29
+Macrolanguage: bal
+%%
+Type: language
+Subtag: bgq
+Description: Bagri
+Added: 2009-07-29
+Macrolanguage: raj
+%%
+Type: language
+Subtag: bgr
+Description: Bawm Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgs
+Description: Tagabawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgt
+Description: Bughotu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgu
+Description: Mbongno
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgv
+Description: Warkay-Bipim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgw
+Description: Bhatri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgx
+Description: Balkan Gagauz Turkish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgy
+Description: Benggoi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bgz
+Description: Banggai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bha
+Description: Bharia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhb
+Description: Bhili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhc
+Description: Biga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhd
+Description: Bhadrawahi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhe
+Description: Bhaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhf
+Description: Odiai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhg
+Description: Binandere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhh
+Description: Bukharic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhi
+Description: Bhilali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhj
+Description: Bahing
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhk
+Description: Albay Bicolano
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Macrolanguage: bik
+Comments: see fbl, lbl, rbl, ubl
+%%
+Type: language
+Subtag: bhl
+Description: Bimin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhm
+Description: Bathari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhn
+Description: Bohtan Neo-Aramaic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bho
+Description: Bhojpuri
+Added: 2005-10-16
+%%
+Type: language
+Subtag: bhp
+Description: Bima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhq
+Description: Tukang Besi South
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhr
+Description: Bara Malagasy
+Added: 2009-07-29
+Macrolanguage: mg
+%%
+Type: language
+Subtag: bhs
+Description: Buwal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bht
+Description: Bhattiyali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhu
+Description: Bhunjia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhv
+Description: Bahau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhw
+Description: Biak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhx
+Description: Bhalay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhy
+Description: Bhele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bhz
+Description: Bada (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bia
+Description: Badimaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bib
+Description: Bissa
+Description: Bisa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bic
+Description: Bikaru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bid
+Description: Bidiyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bie
+Description: Bepour
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bif
+Description: Biafada
+Added: 2009-07-29
+%%
+Type: language
+Subtag: big
+Description: Biangai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bij
+Description: Vaghat-Ya-Bijim-Legeri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bik
+Description: Bikol
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: bil
+Description: Bile
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bim
+Description: Bimoba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bin
+Description: Bini
+Description: Edo
+Added: 2005-10-16
+%%
+Type: language
+Subtag: bio
+Description: Nai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bip
+Description: Bila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: biq
+Description: Bipi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bir
+Description: Bisorio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bit
+Description: Berinomo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: biu
+Description: Biete
+Added: 2009-07-29
+%%
+Type: language
+Subtag: biv
+Description: Southern Birifor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: biw
+Description: Kol (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bix
+Description: Bijori
+Added: 2009-07-29
+%%
+Type: language
+Subtag: biy
+Description: Birhor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: biz
+Description: Baloi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bja
+Description: Budza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjb
+Description: Banggarla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjc
+Description: Bariji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjd
+Description: Bandjigali
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Preferred-Value: drl
+%%
+Type: language
+Subtag: bje
+Description: Biao-Jiao Mien
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjf
+Description: Barzani Jewish Neo-Aramaic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjg
+Description: Bidyogo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjh
+Description: Bahinemo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bji
+Description: Burji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjj
+Description: Kanauji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjk
+Description: Barok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjl
+Description: Bulu (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjm
+Description: Bajelani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjn
+Description: Banjar
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: bjo
+Description: Mid-Southern Banda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjq
+Description: Southern Betsimisaraka Malagasy
+Added: 2009-07-29
+Deprecated: 2011-08-16
+Macrolanguage: mg
+Comments: see bzc, tkg
+%%
+Type: language
+Subtag: bjr
+Description: Binumarien
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjs
+Description: Bajan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjt
+Description: Balanta-Ganja
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bju
+Description: Busuu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjv
+Description: Bedjond
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjw
+Description: Bakwé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjx
+Description: Banao Itneg
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjy
+Description: Bayali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bjz
+Description: Baruga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bka
+Description: Kyak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkb
+Description: Finallig
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Comments: see ebk, obk
+%%
+Type: language
+Subtag: bkc
+Description: Baka (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkd
+Description: Binukid
+Description: Talaandig
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkf
+Description: Beeke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkg
+Description: Buraka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkh
+Description: Bakoko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bki
+Description: Baki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkj
+Description: Pande
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkk
+Description: Brokskat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkl
+Description: Berik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkm
+Description: Kom (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkn
+Description: Bukitan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bko
+Description: Kwa'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkp
+Description: Boko (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkq
+Description: Bakairí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkr
+Description: Bakumpai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bks
+Description: Northern Sorsoganon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkt
+Description: Boloki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bku
+Description: Buhid
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkv
+Description: Bekwarra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkw
+Description: Bekwel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkx
+Description: Baikeno
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bky
+Description: Bokyi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bkz
+Description: Bungku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bla
+Description: Siksika
+Added: 2005-10-16
+%%
+Type: language
+Subtag: blb
+Description: Bilua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blc
+Description: Bella Coola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bld
+Description: Bolango
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ble
+Description: Balanta-Kentohe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blf
+Description: Buol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blg
+Description: Balau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blh
+Description: Kuwaa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bli
+Description: Bolia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blj
+Description: Bolongan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blk
+Description: Pa'o Karen
+Description: Pa'O
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bll
+Description: Biloxi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blm
+Description: Beli (Sudan)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bln
+Description: Southern Catanduanes Bikol
+Added: 2009-07-29
+Macrolanguage: bik
+%%
+Type: language
+Subtag: blo
+Description: Anii
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blp
+Description: Blablanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blq
+Description: Baluan-Pam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blr
+Description: Blang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bls
+Description: Balaesang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blt
+Description: Tai Dam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blv
+Description: Bolo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blw
+Description: Balangao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blx
+Description: Mag-Indi Ayta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bly
+Description: Notre
+Added: 2009-07-29
+%%
+Type: language
+Subtag: blz
+Description: Balantak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bma
+Description: Lame
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmb
+Description: Bembe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmc
+Description: Biem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmd
+Description: Baga Manduri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bme
+Description: Limassa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmf
+Description: Bom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmg
+Description: Bamwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmh
+Description: Kein
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmi
+Description: Bagirmi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmj
+Description: Bote-Majhi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmk
+Description: Ghayavi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bml
+Description: Bomboli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmm
+Description: Northern Betsimisaraka Malagasy
+Added: 2009-07-29
+Macrolanguage: mg
+%%
+Type: language
+Subtag: bmn
+Description: Bina (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmo
+Description: Bambalang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmp
+Description: Bulgebi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmq
+Description: Bomu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmr
+Description: Muinane
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bms
+Description: Bilma Kanuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmt
+Description: Biao Mon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmu
+Description: Somba-Siawari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmv
+Description: Bum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmw
+Description: Bomwali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmx
+Description: Baimak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmy
+Description: Bemba (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bmz
+Description: Baramu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bna
+Description: Bonerate
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnb
+Description: Bookan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnc
+Description: Bontok
+Added: 2009-07-29
+Scope: macrolanguage
+%%
+Type: language
+Subtag: bnd
+Description: Banda (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bne
+Description: Bintauna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnf
+Description: Masiwang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bng
+Description: Benga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bni
+Description: Bangi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnj
+Description: Eastern Tawbuid
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnk
+Description: Bierebo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnl
+Description: Boon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnm
+Description: Batanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnn
+Description: Bunun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bno
+Description: Bantoanon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnp
+Description: Bola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnq
+Description: Bantik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnr
+Description: Butmas-Tur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bns
+Description: Bundeli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnt
+Description: Bantu languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: bnu
+Description: Bentong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnv
+Description: Bonerif
+Description: Beneraf
+Description: Edwas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnw
+Description: Bisis
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnx
+Description: Bangubangu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bny
+Description: Bintulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bnz
+Description: Beezen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: boa
+Description: Bora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bob
+Description: Aweer
+Added: 2009-07-29
+%%
+Type: language
+Subtag: boe
+Description: Mundabli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bof
+Description: Bolon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bog
+Description: Bamako Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: boh
+Description: Boma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: boi
+Description: Barbareño
+Added: 2009-07-29
+%%
+Type: language
+Subtag: boj
+Description: Anjam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bok
+Description: Bonjo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bol
+Description: Bole
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bom
+Description: Berom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bon
+Description: Bine
+Added: 2009-07-29
+%%
+Type: language
+Subtag: boo
+Description: Tiemacèwè Bozo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bop
+Description: Bonkiman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: boq
+Description: Bogaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bor
+Description: Borôro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bot
+Description: Bongo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bou
+Description: Bondei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bov
+Description: Tuwuli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bow
+Description: Rema
+Added: 2009-07-29
+%%
+Type: language
+Subtag: box
+Description: Buamu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: boy
+Description: Bodo (Central African Republic)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: boz
+Description: Tiéyaxo Bozo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpa
+Description: Dakaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpb
+Description: Barbacoas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpd
+Description: Banda-Banda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpg
+Description: Bonggo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bph
+Description: Botlikh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpi
+Description: Bagupi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpj
+Description: Binji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpk
+Description: Orowe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpl
+Description: Broome Pearling Lugger Pidgin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpm
+Description: Biyom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpn
+Description: Dzao Min
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpo
+Description: Anasi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpp
+Description: Kaure
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpq
+Description: Banda Malay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpr
+Description: Koronadal Blaan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bps
+Description: Sarangani Blaan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpt
+Description: Barrow Point
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpu
+Description: Bongu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpv
+Description: Bian Marind
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpw
+Description: Bo (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpx
+Description: Palya Bareli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpy
+Description: Bishnupriya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bpz
+Description: Bilba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqa
+Description: Tchumbuli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqb
+Description: Bagusa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqc
+Description: Boko (Benin)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqd
+Description: Bung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqf
+Description: Baga Kaloum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqg
+Description: Bago-Kusuntu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqh
+Description: Baima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqi
+Description: Bakhtiari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqj
+Description: Bandial
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqk
+Description: Banda-Mbrès
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bql
+Description: Bilakura
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqm
+Description: Wumboko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqn
+Description: Bulgarian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqo
+Description: Balo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqp
+Description: Busa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqq
+Description: Biritai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqr
+Description: Burusu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqs
+Description: Bosngun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqt
+Description: Bamukumbit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqu
+Description: Boguru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqv
+Description: Koro Wachi
+Description: Begbere-Ejar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqw
+Description: Buru (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqx
+Description: Baangi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqy
+Description: Bengkala Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bqz
+Description: Bakaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bra
+Description: Braj
+Added: 2005-10-16
+%%
+Type: language
+Subtag: brb
+Description: Lave
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brc
+Description: Berbice Creole Dutch
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brd
+Description: Baraamu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brf
+Description: Bera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brg
+Description: Baure
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brh
+Description: Brahui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bri
+Description: Mokpwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brj
+Description: Bieria
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brk
+Description: Birked
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brl
+Description: Birwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brm
+Description: Barambu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brn
+Description: Boruca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bro
+Description: Brokkat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brp
+Description: Barapasi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brq
+Description: Breri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brr
+Description: Birao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brs
+Description: Baras
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brt
+Description: Bitare
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bru
+Description: Eastern Bru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brv
+Description: Western Bru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brw
+Description: Bellari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brx
+Description: Bodo (India)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bry
+Description: Burui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: brz
+Description: Bilbil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsa
+Description: Abinomn
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsb
+Description: Brunei Bisaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsc
+Description: Bassari
+Description: Oniyan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bse
+Description: Wushi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsf
+Description: Bauchi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsg
+Description: Bashkardi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsh
+Description: Kati
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsi
+Description: Bassossi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsj
+Description: Bangwinji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsk
+Description: Burushaski
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsl
+Description: Basa-Gumna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsm
+Description: Busami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsn
+Description: Barasana-Eduria
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bso
+Description: Buso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsp
+Description: Baga Sitemu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsq
+Description: Bassa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsr
+Description: Bassa-Kontagora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bss
+Description: Akoose
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bst
+Description: Basketo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsu
+Description: Bahonsuai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsv
+Description: Baga Sobané
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsw
+Description: Baiso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsx
+Description: Yangkam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bsy
+Description: Sabah Bisaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bta
+Description: Bata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btb
+Description: Beti (Cameroon)
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Comments: see beb, bum, bxp, eto, ewo, fan, mct
+%%
+Type: language
+Subtag: btc
+Description: Bati (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btd
+Description: Batak Dairi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bte
+Description: Gamo-Ningi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btf
+Description: Birgit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btg
+Description: Gagnoa Bété
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bth
+Description: Biatah Bidayuh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bti
+Description: Burate
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btj
+Description: Bacanese Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: btk
+Description: Batak languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: btl
+Description: Bhatola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btm
+Description: Batak Mandailing
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btn
+Description: Ratagnon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bto
+Description: Rinconada Bikol
+Added: 2009-07-29
+Macrolanguage: bik
+%%
+Type: language
+Subtag: btp
+Description: Budibud
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btq
+Description: Batek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btr
+Description: Baetora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bts
+Description: Batak Simalungun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btt
+Description: Bete-Bendi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btu
+Description: Batu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btv
+Description: Bateri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btw
+Description: Butuanon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btx
+Description: Batak Karo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bty
+Description: Bobot
+Added: 2009-07-29
+%%
+Type: language
+Subtag: btz
+Description: Batak Alas-Kluet
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bua
+Description: Buriat
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: bub
+Description: Bua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: buc
+Description: Bushi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bud
+Description: Ntcham
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bue
+Description: Beothuk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: buf
+Description: Bushoong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bug
+Description: Buginese
+Added: 2005-10-16
+%%
+Type: language
+Subtag: buh
+Description: Younuo Bunu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bui
+Description: Bongili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: buj
+Description: Basa-Gurmana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: buk
+Description: Bugawac
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bum
+Description: Bulu (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bun
+Description: Sherbro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: buo
+Description: Terei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bup
+Description: Busoa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: buq
+Description: Brem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bus
+Description: Bokobaru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: but
+Description: Bungain
+Added: 2009-07-29
+%%
+Type: language
+Subtag: buu
+Description: Budu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: buv
+Description: Bun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: buw
+Description: Bubi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bux
+Description: Boghom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: buy
+Description: Bullom So
+Added: 2009-07-29
+%%
+Type: language
+Subtag: buz
+Description: Bukwen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bva
+Description: Barein
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvb
+Description: Bube
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvc
+Description: Baelelea
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvd
+Description: Baeggu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bve
+Description: Berau Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: bvf
+Description: Boor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvg
+Description: Bonkeng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvh
+Description: Bure
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvi
+Description: Belanda Viri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvj
+Description: Baan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvk
+Description: Bukat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvl
+Description: Bolivian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvm
+Description: Bamunka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvn
+Description: Buna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvo
+Description: Bolgo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvq
+Description: Birri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvr
+Description: Burarra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvt
+Description: Bati (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvu
+Description: Bukit Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: bvv
+Description: Baniva
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvw
+Description: Boga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvx
+Description: Dibole
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bvy
+Description: Baybayanon
+Added: 2010-03-11
+%%
+Type: language
+Subtag: bvz
+Description: Bauzi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwa
+Description: Bwatoo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwb
+Description: Namosi-Naitasiri-Serua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwc
+Description: Bwile
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwd
+Description: Bwaidoka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwe
+Description: Bwe Karen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwf
+Description: Boselewa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwg
+Description: Barwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwh
+Description: Bishuo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwi
+Description: Baniwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwj
+Description: Láá Láá Bwamu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwk
+Description: Bauwaki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwl
+Description: Bwela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwm
+Description: Biwat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwn
+Description: Wunai Bunu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwo
+Description: Boro (Ethiopia)
+Description: Borna (Ethiopia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwp
+Description: Mandobo Bawah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwq
+Description: Southern Bobo Madaré
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwr
+Description: Bura-Pabir
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bws
+Description: Bomboma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwt
+Description: Bafaw-Balong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwu
+Description: Buli (Ghana)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bww
+Description: Bwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwx
+Description: Bu-Nao Bunu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwy
+Description: Cwi Bwamu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bwz
+Description: Bwisi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxa
+Description: Bauro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxb
+Description: Belanda Bor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxc
+Description: Molengue
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxd
+Description: Pela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxe
+Description: Birale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxf
+Description: Bilur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxg
+Description: Bangala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxh
+Description: Buhutu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxi
+Description: Pirlatapa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxj
+Description: Bayungu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxk
+Description: Bukusu
+Description: Lubukusu
+Added: 2009-07-29
+Macrolanguage: luy
+%%
+Type: language
+Subtag: bxl
+Description: Jalkunan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxm
+Description: Mongolia Buriat
+Added: 2009-07-29
+Macrolanguage: bua
+%%
+Type: language
+Subtag: bxn
+Description: Burduna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxo
+Description: Barikanchi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxp
+Description: Bebil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxq
+Description: Beele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxr
+Description: Russia Buriat
+Added: 2009-07-29
+Macrolanguage: bua
+%%
+Type: language
+Subtag: bxs
+Description: Busam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxu
+Description: China Buriat
+Added: 2009-07-29
+Macrolanguage: bua
+%%
+Type: language
+Subtag: bxv
+Description: Berakou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxw
+Description: Bankagooma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxx
+Description: Borna (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bxz
+Description: Binahari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bya
+Description: Batak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byb
+Description: Bikya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byc
+Description: Ubaghara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byd
+Description: Benyadu'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bye
+Description: Pouye
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byf
+Description: Bete
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byg
+Description: Baygo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byh
+Description: Bhujel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byi
+Description: Buyu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byj
+Description: Bina (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byk
+Description: Biao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byl
+Description: Bayono
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bym
+Description: Bidyara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byn
+Description: Bilin
+Description: Blin
+Added: 2005-10-16
+%%
+Type: language
+Subtag: byo
+Description: Biyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byp
+Description: Bumaji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byq
+Description: Basay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byr
+Description: Baruya
+Description: Yipma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bys
+Description: Burak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byt
+Description: Berti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byv
+Description: Medumba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byw
+Description: Belhariya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byx
+Description: Qaqet
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byy
+Description: Buya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: byz
+Description: Banaro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bza
+Description: Bandi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzb
+Description: Andio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzc
+Description: Southern Betsimisaraka Malagasy
+Added: 2011-08-16
+Macrolanguage: mg
+%%
+Type: language
+Subtag: bzd
+Description: Bribri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bze
+Description: Jenaama Bozo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzf
+Description: Boikin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzg
+Description: Babuza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzh
+Description: Mapos Buang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzi
+Description: Bisu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzj
+Description: Belize Kriol English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzk
+Description: Nicaragua Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzl
+Description: Boano (Sulawesi)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzm
+Description: Bolondo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzn
+Description: Boano (Maluku)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzo
+Description: Bozaba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzp
+Description: Kemberano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzq
+Description: Buli (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzr
+Description: Biri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzs
+Description: Brazilian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzt
+Description: Brithenig
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzu
+Description: Burmeso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzv
+Description: Bebe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzw
+Description: Basa (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzx
+Description: Kɛlɛngaxo Bozo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzy
+Description: Obanliku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: bzz
+Description: Evant
+Added: 2009-07-29
+%%
+Type: language
+Subtag: caa
+Description: Chortí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cab
+Description: Garifuna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cac
+Description: Chuj
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cad
+Description: Caddo
+Added: 2005-10-16
+%%
+Type: language
+Subtag: cae
+Description: Lehar
+Description: Laalaa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: caf
+Description: Southern Carrier
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cag
+Description: Nivaclé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cah
+Description: Cahuarano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cai
+Description: Central American Indian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: caj
+Description: Chané
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cak
+Description: Kaqchikel
+Description: Cakchiquel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cal
+Description: Carolinian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cam
+Description: Cemuhî
+Added: 2009-07-29
+%%
+Type: language
+Subtag: can
+Description: Chambri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cao
+Description: Chácobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cap
+Description: Chipaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: caq
+Description: Car Nicobarese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: car
+Description: Galibi Carib
+Added: 2005-10-16
+%%
+Type: language
+Subtag: cas
+Description: Tsimané
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cau
+Description: Caucasian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: cav
+Description: Cavineña
+Added: 2009-07-29
+%%
+Type: language
+Subtag: caw
+Description: Callawalla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cax
+Description: Chiquitano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cay
+Description: Cayuga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: caz
+Description: Canichana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cba
+Description: Chibchan languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: cbb
+Description: Cabiyarí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbc
+Description: Carapana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbd
+Description: Carijona
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbe
+Description: Chipiajes
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbg
+Description: Chimila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbh
+Description: Cagua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbi
+Description: Chachi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbj
+Description: Ede Cabe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbk
+Description: Chavacano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbl
+Description: Bualkhaw Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbn
+Description: Nyahkur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbo
+Description: Izora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbr
+Description: Cashibo-Cacataibo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbs
+Description: Cashinahua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbt
+Description: Chayahuita
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbu
+Description: Candoshi-Shapra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbv
+Description: Cacua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cbw
+Description: Kinabalian
+Added: 2010-03-11
+%%
+Type: language
+Subtag: cby
+Description: Carabayo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cca
+Description: Cauca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ccc
+Description: Chamicuro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ccd
+Description: Cafundo Creole
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cce
+Description: Chopi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ccg
+Description: Samba Daka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cch
+Description: Atsam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ccj
+Description: Kasanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ccl
+Description: Cutchi-Swahili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ccm
+Description: Malaccan Creole Malay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ccn
+Description: North Caucasian languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: cco
+Description: Comaltepec Chinantec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ccp
+Description: Chakma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ccq
+Description: Chaungtha
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Preferred-Value: rki
+%%
+Type: language
+Subtag: ccr
+Description: Cacaopera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ccs
+Description: South Caucasian languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: cda
+Description: Choni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cdc
+Description: Chadic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: cdd
+Description: Caddoan languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: cde
+Description: Chenchu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cdf
+Description: Chiru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cdg
+Description: Chamari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cdh
+Description: Chambeali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cdi
+Description: Chodri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cdj
+Description: Churahi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cdm
+Description: Chepang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cdn
+Description: Chaudangsi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cdo
+Description: Min Dong Chinese
+Added: 2009-07-29
+Macrolanguage: zh
+%%
+Type: language
+Subtag: cdr
+Description: Cinda-Regi-Tiyal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cds
+Description: Chadian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cdy
+Description: Chadong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cdz
+Description: Koda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cea
+Description: Lower Chehalis
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ceb
+Description: Cebuano
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ceg
+Description: Chamacoco
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cek
+Description: Eastern Khumi Chin
+Added: 2012-08-12
+%%
+Type: language
+Subtag: cel
+Description: Celtic languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: cen
+Description: Cen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cet
+Description: Centúúm
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cfa
+Description: Dijim-Bwilim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cfd
+Description: Cara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cfg
+Description: Como Karim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cfm
+Description: Falam Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cga
+Description: Changriwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cgc
+Description: Kagayanen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cgg
+Description: Chiga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cgk
+Description: Chocangacakha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: chb
+Description: Chibcha
+Added: 2005-10-16
+%%
+Type: language
+Subtag: chc
+Description: Catawba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: chd
+Description: Highland Oaxaca Chontal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: chf
+Description: Tabasco Chontal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: chg
+Description: Chagatai
+Added: 2005-10-16
+%%
+Type: language
+Subtag: chh
+Description: Chinook
+Added: 2009-07-29
+%%
+Type: language
+Subtag: chj
+Description: Ojitlán Chinantec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: chk
+Description: Chuukese
+Added: 2005-10-16
+%%
+Type: language
+Subtag: chl
+Description: Cahuilla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: chm
+Description: Mari (Russia)
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: chn
+Description: Chinook jargon
+Added: 2005-10-16
+%%
+Type: language
+Subtag: cho
+Description: Choctaw
+Added: 2005-10-16
+%%
+Type: language
+Subtag: chp
+Description: Chipewyan
+Description: Dene Suline
+Added: 2005-10-16
+%%
+Type: language
+Subtag: chq
+Description: Quiotepec Chinantec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: chr
+Description: Cherokee
+Added: 2005-10-16
+%%
+Type: language
+Subtag: cht
+Description: Cholón
+Added: 2009-07-29
+%%
+Type: language
+Subtag: chw
+Description: Chuwabu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: chx
+Description: Chantyal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: chy
+Description: Cheyenne
+Added: 2005-10-16
+%%
+Type: language
+Subtag: chz
+Description: Ozumacín Chinantec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cia
+Description: Cia-Cia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cib
+Description: Ci Gbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cic
+Description: Chickasaw
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cid
+Description: Chimariko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cie
+Description: Cineni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cih
+Description: Chinali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cik
+Description: Chitkuli Kinnauri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cim
+Description: Cimbrian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cin
+Description: Cinta Larga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cip
+Description: Chiapanec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cir
+Description: Tiri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ciw
+Description: Chippewa
+Added: 2009-07-29
+Macrolanguage: oj
+%%
+Type: language
+Subtag: ciy
+Description: Chaima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cja
+Description: Western Cham
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cje
+Description: Chru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cjh
+Description: Upper Chehalis
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cji
+Description: Chamalal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cjk
+Description: Chokwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cjm
+Description: Eastern Cham
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cjn
+Description: Chenapian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cjo
+Description: Ashéninka Pajonal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cjp
+Description: Cabécar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cjr
+Description: Chorotega
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Preferred-Value: mom
+%%
+Type: language
+Subtag: cjs
+Description: Shor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cjv
+Description: Chuave
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cjy
+Description: Jinyu Chinese
+Added: 2009-07-29
+Macrolanguage: zh
+%%
+Type: language
+Subtag: cka
+Description: Khumi Awa Chin
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Preferred-Value: cmr
+%%
+Type: language
+Subtag: ckb
+Description: Central Kurdish
+Added: 2009-07-29
+Macrolanguage: ku
+%%
+Type: language
+Subtag: ckh
+Description: Chak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ckl
+Description: Cibak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cko
+Description: Anufo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ckq
+Description: Kajakse
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ckr
+Description: Kairak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cks
+Description: Tayo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ckt
+Description: Chukot
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cku
+Description: Koasati
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ckv
+Description: Kavalan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ckx
+Description: Caka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cky
+Description: Cakfem-Mushere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ckz
+Description: Cakchiquel-Quiché Mixed Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cla
+Description: Ron
+Added: 2009-07-29
+%%
+Type: language
+Subtag: clc
+Description: Chilcotin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cld
+Description: Chaldean Neo-Aramaic
+Added: 2009-07-29
+Macrolanguage: syr
+%%
+Type: language
+Subtag: cle
+Description: Lealao Chinantec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: clh
+Description: Chilisso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cli
+Description: Chakali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: clj
+Description: Laitu Chin
+Added: 2012-08-12
+%%
+Type: language
+Subtag: clk
+Description: Idu-Mishmi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cll
+Description: Chala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: clm
+Description: Clallam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: clo
+Description: Lowland Oaxaca Chontal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: clt
+Description: Lautu Chin
+Added: 2012-08-12
+%%
+Type: language
+Subtag: clu
+Description: Caluyanun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: clw
+Description: Chulym
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cly
+Description: Eastern Highland Chatino
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cma
+Description: Maa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cmc
+Description: Chamic languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: cme
+Description: Cerma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cmg
+Description: Classical Mongolian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cmi
+Description: Emberá-Chamí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cmk
+Description: Chimakum
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Preferred-Value: xch
+%%
+Type: language
+Subtag: cml
+Description: Campalagian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cmm
+Description: Michigamea
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cmn
+Description: Mandarin Chinese
+Added: 2009-07-29
+Macrolanguage: zh
+%%
+Type: language
+Subtag: cmo
+Description: Central Mnong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cmr
+Description: Mro-Khimi Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cms
+Description: Messapic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cmt
+Description: Camtho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cna
+Description: Changthang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cnb
+Description: Chinbon Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cnc
+Description: Côông
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cng
+Description: Northern Qiang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cnh
+Description: Haka Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cni
+Description: Asháninka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cnk
+Description: Khumi Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cnl
+Description: Lalana Chinantec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cno
+Description: Con
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cns
+Description: Central Asmat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cnt
+Description: Tepetotutla Chinantec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cnu
+Description: Chenoua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cnw
+Description: Ngawn Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cnx
+Description: Middle Cornish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: coa
+Description: Cocos Islands Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: cob
+Description: Chicomuceltec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: coc
+Description: Cocopa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cod
+Description: Cocama-Cocamilla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: coe
+Description: Koreguaje
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cof
+Description: Colorado
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cog
+Description: Chong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: coh
+Description: Chonyi-Dzihana-Kauma
+Description: Chichonyi-Chidzihana-Chikauma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: coj
+Description: Cochimi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cok
+Description: Santa Teresa Cora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: col
+Description: Columbia-Wenatchi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: com
+Description: Comanche
+Added: 2009-07-29
+%%
+Type: language
+Subtag: con
+Description: Cofán
+Added: 2009-07-29
+%%
+Type: language
+Subtag: coo
+Description: Comox
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cop
+Description: Coptic
+Added: 2005-10-16
+%%
+Type: language
+Subtag: coq
+Description: Coquille
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cot
+Description: Caquinte
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cou
+Description: Wamey
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cov
+Description: Cao Miao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cow
+Description: Cowlitz
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cox
+Description: Nanti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: coy
+Description: Coyaima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: coz
+Description: Chochotec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cpa
+Description: Palantla Chinantec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cpb
+Description: Ucayali-Yurúa Ashéninka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cpc
+Description: Ajyíninka Apurucayali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cpe
+Description: English-based creoles and pidgins
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: cpf
+Description: French-based creoles and pidgins
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: cpg
+Description: Cappadocian Greek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cpi
+Description: Chinese Pidgin English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cpn
+Description: Cherepon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cpp
+Description: Portuguese-based creoles and pidgins
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: cps
+Description: Capiznon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cpu
+Description: Pichis Ashéninka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cpx
+Description: Pu-Xian Chinese
+Added: 2009-07-29
+Macrolanguage: zh
+%%
+Type: language
+Subtag: cpy
+Description: South Ucayali Ashéninka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cqd
+Description: Chuanqiandian Cluster Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: cqu
+Description: Chilean Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: cra
+Description: Chara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crb
+Description: Island Carib
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crc
+Description: Lonwolwol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crd
+Description: Coeur d'Alene
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crf
+Description: Caramanta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crg
+Description: Michif
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crh
+Description: Crimean Tatar
+Description: Crimean Turkish
+Added: 2005-10-16
+%%
+Type: language
+Subtag: cri
+Description: Sãotomense
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crj
+Description: Southern East Cree
+Added: 2009-07-29
+Macrolanguage: cr
+%%
+Type: language
+Subtag: crk
+Description: Plains Cree
+Added: 2009-07-29
+Macrolanguage: cr
+%%
+Type: language
+Subtag: crl
+Description: Northern East Cree
+Added: 2009-07-29
+Macrolanguage: cr
+%%
+Type: language
+Subtag: crm
+Description: Moose Cree
+Added: 2009-07-29
+Macrolanguage: cr
+%%
+Type: language
+Subtag: crn
+Description: El Nayar Cora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cro
+Description: Crow
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crp
+Description: Creoles and pidgins
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: crq
+Description: Iyo'wujwa Chorote
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crr
+Description: Carolina Algonquian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crs
+Description: Seselwa Creole French
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crt
+Description: Iyojwa'ja Chorote
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crv
+Description: Chaura
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crw
+Description: Chrau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crx
+Description: Carrier
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cry
+Description: Cori
+Added: 2009-07-29
+%%
+Type: language
+Subtag: crz
+Description: Cruzeño
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csa
+Description: Chiltepec Chinantec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csb
+Description: Kashubian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: csc
+Description: Catalan Sign Language
+Description: Lengua de señas catalana
+Description: Llengua de Signes Catalana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csd
+Description: Chiangmai Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cse
+Description: Czech Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csf
+Description: Cuba Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csg
+Description: Chilean Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csh
+Description: Asho Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csi
+Description: Coast Miwok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csk
+Description: Jola-Kasa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csl
+Description: Chinese Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csm
+Description: Central Sierra Miwok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csn
+Description: Colombian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cso
+Description: Sochiapam Chinantec
+Description: Sochiapan Chinantec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csq
+Description: Croatia Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csr
+Description: Costa Rican Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: css
+Description: Southern Ohlone
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cst
+Description: Northern Ohlone
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csu
+Description: Central Sudanic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: csv
+Description: Sumtu Chin
+Added: 2012-08-12
+%%
+Type: language
+Subtag: csw
+Description: Swampy Cree
+Added: 2009-07-29
+Macrolanguage: cr
+%%
+Type: language
+Subtag: csy
+Description: Siyin Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: csz
+Description: Coos
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cta
+Description: Tataltepec Chatino
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ctc
+Description: Chetco
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ctd
+Description: Tedim Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cte
+Description: Tepinapa Chinantec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ctg
+Description: Chittagonian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cth
+Description: Thaiphum Chin
+Added: 2012-08-12
+%%
+Type: language
+Subtag: ctl
+Description: Tlacoatzintepec Chinantec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ctm
+Description: Chitimacha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ctn
+Description: Chhintange
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cto
+Description: Emberá-Catío
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ctp
+Description: Western Highland Chatino
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cts
+Description: Northern Catanduanes Bikol
+Added: 2009-07-29
+Macrolanguage: bik
+%%
+Type: language
+Subtag: ctt
+Description: Wayanad Chetti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ctu
+Description: Chol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ctz
+Description: Zacatepec Chatino
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cua
+Description: Cua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cub
+Description: Cubeo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cuc
+Description: Usila Chinantec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cug
+Description: Cung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cuh
+Description: Chuka
+Description: Gichuka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cui
+Description: Cuiba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cuj
+Description: Mashco Piro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cuk
+Description: San Blas Kuna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cul
+Description: Culina
+Description: Kulina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cum
+Description: Cumeral
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cuo
+Description: Cumanagoto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cup
+Description: Cupeño
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cuq
+Description: Cun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cur
+Description: Chhulung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cus
+Description: Cushitic languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: cut
+Description: Teutila Cuicatec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cuu
+Description: Tai Ya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cuv
+Description: Cuvok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cuw
+Description: Chukwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cux
+Description: Tepeuxila Cuicatec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cvg
+Description: Chug
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cvn
+Description: Valle Nacional Chinantec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cwa
+Description: Kabwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cwb
+Description: Maindo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cwd
+Description: Woods Cree
+Added: 2009-07-29
+Macrolanguage: cr
+%%
+Type: language
+Subtag: cwe
+Description: Kwere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cwg
+Description: Chewong
+Description: Cheq Wong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cwt
+Description: Kuwaataay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cya
+Description: Nopala Chatino
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cyb
+Description: Cayubaba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: cyo
+Description: Cuyonon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: czh
+Description: Huizhou Chinese
+Added: 2009-07-29
+Macrolanguage: zh
+%%
+Type: language
+Subtag: czk
+Description: Knaanic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: czn
+Description: Zenzontepec Chatino
+Added: 2009-07-29
+%%
+Type: language
+Subtag: czo
+Description: Min Zhong Chinese
+Added: 2009-07-29
+Macrolanguage: zh
+%%
+Type: language
+Subtag: czt
+Description: Zotung Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: daa
+Description: Dangaléat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dac
+Description: Dambi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dad
+Description: Marik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dae
+Description: Duupa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: daf
+Description: Dan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dag
+Description: Dagbani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dah
+Description: Gwahatike
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dai
+Description: Day
+Added: 2009-07-29
+%%
+Type: language
+Subtag: daj
+Description: Dar Fur Daju
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dak
+Description: Dakota
+Added: 2005-10-16
+%%
+Type: language
+Subtag: dal
+Description: Dahalo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dam
+Description: Damakawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dao
+Description: Daai Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dap
+Description: Nisi (India)
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see njz, tgj
+%%
+Type: language
+Subtag: daq
+Description: Dandami Maria
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dar
+Description: Dargwa
+Added: 2005-10-16
+%%
+Type: language
+Subtag: das
+Description: Daho-Doo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dau
+Description: Dar Sila Daju
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dav
+Description: Taita
+Description: Dawida
+Added: 2009-07-29
+%%
+Type: language
+Subtag: daw
+Description: Davawenyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dax
+Description: Dayi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: day
+Description: Land Dayak languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: daz
+Description: Dao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dba
+Description: Bangi Me
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbb
+Description: Deno
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbd
+Description: Dadiya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbe
+Description: Dabe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbf
+Description: Edopi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbg
+Description: Dogul Dom Dogon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbi
+Description: Doka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbj
+Description: Ida'an
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbl
+Description: Dyirbal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbm
+Description: Duguri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbn
+Description: Duriankere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbo
+Description: Dulbu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbp
+Description: Duwai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbq
+Description: Daba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbr
+Description: Dabarre
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbt
+Description: Ben Tey Dogon
+Added: 2012-08-12
+%%
+Type: language
+Subtag: dbu
+Description: Bondum Dom Dogon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbv
+Description: Dungu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dbw
+Description: Bankan Tey Dogon
+Added: 2012-08-12
+%%
+Type: language
+Subtag: dby
+Description: Dibiyaso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dcc
+Description: Deccan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dcr
+Description: Negerhollands
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dda
+Description: Dadi Dadi
+Added: 2012-08-12
+%%
+Type: language
+Subtag: ddd
+Description: Dongotono
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dde
+Description: Doondo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ddg
+Description: Fataluku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ddi
+Description: West Goodenough
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ddj
+Description: Jaru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ddn
+Description: Dendi (Benin)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ddo
+Description: Dido
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ddr
+Description: Dhudhuroa
+Added: 2012-08-12
+%%
+Type: language
+Subtag: dds
+Description: Donno So Dogon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ddw
+Description: Dawera-Daweloor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dec
+Description: Dagik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ded
+Description: Dedua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dee
+Description: Dewoin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: def
+Description: Dezfuli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: deg
+Description: Degema
+Added: 2009-07-29
+%%
+Type: language
+Subtag: deh
+Description: Dehwari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dei
+Description: Demisa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dek
+Description: Dek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: del
+Description: Delaware
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: dem
+Description: Dem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: den
+Description: Slave (Athapascan)
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: dep
+Description: Pidgin Delaware
+Added: 2009-07-29
+%%
+Type: language
+Subtag: deq
+Description: Dendi (Central African Republic)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: der
+Description: Deori
+Added: 2009-07-29
+%%
+Type: language
+Subtag: des
+Description: Desano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dev
+Description: Domung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dez
+Description: Dengese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dga
+Description: Southern Dagaare
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dgb
+Description: Bunoge Dogon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dgc
+Description: Casiguran Dumagat Agta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dgd
+Description: Dagaari Dioula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dge
+Description: Degenan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dgg
+Description: Doga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dgh
+Description: Dghwede
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dgi
+Description: Northern Dagara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dgk
+Description: Dagba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dgl
+Description: Andaandi
+Description: Dongolawi
+Added: 2012-08-12
+%%
+Type: language
+Subtag: dgn
+Description: Dagoman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dgo
+Description: Dogri (individual language)
+Added: 2009-07-29
+Macrolanguage: doi
+%%
+Type: language
+Subtag: dgr
+Description: Dogrib
+Added: 2005-10-16
+%%
+Type: language
+Subtag: dgs
+Description: Dogoso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dgt
+Description: Ndrag'ngith
+Added: 2012-08-12
+%%
+Type: language
+Subtag: dgu
+Description: Degaru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dgw
+Description: Daungwurrung
+Added: 2012-08-12
+%%
+Type: language
+Subtag: dgx
+Description: Doghoro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dgz
+Description: Daga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dha
+Description: Dhanwar (India)
+Added: 2009-07-29
+Deprecated: 2011-08-16
+%%
+Type: language
+Subtag: dhd
+Description: Dhundari
+Added: 2009-07-29
+Macrolanguage: mwr
+%%
+Type: language
+Subtag: dhg
+Description: Dhangu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dhi
+Description: Dhimal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dhl
+Description: Dhalandji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dhm
+Description: Zemba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dhn
+Description: Dhanki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dho
+Description: Dhodia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dhr
+Description: Dhargari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dhs
+Description: Dhaiso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dhu
+Description: Dhurga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dhv
+Description: Dehu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dhw
+Description: Dhanwar (Nepal)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dia
+Description: Dia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dib
+Description: South Central Dinka
+Added: 2009-07-29
+Macrolanguage: din
+%%
+Type: language
+Subtag: dic
+Description: Lakota Dida
+Added: 2009-07-29
+%%
+Type: language
+Subtag: did
+Description: Didinga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dif
+Description: Dieri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dig
+Description: Digo
+Description: Chidigo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dih
+Description: Kumiai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dii
+Description: Dimbong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dij
+Description: Dai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dik
+Description: Southwestern Dinka
+Added: 2009-07-29
+Macrolanguage: din
+%%
+Type: language
+Subtag: dil
+Description: Dilling
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dim
+Description: Dime
+Added: 2009-07-29
+%%
+Type: language
+Subtag: din
+Description: Dinka
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: dio
+Description: Dibo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dip
+Description: Northeastern Dinka
+Added: 2009-07-29
+Macrolanguage: din
+%%
+Type: language
+Subtag: diq
+Description: Dimli (individual language)
+Added: 2009-07-29
+Macrolanguage: zza
+%%
+Type: language
+Subtag: dir
+Description: Dirim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dis
+Description: Dimasa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dit
+Description: Dirari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: diu
+Description: Diriku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: diw
+Description: Northwestern Dinka
+Added: 2009-07-29
+Macrolanguage: din
+%%
+Type: language
+Subtag: dix
+Description: Dixon Reef
+Added: 2009-07-29
+%%
+Type: language
+Subtag: diy
+Description: Diuwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: diz
+Description: Ding
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dja
+Description: Djadjawurrung
+Added: 2012-08-12
+%%
+Type: language
+Subtag: djb
+Description: Djinba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: djc
+Description: Dar Daju Daju
+Added: 2009-07-29
+%%
+Type: language
+Subtag: djd
+Description: Djamindjung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dje
+Description: Zarma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: djf
+Description: Djangun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dji
+Description: Djinang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: djj
+Description: Djeebbana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: djk
+Description: Eastern Maroon Creole
+Description: Businenge Tongo
+Description: Nenge
+Added: 2009-07-29
+%%
+Type: language
+Subtag: djl
+Description: Djiwarli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: djm
+Description: Jamsay Dogon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: djn
+Description: Djauan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: djo
+Description: Jangkang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: djr
+Description: Djambarrpuyngu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dju
+Description: Kapriman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: djw
+Description: Djawi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dka
+Description: Dakpakha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dkk
+Description: Dakka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dkl
+Description: Kolum So Dogon
+Added: 2009-07-29
+Deprecated: 2011-08-16
+Comments: see aqd, dmb
+%%
+Type: language
+Subtag: dkr
+Description: Kuijau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dks
+Description: Southeastern Dinka
+Added: 2009-07-29
+Macrolanguage: din
+%%
+Type: language
+Subtag: dkx
+Description: Mazagway
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dlg
+Description: Dolgan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dlm
+Description: Dalmatian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dln
+Description: Darlong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dma
+Description: Duma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dmb
+Description: Mombo Dogon
+Added: 2011-08-16
+%%
+Type: language
+Subtag: dmc
+Description: Dimir
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dmd
+Description: Madhi Madhi
+Added: 2012-08-12
+%%
+Type: language
+Subtag: dme
+Description: Dugwor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dmg
+Description: Upper Kinabatangan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dmk
+Description: Domaaki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dml
+Description: Dameli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dmm
+Description: Dama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dmn
+Description: Mande languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: dmo
+Description: Kemedzung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dmr
+Description: East Damar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dms
+Description: Dampelas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dmu
+Description: Dubu
+Description: Tebi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dmv
+Description: Dumpas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dmx
+Description: Dema
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dmy
+Description: Demta
+Description: Sowari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dna
+Description: Upper Grand Valley Dani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dnd
+Description: Daonda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dne
+Description: Ndendeule
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dng
+Description: Dungan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dni
+Description: Lower Grand Valley Dani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dnk
+Description: Dengka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dnn
+Description: Dzùùngoo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dnr
+Description: Danaru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dnt
+Description: Mid Grand Valley Dani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dnu
+Description: Danau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dnv
+Description: Danu
+Added: 2012-08-12
+%%
+Type: language
+Subtag: dnw
+Description: Western Dani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dny
+Description: Dení
+Added: 2009-07-29
+%%
+Type: language
+Subtag: doa
+Description: Dom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dob
+Description: Dobu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: doc
+Description: Northern Dong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: doe
+Description: Doe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dof
+Description: Domu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: doh
+Description: Dong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: doi
+Description: Dogri (macrolanguage)
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: dok
+Description: Dondo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dol
+Description: Doso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: don
+Description: Toura (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: doo
+Description: Dongo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dop
+Description: Lukpa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: doq
+Description: Dominican Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dor
+Description: Dori'o
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dos
+Description: Dogosé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dot
+Description: Dass
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dov
+Description: Dombe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dow
+Description: Doyayo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dox
+Description: Bussa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: doy
+Description: Dompo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: doz
+Description: Dorze
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dpp
+Description: Papar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dra
+Description: Dravidian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: drb
+Description: Dair
+Added: 2009-07-29
+%%
+Type: language
+Subtag: drc
+Description: Minderico
+Added: 2011-08-16
+%%
+Type: language
+Subtag: drd
+Description: Darmiya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dre
+Description: Dolpo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: drg
+Description: Rungus
+Added: 2009-07-29
+%%
+Type: language
+Subtag: drh
+Description: Darkhat
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Preferred-Value: khk
+%%
+Type: language
+Subtag: dri
+Description: C'lela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: drl
+Description: Paakantyi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: drn
+Description: West Damar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dro
+Description: Daro-Matu Melanau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: drq
+Description: Dura
+Added: 2009-07-29
+%%
+Type: language
+Subtag: drr
+Description: Dororo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: drs
+Description: Gedeo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: drt
+Description: Drents
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dru
+Description: Rukai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: drw
+Description: Darwazi
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Preferred-Value: prs
+%%
+Type: language
+Subtag: dry
+Description: Darai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dsb
+Description: Lower Sorbian
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: dse
+Description: Dutch Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dsh
+Description: Daasanach
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dsi
+Description: Disa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dsl
+Description: Danish Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dsn
+Description: Dusner
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dso
+Description: Desiya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dsq
+Description: Tadaksahak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dta
+Description: Daur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dtb
+Description: Labuk-Kinabatangan Kadazan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dtd
+Description: Ditidaht
+Added: 2011-08-16
+%%
+Type: language
+Subtag: dth
+Description: Adithinngithigh
+Added: 2012-08-12
+%%
+Type: language
+Subtag: dti
+Description: Ana Tinga Dogon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dtk
+Description: Tene Kan Dogon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dtm
+Description: Tomo Kan Dogon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dto
+Description: Tommo So Dogon
+Added: 2012-08-12
+%%
+Type: language
+Subtag: dtp
+Description: Central Dusun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dtr
+Description: Lotud
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dts
+Description: Toro So Dogon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dtt
+Description: Toro Tegu Dogon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dtu
+Description: Tebul Ure Dogon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dty
+Description: Dotyali
+Added: 2012-08-12
+Macrolanguage: ne
+%%
+Type: language
+Subtag: dua
+Description: Duala
+Added: 2005-10-16
+%%
+Type: language
+Subtag: dub
+Description: Dubli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: duc
+Description: Duna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dud
+Description: Hun-Saare
+Added: 2009-07-29
+%%
+Type: language
+Subtag: due
+Description: Umiray Dumaget Agta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: duf
+Description: Dumbea
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dug
+Description: Duruma
+Description: Chiduruma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: duh
+Description: Dungra Bhil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dui
+Description: Dumun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: duj
+Description: Dhuwal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: duk
+Description: Uyajitaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dul
+Description: Alabat Island Agta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dum
+Description: Middle Dutch (ca. 1050-1350)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: dun
+Description: Dusun Deyah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: duo
+Description: Dupaninan Agta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dup
+Description: Duano
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: duq
+Description: Dusun Malang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dur
+Description: Dii
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dus
+Description: Dumi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: duu
+Description: Drung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: duv
+Description: Duvle
+Added: 2009-07-29
+%%
+Type: language
+Subtag: duw
+Description: Dusun Witu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dux
+Description: Duungooma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: duy
+Description: Dicamay Agta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: duz
+Description: Duli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dva
+Description: Duau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dwa
+Description: Diri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dwl
+Description: Walo Kumbe Dogon
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see dbt, dbw
+%%
+Type: language
+Subtag: dwr
+Description: Dawro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dws
+Description: Dutton World Speedwords
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dww
+Description: Dawawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dya
+Description: Dyan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dyb
+Description: Dyaberdyaber
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dyd
+Description: Dyugun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dyg
+Description: Villa Viciosa Agta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dyi
+Description: Djimini Senoufo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dym
+Description: Yanda Dom Dogon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dyn
+Description: Dyangadi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dyo
+Description: Jola-Fonyi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dyu
+Description: Dyula
+Added: 2005-10-16
+%%
+Type: language
+Subtag: dyy
+Description: Dyaabugay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dza
+Description: Tunzu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dzd
+Description: Daza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dzg
+Description: Dazaga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dzl
+Description: Dzalakha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: dzn
+Description: Dzando
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ebg
+Description: Ebughu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ebk
+Description: Eastern Bontok
+Added: 2010-03-11
+Macrolanguage: bnc
+%%
+Type: language
+Subtag: ebo
+Description: Teke-Ebo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ebr
+Description: Ebrié
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ebu
+Description: Embu
+Description: Kiembu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ecr
+Description: Eteocretan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ecs
+Description: Ecuadorian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ecy
+Description: Eteocypriot
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eee
+Description: E
+Added: 2009-07-29
+%%
+Type: language
+Subtag: efa
+Description: Efai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: efe
+Description: Efe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: efi
+Description: Efik
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ega
+Description: Ega
+Added: 2009-07-29
+%%
+Type: language
+Subtag: egl
+Description: Emilian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ego
+Description: Eggon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: egx
+Description: Egyptian languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: egy
+Description: Egyptian (Ancient)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ehu
+Description: Ehueun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eip
+Description: Eipomek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eit
+Description: Eitiep
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eiv
+Description: Askopan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eja
+Description: Ejamat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eka
+Description: Ekajuk
+Added: 2005-10-16
+%%
+Type: language
+Subtag: eke
+Description: Ekit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ekg
+Description: Ekari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eki
+Description: Eki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ekk
+Description: Standard Estonian
+Added: 2009-07-29
+Macrolanguage: et
+%%
+Type: language
+Subtag: ekl
+Description: Kol (Bangladesh)
+Description: Kol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ekm
+Description: Elip
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eko
+Description: Koti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ekp
+Description: Ekpeye
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ekr
+Description: Yace
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eky
+Description: Eastern Kayah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ele
+Description: Elepi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: elh
+Description: El Hugeirat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eli
+Description: Nding
+Added: 2009-07-29
+%%
+Type: language
+Subtag: elk
+Description: Elkei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: elm
+Description: Eleme
+Added: 2009-07-29
+%%
+Type: language
+Subtag: elo
+Description: El Molo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: elp
+Description: Elpaputih
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see amq, plh
+%%
+Type: language
+Subtag: elu
+Description: Elu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: elx
+Description: Elamite
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ema
+Description: Emai-Iuleha-Ora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: emb
+Description: Embaloh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eme
+Description: Emerillon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: emg
+Description: Eastern Meohang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: emi
+Description: Mussau-Emira
+Added: 2009-07-29
+%%
+Type: language
+Subtag: emk
+Description: Eastern Maninkakan
+Added: 2009-07-29
+Macrolanguage: man
+%%
+Type: language
+Subtag: emm
+Description: Mamulique
+Added: 2009-07-29
+%%
+Type: language
+Subtag: emn
+Description: Eman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: emo
+Description: Emok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: emp
+Description: Northern Emberá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ems
+Description: Pacific Gulf Yupik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: emu
+Description: Eastern Muria
+Added: 2009-07-29
+%%
+Type: language
+Subtag: emw
+Description: Emplawas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: emx
+Description: Erromintxela
+Added: 2010-03-11
+%%
+Type: language
+Subtag: emy
+Description: Epigraphic Mayan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ena
+Description: Apali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: enb
+Description: Markweeta
+Added: 2009-07-29
+Macrolanguage: kln
+%%
+Type: language
+Subtag: enc
+Description: En
+Added: 2009-07-29
+%%
+Type: language
+Subtag: end
+Description: Ende
+Added: 2009-07-29
+%%
+Type: language
+Subtag: enf
+Description: Forest Enets
+Added: 2009-07-29
+%%
+Type: language
+Subtag: enh
+Description: Tundra Enets
+Added: 2009-07-29
+%%
+Type: language
+Subtag: enm
+Description: Middle English (1100-1500)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: enn
+Description: Engenni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eno
+Description: Enggano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: enq
+Description: Enga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: enr
+Description: Emumu
+Description: Emem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: enu
+Description: Enu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: env
+Description: Enwan (Edu State)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: enw
+Description: Enwan (Akwa Ibom State)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eot
+Description: Beti (Côte d'Ivoire)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: epi
+Description: Epie
+Added: 2009-07-29
+%%
+Type: language
+Subtag: era
+Description: Eravallan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: erg
+Description: Sie
+Added: 2009-07-29
+%%
+Type: language
+Subtag: erh
+Description: Eruwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eri
+Description: Ogea
+Added: 2009-07-29
+%%
+Type: language
+Subtag: erk
+Description: South Efate
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ero
+Description: Horpa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: err
+Description: Erre
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ers
+Description: Ersu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ert
+Description: Eritai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: erw
+Description: Erokwanas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ese
+Description: Ese Ejja
+Added: 2009-07-29
+%%
+Type: language
+Subtag: esh
+Description: Eshtehardi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: esi
+Description: North Alaskan Inupiatun
+Added: 2009-07-29
+Macrolanguage: ik
+%%
+Type: language
+Subtag: esk
+Description: Northwest Alaska Inupiatun
+Added: 2009-07-29
+Macrolanguage: ik
+%%
+Type: language
+Subtag: esl
+Description: Egypt Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: esm
+Description: Esuma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: esn
+Description: Salvadoran Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eso
+Description: Estonian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: esq
+Description: Esselen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ess
+Description: Central Siberian Yupik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: esu
+Description: Central Yupik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: esx
+Description: Eskimo-Aleut languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: etb
+Description: Etebi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: etc
+Description: Etchemin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eth
+Description: Ethiopian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: etn
+Description: Eton (Vanuatu)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eto
+Description: Eton (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: etr
+Description: Edolo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ets
+Description: Yekhee
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ett
+Description: Etruscan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: etu
+Description: Ejagham
+Added: 2009-07-29
+%%
+Type: language
+Subtag: etx
+Description: Eten
+Added: 2009-07-29
+%%
+Type: language
+Subtag: etz
+Description: Semimi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: euq
+Description: Basque (family)
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: eve
+Description: Even
+Added: 2009-07-29
+%%
+Type: language
+Subtag: evh
+Description: Uvbie
+Added: 2009-07-29
+%%
+Type: language
+Subtag: evn
+Description: Evenki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ewo
+Description: Ewondo
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ext
+Description: Extremaduran
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eya
+Description: Eyak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: eyo
+Description: Keiyo
+Added: 2009-07-29
+Macrolanguage: kln
+%%
+Type: language
+Subtag: eze
+Description: Uzekwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: faa
+Description: Fasu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fab
+Description: Fa D'ambu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fad
+Description: Wagi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: faf
+Description: Fagani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fag
+Description: Finongan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fah
+Description: Baissa Fali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fai
+Description: Faiwol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: faj
+Description: Faita
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fak
+Description: Fang (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fal
+Description: South Fali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fam
+Description: Fam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fan
+Description: Fang (Equatorial Guinea)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: fap
+Description: Palor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: far
+Description: Fataleka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fat
+Description: Fanti
+Added: 2005-10-16
+Macrolanguage: ak
+%%
+Type: language
+Subtag: fau
+Description: Fayu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fax
+Description: Fala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fay
+Description: Southwestern Fars
+Added: 2009-07-29
+%%
+Type: language
+Subtag: faz
+Description: Northwestern Fars
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fbl
+Description: West Albay Bikol
+Added: 2010-03-11
+Macrolanguage: bik
+%%
+Type: language
+Subtag: fcs
+Description: Quebec Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fer
+Description: Feroge
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ffi
+Description: Foia Foia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ffm
+Description: Maasina Fulfulde
+Added: 2009-07-29
+Macrolanguage: ff
+%%
+Type: language
+Subtag: fgr
+Description: Fongoro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fia
+Description: Nobiin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fie
+Description: Fyer
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fil
+Description: Filipino
+Description: Pilipino
+Added: 2005-10-16
+%%
+Type: language
+Subtag: fip
+Description: Fipa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fir
+Description: Firan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fit
+Description: Tornedalen Finnish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fiu
+Description: Finno-Ugrian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: fiw
+Description: Fiwaga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fkk
+Description: Kirya-Konzəl
+Added: 2012-08-12
+%%
+Type: language
+Subtag: fkv
+Description: Kven Finnish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fla
+Description: Kalispel-Pend d'Oreille
+Added: 2009-07-29
+%%
+Type: language
+Subtag: flh
+Description: Foau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fli
+Description: Fali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fll
+Description: North Fali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fln
+Description: Flinders Island
+Added: 2009-07-29
+%%
+Type: language
+Subtag: flr
+Description: Fuliiru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fly
+Description: Tsotsitaal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fmp
+Description: Fe'fe'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fmu
+Description: Far Western Muria
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fng
+Description: Fanagalo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fni
+Description: Fania
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fod
+Description: Foodo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: foi
+Description: Foi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fom
+Description: Foma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fon
+Description: Fon
+Added: 2005-10-16
+%%
+Type: language
+Subtag: for
+Description: Fore
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fos
+Description: Siraya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fox
+Description: Formosan languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: fpe
+Description: Fernando Po Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fqs
+Description: Fas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: frc
+Description: Cajun French
+Added: 2009-07-29
+%%
+Type: language
+Subtag: frd
+Description: Fordata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: frk
+Description: Frankish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: frm
+Description: Middle French (ca. 1400-1600)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: fro
+Description: Old French (842-ca. 1400)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: frp
+Description: Arpitan
+Description: Francoprovençal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: frq
+Description: Forak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: frr
+Description: Northern Frisian
+Added: 2006-03-08
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: frs
+Description: Eastern Frisian
+Added: 2006-03-08
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: frt
+Description: Fortsenal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fse
+Description: Finnish Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fsl
+Description: French Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fss
+Description: Finland-Swedish Sign Language
+Description: finlandssvenskt teckenspråk
+Description: suomenruotsalainen viittomakieli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fub
+Description: Adamawa Fulfulde
+Added: 2009-07-29
+Macrolanguage: ff
+%%
+Type: language
+Subtag: fuc
+Description: Pulaar
+Added: 2009-07-29
+Macrolanguage: ff
+%%
+Type: language
+Subtag: fud
+Description: East Futuna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fue
+Description: Borgu Fulfulde
+Added: 2009-07-29
+Macrolanguage: ff
+%%
+Type: language
+Subtag: fuf
+Description: Pular
+Added: 2009-07-29
+Macrolanguage: ff
+%%
+Type: language
+Subtag: fuh
+Description: Western Niger Fulfulde
+Added: 2009-07-29
+Macrolanguage: ff
+%%
+Type: language
+Subtag: fui
+Description: Bagirmi Fulfulde
+Added: 2009-07-29
+Macrolanguage: ff
+%%
+Type: language
+Subtag: fuj
+Description: Ko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fum
+Description: Fum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fun
+Description: Fulniô
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fuq
+Description: Central-Eastern Niger Fulfulde
+Added: 2009-07-29
+Macrolanguage: ff
+%%
+Type: language
+Subtag: fur
+Description: Friulian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: fut
+Description: Futuna-Aniwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fuu
+Description: Furu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fuv
+Description: Nigerian Fulfulde
+Added: 2009-07-29
+Macrolanguage: ff
+%%
+Type: language
+Subtag: fuy
+Description: Fuyug
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fvr
+Description: Fur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fwa
+Description: Fwâi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: fwe
+Description: Fwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gaa
+Description: Ga
+Added: 2005-10-16
+%%
+Type: language
+Subtag: gab
+Description: Gabri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gac
+Description: Mixed Great Andamanese
+Added: 2010-03-11
+%%
+Type: language
+Subtag: gad
+Description: Gaddang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gae
+Description: Guarequena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gaf
+Description: Gende
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gag
+Description: Gagauz
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gah
+Description: Alekano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gai
+Description: Borei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gaj
+Description: Gadsup
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gak
+Description: Gamkonora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gal
+Description: Galoli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gam
+Description: Kandawo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gan
+Description: Gan Chinese
+Added: 2009-07-29
+Macrolanguage: zh
+%%
+Type: language
+Subtag: gao
+Description: Gants
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gap
+Description: Gal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gaq
+Description: Gata'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gar
+Description: Galeya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gas
+Description: Adiwasi Garasia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gat
+Description: Kenati
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gau
+Description: Mudhili Gadaba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gav
+Description: Gabutamon
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Preferred-Value: dev
+%%
+Type: language
+Subtag: gaw
+Description: Nobonob
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gax
+Description: Borana-Arsi-Guji Oromo
+Added: 2009-07-29
+Macrolanguage: om
+%%
+Type: language
+Subtag: gay
+Description: Gayo
+Added: 2005-10-16
+%%
+Type: language
+Subtag: gaz
+Description: West Central Oromo
+Added: 2009-07-29
+Macrolanguage: om
+%%
+Type: language
+Subtag: gba
+Description: Gbaya (Central African Republic)
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: gbb
+Description: Kaytetye
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbc
+Description: Garawa
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see wny, wrk
+%%
+Type: language
+Subtag: gbd
+Description: Karadjeri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbe
+Description: Niksek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbf
+Description: Gaikundi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbg
+Description: Gbanziri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbh
+Description: Defi Gbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbi
+Description: Galela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbj
+Description: Bodo Gadaba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbk
+Description: Gaddi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbl
+Description: Gamit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbm
+Description: Garhwali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbn
+Description: Mo'da
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbo
+Description: Northern Grebo
+Added: 2009-07-29
+Macrolanguage: grb
+%%
+Type: language
+Subtag: gbp
+Description: Gbaya-Bossangoa
+Added: 2009-07-29
+Macrolanguage: gba
+%%
+Type: language
+Subtag: gbq
+Description: Gbaya-Bozoum
+Added: 2009-07-29
+Macrolanguage: gba
+%%
+Type: language
+Subtag: gbr
+Description: Gbagyi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbs
+Description: Gbesi Gbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbu
+Description: Gagadu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbv
+Description: Gbanu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbx
+Description: Eastern Xwla Gbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gby
+Description: Gbari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gbz
+Description: Zoroastrian Dari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gcc
+Description: Mali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gcd
+Description: Ganggalida
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gce
+Description: Galice
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gcf
+Description: Guadeloupean Creole French
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gcl
+Description: Grenadian Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gcn
+Description: Gaina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gcr
+Description: Guianese Creole French
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gct
+Description: Colonia Tovar German
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gda
+Description: Gade Lohar
+Added: 2009-07-29
+Macrolanguage: raj
+%%
+Type: language
+Subtag: gdb
+Description: Pottangi Ollar Gadaba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdc
+Description: Gugu Badhun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdd
+Description: Gedaged
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gde
+Description: Gude
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdf
+Description: Guduf-Gava
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdg
+Description: Ga'dang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdh
+Description: Gadjerawang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdi
+Description: Gundi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdj
+Description: Gurdjar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdk
+Description: Gadang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdl
+Description: Dirasha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdm
+Description: Laal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdn
+Description: Umanakaina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdo
+Description: Ghodoberi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdq
+Description: Mehri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdr
+Description: Wipi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gds
+Description: Ghandruk Sign Language
+Added: 2012-08-12
+%%
+Type: language
+Subtag: gdu
+Description: Gudu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gdx
+Description: Godwari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gea
+Description: Geruma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: geb
+Description: Kire
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gec
+Description: Gboloo Grebo
+Added: 2009-07-29
+Macrolanguage: grb
+%%
+Type: language
+Subtag: ged
+Description: Gade
+Added: 2009-07-29
+%%
+Type: language
+Subtag: geg
+Description: Gengle
+Added: 2009-07-29
+%%
+Type: language
+Subtag: geh
+Description: Hutterite German
+Description: Hutterisch
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gei
+Description: Gebe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gej
+Description: Gen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gek
+Description: Yiwom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gel
+Description: ut-Ma'in
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gem
+Description: Germanic languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: geq
+Description: Geme
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ges
+Description: Geser-Gorom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gew
+Description: Gera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gex
+Description: Garre
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gey
+Description: Enya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gez
+Description: Geez
+Added: 2005-10-16
+%%
+Type: language
+Subtag: gfk
+Description: Patpatar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gft
+Description: Gafat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gfx
+Description: Mangetti Dune !Xung
+Added: 2012-08-12
+%%
+Type: language
+Subtag: gga
+Description: Gao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ggb
+Description: Gbii
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ggd
+Description: Gugadj
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gge
+Description: Guragone
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ggg
+Description: Gurgula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ggk
+Description: Kungarakany
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ggl
+Description: Ganglau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ggn
+Description: Eastern Gurung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ggo
+Description: Southern Gondi
+Added: 2009-07-29
+Macrolanguage: gon
+%%
+Type: language
+Subtag: ggr
+Description: Aghu Tharnggalu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ggt
+Description: Gitua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ggu
+Description: Gagu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ggw
+Description: Gogodala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gha
+Description: Ghadamès
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ghc
+Description: Hiberno-Scottish Gaelic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ghe
+Description: Southern Ghale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ghh
+Description: Northern Ghale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ghk
+Description: Geko Karen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ghl
+Description: Ghulfan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ghn
+Description: Ghanongga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gho
+Description: Ghomara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ghr
+Description: Ghera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ghs
+Description: Guhu-Samane
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ght
+Description: Kuke
+Description: Kutang Ghale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gia
+Description: Kitja
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gib
+Description: Gibanawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gic
+Description: Gail
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gid
+Description: Gidar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gig
+Description: Goaria
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gil
+Description: Gilbertese
+Added: 2005-10-16
+%%
+Type: language
+Subtag: gim
+Description: Gimi (Eastern Highlands)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gin
+Description: Hinukh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gio
+Description: Gelao
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see aou, gqu
+%%
+Type: language
+Subtag: gip
+Description: Gimi (West New Britain)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: giq
+Description: Green Gelao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gir
+Description: Red Gelao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gis
+Description: North Giziga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: git
+Description: Gitxsan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: giu
+Description: Mulao
+Added: 2012-08-12
+%%
+Type: language
+Subtag: giw
+Description: White Gelao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gix
+Description: Gilima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: giy
+Description: Giyug
+Added: 2009-07-29
+%%
+Type: language
+Subtag: giz
+Description: South Giziga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gji
+Description: Geji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gjk
+Description: Kachi Koli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gjn
+Description: Gonja
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gju
+Description: Gujari
+Added: 2009-07-29
+Macrolanguage: raj
+%%
+Type: language
+Subtag: gka
+Description: Guya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gke
+Description: Ndai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gkn
+Description: Gokana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gko
+Description: Kok-Nar
+Added: 2012-08-12
+%%
+Type: language
+Subtag: gkp
+Description: Guinea Kpelle
+Added: 2009-07-29
+Macrolanguage: kpe
+%%
+Type: language
+Subtag: glc
+Description: Bon Gula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gld
+Description: Nanai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: glh
+Description: Northwest Pashayi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gli
+Description: Guliguli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: glj
+Description: Gula Iro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: glk
+Description: Gilaki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: glo
+Description: Galambu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: glr
+Description: Glaro-Twabo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: glu
+Description: Gula (Chad)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: glw
+Description: Glavda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gly
+Description: Gule
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gma
+Description: Gambera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gmb
+Description: Gula'alaa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gmd
+Description: Mághdì
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gme
+Description: East Germanic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: gmh
+Description: Middle High German (ca. 1050-1500)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: gml
+Description: Middle Low German
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gmm
+Description: Gbaya-Mbodomo
+Added: 2009-07-29
+Macrolanguage: gba
+%%
+Type: language
+Subtag: gmn
+Description: Gimnime
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gmq
+Description: North Germanic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: gmu
+Description: Gumalu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gmv
+Description: Gamo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gmw
+Description: West Germanic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: gmx
+Description: Magoma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gmy
+Description: Mycenaean Greek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gna
+Description: Kaansa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gnb
+Description: Gangte
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gnc
+Description: Guanche
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gnd
+Description: Zulgo-Gemzek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gne
+Description: Ganang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gng
+Description: Ngangam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gnh
+Description: Lere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gni
+Description: Gooniyandi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gnk
+Description: //Gana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gnl
+Description: Gangulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gnm
+Description: Ginuman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gnn
+Description: Gumatj
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gno
+Description: Northern Gondi
+Added: 2009-07-29
+Macrolanguage: gon
+%%
+Type: language
+Subtag: gnq
+Description: Gana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gnr
+Description: Gureng Gureng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gnt
+Description: Guntai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gnu
+Description: Gnau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gnw
+Description: Western Bolivian Guaraní
+Added: 2009-07-29
+Macrolanguage: gn
+%%
+Type: language
+Subtag: gnz
+Description: Ganzi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: goa
+Description: Guro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gob
+Description: Playero
+Added: 2009-07-29
+%%
+Type: language
+Subtag: goc
+Description: Gorakor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: god
+Description: Godié
+Added: 2009-07-29
+%%
+Type: language
+Subtag: goe
+Description: Gongduk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gof
+Description: Gofa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gog
+Description: Gogo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: goh
+Description: Old High German (ca. 750-1050)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: goi
+Description: Gobasi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: goj
+Description: Gowlan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gok
+Description: Gowli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gol
+Description: Gola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gom
+Description: Goan Konkani
+Added: 2009-07-29
+Macrolanguage: kok
+%%
+Type: language
+Subtag: gon
+Description: Gondi
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: goo
+Description: Gone Dau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gop
+Description: Yeretuar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: goq
+Description: Gorap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gor
+Description: Gorontalo
+Added: 2005-10-16
+%%
+Type: language
+Subtag: gos
+Description: Gronings
+Added: 2009-07-29
+%%
+Type: language
+Subtag: got
+Description: Gothic
+Added: 2005-10-16
+%%
+Type: language
+Subtag: gou
+Description: Gavar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gow
+Description: Gorowa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gox
+Description: Gobu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: goy
+Description: Goundo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: goz
+Description: Gozarkhani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gpa
+Description: Gupa-Abawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gpe
+Description: Ghanaian Pidgin English
+Added: 2012-08-12
+%%
+Type: language
+Subtag: gpn
+Description: Taiap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gqa
+Description: Ga'anda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gqi
+Description: Guiqiong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gqn
+Description: Guana (Brazil)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gqr
+Description: Gor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gqu
+Description: Qau
+Added: 2012-08-12
+%%
+Type: language
+Subtag: gra
+Description: Rajput Garasia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: grb
+Description: Grebo
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: grc
+Description: Ancient Greek (to 1453)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: grd
+Description: Guruntum-Mbaaru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: grg
+Description: Madi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: grh
+Description: Gbiri-Niragu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gri
+Description: Ghari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: grj
+Description: Southern Grebo
+Added: 2009-07-29
+Macrolanguage: grb
+%%
+Type: language
+Subtag: grk
+Description: Greek languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: grm
+Description: Kota Marudu Talantang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gro
+Description: Groma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: grq
+Description: Gorovu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: grr
+Description: Taznatit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: grs
+Description: Gresi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: grt
+Description: Garo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gru
+Description: Kistane
+Added: 2009-07-29
+%%
+Type: language
+Subtag: grv
+Description: Central Grebo
+Added: 2009-07-29
+Macrolanguage: grb
+%%
+Type: language
+Subtag: grw
+Description: Gweda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: grx
+Description: Guriaso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gry
+Description: Barclayville Grebo
+Added: 2009-07-29
+Macrolanguage: grb
+%%
+Type: language
+Subtag: grz
+Description: Guramalum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gse
+Description: Ghanaian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gsg
+Description: German Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gsl
+Description: Gusilay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gsm
+Description: Guatemalan Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gsn
+Description: Gusan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gso
+Description: Southwest Gbaya
+Added: 2009-07-29
+Macrolanguage: gba
+%%
+Type: language
+Subtag: gsp
+Description: Wasembo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gss
+Description: Greek Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gsw
+Description: Swiss German
+Description: Alemannic
+Description: Alsatian
+Added: 2006-03-08
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: gta
+Description: Guató
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gti
+Description: Gbati-ri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gua
+Description: Shiki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gub
+Description: Guajajára
+Added: 2009-07-29
+%%
+Type: language
+Subtag: guc
+Description: Wayuu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gud
+Description: Yocoboué Dida
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gue
+Description: Gurinji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: guf
+Description: Gupapuyngu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gug
+Description: Paraguayan Guaraní
+Added: 2009-07-29
+Macrolanguage: gn
+%%
+Type: language
+Subtag: guh
+Description: Guahibo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gui
+Description: Eastern Bolivian Guaraní
+Added: 2009-07-29
+Macrolanguage: gn
+%%
+Type: language
+Subtag: guk
+Description: Gumuz
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gul
+Description: Sea Island Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gum
+Description: Guambiano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gun
+Description: Mbyá Guaraní
+Added: 2009-07-29
+Macrolanguage: gn
+%%
+Type: language
+Subtag: guo
+Description: Guayabero
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gup
+Description: Gunwinggu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: guq
+Description: Aché
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gur
+Description: Farefare
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gus
+Description: Guinean Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gut
+Description: Maléku Jaíka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: guu
+Description: Yanomamö
+Added: 2009-07-29
+%%
+Type: language
+Subtag: guv
+Description: Gey
+Added: 2009-07-29
+%%
+Type: language
+Subtag: guw
+Description: Gun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gux
+Description: Gourmanchéma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: guz
+Description: Gusii
+Description: Ekegusii
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gva
+Description: Guana (Paraguay)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gvc
+Description: Guanano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gve
+Description: Duwet
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gvf
+Description: Golin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gvj
+Description: Guajá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gvl
+Description: Gulay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gvm
+Description: Gurmana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gvn
+Description: Kuku-Yalanji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gvo
+Description: Gavião Do Jiparaná
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gvp
+Description: Pará Gavião
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gvr
+Description: Western Gurung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gvs
+Description: Gumawana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gvy
+Description: Guyani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gwa
+Description: Mbato
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gwb
+Description: Gwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gwc
+Description: Kalami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gwd
+Description: Gawwada
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gwe
+Description: Gweno
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gwf
+Description: Gowro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gwg
+Description: Moo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gwi
+Description: Gwichʼin
+Added: 2005-10-16
+%%
+Type: language
+Subtag: gwj
+Description: /Gwi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gwm
+Description: Awngthim
+Added: 2012-08-12
+%%
+Type: language
+Subtag: gwn
+Description: Gwandara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gwr
+Description: Gwere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gwt
+Description: Gawar-Bati
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gwu
+Description: Guwamu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gww
+Description: Kwini
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gwx
+Description: Gua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gxx
+Description: Wè Southern
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gya
+Description: Northwest Gbaya
+Added: 2009-07-29
+Macrolanguage: gba
+%%
+Type: language
+Subtag: gyb
+Description: Garus
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gyd
+Description: Kayardild
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gye
+Description: Gyem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gyf
+Description: Gungabula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gyg
+Description: Gbayi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gyi
+Description: Gyele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gyl
+Description: Gayil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gym
+Description: Ngäbere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gyn
+Description: Guyanese Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gyr
+Description: Guarayu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gyy
+Description: Gunya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gza
+Description: Ganza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gzi
+Description: Gazi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: gzn
+Description: Gane
+Added: 2009-07-29
+%%
+Type: language
+Subtag: haa
+Description: Han
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hab
+Description: Hanoi Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hac
+Description: Gurani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: had
+Description: Hatam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hae
+Description: Eastern Oromo
+Added: 2009-07-29
+Macrolanguage: om
+%%
+Type: language
+Subtag: haf
+Description: Haiphong Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hag
+Description: Hanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hah
+Description: Hahon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hai
+Description: Haida
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: haj
+Description: Hajong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hak
+Description: Hakka Chinese
+Added: 2009-07-29
+Macrolanguage: zh
+%%
+Type: language
+Subtag: hal
+Description: Halang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ham
+Description: Hewa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: han
+Description: Hangaza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hao
+Description: Hakö
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hap
+Description: Hupla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: haq
+Description: Ha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: har
+Description: Harari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: has
+Description: Haisla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hav
+Description: Havu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: haw
+Description: Hawaiian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: hax
+Description: Southern Haida
+Added: 2009-07-29
+Macrolanguage: hai
+%%
+Type: language
+Subtag: hay
+Description: Haya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: haz
+Description: Hazaragi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hba
+Description: Hamba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hbb
+Description: Huba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hbn
+Description: Heiban
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hbo
+Description: Ancient Hebrew
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hbu
+Description: Habu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hca
+Description: Andaman Creole Hindi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hch
+Description: Huichol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hdn
+Description: Northern Haida
+Added: 2009-07-29
+Macrolanguage: hai
+%%
+Type: language
+Subtag: hds
+Description: Honduras Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hdy
+Description: Hadiyya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hea
+Description: Northern Qiandong Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hed
+Description: Herdé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: heg
+Description: Helong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: heh
+Description: Hehe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hei
+Description: Heiltsuk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hem
+Description: Hemba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hgm
+Description: Hai//om
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hgw
+Description: Haigwai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hhi
+Description: Hoia Hoia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hhr
+Description: Kerak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hhy
+Description: Hoyahoya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hia
+Description: Lamang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hib
+Description: Hibito
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hid
+Description: Hidatsa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hif
+Description: Fiji Hindi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hig
+Description: Kamwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hih
+Description: Pamosu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hii
+Description: Hinduri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hij
+Description: Hijuk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hik
+Description: Seit-Kaitetu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hil
+Description: Hiligaynon
+Added: 2005-10-16
+%%
+Type: language
+Subtag: him
+Description: Himachali languages
+Description: Western Pahari languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: hio
+Description: Tsoa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hir
+Description: Himarimã
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hit
+Description: Hittite
+Added: 2005-10-16
+%%
+Type: language
+Subtag: hiw
+Description: Hiw
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hix
+Description: Hixkaryána
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hji
+Description: Haji
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: hka
+Description: Kahe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hke
+Description: Hunde
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hkk
+Description: Hunjara-Kaina Ke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hks
+Description: Hong Kong Sign Language
+Description: Heung Kong Sau Yue
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hla
+Description: Halia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hlb
+Description: Halbi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hld
+Description: Halang Doan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hle
+Description: Hlersu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hlt
+Description: Matu Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hlu
+Description: Hieroglyphic Luwian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hma
+Description: Southern Mashan Hmong
+Description: Southern Mashan Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hmb
+Description: Humburi Senni Songhay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hmc
+Description: Central Huishui Hmong
+Description: Central Huishui Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hmd
+Description: Large Flowery Miao
+Description: A-hmaos
+Description: Da-Hua Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hme
+Description: Eastern Huishui Hmong
+Description: Eastern Huishui Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hmf
+Description: Hmong Don
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hmg
+Description: Southwestern Guiyang Hmong
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hmh
+Description: Southwestern Huishui Hmong
+Description: Southwestern Huishui Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hmi
+Description: Northern Huishui Hmong
+Description: Northern Huishui Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hmj
+Description: Ge
+Description: Gejia
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hmk
+Description: Maek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hml
+Description: Luopohe Hmong
+Description: Luopohe Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hmm
+Description: Central Mashan Hmong
+Description: Central Mashan Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hmn
+Description: Hmong
+Description: Mong
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: hmp
+Description: Northern Mashan Hmong
+Description: Northern Mashan Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hmq
+Description: Eastern Qiandong Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hmr
+Description: Hmar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hms
+Description: Southern Qiandong Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hmt
+Description: Hamtai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hmu
+Description: Hamap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hmv
+Description: Hmong Dô
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hmw
+Description: Western Mashan Hmong
+Description: Western Mashan Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hmx
+Description: Hmong-Mien languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: hmy
+Description: Southern Guiyang Hmong
+Description: Southern Guiyang Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hmz
+Description: Hmong Shua
+Description: Sinicized Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hna
+Description: Mina (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hnd
+Description: Southern Hindko
+Added: 2009-07-29
+Macrolanguage: lah
+%%
+Type: language
+Subtag: hne
+Description: Chhattisgarhi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hnh
+Description: //Ani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hni
+Description: Hani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hnj
+Description: Hmong Njua
+Description: Mong Leng
+Description: Mong Njua
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hnn
+Description: Hanunoo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hno
+Description: Northern Hindko
+Added: 2009-07-29
+Macrolanguage: lah
+%%
+Type: language
+Subtag: hns
+Description: Caribbean Hindustani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hnu
+Description: Hung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hoa
+Description: Hoava
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hob
+Description: Mari (Madang Province)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hoc
+Description: Ho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hod
+Description: Holma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hoe
+Description: Horom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hoh
+Description: Hobyót
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hoi
+Description: Holikachuk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hoj
+Description: Hadothi
+Description: Haroti
+Added: 2009-07-29
+Macrolanguage: raj
+%%
+Type: language
+Subtag: hok
+Description: Hokan languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: hol
+Description: Holu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hom
+Description: Homa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hoo
+Description: Holoholo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hop
+Description: Hopi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hor
+Description: Horo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hos
+Description: Ho Chi Minh City Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hot
+Description: Hote
+Description: Malê
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hov
+Description: Hovongan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: how
+Description: Honi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hoy
+Description: Holiya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hoz
+Description: Hozo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hpo
+Description: Hpon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hps
+Description: Hawai'i Pidgin Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hra
+Description: Hrangkhol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hre
+Description: Hre
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hrk
+Description: Haruku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hrm
+Description: Horned Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: hro
+Description: Haroi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hrr
+Description: Horuru
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Preferred-Value: jal
+%%
+Type: language
+Subtag: hrt
+Description: Hértevin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hru
+Description: Hruso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hrx
+Description: Hunsrik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hrz
+Description: Harzani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hsb
+Description: Upper Sorbian
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: hsh
+Description: Hungarian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hsl
+Description: Hausa Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hsn
+Description: Xiang Chinese
+Added: 2009-07-29
+Macrolanguage: zh
+%%
+Type: language
+Subtag: hss
+Description: Harsusi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hti
+Description: Hoti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hto
+Description: Minica Huitoto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hts
+Description: Hadza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: htu
+Description: Hitu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: htx
+Description: Middle Hittite
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hub
+Description: Huambisa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: huc
+Description: =/Hua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hud
+Description: Huaulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hue
+Description: San Francisco Del Mar Huave
+Added: 2009-07-29
+%%
+Type: language
+Subtag: huf
+Description: Humene
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hug
+Description: Huachipaeri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: huh
+Description: Huilliche
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hui
+Description: Huli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: huj
+Description: Northern Guiyang Hmong
+Description: Northern Guiyang Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: huk
+Description: Hulung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hul
+Description: Hula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hum
+Description: Hungana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: huo
+Description: Hu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hup
+Description: Hupa
+Added: 2005-10-16
+%%
+Type: language
+Subtag: huq
+Description: Tsat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hur
+Description: Halkomelem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hus
+Description: Huastec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hut
+Description: Humla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: huu
+Description: Murui Huitoto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: huv
+Description: San Mateo Del Mar Huave
+Added: 2009-07-29
+%%
+Type: language
+Subtag: huw
+Description: Hukumina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hux
+Description: Nüpode Huitoto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: huy
+Description: Hulaulá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: huz
+Description: Hunzib
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hvc
+Description: Haitian Vodoun Culture Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hve
+Description: San Dionisio Del Mar Huave
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hvk
+Description: Haveke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hvn
+Description: Sabu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hvv
+Description: Santa María Del Mar Huave
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hwa
+Description: Wané
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hwc
+Description: Hawai'i Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hwo
+Description: Hwana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hya
+Description: Hya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: hyx
+Description: Armenian (family)
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: iai
+Description: Iaai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ian
+Description: Iatmul
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iap
+Description: Iapama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iar
+Description: Purari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iba
+Description: Iban
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ibb
+Description: Ibibio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ibd
+Description: Iwaidja
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ibe
+Description: Akpes
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ibg
+Description: Ibanag
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ibi
+Description: Ibilo
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Preferred-Value: opa
+%%
+Type: language
+Subtag: ibl
+Description: Ibaloi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ibm
+Description: Agoi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ibn
+Description: Ibino
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ibr
+Description: Ibuoro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ibu
+Description: Ibu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iby
+Description: Ibani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ica
+Description: Ede Ica
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ich
+Description: Etkywan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: icl
+Description: Icelandic Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: icr
+Description: Islander Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ida
+Description: Idakho-Isukha-Tiriki
+Description: Luidakho-Luisukha-Lutirichi
+Added: 2009-07-29
+Macrolanguage: luy
+%%
+Type: language
+Subtag: idb
+Description: Indo-Portuguese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: idc
+Description: Idon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: idd
+Description: Ede Idaca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ide
+Description: Idere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: idi
+Description: Idi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: idr
+Description: Indri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ids
+Description: Idesa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: idt
+Description: Idaté
+Added: 2009-07-29
+%%
+Type: language
+Subtag: idu
+Description: Idoma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ifa
+Description: Amganad Ifugao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ifb
+Description: Batad Ifugao
+Description: Ayangan Ifugao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ife
+Description: Ifè
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iff
+Description: Ifo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ifk
+Description: Tuwali Ifugao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ifm
+Description: Teke-Fuumu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ifu
+Description: Mayoyao Ifugao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ify
+Description: Keley-I Kallahan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: igb
+Description: Ebira
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ige
+Description: Igede
+Added: 2009-07-29
+%%
+Type: language
+Subtag: igg
+Description: Igana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: igl
+Description: Igala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: igm
+Description: Kanggape
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ign
+Description: Ignaciano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: igo
+Description: Isebe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: igs
+Description: Interglossa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: igw
+Description: Igwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ihb
+Description: Iha Based Pidgin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ihi
+Description: Ihievbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ihp
+Description: Iha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ihw
+Description: Bidhawal
+Added: 2012-08-12
+%%
+Type: language
+Subtag: iir
+Description: Indo-Iranian languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: ijc
+Description: Izon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ije
+Description: Biseni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ijj
+Description: Ede Ije
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ijn
+Description: Kalabari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ijo
+Description: Ijo languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: ijs
+Description: Southeast Ijo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ike
+Description: Eastern Canadian Inuktitut
+Added: 2009-07-29
+Macrolanguage: iu
+%%
+Type: language
+Subtag: iki
+Description: Iko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ikk
+Description: Ika
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ikl
+Description: Ikulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iko
+Description: Olulumo-Ikom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ikp
+Description: Ikpeshi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ikt
+Description: Inuinnaqtun
+Description: Western Canadian Inuktitut
+Added: 2009-07-29
+Macrolanguage: iu
+%%
+Type: language
+Subtag: ikv
+Description: Iku-Gora-Ankwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ikw
+Description: Ikwere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ikx
+Description: Ik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ikz
+Description: Ikizu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ila
+Description: Ile Ape
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ilb
+Description: Ila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ilg
+Description: Garig-Ilgar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ili
+Description: Ili Turki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ilk
+Description: Ilongot
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ill
+Description: Iranun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ilo
+Description: Iloko
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ils
+Description: International Sign
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ilu
+Description: Ili'uun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ilv
+Description: Ilue
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ilw
+Description: Talur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ima
+Description: Mala Malasar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ime
+Description: Imeraguen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: imi
+Description: Anamgura
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iml
+Description: Miluk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: imn
+Description: Imonda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: imo
+Description: Imbongu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: imr
+Description: Imroing
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ims
+Description: Marsian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: imy
+Description: Milyan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: inb
+Description: Inga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: inc
+Description: Indic languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: ine
+Description: Indo-European languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: ing
+Description: Degexit'an
+Added: 2009-07-29
+%%
+Type: language
+Subtag: inh
+Description: Ingush
+Added: 2005-10-16
+%%
+Type: language
+Subtag: inj
+Description: Jungle Inga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: inl
+Description: Indonesian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: inm
+Description: Minaean
+Added: 2009-07-29
+%%
+Type: language
+Subtag: inn
+Description: Isinai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ino
+Description: Inoke-Yate
+Added: 2009-07-29
+%%
+Type: language
+Subtag: inp
+Description: Iñapari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ins
+Description: Indian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: int
+Description: Intha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: inz
+Description: Ineseño
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ior
+Description: Inor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iou
+Description: Tuma-Irumu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iow
+Description: Iowa-Oto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ipi
+Description: Ipili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ipo
+Description: Ipiko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iqu
+Description: Iquito
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ira
+Description: Iranian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: ire
+Description: Iresim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: irh
+Description: Irarutu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iri
+Description: Irigwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: irk
+Description: Iraqw
+Added: 2009-07-29
+%%
+Type: language
+Subtag: irn
+Description: Irántxe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iro
+Description: Iroquoian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: irr
+Description: Ir
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iru
+Description: Irula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: irx
+Description: Kamberau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iry
+Description: Iraya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: isa
+Description: Isabi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: isc
+Description: Isconahua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: isd
+Description: Isnag
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ise
+Description: Italian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: isg
+Description: Irish Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ish
+Description: Esan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: isi
+Description: Nkem-Nkum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: isk
+Description: Ishkashimi
+Added: 2010-03-11
+%%
+Type: language
+Subtag: ism
+Description: Masimasi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: isn
+Description: Isanzu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iso
+Description: Isoko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: isr
+Description: Israeli Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ist
+Description: Istriot
+Added: 2009-07-29
+%%
+Type: language
+Subtag: isu
+Description: Isu (Menchum Division)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: itb
+Description: Binongan Itneg
+Added: 2009-07-29
+%%
+Type: language
+Subtag: itc
+Description: Italic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: ite
+Description: Itene
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iti
+Description: Inlaod Itneg
+Added: 2009-07-29
+%%
+Type: language
+Subtag: itk
+Description: Judeo-Italian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: itl
+Description: Itelmen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: itm
+Description: Itu Mbon Uzo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ito
+Description: Itonama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: itr
+Description: Iteri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: its
+Description: Isekiri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: itt
+Description: Maeng Itneg
+Added: 2009-07-29
+%%
+Type: language
+Subtag: itv
+Description: Itawit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: itw
+Description: Ito
+Added: 2009-07-29
+%%
+Type: language
+Subtag: itx
+Description: Itik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ity
+Description: Moyadan Itneg
+Added: 2009-07-29
+%%
+Type: language
+Subtag: itz
+Description: Itzá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ium
+Description: Iu Mien
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ivb
+Description: Ibatan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ivv
+Description: Ivatan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iwk
+Description: I-Wak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iwm
+Description: Iwam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iwo
+Description: Iwur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iws
+Description: Sepik Iwam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ixc
+Description: Ixcatec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ixl
+Description: Ixil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iya
+Description: Iyayu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iyo
+Description: Mesaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: iyx
+Description: Yaka (Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: izh
+Description: Ingrian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: izi
+Description: Izi-Ezaa-Ikwo-Mgbo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: izr
+Description: Izere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jaa
+Description: Jamamadí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jab
+Description: Hyam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jac
+Description: Popti'
+Description: Jakalteko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jad
+Description: Jahanka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jae
+Description: Yabem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jaf
+Description: Jara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jah
+Description: Jah Hut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jaj
+Description: Zazao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jak
+Description: Jakun
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: jal
+Description: Yalahatan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jam
+Description: Jamaican Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jan
+Description: Jandai
+Added: 2012-08-12
+%%
+Type: language
+Subtag: jao
+Description: Yanyuwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jaq
+Description: Yaqay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jar
+Description: Jarawa (Nigeria)
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see jgk, jjr
+%%
+Type: language
+Subtag: jas
+Description: New Caledonian Javanese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jat
+Description: Jakati
+Added: 2009-07-29
+Macrolanguage: lah
+%%
+Type: language
+Subtag: jau
+Description: Yaur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jax
+Description: Jambi Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: jay
+Description: Yan-nhangu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jaz
+Description: Jawe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jbe
+Description: Judeo-Berber
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jbj
+Description: Arandai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jbk
+Description: Barikewa
+Added: 2012-08-12
+%%
+Type: language
+Subtag: jbn
+Description: Nafusi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jbo
+Description: Lojban
+Added: 2005-10-16
+%%
+Type: language
+Subtag: jbr
+Description: Jofotek-Bromnya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jbt
+Description: Jabutí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jbu
+Description: Jukun Takum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jbw
+Description: Yawijibaya
+Added: 2012-08-12
+%%
+Type: language
+Subtag: jcs
+Description: Jamaican Country Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jct
+Description: Krymchak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jda
+Description: Jad
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jdg
+Description: Jadgali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jdt
+Description: Judeo-Tat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jeb
+Description: Jebero
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jee
+Description: Jerung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jeg
+Description: Jeng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jeh
+Description: Jeh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jei
+Description: Yei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jek
+Description: Jeri Kuo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jel
+Description: Yelmek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jen
+Description: Dza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jer
+Description: Jere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jet
+Description: Manem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jeu
+Description: Jonkor Bourmataguil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jgb
+Description: Ngbee
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jge
+Description: Judeo-Georgian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jgk
+Description: Gwak
+Added: 2012-08-12
+%%
+Type: language
+Subtag: jgo
+Description: Ngomba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jhi
+Description: Jehai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jhs
+Description: Jhankot Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jia
+Description: Jina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jib
+Description: Jibu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jic
+Description: Tol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jid
+Description: Bu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jie
+Description: Jilbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jig
+Description: Djingili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jih
+Description: sTodsde
+Description: Shangzhai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jii
+Description: Jiiddu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jil
+Description: Jilim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jim
+Description: Jimi (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jio
+Description: Jiamao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jiq
+Description: Guanyinqiao
+Description: Lavrung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jit
+Description: Jita
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jiu
+Description: Youle Jinuo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jiv
+Description: Shuar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jiy
+Description: Buyuan Jinuo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jjr
+Description: Bankal
+Added: 2012-08-12
+%%
+Type: language
+Subtag: jkm
+Description: Mobwa Karen
+Added: 2012-08-12
+%%
+Type: language
+Subtag: jko
+Description: Kubo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jkp
+Description: Paku Karen
+Added: 2012-08-12
+%%
+Type: language
+Subtag: jkr
+Description: Koro (India)
+Added: 2012-08-12
+%%
+Type: language
+Subtag: jku
+Description: Labir
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jle
+Description: Ngile
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jls
+Description: Jamaican Sign Language
+Added: 2010-03-11
+%%
+Type: language
+Subtag: jma
+Description: Dima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jmb
+Description: Zumbun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jmc
+Description: Machame
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jmd
+Description: Yamdena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jmi
+Description: Jimi (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jml
+Description: Jumli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jmn
+Description: Makuri Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jmr
+Description: Kamara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jms
+Description: Mashi (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jmw
+Description: Mouwase
+Added: 2012-08-12
+%%
+Type: language
+Subtag: jmx
+Description: Western Juxtlahuaca Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jna
+Description: Jangshung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jnd
+Description: Jandavra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jng
+Description: Yangman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jni
+Description: Janji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jnj
+Description: Yemsa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jnl
+Description: Rawat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jns
+Description: Jaunsari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: job
+Description: Joba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jod
+Description: Wojenaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jor
+Description: Jorá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jos
+Description: Jordanian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jow
+Description: Jowulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jpa
+Description: Jewish Palestinian Aramaic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jpr
+Description: Judeo-Persian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: jpx
+Description: Japanese (family)
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: jqr
+Description: Jaqaru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jra
+Description: Jarai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jrb
+Description: Judeo-Arabic
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: jrr
+Description: Jiru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jrt
+Description: Jorto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jru
+Description: Japrería
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jsl
+Description: Japanese Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jua
+Description: Júma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jub
+Description: Wannu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: juc
+Description: Jurchen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jud
+Description: Worodougou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: juh
+Description: Hõne
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jui
+Description: Ngadjuri
+Added: 2012-08-12
+%%
+Type: language
+Subtag: juk
+Description: Wapan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jul
+Description: Jirel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jum
+Description: Jumjum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jun
+Description: Juang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: juo
+Description: Jiba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jup
+Description: Hupdë
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jur
+Description: Jurúna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jus
+Description: Jumla Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jut
+Description: Jutish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: juu
+Description: Ju
+Added: 2009-07-29
+%%
+Type: language
+Subtag: juw
+Description: Wãpha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: juy
+Description: Juray
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jvd
+Description: Javindo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jvn
+Description: Caribbean Javanese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jwi
+Description: Jwira-Pepesa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jya
+Description: Jiarong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: jye
+Description: Judeo-Yemeni Arabic
+Added: 2009-07-29
+Macrolanguage: jrb
+%%
+Type: language
+Subtag: jyy
+Description: Jaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kaa
+Description: Kara-Kalpak
+Added: 2005-10-16
+%%
+Type: language
+Subtag: kab
+Description: Kabyle
+Added: 2005-10-16
+%%
+Type: language
+Subtag: kac
+Description: Kachin
+Description: Jingpho
+Added: 2005-10-16
+%%
+Type: language
+Subtag: kad
+Description: Adara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kae
+Description: Ketangalan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kaf
+Description: Katso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kag
+Description: Kajaman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kah
+Description: Kara (Central African Republic)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kai
+Description: Karekare
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kaj
+Description: Jju
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kak
+Description: Kayapa Kallahan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kam
+Description: Kamba (Kenya)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: kao
+Description: Xaasongaxango
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kap
+Description: Bezhta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kaq
+Description: Capanahua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kar
+Description: Karen languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: kav
+Description: Katukína
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kaw
+Description: Kawi
+Added: 2005-10-16
+%%
+Type: language
+Subtag: kax
+Description: Kao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kay
+Description: Kamayurá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kba
+Description: Kalarko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbb
+Description: Kaxuiâna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbc
+Description: Kadiwéu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbd
+Description: Kabardian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: kbe
+Description: Kanju
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbf
+Description: Kakauhua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbg
+Description: Khamba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbh
+Description: Camsá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbi
+Description: Kaptiau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbj
+Description: Kari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbk
+Description: Grass Koiari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbl
+Description: Kanembu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbm
+Description: Iwal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbn
+Description: Kare (Central African Republic)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbo
+Description: Keliko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbp
+Description: Kabiyè
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbq
+Description: Kamano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbr
+Description: Kafa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbs
+Description: Kande
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbt
+Description: Abadi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbu
+Description: Kabutra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbv
+Description: Dera (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbw
+Description: Kaiep
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kbx
+Description: Ap Ma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kby
+Description: Manga Kanuri
+Added: 2009-07-29
+Macrolanguage: kr
+%%
+Type: language
+Subtag: kbz
+Description: Duhwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kca
+Description: Khanty
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcb
+Description: Kawacha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcc
+Description: Lubila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcd
+Description: Ngkâlmpw Kanum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kce
+Description: Kaivi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcf
+Description: Ukaan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcg
+Description: Tyap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kch
+Description: Vono
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kci
+Description: Kamantan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcj
+Description: Kobiana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kck
+Description: Kalanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcl
+Description: Kela (Papua New Guinea)
+Description: Kala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcm
+Description: Gula (Central African Republic)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcn
+Description: Nubi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kco
+Description: Kinalakna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcp
+Description: Kanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcq
+Description: Kamo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcr
+Description: Katla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcs
+Description: Koenoem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kct
+Description: Kaian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcu
+Description: Kami (Tanzania)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcv
+Description: Kete
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcw
+Description: Kabwari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcx
+Description: Kachama-Ganjule
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcy
+Description: Korandje
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kcz
+Description: Konongo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kda
+Description: Worimi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdc
+Description: Kutu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdd
+Description: Yankunytjatjara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kde
+Description: Makonde
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdf
+Description: Mamusi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdg
+Description: Seba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdh
+Description: Tem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdi
+Description: Kumam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdj
+Description: Karamojong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdk
+Description: Numee
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdl
+Description: Tsikimba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdm
+Description: Kagoma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdn
+Description: Kunda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdo
+Description: Kordofanian languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: kdp
+Description: Kaningdon-Nindem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdq
+Description: Koch
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdr
+Description: Karaim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdt
+Description: Kuy
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdu
+Description: Kadaru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdv
+Description: Kado
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see zkd, zkn
+%%
+Type: language
+Subtag: kdw
+Description: Koneraw
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdx
+Description: Kam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdy
+Description: Keder
+Description: Keijar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kdz
+Description: Kwaja
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kea
+Description: Kabuverdianu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: keb
+Description: Kélé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kec
+Description: Keiga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ked
+Description: Kerewe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kee
+Description: Eastern Keres
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kef
+Description: Kpessi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: keg
+Description: Tese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: keh
+Description: Keak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kei
+Description: Kei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kej
+Description: Kadar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kek
+Description: Kekchí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kel
+Description: Kela (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kem
+Description: Kemak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ken
+Description: Kenyang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: keo
+Description: Kakwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kep
+Description: Kaikadi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: keq
+Description: Kamar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ker
+Description: Kera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kes
+Description: Kugbo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ket
+Description: Ket
+Added: 2009-07-29
+%%
+Type: language
+Subtag: keu
+Description: Akebu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kev
+Description: Kanikkaran
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kew
+Description: West Kewa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kex
+Description: Kukna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: key
+Description: Kupia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kez
+Description: Kukele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfa
+Description: Kodava
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfb
+Description: Northwestern Kolami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfc
+Description: Konda-Dora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfd
+Description: Korra Koraga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfe
+Description: Kota (India)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kff
+Description: Koya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfg
+Description: Kudiya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfh
+Description: Kurichiya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfi
+Description: Kannada Kurumba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfj
+Description: Kemiehua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfk
+Description: Kinnauri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfl
+Description: Kung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfm
+Description: Khunsari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfn
+Description: Kuk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfo
+Description: Koro (Côte d'Ivoire)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfp
+Description: Korwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfq
+Description: Korku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfr
+Description: Kachchi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfs
+Description: Bilaspuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kft
+Description: Kanjari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfu
+Description: Katkari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfv
+Description: Kurmukar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfw
+Description: Kharam Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfx
+Description: Kullu Pahari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfy
+Description: Kumaoni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kfz
+Description: Koromfé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kga
+Description: Koyaga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgb
+Description: Kawe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgc
+Description: Kasseng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgd
+Description: Kataang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kge
+Description: Komering
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgf
+Description: Kube
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgg
+Description: Kusunda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgh
+Description: Upper Tanudan Kalinga
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Preferred-Value: kml
+%%
+Type: language
+Subtag: kgi
+Description: Selangor Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgj
+Description: Gamale Kham
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgk
+Description: Kaiwá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgl
+Description: Kunggari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgm
+Description: Karipúna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgn
+Description: Karingani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgo
+Description: Krongo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgp
+Description: Kaingang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgq
+Description: Kamoro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgr
+Description: Abun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgs
+Description: Kumbainggar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgt
+Description: Somyev
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgu
+Description: Kobol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgv
+Description: Karas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgw
+Description: Karon Dori
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgx
+Description: Kamaru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kgy
+Description: Kyerung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kha
+Description: Khasi
+Added: 2005-10-16
+Comments: as of 2008-04-21 this subtag does not include Lyngngam; see
+  lyg
+%%
+Type: language
+Subtag: khb
+Description: Lü
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khc
+Description: Tukang Besi North
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khd
+Description: Bädi Kanum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khe
+Description: Korowai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khf
+Description: Khuen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khg
+Description: Khams Tibetan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khh
+Description: Kehu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khi
+Description: Khoisan languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: khj
+Description: Kuturmi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khk
+Description: Halh Mongolian
+Added: 2009-07-29
+Macrolanguage: mn
+%%
+Type: language
+Subtag: khl
+Description: Lusi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khn
+Description: Khandesi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kho
+Description: Khotanese
+Description: Sakan
+Added: 2005-10-16
+%%
+Type: language
+Subtag: khp
+Description: Kapori
+Description: Kapauri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khq
+Description: Koyra Chiini Songhay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khr
+Description: Kharia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khs
+Description: Kasua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kht
+Description: Khamti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khu
+Description: Nkhumbi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khv
+Description: Khvarshi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khw
+Description: Khowar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khx
+Description: Kanu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khy
+Description: Kele (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: khz
+Description: Keapara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kia
+Description: Kim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kib
+Description: Koalib
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kic
+Description: Kickapoo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kid
+Description: Koshin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kie
+Description: Kibet
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kif
+Description: Eastern Parbate Kham
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kig
+Description: Kimaama
+Description: Kimaghima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kih
+Description: Kilmeri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kii
+Description: Kitsai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kij
+Description: Kilivila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kil
+Description: Kariya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kim
+Description: Karagas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kio
+Description: Kiowa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kip
+Description: Sheshi Kham
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kiq
+Description: Kosadle
+Description: Kosare
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kis
+Description: Kis
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kit
+Description: Agob
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kiu
+Description: Kirmanjki (individual language)
+Added: 2009-07-29
+Macrolanguage: zza
+%%
+Type: language
+Subtag: kiv
+Description: Kimbu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kiw
+Description: Northeast Kiwai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kix
+Description: Khiamniungan Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kiy
+Description: Kirikiri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kiz
+Description: Kisi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kja
+Description: Mlap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjb
+Description: Q'anjob'al
+Description: Kanjobal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjc
+Description: Coastal Konjo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjd
+Description: Southern Kiwai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kje
+Description: Kisar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjf
+Description: Khalaj
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjg
+Description: Khmu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjh
+Description: Khakas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kji
+Description: Zabana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjj
+Description: Khinalugh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjk
+Description: Highland Konjo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjl
+Description: Western Parbate Kham
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjm
+Description: Kháng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjn
+Description: Kunjen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjo
+Description: Harijan Kinnauri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjp
+Description: Pwo Eastern Karen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjq
+Description: Western Keres
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjr
+Description: Kurudu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjs
+Description: East Kewa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjt
+Description: Phrae Pwo Karen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kju
+Description: Kashaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjx
+Description: Ramopa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjy
+Description: Erave
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kjz
+Description: Bumthangkha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kka
+Description: Kakanda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkb
+Description: Kwerisa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkc
+Description: Odoodee
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkd
+Description: Kinuku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kke
+Description: Kakabe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkf
+Description: Kalaktang Monpa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkg
+Description: Mabaka Valley Kalinga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkh
+Description: Khün
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kki
+Description: Kagulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkj
+Description: Kako
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkk
+Description: Kokota
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkl
+Description: Kosarek Yale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkm
+Description: Kiong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkn
+Description: Kon Keu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kko
+Description: Karko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkp
+Description: Gugubera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkq
+Description: Kaiku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkr
+Description: Kir-Balar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kks
+Description: Giiwo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkt
+Description: Koi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kku
+Description: Tumi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkv
+Description: Kangean
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkw
+Description: Teke-Kukuya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkx
+Description: Kohin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kky
+Description: Guguyimidjir
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kkz
+Description: Kaska
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kla
+Description: Klamath-Modoc
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klb
+Description: Kiliwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klc
+Description: Kolbila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kld
+Description: Gamilaraay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kle
+Description: Kulung (Nepal)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klf
+Description: Kendeje
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klg
+Description: Tagakaulo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klh
+Description: Weliki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kli
+Description: Kalumpang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klj
+Description: Turkic Khalaj
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klk
+Description: Kono (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kll
+Description: Kagan Kalagan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klm
+Description: Migum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kln
+Description: Kalenjin
+Added: 2009-07-29
+Scope: macrolanguage
+%%
+Type: language
+Subtag: klo
+Description: Kapya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klp
+Description: Kamasa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klq
+Description: Rumu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klr
+Description: Khaling
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kls
+Description: Kalasha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klt
+Description: Nukna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klu
+Description: Klao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klv
+Description: Maskelynes
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klw
+Description: Lindu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klx
+Description: Koluwawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kly
+Description: Kalao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: klz
+Description: Kabola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kma
+Description: Konni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmb
+Description: Kimbundu
+Added: 2005-10-16
+%%
+Type: language
+Subtag: kmc
+Description: Southern Dong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmd
+Description: Majukayang Kalinga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kme
+Description: Bakole
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmf
+Description: Kare (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmg
+Description: Kâte
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmh
+Description: Kalam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmi
+Description: Kami (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmj
+Description: Kumarbhag Paharia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmk
+Description: Limos Kalinga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kml
+Description: Tanudan Kalinga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmm
+Description: Kom (India)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmn
+Description: Awtuw
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmo
+Description: Kwoma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmp
+Description: Gimme
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmq
+Description: Kwama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmr
+Description: Northern Kurdish
+Added: 2009-07-29
+Macrolanguage: ku
+%%
+Type: language
+Subtag: kms
+Description: Kamasau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmt
+Description: Kemtuik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmu
+Description: Kanite
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmv
+Description: Karipúna Creole French
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmw
+Description: Komo (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmx
+Description: Waboda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmy
+Description: Koma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kmz
+Description: Khorasani Turkish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kna
+Description: Dera (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knb
+Description: Lubuagan Kalinga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knc
+Description: Central Kanuri
+Added: 2009-07-29
+Macrolanguage: kr
+%%
+Type: language
+Subtag: knd
+Description: Konda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kne
+Description: Kankanaey
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knf
+Description: Mankanya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kng
+Description: Koongo
+Added: 2009-07-29
+Macrolanguage: kg
+%%
+Type: language
+Subtag: kni
+Description: Kanufi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knj
+Description: Western Kanjobal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knk
+Description: Kuranko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knl
+Description: Keninjal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knm
+Description: Kanamarí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knn
+Description: Konkani (individual language)
+Added: 2009-07-29
+Macrolanguage: kok
+%%
+Type: language
+Subtag: kno
+Description: Kono (Sierra Leone)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knp
+Description: Kwanja
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knq
+Description: Kintaq
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knr
+Description: Kaningra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kns
+Description: Kensiu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knt
+Description: Panoan Katukína
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knu
+Description: Kono (Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knv
+Description: Tabo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knw
+Description: Kung-Ekoka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knx
+Description: Kendayan
+Description: Salako
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kny
+Description: Kanyok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: knz
+Description: Kalamsé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: koa
+Description: Konomala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: koc
+Description: Kpati
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kod
+Description: Kodi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: koe
+Description: Kacipo-Balesi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kof
+Description: Kubi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kog
+Description: Cogui
+Description: Kogi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: koh
+Description: Koyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: koi
+Description: Komi-Permyak
+Added: 2009-07-29
+Macrolanguage: kv
+%%
+Type: language
+Subtag: koj
+Description: Sara Dunjo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kok
+Description: Konkani (macrolanguage)
+Added: 2005-10-16
+Suppress-Script: Deva
+Scope: macrolanguage
+%%
+Type: language
+Subtag: kol
+Description: Kol (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: koo
+Description: Konzo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kop
+Description: Waube
+Added: 2009-07-29
+%%
+Type: language
+Subtag: koq
+Description: Kota (Gabon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kos
+Description: Kosraean
+Added: 2005-10-16
+%%
+Type: language
+Subtag: kot
+Description: Lagwan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kou
+Description: Koke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kov
+Description: Kudu-Camo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kow
+Description: Kugama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kox
+Description: Coxima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: koy
+Description: Koyukon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: koz
+Description: Korak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpa
+Description: Kutto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpb
+Description: Mullu Kurumba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpc
+Description: Curripaco
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpd
+Description: Koba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpe
+Description: Kpelle
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: kpf
+Description: Komba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpg
+Description: Kapingamarangi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kph
+Description: Kplang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpi
+Description: Kofei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpj
+Description: Karajá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpk
+Description: Kpan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpl
+Description: Kpala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpm
+Description: Koho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpn
+Description: Kepkiriwát
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpo
+Description: Ikposo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpp
+Description: Paku Karen
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see jkm, jkp
+%%
+Type: language
+Subtag: kpq
+Description: Korupun-Sela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpr
+Description: Korafe-Yegha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kps
+Description: Tehit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpt
+Description: Karata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpu
+Description: Kafoa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpv
+Description: Komi-Zyrian
+Added: 2009-07-29
+Macrolanguage: kv
+%%
+Type: language
+Subtag: kpw
+Description: Kobon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpx
+Description: Mountain Koiali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpy
+Description: Koryak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kpz
+Description: Kupsabiny
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqa
+Description: Mum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqb
+Description: Kovai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqc
+Description: Doromu-Koki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqd
+Description: Koy Sanjaq Surat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqe
+Description: Kalagan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqf
+Description: Kakabai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqg
+Description: Khe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqh
+Description: Kisankasa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqi
+Description: Koitabu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqj
+Description: Koromira
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqk
+Description: Kotafon Gbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kql
+Description: Kyenele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqm
+Description: Khisa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqn
+Description: Kaonde
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqo
+Description: Eastern Krahn
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqp
+Description: Kimré
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqq
+Description: Krenak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqr
+Description: Kimaragang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqs
+Description: Northern Kissi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqt
+Description: Klias River Kadazan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqu
+Description: Seroa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqv
+Description: Okolod
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqw
+Description: Kandas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqx
+Description: Mser
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqy
+Description: Koorete
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kqz
+Description: Korana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kra
+Description: Kumhali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: krb
+Description: Karkin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: krc
+Description: Karachay-Balkar
+Added: 2005-10-16
+%%
+Type: language
+Subtag: krd
+Description: Kairui-Midiki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kre
+Description: Panará
+Added: 2009-07-29
+%%
+Type: language
+Subtag: krf
+Description: Koro (Vanuatu)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: krh
+Description: Kurama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kri
+Description: Krio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: krj
+Description: Kinaray-A
+Added: 2009-07-29
+%%
+Type: language
+Subtag: krk
+Description: Kerek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: krl
+Description: Karelian
+Added: 2006-03-08
+%%
+Type: language
+Subtag: krm
+Description: Krim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: krn
+Description: Sapo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kro
+Description: Kru languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: krp
+Description: Korop
+Added: 2009-07-29
+%%
+Type: language
+Subtag: krr
+Description: Kru'ng 2
+Added: 2009-07-29
+%%
+Type: language
+Subtag: krs
+Description: Gbaya (Sudan)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: krt
+Description: Tumari Kanuri
+Added: 2009-07-29
+Macrolanguage: kr
+%%
+Type: language
+Subtag: kru
+Description: Kurukh
+Added: 2005-10-16
+%%
+Type: language
+Subtag: krv
+Description: Kavet
+Added: 2009-07-29
+%%
+Type: language
+Subtag: krw
+Description: Western Krahn
+Added: 2009-07-29
+%%
+Type: language
+Subtag: krx
+Description: Karon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kry
+Description: Kryts
+Added: 2009-07-29
+%%
+Type: language
+Subtag: krz
+Description: Sota Kanum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksa
+Description: Shuwa-Zamani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksb
+Description: Shambala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksc
+Description: Southern Kalinga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksd
+Description: Kuanua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kse
+Description: Kuni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksf
+Description: Bafia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksg
+Description: Kusaghe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksh
+Description: Kölsch
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksi
+Description: Krisa
+Description: I'saka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksj
+Description: Uare
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksk
+Description: Kansa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksl
+Description: Kumalu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksm
+Description: Kumba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksn
+Description: Kasiguranin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kso
+Description: Kofa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksp
+Description: Kaba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksq
+Description: Kwaami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksr
+Description: Borong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kss
+Description: Southern Kisi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kst
+Description: Winyé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksu
+Description: Khamyang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksv
+Description: Kusu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksw
+Description: S'gaw Karen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksx
+Description: Kedang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksy
+Description: Kharia Thar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ksz
+Description: Kodaku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kta
+Description: Katua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktb
+Description: Kambaata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktc
+Description: Kholok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktd
+Description: Kokata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kte
+Description: Nubri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktf
+Description: Kwami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktg
+Description: Kalkutung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kth
+Description: Karanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kti
+Description: North Muyu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktj
+Description: Plapo Krumen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktk
+Description: Kaniet
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktl
+Description: Koroshi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktm
+Description: Kurti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktn
+Description: Karitiâna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kto
+Description: Kuot
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktp
+Description: Kaduo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktq
+Description: Katabaga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktr
+Description: Kota Marudu Tinagas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kts
+Description: South Muyu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktt
+Description: Ketum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktu
+Description: Kituba (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktv
+Description: Eastern Katu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktw
+Description: Kato
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktx
+Description: Kaxararí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kty
+Description: Kango (Bas-Uélé District)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ktz
+Description: Ju/'hoan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kub
+Description: Kutep
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kuc
+Description: Kwinsu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kud
+Description: 'Auhelawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kue
+Description: Kuman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kuf
+Description: Western Katu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kug
+Description: Kupa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kuh
+Description: Kushi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kui
+Description: Kuikúro-Kalapálo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kuj
+Description: Kuria
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kuk
+Description: Kepo'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kul
+Description: Kulere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kum
+Description: Kumyk
+Added: 2005-10-16
+%%
+Type: language
+Subtag: kun
+Description: Kunama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kuo
+Description: Kumukio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kup
+Description: Kunimaipa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kuq
+Description: Karipuna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kus
+Description: Kusaal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kut
+Description: Kutenai
+Added: 2005-10-16
+%%
+Type: language
+Subtag: kuu
+Description: Upper Kuskokwim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kuv
+Description: Kur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kuw
+Description: Kpagua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kux
+Description: Kukatja
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kuy
+Description: Kuuku-Ya'u
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kuz
+Description: Kunza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kva
+Description: Bagvalal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvb
+Description: Kubu
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: kvc
+Description: Kove
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvd
+Description: Kui (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kve
+Description: Kalabakan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvf
+Description: Kabalai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvg
+Description: Kuni-Boazi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvh
+Description: Komodo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvi
+Description: Kwang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvj
+Description: Psikye
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvk
+Description: Korean Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvl
+Description: Kayaw
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvm
+Description: Kendem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvn
+Description: Border Kuna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvo
+Description: Dobel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvp
+Description: Kompane
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvq
+Description: Geba Karen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvr
+Description: Kerinci
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: kvs
+Description: Kunggara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvt
+Description: Lahta Karen
+Description: Lahta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvu
+Description: Yinbaw Karen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvv
+Description: Kola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvw
+Description: Wersing
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvx
+Description: Parkari Koli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvy
+Description: Yintale Karen
+Description: Yintale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kvz
+Description: Tsakwambo
+Description: Tsaukambo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwa
+Description: Dâw
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwb
+Description: Kwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwc
+Description: Likwala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwd
+Description: Kwaio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwe
+Description: Kwerba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwf
+Description: Kwara'ae
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwg
+Description: Sara Kaba Deme
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwh
+Description: Kowiai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwi
+Description: Awa-Cuaiquer
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwj
+Description: Kwanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwk
+Description: Kwakiutl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwl
+Description: Kofyar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwm
+Description: Kwambi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwn
+Description: Kwangali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwo
+Description: Kwomtari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwp
+Description: Kodia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwq
+Description: Kwak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwr
+Description: Kwer
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kws
+Description: Kwese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwt
+Description: Kwesten
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwu
+Description: Kwakum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwv
+Description: Sara Kaba Náà
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kww
+Description: Kwinti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwx
+Description: Khirwar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kwy
+Description: San Salvador Kongo
+Added: 2009-07-29
+Macrolanguage: kg
+%%
+Type: language
+Subtag: kwz
+Description: Kwadi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxa
+Description: Kairiru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxb
+Description: Krobu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxc
+Description: Konso
+Description: Khonso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxd
+Description: Brunei
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: kxe
+Description: Kakihum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxf
+Description: Manumanaw Karen
+Description: Manumanaw
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxh
+Description: Karo (Ethiopia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxi
+Description: Keningau Murut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxj
+Description: Kulfa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxk
+Description: Zayein Karen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxl
+Description: Nepali Kurux
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxm
+Description: Northern Khmer
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxn
+Description: Kanowit-Tanjong Melanau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxo
+Description: Kanoé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxp
+Description: Wadiyara Koli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxq
+Description: Smärky Kanum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxr
+Description: Koro (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxs
+Description: Kangjia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxt
+Description: Koiwat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxu
+Description: Kui (India)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxv
+Description: Kuvi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxw
+Description: Konai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxx
+Description: Likuba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxy
+Description: Kayong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kxz
+Description: Kerewo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kya
+Description: Kwaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyb
+Description: Butbut Kalinga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyc
+Description: Kyaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyd
+Description: Karey
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kye
+Description: Krache
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyf
+Description: Kouya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyg
+Description: Keyagana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyh
+Description: Karok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyi
+Description: Kiput
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyj
+Description: Karao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyk
+Description: Kamayo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyl
+Description: Kalapuya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kym
+Description: Kpatili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyn
+Description: Northern Binukidnon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyo
+Description: Kelon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyp
+Description: Kang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyq
+Description: Kenga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyr
+Description: Kuruáya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kys
+Description: Baram Kayan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyt
+Description: Kayagar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyu
+Description: Western Kayah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyv
+Description: Kayort
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyw
+Description: Kudmali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyx
+Description: Rapoisi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyy
+Description: Kambaira
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kyz
+Description: Kayabí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kza
+Description: Western Karaboro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzb
+Description: Kaibobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzc
+Description: Bondoukou Kulango
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzd
+Description: Kadai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kze
+Description: Kosena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzf
+Description: Da'a Kaili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzg
+Description: Kikai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzh
+Description: Kenuzi-Dongola
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see dgl, xnz
+%%
+Type: language
+Subtag: kzi
+Description: Kelabit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzj
+Description: Coastal Kadazan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzk
+Description: Kazukuru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzl
+Description: Kayeli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzm
+Description: Kais
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzn
+Description: Kokola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzo
+Description: Kaningi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzp
+Description: Kaidipang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzq
+Description: Kaike
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzr
+Description: Karang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzs
+Description: Sugut Dusun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzt
+Description: Tambunan Dusun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzu
+Description: Kayupulau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzv
+Description: Komyandaret
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzw
+Description: Karirí-Xocó
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzx
+Description: Kamarian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzy
+Description: Kango (Tshopo District)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: kzz
+Description: Kalabra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: laa
+Description: Southern Subanen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lab
+Description: Linear A
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lac
+Description: Lacandon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lad
+Description: Ladino
+Added: 2005-10-16
+%%
+Type: language
+Subtag: lae
+Description: Pattani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: laf
+Description: Lafofa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lag
+Description: Langi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lah
+Description: Lahnda
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: lai
+Description: Lambya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: laj
+Description: Lango (Uganda)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lak
+Description: Laka (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lal
+Description: Lalia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lam
+Description: Lamba
+Added: 2005-10-16
+%%
+Type: language
+Subtag: lan
+Description: Laru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lap
+Description: Laka (Chad)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: laq
+Description: Qabiao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lar
+Description: Larteh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: las
+Description: Lama (Togo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lau
+Description: Laba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: law
+Description: Lauje
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lax
+Description: Tiwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lay
+Description: Lama (Myanmar)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: laz
+Description: Aribwatsa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lba
+Description: Lui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbb
+Description: Label
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbc
+Description: Lakkia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbe
+Description: Lak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbf
+Description: Tinani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbg
+Description: Laopang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbi
+Description: La'bi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbj
+Description: Ladakhi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbk
+Description: Central Bontok
+Added: 2010-03-11
+Macrolanguage: bnc
+%%
+Type: language
+Subtag: lbl
+Description: Libon Bikol
+Added: 2010-03-11
+Macrolanguage: bik
+%%
+Type: language
+Subtag: lbm
+Description: Lodhi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbn
+Description: Lamet
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbo
+Description: Laven
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbq
+Description: Wampar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbr
+Description: Lohorung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbs
+Description: Libyan Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbt
+Description: Lachi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbu
+Description: Labu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbv
+Description: Lavatbura-Lamusong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbw
+Description: Tolaki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbx
+Description: Lawangan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lby
+Description: Lamu-Lamu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lbz
+Description: Lardil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lcc
+Description: Legenyem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lcd
+Description: Lola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lce
+Description: Loncong
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: lcf
+Description: Lubu
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: lch
+Description: Luchazi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lcl
+Description: Lisela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lcm
+Description: Tungag
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lcp
+Description: Western Lawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lcq
+Description: Luhu
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Preferred-Value: ppr
+%%
+Type: language
+Subtag: lcs
+Description: Lisabata-Nuniali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ldb
+Description: Dũya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ldd
+Description: Luri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ldg
+Description: Lenyima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ldh
+Description: Lamja-Dengsa-Tola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ldi
+Description: Laari
+Added: 2009-07-29
+Macrolanguage: kg
+%%
+Type: language
+Subtag: ldj
+Description: Lemoro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ldk
+Description: Leelau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ldl
+Description: Kaan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ldm
+Description: Landoma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ldn
+Description: Láadan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ldo
+Description: Loo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ldp
+Description: Tso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ldq
+Description: Lufu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lea
+Description: Lega-Shabunda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: leb
+Description: Lala-Bisa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lec
+Description: Leco
+Added: 2009-07-29
+%%
+Type: language
+Subtag: led
+Description: Lendu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lee
+Description: Lyélé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lef
+Description: Lelemi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: leg
+Description: Lengua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: leh
+Description: Lenje
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lei
+Description: Lemio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lej
+Description: Lengola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lek
+Description: Leipon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lel
+Description: Lele (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lem
+Description: Nomaande
+Added: 2009-07-29
+%%
+Type: language
+Subtag: len
+Description: Lenca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: leo
+Description: Leti (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lep
+Description: Lepcha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: leq
+Description: Lembena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ler
+Description: Lenkau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: les
+Description: Lese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: let
+Description: Lesing-Gelimi
+Description: Amio-Gelimi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: leu
+Description: Kara (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lev
+Description: Lamma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lew
+Description: Ledo Kaili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lex
+Description: Luang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ley
+Description: Lemolang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lez
+Description: Lezghian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: lfa
+Description: Lefa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lfn
+Description: Lingua Franca Nova
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lga
+Description: Lungga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lgb
+Description: Laghu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lgg
+Description: Lugbara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lgh
+Description: Laghuu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lgi
+Description: Lengilu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lgk
+Description: Lingarak
+Description: Neverver
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lgl
+Description: Wala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lgm
+Description: Lega-Mwenga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lgn
+Description: Opuuo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lgq
+Description: Logba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lgr
+Description: Lengo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lgt
+Description: Pahi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lgu
+Description: Longgu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lgz
+Description: Ligenza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lha
+Description: Laha (Viet Nam)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lhh
+Description: Laha (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lhi
+Description: Lahu Shi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lhl
+Description: Lahul Lohar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lhm
+Description: Lhomi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lhn
+Description: Lahanan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lhp
+Description: Lhokpu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lhs
+Description: Mlahsö
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lht
+Description: Lo-Toga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lhu
+Description: Lahu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lia
+Description: West-Central Limba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lib
+Description: Likum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lic
+Description: Hlai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lid
+Description: Nyindrou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lie
+Description: Likila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lif
+Description: Limbu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lig
+Description: Ligbi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lih
+Description: Lihir
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lii
+Description: Lingkhim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lij
+Description: Ligurian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lik
+Description: Lika
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lil
+Description: Lillooet
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lio
+Description: Liki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lip
+Description: Sekpele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: liq
+Description: Libido
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lir
+Description: Liberian English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lis
+Description: Lisu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: liu
+Description: Logorik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: liv
+Description: Liv
+Added: 2009-07-29
+%%
+Type: language
+Subtag: liw
+Description: Col
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: lix
+Description: Liabuku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: liy
+Description: Banda-Bambari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: liz
+Description: Libinza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lje
+Description: Rampi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lji
+Description: Laiyolo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ljl
+Description: Li'o
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ljp
+Description: Lampung Api
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lka
+Description: Lakalei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lkb
+Description: Kabras
+Description: Lukabaras
+Added: 2009-07-29
+Macrolanguage: luy
+%%
+Type: language
+Subtag: lkc
+Description: Kucong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lkd
+Description: Lakondê
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lke
+Description: Kenyi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lkh
+Description: Lakha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lki
+Description: Laki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lkj
+Description: Remun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lkl
+Description: Laeko-Libuat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lkn
+Description: Lakon
+Description: Vure
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lko
+Description: Khayo
+Description: Olukhayo
+Added: 2009-07-29
+Macrolanguage: luy
+%%
+Type: language
+Subtag: lkr
+Description: Päri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lks
+Description: Kisa
+Description: Olushisa
+Added: 2009-07-29
+Macrolanguage: luy
+%%
+Type: language
+Subtag: lkt
+Description: Lakota
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lky
+Description: Lokoya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lla
+Description: Lala-Roba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: llb
+Description: Lolo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: llc
+Description: Lele (Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lld
+Description: Ladin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lle
+Description: Lele (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: llf
+Description: Hermit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: llg
+Description: Lole
+Added: 2009-07-29
+%%
+Type: language
+Subtag: llh
+Description: Lamu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lli
+Description: Teke-Laali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: llj
+Description: Ladji Ladji
+Added: 2012-08-12
+%%
+Type: language
+Subtag: llk
+Description: Lelak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lll
+Description: Lilau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: llm
+Description: Lasalimu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lln
+Description: Lele (Chad)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: llo
+Description: Khlor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: llp
+Description: North Efate
+Added: 2009-07-29
+%%
+Type: language
+Subtag: llq
+Description: Lolak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lls
+Description: Lithuanian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: llu
+Description: Lau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: llx
+Description: Lauan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lma
+Description: East Limba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmb
+Description: Merei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmc
+Description: Limilngan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmd
+Description: Lumun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lme
+Description: Pévé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmf
+Description: South Lembata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmg
+Description: Lamogai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmh
+Description: Lambichhong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmi
+Description: Lombi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmj
+Description: West Lembata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmk
+Description: Lamkang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lml
+Description: Hano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmm
+Description: Lamam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmn
+Description: Lambadi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmo
+Description: Lombard
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmp
+Description: Limbum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmq
+Description: Lamatuka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmr
+Description: Lamalera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmu
+Description: Lamenu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmv
+Description: Lomaiviti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmw
+Description: Lake Miwok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmx
+Description: Laimbue
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmy
+Description: Lamboya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lmz
+Description: Lumbee
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lna
+Description: Langbashe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lnb
+Description: Mbalanhu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lnd
+Description: Lundayeh
+Description: Lun Bawang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lng
+Description: Langobardic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lnh
+Description: Lanoh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lni
+Description: Daantanai'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lnj
+Description: Leningitij
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lnl
+Description: South Central Banda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lnm
+Description: Langam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lnn
+Description: Lorediakarkar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lno
+Description: Lango (Sudan)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lns
+Description: Lamnso'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lnu
+Description: Longuda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lnz
+Description: Lonzo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: loa
+Description: Loloda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lob
+Description: Lobi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: loc
+Description: Inonhan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: loe
+Description: Saluan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lof
+Description: Logol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: log
+Description: Logo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: loh
+Description: Narim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: loi
+Description: Loma (Côte d'Ivoire)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: loj
+Description: Lou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lok
+Description: Loko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lol
+Description: Mongo
+Added: 2005-10-16
+%%
+Type: language
+Subtag: lom
+Description: Loma (Liberia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lon
+Description: Malawi Lomwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: loo
+Description: Lombo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lop
+Description: Lopa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: loq
+Description: Lobala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lor
+Description: Téén
+Added: 2009-07-29
+%%
+Type: language
+Subtag: los
+Description: Loniu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lot
+Description: Otuho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lou
+Description: Louisiana Creole French
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lov
+Description: Lopi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: low
+Description: Tampias Lobu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lox
+Description: Loun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: loy
+Description: Loke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: loz
+Description: Lozi
+Added: 2005-10-16
+%%
+Type: language
+Subtag: lpa
+Description: Lelepa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lpe
+Description: Lepki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lpn
+Description: Long Phuri Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lpo
+Description: Lipo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lpx
+Description: Lopit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lra
+Description: Rara Bakati'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lrc
+Description: Northern Luri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lre
+Description: Laurentian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lrg
+Description: Laragia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lri
+Description: Marachi
+Description: Olumarachi
+Added: 2009-07-29
+Macrolanguage: luy
+%%
+Type: language
+Subtag: lrk
+Description: Loarki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lrl
+Description: Lari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lrm
+Description: Marama
+Description: Olumarama
+Added: 2009-07-29
+Macrolanguage: luy
+%%
+Type: language
+Subtag: lrn
+Description: Lorang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lro
+Description: Laro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lrr
+Description: Southern Yamphu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lrt
+Description: Larantuka Malay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lrv
+Description: Larevat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lrz
+Description: Lemerig
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lsa
+Description: Lasgerdi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lsd
+Description: Lishana Deni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lse
+Description: Lusengo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lsg
+Description: Lyons Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lsh
+Description: Lish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lsi
+Description: Lashi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lsl
+Description: Latvian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lsm
+Description: Saamia
+Description: Olusamia
+Added: 2009-07-29
+Macrolanguage: luy
+%%
+Type: language
+Subtag: lso
+Description: Laos Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lsp
+Description: Panamanian Sign Language
+Description: Lengua de Señas Panameñas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lsr
+Description: Aruop
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lss
+Description: Lasi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lst
+Description: Trinidad and Tobago Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lsy
+Description: Mauritian Sign Language
+Added: 2010-03-11
+%%
+Type: language
+Subtag: ltc
+Description: Late Middle Chinese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ltg
+Description: Latgalian
+Added: 2010-03-11
+Macrolanguage: lv
+%%
+Type: language
+Subtag: lti
+Description: Leti (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ltn
+Description: Latundê
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lto
+Description: Tsotso
+Description: Olutsotso
+Added: 2009-07-29
+Macrolanguage: luy
+%%
+Type: language
+Subtag: lts
+Description: Tachoni
+Description: Lutachoni
+Added: 2009-07-29
+Macrolanguage: luy
+%%
+Type: language
+Subtag: ltu
+Description: Latu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lua
+Description: Luba-Lulua
+Added: 2005-10-16
+%%
+Type: language
+Subtag: luc
+Description: Aringa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lud
+Description: Ludian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lue
+Description: Luvale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: luf
+Description: Laua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lui
+Description: Luiseno
+Added: 2005-10-16
+%%
+Type: language
+Subtag: luj
+Description: Luna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: luk
+Description: Lunanakha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lul
+Description: Olu'bo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lum
+Description: Luimbi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lun
+Description: Lunda
+Added: 2005-10-16
+%%
+Type: language
+Subtag: luo
+Description: Luo (Kenya and Tanzania)
+Description: Dholuo
+Added: 2005-10-16
+%%
+Type: language
+Subtag: lup
+Description: Lumbu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: luq
+Description: Lucumi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lur
+Description: Laura
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lus
+Description: Lushai
+Added: 2005-10-16
+%%
+Type: language
+Subtag: lut
+Description: Lushootseed
+Added: 2009-07-29
+%%
+Type: language
+Subtag: luu
+Description: Lumba-Yakkha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: luv
+Description: Luwati
+Added: 2009-07-29
+%%
+Type: language
+Subtag: luw
+Description: Luo (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: luy
+Description: Luyia
+Description: Oluluyia
+Added: 2009-07-29
+Scope: macrolanguage
+%%
+Type: language
+Subtag: luz
+Description: Southern Luri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lva
+Description: Maku'a
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lvk
+Description: Lavukaleve
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lvs
+Description: Standard Latvian
+Added: 2010-03-11
+Macrolanguage: lv
+%%
+Type: language
+Subtag: lvu
+Description: Levuka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lwa
+Description: Lwalu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lwe
+Description: Lewo Eleng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lwg
+Description: Wanga
+Description: Oluwanga
+Added: 2009-07-29
+Macrolanguage: luy
+%%
+Type: language
+Subtag: lwh
+Description: White Lachi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lwl
+Description: Eastern Lawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lwm
+Description: Laomian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lwo
+Description: Luwo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lwt
+Description: Lewotobi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lww
+Description: Lewo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lya
+Description: Layakha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lyg
+Description: Lyngngam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lyn
+Description: Luyana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lzh
+Description: Literary Chinese
+Added: 2009-07-29
+Macrolanguage: zh
+%%
+Type: language
+Subtag: lzl
+Description: Litzlitz
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lzn
+Description: Leinong Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: lzz
+Description: Laz
+Added: 2009-07-29
+%%
+Type: language
+Subtag: maa
+Description: San Jerónimo Tecóatl Mazatec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mab
+Description: Yutanduchi Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mad
+Description: Madurese
+Added: 2005-10-16
+%%
+Type: language
+Subtag: mae
+Description: Bo-Rukul
+Added: 2009-07-29
+%%
+Type: language
+Subtag: maf
+Description: Mafa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mag
+Description: Magahi
+Added: 2005-10-16
+%%
+Type: language
+Subtag: mai
+Description: Maithili
+Added: 2005-10-16
+Suppress-Script: Deva
+%%
+Type: language
+Subtag: maj
+Description: Jalapa De Díaz Mazatec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mak
+Description: Makasar
+Added: 2005-10-16
+%%
+Type: language
+Subtag: mam
+Description: Mam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: man
+Description: Mandingo
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: map
+Description: Austronesian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: maq
+Description: Chiquihuitlán Mazatec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mas
+Description: Masai
+Added: 2005-10-16
+%%
+Type: language
+Subtag: mat
+Description: San Francisco Matlatzinca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mau
+Description: Huautla Mazatec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mav
+Description: Sateré-Mawé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: maw
+Description: Mampruli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: max
+Description: North Moluccan Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: maz
+Description: Central Mazahua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mba
+Description: Higaonon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbb
+Description: Western Bukidnon Manobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbc
+Description: Macushi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbd
+Description: Dibabawon Manobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbe
+Description: Molale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbf
+Description: Baba Malay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbh
+Description: Mangseng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbi
+Description: Ilianen Manobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbj
+Description: Nadëb
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbk
+Description: Malol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbl
+Description: Maxakalí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbm
+Description: Ombamba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbn
+Description: Macaguán
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbo
+Description: Mbo (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbp
+Description: Malayo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbq
+Description: Maisin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbr
+Description: Nukak Makú
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbs
+Description: Sarangani Manobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbt
+Description: Matigsalug Manobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbu
+Description: Mbula-Bwazza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbv
+Description: Mbulungish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbw
+Description: Maring
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbx
+Description: Mari (East Sepik Province)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mby
+Description: Memoni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mbz
+Description: Amoltepec Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mca
+Description: Maca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcb
+Description: Machiguenga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcc
+Description: Bitur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcd
+Description: Sharanahua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mce
+Description: Itundujia Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcf
+Description: Matsés
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcg
+Description: Mapoyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mch
+Description: Maquiritari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mci
+Description: Mese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcj
+Description: Mvanip
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mck
+Description: Mbunda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcl
+Description: Macaguaje
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcm
+Description: Malaccan Creole Portuguese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcn
+Description: Masana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mco
+Description: Coatlán Mixe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcp
+Description: Makaa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcq
+Description: Ese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcr
+Description: Menya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcs
+Description: Mambai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mct
+Description: Mengisa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcu
+Description: Cameroon Mambila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcv
+Description: Minanibai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcw
+Description: Mawa (Chad)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcx
+Description: Mpiemo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcy
+Description: South Watut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mcz
+Description: Mawan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mda
+Description: Mada (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdb
+Description: Morigi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdc
+Description: Male (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdd
+Description: Mbum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mde
+Description: Maba (Chad)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdf
+Description: Moksha
+Added: 2005-10-16
+%%
+Type: language
+Subtag: mdg
+Description: Massalat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdh
+Description: Maguindanaon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdi
+Description: Mamvu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdj
+Description: Mangbetu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdk
+Description: Mangbutu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdl
+Description: Maltese Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdm
+Description: Mayogo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdn
+Description: Mbati
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdp
+Description: Mbala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdq
+Description: Mbole
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdr
+Description: Mandar
+Added: 2005-10-16
+%%
+Type: language
+Subtag: mds
+Description: Maria (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdt
+Description: Mbere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdu
+Description: Mboko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdv
+Description: Santa Lucía Monteverde Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdw
+Description: Mbosi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdx
+Description: Dizin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdy
+Description: Male (Ethiopia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mdz
+Description: Suruí Do Pará
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mea
+Description: Menka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: meb
+Description: Ikobi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mec
+Description: Mara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: med
+Description: Melpa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mee
+Description: Mengen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mef
+Description: Megam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: meg
+Description: Mea
+Added: 2009-07-29
+%%
+Type: language
+Subtag: meh
+Description: Southwestern Tlaxiaco Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mei
+Description: Midob
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mej
+Description: Meyah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mek
+Description: Mekeo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mel
+Description: Central Melanau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mem
+Description: Mangala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: men
+Description: Mende (Sierra Leone)
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: meo
+Description: Kedah Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: mep
+Description: Miriwung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: meq
+Description: Merey
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mer
+Description: Meru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mes
+Description: Masmaje
+Added: 2009-07-29
+%%
+Type: language
+Subtag: met
+Description: Mato
+Added: 2009-07-29
+%%
+Type: language
+Subtag: meu
+Description: Motu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mev
+Description: Mann
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mew
+Description: Maaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mey
+Description: Hassaniyya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mez
+Description: Menominee
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfa
+Description: Pattani Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: mfb
+Description: Bangka
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: mfc
+Description: Mba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfd
+Description: Mendankwe-Nkwen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfe
+Description: Morisyen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mff
+Description: Naki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfg
+Description: Mixifore
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfh
+Description: Matal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfi
+Description: Wandala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfj
+Description: Mefele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfk
+Description: North Mofu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfl
+Description: Putai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfm
+Description: Marghi South
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfn
+Description: Cross River Mbembe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfo
+Description: Mbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfp
+Description: Makassar Malay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfq
+Description: Moba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfr
+Description: Marithiel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfs
+Description: Mexican Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mft
+Description: Mokerang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfu
+Description: Mbwela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfv
+Description: Mandjak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfw
+Description: Mulaha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfx
+Description: Melo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfy
+Description: Mayo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mfz
+Description: Mabaan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mga
+Description: Middle Irish (900-1200)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: mgb
+Description: Mararit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgc
+Description: Morokodo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgd
+Description: Moru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mge
+Description: Mango
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgf
+Description: Maklew
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgg
+Description: Mpumpong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgh
+Description: Makhuwa-Meetto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgi
+Description: Lijili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgj
+Description: Abureni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgk
+Description: Mawes
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgl
+Description: Maleu-Kilenge
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgm
+Description: Mambae
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgn
+Description: Mbangi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgo
+Description: Meta'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgp
+Description: Eastern Magar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgq
+Description: Malila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgr
+Description: Mambwe-Lungu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgs
+Description: Manda (Tanzania)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgt
+Description: Mongol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgu
+Description: Mailu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgv
+Description: Matengo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgw
+Description: Matumbi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgx
+Description: Omati
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see jbk, jmw
+%%
+Type: language
+Subtag: mgy
+Description: Mbunga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mgz
+Description: Mbugwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mha
+Description: Manda (India)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhb
+Description: Mahongwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhc
+Description: Mocho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhd
+Description: Mbugu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhe
+Description: Besisi
+Description: Mah Meri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhf
+Description: Mamaa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhg
+Description: Margu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhh
+Description: Maskoy Pidgin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhi
+Description: Ma'di
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhj
+Description: Mogholi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhk
+Description: Mungaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhl
+Description: Mauwake
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhm
+Description: Makhuwa-Moniga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhn
+Description: Mócheno
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mho
+Description: Mashi (Zambia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhp
+Description: Balinese Malay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhq
+Description: Mandan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhr
+Description: Eastern Mari
+Added: 2009-07-29
+Macrolanguage: chm
+%%
+Type: language
+Subtag: mhs
+Description: Buru (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mht
+Description: Mandahuaca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhu
+Description: Digaro-Mishmi
+Description: Darang Deng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhw
+Description: Mbukushu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhx
+Description: Maru
+Description: Lhaovo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhy
+Description: Ma'anyan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mhz
+Description: Mor (Mor Islands)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mia
+Description: Miami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mib
+Description: Atatláhuca Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mic
+Description: Mi'kmaq
+Description: Micmac
+Added: 2005-10-16
+%%
+Type: language
+Subtag: mid
+Description: Mandaic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mie
+Description: Ocotepec Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mif
+Description: Mofu-Gudur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mig
+Description: San Miguel El Grande Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mih
+Description: Chayuco Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mii
+Description: Chigmecatitlán Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mij
+Description: Abar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mik
+Description: Mikasuki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mil
+Description: Peñoles Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mim
+Description: Alacatlatzala Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: min
+Description: Minangkabau
+Added: 2005-10-16
+Macrolanguage: ms
+%%
+Type: language
+Subtag: mio
+Description: Pinotepa Nacional Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mip
+Description: Apasco-Apoala Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: miq
+Description: Mískito
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mir
+Description: Isthmus Mixe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mis
+Description: Uncoded languages
+Added: 2005-10-16
+Scope: special
+%%
+Type: language
+Subtag: mit
+Description: Southern Puebla Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: miu
+Description: Cacaloxtepec Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: miw
+Description: Akoye
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mix
+Description: Mixtepec Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: miy
+Description: Ayutla Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: miz
+Description: Coatzospan Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mja
+Description: Mahei
+Added: 2009-07-29
+Deprecated: 2011-08-16
+%%
+Type: language
+Subtag: mjc
+Description: San Juan Colorado Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjd
+Description: Northwest Maidu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mje
+Description: Muskum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjg
+Description: Tu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjh
+Description: Mwera (Nyasa)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mji
+Description: Kim Mun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjj
+Description: Mawak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjk
+Description: Matukar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjl
+Description: Mandeali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjm
+Description: Medebur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjn
+Description: Ma (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjo
+Description: Malankuravan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjp
+Description: Malapandaram
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjq
+Description: Malaryan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjr
+Description: Malavedan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjs
+Description: Miship
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjt
+Description: Sauria Paharia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mju
+Description: Manna-Dora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjv
+Description: Mannan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjw
+Description: Karbi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjx
+Description: Mahali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjy
+Description: Mahican
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mjz
+Description: Majhi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mka
+Description: Mbre
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkb
+Description: Mal Paharia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkc
+Description: Siliput
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mke
+Description: Mawchi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkf
+Description: Miya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkg
+Description: Mak (China)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkh
+Description: Mon-Khmer languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: mki
+Description: Dhatki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkj
+Description: Mokilese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkk
+Description: Byep
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkl
+Description: Mokole
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkm
+Description: Moklen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkn
+Description: Kupang Malay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mko
+Description: Mingang Doso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkp
+Description: Moikodi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkq
+Description: Bay Miwok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkr
+Description: Malas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mks
+Description: Silacayoapan Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkt
+Description: Vamale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mku
+Description: Konyanka Maninka
+Added: 2009-07-29
+Macrolanguage: man
+%%
+Type: language
+Subtag: mkv
+Description: Mafea
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkw
+Description: Kituba (Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkx
+Description: Kinamiging Manobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mky
+Description: East Makian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mkz
+Description: Makasae
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mla
+Description: Malo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlb
+Description: Mbule
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlc
+Description: Cao Lan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mld
+Description: Malakhel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mle
+Description: Manambu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlf
+Description: Mal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlh
+Description: Mape
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mli
+Description: Malimpung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlj
+Description: Miltu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlk
+Description: Ilwana
+Description: Kiwilwana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mll
+Description: Malua Bay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlm
+Description: Mulam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mln
+Description: Malango
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlo
+Description: Mlomp
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlp
+Description: Bargam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlq
+Description: Western Maninkakan
+Added: 2009-07-29
+Macrolanguage: man
+%%
+Type: language
+Subtag: mlr
+Description: Vame
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mls
+Description: Masalit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlu
+Description: To'abaita
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlv
+Description: Motlav
+Description: Mwotlap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlw
+Description: Moloko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlx
+Description: Malfaxal
+Description: Naha'ai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mlz
+Description: Malaynon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mma
+Description: Mama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmb
+Description: Momina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmc
+Description: Michoacán Mazahua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmd
+Description: Maonan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mme
+Description: Mae
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmf
+Description: Mundat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmg
+Description: North Ambrym
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmh
+Description: Mehináku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmi
+Description: Musar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmj
+Description: Majhwar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmk
+Description: Mukha-Dora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mml
+Description: Man Met
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmm
+Description: Maii
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmn
+Description: Mamanwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmo
+Description: Mangga Buang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmp
+Description: Siawi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmq
+Description: Musak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmr
+Description: Western Xiangxi Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: mmt
+Description: Malalamai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmu
+Description: Mmaala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmv
+Description: Miriti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmw
+Description: Emae
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmx
+Description: Madak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmy
+Description: Migaama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mmz
+Description: Mabaale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mna
+Description: Mbula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mnb
+Description: Muna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mnc
+Description: Manchu
+Added: 2005-10-16
+%%
+Type: language
+Subtag: mnd
+Description: Mondé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mne
+Description: Naba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mnf
+Description: Mundani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mng
+Description: Eastern Mnong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mnh
+Description: Mono (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mni
+Description: Manipuri
+Added: 2005-10-16
+%%
+Type: language
+Subtag: mnj
+Description: Munji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mnk
+Description: Mandinka
+Added: 2009-07-29
+Macrolanguage: man
+%%
+Type: language
+Subtag: mnl
+Description: Tiale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mnm
+Description: Mapena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mnn
+Description: Southern Mnong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mno
+Description: Manobo languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: mnp
+Description: Min Bei Chinese
+Added: 2009-07-29
+Macrolanguage: zh
+%%
+Type: language
+Subtag: mnq
+Description: Minriq
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mnr
+Description: Mono (USA)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mns
+Description: Mansi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mnt
+Description: Maykulan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mnu
+Description: Mer
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mnv
+Description: Rennell-Bellona
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mnw
+Description: Mon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mnx
+Description: Manikion
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mny
+Description: Manyawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mnz
+Description: Moni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: moa
+Description: Mwan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: moc
+Description: Mocoví
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mod
+Description: Mobilian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: moe
+Description: Montagnais
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mof
+Description: Mohegan-Montauk-Narragansett
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Comments: see xnt, xpq
+%%
+Type: language
+Subtag: mog
+Description: Mongondow
+Added: 2009-07-29
+%%
+Type: language
+Subtag: moh
+Description: Mohawk
+Added: 2005-10-16
+%%
+Type: language
+Subtag: moi
+Description: Mboi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: moj
+Description: Monzombo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mok
+Description: Morori
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mom
+Description: Mangue
+Added: 2009-07-29
+%%
+Type: language
+Subtag: moo
+Description: Monom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mop
+Description: Mopán Maya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: moq
+Description: Mor (Bomberai Peninsula)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mor
+Description: Moro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mos
+Description: Mossi
+Added: 2005-10-16
+%%
+Type: language
+Subtag: mot
+Description: Barí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mou
+Description: Mogum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mov
+Description: Mohave
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mow
+Description: Moi (Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mox
+Description: Molima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: moy
+Description: Shekkacho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: moz
+Description: Mukulu
+Description: Gergiko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpa
+Description: Mpoto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpb
+Description: Mullukmulluk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpc
+Description: Mangarayi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpd
+Description: Machinere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpe
+Description: Majang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpg
+Description: Marba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mph
+Description: Maung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpi
+Description: Mpade
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpj
+Description: Martu Wangka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpk
+Description: Mbara (Chad)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpl
+Description: Middle Watut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpm
+Description: Yosondúa Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpn
+Description: Mindiri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpo
+Description: Miu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpp
+Description: Migabac
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpq
+Description: Matís
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpr
+Description: Vangunu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mps
+Description: Dadibi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpt
+Description: Mian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpu
+Description: Makuráp
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpv
+Description: Mungkip
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpw
+Description: Mapidian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpx
+Description: Misima-Panaeati
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpy
+Description: Mapia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mpz
+Description: Mpi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqa
+Description: Maba (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqb
+Description: Mbuko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqc
+Description: Mangole
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqe
+Description: Matepi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqf
+Description: Momuna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqg
+Description: Kota Bangun Kutai Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: mqh
+Description: Tlazoyaltepec Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqi
+Description: Mariri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqj
+Description: Mamasa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqk
+Description: Rajah Kabunsuwan Manobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mql
+Description: Mbelime
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqm
+Description: South Marquesan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqn
+Description: Moronene
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqo
+Description: Modole
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqp
+Description: Manipa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqq
+Description: Minokok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqr
+Description: Mander
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqs
+Description: West Makian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqt
+Description: Mok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqu
+Description: Mandari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqv
+Description: Mosimo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqw
+Description: Murupi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqx
+Description: Mamuju
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqy
+Description: Manggarai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mqz
+Description: Pano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mra
+Description: Mlabri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrb
+Description: Marino
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrc
+Description: Maricopa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrd
+Description: Western Magar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mre
+Description: Martha's Vineyard Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrf
+Description: Elseng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrg
+Description: Mising
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrh
+Description: Mara Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrj
+Description: Western Mari
+Added: 2009-07-29
+Macrolanguage: chm
+%%
+Type: language
+Subtag: mrk
+Description: Hmwaveke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrl
+Description: Mortlockese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrm
+Description: Merlav
+Description: Mwerlap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrn
+Description: Cheke Holo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mro
+Description: Mru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrp
+Description: Morouas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrq
+Description: North Marquesan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrr
+Description: Maria (India)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrs
+Description: Maragus
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrt
+Description: Marghi Central
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mru
+Description: Mono (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrv
+Description: Mangareva
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrw
+Description: Maranao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrx
+Description: Maremgi
+Description: Dineor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mry
+Description: Mandaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mrz
+Description: Marind
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msb
+Description: Masbatenyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msc
+Description: Sankaran Maninka
+Added: 2009-07-29
+Macrolanguage: man
+%%
+Type: language
+Subtag: msd
+Description: Yucatec Maya Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mse
+Description: Musey
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msf
+Description: Mekwei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msg
+Description: Moraid
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msh
+Description: Masikoro Malagasy
+Added: 2009-07-29
+Macrolanguage: mg
+%%
+Type: language
+Subtag: msi
+Description: Sabah Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: msj
+Description: Ma (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msk
+Description: Mansaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msl
+Description: Molof
+Description: Poule
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msm
+Description: Agusan Manobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msn
+Description: Vurës
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mso
+Description: Mombum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msp
+Description: Maritsauá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msq
+Description: Caac
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msr
+Description: Mongolian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mss
+Description: West Masela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mst
+Description: Cataelano Mandaya
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Preferred-Value: mry
+%%
+Type: language
+Subtag: msu
+Description: Musom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msv
+Description: Maslam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msw
+Description: Mansoanka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msx
+Description: Moresada
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msy
+Description: Aruamu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: msz
+Description: Momare
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mta
+Description: Cotabato Manobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtb
+Description: Anyin Morofo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtc
+Description: Munit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtd
+Description: Mualang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mte
+Description: Mono (Solomon Islands)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtf
+Description: Murik (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtg
+Description: Una
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mth
+Description: Munggui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mti
+Description: Maiwa (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtj
+Description: Moskona
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtk
+Description: Mbe'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtl
+Description: Montol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtm
+Description: Mator
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtn
+Description: Matagalpa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mto
+Description: Totontepec Mixe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtp
+Description: Wichí Lhamtés Nocten
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtq
+Description: Muong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtr
+Description: Mewari
+Added: 2009-07-29
+Macrolanguage: mwr
+%%
+Type: language
+Subtag: mts
+Description: Yora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtt
+Description: Mota
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtu
+Description: Tututepec Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtv
+Description: Asaro'o
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtw
+Description: Southern Binukidnon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mtx
+Description: Tidaá Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mty
+Description: Nabi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mua
+Description: Mundang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mub
+Description: Mubi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: muc
+Description: Mbu'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mud
+Description: Mednyj Aleut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mue
+Description: Media Lengua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mug
+Description: Musgu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: muh
+Description: Mündü
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mui
+Description: Musi
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: muj
+Description: Mabire
+Added: 2009-07-29
+%%
+Type: language
+Subtag: muk
+Description: Mugom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mul
+Description: Multiple languages
+Added: 2005-10-16
+Scope: special
+%%
+Type: language
+Subtag: mum
+Description: Maiwala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mun
+Description: Munda languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: muo
+Description: Nyong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mup
+Description: Malvi
+Added: 2009-07-29
+Macrolanguage: raj
+%%
+Type: language
+Subtag: muq
+Description: Eastern Xiangxi Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: mur
+Description: Murle
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mus
+Description: Creek
+Added: 2005-10-16
+%%
+Type: language
+Subtag: mut
+Description: Western Muria
+Added: 2009-07-29
+%%
+Type: language
+Subtag: muu
+Description: Yaaku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: muv
+Description: Muthuvan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mux
+Description: Bo-Ung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: muy
+Description: Muyang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: muz
+Description: Mursi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mva
+Description: Manam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvb
+Description: Mattole
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvd
+Description: Mamboru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mve
+Description: Marwari (Pakistan)
+Added: 2009-07-29
+Macrolanguage: mwr
+%%
+Type: language
+Subtag: mvf
+Description: Peripheral Mongolian
+Added: 2009-07-29
+Macrolanguage: mn
+%%
+Type: language
+Subtag: mvg
+Description: Yucuañe Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvh
+Description: Mulgi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvi
+Description: Miyako
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvk
+Description: Mekmek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvl
+Description: Mbara (Australia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvm
+Description: Muya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvn
+Description: Minaveha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvo
+Description: Marovo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvp
+Description: Duri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvq
+Description: Moere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvr
+Description: Marau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvs
+Description: Massep
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvt
+Description: Mpotovoro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvu
+Description: Marfa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvv
+Description: Tagal Murut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvw
+Description: Machinga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvx
+Description: Meoswar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvy
+Description: Indus Kohistani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mvz
+Description: Mesqan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwa
+Description: Mwatebu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwb
+Description: Juwal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwc
+Description: Are
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwd
+Description: Mudbura
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwe
+Description: Mwera (Chimwera)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwf
+Description: Murrinh-Patha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwg
+Description: Aiklep
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwh
+Description: Mouk-Aria
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwi
+Description: Labo
+Description: Ninde
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwj
+Description: Maligo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwk
+Description: Kita Maninkakan
+Added: 2009-07-29
+Macrolanguage: man
+%%
+Type: language
+Subtag: mwl
+Description: Mirandese
+Added: 2005-10-16
+%%
+Type: language
+Subtag: mwm
+Description: Sar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwn
+Description: Nyamwanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwo
+Description: Central Maewo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwp
+Description: Kala Lagaw Ya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwq
+Description: Mün Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwr
+Description: Marwari
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: mws
+Description: Mwimbi-Muthambi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwt
+Description: Moken
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwu
+Description: Mittu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwv
+Description: Mentawai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mww
+Description: Hmong Daw
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: mwx
+Description: Mediak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwy
+Description: Mosiro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mwz
+Description: Moingi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxa
+Description: Northwest Oaxaca Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxb
+Description: Tezoatlán Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxc
+Description: Manyika
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxd
+Description: Modang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxe
+Description: Mele-Fila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxf
+Description: Malgbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxg
+Description: Mbangala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxh
+Description: Mvuba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxi
+Description: Mozarabic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxj
+Description: Miju-Mishmi
+Description: Geman Deng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxk
+Description: Monumbo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxl
+Description: Maxi Gbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxm
+Description: Meramera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxn
+Description: Moi (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxo
+Description: Mbowe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxp
+Description: Tlahuitoltepec Mixe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxq
+Description: Juquila Mixe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxr
+Description: Murik (Malaysia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxs
+Description: Huitepec Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxt
+Description: Jamiltepec Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxu
+Description: Mada (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxv
+Description: Metlatónoc Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxw
+Description: Namo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxx
+Description: Mahou
+Description: Mawukakan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxy
+Description: Southeastern Nochixtlán Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mxz
+Description: Central Masela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myb
+Description: Mbay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myc
+Description: Mayeka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myd
+Description: Maramba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mye
+Description: Myene
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myf
+Description: Bambassi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myg
+Description: Manta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myh
+Description: Makah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myi
+Description: Mina (India)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myj
+Description: Mangayat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myk
+Description: Mamara Senoufo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myl
+Description: Moma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mym
+Description: Me'en
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myn
+Description: Mayan languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: myo
+Description: Anfillo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myp
+Description: Pirahã
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myq
+Description: Forest Maninka
+Added: 2009-07-29
+Macrolanguage: man
+%%
+Type: language
+Subtag: myr
+Description: Muniche
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mys
+Description: Mesmes
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myt
+Description: Sangab Mandaya
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Preferred-Value: mry
+%%
+Type: language
+Subtag: myu
+Description: Mundurukú
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myv
+Description: Erzya
+Added: 2005-10-16
+%%
+Type: language
+Subtag: myw
+Description: Muyuw
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myx
+Description: Masaaba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myy
+Description: Macuna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: myz
+Description: Classical Mandaic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mza
+Description: Santa María Zacatepec Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzb
+Description: Tumzabt
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzc
+Description: Madagascar Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzd
+Description: Malimba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mze
+Description: Morawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzg
+Description: Monastic Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzh
+Description: Wichí Lhamtés Güisnay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzi
+Description: Ixcatlán Mazatec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzj
+Description: Manya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzk
+Description: Nigeria Mambila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzl
+Description: Mazatlán Mixe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzm
+Description: Mumuye
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzn
+Description: Mazanderani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzo
+Description: Matipuhy
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzp
+Description: Movima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzq
+Description: Mori Atas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzr
+Description: Marúbo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzs
+Description: Macanese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzt
+Description: Mintil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzu
+Description: Inapang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzv
+Description: Manza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzw
+Description: Deg
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzx
+Description: Mawayana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzy
+Description: Mozambican Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: mzz
+Description: Maiadomu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: naa
+Description: Namla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nab
+Description: Southern Nambikuára
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nac
+Description: Narak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nad
+Description: Nijadali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nae
+Description: Naka'ela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: naf
+Description: Nabak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nag
+Description: Naga Pidgin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nah
+Description: Nahuatl languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: nai
+Description: North American Indian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: naj
+Description: Nalu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nak
+Description: Nakanai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nal
+Description: Nalik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nam
+Description: Ngan'gityemerri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nan
+Description: Min Nan Chinese
+Added: 2009-07-29
+Macrolanguage: zh
+%%
+Type: language
+Subtag: nao
+Description: Naaba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nap
+Description: Neapolitan
+Added: 2005-10-16
+%%
+Type: language
+Subtag: naq
+Description: Nama (Namibia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nar
+Description: Iguta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nas
+Description: Naasioi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nat
+Description: Hungworo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: naw
+Description: Nawuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nax
+Description: Nakwi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nay
+Description: Narrinyeri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: naz
+Description: Coatepec Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nba
+Description: Nyemba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbb
+Description: Ndoe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbc
+Description: Chang Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbd
+Description: Ngbinda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbe
+Description: Konyak Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbf
+Description: Naxi
+Added: 2009-07-29
+Deprecated: 2011-08-16
+Comments: see nru, nxq
+%%
+Type: language
+Subtag: nbg
+Description: Nagarchal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbh
+Description: Ngamo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbi
+Description: Mao Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbj
+Description: Ngarinman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbk
+Description: Nake
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbm
+Description: Ngbaka Ma'bo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbn
+Description: Kuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbo
+Description: Nkukoli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbp
+Description: Nnam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbq
+Description: Nggem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbr
+Description: Numana-Nunku-Gbantu-Numbu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbs
+Description: Namibian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbt
+Description: Na
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbu
+Description: Rongmei Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbv
+Description: Ngamambo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbw
+Description: Southern Ngbandi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nbx
+Description: Ngura
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nby
+Description: Ningera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nca
+Description: Iyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncb
+Description: Central Nicobarese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncc
+Description: Ponam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncd
+Description: Nachering
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nce
+Description: Yale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncf
+Description: Notsi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncg
+Description: Nisga'a
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nch
+Description: Central Huasteca Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nci
+Description: Classical Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncj
+Description: Northern Puebla Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nck
+Description: Nakara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncl
+Description: Michoacán Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncm
+Description: Nambo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncn
+Description: Nauna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nco
+Description: Sibe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncp
+Description: Ndaktup
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncr
+Description: Ncane
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncs
+Description: Nicaraguan Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nct
+Description: Chothe Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncu
+Description: Chumburung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncx
+Description: Central Puebla Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ncz
+Description: Natchez
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nda
+Description: Ndasa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndb
+Description: Kenswei Nsei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndc
+Description: Ndau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndd
+Description: Nde-Nsele-Nta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndf
+Description: Nadruvian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndg
+Description: Ndengereko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndh
+Description: Ndali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndi
+Description: Samba Leko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndj
+Description: Ndamba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndk
+Description: Ndaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndl
+Description: Ndolo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndm
+Description: Ndam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndn
+Description: Ngundi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndp
+Description: Ndo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndq
+Description: Ndombe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndr
+Description: Ndoola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nds
+Description: Low German
+Description: Low Saxon
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: ndt
+Description: Ndunga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndu
+Description: Dugun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndv
+Description: Ndut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndw
+Description: Ndobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndx
+Description: Nduga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndy
+Description: Lutos
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ndz
+Description: Ndogo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nea
+Description: Eastern Ngad'a
+Added: 2009-07-29
+%%
+Type: language
+Subtag: neb
+Description: Toura (Côte d'Ivoire)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nec
+Description: Nedebang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ned
+Description: Nde-Gbite
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nee
+Description: Nêlêmwa-Nixumwak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nef
+Description: Nefamese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: neg
+Description: Negidal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: neh
+Description: Nyenkha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nei
+Description: Neo-Hittite
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nej
+Description: Neko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nek
+Description: Neku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nem
+Description: Nemi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nen
+Description: Nengone
+Added: 2009-07-29
+%%
+Type: language
+Subtag: neo
+Description: Ná-Meo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: neq
+Description: North Central Mixe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ner
+Description: Yahadian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nes
+Description: Bhoti Kinnauri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: net
+Description: Nete
+Added: 2009-07-29
+%%
+Type: language
+Subtag: neu
+Description: Neo
+Added: 2012-08-12
+%%
+Type: language
+Subtag: nev
+Description: Nyaheun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: new
+Description: Newari
+Description: Nepal Bhasa
+Added: 2005-10-16
+%%
+Type: language
+Subtag: nex
+Description: Neme
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ney
+Description: Neyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nez
+Description: Nez Perce
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nfa
+Description: Dhao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nfd
+Description: Ahwai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nfl
+Description: Ayiwo
+Description: Äiwoo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nfr
+Description: Nafaanra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nfu
+Description: Mfumte
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nga
+Description: Ngbaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngb
+Description: Northern Ngbandi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngc
+Description: Ngombe (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngd
+Description: Ngando (Central African Republic)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nge
+Description: Ngemba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngf
+Description: Trans-New Guinea languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: ngg
+Description: Ngbaka Manza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngh
+Description: N/u
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngi
+Description: Ngizim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngj
+Description: Ngie
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngk
+Description: Ngalkbun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngl
+Description: Lomwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngm
+Description: Ngatik Men's Creole
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngn
+Description: Ngwo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngo
+Description: Ngoni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngp
+Description: Ngulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngq
+Description: Ngurimi
+Description: Ngoreme
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngr
+Description: Engdewu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngs
+Description: Gvoko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngt
+Description: Ngeq
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngu
+Description: Guerrero Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngv
+Description: Nagumi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngw
+Description: Ngwaba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngx
+Description: Nggwahyi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngy
+Description: Tibea
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ngz
+Description: Ngungwel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nha
+Description: Nhanda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhb
+Description: Beng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhc
+Description: Tabasco Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhd
+Description: Chiripá
+Description: Ava Guaraní
+Added: 2009-07-29
+Macrolanguage: gn
+%%
+Type: language
+Subtag: nhe
+Description: Eastern Huasteca Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhf
+Description: Nhuwala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhg
+Description: Tetelcingo Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhh
+Description: Nahari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhi
+Description: Zacatlán-Ahuacatlán-Tepetzintla Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhk
+Description: Isthmus-Cosoleacaque Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhm
+Description: Morelos Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhn
+Description: Central Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nho
+Description: Takuu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhp
+Description: Isthmus-Pajapan Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhq
+Description: Huaxcaleca Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhr
+Description: Naro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nht
+Description: Ometepec Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhu
+Description: Noone
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhv
+Description: Temascaltepec Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhw
+Description: Western Huasteca Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhx
+Description: Isthmus-Mecayapan Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhy
+Description: Northern Oaxaca Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nhz
+Description: Santa María La Alta Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nia
+Description: Nias
+Added: 2005-10-16
+%%
+Type: language
+Subtag: nib
+Description: Nakame
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nic
+Description: Niger-Kordofanian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: nid
+Description: Ngandi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nie
+Description: Niellim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nif
+Description: Nek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nig
+Description: Ngalakan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nih
+Description: Nyiha (Tanzania)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nii
+Description: Nii
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nij
+Description: Ngaju
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nik
+Description: Southern Nicobarese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nil
+Description: Nila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nim
+Description: Nilamba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nin
+Description: Ninzo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nio
+Description: Nganasan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: niq
+Description: Nandi
+Added: 2009-07-29
+Macrolanguage: kln
+%%
+Type: language
+Subtag: nir
+Description: Nimboran
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nis
+Description: Nimi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nit
+Description: Southeastern Kolami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: niu
+Description: Niuean
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: niv
+Description: Gilyak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: niw
+Description: Nimo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nix
+Description: Hema
+Added: 2009-07-29
+%%
+Type: language
+Subtag: niy
+Description: Ngiti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: niz
+Description: Ningil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nja
+Description: Nzanyi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: njb
+Description: Nocte Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: njd
+Description: Ndonde Hamba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: njh
+Description: Lotha Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nji
+Description: Gudanji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: njj
+Description: Njen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: njl
+Description: Njalgulgule
+Added: 2009-07-29
+%%
+Type: language
+Subtag: njm
+Description: Angami Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: njn
+Description: Liangmai Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: njo
+Description: Ao Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: njr
+Description: Njerep
+Added: 2009-07-29
+%%
+Type: language
+Subtag: njs
+Description: Nisa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: njt
+Description: Ndyuka-Trio Pidgin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nju
+Description: Ngadjunmaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: njx
+Description: Kunyi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: njy
+Description: Njyem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: njz
+Description: Nyishi
+Added: 2012-08-12
+%%
+Type: language
+Subtag: nka
+Description: Nkoya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkb
+Description: Khoibu Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkc
+Description: Nkongho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkd
+Description: Koireng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nke
+Description: Duke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkf
+Description: Inpui Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkg
+Description: Nekgini
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkh
+Description: Khezha Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nki
+Description: Thangal Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkj
+Description: Nakai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkk
+Description: Nokuku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkm
+Description: Namat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkn
+Description: Nkangala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nko
+Description: Nkonya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkp
+Description: Niuatoputapu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkq
+Description: Nkami
+Added: 2010-04-16
+%%
+Type: language
+Subtag: nkr
+Description: Nukuoro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nks
+Description: North Asmat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkt
+Description: Nyika (Tanzania)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nku
+Description: Bouna Kulango
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkv
+Description: Nyika (Malawi and Zambia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkw
+Description: Nkutu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkx
+Description: Nkoroo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nkz
+Description: Nkari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nla
+Description: Ngombale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nlc
+Description: Nalca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nle
+Description: East Nyala
+Added: 2009-07-29
+Macrolanguage: luy
+%%
+Type: language
+Subtag: nlg
+Description: Gela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nli
+Description: Grangali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nlj
+Description: Nyali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nlk
+Description: Ninia Yali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nll
+Description: Nihali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nln
+Description: Durango Nahuatl
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see azd, azn
+%%
+Type: language
+Subtag: nlo
+Description: Ngul
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nlr
+Description: Ngarla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nlu
+Description: Nchumbulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nlv
+Description: Orizaba Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nlx
+Description: Nahali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nly
+Description: Nyamal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nlz
+Description: Nalögo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nma
+Description: Maram Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmb
+Description: Big Nambas
+Description: V'ënen Taut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmc
+Description: Ngam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmd
+Description: Ndumu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nme
+Description: Mzieme Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmf
+Description: Tangkhul Naga (India)
+Added: 2009-07-29
+Comments: see ntx
+%%
+Type: language
+Subtag: nmg
+Description: Kwasio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmh
+Description: Monsang Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmi
+Description: Nyam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmj
+Description: Ngombe (Central African Republic)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmk
+Description: Namakura
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nml
+Description: Ndemli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmm
+Description: Manangba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmn
+Description: !Xóõ
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmo
+Description: Moyon Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmp
+Description: Nimanbur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmq
+Description: Nambya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmr
+Description: Nimbari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nms
+Description: Letemboi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmt
+Description: Namonuito
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmu
+Description: Northeast Maidu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmv
+Description: Ngamini
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmw
+Description: Nimoa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmx
+Description: Nama (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmy
+Description: Namuyi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nmz
+Description: Nawdm
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nna
+Description: Nyangumarta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnb
+Description: Nande
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnc
+Description: Nancere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnd
+Description: West Ambae
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nne
+Description: Ngandyera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnf
+Description: Ngaing
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nng
+Description: Maring Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnh
+Description: Ngiemboon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nni
+Description: North Nuaulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnj
+Description: Nyangatom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnk
+Description: Nankina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnl
+Description: Northern Rengma Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnm
+Description: Namia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnn
+Description: Ngete
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnp
+Description: Wancho Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnq
+Description: Ngindo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnr
+Description: Narungga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nns
+Description: Ningye
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnt
+Description: Nanticoke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnu
+Description: Dwang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnv
+Description: Nugunu (Australia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnw
+Description: Southern Nuni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnx
+Description: Ngong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nny
+Description: Nyangga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nnz
+Description: Nda'nda'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: noa
+Description: Woun Meu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: noc
+Description: Nuk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nod
+Description: Northern Thai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: noe
+Description: Nimadi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nof
+Description: Nomane
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nog
+Description: Nogai
+Added: 2005-10-16
+%%
+Type: language
+Subtag: noh
+Description: Nomu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: noi
+Description: Noiri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: noj
+Description: Nonuya
+Added: 2010-03-11
+%%
+Type: language
+Subtag: nok
+Description: Nooksack
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nom
+Description: Nocamán
+Added: 2009-07-29
+%%
+Type: language
+Subtag: non
+Description: Old Norse
+Added: 2005-10-16
+%%
+Type: language
+Subtag: noo
+Description: Nootka
+Added: 2009-07-29
+Deprecated: 2011-08-16
+Comments: see dtd, nuk
+%%
+Type: language
+Subtag: nop
+Description: Numanggang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: noq
+Description: Ngongo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nos
+Description: Eastern Nisu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: not
+Description: Nomatsiguenga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nou
+Description: Ewage-Notu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nov
+Description: Novial
+Added: 2009-07-29
+%%
+Type: language
+Subtag: now
+Description: Nyambo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: noy
+Description: Noy
+Added: 2009-07-29
+%%
+Type: language
+Subtag: noz
+Description: Nayi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: npa
+Description: Nar Phu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: npb
+Description: Nupbikha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: npg
+Description: Ponyo-Gongwang Naga
+Added: 2012-08-12
+%%
+Type: language
+Subtag: nph
+Description: Phom Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: npi
+Description: Nepali (individual language)
+Added: 2012-08-12
+Macrolanguage: ne
+%%
+Type: language
+Subtag: npl
+Description: Southeastern Puebla Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: npn
+Description: Mondropolon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: npo
+Description: Pochuri Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nps
+Description: Nipsan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: npu
+Description: Puimei Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: npy
+Description: Napu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nqg
+Description: Southern Nago
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nqk
+Description: Kura Ede Nago
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nqm
+Description: Ndom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nqn
+Description: Nen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nqo
+Description: N'Ko
+Description: N’Ko
+Added: 2006-06-05
+Suppress-Script: Nkoo
+%%
+Type: language
+Subtag: nqy
+Description: Akyaung Ari Naga
+Added: 2012-08-12
+%%
+Type: language
+Subtag: nra
+Description: Ngom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nrb
+Description: Nara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nrc
+Description: Noric
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nre
+Description: Southern Rengma Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nrg
+Description: Narango
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nri
+Description: Chokri Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nrl
+Description: Ngarluma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nrm
+Description: Narom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nrn
+Description: Norn
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nrp
+Description: North Picene
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nrr
+Description: Norra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nrt
+Description: Northern Kalapuya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nru
+Description: Narua
+Added: 2011-08-16
+%%
+Type: language
+Subtag: nrx
+Description: Ngurmbur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nrz
+Description: Lala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsa
+Description: Sangtam Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsc
+Description: Nshi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsd
+Description: Southern Nisu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nse
+Description: Nsenga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsf
+Description: Northwestern Nisu
+Added: 2012-08-12
+%%
+Type: language
+Subtag: nsg
+Description: Ngasa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsh
+Description: Ngoshie
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsi
+Description: Nigerian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsk
+Description: Naskapi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsl
+Description: Norwegian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsm
+Description: Sumi Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsn
+Description: Nehan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nso
+Description: Pedi
+Description: Northern Sotho
+Description: Sepedi
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: nsp
+Description: Nepalese Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsq
+Description: Northern Sierra Miwok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsr
+Description: Maritime Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nss
+Description: Nali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nst
+Description: Tase Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsu
+Description: Sierra Negra Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsv
+Description: Southwestern Nisu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsw
+Description: Navut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsx
+Description: Nsongo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsy
+Description: Nasal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nsz
+Description: Nisenan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nte
+Description: Nathembo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nti
+Description: Natioro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ntj
+Description: Ngaanyatjarra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ntk
+Description: Ikoma-Nata-Isenye
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ntm
+Description: Nateni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nto
+Description: Ntomba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ntp
+Description: Northern Tepehuan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ntr
+Description: Delo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nts
+Description: Natagaimas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ntu
+Description: Natügu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ntw
+Description: Nottoway
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ntx
+Description: Tangkhul Naga (Myanmar)
+Added: 2012-08-12
+Comments: see nmf
+%%
+Type: language
+Subtag: nty
+Description: Mantsi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ntz
+Description: Natanzi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nua
+Description: Yuaga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nub
+Description: Nubian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: nuc
+Description: Nukuini
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nud
+Description: Ngala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nue
+Description: Ngundu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nuf
+Description: Nusu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nug
+Description: Nungali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nuh
+Description: Ndunda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nui
+Description: Ngumbi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nuj
+Description: Nyole
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nuk
+Description: Nuu-chah-nulth
+Description: Nuuchahnulth
+Added: 2011-08-16
+%%
+Type: language
+Subtag: nul
+Description: Nusa Laut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: num
+Description: Niuafo'ou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nun
+Description: Anong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nuo
+Description: Nguôn
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nup
+Description: Nupe-Nupe-Tako
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nuq
+Description: Nukumanu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nur
+Description: Nukuria
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nus
+Description: Nuer
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nut
+Description: Nung (Viet Nam)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nuu
+Description: Ngbundu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nuv
+Description: Northern Nuni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nuw
+Description: Nguluwan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nux
+Description: Mehek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nuy
+Description: Nunggubuyu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nuz
+Description: Tlamacazapa Nahuatl
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nvh
+Description: Nasarian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nvm
+Description: Namiae
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nvo
+Description: Nyokon
+Added: 2012-08-12
+%%
+Type: language
+Subtag: nwa
+Description: Nawathinehena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nwb
+Description: Nyabwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nwc
+Description: Classical Newari
+Description: Classical Nepal Bhasa
+Description: Old Newari
+Added: 2005-10-16
+%%
+Type: language
+Subtag: nwe
+Description: Ngwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nwg
+Description: Ngayawung
+Added: 2012-08-12
+%%
+Type: language
+Subtag: nwi
+Description: Southwest Tanna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nwm
+Description: Nyamusa-Molo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nwo
+Description: Nauo
+Added: 2012-08-12
+%%
+Type: language
+Subtag: nwr
+Description: Nawaru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nwx
+Description: Middle Newar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nwy
+Description: Nottoway-Meherrin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nxa
+Description: Nauete
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nxd
+Description: Ngando (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nxe
+Description: Nage
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nxg
+Description: Ngad'a
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nxi
+Description: Nindi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nxk
+Description: Koki Naga
+Added: 2012-08-12
+%%
+Type: language
+Subtag: nxl
+Description: South Nuaulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nxm
+Description: Numidian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nxn
+Description: Ngawun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nxq
+Description: Naxi
+Added: 2011-08-16
+%%
+Type: language
+Subtag: nxr
+Description: Ninggerum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nxu
+Description: Narau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nxx
+Description: Nafri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyb
+Description: Nyangbo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyc
+Description: Nyanga-li
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyd
+Description: Nyore
+Description: Olunyole
+Added: 2009-07-29
+Macrolanguage: luy
+%%
+Type: language
+Subtag: nye
+Description: Nyengo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyf
+Description: Giryama
+Description: Kigiryama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyg
+Description: Nyindu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyh
+Description: Nyigina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyi
+Description: Ama (Sudan)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyj
+Description: Nyanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyk
+Description: Nyaneka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyl
+Description: Nyeu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nym
+Description: Nyamwezi
+Added: 2005-10-16
+%%
+Type: language
+Subtag: nyn
+Description: Nyankole
+Added: 2005-10-16
+%%
+Type: language
+Subtag: nyo
+Description: Nyoro
+Added: 2005-10-16
+%%
+Type: language
+Subtag: nyp
+Description: Nyang'i
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyq
+Description: Nayini
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyr
+Description: Nyiha (Malawi)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nys
+Description: Nyunga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyt
+Description: Nyawaygi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyu
+Description: Nyungwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyv
+Description: Nyulnyul
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyw
+Description: Nyaw
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyx
+Description: Nganyaywana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nyy
+Description: Nyakyusa-Ngonde
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nza
+Description: Tigon Mbembe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nzb
+Description: Njebi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nzi
+Description: Nzima
+Added: 2005-10-16
+%%
+Type: language
+Subtag: nzk
+Description: Nzakara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nzm
+Description: Zeme Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nzs
+Description: New Zealand Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nzu
+Description: Teke-Nzikou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nzy
+Description: Nzakambay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: nzz
+Description: Nanga Dama Dogon
+Added: 2010-03-11
+%%
+Type: language
+Subtag: oaa
+Description: Orok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oac
+Description: Oroch
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oar
+Description: Old Aramaic (up to 700 BCE)
+Description: Ancient Aramaic (up to 700 BCE)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oav
+Description: Old Avar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: obi
+Description: Obispeño
+Added: 2009-07-29
+%%
+Type: language
+Subtag: obk
+Description: Southern Bontok
+Added: 2010-03-11
+Macrolanguage: bnc
+%%
+Type: language
+Subtag: obl
+Description: Oblo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: obm
+Description: Moabite
+Added: 2009-07-29
+%%
+Type: language
+Subtag: obo
+Description: Obo Manobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: obr
+Description: Old Burmese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: obt
+Description: Old Breton
+Added: 2009-07-29
+%%
+Type: language
+Subtag: obu
+Description: Obulom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oca
+Description: Ocaina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: och
+Description: Old Chinese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oco
+Description: Old Cornish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ocu
+Description: Atzingo Matlatzinca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oda
+Description: Odut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: odk
+Description: Od
+Added: 2009-07-29
+%%
+Type: language
+Subtag: odt
+Description: Old Dutch
+Added: 2009-07-29
+%%
+Type: language
+Subtag: odu
+Description: Odual
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ofo
+Description: Ofo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ofs
+Description: Old Frisian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ofu
+Description: Efutop
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ogb
+Description: Ogbia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ogc
+Description: Ogbah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oge
+Description: Old Georgian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ogg
+Description: Ogbogolo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ogo
+Description: Khana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ogu
+Description: Ogbronuagum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oht
+Description: Old Hittite
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ohu
+Description: Old Hungarian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oia
+Description: Oirata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oin
+Description: Inebu One
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ojb
+Description: Northwestern Ojibwa
+Added: 2009-07-29
+Macrolanguage: oj
+%%
+Type: language
+Subtag: ojc
+Description: Central Ojibwa
+Added: 2009-07-29
+Macrolanguage: oj
+%%
+Type: language
+Subtag: ojg
+Description: Eastern Ojibwa
+Added: 2009-07-29
+Macrolanguage: oj
+%%
+Type: language
+Subtag: ojp
+Description: Old Japanese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ojs
+Description: Severn Ojibwa
+Added: 2009-07-29
+Macrolanguage: oj
+%%
+Type: language
+Subtag: ojv
+Description: Ontong Java
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ojw
+Description: Western Ojibwa
+Added: 2009-07-29
+Macrolanguage: oj
+%%
+Type: language
+Subtag: oka
+Description: Okanagan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: okb
+Description: Okobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: okd
+Description: Okodia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oke
+Description: Okpe (Southwestern Edo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: okg
+Description: Koko Babangk
+Added: 2012-08-12
+%%
+Type: language
+Subtag: okh
+Description: Koresh-e Rostam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oki
+Description: Okiek
+Added: 2009-07-29
+Macrolanguage: kln
+%%
+Type: language
+Subtag: okj
+Description: Oko-Juwoi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: okk
+Description: Kwamtim One
+Added: 2009-07-29
+%%
+Type: language
+Subtag: okl
+Description: Old Kentish Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: okm
+Description: Middle Korean (10th-16th cent.)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: okn
+Description: Oki-No-Erabu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oko
+Description: Old Korean (3rd-9th cent.)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: okr
+Description: Kirike
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oks
+Description: Oko-Eni-Osayen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oku
+Description: Oku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: okv
+Description: Orokaiva
+Added: 2009-07-29
+%%
+Type: language
+Subtag: okx
+Description: Okpe (Northwestern Edo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ola
+Description: Walungge
+Added: 2009-07-29
+%%
+Type: language
+Subtag: old
+Description: Mochi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ole
+Description: Olekha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: olm
+Description: Oloma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: olo
+Description: Livvi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: olr
+Description: Olrat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oma
+Description: Omaha-Ponca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: omb
+Description: East Ambae
+Added: 2009-07-29
+%%
+Type: language
+Subtag: omc
+Description: Mochica
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ome
+Description: Omejes
+Added: 2009-07-29
+%%
+Type: language
+Subtag: omg
+Description: Omagua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: omi
+Description: Omi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: omk
+Description: Omok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oml
+Description: Ombo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: omn
+Description: Minoan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: omo
+Description: Utarmbung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: omp
+Description: Old Manipuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: omq
+Description: Oto-Manguean languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: omr
+Description: Old Marathi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: omt
+Description: Omotik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: omu
+Description: Omurano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: omv
+Description: Omotic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: omw
+Description: South Tairora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: omx
+Description: Old Mon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ona
+Description: Ona
+Added: 2009-07-29
+%%
+Type: language
+Subtag: onb
+Description: Lingao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: one
+Description: Oneida
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ong
+Description: Olo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oni
+Description: Onin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: onj
+Description: Onjob
+Added: 2009-07-29
+%%
+Type: language
+Subtag: onk
+Description: Kabore One
+Added: 2009-07-29
+%%
+Type: language
+Subtag: onn
+Description: Onobasulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ono
+Description: Onondaga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: onp
+Description: Sartang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: onr
+Description: Northern One
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ons
+Description: Ono
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ont
+Description: Ontenu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: onu
+Description: Unua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: onw
+Description: Old Nubian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: onx
+Description: Onin Based Pidgin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ood
+Description: Tohono O'odham
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oog
+Description: Ong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oon
+Description: Önge
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oor
+Description: Oorlams
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oos
+Description: Old Ossetic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: opa
+Description: Okpamheri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: opk
+Description: Kopkaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: opm
+Description: Oksapmin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: opo
+Description: Opao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: opt
+Description: Opata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: opy
+Description: Ofayé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ora
+Description: Oroha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: orc
+Description: Orma
+Added: 2009-07-29
+Macrolanguage: om
+%%
+Type: language
+Subtag: ore
+Description: Orejón
+Added: 2009-07-29
+%%
+Type: language
+Subtag: org
+Description: Oring
+Added: 2009-07-29
+%%
+Type: language
+Subtag: orh
+Description: Oroqen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: orn
+Description: Orang Kanaq
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: oro
+Description: Orokolo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: orr
+Description: Oruma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ors
+Description: Orang Seletar
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: ort
+Description: Adivasi Oriya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oru
+Description: Ormuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: orv
+Description: Old Russian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: orw
+Description: Oro Win
+Added: 2009-07-29
+%%
+Type: language
+Subtag: orx
+Description: Oro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ory
+Description: Oriya (individual language)
+Added: 2012-08-12
+Macrolanguage: or
+%%
+Type: language
+Subtag: orz
+Description: Ormu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: osa
+Description: Osage
+Added: 2005-10-16
+%%
+Type: language
+Subtag: osc
+Description: Oscan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: osi
+Description: Osing
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oso
+Description: Ososo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: osp
+Description: Old Spanish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ost
+Description: Osatu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: osu
+Description: Southern One
+Added: 2009-07-29
+%%
+Type: language
+Subtag: osx
+Description: Old Saxon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ota
+Description: Ottoman Turkish (1500-1928)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: otb
+Description: Old Tibetan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: otd
+Description: Ot Danum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ote
+Description: Mezquital Otomi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oti
+Description: Oti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: otk
+Description: Old Turkish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: otl
+Description: Tilapa Otomi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: otm
+Description: Eastern Highland Otomi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: otn
+Description: Tenango Otomi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oto
+Description: Otomian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: otq
+Description: Querétaro Otomi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: otr
+Description: Otoro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ots
+Description: Estado de México Otomi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ott
+Description: Temoaya Otomi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: otu
+Description: Otuke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: otw
+Description: Ottawa
+Added: 2009-07-29
+Macrolanguage: oj
+%%
+Type: language
+Subtag: otx
+Description: Texcatepec Otomi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oty
+Description: Old Tamil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: otz
+Description: Ixtenco Otomi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oua
+Description: Tagargrent
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oub
+Description: Glio-Oubi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oue
+Description: Oune
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oui
+Description: Old Uighur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oum
+Description: Ouma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oun
+Description: !O!ung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: owi
+Description: Owiniga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: owl
+Description: Old Welsh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oyb
+Description: Oy
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oyd
+Description: Oyda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oym
+Description: Wayampi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: oyy
+Description: Oya'oya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ozm
+Description: Koonzime
+Added: 2009-07-29
+%%
+Type: language
+Subtag: paa
+Description: Papuan languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: pab
+Description: Parecís
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pac
+Description: Pacoh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pad
+Description: Paumarí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pae
+Description: Pagibete
+Added: 2009-07-29
+%%
+Type: language
+Subtag: paf
+Description: Paranawát
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pag
+Description: Pangasinan
+Added: 2005-10-16
+%%
+Type: language
+Subtag: pah
+Description: Tenharim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pai
+Description: Pe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pak
+Description: Parakanã
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pal
+Description: Pahlavi
+Added: 2005-10-16
+%%
+Type: language
+Subtag: pam
+Description: Pampanga
+Description: Kapampangan
+Added: 2005-10-16
+%%
+Type: language
+Subtag: pao
+Description: Northern Paiute
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pap
+Description: Papiamento
+Added: 2005-10-16
+%%
+Type: language
+Subtag: paq
+Description: Parya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: par
+Description: Panamint
+Description: Timbisha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pas
+Description: Papasena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pat
+Description: Papitalai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pau
+Description: Palauan
+Added: 2005-10-16
+%%
+Type: language
+Subtag: pav
+Description: Pakaásnovos
+Added: 2009-07-29
+%%
+Type: language
+Subtag: paw
+Description: Pawnee
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pax
+Description: Pankararé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pay
+Description: Pech
+Added: 2009-07-29
+%%
+Type: language
+Subtag: paz
+Description: Pankararú
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbb
+Description: Páez
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbc
+Description: Patamona
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbe
+Description: Mezontla Popoloca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbf
+Description: Coyotepec Popoloca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbg
+Description: Paraujano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbh
+Description: E'ñapa Woromaipu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbi
+Description: Parkwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbl
+Description: Mak (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbn
+Description: Kpasam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbo
+Description: Papel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbp
+Description: Badyara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbr
+Description: Pangwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbs
+Description: Central Pame
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbt
+Description: Southern Pashto
+Added: 2009-07-29
+Macrolanguage: ps
+%%
+Type: language
+Subtag: pbu
+Description: Northern Pashto
+Added: 2009-07-29
+Macrolanguage: ps
+%%
+Type: language
+Subtag: pbv
+Description: Pnar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pby
+Description: Pyu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pbz
+Description: Palu
+Added: 2009-07-29
+Deprecated: 2012-08-12
+%%
+Type: language
+Subtag: pca
+Description: Santa Inés Ahuatempan Popoloca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pcb
+Description: Pear
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pcc
+Description: Bouyei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pcd
+Description: Picard
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pce
+Description: Ruching Palaung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pcf
+Description: Paliyan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pcg
+Description: Paniya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pch
+Description: Pardhan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pci
+Description: Duruwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pcj
+Description: Parenga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pck
+Description: Paite Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pcl
+Description: Pardhi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pcm
+Description: Nigerian Pidgin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pcn
+Description: Piti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pcp
+Description: Pacahuara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pcr
+Description: Panang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pcw
+Description: Pyapun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pda
+Description: Anam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pdc
+Description: Pennsylvania German
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pdi
+Description: Pa Di
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pdn
+Description: Podena
+Description: Fedan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pdo
+Description: Padoe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pdt
+Description: Plautdietsch
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pdu
+Description: Kayan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pea
+Description: Peranakan Indonesian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: peb
+Description: Eastern Pomo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ped
+Description: Mala (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pee
+Description: Taje
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pef
+Description: Northeastern Pomo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: peg
+Description: Pengo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: peh
+Description: Bonan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pei
+Description: Chichimeca-Jonaz
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pej
+Description: Northern Pomo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pek
+Description: Penchal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pel
+Description: Pekal
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: pem
+Description: Phende
+Added: 2009-07-29
+%%
+Type: language
+Subtag: peo
+Description: Old Persian (ca. 600-400 B.C.)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: pep
+Description: Kunja
+Added: 2009-07-29
+%%
+Type: language
+Subtag: peq
+Description: Southern Pomo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pes
+Description: Iranian Persian
+Added: 2009-07-29
+Macrolanguage: fa
+%%
+Type: language
+Subtag: pev
+Description: Pémono
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pex
+Description: Petats
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pey
+Description: Petjo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pez
+Description: Eastern Penan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pfa
+Description: Pááfang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pfe
+Description: Peere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pfl
+Description: Pfaelzisch
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pga
+Description: Sudanese Creole Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: pgg
+Description: Pangwali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pgi
+Description: Pagi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pgk
+Description: Rerep
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pgl
+Description: Primitive Irish
+Added: 2011-08-16
+%%
+Type: language
+Subtag: pgn
+Description: Paelignian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pgs
+Description: Pangseng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pgu
+Description: Pagu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pgy
+Description: Pongyong
+Added: 2009-07-29
+Deprecated: 2012-08-12
+%%
+Type: language
+Subtag: pha
+Description: Pa-Hng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: phd
+Description: Phudagi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: phg
+Description: Phuong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: phh
+Description: Phukha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: phi
+Description: Philippine languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: phk
+Description: Phake
+Added: 2009-07-29
+%%
+Type: language
+Subtag: phl
+Description: Phalura
+Description: Palula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: phm
+Description: Phimbi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: phn
+Description: Phoenician
+Added: 2005-10-16
+%%
+Type: language
+Subtag: pho
+Description: Phunoi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: phq
+Description: Phana'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: phr
+Description: Pahari-Potwari
+Added: 2009-07-29
+Macrolanguage: lah
+%%
+Type: language
+Subtag: pht
+Description: Phu Thai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: phu
+Description: Phuan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: phv
+Description: Pahlavani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: phw
+Description: Phangduwali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pia
+Description: Pima Bajo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pib
+Description: Yine
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pic
+Description: Pinji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pid
+Description: Piaroa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pie
+Description: Piro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pif
+Description: Pingelapese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pig
+Description: Pisabo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pih
+Description: Pitcairn-Norfolk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pii
+Description: Pini
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pij
+Description: Pijao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pil
+Description: Yom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pim
+Description: Powhatan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pin
+Description: Piame
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pio
+Description: Piapoco
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pip
+Description: Pero
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pir
+Description: Piratapuyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pis
+Description: Pijin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pit
+Description: Pitta Pitta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: piu
+Description: Pintupi-Luritja
+Added: 2009-07-29
+%%
+Type: language
+Subtag: piv
+Description: Pileni
+Description: Vaeakau-Taumako
+Added: 2009-07-29
+%%
+Type: language
+Subtag: piw
+Description: Pimbwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pix
+Description: Piu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: piy
+Description: Piya-Kwonci
+Added: 2009-07-29
+%%
+Type: language
+Subtag: piz
+Description: Pije
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pjt
+Description: Pitjantjatjara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pka
+Description: Ardhamāgadhī Prākrit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pkb
+Description: Pokomo
+Description: Kipfokomo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pkc
+Description: Paekche
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pkg
+Description: Pak-Tong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pkh
+Description: Pankhu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pkn
+Description: Pakanha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pko
+Description: Pökoot
+Added: 2009-07-29
+Macrolanguage: kln
+%%
+Type: language
+Subtag: pkp
+Description: Pukapuka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pkr
+Description: Attapady Kurumba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pks
+Description: Pakistan Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pkt
+Description: Maleng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pku
+Description: Paku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pla
+Description: Miani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: plb
+Description: Polonombauk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: plc
+Description: Central Palawano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pld
+Description: Polari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ple
+Description: Palu'e
+Added: 2009-07-29
+%%
+Type: language
+Subtag: plf
+Description: Central Malayo-Polynesian languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: plg
+Description: Pilagá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: plh
+Description: Paulohi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: plj
+Description: Polci
+Added: 2009-07-29
+%%
+Type: language
+Subtag: plk
+Description: Kohistani Shina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pll
+Description: Shwe Palaung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pln
+Description: Palenquero
+Added: 2009-07-29
+%%
+Type: language
+Subtag: plo
+Description: Oluta Popoluca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: plp
+Description: Palpa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: plq
+Description: Palaic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: plr
+Description: Palaka Senoufo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pls
+Description: San Marcos Tlalcoyalco Popoloca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: plt
+Description: Plateau Malagasy
+Added: 2009-07-29
+Macrolanguage: mg
+%%
+Type: language
+Subtag: plu
+Description: Palikúr
+Added: 2009-07-29
+%%
+Type: language
+Subtag: plv
+Description: Southwest Palawano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: plw
+Description: Brooke's Point Palawano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ply
+Description: Bolyu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: plz
+Description: Paluan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pma
+Description: Paama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmb
+Description: Pambia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmc
+Description: Palumata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmd
+Description: Pallanganmiddang
+Added: 2012-08-12
+%%
+Type: language
+Subtag: pme
+Description: Pwaamei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmf
+Description: Pamona
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmh
+Description: Māhārāṣṭri Prākrit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmi
+Description: Northern Pumi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmj
+Description: Southern Pumi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmk
+Description: Pamlico
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pml
+Description: Lingua Franca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmm
+Description: Pomo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmn
+Description: Pam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmo
+Description: Pom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmq
+Description: Northern Pame
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmr
+Description: Paynamar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pms
+Description: Piemontese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmt
+Description: Tuamotuan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmu
+Description: Mirpur Panjabi
+Added: 2009-07-29
+Macrolanguage: lah
+%%
+Type: language
+Subtag: pmw
+Description: Plains Miwok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmx
+Description: Poumei Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmy
+Description: Papuan Malay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pmz
+Description: Southern Pame
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pna
+Description: Punan Bah-Biau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pnb
+Description: Western Panjabi
+Added: 2009-07-29
+Macrolanguage: lah
+%%
+Type: language
+Subtag: pnc
+Description: Pannei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pne
+Description: Western Penan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: png
+Description: Pongu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pnh
+Description: Penrhyn
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pni
+Description: Aoheng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pnk
+Description: Paunaka
+Added: 2012-08-12
+%%
+Type: language
+Subtag: pnm
+Description: Punan Batu 1
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pnn
+Description: Pinai-Hagahai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pno
+Description: Panobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pnp
+Description: Pancana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pnq
+Description: Pana (Burkina Faso)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pnr
+Description: Panim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pns
+Description: Ponosakan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pnt
+Description: Pontic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pnu
+Description: Jiongnai Bunu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pnv
+Description: Pinigura
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pnw
+Description: Panytyima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pnx
+Description: Phong-Kniang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pny
+Description: Pinyin
+Added: 2009-07-29
+Comments: a Niger-Congo language spoken in Cameroon; not to be confused
+  with the Pinyin romanization systems used for Chinese and Tibetan
+%%
+Type: language
+Subtag: pnz
+Description: Pana (Central African Republic)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: poc
+Description: Poqomam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pod
+Description: Ponares
+Added: 2009-07-29
+%%
+Type: language
+Subtag: poe
+Description: San Juan Atzingo Popoloca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pof
+Description: Poke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pog
+Description: Potiguára
+Added: 2009-07-29
+%%
+Type: language
+Subtag: poh
+Description: Poqomchi'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: poi
+Description: Highland Popoluca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pok
+Description: Pokangá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pom
+Description: Southeastern Pomo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pon
+Description: Pohnpeian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: poo
+Description: Central Pomo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pop
+Description: Pwapwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: poq
+Description: Texistepec Popoluca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pos
+Description: Sayula Popoluca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pot
+Description: Potawatomi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pov
+Description: Upper Guinea Crioulo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pow
+Description: San Felipe Otlaltepec Popoloca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pox
+Description: Polabian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: poy
+Description: Pogolo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: poz
+Description: Malayo-Polynesian languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: ppa
+Description: Pao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ppe
+Description: Papi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ppi
+Description: Paipai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ppk
+Description: Uma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ppl
+Description: Pipil
+Description: Nicarao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ppm
+Description: Papuma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ppn
+Description: Papapana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ppo
+Description: Folopa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ppp
+Description: Pelende
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ppq
+Description: Pei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ppr
+Description: Piru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pps
+Description: San Luís Temalacayuca Popoloca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ppt
+Description: Pare
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ppu
+Description: Papora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pqa
+Description: Pa'a
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pqe
+Description: Eastern Malayo-Polynesian languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: pqm
+Description: Malecite-Passamaquoddy
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pqw
+Description: Western Malayo-Polynesian languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: pra
+Description: Prakrit languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: prb
+Description: Lua'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: prc
+Description: Parachi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: prd
+Description: Parsi-Dari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pre
+Description: Principense
+Added: 2009-07-29
+%%
+Type: language
+Subtag: prf
+Description: Paranan
+Added: 2010-03-11
+%%
+Type: language
+Subtag: prg
+Description: Prussian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: prh
+Description: Porohanon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pri
+Description: Paicî
+Added: 2009-07-29
+%%
+Type: language
+Subtag: prk
+Description: Parauk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: prl
+Description: Peruvian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: prm
+Description: Kibiri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: prn
+Description: Prasuni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pro
+Description: Old Provençal (to 1500)
+Description: Old Occitan (to 1500)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: prp
+Description: Parsi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: prq
+Description: Ashéninka Perené
+Added: 2009-07-29
+%%
+Type: language
+Subtag: prr
+Description: Puri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: prs
+Description: Dari
+Description: Afghan Persian
+Added: 2009-07-29
+Macrolanguage: fa
+%%
+Type: language
+Subtag: prt
+Description: Phai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pru
+Description: Puragi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: prw
+Description: Parawen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: prx
+Description: Purik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pry
+Description: Pray 3
+Added: 2009-07-29
+%%
+Type: language
+Subtag: prz
+Description: Providencia Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: psa
+Description: Asue Awyu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: psc
+Description: Persian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: psd
+Description: Plains Indian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pse
+Description: Central Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: psg
+Description: Penang Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: psh
+Description: Southwest Pashayi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: psi
+Description: Southeast Pashayi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: psl
+Description: Puerto Rican Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: psm
+Description: Pauserna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: psn
+Description: Panasuan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pso
+Description: Polish Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: psp
+Description: Philippine Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: psq
+Description: Pasi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: psr
+Description: Portuguese Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pss
+Description: Kaulong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pst
+Description: Central Pashto
+Added: 2009-07-29
+Macrolanguage: ps
+%%
+Type: language
+Subtag: psu
+Description: Sauraseni Prākrit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: psw
+Description: Port Sandwich
+Added: 2009-07-29
+%%
+Type: language
+Subtag: psy
+Description: Piscataway
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pta
+Description: Pai Tavytera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pth
+Description: Pataxó Hã-Ha-Hãe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pti
+Description: Pintiini
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ptn
+Description: Patani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pto
+Description: Zo'é
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ptp
+Description: Patep
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ptr
+Description: Piamatsina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ptt
+Description: Enrekang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ptu
+Description: Bambam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ptv
+Description: Port Vato
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ptw
+Description: Pentlatch
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pty
+Description: Pathiya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pua
+Description: Western Highland Purepecha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pub
+Description: Purum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: puc
+Description: Punan Merap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pud
+Description: Punan Aput
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pue
+Description: Puelche
+Added: 2009-07-29
+%%
+Type: language
+Subtag: puf
+Description: Punan Merah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pug
+Description: Phuie
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pui
+Description: Puinave
+Added: 2009-07-29
+%%
+Type: language
+Subtag: puj
+Description: Punan Tubu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: puk
+Description: Pu Ko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pum
+Description: Puma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: puo
+Description: Puoc
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pup
+Description: Pulabu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: puq
+Description: Puquina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pur
+Description: Puruborá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: put
+Description: Putoh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: puu
+Description: Punu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: puw
+Description: Puluwatese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pux
+Description: Puare
+Added: 2009-07-29
+%%
+Type: language
+Subtag: puy
+Description: Purisimeño
+Added: 2009-07-29
+%%
+Type: language
+Subtag: puz
+Description: Purum Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pwa
+Description: Pawaia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pwb
+Description: Panawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pwg
+Description: Gapapaiwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pwm
+Description: Molbog
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pwn
+Description: Paiwan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pwo
+Description: Pwo Western Karen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pwr
+Description: Powari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pww
+Description: Pwo Northern Karen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pxm
+Description: Quetzaltepec Mixe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pye
+Description: Pye Krumen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pym
+Description: Fyam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pyn
+Description: Poyanáwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pys
+Description: Paraguayan Sign Language
+Description: Lengua de Señas del Paraguay
+Added: 2010-03-11
+%%
+Type: language
+Subtag: pyu
+Description: Puyuma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pyx
+Description: Pyu (Myanmar)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pyy
+Description: Pyen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: pzn
+Description: Para Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: qaa..qtz
+Description: Private use
+Added: 2005-10-16
+Scope: private-use
+%%
+Type: language
+Subtag: qua
+Description: Quapaw
+Added: 2009-07-29
+%%
+Type: language
+Subtag: qub
+Description: Huallaga Huánuco Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: quc
+Description: K'iche'
+Description: Quiché
+Added: 2009-07-29
+%%
+Type: language
+Subtag: qud
+Description: Calderón Highland Quichua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: quf
+Description: Lambayeque Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qug
+Description: Chimborazo Highland Quichua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: quh
+Description: South Bolivian Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qui
+Description: Quileute
+Added: 2009-07-29
+%%
+Type: language
+Subtag: quk
+Description: Chachapoyas Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qul
+Description: North Bolivian Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qum
+Description: Sipacapense
+Added: 2009-07-29
+%%
+Type: language
+Subtag: qun
+Description: Quinault
+Added: 2009-07-29
+%%
+Type: language
+Subtag: qup
+Description: Southern Pastaza Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: quq
+Description: Quinqui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: qur
+Description: Yanahuanca Pasco Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qus
+Description: Santiago del Estero Quichua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: quv
+Description: Sacapulteco
+Added: 2009-07-29
+%%
+Type: language
+Subtag: quw
+Description: Tena Lowland Quichua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qux
+Description: Yauyos Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: quy
+Description: Ayacucho Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: quz
+Description: Cusco Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qva
+Description: Ambo-Pasco Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qvc
+Description: Cajamarca Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qve
+Description: Eastern Apurímac Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qvh
+Description: Huamalíes-Dos de Mayo Huánuco Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qvi
+Description: Imbabura Highland Quichua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qvj
+Description: Loja Highland Quichua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qvl
+Description: Cajatambo North Lima Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qvm
+Description: Margos-Yarowilca-Lauricocha Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qvn
+Description: North Junín Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qvo
+Description: Napo Lowland Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qvp
+Description: Pacaraos Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qvs
+Description: San Martín Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qvw
+Description: Huaylla Wanca Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qvy
+Description: Queyu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: qvz
+Description: Northern Pastaza Quichua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qwa
+Description: Corongo Ancash Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qwc
+Description: Classical Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qwe
+Description: Quechuan (family)
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: qwh
+Description: Huaylas Ancash Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qwm
+Description: Kuman (Russia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: qws
+Description: Sihuas Ancash Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qwt
+Description: Kwalhioqua-Tlatskanai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: qxa
+Description: Chiquián Ancash Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qxc
+Description: Chincha Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qxh
+Description: Panao Huánuco Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qxl
+Description: Salasaca Highland Quichua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qxn
+Description: Northern Conchucos Ancash Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qxo
+Description: Southern Conchucos Ancash Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qxp
+Description: Puno Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qxq
+Description: Qashqa'i
+Added: 2009-07-29
+%%
+Type: language
+Subtag: qxr
+Description: Cañar Highland Quichua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qxs
+Description: Southern Qiang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: qxt
+Description: Santa Ana de Tusi Pasco Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qxu
+Description: Arequipa-La Unión Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qxw
+Description: Jauja Wanca Quechua
+Added: 2009-07-29
+Macrolanguage: qu
+%%
+Type: language
+Subtag: qya
+Description: Quenya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: qyp
+Description: Quiripi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: raa
+Description: Dungmali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rab
+Description: Camling
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rac
+Description: Rasawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rad
+Description: Rade
+Added: 2009-07-29
+%%
+Type: language
+Subtag: raf
+Description: Western Meohang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rag
+Description: Logooli
+Description: Lulogooli
+Added: 2009-07-29
+Macrolanguage: luy
+%%
+Type: language
+Subtag: rah
+Description: Rabha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rai
+Description: Ramoaaina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: raj
+Description: Rajasthani
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: rak
+Description: Tulu-Bohuai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ral
+Description: Ralte
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ram
+Description: Canela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ran
+Description: Riantana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rao
+Description: Rao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rap
+Description: Rapanui
+Added: 2005-10-16
+%%
+Type: language
+Subtag: raq
+Description: Saam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rar
+Description: Rarotongan
+Description: Cook Islands Maori
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ras
+Description: Tegali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rat
+Description: Razajerdi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rau
+Description: Raute
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rav
+Description: Sampang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: raw
+Description: Rawang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rax
+Description: Rang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ray
+Description: Rapa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: raz
+Description: Rahambuu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rbb
+Description: Rumai Palaung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rbk
+Description: Northern Bontok
+Added: 2010-03-11
+Macrolanguage: bnc
+%%
+Type: language
+Subtag: rbl
+Description: Miraya Bikol
+Added: 2010-03-11
+Macrolanguage: bik
+%%
+Type: language
+Subtag: rbp
+Description: Barababaraba
+Added: 2012-08-12
+%%
+Type: language
+Subtag: rcf
+Description: Réunion Creole French
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rdb
+Description: Rudbari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rea
+Description: Rerau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: reb
+Description: Rembong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ree
+Description: Rejang Kayan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: reg
+Description: Kara (Tanzania)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rei
+Description: Reli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rej
+Description: Rejang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rel
+Description: Rendille
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rem
+Description: Remo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ren
+Description: Rengao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rer
+Description: Rer Bare
+Added: 2009-07-29
+%%
+Type: language
+Subtag: res
+Description: Reshe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ret
+Description: Retta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rey
+Description: Reyesano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rga
+Description: Roria
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rge
+Description: Romano-Greek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rgk
+Description: Rangkas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rgn
+Description: Romagnol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rgr
+Description: Resígaro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rgs
+Description: Southern Roglai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rgu
+Description: Ringgou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rhg
+Description: Rohingya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rhp
+Description: Yahang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ria
+Description: Riang (India)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rie
+Description: Rien
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rif
+Description: Tarifit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ril
+Description: Riang (Myanmar)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rim
+Description: Nyaturu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rin
+Description: Nungu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rir
+Description: Ribun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rit
+Description: Ritarungo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: riu
+Description: Riung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rjg
+Description: Rajong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rji
+Description: Raji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rjs
+Description: Rajbanshi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rka
+Description: Kraol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rkb
+Description: Rikbaktsa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rkh
+Description: Rakahanga-Manihiki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rki
+Description: Rakhine
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rkm
+Description: Marka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rkt
+Description: Rangpuri
+Description: Kamta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rma
+Description: Rama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rmb
+Description: Rembarunga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rmc
+Description: Carpathian Romani
+Added: 2009-07-29
+Macrolanguage: rom
+%%
+Type: language
+Subtag: rmd
+Description: Traveller Danish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rme
+Description: Angloromani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rmf
+Description: Kalo Finnish Romani
+Added: 2009-07-29
+Macrolanguage: rom
+%%
+Type: language
+Subtag: rmg
+Description: Traveller Norwegian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rmh
+Description: Murkim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rmi
+Description: Lomavren
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rmk
+Description: Romkun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rml
+Description: Baltic Romani
+Added: 2009-07-29
+Macrolanguage: rom
+%%
+Type: language
+Subtag: rmm
+Description: Roma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rmn
+Description: Balkan Romani
+Added: 2009-07-29
+Macrolanguage: rom
+%%
+Type: language
+Subtag: rmo
+Description: Sinte Romani
+Added: 2009-07-29
+Macrolanguage: rom
+%%
+Type: language
+Subtag: rmp
+Description: Rempi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rmq
+Description: Caló
+Added: 2010-03-11
+%%
+Type: language
+Subtag: rmr
+Description: Caló
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Comments: see emx, rmq
+%%
+Type: language
+Subtag: rms
+Description: Romanian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rmt
+Description: Domari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rmu
+Description: Tavringer Romani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rmv
+Description: Romanova
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rmw
+Description: Welsh Romani
+Added: 2009-07-29
+Macrolanguage: rom
+%%
+Type: language
+Subtag: rmx
+Description: Romam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rmy
+Description: Vlax Romani
+Added: 2009-07-29
+Macrolanguage: rom
+%%
+Type: language
+Subtag: rmz
+Description: Marma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rna
+Description: Runa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rnd
+Description: Ruund
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rng
+Description: Ronga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rnl
+Description: Ranglong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rnn
+Description: Roon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rnp
+Description: Rongpo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rnr
+Description: Nari Nari
+Added: 2012-08-20
+%%
+Type: language
+Subtag: rnw
+Description: Rungwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: roa
+Description: Romance languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: rob
+Description: Tae'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: roc
+Description: Cacgia Roglai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rod
+Description: Rogo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: roe
+Description: Ronji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rof
+Description: Rombo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rog
+Description: Northern Roglai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rol
+Description: Romblomanon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rom
+Description: Romany
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: roo
+Description: Rotokas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rop
+Description: Kriol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ror
+Description: Rongga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rou
+Description: Runga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: row
+Description: Dela-Oenale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rpn
+Description: Repanbitip
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rpt
+Description: Rapting
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rri
+Description: Ririo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rro
+Description: Waima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rrt
+Description: Arritinngithigh
+Added: 2012-08-12
+%%
+Type: language
+Subtag: rsb
+Description: Romano-Serbian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rsi
+Description: Rennellese Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rsl
+Description: Russian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rtc
+Description: Rungtu Chin
+Added: 2012-08-12
+%%
+Type: language
+Subtag: rth
+Description: Ratahan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rtm
+Description: Rotuman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rtw
+Description: Rathawi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rub
+Description: Gungu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ruc
+Description: Ruuli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rue
+Description: Rusyn
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ruf
+Description: Luguru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rug
+Description: Roviana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ruh
+Description: Ruga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rui
+Description: Rufiji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ruk
+Description: Che
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ruo
+Description: Istro Romanian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rup
+Description: Macedo-Romanian
+Description: Aromanian
+Description: Arumanian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ruq
+Description: Megleno Romanian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rut
+Description: Rutul
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ruu
+Description: Lanas Lobu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ruy
+Description: Mala (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ruz
+Description: Ruma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rwa
+Description: Rawo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rwk
+Description: Rwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rwm
+Description: Amba (Uganda)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rwo
+Description: Rawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rwr
+Description: Marwari (India)
+Added: 2009-07-29
+Macrolanguage: mwr
+%%
+Type: language
+Subtag: ryn
+Description: Northern Amami-Oshima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: rys
+Description: Yaeyama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ryu
+Description: Central Okinawan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: saa
+Description: Saba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sab
+Description: Buglere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sac
+Description: Meskwaki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sad
+Description: Sandawe
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sae
+Description: Sabanê
+Added: 2009-07-29
+%%
+Type: language
+Subtag: saf
+Description: Safaliba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sah
+Description: Yakut
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sai
+Description: South American Indian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: saj
+Description: Sahu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sak
+Description: Sake
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sal
+Description: Salishan languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: sam
+Description: Samaritan Aramaic
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sao
+Description: Sause
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sap
+Description: Sanapaná
+Added: 2009-07-29
+%%
+Type: language
+Subtag: saq
+Description: Samburu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sar
+Description: Saraveca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sas
+Description: Sasak
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sat
+Description: Santali
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sau
+Description: Saleman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sav
+Description: Saafi-Saafi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: saw
+Description: Sawi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sax
+Description: Sa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: say
+Description: Saya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: saz
+Description: Saurashtra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sba
+Description: Ngambay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbb
+Description: Simbo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbc
+Description: Kele (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbd
+Description: Southern Samo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbe
+Description: Saliba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbf
+Description: Shabo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbg
+Description: Seget
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbh
+Description: Sori-Harengan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbi
+Description: Seti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbj
+Description: Surbakhal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbk
+Description: Safwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbl
+Description: Botolan Sambal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbm
+Description: Sagala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbn
+Description: Sindhi Bhil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbo
+Description: Sabüm
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbp
+Description: Sangu (Tanzania)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbq
+Description: Sileibi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbr
+Description: Sembakung Murut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbs
+Description: Subiya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbt
+Description: Kimki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbu
+Description: Stod Bhoti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbv
+Description: Sabine
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbw
+Description: Simba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbx
+Description: Seberuang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sby
+Description: Soli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sbz
+Description: Sara Kaba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sca
+Description: Sansu
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Preferred-Value: hle
+%%
+Type: language
+Subtag: scb
+Description: Chut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sce
+Description: Dongxiang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: scf
+Description: San Miguel Creole French
+Added: 2009-07-29
+%%
+Type: language
+Subtag: scg
+Description: Sanggau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sch
+Description: Sakachep
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sci
+Description: Sri Lankan Creole Malay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sck
+Description: Sadri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: scl
+Description: Shina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: scn
+Description: Sicilian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sco
+Description: Scots
+Added: 2005-10-16
+%%
+Type: language
+Subtag: scp
+Description: Helambu Sherpa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: scq
+Description: Sa'och
+Added: 2009-07-29
+%%
+Type: language
+Subtag: scs
+Description: North Slavey
+Added: 2009-07-29
+Macrolanguage: den
+%%
+Type: language
+Subtag: scu
+Description: Shumcho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: scv
+Description: Sheni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: scw
+Description: Sha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: scx
+Description: Sicel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sda
+Description: Toraja-Sa'dan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdb
+Description: Shabak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdc
+Description: Sassarese Sardinian
+Added: 2009-07-29
+Macrolanguage: sc
+%%
+Type: language
+Subtag: sde
+Description: Surubu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdf
+Description: Sarli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdg
+Description: Savi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdh
+Description: Southern Kurdish
+Added: 2009-07-29
+Macrolanguage: ku
+%%
+Type: language
+Subtag: sdj
+Description: Suundi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdk
+Description: Sos Kundi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdl
+Description: Saudi Arabian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdm
+Description: Semandang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdn
+Description: Gallurese Sardinian
+Added: 2009-07-29
+Macrolanguage: sc
+%%
+Type: language
+Subtag: sdo
+Description: Bukar-Sadung Bidayuh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdp
+Description: Sherdukpen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdr
+Description: Oraon Sadri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sds
+Description: Sened
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdt
+Description: Shuadit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdu
+Description: Sarudu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdv
+Description: Eastern Sudanic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: sdx
+Description: Sibu Melanau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sdz
+Description: Sallands
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sea
+Description: Semai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: seb
+Description: Shempire Senoufo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sec
+Description: Sechelt
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sed
+Description: Sedang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: see
+Description: Seneca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sef
+Description: Cebaara Senoufo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: seg
+Description: Segeju
+Added: 2009-07-29
+%%
+Type: language
+Subtag: seh
+Description: Sena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sei
+Description: Seri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sej
+Description: Sene
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sek
+Description: Sekani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sel
+Description: Selkup
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sem
+Description: Semitic languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: sen
+Description: Nanerigé Sénoufo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: seo
+Description: Suarmin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sep
+Description: Sìcìté Sénoufo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: seq
+Description: Senara Sénoufo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ser
+Description: Serrano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ses
+Description: Koyraboro Senni Songhai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: set
+Description: Sentani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: seu
+Description: Serui-Laut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sev
+Description: Nyarafolo Senoufo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sew
+Description: Sewa Bay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sey
+Description: Secoya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sez
+Description: Senthang Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sfb
+Description: Langue des signes de Belgique Francophone
+Description: French Belgian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sfe
+Description: Eastern Subanen
+Added: 2012-08-12
+%%
+Type: language
+Subtag: sfm
+Description: Small Flowery Miao
+Added: 2009-07-29
+Macrolanguage: hmn
+%%
+Type: language
+Subtag: sfs
+Description: South African Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sfw
+Description: Sehwi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sga
+Description: Old Irish (to 900)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sgb
+Description: Mag-antsi Ayta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sgc
+Description: Kipsigis
+Added: 2009-07-29
+Macrolanguage: kln
+%%
+Type: language
+Subtag: sgd
+Description: Surigaonon
+Added: 2010-03-11
+%%
+Type: language
+Subtag: sge
+Description: Segai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sgg
+Description: Swiss-German Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sgh
+Description: Shughni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sgi
+Description: Suga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sgj
+Description: Surgujia
+Added: 2012-08-12
+%%
+Type: language
+Subtag: sgk
+Description: Sangkong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sgl
+Description: Sanglechi-Ishkashimi
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Comments: see isk, sgy
+%%
+Type: language
+Subtag: sgm
+Description: Singa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sgn
+Description: Sign languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: sgo
+Description: Songa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sgp
+Description: Singpho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sgr
+Description: Sangisari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sgs
+Description: Samogitian
+Added: 2010-07-26
+%%
+Type: language
+Subtag: sgt
+Description: Brokpake
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sgu
+Description: Salas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sgw
+Description: Sebat Bet Gurage
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sgx
+Description: Sierra Leone Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sgy
+Description: Sanglechi
+Added: 2010-03-11
+%%
+Type: language
+Subtag: sgz
+Description: Sursurunga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sha
+Description: Shall-Zwall
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shb
+Description: Ninam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shc
+Description: Sonde
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shd
+Description: Kundal Shahi
+Added: 2010-03-11
+%%
+Type: language
+Subtag: she
+Description: Sheko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shg
+Description: Shua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shh
+Description: Shoshoni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shi
+Description: Tachelhit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shj
+Description: Shatt
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shk
+Description: Shilluk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shl
+Description: Shendu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shm
+Description: Shahrudi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shn
+Description: Shan
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sho
+Description: Shanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shp
+Description: Shipibo-Conibo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shq
+Description: Sala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shr
+Description: Shi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shs
+Description: Shuswap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sht
+Description: Shasta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shu
+Description: Chadian Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: shv
+Description: Shehri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shw
+Description: Shwai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shx
+Description: She
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shy
+Description: Tachawit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: shz
+Description: Syenara Senoufo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sia
+Description: Akkala Sami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sib
+Description: Sebop
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sid
+Description: Sidamo
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sie
+Description: Simaa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sif
+Description: Siamou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sig
+Description: Paasaal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sih
+Description: Zire
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sii
+Description: Shom Peng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sij
+Description: Numbami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sik
+Description: Sikiana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sil
+Description: Tumulung Sisaala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sim
+Description: Mende (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sio
+Description: Siouan languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: sip
+Description: Sikkimese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: siq
+Description: Sonia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sir
+Description: Siri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sis
+Description: Siuslaw
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sit
+Description: Sino-Tibetan languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: siu
+Description: Sinagen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: siv
+Description: Sumariup
+Added: 2009-07-29
+%%
+Type: language
+Subtag: siw
+Description: Siwai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: six
+Description: Sumau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: siy
+Description: Sivandi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: siz
+Description: Siwi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sja
+Description: Epena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sjb
+Description: Sajau Basap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sjd
+Description: Kildin Sami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sje
+Description: Pite Sami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sjg
+Description: Assangori
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sjk
+Description: Kemi Sami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sjl
+Description: Sajalong
+Description: Miji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sjm
+Description: Mapun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sjn
+Description: Sindarin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sjo
+Description: Xibe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sjp
+Description: Surjapuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sjr
+Description: Siar-Lak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sjs
+Description: Senhaja De Srair
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sjt
+Description: Ter Sami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sju
+Description: Ume Sami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sjw
+Description: Shawnee
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ska
+Description: Skagit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skb
+Description: Saek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skc
+Description: Ma Manda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skd
+Description: Southern Sierra Miwok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ske
+Description: Seke (Vanuatu)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skf
+Description: Sakirabiá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skg
+Description: Sakalava Malagasy
+Added: 2009-07-29
+Macrolanguage: mg
+%%
+Type: language
+Subtag: skh
+Description: Sikule
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ski
+Description: Sika
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skj
+Description: Seke (Nepal)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skk
+Description: Sok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skm
+Description: Kutong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skn
+Description: Kolibugan Subanon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sko
+Description: Seko Tengah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skp
+Description: Sekapan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skq
+Description: Sininkere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skr
+Description: Seraiki
+Added: 2009-07-29
+Macrolanguage: lah
+%%
+Type: language
+Subtag: sks
+Description: Maia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skt
+Description: Sakata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sku
+Description: Sakao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skv
+Description: Skou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skw
+Description: Skepi Creole Dutch
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skx
+Description: Seko Padang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sky
+Description: Sikaiana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: skz
+Description: Sekar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sla
+Description: Slavic languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: slc
+Description: Sáliba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sld
+Description: Sissala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sle
+Description: Sholaga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: slf
+Description: Swiss-Italian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: slg
+Description: Selungai Murut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: slh
+Description: Southern Puget Sound Salish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sli
+Description: Lower Silesian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: slj
+Description: Salumá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sll
+Description: Salt-Yui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: slm
+Description: Pangutaran Sama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sln
+Description: Salinan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: slp
+Description: Lamaholot
+Added: 2009-07-29
+%%
+Type: language
+Subtag: slq
+Description: Salchuq
+Added: 2009-07-29
+%%
+Type: language
+Subtag: slr
+Description: Salar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sls
+Description: Singapore Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: slt
+Description: Sila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: slu
+Description: Selaru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: slw
+Description: Sialum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: slx
+Description: Salampasu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sly
+Description: Selayar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: slz
+Description: Ma'ya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sma
+Description: Southern Sami
+Added: 2005-10-16
+%%
+Type: language
+Subtag: smb
+Description: Simbari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smc
+Description: Som
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smd
+Description: Sama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smf
+Description: Auwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smg
+Description: Simbali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smh
+Description: Samei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smi
+Description: Sami languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: smj
+Description: Lule Sami
+Added: 2005-10-16
+%%
+Type: language
+Subtag: smk
+Description: Bolinao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sml
+Description: Central Sama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smm
+Description: Musasa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smn
+Description: Inari Sami
+Added: 2005-10-16
+%%
+Type: language
+Subtag: smp
+Description: Samaritan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smq
+Description: Samo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smr
+Description: Simeulue
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sms
+Description: Skolt Sami
+Added: 2005-10-16
+%%
+Type: language
+Subtag: smt
+Description: Simte
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smu
+Description: Somray
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smv
+Description: Samvedi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smw
+Description: Sumbawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smx
+Description: Samba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smy
+Description: Semnani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: smz
+Description: Simeku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snb
+Description: Sebuyau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snc
+Description: Sinaugoro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sne
+Description: Bau Bidayuh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snf
+Description: Noon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sng
+Description: Sanga (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snh
+Description: Shinabo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sni
+Description: Sensi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snj
+Description: Riverain Sango
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snk
+Description: Soninke
+Added: 2005-10-16
+%%
+Type: language
+Subtag: snl
+Description: Sangil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snm
+Description: Southern Ma'di
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snn
+Description: Siona
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sno
+Description: Snohomish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snp
+Description: Siane
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snq
+Description: Sangu (Gabon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snr
+Description: Sihan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sns
+Description: South West Bay
+Description: Nahavaq
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snu
+Description: Senggi
+Description: Viid
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snv
+Description: Sa'ban
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snw
+Description: Selee
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snx
+Description: Sam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sny
+Description: Saniyo-Hiyewe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: snz
+Description: Sinsauru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: soa
+Description: Thai Song
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sob
+Description: Sobei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: soc
+Description: So (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sod
+Description: Songoora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: soe
+Description: Songomeno
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sog
+Description: Sogdian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: soh
+Description: Aka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: soi
+Description: Sonha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: soj
+Description: Soi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sok
+Description: Sokoro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sol
+Description: Solos
+Added: 2009-07-29
+%%
+Type: language
+Subtag: son
+Description: Songhai languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: soo
+Description: Songo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sop
+Description: Songe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: soq
+Description: Kanasi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sor
+Description: Somrai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sos
+Description: Seeku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sou
+Description: Southern Thai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sov
+Description: Sonsorol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sow
+Description: Sowanda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sox
+Description: Swo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: soy
+Description: Miyobe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: soz
+Description: Temi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spb
+Description: Sepa (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spc
+Description: Sapé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spd
+Description: Saep
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spe
+Description: Sepa (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spg
+Description: Sian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spi
+Description: Saponi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spk
+Description: Sengo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spl
+Description: Selepet
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spm
+Description: Akukem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spo
+Description: Spokane
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spp
+Description: Supyire Senoufo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spq
+Description: Loreto-Ucayali Spanish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spr
+Description: Saparua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sps
+Description: Saposa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spt
+Description: Spiti Bhoti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spu
+Description: Sapuan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spv
+Description: Sambalpuri
+Description: Kosli
+Added: 2012-08-12
+Macrolanguage: or
+%%
+Type: language
+Subtag: spx
+Description: South Picene
+Added: 2009-07-29
+%%
+Type: language
+Subtag: spy
+Description: Sabaot
+Added: 2009-07-29
+Macrolanguage: kln
+%%
+Type: language
+Subtag: sqa
+Description: Shama-Sambuga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sqh
+Description: Shau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sqj
+Description: Albanian languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: sqk
+Description: Albanian Sign Language
+Added: 2012-08-12
+%%
+Type: language
+Subtag: sqm
+Description: Suma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sqn
+Description: Susquehannock
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sqo
+Description: Sorkhei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sqq
+Description: Sou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sqr
+Description: Siculo Arabic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sqs
+Description: Sri Lankan Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sqt
+Description: Soqotri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: squ
+Description: Squamish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sra
+Description: Saruga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: srb
+Description: Sora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: src
+Description: Logudorese Sardinian
+Added: 2009-07-29
+Macrolanguage: sc
+%%
+Type: language
+Subtag: sre
+Description: Sara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: srf
+Description: Nafi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: srg
+Description: Sulod
+Added: 2009-07-29
+%%
+Type: language
+Subtag: srh
+Description: Sarikoli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sri
+Description: Siriano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: srk
+Description: Serudung Murut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: srl
+Description: Isirawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: srm
+Description: Saramaccan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: srn
+Description: Sranan Tongo
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sro
+Description: Campidanese Sardinian
+Added: 2009-07-29
+Macrolanguage: sc
+%%
+Type: language
+Subtag: srq
+Description: Sirionó
+Added: 2009-07-29
+%%
+Type: language
+Subtag: srr
+Description: Serer
+Added: 2005-10-16
+%%
+Type: language
+Subtag: srs
+Description: Sarsi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: srt
+Description: Sauri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sru
+Description: Suruí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: srv
+Description: Southern Sorsoganon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: srw
+Description: Serua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: srx
+Description: Sirmauri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sry
+Description: Sera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: srz
+Description: Shahmirzadi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssa
+Description: Nilo-Saharan languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: ssb
+Description: Southern Sama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssc
+Description: Suba-Simbiti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssd
+Description: Siroi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sse
+Description: Balangingi
+Description: Bangingih Sama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssf
+Description: Thao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssg
+Description: Seimat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssh
+Description: Shihhi Arabic
+Added: 2009-07-29
+Macrolanguage: ar
+%%
+Type: language
+Subtag: ssi
+Description: Sansi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssj
+Description: Sausi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssk
+Description: Sunam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssl
+Description: Western Sisaala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssm
+Description: Semnam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssn
+Description: Waata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sso
+Description: Sissano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssp
+Description: Spanish Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssq
+Description: So'a
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssr
+Description: Swiss-French Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sss
+Description: Sô
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sst
+Description: Sinasina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssu
+Description: Susuami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssv
+Description: Shark Bay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssx
+Description: Samberigi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssy
+Description: Saho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ssz
+Description: Sengseng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sta
+Description: Settla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: stb
+Description: Northern Subanen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: std
+Description: Sentinel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ste
+Description: Liana-Seti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: stf
+Description: Seta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: stg
+Description: Trieng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sth
+Description: Shelta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sti
+Description: Bulo Stieng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: stj
+Description: Matya Samo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: stk
+Description: Arammba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: stl
+Description: Stellingwerfs
+Added: 2009-07-29
+%%
+Type: language
+Subtag: stm
+Description: Setaman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: stn
+Description: Owa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sto
+Description: Stoney
+Added: 2009-07-29
+%%
+Type: language
+Subtag: stp
+Description: Southeastern Tepehuan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: stq
+Description: Saterfriesisch
+Added: 2009-07-29
+%%
+Type: language
+Subtag: str
+Description: Straits Salish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sts
+Description: Shumashti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: stt
+Description: Budeh Stieng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: stu
+Description: Samtao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: stv
+Description: Silt'e
+Added: 2009-07-29
+%%
+Type: language
+Subtag: stw
+Description: Satawalese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sua
+Description: Sulka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sub
+Description: Suku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: suc
+Description: Western Subanon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sue
+Description: Suena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sug
+Description: Suganga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sui
+Description: Suki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: suj
+Description: Shubi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: suk
+Description: Sukuma
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sul
+Description: Surigaonon
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Comments: see sgd, tgn
+%%
+Type: language
+Subtag: sum
+Description: Sumo-Mayangna
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Comments: see ulw, yan
+%%
+Type: language
+Subtag: suq
+Description: Suri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sur
+Description: Mwaghavul
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sus
+Description: Susu
+Added: 2005-10-16
+%%
+Type: language
+Subtag: sut
+Description: Subtiaba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: suv
+Description: Puroik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: suw
+Description: Sumbwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sux
+Description: Sumerian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: suy
+Description: Suyá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: suz
+Description: Sunwar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sva
+Description: Svan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: svb
+Description: Ulau-Suain
+Added: 2009-07-29
+%%
+Type: language
+Subtag: svc
+Description: Vincentian Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sve
+Description: Serili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: svk
+Description: Slovakian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: svr
+Description: Savara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: svs
+Description: Savosavo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: svx
+Description: Skalvian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swb
+Description: Maore Comorian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swc
+Description: Congo Swahili
+Added: 2009-07-29
+Macrolanguage: sw
+%%
+Type: language
+Subtag: swf
+Description: Sere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swg
+Description: Swabian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swh
+Description: Swahili (individual language)
+Description: Kiswahili
+Added: 2009-07-29
+Macrolanguage: sw
+%%
+Type: language
+Subtag: swi
+Description: Sui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swj
+Description: Sira
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swk
+Description: Malawi Sena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swl
+Description: Swedish Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swm
+Description: Samosa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swn
+Description: Sawknah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swo
+Description: Shanenawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swp
+Description: Suau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swq
+Description: Sharwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swr
+Description: Saweru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sws
+Description: Seluwasan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swt
+Description: Sawila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swu
+Description: Suwawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swv
+Description: Shekhawati
+Added: 2009-07-29
+Macrolanguage: mwr
+%%
+Type: language
+Subtag: sww
+Description: Sowa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swx
+Description: Suruahá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: swy
+Description: Sarua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sxb
+Description: Suba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sxc
+Description: Sicanian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sxe
+Description: Sighu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sxg
+Description: Shixing
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sxk
+Description: Southern Kalapuya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sxl
+Description: Selian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sxm
+Description: Samre
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sxn
+Description: Sangir
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sxo
+Description: Sorothaptic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sxr
+Description: Saaroa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sxs
+Description: Sasaru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sxu
+Description: Upper Saxon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sxw
+Description: Saxwe Gbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sya
+Description: Siang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: syb
+Description: Central Subanen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: syc
+Description: Classical Syriac
+Added: 2007-04-03
+%%
+Type: language
+Subtag: syd
+Description: Samoyedic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: syi
+Description: Seki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: syk
+Description: Sukur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: syl
+Description: Sylheti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sym
+Description: Maya Samo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: syn
+Description: Senaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: syo
+Description: Suoy
+Added: 2009-07-29
+%%
+Type: language
+Subtag: syr
+Description: Syriac
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: sys
+Description: Sinyar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: syw
+Description: Kagate
+Added: 2009-07-29
+%%
+Type: language
+Subtag: syy
+Description: Al-Sayyid Bedouin Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sza
+Description: Semelai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: szb
+Description: Ngalum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: szc
+Description: Semaq Beri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: szd
+Description: Seru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: sze
+Description: Seze
+Added: 2009-07-29
+%%
+Type: language
+Subtag: szg
+Description: Sengele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: szl
+Description: Silesian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: szn
+Description: Sula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: szp
+Description: Suabo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: szv
+Description: Isu (Fako Division)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: szw
+Description: Sawai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: taa
+Description: Lower Tanana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tab
+Description: Tabassaran
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tac
+Description: Lowland Tarahumara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tad
+Description: Tause
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tae
+Description: Tariana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: taf
+Description: Tapirapé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tag
+Description: Tagoi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tai
+Description: Tai languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: taj
+Description: Eastern Tamang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tak
+Description: Tala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tal
+Description: Tal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tan
+Description: Tangale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tao
+Description: Yami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tap
+Description: Taabwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: taq
+Description: Tamasheq
+Added: 2009-07-29
+Macrolanguage: tmh
+%%
+Type: language
+Subtag: tar
+Description: Central Tarahumara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tas
+Description: Tay Boi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tau
+Description: Upper Tanana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tav
+Description: Tatuyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: taw
+Description: Tai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tax
+Description: Tamki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tay
+Description: Atayal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: taz
+Description: Tocho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tba
+Description: Aikanã
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbb
+Description: Tapeba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbc
+Description: Takia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbd
+Description: Kaki Ae
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbe
+Description: Tanimbili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbf
+Description: Mandara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbg
+Description: North Tairora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbh
+Description: Thurawal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbi
+Description: Gaam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbj
+Description: Tiang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbk
+Description: Calamian Tagbanwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbl
+Description: Tboli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbm
+Description: Tagbu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbn
+Description: Barro Negro Tunebo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbo
+Description: Tawala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbp
+Description: Taworta
+Description: Diebroud
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbq
+Description: Tibeto-Burman languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: tbr
+Description: Tumtum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbs
+Description: Tanguat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbt
+Description: Tembo (Kitembo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbu
+Description: Tubar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbv
+Description: Tobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbw
+Description: Tagbanwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbx
+Description: Kapin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tby
+Description: Tabaru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tbz
+Description: Ditammari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tca
+Description: Ticuna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcb
+Description: Tanacross
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcc
+Description: Datooga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcd
+Description: Tafi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tce
+Description: Southern Tutchone
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcf
+Description: Malinaltepec Me'phaa
+Description: Malinaltepec Tlapanec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcg
+Description: Tamagario
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tch
+Description: Turks And Caicos Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tci
+Description: Wára
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tck
+Description: Tchitchege
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcl
+Description: Taman (Myanmar)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcm
+Description: Tanahmerah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcn
+Description: Tichurong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tco
+Description: Taungyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcp
+Description: Tawr Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcq
+Description: Kaiy
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcs
+Description: Torres Strait Creole
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tct
+Description: T'en
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcu
+Description: Southeastern Tarahumara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcw
+Description: Tecpatlán Totonac
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcx
+Description: Toda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcy
+Description: Tulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tcz
+Description: Thado Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tda
+Description: Tagdal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdb
+Description: Panchpargania
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdc
+Description: Emberá-Tadó
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdd
+Description: Tai Nüa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tde
+Description: Tiranige Diga Dogon
+Added: 2010-03-11
+%%
+Type: language
+Subtag: tdf
+Description: Talieng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdg
+Description: Western Tamang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdh
+Description: Thulung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdi
+Description: Tomadino
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdj
+Description: Tajio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdk
+Description: Tambas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdl
+Description: Sur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdn
+Description: Tondano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdo
+Description: Teme
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdq
+Description: Tita
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdr
+Description: Todrah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tds
+Description: Doutai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdt
+Description: Tetun Dili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdu
+Description: Tempasuk Dusun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdv
+Description: Toro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tdx
+Description: Tandroy-Mahafaly Malagasy
+Added: 2009-07-29
+Macrolanguage: mg
+%%
+Type: language
+Subtag: tdy
+Description: Tadyawan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tea
+Description: Temiar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: teb
+Description: Tetete
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tec
+Description: Terik
+Added: 2009-07-29
+Macrolanguage: kln
+%%
+Type: language
+Subtag: ted
+Description: Tepo Krumen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tee
+Description: Huehuetla Tepehua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tef
+Description: Teressa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: teg
+Description: Teke-Tege
+Added: 2009-07-29
+%%
+Type: language
+Subtag: teh
+Description: Tehuelche
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tei
+Description: Torricelli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tek
+Description: Ibali Teke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tem
+Description: Timne
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: ten
+Description: Tama (Colombia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: teo
+Description: Teso
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tep
+Description: Tepecano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: teq
+Description: Temein
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ter
+Description: Tereno
+Added: 2005-10-16
+%%
+Type: language
+Subtag: tes
+Description: Tengger
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tet
+Description: Tetum
+Added: 2005-10-16
+%%
+Type: language
+Subtag: teu
+Description: Soo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tev
+Description: Teor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tew
+Description: Tewa (USA)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tex
+Description: Tennet
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tey
+Description: Tulishi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tfi
+Description: Tofin Gbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tfn
+Description: Tanaina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tfo
+Description: Tefaro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tfr
+Description: Teribe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tft
+Description: Ternate
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tga
+Description: Sagalla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgb
+Description: Tobilung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgc
+Description: Tigak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgd
+Description: Ciwogai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tge
+Description: Eastern Gorkha Tamang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgf
+Description: Chalikha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgg
+Description: Tangga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgh
+Description: Tobagonian Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgi
+Description: Lawunuia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgj
+Description: Tagin
+Added: 2012-08-12
+%%
+Type: language
+Subtag: tgn
+Description: Tandaganon
+Added: 2010-03-11
+%%
+Type: language
+Subtag: tgo
+Description: Sudest
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgp
+Description: Tangoa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgq
+Description: Tring
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgr
+Description: Tareng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgs
+Description: Nume
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgt
+Description: Central Tagbanwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgu
+Description: Tanggu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgv
+Description: Tingui-Boto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgw
+Description: Tagwana Senoufo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgx
+Description: Tagish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgy
+Description: Togoyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tgz
+Description: Tagalaka
+Added: 2012-08-12
+%%
+Type: language
+Subtag: thc
+Description: Tai Hang Tong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thd
+Description: Thayore
+Added: 2009-07-29
+%%
+Type: language
+Subtag: the
+Description: Chitwania Tharu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thf
+Description: Thangmi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thh
+Description: Northern Tarahumara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thi
+Description: Tai Long
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thk
+Description: Tharaka
+Description: Kitharaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thl
+Description: Dangaura Tharu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thm
+Description: Aheu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thn
+Description: Thachanadan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thp
+Description: Thompson
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thq
+Description: Kochila Tharu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thr
+Description: Rana Tharu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ths
+Description: Thakali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tht
+Description: Tahltan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thu
+Description: Thuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thv
+Description: Tahaggart Tamahaq
+Added: 2009-07-29
+Macrolanguage: tmh
+%%
+Type: language
+Subtag: thw
+Description: Thudam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thx
+Description: The
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thy
+Description: Tha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: thz
+Description: Tayart Tamajeq
+Added: 2009-07-29
+Macrolanguage: tmh
+%%
+Type: language
+Subtag: tia
+Description: Tidikelt Tamazight
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tic
+Description: Tira
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tid
+Description: Tidong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tie
+Description: Tingal
+Added: 2009-07-29
+Deprecated: 2011-08-16
+Preferred-Value: ras
+%%
+Type: language
+Subtag: tif
+Description: Tifal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tig
+Description: Tigre
+Added: 2005-10-16
+%%
+Type: language
+Subtag: tih
+Description: Timugon Murut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tii
+Description: Tiene
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tij
+Description: Tilung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tik
+Description: Tikar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: til
+Description: Tillamook
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tim
+Description: Timbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tin
+Description: Tindi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tio
+Description: Teop
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tip
+Description: Trimuris
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tiq
+Description: Tiéfo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tis
+Description: Masadiit Itneg
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tit
+Description: Tinigua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tiu
+Description: Adasen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tiv
+Description: Tiv
+Added: 2005-10-16
+%%
+Type: language
+Subtag: tiw
+Description: Tiwi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tix
+Description: Southern Tiwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tiy
+Description: Tiruray
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tiz
+Description: Tai Hongjin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tja
+Description: Tajuasohn
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tjg
+Description: Tunjung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tji
+Description: Northern Tujia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tjl
+Description: Tai Laing
+Added: 2012-08-12
+%%
+Type: language
+Subtag: tjm
+Description: Timucua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tjn
+Description: Tonjon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tjo
+Description: Temacine Tamazight
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tjs
+Description: Southern Tujia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tju
+Description: Tjurruru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tka
+Description: Truká
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tkb
+Description: Buksa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tkd
+Description: Tukudede
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tke
+Description: Takwane
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tkf
+Description: Tukumanféd
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tkg
+Description: Tesaka Malagasy
+Added: 2011-08-16
+Macrolanguage: mg
+%%
+Type: language
+Subtag: tkk
+Description: Takpa
+Added: 2009-07-29
+Deprecated: 2011-08-16
+Preferred-Value: twm
+%%
+Type: language
+Subtag: tkl
+Description: Tokelau
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: tkm
+Description: Takelma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tkn
+Description: Toku-No-Shima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tkp
+Description: Tikopia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tkq
+Description: Tee
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tkr
+Description: Tsakhur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tks
+Description: Takestani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tkt
+Description: Kathoriya Tharu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tku
+Description: Upper Necaxa Totonac
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tkw
+Description: Teanu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tkx
+Description: Tangko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tkz
+Description: Takua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tla
+Description: Southwestern Tepehuan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlb
+Description: Tobelo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlc
+Description: Yecuatla Totonac
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tld
+Description: Talaud
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlf
+Description: Telefol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlg
+Description: Tofanma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlh
+Description: Klingon
+Description: tlhIngan-Hol
+Added: 2005-10-16
+%%
+Type: language
+Subtag: tli
+Description: Tlingit
+Added: 2005-10-16
+%%
+Type: language
+Subtag: tlj
+Description: Talinga-Bwisi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlk
+Description: Taloki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tll
+Description: Tetela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlm
+Description: Tolomako
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tln
+Description: Talondo'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlo
+Description: Talodi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlp
+Description: Filomena Mata-Coahuitlán Totonac
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlq
+Description: Tai Loi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlr
+Description: Talise
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tls
+Description: Tambotalo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlt
+Description: Teluti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlu
+Description: Tulehu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlv
+Description: Taliabu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tlw
+Description: South Wemale
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Preferred-Value: weo
+%%
+Type: language
+Subtag: tlx
+Description: Khehek
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tly
+Description: Talysh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tma
+Description: Tama (Chad)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmb
+Description: Katbol
+Description: Avava
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmc
+Description: Tumak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmd
+Description: Haruai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tme
+Description: Tremembé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmf
+Description: Toba-Maskoy
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmg
+Description: Ternateño
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmh
+Description: Tamashek
+Added: 2005-10-16
+Suppress-Script: Latn
+Scope: macrolanguage
+%%
+Type: language
+Subtag: tmi
+Description: Tutuba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmj
+Description: Samarokena
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmk
+Description: Northwestern Tamang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tml
+Description: Tamnim Citak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmm
+Description: Tai Thanh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmn
+Description: Taman (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmo
+Description: Temoq
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmp
+Description: Tai Mène
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmq
+Description: Tumleo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmr
+Description: Jewish Babylonian Aramaic (ca. 200-1200 CE)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tms
+Description: Tima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmt
+Description: Tasmate
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmu
+Description: Iau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmv
+Description: Tembo (Motembo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmw
+Description: Temuan
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: tmy
+Description: Tami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tmz
+Description: Tamanaku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tna
+Description: Tacana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnb
+Description: Western Tunebo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnc
+Description: Tanimuca-Retuarã
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnd
+Description: Angosturas Tunebo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tne
+Description: Tinoc Kallahan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnf
+Description: Tangshewi
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Preferred-Value: prs
+%%
+Type: language
+Subtag: tng
+Description: Tobanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnh
+Description: Maiani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tni
+Description: Tandia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnk
+Description: Kwamera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnl
+Description: Lenakel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnm
+Description: Tabla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnn
+Description: North Tanna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tno
+Description: Toromono
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnp
+Description: Whitesands
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnq
+Description: Taino
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnr
+Description: Bedik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tns
+Description: Tenis
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnt
+Description: Tontemboan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnu
+Description: Tay Khang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnv
+Description: Tangchangya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnw
+Description: Tonsawang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnx
+Description: Tanema
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tny
+Description: Tongwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tnz
+Description: Tonga (Thailand)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tob
+Description: Toba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: toc
+Description: Coyutla Totonac
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tod
+Description: Toma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: toe
+Description: Tomedes
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tof
+Description: Gizrra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tog
+Description: Tonga (Nyasa)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: toh
+Description: Gitonga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: toi
+Description: Tonga (Zambia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: toj
+Description: Tojolabal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tol
+Description: Tolowa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tom
+Description: Tombulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: too
+Description: Xicotepec De Juárez Totonac
+Added: 2009-07-29
+%%
+Type: language
+Subtag: top
+Description: Papantla Totonac
+Added: 2009-07-29
+%%
+Type: language
+Subtag: toq
+Description: Toposa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tor
+Description: Togbo-Vara Banda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tos
+Description: Highland Totonac
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tou
+Description: Tho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tov
+Description: Upper Taromi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tow
+Description: Jemez
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tox
+Description: Tobian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: toy
+Description: Topoiyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: toz
+Description: To
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpa
+Description: Taupota
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpc
+Description: Azoyú Me'phaa
+Description: Azoyú Tlapanec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpe
+Description: Tippera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpf
+Description: Tarpia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpg
+Description: Kula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpi
+Description: Tok Pisin
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: tpj
+Description: Tapieté
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpk
+Description: Tupinikin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpl
+Description: Tlacoapa Me'phaa
+Description: Tlacoapa Tlapanec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpm
+Description: Tampulma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpn
+Description: Tupinambá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpo
+Description: Tai Pao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpp
+Description: Pisaflores Tepehua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpq
+Description: Tukpa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpr
+Description: Tuparí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpt
+Description: Tlachichilco Tepehua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpu
+Description: Tampuan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpv
+Description: Tanapag
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpw
+Description: Tupí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpx
+Description: Acatepec Me'phaa
+Description: Acatepec Tlapanec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpy
+Description: Trumai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tpz
+Description: Tinputz
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tqb
+Description: Tembé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tql
+Description: Lehali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tqm
+Description: Turumsa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tqn
+Description: Tenino
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tqo
+Description: Toaripi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tqp
+Description: Tomoip
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tqq
+Description: Tunni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tqr
+Description: Torona
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tqt
+Description: Western Totonac
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tqu
+Description: Touo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tqw
+Description: Tonkawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tra
+Description: Tirahi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trb
+Description: Terebu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trc
+Description: Copala Triqui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trd
+Description: Turi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tre
+Description: East Tarangan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trf
+Description: Trinidadian Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trg
+Description: Lishán Didán
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trh
+Description: Turaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tri
+Description: Trió
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trj
+Description: Toram
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trk
+Description: Turkic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: trl
+Description: Traveller Scottish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trm
+Description: Tregami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trn
+Description: Trinitario
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tro
+Description: Tarao Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trp
+Description: Kok Borok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trq
+Description: San Martín Itunyoso Triqui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trr
+Description: Taushiro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trs
+Description: Chicahuaxtla Triqui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trt
+Description: Tunggare
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tru
+Description: Turoyo
+Description: Surayt
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trv
+Description: Taroko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trw
+Description: Torwali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trx
+Description: Tringgus-Sembaan Bidayuh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: try
+Description: Turung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: trz
+Description: Torá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsa
+Description: Tsaangi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsb
+Description: Tsamai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsc
+Description: Tswa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsd
+Description: Tsakonian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tse
+Description: Tunisian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsf
+Description: Southwestern Tamang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsg
+Description: Tausug
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsh
+Description: Tsuvan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsi
+Description: Tsimshian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: tsj
+Description: Tshangla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsk
+Description: Tseku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsl
+Description: Ts'ün-Lao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsm
+Description: Turkish Sign Language
+Description: Türk İşaret Dili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsp
+Description: Northern Toussian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsq
+Description: Thai Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsr
+Description: Akei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tss
+Description: Taiwan Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tst
+Description: Tondi Songway Kiini
+Added: 2011-08-16
+%%
+Type: language
+Subtag: tsu
+Description: Tsou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsv
+Description: Tsogo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsw
+Description: Tsishingini
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsx
+Description: Mubami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsy
+Description: Tebul Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tsz
+Description: Purepecha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tta
+Description: Tutelo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttb
+Description: Gaa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttc
+Description: Tektiteko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttd
+Description: Tauade
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tte
+Description: Bwanabwana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttf
+Description: Tuotomb
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttg
+Description: Tutong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tth
+Description: Upper Ta'oih
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tti
+Description: Tobati
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttj
+Description: Tooro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttk
+Description: Totoro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttl
+Description: Totela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttm
+Description: Northern Tutchone
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttn
+Description: Towei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tto
+Description: Lower Ta'oih
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttp
+Description: Tombelala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttq
+Description: Tawallammat Tamajaq
+Added: 2009-07-29
+Macrolanguage: tmh
+%%
+Type: language
+Subtag: ttr
+Description: Tera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tts
+Description: Northeastern Thai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttt
+Description: Muslim Tat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttu
+Description: Torau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttv
+Description: Titan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttw
+Description: Long Wat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tty
+Description: Sikaritai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ttz
+Description: Tsum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tua
+Description: Wiarumus
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tub
+Description: Tübatulabal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tuc
+Description: Mutu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tud
+Description: Tuxá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tue
+Description: Tuyuca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tuf
+Description: Central Tunebo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tug
+Description: Tunia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tuh
+Description: Taulil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tui
+Description: Tupuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tuj
+Description: Tugutil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tul
+Description: Tula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tum
+Description: Tumbuka
+Added: 2005-10-16
+%%
+Type: language
+Subtag: tun
+Description: Tunica
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tuo
+Description: Tucano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tup
+Description: Tupi languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: tuq
+Description: Tedaga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tus
+Description: Tuscarora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tut
+Description: Altaic languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: tuu
+Description: Tututni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tuv
+Description: Turkana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tuw
+Description: Tungus languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: tux
+Description: Tuxináwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tuy
+Description: Tugen
+Added: 2009-07-29
+Macrolanguage: kln
+%%
+Type: language
+Subtag: tuz
+Description: Turka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tva
+Description: Vaghua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tvd
+Description: Tsuvadi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tve
+Description: Te'un
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tvk
+Description: Southeast Ambrym
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tvl
+Description: Tuvalu
+Added: 2005-10-16
+Suppress-Script: Latn
+%%
+Type: language
+Subtag: tvm
+Description: Tela-Masbuar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tvn
+Description: Tavoyan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tvo
+Description: Tidore
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tvs
+Description: Taveta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tvt
+Description: Tutsa Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tvu
+Description: Tunen
+Added: 2012-08-12
+%%
+Type: language
+Subtag: tvw
+Description: Sedoa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tvy
+Description: Timor Pidgin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twa
+Description: Twana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twb
+Description: Western Tawbuid
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twc
+Description: Teshenawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twd
+Description: Twents
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twe
+Description: Tewa (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twf
+Description: Northern Tiwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twg
+Description: Tereweng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twh
+Description: Tai Dón
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twl
+Description: Tawara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twm
+Description: Tawang Monpa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twn
+Description: Twendi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: two
+Description: Tswapong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twp
+Description: Ere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twq
+Description: Tasawaq
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twr
+Description: Southwestern Tarahumara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twt
+Description: Turiwára
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twu
+Description: Termanu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tww
+Description: Tuwari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twx
+Description: Tewe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: twy
+Description: Tawoyan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txa
+Description: Tombonuo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txb
+Description: Tokharian B
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txc
+Description: Tsetsaut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txe
+Description: Totoli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txg
+Description: Tangut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txh
+Description: Thracian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txi
+Description: Ikpeng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txm
+Description: Tomini
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txn
+Description: West Tarangan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txo
+Description: Toto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txq
+Description: Tii
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txr
+Description: Tartessian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txs
+Description: Tonsea
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txt
+Description: Citak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txu
+Description: Kayapó
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txx
+Description: Tatana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: txy
+Description: Tanosy Malagasy
+Added: 2009-07-29
+Macrolanguage: mg
+%%
+Type: language
+Subtag: tya
+Description: Tauya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tye
+Description: Kyenga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tyh
+Description: O'du
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tyi
+Description: Teke-Tsaayi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tyj
+Description: Tai Do
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tyl
+Description: Thu Lao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tyn
+Description: Kombai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: typ
+Description: Thaypan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tyr
+Description: Tai Daeng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tys
+Description: Tày Sa Pa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tyt
+Description: Tày Tac
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tyu
+Description: Kua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tyv
+Description: Tuvinian
+Added: 2005-10-16
+%%
+Type: language
+Subtag: tyx
+Description: Teke-Tyee
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tyz
+Description: Tày
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tza
+Description: Tanzanian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tzh
+Description: Tzeltal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tzj
+Description: Tz'utujil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tzm
+Description: Central Atlas Tamazight
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tzn
+Description: Tugun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tzo
+Description: Tzotzil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: tzx
+Description: Tabriak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uam
+Description: Uamué
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uan
+Description: Kuan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uar
+Description: Tairuma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uba
+Description: Ubang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ubi
+Description: Ubi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ubl
+Description: Buhi'non Bikol
+Added: 2010-03-11
+Macrolanguage: bik
+%%
+Type: language
+Subtag: ubr
+Description: Ubir
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ubu
+Description: Umbu-Ungu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uby
+Description: Ubykh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uda
+Description: Uda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ude
+Description: Udihe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: udg
+Description: Muduga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: udi
+Description: Udi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: udj
+Description: Ujir
+Added: 2009-07-29
+%%
+Type: language
+Subtag: udl
+Description: Wuzlam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: udm
+Description: Udmurt
+Added: 2005-10-16
+%%
+Type: language
+Subtag: udu
+Description: Uduk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ues
+Description: Kioko
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ufi
+Description: Ufim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uga
+Description: Ugaritic
+Added: 2005-10-16
+%%
+Type: language
+Subtag: ugb
+Description: Kuku-Ugbanh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uge
+Description: Ughele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ugn
+Description: Ugandan Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ugo
+Description: Ugong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ugy
+Description: Uruguayan Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uha
+Description: Uhami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uhn
+Description: Damal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uis
+Description: Uisai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uiv
+Description: Iyive
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uji
+Description: Tanjijili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uka
+Description: Kaburi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ukg
+Description: Ukuriguma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ukh
+Description: Ukhwejo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ukl
+Description: Ukrainian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ukp
+Description: Ukpe-Bayobiri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ukq
+Description: Ukwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uks
+Description: Urubú-Kaapor Sign Language
+Description: Kaapor Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uku
+Description: Ukue
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ukw
+Description: Ukwuani-Aboh-Ndoni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uky
+Description: Kuuk-Yak
+Added: 2012-08-12
+%%
+Type: language
+Subtag: ula
+Description: Fungwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ulb
+Description: Ulukwumi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ulc
+Description: Ulch
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ulf
+Description: Usku
+Description: Afra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uli
+Description: Ulithian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ulk
+Description: Meriam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ull
+Description: Ullatan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ulm
+Description: Ulumanda'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uln
+Description: Unserdeutsch
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ulu
+Description: Uma' Lung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ulw
+Description: Ulwa
+Added: 2010-03-11
+%%
+Type: language
+Subtag: uma
+Description: Umatilla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: umb
+Description: Umbundu
+Added: 2005-10-16
+%%
+Type: language
+Subtag: umc
+Description: Marrucinian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: umd
+Description: Umbindhamu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: umg
+Description: Umbuygamu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: umi
+Description: Ukit
+Added: 2009-07-29
+%%
+Type: language
+Subtag: umm
+Description: Umon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: umn
+Description: Makyan Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: umo
+Description: Umotína
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ump
+Description: Umpila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: umr
+Description: Umbugarla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ums
+Description: Pendau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: umu
+Description: Munsee
+Added: 2009-07-29
+Macrolanguage: del
+%%
+Type: language
+Subtag: una
+Description: North Watut
+Added: 2009-07-29
+%%
+Type: language
+Subtag: und
+Description: Undetermined
+Added: 2005-10-16
+Scope: special
+%%
+Type: language
+Subtag: une
+Description: Uneme
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ung
+Description: Ngarinyin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: unk
+Description: Enawené-Nawé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: unm
+Description: Unami
+Added: 2009-07-29
+Macrolanguage: del
+%%
+Type: language
+Subtag: unp
+Description: Worora
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see wro, xgu
+%%
+Type: language
+Subtag: unr
+Description: Mundari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: unx
+Description: Munda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: unz
+Description: Unde Kaili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uok
+Description: Uokha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: upi
+Description: Umeda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: upv
+Description: Uripiv-Wala-Rano-Atchin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ura
+Description: Urarina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urb
+Description: Urubú-Kaapor
+Description: Kaapor
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urc
+Description: Urningangg
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ure
+Description: Uru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urf
+Description: Uradhi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urg
+Description: Urigina
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urh
+Description: Urhobo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uri
+Description: Urim
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urj
+Description: Uralic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: urk
+Description: Urak Lawoi'
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: url
+Description: Urali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urm
+Description: Urapmin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urn
+Description: Uruangnirin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uro
+Description: Ura (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urp
+Description: Uru-Pa-In
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urr
+Description: Lehalurup
+Description: Löyöp
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urt
+Description: Urat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uru
+Description: Urumi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urv
+Description: Uruava
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urw
+Description: Sop
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urx
+Description: Urimo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ury
+Description: Orya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: urz
+Description: Uru-Eu-Wau-Wau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: usa
+Description: Usarufa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ush
+Description: Ushojo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: usi
+Description: Usui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: usk
+Description: Usaghade
+Added: 2009-07-29
+%%
+Type: language
+Subtag: usp
+Description: Uspanteco
+Added: 2009-07-29
+%%
+Type: language
+Subtag: usu
+Description: Uya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uta
+Description: Otank
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ute
+Description: Ute-Southern Paiute
+Added: 2009-07-29
+%%
+Type: language
+Subtag: utp
+Description: Amba (Solomon Islands)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: utr
+Description: Etulo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: utu
+Description: Utu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uum
+Description: Urum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uun
+Description: Kulon-Pazeh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uur
+Description: Ura (Vanuatu)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uuu
+Description: U
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uve
+Description: West Uvean
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uvh
+Description: Uri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uvl
+Description: Lote
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uwa
+Description: Kuku-Uwanh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uya
+Description: Doko-Uyanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: uzn
+Description: Northern Uzbek
+Added: 2009-07-29
+Macrolanguage: uz
+%%
+Type: language
+Subtag: uzs
+Description: Southern Uzbek
+Added: 2009-07-29
+Macrolanguage: uz
+%%
+Type: language
+Subtag: vaa
+Description: Vaagri Booli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vae
+Description: Vale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vaf
+Description: Vafsi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vag
+Description: Vagla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vah
+Description: Varhadi-Nagpuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vai
+Description: Vai
+Added: 2005-10-16
+%%
+Type: language
+Subtag: vaj
+Description: Vasekela Bushman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: val
+Description: Vehes
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vam
+Description: Vanimo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: van
+Description: Valman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vao
+Description: Vao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vap
+Description: Vaiphei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: var
+Description: Huarijio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vas
+Description: Vasavi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vau
+Description: Vanuma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vav
+Description: Varli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vay
+Description: Wayu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vbb
+Description: Southeast Babar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vbk
+Description: Southwestern Bontok
+Added: 2010-03-11
+Macrolanguage: bnc
+%%
+Type: language
+Subtag: vec
+Description: Venetian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ved
+Description: Veddah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vel
+Description: Veluws
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vem
+Description: Vemgo-Mabas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: veo
+Description: Ventureño
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vep
+Description: Veps
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ver
+Description: Mom Jango
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vgr
+Description: Vaghri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vgt
+Description: Vlaamse Gebarentaal
+Description: Flemish Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vic
+Description: Virgin Islands Creole English
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vid
+Description: Vidunda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vif
+Description: Vili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vig
+Description: Viemo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vil
+Description: Vilela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vin
+Description: Vinza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vis
+Description: Vishavan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vit
+Description: Viti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: viv
+Description: Iduna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vka
+Description: Kariyarra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vki
+Description: Ija-Zuba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vkj
+Description: Kujarge
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vkk
+Description: Kaur
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: vkl
+Description: Kulisusu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vkm
+Description: Kamakan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vko
+Description: Kodeoha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vkp
+Description: Korlai Creole Portuguese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vkt
+Description: Tenggarong Kutai Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: vku
+Description: Kurrama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vlp
+Description: Valpei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vls
+Description: Vlaams
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vma
+Description: Martuyhunira
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmb
+Description: Mbabaram
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmc
+Description: Juxtlahuaca Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmd
+Description: Mudu Koraga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vme
+Description: East Masela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmf
+Description: Mainfränkisch
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmg
+Description: Minigir
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmh
+Description: Maraghei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmi
+Description: Miwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmj
+Description: Ixtayutla Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmk
+Description: Makhuwa-Shirima
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vml
+Description: Malgana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmm
+Description: Mitlatongo Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmp
+Description: Soyaltepec Mazatec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmq
+Description: Soyaltepec Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmr
+Description: Marenje
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vms
+Description: Moksela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmu
+Description: Muluridyi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmv
+Description: Valley Maidu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmw
+Description: Makhuwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmx
+Description: Tamazola Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmy
+Description: Ayautla Mazatec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vmz
+Description: Mazatlán Mazatec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vnk
+Description: Vano
+Description: Lovono
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vnm
+Description: Vinmavis
+Description: Neve'ei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vnp
+Description: Vunapu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vor
+Description: Voro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vot
+Description: Votic
+Added: 2005-10-16
+%%
+Type: language
+Subtag: vra
+Description: Vera'a
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vro
+Description: Võro
+Added: 2009-07-29
+Macrolanguage: et
+%%
+Type: language
+Subtag: vrs
+Description: Varisi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vrt
+Description: Burmbar
+Description: Banam Bay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vsi
+Description: Moldova Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vsl
+Description: Venezuelan Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vsv
+Description: Valencian Sign Language
+Description: Llengua de signes valenciana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vto
+Description: Vitou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vum
+Description: Vumbu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vun
+Description: Vunjo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vut
+Description: Vute
+Added: 2009-07-29
+%%
+Type: language
+Subtag: vwa
+Description: Awa (China)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: waa
+Description: Walla Walla
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wab
+Description: Wab
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wac
+Description: Wasco-Wishram
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wad
+Description: Wandamen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wae
+Description: Walser
+Added: 2009-07-29
+%%
+Type: language
+Subtag: waf
+Description: Wakoná
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wag
+Description: Wa'ema
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wah
+Description: Watubela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wai
+Description: Wares
+Added: 2009-07-29
+%%
+Type: language
+Subtag: waj
+Description: Waffa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wak
+Description: Wakashan languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: wal
+Description: Wolaytta
+Description: Wolaitta
+Added: 2005-10-16
+%%
+Type: language
+Subtag: wam
+Description: Wampanoag
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wan
+Description: Wan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wao
+Description: Wappo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wap
+Description: Wapishana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: waq
+Description: Wageman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: war
+Description: Waray (Philippines)
+Added: 2005-10-16
+%%
+Type: language
+Subtag: was
+Description: Washo
+Added: 2005-10-16
+%%
+Type: language
+Subtag: wat
+Description: Kaninuwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wau
+Description: Waurá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wav
+Description: Waka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: waw
+Description: Waiwai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wax
+Description: Watam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: way
+Description: Wayana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: waz
+Description: Wampur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wba
+Description: Warao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wbb
+Description: Wabo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wbe
+Description: Waritai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wbf
+Description: Wara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wbh
+Description: Wanda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wbi
+Description: Vwanji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wbj
+Description: Alagwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wbk
+Description: Waigali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wbl
+Description: Wakhi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wbm
+Description: Wa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wbp
+Description: Warlpiri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wbq
+Description: Waddar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wbr
+Description: Wagdi
+Added: 2009-07-29
+Macrolanguage: raj
+%%
+Type: language
+Subtag: wbt
+Description: Wanman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wbv
+Description: Wajarri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wbw
+Description: Woi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wca
+Description: Yanomámi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wci
+Description: Waci Gbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wdd
+Description: Wandji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wdg
+Description: Wadaginam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wdj
+Description: Wadjiginy
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wdu
+Description: Wadjigu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wea
+Description: Wewaw
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wec
+Description: Wè Western
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wed
+Description: Wedau
+Added: 2009-07-29
+%%
+Type: language
+Subtag: weh
+Description: Weh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wei
+Description: Kiunum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wem
+Description: Weme Gbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wen
+Description: Sorbian languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: weo
+Description: Wemale
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wep
+Description: Westphalien
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wer
+Description: Weri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wes
+Description: Cameroon Pidgin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wet
+Description: Perai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: weu
+Description: Rawngtu Chin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wew
+Description: Wejewa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wfg
+Description: Yafi
+Description: Zorop
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wga
+Description: Wagaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wgb
+Description: Wagawaga
+Added: 2010-03-11
+%%
+Type: language
+Subtag: wgg
+Description: Wangganguru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wgi
+Description: Wahgi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wgo
+Description: Waigeo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wgu
+Description: Wirangu
+Added: 2012-08-12
+%%
+Type: language
+Subtag: wgw
+Description: Wagawaga
+Added: 2009-07-29
+Deprecated: 2010-03-11
+Comments: see wgb, ylb
+%%
+Type: language
+Subtag: wgy
+Description: Warrgamay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wha
+Description: Manusela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: whg
+Description: North Wahgi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: whk
+Description: Wahau Kenyah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: whu
+Description: Wahau Kayan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wib
+Description: Southern Toussian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wic
+Description: Wichita
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wie
+Description: Wik-Epa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wif
+Description: Wik-Keyangan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wig
+Description: Wik-Ngathana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wih
+Description: Wik-Me'anha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wii
+Description: Minidien
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wij
+Description: Wik-Iiyanh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wik
+Description: Wikalkan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wil
+Description: Wilawila
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wim
+Description: Wik-Mungkan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: win
+Description: Ho-Chunk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wir
+Description: Wiraféd
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wit
+Description: Wintu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wiu
+Description: Wiru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wiv
+Description: Vitu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wiw
+Description: Wirangu
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see nwo, wgu
+%%
+Type: language
+Subtag: wiy
+Description: Wiyot
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wja
+Description: Waja
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wji
+Description: Warji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wka
+Description: Kw'adza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wkb
+Description: Kumbaran
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wkd
+Description: Wakde
+Description: Mo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wkl
+Description: Kalanadi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wku
+Description: Kunduvadi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wkw
+Description: Wakawaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wla
+Description: Walio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wlc
+Description: Mwali Comorian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wle
+Description: Wolane
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wlg
+Description: Kunbarlang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wli
+Description: Waioli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wlk
+Description: Wailaki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wll
+Description: Wali (Sudan)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wlm
+Description: Middle Welsh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wlo
+Description: Wolio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wlr
+Description: Wailapa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wls
+Description: Wallisian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wlu
+Description: Wuliwuli
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wlv
+Description: Wichí Lhamtés Vejoz
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wlw
+Description: Walak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wlx
+Description: Wali (Ghana)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wly
+Description: Waling
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wma
+Description: Mawa (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wmb
+Description: Wambaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wmc
+Description: Wamas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wmd
+Description: Mamaindé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wme
+Description: Wambule
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wmh
+Description: Waima'a
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wmi
+Description: Wamin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wmm
+Description: Maiwa (Indonesia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wmn
+Description: Waamwang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wmo
+Description: Wom (Papua New Guinea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wms
+Description: Wambon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wmt
+Description: Walmajarri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wmw
+Description: Mwani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wmx
+Description: Womo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wnb
+Description: Wanambre
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wnc
+Description: Wantoat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wnd
+Description: Wandarang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wne
+Description: Waneci
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wng
+Description: Wanggom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wni
+Description: Ndzwani Comorian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wnk
+Description: Wanukaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wnm
+Description: Wanggamala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wno
+Description: Wano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wnp
+Description: Wanap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wnu
+Description: Usan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wny
+Description: Wanyi
+Added: 2012-08-12
+%%
+Type: language
+Subtag: woa
+Description: Tyaraity
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wob
+Description: Wè Northern
+Added: 2009-07-29
+%%
+Type: language
+Subtag: woc
+Description: Wogeo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wod
+Description: Wolani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: woe
+Description: Woleaian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wof
+Description: Gambian Wolof
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wog
+Description: Wogamusin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: woi
+Description: Kamang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wok
+Description: Longto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wom
+Description: Wom (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: won
+Description: Wongo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: woo
+Description: Manombai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wor
+Description: Woria
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wos
+Description: Hanga Hundi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wow
+Description: Wawonii
+Added: 2009-07-29
+%%
+Type: language
+Subtag: woy
+Description: Weyto
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wpc
+Description: Maco
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wra
+Description: Warapu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wrb
+Description: Warluwara
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wrd
+Description: Warduji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wrg
+Description: Warungu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wrh
+Description: Wiradhuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wri
+Description: Wariyangga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wrk
+Description: Garrwa
+Added: 2012-08-12
+%%
+Type: language
+Subtag: wrl
+Description: Warlmanpa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wrm
+Description: Warumungu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wrn
+Description: Warnang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wro
+Description: Worrorra
+Added: 2012-08-12
+%%
+Type: language
+Subtag: wrp
+Description: Waropen
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wrr
+Description: Wardaman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wrs
+Description: Waris
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wru
+Description: Waru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wrv
+Description: Waruna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wrw
+Description: Gugu Warra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wrx
+Description: Wae Rana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wry
+Description: Merwari
+Added: 2009-07-29
+Macrolanguage: mwr
+%%
+Type: language
+Subtag: wrz
+Description: Waray (Australia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wsa
+Description: Warembori
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wsi
+Description: Wusi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wsk
+Description: Waskia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wsr
+Description: Owenia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wss
+Description: Wasa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wsu
+Description: Wasu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wsv
+Description: Wotapuri-Katarqalai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wtf
+Description: Watiwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wti
+Description: Berta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wtk
+Description: Watakataui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wtm
+Description: Mewati
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wtw
+Description: Wotu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wua
+Description: Wikngenchera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wub
+Description: Wunambal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wud
+Description: Wudu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wuh
+Description: Wutunhua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wul
+Description: Silimo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wum
+Description: Wumbvu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wun
+Description: Bungu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wur
+Description: Wurrugu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wut
+Description: Wutung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wuu
+Description: Wu Chinese
+Added: 2009-07-29
+Macrolanguage: zh
+%%
+Type: language
+Subtag: wuv
+Description: Wuvulu-Aua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wux
+Description: Wulna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wuy
+Description: Wauyai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wwa
+Description: Waama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wwb
+Description: Wakabunga
+Added: 2012-08-12
+%%
+Type: language
+Subtag: wwo
+Description: Wetamut
+Description: Dorig
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wwr
+Description: Warrwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: www
+Description: Wawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wxa
+Description: Waxianghua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wya
+Description: Wyandot
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wyb
+Description: Wangaaybuwan-Ngiyambaa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wym
+Description: Wymysorys
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wyr
+Description: Wayoró
+Added: 2009-07-29
+%%
+Type: language
+Subtag: wyy
+Description: Western Fijian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xaa
+Description: Andalusian Arabic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xab
+Description: Sambe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xac
+Description: Kachari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xad
+Description: Adai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xae
+Description: Aequian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xag
+Description: Aghwan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xai
+Description: Kaimbé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xal
+Description: Kalmyk
+Description: Oirat
+Added: 2005-10-16
+%%
+Type: language
+Subtag: xam
+Description: /Xam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xan
+Description: Xamtanga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xao
+Description: Khao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xap
+Description: Apalachee
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xaq
+Description: Aquitanian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xar
+Description: Karami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xas
+Description: Kamas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xat
+Description: Katawixi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xau
+Description: Kauwera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xav
+Description: Xavánte
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xaw
+Description: Kawaiisu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xay
+Description: Kayan Mahakam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xba
+Description: Kamba (Brazil)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xbb
+Description: Lower Burdekin
+Added: 2010-03-11
+%%
+Type: language
+Subtag: xbc
+Description: Bactrian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xbi
+Description: Kombio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xbm
+Description: Middle Breton
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xbn
+Description: Kenaboi
+Added: 2010-03-11
+%%
+Type: language
+Subtag: xbo
+Description: Bolgarian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xbr
+Description: Kambera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xbw
+Description: Kambiwá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xbx
+Description: Kabixí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xcb
+Description: Cumbric
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xcc
+Description: Camunic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xce
+Description: Celtiberian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xcg
+Description: Cisalpine Gaulish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xch
+Description: Chemakum
+Description: Chimakum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xcl
+Description: Classical Armenian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xcm
+Description: Comecrudo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xcn
+Description: Cotoname
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xco
+Description: Chorasmian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xcr
+Description: Carian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xct
+Description: Classical Tibetan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xcu
+Description: Curonian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xcv
+Description: Chuvantsy
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xcw
+Description: Coahuilteco
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xcy
+Description: Cayuse
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xdc
+Description: Dacian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xdm
+Description: Edomite
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xdy
+Description: Malayic Dayak
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xeb
+Description: Eblan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xed
+Description: Hdi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xeg
+Description: //Xegwi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xel
+Description: Kelo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xem
+Description: Kembayan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xep
+Description: Epi-Olmec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xer
+Description: Xerénte
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xes
+Description: Kesawai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xet
+Description: Xetá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xeu
+Description: Keoru-Ahia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xfa
+Description: Faliscan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xga
+Description: Galatian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xgb
+Description: Gbin
+Added: 2012-08-12
+%%
+Type: language
+Subtag: xgf
+Description: Gabrielino-Fernandeño
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xgl
+Description: Galindan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xgn
+Description: Mongolian languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: xgr
+Description: Garza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xgu
+Description: Unggumi
+Added: 2012-08-12
+%%
+Type: language
+Subtag: xha
+Description: Harami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xhc
+Description: Hunnic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xhd
+Description: Hadrami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xhe
+Description: Khetrani
+Added: 2009-07-29
+Macrolanguage: lah
+%%
+Type: language
+Subtag: xhr
+Description: Hernican
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xht
+Description: Hattic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xhu
+Description: Hurrian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xhv
+Description: Khua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xia
+Description: Xiandao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xib
+Description: Iberian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xii
+Description: Xiri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xil
+Description: Illyrian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xin
+Description: Xinca
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xip
+Description: Xipináwa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xir
+Description: Xiriâna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xiv
+Description: Indus Valley Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xiy
+Description: Xipaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xka
+Description: Kalkoti
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkb
+Description: Northern Nago
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkc
+Description: Kho'ini
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkd
+Description: Mendalam Kayan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xke
+Description: Kereho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkf
+Description: Khengkha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkg
+Description: Kagoro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkh
+Description: Karahawyana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xki
+Description: Kenyan Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkj
+Description: Kajali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkk
+Description: Kaco'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkl
+Description: Mainstream Kenyah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkn
+Description: Kayan River Kayan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xko
+Description: Kiorr
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkp
+Description: Kabatei
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkq
+Description: Koroni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkr
+Description: Xakriabá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xks
+Description: Kumbewaha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkt
+Description: Kantosi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xku
+Description: Kaamba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkv
+Description: Kgalagadi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkw
+Description: Kembra
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkx
+Description: Karore
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xky
+Description: Uma' Lasan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xkz
+Description: Kurtokha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xla
+Description: Kamula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xlb
+Description: Loup B
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xlc
+Description: Lycian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xld
+Description: Lydian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xle
+Description: Lemnian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xlg
+Description: Ligurian (Ancient)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xli
+Description: Liburnian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xln
+Description: Alanic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xlo
+Description: Loup A
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xlp
+Description: Lepontic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xls
+Description: Lusitanian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xlu
+Description: Cuneiform Luwian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xly
+Description: Elymian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xma
+Description: Mushungulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmb
+Description: Mbonga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmc
+Description: Makhuwa-Marrevone
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmd
+Description: Mbudum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xme
+Description: Median
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmf
+Description: Mingrelian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmg
+Description: Mengaka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmh
+Description: Kuku-Muminh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmj
+Description: Majera
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmk
+Description: Ancient Macedonian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xml
+Description: Malaysian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmm
+Description: Manado Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: xmn
+Description: Manichaean Middle Persian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmo
+Description: Morerebi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmp
+Description: Kuku-Mu'inh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmq
+Description: Kuku-Mangk
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmr
+Description: Meroitic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xms
+Description: Moroccan Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmt
+Description: Matbat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmu
+Description: Kamu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmv
+Description: Antankarana Malagasy
+Description: Tankarana Malagasy
+Added: 2009-07-29
+Macrolanguage: mg
+%%
+Type: language
+Subtag: xmw
+Description: Tsimihety Malagasy
+Added: 2009-07-29
+Macrolanguage: mg
+%%
+Type: language
+Subtag: xmx
+Description: Maden
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmy
+Description: Mayaguduna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xmz
+Description: Mori Bawah
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xna
+Description: Ancient North Arabian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xnb
+Description: Kanakanabu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xnd
+Description: Na-Dene languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: xng
+Description: Middle Mongolian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xnh
+Description: Kuanhua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xnn
+Description: Northern Kankanay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xno
+Description: Anglo-Norman
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xnr
+Description: Kangri
+Added: 2009-07-29
+Macrolanguage: doi
+%%
+Type: language
+Subtag: xns
+Description: Kanashi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xnt
+Description: Narragansett
+Added: 2010-03-11
+%%
+Type: language
+Subtag: xnz
+Description: Kenzi
+Description: Mattoki
+Added: 2012-08-12
+%%
+Type: language
+Subtag: xoc
+Description: O'chi'chi'
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xod
+Description: Kokoda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xog
+Description: Soga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xoi
+Description: Kominimung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xok
+Description: Xokleng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xom
+Description: Komo (Sudan)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xon
+Description: Konkomba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xoo
+Description: Xukurú
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xop
+Description: Kopar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xor
+Description: Korubo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xow
+Description: Kowaki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xpc
+Description: Pecheneg
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xpe
+Description: Liberia Kpelle
+Added: 2009-07-29
+Macrolanguage: kpe
+%%
+Type: language
+Subtag: xpg
+Description: Phrygian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xpi
+Description: Pictish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xpj
+Description: Mpalitjanh
+Added: 2012-08-12
+%%
+Type: language
+Subtag: xpk
+Description: Kulina Pano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xpm
+Description: Pumpokol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xpn
+Description: Kapinawá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xpo
+Description: Pochutec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xpp
+Description: Puyo-Paekche
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xpq
+Description: Mohegan-Pequot
+Added: 2010-03-11
+%%
+Type: language
+Subtag: xpr
+Description: Parthian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xps
+Description: Pisidian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xpu
+Description: Punic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xpy
+Description: Puyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xqa
+Description: Karakhanid
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xqt
+Description: Qatabanian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xra
+Description: Krahô
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xrb
+Description: Eastern Karaboro
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xre
+Description: Kreye
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xri
+Description: Krikati-Timbira
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xrm
+Description: Armazic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xrn
+Description: Arin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xrr
+Description: Raetic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xrt
+Description: Aranama-Tamique
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xru
+Description: Marriammu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xrw
+Description: Karawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsa
+Description: Sabaean
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsb
+Description: Sambal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsc
+Description: Scythian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsd
+Description: Sidetic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xse
+Description: Sempan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsh
+Description: Shamang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsi
+Description: Sio
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsj
+Description: Subi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsl
+Description: South Slavey
+Added: 2009-07-29
+Macrolanguage: den
+%%
+Type: language
+Subtag: xsm
+Description: Kasem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsn
+Description: Sanga (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xso
+Description: Solano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsp
+Description: Silopi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsq
+Description: Makhuwa-Saka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsr
+Description: Sherpa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xss
+Description: Assan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsu
+Description: Sanumá
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsv
+Description: Sudovian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xsy
+Description: Saisiyat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xta
+Description: Alcozauca Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtb
+Description: Chazumba Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtc
+Description: Katcha-Kadugli-Miri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtd
+Description: Diuxi-Tilantongo Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xte
+Description: Ketengban
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtg
+Description: Transalpine Gaulish
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xti
+Description: Sinicahua Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtj
+Description: San Juan Teita Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtl
+Description: Tijaltepec Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtm
+Description: Magdalena Peñasco Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtn
+Description: Northern Tlaxiaco Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xto
+Description: Tokharian A
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtp
+Description: San Miguel Piedras Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtq
+Description: Tumshuqese
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtr
+Description: Early Tripuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xts
+Description: Sindihui Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtt
+Description: Tacahua Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtu
+Description: Cuyamecalco Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtw
+Description: Tawandê
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xty
+Description: Yoloxochitl Mixtec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xtz
+Description: Tasmanian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xua
+Description: Alu Kurumba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xub
+Description: Betta Kurumba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xud
+Description: Umiida
+Added: 2012-08-12
+%%
+Type: language
+Subtag: xug
+Description: Kunigami
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xuj
+Description: Jennu Kurumba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xum
+Description: Umbrian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xun
+Description: Unggarranggu
+Added: 2012-08-12
+%%
+Type: language
+Subtag: xuo
+Description: Kuo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xup
+Description: Upper Umpqua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xur
+Description: Urartian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xut
+Description: Kuthant
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xuu
+Description: Kxoe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xve
+Description: Venetic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xvi
+Description: Kamviri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xvn
+Description: Vandalic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xvo
+Description: Volscian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xvs
+Description: Vestinian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xwa
+Description: Kwaza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xwc
+Description: Woccon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xwe
+Description: Xwela Gbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xwg
+Description: Kwegu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xwl
+Description: Western Xwla Gbe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xwo
+Description: Written Oirat
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xwr
+Description: Kwerba Mamberamo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xxb
+Description: Boro (Ghana)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xxk
+Description: Ke'o
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xxr
+Description: Koropó
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xxt
+Description: Tambora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xyl
+Description: Yalakalore
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xyy
+Description: Yorta Yorta
+Added: 2012-08-12
+%%
+Type: language
+Subtag: xzh
+Description: Zhang-Zhung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xzm
+Description: Zemgalian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: xzp
+Description: Ancient Zapotec
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yaa
+Description: Yaminahua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yab
+Description: Yuhup
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yac
+Description: Pass Valley Yali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yad
+Description: Yagua
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yae
+Description: Pumé
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yaf
+Description: Yaka (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yag
+Description: Yámana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yah
+Description: Yazgulyam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yai
+Description: Yagnobi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yaj
+Description: Banda-Yangere
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yak
+Description: Yakama
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yal
+Description: Yalunka
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yam
+Description: Yamba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yan
+Description: Mayangna
+Added: 2010-03-11
+%%
+Type: language
+Subtag: yao
+Description: Yao
+Added: 2005-10-16
+%%
+Type: language
+Subtag: yap
+Description: Yapese
+Added: 2005-10-16
+%%
+Type: language
+Subtag: yaq
+Description: Yaqui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yar
+Description: Yabarana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yas
+Description: Nugunu (Cameroon)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yat
+Description: Yambeta
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yau
+Description: Yuwana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yav
+Description: Yangben
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yaw
+Description: Yawalapití
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yax
+Description: Yauma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yay
+Description: Agwagwune
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yaz
+Description: Lokaa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yba
+Description: Yala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ybb
+Description: Yemba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ybd
+Description: Yangbye
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Preferred-Value: rki
+%%
+Type: language
+Subtag: ybe
+Description: West Yugur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ybh
+Description: Yakha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ybi
+Description: Yamphu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ybj
+Description: Hasha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ybk
+Description: Bokha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ybl
+Description: Yukuben
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ybm
+Description: Yaben
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ybn
+Description: Yabaâna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ybo
+Description: Yabong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ybx
+Description: Yawiyo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yby
+Description: Yaweyuha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ych
+Description: Chesu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ycl
+Description: Lolopo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ycn
+Description: Yucuna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ycp
+Description: Chepya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ydd
+Description: Eastern Yiddish
+Added: 2009-07-29
+Macrolanguage: yi
+%%
+Type: language
+Subtag: yde
+Description: Yangum Dey
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ydg
+Description: Yidgha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ydk
+Description: Yoidik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yds
+Description: Yiddish Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yea
+Description: Ravula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yec
+Description: Yeniche
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yee
+Description: Yimas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yei
+Description: Yeni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yej
+Description: Yevanic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yel
+Description: Yela
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yen
+Description: Yendang
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Comments: see ynq, yot
+%%
+Type: language
+Subtag: yer
+Description: Tarok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yes
+Description: Nyankpa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yet
+Description: Yetfa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yeu
+Description: Yerukula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yev
+Description: Yapunda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yey
+Description: Yeyi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yga
+Description: Malyangapa
+Added: 2012-08-12
+%%
+Type: language
+Subtag: ygl
+Description: Yangum Gel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ygm
+Description: Yagomi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ygp
+Description: Gepo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ygr
+Description: Yagaria
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ygw
+Description: Yagwoia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yha
+Description: Baha Buyang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yhd
+Description: Judeo-Iraqi Arabic
+Added: 2009-07-29
+Macrolanguage: jrb
+%%
+Type: language
+Subtag: yhl
+Description: Hlepho Phowa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yia
+Description: Yinggarda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yif
+Description: Ache
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yig
+Description: Wusa Nasu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yih
+Description: Western Yiddish
+Added: 2009-07-29
+Macrolanguage: yi
+%%
+Type: language
+Subtag: yii
+Description: Yidiny
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yij
+Description: Yindjibarndi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yik
+Description: Dongshanba Lalo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yil
+Description: Yindjilandji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yim
+Description: Yimchungru Naga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yin
+Description: Yinchia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yip
+Description: Pholo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yiq
+Description: Miqie
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yir
+Description: North Awyu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yis
+Description: Yis
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yit
+Description: Eastern Lalu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yiu
+Description: Awu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yiv
+Description: Northern Nisu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yix
+Description: Axi Yi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yiy
+Description: Yir Yoront
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yiz
+Description: Azhe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yka
+Description: Yakan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ykg
+Description: Northern Yukaghir
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yki
+Description: Yoke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ykk
+Description: Yakaikeke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ykl
+Description: Khlula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ykm
+Description: Kap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ykn
+Description: Kua-nsi
+Added: 2012-08-12
+%%
+Type: language
+Subtag: yko
+Description: Yasa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ykr
+Description: Yekora
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ykt
+Description: Kathu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yku
+Description: Kuamasi
+Added: 2012-08-12
+%%
+Type: language
+Subtag: yky
+Description: Yakoma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yla
+Description: Yaul
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ylb
+Description: Yaleba
+Added: 2010-03-11
+%%
+Type: language
+Subtag: yle
+Description: Yele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ylg
+Description: Yelogu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yli
+Description: Angguruk Yali
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yll
+Description: Yil
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ylm
+Description: Limi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yln
+Description: Langnian Buyang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ylo
+Description: Naluo Yi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ylr
+Description: Yalarnnga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ylu
+Description: Aribwaung
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yly
+Description: Nyâlayu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yma
+Description: Yamphe
+Added: 2009-07-29
+Deprecated: 2012-08-12
+Preferred-Value: lrr
+%%
+Type: language
+Subtag: ymb
+Description: Yambes
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymc
+Description: Southern Muji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymd
+Description: Muda
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yme
+Description: Yameo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymg
+Description: Yamongeri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymh
+Description: Mili
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymi
+Description: Moji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymk
+Description: Makwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yml
+Description: Iamalele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymm
+Description: Maay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymn
+Description: Yamna
+Description: Sunum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymo
+Description: Yangum Mon
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymp
+Description: Yamap
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymq
+Description: Qila Muji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymr
+Description: Malasar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yms
+Description: Mysian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymt
+Description: Mator-Taygi-Karagas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymx
+Description: Northern Muji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ymz
+Description: Muzi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yna
+Description: Aluo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ynd
+Description: Yandruwandha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yne
+Description: Lang'e
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yng
+Description: Yango
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ynh
+Description: Yangho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ynk
+Description: Naukan Yupik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ynl
+Description: Yangulam
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ynn
+Description: Yana
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yno
+Description: Yong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ynq
+Description: Yendang
+Added: 2012-08-12
+%%
+Type: language
+Subtag: yns
+Description: Yansi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ynu
+Description: Yahuna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yob
+Description: Yoba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yog
+Description: Yogad
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yoi
+Description: Yonaguni
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yok
+Description: Yokuts
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yol
+Description: Yola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yom
+Description: Yombe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yon
+Description: Yongkom
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yos
+Description: Yos
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yot
+Description: Yotti
+Added: 2012-08-12
+%%
+Type: language
+Subtag: yox
+Description: Yoron
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yoy
+Description: Yoy
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ypa
+Description: Phala
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ypb
+Description: Labo Phowa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ypg
+Description: Phola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yph
+Description: Phupha
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ypk
+Description: Yupik languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: ypm
+Description: Phuma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ypn
+Description: Ani Phowa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ypo
+Description: Alo Phola
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ypp
+Description: Phupa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ypz
+Description: Phuza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yra
+Description: Yerakai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yrb
+Description: Yareba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yre
+Description: Yaouré
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yri
+Description: Yarí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yrk
+Description: Nenets
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yrl
+Description: Nhengatu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yrn
+Description: Yerong
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yrs
+Description: Yarsun
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yrw
+Description: Yarawata
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ysc
+Description: Yassic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ysd
+Description: Samatao
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ysg
+Description: Sonaga
+Added: 2012-08-12
+%%
+Type: language
+Subtag: ysl
+Description: Yugoslavian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ysn
+Description: Sani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yso
+Description: Nisi (China)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ysp
+Description: Southern Lolopo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ysr
+Description: Sirenik Yupik
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yss
+Description: Yessan-Mayo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ysy
+Description: Sanie
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yta
+Description: Talu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ytl
+Description: Tanglang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ytp
+Description: Thopho
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ytw
+Description: Yout Wam
+Added: 2010-03-11
+%%
+Type: language
+Subtag: yua
+Description: Yucateco
+Description: Yucatec Maya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yub
+Description: Yugambal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yuc
+Description: Yuchi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yud
+Description: Judeo-Tripolitanian Arabic
+Added: 2009-07-29
+Macrolanguage: jrb
+%%
+Type: language
+Subtag: yue
+Description: Yue Chinese
+Added: 2009-07-29
+Macrolanguage: zh
+%%
+Type: language
+Subtag: yuf
+Description: Havasupai-Walapai-Yavapai
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yug
+Description: Yug
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yui
+Description: Yurutí
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yuj
+Description: Karkar-Yuri
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yuk
+Description: Yuki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yul
+Description: Yulu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yum
+Description: Quechan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yun
+Description: Bena (Nigeria)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yup
+Description: Yukpa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yuq
+Description: Yuqui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yur
+Description: Yurok
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yut
+Description: Yopno
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yuu
+Description: Yugh
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yuw
+Description: Yau (Morobe Province)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yux
+Description: Southern Yukaghir
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yuy
+Description: East Yugur
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yuz
+Description: Yuracare
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yva
+Description: Yawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yvt
+Description: Yavitero
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ywa
+Description: Kalou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ywl
+Description: Western Lalu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ywn
+Description: Yawanawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ywq
+Description: Wuding-Luquan Yi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ywr
+Description: Yawuru
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ywt
+Description: Xishanba Lalo
+Description: Central Lalo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ywu
+Description: Wumeng Nasu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yww
+Description: Yawarawarga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yxg
+Description: Yagara
+Added: 2012-08-12
+%%
+Type: language
+Subtag: yxy
+Description: Yabula Yabula
+Added: 2012-08-12
+%%
+Type: language
+Subtag: yyu
+Description: Yau (Sandaun Province)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yyz
+Description: Ayizi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yzg
+Description: E'ma Buyang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: yzk
+Description: Zokhuo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zaa
+Description: Sierra de Juárez Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zab
+Description: San Juan Guelavía Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zac
+Description: Ocotlán Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zad
+Description: Cajonos Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zae
+Description: Yareni Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zaf
+Description: Ayoquesco Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zag
+Description: Zaghawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zah
+Description: Zangwal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zai
+Description: Isthmus Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zaj
+Description: Zaramo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zak
+Description: Zanaki
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zal
+Description: Zauzou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zam
+Description: Miahuatlán Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zao
+Description: Ozolotepec Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zap
+Description: Zapotec
+Added: 2005-10-16
+Scope: macrolanguage
+%%
+Type: language
+Subtag: zaq
+Description: Aloápam Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zar
+Description: Rincón Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zas
+Description: Santo Domingo Albarradas Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zat
+Description: Tabaa Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zau
+Description: Zangskari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zav
+Description: Yatzachi Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zaw
+Description: Mitla Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zax
+Description: Xadani Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zay
+Description: Zayse-Zergulla
+Description: Zaysete
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zaz
+Description: Zari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zbc
+Description: Central Berawan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zbe
+Description: East Berawan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zbl
+Description: Blissymbols
+Description: Bliss
+Description: Blissymbolics
+Added: 2007-08-21
+Suppress-Script: Blis
+%%
+Type: language
+Subtag: zbt
+Description: Batui
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zbw
+Description: West Berawan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zca
+Description: Coatecas Altas Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zch
+Description: Central Hongshuihe Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zdj
+Description: Ngazidja Comorian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zea
+Description: Zeeuws
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zeg
+Description: Zenag
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zeh
+Description: Eastern Hongshuihe Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zen
+Description: Zenaga
+Added: 2005-10-16
+%%
+Type: language
+Subtag: zga
+Description: Kinga
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zgb
+Description: Guibei Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zgm
+Description: Minz Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zgn
+Description: Guibian Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zgr
+Description: Magori
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zhb
+Description: Zhaba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zhd
+Description: Dai Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zhi
+Description: Zhire
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zhn
+Description: Nong Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zhw
+Description: Zhoa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zhx
+Description: Chinese (family)
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: zia
+Description: Zia
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zib
+Description: Zimbabwe Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zik
+Description: Zimakani
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zil
+Description: Zialo
+Added: 2011-08-16
+%%
+Type: language
+Subtag: zim
+Description: Mesme
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zin
+Description: Zinza
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zir
+Description: Ziriya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ziw
+Description: Zigula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: ziz
+Description: Zizilivakan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zka
+Description: Kaimbulawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zkb
+Description: Koibal
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zkd
+Description: Kadu
+Added: 2012-08-12
+%%
+Type: language
+Subtag: zkg
+Description: Koguryo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zkh
+Description: Khorezmian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zkk
+Description: Karankawa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zkn
+Description: Kanan
+Added: 2012-08-12
+%%
+Type: language
+Subtag: zko
+Description: Kott
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zkp
+Description: São Paulo Kaingáng
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zkr
+Description: Zakhring
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zkt
+Description: Kitan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zku
+Description: Kaurna
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zkv
+Description: Krevinian
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zkz
+Description: Khazar
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zle
+Description: East Slavic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: zlj
+Description: Liujiang Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zlm
+Description: Malay (individual language)
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: zln
+Description: Lianshan Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zlq
+Description: Liuqian Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zls
+Description: South Slavic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: zlw
+Description: West Slavic languages
+Added: 2009-07-29
+Scope: collection
+%%
+Type: language
+Subtag: zma
+Description: Manda (Australia)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmb
+Description: Zimba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmc
+Description: Margany
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmd
+Description: Maridan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zme
+Description: Mangerr
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmf
+Description: Mfinu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmg
+Description: Marti Ke
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmh
+Description: Makolkol
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmi
+Description: Negeri Sembilan Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: zmj
+Description: Maridjabin
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmk
+Description: Mandandanyi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zml
+Description: Madngele
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmm
+Description: Marimanindji
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmn
+Description: Mbangwe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmo
+Description: Molo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmp
+Description: Mpuono
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmq
+Description: Mituku
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmr
+Description: Maranunggu
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zms
+Description: Mbesa
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmt
+Description: Maringarr
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmu
+Description: Muruwari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmv
+Description: Mbariman-Gudhinma
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmw
+Description: Mbo (Democratic Republic of Congo)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmx
+Description: Bomitaba
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmy
+Description: Mariyedi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zmz
+Description: Mbandja
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zna
+Description: Zan Gula
+Added: 2009-07-29
+%%
+Type: language
+Subtag: znd
+Description: Zande languages
+Added: 2005-10-16
+Scope: collection
+%%
+Type: language
+Subtag: zne
+Description: Zande (individual language)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zng
+Description: Mang
+Added: 2009-07-29
+%%
+Type: language
+Subtag: znk
+Description: Manangkari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zns
+Description: Mangas
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zoc
+Description: Copainalá Zoque
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zoh
+Description: Chimalapa Zoque
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zom
+Description: Zou
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zoo
+Description: Asunción Mixtepec Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zoq
+Description: Tabasco Zoque
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zor
+Description: Rayón Zoque
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zos
+Description: Francisco León Zoque
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zpa
+Description: Lachiguiri Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpb
+Description: Yautepec Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpc
+Description: Choapan Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpd
+Description: Southeastern Ixtlán Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpe
+Description: Petapa Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpf
+Description: San Pedro Quiatoni Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpg
+Description: Guevea De Humboldt Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zph
+Description: Totomachapan Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpi
+Description: Santa María Quiegolani Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpj
+Description: Quiavicuzas Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpk
+Description: Tlacolulita Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpl
+Description: Lachixío Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpm
+Description: Mixtepec Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpn
+Description: Santa Inés Yatzechi Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpo
+Description: Amatlán Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpp
+Description: El Alto Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpq
+Description: Zoogocho Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpr
+Description: Santiago Xanica Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zps
+Description: Coatlán Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpt
+Description: San Vicente Coatlán Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpu
+Description: Yalálag Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpv
+Description: Chichicapan Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpw
+Description: Zaniza Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpx
+Description: San Baltazar Loxicha Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpy
+Description: Mazaltepec Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zpz
+Description: Texmelucan Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zqe
+Description: Qiubei Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zra
+Description: Kara (Korea)
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zrg
+Description: Mirgan
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zrn
+Description: Zerenkel
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zro
+Description: Záparo
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zrp
+Description: Zarphatic
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zrs
+Description: Mairasi
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zsa
+Description: Sarasira
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zsk
+Description: Kaskean
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zsl
+Description: Zambian Sign Language
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zsm
+Description: Standard Malay
+Added: 2009-07-29
+Macrolanguage: ms
+%%
+Type: language
+Subtag: zsr
+Description: Southern Rincon Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zsu
+Description: Sukurum
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zte
+Description: Elotepec Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: ztg
+Description: Xanaguía Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: ztl
+Description: Lapaguía-Guivini Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: ztm
+Description: San Agustín Mixtepec Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: ztn
+Description: Santa Catarina Albarradas Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: ztp
+Description: Loxicha Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: ztq
+Description: Quioquitani-Quierí Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zts
+Description: Tilquiapan Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: ztt
+Description: Tejalapan Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: ztu
+Description: Güilá Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: ztx
+Description: Zaachila Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zty
+Description: Yatee Zapotec
+Added: 2009-07-29
+Macrolanguage: zap
+%%
+Type: language
+Subtag: zua
+Description: Zeem
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zuh
+Description: Tokano
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zum
+Description: Kumzari
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zun
+Description: Zuni
+Added: 2005-10-16
+%%
+Type: language
+Subtag: zuy
+Description: Zumaya
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zwa
+Description: Zay
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zxx
+Description: No linguistic content
+Description: Not applicable
+Added: 2006-03-08
+Scope: special
+%%
+Type: language
+Subtag: zyb
+Description: Yongbei Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zyg
+Description: Yang Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zyj
+Description: Youjiang Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zyn
+Description: Yongnan Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: language
+Subtag: zyp
+Description: Zyphe
+Added: 2009-07-29
+%%
+Type: language
+Subtag: zza
+Description: Zaza
+Description: Dimili
+Description: Dimli (macrolanguage)
+Description: Kirdki
+Description: Kirmanjki (macrolanguage)
+Description: Zazaki
+Added: 2006-08-24
+Scope: macrolanguage
+%%
+Type: language
+Subtag: zzj
+Description: Zuojiang Zhuang
+Added: 2009-07-29
+Macrolanguage: za
+%%
+Type: extlang
+Subtag: aao
+Description: Algerian Saharan Arabic
+Added: 2009-07-29
+Preferred-Value: aao
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: abh
+Description: Tajiki Arabic
+Added: 2009-07-29
+Preferred-Value: abh
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: abv
+Description: Baharna Arabic
+Added: 2009-07-29
+Preferred-Value: abv
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: acm
+Description: Mesopotamian Arabic
+Added: 2009-07-29
+Preferred-Value: acm
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: acq
+Description: Ta'izzi-Adeni Arabic
+Added: 2009-07-29
+Preferred-Value: acq
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: acw
+Description: Hijazi Arabic
+Added: 2009-07-29
+Preferred-Value: acw
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: acx
+Description: Omani Arabic
+Added: 2009-07-29
+Preferred-Value: acx
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: acy
+Description: Cypriot Arabic
+Added: 2009-07-29
+Preferred-Value: acy
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: adf
+Description: Dhofari Arabic
+Added: 2009-07-29
+Preferred-Value: adf
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: ads
+Description: Adamorobe Sign Language
+Added: 2009-07-29
+Preferred-Value: ads
+Prefix: sgn
+%%
+Type: extlang
+Subtag: aeb
+Description: Tunisian Arabic
+Added: 2009-07-29
+Preferred-Value: aeb
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: aec
+Description: Saidi Arabic
+Added: 2009-07-29
+Preferred-Value: aec
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: aed
+Description: Argentine Sign Language
+Added: 2009-07-29
+Preferred-Value: aed
+Prefix: sgn
+%%
+Type: extlang
+Subtag: aen
+Description: Armenian Sign Language
+Added: 2009-07-29
+Preferred-Value: aen
+Prefix: sgn
+%%
+Type: extlang
+Subtag: afb
+Description: Gulf Arabic
+Added: 2009-07-29
+Preferred-Value: afb
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: afg
+Description: Afghan Sign Language
+Added: 2009-07-29
+Preferred-Value: afg
+Prefix: sgn
+%%
+Type: extlang
+Subtag: ajp
+Description: South Levantine Arabic
+Added: 2009-07-29
+Preferred-Value: ajp
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: apc
+Description: North Levantine Arabic
+Added: 2009-07-29
+Preferred-Value: apc
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: apd
+Description: Sudanese Arabic
+Added: 2009-07-29
+Preferred-Value: apd
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: arb
+Description: Standard Arabic
+Added: 2009-07-29
+Preferred-Value: arb
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: arq
+Description: Algerian Arabic
+Added: 2009-07-29
+Preferred-Value: arq
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: ars
+Description: Najdi Arabic
+Added: 2009-07-29
+Preferred-Value: ars
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: ary
+Description: Moroccan Arabic
+Added: 2009-07-29
+Preferred-Value: ary
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: arz
+Description: Egyptian Arabic
+Added: 2009-07-29
+Preferred-Value: arz
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: ase
+Description: American Sign Language
+Added: 2009-07-29
+Preferred-Value: ase
+Prefix: sgn
+%%
+Type: extlang
+Subtag: asf
+Description: Australian Sign Language
+Added: 2009-07-29
+Preferred-Value: asf
+Prefix: sgn
+%%
+Type: extlang
+Subtag: asp
+Description: Algerian Sign Language
+Added: 2009-07-29
+Preferred-Value: asp
+Prefix: sgn
+%%
+Type: extlang
+Subtag: asq
+Description: Austrian Sign Language
+Added: 2009-07-29
+Preferred-Value: asq
+Prefix: sgn
+%%
+Type: extlang
+Subtag: asw
+Description: Australian Aborigines Sign Language
+Added: 2009-07-29
+Preferred-Value: asw
+Prefix: sgn
+%%
+Type: extlang
+Subtag: auz
+Description: Uzbeki Arabic
+Added: 2009-07-29
+Preferred-Value: auz
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: avl
+Description: Eastern Egyptian Bedawi Arabic
+Added: 2009-07-29
+Preferred-Value: avl
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: ayh
+Description: Hadrami Arabic
+Added: 2009-07-29
+Preferred-Value: ayh
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: ayl
+Description: Libyan Arabic
+Added: 2009-07-29
+Preferred-Value: ayl
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: ayn
+Description: Sanaani Arabic
+Added: 2009-07-29
+Preferred-Value: ayn
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: ayp
+Description: North Mesopotamian Arabic
+Added: 2009-07-29
+Preferred-Value: ayp
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: bbz
+Description: Babalia Creole Arabic
+Added: 2009-07-29
+Preferred-Value: bbz
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: bfi
+Description: British Sign Language
+Added: 2009-07-29
+Preferred-Value: bfi
+Prefix: sgn
+%%
+Type: extlang
+Subtag: bfk
+Description: Ban Khor Sign Language
+Added: 2009-07-29
+Preferred-Value: bfk
+Prefix: sgn
+%%
+Type: extlang
+Subtag: bjn
+Description: Banjar
+Added: 2009-07-29
+Preferred-Value: bjn
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: bog
+Description: Bamako Sign Language
+Added: 2009-07-29
+Preferred-Value: bog
+Prefix: sgn
+%%
+Type: extlang
+Subtag: bqn
+Description: Bulgarian Sign Language
+Added: 2009-07-29
+Preferred-Value: bqn
+Prefix: sgn
+%%
+Type: extlang
+Subtag: bqy
+Description: Bengkala Sign Language
+Added: 2009-07-29
+Preferred-Value: bqy
+Prefix: sgn
+%%
+Type: extlang
+Subtag: btj
+Description: Bacanese Malay
+Added: 2009-07-29
+Preferred-Value: btj
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: bve
+Description: Berau Malay
+Added: 2009-07-29
+Preferred-Value: bve
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: bvl
+Description: Bolivian Sign Language
+Added: 2009-07-29
+Preferred-Value: bvl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: bvu
+Description: Bukit Malay
+Added: 2009-07-29
+Preferred-Value: bvu
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: bzs
+Description: Brazilian Sign Language
+Added: 2009-07-29
+Preferred-Value: bzs
+Prefix: sgn
+%%
+Type: extlang
+Subtag: cdo
+Description: Min Dong Chinese
+Added: 2009-07-29
+Preferred-Value: cdo
+Prefix: zh
+Macrolanguage: zh
+%%
+Type: extlang
+Subtag: cds
+Description: Chadian Sign Language
+Added: 2009-07-29
+Preferred-Value: cds
+Prefix: sgn
+%%
+Type: extlang
+Subtag: cjy
+Description: Jinyu Chinese
+Added: 2009-07-29
+Preferred-Value: cjy
+Prefix: zh
+Macrolanguage: zh
+%%
+Type: extlang
+Subtag: cmn
+Description: Mandarin Chinese
+Added: 2009-07-29
+Preferred-Value: cmn
+Prefix: zh
+Macrolanguage: zh
+%%
+Type: extlang
+Subtag: coa
+Description: Cocos Islands Malay
+Added: 2009-07-29
+Preferred-Value: coa
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: cpx
+Description: Pu-Xian Chinese
+Added: 2009-07-29
+Preferred-Value: cpx
+Prefix: zh
+Macrolanguage: zh
+%%
+Type: extlang
+Subtag: csc
+Description: Catalan Sign Language
+Description: Lengua de señas catalana
+Description: Llengua de Signes Catalana
+Added: 2009-07-29
+Preferred-Value: csc
+Prefix: sgn
+%%
+Type: extlang
+Subtag: csd
+Description: Chiangmai Sign Language
+Added: 2009-07-29
+Preferred-Value: csd
+Prefix: sgn
+%%
+Type: extlang
+Subtag: cse
+Description: Czech Sign Language
+Added: 2009-07-29
+Preferred-Value: cse
+Prefix: sgn
+%%
+Type: extlang
+Subtag: csf
+Description: Cuba Sign Language
+Added: 2009-07-29
+Preferred-Value: csf
+Prefix: sgn
+%%
+Type: extlang
+Subtag: csg
+Description: Chilean Sign Language
+Added: 2009-07-29
+Preferred-Value: csg
+Prefix: sgn
+%%
+Type: extlang
+Subtag: csl
+Description: Chinese Sign Language
+Added: 2009-07-29
+Preferred-Value: csl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: csn
+Description: Colombian Sign Language
+Added: 2009-07-29
+Preferred-Value: csn
+Prefix: sgn
+%%
+Type: extlang
+Subtag: csq
+Description: Croatia Sign Language
+Added: 2009-07-29
+Preferred-Value: csq
+Prefix: sgn
+%%
+Type: extlang
+Subtag: csr
+Description: Costa Rican Sign Language
+Added: 2009-07-29
+Preferred-Value: csr
+Prefix: sgn
+%%
+Type: extlang
+Subtag: czh
+Description: Huizhou Chinese
+Added: 2009-07-29
+Preferred-Value: czh
+Prefix: zh
+Macrolanguage: zh
+%%
+Type: extlang
+Subtag: czo
+Description: Min Zhong Chinese
+Added: 2009-07-29
+Preferred-Value: czo
+Prefix: zh
+Macrolanguage: zh
+%%
+Type: extlang
+Subtag: doq
+Description: Dominican Sign Language
+Added: 2009-07-29
+Preferred-Value: doq
+Prefix: sgn
+%%
+Type: extlang
+Subtag: dse
+Description: Dutch Sign Language
+Added: 2009-07-29
+Preferred-Value: dse
+Prefix: sgn
+%%
+Type: extlang
+Subtag: dsl
+Description: Danish Sign Language
+Added: 2009-07-29
+Preferred-Value: dsl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: dup
+Description: Duano
+Added: 2009-07-29
+Preferred-Value: dup
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: ecs
+Description: Ecuadorian Sign Language
+Added: 2009-07-29
+Preferred-Value: ecs
+Prefix: sgn
+%%
+Type: extlang
+Subtag: esl
+Description: Egypt Sign Language
+Added: 2009-07-29
+Preferred-Value: esl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: esn
+Description: Salvadoran Sign Language
+Added: 2009-07-29
+Preferred-Value: esn
+Prefix: sgn
+%%
+Type: extlang
+Subtag: eso
+Description: Estonian Sign Language
+Added: 2009-07-29
+Preferred-Value: eso
+Prefix: sgn
+%%
+Type: extlang
+Subtag: eth
+Description: Ethiopian Sign Language
+Added: 2009-07-29
+Preferred-Value: eth
+Prefix: sgn
+%%
+Type: extlang
+Subtag: fcs
+Description: Quebec Sign Language
+Added: 2009-07-29
+Preferred-Value: fcs
+Prefix: sgn
+%%
+Type: extlang
+Subtag: fse
+Description: Finnish Sign Language
+Added: 2009-07-29
+Preferred-Value: fse
+Prefix: sgn
+%%
+Type: extlang
+Subtag: fsl
+Description: French Sign Language
+Added: 2009-07-29
+Preferred-Value: fsl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: fss
+Description: Finland-Swedish Sign Language
+Description: finlandssvenskt teckenspråk
+Description: suomenruotsalainen viittomakieli
+Added: 2009-07-29
+Preferred-Value: fss
+Prefix: sgn
+%%
+Type: extlang
+Subtag: gan
+Description: Gan Chinese
+Added: 2009-07-29
+Preferred-Value: gan
+Prefix: zh
+Macrolanguage: zh
+%%
+Type: extlang
+Subtag: gds
+Description: Ghandruk Sign Language
+Added: 2012-08-12
+Preferred-Value: gds
+Prefix: sgn
+%%
+Type: extlang
+Subtag: gom
+Description: Goan Konkani
+Added: 2009-07-29
+Preferred-Value: gom
+Prefix: kok
+Macrolanguage: kok
+%%
+Type: extlang
+Subtag: gse
+Description: Ghanaian Sign Language
+Added: 2009-07-29
+Preferred-Value: gse
+Prefix: sgn
+%%
+Type: extlang
+Subtag: gsg
+Description: German Sign Language
+Added: 2009-07-29
+Preferred-Value: gsg
+Prefix: sgn
+%%
+Type: extlang
+Subtag: gsm
+Description: Guatemalan Sign Language
+Added: 2009-07-29
+Preferred-Value: gsm
+Prefix: sgn
+%%
+Type: extlang
+Subtag: gss
+Description: Greek Sign Language
+Added: 2009-07-29
+Preferred-Value: gss
+Prefix: sgn
+%%
+Type: extlang
+Subtag: gus
+Description: Guinean Sign Language
+Added: 2009-07-29
+Preferred-Value: gus
+Prefix: sgn
+%%
+Type: extlang
+Subtag: hab
+Description: Hanoi Sign Language
+Added: 2009-07-29
+Preferred-Value: hab
+Prefix: sgn
+%%
+Type: extlang
+Subtag: haf
+Description: Haiphong Sign Language
+Added: 2009-07-29
+Preferred-Value: haf
+Prefix: sgn
+%%
+Type: extlang
+Subtag: hak
+Description: Hakka Chinese
+Added: 2009-07-29
+Preferred-Value: hak
+Prefix: zh
+Macrolanguage: zh
+%%
+Type: extlang
+Subtag: hds
+Description: Honduras Sign Language
+Added: 2009-07-29
+Preferred-Value: hds
+Prefix: sgn
+%%
+Type: extlang
+Subtag: hji
+Description: Haji
+Added: 2009-07-29
+Preferred-Value: hji
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: hks
+Description: Hong Kong Sign Language
+Description: Heung Kong Sau Yue
+Added: 2009-07-29
+Preferred-Value: hks
+Prefix: sgn
+%%
+Type: extlang
+Subtag: hos
+Description: Ho Chi Minh City Sign Language
+Added: 2009-07-29
+Preferred-Value: hos
+Prefix: sgn
+%%
+Type: extlang
+Subtag: hps
+Description: Hawai'i Pidgin Sign Language
+Added: 2009-07-29
+Preferred-Value: hps
+Prefix: sgn
+%%
+Type: extlang
+Subtag: hsh
+Description: Hungarian Sign Language
+Added: 2009-07-29
+Preferred-Value: hsh
+Prefix: sgn
+%%
+Type: extlang
+Subtag: hsl
+Description: Hausa Sign Language
+Added: 2009-07-29
+Preferred-Value: hsl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: hsn
+Description: Xiang Chinese
+Added: 2009-07-29
+Preferred-Value: hsn
+Prefix: zh
+Macrolanguage: zh
+%%
+Type: extlang
+Subtag: icl
+Description: Icelandic Sign Language
+Added: 2009-07-29
+Preferred-Value: icl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: ils
+Description: International Sign
+Added: 2009-07-29
+Preferred-Value: ils
+Prefix: sgn
+%%
+Type: extlang
+Subtag: inl
+Description: Indonesian Sign Language
+Added: 2009-07-29
+Preferred-Value: inl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: ins
+Description: Indian Sign Language
+Added: 2009-07-29
+Preferred-Value: ins
+Prefix: sgn
+%%
+Type: extlang
+Subtag: ise
+Description: Italian Sign Language
+Added: 2009-07-29
+Preferred-Value: ise
+Prefix: sgn
+%%
+Type: extlang
+Subtag: isg
+Description: Irish Sign Language
+Added: 2009-07-29
+Preferred-Value: isg
+Prefix: sgn
+%%
+Type: extlang
+Subtag: isr
+Description: Israeli Sign Language
+Added: 2009-07-29
+Preferred-Value: isr
+Prefix: sgn
+%%
+Type: extlang
+Subtag: jak
+Description: Jakun
+Added: 2009-07-29
+Preferred-Value: jak
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: jax
+Description: Jambi Malay
+Added: 2009-07-29
+Preferred-Value: jax
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: jcs
+Description: Jamaican Country Sign Language
+Added: 2009-07-29
+Preferred-Value: jcs
+Prefix: sgn
+%%
+Type: extlang
+Subtag: jhs
+Description: Jhankot Sign Language
+Added: 2009-07-29
+Preferred-Value: jhs
+Prefix: sgn
+%%
+Type: extlang
+Subtag: jls
+Description: Jamaican Sign Language
+Added: 2010-03-11
+Preferred-Value: jls
+Prefix: sgn
+%%
+Type: extlang
+Subtag: jos
+Description: Jordanian Sign Language
+Added: 2009-07-29
+Preferred-Value: jos
+Prefix: sgn
+%%
+Type: extlang
+Subtag: jsl
+Description: Japanese Sign Language
+Added: 2009-07-29
+Preferred-Value: jsl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: jus
+Description: Jumla Sign Language
+Added: 2009-07-29
+Preferred-Value: jus
+Prefix: sgn
+%%
+Type: extlang
+Subtag: kgi
+Description: Selangor Sign Language
+Added: 2009-07-29
+Preferred-Value: kgi
+Prefix: sgn
+%%
+Type: extlang
+Subtag: knn
+Description: Konkani (individual language)
+Added: 2009-07-29
+Preferred-Value: knn
+Prefix: kok
+Macrolanguage: kok
+%%
+Type: extlang
+Subtag: kvb
+Description: Kubu
+Added: 2009-07-29
+Preferred-Value: kvb
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: kvk
+Description: Korean Sign Language
+Added: 2009-07-29
+Preferred-Value: kvk
+Prefix: sgn
+%%
+Type: extlang
+Subtag: kvr
+Description: Kerinci
+Added: 2009-07-29
+Preferred-Value: kvr
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: kxd
+Description: Brunei
+Added: 2009-07-29
+Preferred-Value: kxd
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: lbs
+Description: Libyan Sign Language
+Added: 2009-07-29
+Preferred-Value: lbs
+Prefix: sgn
+%%
+Type: extlang
+Subtag: lce
+Description: Loncong
+Added: 2009-07-29
+Preferred-Value: lce
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: lcf
+Description: Lubu
+Added: 2009-07-29
+Preferred-Value: lcf
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: liw
+Description: Col
+Added: 2009-07-29
+Preferred-Value: liw
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: lls
+Description: Lithuanian Sign Language
+Added: 2009-07-29
+Preferred-Value: lls
+Prefix: sgn
+%%
+Type: extlang
+Subtag: lsg
+Description: Lyons Sign Language
+Added: 2009-07-29
+Preferred-Value: lsg
+Prefix: sgn
+%%
+Type: extlang
+Subtag: lsl
+Description: Latvian Sign Language
+Added: 2009-07-29
+Preferred-Value: lsl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: lso
+Description: Laos Sign Language
+Added: 2009-07-29
+Preferred-Value: lso
+Prefix: sgn
+%%
+Type: extlang
+Subtag: lsp
+Description: Panamanian Sign Language
+Description: Lengua de Señas Panameñas
+Added: 2009-07-29
+Preferred-Value: lsp
+Prefix: sgn
+%%
+Type: extlang
+Subtag: lst
+Description: Trinidad and Tobago Sign Language
+Added: 2009-07-29
+Preferred-Value: lst
+Prefix: sgn
+%%
+Type: extlang
+Subtag: lsy
+Description: Mauritian Sign Language
+Added: 2010-03-11
+Preferred-Value: lsy
+Prefix: sgn
+%%
+Type: extlang
+Subtag: ltg
+Description: Latgalian
+Added: 2010-03-11
+Preferred-Value: ltg
+Prefix: lv
+Macrolanguage: lv
+%%
+Type: extlang
+Subtag: lvs
+Description: Standard Latvian
+Added: 2010-03-11
+Preferred-Value: lvs
+Prefix: lv
+Macrolanguage: lv
+%%
+Type: extlang
+Subtag: lzh
+Description: Literary Chinese
+Added: 2009-07-29
+Preferred-Value: lzh
+Prefix: zh
+Macrolanguage: zh
+%%
+Type: extlang
+Subtag: max
+Description: North Moluccan Malay
+Added: 2009-07-29
+Preferred-Value: max
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: mdl
+Description: Maltese Sign Language
+Added: 2009-07-29
+Preferred-Value: mdl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: meo
+Description: Kedah Malay
+Added: 2009-07-29
+Preferred-Value: meo
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: mfa
+Description: Pattani Malay
+Added: 2009-07-29
+Preferred-Value: mfa
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: mfb
+Description: Bangka
+Added: 2009-07-29
+Preferred-Value: mfb
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: mfs
+Description: Mexican Sign Language
+Added: 2009-07-29
+Preferred-Value: mfs
+Prefix: sgn
+%%
+Type: extlang
+Subtag: min
+Description: Minangkabau
+Added: 2009-07-29
+Preferred-Value: min
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: mnp
+Description: Min Bei Chinese
+Added: 2009-07-29
+Preferred-Value: mnp
+Prefix: zh
+Macrolanguage: zh
+%%
+Type: extlang
+Subtag: mqg
+Description: Kota Bangun Kutai Malay
+Added: 2009-07-29
+Preferred-Value: mqg
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: mre
+Description: Martha's Vineyard Sign Language
+Added: 2009-07-29
+Preferred-Value: mre
+Prefix: sgn
+%%
+Type: extlang
+Subtag: msd
+Description: Yucatec Maya Sign Language
+Added: 2009-07-29
+Preferred-Value: msd
+Prefix: sgn
+%%
+Type: extlang
+Subtag: msi
+Description: Sabah Malay
+Added: 2009-07-29
+Preferred-Value: msi
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: msr
+Description: Mongolian Sign Language
+Added: 2009-07-29
+Preferred-Value: msr
+Prefix: sgn
+%%
+Type: extlang
+Subtag: mui
+Description: Musi
+Added: 2009-07-29
+Preferred-Value: mui
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: mzc
+Description: Madagascar Sign Language
+Added: 2009-07-29
+Preferred-Value: mzc
+Prefix: sgn
+%%
+Type: extlang
+Subtag: mzg
+Description: Monastic Sign Language
+Added: 2009-07-29
+Preferred-Value: mzg
+Prefix: sgn
+%%
+Type: extlang
+Subtag: mzy
+Description: Mozambican Sign Language
+Added: 2009-07-29
+Preferred-Value: mzy
+Prefix: sgn
+%%
+Type: extlang
+Subtag: nan
+Description: Min Nan Chinese
+Added: 2009-07-29
+Preferred-Value: nan
+Prefix: zh
+Macrolanguage: zh
+%%
+Type: extlang
+Subtag: nbs
+Description: Namibian Sign Language
+Added: 2009-07-29
+Preferred-Value: nbs
+Prefix: sgn
+%%
+Type: extlang
+Subtag: ncs
+Description: Nicaraguan Sign Language
+Added: 2009-07-29
+Preferred-Value: ncs
+Prefix: sgn
+%%
+Type: extlang
+Subtag: nsi
+Description: Nigerian Sign Language
+Added: 2009-07-29
+Preferred-Value: nsi
+Prefix: sgn
+%%
+Type: extlang
+Subtag: nsl
+Description: Norwegian Sign Language
+Added: 2009-07-29
+Preferred-Value: nsl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: nsp
+Description: Nepalese Sign Language
+Added: 2009-07-29
+Preferred-Value: nsp
+Prefix: sgn
+%%
+Type: extlang
+Subtag: nsr
+Description: Maritime Sign Language
+Added: 2009-07-29
+Preferred-Value: nsr
+Prefix: sgn
+%%
+Type: extlang
+Subtag: nzs
+Description: New Zealand Sign Language
+Added: 2009-07-29
+Preferred-Value: nzs
+Prefix: sgn
+%%
+Type: extlang
+Subtag: okl
+Description: Old Kentish Sign Language
+Added: 2009-07-29
+Preferred-Value: okl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: orn
+Description: Orang Kanaq
+Added: 2009-07-29
+Preferred-Value: orn
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: ors
+Description: Orang Seletar
+Added: 2009-07-29
+Preferred-Value: ors
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: pel
+Description: Pekal
+Added: 2009-07-29
+Preferred-Value: pel
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: pga
+Description: Sudanese Creole Arabic
+Added: 2009-07-29
+Preferred-Value: pga
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: pks
+Description: Pakistan Sign Language
+Added: 2009-07-29
+Preferred-Value: pks
+Prefix: sgn
+%%
+Type: extlang
+Subtag: prl
+Description: Peruvian Sign Language
+Added: 2009-07-29
+Preferred-Value: prl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: prz
+Description: Providencia Sign Language
+Added: 2009-07-29
+Preferred-Value: prz
+Prefix: sgn
+%%
+Type: extlang
+Subtag: psc
+Description: Persian Sign Language
+Added: 2009-07-29
+Preferred-Value: psc
+Prefix: sgn
+%%
+Type: extlang
+Subtag: psd
+Description: Plains Indian Sign Language
+Added: 2009-07-29
+Preferred-Value: psd
+Prefix: sgn
+%%
+Type: extlang
+Subtag: pse
+Description: Central Malay
+Added: 2009-07-29
+Preferred-Value: pse
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: psg
+Description: Penang Sign Language
+Added: 2009-07-29
+Preferred-Value: psg
+Prefix: sgn
+%%
+Type: extlang
+Subtag: psl
+Description: Puerto Rican Sign Language
+Added: 2009-07-29
+Preferred-Value: psl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: pso
+Description: Polish Sign Language
+Added: 2009-07-29
+Preferred-Value: pso
+Prefix: sgn
+%%
+Type: extlang
+Subtag: psp
+Description: Philippine Sign Language
+Added: 2009-07-29
+Preferred-Value: psp
+Prefix: sgn
+%%
+Type: extlang
+Subtag: psr
+Description: Portuguese Sign Language
+Added: 2009-07-29
+Preferred-Value: psr
+Prefix: sgn
+%%
+Type: extlang
+Subtag: pys
+Description: Paraguayan Sign Language
+Description: Lengua de Señas del Paraguay
+Added: 2010-03-11
+Preferred-Value: pys
+Prefix: sgn
+%%
+Type: extlang
+Subtag: rms
+Description: Romanian Sign Language
+Added: 2009-07-29
+Preferred-Value: rms
+Prefix: sgn
+%%
+Type: extlang
+Subtag: rsi
+Description: Rennellese Sign Language
+Added: 2009-07-29
+Preferred-Value: rsi
+Prefix: sgn
+%%
+Type: extlang
+Subtag: rsl
+Description: Russian Sign Language
+Added: 2009-07-29
+Preferred-Value: rsl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: sdl
+Description: Saudi Arabian Sign Language
+Added: 2009-07-29
+Preferred-Value: sdl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: sfb
+Description: Langue des signes de Belgique Francophone
+Description: French Belgian Sign Language
+Added: 2009-07-29
+Preferred-Value: sfb
+Prefix: sgn
+%%
+Type: extlang
+Subtag: sfs
+Description: South African Sign Language
+Added: 2009-07-29
+Preferred-Value: sfs
+Prefix: sgn
+%%
+Type: extlang
+Subtag: sgg
+Description: Swiss-German Sign Language
+Added: 2009-07-29
+Preferred-Value: sgg
+Prefix: sgn
+%%
+Type: extlang
+Subtag: sgx
+Description: Sierra Leone Sign Language
+Added: 2009-07-29
+Preferred-Value: sgx
+Prefix: sgn
+%%
+Type: extlang
+Subtag: shu
+Description: Chadian Arabic
+Added: 2009-07-29
+Preferred-Value: shu
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: slf
+Description: Swiss-Italian Sign Language
+Added: 2009-07-29
+Preferred-Value: slf
+Prefix: sgn
+%%
+Type: extlang
+Subtag: sls
+Description: Singapore Sign Language
+Added: 2009-07-29
+Preferred-Value: sls
+Prefix: sgn
+%%
+Type: extlang
+Subtag: sqk
+Description: Albanian Sign Language
+Added: 2012-08-12
+Preferred-Value: sqk
+Prefix: sgn
+%%
+Type: extlang
+Subtag: sqs
+Description: Sri Lankan Sign Language
+Added: 2009-07-29
+Preferred-Value: sqs
+Prefix: sgn
+%%
+Type: extlang
+Subtag: ssh
+Description: Shihhi Arabic
+Added: 2009-07-29
+Preferred-Value: ssh
+Prefix: ar
+Macrolanguage: ar
+%%
+Type: extlang
+Subtag: ssp
+Description: Spanish Sign Language
+Added: 2009-07-29
+Preferred-Value: ssp
+Prefix: sgn
+%%
+Type: extlang
+Subtag: ssr
+Description: Swiss-French Sign Language
+Added: 2009-07-29
+Preferred-Value: ssr
+Prefix: sgn
+%%
+Type: extlang
+Subtag: svk
+Description: Slovakian Sign Language
+Added: 2009-07-29
+Preferred-Value: svk
+Prefix: sgn
+%%
+Type: extlang
+Subtag: swc
+Description: Congo Swahili
+Added: 2009-07-29
+Preferred-Value: swc
+Prefix: sw
+Macrolanguage: sw
+%%
+Type: extlang
+Subtag: swh
+Description: Swahili (individual language)
+Description: Kiswahili
+Added: 2009-07-29
+Preferred-Value: swh
+Prefix: sw
+Macrolanguage: sw
+%%
+Type: extlang
+Subtag: swl
+Description: Swedish Sign Language
+Added: 2009-07-29
+Preferred-Value: swl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: syy
+Description: Al-Sayyid Bedouin Sign Language
+Added: 2009-07-29
+Preferred-Value: syy
+Prefix: sgn
+%%
+Type: extlang
+Subtag: tmw
+Description: Temuan
+Added: 2009-07-29
+Preferred-Value: tmw
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: tse
+Description: Tunisian Sign Language
+Added: 2009-07-29
+Preferred-Value: tse
+Prefix: sgn
+%%
+Type: extlang
+Subtag: tsm
+Description: Turkish Sign Language
+Description: Türk İşaret Dili
+Added: 2009-07-29
+Preferred-Value: tsm
+Prefix: sgn
+%%
+Type: extlang
+Subtag: tsq
+Description: Thai Sign Language
+Added: 2009-07-29
+Preferred-Value: tsq
+Prefix: sgn
+%%
+Type: extlang
+Subtag: tss
+Description: Taiwan Sign Language
+Added: 2009-07-29
+Preferred-Value: tss
+Prefix: sgn
+%%
+Type: extlang
+Subtag: tsy
+Description: Tebul Sign Language
+Added: 2009-07-29
+Preferred-Value: tsy
+Prefix: sgn
+%%
+Type: extlang
+Subtag: tza
+Description: Tanzanian Sign Language
+Added: 2009-07-29
+Preferred-Value: tza
+Prefix: sgn
+%%
+Type: extlang
+Subtag: ugn
+Description: Ugandan Sign Language
+Added: 2009-07-29
+Preferred-Value: ugn
+Prefix: sgn
+%%
+Type: extlang
+Subtag: ugy
+Description: Uruguayan Sign Language
+Added: 2009-07-29
+Preferred-Value: ugy
+Prefix: sgn
+%%
+Type: extlang
+Subtag: ukl
+Description: Ukrainian Sign Language
+Added: 2009-07-29
+Preferred-Value: ukl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: uks
+Description: Urubú-Kaapor Sign Language
+Description: Kaapor Sign Language
+Added: 2009-07-29
+Preferred-Value: uks
+Prefix: sgn
+%%
+Type: extlang
+Subtag: urk
+Description: Urak Lawoi'
+Added: 2009-07-29
+Preferred-Value: urk
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: uzn
+Description: Northern Uzbek
+Added: 2009-07-29
+Preferred-Value: uzn
+Prefix: uz
+Macrolanguage: uz
+%%
+Type: extlang
+Subtag: uzs
+Description: Southern Uzbek
+Added: 2009-07-29
+Preferred-Value: uzs
+Prefix: uz
+Macrolanguage: uz
+%%
+Type: extlang
+Subtag: vgt
+Description: Vlaamse Gebarentaal
+Description: Flemish Sign Language
+Added: 2009-07-29
+Preferred-Value: vgt
+Prefix: sgn
+%%
+Type: extlang
+Subtag: vkk
+Description: Kaur
+Added: 2009-07-29
+Preferred-Value: vkk
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: vkt
+Description: Tenggarong Kutai Malay
+Added: 2009-07-29
+Preferred-Value: vkt
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: vsi
+Description: Moldova Sign Language
+Added: 2009-07-29
+Preferred-Value: vsi
+Prefix: sgn
+%%
+Type: extlang
+Subtag: vsl
+Description: Venezuelan Sign Language
+Added: 2009-07-29
+Preferred-Value: vsl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: vsv
+Description: Valencian Sign Language
+Description: Llengua de signes valenciana
+Added: 2009-07-29
+Preferred-Value: vsv
+Prefix: sgn
+%%
+Type: extlang
+Subtag: wuu
+Description: Wu Chinese
+Added: 2009-07-29
+Preferred-Value: wuu
+Prefix: zh
+Macrolanguage: zh
+%%
+Type: extlang
+Subtag: xki
+Description: Kenyan Sign Language
+Added: 2009-07-29
+Preferred-Value: xki
+Prefix: sgn
+%%
+Type: extlang
+Subtag: xml
+Description: Malaysian Sign Language
+Added: 2009-07-29
+Preferred-Value: xml
+Prefix: sgn
+%%
+Type: extlang
+Subtag: xmm
+Description: Manado Malay
+Added: 2009-07-29
+Preferred-Value: xmm
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: xms
+Description: Moroccan Sign Language
+Added: 2009-07-29
+Preferred-Value: xms
+Prefix: sgn
+%%
+Type: extlang
+Subtag: yds
+Description: Yiddish Sign Language
+Added: 2009-07-29
+Preferred-Value: yds
+Prefix: sgn
+%%
+Type: extlang
+Subtag: ysl
+Description: Yugoslavian Sign Language
+Added: 2009-07-29
+Preferred-Value: ysl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: yue
+Description: Yue Chinese
+Added: 2009-07-29
+Preferred-Value: yue
+Prefix: zh
+Macrolanguage: zh
+%%
+Type: extlang
+Subtag: zib
+Description: Zimbabwe Sign Language
+Added: 2009-07-29
+Preferred-Value: zib
+Prefix: sgn
+%%
+Type: extlang
+Subtag: zlm
+Description: Malay (individual language)
+Added: 2009-07-29
+Preferred-Value: zlm
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: zmi
+Description: Negeri Sembilan Malay
+Added: 2009-07-29
+Preferred-Value: zmi
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: extlang
+Subtag: zsl
+Description: Zambian Sign Language
+Added: 2009-07-29
+Preferred-Value: zsl
+Prefix: sgn
+%%
+Type: extlang
+Subtag: zsm
+Description: Standard Malay
+Added: 2009-07-29
+Preferred-Value: zsm
+Prefix: ms
+Macrolanguage: ms
+%%
+Type: script
+Subtag: Afak
+Description: Afaka
+Added: 2011-01-07
+%%
+Type: script
+Subtag: Arab
+Description: Arabic
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Armi
+Description: Imperial Aramaic
+Added: 2007-12-05
+%%
+Type: script
+Subtag: Armn
+Description: Armenian
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Avst
+Description: Avestan
+Added: 2007-07-28
+%%
+Type: script
+Subtag: Bali
+Description: Balinese
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Bamu
+Description: Bamum
+Added: 2009-07-30
+%%
+Type: script
+Subtag: Bass
+Description: Bassa Vah
+Added: 2010-04-10
+%%
+Type: script
+Subtag: Batk
+Description: Batak
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Beng
+Description: Bengali
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Blis
+Description: Blissymbols
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Bopo
+Description: Bopomofo
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Brah
+Description: Brahmi
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Brai
+Description: Braille
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Bugi
+Description: Buginese
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Buhd
+Description: Buhid
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Cakm
+Description: Chakma
+Added: 2007-12-05
+%%
+Type: script
+Subtag: Cans
+Description: Unified Canadian Aboriginal Syllabics
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Cari
+Description: Carian
+Added: 2006-07-21
+%%
+Type: script
+Subtag: Cham
+Description: Cham
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Cher
+Description: Cherokee
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Cirt
+Description: Cirth
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Copt
+Description: Coptic
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Cprt
+Description: Cypriot
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Cyrl
+Description: Cyrillic
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Cyrs
+Description: Cyrillic (Old Church Slavonic variant)
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Deva
+Description: Devanagari
+Description: Nagari
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Dsrt
+Description: Deseret
+Description: Mormon
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Dupl
+Description: Duployan shorthand
+Description: Duployan stenography
+Added: 2010-08-16
+%%
+Type: script
+Subtag: Egyd
+Description: Egyptian demotic
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Egyh
+Description: Egyptian hieratic
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Egyp
+Description: Egyptian hieroglyphs
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Elba
+Description: Elbasan
+Added: 2010-08-16
+%%
+Type: script
+Subtag: Ethi
+Description: Ethiopic
+Description: Geʻez
+Description: Ge'ez
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Geok
+Description: Khutsuri (Asomtavruli and Nuskhuri)
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Geor
+Description: Georgian (Mkhedruli)
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Glag
+Description: Glagolitic
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Goth
+Description: Gothic
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Gran
+Description: Grantha
+Added: 2009-12-09
+%%
+Type: script
+Subtag: Grek
+Description: Greek
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Gujr
+Description: Gujarati
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Guru
+Description: Gurmukhi
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Hang
+Description: Hangul
+Description: Hangŭl
+Description: Hangeul
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Hani
+Description: Han
+Description: Hanzi
+Description: Kanji
+Description: Hanja
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Hano
+Description: Hanunoo
+Description: Hanunóo
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Hans
+Description: Han (Simplified variant)
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Hant
+Description: Han (Traditional variant)
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Hebr
+Description: Hebrew
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Hira
+Description: Hiragana
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Hluw
+Description: Anatolian Hieroglyphs
+Description: Luwian Hieroglyphs
+Description: Hittite Hieroglyphs
+Added: 2011-12-28
+%%
+Type: script
+Subtag: Hmng
+Description: Pahawh Hmong
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Hrkt
+Description: Japanese syllabaries (alias for Hiragana + Katakana)
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Hung
+Description: Old Hungarian
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Inds
+Description: Indus
+Description: Harappan
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Ital
+Description: Old Italic (Etruscan, Oscan, etc.)
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Java
+Description: Javanese
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Jpan
+Description: Japanese (alias for Han + Hiragana + Katakana)
+Added: 2006-07-21
+%%
+Type: script
+Subtag: Jurc
+Description: Jurchen
+Added: 2011-01-07
+%%
+Type: script
+Subtag: Kali
+Description: Kayah Li
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Kana
+Description: Katakana
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Khar
+Description: Kharoshthi
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Khmr
+Description: Khmer
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Khoj
+Description: Khojki
+Added: 2011-08-16
+%%
+Type: script
+Subtag: Knda
+Description: Kannada
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Kore
+Description: Korean (alias for Hangul + Han)
+Added: 2007-07-05
+%%
+Type: script
+Subtag: Kpel
+Description: Kpelle
+Added: 2010-04-10
+%%
+Type: script
+Subtag: Kthi
+Description: Kaithi
+Added: 2007-12-05
+%%
+Type: script
+Subtag: Lana
+Description: Tai Tham
+Description: Lanna
+Added: 2006-07-21
+%%
+Type: script
+Subtag: Laoo
+Description: Lao
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Latf
+Description: Latin (Fraktur variant)
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Latg
+Description: Latin (Gaelic variant)
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Latn
+Description: Latin
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Lepc
+Description: Lepcha
+Description: Róng
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Limb
+Description: Limbu
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Lina
+Description: Linear A
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Linb
+Description: Linear B
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Lisu
+Description: Lisu
+Description: Fraser
+Added: 2009-03-13
+%%
+Type: script
+Subtag: Loma
+Description: Loma
+Added: 2010-04-10
+%%
+Type: script
+Subtag: Lyci
+Description: Lycian
+Added: 2006-07-21
+%%
+Type: script
+Subtag: Lydi
+Description: Lydian
+Added: 2006-07-21
+%%
+Type: script
+Subtag: Mand
+Description: Mandaic
+Description: Mandaean
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Mani
+Description: Manichaean
+Added: 2007-07-28
+%%
+Type: script
+Subtag: Maya
+Description: Mayan hieroglyphs
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Mend
+Description: Mende
+Added: 2010-04-10
+%%
+Type: script
+Subtag: Merc
+Description: Meroitic Cursive
+Added: 2009-12-09
+%%
+Type: script
+Subtag: Mero
+Description: Meroitic Hieroglyphs
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Mlym
+Description: Malayalam
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Mong
+Description: Mongolian
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Moon
+Description: Moon
+Description: Moon code
+Description: Moon script
+Description: Moon type
+Added: 2007-01-26
+%%
+Type: script
+Subtag: Mroo
+Description: Mro
+Description: Mru
+Added: 2011-01-07
+%%
+Type: script
+Subtag: Mtei
+Description: Meitei Mayek
+Description: Meithei
+Description: Meetei
+Added: 2007-01-26
+%%
+Type: script
+Subtag: Mymr
+Description: Myanmar
+Description: Burmese
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Narb
+Description: Old North Arabian
+Description: Ancient North Arabian
+Added: 2010-04-10
+%%
+Type: script
+Subtag: Nbat
+Description: Nabataean
+Added: 2010-04-10
+%%
+Type: script
+Subtag: Nkgb
+Description: Nakhi Geba
+Description: 'Na-'Khi ²Ggŏ-¹baw
+Description: Naxi Geba
+Added: 2009-03-13
+%%
+Type: script
+Subtag: Nkoo
+Description: N’Ko
+Description: N'Ko
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Nshu
+Description: Nüshu
+Added: 2011-01-07
+%%
+Type: script
+Subtag: Ogam
+Description: Ogham
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Olck
+Description: Ol Chiki
+Description: Ol Cemet'
+Description: Ol
+Description: Santali
+Added: 2006-07-21
+%%
+Type: script
+Subtag: Orkh
+Description: Old Turkic
+Description: Orkhon Runic
+Added: 2009-07-30
+%%
+Type: script
+Subtag: Orya
+Description: Oriya
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Osma
+Description: Osmanya
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Palm
+Description: Palmyrene
+Added: 2010-04-10
+%%
+Type: script
+Subtag: Perm
+Description: Old Permic
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Phag
+Description: Phags-pa
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Phli
+Description: Inscriptional Pahlavi
+Added: 2007-12-05
+%%
+Type: script
+Subtag: Phlp
+Description: Psalter Pahlavi
+Added: 2007-12-05
+%%
+Type: script
+Subtag: Phlv
+Description: Book Pahlavi
+Added: 2007-07-28
+%%
+Type: script
+Subtag: Phnx
+Description: Phoenician
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Plrd
+Description: Miao
+Description: Pollard
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Prti
+Description: Inscriptional Parthian
+Added: 2007-12-05
+%%
+Type: script
+Subtag: Qaaa..Qabx
+Description: Private use
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Rjng
+Description: Rejang
+Description: Redjang
+Description: Kaganga
+Added: 2006-10-17
+%%
+Type: script
+Subtag: Roro
+Description: Rongorongo
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Runr
+Description: Runic
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Samr
+Description: Samaritan
+Added: 2007-07-28
+%%
+Type: script
+Subtag: Sara
+Description: Sarati
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Sarb
+Description: Old South Arabian
+Added: 2009-07-30
+%%
+Type: script
+Subtag: Saur
+Description: Saurashtra
+Added: 2006-07-21
+%%
+Type: script
+Subtag: Sgnw
+Description: SignWriting
+Added: 2006-10-17
+%%
+Type: script
+Subtag: Shaw
+Description: Shavian
+Description: Shaw
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Shrd
+Description: Sharada
+Description: Śāradā
+Added: 2011-01-07
+%%
+Type: script
+Subtag: Sind
+Description: Khudawadi
+Description: Sindhi
+Added: 2010-08-16
+%%
+Type: script
+Subtag: Sinh
+Description: Sinhala
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Sora
+Description: Sora Sompeng
+Added: 2011-01-07
+%%
+Type: script
+Subtag: Sund
+Description: Sundanese
+Added: 2006-07-21
+%%
+Type: script
+Subtag: Sylo
+Description: Syloti Nagri
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Syrc
+Description: Syriac
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Syre
+Description: Syriac (Estrangelo variant)
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Syrj
+Description: Syriac (Western variant)
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Syrn
+Description: Syriac (Eastern variant)
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Tagb
+Description: Tagbanwa
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Takr
+Description: Takri
+Description: Ṭākrī
+Description: Ṭāṅkrī
+Added: 2011-01-07
+%%
+Type: script
+Subtag: Tale
+Description: Tai Le
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Talu
+Description: New Tai Lue
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Taml
+Description: Tamil
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Tang
+Description: Tangut
+Added: 2011-01-07
+%%
+Type: script
+Subtag: Tavt
+Description: Tai Viet
+Added: 2007-12-05
+%%
+Type: script
+Subtag: Telu
+Description: Telugu
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Teng
+Description: Tengwar
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Tfng
+Description: Tifinagh
+Description: Berber
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Tglg
+Description: Tagalog
+Description: Baybayin
+Description: Alibata
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Thaa
+Description: Thaana
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Thai
+Description: Thai
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Tibt
+Description: Tibetan
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Tirh
+Description: Tirhuta
+Added: 2011-08-16
+%%
+Type: script
+Subtag: Ugar
+Description: Ugaritic
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Vaii
+Description: Vai
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Visp
+Description: Visible Speech
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Wara
+Description: Warang Citi
+Description: Varang Kshiti
+Added: 2009-12-09
+%%
+Type: script
+Subtag: Wole
+Description: Woleai
+Added: 2011-01-07
+%%
+Type: script
+Subtag: Xpeo
+Description: Old Persian
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Xsux
+Description: Sumero-Akkadian cuneiform
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Yiii
+Description: Yi
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Zinh
+Description: Code for inherited script
+Added: 2009-04-03
+Comments: Not intended for use as a language subtag
+%%
+Type: script
+Subtag: Zmth
+Description: Mathematical notation
+Added: 2007-12-05
+%%
+Type: script
+Subtag: Zsym
+Description: Symbols
+Added: 2007-12-05
+%%
+Type: script
+Subtag: Zxxx
+Description: Code for unwritten documents
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Zyyy
+Description: Code for undetermined script
+Added: 2005-10-16
+%%
+Type: script
+Subtag: Zzzz
+Description: Code for uncoded script
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AA
+Description: Private use
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AC
+Description: Ascension Island
+Added: 2009-07-29
+%%
+Type: region
+Subtag: AD
+Description: Andorra
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AE
+Description: United Arab Emirates
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AF
+Description: Afghanistan
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AG
+Description: Antigua and Barbuda
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AI
+Description: Anguilla
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AL
+Description: Albania
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AM
+Description: Armenia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AN
+Description: Netherlands Antilles
+Added: 2005-10-16
+Deprecated: 2011-01-07
+Comments: see BQ, CW, and SX
+%%
+Type: region
+Subtag: AO
+Description: Angola
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AQ
+Description: Antarctica
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AR
+Description: Argentina
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AS
+Description: American Samoa
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AT
+Description: Austria
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AU
+Description: Australia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AW
+Description: Aruba
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AX
+Description: Åland Islands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: AZ
+Description: Azerbaijan
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BA
+Description: Bosnia and Herzegovina
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BB
+Description: Barbados
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BD
+Description: Bangladesh
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BE
+Description: Belgium
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BF
+Description: Burkina Faso
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BG
+Description: Bulgaria
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BH
+Description: Bahrain
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BI
+Description: Burundi
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BJ
+Description: Benin
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BL
+Description: Saint Barthélemy
+Added: 2007-11-02
+%%
+Type: region
+Subtag: BM
+Description: Bermuda
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BN
+Description: Brunei Darussalam
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BO
+Description: Bolivia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BQ
+Description: Bonaire, Sint Eustatius and Saba
+Added: 2011-01-07
+%%
+Type: region
+Subtag: BR
+Description: Brazil
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BS
+Description: Bahamas
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BT
+Description: Bhutan
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BU
+Description: Burma
+Added: 2005-10-16
+Deprecated: 1989-12-05
+Preferred-Value: MM
+%%
+Type: region
+Subtag: BV
+Description: Bouvet Island
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BW
+Description: Botswana
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BY
+Description: Belarus
+Added: 2005-10-16
+%%
+Type: region
+Subtag: BZ
+Description: Belize
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CA
+Description: Canada
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CC
+Description: Cocos (Keeling) Islands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CD
+Description: The Democratic Republic of the Congo
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CF
+Description: Central African Republic
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CG
+Description: Congo
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CH
+Description: Switzerland
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CI
+Description: Côte d'Ivoire
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CK
+Description: Cook Islands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CL
+Description: Chile
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CM
+Description: Cameroon
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CN
+Description: China
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CO
+Description: Colombia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CP
+Description: Clipperton Island
+Added: 2009-07-29
+%%
+Type: region
+Subtag: CR
+Description: Costa Rica
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CS
+Description: Serbia and Montenegro
+Added: 2005-10-16
+Deprecated: 2006-10-05
+Comments: see RS for Serbia or ME for Montenegro
+%%
+Type: region
+Subtag: CU
+Description: Cuba
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CV
+Description: Cape Verde
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CW
+Description: Curaçao
+Added: 2011-01-07
+%%
+Type: region
+Subtag: CX
+Description: Christmas Island
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CY
+Description: Cyprus
+Added: 2005-10-16
+%%
+Type: region
+Subtag: CZ
+Description: Czech Republic
+Added: 2005-10-16
+%%
+Type: region
+Subtag: DD
+Description: German Democratic Republic
+Added: 2005-10-16
+Deprecated: 1990-10-30
+Preferred-Value: DE
+%%
+Type: region
+Subtag: DE
+Description: Germany
+Added: 2005-10-16
+%%
+Type: region
+Subtag: DG
+Description: Diego Garcia
+Added: 2009-07-29
+%%
+Type: region
+Subtag: DJ
+Description: Djibouti
+Added: 2005-10-16
+%%
+Type: region
+Subtag: DK
+Description: Denmark
+Added: 2005-10-16
+%%
+Type: region
+Subtag: DM
+Description: Dominica
+Added: 2005-10-16
+%%
+Type: region
+Subtag: DO
+Description: Dominican Republic
+Added: 2005-10-16
+%%
+Type: region
+Subtag: DZ
+Description: Algeria
+Added: 2005-10-16
+%%
+Type: region
+Subtag: EA
+Description: Ceuta, Melilla
+Added: 2009-07-29
+%%
+Type: region
+Subtag: EC
+Description: Ecuador
+Added: 2005-10-16
+%%
+Type: region
+Subtag: EE
+Description: Estonia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: EG
+Description: Egypt
+Added: 2005-10-16
+%%
+Type: region
+Subtag: EH
+Description: Western Sahara
+Added: 2005-10-16
+%%
+Type: region
+Subtag: ER
+Description: Eritrea
+Added: 2005-10-16
+%%
+Type: region
+Subtag: ES
+Description: Spain
+Added: 2005-10-16
+%%
+Type: region
+Subtag: ET
+Description: Ethiopia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: EU
+Description: European Union
+Added: 2009-07-29
+%%
+Type: region
+Subtag: FI
+Description: Finland
+Added: 2005-10-16
+%%
+Type: region
+Subtag: FJ
+Description: Fiji
+Added: 2005-10-16
+%%
+Type: region
+Subtag: FK
+Description: Falkland Islands (Malvinas)
+Added: 2005-10-16
+%%
+Type: region
+Subtag: FM
+Description: Federated States of Micronesia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: FO
+Description: Faroe Islands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: FR
+Description: France
+Added: 2005-10-16
+%%
+Type: region
+Subtag: FX
+Description: Metropolitan France
+Added: 2005-10-16
+Deprecated: 1997-07-14
+Preferred-Value: FR
+%%
+Type: region
+Subtag: GA
+Description: Gabon
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GB
+Description: United Kingdom
+Added: 2005-10-16
+Comments: as of 2006-03-29 GB no longer includes the Channel Islands and
+  Isle of Man; see GG, JE, IM
+%%
+Type: region
+Subtag: GD
+Description: Grenada
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GE
+Description: Georgia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GF
+Description: French Guiana
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GG
+Description: Guernsey
+Added: 2006-03-29
+%%
+Type: region
+Subtag: GH
+Description: Ghana
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GI
+Description: Gibraltar
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GL
+Description: Greenland
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GM
+Description: Gambia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GN
+Description: Guinea
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GP
+Description: Guadeloupe
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GQ
+Description: Equatorial Guinea
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GR
+Description: Greece
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GS
+Description: South Georgia and the South Sandwich Islands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GT
+Description: Guatemala
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GU
+Description: Guam
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GW
+Description: Guinea-Bissau
+Added: 2005-10-16
+%%
+Type: region
+Subtag: GY
+Description: Guyana
+Added: 2005-10-16
+%%
+Type: region
+Subtag: HK
+Description: Hong Kong
+Added: 2005-10-16
+%%
+Type: region
+Subtag: HM
+Description: Heard Island and McDonald Islands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: HN
+Description: Honduras
+Added: 2005-10-16
+%%
+Type: region
+Subtag: HR
+Description: Croatia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: HT
+Description: Haiti
+Added: 2005-10-16
+%%
+Type: region
+Subtag: HU
+Description: Hungary
+Added: 2005-10-16
+%%
+Type: region
+Subtag: IC
+Description: Canary Islands
+Added: 2009-07-29
+%%
+Type: region
+Subtag: ID
+Description: Indonesia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: IE
+Description: Ireland
+Added: 2005-10-16
+%%
+Type: region
+Subtag: IL
+Description: Israel
+Added: 2005-10-16
+%%
+Type: region
+Subtag: IM
+Description: Isle of Man
+Added: 2006-03-29
+%%
+Type: region
+Subtag: IN
+Description: India
+Added: 2005-10-16
+%%
+Type: region
+Subtag: IO
+Description: British Indian Ocean Territory
+Added: 2005-10-16
+%%
+Type: region
+Subtag: IQ
+Description: Iraq
+Added: 2005-10-16
+%%
+Type: region
+Subtag: IR
+Description: Islamic Republic of Iran
+Added: 2005-10-16
+%%
+Type: region
+Subtag: IS
+Description: Iceland
+Added: 2005-10-16
+%%
+Type: region
+Subtag: IT
+Description: Italy
+Added: 2005-10-16
+%%
+Type: region
+Subtag: JE
+Description: Jersey
+Added: 2006-03-29
+%%
+Type: region
+Subtag: JM
+Description: Jamaica
+Added: 2005-10-16
+%%
+Type: region
+Subtag: JO
+Description: Jordan
+Added: 2005-10-16
+%%
+Type: region
+Subtag: JP
+Description: Japan
+Added: 2005-10-16
+%%
+Type: region
+Subtag: KE
+Description: Kenya
+Added: 2005-10-16
+%%
+Type: region
+Subtag: KG
+Description: Kyrgyzstan
+Added: 2005-10-16
+%%
+Type: region
+Subtag: KH
+Description: Cambodia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: KI
+Description: Kiribati
+Added: 2005-10-16
+%%
+Type: region
+Subtag: KM
+Description: Comoros
+Added: 2005-10-16
+%%
+Type: region
+Subtag: KN
+Description: Saint Kitts and Nevis
+Added: 2005-10-16
+%%
+Type: region
+Subtag: KP
+Description: Democratic People's Republic of Korea
+Added: 2005-10-16
+%%
+Type: region
+Subtag: KR
+Description: Republic of Korea
+Added: 2005-10-16
+%%
+Type: region
+Subtag: KW
+Description: Kuwait
+Added: 2005-10-16
+%%
+Type: region
+Subtag: KY
+Description: Cayman Islands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: KZ
+Description: Kazakhstan
+Added: 2005-10-16
+%%
+Type: region
+Subtag: LA
+Description: Lao People's Democratic Republic
+Added: 2005-10-16
+%%
+Type: region
+Subtag: LB
+Description: Lebanon
+Added: 2005-10-16
+%%
+Type: region
+Subtag: LC
+Description: Saint Lucia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: LI
+Description: Liechtenstein
+Added: 2005-10-16
+%%
+Type: region
+Subtag: LK
+Description: Sri Lanka
+Added: 2005-10-16
+%%
+Type: region
+Subtag: LR
+Description: Liberia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: LS
+Description: Lesotho
+Added: 2005-10-16
+%%
+Type: region
+Subtag: LT
+Description: Lithuania
+Added: 2005-10-16
+%%
+Type: region
+Subtag: LU
+Description: Luxembourg
+Added: 2005-10-16
+%%
+Type: region
+Subtag: LV
+Description: Latvia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: LY
+Description: Libya
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MA
+Description: Morocco
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MC
+Description: Monaco
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MD
+Description: Moldova
+Added: 2005-10-16
+%%
+Type: region
+Subtag: ME
+Description: Montenegro
+Added: 2006-10-05
+%%
+Type: region
+Subtag: MF
+Description: Saint Martin (French part)
+Added: 2007-11-02
+%%
+Type: region
+Subtag: MG
+Description: Madagascar
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MH
+Description: Marshall Islands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MK
+Description: The Former Yugoslav Republic of Macedonia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: ML
+Description: Mali
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MM
+Description: Myanmar
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MN
+Description: Mongolia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MO
+Description: Macao
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MP
+Description: Northern Mariana Islands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MQ
+Description: Martinique
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MR
+Description: Mauritania
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MS
+Description: Montserrat
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MT
+Description: Malta
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MU
+Description: Mauritius
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MV
+Description: Maldives
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MW
+Description: Malawi
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MX
+Description: Mexico
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MY
+Description: Malaysia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: MZ
+Description: Mozambique
+Added: 2005-10-16
+%%
+Type: region
+Subtag: NA
+Description: Namibia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: NC
+Description: New Caledonia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: NE
+Description: Niger
+Added: 2005-10-16
+%%
+Type: region
+Subtag: NF
+Description: Norfolk Island
+Added: 2005-10-16
+%%
+Type: region
+Subtag: NG
+Description: Nigeria
+Added: 2005-10-16
+%%
+Type: region
+Subtag: NI
+Description: Nicaragua
+Added: 2005-10-16
+%%
+Type: region
+Subtag: NL
+Description: Netherlands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: NO
+Description: Norway
+Added: 2005-10-16
+%%
+Type: region
+Subtag: NP
+Description: Nepal
+Added: 2005-10-16
+%%
+Type: region
+Subtag: NR
+Description: Nauru
+Added: 2005-10-16
+%%
+Type: region
+Subtag: NT
+Description: Neutral Zone
+Added: 2005-10-16
+Deprecated: 1993-07-12
+%%
+Type: region
+Subtag: NU
+Description: Niue
+Added: 2005-10-16
+%%
+Type: region
+Subtag: NZ
+Description: New Zealand
+Added: 2005-10-16
+%%
+Type: region
+Subtag: OM
+Description: Oman
+Added: 2005-10-16
+%%
+Type: region
+Subtag: PA
+Description: Panama
+Added: 2005-10-16
+%%
+Type: region
+Subtag: PE
+Description: Peru
+Added: 2005-10-16
+%%
+Type: region
+Subtag: PF
+Description: French Polynesia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: PG
+Description: Papua New Guinea
+Added: 2005-10-16
+%%
+Type: region
+Subtag: PH
+Description: Philippines
+Added: 2005-10-16
+%%
+Type: region
+Subtag: PK
+Description: Pakistan
+Added: 2005-10-16
+%%
+Type: region
+Subtag: PL
+Description: Poland
+Added: 2005-10-16
+%%
+Type: region
+Subtag: PM
+Description: Saint Pierre and Miquelon
+Added: 2005-10-16
+%%
+Type: region
+Subtag: PN
+Description: Pitcairn
+Added: 2005-10-16
+%%
+Type: region
+Subtag: PR
+Description: Puerto Rico
+Added: 2005-10-16
+%%
+Type: region
+Subtag: PS
+Description: Occupied Palestinian Territory
+Added: 2005-10-16
+%%
+Type: region
+Subtag: PT
+Description: Portugal
+Added: 2005-10-16
+%%
+Type: region
+Subtag: PW
+Description: Palau
+Added: 2005-10-16
+%%
+Type: region
+Subtag: PY
+Description: Paraguay
+Added: 2005-10-16
+%%
+Type: region
+Subtag: QA
+Description: Qatar
+Added: 2005-10-16
+%%
+Type: region
+Subtag: QM..QZ
+Description: Private use
+Added: 2005-10-16
+%%
+Type: region
+Subtag: RE
+Description: Réunion
+Added: 2005-10-16
+%%
+Type: region
+Subtag: RO
+Description: Romania
+Added: 2005-10-16
+%%
+Type: region
+Subtag: RS
+Description: Serbia
+Added: 2006-10-05
+%%
+Type: region
+Subtag: RU
+Description: Russian Federation
+Added: 2005-10-16
+%%
+Type: region
+Subtag: RW
+Description: Rwanda
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SA
+Description: Saudi Arabia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SB
+Description: Solomon Islands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SC
+Description: Seychelles
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SD
+Description: Sudan
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SE
+Description: Sweden
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SG
+Description: Singapore
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SH
+Description: Saint Helena, Ascension and Tristan da Cunha
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SI
+Description: Slovenia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SJ
+Description: Svalbard and Jan Mayen
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SK
+Description: Slovakia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SL
+Description: Sierra Leone
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SM
+Description: San Marino
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SN
+Description: Senegal
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SO
+Description: Somalia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SR
+Description: Suriname
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SS
+Description: South Sudan
+Added: 2011-08-25
+%%
+Type: region
+Subtag: ST
+Description: Sao Tome and Principe
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SU
+Description: Union of Soviet Socialist Republics
+Added: 2005-10-16
+Deprecated: 1992-08-30
+%%
+Type: region
+Subtag: SV
+Description: El Salvador
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SX
+Description: Sint Maarten (Dutch part)
+Added: 2011-01-07
+%%
+Type: region
+Subtag: SY
+Description: Syrian Arab Republic
+Added: 2005-10-16
+%%
+Type: region
+Subtag: SZ
+Description: Swaziland
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TA
+Description: Tristan da Cunha
+Added: 2009-07-29
+%%
+Type: region
+Subtag: TC
+Description: Turks and Caicos Islands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TD
+Description: Chad
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TF
+Description: French Southern Territories
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TG
+Description: Togo
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TH
+Description: Thailand
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TJ
+Description: Tajikistan
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TK
+Description: Tokelau
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TL
+Description: Timor-Leste
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TM
+Description: Turkmenistan
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TN
+Description: Tunisia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TO
+Description: Tonga
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TP
+Description: East Timor
+Added: 2005-10-16
+Deprecated: 2002-05-20
+Preferred-Value: TL
+%%
+Type: region
+Subtag: TR
+Description: Turkey
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TT
+Description: Trinidad and Tobago
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TV
+Description: Tuvalu
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TW
+Description: Taiwan, Province of China
+Added: 2005-10-16
+%%
+Type: region
+Subtag: TZ
+Description: United Republic of Tanzania
+Added: 2005-10-16
+%%
+Type: region
+Subtag: UA
+Description: Ukraine
+Added: 2005-10-16
+%%
+Type: region
+Subtag: UG
+Description: Uganda
+Added: 2005-10-16
+%%
+Type: region
+Subtag: UM
+Description: United States Minor Outlying Islands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: US
+Description: United States
+Added: 2005-10-16
+%%
+Type: region
+Subtag: UY
+Description: Uruguay
+Added: 2005-10-16
+%%
+Type: region
+Subtag: UZ
+Description: Uzbekistan
+Added: 2005-10-16
+%%
+Type: region
+Subtag: VA
+Description: Holy See (Vatican City State)
+Added: 2005-10-16
+%%
+Type: region
+Subtag: VC
+Description: Saint Vincent and the Grenadines
+Added: 2005-10-16
+%%
+Type: region
+Subtag: VE
+Description: Venezuela
+Added: 2005-10-16
+%%
+Type: region
+Subtag: VG
+Description: British Virgin Islands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: VI
+Description: U.S. Virgin Islands
+Added: 2005-10-16
+%%
+Type: region
+Subtag: VN
+Description: Viet Nam
+Added: 2005-10-16
+%%
+Type: region
+Subtag: VU
+Description: Vanuatu
+Added: 2005-10-16
+%%
+Type: region
+Subtag: WF
+Description: Wallis and Futuna
+Added: 2005-10-16
+%%
+Type: region
+Subtag: WS
+Description: Samoa
+Added: 2005-10-16
+%%
+Type: region
+Subtag: XA..XZ
+Description: Private use
+Added: 2005-10-16
+%%
+Type: region
+Subtag: YD
+Description: Democratic Yemen
+Added: 2005-10-16
+Deprecated: 1990-08-14
+Preferred-Value: YE
+%%
+Type: region
+Subtag: YE
+Description: Yemen
+Added: 2005-10-16
+%%
+Type: region
+Subtag: YT
+Description: Mayotte
+Added: 2005-10-16
+%%
+Type: region
+Subtag: YU
+Description: Yugoslavia
+Added: 2005-10-16
+Deprecated: 2003-07-23
+Comments: see BA, HR, ME, MK, RS, or SI
+%%
+Type: region
+Subtag: ZA
+Description: South Africa
+Added: 2005-10-16
+%%
+Type: region
+Subtag: ZM
+Description: Zambia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: ZR
+Description: Zaire
+Added: 2005-10-16
+Deprecated: 1997-07-14
+Preferred-Value: CD
+%%
+Type: region
+Subtag: ZW
+Description: Zimbabwe
+Added: 2005-10-16
+%%
+Type: region
+Subtag: ZZ
+Description: Private use
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 001
+Description: World
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 002
+Description: Africa
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 003
+Description: North America
+Added: 2010-08-16
+Comments: Includes Northern America (021), Caribbean (029), and Central
+  America (013); see also 021
+%%
+Type: region
+Subtag: 005
+Description: South America
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 009
+Description: Oceania
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 011
+Description: Western Africa
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 013
+Description: Central America
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 014
+Description: Eastern Africa
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 015
+Description: Northern Africa
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 017
+Description: Middle Africa
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 018
+Description: Southern Africa
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 019
+Description: Americas
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 021
+Description: Northern America
+Added: 2005-10-16
+Comments: Does not include Caribbean (029) or Central America (013); see
+  also 003
+%%
+Type: region
+Subtag: 029
+Description: Caribbean
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 030
+Description: Eastern Asia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 034
+Description: Southern Asia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 035
+Description: South-Eastern Asia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 039
+Description: Southern Europe
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 053
+Description: Australia and New Zealand
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 054
+Description: Melanesia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 057
+Description: Micronesia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 061
+Description: Polynesia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 142
+Description: Asia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 143
+Description: Central Asia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 145
+Description: Western Asia
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 150
+Description: Europe
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 151
+Description: Eastern Europe
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 154
+Description: Northern Europe
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 155
+Description: Western Europe
+Added: 2005-10-16
+%%
+Type: region
+Subtag: 419
+Description: Latin America and the Caribbean
+Added: 2005-10-16
+%%
+Type: variant
+Subtag: 1606nict
+Description: Late Middle French (to 1606)
+Added: 2007-03-20
+Prefix: frm
+Comments: 16th century French as in Jean Nicot, "Thresor de la langue
+  francoyse", 1606, but also including some French similar to that of
+  Rabelais
+%%
+Type: variant
+Subtag: 1694acad
+Description: Early Modern French
+Added: 2007-03-20
+Prefix: fr
+Comments: 17th century French, as catalogued in the "Dictionnaire de
+  l'académie françoise", 4eme ed. 1694; frequently includes
+  elements of Middle French, as this is a transitional period
+%%
+Type: variant
+Subtag: 1901
+Description: Traditional German orthography
+Added: 2005-10-16
+Prefix: de
+%%
+Type: variant
+Subtag: 1959acad
+Description: "Academic" ("governmental") variant of Belarusian as
+  codified in 1959
+Added: 2008-09-30
+Prefix: be
+%%
+Type: variant
+Subtag: 1994
+Description: Standardized Resian orthography
+Added: 2007-07-28
+Prefix: sl-rozaj
+Prefix: sl-rozaj-biske
+Prefix: sl-rozaj-njiva
+Prefix: sl-rozaj-osojs
+Prefix: sl-rozaj-solba
+Comments: For standardized Resian an orthography was published in 1994.
+%%
+Type: variant
+Subtag: 1996
+Description: German orthography of 1996
+Added: 2005-10-16
+Prefix: de
+%%
+Type: variant
+Subtag: alalc97
+Description: ALA-LC Romanization, 1997 edition
+Added: 2009-12-09
+Comments: Romanizations recommended by the American Library Association
+  and the Library of Congress, in "ALA-LC Romanization Tables:
+  Transliteration Schemes for Non-Roman Scripts" (1997), ISBN
+  978-0-8444-0940-5.
+%%
+Type: variant
+Subtag: aluku
+Description: Aluku dialect
+Description: Boni dialect
+Added: 2009-09-05
+Prefix: djk
+Comments: Aluku dialect of the "Busi Nenge Tongo" English-based Creole
+  continuum in Eastern Suriname and Western French Guiana
+%%
+Type: variant
+Subtag: arevela
+Description: Eastern Armenian
+Added: 2006-09-18
+Prefix: hy
+%%
+Type: variant
+Subtag: arevmda
+Description: Western Armenian
+Added: 2006-09-18
+Prefix: hy
+%%
+Type: variant
+Subtag: baku1926
+Description: Unified Turkic Latin Alphabet (Historical)
+Added: 2007-04-18
+Prefix: az
+Prefix: ba
+Prefix: crh
+Prefix: kk
+Prefix: krc
+Prefix: ky
+Prefix: sah
+Prefix: tk
+Prefix: tt
+Prefix: uz
+Comments: Denotes alphabet used in Turkic republics/regions of the
+  former USSR in late 1920s, and throughout 1930s, which aspired to
+  represent equivalent phonemes in a unified fashion. Also known as: New
+  Turkic Alphabet; Birlәşdirilmiş Jeni Tyrk
+  Әlifbasь (Birlesdirilmis Jeni Tyrk Elifbasi);
+  Jaŋalif (Janalif).
+%%
+Type: variant
+Subtag: bauddha
+Description: Buddhist Hybrid Sanskrit
+Added: 2010-07-28
+Prefix: sa
+%%
+Type: variant
+Subtag: biscayan
+Description: Biscayan dialect of Basque
+Added: 2010-04-13
+Prefix: eu
+%%
+Type: variant
+Subtag: biske
+Description: The San Giorgio dialect of Resian
+Description: The Bila dialect of Resian
+Added: 2007-07-05
+Prefix: sl-rozaj
+Comments: The dialect of San Giorgio/Bila is one of the four major local
+  dialects of Resian
+%%
+Type: variant
+Subtag: bohoric
+Description: Slovene in Bohorič alphabet
+Added: 2012-06-27
+Prefix: sl
+Comments: The subtag represents the alphabet codified by Adam Bohorič in
+  1584 and used from the first printed Slovene book and up to the mid-
+  19th century.
+%%
+Type: variant
+Subtag: boont
+Description: Boontling
+Added: 2006-09-18
+Prefix: en
+Comments: Jargon embedded in American English
+%%
+Type: variant
+Subtag: dajnko
+Description: Slovene in Dajnko alphabet
+Added: 2012-06-27
+Prefix: sl
+Comments: The subtag represents the alphabet codified by Peter Dajnko
+  and used from 1824 to 1839 mostly in Styria (in what is now Eastern
+  Slovenia).
+%%
+Type: variant
+Subtag: emodeng
+Description: Early Modern English (1500-1700)
+Added: 2012-02-05
+Prefix: en
+%%
+Type: variant
+Subtag: fonipa
+Description: International Phonetic Alphabet
+Added: 2006-12-11
+%%
+Type: variant
+Subtag: fonupa
+Description: Uralic Phonetic Alphabet
+Added: 2006-12-11
+%%
+Type: variant
+Subtag: fonxsamp
+Description: X-SAMPA transcription
+Added: 2010-10-23
+Comments: Indicates that the content is transcribed according to X-SAMPA
+%%
+Type: variant
+Subtag: hepburn
+Description: Hepburn romanization
+Added: 2009-10-01
+Prefix: ja-Latn
+%%
+Type: variant
+Subtag: heploc
+Description: Hepburn romanization, Library of Congress method
+Added: 2009-10-01
+Deprecated: 2010-02-07
+Preferred-Value: alalc97
+Prefix: ja-Latn-hepburn
+Comments: Preferred tag is ja-Latn-alalc97
+%%
+Type: variant
+Subtag: hognorsk
+Description: Norwegian in Høgnorsk (High Norwegian) orthography
+Added: 2010-01-02
+Prefix: nn
+Comments: Norwegian following Ivar Aasen's orthographical principles,
+  including modern usage.
+%%
+Type: variant
+Subtag: itihasa
+Description: Epic Sanskrit
+Added: 2010-07-28
+Prefix: sa
+%%
+Type: variant
+Subtag: jauer
+Description: Jauer dialect of Romansh
+Added: 2010-06-29
+Prefix: rm
+Comments: The spoken dialect of the Val Müstair, which has no written
+  standard.
+%%
+Type: variant
+Subtag: jyutping
+Description: Jyutping Cantonese Romanization
+Added: 2010-10-23
+Prefix: yue
+Comments: Jyutping romanization of Cantonese
+%%
+Type: variant
+Subtag: kkcor
+Description: Common Cornish orthography of Revived Cornish
+Added: 2008-10-14
+Prefix: kw
+%%
+Type: variant
+Subtag: kscor
+Description: Standard Cornish orthography of Revived Cornish
+Description: Kernowek Standard
+Added: 2012-06-27
+Prefix: kw
+%%
+Type: variant
+Subtag: laukika
+Description: Classical Sanskrit
+Added: 2010-07-28
+Prefix: sa
+%%
+Type: variant
+Subtag: lipaw
+Description: The Lipovaz dialect of Resian
+Description: The Lipovec dialect of Resian
+Added: 2007-08-11
+Prefix: sl-rozaj
+Comments: The dialect of Lipovaz/Lipovec is one of the minor local
+  dialects of Resian
+%%
+Type: variant
+Subtag: luna1918
+Description: Post-1917 Russian orthography
+Added: 2010-10-10
+Prefix: ru
+Comments: Russian orthography as established by the 1917/1918
+  orthographic reforms
+%%
+Type: variant
+Subtag: metelko
+Description: Slovene in Metelko alphabet
+Added: 2012-06-27
+Prefix: sl
+Comments: The subtag represents the alphabet codified by Franc Serafin
+  Metelko and used from 1825 to 1833.
+%%
+Type: variant
+Subtag: monoton
+Description: Monotonic Greek
+Added: 2006-12-11
+Prefix: el
+%%
+Type: variant
+Subtag: ndyuka
+Description: Ndyuka dialect
+Description: Aukan dialect
+Added: 2009-09-05
+Prefix: djk
+Comments: Ndyuka dialect of the "Busi Nenge Tongo" English-based
+  Creole continuum in Eastern Suriname and Western French Guiana
+%%
+Type: variant
+Subtag: nedis
+Description: Natisone dialect
+Description: Nadiza dialect
+Added: 2005-10-16
+Prefix: sl
+%%
+Type: variant
+Subtag: njiva
+Description: The Gniva dialect of Resian
+Description: The Njiva dialect of Resian
+Added: 2007-07-05
+Prefix: sl-rozaj
+Comments: The dialect of Gniva/Njiva is one of the four major local
+  dialects of Resian
+%%
+Type: variant
+Subtag: nulik
+Description: Volapük nulik
+Description: Volapük perevidöl
+Description: Volapük nulädik
+Description: de Jong's Volapük
+Description: New Volapük
+Description: Revised Volapük
+Description: Modern Volapük
+Added: 2012-01-28
+Prefix: vo
+%%
+Type: variant
+Subtag: osojs
+Description: The Oseacco dialect of Resian
+Description: The Osojane dialect of Resian
+Added: 2007-07-05
+Prefix: sl-rozaj
+Comments: The dialect of Oseacco/Osojane is one of the four major local
+  dialects of Resian
+%%
+Type: variant
+Subtag: pamaka
+Description: Pamaka dialect
+Added: 2009-09-05
+Prefix: djk
+Comments: Pamaka dialect of the "Busi Nenge Tongo" English-based
+  Creole continuum in Eastern Suriname and Western French Guiana
+%%
+Type: variant
+Subtag: petr1708
+Description: Petrine orthography
+Added: 2010-10-10
+Prefix: ru
+Comments: Russian orthography from the Petrine orthographic reforms of
+  1708 to the 1917 orthographic reform
+%%
+Type: variant
+Subtag: pinyin
+Description: Pinyin romanization
+Added: 2008-10-14
+Prefix: zh-Latn
+Prefix: bo-Latn
+%%
+Type: variant
+Subtag: polyton
+Description: Polytonic Greek
+Added: 2006-12-11
+Prefix: el
+%%
+Type: variant
+Subtag: puter
+Description: Puter idiom of Romansh
+Added: 2010-06-29
+Prefix: rm
+Comments: Puter is one of the five traditional written standards or
+  "idioms" of the Romansh language.
+%%
+Type: variant
+Subtag: rigik
+Description: Volapük rigik
+Description: Schleyer's Volapük
+Description: Original Volapük
+Description: Classic Volapük
+Added: 2012-01-28
+Prefix: vo
+%%
+Type: variant
+Subtag: rozaj
+Description: Resian
+Description: Resianic
+Description: Rezijan
+Added: 2005-10-16
+Prefix: sl
+%%
+Type: variant
+Subtag: rumgr
+Description: Rumantsch Grischun
+Added: 2010-06-29
+Prefix: rm
+Comments: Supraregional Romansh written standard
+%%
+Type: variant
+Subtag: scotland
+Description: Scottish Standard English
+Added: 2007-08-31
+Prefix: en
+%%
+Type: variant
+Subtag: scouse
+Description: Scouse
+Added: 2006-09-18
+Prefix: en
+Comments: English Liverpudlian dialect known as 'Scouse'
+%%
+Type: variant
+Subtag: solba
+Description: The Stolvizza dialect of Resian
+Description: The Solbica dialect of Resian
+Added: 2007-07-05
+Prefix: sl-rozaj
+Comments: The dialect of Stolvizza/Solbica is one of the four major
+  local dialects of Resian
+%%
+Type: variant
+Subtag: surmiran
+Description: Surmiran idiom of Romansh
+Added: 2010-06-29
+Prefix: rm
+Comments: Surmiran is one of the five traditional written standards or
+  "idioms" of the Romansh language.
+%%
+Type: variant
+Subtag: sursilv
+Description: Sursilvan idiom of Romansh
+Added: 2010-06-29
+Prefix: rm
+Comments: Sursilvan is one of the five traditional written standards or
+  "idioms" of the Romansh language.
+%%
+Type: variant
+Subtag: sutsilv
+Description: Sutsilvan idiom of Romansh
+Added: 2010-06-29
+Prefix: rm
+Comments: Sutsilvan is one of the five traditional written standards or
+  "idioms" of the Romansh language.
+%%
+Type: variant
+Subtag: tarask
+Description: Belarusian in Taraskievica orthography
+Added: 2007-04-27
+Prefix: be
+Comments: The subtag represents Branislau Taraskievic's Belarusian
+  orthography as published in "Bielaruski klasycny pravapis" by Juras
+  Buslakou, Vincuk Viacorka, Zmicier Sanko, and Zmicier Sauka (Vilnia-
+  Miensk 2005).
+%%
+Type: variant
+Subtag: uccor
+Description: Unified Cornish orthography of Revived Cornish
+Added: 2008-10-14
+Prefix: kw
+%%
+Type: variant
+Subtag: ucrcor
+Description: Unified Cornish Revised orthography of Revived Cornish
+Added: 2008-10-14
+Prefix: kw
+%%
+Type: variant
+Subtag: ulster
+Description: Ulster dialect of Scots
+Added: 2010-04-10
+Prefix: sco
+%%
+Type: variant
+Subtag: vaidika
+Description: Vedic Sanskrit
+Added: 2010-07-28
+Prefix: sa
+Comments: The most ancient dialect of Sanskrit used in verse and prose
+  composed until about the 4th century B.C.E.
+%%
+Type: variant
+Subtag: valencia
+Description: Valencian
+Added: 2007-03-06
+Prefix: ca
+Comments: Variety spoken in the "Comunidad Valenciana" region of Spain,
+  where it is co-official with Spanish.
+%%
+Type: variant
+Subtag: vallader
+Description: Vallader idiom of Romansh
+Added: 2010-06-29
+Prefix: rm
+Comments: Vallader is one of the five traditional written standards or
+  "idioms" of the Romansh language.
+%%
+Type: variant
+Subtag: wadegile
+Description: Wade-Giles romanization
+Added: 2008-10-03
+Prefix: zh-Latn
+%%
+Type: grandfathered
+Tag: art-lojban
+Description: Lojban
+Added: 2001-11-11
+Deprecated: 2003-09-02
+Preferred-Value: jbo
+%%
+Type: grandfathered
+Tag: cel-gaulish
+Description: Gaulish
+Added: 2001-05-25
+%%
+Type: grandfathered
+Tag: en-GB-oed
+Description: English, Oxford English Dictionary spelling
+Added: 2003-07-09
+%%
+Type: grandfathered
+Tag: i-ami
+Description: Amis
+Added: 1999-05-25
+Deprecated: 2009-07-29
+Preferred-Value: ami
+%%
+Type: grandfathered
+Tag: i-bnn
+Description: Bunun
+Added: 1999-05-25
+Deprecated: 2009-07-29
+Preferred-Value: bnn
+%%
+Type: grandfathered
+Tag: i-default
+Description: Default Language
+Added: 1998-03-10
+%%
+Type: grandfathered
+Tag: i-enochian
+Description: Enochian
+Added: 2002-07-03
+%%
+Type: grandfathered
+Tag: i-hak
+Description: Hakka
+Added: 1999-01-31
+Deprecated: 2000-01-10
+Preferred-Value: hak
+%%
+Type: grandfathered
+Tag: i-klingon
+Description: Klingon
+Added: 1999-05-26
+Deprecated: 2004-02-24
+Preferred-Value: tlh
+%%
+Type: grandfathered
+Tag: i-lux
+Description: Luxembourgish
+Added: 1997-09-19
+Deprecated: 1998-09-09
+Preferred-Value: lb
+%%
+Type: grandfathered
+Tag: i-mingo
+Description: Mingo
+Added: 1997-09-19
+%%
+Type: grandfathered
+Tag: i-navajo
+Description: Navajo
+Added: 1997-09-19
+Deprecated: 2000-02-18
+Preferred-Value: nv
+%%
+Type: grandfathered
+Tag: i-pwn
+Description: Paiwan
+Added: 1999-05-25
+Deprecated: 2009-07-29
+Preferred-Value: pwn
+%%
+Type: grandfathered
+Tag: i-tao
+Description: Tao
+Added: 1999-05-25
+Deprecated: 2009-07-29
+Preferred-Value: tao
+%%
+Type: grandfathered
+Tag: i-tay
+Description: Tayal
+Added: 1999-05-25
+Deprecated: 2009-07-29
+Preferred-Value: tay
+%%
+Type: grandfathered
+Tag: i-tsu
+Description: Tsou
+Added: 1999-05-25
+Deprecated: 2009-07-29
+Preferred-Value: tsu
+%%
+Type: grandfathered
+Tag: no-bok
+Description: Norwegian Bokmal
+Added: 1995-08-23
+Deprecated: 2000-02-18
+Preferred-Value: nb
+%%
+Type: grandfathered
+Tag: no-nyn
+Description: Norwegian Nynorsk
+Added: 1995-08-23
+Deprecated: 2000-02-18
+Preferred-Value: nn
+%%
+Type: grandfathered
+Tag: sgn-BE-FR
+Description: Belgian-French Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: sfb
+%%
+Type: grandfathered
+Tag: sgn-BE-NL
+Description: Belgian-Flemish Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: vgt
+%%
+Type: grandfathered
+Tag: sgn-CH-DE
+Description: Swiss German Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: sgg
+%%
+Type: grandfathered
+Tag: zh-guoyu
+Description: Mandarin or Standard Chinese
+Added: 1999-12-18
+Deprecated: 2005-07-15
+Preferred-Value: cmn
+%%
+Type: grandfathered
+Tag: zh-hakka
+Description: Hakka
+Added: 1999-12-18
+Deprecated: 2009-07-29
+Preferred-Value: hak
+%%
+Type: grandfathered
+Tag: zh-min
+Description: Min, Fuzhou, Hokkien, Amoy, or Taiwanese
+Added: 1999-12-18
+Deprecated: 2009-07-29
+%%
+Type: grandfathered
+Tag: zh-min-nan
+Description: Minnan, Hokkien, Amoy, Taiwanese, Southern Min, Southern
+  Fujian, Hoklo, Southern Fukien, Ho-lo
+Added: 2001-03-26
+Deprecated: 2009-07-29
+Preferred-Value: nan
+%%
+Type: grandfathered
+Tag: zh-xiang
+Description: Xiang or Hunanese
+Added: 1999-12-18
+Deprecated: 2009-07-29
+Preferred-Value: hsn
+%%
+Type: redundant
+Tag: az-Arab
+Description: Azerbaijani in Arabic script
+Added: 2003-05-30
+%%
+Type: redundant
+Tag: az-Cyrl
+Description: Azerbaijani in Cyrillic script
+Added: 2003-05-30
+%%
+Type: redundant
+Tag: az-Latn
+Description: Azerbaijani in Latin script
+Added: 2003-05-30
+%%
+Type: redundant
+Tag: be-Latn
+Description: Belarusian in Latin script
+Added: 2005-01-06
+%%
+Type: redundant
+Tag: bs-Cyrl
+Description: Bosnian in Cyrillic script
+Added: 2005-02-17
+%%
+Type: redundant
+Tag: bs-Latn
+Description: Bosnian in Latin script
+Added: 2005-02-17
+%%
+Type: redundant
+Tag: de-1901
+Description: German, traditional orthography
+Added: 2001-07-17
+%%
+Type: redundant
+Tag: de-1996
+Description: German, orthography of 1996
+Added: 2001-07-17
+%%
+Type: redundant
+Tag: de-AT-1901
+Description: German, Austrian variant, traditional orthography
+Added: 2001-07-17
+%%
+Type: redundant
+Tag: de-AT-1996
+Description: German, Austrian variant, orthography of 1996
+Added: 2001-07-17
+%%
+Type: redundant
+Tag: de-CH-1901
+Description: German, Swiss variant, traditional orthography
+Added: 2001-07-17
+%%
+Type: redundant
+Tag: de-CH-1996
+Description: German, Swiss variant, orthography of 1996
+Added: 2001-07-17
+%%
+Type: redundant
+Tag: de-DE-1901
+Description: German, German variant, traditional orthography
+Added: 2001-07-17
+%%
+Type: redundant
+Tag: de-DE-1996
+Description: German, German variant, orthography of 1996
+Added: 2001-07-17
+%%
+Type: redundant
+Tag: en-boont
+Description: Boontling
+Added: 2003-02-14
+%%
+Type: redundant
+Tag: en-scouse
+Description: Scouse
+Added: 2000-05-25
+%%
+Type: redundant
+Tag: es-419
+Description: Latin American Spanish
+Added: 2005-07-15
+%%
+Type: redundant
+Tag: iu-Cans
+Description: Inuktitut in Canadian Aboriginal Syllabic script
+Added: 2005-02-17
+%%
+Type: redundant
+Tag: iu-Latn
+Description: Inuktitut in Latin script
+Added: 2005-02-17
+%%
+Type: redundant
+Tag: mn-Cyrl
+Description: Mongolian in Cyrillic script
+Added: 2005-02-17
+%%
+Type: redundant
+Tag: mn-Mong
+Description: Mongolian in Mongolian script
+Added: 2005-02-17
+%%
+Type: redundant
+Tag: sgn-BR
+Description: Brazilian Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: bzs
+%%
+Type: redundant
+Tag: sgn-CO
+Description: Colombian Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: csn
+%%
+Type: redundant
+Tag: sgn-DE
+Description: German Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: gsg
+%%
+Type: redundant
+Tag: sgn-DK
+Description: Danish Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: dsl
+%%
+Type: redundant
+Tag: sgn-ES
+Description: Spanish Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: ssp
+%%
+Type: redundant
+Tag: sgn-FR
+Description: French Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: fsl
+%%
+Type: redundant
+Tag: sgn-GB
+Description: British Sign Language
+Added: 2001-03-02
+Deprecated: 2009-07-29
+Preferred-Value: bfi
+%%
+Type: redundant
+Tag: sgn-GR
+Description: Greek Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: gss
+%%
+Type: redundant
+Tag: sgn-IE
+Description: Irish Sign Language
+Added: 2001-03-02
+Deprecated: 2009-07-29
+Preferred-Value: isg
+%%
+Type: redundant
+Tag: sgn-IT
+Description: Italian Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: ise
+%%
+Type: redundant
+Tag: sgn-JP
+Description: Japanese Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: jsl
+%%
+Type: redundant
+Tag: sgn-MX
+Description: Mexican Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: mfs
+%%
+Type: redundant
+Tag: sgn-NI
+Description: Nicaraguan Sign Language
+Added: 2001-03-02
+Deprecated: 2009-07-29
+Preferred-Value: ncs
+%%
+Type: redundant
+Tag: sgn-NL
+Description: Dutch Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: dse
+%%
+Type: redundant
+Tag: sgn-NO
+Description: Norwegian Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: nsl
+%%
+Type: redundant
+Tag: sgn-PT
+Description: Portuguese Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: psr
+%%
+Type: redundant
+Tag: sgn-SE
+Description: Swedish Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: swl
+%%
+Type: redundant
+Tag: sgn-US
+Description: American Sign Language
+Added: 2001-03-02
+Deprecated: 2009-07-29
+Preferred-Value: ase
+%%
+Type: redundant
+Tag: sgn-ZA
+Description: South African Sign Language
+Added: 2001-11-11
+Deprecated: 2009-07-29
+Preferred-Value: sfs
+%%
+Type: redundant
+Tag: sl-nedis
+Description: Natisone dialect, Nadiza dialect
+Added: 2004-06-01
+%%
+Type: redundant
+Tag: sl-rozaj
+Description: Resian, Resianic, Rezijan
+Added: 2003-10-09
+%%
+Type: redundant
+Tag: sr-Cyrl
+Description: Serbian in Cyrillic script
+Added: 2003-05-30
+%%
+Type: redundant
+Tag: sr-Latn
+Description: Serbian in Latin script
+Added: 2003-05-30
+%%
+Type: redundant
+Tag: tg-Arab
+Description: Tajik in Arabic script
+Added: 2005-02-17
+%%
+Type: redundant
+Tag: tg-Cyrl
+Description: Tajik in Cyrillic script
+Added: 2005-02-17
+%%
+Type: redundant
+Tag: uz-Cyrl
+Description: Uzbek in Cyrillic script
+Added: 2003-05-30
+%%
+Type: redundant
+Tag: uz-Latn
+Description: Uzbek in Latin script
+Added: 2003-05-30
+%%
+Type: redundant
+Tag: yi-Latn
+Description: Yiddish, in Latin script
+Added: 2003-01-07
+%%
+Type: redundant
+Tag: zh-cmn
+Description: Mandarin Chinese
+Added: 2005-07-15
+Deprecated: 2009-07-29
+Preferred-Value: cmn
+%%
+Type: redundant
+Tag: zh-cmn-Hans
+Description: Mandarin Chinese (Simplified)
+Added: 2005-07-15
+Deprecated: 2009-07-29
+Preferred-Value: cmn-Hans
+%%
+Type: redundant
+Tag: zh-cmn-Hant
+Description: Mandarin Chinese (Traditional)
+Added: 2005-07-15
+Deprecated: 2009-07-29
+Preferred-Value: cmn-Hant
+%%
+Type: redundant
+Tag: zh-gan
+Description: Kan or Gan
+Added: 1999-12-18
+Deprecated: 2009-07-29
+Preferred-Value: gan
+%%
+Type: redundant
+Tag: zh-Hans
+Description: simplified Chinese
+Added: 2003-05-30
+%%
+Type: redundant
+Tag: zh-Hans-CN
+Description: PRC Mainland Chinese in simplified script
+Added: 2005-04-13
+%%
+Type: redundant
+Tag: zh-Hans-HK
+Description: Hong Kong Chinese in simplified script
+Added: 2005-04-11
+%%
+Type: redundant
+Tag: zh-Hans-MO
+Description: Macao Chinese in simplified script
+Added: 2005-04-11
+%%
+Type: redundant
+Tag: zh-Hans-SG
+Description: Singapore Chinese in simplified script
+Added: 2005-04-11
+%%
+Type: redundant
+Tag: zh-Hans-TW
+Description: Taiwan Chinese in simplified script
+Added: 2005-04-11
+%%
+Type: redundant
+Tag: zh-Hant
+Description: traditional Chinese
+Added: 2003-05-30
+%%
+Type: redundant
+Tag: zh-Hant-CN
+Description: PRC Mainland Chinese in traditional script
+Added: 2005-04-13
+%%
+Type: redundant
+Tag: zh-Hant-HK
+Description: Hong Kong Chinese in traditional script
+Added: 2005-04-11
+%%
+Type: redundant
+Tag: zh-Hant-MO
+Description: Macao Chinese in traditional script
+Added: 2005-04-11
+%%
+Type: redundant
+Tag: zh-Hant-SG
+Description: Singapore Chinese in traditional script
+Added: 2005-04-11
+%%
+Type: redundant
+Tag: zh-Hant-TW
+Description: Taiwan Chinese in traditional script
+Added: 2005-04-11
+%%
+Type: redundant
+Tag: zh-wuu
+Description: Shanghaiese or Wu
+Added: 1999-12-18
+Deprecated: 2009-07-29
+Preferred-Value: wuu
+%%
+Type: redundant
+Tag: zh-yue
+Description: Cantonese
+Added: 1999-12-18
+Deprecated: 2009-07-29
+Preferred-Value: yue
diff --git a/jdk/test/java/util/Properties/CustomProvider.java b/jdk/test/java/util/Properties/CustomProvider.java
new file mode 100644
index 00000000000..fc8ed24b0b7
--- /dev/null
+++ b/jdk/test/java/util/Properties/CustomProvider.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+/*
+ * @test
+ * @bug 8000354
+ * @summary Test
+ * @compile -XDignore.symbol.file CustomProvider.java MyXmlPropertiesProvider.java
+ * @run main/othervm -Dsun.util.spi.XmlPropertiesProvider=MyXmlPropertiesProvider CustomProvider
+ */
+
+import java.util.*;
+import java.io.*;
+
+/**
+ * Sanity test to verify that the property sun.util.spi.XmlPropertiesProvider
+ * can be used to specify a custom provider for loading/storing properties
+ * in XML format.
+ */
+public class CustomProvider {
+
+    public static void main(String[] args) throws IOException {
+        String provider = System.getProperty("sun.util.spi.XmlPropertiesProvider");
+        assertTrue(provider != null, "sun.util.spi.XmlPropertiesProvider not set");
+
+        OutputStream out = new ByteArrayOutputStream();
+        InputStream in = new ByteArrayInputStream(new byte[100]);
+
+        Properties props;
+
+        props = new Properties();
+        props.loadFromXML(in);
+
+        props = System.getProperties();
+        props.storeToXML(out, "comment");
+        props.storeToXML(out, "comment", "UTF-8");
+
+        // check that the provider's load and store methods have been invoked
+
+        assertTrue(MyXmlPropertiesProvider.createCount() == 1,
+            "Provider should only be created once");
+        assertTrue(MyXmlPropertiesProvider.loadCount() == 1,
+            "load method expected to be called once");
+        assertTrue(MyXmlPropertiesProvider.storeCount() == 2,
+             "store method expected to be called twice");
+    }
+
+    static void assertTrue(boolean b, String msg) {
+        if (!b) throw new RuntimeException(msg);
+    }
+}
diff --git a/jdk/test/java/util/Properties/LoadAndStoreXML.java b/jdk/test/java/util/Properties/LoadAndStoreXML.java
new file mode 100644
index 00000000000..8fc5e73ab44
--- /dev/null
+++ b/jdk/test/java/util/Properties/LoadAndStoreXML.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8000354
+ * @summary Basic test of storeToXML and loadToXML
+ */
+
+import java.io.*;
+import java.util.*;
+import java.security.*;
+
+public class LoadAndStoreXML {
+
+    /**
+     * Simple policy implementation that grants a set of permissions to
+     * all code sources and protection domains.
+     */
+    static class SimplePolicy extends Policy {
+        private final Permissions perms;
+
+        public SimplePolicy(Permission...permissions) {
+            perms = new Permissions();
+            for (Permission permission : permissions)
+                perms.add(permission);
+        }
+
+        @Override
+        public PermissionCollection getPermissions(CodeSource cs) {
+            return perms;
+        }
+
+        @Override
+        public PermissionCollection getPermissions(ProtectionDomain pd) {
+            return perms;
+        }
+
+        @Override
+        public boolean implies(ProtectionDomain pd, Permission p) {
+            return perms.implies(p);
+        }
+    }
+
+    /**
+     * Sanity test that properties saved with Properties#storeToXML can be
+     * read with Properties#loadFromXML.
+     */
+    static void test() throws IOException {
+        Properties props = new Properties();
+        props.put("k1", "foo");
+        props.put("k2", "bar");
+
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        props.storeToXML(out, "no comment");
+
+        Properties p = new Properties();
+        ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
+        p.loadFromXML(in);
+
+        if (!p.equals(props)) {
+            System.err.println("stored: " + props);
+            System.err.println("loaded: " + p);
+            throw new RuntimeException("Test failed");
+        }
+    }
+
+    public static void main(String[] args) throws IOException {
+
+        // run test without security manager
+        test();
+
+        // re-run test with security manager
+        Policy orig = Policy.getPolicy();
+        Policy p = new SimplePolicy(new RuntimePermission("setSecurityManager"),
+                                    new PropertyPermission("line.separator", "read"));
+        Policy.setPolicy(p);
+        System.setSecurityManager(new SecurityManager());
+        try {
+            test();
+        } finally {
+            // turn off security manager and restore policy
+            System.setSecurityManager(null);
+            Policy.setPolicy(orig);
+        }
+
+    }
+}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86PCRelativeAddress.java b/jdk/test/java/util/Properties/MyXmlPropertiesProvider.java
similarity index 54%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86PCRelativeAddress.java
rename to jdk/test/java/util/Properties/MyXmlPropertiesProvider.java
index da396c31f66..652fa28ac5f 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86PCRelativeAddress.java
+++ b/jdk/test/java/util/Properties/MyXmlPropertiesProvider.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,36 +19,38 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.x86;
+import java.util.*;
+import java.io.*;
 
-import sun.jvm.hotspot.asm.*;
+public class MyXmlPropertiesProvider
+    extends sun.util.spi.XmlPropertiesProvider
+{
+    private static int createCount;
+    private static int loadCount;
+    private static int storeCount;
 
-// address is specified as an offset from current PC
+    static int createCount() { return createCount; }
+    static int loadCount() { return loadCount; }
+    static int storeCount() { return storeCount; }
 
-public class X86PCRelativeAddress extends PCRelativeAddress {
-   private int instrSize;
+    public MyXmlPropertiesProvider() {
+        createCount++;
+    }
 
-   public X86PCRelativeAddress(long disp) {
-       super(disp);
-   }
+    @Override
+    public void load(Properties props, InputStream in)
+        throws IOException, InvalidPropertiesFormatException
+    {
+        loadCount++;
+    }
 
-
-   public void setInstructionSize(int size) {
-      instrSize = size;
-   }
-
-   public String toString() {
-      long displacement = this.getDisplacement();
-      return new Long(displacement).toString();
-   }
-
-   //In intel assembly the displacement is from start of next instruction.
-   //So we add the size of current instruction to get the correct disp.
-   public long getDisplacement() {
-      long displacement = super.getDisplacement() + (long)instrSize;
-      return displacement;
-   }
+    @Override
+    public void store(Properties props, OutputStream out,
+                      String comment, String encoding)
+        throws IOException
+    {
+        storeCount++;
+    }
 }
diff --git a/jdk/test/java/util/ServiceLoader/NPE.java b/jdk/test/java/util/ServiceLoader/NPE.java
new file mode 100644
index 00000000000..e2e767b2d74
--- /dev/null
+++ b/jdk/test/java/util/ServiceLoader/NPE.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug 7197642
+ * @summary test ServiceLoader.load methods for NullPointerException.
+ */
+import java.util.ServiceLoader;
+import java.util.Arrays;
+
+public final class NPE {
+    static abstract class Test {
+        String name;
+
+        Test(String name) { this.name = name; }
+
+        abstract void run();
+    }
+
+    static Test load = new Test("ServiceLoader.load(null)") {
+        void run() { ServiceLoader.load(null); }
+    };
+
+    static Test loadWithClassLoader = new Test("ServiceLoader.load(null, loader)") {
+        void run() { ServiceLoader.load(null, NPE.class.getClassLoader()); }
+    };
+
+    static Test loadInstalled = new Test("ServiceLoader.loadInstalled(null)") {
+        void run() { ServiceLoader.loadInstalled(null); }
+    };
+
+    public static void main(String[] args) throws Exception {
+        for (Test t : Arrays.asList(load, loadWithClassLoader, loadInstalled)) {
+            NullPointerException caught = null;
+            try {
+                t.run();
+            } catch (NullPointerException e) {
+                caught = e;
+            }
+            if (caught == null) {
+                throw new RuntimeException("NullPointerException expected for method invocation of " + t.name);
+            }
+        }
+    }
+}
+
diff --git a/jdk/test/sun/java2d/pipe/InterpolationQualityTest.java b/jdk/test/sun/java2d/pipe/InterpolationQualityTest.java
new file mode 100644
index 00000000000..8492f1b6ef5
--- /dev/null
+++ b/jdk/test/sun/java2d/pipe/InterpolationQualityTest.java
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7188093 8000176
+ * @summary Tests each of the 3 possible methods for rendering an upscaled
+ * image via rendering hints for default, xrender and opengl pipelines.
+ *
+ * @author Vadim.Pakhnushev@oracle.com
+ * @run main/othervm -Dsun.java2d.xrender=false InterpolationQualityTest
+ * @run main/othervm -Dsun.java2d.xrender=True InterpolationQualityTest
+ * @run main/othervm -Dsun.java2d.opengl=True InterpolationQualityTest
+ * @run main/othervm -Dsun.java2d.d3d=false InterpolationQualityTest
+ * @run main/othervm -Dsun.java2d.d3d=True InterpolationQualityTest
+ */
+
+import java.awt.*;
+import java.awt.image.*;
+import java.io.File;
+import java.io.IOException;
+import javax.imageio.ImageIO;
+
+public class InterpolationQualityTest {
+
+    private static final int testSize = 4, scaleFactor = 20, tolerance = 3;
+    private static final int sw = testSize * scaleFactor;
+    private static final int sh = testSize * scaleFactor;
+
+    private Image testImage;
+    private VolatileImage vImg;
+
+    public InterpolationQualityTest() {
+        testImage = createTestImage();
+    }
+
+    private Image createTestImage() {
+        BufferedImage bi = new BufferedImage(testSize, testSize, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g = bi.createGraphics();
+        g.setColor(Color.BLACK);
+        g.fillRect(0, 0, testSize, testSize);
+        for (int i = 0; i < testSize; i++) {
+            bi.setRGB(i, i, Color.WHITE.getRGB());
+        }
+        return bi;
+    }
+
+    private BufferedImage createReferenceImage(Object hint) {
+        BufferedImage bi = new BufferedImage(sw, sh, BufferedImage.TYPE_INT_ARGB);
+        Graphics2D g2d = bi.createGraphics();
+        drawImage(g2d, hint);
+        return bi;
+    }
+
+    private void drawImage(Graphics2D g2d, Object hint) {
+        g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, hint);
+        g2d.drawImage(testImage, 0, 0, sw, sh, null);
+    }
+
+    private GraphicsConfiguration getDefaultGC() {
+        return GraphicsEnvironment.getLocalGraphicsEnvironment().
+                getDefaultScreenDevice().getDefaultConfiguration();
+    }
+
+    private void createVImg() {
+        vImg = getDefaultGC().createCompatibleVolatileImage(sw, sh);
+    }
+
+    private void renderOffscreen(Object hint) {
+        Graphics2D g = vImg.createGraphics();
+        drawImage(g, hint);
+        g.dispose();
+    }
+
+    private BufferedImage renderImage(Object hint) {
+        BufferedImage snapshot;
+        createVImg();
+        renderOffscreen(hint);
+
+        do {
+            int status = vImg.validate(getDefaultGC());
+            if (status != VolatileImage.IMAGE_OK) {
+                if (status == VolatileImage.IMAGE_INCOMPATIBLE) {
+                    createVImg();
+                }
+                renderOffscreen(hint);
+            }
+            snapshot = vImg.getSnapshot();
+        } while (vImg.contentsLost());
+        vImg.flush();
+        return snapshot;
+    }
+
+    private boolean compareComponent(int comp1, int comp2) {
+        return Math.abs(comp1 - comp2) <= tolerance;
+    }
+
+    private boolean compareRGB(int rgb1, int rgb2) {
+        Color col1 = new Color(rgb1);
+        Color col2 = new Color(rgb2);
+        return compareComponent(col1.getRed(), col2.getRed()) &&
+                compareComponent(col1.getBlue(), col2.getBlue()) &&
+                compareComponent(col1.getGreen(), col2.getGreen()) &&
+                compareComponent(col1.getAlpha(), col2.getAlpha());
+    }
+
+    private boolean compareImages(BufferedImage img, BufferedImage ref, String imgName) {
+        for (int y = 0; y < ref.getHeight(); y++) {
+            for (int x = 0; x < ref.getWidth(); x++) {
+                if (!compareRGB(ref.getRGB(x, y), img.getRGB(x, y))) {
+                    System.out.println(imgName + ".getRGB(" + x + ", " + y + ") = "
+                            + new Color(img.getRGB(x, y)) + " != "
+                            + new Color(ref.getRGB(x, y)));
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+
+    private boolean test(Object hint) {
+        BufferedImage refImage = createReferenceImage(hint);
+        BufferedImage resImage = renderImage(hint);
+
+        boolean passed = compareImages(resImage, refImage, "resImage");
+        System.out.println(getHintName(hint) + (passed ? " passed." : " failed."));
+        if (!passed) {
+            dumpImage(refImage, "out_" + getHintName(hint) + "_ref.png");
+            dumpImage(resImage, "out_" + getHintName(hint) + ".png");
+        }
+        return passed;
+    }
+
+    public void test() {
+        boolean passed = true;
+        passed &= test(RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR);
+        passed &= test(RenderingHints.VALUE_INTERPOLATION_BILINEAR);
+        passed &= test(RenderingHints.VALUE_INTERPOLATION_BICUBIC);
+        if (passed) {
+            System.out.println("Test PASSED.");
+        } else {
+            throw new RuntimeException("Test FAILED.");
+        }
+    }
+
+    private String getHintName(Object hint) {
+        if (hint == RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR) {
+            return "nearest";
+        }
+        else if (hint == RenderingHints.VALUE_INTERPOLATION_BILINEAR) {
+            return "bilinear";
+        }
+        else if (hint == RenderingHints.VALUE_INTERPOLATION_BICUBIC) {
+            return "bicubic";
+        }
+        else {
+            return "null";
+        }
+    }
+
+    private void dumpImage(BufferedImage bi, String name) {
+        try {
+            ImageIO.write(bi, "PNG", new File(name));
+        } catch (IOException ex) {
+        }
+    }
+
+    public static void main(String[] argv) {
+        InterpolationQualityTest test = new InterpolationQualityTest();
+        test.test();
+    }
+}
diff --git a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopDoSomething.java b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopDoSomething.java
index 39b04562958..a68d185b365 100644
--- a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopDoSomething.java
+++ b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopDoSomething.java
@@ -21,17 +21,27 @@
  * questions.
  */
 
-import java.io.RandomAccessFile;
+import java.io.File;
 
 public class JMXStartStopDoSomething {
 
+    private static final String lockFileName = "JMXStartStop.lck";
 
-    public void doSomething(){
+    public static void doSomething() {
         try {
-            for (int i=0; i < 10; ++i) {
-                RandomAccessFile f = new RandomAccessFile("/dev/null","r");
-                int n = f.read();
-                f.close();
+            File lockFile = new File(lockFileName);
+            lockFile.createNewFile();
+
+            while(lockFile.exists()) {
+                long datetime = lockFile.lastModified();
+                long epoch = System.currentTimeMillis()/1000;
+
+                // Don't allow test app to run more than an hour
+                if (epoch - datetime > 3600) {
+                    System.err.println("Lock is too old. Aborting");
+                    return;
+                }
+                Thread.sleep(1);
             }
 
         } catch (Throwable e) {
@@ -41,12 +51,7 @@ public class JMXStartStopDoSomething {
 
     public static void main(String args[]) throws Exception {
         System.err.println("main enter");
-        int count = 1;
-        while(count > 0) {
-            JMXStartStopDoSomething p = new JMXStartStopDoSomething();
-            p.doSomething();
-            Thread.sleep(1);
-        }
-        // System.err.println("main exit");
+        doSomething();
+        System.err.println("main exit");
     }
 }
diff --git a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java
index 1a14ee0a08b..4f97477b02b 100644
--- a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java
+++ b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.java
@@ -167,14 +167,14 @@ public class JMXStartStopTest {
             }
         } catch (RuntimeException r) {
             dbg_print("No connection: ", r);
-            System.out.println("NO_CONN");
+            System.out.print("NO_CONN");
             System.exit(1);
         } catch (Throwable t) {
             dbg_print("No connection: ", t);
-            System.out.println("NO_CONN");
+            System.out.print("NO_CONN");
             System.exit(2);
         }
-        System.out.println("OK_CONN");
+        System.out.print("OK_CONN");
         System.exit(0);
     }
 
diff --git a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.sh b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.sh
index d575cfd612e..f52146b3bed 100644
--- a/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.sh
+++ b/jdk/test/sun/management/jmxremote/startstop/JMXStartStopTest.sh
@@ -27,7 +27,6 @@
 # @run shell JMXStartStopTest.sh --jtreg --no-compile
 # @summary No word Failed expected in the test output
 
-_verbose=no
 _server=no
 _jtreg=no
 _compile=yes
@@ -39,14 +38,14 @@ _port_two=50235
 _testclasses=".classes"
 _testsrc=`pwd`
 
-_logname=".classes/JMXStartStopTest_output.txt"
-
+_logname=".classes/output.txt"
+_lockFileName="JMXStartStop.lck"
 
 _compile(){
 
     if [ ! -e ${_testclasses} ]
     then
-	  mkdir -p ${_testclasses} 
+      mkdir -p ${_testclasses} 
     fi   
 
     rm -f ${_testclasses}/JMXStartStopTest.class
@@ -62,21 +61,17 @@ _compile(){
 }
 
 _app_start(){
-
-  if [ "${_verbose}" = "yes" ]
-  then
-     echo "RUN: ${TESTJAVA}/bin/java -server $* -cp ${_testclasses} JMXStartStopDoSomething "
-  fi 
   ${TESTJAVA}/bin/java -server $* -cp ${_testclasses} JMXStartStopDoSomething  >> ${_logname} 2>&1 &
-  sleep 1 
 
-  pid=`_get_pid`
-  if [ "x${pid}" = "x" ]
+  npid=`_get_pid`
+  if [ "${npid}" = "" ]
   then
      echo "ERROR: Test app not started"
-     exit -1
+     if [ "${_jtreg}" = "yes" ]
+     then
+       exit -1
+     fi  
   fi
-
 }
 
 _get_pid(){
@@ -84,32 +79,36 @@ _get_pid(){
 }
 
 _app_stop(){
-    pid=`_get_pid`
-    if [ "x${pid}" != "x" ]
-    then
-       kill $pid
-    fi
+  rm ${_lockFileName}
 
-    # Stop on first failed test under jtreg
-    if [ "x$1" = "xFailed" -a "${_jtreg}" = "yes" ]
+  # wait until VM is actually shuts down
+  while true 
+  do
+    npid=`_get_pid`
+    if [ "${npid}" = "" ] 
     then
-      exit -1
+      break
     fi
+    sleep 1
+  done 
 }
-   
-testme(){
-    ${TESTJAVA}/bin/java -cp ${_testclasses} JMXStartStopTest $*
+
+_exit_on_jtreg(){
+  # Stop on first failed test under jtreg
+  if [ "${_jtreg}" = "yes" ]
+  then
+      _app_stop
+      exit -1
+  fi
+}
+
+_testme(){
+  ${TESTJAVA}/bin/java -cp ${_testclasses} JMXStartStopTest $*
 }   
 
   
 _jcmd(){
-  if [ "${_verbose}" = "yes" ]
-  then
-     echo "RUN: ${TESTJAVA}/bin/jcmd JMXStartStopDoSomething $*"
-     ${TESTJAVA}/bin/jcmd JMXStartStopDoSomething $* 
-  else
-     ${TESTJAVA}/bin/jcmd JMXStartStopDoSomething $* > /dev/null 2>/dev/null
-  fi
+  ${TESTJAVA}/bin/jcmd JMXStartStopDoSomething $* > /dev/null 2>/dev/null
 } 
 
 _echo(){
@@ -122,139 +121,136 @@ _echo(){
 test_01(){
 # Run an app with JMX enabled stop it and 
 # restart on other port
-		
-    _echo "**** Test one ****"		
+        
+    _echo "**** Test one ****"      
 
     _app_start  -Dcom.sun.management.jmxremote.port=$1 \
                 -Dcom.sun.management.jmxremote.authenticate=false \
-	        -Dcom.sun.management.jmxremote.ssl=false 
+                -Dcom.sun.management.jmxremote.ssl=false 
 
-    res1=`testme $1`
+    res1=`_testme $1`
 
     _jcmd ManagementAgent.stop
 
-    res2=`testme $1`
+    res2=`_testme $1`
 
     _jcmd ManagementAgent.start jmxremote.port=$2
 
-    res3=`testme $2`
-
+    res3=`_testme $2`
 
     if [ "${res1}" = "OK_CONN" -a "${res2}" = "NO_CONN" -a "${res3}" = "OK_CONN" ] 
     then
-	_echo "Passed"
+        _echo "Passed"
     else
-	_echo "Failed r1(OK):${res1} r2(NO):${res2} r3(OK):${res3}"
-    _app_stop "Failed"
+        _echo "Failed r1(OK):${res1} r2(NO):${res2} r3(OK):${res3}"
+        _exit_on_jtreg
     fi
 
     _app_stop
-
 }  
    
 test_02(){
 # Run an app without JMX enabled 
 # start JMX by jcmd
 
-_echo "**** Test two ****"		
-_app_start  
+    _echo "**** Test two ****"      
+    _app_start  
 
-_jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false 
+    _jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false 
 
-res1=`testme $1`
-
-if [ "${res1}" = "OK_CONN" ] 
-then
-    _echo "Passed"
-else
-    _echo "Failed r1(OK):${res1}"
-    _app_stop "Failed"
-fi
-
-_app_stop
+    res1=`_testme $1`
 
+    if [ "${res1}" = "OK_CONN" ] 
+    then
+        _echo "Passed"
+    else
+        _echo "Failed r1(OK):${res1}"
+        _exit_on_jtreg
+    fi
+    _app_stop
 }   
    
 test_03(){
 # Run an app without JMX enabled 
 # start JMX by jcmd on one port than on other one
 
-_echo "**** Test three ****"		
-_app_start  
+    _echo "**** Test three ****"        
+    _app_start  
 
-_jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false 
+    _jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false 
 
 # Second agent shouldn't start
-_jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false
+    _jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false
 
 # First agent should connect
-res1=`testme $1`
+    res1=`_testme $1`
 
-if [ "${res1}" = "OK_CONN" ] 
-then
-    _echo "Passed $1"
-else
-    _echo "Failed r1(NO):${res1}"
-    _app_stop "Failed"
-fi
+    if [ "${res1}" = "OK_CONN" ] 
+    then
+        _echo "Passed $1"
+    else
+        _echo "Failed r1(NO):${res1}"
+        _exit_on_jtreg
+    fi
 
 #Second agent shouldn't connect
-res1=`testme $2`
+    res1=`_testme $2`
 
-if [ "${res1}" = "NO_CONN" ] 
-then
-    _echo "Passed $2"
-else
-    _echo "Failed r1(OK):${res1}"
-fi
+    if [ "${res1}" = "NO_CONN" ] 
+    then
+        _echo "Passed $2"
+    else
+        _echo "Failed r1(OK):${res1}"
+        _exit_on_jtreg
+    fi
 
-_app_stop
+    _app_stop
 }   
    
 test_04(){
 # Run an app without JMX enabled 
 # start JMX by jcmd on one port, specify rmi port explicitly
 
-_echo "**** Test four ****"		
-_app_start  
+    _echo "**** Test four ****"     
+    _app_start  
 
-_jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.rmi.port=$2 jmxremote.authenticate=false jmxremote.ssl=false 
+    _jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.rmi.port=$2 jmxremote.authenticate=false jmxremote.ssl=false 
 
 # First agent should connect
-res1=`testme $1 $2`
+    res1=`_testme $1 $2`
 
-if [ "${res1}" = "OK_CONN" ] 
-then
-    _echo "Passed $1 $2"
-else
-    _echo "Failed r1(NO):${res1}"
-    _app_stop "Failed"
-fi
+    if [ "${res1}" = "OK_CONN" ] 
+    then
+        _echo "Passed $1 $2"
+    else
+        _echo "Failed r1(NO):${res1}"
+        _exit_on_jtreg
+    fi
 
-_app_stop
+    _app_stop
 }   
 
 test_05(){
 # Run an app without JMX enabled, it will enable local server
 # but should leave remote server disabled  
 
-_echo "**** Test five ****"		
-_app_start  
+    _echo "**** Test five ****"     
+    _app_start  
 
-_jcmd ManagementAgent.start jmxremote=1 
+    _jcmd ManagementAgent.start jmxremote=1 
 
-# First agent should connect
-res1=`testme $1`
+    # First agent should connect
+    res1=`_testme $1`
 
-if [ "${res1}" = "NO_CONN" ] 
-then
-    _echo "Passed $1 $2"
-else
-    _echo "Failed r1(OK):${res1}"
-    _app_stop "Failed"
-fi
+    if [ "${res1}" = "NO_CONN" ] 
+    then
+        _echo "Passed $1 $2"
+    else
+        _echo "Failed r1(OK):${res1}"
+        _exit_on_jtreg
+    fi
 
-_app_stop
+    _app_stop
 }   
 
 test_06(){
@@ -264,35 +260,35 @@ test_06(){
 # 1) with the same port 
 # 2) with other port
 # 3) attempt to stop it twice
-# Check for valid messages in the output	
+# Check for valid messages in the output    
 
-_echo "**** Test six ****"		
-_app_start  
+    _echo "**** Test six ****"      
+    _app_start  
 
-_jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false 
+    _jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false 
 
-# First agent should connect
-res1=`testme $1 $2`
+    # First agent should connect
+    res1=`_testme $1 $2`
 
-if [ "${res1}" = "OK_CONN" ] 
-then
-    _echo "Passed $1 $2"
-else
-    _echo "Failed r1(NO):${res1}"
-    _app_stop "Failed"
-fi
+    if [ "${res1}" = "OK_CONN" ] 
+    then
+        _echo "Passed $1 $2"
+    else
+        _echo "Failed r1(NO):${res1}"
+        _exit_on_jtreg
+    fi
 
-_jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false 
+    _jcmd ManagementAgent.start jmxremote.port=$1 jmxremote.authenticate=false jmxremote.ssl=false 
 
-_jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false 
+    _jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false 
 
-_jcmd ManagementAgent.stop
+    _jcmd ManagementAgent.stop
 
-_jcmd ManagementAgent.stop
+    _jcmd ManagementAgent.stop
 
-_jcmd ManagementAgent.start jmxremote.port=22 jmxremote.rmi.port=$2 jmxremote.authenticate=false jmxremote.ssl=false 
+    _jcmd ManagementAgent.start jmxremote.port=22 jmxremote.rmi.port=$2 jmxremote.authenticate=false jmxremote.ssl=false 
 
-_app_stop
+    _app_stop
 }   
 
 test_07(){
@@ -300,27 +296,26 @@ test_07(){
 # in command line.
 # make sure these properties overriden corectly 
 
-_echo "**** Test seven ****"		
+    _echo "**** Test seven ****"        
 
-_app_start   -Dcom.sun.management.jmxremote.authenticate=false \
-             -Dcom.sun.management.jmxremote.ssl=true 
+    _app_start   -Dcom.sun.management.jmxremote.authenticate=false \
+                 -Dcom.sun.management.jmxremote.ssl=true 
 
-res1=`testme $1`
+    res1=`_testme $1`
 
-_jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false
+    _jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false
 
-res2=`testme $2`
+    res2=`_testme $2`
 
+    if [ "${res1}" = "NO_CONN" -a "${res2}" = "OK_CONN" ] 
+    then
+        echo "Passed"
+    else
+        _echo "Failed r1(NO):${res1} r2(OK):${res2}"
+        _exit_on_jtreg
+    fi
 
-if [ "${res1}" = "NO_CONN" -a "${res2}" = "OK_CONN" ] 
-then
-   echo "Passed"
-else
-	_echo "Failed r1(NO):${res1} r2(OK):${res2}"
-    _app_stop "Failed"
-fi
-
-_app_stop
+    _app_stop
 }   
 
 test_08(){
@@ -329,32 +324,31 @@ test_08(){
 # stop JMX agent and then start it again with different property values
 # make sure these properties overriden corectly 
 
-_echo "**** Test eight ****"		
+    _echo "**** Test eight ****"        
 
-_app_start  -Dcom.sun.management.jmxremote.port=$1 \
-	    -Dcom.sun.management.jmxremote.authenticate=false \
-	    -Dcom.sun.management.jmxremote.ssl=true 
+    _app_start  -Dcom.sun.management.jmxremote.port=$1 \
+                -Dcom.sun.management.jmxremote.authenticate=false \
+                -Dcom.sun.management.jmxremote.ssl=true 
 
-res1=`testme $1`
+    res1=`_testme $1`
 
-_jcmd ManagementAgent.stop
+    _jcmd ManagementAgent.stop
 
-res2=`testme $1`
+    res2=`_testme $1`
 
-_jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false
+    _jcmd ManagementAgent.start jmxremote.port=$2 jmxremote.authenticate=false jmxremote.ssl=false
 
-res3=`testme $2`
+    res3=`_testme $2`
 
-
-if [ "${res1}" = "NO_CONN" -a "${res2}" = "NO_CONN" -a "${res3}" = "OK_CONN" ] 
-then
-    _echo "Passed"
-else
-    _echo "Failed r1(NO):${res1} r2(NO):${res2} r3(OK):${res3}"
-    _app_stop "Failed"
-fi
+    if [ "${res1}" = "NO_CONN" -a "${res2}" = "NO_CONN" -a "${res3}" = "OK_CONN" ] 
+    then
+        _echo "Passed"
+    else
+        _echo "Failed r1(NO):${res1} r2(NO):${res2} r3(OK):${res3}"
+        _exit_on_jtreg
+    fi
  
-_app_stop
+    _app_stop
 }   
 
 test_09(){
@@ -365,31 +359,31 @@ test_09(){
 # in command line
 # make sure these properties overriden corectly 
 
-_echo "**** Test nine ****"		
+    _echo "**** Test nine ****"     
 
-_app_start -Dcom.sun.management.config.file=${_testsrc}/management_cl.properties \
-           -Dcom.sun.management.jmxremote.authenticate=false 
+    _app_start -Dcom.sun.management.config.file=${_testsrc}/management_cl.properties \
+               -Dcom.sun.management.jmxremote.authenticate=false 
 
-res1=`testme $1`
+    res1=`_testme $1`
 
-_jcmd ManagementAgent.stop
+    _jcmd ManagementAgent.stop
 
-res2=`testme $1`
+    res2=`_testme $1`
 
-_jcmd ManagementAgent.start config.file=${_testsrc}/management_jcmd.properties \
-       jmxremote.authenticate=false jmxremote.port=$2
+    _jcmd ManagementAgent.start config.file=${_testsrc}/management_jcmd.properties \
+                                jmxremote.authenticate=false jmxremote.port=$2
 
-res3=`testme $2`
+    res3=`_testme $2`
 
-if [ "${res1}" = "NO_CONN" -a "${res2}" = "NO_CONN" -a "${res3}" = "OK_CONN" ] 
-then
-    _echo "Passed"
-else
-    _echo "Failed r1(NO):${res1} r2(NO):${res2} r3(OK):${res3}"
-    _app_stop "Failed"
-fi
+    if [ "${res1}" = "NO_CONN" -a "${res2}" = "NO_CONN" -a "${res3}" = "OK_CONN" ] 
+    then
+        _echo "Passed"
+    else
+        _echo "Failed r1(NO):${res1} r2(NO):${res2} r3(OK):${res3}"
+        _exit_on_jtreg
+    fi
  
-_app_stop
+    _app_stop
 }   
 
 test_10(){
@@ -399,34 +393,34 @@ test_10(){
 # stop JMX agent again and then start it without property value
 # make sure these properties overriden corectly 
 
-_echo "**** Test ten ****"		
+    _echo "**** Test ten ****"      
 
-_app_start  -Dcom.sun.management.jmxremote.port=$1 \
-	    -Dcom.sun.management.jmxremote.authenticate=false \
-	    -Dcom.sun.management.jmxremote.ssl=true 
+    _app_start  -Dcom.sun.management.jmxremote.port=$1 \
+                -Dcom.sun.management.jmxremote.authenticate=false \
+                -Dcom.sun.management.jmxremote.ssl=true 
 
-res1=`testme $1`
+    res1=`_testme $1`
 
-_jcmd ManagementAgent.stop
-_jcmd ManagementAgent.start jmxremote.ssl=false jmxremote.port=$1
+    _jcmd ManagementAgent.stop
+    _jcmd ManagementAgent.start jmxremote.ssl=false jmxremote.port=$1
 
 
-res2=`testme $1`
+    res2=`_testme $1`
 
-_jcmd ManagementAgent.stop
-_jcmd ManagementAgent.start jmxremote.port=$1
+    _jcmd ManagementAgent.stop
+    _jcmd ManagementAgent.start jmxremote.port=$1
 
-res3=`testme $1`
+    res3=`_testme $1`
 
-if [ "${res1}" = "NO_CONN" -a "${res2}" = "OK_CONN" -a "${res3}" = "NO_CONN" ] 
-then
-    _echo "Passed"
-else
-    _echo "Failed r1(NO):${res1} r2(OK):${res2} r3(NO):${res3}"
-    _app_stop "Failed"
-fi
+    if [ "${res1}" = "NO_CONN" -a "${res2}" = "OK_CONN" -a "${res3}" = "NO_CONN" ] 
+    then
+        _echo "Passed"
+    else
+        _echo "Failed r1(NO):${res1} r2(OK):${res2} r3(NO):${res3}"
+        _exit_on_jtreg
+    fi
  
-_app_stop
+    _app_stop
 }   
 
 test_11(){
@@ -434,102 +428,87 @@ test_11(){
 # stop remote agent 
 # make sure local agent is not affected
 
-_echo "**** Test eleven ****"		
+    _echo "**** Test eleven ****"       
 
-_app_start  -Dcom.sun.management.jmxremote.port=$2 \
-	    -Dcom.sun.management.jmxremote.authenticate=false \
-	    -Dcom.sun.management.jmxremote.ssl=false 
-	  
-res1=`testme $2`
+    _app_start  -Dcom.sun.management.jmxremote.port=$2 \
+                -Dcom.sun.management.jmxremote.authenticate=false \
+                -Dcom.sun.management.jmxremote.ssl=false 
+      
+    res1=`_testme $2`
 
-_jcmd ManagementAgent.stop
+    _jcmd ManagementAgent.stop
 
-pid=`${TESTJAVA}/bin/jps | sed -n "/JMXStartStopDoSomething/s/ .*//p"`
-res2=`testme local ${pid}`
+    pid=`${TESTJAVA}/bin/jps | sed -n "/JMXStartStopDoSomething/s/ .*//p"`
+    res2=`_testme local ${pid}`
 
-if [ "${res1}" = "OK_CONN" -a "${res2}" = "OK_CONN" ] 
-then
-    _echo "Passed"
-else
-    _echo "Failed r1(OK):${res1} r2(OK):${res2}"
-    _app_stop "Failed"
-fi
+    if [ "${res1}" = "OK_CONN" -a "${res2}" = "OK_CONN" ] 
+    then
+        _echo "Passed"
+    else
+        _echo "Failed r1(OK):${res1} r2(OK):${res2}"
+        _exit_on_jtreg
+    fi
  
-_app_stop
+    _app_stop
 }   
 
 test_12(){
 # Run an app with JMX disabled 
 # start local agent only
 
-_echo "**** Test twelve ****"		
+    _echo "**** Test twelve ****"       
 
-_app_start 
-	  
-res1=`testme $1`
+    _app_start 
+      
+    res1=`_testme $1`
 
-_jcmd ManagementAgent.start_local
+    _jcmd ManagementAgent.start_local
 
-pid=`_get_pid`
-if [ "x${pid}" = "x" ]
-then
-  res2="NO_CONN"
-else
-  res2=`testme local ${pid}`
-fi
+    pid=`_get_pid`
+    if [ "x${pid}" = "x" ]
+    then
+        res2="NO_CONN"
+    else
+        res2=`_testme local ${pid}`
+    fi
 
-if [ "${res1}" = "NO_CONN" -a "${res2}" = "OK_CONN" ] 
-then
-    _echo "Passed"
-else
-    _echo "Failed r1(NO):${res1} r2(OK):${res2}"
-    _app_stop "Failed"
-fi
+    if [ "${res1}" = "NO_CONN" -a "${res2}" = "OK_CONN" ] 
+    then
+        _echo "Passed"
+    else
+        _echo "Failed r1(NO):${res1} r2(OK):${res2}"
+        _exit_on_jtreg
+    fi
  
-_app_stop
+    _app_stop
 }   
 
 test_13(){
 # Run an app with -javaagent make sure it works as expected - system properties are ignored
 
-_echo "**** Test 13 ****"		
+    _echo "**** Test thirteen ****"       
+			   
+    AGENT="${TESTJAVA}/jre/lib/management-agent.jar"
+    if [ ! -f ${AGENT} ]
+    then
+        AGENT="${TESTJAVA}/lib/management-agent.jar"
+    fi
 
-AGENT="${TESTJAVA}/jre/lib/management-agent.jar"
-if [ ! -f ${AGENT} ]
- then
-  AGENT="${TESTJAVA}/lib/management-agent.jar"
-fi
+    _app_start -javaagent:${AGENT}=com.sun.management.jmxremote.port=$1,com.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false 
+      
+    res1=`_testme $1`
 
-_app_start -javaagent:${AGENT}=com.sun.management.jmxremote.port=$1,com.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false 
-	  
-res1=`testme $1`
-
-if [ "${res1}" = "NO_CONN" ] 
-then
-    _echo "Passed"
-else
-    _echo "Failed r1(NO):${res1}"
-    _app_stop "Failed"
-fi
+    if [ "${res1}" = "NO_CONN" ] 
+    then
+        _echo "Passed"
+    else
+        _echo "Failed r1(NO):${res1}"
+        _exit_on_jtreg
+    fi
  
-_app_stop
+    _app_stop
 }   
 
-
-#============== Server tests =======================
-
-server_test_01(){
-		
-    _echo "**** Server test one ****"		
-
-    _app_start  -Dcom.sun.management.jmxremote.port=$1 \
-                -Dcom.sun.management.jmxremote.rmi.port=$2 \
-                -Dcom.sun.management.jmxremote.authenticate=false \
-                -Dcom.sun.management.jmxremote.ssl=false 
-
-}  
-
- 
 # ============= MAIN =======================================
 
 if [ "x${TESTJAVA}" = "x" ]
@@ -542,11 +521,6 @@ if [ ! -x "${TESTJAVA}/bin/jcmd" ]
 then
   echo "${TESTJAVA}/bin/jcmd"
   echo "Doesn't exist or not an executable"
-
-  if [ "${_verbose}" != "yes" ]
-  then
-    exit
-  fi
 fi
 
 
@@ -556,8 +530,6 @@ fi
 for parm in "$@"  
 do
    case $parm in
-  --verbose)      _verbose=yes  ;;
-  --server)       _server=yes   ;;
   --jtreg)        _jtreg=yes    ;;
   --no-compile)   _compile=no   ;;
   --testsuite=*)  _testsuite=`_echo $parm | sed "s,^--.*=\(.*\),\1,"`  ;;
@@ -584,20 +556,10 @@ fi
 
 rm -f ${_logname}
 
-# Start server mode tests
-# All of them require manual cleanup
-if [ "x${_server}" = "xyes" ]
-then
-  
- server_test_01 ${_port_one} ${_port_two}
-
-else
-
- # Local mode tests
- for i in `echo ${_testsuite} | sed -e "s/,/ /g"`
- do
+# Local mode tests
+for i in `echo ${_testsuite} | sed -e "s/,/ /g"`
+do
   test_${i} ${_port_one} ${_port_two}
- done
+done
 
-fi
 
diff --git a/jdk/test/sun/management/jmxremote/startstop/REMOTE_TESTING.txt b/jdk/test/sun/management/jmxremote/startstop/REMOTE_TESTING.txt
index 03e8f8ba973..20c85f1f0be 100644
--- a/jdk/test/sun/management/jmxremote/startstop/REMOTE_TESTING.txt
+++ b/jdk/test/sun/management/jmxremote/startstop/REMOTE_TESTING.txt
@@ -2,7 +2,15 @@
 2. Make sure tcp connection between them works
 3. run tcpdump -i <interface> host <host2_name> and 'tcp[13] & 2!=0'
    on host 1
-4. run JMXStartStopTest.sh --server on host2
+4. run 
+
+   ${TESTJAVA}/bin/java -server JMXStartStopDoSomething \
+   -Dcom.sun.management.jmxremote.port=50234 \
+   -Dcom.sun.management.jmxremote.rmi.port=50235 \
+   -Dcom.sun.management.jmxremote.authenticate=false \
+   -Dcom.sun.management.jmxremote.ssl=false
+
+    on host2
 5. run jconsole on host1
 6. connect jconsole to host2:50234
    Make sure jconsole works
diff --git a/jdk/test/sun/security/krb5/auto/UseCacheAndStoreKey.java b/jdk/test/sun/security/krb5/auto/UseCacheAndStoreKey.java
new file mode 100644
index 00000000000..3769643e09a
--- /dev/null
+++ b/jdk/test/sun/security/krb5/auto/UseCacheAndStoreKey.java
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7201053
+ * @summary Krb5LoginModule shows NPE when both useTicketCache and storeKey
+ *          are set to true
+ * @compile -XDignore.symbol.file UseCacheAndStoreKey.java
+ * @run main/othervm UseCacheAndStoreKey
+ */
+
+import java.io.FileOutputStream;
+import javax.security.auth.login.LoginException;
+
+// The basic krb5 test skeleton you can copy from
+public class UseCacheAndStoreKey {
+
+    public static void main(String[] args) throws Exception {
+
+        new OneKDC(null).writeJAASConf();
+
+        // KDC would save ccache for client
+        System.setProperty("test.kdc.save.ccache", "cache.here");
+        try (FileOutputStream fos = new FileOutputStream(OneKDC.JAAS_CONF)) {
+            fos.write((
+                "me {\n" +
+                "    com.sun.security.auth.module.Krb5LoginModule required\n" +
+                "    principal=\"" + OneKDC.USER + "\"\n" +
+                "    useTicketCache=true\n" +
+                "    ticketCache=cache.here\n" +
+                "    isInitiator=true\n" +
+                "    storeKey=true;\n};\n"
+                ).getBytes());
+        }
+
+        // The first login will use default callback and succeed
+        Context.fromJAAS("me");
+
+        // The second login uses ccache and won't be able to store the keys
+        try {
+            Context.fromJAAS("me");
+            throw new Exception("Should fail");
+        } catch (LoginException le) {
+            if (le.getMessage().indexOf("NullPointerException") >= 0
+                    || le.getCause() instanceof NullPointerException) {
+                throw new Exception("NPE");
+            }
+        }
+    }
+}
diff --git a/jdk/test/sun/security/provider/X509Factory/BigCRL.java b/jdk/test/sun/security/provider/X509Factory/BigCRL.java
index acee51a1434..355c9becf72 100644
--- a/jdk/test/sun/security/provider/X509Factory/BigCRL.java
+++ b/jdk/test/sun/security/provider/X509Factory/BigCRL.java
@@ -25,7 +25,7 @@
  * @test
  * @bug 7099399
  * @summary cannot deal with CRL file larger than 16MB
- * @run main/othervm -Xmx1024m BigCRL
+ * @run main/othervm -Xshare:off -Xmx1024m BigCRL
  */
 
 import java.io.FileInputStream;
diff --git a/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/CertRequestOverflow.java b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/CertRequestOverflow.java
new file mode 100644
index 00000000000..883f9797d67
--- /dev/null
+++ b/jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/X509TrustManagerImpl/CertRequestOverflow.java
@@ -0,0 +1,402 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+//
+// SunJSSE does not support dynamic system properties, no way to re-use
+// system properties in samevm/agentvm mode.
+//
+
+/*
+ * @test
+ * @bug 7200295
+ * @summary CertificateRequest message is wrapping when using large
+ *          numbers of Certs
+ * @run main/othervm CertRequestOverflow
+ */
+
+import java.io.*;
+import java.net.*;
+import java.util.*;
+import javax.net.ssl.*;
+import java.security.cert.*;
+import java.security.*;
+
+public class CertRequestOverflow {
+
+    /*
+     * =============================================================
+     * Set the various variables needed for the tests, then
+     * specify what tests to run on each side.
+     */
+
+    /*
+     * Should we run the client or server in a separate thread?
+     * Both sides can throw exceptions, but do you have a preference
+     * as to which side should be the main thread.
+     */
+    static boolean separateServerThread = false;
+
+    /*
+     * Where do we find the keystores?
+     */
+    static String pathToStores = "../../../../../../../etc";
+    static String keyStoreFile = "keystore";
+    static String trustStoreFile = "truststore";
+    static String passwd = "passphrase";
+    private final static char[] cpasswd = "passphrase".toCharArray();
+
+    /*
+     * Is the server ready to serve?
+     */
+    volatile static boolean serverReady = false;
+
+    /*
+     * Turn on SSL debugging?
+     */
+    static boolean debug = false;
+
+    /*
+     * If the client or server is doing some kind of object creation
+     * that the other side depends on, and that thread prematurely
+     * exits, you may experience a hang.  The test harness will
+     * terminate all hung threads after its timeout has expired,
+     * currently 3 minutes by default, but you might try to be
+     * smart about it....
+     */
+
+    /*
+     * Define the server side of the test.
+     *
+     * If the server prematurely exits, serverReady will be set to true
+     * to avoid infinite hangs.
+     */
+    void doServerSide() throws Exception {
+        SSLServerSocketFactory sslssf =
+                                getContext(true).getServerSocketFactory();
+        SSLServerSocket sslServerSocket =
+            (SSLServerSocket) sslssf.createServerSocket(serverPort);
+        serverPort = sslServerSocket.getLocalPort();
+
+        // enable endpoint identification
+        // ignore, we may test the feature when known how to parse client
+        // hostname
+        //SSLParameters params = sslServerSocket.getSSLParameters();
+        //params.setEndpointIdentificationAlgorithm("HTTPS");
+        //sslServerSocket.setSSLParameters(params);
+
+        /*
+         * Signal Client, we're ready for his connect.
+         */
+        serverReady = true;
+
+        SSLSocket sslSocket = (SSLSocket) sslServerSocket.accept();
+        sslSocket.setNeedClientAuth(true);
+        InputStream sslIS = sslSocket.getInputStream();
+        OutputStream sslOS = sslSocket.getOutputStream();
+
+        try {
+            sslIS.read();
+            sslOS.write(85);
+            sslOS.flush();
+
+            throw new Exception("SERVER TEST FAILED!  " +
+                        "It is expected to fail with field length overflow");
+        } catch (SSLException ssle) {
+            Throwable cause = ssle.getCause();
+            if (!(cause instanceof RuntimeException)) {
+                System.out.println("We are expecting a RuntimeException!");
+                throw ssle;
+            }
+            System.out.println("The expected exception!  " + ssle);
+        } finally {
+            sslSocket.close();
+        }
+
+        System.out.println("SERVER TEST PASSED!");
+    }
+
+    /*
+     * Define the client side of the test.
+     *
+     * If the server prematurely exits, serverReady will be set to true
+     * to avoid infinite hangs.
+     */
+    void doClientSide() throws Exception {
+
+        /*
+         * Wait for server to get started.
+         */
+        while (!serverReady) {
+            Thread.sleep(50);
+        }
+
+        SSLSocketFactory sslsf = getContext(false).getSocketFactory();
+        SSLSocket sslSocket = (SSLSocket)
+            sslsf.createSocket("localhost", serverPort);
+
+        // enable endpoint identification
+        SSLParameters params = sslSocket.getSSLParameters();
+        params.setEndpointIdentificationAlgorithm("HTTPS");
+        sslSocket.setSSLParameters(params);
+
+        InputStream sslIS = sslSocket.getInputStream();
+        OutputStream sslOS = sslSocket.getOutputStream();
+
+        try {
+            sslOS.write(280);
+            sslOS.flush();
+            sslIS.read();
+        } catch (SSLException ssle) {
+            System.out.println("An expected exception!");
+        } finally {
+            sslSocket.close();
+        }
+    }
+
+    MyExtendedX509TM serverTM;
+    MyExtendedX509TM clientTM;
+
+    private SSLContext getContext(boolean server) throws Exception {
+        String keyFilename =
+            System.getProperty("test.src", "./") + "/" + pathToStores +
+                "/" + keyStoreFile;
+        String trustFilename =
+            System.getProperty("test.src", "./") + "/" + pathToStores +
+                "/" + trustStoreFile;
+
+        KeyManagerFactory kmf = KeyManagerFactory.getInstance("SunX509");
+        KeyStore ks = KeyStore.getInstance("JKS");
+        ks.load(new FileInputStream(keyFilename), cpasswd);
+        kmf.init(ks, cpasswd);
+
+        TrustManagerFactory tmf = TrustManagerFactory.getInstance("SunX509");
+        KeyStore ts = KeyStore.getInstance("JKS");
+        ts.load(new FileInputStream(trustFilename), cpasswd);
+        tmf.init(ts);
+
+        TrustManager tms[] = tmf.getTrustManagers();
+        if (tms == null || tms.length == 0) {
+            throw new Exception("unexpected trust manager implementation");
+        } else {
+           if (!(tms[0] instanceof X509TrustManager)) {
+            throw new Exception("unexpected trust manager implementation: "
+                                + tms[0].getClass().getCanonicalName());
+           }
+        }
+
+        if (server) {
+            serverTM = new MyExtendedX509TM((X509TrustManager)tms[0]);
+
+            tms = new TrustManager[] {serverTM};
+        } else {
+            clientTM = new MyExtendedX509TM((X509TrustManager)tms[0]);
+
+            tms = new TrustManager[] {clientTM};
+        }
+
+        SSLContext ctx = SSLContext.getInstance("TLS");
+        ctx.init(kmf.getKeyManagers(), tms, null);
+
+        return ctx;
+    }
+
+    static class MyExtendedX509TM extends X509ExtendedTrustManager
+            implements X509TrustManager {
+
+        X509TrustManager tm;
+
+        boolean clientChecked;
+        boolean serverChecked;
+
+        MyExtendedX509TM(X509TrustManager tm) {
+            clientChecked = false;
+            serverChecked = false;
+
+            this.tm = tm;
+        }
+
+        public boolean wasClientChecked() {
+            return clientChecked;
+        }
+
+        public boolean wasServerChecked() {
+            return serverChecked;
+        }
+
+
+        public void checkClientTrusted(X509Certificate chain[], String authType)
+                throws CertificateException {
+            tm.checkClientTrusted(chain, authType);
+        }
+
+        public void checkServerTrusted(X509Certificate chain[], String authType)
+                throws CertificateException {
+            tm.checkServerTrusted(chain, authType);
+        }
+
+        public X509Certificate[] getAcceptedIssuers() {
+            // (hack code) increase the size of the returned array to make a
+            // overflow CertificateRequest.
+            List<X509Certificate> issuersList = new LinkedList<>();
+            X509Certificate[] issuers = tm.getAcceptedIssuers();
+            for (int i = 0; i < 800; i += issuers.length) {
+                for (X509Certificate issuer : issuers) {
+                    issuersList.add(issuer);
+                }
+            }
+
+            return issuersList.toArray(issuers);
+        }
+
+        public void checkClientTrusted(X509Certificate[] chain, String authType,
+                Socket socket) throws CertificateException {
+            clientChecked = true;
+            tm.checkClientTrusted(chain, authType);
+        }
+
+        public void checkServerTrusted(X509Certificate[] chain, String authType,
+                Socket socket) throws CertificateException {
+            serverChecked = true;
+            tm.checkServerTrusted(chain, authType);
+        }
+
+        public void checkClientTrusted(X509Certificate[] chain, String authType,
+            SSLEngine engine) throws CertificateException {
+            clientChecked = true;
+            tm.checkClientTrusted(chain, authType);
+        }
+
+        public void checkServerTrusted(X509Certificate[] chain, String authType,
+            SSLEngine engine) throws CertificateException {
+            serverChecked = true;
+            tm.checkServerTrusted(chain, authType);
+        }
+    }
+
+    /*
+     * =============================================================
+     * The remainder is just support stuff
+     */
+
+    // use any free port by default
+    volatile int serverPort = 0;
+
+    volatile Exception serverException = null;
+    volatile Exception clientException = null;
+
+    public static void main(String[] args) throws Exception {
+
+        if (debug)
+            System.setProperty("javax.net.debug", "all");
+
+        /*
+         * Start the tests.
+         */
+        new CertRequestOverflow();
+    }
+
+    Thread clientThread = null;
+    Thread serverThread = null;
+
+    /*
+     * Primary constructor, used to drive remainder of the test.
+     *
+     * Fork off the other side, then do your work.
+     */
+    CertRequestOverflow() throws Exception {
+        if (separateServerThread) {
+            startServer(true);
+            startClient(false);
+        } else {
+            startClient(true);
+            startServer(false);
+        }
+
+        /*
+         * Wait for other side to close down.
+         */
+        if (separateServerThread) {
+            serverThread.join();
+        } else {
+            clientThread.join();
+        }
+
+        /*
+         * When we get here, the test is pretty much over.
+         *
+         * If the main thread excepted, that propagates back
+         * immediately.  If the other thread threw an exception, we
+         * should report back.
+         */
+        if (serverException != null)
+            throw serverException;
+        if (clientException != null)
+            throw clientException;
+    }
+
+    void startServer(boolean newThread) throws Exception {
+        if (newThread) {
+            serverThread = new Thread() {
+                public void run() {
+                    try {
+                        doServerSide();
+                    } catch (Exception e) {
+                        /*
+                         * Our server thread just died.
+                         *
+                         * Release the client, if not active already...
+                         */
+                        System.err.println("Server died...");
+                        serverReady = true;
+                        serverException = e;
+                    }
+                }
+            };
+            serverThread.start();
+        } else {
+            doServerSide();
+        }
+    }
+
+    void startClient(boolean newThread) throws Exception {
+        if (newThread) {
+            clientThread = new Thread() {
+                public void run() {
+                    try {
+                        doClientSide();
+                    } catch (Exception e) {
+                        /*
+              * Our client thread just died.
+                         */
+                        System.err.println("Client died...");
+                        clientException = e;
+                    }
+                }
+            };
+            clientThread.start();
+        } else {
+            doClientSide();
+        }
+    }
+}
+
diff --git a/jdk/test/sun/security/tools/keytool/ListKeychainStore.sh b/jdk/test/sun/security/tools/keytool/ListKeychainStore.sh
new file mode 100644
index 00000000000..63fb0f87068
--- /dev/null
+++ b/jdk/test/sun/security/tools/keytool/ListKeychainStore.sh
@@ -0,0 +1,142 @@
+#
+# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# @test
+# @bug 7133495
+# @summary [macosx] KeyChain KeyStore implementation retrieves only one private key entry
+
+if [ "${TESTJAVA}" = "" ] ; then
+    JAVAC_CMD=`which javac`
+    TESTJAVA=`dirname $JAVAC_CMD`/..
+fi
+
+if [ "${TESTCLASSES}" = "" ] ; then
+    TESTCLASSES=`pwd`
+fi
+
+# Only run on MacOS
+OS=`uname -s`
+case "$OS" in
+    Darwin )
+        ;;
+    * )
+        echo "Will not run test on: ${OS}"
+        exit 0;
+        ;;
+esac
+
+PWD="xxxxxx"
+KEYTOOL="${TESTJAVA}/bin/keytool -storetype KeychainStore -keystore NONE -storepass $PWD"
+TEMPORARY_P12="$TESTCLASSES/7133495.p12"
+TEMPORARY_KC="$TESTCLASSES/7133495.keychain"
+CLEANUP_P12="rm -f $TEMPORARY_P12"
+CLEANUP_KC="security delete-keychain $TEMPORARY_KC"
+
+# Count the number of private key entries in the Keychain keystores
+
+COUNT=`$KEYTOOL -list | grep PrivateKeyEntry | wc -l`
+echo "Found $COUNT private key entries in the Keychain keystores"
+
+if [ $COUNT -gt 1 ]; then
+    exit 0
+fi
+
+# Create a temporary PKCS12 keystore containing 3 public/private keypairs
+
+RESULT=`$CLEANUP_P12`
+
+for i in X Y Z
+do
+    ${TESTJAVA}/bin/keytool -genkeypair \
+        -storetype PKCS12 \
+        -keystore $TEMPORARY_P12 \
+        -storepass $PWD \
+        -dname "CN=$i,OU=$i,O=$i,ST=$i,C=US" \
+        -alias 7133495-$i
+
+    if [ $? -ne 0 ]; then
+        echo "Error: cannot create keypair $i in the temporary PKCS12 keystore"
+        RESULT=`$CLEANUP_P12`
+        exit 1
+    fi
+done
+echo "Created a temporary PKCS12 keystore: $TEMPORARY_P12"
+
+# Create a temporary keychain
+
+security create-keychain -p $PWD $TEMPORARY_KC
+if [ $? -ne 0 ]; then
+    echo "Error: cannot create the temporary keychain"
+    RESULT=`$CLEANUP_P12`
+    exit 2
+fi
+echo "Created a temporary keychain: $TEMPORARY_KC"
+
+# Unlock the temporary keychain
+
+security unlock-keychain -p $PWD $TEMPORARY_KC
+if [ $? -ne 0 ]; then
+    echo "Error: cannot unlock the temporary keychain"
+    RESULT=`$CLEANUP_P12`
+    RESULT=`$CLEANUP_KC`
+    exit 3
+fi
+echo "Unlocked the temporary keychain"
+
+# Import the keypairs from the PKCS12 keystore into the keychain
+
+security import $TEMPORARY_P12 -k $TEMPORARY_KC -f pkcs12 -P $PWD
+if [ $? -ne 0 ]; then
+    echo "Error: cannot import keypairs from PKCS12 keystore into the keychain"
+    RESULT=`$CLEANUP_P12`
+    RESULT=`$CLEANUP_KC`
+    exit 4
+fi
+echo "Imported keypairs from PKCS12 keystore into the keychain"
+
+# Recount the number of private key entries in the Keychain keystores
+
+COUNT=`$KEYTOOL -list | grep PrivateKeyEntry | wc -l`
+echo "Found $COUNT private key entries in the Keychain keystore"
+if [ $COUNT -lt 3 ]; then
+    echo "Error: expected >2 private key entries in the Keychain keystores"
+    RESULT=`$CLEANUP_P12`
+    RESULT=`$CLEANUP_KC`
+    exit 5
+fi
+
+RESULT=`$CLEANUP_P12`
+if [ $? -ne 0 ]; then
+    echo "Error: cannot remove the temporary PKCS12 keystore"
+    exit 6
+fi
+echo "Removed the temporary PKCS12 keystore"
+
+RESULT=`$CLEANUP_KC`
+if [ $? -ne 0 ]; then
+    echo "Error: cannot remove the temporary keychain"
+    exit 7
+fi
+echo "Removed the temporary keychain"
+
+exit 0
diff --git a/jdk/test/sun/security/tools/keytool/autotest.sh b/jdk/test/sun/security/tools/keytool/autotest.sh
index f414380a952..ea4c3f2715f 100644
--- a/jdk/test/sun/security/tools/keytool/autotest.sh
+++ b/jdk/test/sun/security/tools/keytool/autotest.sh
@@ -58,24 +58,18 @@ case "$OS" in
     LIBNAME="/usr/lib/mps/libsoftokn3.so"
     ;;
   Linux )
-    ARCH=`uname -m`
     FS="/"
-    case "$ARCH" in
-      i[3-6]86 )
+    ${TESTJAVA}${FS}bin${FS}java -XshowSettings:properties -version 2> allprop
+    cat allprop | grep os.arch | grep 64
+    if [ "$?" != "0" ]; then
         LIBNAME=`find_one \
             "/usr/lib/libsoftokn3.so" \
             "/usr/lib/i386-linux-gnu/nss/libsoftokn3.so"`
-        ;;
-      x86_64 )
+    else
         LIBNAME=`find_one \
             "/usr/lib64/libsoftokn3.so" \
             "/usr/lib/x86_64-linux-gnu/nss/libsoftokn3.so"`
-        ;;
-      * )
-        echo "Will not run test on: Linux ${ARCH}"
-        exit 0;
-        ;;
-    esac
+    fi
     ;;
   * )
     echo "Will not run test on: ${OS}"
diff --git a/langtools/.hgtags b/langtools/.hgtags
index 985cc14bd84..a4299977f60 100644
--- a/langtools/.hgtags
+++ b/langtools/.hgtags
@@ -179,3 +179,6 @@ d3d0b9cd76e04bf9e381b402630ac3cfe464bb38 jdk8-b53
 e48e7e1f026b82d921433150180799898c088890 jdk8-b55
 363e9198b9de68ebf37a3e2c2f3f23543d3915cd jdk8-b56
 86d5740b9fdc20ababb8aefde89ae1509ff216a9 jdk8-b57
+804a3fbc86e28a4d9e77c30aa0bd4aa68056f23f jdk8-b58
+f299927fc31689385f67ab7322c18eb41d8bd71e jdk8-b59
+3d2b98ffcb534b0e5be87bb1f9f68d1518ad7729 jdk8-b60
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
index f96bd93ab42..d0cea943d6a 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -195,10 +195,7 @@ public class ClassUseWriter extends SubWriterHolderWriter {
         ClassUseWriter clsgen;
         String path = DirectoryManager.getDirectoryPath(classdoc.
                                                             containingPackage());
-        if (path.length() > 0) {
-            path += File.separator;
-        }
-        path += "class-use";
+        path += "class-use" + DirectoryManager.URL_FILE_SEPARATOR;
         String filename = classdoc.name() + ".html";
         String pkgname = classdoc.containingPackage().name();
         pkgname += (pkgname.length() > 0)? ".class-use": "class-use";
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java
index 7bc17858762..7f15c842276 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -302,7 +302,9 @@ public class HelpWriter extends HtmlDocletWriter {
         Content constHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
                 getResource("doclet.Constants_Summary"));
         Content liConst = HtmlTree.LI(HtmlStyle.blockList, constHead);
-        Content line29 = getResource("doclet.Help_line_29");
+        Content line29 = getResource("doclet.Help_line_29",
+                getHyperLinkString("constant-values.html",
+                configuration.getText("doclet.Constants_Summary")));
         Content constPara = HtmlTree.P(line29);
         liConst.addContent(constPara);
         ul.addContent(liConst);
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties
index b9bef57f746..e38bb2bf9ea 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties
@@ -160,7 +160,7 @@ doclet.Help_line_25=Frames/No Frames
 doclet.Help_line_26=These links show and hide the HTML frames.  All pages are available with or without frames.
 doclet.Help_line_27=The {0} link shows all classes and interfaces except non-static nested types.
 doclet.Help_line_28=Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
-doclet.Help_line_29=The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.
+doclet.Help_line_29=The {0} page lists the static final fields and their values.
 doclet.Help_line_30=This help file applies to API documentation generated using the standard doclet.
 doclet.Help_enum_line_1=Each enum has its own separate page with the following sections:
 doclet.Help_enum_line_2=Enum declaration
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java
index 9c08b5c0cf1..e3d15ebd768 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java
@@ -488,17 +488,18 @@ public abstract class Configuration {
     }
 
     /**
-     * Add a traliling file separator, if not found or strip off extra trailing
-     * file separators if any.
+     * Add a trailing file separator, if not found. Remove superfluous
+     * file separators if any. Preserve the front double file separator for
+     * UNC paths.
      *
      * @param path Path under consideration.
      * @return String Properly constructed path string.
      */
-    String addTrailingFileSep(String path) {
+    public static String addTrailingFileSep(String path) {
         String fs = System.getProperty("file.separator");
         String dblfs = fs + fs;
         int indexDblfs;
-        while ((indexDblfs = path.indexOf(dblfs)) >= 0) {
+        while ((indexDblfs = path.indexOf(dblfs, 1)) >= 0) {
             path = path.substring(0, indexDblfs) +
                 path.substring(indexDblfs + fs.length());
         }
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java
index 330243e84d9..70cee399648 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java
@@ -262,11 +262,7 @@ public class TagletManager {
                 urls[count++] = url;
             }
         }
-        if (urls.length != count) {
-            URL[] tmp = new URL[count];
-            System.arraycopy(urls, 0, tmp, 0, count);
-            urls = tmp;
-        }
+        urls = Arrays.copyOf(urls, count);
         return urls;
     }
 
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/BasicJavacTask.java b/langtools/src/share/classes/com/sun/tools/javac/api/BasicJavacTask.java
index c366281e6e8..01838e9c196 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/BasicJavacTask.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/BasicJavacTask.java
@@ -136,4 +136,11 @@ public class BasicJavacTask extends JavacTask {
         throw new IllegalStateException();
     }
 
+    /**
+     * For internal use only.  This method will be
+     * removed without warning.
+     */
+    public void updateContext(Context newContext) {
+        context = newContext;
+    }
 }
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/MultiTaskListener.java b/langtools/src/share/classes/com/sun/tools/javac/api/MultiTaskListener.java
index 759dff38710..f1c21f99d54 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/MultiTaskListener.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/MultiTaskListener.java
@@ -79,10 +79,8 @@ public class MultiTaskListener implements TaskListener {
             if (ccw.unwrap(l) == listener)
                 throw new IllegalStateException();
         }
-        TaskListener[] newListeners = new TaskListener[listeners.length + 1];
-        System.arraycopy(listeners, 0, newListeners, 0, listeners.length);
-        newListeners[newListeners.length - 1] = ccw.wrap(listener);
-        listeners = newListeners;
+        listeners = Arrays.copyOf(listeners, listeners.length + 1);
+        listeners[listeners.length - 1] = ccw.wrap(listener);
     }
 
     public void remove(TaskListener listener) {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java b/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java
index 9f9273e3eb5..9495ddf1be4 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java
@@ -28,6 +28,7 @@ package com.sun.tools.javac.code;
 import java.util.EnumSet;
 import java.util.Locale;
 
+import com.sun.source.tree.MemberReferenceTree;
 import com.sun.tools.javac.api.Formattable;
 import com.sun.tools.javac.api.Messages;
 
@@ -85,11 +86,12 @@ public class Kinds {
     public static final int AMBIGUOUS    = ERRONEOUS+1; // ambiguous reference
     public static final int HIDDEN       = ERRONEOUS+2; // hidden method or field
     public static final int STATICERR    = ERRONEOUS+3; // nonstatic member from static context
-    public static final int ABSENT_VAR   = ERRONEOUS+4; // missing variable
-    public static final int WRONG_MTHS   = ERRONEOUS+5; // methods with wrong arguments
-    public static final int WRONG_MTH    = ERRONEOUS+6; // one method with wrong arguments
-    public static final int ABSENT_MTH   = ERRONEOUS+7; // missing method
-    public static final int ABSENT_TYP   = ERRONEOUS+8; // missing type
+    public static final int MISSING_ENCL = ERRONEOUS+4; // missing enclosing class
+    public static final int ABSENT_VAR   = ERRONEOUS+5; // missing variable
+    public static final int WRONG_MTHS   = ERRONEOUS+6; // methods with wrong arguments
+    public static final int WRONG_MTH    = ERRONEOUS+7; // one method with wrong arguments
+    public static final int ABSENT_MTH   = ERRONEOUS+8; // missing method
+    public static final int ABSENT_TYP   = ERRONEOUS+9; // missing type
 
     public enum KindName implements Formattable {
         ANNOTATION("kindname.annotation"),
@@ -140,6 +142,14 @@ public class Kinds {
         }
     }
 
+    public static KindName kindName(MemberReferenceTree.ReferenceMode mode) {
+        switch (mode) {
+            case INVOKE: return KindName.METHOD;
+            case NEW: return KindName.CONSTRUCTOR;
+            default : throw new AssertionError("Unexpected mode: "+ mode);
+        }
+    }
+
     /** A KindName representing a given symbol
      */
     public static KindName kindName(Symbol sym) {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java b/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java
index f639caeef45..644955c646a 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java
@@ -30,6 +30,10 @@ import java.util.Locale;
 import com.sun.tools.javac.api.Messages;
 import com.sun.tools.javac.code.Type.*;
 import com.sun.tools.javac.code.Symbol.*;
+import com.sun.tools.javac.comp.DeferredAttr.DeferredType;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.tree.Pretty;
+import com.sun.tools.javac.util.Assert;
 import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.util.ListBuffer;
 
@@ -51,6 +55,8 @@ public abstract class Printer implements Type.Visitor<String, Locale>, Symbol.Vi
     List<Type> seenCaptured = List.nil();
     static final int PRIME = 997;  // largest prime less than 1000
 
+    protected Printer() { }
+
     /**
      * This method should be overriden in order to provide proper i18n support.
      *
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Source.java b/langtools/src/share/classes/com/sun/tools/javac/code/Source.java
index e17d1a1fa81..f83823af270 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Source.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Source.java
@@ -194,6 +194,9 @@ public enum Source {
     public boolean allowObjectToPrimitiveCast() {
         return compareTo(JDK1_7) >= 0;
     }
+    public boolean allowPoly() {
+        return compareTo(JDK1_8) >= 0;
+    }
     public boolean allowLambda() {
         return compareTo(JDK1_8) >= 0;
     }
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java
index fc651b4a1f3..010d441cb71 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java
@@ -168,6 +168,10 @@ public abstract class Symbol implements Element {
         return owner;
     }
 
+    public Symbol baseSymbol() {
+        return this;
+    }
+
     /** The symbol's erased type.
      */
     public Type erasure(Types types) {
@@ -918,7 +922,12 @@ public abstract class Symbol implements Element {
         /** Clone this symbol with new owner.
          */
         public VarSymbol clone(Symbol newOwner) {
-            VarSymbol v = new VarSymbol(flags_field, name, type, newOwner);
+            VarSymbol v = new VarSymbol(flags_field, name, type, newOwner) {
+                @Override
+                public Symbol baseSymbol() {
+                    return VarSymbol.this;
+                }
+            };
             v.pos = pos;
             v.adr = adr;
             v.data = data;
@@ -1045,7 +1054,12 @@ public abstract class Symbol implements Element {
         /** Clone this symbol with new owner.
          */
         public MethodSymbol clone(Symbol newOwner) {
-            MethodSymbol m = new MethodSymbol(flags_field, name, type, newOwner);
+            MethodSymbol m = new MethodSymbol(flags_field, name, type, newOwner) {
+                @Override
+                public Symbol baseSymbol() {
+                    return MethodSymbol.this;
+                }
+            };
             m.code = code;
             return m;
         }
@@ -1068,6 +1082,10 @@ public abstract class Symbol implements Element {
             }
         }
 
+        public boolean isDynamic() {
+            return false;
+        }
+
         /** find a symbol that this (proxy method) symbol implements.
          *  @param    c       The class whose members are searched for
          *                    implementations
@@ -1356,6 +1374,27 @@ public abstract class Symbol implements Element {
         }
     }
 
+    /** A class for invokedynamic method calls.
+     */
+    public static class DynamicMethodSymbol extends MethodSymbol {
+
+        public Object[] staticArgs;
+        public Symbol bsm;
+        public int bsmKind;
+
+        public DynamicMethodSymbol(Name name, Symbol owner, int bsmKind, MethodSymbol bsm, Type type, Object[] staticArgs) {
+            super(0, name, type, owner);
+            this.bsm = bsm;
+            this.bsmKind = bsmKind;
+            this.staticArgs = staticArgs;
+        }
+
+        @Override
+        public boolean isDynamic() {
+            return true;
+        }
+    }
+
     /** A class for predefined operators.
      */
     public static class OperatorSymbol extends MethodSymbol {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java b/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java
index 32a9170daf9..c09d31eb083 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java
@@ -126,6 +126,7 @@ public class Symtab {
     public final Type cloneableType;
     public final Type serializableType;
     public final Type methodHandleType;
+    public final Type methodTypeType;
     public final Type nativeHeaderType;
     public final Type throwableType;
     public final Type errorType;
@@ -182,6 +183,10 @@ public class Symtab {
      */
     public final Name[] boxedName = new Name[TypeTags.TypeTagCount];
 
+    /** A set containing all operator names.
+     */
+    public final Set<Name> operatorNames = new HashSet<Name>();
+
     /** A hashtable containing the encountered top-level and member classes,
      *  indexed by flat names. The table does not contain local classes.
      *  It should be updated from the outside to reflect classes defined
@@ -243,7 +248,7 @@ public class Symtab {
                             int opcode) {
         predefClass.members().enter(
             new OperatorSymbol(
-                names.fromString(name),
+                makeOperatorName(name),
                 new MethodType(List.of(left, right), res,
                                List.<Type>nil(), methodClass),
                 opcode,
@@ -274,7 +279,7 @@ public class Symtab {
                                      Type res,
                                      int opcode) {
         OperatorSymbol sym =
-            new OperatorSymbol(names.fromString(name),
+            new OperatorSymbol(makeOperatorName(name),
                                new MethodType(List.of(arg),
                                               res,
                                               List.<Type>nil(),
@@ -285,6 +290,16 @@ public class Symtab {
         return sym;
     }
 
+    /**
+     * Create a new operator name from corresponding String representation
+     * and add the name to the set of known operator names.
+     */
+    private Name makeOperatorName(String name) {
+        Name opName = names.fromString(name);
+        operatorNames.add(opName);
+        return opName;
+    }
+
     /** Enter a class into symbol table.
      *  @param    The name of the class.
      */
@@ -440,6 +455,7 @@ public class Symtab {
         throwableType = enterClass("java.lang.Throwable");
         serializableType = enterClass("java.io.Serializable");
         methodHandleType = enterClass("java.lang.invoke.MethodHandle");
+        methodTypeType = enterClass("java.lang.invoke.MethodType");
         errorType = enterClass("java.lang.Error");
         illegalArgumentExceptionType = enterClass("java.lang.IllegalArgumentException");
         interruptedExceptionType = enterClass("java.lang.InterruptedException");
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Type.java b/langtools/src/share/classes/com/sun/tools/javac/code/Type.java
index 86d2c631018..eefbf90c85d 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Type.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Type.java
@@ -27,14 +27,19 @@ package com.sun.tools.javac.code;
 
 import java.util.Collections;
 
-import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.code.Symbol.*;
+import com.sun.tools.javac.util.*;
+
+import java.util.EnumMap;
+import java.util.EnumSet;
+import java.util.Map;
+import java.util.Set;
 
 import javax.lang.model.type.*;
 
+import static com.sun.tools.javac.code.BoundKind.*;
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Kinds.*;
-import static com.sun.tools.javac.code.BoundKind.*;
 import static com.sun.tools.javac.code.TypeTags.*;
 
 /** This class represents Java types. The class itself defines the behavior of
@@ -70,6 +75,9 @@ public class Type implements PrimitiveType {
     /** Constant type: no type at all. */
     public static final JCNoType noType = new JCNoType(NONE);
 
+    /** Constant type: special type to be used during recovery of deferred expressions. */
+    public static final JCNoType recoveryType = new JCNoType(NONE);
+
     /** If this switch is turned on, the names of type variables
      *  and anonymous classes are printed with hashcodes appended.
      */
@@ -1168,22 +1176,59 @@ public class Type implements PrimitiveType {
         }
     }
 
-    /** A class for instantiatable variables, for use during type
-     *  inference.
+    /** A class for inference variables, for use during method/diamond type
+     *  inference. An inference variable has upper/lower bounds and a set
+     *  of equality constraints. Such bounds are set during subtyping, type-containment,
+     *  type-equality checks, when the types being tested contain inference variables.
+     *  A change listener can be attached to an inference variable, to receive notifications
+     *  whenever the bounds of an inference variable change.
      */
     public static class UndetVar extends DelegatedType {
-        public List<Type> lobounds = List.nil();
-        public List<Type> hibounds = List.nil();
-        public List<Type> eq = List.nil();
+
+        /** Inference variable change listener. The listener method is called
+         *  whenever a change to the inference variable's bounds occurs
+         */
+        public interface UndetVarListener {
+            /** called when some inference variable bounds (of given kinds ibs) change */
+            void varChanged(UndetVar uv, Set<InferenceBound> ibs);
+        }
+
+        /**
+         * Inference variable bound kinds
+         */
+        public enum InferenceBound {
+            /** upper bounds */
+            UPPER,
+            /** lower bounds */
+            LOWER,
+            /** equality constraints */
+            EQ;
+        }
+
+        /** inference variable bounds */
+        private Map<InferenceBound, List<Type>> bounds;
+
+        /** inference variable's inferred type (set from Infer.java) */
         public Type inst = null;
 
+        /** inference variable's change listener */
+        public UndetVarListener listener = null;
+
         @Override
         public <R,S> R accept(Type.Visitor<R,S> v, S s) {
             return v.visitUndetVar(this, s);
         }
 
-        public UndetVar(Type origin) {
+        public UndetVar(TypeVar origin, Types types) {
+            this(origin, types, true);
+        }
+
+        public UndetVar(TypeVar origin, Types types, boolean includeBounds) {
             super(UNDETVAR, origin);
+            bounds = new EnumMap<InferenceBound, List<Type>>(InferenceBound.class);
+            bounds.put(InferenceBound.UPPER, includeBounds ? types.getBounds(origin) : List.<Type>nil());
+            bounds.put(InferenceBound.LOWER, List.<Type>nil());
+            bounds.put(InferenceBound.EQ, List.<Type>nil());
         }
 
         public String toString() {
@@ -1195,6 +1240,48 @@ public class Type implements PrimitiveType {
             if (inst != null) return inst.baseType();
             else return this;
         }
+
+        /** get all bounds of a given kind */
+        public List<Type> getBounds(InferenceBound ib) {
+            return bounds.get(ib);
+        }
+
+        /** add a bound of a given kind - this might trigger listener notification */
+        public void addBound(InferenceBound ib, Type bound, Types types) {
+            List<Type> prevBounds = bounds.get(ib);
+            for (Type b : prevBounds) {
+                if (types.isSameType(b, bound)) {
+                    return;
+                }
+            }
+            bounds.put(ib, prevBounds.prepend(bound));
+            notifyChange(EnumSet.of(ib));
+        }
+
+        /** replace types in all bounds - this might trigger listener notification */
+        public void substBounds(List<Type> from, List<Type> to, Types types) {
+            EnumSet<InferenceBound> changed = EnumSet.noneOf(InferenceBound.class);
+            Map<InferenceBound, List<Type>> bounds2 = new EnumMap<InferenceBound, List<Type>>(InferenceBound.class);
+            for (Map.Entry<InferenceBound, List<Type>> _entry : bounds.entrySet()) {
+                InferenceBound ib = _entry.getKey();
+                List<Type> prevBounds = _entry.getValue();
+                List<Type> newBounds = types.subst(prevBounds, from, to);
+                bounds2.put(ib, newBounds);
+                if (prevBounds != newBounds) {
+                    changed.add(ib);
+                }
+            }
+            if (!changed.isEmpty()) {
+                bounds = bounds2;
+                notifyChange(changed);
+            }
+        }
+
+        private void notifyChange(EnumSet<InferenceBound> ibs) {
+            if (listener != null) {
+                listener.varChanged(this, ibs);
+            }
+        }
     }
 
     /** Represents VOID or NONE.
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java b/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java
index 463def22ef8..d46286ade81 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java
@@ -102,9 +102,13 @@ public class TypeTags {
      */
     public static final int FORALL = WILDCARD+1;
 
+    /** The tag of deferred expression types in method context
+     */
+    public static final int DEFERRED = FORALL+1;
+
     /** The tag of the bottom type <null>.
      */
-    public static final int BOT = FORALL+1;
+    public static final int BOT = DEFERRED+1;
 
     /** The tag of a missing type.
      */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
index 4fdfd4d1ef8..0cb2b07b248 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
@@ -34,6 +34,7 @@ import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.jvm.ClassReader;
 import com.sun.tools.javac.code.Attribute.RetentionPolicy;
 import com.sun.tools.javac.code.Lint.LintCategory;
+import com.sun.tools.javac.code.Type.UndetVar.InferenceBound;
 import com.sun.tools.javac.comp.Check;
 
 import static com.sun.tools.javac.code.Scope.*;
@@ -78,8 +79,10 @@ public class Types {
     final boolean allowObjectToPrimitiveCast;
     final ClassReader reader;
     final Check chk;
+    JCDiagnostic.Factory diags;
     List<Warner> warnStack = List.nil();
     final Name capturedName;
+    private final FunctionDescriptorLookupError functionDescriptorLookupError;
 
     // <editor-fold defaultstate="collapsed" desc="Instantiating">
     public static Types instance(Context context) {
@@ -101,6 +104,8 @@ public class Types {
         chk = Check.instance(context);
         capturedName = names.fromString("<captured wildcard>");
         messages = JavacMessages.instance(context);
+        diags = JCDiagnostic.Factory.instance(context);
+        functionDescriptorLookupError = new FunctionDescriptorLookupError();
     }
     // </editor-fold>
 
@@ -295,6 +300,294 @@ public class Types {
     }
     // </editor-fold>
 
+    // <editor-fold defaultstate="collapsed" desc="findSam">
+
+    /**
+     * Exception used to report a function descriptor lookup failure. The exception
+     * wraps a diagnostic that can be used to generate more details error
+     * messages.
+     */
+    public static class FunctionDescriptorLookupError extends RuntimeException {
+        private static final long serialVersionUID = 0;
+
+        JCDiagnostic diagnostic;
+
+        FunctionDescriptorLookupError() {
+            this.diagnostic = null;
+        }
+
+        FunctionDescriptorLookupError setMessage(JCDiagnostic diag) {
+            this.diagnostic = diag;
+            return this;
+        }
+
+        public JCDiagnostic getDiagnostic() {
+            return diagnostic;
+        }
+    }
+
+    /**
+     * A cache that keeps track of function descriptors associated with given
+     * functional interfaces.
+     */
+    class DescriptorCache {
+
+        private WeakHashMap<TypeSymbol, Entry> _map = new WeakHashMap<TypeSymbol, Entry>();
+
+        class FunctionDescriptor {
+            Symbol descSym;
+
+            FunctionDescriptor(Symbol descSym) {
+                this.descSym = descSym;
+            }
+
+            public Symbol getSymbol() {
+                return descSym;
+            }
+
+            public Type getType(Type origin) {
+                return memberType(origin, descSym);
+            }
+        }
+
+        class Entry {
+            final FunctionDescriptor cachedDescRes;
+            final int prevMark;
+
+            public Entry(FunctionDescriptor cachedDescRes,
+                    int prevMark) {
+                this.cachedDescRes = cachedDescRes;
+                this.prevMark = prevMark;
+            }
+
+            boolean matches(int mark) {
+                return  this.prevMark == mark;
+            }
+        }
+
+        FunctionDescriptor get(TypeSymbol origin) throws FunctionDescriptorLookupError {
+            Entry e = _map.get(origin);
+            CompoundScope members = membersClosure(origin.type, false);
+            if (e == null ||
+                    !e.matches(members.getMark())) {
+                FunctionDescriptor descRes = findDescriptorInternal(origin, members);
+                _map.put(origin, new Entry(descRes, members.getMark()));
+                return descRes;
+            }
+            else {
+                return e.cachedDescRes;
+            }
+        }
+
+        /**
+         * Scope filter used to skip methods that should be ignored during
+         * function interface conversion (such as methods overridden by
+         * j.l.Object)
+         */
+        class DescriptorFilter implements Filter<Symbol> {
+
+            TypeSymbol origin;
+
+            DescriptorFilter(TypeSymbol origin) {
+                this.origin = origin;
+            }
+
+            @Override
+            public boolean accepts(Symbol sym) {
+                    return sym.kind == Kinds.MTH &&
+                            (sym.flags() & ABSTRACT) != 0 &&
+                            !overridesObjectMethod(origin, sym) &&
+                            notOverridden(sym);
+            }
+
+            private boolean notOverridden(Symbol msym) {
+                Symbol impl = ((MethodSymbol)msym).implementation(origin, Types.this, false);
+                return impl == null || (impl.flags() & ABSTRACT) != 0;
+            }
+        };
+
+        /**
+         * Compute the function descriptor associated with a given functional interface
+         */
+        public FunctionDescriptor findDescriptorInternal(TypeSymbol origin, CompoundScope membersCache) throws FunctionDescriptorLookupError {
+            if (!origin.isInterface()) {
+                //t must be an interface
+                throw failure("not.a.functional.intf");
+            }
+
+            final ListBuffer<Symbol> abstracts = ListBuffer.lb();
+            for (Symbol sym : membersCache.getElements(new DescriptorFilter(origin))) {
+                Type mtype = memberType(origin.type, sym);
+                if (abstracts.isEmpty() ||
+                        (sym.name == abstracts.first().name &&
+                        overrideEquivalent(mtype, memberType(origin.type, abstracts.first())))) {
+                    abstracts.append(sym);
+                } else {
+                    //the target method(s) should be the only abstract members of t
+                    throw failure("not.a.functional.intf.1",
+                            diags.fragment("incompatible.abstracts", Kinds.kindName(origin), origin));
+                }
+            }
+            if (abstracts.isEmpty()) {
+                //t must define a suitable non-generic method
+                throw failure("not.a.functional.intf.1",
+                            diags.fragment("no.abstracts", Kinds.kindName(origin), origin));
+            } else if (abstracts.size() == 1) {
+                if (abstracts.first().type.tag == FORALL) {
+                    throw failure("invalid.generic.desc.in.functional.intf",
+                            abstracts.first(),
+                            Kinds.kindName(origin),
+                            origin);
+                } else {
+                    return new FunctionDescriptor(abstracts.first());
+                }
+            } else { // size > 1
+                for (Symbol msym : abstracts) {
+                    if (msym.type.tag == FORALL) {
+                        throw failure("invalid.generic.desc.in.functional.intf",
+                                abstracts.first(),
+                                Kinds.kindName(origin),
+                                origin);
+                    }
+                }
+                FunctionDescriptor descRes = mergeDescriptors(origin, abstracts.toList());
+                if (descRes == null) {
+                    //we can get here if the functional interface is ill-formed
+                    ListBuffer<JCDiagnostic> descriptors = ListBuffer.lb();
+                    for (Symbol desc : abstracts) {
+                        String key = desc.type.getThrownTypes().nonEmpty() ?
+                                "descriptor.throws" : "descriptor";
+                        descriptors.append(diags.fragment(key, desc.name,
+                                desc.type.getParameterTypes(),
+                                desc.type.getReturnType(),
+                                desc.type.getThrownTypes()));
+                    }
+                    JCDiagnostic.MultilineDiagnostic incompatibleDescriptors =
+                            new JCDiagnostic.MultilineDiagnostic(diags.fragment("incompatible.descs.in.functional.intf",
+                            Kinds.kindName(origin), origin), descriptors.toList());
+                    throw failure(incompatibleDescriptors);
+                }
+                return descRes;
+            }
+        }
+
+        /**
+         * Compute a synthetic type for the target descriptor given a list
+         * of override-equivalent methods in the functional interface type.
+         * The resulting method type is a method type that is override-equivalent
+         * and return-type substitutable with each method in the original list.
+         */
+        private FunctionDescriptor mergeDescriptors(TypeSymbol origin, List<Symbol> methodSyms) {
+            //pick argument types - simply take the signature that is a
+            //subsignature of all other signatures in the list (as per JLS 8.4.2)
+            List<Symbol> mostSpecific = List.nil();
+            outer: for (Symbol msym1 : methodSyms) {
+                Type mt1 = memberType(origin.type, msym1);
+                for (Symbol msym2 : methodSyms) {
+                    Type mt2 = memberType(origin.type, msym2);
+                    if (!isSubSignature(mt1, mt2)) {
+                        continue outer;
+                    }
+                }
+                mostSpecific = mostSpecific.prepend(msym1);
+            }
+            if (mostSpecific.isEmpty()) {
+                return null;
+            }
+
+
+            //pick return types - this is done in two phases: (i) first, the most
+            //specific return type is chosen using strict subtyping; if this fails,
+            //a second attempt is made using return type substitutability (see JLS 8.4.5)
+            boolean phase2 = false;
+            Symbol bestSoFar = null;
+            while (bestSoFar == null) {
+                outer: for (Symbol msym1 : mostSpecific) {
+                    Type mt1 = memberType(origin.type, msym1);
+                    for (Symbol msym2 : methodSyms) {
+                        Type mt2 = memberType(origin.type, msym2);
+                        if (phase2 ?
+                                !returnTypeSubstitutable(mt1, mt2) :
+                                !isSubtypeInternal(mt1.getReturnType(), mt2.getReturnType())) {
+                            continue outer;
+                        }
+                    }
+                    bestSoFar = msym1;
+                }
+                if (phase2) {
+                    break;
+                } else {
+                    phase2 = true;
+                }
+            }
+            if (bestSoFar == null) return null;
+
+            //merge thrown types - form the intersection of all the thrown types in
+            //all the signatures in the list
+            List<Type> thrown = null;
+            for (Symbol msym1 : methodSyms) {
+                Type mt1 = memberType(origin.type, msym1);
+                thrown = (thrown == null) ?
+                    mt1.getThrownTypes() :
+                    chk.intersect(mt1.getThrownTypes(), thrown);
+            }
+
+            final List<Type> thrown1 = thrown;
+            return new FunctionDescriptor(bestSoFar) {
+                @Override
+                public Type getType(Type origin) {
+                    Type mt = memberType(origin, getSymbol());
+                    return new MethodType(mt.getParameterTypes(), mt.getReturnType(), thrown1, syms.methodClass);
+                }
+            };
+        }
+
+        boolean isSubtypeInternal(Type s, Type t) {
+            return (s.isPrimitive() && t.isPrimitive()) ?
+                    isSameType(t, s) :
+                    isSubtype(s, t);
+        }
+
+        FunctionDescriptorLookupError failure(String msg, Object... args) {
+            return failure(diags.fragment(msg, args));
+        }
+
+        FunctionDescriptorLookupError failure(JCDiagnostic diag) {
+            return functionDescriptorLookupError.setMessage(diag);
+        }
+    }
+
+    private DescriptorCache descCache = new DescriptorCache();
+
+    /**
+     * Find the method descriptor associated to this class symbol - if the
+     * symbol 'origin' is not a functional interface, an exception is thrown.
+     */
+    public Symbol findDescriptorSymbol(TypeSymbol origin) throws FunctionDescriptorLookupError {
+        return descCache.get(origin).getSymbol();
+    }
+
+    /**
+     * Find the type of the method descriptor associated to this class symbol -
+     * if the symbol 'origin' is not a functional interface, an exception is thrown.
+     */
+    public Type findDescriptorType(Type origin) throws FunctionDescriptorLookupError {
+        return descCache.get(origin.tsym).getType(origin);
+    }
+
+    /**
+     * Is given type a functional interface?
+     */
+    public boolean isFunctionalInterface(TypeSymbol tsym) {
+        try {
+            findDescriptorSymbol(tsym);
+            return true;
+        } catch (FunctionDescriptorLookupError ex) {
+            return false;
+        }
+    }
+    // </editor-fold>
+
     // <editor-fold defaultstate="collapsed" desc="isSubtype">
     /**
      * Is t an unchecked subtype of s?
@@ -510,7 +803,7 @@ public class Types {
                     return false;
                 }
 
-                t.hibounds = t.hibounds.prepend(s);
+                t.addBound(InferenceBound.UPPER, s, Types.this);
                 return true;
             }
 
@@ -578,7 +871,7 @@ public class Types {
                 undet.qtype == s ||
                 s.tag == ERROR ||
                 s.tag == BOT) return true;
-            undet.lobounds = undet.lobounds.prepend(s);
+            undet.addBound(InferenceBound.LOWER, s, this);
             return true;
         }
         default:
@@ -723,7 +1016,7 @@ public class Types {
                 if (t == s || t.qtype == s || s.tag == ERROR || s.tag == UNKNOWN)
                     return true;
 
-                t.eq = t.eq.prepend(s);
+                t.addBound(InferenceBound.EQ, s, Types.this);
 
                 return true;
             }
@@ -735,19 +1028,6 @@ public class Types {
         };
     // </editor-fold>
 
-    // <editor-fold defaultstate="collapsed" desc="fromUnknownFun">
-    /**
-     * A mapping that turns all unknown types in this type to fresh
-     * unknown variables.
-     */
-    public Mapping fromUnknownFun = new Mapping("fromUnknownFun") {
-            public Type apply(Type t) {
-                if (t.tag == UNKNOWN) return new UndetVar(t);
-                else return t.map(this);
-            }
-        };
-    // </editor-fold>
-
     // <editor-fold defaultstate="collapsed" desc="Contains Type">
     public boolean containedBy(Type t, Type s) {
         switch (t.tag) {
@@ -759,12 +1039,12 @@ public class Types {
                     case UNBOUND: //similar to ? extends Object
                     case EXTENDS: {
                         Type bound = upperBound(s);
-                        undetvar.hibounds = undetvar.hibounds.prepend(bound);
+                        undetvar.addBound(InferenceBound.UPPER, bound, this);
                         break;
                     }
                     case SUPER: {
                         Type bound = lowerBound(s);
-                        undetvar.lobounds = undetvar.lobounds.prepend(bound);
+                        undetvar.addBound(InferenceBound.LOWER, bound, this);
                         break;
                     }
                 }
@@ -1227,7 +1507,10 @@ public class Types {
      * Returns the lower bounds of the formals of a method.
      */
     public List<Type> lowerBoundArgtypes(Type t) {
-        return map(t.getParameterTypes(), lowerBoundMapping);
+        return lowerBounds(t.getParameterTypes());
+    }
+    public List<Type> lowerBounds(List<Type> ts) {
+        return map(ts, lowerBoundMapping);
     }
     private final Mapping lowerBoundMapping = new Mapping("lowerBound") {
             public Type apply(Type t) {
@@ -2019,6 +2302,15 @@ public class Types {
             hasSameArgs(t, erasure(s)) || hasSameArgs(erasure(t), s);
     }
 
+    public boolean overridesObjectMethod(TypeSymbol origin, Symbol msym) {
+        for (Scope.Entry e = syms.objectType.tsym.members().lookup(msym.name) ; e.scope != null ; e = e.next()) {
+            if (msym.overrides(e.sym, origin, Types.this, true)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
     // <editor-fold defaultstate="collapsed" desc="Determining method implementation in given site">
     class ImplementationCache {
 
@@ -3166,6 +3458,14 @@ public class Types {
         }
         return Type.noType;
     }
+
+    /**
+     * Return the unboxed type if 't' is a boxed class, otherwise return 't' itself.
+     */
+    public Type unboxedTypeOrType(Type t) {
+        Type unboxedType = unboxedType(t);
+        return unboxedType.tag == NONE ? t : unboxedType;
+    }
     // </editor-fold>
 
     // <editor-fold defaultstate="collapsed" desc="Capture conversion">
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java
index eb68899a9bc..e9cad76d473 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java
@@ -514,22 +514,6 @@ public class Annotate {
                       expectedType);
             fatalError = true;
         }
-
-        // validate that all other elements of containing type has defaults
-        scope = targetContainerType.tsym.members();
-        error = false;
-        for(Symbol elm : scope.getElements()) {
-            if (elm.name != names.value &&
-                elm.kind == Kinds.MTH &&
-                ((MethodSymbol)elm).defaultValue == null) {
-                log.error(pos,
-                          "invalid.containedby.annotation.elem.nondefault",
-                          targetContainerType,
-                          elm);
-                containerValueSymbol = null;
-                error = true;
-            }
-        }
         if (error) {
             fatalError = true;
         }
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
index b9613fa31c1..e11297309c3 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
@@ -25,12 +25,10 @@
 
 package com.sun.tools.javac.comp;
 
-import java.util.*;
-import java.util.Set;
-import javax.lang.model.element.ElementKind;
-import javax.tools.JavaFileObject;
-
 import com.sun.tools.javac.code.*;
+import com.sun.tools.javac.comp.DeferredAttr.AttrMode;
+import com.sun.tools.javac.comp.Infer.InferenceContext;
+import com.sun.tools.javac.comp.Infer.InferenceContext.FreeTypeListener;
 import com.sun.tools.javac.jvm.*;
 import com.sun.tools.javac.tree.*;
 import com.sun.tools.javac.util.*;
@@ -45,10 +43,16 @@ import com.sun.tools.javac.code.Type.*;
 import com.sun.tools.javac.comp.Check.CheckContext;
 
 import com.sun.source.tree.IdentifierTree;
+import com.sun.source.tree.MemberReferenceTree.ReferenceMode;
 import com.sun.source.tree.MemberSelectTree;
 import com.sun.source.tree.TreeVisitor;
 import com.sun.source.util.SimpleTreeVisitor;
 
+import java.util.*;
+import java.util.Set;
+import javax.lang.model.element.ElementKind;
+import javax.tools.JavaFileObject;
+
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Flags.ANNOTATION;
 import static com.sun.tools.javac.code.Flags.BLOCK;
@@ -80,7 +84,9 @@ public class Attr extends JCTree.Visitor {
     final Symtab syms;
     final Resolve rs;
     final Infer infer;
+    final DeferredAttr deferredAttr;
     final Check chk;
+    final Flow flow;
     final MemberEnter memberEnter;
     final TreeMaker make;
     final ConstFold cfolder;
@@ -106,10 +112,12 @@ public class Attr extends JCTree.Visitor {
         syms = Symtab.instance(context);
         rs = Resolve.instance(context);
         chk = Check.instance(context);
+        flow = Flow.instance(context);
         memberEnter = MemberEnter.instance(context);
         make = TreeMaker.instance(context);
         enter = Enter.instance(context);
         infer = Infer.instance(context);
+        deferredAttr = DeferredAttr.instance(context);
         cfolder = ConstFold.instance(context);
         target = Target.instance(context);
         types = Types.instance(context);
@@ -127,23 +135,31 @@ public class Attr extends JCTree.Visitor {
         allowCovariantReturns = source.allowCovariantReturns();
         allowAnonOuterThis = source.allowAnonOuterThis();
         allowStringsInSwitch = source.allowStringsInSwitch();
+        allowPoly = source.allowPoly() && options.isSet("allowPoly");
+        allowLambda = source.allowLambda();
         sourceName = source.name;
         relax = (options.isSet("-retrofit") ||
                  options.isSet("-relax"));
         findDiamonds = options.get("findDiamond") != null &&
                  source.allowDiamond();
         useBeforeDeclarationWarning = options.isSet("useBeforeDeclarationWarning");
+        identifyLambdaCandidate = options.getBoolean("identifyLambdaCandidate", false);
 
         statInfo = new ResultInfo(NIL, Type.noType);
         varInfo = new ResultInfo(VAR, Type.noType);
         unknownExprInfo = new ResultInfo(VAL, Type.noType);
         unknownTypeInfo = new ResultInfo(TYP, Type.noType);
+        recoveryInfo = new RecoveryInfo(deferredAttr.emptyDeferredAttrContext);
     }
 
     /** Switch: relax some constraints for retrofit mode.
      */
     boolean relax;
 
+    /** Switch: support target-typing inference
+     */
+    boolean allowPoly;
+
     /** Switch: support generics?
      */
     boolean allowGenerics;
@@ -164,6 +180,10 @@ public class Attr extends JCTree.Visitor {
      */
     boolean allowCovariantReturns;
 
+    /** Switch: support lambda expressions ?
+     */
+    boolean allowLambda;
+
     /** Switch: allow references to surrounding object from anonymous
      * objects during constructor call?
      */
@@ -185,6 +205,12 @@ public class Attr extends JCTree.Visitor {
      */
     boolean useBeforeDeclarationWarning;
 
+    /**
+     * Switch: generate warnings whenever an anonymous inner class that is convertible
+     * to a lambda expression is found
+     */
+    boolean identifyLambdaCandidate;
+
     /**
      * Switch: allow strings in switch?
      */
@@ -207,15 +233,29 @@ public class Attr extends JCTree.Visitor {
      *  @param ownkind  The computed kind of the tree
      *  @param resultInfo  The expected result of the tree
      */
-    Type check(JCTree tree, Type owntype, int ownkind, ResultInfo resultInfo) {
+    Type check(final JCTree tree, final Type found, final int ownkind, final ResultInfo resultInfo) {
+        InferenceContext inferenceContext = resultInfo.checkContext.inferenceContext();
+        Type owntype = found;
         if (owntype.tag != ERROR && resultInfo.pt.tag != METHOD && resultInfo.pt.tag != FORALL) {
-            if ((ownkind & ~resultInfo.pkind) == 0) {
-                owntype = resultInfo.check(tree, owntype);
+            if (inferenceContext.free(found)) {
+                inferenceContext.addFreeTypeListener(List.of(found, resultInfo.pt), new FreeTypeListener() {
+                    @Override
+                    public void typesInferred(InferenceContext inferenceContext) {
+                        ResultInfo pendingResult =
+                                    resultInfo.dup(inferenceContext.asInstType(resultInfo.pt, types));
+                        check(tree, inferenceContext.asInstType(found, types), ownkind, pendingResult);
+                    }
+                });
+                return tree.type = resultInfo.pt;
             } else {
-                log.error(tree.pos(), "unexpected.type",
-                          kindNames(resultInfo.pkind),
-                          kindName(ownkind));
-                owntype = types.createErrorType(owntype);
+                if ((ownkind & ~resultInfo.pkind) == 0) {
+                    owntype = resultInfo.check(tree, owntype);
+                } else {
+                    log.error(tree.pos(), "unexpected.type",
+                            kindNames(resultInfo.pkind),
+                            kindName(ownkind));
+                    owntype = types.createErrorType(owntype);
+                }
             }
         }
         tree.type = owntype;
@@ -262,6 +302,9 @@ public class Attr extends JCTree.Visitor {
                 case CLASSDEF:
                     //class def is always an owner
                     return ((JCClassDecl)env.tree).sym;
+                case LAMBDA:
+                    //a lambda is an owner - return a fresh synthetic method symbol
+                    return new MethodSymbol(0, names.empty, null, syms.methodClass);
                 case BLOCK:
                     //static/instance init blocks are owner
                     Symbol blockSym = env.info.scope.owner;
@@ -297,8 +340,6 @@ public class Attr extends JCTree.Visitor {
             } else {
                 log.error(pos, "cant.assign.val.to.final.var", v);
             }
-        } else if ((v.flags() & EFFECTIVELY_FINAL) != 0) {
-            v.flags_field &= ~EFFECTIVELY_FINAL;
         }
     }
 
@@ -431,14 +472,38 @@ public class Attr extends JCTree.Visitor {
         static final long serialVersionUID = -6924771130405446405L;
         private Env<AttrContext> env;
         private BreakAttr(Env<AttrContext> env) {
-            this.env = env;
+            this.env = copyEnv(env);
+        }
+
+        private Env<AttrContext> copyEnv(Env<AttrContext> env) {
+            Env<AttrContext> newEnv =
+                    env.dup(env.tree, env.info.dup(copyScope(env.info.scope)));
+            if (newEnv.outer != null) {
+                newEnv.outer = copyEnv(newEnv.outer);
+            }
+            return newEnv;
+        }
+
+        private Scope copyScope(Scope sc) {
+            Scope newScope = new Scope(sc.owner);
+            List<Symbol> elemsList = List.nil();
+            while (sc != null) {
+                for (Scope.Entry e = sc.elems ; e != null ; e = e.sibling) {
+                    elemsList = elemsList.prepend(e.sym);
+                }
+                sc = sc.next;
+            }
+            for (Symbol s : elemsList) {
+                newScope.enter(s);
+            }
+            return newScope;
         }
     }
 
     class ResultInfo {
-        int pkind;
-        Type pt;
-        CheckContext checkContext;
+        final int pkind;
+        final Type pt;
+        final CheckContext checkContext;
 
         ResultInfo(int pkind, Type pt) {
             this(pkind, pt, chk.basicHandler);
@@ -450,15 +515,45 @@ public class Attr extends JCTree.Visitor {
             this.checkContext = checkContext;
         }
 
-        protected Type check(DiagnosticPosition pos, Type found) {
+        protected Type check(final DiagnosticPosition pos, final Type found) {
             return chk.checkType(pos, found, pt, checkContext);
         }
+
+        protected ResultInfo dup(Type newPt) {
+            return new ResultInfo(pkind, newPt, checkContext);
+        }
     }
 
-    private final ResultInfo statInfo;
-    private final ResultInfo varInfo;
-    private final ResultInfo unknownExprInfo;
-    private final ResultInfo unknownTypeInfo;
+    class RecoveryInfo extends ResultInfo {
+
+        public RecoveryInfo(final DeferredAttr.DeferredAttrContext deferredAttrContext) {
+            super(Kinds.VAL, Type.recoveryType, new Check.NestedCheckContext(chk.basicHandler) {
+                @Override
+                public DeferredAttr.DeferredAttrContext deferredAttrContext() {
+                    return deferredAttrContext;
+                }
+                @Override
+                public boolean compatible(Type found, Type req, Warner warn) {
+                    return true;
+                }
+                @Override
+                public void report(DiagnosticPosition pos, JCDiagnostic details) {
+                    //do nothing
+                }
+            });
+        }
+
+        @Override
+        protected Type check(DiagnosticPosition pos, Type found) {
+            return chk.checkNonVoid(pos, super.check(pos, found));
+        }
+    }
+
+    final ResultInfo statInfo;
+    final ResultInfo varInfo;
+    final ResultInfo unknownExprInfo;
+    final ResultInfo unknownTypeInfo;
+    final ResultInfo recoveryInfo;
 
     Type pt() {
         return resultInfo.pt;
@@ -491,7 +586,7 @@ public class Attr extends JCTree.Visitor {
      *  @param env     The environment visitor argument.
      *  @param resultInfo   The result info visitor argument.
      */
-    private Type attribTree(JCTree tree, Env<AttrContext> env, ResultInfo resultInfo) {
+    Type attribTree(JCTree tree, Env<AttrContext> env, ResultInfo resultInfo) {
         Env<AttrContext> prevEnv = this.env;
         ResultInfo prevResult = this.resultInfo;
         try {
@@ -563,9 +658,12 @@ public class Attr extends JCTree.Visitor {
      */
     List<Type> attribArgs(List<JCExpression> trees, Env<AttrContext> env) {
         ListBuffer<Type> argtypes = new ListBuffer<Type>();
-        for (List<JCExpression> l = trees; l.nonEmpty(); l = l.tail)
-            argtypes.append(chk.checkNonVoid(
-                l.head.pos(), types.upperBound(attribExpr(l.head, env, Infer.anyPoly))));
+        for (JCExpression arg : trees) {
+            Type argtype = allowPoly && TreeInfo.isPoly(arg, env.tree) ?
+                    deferredAttr.new DeferredType(arg, env) :
+                    chk.checkNonVoid(arg, attribExpr(arg, env, Infer.anyPoly));
+            argtypes.append(argtype);
+        }
         return argtypes.toList();
     }
 
@@ -934,7 +1032,10 @@ public class Attr extends JCTree.Visitor {
             chk.checkDeprecatedAnnotation(tree.pos(), v);
 
             if (tree.init != null) {
-                if ((v.flags_field & FINAL) != 0 && !tree.init.hasTag(NEWCLASS)) {
+                if ((v.flags_field & FINAL) != 0 &&
+                        !tree.init.hasTag(NEWCLASS) &&
+                        !tree.init.hasTag(LAMBDA) &&
+                        !tree.init.hasTag(REFERENCE)) {
                     // In this case, `v' is final.  Ensure that it's initializer is
                     // evaluated.
                     v.getConstValue(); // ensure initializer is evaluated
@@ -979,8 +1080,11 @@ public class Attr extends JCTree.Visitor {
             // Create a new local environment with a local scope.
             Env<AttrContext> localEnv =
                 env.dup(tree, env.info.dup(env.info.scope.dup()));
-            attribStats(tree.stats, localEnv);
-            localEnv.info.scope.leave();
+            try {
+                attribStats(tree.stats, localEnv);
+            } finally {
+                localEnv.info.scope.leave();
+            }
         }
         result = null;
     }
@@ -1000,43 +1104,51 @@ public class Attr extends JCTree.Visitor {
     public void visitForLoop(JCForLoop tree) {
         Env<AttrContext> loopEnv =
             env.dup(env.tree, env.info.dup(env.info.scope.dup()));
-        attribStats(tree.init, loopEnv);
-        if (tree.cond != null) attribExpr(tree.cond, loopEnv, syms.booleanType);
-        loopEnv.tree = tree; // before, we were not in loop!
-        attribStats(tree.step, loopEnv);
-        attribStat(tree.body, loopEnv);
-        loopEnv.info.scope.leave();
-        result = null;
+        try {
+            attribStats(tree.init, loopEnv);
+            if (tree.cond != null) attribExpr(tree.cond, loopEnv, syms.booleanType);
+            loopEnv.tree = tree; // before, we were not in loop!
+            attribStats(tree.step, loopEnv);
+            attribStat(tree.body, loopEnv);
+            result = null;
+        }
+        finally {
+            loopEnv.info.scope.leave();
+        }
     }
 
     public void visitForeachLoop(JCEnhancedForLoop tree) {
         Env<AttrContext> loopEnv =
             env.dup(env.tree, env.info.dup(env.info.scope.dup()));
-        attribStat(tree.var, loopEnv);
-        Type exprType = types.upperBound(attribExpr(tree.expr, loopEnv));
-        chk.checkNonVoid(tree.pos(), exprType);
-        Type elemtype = types.elemtype(exprType); // perhaps expr is an array?
-        if (elemtype == null) {
-            // or perhaps expr implements Iterable<T>?
-            Type base = types.asSuper(exprType, syms.iterableType.tsym);
-            if (base == null) {
-                log.error(tree.expr.pos(),
-                        "foreach.not.applicable.to.type",
-                        exprType,
-                        diags.fragment("type.req.array.or.iterable"));
-                elemtype = types.createErrorType(exprType);
-            } else {
-                List<Type> iterableParams = base.allparams();
-                elemtype = iterableParams.isEmpty()
-                    ? syms.objectType
-                    : types.upperBound(iterableParams.head);
+        try {
+            attribStat(tree.var, loopEnv);
+            Type exprType = types.upperBound(attribExpr(tree.expr, loopEnv));
+            chk.checkNonVoid(tree.pos(), exprType);
+            Type elemtype = types.elemtype(exprType); // perhaps expr is an array?
+            if (elemtype == null) {
+                // or perhaps expr implements Iterable<T>?
+                Type base = types.asSuper(exprType, syms.iterableType.tsym);
+                if (base == null) {
+                    log.error(tree.expr.pos(),
+                            "foreach.not.applicable.to.type",
+                            exprType,
+                            diags.fragment("type.req.array.or.iterable"));
+                    elemtype = types.createErrorType(exprType);
+                } else {
+                    List<Type> iterableParams = base.allparams();
+                    elemtype = iterableParams.isEmpty()
+                        ? syms.objectType
+                        : types.upperBound(iterableParams.head);
+                }
             }
+            chk.checkType(tree.expr.pos(), elemtype, tree.var.sym.type);
+            loopEnv.tree = tree; // before, we were not in loop!
+            attribStat(tree.body, loopEnv);
+            result = null;
+        }
+        finally {
+            loopEnv.info.scope.leave();
         }
-        chk.checkType(tree.expr.pos(), elemtype, tree.var.sym.type);
-        loopEnv.tree = tree; // before, we were not in loop!
-        attribStat(tree.body, loopEnv);
-        loopEnv.info.scope.leave();
-        result = null;
     }
 
     public void visitLabelled(JCLabeledStatement tree) {
@@ -1062,61 +1174,69 @@ public class Attr extends JCTree.Visitor {
         Env<AttrContext> switchEnv =
             env.dup(tree, env.info.dup(env.info.scope.dup()));
 
-        boolean enumSwitch =
-            allowEnums &&
-            (seltype.tsym.flags() & Flags.ENUM) != 0;
-        boolean stringSwitch = false;
-        if (types.isSameType(seltype, syms.stringType)) {
-            if (allowStringsInSwitch) {
-                stringSwitch = true;
-            } else {
-                log.error(tree.selector.pos(), "string.switch.not.supported.in.source", sourceName);
-            }
-        }
-        if (!enumSwitch && !stringSwitch)
-            seltype = chk.checkType(tree.selector.pos(), seltype, syms.intType);
+        try {
 
-        // Attribute all cases and
-        // check that there are no duplicate case labels or default clauses.
-        Set<Object> labels = new HashSet<Object>(); // The set of case labels.
-        boolean hasDefault = false;      // Is there a default label?
-        for (List<JCCase> l = tree.cases; l.nonEmpty(); l = l.tail) {
-            JCCase c = l.head;
-            Env<AttrContext> caseEnv =
-                switchEnv.dup(c, env.info.dup(switchEnv.info.scope.dup()));
-            if (c.pat != null) {
-                if (enumSwitch) {
-                    Symbol sym = enumConstant(c.pat, seltype);
-                    if (sym == null) {
-                        log.error(c.pat.pos(), "enum.label.must.be.unqualified.enum");
-                    } else if (!labels.add(sym)) {
-                        log.error(c.pos(), "duplicate.case.label");
-                    }
+            boolean enumSwitch =
+                allowEnums &&
+                (seltype.tsym.flags() & Flags.ENUM) != 0;
+            boolean stringSwitch = false;
+            if (types.isSameType(seltype, syms.stringType)) {
+                if (allowStringsInSwitch) {
+                    stringSwitch = true;
                 } else {
-                    Type pattype = attribExpr(c.pat, switchEnv, seltype);
-                    if (pattype.tag != ERROR) {
-                        if (pattype.constValue() == null) {
-                            log.error(c.pat.pos(),
-                                      (stringSwitch ? "string.const.req" : "const.expr.req"));
-                        } else if (labels.contains(pattype.constValue())) {
-                            log.error(c.pos(), "duplicate.case.label");
-                        } else {
-                            labels.add(pattype.constValue());
-                        }
-                    }
+                    log.error(tree.selector.pos(), "string.switch.not.supported.in.source", sourceName);
                 }
-            } else if (hasDefault) {
-                log.error(c.pos(), "duplicate.default.label");
-            } else {
-                hasDefault = true;
             }
-            attribStats(c.stats, caseEnv);
-            caseEnv.info.scope.leave();
-            addVars(c.stats, switchEnv.info.scope);
-        }
+            if (!enumSwitch && !stringSwitch)
+                seltype = chk.checkType(tree.selector.pos(), seltype, syms.intType);
 
-        switchEnv.info.scope.leave();
-        result = null;
+            // Attribute all cases and
+            // check that there are no duplicate case labels or default clauses.
+            Set<Object> labels = new HashSet<Object>(); // The set of case labels.
+            boolean hasDefault = false;      // Is there a default label?
+            for (List<JCCase> l = tree.cases; l.nonEmpty(); l = l.tail) {
+                JCCase c = l.head;
+                Env<AttrContext> caseEnv =
+                    switchEnv.dup(c, env.info.dup(switchEnv.info.scope.dup()));
+                try {
+                    if (c.pat != null) {
+                        if (enumSwitch) {
+                            Symbol sym = enumConstant(c.pat, seltype);
+                            if (sym == null) {
+                                log.error(c.pat.pos(), "enum.label.must.be.unqualified.enum");
+                            } else if (!labels.add(sym)) {
+                                log.error(c.pos(), "duplicate.case.label");
+                            }
+                        } else {
+                            Type pattype = attribExpr(c.pat, switchEnv, seltype);
+                            if (pattype.tag != ERROR) {
+                                if (pattype.constValue() == null) {
+                                    log.error(c.pat.pos(),
+                                              (stringSwitch ? "string.const.req" : "const.expr.req"));
+                                } else if (labels.contains(pattype.constValue())) {
+                                    log.error(c.pos(), "duplicate.case.label");
+                                } else {
+                                    labels.add(pattype.constValue());
+                                }
+                            }
+                        }
+                    } else if (hasDefault) {
+                        log.error(c.pos(), "duplicate.default.label");
+                    } else {
+                        hasDefault = true;
+                    }
+                    attribStats(c.stats, caseEnv);
+                } finally {
+                    caseEnv.info.scope.leave();
+                    addVars(c.stats, switchEnv.info.scope);
+                }
+            }
+
+            result = null;
+        }
+        finally {
+            switchEnv.info.scope.leave();
+        }
     }
     // where
         /** Add any variables defined in stats to the switch scope. */
@@ -1158,63 +1278,72 @@ public class Attr extends JCTree.Visitor {
     public void visitTry(JCTry tree) {
         // Create a new local environment with a local
         Env<AttrContext> localEnv = env.dup(tree, env.info.dup(env.info.scope.dup()));
-        boolean isTryWithResource = tree.resources.nonEmpty();
-        // Create a nested environment for attributing the try block if needed
-        Env<AttrContext> tryEnv = isTryWithResource ?
-            env.dup(tree, localEnv.info.dup(localEnv.info.scope.dup())) :
-            localEnv;
-        // Attribute resource declarations
-        for (JCTree resource : tree.resources) {
-            CheckContext twrContext = new Check.NestedCheckContext(resultInfo.checkContext) {
-                @Override
-                public void report(DiagnosticPosition pos, JCDiagnostic details) {
-                    chk.basicHandler.report(pos, diags.fragment("try.not.applicable.to.type", details));
+        try {
+            boolean isTryWithResource = tree.resources.nonEmpty();
+            // Create a nested environment for attributing the try block if needed
+            Env<AttrContext> tryEnv = isTryWithResource ?
+                env.dup(tree, localEnv.info.dup(localEnv.info.scope.dup())) :
+                localEnv;
+            try {
+                // Attribute resource declarations
+                for (JCTree resource : tree.resources) {
+                    CheckContext twrContext = new Check.NestedCheckContext(resultInfo.checkContext) {
+                        @Override
+                        public void report(DiagnosticPosition pos, JCDiagnostic details) {
+                            chk.basicHandler.report(pos, diags.fragment("try.not.applicable.to.type", details));
+                        }
+                    };
+                    ResultInfo twrResult = new ResultInfo(VAL, syms.autoCloseableType, twrContext);
+                    if (resource.hasTag(VARDEF)) {
+                        attribStat(resource, tryEnv);
+                        twrResult.check(resource, resource.type);
+
+                        //check that resource type cannot throw InterruptedException
+                        checkAutoCloseable(resource.pos(), localEnv, resource.type);
+
+                        VarSymbol var = (VarSymbol)TreeInfo.symbolFor(resource);
+                        var.setData(ElementKind.RESOURCE_VARIABLE);
+                    } else {
+                        attribTree(resource, tryEnv, twrResult);
+                    }
                 }
-            };
-            ResultInfo twrResult = new ResultInfo(VAL, syms.autoCloseableType, twrContext);
-            if (resource.hasTag(VARDEF)) {
-                attribStat(resource, tryEnv);
-                twrResult.check(resource, resource.type);
-
-                //check that resource type cannot throw InterruptedException
-                checkAutoCloseable(resource.pos(), localEnv, resource.type);
-
-                VarSymbol var = (VarSymbol)TreeInfo.symbolFor(resource);
-                var.setData(ElementKind.RESOURCE_VARIABLE);
-            } else {
-                attribTree(resource, tryEnv, twrResult);
+                // Attribute body
+                attribStat(tree.body, tryEnv);
+            } finally {
+                if (isTryWithResource)
+                    tryEnv.info.scope.leave();
             }
+
+            // Attribute catch clauses
+            for (List<JCCatch> l = tree.catchers; l.nonEmpty(); l = l.tail) {
+                JCCatch c = l.head;
+                Env<AttrContext> catchEnv =
+                    localEnv.dup(c, localEnv.info.dup(localEnv.info.scope.dup()));
+                try {
+                    Type ctype = attribStat(c.param, catchEnv);
+                    if (TreeInfo.isMultiCatch(c)) {
+                        //multi-catch parameter is implicitly marked as final
+                        c.param.sym.flags_field |= FINAL | UNION;
+                    }
+                    if (c.param.sym.kind == Kinds.VAR) {
+                        c.param.sym.setData(ElementKind.EXCEPTION_PARAMETER);
+                    }
+                    chk.checkType(c.param.vartype.pos(),
+                                  chk.checkClassType(c.param.vartype.pos(), ctype),
+                                  syms.throwableType);
+                    attribStat(c.body, catchEnv);
+                } finally {
+                    catchEnv.info.scope.leave();
+                }
+            }
+
+            // Attribute finalizer
+            if (tree.finalizer != null) attribStat(tree.finalizer, localEnv);
+            result = null;
         }
-        // Attribute body
-        attribStat(tree.body, tryEnv);
-        if (isTryWithResource)
-            tryEnv.info.scope.leave();
-
-        // Attribute catch clauses
-        for (List<JCCatch> l = tree.catchers; l.nonEmpty(); l = l.tail) {
-            JCCatch c = l.head;
-            Env<AttrContext> catchEnv =
-                localEnv.dup(c, localEnv.info.dup(localEnv.info.scope.dup()));
-            Type ctype = attribStat(c.param, catchEnv);
-            if (TreeInfo.isMultiCatch(c)) {
-                //multi-catch parameter is implicitly marked as final
-                c.param.sym.flags_field |= FINAL | UNION;
-            }
-            if (c.param.sym.kind == Kinds.VAR) {
-                c.param.sym.setData(ElementKind.EXCEPTION_PARAMETER);
-            }
-            chk.checkType(c.param.vartype.pos(),
-                          chk.checkClassType(c.param.vartype.pos(), ctype),
-                          syms.throwableType);
-            attribStat(c.body, catchEnv);
-            catchEnv.info.scope.leave();
+        finally {
+            localEnv.info.scope.leave();
         }
-
-        // Attribute finalizer
-        if (tree.finalizer != null) attribStat(tree.finalizer, localEnv);
-
-        localEnv.info.scope.leave();
-        result = null;
     }
 
     void checkAutoCloseable(DiagnosticPosition pos, Env<AttrContext> env, Type resource) {
@@ -1222,10 +1351,10 @@ public class Attr extends JCTree.Visitor {
             types.asSuper(resource, syms.autoCloseableType.tsym) != null &&
             !types.isSameType(resource, syms.autoCloseableType)) { // Don't emit warning for AutoCloseable itself
             Symbol close = syms.noSymbol;
-            boolean prevDeferDiags = log.deferDiagnostics;
+            Filter<JCDiagnostic> prevDeferDiagsFilter = log.deferredDiagFilter;
             Queue<JCDiagnostic> prevDeferredDiags = log.deferredDiagnostics;
             try {
-                log.deferDiagnostics = true;
+                log.deferAll();
                 log.deferredDiagnostics = ListBuffer.lb();
                 close = rs.resolveQualifiedMethod(pos,
                         env,
@@ -1235,7 +1364,7 @@ public class Attr extends JCTree.Visitor {
                         List.<Type>nil());
             }
             finally {
-                log.deferDiagnostics = prevDeferDiags;
+                log.deferredDiagFilter = prevDeferDiagsFilter;
                 log.deferredDiagnostics = prevDeferredDiags;
             }
             if (close.kind == MTH &&
@@ -1248,50 +1377,71 @@ public class Attr extends JCTree.Visitor {
     }
 
     public void visitConditional(JCConditional tree) {
-        attribExpr(tree.cond, env, syms.booleanType);
-        attribExpr(tree.truepart, env);
-        attribExpr(tree.falsepart, env);
-        result = check(tree,
-                       capture(condType(tree.pos(), tree.cond.type,
-                                        tree.truepart.type, tree.falsepart.type)),
-                       VAL, resultInfo);
+        Type condtype = attribExpr(tree.cond, env, syms.booleanType);
+
+        boolean standaloneConditional = !allowPoly ||
+                pt().tag == NONE && pt() != Type.recoveryType ||
+                isBooleanOrNumeric(env, tree);
+
+        if (!standaloneConditional && resultInfo.pt.tag == VOID) {
+            //cannot get here (i.e. it means we are returning from void method - which is already an error)
+            result = tree.type = types.createErrorType(resultInfo.pt);
+            return;
+        }
+
+        ResultInfo condInfo = standaloneConditional ?
+                unknownExprInfo :
+                new ResultInfo(VAL, pt(), new Check.NestedCheckContext(resultInfo.checkContext) {
+                    //this will use enclosing check context to check compatibility of
+                    //subexpression against target type; if we are in a method check context,
+                    //depending on whether boxing is allowed, we could have incompatibilities
+                    @Override
+                    public void report(DiagnosticPosition pos, JCDiagnostic details) {
+                        enclosingContext.report(pos, diags.fragment("incompatible.type.in.conditional", details));
+                    }
+                });
+
+        Type truetype = attribTree(tree.truepart, env, condInfo);
+        Type falsetype = attribTree(tree.falsepart, env, condInfo);
+
+        Type owntype = standaloneConditional ? condType(tree, truetype, falsetype) : pt();
+        if (condtype.constValue() != null &&
+                truetype.constValue() != null &&
+                falsetype.constValue() != null) {
+            //constant folding
+            owntype = cfolder.coerce(condtype.isTrue() ? truetype : falsetype, owntype);
+        }
+        result = check(tree, owntype, VAL, resultInfo);
     }
     //where
-        /** Compute the type of a conditional expression, after
-         *  checking that it exists. See Spec 15.25.
-         *
-         *  @param pos      The source position to be used for
-         *                  error diagnostics.
-         *  @param condtype The type of the expression's condition.
-         *  @param thentype The type of the expression's then-part.
-         *  @param elsetype The type of the expression's else-part.
-         */
-        private Type condType(DiagnosticPosition pos,
-                              Type condtype,
-                              Type thentype,
-                              Type elsetype) {
-            Type ctype = condType1(pos, condtype, thentype, elsetype);
-
-            // If condition and both arms are numeric constants,
-            // evaluate at compile-time.
-            return ((condtype.constValue() != null) &&
-                    (thentype.constValue() != null) &&
-                    (elsetype.constValue() != null))
-                ? cfolder.coerce(condtype.isTrue()?thentype:elsetype, ctype)
-                : ctype;
+        @SuppressWarnings("fallthrough")
+        private boolean isBooleanOrNumeric(Env<AttrContext> env, JCExpression tree) {
+            switch (tree.getTag()) {
+                case LITERAL: return ((JCLiteral)tree).typetag < CLASS;
+                case LAMBDA: case REFERENCE: return false;
+                case PARENS: return isBooleanOrNumeric(env, ((JCParens)tree).expr);
+                case CONDEXPR:
+                    JCConditional condTree = (JCConditional)tree;
+                    return isBooleanOrNumeric(env, condTree.truepart) &&
+                            isBooleanOrNumeric(env, condTree.falsepart);
+                default:
+                    Type speculativeType = deferredAttr.attribSpeculative(tree, env, unknownExprInfo).type;
+                    speculativeType = types.unboxedTypeOrType(speculativeType);
+                    return speculativeType.tag <= BOOLEAN;
+            }
         }
+
         /** Compute the type of a conditional expression, after
-         *  checking that it exists.  Does not take into
+         *  checking that it exists.  See JLS 15.25. Does not take into
          *  account the special case where condition and both arms
          *  are constants.
          *
          *  @param pos      The source position to be used for error
          *                  diagnostics.
-         *  @param condtype The type of the expression's condition.
          *  @param thentype The type of the expression's then-part.
          *  @param elsetype The type of the expression's else-part.
          */
-        private Type condType1(DiagnosticPosition pos, Type condtype,
+        private Type condType(DiagnosticPosition pos,
                                Type thentype, Type elsetype) {
             // If same type, that is the result
             if (types.isSameType(thentype, elsetype))
@@ -1399,37 +1549,38 @@ public class Attr extends JCTree.Visitor {
             LOOP:
             while (env1 != null) {
                 switch (env1.tree.getTag()) {
-                case LABELLED:
-                    JCLabeledStatement labelled = (JCLabeledStatement)env1.tree;
-                    if (label == labelled.label) {
-                        // If jump is a continue, check that target is a loop.
-                        if (tag == CONTINUE) {
-                            if (!labelled.body.hasTag(DOLOOP) &&
-                                !labelled.body.hasTag(WHILELOOP) &&
-                                !labelled.body.hasTag(FORLOOP) &&
-                                !labelled.body.hasTag(FOREACHLOOP))
-                                log.error(pos, "not.loop.label", label);
-                            // Found labelled statement target, now go inwards
-                            // to next non-labelled tree.
-                            return TreeInfo.referencedStatement(labelled);
-                        } else {
-                            return labelled;
+                    case LABELLED:
+                        JCLabeledStatement labelled = (JCLabeledStatement)env1.tree;
+                        if (label == labelled.label) {
+                            // If jump is a continue, check that target is a loop.
+                            if (tag == CONTINUE) {
+                                if (!labelled.body.hasTag(DOLOOP) &&
+                                        !labelled.body.hasTag(WHILELOOP) &&
+                                        !labelled.body.hasTag(FORLOOP) &&
+                                        !labelled.body.hasTag(FOREACHLOOP))
+                                    log.error(pos, "not.loop.label", label);
+                                // Found labelled statement target, now go inwards
+                                // to next non-labelled tree.
+                                return TreeInfo.referencedStatement(labelled);
+                            } else {
+                                return labelled;
+                            }
                         }
-                    }
-                    break;
-                case DOLOOP:
-                case WHILELOOP:
-                case FORLOOP:
-                case FOREACHLOOP:
-                    if (label == null) return env1.tree;
-                    break;
-                case SWITCH:
-                    if (label == null && tag == BREAK) return env1.tree;
-                    break;
-                case METHODDEF:
-                case CLASSDEF:
-                    break LOOP;
-                default:
+                        break;
+                    case DOLOOP:
+                    case WHILELOOP:
+                    case FORLOOP:
+                    case FOREACHLOOP:
+                        if (label == null) return env1.tree;
+                        break;
+                    case SWITCH:
+                        if (label == null && tag == BREAK) return env1.tree;
+                        break;
+                    case LAMBDA:
+                    case METHODDEF:
+                    case CLASSDEF:
+                        break LOOP;
+                    default:
                 }
                 env1 = env1.next;
             }
@@ -1445,22 +1596,19 @@ public class Attr extends JCTree.Visitor {
     public void visitReturn(JCReturn tree) {
         // Check that there is an enclosing method which is
         // nested within than the enclosing class.
-        if (env.enclMethod == null ||
-            env.enclMethod.sym.owner != env.enclClass.sym) {
+        if (env.info.returnResult == null) {
             log.error(tree.pos(), "ret.outside.meth");
-
         } else {
             // Attribute return expression, if it exists, and check that
             // it conforms to result type of enclosing method.
-            Symbol m = env.enclMethod.sym;
-            if (m.type.getReturnType().tag == VOID) {
-                if (tree.expr != null)
+            if (tree.expr != null) {
+                if (env.info.returnResult.pt.tag == VOID) {
                     log.error(tree.expr.pos(),
                               "cant.ret.val.from.meth.decl.void");
-            } else if (tree.expr == null) {
+                }
+                attribTree(tree.expr, env, env.info.returnResult);
+            } else if (env.info.returnResult.pt.tag != VOID) {
                 log.error(tree.pos(), "missing.ret.val");
-            } else {
-                attribExpr(tree.expr, env, m.type.getReturnType());
             }
         }
         result = null;
@@ -1562,7 +1710,7 @@ public class Attr extends JCTree.Visitor {
                     // current instance (JLS ???).
                     boolean selectSuperPrev = localEnv.info.selectSuper;
                     localEnv.info.selectSuper = true;
-                    localEnv.info.varArgs = false;
+                    localEnv.info.pendingResolutionPhase = null;
                     Symbol sym = rs.resolveConstructor(
                         tree.meth.pos(), localEnv, site, argtypes, typeargtypes);
                     localEnv.info.selectSuper = selectSuperPrev;
@@ -1573,8 +1721,7 @@ public class Attr extends JCTree.Visitor {
                     // ...and check that it is legal in the current context.
                     // (this will also set the tree's type)
                     Type mpt = newMethodTemplate(resultInfo.pt, argtypes, typeargtypes);
-                    checkId(tree.meth, site, sym, localEnv, new ResultInfo(MTH, mpt),
-                            tree.varargsElement != null);
+                    checkId(tree.meth, site, sym, localEnv, new ResultInfo(MTH, mpt));
                 }
                 // Otherwise, `site' is an error type and we do nothing
             }
@@ -1589,35 +1736,18 @@ public class Attr extends JCTree.Visitor {
             // whose formal argument types is exactly the list of actual
             // arguments (this will also set the method symbol).
             Type mpt = newMethodTemplate(resultInfo.pt, argtypes, typeargtypes);
-            localEnv.info.varArgs = false;
-            Type mtype = attribExpr(tree.meth, localEnv, mpt);
+            localEnv.info.pendingResolutionPhase = null;
+            Type mtype = attribTree(tree.meth, localEnv, new ResultInfo(VAL, mpt, resultInfo.checkContext));
 
             // Compute the result type.
             Type restype = mtype.getReturnType();
             if (restype.tag == WILDCARD)
                 throw new AssertionError(mtype);
 
-            // as a special case, array.clone() has a result that is
-            // the same as static type of the array being cloned
-            if (tree.meth.hasTag(SELECT) &&
-                allowCovariantReturns &&
-                methName == names.clone &&
-                types.isArray(((JCFieldAccess) tree.meth).selected.type))
-                restype = ((JCFieldAccess) tree.meth).selected.type;
-
-            // as a special case, x.getClass() has type Class<? extends |X|>
-            if (allowGenerics &&
-                methName == names.getClass && tree.args.isEmpty()) {
-                Type qualifier = (tree.meth.hasTag(SELECT))
+            Type qualifier = (tree.meth.hasTag(SELECT))
                     ? ((JCFieldAccess) tree.meth).selected.type
                     : env.enclClass.sym.type;
-                restype = new
-                    ClassType(restype.getEnclosingType(),
-                              List.<Type>of(new WildcardType(types.erasure(qualifier),
-                                                               BoundKind.EXTENDS,
-                                                               syms.boundClass)),
-                              restype.tsym);
-            }
+            restype = adjustMethodReturnType(qualifier, methName, argtypes, restype);
 
             chk.checkRefTypes(tree.typeargs, typeargtypes);
 
@@ -1625,12 +1755,33 @@ public class Attr extends JCTree.Visitor {
             // current context.  Also, capture the return type
             result = check(tree, capture(restype), VAL, resultInfo);
 
-            if (localEnv.info.varArgs)
+            if (localEnv.info.lastResolveVarargs())
                 Assert.check(result.isErroneous() || tree.varargsElement != null);
         }
         chk.validate(tree.typeargs, localEnv);
     }
     //where
+        Type adjustMethodReturnType(Type qualifierType, Name methodName, List<Type> argtypes, Type restype) {
+            if (allowCovariantReturns &&
+                    methodName == names.clone &&
+                types.isArray(qualifierType)) {
+                // as a special case, array.clone() has a result that is
+                // the same as static type of the array being cloned
+                return qualifierType;
+            } else if (allowGenerics &&
+                    methodName == names.getClass &&
+                    argtypes.isEmpty()) {
+                // as a special case, x.getClass() has type Class<? extends |X|>
+                return new ClassType(restype.getEnclosingType(),
+                              List.<Type>of(new WildcardType(types.erasure(qualifierType),
+                                                               BoundKind.EXTENDS,
+                                                               syms.boundClass)),
+                              restype.tsym);
+            } else {
+                return restype;
+            }
+        }
+
         /** Check that given application node appears as first statement
          *  in a constructor call.
          *  @param tree   The application node
@@ -1652,11 +1803,11 @@ public class Attr extends JCTree.Visitor {
         /** Obtain a method type with given argument types.
          */
         Type newMethodTemplate(Type restype, List<Type> argtypes, List<Type> typeargtypes) {
-            MethodType mt = new MethodType(argtypes, restype, null, syms.methodClass);
+            MethodType mt = new MethodType(argtypes, restype, List.<Type>nil(), syms.methodClass);
             return (typeargtypes == null) ? mt : (Type)new ForAll(typeargtypes, mt);
         }
 
-    public void visitNewClass(JCNewClass tree) {
+    public void visitNewClass(final JCNewClass tree) {
         Type owntype = types.createErrorType(tree.type);
 
         // The local environment of a class creation is
@@ -1729,42 +1880,6 @@ public class Attr extends JCTree.Visitor {
         List<Type> argtypes = attribArgs(tree.args, localEnv);
         List<Type> typeargtypes = attribTypes(tree.typeargs, localEnv);
 
-        if (TreeInfo.isDiamond(tree) && !clazztype.isErroneous()) {
-            clazztype = attribDiamond(localEnv, tree, clazztype, argtypes, typeargtypes);
-            clazz.type = clazztype;
-        } else if (allowDiamondFinder &&
-                tree.def == null &&
-                !clazztype.isErroneous() &&
-                clazztype.getTypeArguments().nonEmpty() &&
-                findDiamonds) {
-            boolean prevDeferDiags = log.deferDiagnostics;
-            Queue<JCDiagnostic> prevDeferredDiags = log.deferredDiagnostics;
-            Type inferred = null;
-            try {
-                //disable diamond-related diagnostics
-                log.deferDiagnostics = true;
-                log.deferredDiagnostics = ListBuffer.lb();
-                inferred = attribDiamond(localEnv,
-                        tree,
-                        clazztype,
-                        argtypes,
-                        typeargtypes);
-            }
-            finally {
-                log.deferDiagnostics = prevDeferDiags;
-                log.deferredDiagnostics = prevDeferredDiags;
-            }
-            if (inferred != null &&
-                    !inferred.isErroneous() &&
-                    inferred.tag == CLASS &&
-                    types.isAssignable(inferred, pt().tag == NONE ? clazztype : pt(), Warner.noWarnings)) {
-                String key = types.isSameType(clazztype, inferred) ?
-                    "diamond.redundant.args" :
-                    "diamond.redundant.args.1";
-                log.warning(tree.clazz.pos(), key, clazztype, inferred);
-            }
-        }
-
         // If we have made no mistakes in the class type...
         if (clazztype.tag == CLASS) {
             // Enums may not be instantiated except implicitly
@@ -1791,6 +1906,45 @@ public class Attr extends JCTree.Visitor {
                 // Error recovery: pretend no arguments were supplied.
                 argtypes = List.nil();
                 typeargtypes = List.nil();
+            } else if (TreeInfo.isDiamond(tree)) {
+                ClassType site = new ClassType(clazztype.getEnclosingType(),
+                            clazztype.tsym.type.getTypeArguments(),
+                            clazztype.tsym);
+
+                Env<AttrContext> diamondEnv = localEnv.dup(tree);
+                diamondEnv.info.selectSuper = cdef != null;
+                diamondEnv.info.pendingResolutionPhase = null;
+
+                //if the type of the instance creation expression is a class type
+                //apply method resolution inference (JLS 15.12.2.7). The return type
+                //of the resolved constructor will be a partially instantiated type
+                Symbol constructor = rs.resolveDiamond(tree.pos(),
+                            diamondEnv,
+                            site,
+                            argtypes,
+                            typeargtypes);
+                tree.constructor = constructor.baseSymbol();
+
+                final TypeSymbol csym = clazztype.tsym;
+                ResultInfo diamondResult = new ResultInfo(MTH, newMethodTemplate(resultInfo.pt, argtypes, typeargtypes), new Check.NestedCheckContext(resultInfo.checkContext) {
+                    @Override
+                    public void report(DiagnosticPosition _unused, JCDiagnostic details) {
+                        enclosingContext.report(tree.clazz,
+                                diags.fragment("cant.apply.diamond.1", diags.fragment("diamond", csym), details));
+                    }
+                });
+                Type constructorType = tree.constructorType = types.createErrorType(clazztype);
+                constructorType = checkId(tree, site,
+                        constructor,
+                        diamondEnv,
+                        diamondResult);
+
+                tree.clazz.type = types.createErrorType(clazztype);
+                if (!constructorType.isErroneous()) {
+                    tree.clazz.type = clazztype = constructorType.getReturnType();
+                    tree.constructorType = types.createMethodTypeWithReturn(constructorType, syms.voidType);
+                }
+                clazztype = chk.checkClassType(tree.clazz, tree.clazz.type, true);
             }
 
             // Resolve the called constructor under the assumption
@@ -1802,20 +1956,19 @@ public class Attr extends JCTree.Visitor {
                 //order to avoid downstream failures
                 Env<AttrContext> rsEnv = localEnv.dup(tree);
                 rsEnv.info.selectSuper = cdef != null;
-                rsEnv.info.varArgs = false;
+                rsEnv.info.pendingResolutionPhase = null;
                 tree.constructor = rs.resolveConstructor(
                     tree.pos(), rsEnv, clazztype, argtypes, typeargtypes);
-                tree.constructorType = tree.constructor.type.isErroneous() ?
-                    syms.errType :
-                    checkConstructor(clazztype,
-                        tree.constructor,
-                        rsEnv,
-                        tree.args,
-                        argtypes,
-                        typeargtypes,
-                        rsEnv.info.varArgs);
-                if (rsEnv.info.varArgs)
-                    Assert.check(tree.constructorType.isErroneous() || tree.varargsElement != null);
+                if (cdef == null) { //do not check twice!
+                    tree.constructorType = checkId(tree,
+                            clazztype,
+                            tree.constructor,
+                            rsEnv,
+                            new ResultInfo(MTH, newMethodTemplate(syms.voidType, argtypes, typeargtypes)));
+                    if (rsEnv.info.lastResolveVarargs())
+                        Assert.check(tree.constructorType.isErroneous() || tree.varargsElement != null);
+                }
+                findDiamondIfNeeded(localEnv, tree, clazztype);
             }
 
             if (cdef != null) {
@@ -1861,6 +2014,8 @@ public class Attr extends JCTree.Visitor {
 
                 attribStat(cdef, localEnv);
 
+                checkLambdaCandidate(tree, cdef.sym, clazztype);
+
                 // If an outer instance is given,
                 // prefix it to the constructor arguments
                 // and delete it from the new expression
@@ -1872,24 +2027,15 @@ public class Attr extends JCTree.Visitor {
 
                 // Reassign clazztype and recompute constructor.
                 clazztype = cdef.sym.type;
-                boolean useVarargs = tree.varargsElement != null;
-                Symbol sym = rs.resolveConstructor(
-                    tree.pos(), localEnv, clazztype, argtypes,
-                    typeargtypes, true, useVarargs);
-                Assert.check(sym.kind < AMBIGUOUS || tree.constructor.type.isErroneous());
+                Symbol sym = tree.constructor = rs.resolveConstructor(
+                    tree.pos(), localEnv, clazztype, argtypes, typeargtypes);
+                Assert.check(sym.kind < AMBIGUOUS);
                 tree.constructor = sym;
-                if (tree.constructor.kind > ERRONEOUS) {
-                    tree.constructorType =  syms.errType;
-                }
-                else {
-                    tree.constructorType = checkConstructor(clazztype,
-                            tree.constructor,
-                            localEnv,
-                            tree.args,
-                            argtypes,
-                            typeargtypes,
-                            useVarargs);
-                }
+                tree.constructorType = checkId(tree,
+                    clazztype,
+                    tree.constructor,
+                    localEnv,
+                    new ResultInfo(VAL, newMethodTemplate(syms.voidType, argtypes, typeargtypes)));
             }
 
             if (tree.constructor != null && tree.constructor.kind == MTH)
@@ -1898,57 +2044,58 @@ public class Attr extends JCTree.Visitor {
         result = check(tree, owntype, VAL, resultInfo);
         chk.validate(tree.typeargs, localEnv);
     }
-
-    Type attribDiamond(Env<AttrContext> env,
-                        final JCNewClass tree,
-                        final Type clazztype,
-                        List<Type> argtypes,
-                        List<Type> typeargtypes) {
-        if (clazztype.isErroneous() ||
-                clazztype.isInterface()) {
-            //if the type of the instance creation expression is erroneous,
-            //or if it's an interface, or if something prevented us to form a valid
-            //mapping, return the (possibly erroneous) type unchanged
-            return clazztype;
-        }
-
-        //dup attribution environment and augment the set of inference variables
-        Env<AttrContext> localEnv = env.dup(tree);
-
-        ClassType site = new ClassType(clazztype.getEnclosingType(),
-                    clazztype.tsym.type.getTypeArguments(),
-                    clazztype.tsym);
-
-        //if the type of the instance creation expression is a class type
-        //apply method resolution inference (JLS 15.12.2.7). The return type
-        //of the resolved constructor will be a partially instantiated type
-        Symbol constructor = rs.resolveDiamond(tree.pos(),
-                    localEnv,
-                    site,
-                    argtypes,
-                    typeargtypes);
-
-        Type owntype = types.createErrorType(clazztype);
-        if (constructor.kind == MTH) {
-            ResultInfo diamondResult = new ResultInfo(VAL, resultInfo.pt, new Check.NestedCheckContext(resultInfo.checkContext) {
-                @Override
-                public void report(DiagnosticPosition pos, JCDiagnostic details) {
-                    enclosingContext.report(tree.clazz.pos(),
-                            diags.fragment("cant.apply.diamond.1", diags.fragment("diamond", clazztype.tsym), details));
+    //where
+        void findDiamondIfNeeded(Env<AttrContext> env, JCNewClass tree, Type clazztype) {
+            if (tree.def == null &&
+                    !clazztype.isErroneous() &&
+                    clazztype.getTypeArguments().nonEmpty() &&
+                    findDiamonds) {
+                JCTypeApply ta = (JCTypeApply)tree.clazz;
+                List<JCExpression> prevTypeargs = ta.arguments;
+                try {
+                    //create a 'fake' diamond AST node by removing type-argument trees
+                    ta.arguments = List.nil();
+                    ResultInfo findDiamondResult = new ResultInfo(VAL,
+                            resultInfo.checkContext.inferenceContext().free(resultInfo.pt) ? Type.noType : pt());
+                    Type inferred = deferredAttr.attribSpeculative(tree, env, findDiamondResult).type;
+                    if (!inferred.isErroneous() &&
+                        types.isAssignable(inferred, pt().tag == NONE ? syms.objectType : pt(), Warner.noWarnings)) {
+                        String key = types.isSameType(clazztype, inferred) ?
+                            "diamond.redundant.args" :
+                            "diamond.redundant.args.1";
+                        log.warning(tree.clazz.pos(), key, clazztype, inferred);
+                    }
+                } finally {
+                    ta.arguments = prevTypeargs;
                 }
-            });
-            owntype = checkMethod(site,
-                    constructor,
-                    diamondResult,
-                    localEnv,
-                    tree.args,
-                    argtypes,
-                    typeargtypes,
-                    localEnv.info.varArgs).getReturnType();
+            }
         }
 
-        return chk.checkClassType(tree.clazz.pos(), owntype, true);
-    }
+            private void checkLambdaCandidate(JCNewClass tree, ClassSymbol csym, Type clazztype) {
+                if (allowLambda &&
+                        identifyLambdaCandidate &&
+                        clazztype.tag == CLASS &&
+                        pt().tag != NONE &&
+                        types.isFunctionalInterface(clazztype.tsym)) {
+                    Symbol descriptor = types.findDescriptorSymbol(clazztype.tsym);
+                    int count = 0;
+                    boolean found = false;
+                    for (Symbol sym : csym.members().getElements()) {
+                        if ((sym.flags() & SYNTHETIC) != 0 ||
+                                sym.isConstructor()) continue;
+                        count++;
+                        if (sym.kind != MTH ||
+                                !sym.name.equals(descriptor.name)) continue;
+                        Type mtype = types.memberType(clazztype, sym);
+                        if (types.overrideEquivalent(mtype, types.memberType(clazztype, descriptor))) {
+                            found = true;
+                        }
+                    }
+                    if (found && count == 1) {
+                        log.note(tree.def, "potential.lambda.found");
+                    }
+                }
+            }
 
     /** Make an attributed null check tree.
      */
@@ -1966,13 +2113,14 @@ public class Attr extends JCTree.Visitor {
 
     public void visitNewArray(JCNewArray tree) {
         Type owntype = types.createErrorType(tree.type);
+        Env<AttrContext> localEnv = env.dup(tree);
         Type elemtype;
         if (tree.elemtype != null) {
-            elemtype = attribType(tree.elemtype, env);
-            chk.validate(tree.elemtype, env);
+            elemtype = attribType(tree.elemtype, localEnv);
+            chk.validate(tree.elemtype, localEnv);
             owntype = elemtype;
             for (List<JCExpression> l = tree.dims; l.nonEmpty(); l = l.tail) {
-                attribExpr(l.head, env, syms.intType);
+                attribExpr(l.head, localEnv, syms.intType);
                 owntype = new ArrayType(owntype, syms.arrayClass);
             }
         } else {
@@ -1989,7 +2137,7 @@ public class Attr extends JCTree.Visitor {
             }
         }
         if (tree.elems != null) {
-            attribExprs(tree.elems, env, elemtype);
+            attribExprs(tree.elems, localEnv, elemtype);
             owntype = new ArrayType(elemtype, syms.arrayClass);
         }
         if (!types.isReifiable(elemtype))
@@ -1997,14 +2145,394 @@ public class Attr extends JCTree.Visitor {
         result = check(tree, owntype, VAL, resultInfo);
     }
 
+    /*
+     * A lambda expression can only be attributed when a target-type is available.
+     * In addition, if the target-type is that of a functional interface whose
+     * descriptor contains inference variables in argument position the lambda expression
+     * is 'stuck' (see DeferredAttr).
+     */
     @Override
-    public void visitLambda(JCLambda that) {
-        throw new UnsupportedOperationException("Lambda expression not supported yet");
+    public void visitLambda(final JCLambda that) {
+        if (pt().isErroneous() || (pt().tag == NONE && pt() != Type.recoveryType)) {
+            if (pt().tag == NONE) {
+                //lambda only allowed in assignment or method invocation/cast context
+                log.error(that.pos(), "unexpected.lambda");
+            }
+            result = that.type = types.createErrorType(pt());
+            return;
+        }
+        //create an environment for attribution of the lambda expression
+        final Env<AttrContext> localEnv = lambdaEnv(that, env);
+        boolean needsRecovery = resultInfo.checkContext.deferredAttrContext() == deferredAttr.emptyDeferredAttrContext ||
+                resultInfo.checkContext.deferredAttrContext().mode == DeferredAttr.AttrMode.CHECK;
+        try {
+            List<Type> explicitParamTypes = null;
+            if (TreeInfo.isExplicitLambda(that)) {
+                //attribute lambda parameters
+                attribStats(that.params, localEnv);
+                explicitParamTypes = TreeInfo.types(that.params);
+            }
+
+            Type target = infer.instantiateFunctionalInterface(that, pt(), explicitParamTypes, resultInfo.checkContext);
+            Type lambdaType = (target == Type.recoveryType) ?
+                    fallbackDescriptorType(that) :
+                    types.findDescriptorType(target);
+
+            if (!TreeInfo.isExplicitLambda(that)) {
+                //add param type info in the AST
+                List<Type> actuals = lambdaType.getParameterTypes();
+                List<JCVariableDecl> params = that.params;
+
+                boolean arityMismatch = false;
+
+                while (params.nonEmpty()) {
+                    if (actuals.isEmpty()) {
+                        //not enough actuals to perform lambda parameter inference
+                        arityMismatch = true;
+                    }
+                    //reset previously set info
+                    Type argType = arityMismatch ?
+                            syms.errType :
+                            actuals.head;
+                    params.head.vartype = make.Type(argType);
+                    params.head.sym = null;
+                    actuals = actuals.isEmpty() ?
+                            actuals :
+                            actuals.tail;
+                    params = params.tail;
+                }
+
+                //attribute lambda parameters
+                attribStats(that.params, localEnv);
+
+                if (arityMismatch) {
+                    resultInfo.checkContext.report(that, diags.fragment("incompatible.arg.types.in.lambda"));
+                        result = that.type = types.createErrorType(target);
+                        return;
+                }
+            }
+
+            //from this point on, no recovery is needed; if we are in assignment context
+            //we will be able to attribute the whole lambda body, regardless of errors;
+            //if we are in a 'check' method context, and the lambda is not compatible
+            //with the target-type, it will be recovered anyway in Attr.checkId
+            needsRecovery = false;
+
+            ResultInfo bodyResultInfo = lambdaType.getReturnType() == Type.recoveryType ?
+                recoveryInfo :
+                new ResultInfo(VAL, lambdaType.getReturnType(), new LambdaReturnContext(resultInfo.checkContext));
+            localEnv.info.returnResult = bodyResultInfo;
+
+            if (that.getBodyKind() == JCLambda.BodyKind.EXPRESSION) {
+                attribTree(that.getBody(), localEnv, bodyResultInfo);
+            } else {
+                JCBlock body = (JCBlock)that.body;
+                attribStats(body.stats, localEnv);
+            }
+
+            result = check(that, target, VAL, resultInfo);
+
+            boolean isSpeculativeRound =
+                    resultInfo.checkContext.deferredAttrContext().mode == DeferredAttr.AttrMode.SPECULATIVE;
+
+            postAttr(that);
+            flow.analyzeLambda(env, that, make, isSpeculativeRound);
+
+            checkLambdaCompatible(that, lambdaType, resultInfo.checkContext, isSpeculativeRound);
+
+            if (!isSpeculativeRound) {
+                checkAccessibleFunctionalDescriptor(that, localEnv, resultInfo.checkContext.inferenceContext(), lambdaType);
+            }
+            result = check(that, target, VAL, resultInfo);
+        } catch (Types.FunctionDescriptorLookupError ex) {
+            JCDiagnostic cause = ex.getDiagnostic();
+            resultInfo.checkContext.report(that, cause);
+            result = that.type = types.createErrorType(pt());
+            return;
+        } finally {
+            localEnv.info.scope.leave();
+            if (needsRecovery) {
+                attribTree(that, env, recoveryInfo);
+            }
+        }
     }
+    //where
+        private Type fallbackDescriptorType(JCExpression tree) {
+            switch (tree.getTag()) {
+                case LAMBDA:
+                    JCLambda lambda = (JCLambda)tree;
+                    List<Type> argtypes = List.nil();
+                    for (JCVariableDecl param : lambda.params) {
+                        argtypes = param.vartype != null ?
+                                argtypes.append(param.vartype.type) :
+                                argtypes.append(syms.errType);
+                    }
+                    return new MethodType(argtypes, Type.recoveryType, List.<Type>nil(), syms.methodClass);
+                case REFERENCE:
+                    return new MethodType(List.<Type>nil(), Type.recoveryType, List.<Type>nil(), syms.methodClass);
+                default:
+                    Assert.error("Cannot get here!");
+            }
+            return null;
+        }
+
+        private void checkAccessibleFunctionalDescriptor(final DiagnosticPosition pos,
+                final Env<AttrContext> env, final InferenceContext inferenceContext, final Type desc) {
+            if (inferenceContext.free(desc)) {
+                inferenceContext.addFreeTypeListener(List.of(desc), new FreeTypeListener() {
+                    @Override
+                    public void typesInferred(InferenceContext inferenceContext) {
+                        checkAccessibleFunctionalDescriptor(pos, env, inferenceContext, inferenceContext.asInstType(desc, types));
+                    }
+                });
+            } else {
+                chk.checkAccessibleFunctionalDescriptor(pos, env, desc);
+            }
+        }
+
+        /**
+         * Lambda/method reference have a special check context that ensures
+         * that i.e. a lambda return type is compatible with the expected
+         * type according to both the inherited context and the assignment
+         * context.
+         */
+        class LambdaReturnContext extends Check.NestedCheckContext {
+            public LambdaReturnContext(CheckContext enclosingContext) {
+                super(enclosingContext);
+            }
+
+            @Override
+            public boolean compatible(Type found, Type req, Warner warn) {
+                //return type must be compatible in both current context and assignment context
+                return types.isAssignable(found, inferenceContext().asFree(req, types), warn) &&
+                        super.compatible(found, req, warn);
+            }
+            @Override
+            public void report(DiagnosticPosition pos, JCDiagnostic details) {
+                enclosingContext.report(pos, diags.fragment("incompatible.ret.type.in.lambda", details));
+            }
+        }
+
+        /**
+        * Lambda compatibility. Check that given return types, thrown types, parameter types
+        * are compatible with the expected functional interface descriptor. This means that:
+        * (i) parameter types must be identical to those of the target descriptor; (ii) return
+        * types must be compatible with the return type of the expected descriptor;
+        * (iii) thrown types must be 'included' in the thrown types list of the expected
+        * descriptor.
+        */
+        private void checkLambdaCompatible(JCLambda tree, Type descriptor, CheckContext checkContext, boolean speculativeAttr) {
+            Type returnType = checkContext.inferenceContext().asFree(descriptor.getReturnType(), types);
+
+            //return values have already been checked - but if lambda has no return
+            //values, we must ensure that void/value compatibility is correct;
+            //this amounts at checking that, if a lambda body can complete normally,
+            //the descriptor's return type must be void
+            if (tree.getBodyKind() == JCLambda.BodyKind.STATEMENT && tree.canCompleteNormally &&
+                    returnType.tag != VOID && returnType != Type.recoveryType) {
+                checkContext.report(tree, diags.fragment("incompatible.ret.type.in.lambda",
+                        diags.fragment("missing.ret.val", returnType)));
+            }
+
+            List<Type> argTypes = checkContext.inferenceContext().asFree(descriptor.getParameterTypes(), types);
+            if (!types.isSameTypes(argTypes, TreeInfo.types(tree.params))) {
+                checkContext.report(tree, diags.fragment("incompatible.arg.types.in.lambda"));
+            }
+
+            if (!speculativeAttr) {
+                List<Type> thrownTypes = checkContext.inferenceContext().asFree(descriptor.getThrownTypes(), types);
+                if (chk.unhandled(tree.inferredThrownTypes == null ? List.<Type>nil() : tree.inferredThrownTypes, thrownTypes).nonEmpty()) {
+                    log.error(tree, "incompatible.thrown.types.in.lambda", tree.inferredThrownTypes);
+                }
+            }
+        }
+
+        private Env<AttrContext> lambdaEnv(JCLambda that, Env<AttrContext> env) {
+            Env<AttrContext> lambdaEnv;
+            Symbol owner = env.info.scope.owner;
+            if (owner.kind == VAR && owner.owner.kind == TYP) {
+                //field initializer
+                lambdaEnv = env.dup(that, env.info.dup(env.info.scope.dupUnshared()));
+                lambdaEnv.info.scope.owner =
+                    new MethodSymbol(0, names.empty, null,
+                                     env.info.scope.owner);
+            } else {
+                lambdaEnv = env.dup(that, env.info.dup(env.info.scope.dup()));
+            }
+            return lambdaEnv;
+        }
 
     @Override
-    public void visitReference(JCMemberReference that) {
-        throw new UnsupportedOperationException("Member references not supported yet");
+    public void visitReference(final JCMemberReference that) {
+        if (pt().isErroneous() || (pt().tag == NONE && pt() != Type.recoveryType)) {
+            if (pt().tag == NONE) {
+                //method reference only allowed in assignment or method invocation/cast context
+                log.error(that.pos(), "unexpected.mref");
+            }
+            result = that.type = types.createErrorType(pt());
+            return;
+        }
+        final Env<AttrContext> localEnv = env.dup(that);
+        try {
+            //attribute member reference qualifier - if this is a constructor
+            //reference, the expected kind must be a type
+            Type exprType = attribTree(that.expr,
+                    env, new ResultInfo(that.getMode() == ReferenceMode.INVOKE ? VAL | TYP : TYP, Type.noType));
+
+            if (that.getMode() == JCMemberReference.ReferenceMode.NEW) {
+                exprType = chk.checkConstructorRefType(that.expr, exprType);
+            }
+
+            if (exprType.isErroneous()) {
+                //if the qualifier expression contains problems,
+                //give up atttribution of method reference
+                result = that.type = exprType;
+                return;
+            }
+
+            if (TreeInfo.isStaticSelector(that.expr, names) &&
+                    (that.getMode() != ReferenceMode.NEW || !that.expr.type.isRaw())) {
+                //if the qualifier is a type, validate it
+                chk.validate(that.expr, env);
+            }
+
+            //attrib type-arguments
+            List<Type> typeargtypes = null;
+            if (that.typeargs != null) {
+                typeargtypes = attribTypes(that.typeargs, localEnv);
+            }
+
+            Type target = infer.instantiateFunctionalInterface(that, pt(), null, resultInfo.checkContext);
+            Type desc = (target == Type.recoveryType) ?
+                    fallbackDescriptorType(that) :
+                    types.findDescriptorType(target);
+
+            List<Type> argtypes = desc.getParameterTypes();
+
+            boolean allowBoxing =
+                    resultInfo.checkContext.deferredAttrContext() == deferredAttr.emptyDeferredAttrContext ||
+                    resultInfo.checkContext.deferredAttrContext().phase.isBoxingRequired();
+            Pair<Symbol, Resolve.ReferenceLookupHelper> refResult = rs.resolveMemberReference(that.pos(), localEnv, that,
+                    that.expr.type, that.name, argtypes, typeargtypes, allowBoxing);
+
+            Symbol refSym = refResult.fst;
+            Resolve.ReferenceLookupHelper lookupHelper = refResult.snd;
+
+            if (refSym.kind != MTH) {
+                boolean targetError;
+                switch (refSym.kind) {
+                    case ABSENT_MTH:
+                        targetError = false;
+                        break;
+                    case WRONG_MTH:
+                    case WRONG_MTHS:
+                    case AMBIGUOUS:
+                    case HIDDEN:
+                    case STATICERR:
+                    case MISSING_ENCL:
+                        targetError = true;
+                        break;
+                    default:
+                        Assert.error("unexpected result kind " + refSym.kind);
+                        targetError = false;
+                }
+
+                JCDiagnostic detailsDiag = ((Resolve.ResolveError)refSym).getDiagnostic(JCDiagnostic.DiagnosticType.FRAGMENT,
+                                that, exprType.tsym, exprType, that.name, argtypes, typeargtypes);
+
+                JCDiagnostic.DiagnosticType diagKind = targetError ?
+                        JCDiagnostic.DiagnosticType.FRAGMENT : JCDiagnostic.DiagnosticType.ERROR;
+
+                JCDiagnostic diag = diags.create(diagKind, log.currentSource(), that,
+                        "invalid.mref", Kinds.kindName(that.getMode()), detailsDiag);
+
+                if (targetError) {
+                    resultInfo.checkContext.report(that, diag);
+                } else {
+                    log.report(diag);
+                }
+                result = that.type = types.createErrorType(target);
+                return;
+            }
+
+            if (desc.getReturnType() == Type.recoveryType) {
+                // stop here
+                result = that.type = types.createErrorType(target);
+                return;
+            }
+
+            that.sym = refSym.baseSymbol();
+            that.kind = lookupHelper.referenceKind(that.sym);
+
+            ResultInfo checkInfo =
+                    resultInfo.dup(newMethodTemplate(
+                        desc.getReturnType().tag == VOID ? Type.noType : desc.getReturnType(),
+                        lookupHelper.argtypes,
+                        typeargtypes));
+
+            Type refType = checkId(that, lookupHelper.site, refSym, localEnv, checkInfo);
+
+            if (!refType.isErroneous()) {
+                refType = types.createMethodTypeWithReturn(refType,
+                        adjustMethodReturnType(lookupHelper.site, that.name, checkInfo.pt.getParameterTypes(), refType.getReturnType()));
+            }
+
+            //go ahead with standard method reference compatibility check - note that param check
+            //is a no-op (as this has been taken care during method applicability)
+            boolean isSpeculativeRound =
+                    resultInfo.checkContext.deferredAttrContext().mode == DeferredAttr.AttrMode.SPECULATIVE;
+            checkReferenceCompatible(that, desc, refType, resultInfo.checkContext, isSpeculativeRound);
+            if (!isSpeculativeRound) {
+                checkAccessibleFunctionalDescriptor(that, localEnv, resultInfo.checkContext.inferenceContext(), desc);
+            }
+            result = check(that, target, VAL, resultInfo);
+        } catch (Types.FunctionDescriptorLookupError ex) {
+            JCDiagnostic cause = ex.getDiagnostic();
+            resultInfo.checkContext.report(that, cause);
+            result = that.type = types.createErrorType(pt());
+            return;
+        }
+    }
+
+    @SuppressWarnings("fallthrough")
+    void checkReferenceCompatible(JCMemberReference tree, Type descriptor, Type refType, CheckContext checkContext, boolean speculativeAttr) {
+        Type returnType = checkContext.inferenceContext().asFree(descriptor.getReturnType(), types);
+
+        Type resType;
+        switch (tree.getMode()) {
+            case NEW:
+                if (!tree.expr.type.isRaw()) {
+                    resType = tree.expr.type;
+                    break;
+                }
+            default:
+                resType = refType.getReturnType();
+        }
+
+        Type incompatibleReturnType = resType;
+
+        if (returnType.tag == VOID) {
+            incompatibleReturnType = null;
+        }
+
+        if (returnType.tag != VOID && resType.tag != VOID) {
+            if (resType.isErroneous() ||
+                    new LambdaReturnContext(checkContext).compatible(resType, returnType, Warner.noWarnings)) {
+                incompatibleReturnType = null;
+            }
+        }
+
+        if (incompatibleReturnType != null) {
+            checkContext.report(tree, diags.fragment("incompatible.ret.type.in.mref",
+                    diags.fragment("inconvertible.types", resType, descriptor.getReturnType())));
+        }
+
+        if (!speculativeAttr) {
+            List<Type> thrownTypes = checkContext.inferenceContext().asFree(descriptor.getThrownTypes(), types);
+            if (chk.unhandled(refType.getThrownTypes(), thrownTypes).nonEmpty()) {
+                log.error(tree, "incompatible.thrown.types.in.mref", refType.getThrownTypes());
+            }
+        }
     }
 
     public void visitParens(JCParens tree) {
@@ -2138,18 +2666,34 @@ public class Attr extends JCTree.Visitor {
         result = check(tree, owntype, VAL, resultInfo);
     }
 
-    public void visitTypeCast(JCTypeCast tree) {
+    public void visitTypeCast(final JCTypeCast tree) {
         Type clazztype = attribType(tree.clazz, env);
         chk.validate(tree.clazz, env, false);
         //a fresh environment is required for 292 inference to work properly ---
         //see Infer.instantiatePolymorphicSignatureInstance()
         Env<AttrContext> localEnv = env.dup(tree);
-        Type exprtype = attribExpr(tree.expr, localEnv, Infer.anyPoly);
-        Type owntype = chk.checkCastable(tree.expr.pos(), exprtype, clazztype);
+        //should we propagate the target type?
+        final ResultInfo castInfo;
+        final boolean isPoly = TreeInfo.isPoly(tree.expr, tree);
+        if (isPoly) {
+            //expression is a poly - we need to propagate target type info
+            castInfo = new ResultInfo(VAL, clazztype, new Check.NestedCheckContext(resultInfo.checkContext) {
+                @Override
+                public boolean compatible(Type found, Type req, Warner warn) {
+                    return types.isCastable(found, req, warn);
+                }
+            });
+        } else {
+            //standalone cast - target-type info is not propagated
+            castInfo = unknownExprInfo;
+        }
+        Type exprtype = attribTree(tree.expr, localEnv, castInfo);
+        Type owntype = isPoly ? clazztype : chk.checkCastable(tree.expr.pos(), exprtype, clazztype);
         if (exprtype.constValue() != null)
             owntype = cfolder.coerce(exprtype, owntype);
         result = check(tree, capture(owntype), VAL, resultInfo);
-        chk.checkRedundantCast(localEnv, tree);
+        if (!isPoly)
+            chk.checkRedundantCast(localEnv, tree);
     }
 
     public void visitTypeTest(JCInstanceOf tree) {
@@ -2176,15 +2720,13 @@ public class Attr extends JCTree.Visitor {
 
     public void visitIdent(JCIdent tree) {
         Symbol sym;
-        boolean varArgs = false;
 
         // Find symbol
         if (pt().tag == METHOD || pt().tag == FORALL) {
             // If we are looking for a method, the prototype `pt' will be a
             // method type with the type of the call's arguments as parameters.
-            env.info.varArgs = false;
+            env.info.pendingResolutionPhase = null;
             sym = rs.resolveMethod(tree.pos(), env, tree.name, pt().getParameterTypes(), pt().getTypeArguments());
-            varArgs = env.info.varArgs;
         } else if (tree.sym != null && tree.sym.kind != VAR) {
             sym = tree.sym;
         } else {
@@ -2246,7 +2788,7 @@ public class Attr extends JCTree.Visitor {
             while (env1.outer != null && !rs.isAccessible(env, env1.enclClass.sym.type, sym))
                 env1 = env1.outer;
         }
-        result = checkId(tree, env1.enclClass.sym.type, sym, env, resultInfo, varArgs);
+        result = checkId(tree, env1.enclClass.sym.type, sym, env, resultInfo);
     }
 
     public void visitSelect(JCFieldAccess tree) {
@@ -2289,13 +2831,13 @@ public class Attr extends JCTree.Visitor {
             sitesym.name == names._super;
 
         // Determine the symbol represented by the selection.
-        env.info.varArgs = false;
+        env.info.pendingResolutionPhase = null;
         Symbol sym = selectSym(tree, sitesym, site, env, resultInfo);
         if (sym.exists() && !isType(sym) && (pkind() & (PCK | TYP)) != 0) {
             site = capture(site);
             sym = selectSym(tree, sitesym, site, env, resultInfo);
         }
-        boolean varArgs = env.info.varArgs;
+        boolean varArgs = env.info.lastResolveVarargs();
         tree.sym = sym;
 
         if (site.tag == TYPEVAR && !isType(sym) && sym.kind != ERR) {
@@ -2344,9 +2886,10 @@ public class Attr extends JCTree.Visitor {
             } else {
                 // Check if type-qualified fields or methods are static (JLS)
                 if ((sym.flags() & STATIC) == 0 &&
+                    !env.next.tree.hasTag(REFERENCE) &&
                     sym.name != names._super &&
                     (sym.kind == VAR || sym.kind == MTH)) {
-                    rs.access(rs.new StaticError(sym),
+                    rs.accessBase(rs.new StaticError(sym),
                               tree.pos(), site, sym.name, true);
                 }
             }
@@ -2370,7 +2913,7 @@ public class Attr extends JCTree.Visitor {
         }
 
         env.info.selectSuper = selectSuperPrev;
-        result = checkId(tree, site, sym, env, resultInfo, varArgs);
+        result = checkId(tree, site, sym, env, resultInfo);
     }
     //where
         /** Determine symbol referenced by a Select expression,
@@ -2389,7 +2932,7 @@ public class Attr extends JCTree.Visitor {
             Name name = tree.name;
             switch (site.tag) {
             case PACKAGE:
-                return rs.access(
+                return rs.accessBase(
                     rs.findIdentInPackage(env, site.tsym, name, resultInfo.pkind),
                     pos, location, site, name, true);
             case ARRAY:
@@ -2413,7 +2956,7 @@ public class Attr extends JCTree.Visitor {
                     // We are seeing a plain identifier as selector.
                     Symbol sym = rs.findIdentInType(env, site, name, resultInfo.pkind);
                     if ((resultInfo.pkind & ERRONEOUS) == 0)
-                        sym = rs.access(sym, pos, location, site, name, true);
+                        sym = rs.accessBase(sym, pos, location, site, name, true);
                     return sym;
                 }
             case WILDCARD:
@@ -2435,7 +2978,7 @@ public class Attr extends JCTree.Visitor {
                     Symbol sym2 = (sym.flags() & Flags.PRIVATE) != 0 ?
                         rs.new AccessError(env, site, sym) :
                                 sym;
-                    rs.access(sym2, pos, location, site, name, true);
+                    rs.accessBase(sym2, pos, location, site, name, true);
                     return sym;
                 }
             case ERROR:
@@ -2486,9 +3029,18 @@ public class Attr extends JCTree.Visitor {
                      Type site,
                      Symbol sym,
                      Env<AttrContext> env,
-                     ResultInfo resultInfo,
-                     boolean useVarargs) {
-            if (resultInfo.pt.isErroneous()) return types.createErrorType(site);
+                     ResultInfo resultInfo) {
+            Type pt = resultInfo.pt.tag == FORALL || resultInfo.pt.tag == METHOD ?
+                    resultInfo.pt.map(deferredAttr.new DeferredTypeMap(AttrMode.SPECULATIVE, sym, env.info.pendingResolutionPhase)) :
+                    resultInfo.pt;
+
+            DeferredAttr.DeferredTypeMap recoveryMap =
+                    deferredAttr.new RecoveryDeferredTypeMap(AttrMode.CHECK, sym, env.info.pendingResolutionPhase);
+
+            if (pt.isErroneous()) {
+                Type.map(resultInfo.pt.getParameterTypes(), recoveryMap);
+                return types.createErrorType(site);
+            }
             Type owntype; // The computed type of this identifier occurrence.
             switch (sym.kind) {
             case TYP:
@@ -2563,14 +3115,14 @@ public class Attr extends JCTree.Visitor {
                 }
                 break;
             case MTH: {
-                JCMethodInvocation app = (JCMethodInvocation)env.tree;
                 owntype = checkMethod(site, sym,
                         new ResultInfo(VAL, resultInfo.pt.getReturnType(), resultInfo.checkContext),
-                        env, app.args, resultInfo.pt.getParameterTypes(),
-                        resultInfo.pt.getTypeArguments(), env.info.varArgs);
+                        env, TreeInfo.args(env.tree), resultInfo.pt.getParameterTypes(),
+                        resultInfo.pt.getTypeArguments());
                 break;
             }
             case PCK: case ERR:
+                Type.map(resultInfo.pt.getParameterTypes(), recoveryMap);
                 owntype = sym.type;
                 break;
             default:
@@ -2710,8 +3262,7 @@ public class Attr extends JCTree.Visitor {
                             Env<AttrContext> env,
                             final List<JCExpression> argtrees,
                             List<Type> argtypes,
-                            List<Type> typeargtypes,
-                            boolean useVarargs) {
+                            List<Type> typeargtypes) {
         // Test (5): if symbol is an instance method of a raw type, issue
         // an unchecked warning if its argument types change under erasure.
         if (allowGenerics &&
@@ -2733,18 +3284,16 @@ public class Attr extends JCTree.Visitor {
         // any type arguments and value arguments.
         noteWarner.clear();
         try {
-            Type owntype = rs.rawInstantiate(
+            Type owntype = rs.checkMethod(
                     env,
                     site,
                     sym,
                     resultInfo,
                     argtypes,
                     typeargtypes,
-                    allowBoxing,
-                    useVarargs,
                     noteWarner);
 
-            return chk.checkMethod(owntype, sym, env, argtrees, argtypes, useVarargs,
+            return chk.checkMethod(owntype, sym, env, argtrees, argtypes, env.info.lastResolveVarargs(),
                     noteWarner.hasNonSilentLint(LintCategory.UNCHECKED));
         } catch (Infer.InferenceException ex) {
             //invalid target type - propagate exception outwards or report error
@@ -2752,26 +3301,11 @@ public class Attr extends JCTree.Visitor {
             resultInfo.checkContext.report(env.tree.pos(), ex.getDiagnostic());
             return types.createErrorType(site);
         } catch (Resolve.InapplicableMethodException ex) {
-            Assert.error();
+            Assert.error(ex.getDiagnostic().getMessage(Locale.getDefault()));
             return null;
         }
     }
 
-    /**
-     * Check that constructor arguments conform to its instantiation.
-     **/
-    public Type checkConstructor(Type site,
-                            Symbol sym,
-                            Env<AttrContext> env,
-                            final List<JCExpression> argtrees,
-                            List<Type> argtypes,
-                            List<Type> typeargtypes,
-                            boolean useVarargs) {
-        Type owntype = checkMethod(site, sym, new ResultInfo(VAL, syms.voidType), env, argtrees, argtypes, typeargtypes, useVarargs);
-        chk.checkType(env.tree.pos(), owntype.getReturnType(), syms.voidType);
-        return owntype;
-    }
-
     public void visitLiteral(JCLiteral tree) {
         result = check(
             tree, litType(tree.typetag).constType(tree.value), VAL, resultInfo);
@@ -3075,8 +3609,10 @@ public class Attr extends JCTree.Visitor {
 
             Lint prevLint = chk.setLint(env.info.lint);
             JavaFileObject prev = log.useSource(c.sourcefile);
+            ResultInfo prevReturnRes = env.info.returnResult;
 
             try {
+                env.info.returnResult = null;
                 // java.lang.Enum may not be subclassed by a non-enum
                 if (st.tsym == syms.enumSym &&
                     ((c.flags_field & (Flags.ENUM|Flags.COMPOUND)) == 0))
@@ -3093,6 +3629,7 @@ public class Attr extends JCTree.Visitor {
 
                 chk.checkDeprecatedAnnotation(env.tree.pos(), c);
             } finally {
+                env.info.returnResult = prevReturnRes;
                 log.useSource(prev);
                 chk.setLint(prevLint);
             }
@@ -3280,8 +3817,8 @@ public class Attr extends JCTree.Visitor {
      * mode (e.g. by an IDE) and the AST contains semantic errors, this routine
      * prevents NPE to be progagated during subsequent compilation steps.
      */
-    public void postAttr(Env<AttrContext> env) {
-        new PostAttrAnalyzer().scan(env.tree);
+    public void postAttr(JCTree tree) {
+        new PostAttrAnalyzer().scan(tree);
     }
 
     class PostAttrAnalyzer extends TreeScanner {
@@ -3375,6 +3912,14 @@ public class Attr extends JCTree.Visitor {
                 that.operator = new OperatorSymbol(names.empty, syms.unknownType, -1, syms.noSymbol);
             super.visitUnary(that);
         }
+
+        @Override
+        public void visitReference(JCMemberReference that) {
+            super.visitReference(that);
+            if (that.sym == null) {
+                that.sym = new MethodSymbol(0, names.empty, syms.unknownType, syms.noSymbol);
+            }
+        }
     }
     // </editor-fold>
 }
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContext.java b/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContext.java
index 017d6bcf2c0..568ad6766a3 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContext.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContext.java
@@ -56,7 +56,7 @@ public class AttrContext {
 
     /** Are arguments to current function applications boxed into an array for varargs?
      */
-    boolean varArgs = false;
+    Resolve.MethodResolutionPhase pendingResolutionPhase = null;
 
     /** A record of the lint/SuppressWarnings currently in effect
      */
@@ -67,6 +67,11 @@ public class AttrContext {
      */
     Symbol enclVar = null;
 
+    /** ResultInfo to be used for attributing 'return' statement expressions
+     * (set by Attr.visitMethod and Attr.visitLambda)
+     */
+    Attr.ResultInfo returnResult = null;
+
     /** Duplicate this context, replacing scope field and copying all others.
      */
     AttrContext dup(Scope scope) {
@@ -75,9 +80,10 @@ public class AttrContext {
         info.staticLevel = staticLevel;
         info.isSelfCall = isSelfCall;
         info.selectSuper = selectSuper;
-        info.varArgs = varArgs;
+        info.pendingResolutionPhase = pendingResolutionPhase;
         info.lint = lint;
         info.enclVar = enclVar;
+        info.returnResult = returnResult;
         return info;
     }
 
@@ -93,6 +99,11 @@ public class AttrContext {
         return scope.getElements();
     }
 
+    boolean lastResolveVarargs() {
+        return pendingResolutionPhase != null &&
+                pendingResolutionPhase.isVarargsRequired();
+    }
+
     public String toString() {
         return "AttrContext[" + scope.toString() + "]";
     }
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
index d3a9e3bc73e..87651481548 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
@@ -40,6 +40,9 @@ import com.sun.tools.javac.code.Lint;
 import com.sun.tools.javac.code.Lint.LintCategory;
 import com.sun.tools.javac.code.Type.*;
 import com.sun.tools.javac.code.Symbol.*;
+import com.sun.tools.javac.comp.DeferredAttr.DeferredAttrContext;
+import com.sun.tools.javac.comp.Infer.InferenceContext;
+import com.sun.tools.javac.comp.Infer.InferenceContext.FreeTypeListener;
 
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Flags.ANNOTATION;
@@ -66,6 +69,7 @@ public class Check {
     private final Resolve rs;
     private final Symtab syms;
     private final Enter enter;
+    private final DeferredAttr deferredAttr;
     private final Infer infer;
     private final Types types;
     private final JCDiagnostic.Factory diags;
@@ -98,6 +102,7 @@ public class Check {
         rs = Resolve.instance(context);
         syms = Symtab.instance(context);
         enter = Enter.instance(context);
+        deferredAttr = DeferredAttr.instance(context);
         infer = Infer.instance(context);
         this.types = Types.instance(context);
         diags = JCDiagnostic.Factory.instance(context);
@@ -416,7 +421,7 @@ public class Check {
      * checks - depending on the check context, meaning of 'compatibility' might
      * vary significantly.
      */
-    interface CheckContext {
+    public interface CheckContext {
         /**
          * Is type 'found' compatible with type 'req' in given context
          */
@@ -429,6 +434,12 @@ public class Check {
          * Obtain a warner for this check context
          */
         public Warner checkWarner(DiagnosticPosition pos, Type found, Type req);
+
+        public Infer.InferenceContext inferenceContext();
+
+        public DeferredAttr.DeferredAttrContext deferredAttrContext();
+
+        public boolean allowBoxing();
     }
 
     /**
@@ -455,6 +466,18 @@ public class Check {
         public Warner checkWarner(DiagnosticPosition pos, Type found, Type req) {
             return enclosingContext.checkWarner(pos, found, req);
         }
+
+        public Infer.InferenceContext inferenceContext() {
+            return enclosingContext.inferenceContext();
+        }
+
+        public DeferredAttrContext deferredAttrContext() {
+            return enclosingContext.deferredAttrContext();
+        }
+
+        public boolean allowBoxing() {
+            return enclosingContext.allowBoxing();
+        }
     }
 
     /**
@@ -471,6 +494,18 @@ public class Check {
         public Warner checkWarner(DiagnosticPosition pos, Type found, Type req) {
             return convertWarner(pos, found, req);
         }
+
+        public InferenceContext inferenceContext() {
+            return infer.emptyContext;
+        }
+
+        public DeferredAttrContext deferredAttrContext() {
+            return deferredAttr.emptyDeferredAttrContext;
+        }
+
+        public boolean allowBoxing() {
+            return true;
+        }
     };
 
     /** Check that a given type is assignable to a given proto-type.
@@ -483,7 +518,16 @@ public class Check {
         return checkType(pos, found, req, basicHandler);
     }
 
-    Type checkType(final DiagnosticPosition pos, Type found, Type req, CheckContext checkContext) {
+    Type checkType(final DiagnosticPosition pos, final Type found, final Type req, final CheckContext checkContext) {
+        final Infer.InferenceContext inferenceContext = checkContext.inferenceContext();
+        if (inferenceContext.free(req)) {
+            inferenceContext.addFreeTypeListener(List.of(req), new FreeTypeListener() {
+                @Override
+                public void typesInferred(InferenceContext inferenceContext) {
+                    checkType(pos, found, inferenceContext.asInstType(req, types), checkContext);
+                }
+            });
+        }
         if (req.tag == ERROR)
             return req;
         if (req.tag == NONE)
@@ -523,9 +567,9 @@ public class Check {
      */
     public void checkRedundantCast(Env<AttrContext> env, JCTypeCast tree) {
         if (!tree.type.isErroneous() &&
-            (env.info.lint == null || env.info.lint.isEnabled(Lint.LintCategory.CAST))
-            && types.isSameType(tree.expr.type, tree.clazz.type)
-            && !is292targetTypeCast(tree)) {
+                (env.info.lint == null || env.info.lint.isEnabled(Lint.LintCategory.CAST))
+                && types.isSameType(tree.expr.type, tree.clazz.type)
+                && !is292targetTypeCast(tree)) {
             log.warning(Lint.LintCategory.CAST,
                     tree.pos(), "redundant.cast", tree.expr.type);
         }
@@ -604,6 +648,22 @@ public class Check {
             return t;
     }
 
+    /** Check that type is a valid qualifier for a constructor reference expression
+     */
+    Type checkConstructorRefType(DiagnosticPosition pos, Type t) {
+        t = checkClassType(pos, t);
+        if (t.tag == CLASS) {
+            if ((t.tsym.flags() & (ABSTRACT | INTERFACE)) != 0) {
+                log.error(pos, "abstract.cant.be.instantiated");
+                t = types.createErrorType(t);
+            } else if ((t.tsym.flags() & ENUM) != 0) {
+                log.error(pos, "enum.cant.be.instantiated");
+                t = types.createErrorType(t);
+            }
+        }
+        return t;
+    }
+
     /** Check that type is a class or interface type.
      *  @param pos           Position to be used for error reporting.
      *  @param t             The type to be checked.
@@ -796,29 +856,34 @@ public class Check {
                 sym.owner == syms.enumSym)
                 formals = formals.tail.tail;
         List<JCExpression> args = argtrees;
-        while (formals.head != last) {
-            JCTree arg = args.head;
-            Warner warn = convertWarner(arg.pos(), arg.type, formals.head);
-            assertConvertible(arg, arg.type, formals.head, warn);
-            args = args.tail;
-            formals = formals.tail;
-        }
-        if (useVarargs) {
-            Type varArg = types.elemtype(last);
-            while (args.tail != null) {
+        DeferredAttr.DeferredTypeMap checkDeferredMap =
+                deferredAttr.new DeferredTypeMap(DeferredAttr.AttrMode.CHECK, sym, env.info.pendingResolutionPhase);
+        if (args != null) {
+            //this is null when type-checking a method reference
+            while (formals.head != last) {
                 JCTree arg = args.head;
-                Warner warn = convertWarner(arg.pos(), arg.type, varArg);
-                assertConvertible(arg, arg.type, varArg, warn);
+                Warner warn = convertWarner(arg.pos(), arg.type, formals.head);
+                assertConvertible(arg, arg.type, formals.head, warn);
                 args = args.tail;
+                formals = formals.tail;
+            }
+            if (useVarargs) {
+                Type varArg = types.elemtype(last);
+                while (args.tail != null) {
+                    JCTree arg = args.head;
+                    Warner warn = convertWarner(arg.pos(), arg.type, varArg);
+                    assertConvertible(arg, arg.type, varArg, warn);
+                    args = args.tail;
+                }
+            } else if ((sym.flags() & VARARGS) != 0 && allowVarargs) {
+                // non-varargs call to varargs method
+                Type varParam = owntype.getParameterTypes().last();
+                Type lastArg = checkDeferredMap.apply(argtypes.last());
+                if (types.isSubtypeUnchecked(lastArg, types.elemtype(varParam)) &&
+                        !types.isSameType(types.erasure(varParam), types.erasure(lastArg)))
+                    log.warning(argtrees.last().pos(), "inexact.non-varargs.call",
+                            types.elemtype(varParam), varParam);
             }
-        } else if ((sym.flags() & VARARGS) != 0 && allowVarargs) {
-            // non-varargs call to varargs method
-            Type varParam = owntype.getParameterTypes().last();
-            Type lastArg = argtypes.last();
-            if (types.isSubtypeUnchecked(lastArg, types.elemtype(varParam)) &&
-                    !types.isSameType(types.erasure(varParam), types.erasure(lastArg)))
-                log.warning(argtrees.last().pos(), "inexact.non-varargs.call",
-                        types.elemtype(varParam), varParam);
         }
         if (unchecked) {
             warnUnchecked(env.tree.pos(),
@@ -826,7 +891,7 @@ public class Check {
                     kindName(sym),
                     sym.name,
                     rs.methodArguments(sym.type.getParameterTypes()),
-                    rs.methodArguments(argtypes),
+                    rs.methodArguments(Type.map(argtypes, checkDeferredMap)),
                     kindName(sym.location()),
                     sym.location());
            owntype = new MethodType(owntype.getParameterTypes(),
@@ -853,6 +918,9 @@ public class Check {
                 case NEWCLASS:
                     ((JCNewClass) tree).varargsElement = elemtype;
                     break;
+                case REFERENCE:
+                    ((JCMemberReference) tree).varargsElement = elemtype;
+                    break;
                 default:
                     throw new AssertionError(""+tree);
             }
@@ -870,6 +938,65 @@ public class Check {
                 return;
         }
 
+        void checkAccessibleFunctionalDescriptor(DiagnosticPosition pos, Env<AttrContext> env, Type desc) {
+            AccessChecker accessChecker = new AccessChecker(env);
+            //check args accessibility (only if implicit parameter types)
+            for (Type arg : desc.getParameterTypes()) {
+                if (!accessChecker.visit(arg)) {
+                    log.error(pos, "cant.access.arg.type.in.functional.desc", arg);
+                    return;
+                }
+            }
+            //check return type accessibility
+            if (!accessChecker.visit(desc.getReturnType())) {
+                log.error(pos, "cant.access.return.in.functional.desc", desc.getReturnType());
+                return;
+            }
+            //check thrown types accessibility
+            for (Type thrown : desc.getThrownTypes()) {
+                if (!accessChecker.visit(thrown)) {
+                    log.error(pos, "cant.access.thrown.in.functional.desc", thrown);
+                    return;
+                }
+            }
+        }
+
+        class AccessChecker extends Types.UnaryVisitor<Boolean> {
+
+            Env<AttrContext> env;
+
+            AccessChecker(Env<AttrContext> env) {
+                this.env = env;
+            }
+
+            Boolean visit(List<Type> ts) {
+                for (Type t : ts) {
+                    if (!visit(t))
+                        return false;
+                }
+                return true;
+            }
+
+            public Boolean visitType(Type t, Void s) {
+                return true;
+            }
+
+            @Override
+            public Boolean visitArrayType(ArrayType t, Void s) {
+                return visit(t.elemtype);
+            }
+
+            @Override
+            public Boolean visitClassType(ClassType t, Void s) {
+                return rs.isAccessible(env, t, true) &&
+                        visit(t.getTypeArguments());
+            }
+
+            @Override
+            public Boolean visitWildcardType(WildcardType t, Void s) {
+                return visit(t.type);
+            }
+        };
     /**
      * Check that type 't' is a valid instantiation of a generic class
      * (see JLS 4.5)
@@ -2470,6 +2597,7 @@ public class Check {
         validateDocumented(t.tsym, s, pos);
         validateInherited(t.tsym, s, pos);
         validateTarget(t.tsym, s, pos);
+        validateDefault(t.tsym, s, pos);
     }
 
     /**
@@ -2650,6 +2778,21 @@ public class Check {
         return true;
     }
 
+    private void validateDefault(Symbol container, Symbol contained, DiagnosticPosition pos) {
+        // validate that all other elements of containing type has defaults
+        Scope scope = container.members();
+        for(Symbol elm : scope.getElements()) {
+            if (elm.name != names.value &&
+                elm.kind == Kinds.MTH &&
+                ((MethodSymbol)elm).defaultValue == null) {
+                log.error(pos,
+                          "invalid.containedby.annotation.elem.nondefault",
+                          container,
+                          elm);
+            }
+        }
+    }
+
     /** Is s a method symbol that overrides a method in a superclass? */
     boolean isOverrider(Symbol s) {
         if (s.kind != MTH || s.isStatic())
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java b/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java
new file mode 100644
index 00000000000..7405ca109a3
--- /dev/null
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java
@@ -0,0 +1,640 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.tools.javac.comp;
+
+import com.sun.tools.javac.code.*;
+import com.sun.tools.javac.tree.*;
+import com.sun.tools.javac.util.*;
+import com.sun.tools.javac.code.Symbol.*;
+import com.sun.tools.javac.code.Type.*;
+import com.sun.tools.javac.comp.Attr.ResultInfo;
+import com.sun.tools.javac.comp.Infer.InferenceContext;
+import com.sun.tools.javac.comp.Resolve.MethodResolutionPhase;
+import com.sun.tools.javac.tree.JCTree.*;
+
+import javax.tools.JavaFileObject;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Queue;
+import java.util.Set;
+import java.util.WeakHashMap;
+
+import static com.sun.tools.javac.code.TypeTags.*;
+import static com.sun.tools.javac.tree.JCTree.Tag.*;
+import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
+
+/**
+ * This is an helper class that is used to perform deferred type-analysis.
+ * Each time a poly expression occurs in argument position, javac attributes it
+ * with a temporary 'deferred type' that is checked (possibly multiple times)
+ * against an expected formal type.
+ *
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ */
+public class DeferredAttr extends JCTree.Visitor {
+    protected static final Context.Key<DeferredAttr> deferredAttrKey =
+        new Context.Key<DeferredAttr>();
+
+    final Attr attr;
+    final Check chk;
+    final Enter enter;
+    final Infer infer;
+    final Log log;
+    final Symtab syms;
+    final TreeMaker make;
+    final Types types;
+
+    public static DeferredAttr instance(Context context) {
+        DeferredAttr instance = context.get(deferredAttrKey);
+        if (instance == null)
+            instance = new DeferredAttr(context);
+        return instance;
+    }
+
+    protected DeferredAttr(Context context) {
+        context.put(deferredAttrKey, this);
+        attr = Attr.instance(context);
+        chk = Check.instance(context);
+        enter = Enter.instance(context);
+        infer = Infer.instance(context);
+        log = Log.instance(context);
+        syms = Symtab.instance(context);
+        make = TreeMaker.instance(context);
+        types = Types.instance(context);
+    }
+
+    /**
+     * This type represents a deferred type. A deferred type starts off with
+     * no information on the underlying expression type. Such info needs to be
+     * discovered through type-checking the deferred type against a target-type.
+     * Every deferred type keeps a pointer to the AST node from which it originated.
+     */
+    public class DeferredType extends Type {
+
+        public JCExpression tree;
+        Env<AttrContext> env;
+        AttrMode mode;
+        SpeculativeCache speculativeCache;
+
+        DeferredType(JCExpression tree, Env<AttrContext> env) {
+            super(DEFERRED, null);
+            this.tree = tree;
+            this.env = env.dup(tree, env.info.dup());
+            this.speculativeCache = new SpeculativeCache();
+        }
+
+        /**
+         * A speculative cache is used to keep track of all overload resolution rounds
+         * that triggered speculative attribution on a given deferred type. Each entry
+         * stores a pointer to the speculative tree and the resolution phase in which the entry
+         * has been added.
+         */
+        class SpeculativeCache {
+
+            private Map<Symbol, List<Entry>> cache =
+                    new WeakHashMap<Symbol, List<Entry>>();
+
+            class Entry {
+                JCTree speculativeTree;
+                Resolve.MethodResolutionPhase phase;
+
+                public Entry(JCTree speculativeTree, MethodResolutionPhase phase) {
+                    this.speculativeTree = speculativeTree;
+                    this.phase = phase;
+                }
+
+                boolean matches(Resolve.MethodResolutionPhase phase) {
+                    return this.phase == phase;
+                }
+            }
+
+            /**
+             * Clone a speculative cache entry as a fresh entry associated
+             * with a new method (this maybe required to fixup speculative cache
+             * misses after Resolve.access())
+             */
+            void dupAllTo(Symbol from, Symbol to) {
+                Assert.check(cache.get(to) == null);
+                List<Entry> entries = cache.get(from);
+                if (entries != null) {
+                    cache.put(to, entries);
+                }
+            }
+
+            /**
+             * Retrieve a speculative cache entry corresponding to given symbol
+             * and resolution phase
+             */
+            Entry get(Symbol msym, MethodResolutionPhase phase) {
+                List<Entry> entries = cache.get(msym);
+                if (entries == null) return null;
+                for (Entry e : entries) {
+                    if (e.matches(phase)) return e;
+                }
+                return null;
+            }
+
+            /**
+             * Stores a speculative cache entry corresponding to given symbol
+             * and resolution phase
+             */
+            void put(Symbol msym, JCTree speculativeTree, MethodResolutionPhase phase) {
+                List<Entry> entries = cache.get(msym);
+                if (entries == null) {
+                    entries = List.nil();
+                }
+                cache.put(msym, entries.prepend(new Entry(speculativeTree, phase)));
+            }
+        }
+
+        /**
+         * Get the type that has been computed during a speculative attribution round
+         */
+        Type speculativeType(Symbol msym, MethodResolutionPhase phase) {
+            SpeculativeCache.Entry e = speculativeCache.get(msym, phase);
+            return e != null ? e.speculativeTree.type : Type.noType;
+        }
+
+        /**
+         * Check a deferred type against a potential target-type. Depending on
+         * the current attribution mode, a normal vs. speculative attribution
+         * round is performed on the underlying AST node. There can be only one
+         * speculative round for a given target method symbol; moreover, a normal
+         * attribution round must follow one or more speculative rounds.
+         */
+        Type check(ResultInfo resultInfo) {
+            DeferredAttrContext deferredAttrContext =
+                    resultInfo.checkContext.deferredAttrContext();
+            Assert.check(deferredAttrContext != emptyDeferredAttrContext);
+            List<Type> stuckVars = stuckVars(tree, resultInfo);
+            if (stuckVars.nonEmpty()) {
+                deferredAttrContext.addDeferredAttrNode(this, resultInfo, stuckVars);
+                return Type.noType;
+            } else {
+                try {
+                    switch (deferredAttrContext.mode) {
+                        case SPECULATIVE:
+                            Assert.check(mode == null ||
+                                    (mode == AttrMode.SPECULATIVE &&
+                                    speculativeType(deferredAttrContext.msym, deferredAttrContext.phase).tag == NONE));
+                            JCTree speculativeTree = attribSpeculative(tree, env, resultInfo);
+                            speculativeCache.put(deferredAttrContext.msym, speculativeTree, deferredAttrContext.phase);
+                            return speculativeTree.type;
+                        case CHECK:
+                            Assert.check(mode == AttrMode.SPECULATIVE);
+                            return attr.attribTree(tree, env, resultInfo);
+                    }
+                    Assert.error();
+                    return null;
+                } finally {
+                    mode = deferredAttrContext.mode;
+                }
+            }
+        }
+    }
+
+    /**
+     * The 'mode' in which the deferred type is to be type-checked
+     */
+    public enum AttrMode {
+        /**
+         * A speculative type-checking round is used during overload resolution
+         * mainly to generate constraints on inference variables. Side-effects
+         * arising from type-checking the expression associated with the deferred
+         * type are reversed after the speculative round finishes. This means the
+         * expression tree will be left in a blank state.
+         */
+        SPECULATIVE,
+        /**
+         * This is the plain type-checking mode. Produces side-effects on the underlying AST node
+         */
+        CHECK;
+    }
+
+    /**
+     * Routine that performs speculative type-checking; the input AST node is
+     * cloned (to avoid side-effects cause by Attr) and compiler state is
+     * restored after type-checking. All diagnostics (but critical ones) are
+     * disabled during speculative type-checking.
+     */
+    JCTree attribSpeculative(JCTree tree, Env<AttrContext> env, ResultInfo resultInfo) {
+        JCTree newTree = new TreeCopier<Object>(make).copy(tree);
+        Env<AttrContext> speculativeEnv = env.dup(newTree, env.info.dup(env.info.scope.dupUnshared()));
+        speculativeEnv.info.scope.owner = env.info.scope.owner;
+        Filter<JCDiagnostic> prevDeferDiagsFilter = log.deferredDiagFilter;
+        Queue<JCDiagnostic> prevDeferredDiags = log.deferredDiagnostics;
+        final JavaFileObject currentSource = log.currentSourceFile();
+        try {
+            log.deferredDiagnostics = new ListBuffer<JCDiagnostic>();
+            log.deferredDiagFilter = new Filter<JCDiagnostic>() {
+                public boolean accepts(JCDiagnostic t) {
+                    return t.getDiagnosticSource().getFile().equals(currentSource);
+                }
+            };
+            attr.attribTree(newTree, speculativeEnv, resultInfo);
+            unenterScanner.scan(newTree);
+            return newTree;
+        } catch (Abort ex) {
+            //if some very bad condition occurred during deferred attribution
+            //we should dump all errors before killing javac
+            log.reportDeferredDiagnostics();
+            throw ex;
+        } finally {
+            unenterScanner.scan(newTree);
+            log.deferredDiagFilter = prevDeferDiagsFilter;
+            log.deferredDiagnostics = prevDeferredDiags;
+        }
+    }
+    //where
+        protected TreeScanner unenterScanner = new TreeScanner() {
+            @Override
+            public void visitClassDef(JCClassDecl tree) {
+                ClassSymbol csym = tree.sym;
+                enter.typeEnvs.remove(csym);
+                chk.compiled.remove(csym.flatname);
+                syms.classes.remove(csym.flatname);
+                super.visitClassDef(tree);
+            }
+        };
+
+    /**
+     * A deferred context is created on each method check. A deferred context is
+     * used to keep track of information associated with the method check, such as
+     * the symbol of the method being checked, the overload resolution phase,
+     * the kind of attribution mode to be applied to deferred types and so forth.
+     * As deferred types are processed (by the method check routine) stuck AST nodes
+     * are added (as new deferred attribution nodes) to this context. The complete()
+     * routine makes sure that all pending nodes are properly processed, by
+     * progressively instantiating all inference variables on which one or more
+     * deferred attribution node is stuck.
+     */
+    class DeferredAttrContext {
+
+        /** attribution mode */
+        final AttrMode mode;
+
+        /** symbol of the method being checked */
+        final Symbol msym;
+
+        /** method resolution step */
+        final Resolve.MethodResolutionPhase phase;
+
+        /** inference context */
+        final InferenceContext inferenceContext;
+
+        /** list of deferred attribution nodes to be processed */
+        ArrayList<DeferredAttrNode> deferredAttrNodes = new ArrayList<DeferredAttrNode>();
+
+        DeferredAttrContext(AttrMode mode, Symbol msym, MethodResolutionPhase phase, InferenceContext inferenceContext) {
+            this.mode = mode;
+            this.msym = msym;
+            this.phase = phase;
+            this.inferenceContext = inferenceContext;
+        }
+
+        /**
+         * Adds a node to the list of deferred attribution nodes - used by Resolve.rawCheckArgumentsApplicable
+         * Nodes added this way act as 'roots' for the out-of-order method checking process.
+         */
+        void addDeferredAttrNode(final DeferredType dt, ResultInfo resultInfo, List<Type> stuckVars) {
+            deferredAttrNodes.add(new DeferredAttrNode(dt, resultInfo, stuckVars));
+        }
+
+        /**
+         * Incrementally process all nodes, by skipping 'stuck' nodes and attributing
+         * 'unstuck' ones. If at any point no progress can be made (no 'unstuck' nodes)
+         * some inference variable might get eagerly instantiated so that all nodes
+         * can be type-checked.
+         */
+        void complete() {
+            while (!deferredAttrNodes.isEmpty()) {
+                Set<Type> stuckVars = new HashSet<Type>();
+                boolean progress = false;
+                //scan a defensive copy of the node list - this is because a deferred
+                //attribution round can add new nodes to the list
+                for (DeferredAttrNode deferredAttrNode : List.from(deferredAttrNodes)) {
+                    if (!deferredAttrNode.isStuck()) {
+                        deferredAttrNode.process();
+                        deferredAttrNodes.remove(deferredAttrNode);
+                        progress = true;
+                    } else {
+                        stuckVars.addAll(deferredAttrNode.stuckVars);
+                    }
+                }
+                if (!progress) {
+                    //remove all variables that have already been instantiated
+                    //from the list of stuck variables
+                    inferenceContext.solveAny(inferenceContext.freeVarsIn(List.from(stuckVars)), types, infer);
+                    inferenceContext.notifyChange(types);
+                }
+            }
+        }
+
+        /**
+         * Class representing a deferred attribution node. It keeps track of
+         * a deferred type, along with the expected target type information.
+         */
+        class DeferredAttrNode implements Infer.InferenceContext.FreeTypeListener {
+
+            /** underlying deferred type */
+            DeferredType dt;
+
+            /** underlying target type information */
+            ResultInfo resultInfo;
+
+            /** list of uninferred inference variables causing this node to be stuck */
+            List<Type> stuckVars;
+
+            DeferredAttrNode(DeferredType dt, ResultInfo resultInfo, List<Type> stuckVars) {
+                this.dt = dt;
+                this.resultInfo = resultInfo;
+                this.stuckVars = stuckVars;
+                if (!stuckVars.isEmpty()) {
+                    resultInfo.checkContext.inferenceContext().addFreeTypeListener(stuckVars, this);
+                }
+            }
+
+            @Override
+            public void typesInferred(InferenceContext inferenceContext) {
+                stuckVars = List.nil();
+                resultInfo = resultInfo.dup(inferenceContext.asInstType(resultInfo.pt, types));
+            }
+
+            /**
+             * is this node stuck?
+             */
+            boolean isStuck() {
+                return stuckVars.nonEmpty();
+            }
+
+            /**
+             * Process a deferred attribution node.
+             * Invariant: a stuck node cannot be processed.
+             */
+            void process() {
+                if (isStuck()) {
+                    throw new IllegalStateException("Cannot process a stuck deferred node");
+                }
+                dt.check(resultInfo);
+            }
+        }
+    }
+
+    /** an empty deferred attribution context - all methods throw exceptions */
+    final DeferredAttrContext emptyDeferredAttrContext =
+            new DeferredAttrContext(null, null, null, null) {
+                @Override
+                void addDeferredAttrNode(DeferredType dt, ResultInfo ri, List<Type> stuckVars) {
+                    Assert.error("Empty deferred context!");
+                }
+                @Override
+                void complete() {
+                    Assert.error("Empty deferred context!");
+                }
+            };
+
+    /**
+     * Map a list of types possibly containing one or more deferred types
+     * into a list of ordinary types. Each deferred type D is mapped into a type T,
+     * where T is computed by retrieving the type that has already been
+     * computed for D during a previous deferred attribution round of the given kind.
+     */
+    class DeferredTypeMap extends Type.Mapping {
+
+        DeferredAttrContext deferredAttrContext;
+
+        protected DeferredTypeMap(AttrMode mode, Symbol msym, MethodResolutionPhase phase) {
+            super(String.format("deferredTypeMap[%s]", mode));
+            this.deferredAttrContext = new DeferredAttrContext(mode, msym, phase, infer.emptyContext);
+        }
+
+        protected boolean validState(DeferredType dt) {
+            return dt.mode != null &&
+                    deferredAttrContext.mode.ordinal() <= dt.mode.ordinal();
+        }
+
+        @Override
+        public Type apply(Type t) {
+            if (t.tag != DEFERRED) {
+                return t.map(this);
+            } else {
+                DeferredType dt = (DeferredType)t;
+                Assert.check(validState(dt));
+                return typeOf(dt);
+            }
+        }
+
+        protected Type typeOf(DeferredType dt) {
+            switch (deferredAttrContext.mode) {
+                case CHECK:
+                    return dt.tree.type == null ? Type.noType : dt.tree.type;
+                case SPECULATIVE:
+                    return dt.speculativeType(deferredAttrContext.msym, deferredAttrContext.phase);
+            }
+            Assert.error();
+            return null;
+        }
+    }
+
+    /**
+     * Specialized recovery deferred mapping.
+     * Each deferred type D is mapped into a type T, where T is computed either by
+     * (i) retrieving the type that has already been computed for D during a previous
+     * attribution round (as before), or (ii) by synthesizing a new type R for D
+     * (the latter step is useful in a recovery scenario).
+     */
+    public class RecoveryDeferredTypeMap extends DeferredTypeMap {
+
+        public RecoveryDeferredTypeMap(AttrMode mode, Symbol msym, MethodResolutionPhase phase) {
+            super(mode, msym, phase);
+        }
+
+        @Override
+        protected Type typeOf(DeferredType dt) {
+            Type owntype = super.typeOf(dt);
+            return owntype.tag == NONE ?
+                        recover(dt) : owntype;
+        }
+
+        @Override
+        protected boolean validState(DeferredType dt) {
+            return true;
+        }
+
+        /**
+         * Synthesize a type for a deferred type that hasn't been previously
+         * reduced to an ordinary type. Functional deferred types and conditionals
+         * are mapped to themselves, in order to have a richer diagnostic
+         * representation. Remaining deferred types are attributed using
+         * a default expected type (j.l.Object).
+         */
+        private Type recover(DeferredType dt) {
+            dt.check(attr.new RecoveryInfo(deferredAttrContext));
+            switch (TreeInfo.skipParens(dt.tree).getTag()) {
+                case LAMBDA:
+                case REFERENCE:
+                case CONDEXPR:
+                    //propagate those deferred types to the
+                    //diagnostic formatter
+                    return dt;
+                default:
+                    return super.apply(dt);
+            }
+        }
+    }
+
+    /**
+     * Retrieves the list of inference variables that need to be inferred before
+     * an AST node can be type-checked
+     */
+    @SuppressWarnings("fallthrough")
+    List<Type> stuckVars(JCTree tree, ResultInfo resultInfo) {
+        if (resultInfo.pt.tag == NONE || resultInfo.pt.isErroneous()) {
+            return List.nil();
+        } else {
+            StuckChecker sc = new StuckChecker(resultInfo);
+            sc.scan(tree);
+            return List.from(sc.stuckVars);
+        }
+    }
+
+    /**
+     * This visitor is used to check that structural expressions conform
+     * to their target - this step is required as inference could end up
+     * inferring types that make some of the nested expressions incompatible
+     * with their corresponding instantiated target
+     */
+    class StuckChecker extends TreeScanner {
+
+        Type pt;
+        Filter<JCTree> treeFilter;
+        Infer.InferenceContext inferenceContext;
+        Set<Type> stuckVars = new HashSet<Type>();
+
+        final Filter<JCTree> argsFilter = new Filter<JCTree>() {
+            public boolean accepts(JCTree t) {
+                switch (t.getTag()) {
+                    case CONDEXPR:
+                    case LAMBDA:
+                    case PARENS:
+                    case REFERENCE:
+                        return true;
+                    default:
+                        return false;
+                }
+            }
+        };
+
+        final Filter<JCTree> lambdaBodyFilter = new Filter<JCTree>() {
+            public boolean accepts(JCTree t) {
+                switch (t.getTag()) {
+                    case BLOCK: case CASE: case CATCH: case DOLOOP:
+                    case FOREACHLOOP: case FORLOOP: case RETURN:
+                    case SYNCHRONIZED: case SWITCH: case TRY: case WHILELOOP:
+                        return true;
+                    default:
+                        return false;
+                }
+            }
+        };
+
+        StuckChecker(ResultInfo resultInfo) {
+            this.pt = resultInfo.pt;
+            this.inferenceContext = resultInfo.checkContext.inferenceContext();
+            this.treeFilter = argsFilter;
+        }
+
+        @Override
+        public void scan(JCTree tree) {
+            if (tree != null && treeFilter.accepts(tree)) {
+                super.scan(tree);
+            }
+        }
+
+        @Override
+        public void visitLambda(JCLambda tree) {
+            Type prevPt = pt;
+            Filter<JCTree> prevFilter = treeFilter;
+            try {
+                if (inferenceContext.inferenceVars().contains(pt)) {
+                    stuckVars.add(pt);
+                }
+                if (!types.isFunctionalInterface(pt.tsym)) {
+                    return;
+                }
+                Type descType = types.findDescriptorType(pt);
+                List<Type> freeArgVars = inferenceContext.freeVarsIn(descType.getParameterTypes());
+                if (!TreeInfo.isExplicitLambda(tree) &&
+                        freeArgVars.nonEmpty()) {
+                    stuckVars.addAll(freeArgVars);
+                }
+                pt = descType.getReturnType();
+                if (tree.getBodyKind() == JCTree.JCLambda.BodyKind.EXPRESSION) {
+                    scan(tree.getBody());
+                } else {
+                    treeFilter = lambdaBodyFilter;
+                    super.visitLambda(tree);
+                }
+            } finally {
+                pt = prevPt;
+                treeFilter = prevFilter;
+            }
+        }
+
+        @Override
+        public void visitReference(JCMemberReference tree) {
+            scan(tree.expr);
+            if (inferenceContext.inferenceVars().contains(pt)) {
+                stuckVars.add(pt);
+                return;
+            }
+            if (!types.isFunctionalInterface(pt.tsym)) {
+                return;
+            }
+            Type descType = types.findDescriptorType(pt);
+            List<Type> freeArgVars = inferenceContext.freeVarsIn(descType.getParameterTypes());
+            stuckVars.addAll(freeArgVars);
+        }
+
+        @Override
+        public void visitReturn(JCReturn tree) {
+            Filter<JCTree> prevFilter = treeFilter;
+            try {
+                treeFilter = argsFilter;
+                if (tree.expr != null) {
+                    scan(tree.expr);
+                }
+            } finally {
+                treeFilter = prevFilter;
+            }
+        }
+    }
+}
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java
index 3dad6e3b2c3..55e2e7144f1 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java
@@ -50,8 +50,8 @@ import static com.sun.tools.javac.tree.JCTree.Tag.*;
  *  (see AssignAnalyzer) ensures that each variable is assigned when used.  Definite
  *  unassignment analysis (see AssignAnalyzer) in ensures that no final variable
  *  is assigned more than once. Finally, local variable capture analysis (see CaptureAnalyzer)
- *  determines that local variables accessed within the scope of an inner class are
- *  either final or effectively-final.
+ *  determines that local variables accessed within the scope of an inner class/lambda
+ *  are either final or effectively-final.
  *
  *  <p>The JLS has a number of problems in the
  *  specification of these flow analysis problems. This implementation
@@ -211,6 +211,29 @@ public class Flow {
         new CaptureAnalyzer().analyzeTree(env, make);
     }
 
+    public void analyzeLambda(Env<AttrContext> env, JCLambda that, TreeMaker make, boolean speculative) {
+        java.util.Queue<JCDiagnostic> prevDeferredDiagnostics = log.deferredDiagnostics;
+        Filter<JCDiagnostic> prevDeferDiagsFilter = log.deferredDiagFilter;
+        //we need to disable diagnostics temporarily; the problem is that if
+        //a lambda expression contains e.g. an unreachable statement, an error
+        //message will be reported and will cause compilation to skip the flow analyis
+        //step - if we suppress diagnostics, we won't stop at Attr for flow-analysis
+        //related errors, which will allow for more errors to be detected
+        if (!speculative) {
+            log.deferAll();
+            log.deferredDiagnostics = ListBuffer.lb();
+        }
+        try {
+            new AliveAnalyzer().analyzeTree(env, that, make);
+            new FlowAnalyzer().analyzeTree(env, that, make);
+        } finally {
+            if (!speculative) {
+                log.deferredDiagFilter = prevDeferDiagsFilter;
+                log.deferredDiagnostics = prevDeferredDiagnostics;
+            }
+        }
+    }
+
     /**
      * Definite assignment scan mode
      */
@@ -659,6 +682,27 @@ public class Flow {
             }
         }
 
+        @Override
+        public void visitLambda(JCLambda tree) {
+            if (tree.type != null &&
+                    tree.type.isErroneous()) {
+                return;
+            }
+
+            ListBuffer<PendingExit> prevPending = pendingExits;
+            boolean prevAlive = alive;
+            try {
+                pendingExits = ListBuffer.lb();
+                alive = true;
+                scanStat(tree.body);
+                tree.canCompleteNormally = alive;
+            }
+            finally {
+                pendingExits = prevPending;
+                alive = prevAlive;
+            }
+        }
+
         public void visitTopLevel(JCCompilationUnit tree) {
             // Do nothing for TopLevel since each class is visited individually
         }
@@ -670,6 +714,9 @@ public class Flow {
         /** Perform definite assignment/unassignment analysis on a tree.
          */
         public void analyzeTree(Env<AttrContext> env, TreeMaker make) {
+            analyzeTree(env, env.tree, make);
+        }
+        public void analyzeTree(Env<AttrContext> env, JCTree tree, TreeMaker make) {
             try {
                 attrEnv = env;
                 Flow.this.make = make;
@@ -1185,6 +1232,29 @@ public class Flow {
             }
         }
 
+        @Override
+        public void visitLambda(JCLambda tree) {
+            if (tree.type != null &&
+                    tree.type.isErroneous()) {
+                return;
+            }
+            List<Type> prevCaught = caught;
+            List<Type> prevThrown = thrown;
+            ListBuffer<FlowPendingExit> prevPending = pendingExits;
+            try {
+                pendingExits = ListBuffer.lb();
+                caught = List.of(syms.throwableType); //inhibit exception checking
+                thrown = List.nil();
+                scan(tree.body);
+                tree.inferredThrownTypes = thrown;
+            }
+            finally {
+                pendingExits = prevPending;
+                caught = prevCaught;
+                thrown = prevThrown;
+            }
+        }
+
         public void visitTopLevel(JCCompilationUnit tree) {
             // Do nothing for TopLevel since each class is visited individually
         }
@@ -1267,6 +1337,10 @@ public class Flow {
          */
         int nextadr;
 
+        /** The first variable sequence number in a block that can return.
+         */
+        int returnadr;
+
         /** The list of unreferenced automatic resources.
          */
         Scope unrefdResources;
@@ -1296,8 +1370,8 @@ public class Flow {
 
         @Override
         void markDead() {
-            inits.inclRange(firstadr, nextadr);
-            uninits.inclRange(firstadr, nextadr);
+            inits.inclRange(returnadr, nextadr);
+            uninits.inclRange(returnadr, nextadr);
         }
 
         /*-------------- Processing variables ----------------------*/
@@ -1318,11 +1392,7 @@ public class Flow {
          *  index into the vars array.
          */
         void newVar(VarSymbol sym) {
-            if (nextadr == vars.length) {
-                VarSymbol[] newvars = new VarSymbol[nextadr * 2];
-                System.arraycopy(vars, 0, newvars, 0, nextadr);
-                vars = newvars;
-            }
+            vars = ArrayUtils.ensureCapacity(vars, nextadr);
             if ((sym.flags() & FINAL) == 0) {
                 sym.flags_field |= EFFECTIVELY_FINAL;
             }
@@ -1556,6 +1626,7 @@ public class Flow {
             Bits uninitsPrev = uninits.dup();
             int nextadrPrev = nextadr;
             int firstadrPrev = firstadr;
+            int returnadrPrev = returnadr;
             Lint lintPrev = lint;
 
             lint = lint.augment(tree.sym.annotations);
@@ -1600,6 +1671,7 @@ public class Flow {
                 uninits = uninitsPrev;
                 nextadr = nextadrPrev;
                 firstadr = firstadrPrev;
+                returnadr = returnadrPrev;
                 lint = lintPrev;
             }
         }
@@ -1984,6 +2056,35 @@ public class Flow {
             scan(tree.def);
         }
 
+        @Override
+        public void visitLambda(JCLambda tree) {
+            Bits prevUninits = uninits;
+            Bits prevInits = inits;
+            int returnadrPrev = returnadr;
+            ListBuffer<AssignPendingExit> prevPending = pendingExits;
+            try {
+                returnadr = nextadr;
+                pendingExits = new ListBuffer<AssignPendingExit>();
+                for (List<JCVariableDecl> l = tree.params; l.nonEmpty(); l = l.tail) {
+                    JCVariableDecl def = l.head;
+                    scan(def);
+                    inits.incl(def.sym.adr);
+                    uninits.excl(def.sym.adr);
+                }
+                if (tree.getBodyKind() == JCLambda.BodyKind.EXPRESSION) {
+                    scanExpr(tree.body);
+                } else {
+                    scan(tree.body);
+                }
+            }
+            finally {
+                returnadr = returnadrPrev;
+                uninits = prevUninits;
+                inits = prevInits;
+                pendingExits = prevPending;
+            }
+        }
+
         public void visitNewArray(JCNewArray tree) {
             scanExprs(tree.dims);
             scanExprs(tree.elems);
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java
index 659eeda274d..548bb9d8479 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java
@@ -25,18 +25,24 @@
 
 package com.sun.tools.javac.comp;
 
+import com.sun.tools.javac.code.*;
+import com.sun.tools.javac.code.Symbol.*;
+import com.sun.tools.javac.code.Type.*;
+import com.sun.tools.javac.code.Type.UndetVar.InferenceBound;
+import com.sun.tools.javac.comp.DeferredAttr.AttrMode;
+import com.sun.tools.javac.comp.Resolve.InapplicableMethodException;
+import com.sun.tools.javac.comp.Resolve.VerboseResolutionMode;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.tree.JCTree.JCTypeCast;
 import com.sun.tools.javac.tree.TreeInfo;
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.List;
-import com.sun.tools.javac.code.*;
-import com.sun.tools.javac.code.Type.*;
-import com.sun.tools.javac.code.Symbol.*;
-import com.sun.tools.javac.comp.Resolve.InapplicableMethodException;
-import com.sun.tools.javac.comp.Resolve.VerboseResolutionMode;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
 import static com.sun.tools.javac.code.TypeTags.*;
 
 /** Helper class for type parameter inference, used by the attribution phase.
@@ -57,6 +63,7 @@ public class Infer {
     Types types;
     Check chk;
     Resolve rs;
+    DeferredAttr deferredAttr;
     Log log;
     JCDiagnostic.Factory diags;
 
@@ -72,45 +79,44 @@ public class Infer {
         syms = Symtab.instance(context);
         types = Types.instance(context);
         rs = Resolve.instance(context);
+        deferredAttr = DeferredAttr.instance(context);
         log = Log.instance(context);
         chk = Check.instance(context);
         diags = JCDiagnostic.Factory.instance(context);
         inferenceException = new InferenceException(diags);
-
     }
 
+   /**
+    * This exception class is design to store a list of diagnostics corresponding
+    * to inference errors that can arise during a method applicability check.
+    */
     public static class InferenceException extends InapplicableMethodException {
         private static final long serialVersionUID = 0;
 
+        List<JCDiagnostic> messages = List.nil();
+
         InferenceException(JCDiagnostic.Factory diags) {
             super(diags);
         }
+
+        @Override
+        InapplicableMethodException setMessage(JCDiagnostic diag) {
+            messages = messages.append(diag);
+            return this;
+        }
+
+        @Override
+        public JCDiagnostic getDiagnostic() {
+            return messages.head;
+        }
+
+        void clear() {
+            messages = List.nil();
+        }
     }
 
     private final InferenceException inferenceException;
 
-/***************************************************************************
- * Auxiliary type values and classes
- ***************************************************************************/
-
-    /** A mapping that turns type variables into undetermined type variables.
-     */
-    List<Type> makeUndetvars(List<Type> tvars) {
-        List<Type> undetvars = Type.map(tvars, fromTypeVarFun);
-        for (Type t : undetvars) {
-            UndetVar uv = (UndetVar)t;
-            uv.hibounds = types.getBounds((TypeVar)uv.qtype);
-        }
-        return undetvars;
-    }
-    //where
-            Mapping fromTypeVarFun = new Mapping("fromTypeVarFun") {
-                public Type apply(Type t) {
-                    if (t.tag == TYPEVAR) return new UndetVar(t);
-                    else return t.map(this);
-                }
-            };
-
 /***************************************************************************
  * Mini/Maximization of UndetVars
  ***************************************************************************/
@@ -118,9 +124,9 @@ public class Infer {
     /** Instantiate undetermined type variable to its minimal upper bound.
      *  Throw a NoInstanceException if this not possible.
      */
-    void maximizeInst(UndetVar that, Warner warn) throws InferenceException {
-        List<Type> hibounds = Type.filter(that.hibounds, errorFilter);
-        if (that.eq.isEmpty()) {
+   void maximizeInst(UndetVar that, Warner warn) throws InferenceException {
+        List<Type> hibounds = Type.filter(that.getBounds(InferenceBound.UPPER), boundFilter);
+        if (that.getBounds(InferenceBound.EQ).isEmpty()) {
             if (hibounds.isEmpty())
                 that.inst = syms.objectType;
             else if (hibounds.tail.isEmpty())
@@ -128,7 +134,7 @@ public class Infer {
             else
                 that.inst = types.glb(hibounds);
         } else {
-            that.inst = that.eq.head;
+            that.inst = that.getBounds(InferenceBound.EQ).head;
         }
         if (that.inst == null ||
             that.inst.isErroneous())
@@ -137,10 +143,10 @@ public class Infer {
                             that.qtype, hibounds);
     }
 
-    private Filter<Type> errorFilter = new Filter<Type>() {
+    private Filter<Type> boundFilter = new Filter<Type>() {
         @Override
         public boolean accepts(Type t) {
-            return !t.isErroneous();
+            return !t.isErroneous() && t.tag != BOT;
         }
     };
 
@@ -148,11 +154,12 @@ public class Infer {
      *  Throw a NoInstanceException if this not possible.
      */
     void minimizeInst(UndetVar that, Warner warn) throws InferenceException {
-        List<Type> lobounds = Type.filter(that.lobounds, errorFilter);
-        if (that.eq.isEmpty()) {
-            if (lobounds.isEmpty())
-                that.inst = syms.botType;
-            else if (lobounds.tail.isEmpty())
+        List<Type> lobounds = Type.filter(that.getBounds(InferenceBound.LOWER), boundFilter);
+        if (that.getBounds(InferenceBound.EQ).isEmpty()) {
+            if (lobounds.isEmpty()) {
+                //do nothing - the inference variable is under-constrained
+                return;
+            } else if (lobounds.tail.isEmpty())
                 that.inst = lobounds.head.isPrimitive() ? syms.errType : lobounds.head;
             else {
                 that.inst = types.lub(lobounds);
@@ -162,120 +169,99 @@ public class Infer {
                         .setMessage("no.unique.minimal.instance.exists",
                                     that.qtype, lobounds);
         } else {
-            that.inst = that.eq.head;
+            that.inst = that.getBounds(InferenceBound.EQ).head;
         }
     }
 
-    Type asUndetType(Type t, List<Type> undetvars) {
-        return types.subst(t, inferenceVars(undetvars), undetvars);
-    }
-
-    List<Type> inferenceVars(List<Type> undetvars) {
-        ListBuffer<Type> tvars = ListBuffer.lb();
-        for (Type uv : undetvars) {
-            tvars.append(((UndetVar)uv).qtype);
-        }
-        return tvars.toList();
-    }
-
 /***************************************************************************
  * Exported Methods
  ***************************************************************************/
 
-    /** Try to instantiate expression type `that' to given type `to'.
-     *  If a maximal instantiation exists which makes this type
-     *  a subtype of type `to', return the instantiated type.
-     *  If no instantiation exists, or if several incomparable
-     *  best instantiations exist throw a NoInstanceException.
+    /**
+     * Instantiate uninferred inference variables (JLS 15.12.2.8). First
+     * if the method return type is non-void, we derive constraints from the
+     * expected type - then we use declared bound well-formedness to derive additional
+     * constraints. If no instantiation exists, or if several incomparable
+     * best instantiations exist throw a NoInstanceException.
      */
-    public List<Type> instantiateUninferred(DiagnosticPosition pos,
-                                List<Type> undetvars,
-                                List<Type> tvars,
-                                MethodType mtype,
-                                Attr.ResultInfo resultInfo,
-                                Warner warn) throws InferenceException {
+    public void instantiateUninferred(DiagnosticPosition pos,
+            InferenceContext inferenceContext,
+            MethodType mtype,
+            Attr.ResultInfo resultInfo,
+            Warner warn) throws InferenceException {
         Type to = resultInfo.pt;
-        if (to.tag == NONE) {
+        if (to.tag == NONE || resultInfo.checkContext.inferenceContext().free(resultInfo.pt)) {
             to = mtype.getReturnType().tag <= VOID ?
                     mtype.getReturnType() : syms.objectType;
         }
-        Type qtype1 = types.subst(mtype.getReturnType(), tvars, undetvars);
+        Type qtype1 = inferenceContext.asFree(mtype.getReturnType(), types);
         if (!types.isSubtype(qtype1,
                 qtype1.tag == UNDETVAR ? types.boxedTypeOrType(to) : to)) {
             throw inferenceException
-                .setMessage("infer.no.conforming.instance.exists",
-                            tvars, mtype.getReturnType(), to);
+                    .setMessage("infer.no.conforming.instance.exists",
+                    inferenceContext.restvars(), mtype.getReturnType(), to);
         }
 
-        List<Type> insttypes;
         while (true) {
             boolean stuck = true;
-            insttypes = List.nil();
-            for (Type t : undetvars) {
+            for (Type t : inferenceContext.undetvars) {
                 UndetVar uv = (UndetVar)t;
-                if (uv.inst == null && (uv.eq.nonEmpty() || !Type.containsAny(uv.hibounds, tvars))) {
+                if (uv.inst == null && (uv.getBounds(InferenceBound.EQ).nonEmpty() ||
+                        !inferenceContext.free(uv.getBounds(InferenceBound.UPPER)))) {
                     maximizeInst((UndetVar)t, warn);
                     stuck = false;
                 }
-                insttypes = insttypes.append(uv.inst == null ? uv.qtype : uv.inst);
             }
-            if (!Type.containsAny(insttypes, tvars)) {
+            if (inferenceContext.restvars().isEmpty()) {
                 //all variables have been instantiated - exit
                 break;
             } else if (stuck) {
                 //some variables could not be instantiated because of cycles in
                 //upper bounds - provide a (possibly recursive) default instantiation
-                insttypes = types.subst(insttypes,
-                    tvars,
-                    instantiateAsUninferredVars(undetvars, tvars));
+                instantiateAsUninferredVars(inferenceContext);
                 break;
             } else {
                 //some variables have been instantiated - replace newly instantiated
                 //variables in remaining upper bounds and continue
-                for (Type t : undetvars) {
+                for (Type t : inferenceContext.undetvars) {
                     UndetVar uv = (UndetVar)t;
-                    uv.hibounds = types.subst(uv.hibounds, tvars, insttypes);
+                    uv.substBounds(inferenceContext.inferenceVars(), inferenceContext.instTypes(), types);
                 }
             }
         }
-        return insttypes;
     }
 
     /**
      * Infer cyclic inference variables as described in 15.12.2.8.
      */
-    private List<Type> instantiateAsUninferredVars(List<Type> undetvars, List<Type> tvars) {
-        Assert.check(undetvars.length() == tvars.length());
-        ListBuffer<Type> insttypes = ListBuffer.lb();
+    private void instantiateAsUninferredVars(InferenceContext inferenceContext) {
         ListBuffer<Type> todo = ListBuffer.lb();
         //step 1 - create fresh tvars
-        for (Type t : undetvars) {
+        for (Type t : inferenceContext.undetvars) {
             UndetVar uv = (UndetVar)t;
             if (uv.inst == null) {
                 TypeSymbol fresh_tvar = new TypeSymbol(Flags.SYNTHETIC, uv.qtype.tsym.name, null, uv.qtype.tsym.owner);
-                fresh_tvar.type = new TypeVar(fresh_tvar, types.makeCompoundType(uv.hibounds), null);
+                fresh_tvar.type = new TypeVar(fresh_tvar, types.makeCompoundType(uv.getBounds(InferenceBound.UPPER)), null);
                 todo.append(uv);
                 uv.inst = fresh_tvar.type;
             }
-            insttypes.append(uv.inst);
         }
         //step 2 - replace fresh tvars in their bounds
-        List<Type> formals = tvars;
+        List<Type> formals = inferenceContext.inferenceVars();
         for (Type t : todo) {
             UndetVar uv = (UndetVar)t;
             TypeVar ct = (TypeVar)uv.inst;
-            ct.bound = types.glb(types.subst(types.getBounds(ct), tvars, insttypes.toList()));
+            ct.bound = types.glb(inferenceContext.asInstTypes(types.getBounds(ct), types));
             if (ct.bound.isErroneous()) {
                 //report inference error if glb fails
                 reportBoundError(uv, BoundErrorKind.BAD_UPPER);
             }
             formals = formals.tail;
         }
-        return insttypes.toList();
     }
 
-    /** Instantiate method type `mt' by finding instantiations of
-     *  `tvars' so that method can be applied to `argtypes'.
+    /** Instantiate a generic method type by finding instantiations for all its
+     * inference variables so that it can be applied to a given argument type list.
      */
     public Type instantiateMethod(Env<AttrContext> env,
                                   List<Type> tvars,
@@ -285,85 +271,65 @@ public class Infer {
                                   List<Type> argtypes,
                                   boolean allowBoxing,
                                   boolean useVarargs,
+                                  Resolve.MethodResolutionContext resolveContext,
                                   Warner warn) throws InferenceException {
         //-System.err.println("instantiateMethod(" + tvars + ", " + mt + ", " + argtypes + ")"); //DEBUG
-        List<Type> undetvars =  makeUndetvars(tvars);
+        final InferenceContext inferenceContext = new InferenceContext(tvars, this, true);
+        inferenceException.clear();
 
-        List<Type> capturedArgs =
-                rs.checkRawArgumentsAcceptable(env, undetvars, argtypes, mt.getParameterTypes(),
-                    allowBoxing, useVarargs, warn, new InferenceCheckHandler(undetvars));
+        try {
+            rs.checkRawArgumentsAcceptable(env, msym, resolveContext.attrMode(), inferenceContext,
+                    argtypes, mt.getParameterTypes(), allowBoxing, useVarargs, warn,
+                    new InferenceCheckHandler(inferenceContext));
 
-        // minimize as yet undetermined type variables
-        for (Type t : undetvars)
-            minimizeInst((UndetVar) t, warn);
-
-        /** Type variables instantiated to bottom */
-        ListBuffer<Type> restvars = new ListBuffer<Type>();
-
-        /** Undet vars instantiated to bottom */
-        final ListBuffer<Type> restundet = new ListBuffer<Type>();
-
-        /** Instantiated types or TypeVars if under-constrained */
-        ListBuffer<Type> insttypes = new ListBuffer<Type>();
-
-        /** Instantiated types or UndetVars if under-constrained */
-        ListBuffer<Type> undettypes = new ListBuffer<Type>();
-
-        for (Type t : undetvars) {
-            UndetVar uv = (UndetVar)t;
-            if (uv.inst.tag == BOT) {
-                restvars.append(uv.qtype);
-                restundet.append(uv);
-                insttypes.append(uv.qtype);
-                undettypes.append(uv);
-                uv.inst = null;
-            } else {
-                insttypes.append(uv.inst);
-                undettypes.append(uv.inst);
+            // minimize as yet undetermined type variables
+            for (Type t : inferenceContext.undetvars) {
+                minimizeInst((UndetVar)t, warn);
             }
-        }
-        checkWithinBounds(tvars, undetvars, insttypes.toList(), warn);
 
-        mt = (MethodType)types.subst(mt, tvars, insttypes.toList());
+            checkWithinBounds(inferenceContext, warn);
 
-        if (!restvars.isEmpty() && resultInfo != null) {
-            List<Type> restInferred =
-                    instantiateUninferred(env.tree.pos(), restundet.toList(), restvars.toList(), mt, resultInfo, warn);
-            checkWithinBounds(tvars, undetvars,
-                           types.subst(insttypes.toList(), restvars.toList(), restInferred), warn);
-            mt = (MethodType)types.subst(mt, restvars.toList(), restInferred);
-            if (rs.verboseResolutionMode.contains(VerboseResolutionMode.DEFERRED_INST)) {
-                log.note(env.tree.pos, "deferred.method.inst", msym, mt, resultInfo.pt);
+            mt = (MethodType)inferenceContext.asInstType(mt, types);
+
+            List<Type> restvars = inferenceContext.restvars();
+
+            if (!restvars.isEmpty()) {
+                if (resultInfo != null && !warn.hasNonSilentLint(Lint.LintCategory.UNCHECKED)) {
+                    instantiateUninferred(env.tree.pos(), inferenceContext, mt, resultInfo, warn);
+                    checkWithinBounds(inferenceContext, warn);
+                    mt = (MethodType)inferenceContext.asInstType(mt, types);
+                    if (rs.verboseResolutionMode.contains(VerboseResolutionMode.DEFERRED_INST)) {
+                        log.note(env.tree.pos, "deferred.method.inst", msym, mt, resultInfo.pt);
+                    }
+                }
             }
-        }
 
-        if (restvars.isEmpty() || resultInfo != null) {
-            // check that actuals conform to inferred formals
-            checkArgumentsAcceptable(env, capturedArgs, mt.getParameterTypes(), allowBoxing, useVarargs, warn);
+            // return instantiated version of method type
+            return mt;
+        } finally {
+            inferenceContext.notifyChange(types);
         }
-        // return instantiated version of method type
-        return mt;
     }
     //where
 
         /** inference check handler **/
         class InferenceCheckHandler implements Resolve.MethodCheckHandler {
 
-            List<Type> undetvars;
+            InferenceContext inferenceContext;
 
-            public InferenceCheckHandler(List<Type> undetvars) {
-                this.undetvars = undetvars;
+            public InferenceCheckHandler(InferenceContext inferenceContext) {
+                this.inferenceContext = inferenceContext;
             }
 
             public InapplicableMethodException arityMismatch() {
-                return inferenceException.setMessage("infer.arg.length.mismatch", inferenceVars(undetvars));
+                return inferenceException.setMessage("infer.arg.length.mismatch", inferenceContext.inferenceVars());
             }
             public InapplicableMethodException argumentMismatch(boolean varargs, JCDiagnostic details) {
                 String key = varargs ?
                         "infer.varargs.argument.mismatch" :
                         "infer.no.conforming.assignment.exists";
                 return inferenceException.setMessage(key,
-                        inferenceVars(undetvars), details);
+                        inferenceContext.inferenceVars(), details);
             }
             public InapplicableMethodException inaccessibleVarargs(Symbol location, Type expected) {
                 return inferenceException.setMessage("inaccessible.varargs.type",
@@ -371,51 +337,61 @@ public class Infer {
             }
         }
 
-        private void checkArgumentsAcceptable(Env<AttrContext> env, List<Type> actuals, List<Type> formals,
-                boolean allowBoxing, boolean useVarargs, Warner warn) {
-            try {
-                rs.checkRawArgumentsAcceptable(env, actuals, formals,
-                       allowBoxing, useVarargs, warn);
-            }
-            catch (InapplicableMethodException ex) {
-                // inferred method is not applicable
-                throw inferenceException.setMessage(ex.getDiagnostic());
-            }
-        }
-
     /** check that type parameters are within their bounds.
      */
-    void checkWithinBounds(List<Type> tvars,
-                           List<Type> undetvars,
-                           List<Type> arguments,
-                           Warner warn)
-        throws InferenceException {
-        List<Type> args = arguments;
-        for (Type t : undetvars) {
+    void checkWithinBounds(InferenceContext inferenceContext,
+                           Warner warn) throws InferenceException {
+        //step 1 - check compatibility of instantiated type w.r.t. initial bounds
+        for (Type t : inferenceContext.undetvars) {
             UndetVar uv = (UndetVar)t;
-            uv.hibounds = types.subst(uv.hibounds, tvars, arguments);
-            uv.lobounds = types.subst(uv.lobounds, tvars, arguments);
-            uv.eq = types.subst(uv.eq, tvars, arguments);
-            checkCompatibleUpperBounds(uv, tvars);
-            if (args.head.tag != TYPEVAR || !args.head.containsAny(tvars)) {
-                Type inst = args.head;
-                for (Type u : uv.hibounds) {
-                    if (!types.isSubtypeUnchecked(inst, types.subst(u, tvars, undetvars), warn)) {
+            uv.substBounds(inferenceContext.inferenceVars(), inferenceContext.instTypes(), types);
+            checkCompatibleUpperBounds(uv, inferenceContext.inferenceVars());
+            if (!inferenceContext.restvars().contains(uv.qtype)) {
+                Type inst = inferenceContext.asInstType(t, types);
+                for (Type u : uv.getBounds(InferenceBound.UPPER)) {
+                    if (!types.isSubtypeUnchecked(inst, inferenceContext.asFree(u, types), warn)) {
                         reportBoundError(uv, BoundErrorKind.UPPER);
                     }
                 }
-                for (Type l : uv.lobounds) {
-                    if (!types.isSubtypeUnchecked(types.subst(l, tvars, undetvars), inst, warn)) {
+                for (Type l : uv.getBounds(InferenceBound.LOWER)) {
+                    Assert.check(!inferenceContext.free(l));
+                    if (!types.isSubtypeUnchecked(l, inst, warn)) {
                         reportBoundError(uv, BoundErrorKind.LOWER);
                     }
                 }
-                for (Type e : uv.eq) {
-                    if (!types.isSameType(inst, types.subst(e, tvars, undetvars))) {
+                for (Type e : uv.getBounds(InferenceBound.EQ)) {
+                    Assert.check(!inferenceContext.free(e));
+                    if (!types.isSameType(inst, e)) {
                         reportBoundError(uv, BoundErrorKind.EQ);
                     }
                 }
             }
-            args = args.tail;
+        }
+
+        //step 2 - check that eq bounds are consistent w.r.t. eq/lower bounds
+        for (Type t : inferenceContext.undetvars) {
+            UndetVar uv = (UndetVar)t;
+            //check eq bounds consistency
+            Type eq = null;
+            for (Type e : uv.getBounds(InferenceBound.EQ)) {
+                Assert.check(!inferenceContext.free(e));
+                if (eq != null && !types.isSameType(e, eq)) {
+                    reportBoundError(uv, BoundErrorKind.EQ);
+                }
+                eq = e;
+                for (Type l : uv.getBounds(InferenceBound.LOWER)) {
+                    Assert.check(!inferenceContext.free(l));
+                    if (!types.isSubtypeUnchecked(l, e, warn)) {
+                        reportBoundError(uv, BoundErrorKind.BAD_EQ_LOWER);
+                    }
+                }
+                for (Type u : uv.getBounds(InferenceBound.UPPER)) {
+                    if (inferenceContext.free(u)) continue;
+                    if (!types.isSubtypeUnchecked(e, u, warn)) {
+                        reportBoundError(uv, BoundErrorKind.BAD_EQ_UPPER);
+                    }
+                }
+            }
         }
     }
 
@@ -423,7 +399,7 @@ public class Infer {
         // VGJ: sort of inlined maximizeInst() below.  Adding
         // bounds can cause lobounds that are above hibounds.
         ListBuffer<Type> hiboundsNoVars = ListBuffer.lb();
-        for (Type t : Type.filter(uv.hibounds, errorFilter)) {
+        for (Type t : Type.filter(uv.getBounds(InferenceBound.UPPER), boundFilter)) {
             if (!t.containsAny(tvars)) {
                 hiboundsNoVars.append(t);
             }
@@ -444,25 +420,43 @@ public class Infer {
         BAD_UPPER() {
             @Override
             InapplicableMethodException setMessage(InferenceException ex, UndetVar uv) {
-                return ex.setMessage("incompatible.upper.bounds", uv.qtype, uv.hibounds);
+                return ex.setMessage("incompatible.upper.bounds", uv.qtype,
+                        uv.getBounds(InferenceBound.UPPER));
+            }
+        },
+        BAD_EQ_UPPER() {
+            @Override
+            InapplicableMethodException setMessage(InferenceException ex, UndetVar uv) {
+                return ex.setMessage("incompatible.eq.upper.bounds", uv.qtype,
+                        uv.getBounds(InferenceBound.EQ), uv.getBounds(InferenceBound.UPPER));
+            }
+        },
+        BAD_EQ_LOWER() {
+            @Override
+            InapplicableMethodException setMessage(InferenceException ex, UndetVar uv) {
+                return ex.setMessage("incompatible.eq.lower.bounds", uv.qtype,
+                        uv.getBounds(InferenceBound.EQ), uv.getBounds(InferenceBound.LOWER));
             }
         },
         UPPER() {
             @Override
             InapplicableMethodException setMessage(InferenceException ex, UndetVar uv) {
-                return ex.setMessage("inferred.do.not.conform.to.upper.bounds", uv.inst, uv.hibounds);
+                return ex.setMessage("inferred.do.not.conform.to.upper.bounds", uv.inst,
+                        uv.getBounds(InferenceBound.UPPER));
             }
         },
         LOWER() {
             @Override
             InapplicableMethodException setMessage(InferenceException ex, UndetVar uv) {
-                return ex.setMessage("inferred.do.not.conform.to.lower.bounds", uv.inst, uv.lobounds);
+                return ex.setMessage("inferred.do.not.conform.to.lower.bounds", uv.inst,
+                        uv.getBounds(InferenceBound.LOWER));
             }
         },
         EQ() {
             @Override
             InapplicableMethodException setMessage(InferenceException ex, UndetVar uv) {
-                return ex.setMessage("inferred.do.not.conform.to.eq.bounds", uv.inst, uv.eq);
+                return ex.setMessage("inferred.do.not.conform.to.eq.bounds", uv.inst,
+                        uv.getBounds(InferenceBound.EQ));
             }
         };
 
@@ -473,6 +467,75 @@ public class Infer {
         throw bk.setMessage(inferenceException, uv);
     }
 
+    // <editor-fold desc="functional interface instantiation">
+    /**
+     * This method is used to infer a suitable target functional interface in case
+     * the original parameterized interface contains wildcards. An inference process
+     * is applied so that wildcard bounds, as well as explicit lambda/method ref parameters
+     * (where applicable) are used to constraint the solution.
+     */
+    public Type instantiateFunctionalInterface(DiagnosticPosition pos, Type funcInterface,
+            List<Type> paramTypes, Check.CheckContext checkContext) {
+        if (types.capture(funcInterface) == funcInterface) {
+            //if capture doesn't change the type then return the target unchanged
+            //(this means the target contains no wildcards!)
+            return funcInterface;
+        } else {
+            Type formalInterface = funcInterface.tsym.type;
+            InferenceContext funcInterfaceContext =
+                    new InferenceContext(funcInterface.tsym.type.getTypeArguments(), this, false);
+            if (paramTypes != null) {
+                //get constraints from explicit params (this is done by
+                //checking that explicit param types are equal to the ones
+                //in the functional interface descriptors)
+                List<Type> descParameterTypes = types.findDescriptorType(formalInterface).getParameterTypes();
+                if (descParameterTypes.size() != paramTypes.size()) {
+                    checkContext.report(pos, diags.fragment("incompatible.arg.types.in.lambda"));
+                    return types.createErrorType(funcInterface);
+                }
+                for (Type p : descParameterTypes) {
+                    if (!types.isSameType(funcInterfaceContext.asFree(p, types), paramTypes.head)) {
+                        checkContext.report(pos, diags.fragment("no.suitable.functional.intf.inst", funcInterface));
+                        return types.createErrorType(funcInterface);
+                    }
+                    paramTypes = paramTypes.tail;
+                }
+                for (Type t : funcInterfaceContext.undetvars) {
+                    UndetVar uv = (UndetVar)t;
+                    minimizeInst(uv, Warner.noWarnings);
+                    if (uv.inst == null &&
+                            Type.filter(uv.getBounds(InferenceBound.UPPER), boundFilter).nonEmpty()) {
+                        maximizeInst(uv, Warner.noWarnings);
+                    }
+                }
+
+                formalInterface = funcInterfaceContext.asInstType(formalInterface, types);
+            }
+            ListBuffer<Type> typeargs = ListBuffer.lb();
+            List<Type> actualTypeargs = funcInterface.getTypeArguments();
+            //for remaining uninferred type-vars in the functional interface type,
+            //simply replace the wildcards with its bound
+            for (Type t : formalInterface.getTypeArguments()) {
+                if (actualTypeargs.head.tag == WILDCARD) {
+                    WildcardType wt = (WildcardType)actualTypeargs.head;
+                    typeargs.append(wt.type);
+                } else {
+                    typeargs.append(actualTypeargs.head);
+                }
+                actualTypeargs = actualTypeargs.tail;
+            }
+            Type owntype = types.subst(formalInterface, funcInterfaceContext.inferenceVars(), typeargs.toList());
+            if (!chk.checkValidGenericType(owntype)) {
+                //if the inferred functional interface type is not well-formed,
+                //or if it's not a subtype of the original target, issue an error
+                checkContext.report(pos, diags.fragment("no.suitable.functional.intf.inst", funcInterface));
+                return types.createErrorType(funcInterface);
+            }
+            return owntype;
+        }
+    }
+    // </editor-fold>
+
     /**
      * Compute a synthetic method type corresponding to the requested polymorphic
      * method signature. The target return type is computed from the immediately
@@ -480,6 +543,7 @@ public class Infer {
      */
     Type instantiatePolymorphicSignatureInstance(Env<AttrContext> env,
                                             MethodSymbol spMethod,  // sig. poly. method or null if none
+                                            Resolve.MethodResolutionContext resolveContext,
                                             List<Type> argtypes) {
         final Type restype;
 
@@ -509,7 +573,7 @@ public class Infer {
                 restype = syms.objectType;
         }
 
-        List<Type> paramtypes = Type.map(argtypes, implicitArgType);
+        List<Type> paramtypes = Type.map(argtypes, new ImplicitArgType(spMethod, resolveContext.step));
         List<Type> exType = spMethod != null ?
             spMethod.getThrownTypes() :
             List.of(syms.throwableType); // make it throw all exceptions
@@ -521,14 +585,234 @@ public class Infer {
         return mtype;
     }
     //where
-        Mapping implicitArgType = new Mapping ("implicitArgType") {
-                public Type apply(Type t) {
-                    t = types.erasure(t);
-                    if (t.tag == BOT)
-                        // nulls type as the marker type Null (which has no instances)
-                        // infer as java.lang.Void for now
-                        t = types.boxedClass(syms.voidType).type;
-                    return t;
+        class ImplicitArgType extends DeferredAttr.DeferredTypeMap {
+
+            public ImplicitArgType(Symbol msym, Resolve.MethodResolutionPhase phase) {
+                deferredAttr.super(AttrMode.SPECULATIVE, msym, phase);
+            }
+
+            public Type apply(Type t) {
+                t = types.erasure(super.apply(t));
+                if (t.tag == BOT)
+                    // nulls type as the marker type Null (which has no instances)
+                    // infer as java.lang.Void for now
+                    t = types.boxedClass(syms.voidType).type;
+                return t;
+            }
+        }
+
+    /**
+     * Mapping that turns inference variables into undet vars
+     * (used by inference context)
+     */
+    class FromTypeVarFun extends Mapping {
+
+        boolean includeBounds;
+
+        FromTypeVarFun(boolean includeBounds) {
+            super("fromTypeVarFunWithBounds");
+            this.includeBounds = includeBounds;
+        }
+
+        public Type apply(Type t) {
+            if (t.tag == TYPEVAR) return new UndetVar((TypeVar)t, types, includeBounds);
+            else return t.map(this);
+        }
+    };
+
+    /**
+     * An inference context keeps track of the set of variables that are free
+     * in the current context. It provides utility methods for opening/closing
+     * types to their corresponding free/closed forms. It also provide hooks for
+     * attaching deferred post-inference action (see PendingCheck). Finally,
+     * it can be used as an entry point for performing upper/lower bound inference
+     * (see InferenceKind).
+     */
+    static class InferenceContext {
+
+        /**
+        * Single-method-interface for defining inference callbacks. Certain actions
+        * (i.e. subtyping checks) might need to be redone after all inference variables
+        * have been fixed.
+        */
+        interface FreeTypeListener {
+            void typesInferred(InferenceContext inferenceContext);
+        }
+
+        /** list of inference vars as undet vars */
+        List<Type> undetvars;
+
+        /** list of inference vars in this context */
+        List<Type> inferencevars;
+
+        java.util.Map<FreeTypeListener, List<Type>> freeTypeListeners =
+                new java.util.HashMap<FreeTypeListener, List<Type>>();
+
+        List<FreeTypeListener> freetypeListeners = List.nil();
+
+        public InferenceContext(List<Type> inferencevars, Infer infer, boolean includeBounds) {
+            this.undetvars = Type.map(inferencevars, infer.new FromTypeVarFun(includeBounds));
+            this.inferencevars = inferencevars;
+        }
+
+        /**
+         * returns the list of free variables (as type-variables) in this
+         * inference context
+         */
+        List<Type> inferenceVars() {
+            return inferencevars;
+        }
+
+        /**
+         * returns the list of uninstantiated variables (as type-variables) in this
+         * inference context (usually called after instantiate())
+         */
+        List<Type> restvars() {
+            List<Type> undetvars = this.undetvars;
+            ListBuffer<Type> restvars = ListBuffer.lb();
+            for (Type t : instTypes()) {
+                UndetVar uv = (UndetVar)undetvars.head;
+                if (uv.qtype == t) {
+                    restvars.append(t);
                 }
-        };
+                undetvars = undetvars.tail;
+            }
+            return restvars.toList();
+        }
+
+        /**
+         * is this type free?
+         */
+        final boolean free(Type t) {
+            return t.containsAny(inferencevars);
+        }
+
+        final boolean free(List<Type> ts) {
+            for (Type t : ts) {
+                if (free(t)) return true;
+            }
+            return false;
+        }
+
+        /**
+         * Returns a list of free variables in a given type
+         */
+        final List<Type> freeVarsIn(Type t) {
+            ListBuffer<Type> buf = ListBuffer.lb();
+            for (Type iv : inferenceVars()) {
+                if (t.contains(iv)) {
+                    buf.add(iv);
+                }
+            }
+            return buf.toList();
+        }
+
+        final List<Type> freeVarsIn(List<Type> ts) {
+            ListBuffer<Type> buf = ListBuffer.lb();
+            for (Type t : ts) {
+                buf.appendList(freeVarsIn(t));
+            }
+            ListBuffer<Type> buf2 = ListBuffer.lb();
+            for (Type t : buf) {
+                if (!buf2.contains(t)) {
+                    buf2.add(t);
+                }
+            }
+            return buf2.toList();
+        }
+
+        /**
+         * Replace all free variables in a given type with corresponding
+         * undet vars (used ahead of subtyping/compatibility checks to allow propagation
+         * of inference constraints).
+         */
+        final Type asFree(Type t, Types types) {
+            return types.subst(t, inferencevars, undetvars);
+        }
+
+        final List<Type> asFree(List<Type> ts, Types types) {
+            ListBuffer<Type> buf = ListBuffer.lb();
+            for (Type t : ts) {
+                buf.append(asFree(t, types));
+            }
+            return buf.toList();
+        }
+
+        List<Type> instTypes() {
+            ListBuffer<Type> buf = ListBuffer.lb();
+            for (Type t : undetvars) {
+                UndetVar uv = (UndetVar)t;
+                buf.append(uv.inst != null ? uv.inst : uv.qtype);
+            }
+            return buf.toList();
+        }
+
+        /**
+         * Replace all free variables in a given type with corresponding
+         * instantiated types - if one or more free variable has not been
+         * fully instantiated, it will still be available in the resulting type.
+         */
+        Type asInstType(Type t, Types types) {
+            return types.subst(t, inferencevars, instTypes());
+        }
+
+        List<Type> asInstTypes(List<Type> ts, Types types) {
+            ListBuffer<Type> buf = ListBuffer.lb();
+            for (Type t : ts) {
+                buf.append(asInstType(t, types));
+            }
+            return buf.toList();
+        }
+
+        /**
+         * Add custom hook for performing post-inference action
+         */
+        void addFreeTypeListener(List<Type> types, FreeTypeListener ftl) {
+            freeTypeListeners.put(ftl, freeVarsIn(types));
+        }
+
+        /**
+         * Mark the inference context as complete and trigger evaluation
+         * of all deferred checks.
+         */
+        void notifyChange(Types types) {
+            InferenceException thrownEx = null;
+            for (Map.Entry<FreeTypeListener, List<Type>> entry :
+                    new HashMap<FreeTypeListener, List<Type>>(freeTypeListeners).entrySet()) {
+                if (!Type.containsAny(entry.getValue(), restvars())) {
+                    try {
+                        entry.getKey().typesInferred(this);
+                        freeTypeListeners.remove(entry.getKey());
+                    } catch (InferenceException ex) {
+                        if (thrownEx == null) {
+                            thrownEx = ex;
+                        }
+                    }
+                }
+            }
+            //inference exception multiplexing - present any inference exception
+            //thrown when processing listeners as a single one
+            if (thrownEx != null) {
+                throw thrownEx;
+            }
+        }
+
+        void solveAny(List<Type> varsToSolve, Types types, Infer infer) {
+            boolean progress = false;
+            for (Type t : varsToSolve) {
+                UndetVar uv = (UndetVar)asFree(t, types);
+                if (uv.inst == null) {
+                    infer.minimizeInst(uv, Warner.noWarnings);
+                    if (uv.inst != null) {
+                        progress = true;
+                    }
+                }
+            }
+            if (!progress) {
+                throw infer.inferenceException.setMessage("cyclic.inference", varsToSolve);
+            }
+        }
     }
+
+    final InferenceContext emptyContext = new InferenceContext(List.<Type>nil(), this, false);
+}
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java
index f7674052cbc..57604cbe557 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java
@@ -1998,7 +1998,7 @@ public class Lower extends TreeTranslator {
             // replace with <BoxedClass>.TYPE
             ClassSymbol c = types.boxedClass(type);
             Symbol typeSym =
-                rs.access(
+                rs.accessBase(
                     rs.findIdentInType(attrEnv, c.type, names.TYPE, VAR),
                     pos, c.type, names.TYPE, true);
             if (typeSym.kind == VAR)
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
index 70f021da099..a57f3ba8019 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
@@ -604,6 +604,10 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
             env.dup(tree, env.info.dup(env.info.scope.dupUnshared()));
         localEnv.enclMethod = tree;
         localEnv.info.scope.owner = tree.sym;
+        if (tree.sym.type != null) {
+            //when this is called in the enter stage, there's no type to be set
+            localEnv.info.returnResult = attr.new ResultInfo(VAL, tree.sym.type.getReturnType());
+        }
         if ((tree.mods.flags & STATIC) != 0) localEnv.info.staticLevel++;
         return localEnv;
     }
@@ -642,7 +646,9 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
         tree.sym = v;
         if (tree.init != null) {
             v.flags_field |= HASINIT;
-            if ((v.flags_field & FINAL) != 0 && !tree.init.hasTag(NEWCLASS)) {
+            if ((v.flags_field & FINAL) != 0 &&
+                    !tree.init.hasTag(NEWCLASS) &&
+                    !tree.init.hasTag(LAMBDA)) {
                 Env<AttrContext> initEnv = getInitEnv(tree, env);
                 initEnv.info.enclVar = v;
                 v.setLazyConstValue(initEnv(tree, initEnv), attr, tree.init);
@@ -667,7 +673,7 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
     Env<AttrContext> initEnv(JCVariableDecl tree, Env<AttrContext> env) {
         Env<AttrContext> localEnv = env.dupto(new AttrContextEnv(tree, env.info.dup()));
         if (tree.sym.owner.kind == TYP) {
-            localEnv.info.scope = new Scope.DelegatedScope(env.info.scope);
+            localEnv.info.scope = env.info.scope.dupUnshared();
             localEnv.info.scope.owner = tree.sym;
         }
         if ((tree.mods.flags & STATIC) != 0 ||
@@ -970,9 +976,11 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
                 List<Type> thrown = List.nil();
                 long ctorFlags = 0;
                 boolean based = false;
+                boolean addConstructor = true;
                 if (c.name.isEmpty()) {
                     JCNewClass nc = (JCNewClass)env.next.tree;
                     if (nc.constructor != null) {
+                        addConstructor = nc.constructor.kind != ERR;
                         Type superConstrType = types.memberType(c.type,
                                                                 nc.constructor);
                         argtypes = superConstrType.getParameterTypes();
@@ -985,10 +993,12 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
                         thrown = superConstrType.getThrownTypes();
                     }
                 }
-                JCTree constrDef = DefaultConstructor(make.at(tree.pos), c,
-                                                    typarams, argtypes, thrown,
-                                                    ctorFlags, based);
-                tree.defs = tree.defs.prepend(constrDef);
+                if (addConstructor) {
+                    JCTree constrDef = DefaultConstructor(make.at(tree.pos), c,
+                                                        typarams, argtypes, thrown,
+                                                        ctorFlags, based);
+                    tree.defs = tree.defs.prepend(constrDef);
+                }
             }
 
             // If this is a class, enter symbols for this and super into
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java
index b10f4b7da7a..ba02bb77e80 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java
@@ -27,14 +27,20 @@ package com.sun.tools.javac.comp;
 
 import com.sun.tools.javac.api.Formattable.LocalizedString;
 import com.sun.tools.javac.code.*;
-import com.sun.tools.javac.code.Type.*;
 import com.sun.tools.javac.code.Symbol.*;
+import com.sun.tools.javac.code.Type.*;
 import com.sun.tools.javac.comp.Attr.ResultInfo;
 import com.sun.tools.javac.comp.Check.CheckContext;
+import com.sun.tools.javac.comp.DeferredAttr.AttrMode;
+import com.sun.tools.javac.comp.DeferredAttr.DeferredAttrContext;
+import com.sun.tools.javac.comp.DeferredAttr.DeferredType;
+import com.sun.tools.javac.comp.Infer.InferenceContext;
+import com.sun.tools.javac.comp.Infer.InferenceContext.FreeTypeListener;
 import com.sun.tools.javac.comp.Resolve.MethodResolutionContext.Candidate;
 import com.sun.tools.javac.jvm.*;
 import com.sun.tools.javac.tree.*;
 import com.sun.tools.javac.tree.JCTree.*;
+import com.sun.tools.javac.tree.JCTree.JCMemberReference.ReferenceKind;
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
@@ -44,9 +50,8 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.EnumMap;
 import java.util.EnumSet;
-import java.util.HashSet;
+import java.util.Iterator;
 import java.util.Map;
-import java.util.Set;
 
 import javax.lang.model.element.ElementVisitor;
 
@@ -73,6 +78,7 @@ public class Resolve {
     Log log;
     Symtab syms;
     Attr attr;
+    DeferredAttr deferredAttr;
     Check chk;
     Infer infer;
     ClassReader reader;
@@ -93,10 +99,6 @@ public class Resolve {
 
         varNotFound = new
             SymbolNotFoundError(ABSENT_VAR);
-        wrongMethod = new
-            InapplicableSymbolError();
-        wrongMethods = new
-            InapplicableSymbolsError();
         methodNotFound = new
             SymbolNotFoundError(ABSENT_MTH);
         typeNotFound = new
@@ -105,6 +107,7 @@ public class Resolve {
         names = Names.instance(context);
         log = Log.instance(context);
         attr = Attr.instance(context);
+        deferredAttr = DeferredAttr.instance(context);
         chk = Check.instance(context);
         infer = Infer.instance(context);
         reader = ClassReader.instance(context);
@@ -127,8 +130,6 @@ public class Resolve {
     /** error symbols, which are returned when resolution fails
      */
     private final SymbolNotFoundError varNotFound;
-    private final InapplicableSymbolError wrongMethod;
-    private final InapplicableSymbolsError wrongMethods;
     private final SymbolNotFoundError methodNotFound;
     private final SymbolNotFoundError typeNotFound;
 
@@ -215,9 +216,12 @@ public class Resolve {
             }
         }
         String key = success ? "verbose.resolve.multi" : "verbose.resolve.multi.1";
+        List<Type> argtypes2 = Type.map(argtypes,
+                    deferredAttr.new RecoveryDeferredTypeMap(AttrMode.SPECULATIVE, bestSoFar, currentResolutionContext.step));
         JCDiagnostic main = diags.note(log.currentSource(), dpos, key, name,
                 site.tsym, mostSpecificPos, currentResolutionContext.step,
-                methodArguments(argtypes), methodArguments(typeargtypes));
+                methodArguments(argtypes2),
+                methodArguments(typeargtypes));
         JCDiagnostic d = new JCDiagnostic.MultilineDiagnostic(main, subDiags.toList());
         log.report(d);
     }
@@ -247,7 +251,7 @@ public class Resolve {
     /** An environment is "static" if its static level is greater than
      *  the one of its outer environment
      */
-    static boolean isStatic(Env<AttrContext> env) {
+    protected static boolean isStatic(Env<AttrContext> env) {
         return env.info.staticLevel > env.outer.info.staticLevel;
     }
 
@@ -445,8 +449,18 @@ public class Resolve {
                         boolean useVarargs,
                         Warner warn)
         throws Infer.InferenceException {
-        if (useVarargs && (m.flags() & VARARGS) == 0)
-            throw inapplicableMethodException.setMessage();
+        if (useVarargs && (m.flags() & VARARGS) == 0) {
+            //better error recovery - if we stumbled upon a non-varargs method
+            //during varargs applicability phase, the method should be treated as
+            //not applicable; the reason for inapplicability can be found in the
+            //candidate for 'm' that was created during the BOX phase.
+            Candidate prevCandidate = currentResolutionContext.getCandidate(m, BOX);
+            JCDiagnostic details = null;
+            if (prevCandidate != null && !prevCandidate.isApplicable()) {
+                details = prevCandidate.details;
+            }
+            throw inapplicableMethodException.setMessage(details);
+        }
         Type mt = types.memberType(site, m);
 
         // tvars is the list of formal type variables for which type arguments
@@ -497,13 +511,34 @@ public class Resolve {
                                     argtypes,
                                     allowBoxing,
                                     useVarargs,
+                                    currentResolutionContext,
                                     warn);
 
-        checkRawArgumentsAcceptable(env, argtypes, mt.getParameterTypes(),
+        checkRawArgumentsAcceptable(env, m, argtypes, mt.getParameterTypes(),
                                 allowBoxing, useVarargs, warn);
         return mt;
     }
 
+    Type checkMethod(Env<AttrContext> env,
+                     Type site,
+                     Symbol m,
+                     ResultInfo resultInfo,
+                     List<Type> argtypes,
+                     List<Type> typeargtypes,
+                     Warner warn) {
+        MethodResolutionContext prevContext = currentResolutionContext;
+        try {
+            currentResolutionContext = new MethodResolutionContext();
+            currentResolutionContext.attrMode = DeferredAttr.AttrMode.CHECK;
+            MethodResolutionPhase step = currentResolutionContext.step = env.info.pendingResolutionPhase;
+            return rawInstantiate(env, site, m, resultInfo, argtypes, typeargtypes,
+                    step.isBoxingRequired(), step.isVarargsRequired(), warn);
+        }
+        finally {
+            currentResolutionContext = prevContext;
+        }
+    }
+
     /** Same but returns null instead throwing a NoInstanceException
      */
     Type instantiate(Env<AttrContext> env,
@@ -526,13 +561,14 @@ public class Resolve {
     /** Check if a parameter list accepts a list of args.
      */
     boolean argumentsAcceptable(Env<AttrContext> env,
+                                Symbol msym,
                                 List<Type> argtypes,
                                 List<Type> formals,
                                 boolean allowBoxing,
                                 boolean useVarargs,
                                 Warner warn) {
         try {
-            checkRawArgumentsAcceptable(env, argtypes, formals, allowBoxing, useVarargs, warn);
+            checkRawArgumentsAcceptable(env, msym, argtypes, formals, allowBoxing, useVarargs, warn);
             return true;
         } catch (InapplicableMethodException ex) {
             return false;
@@ -579,12 +615,13 @@ public class Resolve {
     };
 
     void checkRawArgumentsAcceptable(Env<AttrContext> env,
+                                Symbol msym,
                                 List<Type> argtypes,
                                 List<Type> formals,
                                 boolean allowBoxing,
                                 boolean useVarargs,
                                 Warner warn) {
-        checkRawArgumentsAcceptable(env, List.<Type>nil(), argtypes, formals,
+        checkRawArgumentsAcceptable(env, msym, currentResolutionContext.attrMode(), infer.emptyContext, argtypes, formals,
                 allowBoxing, useVarargs, warn, resolveHandler);
     }
 
@@ -594,35 +631,41 @@ public class Resolve {
      * compatible (by method invocation conversion) with the types in F.
      *
      * Since this routine is shared between overload resolution and method
-     * type-inference, it is crucial that actual types are converted to the
-     * corresponding 'undet' form (i.e. where inference variables are replaced
-     * with undetvars) so that constraints can be propagated and collected.
+     * type-inference, a (possibly empty) inference context is used to convert
+     * formal types to the corresponding 'undet' form ahead of a compatibility
+     * check so that constraints can be propagated and collected.
      *
-     * Moreover, if one or more types in A is a poly type, this routine calls
-     * Infer.instantiateArg in order to complete the poly type (this might involve
-     * deferred attribution).
+     * Moreover, if one or more types in A is a deferred type, this routine uses
+     * DeferredAttr in order to perform deferred attribution. If one or more actual
+     * deferred types are stuck, they are placed in a queue and revisited later
+     * after the remainder of the arguments have been seen. If this is not sufficient
+     * to 'unstuck' the argument, a cyclic inference error is called out.
      *
      * A method check handler (see above) is used in order to report errors.
      */
-    List<Type> checkRawArgumentsAcceptable(Env<AttrContext> env,
-                                List<Type> undetvars,
+    void checkRawArgumentsAcceptable(final Env<AttrContext> env,
+                                Symbol msym,
+                                DeferredAttr.AttrMode mode,
+                                final Infer.InferenceContext inferenceContext,
                                 List<Type> argtypes,
                                 List<Type> formals,
                                 boolean allowBoxing,
                                 boolean useVarargs,
                                 Warner warn,
-                                MethodCheckHandler handler) {
+                                final MethodCheckHandler handler) {
         Type varargsFormal = useVarargs ? formals.last() : null;
-        ListBuffer<Type> checkedArgs = ListBuffer.lb();
 
         if (varargsFormal == null &&
                 argtypes.size() != formals.size()) {
             throw handler.arityMismatch(); // not enough args
         }
 
+        DeferredAttr.DeferredAttrContext deferredAttrContext =
+                deferredAttr.new DeferredAttrContext(mode, msym, currentResolutionContext.step, inferenceContext);
+
         while (argtypes.nonEmpty() && formals.head != varargsFormal) {
-            ResultInfo resultInfo = methodCheckResult(formals.head, allowBoxing, false, undetvars, handler, warn);
-            checkedArgs.append(resultInfo.check(env.tree.pos(), argtypes.head));
+            ResultInfo mresult = methodCheckResult(formals.head, allowBoxing, false, inferenceContext, deferredAttrContext, handler, warn);
+            mresult.check(null, argtypes.head);
             argtypes = argtypes.tail;
             formals = formals.tail;
         }
@@ -634,19 +677,33 @@ public class Resolve {
         if (useVarargs) {
             //note: if applicability check is triggered by most specific test,
             //the last argument of a varargs is _not_ an array type (see JLS 15.12.2.5)
-            Type elt = types.elemtype(varargsFormal);
+            final Type elt = types.elemtype(varargsFormal);
+            ResultInfo mresult = methodCheckResult(elt, allowBoxing, true, inferenceContext, deferredAttrContext, handler, warn);
             while (argtypes.nonEmpty()) {
-                ResultInfo resultInfo = methodCheckResult(elt, allowBoxing, true, undetvars, handler, warn);
-                checkedArgs.append(resultInfo.check(env.tree.pos(), argtypes.head));
+                mresult.check(null, argtypes.head);
                 argtypes = argtypes.tail;
             }
             //check varargs element type accessibility
-            if (undetvars.isEmpty() && !isAccessible(env, elt)) {
+            varargsAccessible(env, elt, handler, inferenceContext);
+        }
+
+        deferredAttrContext.complete();
+    }
+
+    void varargsAccessible(final Env<AttrContext> env, final Type t, final Resolve.MethodCheckHandler handler, final InferenceContext inferenceContext) {
+        if (inferenceContext.free(t)) {
+            inferenceContext.addFreeTypeListener(List.of(t), new FreeTypeListener() {
+                @Override
+                public void typesInferred(InferenceContext inferenceContext) {
+                    varargsAccessible(env, inferenceContext.asInstType(t, types), handler, inferenceContext);
+                }
+            });
+        } else {
+            if (!isAccessible(env, t)) {
                 Symbol location = env.enclClass.sym;
-                throw handler.inaccessibleVarargs(location, elt);
+                throw handler.inaccessibleVarargs(location, t);
             }
         }
-        return checkedArgs.toList();
     }
 
     /**
@@ -657,13 +714,16 @@ public class Resolve {
 
         MethodCheckHandler handler;
         boolean useVarargs;
-        List<Type> undetvars;
+        Infer.InferenceContext inferenceContext;
+        DeferredAttrContext deferredAttrContext;
         Warner rsWarner;
 
-        public MethodCheckContext(MethodCheckHandler handler, boolean useVarargs, List<Type> undetvars, Warner rsWarner) {
+        public MethodCheckContext(MethodCheckHandler handler, boolean useVarargs,
+                Infer.InferenceContext inferenceContext, DeferredAttrContext deferredAttrContext, Warner rsWarner) {
             this.handler = handler;
             this.useVarargs = useVarargs;
-            this.undetvars = undetvars;
+            this.inferenceContext = inferenceContext;
+            this.deferredAttrContext = deferredAttrContext;
             this.rsWarner = rsWarner;
         }
 
@@ -674,6 +734,14 @@ public class Resolve {
         public Warner checkWarner(DiagnosticPosition pos, Type found, Type req) {
             return rsWarner;
         }
+
+        public InferenceContext inferenceContext() {
+            return inferenceContext;
+        }
+
+        public DeferredAttrContext deferredAttrContext() {
+            return deferredAttrContext;
+        }
     }
 
     /**
@@ -682,12 +750,17 @@ public class Resolve {
      */
     class StrictMethodContext extends MethodCheckContext {
 
-        public StrictMethodContext(MethodCheckHandler handler, boolean useVarargs, List<Type> undetvars, Warner rsWarner) {
-            super(handler, useVarargs, undetvars, rsWarner);
+        public StrictMethodContext(MethodCheckHandler handler, boolean useVarargs,
+                Infer.InferenceContext inferenceContext, DeferredAttrContext deferredAttrContext, Warner rsWarner) {
+            super(handler, useVarargs, inferenceContext, deferredAttrContext, rsWarner);
         }
 
         public boolean compatible(Type found, Type req, Warner warn) {
-            return types.isSubtypeUnchecked(found, infer.asUndetType(req, undetvars), warn);
+            return types.isSubtypeUnchecked(found, inferenceContext.asFree(req, types), warn);
+        }
+
+        public boolean allowBoxing() {
+            return false;
         }
     }
 
@@ -697,12 +770,17 @@ public class Resolve {
      */
     class LooseMethodContext extends MethodCheckContext {
 
-        public LooseMethodContext(MethodCheckHandler handler, boolean useVarargs, List<Type> undetvars, Warner rsWarner) {
-            super(handler, useVarargs, undetvars, rsWarner);
+        public LooseMethodContext(MethodCheckHandler handler, boolean useVarargs,
+                Infer.InferenceContext inferenceContext, DeferredAttrContext deferredAttrContext, Warner rsWarner) {
+            super(handler, useVarargs, inferenceContext, deferredAttrContext, rsWarner);
         }
 
         public boolean compatible(Type found, Type req, Warner warn) {
-            return types.isConvertible(found, infer.asUndetType(req, undetvars), warn);
+            return types.isConvertible(found, inferenceContext.asFree(req, types), warn);
+        }
+
+        public boolean allowBoxing() {
+            return true;
         }
     }
 
@@ -710,16 +788,37 @@ public class Resolve {
      * Create a method check context to be used during method applicability check
      */
     ResultInfo methodCheckResult(Type to, boolean allowBoxing, boolean useVarargs,
-            List<Type> undetvars, MethodCheckHandler methodHandler, Warner rsWarner) {
+            Infer.InferenceContext inferenceContext, DeferredAttr.DeferredAttrContext deferredAttrContext,
+            MethodCheckHandler methodHandler, Warner rsWarner) {
         MethodCheckContext checkContext = allowBoxing ?
-                new LooseMethodContext(methodHandler, useVarargs, undetvars, rsWarner) :
-                new StrictMethodContext(methodHandler, useVarargs, undetvars, rsWarner);
-        return attr.new ResultInfo(VAL, to, checkContext) {
-            @Override
-            protected Type check(DiagnosticPosition pos, Type found) {
-                return super.check(pos, chk.checkNonVoid(pos, types.capture(types.upperBound(found))));
+                new LooseMethodContext(methodHandler, useVarargs, inferenceContext, deferredAttrContext, rsWarner) :
+                new StrictMethodContext(methodHandler, useVarargs, inferenceContext, deferredAttrContext, rsWarner);
+        return new MethodResultInfo(to, checkContext, deferredAttrContext);
+    }
+
+    class MethodResultInfo extends ResultInfo {
+
+        DeferredAttr.DeferredAttrContext deferredAttrContext;
+
+        public MethodResultInfo(Type pt, MethodCheckContext checkContext, DeferredAttr.DeferredAttrContext deferredAttrContext) {
+            attr.super(VAL, pt, checkContext);
+            this.deferredAttrContext = deferredAttrContext;
+        }
+
+        @Override
+        protected Type check(DiagnosticPosition pos, Type found) {
+            if (found.tag == DEFERRED) {
+                DeferredType dt = (DeferredType)found;
+                return dt.check(this);
+            } else {
+                return super.check(pos, chk.checkNonVoid(pos, types.capture(types.upperBound(found.baseType()))));
             }
-        };
+        }
+
+        @Override
+        protected MethodResultInfo dup(Type newPt) {
+            return new MethodResultInfo(newPt, (MethodCheckContext)checkContext, deferredAttrContext);
+        }
     }
 
     public static class InapplicableMethodException extends RuntimeException {
@@ -733,16 +832,13 @@ public class Resolve {
             this.diags = diags;
         }
         InapplicableMethodException setMessage() {
-            this.diagnostic = null;
-            return this;
+            return setMessage((JCDiagnostic)null);
         }
         InapplicableMethodException setMessage(String key) {
-            this.diagnostic = key != null ? diags.fragment(key) : null;
-            return this;
+            return setMessage(key != null ? diags.fragment(key) : null);
         }
         InapplicableMethodException setMessage(String key, Object... args) {
-            this.diagnostic = key != null ? diags.fragment(key, args) : null;
-            return this;
+            return setMessage(key != null ? diags.fragment(key, args) : null);
         }
         InapplicableMethodException setMessage(JCDiagnostic diag) {
             this.diagnostic = diag;
@@ -937,11 +1033,10 @@ public class Resolve {
                 currentResolutionContext.addInapplicableCandidate(sym, ex.getDiagnostic());
             switch (bestSoFar.kind) {
             case ABSENT_MTH:
-                return wrongMethod;
+                return new InapplicableSymbolError(currentResolutionContext);
             case WRONG_MTH:
                 if (operator) return bestSoFar;
-            case WRONG_MTHS:
-                return wrongMethods;
+                bestSoFar = new InapplicableSymbolsError(currentResolutionContext);
             default:
                 return bestSoFar;
             }
@@ -953,7 +1048,7 @@ public class Resolve {
         }
         return (bestSoFar.kind > AMBIGUOUS)
             ? sym
-            : mostSpecific(sym, bestSoFar, env, site,
+            : mostSpecific(argtypes, sym, bestSoFar, env, site,
                            allowBoxing && operator, useVarargs);
     }
 
@@ -967,7 +1062,7 @@ public class Resolve {
      *  @param allowBoxing Allow boxing conversions of arguments.
      *  @param useVarargs Box trailing arguments into an array for varargs.
      */
-    Symbol mostSpecific(Symbol m1,
+    Symbol mostSpecific(List<Type> argtypes, Symbol m1,
                         Symbol m2,
                         Env<AttrContext> env,
                         final Type site,
@@ -976,8 +1071,10 @@ public class Resolve {
         switch (m2.kind) {
         case MTH:
             if (m1 == m2) return m1;
-            boolean m1SignatureMoreSpecific = signatureMoreSpecific(env, site, m1, m2, allowBoxing, useVarargs);
-            boolean m2SignatureMoreSpecific = signatureMoreSpecific(env, site, m2, m1, allowBoxing, useVarargs);
+            boolean m1SignatureMoreSpecific =
+                    signatureMoreSpecific(argtypes, env, site, m1, m2, allowBoxing, useVarargs);
+            boolean m2SignatureMoreSpecific =
+                    signatureMoreSpecific(argtypes, env, site, m2, m1, allowBoxing, useVarargs);
             if (m1SignatureMoreSpecific && m2SignatureMoreSpecific) {
                 Type mt1 = types.memberType(site, m1);
                 Type mt2 = types.memberType(site, m2);
@@ -1035,8 +1132,8 @@ public class Resolve {
                             return this;
                         else
                             return super.implementation(origin, types, checkResult);
-                    }
-                };
+                        }
+                    };
                 return result;
             }
             if (m1SignatureMoreSpecific) return m1;
@@ -1044,8 +1141,8 @@ public class Resolve {
             return ambiguityError(m1, m2);
         case AMBIGUOUS:
             AmbiguityError e = (AmbiguityError)m2;
-            Symbol err1 = mostSpecific(m1, e.sym, env, site, allowBoxing, useVarargs);
-            Symbol err2 = mostSpecific(m1, e.sym2, env, site, allowBoxing, useVarargs);
+            Symbol err1 = mostSpecific(argtypes, m1, e.sym, env, site, allowBoxing, useVarargs);
+            Symbol err2 = mostSpecific(argtypes, m1, e.sym2, env, site, allowBoxing, useVarargs);
             if (err1 == err2) return err1;
             if (err1 == e.sym && err2 == e.sym2) return m2;
             if (err1 instanceof AmbiguityError &&
@@ -1059,13 +1156,83 @@ public class Resolve {
         }
     }
     //where
-    private boolean signatureMoreSpecific(Env<AttrContext> env, Type site, Symbol m1, Symbol m2, boolean allowBoxing, boolean useVarargs) {
+    private boolean signatureMoreSpecific(List<Type> actuals, Env<AttrContext> env, Type site, Symbol m1, Symbol m2, boolean allowBoxing, boolean useVarargs) {
+        Symbol m12 = adjustVarargs(m1, m2, useVarargs);
+        Symbol m22 = adjustVarargs(m2, m1, useVarargs);
+        Type mtype1 = types.memberType(site, m12);
+        Type mtype2 = types.memberType(site, m22);
+
+        //check if invocation is more specific
+        if (invocationMoreSpecific(env, site, m22, mtype1.getParameterTypes(), allowBoxing, useVarargs)) {
+            return true;
+        }
+
+        //perform structural check
+
+        List<Type> formals1 = mtype1.getParameterTypes();
+        Type lastFormal1 = formals1.last();
+        List<Type> formals2 = mtype2.getParameterTypes();
+        Type lastFormal2 = formals2.last();
+        ListBuffer<Type> newFormals = ListBuffer.lb();
+
+        boolean hasStructuralPoly = false;
+        for (Type actual : actuals) {
+            //perform formal argument adaptation in case actuals > formals (varargs)
+            Type f1 = formals1.isEmpty() ?
+                    lastFormal1 : formals1.head;
+            Type f2 = formals2.isEmpty() ?
+                    lastFormal2 : formals2.head;
+
+            //is this a structural actual argument?
+            boolean isStructuralPoly = actual.tag == DEFERRED &&
+                    (((DeferredType)actual).tree.hasTag(LAMBDA) ||
+                    ((DeferredType)actual).tree.hasTag(REFERENCE));
+
+            Type newFormal = f1;
+
+            if (isStructuralPoly) {
+                //for structural arguments only - check that corresponding formals
+                //are related - if so replace formal with <null>
+                hasStructuralPoly = true;
+                DeferredType dt = (DeferredType)actual;
+                Type t1 = deferredAttr.new DeferredTypeMap(AttrMode.SPECULATIVE, m1, currentResolutionContext.step).apply(dt);
+                Type t2 = deferredAttr.new DeferredTypeMap(AttrMode.SPECULATIVE, m2, currentResolutionContext.step).apply(dt);
+                if (t1.isErroneous() || t2.isErroneous() || !isStructuralSubtype(t1, t2)) {
+                    //not structural subtypes - simply fail
+                    return false;
+                } else {
+                    newFormal = syms.botType;
+                }
+            }
+
+            newFormals.append(newFormal);
+            if (newFormals.length() > mtype2.getParameterTypes().length()) {
+                //expand m2's type so as to fit the new formal arity (varargs)
+                m22.type = types.createMethodTypeWithParameters(m22.type, m22.type.getParameterTypes().append(f2));
+            }
+
+            formals1 = formals1.isEmpty() ? formals1 : formals1.tail;
+            formals2 = formals2.isEmpty() ? formals2 : formals2.tail;
+        }
+
+        if (!hasStructuralPoly) {
+            //if no structural actual was found, we're done
+            return false;
+        }
+        //perform additional adaptation if actuals < formals (varargs)
+        for (Type t : formals1) {
+            newFormals.append(t);
+        }
+        //check if invocation (with tweaked args) is more specific
+        return invocationMoreSpecific(env, site, m22, newFormals.toList(), allowBoxing, useVarargs);
+    }
+    //where
+    private boolean invocationMoreSpecific(Env<AttrContext> env, Type site, Symbol m2, List<Type> argtypes1, boolean allowBoxing, boolean useVarargs) {
         noteWarner.clear();
-        Type mtype1 = types.memberType(site, adjustVarargs(m1, m2, useVarargs));
-        Type mtype2 = instantiate(env, site, adjustVarargs(m2, m1, useVarargs), null,
-                types.lowerBoundArgtypes(mtype1), null,
+        Type mst = instantiate(env, site, m2, null,
+                types.lowerBounds(argtypes1), null,
                 allowBoxing, false, noteWarner);
-        return mtype2 != null &&
+        return mst != null &&
                 !noteWarner.hasLint(Lint.LintCategory.UNCHECKED);
     }
     //where
@@ -1104,6 +1271,32 @@ public class Resolve {
         }
     }
     //where
+    boolean isStructuralSubtype(Type s, Type t) {
+
+        Type ret_s = types.findDescriptorType(s).getReturnType();
+        Type ret_t = types.findDescriptorType(t).getReturnType();
+
+        //covariant most specific check for function descriptor return type
+        if (!types.isSubtype(ret_s, ret_t)) {
+            return false;
+        }
+
+        List<Type> args_s = types.findDescriptorType(s).getParameterTypes();
+        List<Type> args_t = types.findDescriptorType(t).getParameterTypes();
+
+        //arity must be identical
+        if (args_s.length() != args_t.length()) {
+            return false;
+        }
+
+        //invariant most specific check for function descriptor parameter types
+        if (!types.isSameTypes(args_t, args_s)) {
+            return false;
+        }
+
+        return true;
+    }
+    //where
     Type mostSpecificReturnType(Type mt1, Type mt2) {
         Type rt1 = mt1.getReturnType();
         Type rt2 = mt2.getReturnType();
@@ -1160,12 +1353,10 @@ public class Resolve {
                           argtypes,
                           typeargtypes,
                           site.tsym.type,
-                          true,
                           bestSoFar,
                           allowBoxing,
                           useVarargs,
-                          operator,
-                          new HashSet<TypeSymbol>());
+                          operator);
         reportVerboseResolutionDiagnostic(env.tree.pos(), name, site, argtypes, typeargtypes, bestSoFar);
         return bestSoFar;
     }
@@ -1176,56 +1367,134 @@ public class Resolve {
                               List<Type> argtypes,
                               List<Type> typeargtypes,
                               Type intype,
-                              boolean abstractok,
                               Symbol bestSoFar,
                               boolean allowBoxing,
                               boolean useVarargs,
-                              boolean operator,
-                              Set<TypeSymbol> seen) {
-        for (Type ct = intype; ct.tag == CLASS || ct.tag == TYPEVAR; ct = types.supertype(ct)) {
-            while (ct.tag == TYPEVAR)
-                ct = ct.getUpperBound();
-            ClassSymbol c = (ClassSymbol)ct.tsym;
-            if (!seen.add(c)) return bestSoFar;
-            if ((c.flags() & (ABSTRACT | INTERFACE | ENUM)) == 0)
-                abstractok = false;
-            for (Scope.Entry e = c.members().lookup(name);
-                 e.scope != null;
-                 e = e.next()) {
-                //- System.out.println(" e " + e.sym);
-                if (e.sym.kind == MTH &&
-                    (e.sym.flags_field & SYNTHETIC) == 0) {
-                    bestSoFar = selectBest(env, site, argtypes, typeargtypes,
-                                           e.sym, bestSoFar,
-                                           allowBoxing,
-                                           useVarargs,
-                                           operator);
+                              boolean operator) {
+        boolean abstractOk = true;
+        List<Type> itypes = List.nil();
+        for (TypeSymbol s : superclasses(intype)) {
+            bestSoFar = lookupMethod(env, site, name, argtypes, typeargtypes,
+                    s.members(), bestSoFar, allowBoxing, useVarargs, operator, true);
+            //We should not look for abstract methods if receiver is a concrete class
+            //(as concrete classes are expected to implement all abstracts coming
+            //from superinterfaces)
+            abstractOk &= (s.flags() & (ABSTRACT | INTERFACE | ENUM)) != 0;
+            if (abstractOk) {
+                for (Type itype : types.interfaces(s.type)) {
+                    itypes = types.union(types.closure(itype), itypes);
                 }
             }
-            if (name == names.init)
-                break;
-            //- System.out.println(" - " + bestSoFar);
-            if (abstractok) {
-                Symbol concrete = methodNotFound;
-                if ((bestSoFar.flags() & ABSTRACT) == 0)
-                    concrete = bestSoFar;
-                for (List<Type> l = types.interfaces(c.type);
-                     l.nonEmpty();
-                     l = l.tail) {
-                    bestSoFar = findMethod(env, site, name, argtypes,
-                                           typeargtypes,
-                                           l.head, abstractok, bestSoFar,
-                                           allowBoxing, useVarargs, operator, seen);
-                }
-                if (concrete != bestSoFar &&
-                    concrete.kind < ERR  && bestSoFar.kind < ERR &&
-                    types.isSubSignature(concrete.type, bestSoFar.type))
-                    bestSoFar = concrete;
+            if (name == names.init) break;
+        }
+
+        Symbol concrete = bestSoFar.kind < ERR &&
+                (bestSoFar.flags() & ABSTRACT) == 0 ?
+                bestSoFar : methodNotFound;
+
+        if (name != names.init) {
+            //keep searching for abstract methods
+            for (Type itype : itypes) {
+                if (!itype.isInterface()) continue; //skip j.l.Object (included by Types.closure())
+                bestSoFar = lookupMethod(env, site, name, argtypes, typeargtypes,
+                    itype.tsym.members(), bestSoFar, allowBoxing, useVarargs, operator, true);
+                    if (concrete != bestSoFar &&
+                            concrete.kind < ERR  && bestSoFar.kind < ERR &&
+                            types.isSubSignature(concrete.type, bestSoFar.type)) {
+                        //this is an hack - as javac does not do full membership checks
+                        //most specific ends up comparing abstract methods that might have
+                        //been implemented by some concrete method in a subclass and,
+                        //because of raw override, it is possible for an abstract method
+                        //to be more specific than the concrete method - so we need
+                        //to explicitly call that out (see CR 6178365)
+                        bestSoFar = concrete;
+                    }
             }
         }
         return bestSoFar;
     }
 
+    /**
+     * Return an Iterable object to scan the superclasses of a given type.
+     * It's crucial that the scan is done lazily, as we don't want to accidentally
+     * access more supertypes than strictly needed (as this could trigger completion
+     * errors if some of the not-needed supertypes are missing/ill-formed).
+     */
+    Iterable<TypeSymbol> superclasses(final Type intype) {
+        return new Iterable<TypeSymbol>() {
+            public Iterator<TypeSymbol> iterator() {
+                return new Iterator<TypeSymbol>() {
+
+                    List<TypeSymbol> seen = List.nil();
+                    TypeSymbol currentSym = symbolFor(intype);
+                    TypeSymbol prevSym = null;
+
+                    public boolean hasNext() {
+                        if (currentSym == syms.noSymbol) {
+                            currentSym = symbolFor(types.supertype(prevSym.type));
+                        }
+                        return currentSym != null;
+                    }
+
+                    public TypeSymbol next() {
+                        prevSym = currentSym;
+                        currentSym = syms.noSymbol;
+                        Assert.check(prevSym != null || prevSym != syms.noSymbol);
+                        return prevSym;
+                    }
+
+                    public void remove() {
+                        throw new UnsupportedOperationException();
+                    }
+
+                    TypeSymbol symbolFor(Type t) {
+                        if (t.tag != CLASS &&
+                                t.tag != TYPEVAR) {
+                            return null;
+                        }
+                        while (t.tag == TYPEVAR)
+                            t = t.getUpperBound();
+                        if (seen.contains(t.tsym)) {
+                            //degenerate case in which we have a circular
+                            //class hierarchy - because of ill-formed classfiles
+                            return null;
+                        }
+                        seen = seen.prepend(t.tsym);
+                        return t.tsym;
+                    }
+                };
+            }
+        };
+    }
+
+    /**
+     * Lookup a method with given name and argument types in a given scope
+     */
+    Symbol lookupMethod(Env<AttrContext> env,
+            Type site,
+            Name name,
+            List<Type> argtypes,
+            List<Type> typeargtypes,
+            Scope sc,
+            Symbol bestSoFar,
+            boolean allowBoxing,
+            boolean useVarargs,
+            boolean operator,
+            boolean abstractok) {
+        for (Symbol s : sc.getElementsByName(name, lookupFilter)) {
+            bestSoFar = selectBest(env, site, argtypes, typeargtypes, s,
+                    bestSoFar, allowBoxing, useVarargs, operator);
+        }
+        return bestSoFar;
+    }
+    //where
+        Filter<Symbol> lookupFilter = new Filter<Symbol>() {
+            public boolean accepts(Symbol s) {
+                return s.kind == MTH &&
+                        (s.flags() & SYNTHETIC) == 0;
+            }
+        };
+
     /** Find unqualified method matching given name, type and value arguments.
      *  @param env       The current environment.
      *  @param name      The method's name.
@@ -1521,68 +1790,133 @@ public class Resolve {
      *
      *  @param sym       The symbol that was found, or a ResolveError.
      *  @param pos       The position to use for error reporting.
+     *  @param location  The symbol the served as a context for this lookup
      *  @param site      The original type from where the selection took place.
      *  @param name      The symbol's name.
+     *  @param qualified Did we get here through a qualified expression resolution?
      *  @param argtypes  The invocation's value arguments,
      *                   if we looked for a method.
      *  @param typeargtypes  The invocation's type arguments,
      *                   if we looked for a method.
+     *  @param logResolveHelper helper class used to log resolve errors
      */
-    Symbol access(Symbol sym,
+    Symbol accessInternal(Symbol sym,
                   DiagnosticPosition pos,
                   Symbol location,
                   Type site,
                   Name name,
                   boolean qualified,
                   List<Type> argtypes,
-                  List<Type> typeargtypes) {
+                  List<Type> typeargtypes,
+                  LogResolveHelper logResolveHelper) {
         if (sym.kind >= AMBIGUOUS) {
             ResolveError errSym = (ResolveError)sym;
-            if (!site.isErroneous() &&
-                !Type.isErroneous(argtypes) &&
-                (typeargtypes==null || !Type.isErroneous(typeargtypes)))
-                logResolveError(errSym, pos, location, site, name, argtypes, typeargtypes);
             sym = errSym.access(name, qualified ? site.tsym : syms.noSymbol);
+            argtypes = logResolveHelper.getArgumentTypes(errSym, sym, name, argtypes);
+            if (logResolveHelper.resolveDiagnosticNeeded(site, argtypes, typeargtypes)) {
+                logResolveError(errSym, pos, location, site, name, argtypes, typeargtypes);
+            }
         }
         return sym;
     }
 
-    /** Same as original access(), but without location.
+    /**
+     * Variant of the generalized access routine, to be used for generating method
+     * resolution diagnostics
      */
-    Symbol access(Symbol sym,
+    Symbol accessMethod(Symbol sym,
+                  DiagnosticPosition pos,
+                  Symbol location,
+                  Type site,
+                  Name name,
+                  boolean qualified,
+                  List<Type> argtypes,
+                  List<Type> typeargtypes) {
+        return accessInternal(sym, pos, location, site, name, qualified, argtypes, typeargtypes, methodLogResolveHelper);
+    }
+
+    /** Same as original accessMethod(), but without location.
+     */
+    Symbol accessMethod(Symbol sym,
                   DiagnosticPosition pos,
                   Type site,
                   Name name,
                   boolean qualified,
                   List<Type> argtypes,
                   List<Type> typeargtypes) {
-        return access(sym, pos, site.tsym, site, name, qualified, argtypes, typeargtypes);
+        return accessMethod(sym, pos, site.tsym, site, name, qualified, argtypes, typeargtypes);
     }
 
-    /** Same as original access(), but without type arguments and arguments.
+    /**
+     * Variant of the generalized access routine, to be used for generating variable,
+     * type resolution diagnostics
      */
-    Symbol access(Symbol sym,
+    Symbol accessBase(Symbol sym,
                   DiagnosticPosition pos,
                   Symbol location,
                   Type site,
                   Name name,
                   boolean qualified) {
-        if (sym.kind >= AMBIGUOUS)
-            return access(sym, pos, location, site, name, qualified, List.<Type>nil(), null);
-        else
-            return sym;
+        return accessInternal(sym, pos, location, site, name, qualified, List.<Type>nil(), null, basicLogResolveHelper);
     }
 
-    /** Same as original access(), but without location, type arguments and arguments.
+    /** Same as original accessBase(), but without location.
      */
-    Symbol access(Symbol sym,
+    Symbol accessBase(Symbol sym,
                   DiagnosticPosition pos,
                   Type site,
                   Name name,
                   boolean qualified) {
-        return access(sym, pos, site.tsym, site, name, qualified);
+        return accessBase(sym, pos, site.tsym, site, name, qualified);
     }
 
+    interface LogResolveHelper {
+        boolean resolveDiagnosticNeeded(Type site, List<Type> argtypes, List<Type> typeargtypes);
+        List<Type> getArgumentTypes(ResolveError errSym, Symbol accessedSym, Name name, List<Type> argtypes);
+    }
+
+    LogResolveHelper basicLogResolveHelper = new LogResolveHelper() {
+        public boolean resolveDiagnosticNeeded(Type site, List<Type> argtypes, List<Type> typeargtypes) {
+            return !site.isErroneous();
+        }
+        public List<Type> getArgumentTypes(ResolveError errSym, Symbol accessedSym, Name name, List<Type> argtypes) {
+            return argtypes;
+        }
+    };
+
+    LogResolveHelper methodLogResolveHelper = new LogResolveHelper() {
+        public boolean resolveDiagnosticNeeded(Type site, List<Type> argtypes, List<Type> typeargtypes) {
+            return !site.isErroneous() &&
+                        !Type.isErroneous(argtypes) &&
+                        (typeargtypes == null || !Type.isErroneous(typeargtypes));
+        }
+        public List<Type> getArgumentTypes(ResolveError errSym, Symbol accessedSym, Name name, List<Type> argtypes) {
+            if (syms.operatorNames.contains(name)) {
+                return argtypes;
+            } else {
+                Symbol msym = errSym.kind == WRONG_MTH ?
+                        ((InapplicableSymbolError)errSym).errCandidate().sym : accessedSym;
+
+                List<Type> argtypes2 = Type.map(argtypes,
+                        deferredAttr.new RecoveryDeferredTypeMap(AttrMode.SPECULATIVE, msym, currentResolutionContext.firstErroneousResolutionPhase()));
+
+                if (msym != accessedSym) {
+                    //fixup deferred type caches - this 'hack' is required because the symbol
+                    //returned by InapplicableSymbolError.access() will hide the candidate
+                    //method symbol that can be used for lookups in the speculative cache,
+                    //causing problems in Attr.checkId()
+                    for (Type t : argtypes) {
+                        if (t.tag == DEFERRED) {
+                            DeferredType dt = (DeferredType)t;
+                            dt.speculativeCache.dupAllTo(msym, accessedSym);
+                        }
+                    }
+                }
+                return argtypes2;
+            }
+        }
+    };
+
     /** Check that sym is not an abstract method.
      */
     void checkNonAbstract(DiagnosticPosition pos, Symbol sym) {
@@ -1641,7 +1975,7 @@ public class Resolve {
      */
     Symbol resolveIdent(DiagnosticPosition pos, Env<AttrContext> env,
                         Name name, int kind) {
-        return access(
+        return accessBase(
             findIdent(env, name, kind),
             pos, env.enclClass.sym.type, name, false);
     }
@@ -1666,19 +2000,19 @@ public class Resolve {
             while (steps.nonEmpty() &&
                    steps.head.isApplicable(boxingEnabled, varargsEnabled) &&
                    sym.kind >= ERRONEOUS) {
-                currentResolutionContext.step = steps.head;
+                currentResolutionContext.step = env.info.pendingResolutionPhase = steps.head;
                 sym = findFun(env, name, argtypes, typeargtypes,
                         steps.head.isBoxingRequired,
-                        env.info.varArgs = steps.head.isVarargsRequired);
+                        steps.head.isVarargsRequired);
                 currentResolutionContext.resolutionCache.put(steps.head, sym);
                 steps = steps.tail;
             }
             if (sym.kind >= AMBIGUOUS) {//if nothing is found return the 'first' error
                 MethodResolutionPhase errPhase =
                         currentResolutionContext.firstErroneousResolutionPhase();
-                sym = access(currentResolutionContext.resolutionCache.get(errPhase),
+                sym = accessMethod(currentResolutionContext.resolutionCache.get(errPhase),
                         pos, env.enclClass.sym.type, name, false, argtypes, typeargtypes);
-                env.info.varArgs = errPhase.isVarargsRequired;
+                env.info.pendingResolutionPhase = errPhase;
             }
             return sym;
         }
@@ -1718,10 +2052,10 @@ public class Resolve {
             while (steps.nonEmpty() &&
                    steps.head.isApplicable(boxingEnabled, varargsEnabled) &&
                    sym.kind >= ERRONEOUS) {
-                currentResolutionContext.step = steps.head;
+                currentResolutionContext.step = env.info.pendingResolutionPhase = steps.head;
                 sym = findMethod(env, site, name, argtypes, typeargtypes,
                         steps.head.isBoxingRequired(),
-                        env.info.varArgs = steps.head.isVarargsRequired(), false);
+                        steps.head.isVarargsRequired(), false);
                 currentResolutionContext.resolutionCache.put(steps.head, sym);
                 steps = steps.tail;
             }
@@ -1729,13 +2063,13 @@ public class Resolve {
                 //if nothing is found return the 'first' error
                 MethodResolutionPhase errPhase =
                         currentResolutionContext.firstErroneousResolutionPhase();
-                sym = access(currentResolutionContext.resolutionCache.get(errPhase),
+                sym = accessMethod(currentResolutionContext.resolutionCache.get(errPhase),
                         pos, location, site, name, true, argtypes, typeargtypes);
-                env.info.varArgs = errPhase.isVarargsRequired;
+                env.info.pendingResolutionPhase = errPhase;
             } else if (allowMethodHandles) {
                 MethodSymbol msym = (MethodSymbol)sym;
                 if (msym.isSignaturePolymorphic(types)) {
-                    env.info.varArgs = false;
+                    env.info.pendingResolutionPhase = BASIC;
                     return findPolymorphicSignatureInstance(env, sym, argtypes);
                 }
             }
@@ -1757,7 +2091,7 @@ public class Resolve {
                                             Symbol spMethod,
                                             List<Type> argtypes) {
         Type mtype = infer.instantiatePolymorphicSignatureInstance(env,
-                (MethodSymbol)spMethod, argtypes);
+                (MethodSymbol)spMethod, currentResolutionContext, argtypes);
         for (Symbol sym : polymorphicSignatureScope.getElementsByName(spMethod.name)) {
             if (types.isSameType(mtype, sym.type)) {
                return sym;
@@ -1825,18 +2159,18 @@ public class Resolve {
             while (steps.nonEmpty() &&
                    steps.head.isApplicable(boxingEnabled, varargsEnabled) &&
                    sym.kind >= ERRONEOUS) {
-                currentResolutionContext.step = steps.head;
+                currentResolutionContext.step = env.info.pendingResolutionPhase = steps.head;
                 sym = findConstructor(pos, env, site, argtypes, typeargtypes,
                         steps.head.isBoxingRequired(),
-                        env.info.varArgs = steps.head.isVarargsRequired());
+                        steps.head.isVarargsRequired());
                 currentResolutionContext.resolutionCache.put(steps.head, sym);
                 steps = steps.tail;
             }
             if (sym.kind >= AMBIGUOUS) {//if nothing is found return the 'first' error
                 MethodResolutionPhase errPhase = currentResolutionContext.firstErroneousResolutionPhase();
-                sym = access(currentResolutionContext.resolutionCache.get(errPhase),
+                sym = accessMethod(currentResolutionContext.resolutionCache.get(errPhase),
                         pos, site, names.init, true, argtypes, typeargtypes);
-                env.info.varArgs = errPhase.isVarargsRequired();
+                env.info.pendingResolutionPhase = errPhase;
             }
             return sym;
         }
@@ -1868,18 +2202,20 @@ public class Resolve {
             while (steps.nonEmpty() &&
                    steps.head.isApplicable(boxingEnabled, varargsEnabled) &&
                    sym.kind >= ERRONEOUS) {
-                currentResolutionContext.step = steps.head;
+                currentResolutionContext.step = env.info.pendingResolutionPhase = steps.head;
                 sym = findDiamond(env, site, argtypes, typeargtypes,
                         steps.head.isBoxingRequired(),
-                        env.info.varArgs = steps.head.isVarargsRequired());
+                        steps.head.isVarargsRequired());
                 currentResolutionContext.resolutionCache.put(steps.head, sym);
                 steps = steps.tail;
             }
             if (sym.kind >= AMBIGUOUS) {
-                final JCDiagnostic details = sym.kind == WRONG_MTH ?
-                                currentResolutionContext.candidates.head.details :
+                Symbol errSym =
+                        currentResolutionContext.resolutionCache.get(currentResolutionContext.firstErroneousResolutionPhase());
+                final JCDiagnostic details = errSym.kind == WRONG_MTH ?
+                                ((InapplicableSymbolError)errSym).errCandidate().details :
                                 null;
-                Symbol errSym = new ResolveError(WRONG_MTH, "diamond error") {
+                errSym = new InapplicableSymbolError(errSym.kind, "diamondError", currentResolutionContext) {
                     @Override
                     JCDiagnostic getDiagnostic(DiagnosticType dkind, DiagnosticPosition pos,
                             Symbol location, Type site, Name name, List<Type> argtypes, List<Type> typeargtypes) {
@@ -1891,8 +2227,8 @@ public class Resolve {
                     }
                 };
                 MethodResolutionPhase errPhase = currentResolutionContext.firstErroneousResolutionPhase();
-                sym = access(errSym, pos, site, names.init, true, argtypes, typeargtypes);
-                env.info.varArgs = errPhase.isVarargsRequired();
+                sym = accessMethod(errSym, pos, site, names.init, true, argtypes, typeargtypes);
+                env.info.pendingResolutionPhase = errPhase;
             }
             return sym;
         }
@@ -1919,16 +2255,23 @@ public class Resolve {
         for (Scope.Entry e = site.tsym.members().lookup(names.init);
              e.scope != null;
              e = e.next()) {
+            final Symbol sym = e.sym;
             //- System.out.println(" e " + e.sym);
-            if (e.sym.kind == MTH &&
-                (e.sym.flags_field & SYNTHETIC) == 0) {
+            if (sym.kind == MTH &&
+                (sym.flags_field & SYNTHETIC) == 0) {
                     List<Type> oldParams = e.sym.type.tag == FORALL ?
-                            ((ForAll)e.sym.type).tvars :
+                            ((ForAll)sym.type).tvars :
                             List.<Type>nil();
                     Type constrType = new ForAll(site.tsym.type.getTypeArguments().appendList(oldParams),
-                            types.createMethodTypeWithReturn(e.sym.type.asMethodType(), site));
+                            types.createMethodTypeWithReturn(sym.type.asMethodType(), site));
+                    MethodSymbol newConstr = new MethodSymbol(sym.flags(), names.init, constrType, site.tsym) {
+                        @Override
+                        public Symbol baseSymbol() {
+                            return sym;
+                        }
+                    };
                     bestSoFar = selectBest(env, site, argtypes, typeargtypes,
-                            new MethodSymbol(e.sym.flags(), names.init, constrType, site.tsym),
+                            newConstr,
                             bestSoFar,
                             allowBoxing,
                             useVarargs,
@@ -1938,6 +2281,335 @@ public class Resolve {
         return bestSoFar;
     }
 
+    /**
+     * Resolution of member references is typically done as a single
+     * overload resolution step, where the argument types A are inferred from
+     * the target functional descriptor.
+     *
+     * If the member reference is a method reference with a type qualifier,
+     * a two-step lookup process is performed. The first step uses the
+     * expected argument list A, while the second step discards the first
+     * type from A (which is treated as a receiver type).
+     *
+     * There are two cases in which inference is performed: (i) if the member
+     * reference is a constructor reference and the qualifier type is raw - in
+     * which case diamond inference is used to infer a parameterization for the
+     * type qualifier; (ii) if the member reference is an unbound reference
+     * where the type qualifier is raw - in that case, during the unbound lookup
+     * the receiver argument type is used to infer an instantiation for the raw
+     * qualifier type.
+     *
+     * When a multi-step resolution process is exploited, it is an error
+     * if two candidates are found (ambiguity).
+     *
+     * This routine returns a pair (T,S), where S is the member reference symbol,
+     * and T is the type of the class in which S is defined. This is necessary as
+     * the type T might be dynamically inferred (i.e. if constructor reference
+     * has a raw qualifier).
+     */
+    Pair<Symbol, ReferenceLookupHelper> resolveMemberReference(DiagnosticPosition pos,
+                                  Env<AttrContext> env,
+                                  JCMemberReference referenceTree,
+                                  Type site,
+                                  Name name, List<Type> argtypes,
+                                  List<Type> typeargtypes,
+                                  boolean boxingAllowed) {
+        //step 1 - bound lookup
+        ReferenceLookupHelper boundLookupHelper = name.equals(names.init) ?
+                new ConstructorReferenceLookupHelper(referenceTree, site, argtypes, typeargtypes, boxingAllowed) :
+                new MethodReferenceLookupHelper(referenceTree, name, site, argtypes, typeargtypes, boxingAllowed);
+        Env<AttrContext> boundEnv = env.dup(env.tree, env.info.dup());
+        Symbol boundSym = findMemberReference(boundEnv, boundLookupHelper);
+
+        //step 2 - unbound lookup
+        ReferenceLookupHelper unboundLookupHelper = boundLookupHelper.unboundLookup();
+        Env<AttrContext> unboundEnv = env.dup(env.tree, env.info.dup());
+        Symbol unboundSym = findMemberReference(unboundEnv, unboundLookupHelper);
+
+        //merge results
+        Pair<Symbol, ReferenceLookupHelper> res;
+        if (unboundSym.kind != MTH) {
+            res = new Pair<Symbol, ReferenceLookupHelper>(boundSym, boundLookupHelper);
+            env.info.pendingResolutionPhase = boundEnv.info.pendingResolutionPhase;
+        } else if (boundSym.kind == MTH) {
+            res = new Pair<Symbol, ReferenceLookupHelper>(ambiguityError(boundSym, unboundSym), boundLookupHelper);
+            env.info.pendingResolutionPhase = boundEnv.info.pendingResolutionPhase;
+        } else {
+            res = new Pair<Symbol, ReferenceLookupHelper>(unboundSym, unboundLookupHelper);
+            env.info.pendingResolutionPhase = unboundEnv.info.pendingResolutionPhase;
+        }
+
+        return res;
+    }
+
+    /**
+     * Helper for defining custom method-like lookup logic; a lookup helper
+     * provides hooks for (i) the actual lookup logic and (ii) accessing the
+     * lookup result (this step might result in compiler diagnostics to be generated)
+     */
+    abstract class LookupHelper {
+
+        /** name of the symbol to lookup */
+        Name name;
+
+        /** location in which the lookup takes place */
+        Type site;
+
+        /** actual types used during the lookup */
+        List<Type> argtypes;
+
+        /** type arguments used during the lookup */
+        List<Type> typeargtypes;
+
+        LookupHelper(Name name, Type site, List<Type> argtypes, List<Type> typeargtypes) {
+            this.name = name;
+            this.site = site;
+            this.argtypes = argtypes;
+            this.typeargtypes = typeargtypes;
+        }
+
+        /**
+         * Search for a symbol under a given overload resolution phase - this method
+         * is usually called several times, once per each overload resolution phase
+         */
+        abstract Symbol lookup(Env<AttrContext> env, MethodResolutionPhase phase);
+
+        /**
+         * Validate the result of the lookup
+         */
+        abstract Symbol access(Env<AttrContext> env, Symbol symbol);
+    }
+
+    /**
+     * Helper class for member reference lookup. A reference lookup helper
+     * defines the basic logic for member reference lookup; a method gives
+     * access to an 'unbound' helper used to perform an unbound member
+     * reference lookup.
+     */
+    abstract class ReferenceLookupHelper extends LookupHelper {
+
+        /** The member reference tree */
+        JCMemberReference referenceTree;
+
+        /** Max overload resolution phase handled by this helper */
+        MethodResolutionPhase maxPhase;
+
+        ReferenceLookupHelper(JCMemberReference referenceTree, Name name, Type site,
+                List<Type> argtypes, List<Type> typeargtypes, boolean boxingAllowed) {
+            super(name, site, argtypes, typeargtypes);
+            this.referenceTree = referenceTree;
+            this.maxPhase = boxingAllowed ? VARARITY : BASIC;
+        }
+
+        /**
+         * Returns an unbound version of this lookup helper. By default, this
+         * method returns an dummy lookup helper.
+         */
+        ReferenceLookupHelper unboundLookup() {
+            //dummy loopkup helper that always return 'methodNotFound'
+            return new ReferenceLookupHelper(referenceTree, name, site, argtypes, typeargtypes, maxPhase.isBoxingRequired()) {
+                @Override
+                ReferenceLookupHelper unboundLookup() {
+                    return this;
+                }
+                @Override
+                Symbol lookupReference(Env<AttrContext> env, MethodResolutionPhase phase) {
+                    return methodNotFound;
+                }
+                @Override
+                ReferenceKind referenceKind(Symbol sym) {
+                    Assert.error();
+                    return null;
+                }
+            };
+        }
+
+        /**
+         * Get the kind of the member reference
+         */
+        abstract JCMemberReference.ReferenceKind referenceKind(Symbol sym);
+
+        @Override
+        Symbol lookup(Env<AttrContext> env, MethodResolutionPhase phase) {
+            return (env.info.pendingResolutionPhase.ordinal() > maxPhase.ordinal()) ?
+                    methodNotFound : lookupReference(env, phase);
+        }
+
+        abstract Symbol lookupReference(Env<AttrContext> env, MethodResolutionPhase phase);
+
+        Symbol access(Env<AttrContext> env, Symbol sym) {
+            if (sym.kind >= AMBIGUOUS) {
+                MethodResolutionPhase errPhase = currentResolutionContext.firstErroneousResolutionPhase();
+                if (errPhase.ordinal() > maxPhase.ordinal()) {
+                    errPhase = maxPhase;
+                }
+                env.info.pendingResolutionPhase = errPhase;
+                sym = currentResolutionContext.resolutionCache.get(errPhase);
+            }
+            return sym;
+        }
+    }
+
+    /**
+     * Helper class for method reference lookup. The lookup logic is based
+     * upon Resolve.findMethod; in certain cases, this helper class has a
+     * corresponding unbound helper class (see UnboundMethodReferenceLookupHelper).
+     * In such cases, non-static lookup results are thrown away.
+     */
+    class MethodReferenceLookupHelper extends ReferenceLookupHelper {
+
+        MethodReferenceLookupHelper(JCMemberReference referenceTree, Name name, Type site,
+                List<Type> argtypes, List<Type> typeargtypes, boolean boxingAllowed) {
+            super(referenceTree, name, site, argtypes, typeargtypes, boxingAllowed);
+        }
+
+        protected Symbol lookupReferenceInternal(Env<AttrContext> env, MethodResolutionPhase phase) {
+            return findMethod(env, site, name, argtypes, typeargtypes,
+                    phase.isBoxingRequired(), phase.isVarargsRequired(), syms.operatorNames.contains(name));
+        }
+
+        protected Symbol adjustLookupResult(Env<AttrContext> env, Symbol sym) {
+            return !TreeInfo.isStaticSelector(referenceTree.expr, names) ||
+                        sym.kind != MTH ||
+                        sym.isStatic() ? sym : new StaticError(sym);
+        }
+
+        @Override
+        final Symbol lookupReference(Env<AttrContext> env, MethodResolutionPhase phase) {
+            return adjustLookupResult(env, lookupReferenceInternal(env, phase));
+        }
+
+        @Override
+        ReferenceLookupHelper unboundLookup() {
+            if (TreeInfo.isStaticSelector(referenceTree.expr, names) &&
+                    argtypes.nonEmpty() &&
+                    types.isSubtypeUnchecked(argtypes.head, site)) {
+                return new UnboundMethodReferenceLookupHelper(referenceTree, name,
+                        site, argtypes, typeargtypes, maxPhase.isBoxingRequired());
+            } else {
+                return super.unboundLookup();
+            }
+        }
+
+        @Override
+        ReferenceKind referenceKind(Symbol sym) {
+            if (sym.isStatic()) {
+                return TreeInfo.isStaticSelector(referenceTree.expr, names) ?
+                        ReferenceKind.STATIC : ReferenceKind.STATIC_EVAL;
+            } else {
+                Name selName = TreeInfo.name(referenceTree.getQualifierExpression());
+                return selName != null && selName == names._super ?
+                        ReferenceKind.SUPER :
+                        ReferenceKind.BOUND;
+            }
+        }
+    }
+
+    /**
+     * Helper class for unbound method reference lookup. Essentially the same
+     * as the basic method reference lookup helper; main difference is that static
+     * lookup results are thrown away. If qualifier type is raw, an attempt to
+     * infer a parameterized type is made using the first actual argument (that
+     * would otherwise be ignored during the lookup).
+     */
+    class UnboundMethodReferenceLookupHelper extends MethodReferenceLookupHelper {
+
+        UnboundMethodReferenceLookupHelper(JCMemberReference referenceTree, Name name, Type site,
+                List<Type> argtypes, List<Type> typeargtypes, boolean boxingAllowed) {
+            super(referenceTree, name,
+                    site.isRaw() ? types.asSuper(argtypes.head, site.tsym) : site,
+                    argtypes.tail, typeargtypes, boxingAllowed);
+        }
+
+        @Override
+        protected Symbol adjustLookupResult(Env<AttrContext> env, Symbol sym) {
+            return sym.kind != MTH || !sym.isStatic() ? sym : new StaticError(sym);
+        }
+
+        @Override
+        ReferenceLookupHelper unboundLookup() {
+            return this;
+        }
+
+        @Override
+        ReferenceKind referenceKind(Symbol sym) {
+            return ReferenceKind.UNBOUND;
+        }
+    }
+
+    /**
+     * Helper class for constructor reference lookup. The lookup logic is based
+     * upon either Resolve.findMethod or Resolve.findDiamond - depending on
+     * whether the constructor reference needs diamond inference (this is the case
+     * if the qualifier type is raw). A special erroneous symbol is returned
+     * if the lookup returns the constructor of an inner class and there's no
+     * enclosing instance in scope.
+     */
+    class ConstructorReferenceLookupHelper extends ReferenceLookupHelper {
+
+        boolean needsInference;
+
+        ConstructorReferenceLookupHelper(JCMemberReference referenceTree, Type site, List<Type> argtypes,
+                List<Type> typeargtypes, boolean boxingAllowed) {
+            super(referenceTree, names.init, site, argtypes, typeargtypes, boxingAllowed);
+            if (site.isRaw()) {
+                this.site = new ClassType(site.getEnclosingType(), site.tsym.type.getTypeArguments(), site.tsym);
+                needsInference = true;
+            }
+        }
+
+        @Override
+        protected Symbol lookupReference(Env<AttrContext> env, MethodResolutionPhase phase) {
+            Symbol sym = needsInference ?
+                findDiamond(env, site, argtypes, typeargtypes, phase.isBoxingRequired(), phase.isVarargsRequired()) :
+                findMethod(env, site, name, argtypes, typeargtypes,
+                        phase.isBoxingRequired(), phase.isVarargsRequired(), syms.operatorNames.contains(name));
+            return sym.kind != MTH ||
+                          site.getEnclosingType().tag == NONE ||
+                          hasEnclosingInstance(env, site) ?
+                          sym : new InvalidSymbolError(Kinds.MISSING_ENCL, sym, null) {
+                    @Override
+                    JCDiagnostic getDiagnostic(DiagnosticType dkind, DiagnosticPosition pos, Symbol location, Type site, Name name, List<Type> argtypes, List<Type> typeargtypes) {
+                       return diags.create(dkind, log.currentSource(), pos,
+                            "cant.access.inner.cls.constr", site.tsym.name, argtypes, site.getEnclosingType());
+                    }
+                };
+        }
+
+        @Override
+        ReferenceKind referenceKind(Symbol sym) {
+            return site.getEnclosingType().tag == NONE ?
+                    ReferenceKind.TOPLEVEL : ReferenceKind.IMPLICIT_INNER;
+        }
+    }
+
+    /**
+     * Resolution step for member reference. This generalizes a standard
+     * method/constructor lookup - on each overload resolution step, a
+     * lookup helper class is used to perform the reference lookup; at the end
+     * of the lookup, the helper is used to validate the results.
+     */
+    Symbol findMemberReference(Env<AttrContext> env, LookupHelper lookupHelper) {
+        MethodResolutionContext prevResolutionContext = currentResolutionContext;
+        try {
+            currentResolutionContext = new MethodResolutionContext();
+            Symbol sym = methodNotFound;
+            List<MethodResolutionPhase> steps = methodResolutionSteps;
+            while (steps.nonEmpty() &&
+                   steps.head.isApplicable(boxingEnabled, varargsEnabled) &&
+                   sym.kind >= ERRONEOUS) {
+                currentResolutionContext.step = env.info.pendingResolutionPhase = steps.head;
+                sym = lookupHelper.lookup(env, steps.head);
+                currentResolutionContext.resolutionCache.put(steps.head, sym);
+                steps = steps.tail;
+            }
+            return lookupHelper.access(env, sym);
+        }
+        finally {
+            currentResolutionContext = prevResolutionContext;
+        }
+    }
+
     /** Resolve constructor.
      *  @param pos       The position to use for error reporting.
      *  @param env       The environment current at the constructor invocation.
@@ -2013,7 +2685,7 @@ public class Resolve {
             if (boxingEnabled && sym.kind >= WRONG_MTHS)
                 sym = findMethod(env, syms.predefClass.type, name, argtypes,
                                  null, true, false, true);
-            return access(sym, pos, env.enclClass.sym.type, name,
+            return accessMethod(sym, pos, env.enclClass.sym.type, name,
                           false, argtypes, null);
         }
         finally {
@@ -2065,7 +2737,7 @@ public class Resolve {
                 Symbol sym = env1.info.scope.lookup(name).sym;
                 if (sym != null) {
                     if (staticOnly) sym = new StaticError(sym);
-                    return access(sym, pos, env.enclClass.sym.type,
+                    return accessBase(sym, pos, env.enclClass.sym.type,
                                   name, true);
                 }
             }
@@ -2087,6 +2759,23 @@ public class Resolve {
                                  Env<AttrContext> env,
                                  Symbol member,
                                  boolean isSuperCall) {
+        Symbol sym = resolveSelfContainingInternal(env, member, isSuperCall);
+        if (sym == null) {
+            log.error(pos, "encl.class.required", member);
+            return syms.errSymbol;
+        } else {
+            return accessBase(sym, pos, env.enclClass.sym.type, sym.name, true);
+        }
+    }
+
+    boolean hasEnclosingInstance(Env<AttrContext> env, Type type) {
+        Symbol encl = resolveSelfContainingInternal(env, type.tsym, false);
+        return encl != null && encl.kind < ERRONEOUS;
+    }
+
+    private Symbol resolveSelfContainingInternal(Env<AttrContext> env,
+                                 Symbol member,
+                                 boolean isSuperCall) {
         Name name = names._this;
         Env<AttrContext> env1 = isSuperCall ? env.outer : env;
         boolean staticOnly = false;
@@ -2097,8 +2786,7 @@ public class Resolve {
                     Symbol sym = env1.info.scope.lookup(name).sym;
                     if (sym != null) {
                         if (staticOnly) sym = new StaticError(sym);
-                        return access(sym, pos, env.enclClass.sym.type,
-                                      name, true);
+                        return sym;
                     }
                 }
                 if ((env1.enclClass.sym.flags() & STATIC) != 0)
@@ -2106,8 +2794,7 @@ public class Resolve {
                 env1 = env1.outer;
             }
         }
-        log.error(pos, "encl.class.required", member);
-        return syms.errSymbol;
+        return null;
     }
 
     /**
@@ -2155,7 +2842,19 @@ public class Resolve {
     private final LocalizedString noArgs = new LocalizedString("compiler.misc.no.args");
 
     public Object methodArguments(List<Type> argtypes) {
-        return argtypes == null || argtypes.isEmpty() ? noArgs : argtypes;
+        if (argtypes == null || argtypes.isEmpty()) {
+            return noArgs;
+        } else {
+            ListBuffer<Object> diagArgs = ListBuffer.lb();
+            for (Type t : argtypes) {
+                if (t.tag == DEFERRED) {
+                    diagArgs.append(((DeferredAttr.DeferredType)t).tree);
+                } else {
+                    diagArgs.append(t);
+                }
+            }
+            return diagArgs;
+        }
     }
 
     /**
@@ -2163,7 +2862,7 @@ public class Resolve {
      * represent a different kinds of resolution error - as such they must
      * specify how they map into concrete compiler diagnostics.
      */
-    private abstract class ResolveError extends Symbol {
+    abstract class ResolveError extends Symbol {
 
         /** The name of the kind of error, for debugging only. */
         final String debugName;
@@ -2220,17 +2919,6 @@ public class Resolve {
                 Name name,
                 List<Type> argtypes,
                 List<Type> typeargtypes);
-
-        /**
-         * A name designates an operator if it consists
-         * of a non-empty sequence of operator symbols {@literal +-~!/*%&|^<>= }
-         */
-        boolean isOperator(Name name) {
-            int i = 0;
-            while (i < name.getByteLength() &&
-                   "+-~!*/%&|^<>=".indexOf(name.getByteAt(i)) >= 0) i++;
-            return i > 0 && i == name.getByteLength();
-        }
     }
 
     /**
@@ -2291,7 +2979,7 @@ public class Resolve {
             if (name == names.error)
                 return null;
 
-            if (isOperator(name)) {
+            if (syms.operatorNames.contains(name)) {
                 boolean isUnaryOp = argtypes.size() == 1;
                 String key = argtypes.size() == 1 ?
                     "operator.cant.be.applied" :
@@ -2313,8 +3001,7 @@ public class Resolve {
                 hasLocation = !location.name.equals(names._this) &&
                         !location.name.equals(names._super);
             }
-            boolean isConstructor = kind == ABSENT_MTH &&
-                    name == names.table.names.init;
+            boolean isConstructor = kind == ABSENT_MTH && name == names.init;
             KindName kindname = isConstructor ? KindName.CONSTRUCTOR : absentKind(kind);
             Name idname = isConstructor ? site.tsym.name : name;
             String errKey = getErrorKey(kindname, typeargtypes.nonEmpty(), hasLocation);
@@ -2365,12 +3052,15 @@ public class Resolve {
      */
     class InapplicableSymbolError extends ResolveError {
 
-        InapplicableSymbolError() {
-            super(WRONG_MTH, "inapplicable symbol error");
+        protected MethodResolutionContext resolveContext;
+
+        InapplicableSymbolError(MethodResolutionContext context) {
+            this(WRONG_MTH, "inapplicable symbol error", context);
         }
 
-        protected InapplicableSymbolError(int kind, String debugName) {
+        protected InapplicableSymbolError(int kind, String debugName, MethodResolutionContext context) {
             super(kind, debugName);
+            this.resolveContext = context;
         }
 
         @Override
@@ -2394,7 +3084,7 @@ public class Resolve {
             if (name == names.error)
                 return null;
 
-            if (isOperator(name)) {
+            if (syms.operatorNames.contains(name)) {
                 boolean isUnaryOp = argtypes.size() == 1;
                 String key = argtypes.size() == 1 ?
                     "operator.cant.be.applied" :
@@ -2408,7 +3098,7 @@ public class Resolve {
                 Candidate c = errCandidate();
                 Symbol ws = c.sym.asMemberOf(site, types);
                 return diags.create(dkind, log.currentSource(), pos,
-                          "cant.apply.symbol" + (c.details != null ? ".1" : ""),
+                          "cant.apply.symbol",
                           kindName(ws),
                           ws.name == names.init ? ws.owner.name : ws.name,
                           methodArguments(ws.type.getParameterTypes()),
@@ -2425,13 +3115,13 @@ public class Resolve {
         }
 
         protected boolean shouldReport(Candidate c) {
+            MethodResolutionPhase errPhase = resolveContext.firstErroneousResolutionPhase();
             return !c.isApplicable() &&
-                    (((c.sym.flags() & VARARGS) != 0 && c.step == VARARITY) ||
-                      (c.sym.flags() & VARARGS) == 0 && c.step == (boxingEnabled ? BOX : BASIC));
+                    c.step == errPhase;
         }
 
         private Candidate errCandidate() {
-            for (Candidate c : currentResolutionContext.candidates) {
+            for (Candidate c : resolveContext.candidates) {
                 if (shouldReport(c)) {
                     return c;
                 }
@@ -2448,8 +3138,8 @@ public class Resolve {
      */
     class InapplicableSymbolsError extends InapplicableSymbolError {
 
-        InapplicableSymbolsError() {
-            super(WRONG_MTHS, "inapplicable symbols");
+        InapplicableSymbolsError(MethodResolutionContext context) {
+            super(WRONG_MTHS, "inapplicable symbols", context);
         }
 
         @Override
@@ -2460,7 +3150,7 @@ public class Resolve {
                 Name name,
                 List<Type> argtypes,
                 List<Type> typeargtypes) {
-            if (currentResolutionContext.candidates.nonEmpty()) {
+            if (!resolveContext.candidates.isEmpty()) {
                 JCDiagnostic err = diags.create(dkind,
                         log.currentSource(),
                         pos,
@@ -2478,7 +3168,7 @@ public class Resolve {
         //where
         List<JCDiagnostic> candidateDetails(Type site) {
             List<JCDiagnostic> details = List.nil();
-            for (Candidate c : currentResolutionContext.candidates) {
+            for (Candidate c : resolveContext.candidates) {
                 if (!shouldReport(c)) continue;
                 JCDiagnostic detailDiag = diags.fragment("inapplicable.method",
                         Kinds.kindName(c.sym),
@@ -2491,7 +3181,7 @@ public class Resolve {
         }
 
         private Name getName() {
-            Symbol sym = currentResolutionContext.candidates.head.sym;
+            Symbol sym = resolveContext.candidates.head.sym;
             return sym.name == names.init ?
                 sym.owner.name :
                 sym.name;
@@ -2672,9 +3362,10 @@ public class Resolve {
         private Map<MethodResolutionPhase, Symbol> resolutionCache =
             new EnumMap<MethodResolutionPhase, Symbol>(MethodResolutionPhase.class);
 
-        private MethodResolutionPhase step = null;
+        MethodResolutionPhase step = null;
 
         private boolean internalResolution = false;
+        private DeferredAttr.AttrMode attrMode = DeferredAttr.AttrMode.SPECULATIVE;
 
         private MethodResolutionPhase firstErroneousResolutionPhase() {
             MethodResolutionPhase bestSoFar = BASIC;
@@ -2684,6 +3375,7 @@ public class Resolve {
                    steps.head.isApplicable(boxingEnabled, varargsEnabled) &&
                    sym.kind >= WRONG_MTHS) {
                 sym = resolutionCache.get(steps.head);
+                if (sym.kind == ABSENT_MTH) break; //ignore spurious empty entries
                 bestSoFar = steps.head;
                 steps = steps.tail;
             }
@@ -2692,8 +3384,7 @@ public class Resolve {
 
         void addInapplicableCandidate(Symbol sym, JCDiagnostic details) {
             Candidate c = new Candidate(currentResolutionContext.step, sym, details, null);
-            if (!candidates.contains(c))
-                candidates = candidates.append(c);
+            candidates = candidates.append(c);
         }
 
         void addApplicableCandidate(Symbol sym, Type mtype) {
@@ -2701,6 +3392,16 @@ public class Resolve {
             candidates = candidates.append(c);
         }
 
+        Candidate getCandidate(Symbol sym, MethodResolutionPhase phase) {
+            for (Candidate c : currentResolutionContext.candidates) {
+                if (c.step == phase &&
+                        c.sym.baseSymbol() == sym.baseSymbol()) {
+                    return c;
+                }
+            }
+            return null;
+        }
+
         /**
          * This class represents an overload resolution candidate. There are two
          * kinds of candidates: applicable methods and inapplicable methods;
@@ -2728,9 +3429,9 @@ public class Resolve {
                     Symbol s1 = this.sym;
                     Symbol s2 = ((Candidate)o).sym;
                     if  ((s1 != s2 &&
-                        (s1.overrides(s2, s1.owner.type.tsym, types, false) ||
-                        (s2.overrides(s1, s2.owner.type.tsym, types, false)))) ||
-                        ((s1.isConstructor() || s2.isConstructor()) && s1.owner != s2.owner))
+                            (s1.overrides(s2, s1.owner.type.tsym, types, false) ||
+                            (s2.overrides(s1, s2.owner.type.tsym, types, false)))) ||
+                            ((s1.isConstructor() || s2.isConstructor()) && s1.owner != s2.owner))
                         return true;
                 }
                 return false;
@@ -2740,6 +3441,14 @@ public class Resolve {
                 return mtype != null;
             }
         }
+
+        DeferredAttr.AttrMode attrMode() {
+            return attrMode;
+        }
+
+        boolean internal() {
+            return internalResolution;
+        }
     }
 
     MethodResolutionContext currentResolutionContext = null;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java b/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java
index 92c0026f460..e3afbb757e5 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java
@@ -627,6 +627,16 @@ public class TransTypes extends TreeTranslator {
         result = tree;
     }
 
+    @Override
+    public void visitLambda(JCLambda tree) {
+        Assert.error("Translation of lambda expression not supported yet");
+    }
+
+    @Override
+    public void visitReference(JCMemberReference tree) {
+        Assert.error("Translation of method reference not supported yet");
+    }
+
     public void visitParens(JCParens tree) {
         tree.expr = translate(tree.expr, pt);
         tree.type = erasure(tree.type);
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/Locations.java b/langtools/src/share/classes/com/sun/tools/javac/file/Locations.java
index 3a464ca818a..1e29f916742 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/Locations.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/Locations.java
@@ -733,11 +733,7 @@ public class Locations {
                 urls[count++] = url;
             }
         }
-        if (urls.length != count) {
-            URL[] tmp = new URL[count];
-            System.arraycopy(urls, 0, tmp, 0, count);
-            urls = tmp;
-        }
+        urls = Arrays.copyOf(urls, count);
         return urls;
     }
 
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassFile.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassFile.java
index 96ff0557c0c..f01b97a18d0 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassFile.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassFile.java
@@ -84,6 +84,16 @@ public class ClassFile {
     public final static int CONSTANT_MethodType = 16;
     public final static int CONSTANT_InvokeDynamic = 18;
 
+    public final static int REF_getField = 1;
+    public final static int REF_getStatic = 2;
+    public final static int REF_putField = 3;
+    public final static int REF_putStatic = 4;
+    public final static int REF_invokeVirtual = 5;
+    public final static int REF_invokeStatic = 6;
+    public final static int REF_invokeSpecial = 7;
+    public final static int REF_newInvokeSpecial = 8;
+    public final static int REF_invokeInterface = 9;
+
     public final static int MAX_PARAMETERS = 0xff;
     public final static int MAX_DIMENSIONS = 0xff;
     public final static int MAX_CODE = 0xffff;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
index 4ed076afe83..463ce4c07bf 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
@@ -26,6 +26,8 @@
 package com.sun.tools.javac.jvm;
 
 import java.io.*;
+import java.util.LinkedHashMap;
+import java.util.Map;
 import java.util.Set;
 import java.util.HashSet;
 
@@ -137,6 +139,11 @@ public class ClassWriter extends ClassFile {
      */
     ListBuffer<ClassSymbol> innerClassesQueue;
 
+    /** The bootstrap methods to be written in the corresponding class attribute
+     *  (one for each invokedynamic)
+     */
+    Map<MethodSymbol, Pool.MethodHandle> bootstrapMethods;
+
     /** The log to use for verbose output.
      */
     private final Log log;
@@ -477,11 +484,27 @@ public class ClassWriter extends ClassFile {
 
             if (value instanceof MethodSymbol) {
                 MethodSymbol m = (MethodSymbol)value;
-                poolbuf.appendByte((m.owner.flags() & INTERFACE) != 0
-                          ? CONSTANT_InterfaceMethodref
-                          : CONSTANT_Methodref);
-                poolbuf.appendChar(pool.put(m.owner));
-                poolbuf.appendChar(pool.put(nameType(m)));
+                if (!m.isDynamic()) {
+                    poolbuf.appendByte((m.owner.flags() & INTERFACE) != 0
+                              ? CONSTANT_InterfaceMethodref
+                              : CONSTANT_Methodref);
+                    poolbuf.appendChar(pool.put(m.owner));
+                    poolbuf.appendChar(pool.put(nameType(m)));
+                } else {
+                    //invokedynamic
+                    DynamicMethodSymbol dynSym = (DynamicMethodSymbol)m;
+                    Pool.MethodHandle handle = new Pool.MethodHandle(dynSym.bsmKind, dynSym.bsm);
+                    bootstrapMethods.put(dynSym, handle);
+                    //init cp entries
+                    pool.put(names.BootstrapMethods);
+                    pool.put(handle);
+                    for (Object staticArg : dynSym.staticArgs) {
+                        pool.put(staticArg);
+                    }
+                    poolbuf.appendByte(CONSTANT_InvokeDynamic);
+                    poolbuf.appendChar(bootstrapMethods.size() - 1);
+                    poolbuf.appendChar(pool.put(nameType(dynSym)));
+                }
             } else if (value instanceof VarSymbol) {
                 VarSymbol v = (VarSymbol)value;
                 poolbuf.appendByte(CONSTANT_Fieldref);
@@ -526,11 +549,20 @@ public class ClassWriter extends ClassFile {
             } else if (value instanceof String) {
                 poolbuf.appendByte(CONSTANT_String);
                 poolbuf.appendChar(pool.put(names.fromString((String)value)));
+            } else if (value instanceof MethodType) {
+                MethodType mtype = (MethodType)value;
+                poolbuf.appendByte(CONSTANT_MethodType);
+                poolbuf.appendChar(pool.put(typeSig(mtype)));
             } else if (value instanceof Type) {
                 Type type = (Type)value;
                 if (type.tag == CLASS) enterInner((ClassSymbol)type.tsym);
                 poolbuf.appendByte(CONSTANT_Class);
                 poolbuf.appendChar(pool.put(xClassName(type)));
+            } else if (value instanceof Pool.MethodHandle) {
+                Pool.MethodHandle ref = (Pool.MethodHandle)value;
+                poolbuf.appendByte(CONSTANT_MethodHandle);
+                poolbuf.appendByte(ref.refKind);
+                poolbuf.appendChar(pool.put(ref.refSym));
             } else {
                 Assert.error("writePool " + value);
             }
@@ -914,6 +946,25 @@ public class ClassWriter extends ClassFile {
         endAttr(alenIdx);
     }
 
+    /** Write "bootstrapMethods" attribute.
+     */
+    void writeBootstrapMethods() {
+        int alenIdx = writeAttr(names.BootstrapMethods);
+        databuf.appendChar(bootstrapMethods.size());
+        for (Map.Entry<MethodSymbol, Pool.MethodHandle> entry : bootstrapMethods.entrySet()) {
+            DynamicMethodSymbol dsym = (DynamicMethodSymbol)entry.getKey();
+            //write BSM handle
+            databuf.appendChar(pool.get(entry.getValue()));
+            //write static args length
+            databuf.appendChar(dsym.staticArgs.length);
+            //write static args array
+            for (Object o : dsym.staticArgs) {
+                databuf.appendChar(pool.get(o));
+            }
+        }
+        endAttr(alenIdx);
+    }
+
     /** Write field symbol, entering all references into constant pool.
      */
     void writeField(VarSymbol v) {
@@ -1483,6 +1534,7 @@ public class ClassWriter extends ClassFile {
         pool = c.pool;
         innerClasses = null;
         innerClassesQueue = null;
+        bootstrapMethods = new LinkedHashMap<MethodSymbol, Pool.MethodHandle>();
 
         Type supertype = types.supertype(c.type);
         List<Type> interfaces = types.interfaces(c.type);
@@ -1589,6 +1641,12 @@ public class ClassWriter extends ClassFile {
             writeInnerClasses();
             acount++;
         }
+
+        if (!bootstrapMethods.isEmpty()) {
+            writeBootstrapMethods();
+            acount++;
+        }
+
         endAttrs(acountIdx, acount);
 
         poolbuf.appendBytes(databuf.elems, 0, databuf.length);
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java
index ff78df2d546..a3cffbc58e1 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java
@@ -314,11 +314,7 @@ public class Code {
      */
     private  void emit1(int od) {
         if (!alive) return;
-        if (cp == code.length) {
-            byte[] newcode = new byte[cp * 2];
-            System.arraycopy(code, 0, newcode, 0, cp);
-            code = newcode;
-        }
+        code = ArrayUtils.ensureCapacity(code, cp);
         code[cp++] = (byte)od;
     }
 
@@ -903,6 +899,8 @@ public class Code {
         if (o instanceof Double) return syms.doubleType;
         if (o instanceof ClassSymbol) return syms.classType;
         if (o instanceof Type.ArrayType) return syms.classType;
+        if (o instanceof Type.MethodType) return syms.methodTypeType;
+        if (o instanceof Pool.MethodHandle) return syms.methodHandleType;
         throw new AssertionError(o);
     }
 
@@ -1245,12 +1243,8 @@ public class Code {
 
         if (stackMapBuffer == null) {
             stackMapBuffer = new StackMapFrame[20];
-        } else if (stackMapBuffer.length == stackMapBufferSize) {
-            StackMapFrame[] newStackMapBuffer =
-                new StackMapFrame[stackMapBufferSize << 1];
-            System.arraycopy(stackMapBuffer, 0, newStackMapBuffer,
-                             0, stackMapBufferSize);
-            stackMapBuffer = newStackMapBuffer;
+        } else {
+            stackMapBuffer = ArrayUtils.ensureCapacity(stackMapBuffer, stackMapBufferSize);
         }
         StackMapFrame frame =
             stackMapBuffer[stackMapBufferSize++] = new StackMapFrame();
@@ -1318,12 +1312,10 @@ public class Code {
 
         if (stackMapTableBuffer == null) {
             stackMapTableBuffer = new StackMapTableFrame[20];
-        } else if (stackMapTableBuffer.length == stackMapBufferSize) {
-            StackMapTableFrame[] newStackMapTableBuffer =
-                new StackMapTableFrame[stackMapBufferSize << 1];
-            System.arraycopy(stackMapTableBuffer, 0, newStackMapTableBuffer,
-                             0, stackMapBufferSize);
-            stackMapTableBuffer = newStackMapTableBuffer;
+        } else {
+            stackMapTableBuffer = ArrayUtils.ensureCapacity(
+                                    stackMapTableBuffer,
+                                    stackMapBufferSize);
         }
         stackMapTableBuffer[stackMapBufferSize++] =
                 StackMapTableFrame.getInstance(frame, lastFrame.pc, lastFrame.locals, types);
@@ -1649,10 +1641,8 @@ public class Code {
         void lock(int register) {
             if (locks == null) {
                 locks = new int[20];
-            } else if (locks.length == nlocks) {
-                int[] newLocks = new int[locks.length << 1];
-                System.arraycopy(locks, 0, newLocks, 0, locks.length);
-                locks = newLocks;
+            } else {
+                locks = ArrayUtils.ensureCapacity(locks, nlocks);
             }
             locks[nlocks] = register;
             nlocks++;
@@ -1678,11 +1668,7 @@ public class Code {
             default:
                 break;
             }
-            if (stacksize+2 >= stack.length) {
-                Type[] newstack = new Type[2*stack.length];
-                System.arraycopy(stack, 0, newstack, 0, stack.length);
-                stack = newstack;
-            }
+            stack = ArrayUtils.ensureCapacity(stack, stacksize+2);
             stack[stacksize++] = t;
             switch (width(t)) {
             case 1:
@@ -1869,13 +1855,7 @@ public class Code {
     /** Add a new local variable. */
     private void addLocalVar(VarSymbol v) {
         int adr = v.adr;
-        if (adr+1 >= lvar.length) {
-            int newlength = lvar.length << 1;
-            if (newlength <= adr) newlength = adr + 10;
-            LocalVar[] new_lvar = new LocalVar[newlength];
-            System.arraycopy(lvar, 0, new_lvar, 0, lvar.length);
-            lvar = new_lvar;
-        }
+        lvar = ArrayUtils.ensureCapacity(lvar, adr+1);
         Assert.checkNull(lvar[adr]);
         if (pendingJumps != null) resolvePending();
         lvar[adr] = new LocalVar(v);
@@ -1955,11 +1935,8 @@ public class Code {
         if ((var.sym.flags() & Flags.SYNTHETIC) != 0) return;
         if (varBuffer == null)
             varBuffer = new LocalVar[20];
-        else if (varBufferSize >= varBuffer.length) {
-            LocalVar[] newVarBuffer = new LocalVar[varBufferSize*2];
-            System.arraycopy(varBuffer, 0, newVarBuffer, 0, varBuffer.length);
-            varBuffer = newVarBuffer;
-        }
+        else
+            varBuffer = ArrayUtils.ensureCapacity(varBuffer, varBufferSize);
         varBuffer[varBufferSize++] = var;
     }
 
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java
index 2919579f77c..9a59e0de5b6 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java
@@ -2103,6 +2103,8 @@ public class Gen extends JCTree.Visitor {
             result = res;
         } else if (sym.kind == VAR && sym.owner.kind == MTH) {
             result = items.makeLocalItem((VarSymbol)sym);
+        } else if (isInvokeDynamic(sym)) {
+            result = items.makeDynamicItem(sym);
         } else if ((sym.flags() & STATIC) != 0) {
             if (!isAccessSuper(env.enclMethod))
                 sym = binaryQualifier(sym, env.enclClass.type);
@@ -2152,8 +2154,12 @@ public class Gen extends JCTree.Visitor {
             result = items.
                 makeImmediateItem(sym.type, ((VarSymbol) sym).getConstValue());
         } else {
-            if (!accessSuper)
+            if (isInvokeDynamic(sym)) {
+                result = items.makeDynamicItem(sym);
+                return;
+            } else if (!accessSuper) {
                 sym = binaryQualifier(sym, tree.selected.type);
+            }
             if ((sym.flags() & STATIC) != 0) {
                 if (!selectSuper && (ssym == null || ssym.kind != TYP))
                     base = base.load();
@@ -2174,6 +2180,10 @@ public class Gen extends JCTree.Visitor {
         }
     }
 
+    public boolean isInvokeDynamic(Symbol sym) {
+        return sym.kind == MTH && ((MethodSymbol)sym).isDynamic();
+    }
+
     public void visitLiteral(JCLiteral tree) {
         if (tree.type.tag == TypeTags.BOT) {
             code.emitop0(aconst_null);
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java
index 5550239fc42..1580f293215 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -110,6 +110,13 @@ public class Items {
         return stackItem[Code.typecode(type)];
     }
 
+    /** Make an item representing a dynamically invoked method.
+     *  @param member   The represented symbol.
+     */
+    Item makeDynamicItem(Symbol member) {
+        return new DynamicItem(member);
+    }
+
     /** Make an item representing an indexed expression.
      *  @param type    The expression's type.
      */
@@ -457,6 +464,35 @@ public class Items {
         }
     }
 
+    /** An item representing a dynamic call site.
+     */
+    class DynamicItem extends StaticItem {
+        DynamicItem(Symbol member) {
+            super(member);
+        }
+
+        Item load() {
+            assert false;
+            return null;
+        }
+
+        void store() {
+            assert false;
+        }
+
+        Item invoke() {
+            // assert target.hasNativeInvokeDynamic();
+            MethodType mtype = (MethodType)member.erasure(types);
+            int rescode = Code.typecode(mtype.restype);
+            code.emitInvokedynamic(pool.put(member), mtype);
+            return stackItem[rescode];
+        }
+
+        public String toString() {
+            return "dynamic(" + member + ")";
+        }
+    }
+
     /** An item representing an instance variable or method.
      */
     class MemberItem extends Item {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Pool.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Pool.java
index a22c3a7946a..dbcee2841a4 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Pool.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Pool.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,17 @@
 
 package com.sun.tools.javac.jvm;
 
-import java.util.*;
-
+import com.sun.tools.javac.code.Kinds;
+import com.sun.tools.javac.code.Symbol;
 import com.sun.tools.javac.code.Symbol.*;
 
+import com.sun.tools.javac.util.ArrayUtils;
+import com.sun.tools.javac.util.Assert;
+import com.sun.tools.javac.util.Filter;
+import com.sun.tools.javac.util.Name;
+
+import java.util.*;
+
 /** An internal structure that corresponds to the constant pool of a classfile.
  *
  *  <p><b>This is NOT part of any supported API.
@@ -83,14 +90,6 @@ public class Pool {
         indices.clear();
     }
 
-    /** Double pool buffer in size.
-     */
-    private void doublePool() {
-        Object[] newpool = new Object[pool.length * 2];
-        System.arraycopy(pool, 0, newpool, 0, pool.length);
-        pool = newpool;
-    }
-
     /** Place an object in the pool, unless it is already there.
      *  If object is a symbol also enter its owner unless the owner is a
      *  package.  Return the object's index in the pool.
@@ -106,10 +105,10 @@ public class Pool {
 //          System.err.println("put " + value + " " + value.getClass());//DEBUG
             index = pp;
             indices.put(value, index);
-            if (pp == pool.length) doublePool();
+            pool = ArrayUtils.ensureCapacity(pool, pp);
             pool[pp++] = value;
             if (value instanceof Long || value instanceof Double) {
-                if (pp == pool.length) doublePool();
+                pool = ArrayUtils.ensureCapacity(pool, pp);
                 pool[pp++] = null;
             }
         }
@@ -167,4 +166,86 @@ public class Pool {
                 v.type.hashCode();
         }
     }
+
+    public static class MethodHandle {
+
+        /** Reference kind - see ClassFile */
+        int refKind;
+
+        /** Reference symbol */
+        Symbol refSym;
+
+        public MethodHandle(int refKind, Symbol refSym) {
+            this.refKind = refKind;
+            this.refSym = refSym;
+            checkConsistent();
+        }
+        public boolean equals(Object other) {
+            if (!(other instanceof MethodHandle)) return false;
+            MethodHandle mr = (MethodHandle) other;
+            if (mr.refKind != refKind)  return false;
+            Symbol o = mr.refSym;
+            return
+                o.name == refSym.name &&
+                o.owner == refSym.owner &&
+                o.type.equals(refSym.type);
+        }
+        public int hashCode() {
+            return
+                refKind * 65 +
+                refSym.name.hashCode() * 33 +
+                refSym.owner.hashCode() * 9 +
+                refSym.type.hashCode();
+        }
+
+        /**
+         * Check consistency of reference kind and symbol (see JVMS 4.4.8)
+         */
+        @SuppressWarnings("fallthrough")
+        private void checkConsistent() {
+            boolean staticOk = false;
+            int expectedKind = -1;
+            Filter<Name> nameFilter = nonInitFilter;
+            boolean interfaceOwner = false;
+            switch (refKind) {
+                case ClassFile.REF_getStatic:
+                case ClassFile.REF_putStatic:
+                    staticOk = true;
+                case ClassFile.REF_getField:
+                case ClassFile.REF_putField:
+                    expectedKind = Kinds.VAR;
+                    break;
+                case ClassFile.REF_newInvokeSpecial:
+                    nameFilter = initFilter;
+                    expectedKind = Kinds.MTH;
+                    break;
+                case ClassFile.REF_invokeInterface:
+                    interfaceOwner = true;
+                    expectedKind = Kinds.MTH;
+                    break;
+                case ClassFile.REF_invokeStatic:
+                    staticOk = true;
+                case ClassFile.REF_invokeVirtual:
+                case ClassFile.REF_invokeSpecial:
+                    expectedKind = Kinds.MTH;
+                    break;
+            }
+            Assert.check(!refSym.isStatic() || staticOk);
+            Assert.check(refSym.kind == expectedKind);
+            Assert.check(nameFilter.accepts(refSym.name));
+            Assert.check(!refSym.owner.isInterface() || interfaceOwner);
+        }
+        //where
+                Filter<Name> nonInitFilter = new Filter<Name>() {
+                    public boolean accepts(Name n) {
+                        return n != n.table.names.init && n != n.table.names.clinit;
+                    }
+                };
+
+                Filter<Name> initFilter = new Filter<Name>() {
+                    public boolean accepts(Name n) {
+                        return n == n.table.names.init;
+                    }
+                };
+    }
 }
diff --git a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
index 3b3c20bacde..65c16f08522 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
@@ -406,10 +406,17 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
             ? names.fromString(options.get("failcomplete"))
             : null;
 
-        shouldStopPolicy =
-            options.isSet("shouldStopPolicy")
+        shouldStopPolicyIfError =
+            options.isSet("shouldStopPolicy") // backwards compatible
             ? CompileState.valueOf(options.get("shouldStopPolicy"))
-            : null;
+            : options.isSet("shouldStopPolicyIfError")
+            ? CompileState.valueOf(options.get("shouldStopPolicyIfError"))
+            : CompileState.INIT;
+        shouldStopPolicyIfNoError =
+            options.isSet("shouldStopPolicyIfNoError")
+            ? CompileState.valueOf(options.get("shouldStopPolicyIfNoError"))
+            : CompileState.GENERATE;
+
         if (options.isUnset("oldDiags"))
             log.setDiagnosticFormatter(RichDiagnosticFormatter.instance(context));
     }
@@ -486,12 +493,20 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
     public boolean verboseCompilePolicy;
 
     /**
-     * Policy of how far to continue processing. null means until first
-     * error.
+     * Policy of how far to continue compilation after errors have occurred.
+     * Set this to minimum CompileState (INIT) to stop as soon as possible
+     * after errors.
      */
-    public CompileState shouldStopPolicy;
+    public CompileState shouldStopPolicyIfError;
 
-    /** A queue of all as yet unattributed classes.
+    /**
+     * Policy of how far to continue compilation when no errors have occurred.
+     * Set this to maximum CompileState (GENERATE) to perform full compilation.
+     * Set this lower to perform partial compilation, such as -proc:only.
+     */
+    public CompileState shouldStopPolicyIfNoError;
+
+    /** A queue of all as yet unattributed classes.oLo
      */
     public Todo todo;
 
@@ -501,6 +516,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
 
     /** Ordered list of compiler phases for each compilation unit. */
     public enum CompileState {
+        INIT(0),
         PARSE(1),
         ENTER(2),
         PROCESS(3),
@@ -512,8 +528,11 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
         CompileState(int value) {
             this.value = value;
         }
-        boolean isDone(CompileState other) {
-            return value >= other.value;
+        boolean isAfter(CompileState other) {
+            return value > other.value;
+        }
+        public static CompileState max(CompileState a, CompileState b) {
+            return a.value > b.value ? a : b;
         }
         private int value;
     };
@@ -524,7 +543,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
         private static final long serialVersionUID = 1812267524140424433L;
         boolean isDone(Env<AttrContext> env, CompileState cs) {
             CompileState ecs = get(env);
-            return ecs != null && ecs.isDone(cs);
+            return (ecs != null) && !cs.isAfter(ecs);
         }
     }
     private CompileStates compileStates = new CompileStates();
@@ -536,10 +555,10 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
     protected Set<JavaFileObject> inputFiles = new HashSet<JavaFileObject>();
 
     protected boolean shouldStop(CompileState cs) {
-        if (shouldStopPolicy == null)
-            return (errorCount() > 0 || unrecoverableError());
-        else
-            return cs.ordinal() > shouldStopPolicy.ordinal();
+        CompileState shouldStopPolicy = (errorCount() > 0 || unrecoverableError())
+            ? shouldStopPolicyIfError
+            : shouldStopPolicyIfNoError;
+        return cs.isAfter(shouldStopPolicy);
     }
 
     /** The number of errors reported so far.
@@ -923,6 +942,18 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
         return trees.toList();
     }
 
+    /**
+     * Enter the symbols found in a list of parse trees if the compilation
+     * is expected to proceed beyond anno processing into attr.
+     * As a side-effect, this puts elements on the "todo" list.
+     * Also stores a list of all top level classes in rootClasses.
+     */
+    public List<JCCompilationUnit> enterTreesIfNeeded(List<JCCompilationUnit> roots) {
+       if (shouldStop(CompileState.ATTR))
+           return List.nil();
+        return enterTrees(roots);
+    }
+
     /**
      * Enter the symbols found in a list of parse trees.
      * As a side-effect, this puts elements on the "todo" list.
@@ -1010,7 +1041,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
                 genEndPos = true;
                 if (!taskListener.isEmpty())
                     taskListener.started(new TaskEvent(TaskEvent.Kind.ANNOTATION_PROCESSING));
-                log.deferDiagnostics = true;
+                log.deferAll();
             } else { // free resources
                 procEnvImpl.close();
             }
@@ -1120,7 +1151,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
                 if (c != this)
                     annotationProcessingOccurred = c.annotationProcessingOccurred = true;
                 // doProcessing will have handled deferred diagnostics
-                Assert.check(c.log.deferDiagnostics == false
+                Assert.check(c.log.deferredDiagFilter == null
                         && c.log.deferredDiagnostics.size() == 0);
                 return c;
             } finally {
@@ -1196,7 +1227,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
             if (errorCount() > 0 && !shouldStop(CompileState.ATTR)) {
                 //if in fail-over mode, ensure that AST expression nodes
                 //are correctly initialized (e.g. they have a type/symbol)
-                attr.postAttr(env);
+                attr.postAttr(env.tree);
             }
             compileStates.put(env, CompileState.ATTR);
         }
@@ -1648,6 +1679,8 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
         hasBeenUsed = true;
         closeables = prev.closeables;
         prev.closeables = List.nil();
+        shouldStopPolicyIfError = prev.shouldStopPolicyIfError;
+        shouldStopPolicyIfNoError = prev.shouldStopPolicyIfNoError;
     }
 
     public static void enableLogging() {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java b/langtools/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java
index 67fc0b72c4c..7b6ca57cc34 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java
@@ -638,10 +638,6 @@ public class JavaTokenizer {
                         lexError(pos, "unclosed.str.lit");
                     }
                     break loop;
-                case '#':
-                    reader.scanChar();
-                    tk = TokenKind.HASH;
-                    break loop;
                 default:
                     if (isSpecial(reader.ch)) {
                         scanOperator();
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
index ec9eecceb2e..aac80c53fe2 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
@@ -950,12 +950,13 @@ public class JavacParser implements Parser {
             break;
         case LPAREN:
             if (typeArgs == null && (mode & EXPR) != 0) {
-                if (peekToken(FINAL) ||
+                if (peekToken(MONKEYS_AT) ||
+                        peekToken(FINAL) ||
                         peekToken(RPAREN) ||
                         peekToken(IDENTIFIER, COMMA) ||
                         peekToken(IDENTIFIER, RPAREN, ARROW)) {
                     //implicit n-ary lambda
-                    t = lambdaExpressionOrStatement(true, peekToken(FINAL), pos);
+                    t = lambdaExpressionOrStatement(true, peekToken(MONKEYS_AT) || peekToken(FINAL), pos);
                     break;
                 } else {
                     nextToken();
@@ -1159,7 +1160,7 @@ public class JavacParser implements Parser {
                     case LT:
                         if ((mode & TYPE) == 0 && isUnboundMemberRef()) {
                             //this is an unbound method reference whose qualifier
-                            //is a generic type i.e. A<S>#m
+                            //is a generic type i.e. A<S>::m
                             int pos1 = token.pos;
                             accept(LT);
                             ListBuffer<JCExpression> args = new ListBuffer<JCExpression>();
@@ -1177,7 +1178,8 @@ public class JavacParser implements Parser {
                                 t = toP(F.at(token.pos).Select(t, ident()));
                                 t = typeArgumentsOpt(t);
                             }
-                            if (token.kind != HASH) {
+                            t = bracketsOpt(t);
+                            if (token.kind != COLCOL) {
                                 //method reference expected here
                                 t = illegal();
                             }
@@ -1237,6 +1239,10 @@ public class JavacParser implements Parser {
                         nextToken();
                         t = bracketsOpt(t);
                         t = toP(F.at(pos1).TypeArray(t));
+                        if (token.kind == COLCOL) {
+                            mode = EXPR;
+                            continue;
+                        }
                         return t;
                     }
                     mode = oldmode;
@@ -1269,10 +1275,10 @@ public class JavacParser implements Parser {
                     t = argumentsOpt(typeArgs, typeArgumentsOpt(t));
                     typeArgs = null;
                 }
-            } else if ((mode & EXPR) != 0 && token.kind == HASH) {
+            } else if ((mode & EXPR) != 0 && token.kind == COLCOL) {
                 mode = EXPR;
                 if (typeArgs != null) return illegal();
-                accept(HASH);
+                accept(COLCOL);
                 t = memberReferenceSuffix(pos1, t);
             } else {
                 break;
@@ -1311,9 +1317,11 @@ public class JavacParser implements Parser {
                 case GT:
                     depth--;
                     if (depth == 0) {
+                        TokenKind nextKind = S.token(pos + 1).kind;
                         return
-                            S.token(pos + 1).kind == TokenKind.DOT ||
-                            S.token(pos + 1).kind == TokenKind.HASH;
+                            nextKind == TokenKind.DOT ||
+                            nextKind == TokenKind.LBRACKET ||
+                            nextKind == TokenKind.COLCOL;
                     }
                     break;
                 default:
@@ -1343,11 +1351,6 @@ public class JavacParser implements Parser {
     }
 
     JCExpression lambdaExpressionOrStatementRest(List<JCVariableDecl> args, int pos) {
-        if (token.kind != ARROW) {
-            //better error recovery
-            return F.at(pos).Erroneous(args);
-        }
-
         checkLambda();
         accept(ARROW);
 
@@ -1372,7 +1375,7 @@ public class JavacParser implements Parser {
         nextToken();
         if (token.kind == LPAREN || typeArgs != null) {
             t = arguments(typeArgs, t);
-        } else if (token.kind == HASH) {
+        } else if (token.kind == COLCOL) {
             if (typeArgs != null) return illegal();
             t = memberReferenceSuffix(t);
         } else {
@@ -1583,20 +1586,22 @@ public class JavacParser implements Parser {
                 t = toP(F.at(pos).Select(t, names._class));
             }
         } else if ((mode & TYPE) != 0) {
-            mode = TYPE;
-        } else {
+            if (token.kind != COLCOL) {
+                mode = TYPE;
+            }
+        } else if (token.kind != COLCOL) {
             syntaxError(token.pos, "dot.class.expected");
         }
         return t;
     }
 
     /**
-     * MemberReferenceSuffix = "#" [TypeArguments] Ident
-     *                       | "#" [TypeArguments] "new"
+     * MemberReferenceSuffix = "::" [TypeArguments] Ident
+     *                       | "::" [TypeArguments] "new"
      */
     JCExpression memberReferenceSuffix(JCExpression t) {
         int pos1 = token.pos;
-        accept(HASH);
+        accept(COLCOL);
         return memberReferenceSuffix(pos1, t);
     }
 
@@ -2165,27 +2170,10 @@ public class JavacParser implements Parser {
         while (true) {
             int pos = token.pos;
             switch (token.kind) {
-            case CASE: {
-                nextToken();
-                JCExpression pat = parseExpression();
-                accept(COLON);
-                List<JCStatement> stats = blockStatements();
-                JCCase c = F.at(pos).Case(pat, stats);
-                if (stats.isEmpty())
-                    storeEnd(c, S.prevToken().endPos);
-                cases.append(c);
+            case CASE:
+            case DEFAULT:
+                cases.append(switchBlockStatementGroup());
                 break;
-            }
-            case DEFAULT: {
-                nextToken();
-                accept(COLON);
-                List<JCStatement> stats = blockStatements();
-                JCCase c = F.at(pos).Case(null, stats);
-                if (stats.isEmpty())
-                    storeEnd(c, S.prevToken().endPos);
-                cases.append(c);
-                break;
-            }
             case RBRACE: case EOF:
                 return cases.toList();
             default:
@@ -2196,6 +2184,32 @@ public class JavacParser implements Parser {
         }
     }
 
+    protected JCCase switchBlockStatementGroup() {
+        int pos = token.pos;
+        List<JCStatement> stats;
+        JCCase c;
+        switch (token.kind) {
+        case CASE:
+            nextToken();
+            JCExpression pat = parseExpression();
+            accept(COLON);
+            stats = blockStatements();
+            c = F.at(pos).Case(pat, stats);
+            if (stats.isEmpty())
+                storeEnd(c, S.prevToken().endPos);
+            return c;
+        case DEFAULT:
+            nextToken();
+            accept(COLON);
+            stats = blockStatements();
+            c = F.at(pos).Case(null, stats);
+            if (stats.isEmpty())
+                storeEnd(c, S.prevToken().endPos);
+            return c;
+        }
+        throw new AssertionError("should not reach here");
+    }
+
     /** MoreStatementExpressions = { COMMA StatementExpression }
      */
     <T extends ListBuffer<? super JCExpressionStatement>> T moreStatementExpressions(int pos,
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/Tokens.java b/langtools/src/share/classes/com/sun/tools/javac/parser/Tokens.java
index 8ae85740ae8..3e6362aa8e3 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/Tokens.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/Tokens.java
@@ -177,7 +177,7 @@ public class Tokens {
         FALSE("false", Tag.NAMED),
         NULL("null", Tag.NAMED),
         ARROW("->"),
-        HASH("#"),
+        COLCOL("::"),
         LPAREN("("),
         RPAREN(")"),
         LBRACE("{"),
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/UnicodeReader.java b/langtools/src/share/classes/com/sun/tools/javac/parser/UnicodeReader.java
index f1b6d8b12d6..07b8c5cda8b 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/UnicodeReader.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/UnicodeReader.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,15 @@
 
 package com.sun.tools.javac.parser;
 
+import java.nio.CharBuffer;
+import java.util.Arrays;
+
 import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.util.ArrayUtils;
 import com.sun.tools.javac.util.Log;
 import com.sun.tools.javac.util.Name;
 import com.sun.tools.javac.util.Names;
 
-import java.nio.CharBuffer;
-
 import static com.sun.tools.javac.util.LayoutCharacters.*;
 
 /** The char reader used by the javac lexer/tokenizer. Returns the sequence of
@@ -91,9 +93,7 @@ public class UnicodeReader {
             if (input.length > 0 && Character.isWhitespace(input[input.length - 1])) {
                 inputLength--;
             } else {
-                char[] newInput = new char[inputLength + 1];
-                System.arraycopy(input, 0, newInput, 0, input.length);
-                input = newInput;
+                input = Arrays.copyOf(input, inputLength + 1);
             }
         }
         buf = input;
@@ -130,11 +130,7 @@ public class UnicodeReader {
     /** Append a character to sbuf.
      */
     protected void putChar(char ch, boolean scan) {
-        if (sp == sbuf.length) {
-            char[] newsbuf = new char[sbuf.length * 2];
-            System.arraycopy(sbuf, 0, newsbuf, 0, sbuf.length);
-            sbuf = newsbuf;
-        }
+        sbuf = ArrayUtils.ensureCapacity(sbuf, sp);
         sbuf[sp++] = ch;
         if (scan)
             scanChar();
diff --git a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
index 2e40563f4a9..4a31cfea401 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
@@ -49,7 +49,7 @@ import static javax.tools.StandardLocation.*;
 
 import com.sun.source.util.JavacTask;
 import com.sun.source.util.TaskEvent;
-import com.sun.tools.javac.api.JavacTaskImpl;
+import com.sun.tools.javac.api.BasicJavacTask;
 import com.sun.tools.javac.api.JavacTrees;
 import com.sun.tools.javac.api.MultiTaskListener;
 import com.sun.tools.javac.code.*;
@@ -97,11 +97,9 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
     private final boolean printRounds;
     private final boolean verbose;
     private final boolean lint;
-    private final boolean procOnly;
     private final boolean fatalErrors;
     private final boolean werror;
     private final boolean showResolveErrors;
-    private boolean foundTypeProcessors;
 
     private final JavacFiler filer;
     private final JavacMessager messager;
@@ -167,12 +165,14 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
         printRounds = options.isSet(XPRINTROUNDS);
         verbose = options.isSet(VERBOSE);
         lint = Lint.instance(context).isEnabled(PROCESSING);
-        procOnly = options.isSet(PROC, "only") || options.isSet(XPRINT);
+        if (options.isSet(PROC, "only") || options.isSet(XPRINT)) {
+            JavaCompiler compiler = JavaCompiler.instance(context);
+            compiler.shouldStopPolicyIfNoError = CompileState.PROCESS;
+        }
         fatalErrors = options.isSet("fatalEnterError");
         showResolveErrors = options.isSet("showResolveErrors");
         werror = options.isSet(WERROR);
         platformAnnotations = initPlatformAnnotations();
-        foundTypeProcessors = false;
 
         // Initialize services before any processors are initialized
         // in case processors use them.
@@ -462,7 +462,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
      * State about how a processor has been used by the tool.  If a
      * processor has been used on a prior round, its process method is
      * called on all subsequent rounds, perhaps with an empty set of
-     * annotations to process.  The {@code annotatedSupported} method
+     * annotations to process.  The {@code annotationSupported} method
      * caches the supported annotation information from the first (and
      * only) getSupportedAnnotationTypes call to the processor.
      */
@@ -806,7 +806,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
             log = Log.instance(context);
             log.nerrors = priorErrors;
             log.nwarnings += priorWarnings;
-            log.deferDiagnostics = true;
+            log.deferAll();
 
             // the following is for the benefit of JavacProcessingEnvironment.getContext()
             JavacProcessingEnvironment.this.context = context;
@@ -882,7 +882,9 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
         /** Create the compiler to be used for the final compilation. */
         JavaCompiler finalCompiler(boolean errorStatus) {
             try {
-                JavaCompiler c = JavaCompiler.instance(nextContext());
+                Context nextCtx = nextContext();
+                JavacProcessingEnvironment.this.context = nextCtx;
+                JavaCompiler c = JavaCompiler.instance(nextCtx);
                 c.log.nwarnings += compiler.log.nwarnings;
                 if (errorStatus) {
                     c.log.nerrors += compiler.log.nerrors;
@@ -1021,7 +1023,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
         }
 
         /** Get the context for the next round of processing.
-         * Important values are propogated from round to round;
+         * Important values are propagated from round to round;
          * other values are implicitly reset.
          */
         private Context nextContext() {
@@ -1086,10 +1088,11 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
             elementUtils.setContext(next);
             typeUtils.setContext(next);
 
-            JavacTaskImpl task = (JavacTaskImpl) context.get(JavacTask.class);
+            JavacTask task = context.get(JavacTask.class);
             if (task != null) {
                 next.put(JavacTask.class, task);
-                task.updateContext(next);
+                if (task instanceof BasicJavacTask)
+                    ((BasicJavacTask) task).updateContext(next);
             }
 
             JavacTrees trees = context.get(JavacTrees.class);
@@ -1189,14 +1192,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
             return compiler;
         }
 
-        if (procOnly && !foundTypeProcessors) {
-            compiler.todo.clear();
-        } else {
-            if (procOnly && foundTypeProcessors)
-                compiler.shouldStopPolicy = CompileState.FLOW;
-
-            compiler.enterTrees(roots);
-        }
+        compiler.enterTreesIfNeeded(roots);
 
         return compiler;
     }
diff --git a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties
index b931053a671..5140de268de 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties
@@ -148,13 +148,8 @@ compiler.err.break.outside.switch.loop=\
 compiler.err.call.must.be.first.stmt.in.ctor=\
     call to {0} must be first statement in constructor
 
-compiler.err.cant.apply.symbol=\
-    {0} {1} in {4} {5} cannot be applied to given types\n\
-    required: {2}\n\
-    found: {3}
-
 # 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment
-compiler.err.cant.apply.symbol.1=\
+compiler.err.cant.apply.symbol=\
     {0} {1} in {4} {5} cannot be applied to given types;\n\
     required: {2}\n\
     found: {3}\n\
@@ -164,6 +159,74 @@ compiler.err.cant.apply.symbol.1=\
 compiler.err.cant.apply.symbols=\
     no suitable {0} found for {1}({2})
 
+# 0: symbol kind, 1: name, 2: list of type or message segment, 3: list of type or message segment, 4: symbol kind, 5: type, 6: message segment
+compiler.misc.cant.apply.symbol=\
+    {0} {1} in {4} {5} cannot be applied to given types\n\
+    required: {2}\n\
+    found: {3}\n\
+    reason: {6}
+
+# 0: symbol kind, 1: name, 2: list of type
+compiler.misc.cant.apply.symbols=\
+    no suitable {0} found for {1}({2})
+
+
+# 0: type
+compiler.err.cant.access.arg.type.in.functional.desc=\
+    cannot access parameter type {0} in target functional descriptor
+
+# 0: type
+compiler.err.cant.access.return.in.functional.desc=\
+    cannot access return type {0} in target functional descriptor
+
+# 0: type
+compiler.err.cant.access.thrown.in.functional.desc=\
+    cannot access thrown type {0} in target functional descriptor
+
+# 0: symbol kind, 1: symbol
+compiler.misc.no.abstracts=\
+    no abstract method found in {0} {1}
+
+# 0: symbol kind, 1: symbol
+compiler.misc.incompatible.abstracts=\
+    multiple non-overriding abstract methods found in {0} {1}
+
+compiler.misc.not.a.functional.intf=\
+    the target type must be a functional interface
+
+# 0: message segment
+compiler.misc.not.a.functional.intf.1=\
+    the target type must be a functional interface\n\
+    {0}
+
+# 0: symbol, 1: symbol kind, 2: symbol
+compiler.misc.invalid.generic.desc.in.functional.intf=\
+    invalid functional descriptor: method {0} in {1} {2} is generic
+
+# 0: symbol kind, 1: symbol
+compiler.misc.incompatible.descs.in.functional.intf=\
+    incompatible function descriptors found in {0} {1}
+
+# 0: name, 1: list of type, 2: type, 3: list of type
+compiler.misc.descriptor=\
+    descriptor: {2} {0}({1})
+
+# 0: name, 1: list of type, 2: type, 3: list of type
+compiler.misc.descriptor.throws=\
+    descriptor: {2} {0}({1}) throws {3}
+
+# 0: type
+compiler.misc.no.suitable.functional.intf.inst=\
+    cannot infer functional interface descriptor for {0}
+
+# 0: symbol kind, 1: message segment
+compiler.err.invalid.mref=\
+    invalid {0} reference; {1}
+
+# 0: symbol kind, 1: message segment
+compiler.misc.invalid.mref=\
+    invalid {0} reference; {1}
+
 # 0: symbol
 compiler.err.cant.assign.val.to.final.var=\
     cannot assign a value to final variable {0}
@@ -173,6 +236,9 @@ compiler.err.cant.ref.non.effectively.final.var=\
     local variables referenced from {1} must be final or effectively final
 
 
+compiler.misc.lambda=\
+    a lambda expression
+
 compiler.misc.inner.cls=\
     an inner class
 
@@ -292,7 +358,7 @@ compiler.err.invalid.containedby.annotation.value.return=\
 
 # 0: type, 1: symbol
 compiler.err.invalid.containedby.annotation.elem.nondefault=\
-    duplicate annotation, element {1} in containing annotation {0} does not have a default value
+    containing annotation {0} does not have a default value for element {1}
 
 # 0: symbol, 1: type, 2: symbol, 3: type
 compiler.err.invalid.containedby.annotation.retention=\
@@ -592,6 +658,9 @@ compiler.err.missing.meth.body.or.decl.abstract=\
 compiler.err.missing.ret.stmt=\
     missing return statement
 
+compiler.misc.missing.ret.val=\
+    missing return value
+
 compiler.err.missing.ret.val=\
     missing return value
 
@@ -635,6 +704,31 @@ compiler.err.neither.conditional.subtype=\
     second operand: {0}\n\
     third operand : {1}
 
+# 0: message segment
+compiler.misc.incompatible.type.in.conditional=\
+    bad type in conditional expression; {0}
+
+# 0: type
+compiler.misc.incompatible.ret.type.in.lambda=\
+    bad return type in lambda expression\n\
+    {0}
+
+# 0: type
+compiler.misc.incompatible.ret.type.in.mref=\
+    bad return type in method reference\n\
+    {0}
+
+# 0: list of type
+compiler.err.incompatible.thrown.types.in.lambda=\
+    incompatible thrown types {0} in lambda expression
+
+# 0: list of type
+compiler.err.incompatible.thrown.types.in.mref=\
+    incompatible thrown types {0} in method reference
+
+compiler.misc.incompatible.arg.types.in.lambda=\
+    incompatible parameter types in lambda expression
+
 compiler.err.new.not.allowed.in.annotation=\
     ''new'' not allowed in an annotation
 
@@ -657,6 +751,15 @@ compiler.err.not.annotation.type=\
 compiler.err.not.def.access.class.intf.cant.access=\
     {0} in {1} is defined in an inaccessible class or interface
 
+# 0: symbol, 1: symbol
+compiler.misc.not.def.access.class.intf.cant.access=\
+    {0} in {1} is defined in an inaccessible class or interface
+
+# 0: symbol, 1: list of type, 2: type
+compiler.misc.cant.access.inner.cls.constr=\
+    cannot access constructor {0}({1})\n\
+    an enclosing instance of type {2} is not in scope
+
 # 0: symbol, 1: symbol
 compiler.err.not.def.public.cant.access=\
     {0} is not public in {1}; cannot be accessed from outside package
@@ -755,7 +858,13 @@ compiler.err.recursive.ctor.invocation=\
 
 # 0: name, 1: symbol kind, 2: symbol, 3: symbol, 4: symbol kind, 5: symbol, 6: symbol
 compiler.err.ref.ambiguous=\
-    reference to {0} is ambiguous, both {1} {2} in {3} and {4} {5} in {6} match
+    reference to {0} is ambiguous\n\
+    both {1} {2} in {3} and {4} {5} in {6} match
+
+# 0: name, 1: symbol kind, 2: symbol, 3: symbol, 4: symbol kind, 5: symbol, 6: symbol
+compiler.misc.ref.ambiguous=\
+    reference to {0} is ambiguous\n\
+    both {1} {2} in {3} and {4} {5} in {6} match
 
 compiler.err.repeated.annotation.target=\
     repeated annotation target
@@ -991,6 +1100,10 @@ compiler.misc.x.print.rounds=\
 
 ## The following string will appear before all messages keyed as:
 ## "compiler.note".
+
+compiler.note.potential.lambda.found=\
+    This anonymous inner class creation can be turned into a lambda expression.
+
 compiler.note.note=\
     Note:\u0020
 
@@ -1652,6 +1765,18 @@ compiler.misc.no.unique.minimal.instance.exists=\
 compiler.misc.incompatible.upper.bounds=\
     inference variable {0} has incompatible upper bounds {1}
 
+# 0: type, 1: list of type, 2: list of type
+compiler.misc.incompatible.eq.upper.bounds=\
+    inference variable {0} has incompatible bounds\n\
+    equality constraints: {1}\n\
+    upper bounds: {2}
+
+# 0: type, 1: list of type, 2: list of type
+compiler.misc.incompatible.eq.lower.bounds=\
+    inference variable {0} has incompatible bounds\n\
+    equality constraints: {1}\n\
+    lower bounds: {2}
+
 # 0: list of type, 1: type, 2: type
 compiler.misc.infer.no.conforming.instance.exists=\
     no instance(s) of type variable(s) {0} exist so that {1} conforms to {2}
@@ -1689,6 +1814,10 @@ compiler.misc.inferred.do.not.conform.to.eq.bounds=\
     inferred: {0}\n\
     equality constraints(s): {1}
 
+# 0: list of type
+compiler.misc.cyclic.inference=\
+    Cannot instantiate inference variables {0} because of an inference loop
+
 # 0: symbol
 compiler.misc.diamond=\
     {0}<>
@@ -1728,6 +1857,10 @@ compiler.err.abstract.cant.be.accessed.directly=\
 compiler.err.non-static.cant.be.ref=\
     non-static {0} {1} cannot be referenced from a static context
 
+# 0: symbol kind, 1: symbol
+compiler.misc.non-static.cant.be.ref=\
+    non-static {0} {1} cannot be referenced from a static context
+
 ## Both arguments ({0}, {1}) are "kindname"s.  {0} is a comma-separated list
 ## of kindnames (the list should be identical to that provided in source.
 compiler.err.unexpected.type=\
@@ -1735,6 +1868,12 @@ compiler.err.unexpected.type=\
     required: {0}\n\
     found:    {1}
 
+compiler.err.unexpected.lambda=\
+   lambda expression not expected here
+
+compiler.err.unexpected.mref=\
+   method reference not expected here
+
 ## The first argument {0} is a "kindname" (e.g. 'constructor', 'field', etc.)
 ## The second argument {1} is the non-resolved symbol
 ## The third argument {2} is a list of type parameters (non-empty if {1} is a method)
@@ -1774,6 +1913,20 @@ compiler.err.cant.resolve.location.args.params=\
     symbol:   {0} <{2}>{1}({3})\n\
     location: {4}
 
+### Following are replicated/used for method reference diagnostics
+
+# 0: symbol kind, 1: name, 2: unused, 3: list of type, 4: message segment
+compiler.misc.cant.resolve.location.args=\
+    cannot find symbol\n\
+    symbol:   {0} {1}({3})\n\
+    location: {4}
+
+# 0: symbol kind, 1: name, 2: list of type, 3: list, 4: message segment
+compiler.misc.cant.resolve.location.args.params=\
+    cannot find symbol\n\
+    symbol:   {0} <{2}>{1}({3})\n\
+    location: {4}
+
 ##a location subdiagnostic is composed as follows:
 ## The first argument {0} is the location "kindname" (e.g. 'constructor', 'field', etc.)
 ## The second argument {1} is the location name
diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java b/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java
index fe6c8100ae1..3494f3b52cf 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java
@@ -1810,11 +1810,46 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
      */
     public static class JCMemberReference extends JCExpression implements MemberReferenceTree {
         public ReferenceMode mode;
+        public ReferenceKind kind;
         public Name name;
         public JCExpression expr;
         public List<JCExpression> typeargs;
         public Type targetType;
         public Symbol sym;
+        public Type varargsElement;
+
+        /**
+         * Javac-dependent classification for member references, based
+         * on relevant properties w.r.t. code-generation
+         */
+        public enum ReferenceKind {
+            /** super # instMethod */
+            SUPER(ReferenceMode.INVOKE, false),
+            /** Type # instMethod */
+            UNBOUND(ReferenceMode.INVOKE, true),
+            /** Type # staticMethod */
+            STATIC(ReferenceMode.INVOKE, false),
+            /** Expr # instMethod */
+            BOUND(ReferenceMode.INVOKE, false),
+            /** Expr # staticMethod */
+            STATIC_EVAL(ReferenceMode.INVOKE, false),
+            /** Inner # new */
+            IMPLICIT_INNER(ReferenceMode.NEW, false),
+            /** Toplevel # new */
+            TOPLEVEL(ReferenceMode.NEW, false);
+
+            ReferenceMode mode;
+            boolean unbound;
+
+            private ReferenceKind(ReferenceMode mode, boolean unbound) {
+                this.mode = mode;
+                this.unbound = unbound;
+            }
+
+            public boolean isUnbound() {
+                return unbound;
+            }
+        }
 
         protected JCMemberReference(ReferenceMode mode, Name name, JCExpression expr, List<JCExpression> typeargs) {
             this.mode = mode;
@@ -1843,6 +1878,9 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
         public Tag getTag() {
             return REFERENCE;
         }
+        public boolean hasKind(ReferenceKind kind) {
+            return this.kind == kind;
+        }
     }
 
     /**
diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java b/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java
index 7859215676c..04f4d47c3a9 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java
@@ -81,6 +81,17 @@ public class Pretty extends JCTree.Visitor {
      */
     DocCommentTable docComments = null;
 
+    /**
+     * A string sequence to be used when Pretty output should be constrained
+     * to fit into a given size
+     */
+    private final static String trimSequence = "[...]";
+
+    /**
+     * Max number of chars to be generated when output should fit into a single line
+     */
+    private final static int PREFERRED_LENGTH = 20;
+
     /** Align code to be indented to left margin.
      */
     void align() throws IOException {
@@ -129,6 +140,31 @@ public class Pretty extends JCTree.Visitor {
         out.write(lineSep);
     }
 
+    public static String toSimpleString(JCTree tree) {
+        return toSimpleString(tree, PREFERRED_LENGTH);
+    }
+
+    public static String toSimpleString(JCTree tree, int maxLength) {
+        StringWriter s = new StringWriter();
+        try {
+            new Pretty(s, false).printExpr(tree);
+        }
+        catch (IOException e) {
+            // should never happen, because StringWriter is defined
+            // never to throw any IOExceptions
+            throw new AssertionError(e);
+        }
+        //we need to (i) replace all line terminators with a space and (ii) remove
+        //occurrences of 'missing' in the Pretty output (generated when types are missing)
+        String res = s.toString().replaceAll("\\s+", " ").replaceAll("/\\*missing\\*/", "");
+        if (res.length() < maxLength) {
+            return res;
+        } else {
+            int split = (maxLength - trimSequence.length()) * 2 / 3;
+            return res.substring(0, split) + trimSequence + res.substring(split);
+        }
+    }
+
     String lineSep = System.getProperty("line.separator");
 
     /**************************************************************************
@@ -911,7 +947,16 @@ public class Pretty extends JCTree.Visitor {
     public void visitLambda(JCLambda tree) {
         try {
             print("(");
-            printExprs(tree.params);
+            if (TreeInfo.isExplicitLambda(tree)) {
+                printExprs(tree.params);
+            } else {
+                String sep = "";
+                for (JCVariableDecl param : tree.params) {
+                    print(sep);
+                    print(param.name);
+                    sep = ",";
+                }
+            }
             print(")->");
             printExpr(tree.body);
         } catch (IOException e) {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java
index a2dbfad3541..120bf2ae434 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java
@@ -245,6 +245,27 @@ public class TreeInfo {
         }
     }
 
+    /** Return true if a a tree corresponds to a poly expression. */
+    public static boolean isPoly(JCTree tree, JCTree origin) {
+        switch (tree.getTag()) {
+            case APPLY:
+            case NEWCLASS:
+            case CONDEXPR:
+                return !origin.hasTag(TYPECAST);
+            case LAMBDA:
+            case REFERENCE:
+                return true;
+            case PARENS:
+                return isPoly(((JCParens)tree).expr, origin);
+            default:
+                return false;
+        }
+    }
+
+    public static boolean isExplicitLambda(JCLambda lambda) {
+        return lambda.params.isEmpty() ||
+                lambda.params.head.vartype != null;
+    }
     /**
      * Return true if the AST corresponds to a static select of the kind A.B
      */
@@ -261,6 +282,7 @@ public class TreeInfo {
                 return isStaticSym(base) &&
                     isStaticSelector(((JCFieldAccess)base).selected, names);
             case TYPEAPPLY:
+            case TYPEARRAY:
                 return true;
             default:
                 return false;
@@ -383,6 +405,10 @@ public class TreeInfo {
                 JCVariableDecl node = (JCVariableDecl)tree;
                 if (node.mods.pos != Position.NOPOS) {
                     return node.mods.pos;
+                } else if (node.vartype == null) {
+                    //if there's no type (partially typed lambda parameter)
+                    //simply return node position
+                    return node.pos;
                 } else {
                     return getStartPos(node.vartype);
                 }
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java
index 4ff2376a747..cec43bdd412 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java
@@ -43,8 +43,10 @@ import com.sun.tools.javac.code.Printer;
 import com.sun.tools.javac.code.Symbol;
 import com.sun.tools.javac.code.Type;
 import com.sun.tools.javac.code.Type.CapturedType;
+import com.sun.tools.javac.tree.JCTree.*;
 
 import com.sun.tools.javac.file.BaseFileObject;
+import com.sun.tools.javac.tree.Pretty;
 import static com.sun.tools.javac.util.JCDiagnostic.DiagnosticType.*;
 
 /**
@@ -180,6 +182,9 @@ public abstract class AbstractDiagnosticFormatter implements DiagnosticFormatter
             }
             return s;
         }
+        else if (arg instanceof JCExpression) {
+            return expr2String((JCExpression)arg);
+        }
         else if (arg instanceof Iterable<?>) {
             return formatIterable(d, (Iterable<?>)arg, l);
         }
@@ -199,6 +204,20 @@ public abstract class AbstractDiagnosticFormatter implements DiagnosticFormatter
             return String.valueOf(arg);
         }
     }
+    //where
+            private String expr2String(JCExpression tree) {
+                switch(tree.getTag()) {
+                    case PARENS:
+                        return expr2String(((JCParens)tree).expr);
+                    case LAMBDA:
+                    case REFERENCE:
+                    case CONDEXPR:
+                        return Pretty.toSimpleString(tree);
+                    default:
+                        Assert.error("unexpected tree kind " + tree.getKind());
+                        return null;
+                }
+            }
 
     /**
      * Format an iterable argument of a given diagnostic.
@@ -490,6 +509,7 @@ public abstract class AbstractDiagnosticFormatter implements DiagnosticFormatter
      * lead to infinite loops.
      */
     protected Printer printer = new Printer() {
+
         @Override
         protected String localize(Locale locale, String key, Object... args) {
             return AbstractDiagnosticFormatter.this.localize(locale, key, args);
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/ArrayUtils.java b/langtools/src/share/classes/com/sun/tools/javac/util/ArrayUtils.java
new file mode 100644
index 00000000000..2721fa95c34
--- /dev/null
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/ArrayUtils.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.tools.javac.util;
+
+import java.lang.reflect.Array;
+
+/** <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ */
+public class ArrayUtils {
+
+    private static int calculateNewLength(int currentLength, int maxIndex) {
+        while (currentLength < maxIndex + 1)
+            currentLength = currentLength * 2;
+        return currentLength;
+    }
+
+    public static <T> T[] ensureCapacity(T[] array, int maxIndex) {
+        if (maxIndex < array.length) {
+            return array;
+        } else {
+            int newLength = calculateNewLength(array.length, maxIndex);
+            @SuppressWarnings("unchecked")
+            T[] result = (T[]) Array.newInstance(array.getClass().getComponentType(), newLength);
+            System.arraycopy(array, 0, result, 0, array.length);
+            return result;
+        }
+    }
+
+    public static byte[] ensureCapacity(byte[] array, int maxIndex) {
+        if (maxIndex < array.length) {
+            return array;
+        } else {
+            int newLength = calculateNewLength(array.length, maxIndex);
+            byte[] result = new byte[newLength];
+            System.arraycopy(array, 0, result, 0, array.length);
+            return result;
+        }
+    }
+
+    public static char[] ensureCapacity(char[] array, int maxIndex) {
+        if (maxIndex < array.length) {
+            return array;
+        } else {
+            int newLength = calculateNewLength(array.length, maxIndex);
+            char[] result = new char[newLength];
+            System.arraycopy(array, 0, result, 0, array.length);
+            return result;
+        }
+    }
+
+    public static int[] ensureCapacity(int[] array, int maxIndex) {
+        if (maxIndex < array.length) {
+            return array;
+        } else {
+            int newLength = calculateNewLength(array.length, maxIndex);
+            int[] result = new int[newLength];
+            System.arraycopy(array, 0, result, 0, array.length);
+            return result;
+        }
+    }
+}
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Bits.java b/langtools/src/share/classes/com/sun/tools/javac/util/Bits.java
index 0c7d2338995..4f4b75653fb 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Bits.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Bits.java
@@ -25,6 +25,8 @@
 
 package com.sun.tools.javac.util;
 
+import java.util.Arrays;
+
 /** A class for extensible, mutable bit sets.
  *
  *  <p><b>This is NOT part of any supported API.
@@ -62,9 +64,7 @@ public class Bits {
 
     private void sizeTo(int len) {
         if (bits.length < len) {
-            int[] newbits = new int[len];
-            System.arraycopy(bits, 0, newbits, 0, bits.length);
-            bits = newbits;
+            bits = Arrays.copyOf(bits, len);
         }
     }
 
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/ByteBuffer.java b/langtools/src/share/classes/com/sun/tools/javac/util/ByteBuffer.java
index 509abac37eb..65a8c369076 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/ByteBuffer.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/ByteBuffer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -60,16 +60,10 @@ public class ByteBuffer {
         length = 0;
     }
 
-    private void copy(int size) {
-        byte[] newelems = new byte[size];
-        System.arraycopy(elems, 0, newelems, 0, elems.length);
-        elems = newelems;
-    }
-
     /** Append byte to this buffer.
      */
     public void appendByte(int b) {
-        if (length >= elems.length) copy(elems.length * 2);
+        elems = ArrayUtils.ensureCapacity(elems, length);
         elems[length++] = (byte)b;
     }
 
@@ -77,7 +71,7 @@ public class ByteBuffer {
      *  starting at given `start' offset.
      */
     public void appendBytes(byte[] bs, int start, int len) {
-        while (length + len > elems.length) copy(elems.length * 2);
+        elems = ArrayUtils.ensureCapacity(elems, length + len);
         System.arraycopy(bs, start, elems, length, len);
         length += len;
     }
@@ -91,7 +85,7 @@ public class ByteBuffer {
     /** Append a character as a two byte number.
      */
     public void appendChar(int x) {
-        while (length + 1 >= elems.length) copy(elems.length * 2);
+        elems = ArrayUtils.ensureCapacity(elems, length + 1);
         elems[length  ] = (byte)((x >>  8) & 0xFF);
         elems[length+1] = (byte)((x      ) & 0xFF);
         length = length + 2;
@@ -100,7 +94,7 @@ public class ByteBuffer {
     /** Append an integer as a four byte number.
      */
     public void appendInt(int x) {
-        while (length + 3 >= elems.length) copy(elems.length * 2);
+        elems = ArrayUtils.ensureCapacity(elems, length + 3);
         elems[length  ] = (byte)((x >> 24) & 0xFF);
         elems[length+1] = (byte)((x >> 16) & 0xFF);
         elems[length+2] = (byte)((x >>  8) & 0xFF);
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/List.java b/langtools/src/share/classes/com/sun/tools/javac/util/List.java
index baad763816d..e256c3755af 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/List.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/List.java
@@ -83,6 +83,19 @@ public class List<A> extends AbstractCollection<A> implements java.util.List<A>
         }
     };
 
+    /** Returns the list obtained from 'l' after removing all elements 'elem'
+     */
+    public static <A> List<A> filter(List<A> l, A elem) {
+        Assert.checkNonNull(elem);
+        List<A> res = List.nil();
+        for (A a : l) {
+            if (a != null && !a.equals(elem)) {
+                res = res.prepend(a);
+            }
+        }
+        return res.reverse();
+    }
+
     /** Construct a list consisting of given element.
      */
     public static <A> List<A> of(A x1) {
@@ -120,6 +133,14 @@ public class List<A> extends AbstractCollection<A> implements java.util.List<A>
         return xs;
     }
 
+    public static <A> List<A> from(Iterable<? extends A> coll) {
+        List<A> xs = nil();
+        for (A a : coll) {
+            xs = new List<A>(a, xs);
+        }
+        return xs;
+    }
+
     /** Construct a list consisting of a given number of identical elements.
      *  @param len    The number of elements in the list.
      *  @param init   The value of each element.
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Log.java b/langtools/src/share/classes/com/sun/tools/javac/util/Log.java
index 17c0984beda..1591ff73e5c 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Log.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Log.java
@@ -130,7 +130,7 @@ public class Log extends AbstractLog {
     /**
      * Deferred diagnostics
      */
-    public boolean deferDiagnostics;
+    public Filter<JCDiagnostic> deferredDiagFilter;
     public Queue<JCDiagnostic> deferredDiagnostics = new ListBuffer<JCDiagnostic>();
 
     /** Construct a log with given I/O redirections.
@@ -450,7 +450,7 @@ public class Log extends AbstractLog {
 
     /** Report selected deferred diagnostics, and clear the deferDiagnostics flag. */
     public void reportDeferredDiagnostics(Set<JCDiagnostic.Kind> kinds) {
-        deferDiagnostics = false;
+        deferredDiagFilter = null;
         JCDiagnostic d;
         while ((d = deferredDiagnostics.poll()) != null) {
             if (kinds.contains(d.getKind()))
@@ -464,7 +464,7 @@ public class Log extends AbstractLog {
      * reported so far, the diagnostic may be handed off to writeDiagnostic.
      */
     public void report(JCDiagnostic diagnostic) {
-        if (deferDiagnostics) {
+        if (deferredDiagFilter != null && deferredDiagFilter.accepts(diagnostic)) {
             deferredDiagnostics.add(diagnostic);
             return;
         }
@@ -551,6 +551,18 @@ public class Log extends AbstractLog {
         }
     }
 
+    public void deferAll() {
+        deferredDiagFilter = new Filter<JCDiagnostic>() {
+            public boolean accepts(JCDiagnostic t) {
+                return true;
+            }
+        };
+    }
+
+    public void deferNone() {
+        deferredDiagFilter = null;
+    }
+
     /** Find a localized string in the resource bundle.
      *  Because this method is static, it ignores the locale.
      *  Use localize(key, args) when possible.
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Names.java b/langtools/src/share/classes/com/sun/tools/javac/util/Names.java
index 4e6f453225f..53827d2ce65 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Names.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Names.java
@@ -118,6 +118,7 @@ public class Names {
     // attribute names
     public final Name Annotation;
     public final Name AnnotationDefault;
+    public final Name BootstrapMethods;
     public final Name Bridge;
     public final Name CharacterRangeTable;
     public final Name Code;
@@ -246,6 +247,7 @@ public class Names {
         // attribute names
         Annotation = fromString("Annotation");
         AnnotationDefault = fromString("AnnotationDefault");
+        BootstrapMethods = fromString("BootstrapMethods");
         Bridge = fromString("Bridge");
         CharacterRangeTable = fromString("CharacterRangeTable");
         Code = fromString("Code");
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java
index 1e915c74daf..b4f373de1f0 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java
@@ -32,6 +32,7 @@ import javax.tools.JavaFileObject;
 import com.sun.tools.javac.api.DiagnosticFormatter.Configuration.*;
 import com.sun.tools.javac.api.Formattable;
 import com.sun.tools.javac.file.BaseFileObject;
+import com.sun.tools.javac.tree.JCTree.*;
 import com.sun.tools.javac.util.AbstractDiagnosticFormatter.SimpleConfiguration;
 
 import static com.sun.tools.javac.api.DiagnosticFormatter.PositionKind.*;
@@ -117,16 +118,17 @@ public final class RawDiagnosticFormatter extends AbstractDiagnosticFormatter {
     @Override
     protected String formatArgument(JCDiagnostic diag, Object arg, Locale l) {
         String s;
-        if (arg instanceof Formattable)
+        if (arg instanceof Formattable) {
             s = arg.toString();
-        else if (arg instanceof BaseFileObject)
+        } else if (arg instanceof JCExpression) {
+            JCExpression tree = (JCExpression)arg;
+            s = "@" + tree.getStartPosition();
+        } else if (arg instanceof BaseFileObject) {
             s = ((BaseFileObject) arg).getShortName();
-        else
+        } else {
             s = super.formatArgument(diag, arg, null);
-        if (arg instanceof JCDiagnostic)
-            return "(" + s + ")";
-        else
-            return s;
+        }
+        return (arg instanceof JCDiagnostic) ? "(" + s + ")" : s;
     }
 
     @Override
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java
index fc2ed35c3d6..106fbcb52fd 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java
@@ -392,11 +392,6 @@ public class RichDiagnosticFormatter extends
             }
         }
 
-        @Override
-        protected String printMethodArgs(List<Type> args, boolean varArgs, Locale locale) {
-            return super.printMethodArgs(args, varArgs, locale);
-        }
-
         @Override
         public String visitClassSymbol(ClassSymbol s, Locale locale) {
             String name = nameSimplifier.simplify(s);
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/SharedNameTable.java b/langtools/src/share/classes/com/sun/tools/javac/util/SharedNameTable.java
index 0314f8b9497..6d34dc1fef2 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/SharedNameTable.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/SharedNameTable.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -93,13 +93,7 @@ public class SharedNameTable extends Name.Table {
     @Override
     public Name fromChars(char[] cs, int start, int len) {
         int nc = this.nc;
-        byte[] bytes = this.bytes;
-        while (nc + len * 3 >= bytes.length) {
-            //          System.err.println("doubling name buffer of length " + names.length + " to fit " + len + " chars");//DEBUG
-            byte[] newnames = new byte[bytes.length * 2];
-            System.arraycopy(bytes, 0, newnames, 0, bytes.length);
-            bytes = this.bytes = newnames;
-        }
+        byte[] bytes = this.bytes = ArrayUtils.ensureCapacity(this.bytes, nc + len * 3);
         int nbytes = Convert.chars2utf(cs, start, bytes, nc, len) - nc;
         int h = hashValue(bytes, nc, nbytes) & hashMask;
         NameImpl n = hashes[h];
@@ -133,12 +127,7 @@ public class SharedNameTable extends Name.Table {
         }
         if (n == null) {
             int nc = this.nc;
-            while (nc + len > names.length) {
-                //              System.err.println("doubling name buffer of length + " + names.length + " to fit " + len + " bytes");//DEBUG
-                byte[] newnames = new byte[names.length * 2];
-                System.arraycopy(names, 0, newnames, 0, names.length);
-                names = this.bytes = newnames;
-            }
+            names = this.bytes = ArrayUtils.ensureCapacity(names, nc + len);
             System.arraycopy(cs, start, names, nc, len);
             n = new NameImpl(this);
             n.index = nc;
diff --git a/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java b/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java
index 56bf415843e..50ce27dcbdf 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -45,8 +45,8 @@ import com.sun.tools.classfile.Method;
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
-class CodeWriter extends BasicWriter {
-    static CodeWriter instance(Context context) {
+public class CodeWriter extends BasicWriter {
+    public static CodeWriter instance(Context context) {
         CodeWriter instance = context.get(CodeWriter.class);
         if (instance == null)
             instance = new CodeWriter(context);
diff --git a/langtools/src/share/classes/com/sun/tools/javap/StackMapWriter.java b/langtools/src/share/classes/com/sun/tools/javap/StackMapWriter.java
index aedcf31c136..084c536f51d 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/StackMapWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/StackMapWriter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,10 +25,11 @@
 
 package com.sun.tools.javap;
 
-import com.sun.tools.classfile.AccessFlags;
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
 
+import com.sun.tools.classfile.AccessFlags;
 import com.sun.tools.classfile.Attribute;
 import com.sun.tools.classfile.Code_attribute;
 import com.sun.tools.classfile.ConstantPool;
@@ -233,8 +234,7 @@ public class StackMapWriter extends InstructionDetailWriter {
             StackMap prev = map.get(pc);
             assert (prev != null);
             int k = 251 - frame.frame_type;
-            verification_type_info[] new_locals = new verification_type_info[prev.locals.length - k];
-            System.arraycopy(prev.locals, 0, new_locals, 0, new_locals.length);
+            verification_type_info[] new_locals = Arrays.copyOf(prev.locals, prev.locals.length - k);
             StackMap m = new StackMap(new_locals, empty);
             map.put(new_pc, m);
             return new_pc;
diff --git a/langtools/test/com/sun/javadoc/testHelpFile/TestHelpFile.java b/langtools/test/com/sun/javadoc/testHelpFile/TestHelpFile.java
new file mode 100644
index 00000000000..973ceda612e
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testHelpFile/TestHelpFile.java
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug      7132631
+ * @summary  Make sure that the help file is generated correctly.
+ * @author   Bhavesh Patel
+ * @library  ../lib/
+ * @build    JavadocTester TestHelpFile
+ * @run main TestHelpFile
+ */
+
+public class TestHelpFile extends JavadocTester {
+
+    //Test information.
+    private static final String BUG_ID = "7132631";
+
+    //Javadoc arguments.
+    private static final String[] ARGS = new String[] {
+        "-d", BUG_ID, "-sourcepath", SRC_DIR,
+            SRC_DIR + FS + "TestHelpFile.java"
+    };
+
+    private static final String[][] NEGATED_TEST = NO_TEST;
+
+    private static final String[][] TEST = {
+        {BUG_ID + FS + "help-doc.html",
+            "<a href=\"constant-values.html\">Constant Field Values</a>"
+        },
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) {
+        TestHelpFile tester = new TestHelpFile();
+        run(tester, ARGS, TEST, NEGATED_TEST);
+        tester.printSummary();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugId() {
+        return BUG_ID;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugName() {
+        return getClass().getName();
+    }
+}
diff --git a/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java b/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java
index 58f56073a38..6a61e43f3b1 100644
--- a/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java
+++ b/langtools/test/com/sun/javadoc/testUseOption/TestUseOption.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4496290 4985072 7006178
+ * @bug 4496290 4985072 7006178 7068595
  * @summary A simple test to determine if -use works.
  * @author jamieh
  * @library ../lib/
@@ -34,7 +34,7 @@
 
 public class TestUseOption extends JavadocTester {
 
-    private static final String BUG_ID = "4496290-4985072-7006178";
+    private static final String BUG_ID = "4496290-4985072-7006178-7068595";
 
     //Input for string search tests.
     private static final String[] TEST2 = {
@@ -64,6 +64,13 @@ public class TestUseOption extends JavadocTester {
         }
     };
 
+    private static final String[][] TEST4 = {
+        {BUG_ID + "-4" + FS + "pkg2" + FS + "class-use" + FS + "C3.html", "<a href=" +
+                 "\"../../index.html?pkg2/class-use/C3.html\" target=\"_top\">" +
+                 "Frames</a></li>"
+        }
+    };
+
     private static final String[] ARGS = new String[] {
         "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2"
     };
@@ -76,6 +83,10 @@ public class TestUseOption extends JavadocTester {
         "-d", BUG_ID + "-3", "-sourcepath", SRC_DIR, "-use", SRC_DIR + FS + "C.java", SRC_DIR + FS + "UsedInC.java"
     };
 
+    private static final String[] ARGS4 = new String[] {
+        "-d", BUG_ID + "-4", "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2"
+    };
+
     /**
      * The entry point of the test.
      * @param args the array of command line arguments.
@@ -108,6 +119,7 @@ public class TestUseOption extends JavadocTester {
         }
         tester.printSummary();
         run(tester, ARGS3, TEST3, NO_TEST);
+        run(tester, ARGS4, TEST4, NO_TEST);
         tester.printSummary();
     }
 
diff --git a/langtools/test/tools/javac/6402516/TestLocalElements.java b/langtools/test/tools/javac/6402516/TestLocalElements.java
index c9faa64a651..7e2d64f694d 100644
--- a/langtools/test/tools/javac/6402516/TestLocalElements.java
+++ b/langtools/test/tools/javac/6402516/TestLocalElements.java
@@ -43,9 +43,9 @@ class Test {
 
     boolean b = new Object() {
             public boolean equals(Object other) {
-                String p = "p, other, super, this; super, this; List, Test2, Test; java.io.*, java.lang.*";
-                String q = "q, p, other, super, this; super, this; List, Test2, Test; java.io.*, java.lang.*";
-                String r = "r, q, p, other, super, this; super, this; List, Test2, Test; java.io.*, java.lang.*";
+                String p = "p, other, super, this; -, super, this; List, Test2, Test; java.io.*, java.lang.*";
+                String q = "q, p, other, super, this; -, super, this; List, Test2, Test; java.io.*, java.lang.*";
+                String r = "r, q, p, other, super, this; -, super, this; List, Test2, Test; java.io.*, java.lang.*";
                 return (this == other);
             }
 
diff --git a/langtools/test/tools/javac/6758789/T6758789a.out b/langtools/test/tools/javac/6758789/T6758789a.out
index 4d82fbc4877..7a733c0ed4b 100644
--- a/langtools/test/tools/javac/6758789/T6758789a.out
+++ b/langtools/test/tools/javac/6758789/T6758789a.out
@@ -1,3 +1,3 @@
-T6758789a.java:14:9: compiler.err.cant.apply.symbol.1: kindname.method, m1, compiler.misc.no.args, int, kindname.class, T6758789a, (compiler.misc.arg.length.mismatch)
-T6758789a.java:15:9: compiler.err.cant.apply.symbol.1: kindname.method, m2, int, compiler.misc.no.args, kindname.class, T6758789a, (compiler.misc.arg.length.mismatch)
+T6758789a.java:14:9: compiler.err.cant.apply.symbol: kindname.method, m1, compiler.misc.no.args, int, kindname.class, T6758789a, (compiler.misc.arg.length.mismatch)
+T6758789a.java:15:9: compiler.err.cant.apply.symbol: kindname.method, m2, int, compiler.misc.no.args, kindname.class, T6758789a, (compiler.misc.arg.length.mismatch)
 2 errors
diff --git a/langtools/test/tools/javac/6758789/T6758789b.out b/langtools/test/tools/javac/6758789/T6758789b.out
index 5393f9add90..45a828dbd49 100644
--- a/langtools/test/tools/javac/6758789/T6758789b.out
+++ b/langtools/test/tools/javac/6758789/T6758789b.out
@@ -1,4 +1,4 @@
-T6758789b.java:16:11: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), T6758789a.Foo, T6758789a.Foo<java.lang.Object>
+T6758789b.java:16:11: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), T6758789a.Foo, T6758789a.Foo<X>
 T6758789b.java:16:10: compiler.warn.unchecked.meth.invocation.applied: kindname.method, m, T6758789a.Foo<X>, T6758789a.Foo, kindname.class, T6758789a
 - compiler.err.warnings.and.werror
 1 error
diff --git a/langtools/test/tools/javac/6840059/T6840059.out b/langtools/test/tools/javac/6840059/T6840059.out
index 7a876871752..af2afb2ff5f 100644
--- a/langtools/test/tools/javac/6840059/T6840059.out
+++ b/langtools/test/tools/javac/6840059/T6840059.out
@@ -1,3 +1,2 @@
-T6840059.java:15:9: compiler.err.cant.apply.symbol.1: kindname.constructor, T6840059, java.lang.Integer, java.lang.String, kindname.class, T6840059, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.lang.String, java.lang.Integer))
-T6840059.java:15:25: compiler.err.cant.apply.symbol.1: kindname.constructor, T6840059, java.lang.Integer, compiler.misc.no.args, kindname.class, T6840059, (compiler.misc.arg.length.mismatch)
-2 errors
+T6840059.java:15:9: compiler.err.cant.apply.symbol: kindname.constructor, T6840059, java.lang.Integer, java.lang.String, kindname.class, T6840059, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.lang.String, java.lang.Integer))
+1 error
diff --git a/langtools/test/tools/javac/6857948/T6857948.out b/langtools/test/tools/javac/6857948/T6857948.out
index 5994663ff53..467e086486d 100644
--- a/langtools/test/tools/javac/6857948/T6857948.out
+++ b/langtools/test/tools/javac/6857948/T6857948.out
@@ -1,3 +1,2 @@
 T6857948.java:16:32: compiler.err.cant.resolve.location.args: kindname.method, nosuchfunction, , , (compiler.misc.location: kindname.class, Test, null)
-T6857948.java:16:50: compiler.err.cant.apply.symbol.1: kindname.constructor, Foo, java.lang.String, compiler.misc.no.args, kindname.class, Foo, (compiler.misc.arg.length.mismatch)
-2 errors
+1 error
diff --git a/langtools/test/tools/javac/7132880/T7132880.out b/langtools/test/tools/javac/7132880/T7132880.out
index a66ee24ac5b..caeaaa2b261 100644
--- a/langtools/test/tools/javac/7132880/T7132880.out
+++ b/langtools/test/tools/javac/7132880/T7132880.out
@@ -1,4 +1,4 @@
-T7132880.java:23:12: compiler.err.cant.apply.symbol.1: kindname.method, m1, java.lang.Integer, java.lang.String, kindname.class, Outer.Inner1, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.lang.String, java.lang.Integer))
+T7132880.java:23:12: compiler.err.cant.apply.symbol: kindname.method, m1, java.lang.Integer, java.lang.String, kindname.class, Outer.Inner1, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.lang.String, java.lang.Integer))
 T7132880.java:33:12: compiler.err.cant.apply.symbols: kindname.method, m1, java.lang.String,{(compiler.misc.inapplicable.method: kindname.method, Outer.Inner2, m1(java.lang.Double), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.lang.String, java.lang.Double))),(compiler.misc.inapplicable.method: kindname.method, Outer.Inner2, m1(java.lang.Integer), (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.lang.String, java.lang.Integer)))}
 T7132880.java:43:12: compiler.err.ref.ambiguous: m2, kindname.method, m2(java.lang.Object,int), Outer.Inner3, kindname.method, m2(int,java.lang.Object), Outer.Inner3
 3 errors
diff --git a/langtools/test/tools/javac/Diagnostics/6722234/T6722234a_1.out b/langtools/test/tools/javac/Diagnostics/6722234/T6722234a_1.out
index d89d28d87a2..a51b6ca1a48 100644
--- a/langtools/test/tools/javac/Diagnostics/6722234/T6722234a_1.out
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234a_1.out
@@ -1,2 +1,2 @@
-T6722234a.java:12:9: compiler.err.cant.apply.symbol.1: kindname.method, m, compiler.misc.type.var: T, 1, compiler.misc.type.var: T, 2, kindname.class, T6722234a<compiler.misc.type.var: T, 1>, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: compiler.misc.type.var: T, 2, compiler.misc.type.var: T, 1))
+T6722234a.java:12:9: compiler.err.cant.apply.symbol: kindname.method, m, compiler.misc.type.var: T, 1, compiler.misc.type.var: T, 2, kindname.class, T6722234a<compiler.misc.type.var: T, 1>, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: compiler.misc.type.var: T, 2, compiler.misc.type.var: T, 1))
 1 error
diff --git a/langtools/test/tools/javac/Diagnostics/6722234/T6722234a_2.out b/langtools/test/tools/javac/Diagnostics/6722234/T6722234a_2.out
index c5204b66f7f..303e91af414 100644
--- a/langtools/test/tools/javac/Diagnostics/6722234/T6722234a_2.out
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234a_2.out
@@ -1,3 +1,3 @@
-T6722234a.java:12:9: compiler.err.cant.apply.symbol.1: kindname.method, m, compiler.misc.type.var: T, 1, compiler.misc.type.var: T, 2, kindname.class, T6722234a<compiler.misc.type.var: T, 1>, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: compiler.misc.type.var: T, 2, compiler.misc.type.var: T, 1))
+T6722234a.java:12:9: compiler.err.cant.apply.symbol: kindname.method, m, compiler.misc.type.var: T, 1, compiler.misc.type.var: T, 2, kindname.class, T6722234a<compiler.misc.type.var: T, 1>, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: compiler.misc.type.var: T, 2, compiler.misc.type.var: T, 1))
 - compiler.misc.where.description.typevar.1: compiler.misc.type.var: T, 1,compiler.misc.type.var: T, 2,{(compiler.misc.where.typevar: compiler.misc.type.var: T, 1, java.lang.String, kindname.class, T6722234a),(compiler.misc.where.typevar: compiler.misc.type.var: T, 2, java.lang.Integer, kindname.method, <compiler.misc.type.var: T, 2>test(compiler.misc.type.var: T, 2))}
 1 error
diff --git a/langtools/test/tools/javac/Diagnostics/6722234/T6722234b_1.out b/langtools/test/tools/javac/Diagnostics/6722234/T6722234b_1.out
index 5fd02efac09..4545c9af32b 100644
--- a/langtools/test/tools/javac/Diagnostics/6722234/T6722234b_1.out
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234b_1.out
@@ -1,2 +1,2 @@
-T6722234b.java:16:9: compiler.err.cant.apply.symbol.1: kindname.method, m, List<T>,List<T>, List<compiler.misc.type.captureof: 1, ? extends T6722234b>,List<compiler.misc.type.captureof: 2, ? extends T6722234b>, kindname.class, T6722234b, (compiler.misc.inferred.do.not.conform.to.eq.bounds: compiler.misc.type.captureof: 2, ? extends T6722234b, compiler.misc.type.captureof: 2, ? extends T6722234b,compiler.misc.type.captureof: 1, ? extends T6722234b)
+T6722234b.java:16:9: compiler.err.cant.apply.symbol: kindname.method, m, List<T>,List<T>, List<compiler.misc.type.captureof: 1, ? extends T6722234b>,List<compiler.misc.type.captureof: 2, ? extends T6722234b>, kindname.class, T6722234b, (compiler.misc.inferred.do.not.conform.to.eq.bounds: compiler.misc.type.captureof: 2, ? extends T6722234b, compiler.misc.type.captureof: 2, ? extends T6722234b,compiler.misc.type.captureof: 1, ? extends T6722234b)
 1 error
diff --git a/langtools/test/tools/javac/Diagnostics/6722234/T6722234b_2.out b/langtools/test/tools/javac/Diagnostics/6722234/T6722234b_2.out
index ef628a2a61f..bdf5fb50234 100644
--- a/langtools/test/tools/javac/Diagnostics/6722234/T6722234b_2.out
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234b_2.out
@@ -1,4 +1,4 @@
-T6722234b.java:16:9: compiler.err.cant.apply.symbol.1: kindname.method, m, List<T>,List<T>, List<compiler.misc.captured.type: 1>,List<compiler.misc.captured.type: 2>, kindname.class, T6722234b, (compiler.misc.inferred.do.not.conform.to.eq.bounds: compiler.misc.captured.type: 2, compiler.misc.captured.type: 2,compiler.misc.captured.type: 1)
+T6722234b.java:16:9: compiler.err.cant.apply.symbol: kindname.method, m, List<T>,List<T>, List<compiler.misc.captured.type: 1>,List<compiler.misc.captured.type: 2>, kindname.class, T6722234b, (compiler.misc.inferred.do.not.conform.to.eq.bounds: compiler.misc.captured.type: 2, compiler.misc.captured.type: 2,compiler.misc.captured.type: 1)
 - compiler.misc.where.description.typevar: T,{(compiler.misc.where.typevar: T, Object, kindname.method, <T>m(List<T>,List<T>))}
 - compiler.misc.where.description.captured.1: compiler.misc.captured.type: 1,compiler.misc.captured.type: 2,{(compiler.misc.where.captured.1: compiler.misc.captured.type: 1, T6722234b, compiler.misc.type.null, ? extends T6722234b),(compiler.misc.where.captured.1: compiler.misc.captured.type: 2, T6722234b, compiler.misc.type.null, ? extends T6722234b)}
 1 error
diff --git a/langtools/test/tools/javac/Diagnostics/6722234/T6722234c.out b/langtools/test/tools/javac/Diagnostics/6722234/T6722234c.out
index c186c0861bf..a8a6a3bcc98 100644
--- a/langtools/test/tools/javac/Diagnostics/6722234/T6722234c.out
+++ b/langtools/test/tools/javac/Diagnostics/6722234/T6722234c.out
@@ -1,2 +1,2 @@
-T6722234c.java:14:9: compiler.err.cant.apply.symbol.1: kindname.method, m, T6722234c.String, java.lang.String, kindname.class, T6722234c, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.lang.String, T6722234c.String))
+T6722234c.java:14:9: compiler.err.cant.apply.symbol: kindname.method, m, T6722234c.String, java.lang.String, kindname.class, T6722234c, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.lang.String, T6722234c.String))
 1 error
diff --git a/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.out b/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.out
index 1fdc5dd06da..215e53fe5fe 100644
--- a/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.out
+++ b/langtools/test/tools/javac/Diagnostics/6862608/T6862608a.out
@@ -1,3 +1,3 @@
-T6862608a.java:19:33: compiler.err.cant.apply.symbol.1: kindname.method, compound, java.lang.Iterable<? extends java.util.Comparator<? super T>>, java.util.List<java.util.Comparator<?>>, kindname.class, T6862608a, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.util.List<java.util.Comparator<?>>, java.lang.Iterable<? extends java.util.Comparator<? super T>>))
+T6862608a.java:19:33: compiler.err.cant.apply.symbol: kindname.method, compound, java.lang.Iterable<? extends java.util.Comparator<? super T>>, java.util.List<java.util.Comparator<?>>, kindname.class, T6862608a, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.util.List<java.util.Comparator<?>>, java.lang.Iterable<? extends java.util.Comparator<? super T>>))
 - compiler.misc.where.description.typevar: T,{(compiler.misc.where.typevar: T, java.lang.Object, kindname.method, <T>compound(java.lang.Iterable<? extends java.util.Comparator<? super T>>))}
 1 error
diff --git a/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.out b/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.out
index 05fa41cda3b..4539eb88335 100644
--- a/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.out
+++ b/langtools/test/tools/javac/Diagnostics/6862608/T6862608b.out
@@ -1,3 +1,3 @@
-T6862608b.java:11:7: compiler.err.cant.apply.symbol.1: kindname.method, test, compiler.misc.type.var: T, 1, compiler.misc.type.var: T, 2, kindname.class, T66862608b<compiler.misc.type.var: T, 1,compiler.misc.type.var: S, 2>, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: compiler.misc.type.var: T, 2, compiler.misc.type.var: T, 1))
+T6862608b.java:11:7: compiler.err.cant.apply.symbol: kindname.method, test, compiler.misc.type.var: T, 1, compiler.misc.type.var: T, 2, kindname.class, T66862608b<compiler.misc.type.var: T, 1,compiler.misc.type.var: S, 2>, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: compiler.misc.type.var: T, 2, compiler.misc.type.var: T, 1))
 - compiler.misc.where.description.typevar.1: compiler.misc.type.var: T, 1,compiler.misc.type.var: T, 2,compiler.misc.type.var: S, 1,compiler.misc.type.var: S, 2,{(compiler.misc.where.typevar: compiler.misc.type.var: T, 1, java.lang.String, kindname.class, T66862608b),(compiler.misc.where.typevar: compiler.misc.type.var: T, 2, compiler.misc.type.var: S, 1, kindname.method, <compiler.misc.type.var: S, 1,compiler.misc.type.var: T, 2>foo(compiler.misc.type.var: T, 2)),(compiler.misc.where.typevar: compiler.misc.type.var: S, 1, java.lang.Object, kindname.method, <compiler.misc.type.var: S, 1,compiler.misc.type.var: T, 2>foo(compiler.misc.type.var: T, 2)),(compiler.misc.where.typevar: compiler.misc.type.var: S, 2, java.lang.Object, kindname.class, T66862608b)}
 1 error
diff --git a/langtools/test/tools/javac/T6326754.out b/langtools/test/tools/javac/T6326754.out
index ad3dae9304f..00963b8c864 100644
--- a/langtools/test/tools/javac/T6326754.out
+++ b/langtools/test/tools/javac/T6326754.out
@@ -1,7 +1,7 @@
 T6326754.java:44:12: compiler.err.name.clash.same.erasure: TestConstructor(T), TestConstructor(K)
 T6326754.java:52:17: compiler.err.name.clash.same.erasure: setT(K), setT(T)
 T6326754.java:64:18: compiler.err.prob.found.req: (compiler.misc.inconvertible.types: T, T)
-T6326754.java:70:11: compiler.err.cant.apply.symbol.1: kindname.method, setT, java.lang.Object, compiler.misc.no.args, kindname.class, TestC<T>, (compiler.misc.arg.length.mismatch)
+T6326754.java:70:11: compiler.err.cant.apply.symbol: kindname.method, setT, java.lang.Object, compiler.misc.no.args, kindname.class, TestC<T>, (compiler.misc.arg.length.mismatch)
 - compiler.note.unchecked.filename: T6326754.java
 - compiler.note.unchecked.recompile
 4 errors
diff --git a/langtools/test/tools/javac/conditional/Conditional.java b/langtools/test/tools/javac/conditional/Conditional.java
index 8d66dba050c..84417385560 100644
--- a/langtools/test/tools/javac/conditional/Conditional.java
+++ b/langtools/test/tools/javac/conditional/Conditional.java
@@ -27,6 +27,7 @@
  * @summary Conditional operator applies assignment conversion
  * @author Tim Hanson, BEA
  *
+ * @compile -XDallowPoly Conditional.java
  * @compile/fail Conditional.java
  */
 
diff --git a/langtools/test/tools/javac/diags/CheckResourceKeys.java b/langtools/test/tools/javac/diags/CheckResourceKeys.java
index 4059b28fb8f..794d3c55f6c 100644
--- a/langtools/test/tools/javac/diags/CheckResourceKeys.java
+++ b/langtools/test/tools/javac/diags/CheckResourceKeys.java
@@ -185,6 +185,8 @@ public class CheckResourceKeys {
         "compiler.err.cant.resolve.args.params",
         "compiler.err.cant.resolve.location.args",
         "compiler.err.cant.resolve.location.args.params",
+        "compiler.misc.cant.resolve.location.args",
+        "compiler.misc.cant.resolve.location.args.params",
         // JavaCompiler, reports #errors and #warnings
         "compiler.misc.count.error",
         "compiler.misc.count.error.plural",
diff --git a/langtools/test/tools/javac/diags/examples.not-yet.txt b/langtools/test/tools/javac/diags/examples.not-yet.txt
index 9b569fcf309..0ed45f26fa2 100644
--- a/langtools/test/tools/javac/diags/examples.not-yet.txt
+++ b/langtools/test/tools/javac/diags/examples.not-yet.txt
@@ -1,7 +1,6 @@
 compiler.err.already.annotated                          # internal compiler error?
 compiler.err.already.defined.this.unit                  # seems to be masked by compiler.err.duplicate.class
 compiler.err.annotation.value.not.allowable.type        # cannot happen: precluded by complete type-specific tests
-compiler.err.cant.apply.symbol
 compiler.err.cant.read.file                             # (apt.JavaCompiler?)
 compiler.err.cant.select.static.class.from.param.type
 compiler.err.illegal.char.for.encoding
@@ -65,6 +64,7 @@ compiler.misc.kindname.static
 compiler.misc.kindname.type.variable
 compiler.misc.kindname.type.variable.bound
 compiler.misc.kindname.value
+compiler.misc.incompatible.eq.lower.bounds              # cannot happen?
 compiler.misc.no.unique.minimal.instance.exists
 compiler.misc.resume.abort                              # prompt for a response
 compiler.misc.source.unavailable                        # DiagnosticSource
diff --git a/langtools/test/tools/javac/diags/examples/CantAccessArgTypeInFunctionalDesc.java b/langtools/test/tools/javac/diags/examples/CantAccessArgTypeInFunctionalDesc.java
new file mode 100644
index 00000000000..7a7a65b8ed7
--- /dev/null
+++ b/langtools/test/tools/javac/diags/examples/CantAccessArgTypeInFunctionalDesc.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.cant.access.arg.type.in.functional.desc
+// key: compiler.err.report.access
+// options: -XDallowLambda
+
+interface SAM_InaccessibleArg {
+    void m(Foo.Bar bar);
+    static class Foo { private class Bar { } }
+}
+
+class CantAccessArgTypeInFunctionalDesc {
+    SAM_InaccessibleArg s = x-> { };
+}
diff --git a/langtools/test/tools/javac/diags/examples/CantAccessInnerClsConstr.java b/langtools/test/tools/javac/diags/examples/CantAccessInnerClsConstr.java
new file mode 100644
index 00000000000..169de29d42f
--- /dev/null
+++ b/langtools/test/tools/javac/diags/examples/CantAccessInnerClsConstr.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.prob.found.req
+// key: compiler.misc.cant.access.inner.cls.constr
+// key: compiler.misc.invalid.mref
+// options: -XDallowMethodReferences
+
+class CantAccessInnerClsConstructor {
+
+    interface SAM {
+        Outer m();
+    }
+
+    class Outer { }
+
+    static void test() {
+        SAM s = Outer::new;
+    }
+}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Arithmetic.java b/langtools/test/tools/javac/diags/examples/CantAccessReturnTypeInFunctionalDesc.java
similarity index 74%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Arithmetic.java
rename to langtools/test/tools/javac/diags/examples/CantAccessReturnTypeInFunctionalDesc.java
index d5456890024..6a9ab5f6ae8 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Arithmetic.java
+++ b/langtools/test/tools/javac/diags/examples/CantAccessReturnTypeInFunctionalDesc.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,13 +19,16 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm;
+// key: compiler.err.cant.access.return.in.functional.desc
+// options: -XDallowLambda
 
-public interface Arithmetic extends Instruction, RTLOperations {
-   public Operand[]  getArithmeticSources();
-   public Operand    getArithmeticDestination();
-   public int        getOperation(); // one of RTLOperations
+interface SAM_InaccessibleRet {
+    Foo.Bar m();
+    static class Foo { private class Bar { } }
+}
+
+class CantAccessReturnTypeInFunctionalDesc {
+    SAM_InaccessibleRet s = ()->null;
 }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/DirectAddress.java b/langtools/test/tools/javac/diags/examples/CantAccessThrownTypesInFunctionalDesc.java
similarity index 73%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/DirectAddress.java
rename to langtools/test/tools/javac/diags/examples/CantAccessThrownTypesInFunctionalDesc.java
index ba3d01acb3f..e8ad7932cd3 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/DirectAddress.java
+++ b/langtools/test/tools/javac/diags/examples/CantAccessThrownTypesInFunctionalDesc.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,22 +19,16 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm;
+// key: compiler.err.cant.access.thrown.in.functional.desc
+// options: -XDallowLambda
 
-public class DirectAddress extends Address {
-   private long value;
-   public DirectAddress(long value) {
-      this.value = value;
-   }
-
-   public long getValue() {
-      return value;
-   }
-
-   public String toString() {
-      return Long.toHexString(value);
-   }
+interface SAM_InaccessibleThrown {
+    void m() throws Foo.Bar;
+    static class Foo { private class Bar extends Exception { } }
+}
+
+class CantAccessThrownTypesInFunctionalDesc {
+    SAM_InaccessibleThrown s = ()-> { };
 }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSwapInstruction.java b/langtools/test/tools/javac/diags/examples/CantApplySymbolFragment.java
similarity index 67%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSwapInstruction.java
rename to langtools/test/tools/javac/diags/examples/CantApplySymbolFragment.java
index ea7ad5cdbe8..5ce08eb163b 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCSwapInstruction.java
+++ b/langtools/test/tools/javac/diags/examples/CantApplySymbolFragment.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,23 +19,24 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+// key: compiler.err.prob.found.req
+// key: compiler.misc.inconvertible.types
+// key: compiler.misc.no.conforming.assignment.exists
+// key: compiler.misc.cant.apply.symbol
+// key: compiler.misc.invalid.mref
+// options: -XDallowMethodReferences
 
-import sun.jvm.hotspot.asm.*;
+class CantApplySymbolFragment {
 
-public class SPARCSwapInstruction extends SPARCAtomicLoadStoreInstruction {
-    public SPARCSwapInstruction(String name, SPARCRegisterIndirectAddress addr, SPARCRegister rd) {
-        super(name, addr, rd);
+    interface SAM {
+        void m(Integer u);
     }
 
-    public int getDataType() {
-        return RTLDT_UNSIGNED_WORD;
-    }
+    static void f(String s) { }
 
-    public boolean isConditional() {
-        return false;
+    void test() {
+        SAM s = CantApplySymbolFragment::f;
     }
 }
diff --git a/langtools/test/tools/javac/diags/examples/CantApplySymbolsFragment.java b/langtools/test/tools/javac/diags/examples/CantApplySymbolsFragment.java
new file mode 100644
index 00000000000..77a740b3473
--- /dev/null
+++ b/langtools/test/tools/javac/diags/examples/CantApplySymbolsFragment.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.prob.found.req
+// key: compiler.misc.inconvertible.types
+// key: compiler.misc.no.conforming.assignment.exists
+// key: compiler.misc.arg.length.mismatch
+// key: compiler.misc.inapplicable.method
+// key: compiler.misc.cant.apply.symbols
+// key: compiler.misc.invalid.mref
+// options: -XDallowMethodReferences
+
+class CantApplySymbolsFragment {
+
+    interface SAM {
+        void m(Integer u);
+    }
+
+    static void f() { }
+
+    static void f(String s) { }
+
+    void test() {
+        SAM s = CantApplySymbolsFragment::f;
+    }
+}
diff --git a/langtools/test/tools/javac/diags/examples/CantRefNonEffectivelyFinalVar.java b/langtools/test/tools/javac/diags/examples/CantRefNonEffectivelyFinalVar.java
index 955e8b3e226..fabb43ed80b 100644
--- a/langtools/test/tools/javac/diags/examples/CantRefNonEffectivelyFinalVar.java
+++ b/langtools/test/tools/javac/diags/examples/CantRefNonEffectivelyFinalVar.java
@@ -23,7 +23,8 @@
 
 // key: compiler.err.cant.ref.non.effectively.final.var
 // key: compiler.misc.inner.cls
-// options: -XDallowEffectivelyFinalInInnerClasses
+// key: compiler.misc.lambda
+// options: -XDallowLambda -XDallowEffectivelyFinalInInnerClasses
 
 class CantRefNonEffectivelyFinalVar {
     void test() {
@@ -31,4 +32,14 @@ class CantRefNonEffectivelyFinalVar {
         new Object() { int j = i; };
         i = 2;
     }
+
+    interface SAM {
+        void m();
+    }
+
+    void test2() {
+        int i = 0;
+        SAM s = ()-> { int j = i; };
+        i++;
+    }
 }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/IntegerBranchDecoder.java b/langtools/test/tools/javac/diags/examples/CantResolveLocationArgsFragment.java
similarity index 72%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/IntegerBranchDecoder.java
rename to langtools/test/tools/javac/diags/examples/CantResolveLocationArgsFragment.java
index f5efc7b2168..215dffbd148 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/IntegerBranchDecoder.java
+++ b/langtools/test/tools/javac/diags/examples/CantResolveLocationArgsFragment.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,14 +19,20 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+// key: compiler.misc.cant.resolve.location.args
+// key: compiler.misc.location
+// key: compiler.err.invalid.mref
+// options: -XDallowMethodReferences
 
-class IntegerBranchDecoder extends BranchDecoder {
-    String getConditionName(int conditionCode, boolean isAnnuled) {
-        return isAnnuled ? integerAnnuledConditionNames[conditionCode]
-                         : integerConditionNames[conditionCode];
+class CantResolveLocationArgsFragment {
+
+    interface SAM {
+        void m(Integer u);
+    }
+
+    void test() {
+        SAM s = CantResolveLocationArgsFragment::f;
     }
 }
diff --git a/langtools/test/tools/javac/diags/examples/CantResolveLocationArgsParamsFragment.java b/langtools/test/tools/javac/diags/examples/CantResolveLocationArgsParamsFragment.java
new file mode 100644
index 00000000000..daf2310ae08
--- /dev/null
+++ b/langtools/test/tools/javac/diags/examples/CantResolveLocationArgsParamsFragment.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.misc.cant.resolve.location.args.params
+// key: compiler.misc.location
+// key: compiler.err.invalid.mref
+// options: -XDallowMethodReferences
+
+class CantResolveLocationArgsParamsFragment {
+
+    interface SAM {
+        void m(Integer u);
+    }
+
+    void test() {
+        SAM s = CantResolveLocationArgsParamsFragment::<String>f;
+    }
+}
diff --git a/langtools/test/tools/javac/diags/examples/CatchWithoutTry.java b/langtools/test/tools/javac/diags/examples/CatchWithoutTry.java
index 51eebedb014..fccede8954f 100644
--- a/langtools/test/tools/javac/diags/examples/CatchWithoutTry.java
+++ b/langtools/test/tools/javac/diags/examples/CatchWithoutTry.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,6 +23,8 @@
 
 // key: compiler.err.catch.without.try
 // key: compiler.err.expected
+// key: compiler.err.not.stmt
+// key: compiler.err.lambda.not.supported.in.source
 
 class CatchWithoutTry {
     void m() {
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9FlushwInstruction.java b/langtools/test/tools/javac/diags/examples/CyclicInference.java
similarity index 75%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9FlushwInstruction.java
rename to langtools/test/tools/javac/diags/examples/CyclicInference.java
index dda9c33faac..4f51c9c2df7 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9FlushwInstruction.java
+++ b/langtools/test/tools/javac/diags/examples/CyclicInference.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,16 +19,20 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+// key: compiler.err.cant.apply.symbol
+// key: compiler.misc.cyclic.inference
+// options: -XDallowLambda -XDallowPoly
 
-import sun.jvm.hotspot.asm.*;
+class CyclicInference {
+    interface SAM<X> {
+        void m(X x);
+    }
 
-public class SPARCV9FlushwInstruction extends SPARCInstruction
-                    implements SPARCV9Instruction {
-    public SPARCV9FlushwInstruction() {
-        super("flushw");
+    <Z> void g(SAM<Z> sz) { }
+
+    void test() {
+        g(x-> {});
     }
 }
diff --git a/langtools/test/tools/javac/diags/examples/ExplicitParamsDoNotConformToBounds.java b/langtools/test/tools/javac/diags/examples/ExplicitParamsDoNotConformToBounds.java
index 255a09c8cbb..cd10b13180d 100644
--- a/langtools/test/tools/javac/diags/examples/ExplicitParamsDoNotConformToBounds.java
+++ b/langtools/test/tools/javac/diags/examples/ExplicitParamsDoNotConformToBounds.java
@@ -21,7 +21,7 @@
  * questions.
  */
 
-// key: compiler.err.cant.apply.symbol.1
+// key: compiler.err.cant.apply.symbol
 // key: compiler.misc.explicit.param.do.not.conform.to.bounds
 
 class ExplicitParamsDoNotConformToBounds {
diff --git a/langtools/test/tools/javac/diags/examples/InaccessibleVarargsType/InaccessibleVarargsType.java b/langtools/test/tools/javac/diags/examples/InaccessibleVarargsType/InaccessibleVarargsType.java
index 3bdfc83dfef..8a8c95cc61c 100644
--- a/langtools/test/tools/javac/diags/examples/InaccessibleVarargsType/InaccessibleVarargsType.java
+++ b/langtools/test/tools/javac/diags/examples/InaccessibleVarargsType/InaccessibleVarargsType.java
@@ -22,7 +22,7 @@
  */
 
 // key: compiler.misc.inaccessible.varargs.type
-// key: compiler.err.cant.apply.symbol.1
+// key: compiler.err.cant.apply.symbol
 
 import p1.B;
 
diff --git a/langtools/test/tools/javac/diags/examples/IncompatibleAbstracts.java b/langtools/test/tools/javac/diags/examples/IncompatibleAbstracts.java
new file mode 100644
index 00000000000..13b33b0d793
--- /dev/null
+++ b/langtools/test/tools/javac/diags/examples/IncompatibleAbstracts.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.prob.found.req
+// key: compiler.misc.not.a.functional.intf.1
+// key: compiler.misc.incompatible.abstracts
+// options: -XDallowLambda
+
+class IncompatibleAbstracts {
+
+    interface SAM {
+        void m(String s);
+        void m(Integer i);
+    }
+
+    SAM s = x-> { };
+}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9DoneInstruction.java b/langtools/test/tools/javac/diags/examples/IncompatibleArgTypesInLambda.java
similarity index 76%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9DoneInstruction.java
rename to langtools/test/tools/javac/diags/examples/IncompatibleArgTypesInLambda.java
index 947d8081e10..aeb73b84d02 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9DoneInstruction.java
+++ b/langtools/test/tools/javac/diags/examples/IncompatibleArgTypesInLambda.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,16 +19,16 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+// key: compiler.err.prob.found.req
+// key: compiler.misc.incompatible.arg.types.in.lambda
+// options: -XDallowLambda -XDallowPoly
 
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9DoneInstruction extends SPARCInstruction
-                    implements SPARCV9Instruction {
-    public SPARCV9DoneInstruction() {
-        super("done");
+class IncompatibleArgTypesInLambda {
+    interface SAM {
+        void m(Integer x);
     }
+
+    SAM s = (String x)-> {};
 }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCInstruction.java b/langtools/test/tools/javac/diags/examples/IncompatibleDescsInFunctionalIntf.java
similarity index 66%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCInstruction.java
rename to langtools/test/tools/javac/diags/examples/IncompatibleDescsInFunctionalIntf.java
index e123ccd7ba7..cbb0912b5b6 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCInstruction.java
+++ b/langtools/test/tools/javac/diags/examples/IncompatibleDescsInFunctionalIntf.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,24 +19,25 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+// key: compiler.err.types.incompatible.diff.ret
+// key: compiler.err.prob.found.req
+// key: compiler.misc.incompatible.descs.in.functional.intf
+// key: compiler.misc.descriptor
+// key: compiler.misc.descriptor.throws
+// options: -XDallowLambda
 
-import sun.jvm.hotspot.asm.*;
-
-public abstract class SPARCInstruction
-                      extends AbstractInstruction
-                      implements /* imports */ SPARCOpcodes {
-    public SPARCInstruction(String name) {
-        super(name);
+class IncompatibleDescsInFunctionalIntf {
+    interface A {
+        Integer m(String i) throws Exception;
     }
 
-    public int getSize() {
-        return 4;
+    interface B {
+        String m(String i);
     }
 
-    protected static String comma = ", ";
-    protected static String spaces = "\t";
+    interface SAM extends A,B { }
+
+    SAM s = x-> { };
 }
diff --git a/langtools/test/tools/javac/diags/examples/IncompatibleEqUpperBounds.java b/langtools/test/tools/javac/diags/examples/IncompatibleEqUpperBounds.java
new file mode 100644
index 00000000000..83651fe3ff1
--- /dev/null
+++ b/langtools/test/tools/javac/diags/examples/IncompatibleEqUpperBounds.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+//key: compiler.err.cant.apply.symbol
+//key: compiler.misc.incompatible.eq.upper.bounds
+
+import java.util.List;
+
+class IncompatibleEqUpperBounds {
+    <S, T extends List<S>> void m(List<? super S> s1, T s2) { }
+
+    void test(List<Integer> li, List<String> ls) {
+        m(li, ls);
+    }
+}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/IllegalInstructionDecoder.java b/langtools/test/tools/javac/diags/examples/IncompatibleRetTypeInLambda.java
similarity index 74%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/IllegalInstructionDecoder.java
rename to langtools/test/tools/javac/diags/examples/IncompatibleRetTypeInLambda.java
index 00af2dda90f..fd087553ea8 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/IllegalInstructionDecoder.java
+++ b/langtools/test/tools/javac/diags/examples/IncompatibleRetTypeInLambda.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,15 +19,17 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+// key: compiler.err.prob.found.req
+// key: compiler.misc.inconvertible.types
+// key: compiler.misc.incompatible.ret.type.in.lambda
+// options: -XDallowLambda -XDallowPoly
 
-import sun.jvm.hotspot.asm.*;
-
-class IllegalInstructionDecoder extends InstructionDecoder {
-    Instruction decode(int instruction, SPARCInstructionFactory factory) {
-        return factory.newIllegalInstruction(instruction);
+class IncompatibleRetTypeInLambda {
+    interface SAM {
+        Integer m();
     }
+
+    SAM s = ()-> "";
 }
diff --git a/langtools/test/tools/javac/diags/examples/IncompatibleRetTypeInMref.java b/langtools/test/tools/javac/diags/examples/IncompatibleRetTypeInMref.java
new file mode 100644
index 00000000000..6ffadd08b99
--- /dev/null
+++ b/langtools/test/tools/javac/diags/examples/IncompatibleRetTypeInMref.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.prob.found.req
+// key: compiler.misc.inconvertible.types
+// key: compiler.misc.incompatible.ret.type.in.mref
+// options: -XDallowMethodReferences -XDallowPoly
+
+class IncompatibleRetTypeInMref {
+    interface SAM {
+        Integer m();
+    }
+
+    static String f() { }
+
+    SAM s = IncompatibleRetTypeInMref::f;
+}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCStbarInstruction.java b/langtools/test/tools/javac/diags/examples/IncompatibleThrownTypesInLambda.java
similarity index 78%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCStbarInstruction.java
rename to langtools/test/tools/javac/diags/examples/IncompatibleThrownTypesInLambda.java
index 601df4769c7..14543406180 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCStbarInstruction.java
+++ b/langtools/test/tools/javac/diags/examples/IncompatibleThrownTypesInLambda.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,15 +19,15 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+// key: compiler.err.incompatible.thrown.types.in.lambda
+// options: -XDallowLambda
 
-import sun.jvm.hotspot.asm.SymbolFinder;
-
-public class SPARCStbarInstruction extends SPARCInstruction {
-    public SPARCStbarInstruction() {
-        super("stbar");
+class IncompatibleThrownTypesInLambda {
+    interface SAM {
+        void m();
     }
+
+    SAM s = ()-> { throw new Exception(); };
 }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RestoredInstruction.java b/langtools/test/tools/javac/diags/examples/IncompatibleThrownTypesInMref.java
similarity index 75%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RestoredInstruction.java
rename to langtools/test/tools/javac/diags/examples/IncompatibleThrownTypesInMref.java
index 3624de10604..4403cb707f2 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCV9RestoredInstruction.java
+++ b/langtools/test/tools/javac/diags/examples/IncompatibleThrownTypesInMref.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,16 +19,17 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+// key: compiler.err.incompatible.thrown.types.in.mref
+// options: -XDallowMethodReferences
 
-import sun.jvm.hotspot.asm.*;
-
-public class SPARCV9RestoredInstruction extends SPARCInstruction
-                    implements SPARCV9Instruction {
-    public SPARCV9RestoredInstruction() {
-        super("restored");
+class IncompatibleThrownTypesInMref {
+    interface SAM {
+        void m();
     }
+
+    static void f() throws Exception { }
+
+    SAM s = IncompatibleThrownTypesInMref::f;
 }
diff --git a/langtools/test/tools/javac/diags/examples/IncompatibleTypesInConditional.java b/langtools/test/tools/javac/diags/examples/IncompatibleTypesInConditional.java
new file mode 100644
index 00000000000..8a188e6fe4d
--- /dev/null
+++ b/langtools/test/tools/javac/diags/examples/IncompatibleTypesInConditional.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.prob.found.req
+// key: compiler.misc.incompatible.type.in.conditional
+// key: compiler.misc.inconvertible.types
+// options: -XDallowPoly
+
+class IncompatibleTypesInConditional {
+
+    interface A { }
+    interface B { }
+
+    B b = true ? (A)null : (B)null;
+}
diff --git a/langtools/test/tools/javac/diags/examples/InferArgsLengthMismatch.java b/langtools/test/tools/javac/diags/examples/InferArgsLengthMismatch.java
index 28411b4a4a4..f01bd14080c 100644
--- a/langtools/test/tools/javac/diags/examples/InferArgsLengthMismatch.java
+++ b/langtools/test/tools/javac/diags/examples/InferArgsLengthMismatch.java
@@ -21,7 +21,7 @@
  * questions.
  */
 
-// key: compiler.err.cant.apply.symbol.1
+// key: compiler.err.cant.apply.symbol
 // key: compiler.misc.infer.arg.length.mismatch
 
 class InferArgsLengthMismatch {
diff --git a/langtools/test/tools/javac/diags/examples/InferNoConformingAssignment.java b/langtools/test/tools/javac/diags/examples/InferNoConformingAssignment.java
index 5e42c011314..adfb1f89f90 100644
--- a/langtools/test/tools/javac/diags/examples/InferNoConformingAssignment.java
+++ b/langtools/test/tools/javac/diags/examples/InferNoConformingAssignment.java
@@ -21,7 +21,7 @@
  * questions.
  */
 
-// key: compiler.err.cant.apply.symbol.1
+// key: compiler.err.cant.apply.symbol
 // key: compiler.misc.inconvertible.types
 // key: compiler.misc.infer.no.conforming.assignment.exists
 
diff --git a/langtools/test/tools/javac/diags/examples/InferVarargsArgumentMismatch.java b/langtools/test/tools/javac/diags/examples/InferVarargsArgumentMismatch.java
index f9b6301779f..eca02fa932f 100644
--- a/langtools/test/tools/javac/diags/examples/InferVarargsArgumentMismatch.java
+++ b/langtools/test/tools/javac/diags/examples/InferVarargsArgumentMismatch.java
@@ -21,7 +21,7 @@
  * questions.
  */
 
-// key: compiler.err.cant.apply.symbol.1
+// key: compiler.err.cant.apply.symbol
 // key: compiler.misc.infer.varargs.argument.mismatch
 // key: compiler.misc.inconvertible.types
 
diff --git a/langtools/test/tools/javac/diags/examples/InferredDoNotConformToEq.java b/langtools/test/tools/javac/diags/examples/InferredDoNotConformToEq.java
index d644ae82bf7..80383342b4a 100644
--- a/langtools/test/tools/javac/diags/examples/InferredDoNotConformToEq.java
+++ b/langtools/test/tools/javac/diags/examples/InferredDoNotConformToEq.java
@@ -21,7 +21,7 @@
  * questions.
  */
 
-// key: compiler.err.cant.apply.symbol.1
+// key: compiler.err.cant.apply.symbol
 // key: compiler.misc.inferred.do.not.conform.to.eq.bounds
 
 import java.util.*;
diff --git a/langtools/test/tools/javac/diags/examples/InferredDoNotConformToUpper.java b/langtools/test/tools/javac/diags/examples/InferredDoNotConformToUpper.java
index 35498dcb65a..639510d503f 100644
--- a/langtools/test/tools/javac/diags/examples/InferredDoNotConformToUpper.java
+++ b/langtools/test/tools/javac/diags/examples/InferredDoNotConformToUpper.java
@@ -21,7 +21,7 @@
  * questions.
  */
 
-// key: compiler.err.cant.apply.symbol.1
+// key: compiler.err.cant.apply.symbol
 // key: compiler.misc.inferred.do.not.conform.to.upper.bounds
 
 import java.util.*;
diff --git a/langtools/test/tools/javac/diags/examples/InvalidGenericDescInFunctionalInterface.java b/langtools/test/tools/javac/diags/examples/InvalidGenericDescInFunctionalInterface.java
new file mode 100644
index 00000000000..4f76dae18e5
--- /dev/null
+++ b/langtools/test/tools/javac/diags/examples/InvalidGenericDescInFunctionalInterface.java
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.prob.found.req
+// key: compiler.misc.invalid.generic.desc.in.functional.intf
+// options: -XDallowLambda
+
+class InvalidGenericDescInFunctionalIntf {
+
+    interface SAM {
+        <Z> void m();
+    }
+
+    SAM s = x-> { };
+}
diff --git a/langtools/test/tools/javac/diags/examples/KindnameConstructor.java b/langtools/test/tools/javac/diags/examples/KindnameConstructor.java
index c8f20c29d69..db7d39bfce3 100644
--- a/langtools/test/tools/javac/diags/examples/KindnameConstructor.java
+++ b/langtools/test/tools/javac/diags/examples/KindnameConstructor.java
@@ -23,12 +23,10 @@
 
 // key: compiler.misc.kindname.constructor
 // key: compiler.misc.kindname.class
-// key: compiler.misc.no.args
-// key: compiler.err.cant.apply.symbol.1
-// key: compiler.misc.arg.length.mismatch
+// key: compiler.err.cant.apply.symbol
 // key: compiler.misc.no.conforming.assignment.exists
 // key: compiler.misc.inconvertible.types
-// key: compiler.misc.count.error.plural
+// key: compiler.misc.count.error
 // key: compiler.err.error
 // run: backdoor
 
diff --git a/langtools/test/tools/javac/diags/examples/MethodReferencesNotSupported.java b/langtools/test/tools/javac/diags/examples/MethodReferencesNotSupported.java
index df3198008b0..3cd8e67a8f6 100644
--- a/langtools/test/tools/javac/diags/examples/MethodReferencesNotSupported.java
+++ b/langtools/test/tools/javac/diags/examples/MethodReferencesNotSupported.java
@@ -25,5 +25,5 @@
 // options: -source 7 -Xlint:-options
 
 class MethodReferencesNotSupported {
-    S s = A#foo;
+    S s = A::foo;
 }
diff --git a/langtools/test/tools/javac/diags/examples/MissingReturnValueFragment.java b/langtools/test/tools/javac/diags/examples/MissingReturnValueFragment.java
new file mode 100644
index 00000000000..ad9358b1a83
--- /dev/null
+++ b/langtools/test/tools/javac/diags/examples/MissingReturnValueFragment.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.prob.found.req
+// key: compiler.misc.incompatible.ret.type.in.lambda
+// key: compiler.misc.missing.ret.val
+// options: -XDallowLambda
+
+class MissingReturnValueFragment {
+    interface SAM {
+        String m();
+    }
+
+    void test() {
+        SAM s = ()->{};
+    }
+}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Address.java b/langtools/test/tools/javac/diags/examples/NoAbstracts.java
similarity index 78%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Address.java
rename to langtools/test/tools/javac/diags/examples/NoAbstracts.java
index 506a0b8ba14..ab7af7f6e4c 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/Address.java
+++ b/langtools/test/tools/javac/diags/examples/NoAbstracts.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,15 +19,16 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm;
+// key: compiler.err.prob.found.req
+// key: compiler.misc.not.a.functional.intf.1
+// key: compiler.misc.no.abstracts
+// options: -XDallowLambda
 
-public abstract class Address extends Operand {
-   public boolean isAddress() {
-      return true;
-   }
+class NoAbstracts {
 
-   public abstract String toString();
+    interface SAM { }
+
+    SAM s = x-> { };
 }
diff --git a/langtools/test/tools/javac/diags/examples/NoArgs.java b/langtools/test/tools/javac/diags/examples/NoArgs.java
index 59c27950b78..6d2758215c6 100644
--- a/langtools/test/tools/javac/diags/examples/NoArgs.java
+++ b/langtools/test/tools/javac/diags/examples/NoArgs.java
@@ -22,7 +22,7 @@
  */
 
 // key: compiler.misc.no.args
-// key: compiler.err.cant.apply.symbol.1
+// key: compiler.err.cant.apply.symbol
 // key: compiler.misc.arg.length.mismatch
 // run: simple
 
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCNoopInstruction.java b/langtools/test/tools/javac/diags/examples/NoSuitableFunctionalIntfInst.java
similarity index 76%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCNoopInstruction.java
rename to langtools/test/tools/javac/diags/examples/NoSuitableFunctionalIntfInst.java
index f2c96861c48..fdc2f017d57 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCNoopInstruction.java
+++ b/langtools/test/tools/javac/diags/examples/NoSuitableFunctionalIntfInst.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,19 +19,17 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+// key: compiler.err.prob.found.req
+// key: compiler.misc.no.suitable.functional.intf.inst
+// options: -XDallowLambda
 
-import sun.jvm.hotspot.asm.*;
+class NoSuitableFunctionalIntfInst {
 
-public class SPARCNoopInstruction extends SPARCInstruction {
-    public SPARCNoopInstruction() {
-        super("nop");
+    interface SAM<X extends Number> {
+        void m(X x);
     }
 
-    public boolean isNoop() {
-        return true;
-    }
+    SAM<?> ss = (String s)-> { };
 }
diff --git a/langtools/test/tools/javac/diags/examples/NonStaticCantBeRefFragment.java b/langtools/test/tools/javac/diags/examples/NonStaticCantBeRefFragment.java
new file mode 100644
index 00000000000..d18f6c18300
--- /dev/null
+++ b/langtools/test/tools/javac/diags/examples/NonStaticCantBeRefFragment.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.err.prob.found.req
+// key: compiler.misc.non-static.cant.be.ref
+// key: compiler.misc.invalid.mref
+// options: -XDallowMethodReferences
+
+class NonStaticCantBeRefFragment {
+
+    interface SAM {
+        void m(Integer u);
+    }
+
+    void f(Integer i) { }
+
+    static void test() {
+        SAM s = NonStaticCantBeRefFragment::f;
+    }
+}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/BranchInstruction.java b/langtools/test/tools/javac/diags/examples/NotAFunctionalIntf.java
similarity index 77%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/BranchInstruction.java
rename to langtools/test/tools/javac/diags/examples/NotAFunctionalIntf.java
index 3a9c376f005..1135abff9c8 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/BranchInstruction.java
+++ b/langtools/test/tools/javac/diags/examples/NotAFunctionalIntf.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,12 +19,17 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm;
+// key: compiler.err.prob.found.req
+// key: compiler.misc.not.a.functional.intf
+// options: -XDallowLambda
 
-public interface BranchInstruction extends Instruction {
-   public boolean isConditional();
-   public Address getBranchDestination();
+class NotAFunctionalIntf {
+
+    abstract class SAM {
+        abstract <Z> void m();
+    }
+
+    SAM s = x-> { };
 }
diff --git a/langtools/test/tools/javac/diags/examples/NotApplicableMethodFound.java b/langtools/test/tools/javac/diags/examples/NotApplicableMethodFound.java
index f9f222b2c7f..c1e41ac2357 100644
--- a/langtools/test/tools/javac/diags/examples/NotApplicableMethodFound.java
+++ b/langtools/test/tools/javac/diags/examples/NotApplicableMethodFound.java
@@ -23,7 +23,7 @@
 
 // key: compiler.misc.not.applicable.method.found
 // key: compiler.note.verbose.resolve.multi.1
-// key: compiler.err.cant.apply.symbol.1
+// key: compiler.err.cant.apply.symbol
 // key: compiler.misc.no.conforming.assignment.exists
 // key: compiler.misc.inconvertible.types
 // options: -XDverboseResolution=inapplicable,failure
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCReturnInstruction.java b/langtools/test/tools/javac/diags/examples/NotDefAccessClassIntfCantAccessFragment.java
similarity index 63%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCReturnInstruction.java
rename to langtools/test/tools/javac/diags/examples/NotDefAccessClassIntfCantAccessFragment.java
index d3a810a1655..a138a48c1b7 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCReturnInstruction.java
+++ b/langtools/test/tools/javac/diags/examples/NotDefAccessClassIntfCantAccessFragment.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,28 +19,29 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+// key: compiler.err.prob.found.req
+// key: compiler.misc.not.def.access.class.intf.cant.access
+// key: compiler.misc.invalid.mref
+// options: -XDallowMethodReferences
 
-import sun.jvm.hotspot.asm.*;
+class NotDefAccessClassIntfCantAccessFragment {
 
-public class SPARCReturnInstruction extends SPARCJmplInstruction
-    implements ReturnInstruction {
-
-    private final boolean leaf;
-
-    public SPARCReturnInstruction(SPARCRegisterIndirectAddress addr, SPARCRegister rd, boolean leaf) {
-        super(leaf? "retl" : "ret", addr, rd);
-        this.leaf = leaf;
+    private class Private {
+        void m() { }
     }
 
-    public boolean isLeaf() {
-        return leaf;
+    Private getPrivate() { return new Private(); }
+}
+
+class NotDefAccessClassIntfCantAccessFragmentTest {
+
+    interface SAM {
+        void m();
     }
 
-    protected String getDescription() {
-        return getName();
+    static void test() {
+        SAM s = new NotDefAccessClassIntfCantAccessFragment().getPrivate()::m;
     }
 }
diff --git a/langtools/test/tools/javac/diags/examples/PotentialLambdaFound.java b/langtools/test/tools/javac/diags/examples/PotentialLambdaFound.java
new file mode 100644
index 00000000000..1512ee87ae6
--- /dev/null
+++ b/langtools/test/tools/javac/diags/examples/PotentialLambdaFound.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.note.potential.lambda.found
+// options: -XDallowLambda -XDidentifyLambdaCandidate=true
+
+class PotentialLambdaFound {
+
+    interface SAM {
+        void m();
+    }
+
+    SAM s = new SAM() { public void m() { } };
+}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86RegisterDirectAddress.java b/langtools/test/tools/javac/diags/examples/RefAmbiguousFragment.java
similarity index 70%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86RegisterDirectAddress.java
rename to langtools/test/tools/javac/diags/examples/RefAmbiguousFragment.java
index ba1ed44d7bc..be43f1d3f7d 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/x86/X86RegisterDirectAddress.java
+++ b/langtools/test/tools/javac/diags/examples/RefAmbiguousFragment.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,22 +19,23 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.x86;
+// key: compiler.err.prob.found.req
+// key: compiler.misc.ref.ambiguous
+// key: compiler.misc.invalid.mref
+// options: -XDallowMethodReferences
 
-import sun.jvm.hotspot.asm.Address;
-import sun.jvm.hotspot.asm.BaseIndexScaleDispAddress;
+class RefAmbiguousFragment {
 
-public class X86RegisterDirectAddress extends Address {
-    final private X86Register base;
-
-    public X86RegisterDirectAddress(X86Register base) {
-        this.base = base;
+    interface SAM {
+        void m(Integer i1, Integer i2);
     }
 
-    public String toString() {
-        return base.toString();
+    void f(Number n, Integer i) { }
+    void f(Integer i, Number n) { }
+
+    void test() {
+        SAM s = RefAmbiguousFragment::f;
     }
 }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/IndirectAddress.java b/langtools/test/tools/javac/diags/examples/UnexpectedLambda.java
similarity index 84%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/IndirectAddress.java
rename to langtools/test/tools/javac/diags/examples/UnexpectedLambda.java
index c0984131772..66eb5908d71 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/IndirectAddress.java
+++ b/langtools/test/tools/javac/diags/examples/UnexpectedLambda.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,10 +19,11 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm;
+// key: compiler.err.unexpected.lambda
+// options: -XDallowLambda
 
-public abstract class IndirectAddress extends Address {
+class UnexpectedLambda {
+    { (()-> { })++; }
 }
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/CallInstruction.java b/langtools/test/tools/javac/diags/examples/UnexpectedMref.java
similarity index 84%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/CallInstruction.java
rename to langtools/test/tools/javac/diags/examples/UnexpectedMref.java
index 01517c3d884..5f3cc2c6031 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/CallInstruction.java
+++ b/langtools/test/tools/javac/diags/examples/UnexpectedMref.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,10 +19,11 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm;
+// key: compiler.err.unexpected.mref
+// options: -XDallowMethodReferences
 
-public interface CallInstruction extends BranchInstruction {
+class UnexpectedLambda {
+    { (Foo::bar)++; }
 }
diff --git a/langtools/test/tools/javac/diags/examples/VarargsArgumentMismatch.java b/langtools/test/tools/javac/diags/examples/VarargsArgumentMismatch.java
index eae18c983b8..f9435d1a024 100644
--- a/langtools/test/tools/javac/diags/examples/VarargsArgumentMismatch.java
+++ b/langtools/test/tools/javac/diags/examples/VarargsArgumentMismatch.java
@@ -21,7 +21,7 @@
  * questions.
  */
 
-// key: compiler.err.cant.apply.symbol.1
+// key: compiler.err.cant.apply.symbol
 // key: compiler.misc.varargs.argument.mismatch
 // key: compiler.misc.inconvertible.types
 
diff --git a/langtools/test/tools/javac/diags/examples/VerboseResolveMulti1.java b/langtools/test/tools/javac/diags/examples/VerboseResolveMulti1.java
index 833c4cbcae1..99c90e24212 100644
--- a/langtools/test/tools/javac/diags/examples/VerboseResolveMulti1.java
+++ b/langtools/test/tools/javac/diags/examples/VerboseResolveMulti1.java
@@ -23,7 +23,7 @@
 
 // key: compiler.misc.not.applicable.method.found
 // key: compiler.note.verbose.resolve.multi.1
-// key: compiler.err.cant.apply.symbol.1
+// key: compiler.err.cant.apply.symbol
 // key: compiler.misc.no.conforming.assignment.exists
 // key: compiler.misc.inconvertible.types
 // options: -XDverboseResolution=inapplicable,failure
diff --git a/langtools/test/tools/javac/diags/examples/WhereCaptured.java b/langtools/test/tools/javac/diags/examples/WhereCaptured.java
index 6a0b1242dab..8f64ac919b0 100644
--- a/langtools/test/tools/javac/diags/examples/WhereCaptured.java
+++ b/langtools/test/tools/javac/diags/examples/WhereCaptured.java
@@ -25,7 +25,7 @@
 // key: compiler.misc.where.description.captured.1
 // key: compiler.misc.where.description.typevar
 // key: compiler.misc.where.typevar
-// key: compiler.err.cant.apply.symbol.1
+// key: compiler.err.cant.apply.symbol
 // key: compiler.misc.inferred.do.not.conform.to.eq.bounds
 // key: compiler.misc.captured.type
 // options: -XDdiags=where,simpleNames
diff --git a/langtools/test/tools/javac/diags/examples/WhereCaptured1.java b/langtools/test/tools/javac/diags/examples/WhereCaptured1.java
index df657311ac9..b069356e20b 100644
--- a/langtools/test/tools/javac/diags/examples/WhereCaptured1.java
+++ b/langtools/test/tools/javac/diags/examples/WhereCaptured1.java
@@ -25,7 +25,7 @@
 // key: compiler.misc.where.description.captured.1
 // key: compiler.misc.where.description.typevar
 // key: compiler.misc.where.typevar
-// key: compiler.err.cant.apply.symbol.1
+// key: compiler.err.cant.apply.symbol
 // key: compiler.misc.inferred.do.not.conform.to.eq.bounds
 // key: compiler.misc.captured.type
 // key: compiler.misc.type.null
diff --git a/langtools/test/tools/javac/diags/examples/WhereTypeVar.java b/langtools/test/tools/javac/diags/examples/WhereTypeVar.java
index ad7d494991a..f8091652597 100644
--- a/langtools/test/tools/javac/diags/examples/WhereTypeVar.java
+++ b/langtools/test/tools/javac/diags/examples/WhereTypeVar.java
@@ -24,7 +24,7 @@
 // key: compiler.misc.where.typevar
 // key: compiler.misc.where.description.typevar.1
 // key: compiler.misc.type.var
-// key: compiler.err.cant.apply.symbol.1
+// key: compiler.err.cant.apply.symbol
 // key: compiler.misc.no.conforming.assignment.exists
 // key: compiler.misc.inconvertible.types
 // options: -XDdiags=where,disambiguateTvars
diff --git a/langtools/test/tools/javac/failover/CheckAttributedTree.java b/langtools/test/tools/javac/failover/CheckAttributedTree.java
index d5d1bb094b2..5dbc86d003a 100644
--- a/langtools/test/tools/javac/failover/CheckAttributedTree.java
+++ b/langtools/test/tools/javac/failover/CheckAttributedTree.java
@@ -376,7 +376,7 @@ public class CheckAttributedTree {
                     that.hasTag(CLASSDEF);
         }
 
-        private final List<String> excludedFields = Arrays.asList("varargsElement");
+        private final List<String> excludedFields = Arrays.asList("varargsElement", "targetType");
 
         void check(boolean ok, String label, Info self) {
             if (!ok) {
diff --git a/langtools/test/tools/javac/generics/7015430/T7015430.out b/langtools/test/tools/javac/generics/7015430/T7015430.out
index 109bfe7da7f..269d4840baf 100644
--- a/langtools/test/tools/javac/generics/7015430/T7015430.out
+++ b/langtools/test/tools/javac/generics/7015430/T7015430.out
@@ -1,14 +1,14 @@
-T7015430.java:41:15: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<java.lang.Exception>
+T7015430.java:41:15: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<E>
 T7015430.java:41:14: compiler.warn.unchecked.meth.invocation.applied: kindname.method, empty, java.lang.Iterable<E>, java.lang.Iterable, kindname.class, T7015430
 T7015430.java:50:42: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<java.lang.RuntimeException>
 T7015430.java:50:41: compiler.warn.unchecked.meth.invocation.applied: kindname.method, empty, java.lang.Iterable<E>, java.lang.Iterable, kindname.class, T7015430
-T7015430.java:68:22: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<java.lang.Exception>
+T7015430.java:68:22: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<E>
 T7015430.java:68:9: compiler.warn.unchecked.meth.invocation.applied: kindname.constructor, <init>, java.lang.Iterable<E>, java.lang.Iterable, kindname.class, T7015430
 T7015430.java:77:40: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<java.lang.RuntimeException>
 T7015430.java:77:9: compiler.warn.unchecked.meth.invocation.applied: kindname.constructor, <init>, java.lang.Iterable<E>, java.lang.Iterable, kindname.class, T7015430
 T7015430.java:104:41: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<java.lang.RuntimeException>
 T7015430.java:104:9: compiler.warn.unchecked.meth.invocation.applied: kindname.constructor, <init>, java.lang.Iterable<E>, java.lang.Iterable, kindname.class, T7015430
-T7015430.java:113:22: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<java.lang.Exception>
+T7015430.java:113:22: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.lang.Iterable, java.lang.Iterable<E>
 T7015430.java:113:9: compiler.warn.unchecked.meth.invocation.applied: kindname.constructor, <init>, java.lang.Iterable<E>, java.lang.Iterable, kindname.class, T7015430
 T7015430.java:41:14: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Exception
 T7015430.java:68:9: compiler.err.unreported.exception.need.to.catch.or.throw: java.lang.Exception
diff --git a/langtools/test/tools/javac/generics/7034511/T7034511a.out b/langtools/test/tools/javac/generics/7034511/T7034511a.out
index 8636950aa7d..e05cd632368 100644
--- a/langtools/test/tools/javac/generics/7034511/T7034511a.out
+++ b/langtools/test/tools/javac/generics/7034511/T7034511a.out
@@ -1,2 +1,2 @@
-T7034511a.java:18:14: compiler.err.cant.apply.symbol.1: kindname.method, foo, compiler.misc.type.captureof: 1, ?[], java.lang.String[], kindname.interface, T7034511a.A<T>, (compiler.misc.no.conforming.assignment.exists: java.lang.String[], compiler.misc.type.captureof: 1, ?[])
+T7034511a.java:18:14: compiler.err.cant.apply.symbol: kindname.method, foo, compiler.misc.type.captureof: 1, ?[], java.lang.String[], kindname.interface, T7034511a.A<T>, (compiler.misc.no.conforming.assignment.exists: java.lang.String[], compiler.misc.type.captureof: 1, ?[])
 1 error
diff --git a/langtools/test/tools/javac/generics/7034511/T7034511b.out b/langtools/test/tools/javac/generics/7034511/T7034511b.out
index 5d3da3f4c03..8d0d9335b10 100644
--- a/langtools/test/tools/javac/generics/7034511/T7034511b.out
+++ b/langtools/test/tools/javac/generics/7034511/T7034511b.out
@@ -1,2 +1,2 @@
-T7034511b.java:14:11: compiler.err.cant.apply.symbol.1: kindname.method, toArray, compiler.misc.type.captureof: 1, ?[], java.lang.Object[], kindname.class, T7034511b.MyList<E>, (compiler.misc.no.conforming.assignment.exists: java.lang.Object[], compiler.misc.type.captureof: 1, ?[])
+T7034511b.java:14:11: compiler.err.cant.apply.symbol: kindname.method, toArray, compiler.misc.type.captureof: 1, ?[], java.lang.Object[], kindname.class, T7034511b.MyList<E>, (compiler.misc.no.conforming.assignment.exists: java.lang.Object[], compiler.misc.type.captureof: 1, ?[])
 1 error
diff --git a/langtools/test/tools/javac/generics/7151802/T7151802.out b/langtools/test/tools/javac/generics/7151802/T7151802.out
index 94f82828b91..e2ff30b4c71 100644
--- a/langtools/test/tools/javac/generics/7151802/T7151802.out
+++ b/langtools/test/tools/javac/generics/7151802/T7151802.out
@@ -1,5 +1,5 @@
 T7151802.java:14:31: compiler.warn.unchecked.meth.invocation.applied: kindname.method, get1, Z, T7151802.Foo, kindname.class, T7151802
-T7151802.java:22:31: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), T7151802.Foo, T7151802.Foo<java.lang.Object>
+T7151802.java:22:31: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), T7151802.Foo, T7151802.Foo<Z>
 T7151802.java:22:30: compiler.warn.unchecked.meth.invocation.applied: kindname.method, get3, T7151802.Foo<Z>, T7151802.Foo, kindname.class, T7151802
 T7151802.java:30:36: compiler.warn.unchecked.meth.invocation.applied: kindname.method, get5, compiler.misc.no.args, compiler.misc.no.args, kindname.class, T7151802
 T7151802.java:38:32: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), T7151802.Foo, T7151802.Foo<java.lang.String>
diff --git a/langtools/test/tools/javac/generics/diamond/7002837/T7002837.java b/langtools/test/tools/javac/generics/diamond/7002837/T7002837.java
index 4a930050c4b..acdb72bb02e 100644
--- a/langtools/test/tools/javac/generics/diamond/7002837/T7002837.java
+++ b/langtools/test/tools/javac/generics/diamond/7002837/T7002837.java
@@ -4,7 +4,7 @@
  *
  * @summary  Diamond: javac generates diamond inference errors when in 'finder' mode
  * @author mcimadamore
- * @compile -Werror -XDfindDiamond T7002837.java
+ * @compile/fail/ref=T7002837.out -Werror -XDrawDiagnostics -XDfindDiamond T7002837.java
  *
  */
 
diff --git a/langtools/test/tools/javac/generics/diamond/7002837/T7002837.out b/langtools/test/tools/javac/generics/diamond/7002837/T7002837.out
new file mode 100644
index 00000000000..fbd134dfed7
--- /dev/null
+++ b/langtools/test/tools/javac/generics/diamond/7002837/T7002837.out
@@ -0,0 +1,4 @@
+T7002837.java:13:19: compiler.warn.diamond.redundant.args.1: T7002837<java.lang.Integer>, T7002837<java.lang.Object&java.io.Serializable&java.lang.Comparable<?>>
+- compiler.err.warnings.and.werror
+1 error
+1 warning
diff --git a/langtools/test/tools/javac/generics/diamond/7188968/T7188968.java b/langtools/test/tools/javac/generics/diamond/7188968/T7188968.java
new file mode 100644
index 00000000000..f50bb1a1d09
--- /dev/null
+++ b/langtools/test/tools/javac/generics/diamond/7188968/T7188968.java
@@ -0,0 +1,25 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 7188968
+ *
+ * @summary  Diamond: javac generates diamond inference errors when in 'finder' mode
+ * @author mcimadamore
+ * @compile/fail/ref=T7188968.out -Xlint:unchecked -XDrawDiagnostics T7188968.java
+ *
+ */
+import java.util.List;
+
+class T7188968 {
+
+    static class Foo<X> {
+        Foo(List<X> ls, Object o) { }
+        static <Z> Foo<Z> makeFoo(List<Z> lz, Object o) { return null; }
+    }
+
+    void test(List l) {
+        new Foo(l, unknown);
+        new Foo(l, unknown) { };
+        new Foo<>(l, unknown);
+        Foo.makeFoo(l, unknown);
+    }
+}
diff --git a/langtools/test/tools/javac/generics/diamond/7188968/T7188968.out b/langtools/test/tools/javac/generics/diamond/7188968/T7188968.out
new file mode 100644
index 00000000000..83b7b8b671d
--- /dev/null
+++ b/langtools/test/tools/javac/generics/diamond/7188968/T7188968.out
@@ -0,0 +1,7 @@
+T7188968.java:20:20: compiler.err.cant.resolve.location: kindname.variable, unknown, , , (compiler.misc.location: kindname.class, T7188968, null)
+T7188968.java:21:20: compiler.err.cant.resolve.location: kindname.variable, unknown, , , (compiler.misc.location: kindname.class, T7188968, null)
+T7188968.java:21:29: compiler.warn.unchecked.call.mbr.of.raw.type: T7188968.Foo(java.util.List<X>,java.lang.Object), T7188968.Foo
+T7188968.java:22:22: compiler.err.cant.resolve.location: kindname.variable, unknown, , , (compiler.misc.location: kindname.class, T7188968, null)
+T7188968.java:23:24: compiler.err.cant.resolve.location: kindname.variable, unknown, , , (compiler.misc.location: kindname.class, T7188968, null)
+4 errors
+1 warning
diff --git a/langtools/test/tools/javac/generics/inference/6611449/T6611449.out b/langtools/test/tools/javac/generics/inference/6611449/T6611449.out
index fd029c4d4f7..8e8b81cd9a2 100644
--- a/langtools/test/tools/javac/generics/inference/6611449/T6611449.out
+++ b/langtools/test/tools/javac/generics/inference/6611449/T6611449.out
@@ -1,5 +1,5 @@
 T6611449.java:18:9: compiler.err.cant.apply.symbols: kindname.constructor, T6611449, int,{(compiler.misc.inapplicable.method: kindname.constructor, T6611449, <T>T6611449(T,T), (compiler.misc.infer.arg.length.mismatch: T)),(compiler.misc.inapplicable.method: kindname.constructor, T6611449, <T>T6611449(T), (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Integer, S))}
 T6611449.java:19:9: compiler.err.cant.apply.symbols: kindname.constructor, T6611449, int,int,{(compiler.misc.inapplicable.method: kindname.constructor, T6611449, <T>T6611449(T,T), (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Integer, S)),(compiler.misc.inapplicable.method: kindname.constructor, T6611449, <T>T6611449(T), (compiler.misc.infer.arg.length.mismatch: T))}
-T6611449.java:20:9: compiler.err.cant.apply.symbol.1: kindname.method, m1, T, int, kindname.class, T6611449<S>, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Integer, S)
-T6611449.java:21:9: compiler.err.cant.apply.symbol.1: kindname.method, m2, T,T, int,int, kindname.class, T6611449<S>, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Integer, S)
+T6611449.java:20:9: compiler.err.cant.apply.symbol: kindname.method, m1, T, int, kindname.class, T6611449<S>, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Integer, S)
+T6611449.java:21:9: compiler.err.cant.apply.symbol: kindname.method, m2, T,T, int,int, kindname.class, T6611449<S>, (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.lang.Integer, S)
 4 errors
diff --git a/langtools/test/tools/javac/generics/inference/6638712/T6638712a.out b/langtools/test/tools/javac/generics/inference/6638712/T6638712a.out
index 33782dcfb30..ba745eb7323 100644
--- a/langtools/test/tools/javac/generics/inference/6638712/T6638712a.out
+++ b/langtools/test/tools/javac/generics/inference/6638712/T6638712a.out
@@ -1,2 +1,2 @@
-T6638712a.java:16:33: compiler.err.cant.apply.symbol.1: kindname.method, compound, java.lang.Iterable<? extends java.util.Comparator<? super T>>, java.util.List<java.util.Comparator<?>>, kindname.class, T6638712a, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.util.List<java.util.Comparator<?>>, java.lang.Iterable<? extends java.util.Comparator<? super T>>))
+T6638712a.java:16:33: compiler.err.cant.apply.symbol: kindname.method, compound, java.lang.Iterable<? extends java.util.Comparator<? super T>>, java.util.List<java.util.Comparator<?>>, kindname.class, T6638712a, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.util.List<java.util.Comparator<?>>, java.lang.Iterable<? extends java.util.Comparator<? super T>>))
 1 error
diff --git a/langtools/test/tools/javac/generics/inference/6638712/T6638712c.out b/langtools/test/tools/javac/generics/inference/6638712/T6638712c.out
index 9ea180cbd7b..9d67519a6b4 100644
--- a/langtools/test/tools/javac/generics/inference/6638712/T6638712c.out
+++ b/langtools/test/tools/javac/generics/inference/6638712/T6638712c.out
@@ -1,2 +1,2 @@
-T6638712c.java:16:9: compiler.err.cant.apply.symbol.1: kindname.method, sort, T[],java.util.Comparator<? super T>, java.lang.Enum[],java.util.Comparator<java.lang.Enum<?>>, kindname.class, T6638712c, (compiler.misc.no.conforming.assignment.exists: (compiler.misc.inconvertible.types: java.util.Comparator<java.lang.Enum<?>>, java.util.Comparator<? super java.lang.Enum>))
+T6638712c.java:16:9: compiler.err.cant.apply.symbol: kindname.method, sort, T[],java.util.Comparator<? super T>, java.lang.Enum[],java.util.Comparator<java.lang.Enum<?>>, kindname.class, T6638712c, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.util.Comparator<java.lang.Enum<?>>, java.util.Comparator<? super java.lang.Enum>))
 1 error
diff --git a/langtools/test/tools/javac/generics/inference/6638712/T6638712d.out b/langtools/test/tools/javac/generics/inference/6638712/T6638712d.out
index 709aee5894b..a3ec358fc2e 100644
--- a/langtools/test/tools/javac/generics/inference/6638712/T6638712d.out
+++ b/langtools/test/tools/javac/generics/inference/6638712/T6638712d.out
@@ -1,2 +1,2 @@
-T6638712d.java:16:9: compiler.err.cant.apply.symbol.1: kindname.method, m, U,java.util.List<java.util.List<U>>, int,java.util.List<java.util.List<java.lang.String>>, kindname.class, T6638712d, (compiler.misc.inferred.do.not.conform.to.lower.bounds: java.lang.String, java.lang.Integer)
+T6638712d.java:16:9: compiler.err.cant.apply.symbol: kindname.method, m, U,java.util.List<java.util.List<U>>, int,java.util.List<java.util.List<java.lang.String>>, kindname.class, T6638712d, (compiler.misc.inferred.do.not.conform.to.lower.bounds: java.lang.String, java.lang.Integer)
 1 error
diff --git a/langtools/test/tools/javac/generics/inference/6838943/T6838943.out b/langtools/test/tools/javac/generics/inference/6838943/T6838943.out
index f3c43fcd664..d2cd71877d5 100644
--- a/langtools/test/tools/javac/generics/inference/6838943/T6838943.out
+++ b/langtools/test/tools/javac/generics/inference/6838943/T6838943.out
@@ -1,2 +1,2 @@
-T6838943.java:13:14: compiler.err.cant.apply.symbol.1: kindname.method, m, T6838943.A<Z>,Z, T6838943.A<T6838943.B>,T6838943.B, kindname.class, T6838943.C<X>, (compiler.misc.infer.no.conforming.assignment.exists: Z, (compiler.misc.inconvertible.types: T6838943.A<T6838943.B>, T6838943.A<Z>))
+T6838943.java:13:14: compiler.err.cant.apply.symbol: kindname.method, m, T6838943.A<Z>,Z, T6838943.A<T6838943.B>,T6838943.B, kindname.class, T6838943.C<X>, (compiler.misc.infer.no.conforming.assignment.exists: Z, (compiler.misc.inconvertible.types: T6838943.A<T6838943.B>, T6838943.A<Z>))
 1 error
diff --git a/langtools/test/tools/javac/generics/inference/7086586/T7086586.out b/langtools/test/tools/javac/generics/inference/7086586/T7086586.out
index 20270529899..25e696c076a 100644
--- a/langtools/test/tools/javac/generics/inference/7086586/T7086586.out
+++ b/langtools/test/tools/javac/generics/inference/7086586/T7086586.out
@@ -1,5 +1,5 @@
-T7086586.java:14:20: compiler.err.cant.apply.symbol.1: kindname.method, m, java.util.List<? super T>, java.util.List<compiler.misc.type.captureof: 1, ?>, kindname.class, T7086586, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.util.List<compiler.misc.type.captureof: 1, ?>, java.util.List<? super T>))
-T7086586.java:15:20: compiler.err.cant.apply.symbol.1: kindname.method, m, java.util.List<? super T>, java.util.List<compiler.misc.type.captureof: 1, ?>, kindname.class, T7086586, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.util.List<compiler.misc.type.captureof: 1, ?>, java.util.List<? super T>))
-T7086586.java:16:23: compiler.err.cant.apply.symbol.1: kindname.method, m, java.util.List<? super T>, java.util.List<compiler.misc.type.captureof: 1, ?>, kindname.class, T7086586, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.util.List<compiler.misc.type.captureof: 1, ?>, java.util.List<? super T>))
-T7086586.java:17:9: compiler.err.cant.apply.symbol.1: kindname.method, m, java.util.List<? super T>, java.util.List<compiler.misc.type.captureof: 1, ?>, kindname.class, T7086586, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.util.List<compiler.misc.type.captureof: 1, ?>, java.util.List<? super T>))
+T7086586.java:14:20: compiler.err.cant.apply.symbol: kindname.method, m, java.util.List<? super T>, java.util.List<compiler.misc.type.captureof: 1, ?>, kindname.class, T7086586, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.util.List<compiler.misc.type.captureof: 1, ?>, java.util.List<? super T>))
+T7086586.java:15:20: compiler.err.cant.apply.symbol: kindname.method, m, java.util.List<? super T>, java.util.List<compiler.misc.type.captureof: 1, ?>, kindname.class, T7086586, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.util.List<compiler.misc.type.captureof: 1, ?>, java.util.List<? super T>))
+T7086586.java:16:23: compiler.err.cant.apply.symbol: kindname.method, m, java.util.List<? super T>, java.util.List<compiler.misc.type.captureof: 1, ?>, kindname.class, T7086586, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.util.List<compiler.misc.type.captureof: 1, ?>, java.util.List<? super T>))
+T7086586.java:17:9: compiler.err.cant.apply.symbol: kindname.method, m, java.util.List<? super T>, java.util.List<compiler.misc.type.captureof: 1, ?>, kindname.class, T7086586, (compiler.misc.infer.no.conforming.assignment.exists: T, (compiler.misc.inconvertible.types: java.util.List<compiler.misc.type.captureof: 1, ?>, java.util.List<? super T>))
 4 errors
diff --git a/langtools/test/tools/javac/generics/inference/7177306/T7177306a.java b/langtools/test/tools/javac/generics/inference/7177306/T7177306a.java
new file mode 100644
index 00000000000..1e903e4b61e
--- /dev/null
+++ b/langtools/test/tools/javac/generics/inference/7177306/T7177306a.java
@@ -0,0 +1,19 @@
+/**
+ * @test /nodynamiccopyright/
+ * @bug 7177306
+ * @summary Regression: unchecked method call does not erase return type
+ * @compile/fail/ref=T7177306a.out -Werror -Xlint:unchecked -XDrawDiagnostics T7177306a.java
+ */
+
+import java.util.List;
+
+class T7177306a<A> {
+
+    public static void test(List l) {
+        T7177306a<Object> to = m(l);
+    }
+
+    public static <E> T7177306a<String> m(List<E> le) {
+        return null;
+    }
+}
diff --git a/langtools/test/tools/javac/generics/inference/7177306/T7177306a.out b/langtools/test/tools/javac/generics/inference/7177306/T7177306a.out
new file mode 100644
index 00000000000..178a1d5c9d3
--- /dev/null
+++ b/langtools/test/tools/javac/generics/inference/7177306/T7177306a.out
@@ -0,0 +1,6 @@
+T7177306a.java:13:34: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), java.util.List, java.util.List<E>
+T7177306a.java:13:33: compiler.warn.unchecked.meth.invocation.applied: kindname.method, m, java.util.List<E>, java.util.List, kindname.class, T7177306a
+T7177306a.java:13:33: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), T7177306a, T7177306a<java.lang.Object>
+- compiler.err.warnings.and.werror
+1 error
+3 warnings
diff --git a/langtools/test/tools/javac/generics/inference/7177306/T7177306b.java b/langtools/test/tools/javac/generics/inference/7177306/T7177306b.java
new file mode 100644
index 00000000000..97953fe718c
--- /dev/null
+++ b/langtools/test/tools/javac/generics/inference/7177306/T7177306b.java
@@ -0,0 +1,18 @@
+/**
+ * @test /nodynamiccopyright/
+ * @bug 7177306
+ * @summary Regression: unchecked method call does not erase return type
+ * @compile/fail/ref=T7177306b.out -Werror -Xlint:unchecked -XDrawDiagnostics T7177306b.java
+ */
+
+import java.util.List;
+
+class T7177306b {
+
+    <T, S extends List<T>> List<T> m(List<? super T> arg1, S arg2, Class<Object> arg3) { return arg2; }
+
+    void test(List<Integer> li, List<String> ls, Class c) {
+        m(li, ls, c);
+        // should fail, because of bounds T <: Integer, S :> List<String>
+    }
+}
diff --git a/langtools/test/tools/javac/generics/inference/7177306/T7177306b.out b/langtools/test/tools/javac/generics/inference/7177306/T7177306b.out
new file mode 100644
index 00000000000..d0d5a0c373f
--- /dev/null
+++ b/langtools/test/tools/javac/generics/inference/7177306/T7177306b.out
@@ -0,0 +1,2 @@
+T7177306b.java:15:9: compiler.err.cant.apply.symbol: kindname.method, m, java.util.List<? super T>,S,java.lang.Class<java.lang.Object>, java.util.List<java.lang.Integer>,java.util.List<java.lang.String>,java.lang.Class, kindname.class, T7177306b, (compiler.misc.incompatible.eq.upper.bounds: T, java.lang.String, java.lang.Integer,java.lang.Object)
+1 error
diff --git a/langtools/test/tools/javac/generics/inference/7177306/T7177306c.java b/langtools/test/tools/javac/generics/inference/7177306/T7177306c.java
new file mode 100644
index 00000000000..33482446437
--- /dev/null
+++ b/langtools/test/tools/javac/generics/inference/7177306/T7177306c.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7177306
+ * @summary Regression: unchecked method call does not erase return type
+ */
+public class T7177306c {
+
+    static <T> T m(T t) { return (T)"Null"; }
+
+    public static void main(String[] args) {
+        if (m("NonNullConst") != "Null") {
+            throw new AssertionError("should not get there!");
+        }
+    }
+}
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCTrapInstruction.java b/langtools/test/tools/javac/generics/inference/7177306/T7177306d.java
similarity index 56%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCTrapInstruction.java
rename to langtools/test/tools/javac/generics/inference/7177306/T7177306d.java
index 224e937ee87..0f28e8abb5a 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCTrapInstruction.java
+++ b/langtools/test/tools/javac/generics/inference/7177306/T7177306d.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,35 +19,35 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+/*
+ * @test
+ * @bug 7177306
+ * @summary Regression: unchecked method call does not erase return type
+ */
+import java.util.List;
 
-import sun.jvm.hotspot.asm.*;
+public class T7177306d {
 
-public class SPARCTrapInstruction extends SPARCInstruction
-    implements BranchInstruction {
-    final protected int conditionCode;
+    static int assertionCount = 0;
 
-    public SPARCTrapInstruction(String name, int conditionCode) {
-        super(name);
-        this.conditionCode = conditionCode;
+    static void assertTrue(boolean cond) {
+        if (!cond) {
+            throw new AssertionError();
+        }
+        assertionCount++;
     }
 
-    public Address getBranchDestination() {
-        return null;
+    static <T, S extends List<T>> void m(List<? super T> arg1, S arg2, Class<Object> arg3) { assertTrue(false); }
+    static void m(Object o1, Object o2, Object o3) { assertTrue(true); }
+
+    static void test(List<Integer> li, List<String> ls, Class c) {
+        m(li, ls, c);
     }
 
-    public int getConditionCode() {
-        return conditionCode;
-    }
-
-    public boolean isConditional() {
-        return conditionCode != CONDITION_TN && conditionCode != CONDITION_TA;
-    }
-
-    public boolean isTrap() {
-        return true;
+    public static void main(String[] args) {
+        test(null, null, null);
+        assertTrue(assertionCount == 1);
     }
 }
diff --git a/langtools/test/tools/javac/generics/inference/7177306/T7177306e.java b/langtools/test/tools/javac/generics/inference/7177306/T7177306e.java
new file mode 100644
index 00000000000..4c8c7f298f7
--- /dev/null
+++ b/langtools/test/tools/javac/generics/inference/7177306/T7177306e.java
@@ -0,0 +1,17 @@
+/**
+ * @test /nodynamiccopyright/
+ * @bug 7177306
+ * @summary Regression: unchecked method call does not erase return type
+ * @compile/fail/ref=T7177306e.out -XDrawDiagnostics T7177306e.java
+ */
+
+import java.util.List;
+
+class T7177306e {
+
+    <Z, U extends List<Z>> void m(List<U> lu) { }
+
+    void test(List<List<?>> llw) {
+       m(llw);
+    }
+}
diff --git a/langtools/test/tools/javac/generics/inference/7177306/T7177306e.out b/langtools/test/tools/javac/generics/inference/7177306/T7177306e.out
new file mode 100644
index 00000000000..63e4cb6ad5e
--- /dev/null
+++ b/langtools/test/tools/javac/generics/inference/7177306/T7177306e.out
@@ -0,0 +1,2 @@
+T7177306e.java:15:9: compiler.err.prob.found.req: (compiler.misc.inferred.do.not.conform.to.upper.bounds: java.util.List<?>, java.util.List<compiler.misc.type.captureof: 1, ?>)
+1 error
diff --git a/langtools/test/tools/javac/lambda/MethodReferenceParserTest.java b/langtools/test/tools/javac/lambda/MethodReferenceParserTest.java
index a5af9622f9f..1c9980d44c9 100644
--- a/langtools/test/tools/javac/lambda/MethodReferenceParserTest.java
+++ b/langtools/test/tools/javac/lambda/MethodReferenceParserTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,14 +42,14 @@ public class MethodReferenceParserTest {
     static int checkCount = 0;
 
     enum ReferenceKind {
-        METHOD_REF("#Q##Gm"),
-        CONSTRUCTOR_REF("#Q##Gnew"),
+        METHOD_REF("#Q::#Gm"),
+        CONSTRUCTOR_REF("#Q::#Gnew"),
         FALSE_REF("min < max"),
-        ERR_SUPER("#Q##Gsuper"),
-        ERR_METH0("#Q##Gm()"),
-        ERR_METH1("#Q##Gm(X)"),
-        ERR_CONSTR0("#Q##Gnew()"),
-        ERR_CONSTR1("#Q##Gnew(X)");
+        ERR_SUPER("#Q::#Gsuper"),
+        ERR_METH0("#Q::#Gm()"),
+        ERR_METH1("#Q::#Gm(X)"),
+        ERR_CONSTR0("#Q::#Gnew()"),
+        ERR_CONSTR1("#Q::#Gnew(X)");
 
         String referenceTemplate;
 
@@ -110,6 +110,8 @@ public class MethodReferenceParserTest {
         METHOD("m()"),
         FIELD("a.f"),
         UBOUND_SIMPLE("A"),
+        UNBOUND_ARRAY1("int[]"),
+        UNBOUND_ARRAY2("A<G>[][]"),
         UNBOUND_GENERIC1("A<X>"),
         UNBOUND_GENERIC2("A<X, Y>"),
         UNBOUND_GENERIC3("A<? extends X, ? super Y>"),
@@ -125,7 +127,7 @@ public class MethodReferenceParserTest {
     }
 
     enum ExprKind {
-        NONE("#R#S"),
+        NONE("#R::S"),
         SINGLE_PAREN1("(#R#S)"),
         SINGLE_PAREN2("(#R)#S"),
         DOUBLE_PAREN1("((#R#S))"),
diff --git a/langtools/test/tools/javac/lambda/TestInvokeDynamic.java b/langtools/test/tools/javac/lambda/TestInvokeDynamic.java
new file mode 100644
index 00000000000..d74adefbce7
--- /dev/null
+++ b/langtools/test/tools/javac/lambda/TestInvokeDynamic.java
@@ -0,0 +1,442 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7194586
+ *
+ * @summary Add back-end support for invokedynamic
+ *
+ */
+
+import com.sun.source.tree.MethodInvocationTree;
+import com.sun.source.tree.MethodTree;
+import com.sun.source.util.TaskEvent;
+import com.sun.source.util.TaskListener;
+import com.sun.source.util.TreeScanner;
+
+import com.sun.tools.classfile.Attribute;
+import com.sun.tools.classfile.BootstrapMethods_attribute;
+import com.sun.tools.classfile.ClassFile;
+import com.sun.tools.classfile.Code_attribute;
+import com.sun.tools.classfile.ConstantPool.*;
+import com.sun.tools.classfile.Instruction;
+import com.sun.tools.classfile.Method;
+
+import com.sun.tools.javac.api.JavacTaskImpl;
+import com.sun.tools.javac.api.JavacTool;
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.code.Symbol.MethodSymbol;
+import com.sun.tools.javac.code.Symtab;
+import com.sun.tools.javac.jvm.Pool;
+import com.sun.tools.javac.tree.JCTree.JCMethodInvocation;
+import com.sun.tools.javac.tree.JCTree.JCMethodDecl;
+import com.sun.tools.javac.tree.JCTree.JCIdent;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.Names;
+
+import java.io.File;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Locale;
+
+import javax.tools.Diagnostic;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+import static com.sun.tools.javac.jvm.ClassFile.*;
+
+public class TestInvokeDynamic {
+
+    static int checkCount = 0;
+
+    enum StaticArgumentKind {
+        STRING("Hello!", "String", "Ljava/lang/String;") {
+            @Override
+            boolean check(CPInfo cpInfo) throws Exception {
+                return (cpInfo instanceof CONSTANT_String_info) &&
+                        ((CONSTANT_String_info)cpInfo).getString().equals(value);
+            }
+        },
+        CLASS(null, "Class<?>", "Ljava/lang/Class;") {
+            @Override
+            boolean check(CPInfo cpInfo) throws Exception {
+                return (cpInfo instanceof CONSTANT_Class_info) &&
+                        ((CONSTANT_Class_info)cpInfo).getName().equals("java/lang/String");
+            }
+        },
+        INTEGER(1, "int", "I") {
+            @Override
+            boolean check(CPInfo cpInfo) throws Exception {
+                return (cpInfo instanceof CONSTANT_Integer_info) &&
+                        ((CONSTANT_Integer_info)cpInfo).value == ((Integer)value).intValue();
+            }
+        },
+        LONG(1L, "long", "J") {
+            @Override
+            boolean check(CPInfo cpInfo) throws Exception {
+                return (cpInfo instanceof CONSTANT_Long_info) &&
+                        ((CONSTANT_Long_info)cpInfo).value == ((Long)value).longValue();
+            }
+        },
+        FLOAT(1.0f, "float", "F") {
+            @Override
+            boolean check(CPInfo cpInfo) throws Exception {
+                return (cpInfo instanceof CONSTANT_Float_info) &&
+                        ((CONSTANT_Float_info)cpInfo).value == ((Float)value).floatValue();
+            }
+        },
+        DOUBLE(1.0, "double","D") {
+            @Override
+            boolean check(CPInfo cpInfo) throws Exception {
+                return (cpInfo instanceof CONSTANT_Double_info) &&
+                        ((CONSTANT_Double_info)cpInfo).value == ((Double)value).doubleValue();
+            }
+        },
+        METHOD_HANDLE(null, "MethodHandle", "Ljava/lang/invoke/MethodHandle;") {
+            @Override
+            boolean check(CPInfo cpInfo) throws Exception {
+                if (!(cpInfo instanceof CONSTANT_MethodHandle_info)) return false;
+                CONSTANT_MethodHandle_info handleInfo = (CONSTANT_MethodHandle_info)cpInfo;
+                return handleInfo.getCPRefInfo().getClassName().equals("Array") &&
+                        handleInfo.reference_kind == RefKind.REF_invokeVirtual &&
+                        handleInfo.getCPRefInfo().getNameAndTypeInfo().getName().equals("clone") &&
+                        handleInfo.getCPRefInfo().getNameAndTypeInfo().getType().equals("()Ljava/lang/Object;");
+            }
+        },
+        METHOD_TYPE(null, "MethodType", "Ljava/lang/invoke/MethodType;") {
+            @Override
+            boolean check(CPInfo cpInfo) throws Exception {
+                return (cpInfo instanceof CONSTANT_MethodType_info) &&
+                        ((CONSTANT_MethodType_info)cpInfo).getType().equals("()Ljava/lang/Object;");
+            }
+        };
+
+        Object value;
+        String sourceTypeStr;
+        String bytecodeTypeStr;
+
+        StaticArgumentKind(Object value, String sourceTypeStr, String bytecodeTypeStr) {
+            this.value = value;
+            this.sourceTypeStr = sourceTypeStr;
+            this.bytecodeTypeStr = bytecodeTypeStr;
+        }
+
+        abstract boolean check(CPInfo cpInfo) throws Exception;
+
+        Object getValue(Symtab syms, Names names) {
+            switch (this) {
+                case STRING:
+                case INTEGER:
+                case LONG:
+                case FLOAT:
+                case DOUBLE:
+                    return value;
+                case CLASS:
+                    return syms.stringType.tsym;
+                case METHOD_HANDLE:
+                    return new Pool.MethodHandle(REF_invokeVirtual, syms.arrayCloneMethod);
+                case METHOD_TYPE:
+                    return syms.arrayCloneMethod.type;
+                default:
+                    throw new AssertionError();
+            }
+        }
+    }
+
+    enum StaticArgumentsArity {
+        ZERO(0),
+        ONE(1),
+        TWO(2),
+        THREE(3);
+
+        int arity;
+
+        StaticArgumentsArity(int arity) {
+            this.arity = arity;
+        }
+    }
+
+    public static void main(String... args) throws Exception {
+        // Create a single file manager and compiler and reuse it for each compile to save time.
+        StandardJavaFileManager fm = JavacTool.create().getStandardFileManager(null, null, null);
+        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
+        for (StaticArgumentsArity arity : StaticArgumentsArity.values()) {
+            if (arity.arity == 0) {
+                new TestInvokeDynamic(arity).compileAndCheck(fm, tool);
+            } else {
+                for (StaticArgumentKind sak1 : StaticArgumentKind.values()) {
+                    if (arity.arity == 1) {
+                        new TestInvokeDynamic(arity, sak1).compileAndCheck(fm, tool);
+                    } else {
+                        for (StaticArgumentKind sak2 : StaticArgumentKind.values()) {
+                            if (arity.arity == 2) {
+                                new TestInvokeDynamic(arity, sak1, sak2).compileAndCheck(fm, tool);
+                            } else {
+                                for (StaticArgumentKind sak3 : StaticArgumentKind.values()) {
+                                    new TestInvokeDynamic(arity, sak1, sak2, sak3).compileAndCheck(fm, tool);
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        System.out.println("Total checks made: " + checkCount);
+    }
+
+    StaticArgumentsArity arity;
+    StaticArgumentKind[] saks;
+    JavaSource source;
+    DiagChecker dc;
+
+    TestInvokeDynamic(StaticArgumentsArity arity, StaticArgumentKind... saks) {
+        this.arity = arity;
+        this.saks = saks;
+        source = new JavaSource();
+        dc = new DiagChecker();
+    }
+
+    void compileAndCheck(JavaFileManager fm, JavaCompiler tool) throws Exception {
+        JavacTaskImpl ct = (JavacTaskImpl)tool.getTask(null, fm, dc,
+                null, null, Arrays.asList(source));
+        Context context = ct.getContext();
+        Symtab syms = Symtab.instance(context);
+        Names names = Names.instance(context);
+        ct.addTaskListener(new Indifier(syms, names));
+        try {
+            ct.generate();
+        } catch (Throwable t) {
+            t.printStackTrace();
+            throw new AssertionError(String.format("Error thrown when compiling following code\n%s", source.source));
+        }
+        if (dc.diagFound) {
+            throw new AssertionError(String.format("Diags found when compiling following code\n%s\n\n%s", source.source, dc.printDiags()));
+        }
+        verifyBytecode();
+    }
+
+    void verifyBytecode() {
+        File compiledTest = new File("Test.class");
+        try {
+            ClassFile cf = ClassFile.read(compiledTest);
+            Method testMethod = null;
+            for (Method m : cf.methods) {
+                if (m.getName(cf.constant_pool).equals("test")) {
+                    testMethod = m;
+                    break;
+                }
+            }
+            if (testMethod == null) {
+                throw new Error("Test method not found");
+            }
+            Code_attribute ea = (Code_attribute)testMethod.attributes.get(Attribute.Code);
+            if (testMethod == null) {
+                throw new Error("Code attribute for test() method not found");
+            }
+
+            int bsmIdx = -1;
+
+            for (Instruction i : ea.getInstructions()) {
+                if (i.getMnemonic().equals("invokedynamic")) {
+                    CONSTANT_InvokeDynamic_info indyInfo =
+                            (CONSTANT_InvokeDynamic_info)cf.constant_pool.get(i.getShort(1));
+                    bsmIdx = indyInfo.bootstrap_method_attr_index;
+                    if (!indyInfo.getNameAndTypeInfo().getType().equals("()V")) {
+                        throw new AssertionError("type mismatch for CONSTANT_InvokeDynamic_info");
+                    }
+                }
+            }
+            if (bsmIdx == -1) {
+                throw new Error("Missing invokedynamic in generated code");
+            }
+
+            BootstrapMethods_attribute bsm_attr = (BootstrapMethods_attribute)cf.getAttribute(Attribute.BootstrapMethods);
+            if (bsm_attr.bootstrap_method_specifiers.length != 1) {
+                throw new Error("Bad number of method specifiers in BootstrapMethods attribute");
+            }
+            BootstrapMethods_attribute.BootstrapMethodSpecifier bsm_spec =
+                    bsm_attr.bootstrap_method_specifiers[0];
+
+            if (bsm_spec.bootstrap_arguments.length != arity.arity) {
+                throw new Error("Bad number of static invokedynamic args in BootstrapMethod attribute");
+            }
+
+            int count = 0;
+            for (StaticArgumentKind sak : saks) {
+                if (!sak.check(cf.constant_pool.get(bsm_spec.bootstrap_arguments[count]))) {
+                    throw new Error("Bad static argument value " + sak);
+                }
+                count++;
+            }
+
+            CONSTANT_MethodHandle_info bsm_handle =
+                    (CONSTANT_MethodHandle_info)cf.constant_pool.get(bsm_spec.bootstrap_method_ref);
+
+            if (bsm_handle.reference_kind != RefKind.REF_invokeStatic) {
+                throw new Error("Bad kind on boostrap method handle");
+            }
+
+            CONSTANT_Methodref_info bsm_ref =
+                    (CONSTANT_Methodref_info)cf.constant_pool.get(bsm_handle.reference_index);
+
+            if (!bsm_ref.getClassInfo().getName().equals("Bootstrap")) {
+                throw new Error("Bad owner of boostrap method");
+            }
+
+            if (!bsm_ref.getNameAndTypeInfo().getName().equals("bsm")) {
+                throw new Error("Bad boostrap method name");
+            }
+
+            if (!bsm_ref.getNameAndTypeInfo().getType().equals(asBSMSignatureString())) {
+                throw new Error("Bad boostrap method type" + bsm_ref.getNameAndTypeInfo().getType() + " " + asBSMSignatureString());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new Error("error reading " + compiledTest +": " + e);
+        }
+    }
+
+    String asBSMSignatureString() {
+        StringBuilder buf = new StringBuilder();
+        buf.append("(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;");
+        for (StaticArgumentKind sak : saks) {
+            buf.append(sak.bytecodeTypeStr);
+        }
+        buf.append(")Ljava/lang/invoke/CallSite;");
+        return buf.toString();
+    }
+
+    class JavaSource extends SimpleJavaFileObject {
+
+        static final String source_template = "import java.lang.invoke.*;\n" +
+                "class Bootstrap {\n" +
+                "   public static CallSite bsm(MethodHandles.Lookup lookup, String name, MethodType methodType #SARGS) {\n" +
+                "       return null;\n" +
+                "   }\n" +
+                "}\n" +
+                "class Test {\n" +
+                "   void m() { }\n" +
+                "   void test() { m(); }\n" +
+                "}";
+
+        String source;
+
+        JavaSource() {
+            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
+            source = source_template.replace("#SARGS", asSignatureString());
+        }
+
+        @Override
+        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+            return source;
+        }
+
+        String asSignatureString() {
+            int count = 0;
+            StringBuilder buf = new StringBuilder();
+            for (StaticArgumentKind sak : saks) {
+                buf.append(",");
+                buf.append(sak.sourceTypeStr);
+                buf.append(' ');
+                buf.append(String.format("x%d", count++));
+            }
+            return buf.toString();
+        }
+    }
+
+    class Indifier extends TreeScanner<Void, Void> implements TaskListener {
+
+        MethodSymbol bsm;
+        Symtab syms;
+        Names names;
+
+        Indifier(Symtab syms, Names names) {
+            this.syms = syms;
+            this.names = names;
+        }
+
+        @Override
+        public void started(TaskEvent e) {
+            //do nothing
+        }
+
+        @Override
+        public void finished(TaskEvent e) {
+            if (e.getKind() == TaskEvent.Kind.ANALYZE) {
+                scan(e.getCompilationUnit(), null);
+            }
+        }
+
+        @Override
+        public Void visitMethodInvocation(MethodInvocationTree node, Void p) {
+            super.visitMethodInvocation(node, p);
+            JCMethodInvocation apply = (JCMethodInvocation)node;
+            JCIdent ident = (JCIdent)apply.meth;
+            Symbol oldSym = ident.sym;
+            if (!oldSym.isConstructor()) {
+                Object[] staticArgs = new Object[arity.arity];
+                for (int i = 0; i < arity.arity ; i++) {
+                    staticArgs[i] = saks[i].getValue(syms, names);
+                }
+                ident.sym = new Symbol.DynamicMethodSymbol(oldSym.name, oldSym.owner, REF_invokeStatic, bsm, oldSym.type, staticArgs);
+            }
+            return null;
+        }
+
+        @Override
+        public Void visitMethod(MethodTree node, Void p) {
+            super.visitMethod(node, p);
+            if (node.getName().toString().equals("bsm")) {
+                bsm = ((JCMethodDecl)node).sym;
+            }
+            return null;
+        }
+    }
+
+    static class DiagChecker implements javax.tools.DiagnosticListener<JavaFileObject> {
+
+        boolean diagFound;
+        ArrayList<String> diags = new ArrayList<>();
+
+        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
+            diags.add(diagnostic.getMessage(Locale.getDefault()));
+            diagFound = true;
+        }
+
+        String printDiags() {
+            StringBuilder buf = new StringBuilder();
+            for (String s : diags) {
+                buf.append(s);
+                buf.append("\n");
+            }
+            return buf.toString();
+        }
+    }
+}
diff --git a/langtools/test/tools/javac/positions/T6264029.out b/langtools/test/tools/javac/positions/T6264029.out
index a3e79ee1af1..8ff58c6a72d 100644
--- a/langtools/test/tools/javac/positions/T6264029.out
+++ b/langtools/test/tools/javac/positions/T6264029.out
@@ -1,3 +1,2 @@
-T6264029.java:15:19: compiler.warn.unchecked.call.mbr.of.raw.type: T6264029A(K), T6264029A
 T6264029.java:15:41: compiler.warn.unchecked.call.mbr.of.raw.type: T6264029A(K), T6264029A
-2 warnings
+1 warning
diff --git a/hotspot/src/share/tools/ProjectCreator/DirectoryTreeNode.java b/langtools/test/tools/javac/processing/T7196462.java
similarity index 60%
rename from hotspot/src/share/tools/ProjectCreator/DirectoryTreeNode.java
rename to langtools/test/tools/javac/processing/T7196462.java
index f198dc24b52..d8bbf38c255 100644
--- a/hotspot/src/share/tools/ProjectCreator/DirectoryTreeNode.java
+++ b/langtools/test/tools/javac/processing/T7196462.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,18 +19,26 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
- *
+ */
+
+/*
+ * @test
+ * @bug 7196462
+ * @summary JavacProcessingEnvironment should tolerate BasicJavacTask
+ * @library ../lib
+ * @build JavacTestingAbstractProcessor T7196462
+ * @compile/process -processor T7196462 T7196462.java
  */
 
 import java.util.*;
+import javax.annotation.processing.*;
+import javax.lang.model.element.*;
+import com.sun.source.util.*;
 
-public interface DirectoryTreeNode {
-    public boolean isFile();
-    public boolean isDirectory();
-    public String getName();
-    public String getParent();
-    public Iterator getChildren() throws IllegalArgumentException;
-    public int getNumChildren() throws IllegalArgumentException;
-    public DirectoryTreeNode getChild(int i)
-        throws IllegalArgumentException, ArrayIndexOutOfBoundsException;
+public class T7196462 extends JavacTestingAbstractProcessor {
+    public boolean process(Set<? extends TypeElement> annos,RoundEnvironment rEnv) {
+        JavacTask t = JavacTask.instance(processingEnv);
+        System.err.println(t);
+        return true;
+    }
 }
diff --git a/langtools/test/tools/javac/quid/T6999438.out b/langtools/test/tools/javac/quid/T6999438.out
index 04fdcfae97f..cd6266895d1 100644
--- a/langtools/test/tools/javac/quid/T6999438.out
+++ b/langtools/test/tools/javac/quid/T6999438.out
@@ -1,4 +1,4 @@
-T6999438.java:8:8: compiler.err.expected: token.identifier
+T6999438.java:8:9: compiler.err.illegal.char: 35
 T6999438.java:8:10: compiler.err.illegal.start.of.type
 T6999438.java:8:25: compiler.err.expected: token.identifier
 T6999438.java:8:26: compiler.err.expected: ';'
diff --git a/langtools/test/tools/javac/typeAnnotations/newlocations/BasicTest.out b/langtools/test/tools/javac/typeAnnotations/newlocations/BasicTest.out
index 9973f328fbd..6204b0e6419 100644
--- a/langtools/test/tools/javac/typeAnnotations/newlocations/BasicTest.out
+++ b/langtools/test/tools/javac/typeAnnotations/newlocations/BasicTest.out
@@ -9,13 +9,9 @@ BasicTest.java:47:84: compiler.err.expected: token.identifier
 BasicTest.java:52:22: compiler.err.illegal.start.of.expr
 BasicTest.java:52:31: compiler.err.expected: ';'
 BasicTest.java:52:37: compiler.err.expected: token.identifier
-BasicTest.java:53:21: compiler.err.illegal.start.of.expr
-BasicTest.java:53:23: compiler.err.expected: ';'
 BasicTest.java:53:30: compiler.err.expected: token.identifier
-BasicTest.java:53:32: compiler.err.illegal.start.of.type
-BasicTest.java:53:37: compiler.err.expected: token.identifier
-BasicTest.java:53:38: compiler.err.expected: ';'
-BasicTest.java:56:17: compiler.err.expected: token.identifier
+BasicTest.java:53:32: compiler.err.lambda.not.supported.in.source: 1.8
+BasicTest.java:53:31: compiler.err.expected: ->
 BasicTest.java:56:23: compiler.err.expected: token.identifier
 BasicTest.java:56:24: compiler.err.expected2: '(', '['
 BasicTest.java:56:25: compiler.err.expected: ';'
@@ -63,4 +59,4 @@ BasicTest.java:74:24: compiler.err.expected: ';'
 BasicTest.java:74:25: compiler.err.illegal.start.of.type
 BasicTest.java:74:33: compiler.err.expected: ';'
 BasicTest.java:77:2: compiler.err.premature.eof
-65 errors
+61 errors
diff --git a/langtools/test/tools/javac/varargs/6313164/T6313164.out b/langtools/test/tools/javac/varargs/6313164/T6313164.out
index a59354218b3..7b2de27216b 100644
--- a/langtools/test/tools/javac/varargs/6313164/T6313164.out
+++ b/langtools/test/tools/javac/varargs/6313164/T6313164.out
@@ -1,4 +1,4 @@
-T6313164.java:12:8: compiler.err.cant.apply.symbol.1: kindname.method, foo1, p1.A[], p1.B,p1.B, kindname.class, p1.B, (compiler.misc.inaccessible.varargs.type: p1.A, kindname.class, T6313164)
+T6313164.java:12:8: compiler.err.cant.apply.symbol: kindname.method, foo1, p1.A[], p1.B,p1.B, kindname.class, p1.B, (compiler.misc.inaccessible.varargs.type: p1.A, kindname.class, T6313164)
 T6313164.java:14:13: compiler.err.prob.found.req: (compiler.misc.inaccessible.varargs.type: p1.A, kindname.class, T6313164)
 T6313164.java:15:13: compiler.err.prob.found.req: (compiler.misc.inaccessible.varargs.type: p1.A, kindname.class, T6313164)
 - compiler.note.unchecked.filename: B.java
diff --git a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFPMoveInstruction.java b/langtools/test/tools/javac/varargs/6313164/T7175433.java
similarity index 57%
rename from hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFPMoveInstruction.java
rename to langtools/test/tools/javac/varargs/6313164/T7175433.java
index fd9317ae2a1..b4627eb7ab8 100644
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/asm/sparc/SPARCFPMoveInstruction.java
+++ b/langtools/test/tools/javac/varargs/6313164/T7175433.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -19,37 +19,41 @@
  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  * or visit www.oracle.com if you need additional information or have any
  * questions.
+ */
+
+/*
+ * @test
+ * @bug 7175433 6313164
+ * @summary Inference cleanup: add helper class to handle inference variables
  *
  */
 
-package sun.jvm.hotspot.asm.sparc;
+import java.util.List;
 
-import sun.jvm.hotspot.asm.*;
+class Bar {
 
-public class SPARCFPMoveInstruction extends SPARCFP2RegisterInstruction
-    implements MoveInstruction {
+    private class Foo { }
 
-    public SPARCFPMoveInstruction(String name, int opf, SPARCFloatRegister rs, SPARCFloatRegister rd) {
-        super(name, opf, rs, rd);
+    <Z> List<Z> m(Object... o) { T7175433.assertTrue(true); return null; }
+    <Z> List<Z> m(Foo... o) { T7175433.assertTrue(false); return null; }
+
+    Foo getFoo() { return null; }
+}
+
+public class T7175433 {
+
+    static int assertionCount;
+
+    static void assertTrue(boolean b) {
+        assertionCount++;
+        if (!b) {
+            throw new AssertionError();
+        }
     }
 
-    public Register getMoveDestination() {
-        return rd;
-    }
-
-    public ImmediateOrRegister getMoveSource() {
-        return rs;
-    }
-
-    public int getMoveOpcode() {
-        return opf;
-    }
-
-    public boolean isConditional() {
-        return false;
-    }
-
-    public boolean isMove() {
-        return true;
+    public static void main(String[] args) {
+        Bar b = new Bar();
+        b.m(b.getFoo());
+        assertTrue(assertionCount == 1);
     }
 }
diff --git a/langtools/test/tools/javadoc/T4696488.java b/langtools/test/tools/javadoc/T4696488.java
new file mode 100644
index 00000000000..0c7a7c87d2c
--- /dev/null
+++ b/langtools/test/tools/javadoc/T4696488.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import com.sun.tools.doclets.internal.toolkit.Configuration;
+
+/**
+ * @test
+ * @bug     4696488
+ * @summary javadoc doesn't handle UNC paths for destination directory
+ * @author  Jesse Glick
+ * @run main T4696488 T4696488.java
+ */
+public class T4696488 {
+
+    public static void main(String... args) {
+        System.setProperty("file.separator", "/");
+        assertAddTrailingFileSep("/path/to/dir", "/path/to/dir/");
+        assertAddTrailingFileSep("/path/to/dir/", "/path/to/dir/");
+        assertAddTrailingFileSep("/path/to/dir//", "/path/to/dir/");
+        System.setProperty("file.separator", "\\");
+        assertAddTrailingFileSep("C:\\path\\to\\dir", "C:\\path\\to\\dir\\");
+        assertAddTrailingFileSep("C:\\path\\to\\dir\\", "C:\\path\\to\\dir\\");
+        assertAddTrailingFileSep("C:\\path\\to\\dir\\\\", "C:\\path\\to\\dir\\");
+        assertAddTrailingFileSep("\\\\server\\share\\path\\to\\dir", "\\\\server\\share\\path\\to\\dir\\");
+        assertAddTrailingFileSep("\\\\server\\share\\path\\to\\dir\\", "\\\\server\\share\\path\\to\\dir\\");
+        assertAddTrailingFileSep("\\\\server\\share\\path\\to\\dir\\\\", "\\\\server\\share\\path\\to\\dir\\");
+    }
+
+    private static void assertAddTrailingFileSep(String input, String expectedOutput) {
+        String output = Configuration.addTrailingFileSep(input);
+        if (!expectedOutput.equals(output)) {
+            throw new Error("expected " + expectedOutput + " but was " + output);
+        }
+    }
+
+}
diff --git a/make/Defs-internal.gmk b/make/Defs-internal.gmk
index 6afea7062a6..6f40f763bc9 100644
--- a/make/Defs-internal.gmk
+++ b/make/Defs-internal.gmk
@@ -330,6 +330,10 @@ COMMON_BUILD_ARGUMENTS = \
     PREVIOUS_MINOR_VERSION=$(PREVIOUS_MINOR_VERSION) \
     PREVIOUS_MICRO_VERSION=$(PREVIOUS_MICRO_VERSION)
 
+ifdef OPENJDK
+  COMMON_BUILD_ARGUMENTS += OPENJDK=$(OPENJDK)
+endif
+
 ifdef ARCH_DATA_MODEL
   COMMON_BUILD_ARGUMENTS += ARCH_DATA_MODEL=$(ARCH_DATA_MODEL)
 endif