changeset 15682:7acf6f9f0031

Merge
author amurillo
date Sat, 10 Sep 2016 12:23:52 -0700
parents 6cae3820bdcc 33ce711b8809
children 0d9efe3879ad
files src/java.base/share/classes/jdk/internal/misc/Unsafe.java
diffstat 150 files changed, 23064 insertions(+), 2280 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Sat Sep 10 08:27:40 2016 -0400
+++ b/.hgtags	Sat Sep 10 12:23:52 2016 -0700
@@ -376,3 +376,5 @@
 8c57f4c293bbc5609928308a6d91ba765760b5f9 jdk-9+131
 d5c70818cd8a82e76632c8c815bdb4f75f53aeaf jdk-9+132
 3cdae27c90b5e41afe75eab904fda19fac076330 jdk-9+133
+803adcd526d74ae0b64948d1f8260c2dbe514779 jdk-9+134
+021369229cfd0b5feb76834b2ea498f47f43c0f3 jdk-9+135
--- a/make/gensrc/GensrcVarHandles.gmk	Sat Sep 10 08:27:40 2016 -0400
+++ b/make/gensrc/GensrcVarHandles.gmk	Sat Sep 10 12:23:52 2016 -0700
@@ -44,6 +44,10 @@
     $1_ARGS += -KAtomicAdd
   endif
 
+  ifneq ($$(findstring $$($1_Type), Boolean Byte Short Char Int Long), )
+    $1_ARGS += -KBitwise
+  endif
+
   ifneq ($$(findstring $$($1_Type), Byte Short Char), )
     $1_ARGS += -KShorterThanInt
   endif
@@ -101,6 +105,7 @@
 
     $1_ARGS += -KCAS
     $1_ARGS += -KAtomicAdd
+    $1_ARGS += -KBitwise
   endif
 
   ifeq ($$($1_Type), Long)
@@ -113,6 +118,7 @@
 
     $1_ARGS += -KCAS
     $1_ARGS += -KAtomicAdd
+    $1_ARGS += -KBitwise
   endif
 
   ifeq ($$($1_Type), Float)
--- a/src/java.base/macosx/native/libnio/ch/KQueueArrayWrapper.c	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/macosx/native/libnio/ch/KQueueArrayWrapper.c	Sat Sep 10 12:23:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -123,7 +123,6 @@
     kevent(kq, changes, 2, errors, 2, &dontBlock);
 }
 
-
 JNIEXPORT jint JNICALL
 Java_sun_nio_ch_KQueueArrayWrapper_kevent0(JNIEnv *env, jobject this, jint kq,
                                            jlong kevAddr, jint kevCount,
@@ -138,6 +137,15 @@
     // Java timeout == -1 : wait forever : timespec timeout of NULL
     // Java timeout == 0  : return immediately : timespec timeout of zero
     if (timeout >= 0) {
+        // For some indeterminate reason kevent(2) has been found to fail with
+        // an EINVAL error for timeout values greater than or equal to
+        // 100000001000L. To avoid this problem, clamp the timeout arbitrarily
+        // to the maximum value of a 32-bit signed integer which is
+        // approximately 25 days in milliseconds.
+        const jlong timeoutMax = 0x7fffffff; // java.lang.Integer.MAX_VALUE
+        if (timeout > timeoutMax) {
+            timeout = timeoutMax;
+        }
         ts.tv_sec = timeout / 1000;
         ts.tv_nsec = (timeout % 1000) * 1000000; //nanosec = 1 million millisec
         tsp = &ts;
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/Package.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/Package.java	Sat Sep 10 12:23:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -476,7 +476,8 @@
             } else if (localICs.isEmpty()) {
                 // It was a non-empty diff, but the local ICs were absent.
                 actualICs = null;
-                changed = 0;  // [] => null, no tuple change
+                // [] => null, no tuple change, but attribute deletion.
+                changed = -1;
             } else {
                 // Non-trivial diff was transmitted.
                 actualICs = computeICdiff();
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/PackageReader.java	Sat Sep 10 12:23:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1193,18 +1193,21 @@
         cls.visitRefs(VRM_CLASSIC, cpRefs);
 
         ArrayList<BootstrapMethodEntry> bsms = new ArrayList<>();
-        /*
-         * BootstrapMethod(BSMs) are added here before InnerClasses(ICs),
-         * so as to ensure the order. Noting that the BSMs  may be
-         * removed if they are not found in the CP, after the ICs expansion.
-         */
-        cls.addAttribute(Package.attrBootstrapMethodsEmpty.canonicalInstance());
-
         // flesh out the local constant pool
         ConstantPool.completeReferencesIn(cpRefs, true, bsms);
 
+        // add the bsm and references as required
+        if (!bsms.isEmpty()) {
+            cls.addAttribute(Package.attrBootstrapMethodsEmpty.canonicalInstance());
+            cpRefs.add(Package.getRefString("BootstrapMethods"));
+            Collections.sort(bsms);
+            cls.setBootstrapMethods(bsms);
+        }
+
         // Now that we know all our local class references,
         // compute the InnerClasses attribute.
+        // An InnerClasses attribute usually gets added here,
+        // although it might already have been present.
         int changed = cls.expandLocalICs();
 
         if (changed != 0) {
@@ -1221,16 +1224,6 @@
             ConstantPool.completeReferencesIn(cpRefs, true, bsms);
         }
 
-        // remove the attr previously set, otherwise add the bsm and
-        // references as required
-        if (bsms.isEmpty()) {
-            cls.attributes.remove(Package.attrBootstrapMethodsEmpty.canonicalInstance());
-        } else {
-            cpRefs.add(Package.getRefString("BootstrapMethods"));
-            Collections.sort(bsms);
-            cls.setBootstrapMethods(bsms);
-        }
-
         // construct a local constant pool
         int numDoubles = 0;
         for (Entry e : cpRefs) {
--- a/src/java.base/share/classes/com/sun/java/util/jar/pack/intrinsic.properties	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/com/sun/java/util/jar/pack/intrinsic.properties	Sat Sep 10 12:23:52 2016 -0700
@@ -18,7 +18,7 @@
 pack.class.attribute.Module = NH[RUHFH]NH[RUHNH[RUH]]NH[RCH]NH[RCHRCH]
 pack.class.attribute.ConcealedPackages = NH[RUH]
 pack.class.attribute.Version = RUH
-pack.class.attribute.MainClass = RUH
+pack.class.attribute.MainClass = RCH
 pack.class.attribute.TargetPlatform = RUHRUHRUH
 pack.class.attribute.Hashes = RUHNH[RUHRUH]
 
--- a/src/java.base/share/classes/java/lang/ClassLoader.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/lang/ClassLoader.java	Sat Sep 10 12:23:52 2016 -0700
@@ -27,6 +27,7 @@
 
 import java.io.InputStream;
 import java.io.IOException;
+import java.io.UncheckedIOException;
 import java.io.File;
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Field;
@@ -46,12 +47,16 @@
 import java.util.Map;
 import java.util.Objects;
 import java.util.Set;
+import java.util.Spliterator;
+import java.util.Spliterators;
 import java.util.Stack;
 import java.util.NoSuchElementException;
 import java.util.Vector;
 import java.util.WeakHashMap;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.function.Supplier;
 import java.util.stream.Stream;
+import java.util.stream.StreamSupport;
 
 import jdk.internal.perf.PerfCounter;
 import jdk.internal.module.ServicesCatalog;
@@ -1167,17 +1172,7 @@
     protected final Class<?> findSystemClass(String name)
         throws ClassNotFoundException
     {
-        ClassLoader system = getSystemClassLoader();
-        if (system == null) {
-            if (!checkName(name))
-                throw new ClassNotFoundException(name);
-            Class<?> cls = findBootstrapClass(name);
-            if (cls == null) {
-                throw new ClassNotFoundException(name);
-            }
-            return cls;
-        }
-        return system.loadClass(name);
+        return getSystemClassLoader().loadClass(name);
     }
 
     /**
@@ -1354,6 +1349,57 @@
     }
 
     /**
+     * Returns a stream whose elements are the URLs of all the resources with
+     * the given name. A resource is some data (images, audio, text, etc) that
+     * can be accessed by class code in a way that is independent of the
+     * location of the code.
+     *
+     * Resources in a named module are private to that module. This method does
+     * not find resources in named modules.
+     *
+     * <p> The name of a resource is a {@code /}-separated path name that
+     * identifies the resource.
+     *
+     * <p> The search order is described in the documentation for {@link
+     * #getResource(String)}.
+     *
+     * <p> The resources will be located when the returned stream is evaluated.
+     * If the evaluation results in an {@code IOException} then the I/O
+     * exception is wrapped in an {@link UncheckedIOException} that is then
+     * thrown.
+     *
+     * @apiNote When overriding this method it is recommended that an
+     * implementation ensures that any delegation is consistent with the {@link
+     * #getResource(java.lang.String) getResource(String)} method. This should
+     * ensure that the first element returned by the stream is the same
+     * resource that the {@code getResource(String)} method would return.
+     *
+     * @param  name
+     *         The resource name
+     *
+     * @return  A stream of resource {@link java.net.URL URL} objects. If no
+     *          resources could  be found, the stream will be empty.  Resources
+     *          that the class loader doesn't have access to will not be in the
+     *          stream.
+     *
+     * @see  #findResources(String)
+     *
+     * @since  9
+     */
+    public Stream<URL> resources(String name) {
+        int characteristics = Spliterator.NONNULL | Spliterator.IMMUTABLE;
+        Supplier<Spliterator<URL>> si = () -> {
+            try {
+                return Spliterators.spliteratorUnknownSize(
+                    getResources(name).asIterator(), characteristics);
+            } catch (IOException e) {
+                throw new UncheckedIOException(e);
+            }
+        };
+        return StreamSupport.stream(si, characteristics, false);
+    }
+
+    /**
      * Finds the resource with the given name. Class loader implementations
      * should override this method to specify where to find resources.
      *
@@ -1437,11 +1483,7 @@
      * @since  1.1
      */
     public static URL getSystemResource(String name) {
-        ClassLoader system = getSystemClassLoader();
-        if (system == null) {
-            return BootLoader.findResource(name);
-        }
-        return system.getResource(name);
+        return getSystemClassLoader().getResource(name);
     }
 
     /**
@@ -1464,17 +1506,13 @@
      *
      * @throws  IOException
      *          If I/O errors occur
-
+     *
      * @since  1.2
      */
     public static Enumeration<URL> getSystemResources(String name)
         throws IOException
     {
-        ClassLoader system = getSystemClassLoader();
-        if (system == null) {
-            return BootLoader.findResources(name);
-        }
-        return system.getResources(name);
+        return getSystemClassLoader().getResources(name);
     }
 
     /**
@@ -1631,8 +1669,7 @@
      * this method during startup should take care not to cache the return
      * value until the system is fully initialized.
      *
-     * @return  The system <tt>ClassLoader</tt> for delegation, or
-     *          <tt>null</tt> if none
+     * @return  The system <tt>ClassLoader</tt> for delegation
      *
      * @throws  SecurityException
      *          If a security manager is present, and the caller's class loader
@@ -1941,9 +1978,14 @@
      * @return The {@code Package} of the given name defined by this class loader,
      *         or {@code null} if not found
      *
+     * @throws  NullPointerException
+     *          if {@code name} is {@code null}.
+     *
      * @since  9
      */
     public final Package getDefinedPackage(String name) {
+        Objects.requireNonNull(name, "name cannot be null");
+
         NamedPackage p = packages.get(name);
         if (p == null)
             return null;
@@ -1981,6 +2023,9 @@
      * @return The {@code Package} corresponding to the given name defined by
      *         this class loader or its ancestors, or {@code null} if not found.
      *
+     * @throws  NullPointerException
+     *          if {@code name} is {@code null}.
+     *
      * @deprecated
      * If multiple class loaders delegate to each other and define classes
      * with the same package name, and one such loader relies on the lookup
--- a/src/java.base/share/classes/java/lang/Compiler.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/lang/Compiler.java	Sat Sep 10 12:23:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,21 +29,18 @@
  * The {@code Compiler} class is provided to support Java-to-native-code
  * compilers and related services. By design, the {@code Compiler} class does
  * nothing; it serves as a placeholder for a JIT compiler implementation.
+ * If no compiler is available, these methods do nothing.
  *
- * <p> When the Java Virtual Machine first starts, it determines if the system
- * property {@code java.compiler} exists. (System properties are accessible
- * through {@link System#getProperty(String)} and {@link
- * System#getProperty(String, String)}.  If so, it is assumed to be the name of
- * a library (with a platform-dependent exact location and type); {@link
- * System#loadLibrary} is called to load that library. If this loading
- * succeeds, the function named {@code java_lang_Compiler_start()} in that
- * library is called.
- *
- * <p> If no compiler is available, these methods do nothing.
+ * @deprecated JIT compilers and their technologies vary too widely to
+ * be controlled effectively by a standardized interface. As such, many
+ * JIT compiler implementations ignore this interface, and are instead
+ * controllable by implementation-specific mechanisms such as command-line
+ * options. This class is subject to removal in a future version of Java SE.
  *
  * @author  Frank Yellin
  * @since   1.0
  */
+@Deprecated(since="9", forRemoval=true)
 public final class Compiler  {
     private Compiler() {}               // don't make instances
 
--- a/src/java.base/share/classes/java/lang/Package.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/lang/Package.java	Sat Sep 10 12:23:52 2016 -0700
@@ -317,6 +317,9 @@
      * @return The {@code Package} of the given name defined by the caller's
      *         class loader or its ancestors, or {@code null} if not found.
      *
+     * @throws NullPointerException
+     *         if {@code name} is {@code null}.
+     *
      * @deprecated
      * If multiple class loaders delegate to each other and define classes
      * with the same package name, and one such loader relies on the lookup
--- a/src/java.base/share/classes/java/lang/Runtime.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/lang/Runtime.java	Sat Sep 10 12:23:52 2016 -0700
@@ -733,6 +733,7 @@
      * @deprecated
      * This method was intended to control instruction tracing.
      * It has been superseded by JVM-specific tracing mechanisms.
+     * This method is subject to removal in a future version of Java SE.
      *
      * @param on ignored
      */
@@ -745,6 +746,7 @@
      * @deprecated
      * This method was intended to control method call tracing.
      * It has been superseded by JVM-specific tracing mechanisms.
+     * This method is subject to removal in a future version of Java SE.
      *
      * @param on ignored
      */
--- a/src/java.base/share/classes/java/lang/RuntimePermission.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/lang/RuntimePermission.java	Sat Sep 10 12:23:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -323,11 +323,9 @@
  *   <td>usePolicy</td>
  *   <td>Granting this permission disables the Java Plug-In's default
  *   security prompting behavior.</td>
- *   <td>For more information, refer to Java Plug-In's guides, <a href=
- *   "../../../technotes/guides/plugin/developer_guide/security.html">
- *   Applet Security Basics</a> and <a href=
- *   "../../../technotes/guides/plugin/developer_guide/rsa_how.html#use">
- *   usePolicy Permission</a>.</td>
+ *   <td>For more information, refer to the <a href=
+ *   "../../../technotes/guides/deploy/index.html">deployment guide</a>.
+ *   </td>
  * </tr>
  * <tr>
  *   <td>manageProcess</td>
--- a/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/lang/invoke/MethodHandles.java	Sat Sep 10 12:23:52 2016 -0700
@@ -1207,11 +1207,16 @@
          * the following conditions:
          * <ul>
          * <li>if the field is declared {@code final}, then the write, atomic
-         *     update, and numeric atomic update access modes are unsupported.
+         *     update, numeric atomic update, and bitwise atomic update access
+         *     modes are unsupported.
          * <li>if the field type is anything other than {@code byte},
-         *     {@code short}, {@code char}, {@code int} or {@code long},
+         *     {@code short}, {@code char}, {@code int}, {@code long},
          *     {@code float}, or {@code double} then numeric atomic update
          *     access modes are unsupported.
+         * <li>if the field type is anything other than {@code boolean},
+         *     {@code byte}, {@code short}, {@code char}, {@code int} or
+         *     {@code long} then bitwise atomic update access modes are
+         *     unsupported.
          * </ul>
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
@@ -1326,11 +1331,16 @@
          * the following conditions:
          * <ul>
          * <li>if the field is declared {@code final}, then the write, atomic
-         *     update, and numeric atomic update access modes are unsupported.
+         *     update, numeric atomic update, and bitwise atomic update access
+         *     modes are unsupported.
          * <li>if the field type is anything other than {@code byte},
-         *     {@code short}, {@code char}, {@code int} or {@code long},
+         *     {@code short}, {@code char}, {@code int}, {@code long},
          *     {@code float}, or {@code double}, then numeric atomic update
          *     access modes are unsupported.
+         * <li>if the field type is anything other than {@code boolean},
+         *     {@code byte}, {@code short}, {@code char}, {@code int} or
+         *     {@code long} then bitwise atomic update access modes are
+         *     unsupported.
          * </ul>
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
@@ -1631,11 +1641,16 @@
          * the following conditions:
          * <ul>
          * <li>if the field is declared {@code final}, then the write, atomic
-         *     update, and numeric atomic update access modes are unsupported.
+         *     update, numeric atomic update, and bitwise atomic update access
+         *     modes are unsupported.
          * <li>if the field type is anything other than {@code byte},
-         *     {@code short}, {@code char}, {@code int} or {@code long},
+         *     {@code short}, {@code char}, {@code int}, {@code long},
          *     {@code float}, or {@code double} then numeric atomic update
          *     access modes are unsupported.
+         * <li>if the field type is anything other than {@code boolean},
+         *     {@code byte}, {@code short}, {@code char}, {@code int} or
+         *     {@code long} then bitwise atomic update access modes are
+         *     unsupported.
          * </ul>
          * <p>
          * If the field is declared {@code volatile} then the returned VarHandle
@@ -2353,9 +2368,13 @@
      * the following conditions:
      * <ul>
      * <li>if the component type is anything other than {@code byte},
-     *     {@code short}, {@code char}, {@code int} or {@code long},
+     *     {@code short}, {@code char}, {@code int}, {@code long},
      *     {@code float}, or {@code double} then numeric atomic update access
      *     modes are unsupported.
+     * <li>if the field type is anything other than {@code boolean},
+     *     {@code byte}, {@code short}, {@code char}, {@code int} or
+     *     {@code long} then bitwise atomic update access modes are
+     *     unsupported.
      * </ul>
      * <p>
      * If the component type is {@code float} or {@code double} then numeric
@@ -2426,7 +2445,9 @@
      * If access is aligned then following access modes are supported and are
      * guaranteed to support atomic access:
      * <ul>
-     * <li>read write access modes for all {@code T};
+     * <li>read write access modes for all {@code T}, with the exception of
+     *     access modes {@code get} and {@code set} for {@code long} and
+     *     {@code double} on 32-bit platforms.
      * <li>atomic update access modes for {@code int}, {@code long},
      *     {@code float} or {@code double}.
      *     (Future major platform releases of the JDK may support additional
@@ -2434,6 +2455,9 @@
      * <li>numeric atomic update access modes for {@code int} and {@code long}.
      *     (Future major platform releases of the JDK may support additional
      *     numeric types for certain currently unsupported access modes.)
+     * <li>bitwise atomic update access modes for {@code int} and {@code long}.
+     *     (Future major platform releases of the JDK may support additional
+     *     numeric types for certain currently unsupported access modes.)
      * </ul>
      * <p>
      * Misaligned access, and therefore atomicity guarantees, may be determined
@@ -2508,7 +2532,9 @@
      * If access is aligned then following access modes are supported and are
      * guaranteed to support atomic access:
      * <ul>
-     * <li>read write access modes for all {@code T};
+     * <li>read write access modes for all {@code T}, with the exception of
+     *     access modes {@code get} and {@code set} for {@code long} and
+     *     {@code double} on 32-bit platforms.
      * <li>atomic update access modes for {@code int}, {@code long},
      *     {@code float} or {@code double}.
      *     (Future major platform releases of the JDK may support additional
@@ -2516,6 +2542,9 @@
      * <li>numeric atomic update access modes for {@code int} and {@code long}.
      *     (Future major platform releases of the JDK may support additional
      *     numeric types for certain currently unsupported access modes.)
+     * <li>bitwise atomic update access modes for {@code int} and {@code long}.
+     *     (Future major platform releases of the JDK may support additional
+     *     numeric types for certain currently unsupported access modes.)
      * </ul>
      * <p>
      * Misaligned access, and therefore atomicity guarantees, may be determined
--- a/src/java.base/share/classes/java/lang/invoke/VarHandle.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/lang/invoke/VarHandle.java	Sat Sep 10 12:23:52 2016 -0700
@@ -134,21 +134,38 @@
  * The set of corresponding access mode methods belonging to this group
  * consists of the methods
  * {@link #compareAndSet compareAndSet},
+ * {@link #weakCompareAndSetPlain weakCompareAndSetPlain},
  * {@link #weakCompareAndSet weakCompareAndSet},
- * {@link #weakCompareAndSetVolatile weakCompareAndSetVolatile},
  * {@link #weakCompareAndSetAcquire weakCompareAndSetAcquire},
  * {@link #weakCompareAndSetRelease weakCompareAndSetRelease},
  * {@link #compareAndExchangeAcquire compareAndExchangeAcquire},
  * {@link #compareAndExchange compareAndExchange},
  * {@link #compareAndExchangeRelease compareAndExchangeRelease},
- * {@link #getAndSet getAndSet}.
+ * {@link #getAndSet getAndSet},
+ * {@link #getAndSetAcquire getAndSetAcquire},
+ * {@link #getAndSetRelease getAndSetRelease}.
  * <li>numeric atomic update access modes that, for example, atomically get and
  * set with addition the value of a variable under specified memory ordering
  * effects.
  * The set of corresponding access mode methods belonging to this group
  * consists of the methods
  * {@link #getAndAdd getAndAdd},
- * {@link #addAndGet addAndGet}.
+ * {@link #getAndAddAcquire getAndAddAcquire},
+ * {@link #getAndAddRelease getAndAddRelease},
+ * <li>bitwise atomic update access modes that, for example, atomically get and
+ * bitwise OR the value of a variable under specified memory ordering
+ * effects.
+ * The set of corresponding access mode methods belonging to this group
+ * consists of the methods
+ * {@link #getAndBitwiseOr getAndBitwiseOr},
+ * {@link #getAndBitwiseOrAcquire getAndBitwiseOrAcquire},
+ * {@link #getAndBitwiseOrRelease getAndBitwiseOrRelease},
+ * {@link #getAndBitwiseAnd getAndBitwiseAnd},
+ * {@link #getAndBitwiseAndAcquire getAndBitwiseAndAcquire},
+ * {@link #getAndBitwiseAndRelease getAndBitwiseAndRelease},
+ * {@link #getAndBitwiseXor getAndBitwiseXor},
+ * {@link #getAndBitwiseXorAcquire getAndBitwiseXorAcquire},
+ * {@link #getAndBitwiseXorRelease getAndBitwiseXorRelease}.
  * </ul>
  *
  * <p>Factory methods that produce or {@link java.lang.invoke.MethodHandles.Lookup
@@ -163,8 +180,8 @@
  * VarHandle instances and the corresponding method never throws
  * {@code UnsupportedOperationException}.
  * If a VarHandle references a read-only variable (for example a {@code final}
- * field) then write, atomic update and numeric atomic update access modes are
- * not supported and corresponding methods throw
+ * field) then write, atomic update, numeric atomic update, and bitwise atomic
+ * update access modes are not supported and corresponding methods throw
  * {@code UnsupportedOperationException}.
  * Read/write access modes (if supported), with the exception of
  * {@code get} and {@code set}, provide atomic access for
@@ -816,8 +833,8 @@
      * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
-     * weakCompareAndSet} must match the access mode type that is the result of
-     * calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET)}
+     * weakCompareAndSetPlain} must match the access mode type that is the result of
+     * calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN)}
      * on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
@@ -838,7 +855,7 @@
     public final native
     @MethodHandle.PolymorphicSignature
     @HotSpotIntrinsicCandidate
-    boolean weakCompareAndSet(Object... args);
+    boolean weakCompareAndSetPlain(Object... args);
 
     /**
      * Possibly atomically sets the value of a variable to the {@code newValue}
@@ -853,8 +870,8 @@
      * <p>The method signature is of the form {@code (CT, T expectedValue, T newValue)boolean}.
      *
      * <p>The symbolic type descriptor at the call site of {@code
-     * weakCompareAndSetVolatile} must match the access mode type that is the
-     * result of calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE)}
+     * weakCompareAndSet} must match the access mode type that is the
+     * result of calling {@code accessModeType(VarHandle.AccessMode.WEAK_COMPARE_AND_SET)}
      * on this VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
@@ -875,7 +892,7 @@
     public final native
     @MethodHandle.PolymorphicSignature
     @HotSpotIntrinsicCandidate
-    boolean weakCompareAndSetVolatile(Object... args);
+    boolean weakCompareAndSet(Object... args);
 
     /**
      * Possibly atomically sets the value of a variable to the {@code newValue}
@@ -986,6 +1003,71 @@
     @HotSpotIntrinsicCandidate
     Object getAndSet(Object... args);
 
+    /**
+     * Atomically sets the value of a variable to the {@code newValue} with the
+     * memory semantics of {@link #set} and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>The method signature is of the form {@code (CT, T newValue)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndSetAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_SET_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T newValue)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndSetAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the {@code newValue} with the
+     * memory semantics of {@link #setRelease} and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>The method signature is of the form {@code (CT, T newValue)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndSetRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_SET_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T newValue)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndSetRelease(Object... args);
 
     // Primitive adders
     // Throw UnsupportedOperationException for refs
@@ -1025,21 +1107,21 @@
 
     /**
      * Atomically adds the {@code value} to the current value of a variable with
-     * the memory semantics of {@link #setVolatile}, and returns the variable's
-     * current (updated) value, as accessed with the memory semantics of
-     * {@link #getVolatile}.
+     * the memory semantics of {@link #set}, and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
      *
      * <p>The method signature is of the form {@code (CT, T value)T}.
      *
-     * <p>The symbolic type descriptor at the call site of {@code addAndGet}
+     * <p>The symbolic type descriptor at the call site of {@code getAndAddAcquire}
      * must match the access mode type that is the result of calling
-     * {@code accessModeType(VarHandle.AccessMode.ADD_AND_GET)} on this
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE)} on this
      * VarHandle.
      *
      * @param args the signature-polymorphic parameter list of the form
      * {@code (CT, T value)}
      * , statically represented using varargs.
-     * @return the signature-polymorphic result that is the current value of
+     * @return the signature-polymorphic result that is the previous value of
      * the variable
      * , statically represented using {@code Object}.
      * @throws UnsupportedOperationException if the access mode is unsupported
@@ -1054,7 +1136,378 @@
     public final native
     @MethodHandle.PolymorphicSignature
     @HotSpotIntrinsicCandidate
-    Object addAndGet(Object... args);
+    Object getAndAddAcquire(Object... args);
+
+    /**
+     * Atomically adds the {@code value} to the current value of a variable with
+     * the memory semantics of {@link #setRelease}, and returns the variable's
+     * previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>The method signature is of the form {@code (CT, T value)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndAddRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_ADD_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T value)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndAddRelease(Object... args);
+
+
+    // Bitwise operations
+    // Throw UnsupportedOperationException for refs
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise OR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setVolatile} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getVolatile}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical OR is performed instead of a bitwise OR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOr}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseOr(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise OR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #set} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical OR is performed instead of a bitwise OR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOrAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #set(Object...)
+     * @see #getAcquire(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseOrAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise OR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setRelease} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical OR is performed instead of a bitwise OR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseOrRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setRelease(Object...)
+     * @see #get(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseOrRelease(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise AND between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setVolatile} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getVolatile}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical AND is performed instead of a bitwise AND.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAnd}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseAnd(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise AND between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #set} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical AND is performed instead of a bitwise AND.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAndAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #set(Object...)
+     * @see #getAcquire(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseAndAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise AND between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setRelease} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical AND is performed instead of a bitwise AND.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseAndRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setRelease(Object...)
+     * @see #get(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseAndRelease(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise XOR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setVolatile} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getVolatile}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical XOR is performed instead of a bitwise XOR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXor}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setVolatile(Object...)
+     * @see #getVolatile(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseXor(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise XOR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #set} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #getAcquire}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical XOR is performed instead of a bitwise XOR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXorAcquire}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #set(Object...)
+     * @see #getAcquire(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseXorAcquire(Object... args);
+
+    /**
+     * Atomically sets the value of a variable to the result of
+     * bitwise XOR between the variable's current value and the {@code mask}
+     * with the memory semantics of {@link #setRelease} and returns the
+     * variable's previous value, as accessed with the memory semantics of
+     * {@link #get}.
+     *
+     * <p>If the variable type is the non-integral {@code boolean} type then a
+     * logical XOR is performed instead of a bitwise XOR.
+     *
+     * <p>The method signature is of the form {@code (CT, T mask)T}.
+     *
+     * <p>The symbolic type descriptor at the call site of {@code getAndBitwiseXorRelease}
+     * must match the access mode type that is the result of calling
+     * {@code accessModeType(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE)} on this
+     * VarHandle.
+     *
+     * @param args the signature-polymorphic parameter list of the form
+     * {@code (CT, T mask)}
+     * , statically represented using varargs.
+     * @return the signature-polymorphic result that is the previous value of
+     * the variable
+     * , statically represented using {@code Object}.
+     * @throws UnsupportedOperationException if the access mode is unsupported
+     * for this VarHandle.
+     * @throws WrongMethodTypeException if the access mode type is not
+     * compatible with the caller's symbolic type descriptor.
+     * @throws ClassCastException if the access mode type is compatible with the
+     * caller's symbolic type descriptor, but a reference cast fails.
+     * @see #setRelease(Object...)
+     * @see #get(Object...)
+     */
+    public final native
+    @MethodHandle.PolymorphicSignature
+    @HotSpotIntrinsicCandidate
+    Object getAndBitwiseXorRelease(Object... args);
+
 
     enum AccessType {
         GET(Object.class),
@@ -1204,18 +1657,18 @@
         /**
          * The access mode whose access is specified by the corresponding
          * method
+         * {@link VarHandle#weakCompareAndSetPlain VarHandle.weakCompareAndSetPlain}
+         */
+        WEAK_COMPARE_AND_SET_PLAIN("weakCompareAndSetPlain", AccessType.COMPARE_AND_SWAP),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
          * {@link VarHandle#weakCompareAndSet VarHandle.weakCompareAndSet}
          */
         WEAK_COMPARE_AND_SET("weakCompareAndSet", AccessType.COMPARE_AND_SWAP),
         /**
          * The access mode whose access is specified by the corresponding
          * method
-         * {@link VarHandle#weakCompareAndSetVolatile VarHandle.weakCompareAndSetVolatile}
-         */
-        WEAK_COMPARE_AND_SET_VOLATILE("weakCompareAndSetVolatile", AccessType.COMPARE_AND_SWAP),
-        /**
-         * The access mode whose access is specified by the corresponding
-         * method
          * {@link VarHandle#weakCompareAndSetAcquire VarHandle.weakCompareAndSetAcquire}
          */
         WEAK_COMPARE_AND_SET_ACQUIRE("weakCompareAndSetAcquire", AccessType.COMPARE_AND_SWAP),
@@ -1234,15 +1687,87 @@
         /**
          * The access mode whose access is specified by the corresponding
          * method
+         * {@link VarHandle#getAndSetAcquire VarHandle.getAndSetAcquire}
+         */
+        GET_AND_SET_ACQUIRE("getAndSetAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndSetRelease VarHandle.getAndSetRelease}
+         */
+        GET_AND_SET_RELEASE("getAndSetRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
          * {@link VarHandle#getAndAdd VarHandle.getAndAdd}
          */
         GET_AND_ADD("getAndAdd", AccessType.GET_AND_UPDATE),
         /**
          * The access mode whose access is specified by the corresponding
          * method
-         * {@link VarHandle#addAndGet VarHandle.addAndGet}
+         * {@link VarHandle#getAndAddAcquire VarHandle.getAndAddAcquire}
          */
-        ADD_AND_GET("addAndGet", AccessType.GET_AND_UPDATE),
+        GET_AND_ADD_ACQUIRE("getAndAddAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndAddRelease VarHandle.getAndAddRelease}
+         */
+        GET_AND_ADD_RELEASE("getAndAddRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseOr VarHandle.getAndBitwiseOr}
+         */
+        GET_AND_BITWISE_OR("getAndBitwiseOr", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseOrRelease VarHandle.getAndBitwiseOrRelease}
+         */
+        GET_AND_BITWISE_OR_RELEASE("getAndBitwiseOrRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseOrAcquire VarHandle.getAndBitwiseOrAcquire}
+         */
+        GET_AND_BITWISE_OR_ACQUIRE("getAndBitwiseOrAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseAnd VarHandle.getAndBitwiseAnd}
+         */
+        GET_AND_BITWISE_AND("getAndBitwiseAnd", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseAndRelease VarHandle.getAndBitwiseAndRelease}
+         */
+        GET_AND_BITWISE_AND_RELEASE("getAndBitwiseAndRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseAndAcquire VarHandle.getAndBitwiseAndAcquire}
+         */
+        GET_AND_BITWISE_AND_ACQUIRE("getAndBitwiseAndAcquire", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseXor VarHandle.getAndBitwiseXor}
+         */
+        GET_AND_BITWISE_XOR("getAndBitwiseXor", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseXorRelease VarHandle.getAndBitwiseXorRelease}
+         */
+        GET_AND_BITWISE_XOR_RELEASE("getAndBitwiseXorRelease", AccessType.GET_AND_UPDATE),
+        /**
+         * The access mode whose access is specified by the corresponding
+         * method
+         * {@link VarHandle#getAndBitwiseXorAcquire VarHandle.getAndBitwiseXorAcquire}
+         */
+        GET_AND_BITWISE_XOR_ACQUIRE("getAndBitwiseXorAcquire", AccessType.GET_AND_UPDATE),
         ;
 
         static final Map<String, AccessMode> methodNameToAccessMode;
--- a/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/lang/invoke/X-VarHandle.java.template	Sat Sep 10 12:23:52 2016 -0700
@@ -156,7 +156,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -164,7 +164,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(FieldInstanceReadWrite handle, Object holder, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$Volatile(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -193,6 +193,20 @@
                                           handle.fieldOffset,
                                           {#if[Object]?handle.fieldType.cast(value):value});
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndSet$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndSet$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -204,12 +218,85 @@
         }
 
         @ForceInline
-        static $type$ addAndGet(FieldInstanceReadWrite handle, Object holder, $type$ value) {
-            return {#if[ShorterThanInt]?($type$)}(UNSAFE.getAndAdd$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+        static $type$ getAndAddAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
                                        handle.fieldOffset,
-                                       value) + value);
+                                       value);
         }
+
+        @ForceInline
+        static $type$ getAndAddRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
 #end[AtomicAdd]
+#if[Bitwise]
+
+        @ForceInline
+        static $type$ getAndBitwiseOr(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+        
+        @ForceInline
+        static $type$ getAndBitwiseXor(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Release(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(FieldInstanceReadWrite handle, Object holder, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Acquire(Objects.requireNonNull(handle.receiverType.cast(holder)),
+                                       handle.fieldOffset,
+                                       value);
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(FieldInstanceReadWrite.class, Object.class, $type$.class);
     }
@@ -337,7 +424,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$(handle.base,
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -345,7 +432,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(FieldStaticReadWrite handle, $type$ expected, $type$ value) {
             return UNSAFE.weakCompareAndSwap$Type$Volatile(handle.base,
                                                handle.fieldOffset,
                                                {#if[Object]?handle.fieldType.cast(expected):expected},
@@ -374,6 +461,20 @@
                                           handle.fieldOffset,
                                           {#if[Object]?handle.fieldType.cast(value):value});
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndSet$Type$Acquire(handle.base,
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndSet$Type$Release(handle.base,
+                                          handle.fieldOffset,
+                                          {#if[Object]?handle.fieldType.cast(value):value});
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -385,12 +486,84 @@
         }
 
         @ForceInline
-        static $type$ addAndGet(FieldStaticReadWrite handle, $type$ value) {
-            return {#if[ShorterThanInt]?($type$)}(UNSAFE.getAndAdd$Type$(handle.base,
+        static $type$ getAndAddAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Acquire(handle.base,
                                        handle.fieldOffset,
-                                       value) + value);
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndAdd$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
         }
 #end[AtomicAdd]
+#if[Bitwise]
+
+        @ForceInline
+        static $type$ getAndBitwiseOr(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseOr$Type$Acquire(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseAnd$Type$Acquire(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXor(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Release(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(FieldStaticReadWrite handle, $type$ value) {
+            return UNSAFE.getAndBitwiseXor$Type$Acquire(handle.base,
+                                       handle.fieldOffset,
+                                       value);
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(FieldStaticReadWrite.class, null, $type$.class);
     }
@@ -562,7 +735,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
 #if[Object]
             Object[] array = (Object[]) handle.arrayType.cast(oarray);
 #else[Object]
@@ -575,7 +748,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(Array handle, Object oarray, int index, $type$ expected, $type$ value) {
 #if[Object]
             Object[] array = (Object[]) handle.arrayType.cast(oarray);
 #else[Object]
@@ -624,33 +797,131 @@
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                     {#if[Object]?handle.componentType.cast(value):value});
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(Array handle, Object oarray, int index, $type$ value) {
+#if[Object]
+            Object[] array = (Object[]) handle.arrayType.cast(oarray);
+#else[Object]
+            $type$[] array = ($type$[]) oarray;
+#end[Object]
+            return UNSAFE.getAndSet$Type$Acquire(array,
+                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                    {#if[Object]?handle.componentType.cast(value):value});
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(Array handle, Object oarray, int index, $type$ value) {
+#if[Object]
+            Object[] array = (Object[]) handle.arrayType.cast(oarray);
+#else[Object]
+            $type$[] array = ($type$[]) oarray;
+#end[Object]
+            return UNSAFE.getAndSet$Type$Release(array,
+                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                    {#if[Object]?handle.componentType.cast(value):value});
+        }
 #end[CAS]
 #if[AtomicAdd]
 
         @ForceInline
         static $type$ getAndAdd(Array handle, Object oarray, int index, $type$ value) {
-#if[Object]
-            Object[] array = (Object[]) handle.arrayType.cast(oarray);
-#else[Object]
             $type$[] array = ($type$[]) oarray;
-#end[Object]
             return UNSAFE.getAndAdd$Type$(array,
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
                     value);
         }
 
         @ForceInline
-        static $type$ addAndGet(Array handle, Object oarray, int index, $type$ value) {
-#if[Object]
-            Object[] array = (Object[]) handle.arrayType.cast(oarray);
-#else[Object]
+        static $type$ getAndAddAcquire(Array handle, Object oarray, int index, $type$ value) {
             $type$[] array = ($type$[]) oarray;
-#end[Object]
-            return {#if[ShorterThanInt]?($type$)}(UNSAFE.getAndAdd$Type$(array,
+            return UNSAFE.getAndAdd$Type$Acquire(array,
                     (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
-                    value) + value);
+                    value);
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndAdd$Type$Release(array,
+                    (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                    value);
         }
 #end[AtomicAdd]
+#if[Bitwise]
+
+        @ForceInline
+        static $type$ getAndBitwiseOr(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseOr$Type$(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseOr$Type$Release(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseOr$Type$Acquire(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseAnd$Type$(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseAnd$Type$Release(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseAnd$Type$Acquire(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+        
+        @ForceInline
+        static $type$ getAndBitwiseXor(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseXor$Type$(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseXor$Type$Release(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(Array handle, Object oarray, int index, $type$ value) {
+            $type$[] array = ($type$[]) oarray;
+            return UNSAFE.getAndBitwiseXor$Type$Acquire(array,
+                                       (((long) Preconditions.checkIndex(index, array.length, AIOOBE_SUPPLIER)) << handle.ashift) + handle.abase,
+                                       value);
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(Array.class, {#if[Object]?Object[].class:$type$[].class}, {#if[Object]?Object.class:$type$.class}, int.class);
     }
--- a/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template	Sat Sep 10 12:23:52 2016 -0700
@@ -223,7 +223,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
             byte[] ba = (byte[]) oba;
             return UNSAFE.weakCompareAndSwap$RawType$(
                     ba,
@@ -232,7 +232,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(ArrayHandle handle, Object oba, int index, $type$ expected, $type$ value) {
             byte[] ba = (byte[]) oba;
             return UNSAFE.weakCompareAndSwap$RawType$Volatile(
                     ba,
@@ -267,6 +267,26 @@
                                       address(ba, index(ba, index)),
                                       convEndian(handle.be, value)));
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Acquire(
+                                      ba,
+                                      address(ba, index(ba, index)),
+                                      convEndian(handle.be, value)));
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Release(
+                                      ba,
+                                      address(ba, index(ba, index)),
+                                      convEndian(handle.be, value)));
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -284,6 +304,32 @@
         }
 
         @ForceInline
+        static $type$ getAndAddAcquire(ArrayHandle handle, Object oba, int index, $type$ delta) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(ba, index, delta);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(ArrayHandle handle, Object oba, int index, $type$ delta) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(ba, index, delta);
+            }
+        }
+
+        @ForceInline
         static $type$ getAndAddConvEndianWithCAS(byte[] ba, int index, $type$ delta) {
             $type$ nativeExpectedValue, expectedValue;
             long offset = address(ba, index(ba, index));
@@ -294,12 +340,162 @@
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue + delta)));
             return expectedValue;
         }
+#end[AtomicAdd]
+#if[Bitwise]
 
         @ForceInline
-        static $type$ addAndGet(ArrayHandle handle, Object oba, int index, $type$ delta) {
-            return getAndAdd(handle, oba, index, delta) + delta;
+        static $type$ getAndBitwiseOr(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(ba, index, value);
+            }
         }
-#end[AtomicAdd]
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrConvEndianWithCAS(byte[] ba, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            long offset = address(ba, index(ba, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue | value)));
+            return expectedValue;
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndConvEndianWithCAS(byte[] ba, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            long offset = address(ba, index(ba, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue & value)));
+            return expectedValue;
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXor(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Release(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(ArrayHandle handle, Object oba, int index, $type$ value) {
+            byte[] ba = (byte[]) oba;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Acquire(
+                        ba,
+                        address(ba, index(ba, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(ba, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorConvEndianWithCAS(byte[] ba, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            long offset = address(ba, index(ba, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(ba, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(ba, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue ^ value)));
+            return expectedValue;
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(ArrayHandle.class, byte[].class, $type$.class, int.class);
     }
@@ -466,7 +662,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSetPlain(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
             return UNSAFE.weakCompareAndSwap$RawType$(
                     UNSAFE.getObject(bb, BYTE_BUFFER_HB),
@@ -475,7 +671,7 @@
         }
 
         @ForceInline
-        static boolean weakCompareAndSetVolatile(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
+        static boolean weakCompareAndSet(ByteBufferHandle handle, Object obb, int index, $type$ expected, $type$ value) {
             ByteBuffer bb = (ByteBuffer) obb;
             return UNSAFE.weakCompareAndSwap$RawType$Volatile(
                     UNSAFE.getObject(bb, BYTE_BUFFER_HB),
@@ -510,6 +706,26 @@
                                       address(bb, indexRO(bb, index)),
                                       convEndian(handle.be, value)));
         }
+
+        @ForceInline
+        static $type$ getAndSetAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Acquire(
+                                      UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                                      address(bb, indexRO(bb, index)),
+                                      convEndian(handle.be, value)));
+        }
+
+        @ForceInline
+        static $type$ getAndSetRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            return convEndian(handle.be,
+                              UNSAFE.getAndSet$RawType$Release(
+                                      UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                                      address(bb, indexRO(bb, index)),
+                                      convEndian(handle.be, value)));
+        }
 #end[CAS]
 #if[AtomicAdd]
 
@@ -527,6 +743,32 @@
         }
 
         @ForceInline
+        static $type$ getAndAddAcquire(ByteBufferHandle handle, Object obb, int index, $type$ delta) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(bb, index, delta);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndAddRelease(ByteBufferHandle handle, Object obb, int index, $type$ delta) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndAdd$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        delta);
+            } else {
+                return getAndAddConvEndianWithCAS(bb, index, delta);
+            }
+        }
+
+        @ForceInline
         static $type$ getAndAddConvEndianWithCAS(ByteBuffer bb, int index, $type$ delta) {
             $type$ nativeExpectedValue, expectedValue;
             Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
@@ -538,12 +780,166 @@
                     nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue + delta)));
             return expectedValue;
         }
+#end[AtomicAdd]
+#if[Bitwise]
 
         @ForceInline
-        static $type$ addAndGet(ByteBufferHandle handle, Object obb, int index, $type$ delta) {
-            return getAndAdd(handle, obb, index, delta) + delta;
+        static $type$ getAndBitwiseOr(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(bb, index, value);
+            }
         }
-#end[AtomicAdd]
+
+        @ForceInline
+        static $type$ getAndBitwiseOrRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseOr$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseOrConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseOrConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
+            long offset = address(bb, indexRO(bb, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue | value)));
+            return expectedValue;
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAnd(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseAnd$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseAndConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseAndConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
+            long offset = address(bb, indexRO(bb, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue & value)));
+            return expectedValue;
+        }
+        
+        
+        @ForceInline
+        static $type$ getAndBitwiseXor(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorRelease(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Release(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorAcquire(ByteBufferHandle handle, Object obb, int index, $type$ value) {
+            ByteBuffer bb = (ByteBuffer) obb;
+            if (handle.be == BE) {
+                return UNSAFE.getAndBitwiseXor$RawType$Acquire(
+                        UNSAFE.getObject(bb, BYTE_BUFFER_HB),
+                        address(bb, indexRO(bb, index)),
+                        value);
+            } else {
+                return getAndBitwiseXorConvEndianWithCAS(bb, index, value);
+            }
+        }
+
+        @ForceInline
+        static $type$ getAndBitwiseXorConvEndianWithCAS(ByteBuffer bb, int index, $type$ value) {
+            $type$ nativeExpectedValue, expectedValue;
+            Object base = UNSAFE.getObject(bb, BYTE_BUFFER_HB);
+            long offset = address(bb, indexRO(bb, index));
+            do {
+                nativeExpectedValue = UNSAFE.get$RawType$Volatile(base, offset);
+                expectedValue = $RawBoxType$.reverseBytes(nativeExpectedValue);
+            } while (!UNSAFE.weakCompareAndSwap$RawType$Volatile(base, offset,
+                    nativeExpectedValue, $RawBoxType$.reverseBytes(expectedValue ^ value)));
+            return expectedValue;
+        }
+#end[Bitwise]
 
         static final VarForm FORM = new VarForm(ByteBufferHandle.class, ByteBuffer.class, $type$.class, int.class);
     }
--- a/src/java.base/share/classes/java/lang/ref/package-info.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/lang/ref/package-info.java	Sat Sep 10 12:23:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,8 +43,7 @@
  * implementing memory-sensitive caches, weak references are for
  * implementing canonicalizing mappings that do not prevent their keys
  * (or values) from being reclaimed, and phantom references are for
- * scheduling pre-mortem cleanup actions in a more flexible way than
- * is possible with the Java finalization mechanism.
+ * scheduling post-mortem cleanup actions.
  * Post-mortem cleanup actions can be registered and managed by a
  * {@link java.lang.ref.Cleaner}.
  *
--- a/src/java.base/share/classes/java/security/DigestInputStream.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/security/DigestInputStream.java	Sat Sep 10 12:23:52 2016 -0700
@@ -52,7 +52,7 @@
  * {@link MessageDigest}),
  * so that in order to compute intermediate digests, a caller should
  * retain a handle onto the digest object, and clone it for each
- * digest to be computed, leaving the orginal digest untouched.
+ * digest to be computed, leaving the original digest untouched.
  *
  * @see MessageDigest
  *
--- a/src/java.base/share/classes/java/security/KeyPairGenerator.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/security/KeyPairGenerator.java	Sat Sep 10 12:23:52 2016 -0700
@@ -76,7 +76,7 @@
  * {@code g} parameters. If the modulus size is not one of the above
  * values, the <i>Sun</i> provider creates a new set of parameters. Other
  * providers might have precomputed parameter sets for more than just the
- * three modulus sizes mentioned above. Still others might not have a list of
+ * modulus sizes mentioned above. Still others might not have a list of
  * precomputed parameters at all and instead always create new parameter sets.
  *
  * <li><b>Algorithm-Specific Initialization</b>
@@ -393,7 +393,7 @@
      * of randomness.
      * (If none of the installed providers supply an implementation of
      * {@code SecureRandom}, a system-provided source of randomness is
-     * used.).
+     * used.)
      *
      * <p>This concrete method has been added to this previously-defined
      * abstract class.
--- a/src/java.base/share/classes/java/security/SignatureSpi.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/security/SignatureSpi.java	Sat Sep 10 12:23:52 2016 -0700
@@ -38,7 +38,7 @@
  * for the {@code Signature} class, which is used to provide the
  * functionality of a digital signature algorithm. Digital signatures are used
  * for authentication and integrity assurance of digital data.
- *.
+ *
  * <p> All the abstract methods in this class must be implemented by each
  * cryptographic service provider who wishes to supply the implementation
  * of a particular signature algorithm.
--- a/src/java.base/share/classes/java/util/Base64.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/Base64.java	Sat Sep 10 12:23:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -788,7 +788,7 @@
         public void write(byte[] b, int off, int len) throws IOException {
             if (closed)
                 throw new IOException("Stream is closed");
-            if (off < 0 || len < 0 || off + len > b.length)
+            if (off < 0 || len < 0 || len > b.length - off)
                 throw new ArrayIndexOutOfBoundsException();
             if (len == 0)
                 return;
--- a/src/java.base/share/classes/java/util/ImmutableCollections.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/ImmutableCollections.java	Sat Sep 10 12:23:52 2016 -0700
@@ -31,6 +31,10 @@
 import java.io.ObjectOutputStream;
 import java.io.ObjectStreamException;
 import java.io.Serializable;
+import java.util.function.BiFunction;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.function.UnaryOperator;
 
 /**
  * Container class for immutable collections. Not part of the public API.
@@ -61,9 +65,25 @@
      */
     static final double EXPAND_FACTOR = 2.0;
 
+    static UnsupportedOperationException uoe() { return new UnsupportedOperationException(); }
+
     // ---------- List Implementations ----------
 
-    static final class List0<E> extends AbstractList<E> implements RandomAccess, Serializable {
+    abstract static class AbstractImmutableList<E> extends AbstractList<E>
+                                                implements RandomAccess, Serializable {
+        @Override public boolean add(E e) { throw uoe(); }
+        @Override public boolean addAll(Collection<? extends E> c) { throw uoe(); }
+        @Override public boolean addAll(int index, Collection<? extends E> c) { throw uoe(); }
+        @Override public void    clear() { throw uoe(); }
+        @Override public boolean remove(Object o) { throw uoe(); }
+        @Override public boolean removeAll(Collection<?> c) { throw uoe(); }
+        @Override public boolean removeIf(Predicate<? super E> filter) { throw uoe(); }
+        @Override public void    replaceAll(UnaryOperator<E> operator) { throw uoe(); }
+        @Override public boolean retainAll(Collection<?> c) { throw uoe(); }
+        @Override public void    sort(Comparator<? super E> c) { throw uoe(); }
+    }
+
+    static final class List0<E> extends AbstractImmutableList<E> {
         List0() { }
 
         @Override
@@ -86,7 +106,7 @@
         }
     }
 
-    static final class List1<E> extends AbstractList<E> implements RandomAccess, Serializable {
+    static final class List1<E> extends AbstractImmutableList<E> {
         private final E e0;
 
         List1(E e0) {
@@ -114,7 +134,7 @@
         }
     }
 
-    static final class List2<E> extends AbstractList<E> implements RandomAccess, Serializable {
+    static final class List2<E> extends AbstractImmutableList<E> {
         private final E e0;
         private final E e1;
 
@@ -147,7 +167,7 @@
         }
     }
 
-    static final class ListN<E> extends AbstractList<E> implements RandomAccess, Serializable {
+    static final class ListN<E> extends AbstractImmutableList<E> {
         private final E[] elements;
 
         @SafeVarargs
@@ -183,7 +203,17 @@
 
     // ---------- Set Implementations ----------
 
-    static final class Set0<E> extends AbstractSet<E> implements Serializable {
+    abstract static class AbstractImmutableSet<E> extends AbstractSet<E> implements Serializable {
+        @Override public boolean add(E e) { throw uoe(); }
+        @Override public boolean addAll(Collection<? extends E> c) { throw uoe(); }
+        @Override public void    clear() { throw uoe(); }
+        @Override public boolean remove(Object o) { throw uoe(); }
+        @Override public boolean removeAll(Collection<?> c) { throw uoe(); }
+        @Override public boolean removeIf(Predicate<? super E> filter) { throw uoe(); }
+        @Override public boolean retainAll(Collection<?> c) { throw uoe(); }
+    }
+
+    static final class Set0<E> extends AbstractImmutableSet<E> {
         Set0() { }
 
         @Override
@@ -210,7 +240,7 @@
         }
     }
 
-    static final class Set1<E> extends AbstractSet<E> implements Serializable {
+    static final class Set1<E> extends AbstractImmutableSet<E> {
         private final E e0;
 
         Set1(E e0) {
@@ -241,7 +271,7 @@
         }
     }
 
-    static final class Set2<E> extends AbstractSet<E> implements Serializable {
+    static final class Set2<E> extends AbstractImmutableSet<E> {
         private final E e0;
         private final E e1;
 
@@ -312,7 +342,7 @@
      * least one null is always present.
      * @param <E> the element type
      */
-    static final class SetN<E> extends AbstractSet<E> implements Serializable {
+    static final class SetN<E> extends AbstractImmutableSet<E> {
         private final E[] elements;
         private final int size;
 
@@ -403,7 +433,23 @@
 
     // ---------- Map Implementations ----------
 
-    static final class Map0<K,V> extends AbstractMap<K,V> implements Serializable {
+    abstract static class AbstractImmutableMap<K,V> extends AbstractMap<K,V> implements Serializable {
+        @Override public void clear() { throw uoe(); }
+        @Override public V compute(K key, BiFunction<? super K,? super V,? extends V> rf) { throw uoe(); }
+        @Override public V computeIfAbsent(K key, Function<? super K,? extends V> mf) { throw uoe(); }
+        @Override public V computeIfPresent(K key, BiFunction<? super K,? super V,? extends V> rf) { throw uoe(); }
+        @Override public V merge(K key, V value, BiFunction<? super V,? super V,? extends V> rf) { throw uoe(); }
+        @Override public V put(K key, V value) { throw uoe(); }
+        @Override public void putAll(Map<? extends K,? extends V> m) { throw uoe(); }
+        @Override public V putIfAbsent(K key, V value) { throw uoe(); }
+        @Override public V remove(Object key) { throw uoe(); }
+        @Override public boolean remove(Object key, Object value) { throw uoe(); }
+        @Override public V replace(K key, V value) { throw uoe(); }
+        @Override public boolean replace(K key, V oldValue, V newValue) { throw uoe(); }
+        @Override public void replaceAll(BiFunction<? super K,? super V,? extends V> f) { throw uoe(); }
+    }
+
+    static final class Map0<K,V> extends AbstractImmutableMap<K,V> {
         Map0() { }
 
         @Override
@@ -430,7 +476,7 @@
         }
     }
 
-    static final class Map1<K,V> extends AbstractMap<K,V> implements Serializable {
+    static final class Map1<K,V> extends AbstractImmutableMap<K,V> {
         private final K k0;
         private final V v0;
 
@@ -472,7 +518,7 @@
      * @param <K> the key type
      * @param <V> the value type
      */
-    static final class MapN<K,V> extends AbstractMap<K,V> implements Serializable {
+    static final class MapN<K,V> extends AbstractImmutableMap<K,V> {
         private final Object[] table; // pairs of key, value
         private final int size; // number of pairs
 
--- a/src/java.base/share/classes/java/util/List.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/List.java	Sat Sep 10 12:23:52 2016 -0700
@@ -94,7 +94,8 @@
  *
  * <ul>
  * <li>They are <em>structurally immutable</em>. Elements cannot be added, removed,
- * or replaced. Attempts to do so result in {@code UnsupportedOperationException}.
+ * or replaced. Calling any mutator method will always cause
+ * {@code UnsupportedOperationException} to be thrown.
  * However, if the contained elements are themselves mutable,
  * this may cause the List's contents to appear to change.
  * <li>They disallow {@code null} elements. Attempts to create them with
--- a/src/java.base/share/classes/java/util/Map.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/Map.java	Sat Sep 10 12:23:52 2016 -0700
@@ -119,7 +119,8 @@
  *
  * <ul>
  * <li>They are <em>structurally immutable</em>. Keys and values cannot be added,
- * removed, or updated. Attempts to do so result in {@code UnsupportedOperationException}.
+ * removed, or updated. Calling any mutator method will always cause
+ * {@code UnsupportedOperationException} to be thrown.
  * However, if the contained keys or values are themselves mutable, this may cause the
  * Map to behave inconsistently or its contents to appear to change.
  * <li>They disallow {@code null} keys and values. Attempts to create them with
--- a/src/java.base/share/classes/java/util/Set.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/Set.java	Sat Sep 10 12:23:52 2016 -0700
@@ -70,7 +70,8 @@
  *
  * <ul>
  * <li>They are <em>structurally immutable</em>. Elements cannot be added or
- * removed. Attempts to do so result in {@code UnsupportedOperationException}.
+ * removed. Calling any mutator method will always cause
+ * {@code UnsupportedOperationException} to be thrown.
  * However, if the contained elements are themselves mutable, this may cause the
  * Set to behave inconsistently or its contents to appear to change.
  * <li>They disallow {@code null} elements. Attempts to create them with
--- a/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/CompletableFuture.java	Sat Sep 10 12:23:52 2016 -0700
@@ -521,7 +521,7 @@
                 else
                     break;
             }
-            else if (STACK.weakCompareAndSetVolatile(this, p, (p = p.next)))
+            else if (STACK.weakCompareAndSet(this, p, (p = p.next)))
                 unlinked = true;
             else
                 p = stack;
@@ -532,7 +532,7 @@
             if (q.isLive()) {
                 p = q;
                 q = s;
-            } else if (NEXT.weakCompareAndSetVolatile(p, q, s))
+            } else if (NEXT.weakCompareAndSet(p, q, s))
                 break;
             else
                 q = p.next;
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedDeque.java	Sat Sep 10 12:23:52 2016 -0700
@@ -330,7 +330,7 @@
                         // for e to become an element of this deque,
                         // and for newNode to become "live".
                         if (p != h) // hop two nodes at a time; failure is OK
-                            HEAD.weakCompareAndSetVolatile(this, h, newNode);
+                            HEAD.weakCompareAndSet(this, h, newNode);
                         return;
                     }
                     // Lost CAS race to another thread; re-read prev
@@ -362,7 +362,7 @@
                         // for e to become an element of this deque,
                         // and for newNode to become "live".
                         if (p != t) // hop two nodes at a time; failure is OK
-                            TAIL.weakCompareAndSetVolatile(this, t, newNode);
+                            TAIL.weakCompareAndSet(this, t, newNode);
                         return;
                     }
                     // Lost CAS race to another thread; re-read next
@@ -1153,12 +1153,12 @@
                     if (NEXT.compareAndSet(p, null, beginningOfTheEnd)) {
                         // Successful CAS is the linearization point
                         // for all elements to be added to this deque.
-                        if (!TAIL.weakCompareAndSetVolatile(this, t, last)) {
+                        if (!TAIL.weakCompareAndSet(this, t, last)) {
                             // Try a little harder to update tail,
                             // since we may be adding many elements.
                             t = tail;
                             if (last.next == null)
-                                TAIL.weakCompareAndSetVolatile(this, t, last);
+                                TAIL.weakCompareAndSet(this, t, last);
                         }
                         return true;
                     }
--- a/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/ConcurrentLinkedQueue.java	Sat Sep 10 12:23:52 2016 -0700
@@ -308,7 +308,7 @@
                     // for e to become an element of this queue,
                     // and for newNode to become "live".
                     if (p != t) // hop two nodes at a time; failure is OK
-                        TAIL.weakCompareAndSetVolatile(this, t, newNode);
+                        TAIL.weakCompareAndSet(this, t, newNode);
                     return true;
                 }
                 // Lost CAS race to another thread; re-read next
@@ -477,7 +477,7 @@
 
                 next = succ(p);
                 if (pred != null && next != null) // unlink
-                    NEXT.weakCompareAndSetVolatile(pred, p, next);
+                    NEXT.weakCompareAndSet(pred, p, next);
                 if (removed)
                     return true;
             }
@@ -524,12 +524,12 @@
                 if (NEXT.compareAndSet(p, null, beginningOfTheEnd)) {
                     // Successful CAS is the linearization point
                     // for all elements to be added to this queue.
-                    if (!TAIL.weakCompareAndSetVolatile(this, t, last)) {
+                    if (!TAIL.weakCompareAndSet(this, t, last)) {
                         // Try a little harder to update tail,
                         // since we may be adding many elements.
                         t = tail;
                         if (last.next == null)
-                            TAIL.weakCompareAndSetVolatile(this, t, last);
+                            TAIL.weakCompareAndSet(this, t, last);
                     }
                     return true;
                 }
--- a/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/CountedCompleter.java	Sat Sep 10 12:23:52 2016 -0700
@@ -551,7 +551,7 @@
     public final int decrementPendingCountUnlessZero() {
         int c;
         do {} while ((c = pending) != 0 &&
-                     !PENDING.weakCompareAndSetVolatile(this, c, c - 1));
+                     !PENDING.weakCompareAndSet(this, c, c - 1));
         return c;
     }
 
@@ -584,7 +584,7 @@
                     return;
                 }
             }
-            else if (PENDING.weakCompareAndSetVolatile(a, c, c - 1))
+            else if (PENDING.weakCompareAndSet(a, c, c - 1))
                 return;
         }
     }
@@ -607,7 +607,7 @@
                     return;
                 }
             }
-            else if (PENDING.weakCompareAndSetVolatile(a, c, c - 1))
+            else if (PENDING.weakCompareAndSet(a, c, c - 1))
                 return;
         }
     }
@@ -652,7 +652,7 @@
         for (int c;;) {
             if ((c = pending) == 0)
                 return this;
-            else if (PENDING.weakCompareAndSetVolatile(this, c, c - 1))
+            else if (PENDING.weakCompareAndSet(this, c, c - 1))
                 return null;
         }
     }
--- a/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java	Sat Sep 10 12:23:52 2016 -0700
@@ -42,15 +42,10 @@
 import java.security.Permissions;
 import java.security.ProtectionDomain;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.function.Predicate;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.CountedCompleter;
-import java.util.concurrent.ForkJoinTask;
-import java.util.concurrent.ForkJoinWorkerThread;
 import java.util.concurrent.locks.LockSupport;
 
 /**
@@ -1413,7 +1408,7 @@
         }
         if (phase != QUIET) {                         // else pre-adjusted
             long c;                                   // decrement counts
-            do {} while (!CTL.weakCompareAndSetVolatile
+            do {} while (!CTL.weakCompareAndSet
                          (this, c = ctl, ((RC_MASK & (c - RC_UNIT)) |
                                           (TC_MASK & (c - TC_UNIT)) |
                                           (SP_MASK & c))));
@@ -1608,7 +1603,7 @@
                     do {
                         w.stackPred = (int)(c = ctl);
                         nc = ((c - RC_UNIT) & UC_MASK) | (SP_MASK & np);
-                    } while (!CTL.weakCompareAndSetVolatile(this, c, nc));
+                    } while (!CTL.weakCompareAndSet(this, c, nc));
                 }
                 else {                                  // already queued
                     int pred = w.stackPred;
--- a/src/java.base/share/classes/java/util/concurrent/FutureTask.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/FutureTask.java	Sat Sep 10 12:23:52 2016 -0700
@@ -361,7 +361,7 @@
     private void finishCompletion() {
         // assert state > COMPLETING;
         for (WaitNode q; (q = waiters) != null;) {
-            if (WAITERS.weakCompareAndSetVolatile(this, q, null)) {
+            if (WAITERS.weakCompareAndSet(this, q, null)) {
                 for (;;) {
                     Thread t = q.thread;
                     if (t != null) {
@@ -423,7 +423,7 @@
                 q = new WaitNode();
             }
             else if (!queued)
-                queued = WAITERS.weakCompareAndSetVolatile(this, q.next = waiters, q);
+                queued = WAITERS.weakCompareAndSet(this, q.next = waiters, q);
             else if (timed) {
                 final long parkNanos;
                 if (startTime == 0L) { // first time
--- a/src/java.base/share/classes/java/util/concurrent/Phaser.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/Phaser.java	Sat Sep 10 12:23:52 2016 -0700
@@ -456,7 +456,7 @@
                         // finish registration whenever parent registration
                         // succeeded, even when racing with termination,
                         // since these are part of the same "transaction".
-                        while (!STATE.weakCompareAndSetVolatile
+                        while (!STATE.weakCompareAndSet
                                (this, s,
                                 ((long)phase << PHASE_SHIFT) | adjust)) {
                             s = state;
@@ -488,7 +488,7 @@
             // CAS to root phase with current parties, tripping unarrived
             while ((phase = (int)(root.state >>> PHASE_SHIFT)) !=
                    (int)(s >>> PHASE_SHIFT) &&
-                   !STATE.weakCompareAndSetVolatile
+                   !STATE.weakCompareAndSet
                    (this, s,
                     s = (((long)phase << PHASE_SHIFT) |
                          ((phase < 0) ? (s & COUNTS_MASK) :
--- a/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/SubmissionPublisher.java	Sat Sep 10 12:23:52 2016 -0700
@@ -1203,7 +1203,7 @@
                     } catch (RuntimeException | Error ex) { // back out
                         do {} while (((c = ctl) & DISABLED) == 0 &&
                                      (c & ACTIVE) != 0 &&
-                                     !CTL.weakCompareAndSetVolatile
+                                     !CTL.weakCompareAndSet
                                      (this, c, c & ~ACTIVE));
                         throw ex;
                     }
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicBoolean.java	Sat Sep 10 12:23:52 2016 -0700
@@ -106,16 +106,16 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
      */
     public boolean weakCompareAndSet(boolean expectedValue, boolean newValue) {
-        return VALUE.weakCompareAndSet(this,
-                                       (expectedValue ? 1 : 0),
-                                       (newValue ? 1 : 0));
+        return VALUE.weakCompareAndSetPlain(this,
+                                            (expectedValue ? 1 : 0),
+                                            (newValue ? 1 : 0));
     }
 
     /**
@@ -285,7 +285,7 @@
      * Possibly atomically sets the value to {@code newValue} if the current
      * value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -293,9 +293,9 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(boolean expectedValue, boolean newValue) {
-        return VALUE.weakCompareAndSetVolatile(this,
-                                               (expectedValue ? 1 : 0),
-                                               (newValue ? 1 : 0));
+        return VALUE.weakCompareAndSet(this,
+                                       (expectedValue ? 1 : 0),
+                                       (newValue ? 1 : 0));
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicInteger.java	Sat Sep 10 12:23:52 2016 -0700
@@ -146,7 +146,7 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -217,7 +217,7 @@
 
     /**
      * Atomically adds the given value to the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param delta the value to add
      * @return the updated value
@@ -490,7 +490,7 @@
      * Possibly atomically sets the value to {@code newValue} if
      * the current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerArray.java	Sat Sep 10 12:23:52 2016 -0700
@@ -149,7 +149,7 @@
     /**
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -157,7 +157,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(int i, int expectedValue, int newValue) {
-        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
@@ -200,7 +200,7 @@
 
     /**
      * Atomically increments the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, 1)}.
      *
@@ -208,12 +208,12 @@
      * @return the updated value
      */
     public final int incrementAndGet(int i) {
-        return (int)AA.addAndGet(array, i, 1);
+        return (int)AA.getAndAdd(array, i, 1) + 1;
     }
 
     /**
      * Atomically decrements the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, -1)}.
      *
@@ -221,19 +221,19 @@
      * @return the updated value
      */
     public final int decrementAndGet(int i) {
-        return (int)AA.addAndGet(array, i, -1);
+        return (int)AA.getAndAdd(array, i, -1) - 1;
     }
 
     /**
      * Atomically adds the given value to the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param i the index
      * @param delta the value to add
      * @return the updated value
      */
     public final int addAndGet(int i, int delta) {
-        return (int)AA.addAndGet(array, i, delta);
+        return (int)AA.getAndAdd(array, i, delta) + delta;
     }
 
     /**
@@ -489,7 +489,7 @@
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -498,7 +498,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(int i, int expectedValue, int newValue) {
-        return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLong.java	Sat Sep 10 12:23:52 2016 -0700
@@ -162,7 +162,7 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -209,7 +209,7 @@
 
     /**
      * Atomically increments the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(1)}.
      *
@@ -221,7 +221,7 @@
 
     /**
      * Atomically decrements the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(-1)}.
      *
@@ -233,7 +233,7 @@
 
     /**
      * Atomically adds the given value to the current value,
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param delta the value to add
      * @return the updated value
@@ -504,7 +504,7 @@
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicLongArray.java	Sat Sep 10 12:23:52 2016 -0700
@@ -149,7 +149,7 @@
     /**
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -157,7 +157,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(int i, long expectedValue, long newValue) {
-        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
@@ -200,7 +200,7 @@
 
     /**
      * Atomically increments the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, 1)}.
      *
@@ -208,12 +208,12 @@
      * @return the updated value
      */
     public final long incrementAndGet(int i) {
-        return (long)AA.addAndGet(array, i, 1L);
+        return (long)AA.getAndAdd(array, i, 1L) + 1L;
     }
 
     /**
      * Atomically decrements the value of the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * <p>Equivalent to {@code addAndGet(i, -1)}.
      *
@@ -221,19 +221,19 @@
      * @return the updated value
      */
     public final long decrementAndGet(int i) {
-        return (long)AA.addAndGet(array, i, -1L);
+        return (long)AA.getAndAdd(array, i, -1L) - 1L;
     }
 
     /**
      * Atomically adds the given value to the element at index {@code i},
-     * with memory effects as specified by {@link VarHandle#addAndGet}.
+     * with memory effects as specified by {@link VarHandle#getAndAdd}.
      *
      * @param i the index
      * @param delta the value to add
      * @return the updated value
      */
     public long addAndGet(int i, long delta) {
-        return (long)AA.addAndGet(array, i, delta);
+        return (long)AA.getAndAdd(array, i, delta) + delta;
     }
 
     /**
@@ -489,7 +489,7 @@
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -498,7 +498,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(int i, long expectedValue, long newValue) {
-        return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReference.java	Sat Sep 10 12:23:52 2016 -0700
@@ -125,14 +125,14 @@
     /**
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(V expectedValue, V newValue) {
-        return VALUE.weakCompareAndSet(this, expectedValue, newValue);
+        return VALUE.weakCompareAndSetPlain(this, expectedValue, newValue);
     }
 
     /**
@@ -370,7 +370,7 @@
      * Possibly atomically sets the value to {@code newValue}
      * if the current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param expectedValue the expected value
      * @param newValue the new value
@@ -378,7 +378,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(V expectedValue, V newValue) {
-        return VALUE.weakCompareAndSetVolatile(this, expectedValue, newValue);
+        return VALUE.weakCompareAndSet(this, expectedValue, newValue);
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/atomic/AtomicReferenceArray.java	Sat Sep 10 12:23:52 2016 -0700
@@ -155,7 +155,7 @@
     /**
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
-     * with memory effects as specified by {@link VarHandle#weakCompareAndSet}.
+     * with memory effects as specified by {@link VarHandle#weakCompareAndSetPlain}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -163,7 +163,7 @@
      * @return {@code true} if successful
      */
     public final boolean weakCompareAndSet(int i, E expectedValue, E newValue) {
-        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSetPlain(array, i, expectedValue, newValue);
     }
 
     /**
@@ -451,7 +451,7 @@
      * Possibly atomically sets the element at index {@code i} to
      * {@code newValue} if the element's current value {@code == expectedValue},
      * with memory effects as specified by
-     * {@link VarHandle#weakCompareAndSetVolatile}.
+     * {@link VarHandle#weakCompareAndSet}.
      *
      * @param i the index
      * @param expectedValue the expected value
@@ -460,7 +460,7 @@
      * @since 9
      */
     public final boolean weakCompareAndSetVolatile(int i, E expectedValue, E newValue) {
-        return AA.weakCompareAndSetVolatile(array, i, expectedValue, newValue);
+        return AA.weakCompareAndSet(array, i, expectedValue, newValue);
     }
 
     /**
--- a/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/concurrent/locks/StampedLock.java	Sat Sep 10 12:23:52 2016 -0700
@@ -1123,14 +1123,14 @@
             }
             else if ((p = wtail) == null) { // initialize queue
                 WNode hd = new WNode(WMODE, null);
-                if (WHEAD.weakCompareAndSetVolatile(this, null, hd))
+                if (WHEAD.weakCompareAndSet(this, null, hd))
                     wtail = hd;
             }
             else if (node == null)
                 node = new WNode(WMODE, p);
             else if (node.prev != p)
                 node.prev = p;
-            else if (WTAIL.weakCompareAndSetVolatile(this, p, node)) {
+            else if (WTAIL.weakCompareAndSet(this, p, node)) {
                 p.next = node;
                 break;
             }
@@ -1162,7 +1162,7 @@
             else if (h != null) { // help release stale waiters
                 WNode c; Thread w;
                 while ((c = h.cowait) != null) {
-                    if (WCOWAIT.weakCompareAndSetVolatile(h, c, c.cowait) &&
+                    if (WCOWAIT.weakCompareAndSet(h, c, c.cowait) &&
                         (w = c.thread) != null)
                         LockSupport.unpark(w);
                 }
@@ -1247,7 +1247,7 @@
             }
             if (p == null) { // initialize queue
                 WNode hd = new WNode(WMODE, null);
-                if (WHEAD.weakCompareAndSetVolatile(this, null, hd))
+                if (WHEAD.weakCompareAndSet(this, null, hd))
                     wtail = hd;
             }
             else if (node == null)
@@ -1255,7 +1255,7 @@
             else if (h == p || p.mode != RMODE) {
                 if (node.prev != p)
                     node.prev = p;
-                else if (WTAIL.weakCompareAndSetVolatile(this, p, node)) {
+                else if (WTAIL.weakCompareAndSet(this, p, node)) {
                     p.next = node;
                     break;
                 }
--- a/src/java.base/share/classes/java/util/stream/DoubleStream.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/stream/DoubleStream.java	Sat Sep 10 12:23:52 2016 -0700
@@ -567,19 +567,23 @@
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
-     * @param <R> type of the result
-     * @param supplier a function that creates a new result container. For a
-     *                 parallel execution, this function may be called
+     * @param <R> the type of the mutable result container
+     * @param supplier a function that creates a new mutable result container.
+     *                 For a parallel execution, this function may be called
      *                 multiple times and must return a fresh value each time.
      * @param accumulator an <a href="package-summary.html#Associativity">associative</a>,
      *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
      *                    <a href="package-summary.html#Statelessness">stateless</a>
-     *                    function for incorporating an additional element into a result
+     *                    function that must fold an element into a result
+     *                    container.
      * @param combiner an <a href="package-summary.html#Associativity">associative</a>,
      *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
      *                    <a href="package-summary.html#Statelessness">stateless</a>
-     *                    function for combining two values, which must be
-     *                    compatible with the accumulator function
+     *                    function that accepts two partial result containers
+     *                    and merges them, which must be compatible with the
+     *                    accumulator function.  The combiner function must fold
+     *                    the elements from the second result container into the
+     *                    first result container.
      * @return the result of the reduction
      * @see Stream#collect(Supplier, BiConsumer, BiConsumer)
      */
@@ -947,6 +951,12 @@
      * position {@code n}, will be the result of applying the function {@code f}
      *  to the element at position {@code n - 1}.
      *
+     * <p>The action of applying {@code f} for one element
+     * <a href="../concurrent/package-summary.html#MemoryVisibility"><i>happens-before</i></a>
+     * the action of applying {@code f} for subsequent elements.  For any given
+     * element the action may be performed in whatever thread the library
+     * chooses.
+     *
      * @param seed the initial element
      * @param f a function to be applied to the previous element to produce
      *          a new element
@@ -978,37 +988,44 @@
 
     /**
      * Returns a sequential ordered {@code DoubleStream} produced by iterative
-     * application of a function to an initial element, conditioned on
-     * satisfying the supplied predicate.  The stream terminates as soon as
-     * the predicate returns false.
+     * application of the given {@code next} function to an initial element,
+     * conditioned on satisfying the given {@code hasNext} predicate.  The
+     * stream terminates as soon as the {@code hasNext} predicate returns false.
      *
-     * <p>
-     * {@code DoubleStream.iterate} should produce the same sequence of
-     * elements as produced by the corresponding for-loop:
+     * <p>{@code DoubleStream.iterate} should produce the same sequence of elements as
+     * produced by the corresponding for-loop:
      * <pre>{@code
-     *     for (double index=seed; predicate.test(index); index = f.applyAsDouble(index)) {
+     *     for (double index=seed; hasNext.test(index); index = next.applyAsDouble(index)) {
      *         ...
      *     }
      * }</pre>
      *
-     * <p>
-     * The resulting sequence may be empty if the predicate does not hold on
-     * the seed value.  Otherwise the first element will be the supplied seed
-     * value, the next element (if present) will be the result of applying the
-     * function f to the seed value, and so on iteratively until the predicate
-     * indicates that the stream should terminate.
+     * <p>The resulting sequence may be empty if the {@code hasNext} predicate
+     * does not hold on the seed value.  Otherwise the first element will be the
+     * supplied {@code seed} value, the next element (if present) will be the
+     * result of applying the {@code next} function to the {@code seed} value,
+     * and so on iteratively until the {@code hasNext} predicate indicates that
+     * the stream should terminate.
+     *
+     * <p>The action of applying the {@code hasNext} predicate to an element
+     * <a href="../concurrent/package-summary.html#MemoryVisibility"><i>happens-before</i></a>
+     * the action of applying the {@code next} function to that element.  The
+     * action of applying the {@code next} function for one element
+     * <i>happens-before</i> the action of applying the {@code hasNext}
+     * predicate for subsequent elements.  For any given element an action may
+     * be performed in whatever thread the library chooses.
      *
      * @param seed the initial element
-     * @param predicate a predicate to apply to elements to determine when the
-     *          stream must terminate.
-     * @param f a function to be applied to the previous element to produce
-     *          a new element
+     * @param hasNext a predicate to apply to elements to determine when the
+     *                stream must terminate.
+     * @param next a function to be applied to the previous element to produce
+     *             a new element
      * @return a new sequential {@code DoubleStream}
      * @since 9
      */
-    public static DoubleStream iterate(double seed, DoublePredicate predicate, DoubleUnaryOperator f) {
-        Objects.requireNonNull(f);
-        Objects.requireNonNull(predicate);
+    public static DoubleStream iterate(double seed, DoublePredicate hasNext, DoubleUnaryOperator next) {
+        Objects.requireNonNull(next);
+        Objects.requireNonNull(hasNext);
         Spliterator.OfDouble spliterator = new Spliterators.AbstractDoubleSpliterator(Long.MAX_VALUE,
                Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL) {
             double prev;
@@ -1021,12 +1038,12 @@
                     return false;
                 double t;
                 if (started)
-                    t = f.applyAsDouble(prev);
+                    t = next.applyAsDouble(prev);
                 else {
                     t = seed;
                     started = true;
                 }
-                if (!predicate.test(t)) {
+                if (!hasNext.test(t)) {
                     finished = true;
                     return false;
                 }
@@ -1040,10 +1057,10 @@
                 if (finished)
                     return;
                 finished = true;
-                double t = started ? f.applyAsDouble(prev) : seed;
-                while (predicate.test(t)) {
+                double t = started ? next.applyAsDouble(prev) : seed;
+                while (hasNext.test(t)) {
                     action.accept(t);
-                    t = f.applyAsDouble(t);
+                    t = next.applyAsDouble(t);
                 }
             }
         };
--- a/src/java.base/share/classes/java/util/stream/IntStream.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/stream/IntStream.java	Sat Sep 10 12:23:52 2016 -0700
@@ -562,19 +562,23 @@
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
-     * @param <R> type of the result
-     * @param supplier a function that creates a new result container. For a
-     *                 parallel execution, this function may be called
+     * @param <R> the type of the mutable result container
+     * @param supplier a function that creates a new mutable result container.
+     *                 For a parallel execution, this function may be called
      *                 multiple times and must return a fresh value each time.
      * @param accumulator an <a href="package-summary.html#Associativity">associative</a>,
      *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
      *                    <a href="package-summary.html#Statelessness">stateless</a>
-     *                    function for incorporating an additional element into a result
+     *                    function that must fold an element into a result
+     *                    container.
      * @param combiner an <a href="package-summary.html#Associativity">associative</a>,
      *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
      *                    <a href="package-summary.html#Statelessness">stateless</a>
-     *                    function for combining two values, which must be
-     *                    compatible with the accumulator function
+     *                    function that accepts two partial result containers
+     *                    and merges them, which must be compatible with the
+     *                    accumulator function.  The combiner function must fold
+     *                    the elements from the second result container into the
+     *                    first result container.
      * @return the result of the reduction
      * @see Stream#collect(Supplier, BiConsumer, BiConsumer)
      */
@@ -887,6 +891,12 @@
      * {@code n}, will be the result of applying the function {@code f} to the
      * element at position {@code n - 1}.
      *
+     * <p>The action of applying {@code f} for one element
+     * <a href="../concurrent/package-summary.html#MemoryVisibility"><i>happens-before</i></a>
+     * the action of applying {@code f} for subsequent elements.  For any given
+     * element the action may be performed in whatever thread the library
+     * chooses.
+     *
      * @param seed the initial element
      * @param f a function to be applied to the previous element to produce
      *          a new element
@@ -918,37 +928,44 @@
 
     /**
      * Returns a sequential ordered {@code IntStream} produced by iterative
-     * application of a function to an initial element, conditioned on
-     * satisfying the supplied predicate.  The stream terminates as soon as
-     * the predicate returns false.
+     * application of the given {@code next} function to an initial element,
+     * conditioned on satisfying the given {@code hasNext} predicate.  The
+     * stream terminates as soon as the {@code hasNext} predicate returns false.
      *
-     * <p>
-     * {@code IntStream.iterate} should produce the same sequence of elements
-     * as produced by the corresponding for-loop:
+     * <p>{@code IntStream.iterate} should produce the same sequence of elements as
+     * produced by the corresponding for-loop:
      * <pre>{@code
-     *     for (int index=seed; predicate.test(index); index = f.applyAsInt(index)) {
+     *     for (int index=seed; hasNext.test(index); index = next.applyAsInt(index)) {
      *         ...
      *     }
      * }</pre>
      *
-     * <p>
-     * The resulting sequence may be empty if the predicate does not hold on
-     * the seed value.  Otherwise the first element will be the supplied seed
-     * value, the next element (if present) will be the result of applying the
-     * function f to the seed value, and so on iteratively until the predicate
-     * indicates that the stream should terminate.
+     * <p>The resulting sequence may be empty if the {@code hasNext} predicate
+     * does not hold on the seed value.  Otherwise the first element will be the
+     * supplied {@code seed} value, the next element (if present) will be the
+     * result of applying the {@code next} function to the {@code seed} value,
+     * and so on iteratively until the {@code hasNext} predicate indicates that
+     * the stream should terminate.
+     *
+     * <p>The action of applying the {@code hasNext} predicate to an element
+     * <a href="../concurrent/package-summary.html#MemoryVisibility"><i>happens-before</i></a>
+     * the action of applying the {@code next} function to that element.  The
+     * action of applying the {@code next} function for one element
+     * <i>happens-before</i> the action of applying the {@code hasNext}
+     * predicate for subsequent elements.  For any given element an action may
+     * be performed in whatever thread the library chooses.
      *
      * @param seed the initial element
-     * @param predicate a predicate to apply to elements to determine when the
-     *          stream must terminate.
-     * @param f a function to be applied to the previous element to produce
-     *          a new element
+     * @param hasNext a predicate to apply to elements to determine when the
+     *                stream must terminate.
+     * @param next a function to be applied to the previous element to produce
+     *             a new element
      * @return a new sequential {@code IntStream}
      * @since 9
      */
-    public static IntStream iterate(int seed, IntPredicate predicate, IntUnaryOperator f) {
-        Objects.requireNonNull(f);
-        Objects.requireNonNull(predicate);
+    public static IntStream iterate(int seed, IntPredicate hasNext, IntUnaryOperator next) {
+        Objects.requireNonNull(next);
+        Objects.requireNonNull(hasNext);
         Spliterator.OfInt spliterator = new Spliterators.AbstractIntSpliterator(Long.MAX_VALUE,
                Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL) {
             int prev;
@@ -961,12 +978,12 @@
                     return false;
                 int t;
                 if (started)
-                    t = f.applyAsInt(prev);
+                    t = next.applyAsInt(prev);
                 else {
                     t = seed;
                     started = true;
                 }
-                if (!predicate.test(t)) {
+                if (!hasNext.test(t)) {
                     finished = true;
                     return false;
                 }
@@ -980,10 +997,10 @@
                 if (finished)
                     return;
                 finished = true;
-                int t = started ? f.applyAsInt(prev) : seed;
-                while (predicate.test(t)) {
+                int t = started ? next.applyAsInt(prev) : seed;
+                while (hasNext.test(t)) {
                     action.accept(t);
-                    t = f.applyAsInt(t);
+                    t = next.applyAsInt(t);
                 }
             }
         };
--- a/src/java.base/share/classes/java/util/stream/LongStream.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/stream/LongStream.java	Sat Sep 10 12:23:52 2016 -0700
@@ -564,19 +564,23 @@
      * <p>This is a <a href="package-summary.html#StreamOps">terminal
      * operation</a>.
      *
-     * @param <R> type of the result
-     * @param supplier a function that creates a new result container. For a
-     *                 parallel execution, this function may be called
+     * @param <R> the type of the mutable result container
+     * @param supplier a function that creates a new mutable result container.
+     *                 For a parallel execution, this function may be called
      *                 multiple times and must return a fresh value each time.
      * @param accumulator an <a href="package-summary.html#Associativity">associative</a>,
      *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
      *                    <a href="package-summary.html#Statelessness">stateless</a>
-     *                    function for incorporating an additional element into a result
+     *                    function that must fold an element into a result
+     *                    container.
      * @param combiner an <a href="package-summary.html#Associativity">associative</a>,
      *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
      *                    <a href="package-summary.html#Statelessness">stateless</a>
-     *                    function for combining two values, which must be
-     *                    compatible with the accumulator function
+     *                    function that accepts two partial result containers
+     *                    and merges them, which must be compatible with the
+     *                    accumulator function.  The combiner function must fold
+     *                    the elements from the second result container into the
+     *                    first result container.
      * @return the result of the reduction
      * @see Stream#collect(Supplier, BiConsumer, BiConsumer)
      */
@@ -877,6 +881,12 @@
      * {@code n}, will be the result of applying the function {@code f} to the
      * element at position {@code n - 1}.
      *
+     * <p>The action of applying {@code f} for one element
+     * <a href="../concurrent/package-summary.html#MemoryVisibility"><i>happens-before</i></a>
+     * the action of applying {@code f} for subsequent elements.  For any given
+     * element the action may be performed in whatever thread the library
+     * chooses.
+     *
      * @param seed the initial element
      * @param f a function to be applied to the previous element to produce
      *          a new element
@@ -908,37 +918,44 @@
 
     /**
      * Returns a sequential ordered {@code LongStream} produced by iterative
-     * application of a function to an initial element, conditioned on
-     * satisfying the supplied predicate.  The stream terminates as soon as
-     * the predicate returns false.
+     * application of the given {@code next} function to an initial element,
+     * conditioned on satisfying the given {@code hasNext} predicate.  The
+     * stream terminates as soon as the {@code hasNext} predicate returns false.
      *
-     * <p>
-     * {@code LongStream.iterate} should produce the same sequence of elements
-     * as produced by the corresponding for-loop:
+     * <p>{@code LongStream.iterate} should produce the same sequence of elements as
+     * produced by the corresponding for-loop:
      * <pre>{@code
-     *     for (long index=seed; predicate.test(index); index = f.applyAsLong(index)) {
+     *     for (long index=seed; hasNext.test(index); index = next.applyAsLong(index)) {
      *         ...
      *     }
      * }</pre>
      *
-     * <p>
-     * The resulting sequence may be empty if the predicate does not hold on
-     * the seed value.  Otherwise the first element will be the supplied seed
-     * value, the next element (if present) will be the result of applying the
-     * function f to the seed value, and so on iteratively until the predicate
-     * indicates that the stream should terminate.
+     * <p>The resulting sequence may be empty if the {@code hasNext} predicate
+     * does not hold on the seed value.  Otherwise the first element will be the
+     * supplied {@code seed} value, the next element (if present) will be the
+     * result of applying the {@code next} function to the {@code seed} value,
+     * and so on iteratively until the {@code hasNext} predicate indicates that
+     * the stream should terminate.
+     *
+     * <p>The action of applying the {@code hasNext} predicate to an element
+     * <a href="../concurrent/package-summary.html#MemoryVisibility"><i>happens-before</i></a>
+     * the action of applying the {@code next} function to that element.  The
+     * action of applying the {@code next} function for one element
+     * <i>happens-before</i> the action of applying the {@code hasNext}
+     * predicate for subsequent elements.  For any given element an action may
+     * be performed in whatever thread the library chooses.
      *
      * @param seed the initial element
-     * @param predicate a predicate to apply to elements to determine when the
-     *          stream must terminate.
-     * @param f a function to be applied to the previous element to produce
-     *          a new element
+     * @param hasNext a predicate to apply to elements to determine when the
+     *                stream must terminate.
+     * @param next a function to be applied to the previous element to produce
+     *             a new element
      * @return a new sequential {@code LongStream}
      * @since 9
      */
-    public static LongStream iterate(long seed, LongPredicate predicate, LongUnaryOperator f) {
-        Objects.requireNonNull(f);
-        Objects.requireNonNull(predicate);
+    public static LongStream iterate(long seed, LongPredicate hasNext, LongUnaryOperator next) {
+        Objects.requireNonNull(next);
+        Objects.requireNonNull(hasNext);
         Spliterator.OfLong spliterator = new Spliterators.AbstractLongSpliterator(Long.MAX_VALUE,
                Spliterator.ORDERED | Spliterator.IMMUTABLE | Spliterator.NONNULL) {
             long prev;
@@ -951,12 +968,12 @@
                     return false;
                 long t;
                 if (started)
-                    t = f.applyAsLong(prev);
+                    t = next.applyAsLong(prev);
                 else {
                     t = seed;
                     started = true;
                 }
-                if (!predicate.test(t)) {
+                if (!hasNext.test(t)) {
                     finished = true;
                     return false;
                 }
@@ -970,10 +987,10 @@
                 if (finished)
                     return;
                 finished = true;
-                long t = started ? f.applyAsLong(prev) : seed;
-                while (predicate.test(t)) {
+                long t = started ? next.applyAsLong(prev) : seed;
+                while (hasNext.test(t)) {
                     action.accept(t);
-                    t = f.applyAsLong(t);
+                    t = next.applyAsLong(t);
                 }
             }
         };
--- a/src/java.base/share/classes/java/util/stream/Stream.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/java/util/stream/Stream.java	Sat Sep 10 12:23:52 2016 -0700
@@ -882,19 +882,23 @@
      *                                 .toString();
      * }</pre>
      *
-     * @param <R> type of the result
-     * @param supplier a function that creates a new result container. For a
-     *                 parallel execution, this function may be called
+     * @param <R> the type of the mutable result container
+     * @param supplier a function that creates a new mutable result container.
+     *                 For a parallel execution, this function may be called
      *                 multiple times and must return a fresh value each time.
      * @param accumulator an <a href="package-summary.html#Associativity">associative</a>,
      *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
      *                    <a href="package-summary.html#Statelessness">stateless</a>
-     *                    function for incorporating an additional element into a result
+     *                    function that must fold an element into a result
+     *                    container.
      * @param combiner an <a href="package-summary.html#Associativity">associative</a>,
      *                    <a href="package-summary.html#NonInterference">non-interfering</a>,
      *                    <a href="package-summary.html#Statelessness">stateless</a>
-     *                    function for combining two values, which must be
-     *                    compatible with the accumulator function
+     *                    function that accepts two partial result containers
+     *                    and merges them, which must be compatible with the
+     *                    accumulator function.  The combiner function must fold
+     *                    the elements from the second result container into the
+     *                    first result container.
      * @return the result of the reduction
      */
     <R> R collect(Supplier<R> supplier,
@@ -1194,6 +1198,12 @@
      * {@code n}, will be the result of applying the function {@code f} to the
      * element at position {@code n - 1}.
      *
+     * <p>The action of applying {@code f} for one element
+     * <a href="../concurrent/package-summary.html#MemoryVisibility"><i>happens-before</i></a>
+     * the action of applying {@code f} for subsequent elements.  For any given
+     * element the action may be performed in whatever thread the library
+     * chooses.
+     *
      * @param <T> the type of stream elements
      * @param seed the initial element
      * @param f a function to be applied to the previous element to produce
@@ -1226,38 +1236,45 @@
 
     /**
      * Returns a sequential ordered {@code Stream} produced by iterative
-     * application of a function to an initial element, conditioned on
-     * satisfying the supplied predicate.  The stream terminates as soon as
-     * the predicate returns false.
+     * application of the given {@code next} function to an initial element,
+     * conditioned on satisfying the given {@code hasNext} predicate.  The
+     * stream terminates as soon as the {@code hasNext} predicate returns false.
      *
-     * <p>
-     * {@code Stream.iterate} should produce the same sequence of elements as
+     * <p>{@code Stream.iterate} should produce the same sequence of elements as
      * produced by the corresponding for-loop:
      * <pre>{@code
-     *     for (T index=seed; predicate.test(index); index = f.apply(index)) {
+     *     for (T index=seed; hasNext.test(index); index = next.apply(index)) {
      *         ...
      *     }
      * }</pre>
      *
-     * <p>
-     * The resulting sequence may be empty if the predicate does not hold on
-     * the seed value.  Otherwise the first element will be the supplied seed
-     * value, the next element (if present) will be the result of applying the
-     * function f to the seed value, and so on iteratively until the predicate
-     * indicates that the stream should terminate.
+     * <p>The resulting sequence may be empty if the {@code hasNext} predicate
+     * does not hold on the seed value.  Otherwise the first element will be the
+     * supplied {@code seed} value, the next element (if present) will be the
+     * result of applying the {@code next} function to the {@code seed} value,
+     * and so on iteratively until the {@code hasNext} predicate indicates that
+     * the stream should terminate.
+     *
+     * <p>The action of applying the {@code hasNext} predicate to an element
+     * <a href="../concurrent/package-summary.html#MemoryVisibility"><i>happens-before</i></a>
+     * the action of applying the {@code next} function to that element.  The
+     * action of applying the {@code next} function for one element
+     * <i>happens-before</i> the action of applying the {@code hasNext}
+     * predicate for subsequent elements.  For any given element an action may
+     * be performed in whatever thread the library chooses.
      *
      * @param <T> the type of stream elements
      * @param seed the initial element
-     * @param predicate a predicate to apply to elements to determine when the
-     *          stream must terminate.
-     * @param f a function to be applied to the previous element to produce
-     *          a new element
+     * @param hasNext a predicate to apply to elements to determine when the
+     *                stream must terminate.
+     * @param next a function to be applied to the previous element to produce
+     *             a new element
      * @return a new sequential {@code Stream}
      * @since 9
      */
-    public static<T> Stream<T> iterate(T seed, Predicate<? super T> predicate, UnaryOperator<T> f) {
-        Objects.requireNonNull(f);
-        Objects.requireNonNull(predicate);
+    public static<T> Stream<T> iterate(T seed, Predicate<? super T> hasNext, UnaryOperator<T> next) {
+        Objects.requireNonNull(next);
+        Objects.requireNonNull(hasNext);
         Spliterator<T> spliterator = new Spliterators.AbstractSpliterator<>(Long.MAX_VALUE,
                Spliterator.ORDERED | Spliterator.IMMUTABLE) {
             T prev;
@@ -1270,12 +1287,12 @@
                     return false;
                 T t;
                 if (started)
-                    t = f.apply(prev);
+                    t = next.apply(prev);
                 else {
                     t = seed;
                     started = true;
                 }
-                if (!predicate.test(t)) {
+                if (!hasNext.test(t)) {
                     prev = null;
                     finished = true;
                     return false;
@@ -1290,11 +1307,11 @@
                 if (finished)
                     return;
                 finished = true;
-                T t = started ? f.apply(prev) : seed;
+                T t = started ? next.apply(prev) : seed;
                 prev = null;
-                while (predicate.test(t)) {
+                while (hasNext.test(t)) {
                     action.accept(t);
-                    t = f.apply(t);
+                    t = next.apply(t);
                 }
             }
         };
--- a/src/java.base/share/classes/jdk/internal/misc/Unsafe.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/jdk/internal/misc/Unsafe.java	Sat Sep 10 12:23:52 2016 -0700
@@ -2320,6 +2320,24 @@
         return v;
     }
 
+    @ForceInline
+    public final int getAndAddIntRelease(Object o, long offset, int delta) {
+        int v;
+        do {
+            v = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset, v, v + delta));
+        return v;
+    }
+
+    @ForceInline
+    public final int getAndAddIntAcquire(Object o, long offset, int delta) {
+        int v;
+        do {
+            v = getIntAcquire(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset, v, v + delta));
+        return v;
+    }
+
     /**
      * Atomically adds the given value to the current value of a field
      * or array element within the given object {@code o}
@@ -2340,6 +2358,24 @@
         return v;
     }
 
+    @ForceInline
+    public final long getAndAddLongRelease(Object o, long offset, long delta) {
+        long v;
+        do {
+            v = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset, v, v + delta));
+        return v;
+    }
+
+    @ForceInline
+    public final long getAndAddLongAcquire(Object o, long offset, long delta) {
+        long v;
+        do {
+            v = getLongAcquire(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset, v, v + delta));
+        return v;
+    }
+
     @HotSpotIntrinsicCandidate
     public final byte getAndAddByte(Object o, long offset, byte delta) {
         byte v;
@@ -2349,6 +2385,24 @@
         return v;
     }
 
+    @ForceInline
+    public final byte getAndAddByteRelease(Object o, long offset, byte delta) {
+        byte v;
+        do {
+            v = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset, v, (byte) (v + delta)));
+        return v;
+    }
+
+    @ForceInline
+    public final byte getAndAddByteAcquire(Object o, long offset, byte delta) {
+        byte v;
+        do {
+            v = getByteAcquire(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset, v, (byte) (v + delta)));
+        return v;
+    }
+
     @HotSpotIntrinsicCandidate
     public final short getAndAddShort(Object o, long offset, short delta) {
         short v;
@@ -2359,11 +2413,39 @@
     }
 
     @ForceInline
+    public final short getAndAddShortRelease(Object o, long offset, short delta) {
+        short v;
+        do {
+            v = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset, v, (short) (v + delta)));
+        return v;
+    }
+
+    @ForceInline
+    public final short getAndAddShortAcquire(Object o, long offset, short delta) {
+        short v;
+        do {
+            v = getShortAcquire(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset, v, (short) (v + delta)));
+        return v;
+    }
+
+    @ForceInline
     public final char getAndAddChar(Object o, long offset, char delta) {
         return (char) getAndAddShort(o, offset, (short) delta);
     }
 
     @ForceInline
+    public final char getAndAddCharRelease(Object o, long offset, char delta) {
+        return (char) getAndAddShortRelease(o, offset, (short) delta);
+    }
+
+    @ForceInline
+    public final char getAndAddCharAcquire(Object o, long offset, char delta) {
+        return (char) getAndAddShortAcquire(o, offset, (short) delta);
+    }
+
+    @ForceInline
     public final float getAndAddFloat(Object o, long offset, float delta) {
         int expectedBits;
         float v;
@@ -2379,6 +2461,36 @@
     }
 
     @ForceInline
+    public final float getAndAddFloatRelease(Object o, long offset, float delta) {
+        int expectedBits;
+        float v;
+        do {
+            // Load and CAS with the raw bits to avoid issues with NaNs and
+            // possible bit conversion from signaling NaNs to quiet NaNs that
+            // may result in the loop not terminating.
+            expectedBits = getInt(o, offset);
+            v = Float.intBitsToFloat(expectedBits);
+        } while (!weakCompareAndSwapIntRelease(o, offset,
+                                               expectedBits, Float.floatToRawIntBits(v + delta)));
+        return v;
+    }
+
+    @ForceInline
+    public final float getAndAddFloatAcquire(Object o, long offset, float delta) {
+        int expectedBits;
+        float v;
+        do {
+            // Load and CAS with the raw bits to avoid issues with NaNs and
+            // possible bit conversion from signaling NaNs to quiet NaNs that
+            // may result in the loop not terminating.
+            expectedBits = getIntAcquire(o, offset);
+            v = Float.intBitsToFloat(expectedBits);
+        } while (!weakCompareAndSwapIntAcquire(o, offset,
+                                               expectedBits, Float.floatToRawIntBits(v + delta)));
+        return v;
+    }
+
+    @ForceInline
     public final double getAndAddDouble(Object o, long offset, double delta) {
         long expectedBits;
         double v;
@@ -2393,6 +2505,36 @@
         return v;
     }
 
+    @ForceInline
+    public final double getAndAddDoubleRelease(Object o, long offset, double delta) {
+        long expectedBits;
+        double v;
+        do {
+            // Load and CAS with the raw bits to avoid issues with NaNs and
+            // possible bit conversion from signaling NaNs to quiet NaNs that
+            // may result in the loop not terminating.
+            expectedBits = getLong(o, offset);
+            v = Double.longBitsToDouble(expectedBits);
+        } while (!weakCompareAndSwapLongRelease(o, offset,
+                                                expectedBits, Double.doubleToRawLongBits(v + delta)));
+        return v;
+    }
+
+    @ForceInline
+    public final double getAndAddDoubleAcquire(Object o, long offset, double delta) {
+        long expectedBits;
+        double v;
+        do {
+            // Load and CAS with the raw bits to avoid issues with NaNs and
+            // possible bit conversion from signaling NaNs to quiet NaNs that
+            // may result in the loop not terminating.
+            expectedBits = getLongAcquire(o, offset);
+            v = Double.longBitsToDouble(expectedBits);
+        } while (!weakCompareAndSwapLongAcquire(o, offset,
+                                                expectedBits, Double.doubleToRawLongBits(v + delta)));
+        return v;
+    }
+
     /**
      * Atomically exchanges the given value with the current value of
      * a field or array element within the given object {@code o}
@@ -2413,6 +2555,24 @@
         return v;
     }
 
+    @ForceInline
+    public final int getAndSetIntRelease(Object o, long offset, int newValue) {
+        int v;
+        do {
+            v = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final int getAndSetIntAcquire(Object o, long offset, int newValue) {
+        int v;
+        do {
+            v = getIntAcquire(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset, v, newValue));
+        return v;
+    }
+
     /**
      * Atomically exchanges the given value with the current value of
      * a field or array element within the given object {@code o}
@@ -2433,6 +2593,24 @@
         return v;
     }
 
+    @ForceInline
+    public final long getAndSetLongRelease(Object o, long offset, long newValue) {
+        long v;
+        do {
+            v = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final long getAndSetLongAcquire(Object o, long offset, long newValue) {
+        long v;
+        do {
+            v = getLongAcquire(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset, v, newValue));
+        return v;
+    }
+
     /**
      * Atomically exchanges the given reference value with the current
      * reference value of a field or array element within the given
@@ -2453,6 +2631,24 @@
         return v;
     }
 
+    @ForceInline
+    public final Object getAndSetObjectRelease(Object o, long offset, Object newValue) {
+        Object v;
+        do {
+            v = getObject(o, offset);
+        } while (!weakCompareAndSwapObjectRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final Object getAndSetObjectAcquire(Object o, long offset, Object newValue) {
+        Object v;
+        do {
+            v = getObjectAcquire(o, offset);
+        } while (!weakCompareAndSwapObjectAcquire(o, offset, v, newValue));
+        return v;
+    }
+
     @HotSpotIntrinsicCandidate
     public final byte getAndSetByte(Object o, long offset, byte newValue) {
         byte v;
@@ -2463,10 +2659,38 @@
     }
 
     @ForceInline
+    public final byte getAndSetByteRelease(Object o, long offset, byte newValue) {
+        byte v;
+        do {
+            v = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final byte getAndSetByteAcquire(Object o, long offset, byte newValue) {
+        byte v;
+        do {
+            v = getByteAcquire(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
     public final boolean getAndSetBoolean(Object o, long offset, boolean newValue) {
         return byte2bool(getAndSetByte(o, offset, bool2byte(newValue)));
     }
 
+    @ForceInline
+    public final boolean getAndSetBooleanRelease(Object o, long offset, boolean newValue) {
+        return byte2bool(getAndSetByteRelease(o, offset, bool2byte(newValue)));
+    }
+
+    @ForceInline
+    public final boolean getAndSetBooleanAcquire(Object o, long offset, boolean newValue) {
+        return byte2bool(getAndSetByteAcquire(o, offset, bool2byte(newValue)));
+    }
+
     @HotSpotIntrinsicCandidate
     public final short getAndSetShort(Object o, long offset, short newValue) {
         short v;
@@ -2477,22 +2701,558 @@
     }
 
     @ForceInline
+    public final short getAndSetShortRelease(Object o, long offset, short newValue) {
+        short v;
+        do {
+            v = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
+    public final short getAndSetShortAcquire(Object o, long offset, short newValue) {
+        short v;
+        do {
+            v = getShortAcquire(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset, v, newValue));
+        return v;
+    }
+
+    @ForceInline
     public final char getAndSetChar(Object o, long offset, char newValue) {
         return s2c(getAndSetShort(o, offset, c2s(newValue)));
     }
 
     @ForceInline
+    public final char getAndSetCharRelease(Object o, long offset, char newValue) {
+        return s2c(getAndSetShortRelease(o, offset, c2s(newValue)));
+    }
+
+    @ForceInline
+    public final char getAndSetCharAcquire(Object o, long offset, char newValue) {
+        return s2c(getAndSetShortAcquire(o, offset, c2s(newValue)));
+    }
+
+    @ForceInline
     public final float getAndSetFloat(Object o, long offset, float newValue) {
         int v = getAndSetInt(o, offset, Float.floatToRawIntBits(newValue));
         return Float.intBitsToFloat(v);
     }
 
     @ForceInline
+    public final float getAndSetFloatRelease(Object o, long offset, float newValue) {
+        int v = getAndSetIntRelease(o, offset, Float.floatToRawIntBits(newValue));
+        return Float.intBitsToFloat(v);
+    }
+
+    @ForceInline
+    public final float getAndSetFloatAcquire(Object o, long offset, float newValue) {
+        int v = getAndSetIntAcquire(o, offset, Float.floatToRawIntBits(newValue));
+        return Float.intBitsToFloat(v);
+    }
+
+    @ForceInline
     public final double getAndSetDouble(Object o, long offset, double newValue) {
         long v = getAndSetLong(o, offset, Double.doubleToRawLongBits(newValue));
         return Double.longBitsToDouble(v);
     }
 
+    @ForceInline
+    public final double getAndSetDoubleRelease(Object o, long offset, double newValue) {
+        long v = getAndSetLongRelease(o, offset, Double.doubleToRawLongBits(newValue));
+        return Double.longBitsToDouble(v);
+    }
+
+    @ForceInline
+    public final double getAndSetDoubleAcquire(Object o, long offset, double newValue) {
+        long v = getAndSetLongAcquire(o, offset, Double.doubleToRawLongBits(newValue));
+        return Double.longBitsToDouble(v);
+    }
+
+
+    // The following contain CAS-based Java implementations used on
+    // platforms not supporting native instructions
+
+    @ForceInline
+    public final boolean getAndBitwiseOrBoolean(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseOrByte(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseOrBooleanRelease(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseOrByteRelease(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseOrBooleanAcquire(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseOrByteAcquire(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseAndBoolean(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseAndByte(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseAndBooleanRelease(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseAndByteRelease(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseAndBooleanAcquire(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseAndByteAcquire(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseXorBoolean(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseXorByte(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseXorBooleanRelease(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseXorByteRelease(o, offset, bool2byte(mask)));
+    }
+
+    @ForceInline
+    public final boolean getAndBitwiseXorBooleanAcquire(Object o, long offset, boolean mask) {
+        return byte2bool(getAndBitwiseXorByteAcquire(o, offset, bool2byte(mask)));
+    }
+
+
+    @ForceInline
+    public final byte getAndBitwiseOrByte(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByteVolatile(o, offset);
+        } while (!weakCompareAndSwapByteVolatile(o, offset,
+                                                  current, (byte) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseOrByteRelease(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset,
+                                                 current, (byte) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseOrByteAcquire(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset,
+                                                 current, (byte) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseAndByte(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByteVolatile(o, offset);
+        } while (!weakCompareAndSwapByteVolatile(o, offset,
+                                                  current, (byte) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseAndByteRelease(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset,
+                                                 current, (byte) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseAndByteAcquire(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset,
+                                                 current, (byte) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseXorByte(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByteVolatile(o, offset);
+        } while (!weakCompareAndSwapByteVolatile(o, offset,
+                                                  current, (byte) (current ^ mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseXorByteRelease(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteRelease(o, offset,
+                                                 current, (byte) (current ^ mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final byte getAndBitwiseXorByteAcquire(Object o, long offset, byte mask) {
+        byte current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getByte(o, offset);
+        } while (!weakCompareAndSwapByteAcquire(o, offset,
+                                                 current, (byte) (current ^ mask)));
+        return current;
+    }
+
+
+    @ForceInline
+    public final char getAndBitwiseOrChar(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseOrShort(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseOrCharRelease(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseOrShortRelease(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseOrCharAcquire(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseOrShortAcquire(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseAndChar(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseAndShort(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseAndCharRelease(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseAndShortRelease(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseAndCharAcquire(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseAndShortAcquire(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseXorChar(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseXorShort(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseXorCharRelease(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseXorShortRelease(o, offset, c2s(mask)));
+    }
+
+    @ForceInline
+    public final char getAndBitwiseXorCharAcquire(Object o, long offset, char mask) {
+        return s2c(getAndBitwiseXorShortAcquire(o, offset, c2s(mask)));
+    }
+
+
+    @ForceInline
+    public final short getAndBitwiseOrShort(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShortVolatile(o, offset);
+        } while (!weakCompareAndSwapShortVolatile(o, offset,
+                                                current, (short) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseOrShortRelease(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset,
+                                               current, (short) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseOrShortAcquire(Object o, long offset, short mask) {
+        short current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset,
+                                               current, (short) (current | mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseAndShort(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShortVolatile(o, offset);
+        } while (!weakCompareAndSwapShortVolatile(o, offset,
+                                                current, (short) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseAndShortRelease(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset,
+                                               current, (short) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseAndShortAcquire(Object o, long offset, short mask) {
+        short current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset,
+                                               current, (short) (current & mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseXorShort(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShortVolatile(o, offset);
+        } while (!weakCompareAndSwapShortVolatile(o, offset,
+                                                current, (short) (current ^ mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseXorShortRelease(Object o, long offset, short mask) {
+        short current;
+        do {
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortRelease(o, offset,
+                                               current, (short) (current ^ mask)));
+        return current;
+    }
+
+    @ForceInline
+    public final short getAndBitwiseXorShortAcquire(Object o, long offset, short mask) {
+        short current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getShort(o, offset);
+        } while (!weakCompareAndSwapShortAcquire(o, offset,
+                                               current, (short) (current ^ mask)));
+        return current;
+    }
+
+
+    @ForceInline
+    public final int getAndBitwiseOrInt(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getIntVolatile(o, offset);
+        } while (!weakCompareAndSwapIntVolatile(o, offset,
+                                                current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseOrIntRelease(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset,
+                                               current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseOrIntAcquire(Object o, long offset, int mask) {
+        int current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset,
+                                               current, current | mask));
+        return current;
+    }
+
+    /**
+     * Atomically replaces the current value of a field or array element within
+     * the given object with the result of bitwise AND between the current value
+     * and mask.
+     *
+     * @param o object/array to update the field/element in
+     * @param offset field/element offset
+     * @param mask the mask value
+     * @return the previous value
+     * @since 1.9
+     */
+    @ForceInline
+    public final int getAndBitwiseAndInt(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getIntVolatile(o, offset);
+        } while (!weakCompareAndSwapIntVolatile(o, offset,
+                                                current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseAndIntRelease(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset,
+                                               current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseAndIntAcquire(Object o, long offset, int mask) {
+        int current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset,
+                                               current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseXorInt(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getIntVolatile(o, offset);
+        } while (!weakCompareAndSwapIntVolatile(o, offset,
+                                                current, current ^ mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseXorIntRelease(Object o, long offset, int mask) {
+        int current;
+        do {
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntRelease(o, offset,
+                                               current, current ^ mask));
+        return current;
+    }
+
+    @ForceInline
+    public final int getAndBitwiseXorIntAcquire(Object o, long offset, int mask) {
+        int current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getInt(o, offset);
+        } while (!weakCompareAndSwapIntAcquire(o, offset,
+                                               current, current ^ mask));
+        return current;
+    }
+
+
+    @ForceInline
+    public final long getAndBitwiseOrLong(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLongVolatile(o, offset);
+        } while (!weakCompareAndSwapLongVolatile(o, offset,
+                                                current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseOrLongRelease(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset,
+                                               current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseOrLongAcquire(Object o, long offset, long mask) {
+        long current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset,
+                                               current, current | mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseAndLong(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLongVolatile(o, offset);
+        } while (!weakCompareAndSwapLongVolatile(o, offset,
+                                                current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseAndLongRelease(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset,
+                                               current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseAndLongAcquire(Object o, long offset, long mask) {
+        long current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset,
+                                               current, current & mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseXorLong(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLongVolatile(o, offset);
+        } while (!weakCompareAndSwapLongVolatile(o, offset,
+                                                current, current ^ mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseXorLongRelease(Object o, long offset, long mask) {
+        long current;
+        do {
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongRelease(o, offset,
+                                               current, current ^ mask));
+        return current;
+    }
+
+    @ForceInline
+    public final long getAndBitwiseXorLongAcquire(Object o, long offset, long mask) {
+        long current;
+        do {
+            // Plain read, the value is a hint, the acquire CAS does the work
+            current = getLong(o, offset);
+        } while (!weakCompareAndSwapLongAcquire(o, offset,
+                                               current, current ^ mask));
+        return current;
+    }
+
+
+
     /**
      * Ensures that loads before the fence will not be reordered with loads and
      * stores after the fence; a "LoadLoad plus LoadStore barrier".
--- a/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/SerialVersionUIDAdder.java	Sat Sep 10 12:23:52 2016 -0700
@@ -80,7 +80,7 @@
  *   ClassWriter cw = new ClassWriter(...);
  *   ClassVisitor sv = new SerialVersionUIDAdder(cw);
  *   ClassVisitor ca = new MyClassAdapter(sv);
- *   new ClassReader(orginalClass).accept(ca, false);
+ *   new ClassReader(originalClass).accept(ca, false);
  * </pre>
  *
  * The SVUID algorithm can be found <a href=
--- a/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Sat Sep 10 12:23:52 2016 -0700
@@ -1074,7 +1074,7 @@
              * 1) if (instProxy != null)
              *        connect to instProxy; raise exception if failed
              * 2) else use system default ProxySelector
-             * 3) is 2) fails, make direct connection
+             * 3) else make a direct connection if ProxySelector is not present
              */
 
             if (instProxy == null) { // no instance Proxy is set
@@ -1117,10 +1117,7 @@
                             if (p != Proxy.NO_PROXY) {
                                 sel.connectFailed(uri, p.address(), ioex);
                                 if (!it.hasNext()) {
-                                    // fallback to direct connection
-                                    http = getNewHttpClient(url, null, connectTimeout, false);
-                                    http.setReadTimeout(readTimeout);
-                                    break;
+                                    throw ioex;
                                 }
                             } else {
                                 throw ioex;
--- a/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/share/classes/sun/security/ssl/ClientHandshaker.java	Sat Sep 10 12:23:52 2016 -0700
@@ -1185,7 +1185,7 @@
         /*
          * FOURTH, if we sent a Certificate, we need to send a signed
          * CertificateVerify (unless the key in the client's certificate
-         * was a Diffie-Hellman key).).
+         * was a Diffie-Hellman key).
          *
          * This uses a hash of the previous handshake messages ... either
          * a nonfinal one (if the particular implementation supports it)
--- a/src/java.base/unix/classes/java/lang/ProcessImpl.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/unix/classes/java/lang/ProcessImpl.java	Sat Sep 10 12:23:52 2016 -0700
@@ -630,6 +630,19 @@
         return !hasExited;
     }
 
+    /**
+     * The {@code toString} method returns a string consisting of
+     * the native process ID of the process and the exit value of the process.
+     *
+     * @return a string representation of the object.
+     */
+    @Override
+    public String toString() {
+        return new StringBuilder("Process[pid=").append(pid)
+                .append(", exitValue=").append(hasExited ? exitcode : "\"not exited\"")
+                .append("]").toString();
+    }
+
     private static native void init();
 
     static {
--- a/src/java.base/unix/native/libjava/ProcessImpl_md.c	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/unix/native/libjava/ProcessImpl_md.c	Sat Sep 10 12:23:52 2016 -0700
@@ -349,6 +349,8 @@
 __attribute_noinline__
 #endif
 
+/* vfork(2) is deprecated on Solaris */
+#ifndef __solaris__
 static pid_t
 vforkChild(ChildStuff *c) {
     volatile pid_t resultPid;
@@ -367,6 +369,7 @@
     assert(resultPid != 0);  /* childProcess never returns */
     return resultPid;
 }
+#endif
 
 static pid_t
 forkChild(ChildStuff *c) {
@@ -479,8 +482,11 @@
 static pid_t
 startChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath) {
     switch (c->mode) {
+/* vfork(2) is deprecated on Solaris */
+#ifndef __solaris__
       case MODE_VFORK:
         return vforkChild(c);
+#endif
       case MODE_FORK:
         return forkChild(c);
 #if defined(__solaris__) || defined(_ALLBSD_SOURCE) || defined(_AIX)
--- a/src/java.base/unix/native/libnet/NetworkInterface.c	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/unix/native/libnet/NetworkInterface.c	Sat Sep 10 12:23:52 2016 -0700
@@ -80,6 +80,12 @@
     #define DEV_PREFIX "/dev/"
 #endif
 
+#ifdef LIFNAMSIZ
+    #define IFNAMESIZE LIFNAMSIZ
+#else
+    #define IFNAMESIZE IFNAMSIZ
+#endif
+
 #define CHECKED_MALLOC3(_pointer, _type, _size) \
     do { \
         _pointer = (_type)malloc(_size); \
@@ -158,7 +164,7 @@
 
 static int     getIndex(int sock, const char *ifname);
 static int     getFlags(int sock, const char *ifname, int *flags);
-static int     getMacAddress(JNIEnv *env, int sock, const char *ifname,
+static int     getMacAddress(JNIEnv *env, const char *ifname,
                              const struct in_addr *addr, unsigned char *buf);
 static int     getMTU(JNIEnv *env, int sock, const char *ifname);
 
@@ -237,20 +243,25 @@
     const char* name_utf;
     jobject obj = NULL;
 
+    if (name != NULL) {
+        name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
+    } else {
+        JNU_ThrowNullPointerException(env, "network interface name is NULL");
+        return NULL;
+    }
+
+    if (name_utf == NULL) {
+        if (!(*env)->ExceptionCheck(env))
+            JNU_ThrowOutOfMemoryError(env, NULL);
+        return NULL;
+    }
+
     ifs = enumInterfaces(env);
     if (ifs == NULL) {
         return NULL;
     }
 
-    name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
-    if (name_utf == NULL) {
-       if (!(*env)->ExceptionCheck(env))
-           JNU_ThrowOutOfMemoryError(env, NULL);
-       freeif(ifs);
-       return NULL;
-    }
-
-    // Search the list of interface based on name
+    // search the list of interfaces based on name
     curr = ifs;
     while (curr != NULL) {
         if (strcmp(name_utf, curr->name) == 0) {
@@ -285,12 +296,13 @@
     if (index <= 0) {
         return NULL;
     }
+
     ifs = enumInterfaces(env);
     if (ifs == NULL) {
         return NULL;
     }
 
-    // Search the list of interface based on index
+    // search the list of interfaces based on index
     curr = ifs;
     while (curr != NULL) {
         if (index == curr->index) {
@@ -304,7 +316,9 @@
         obj = createNetworkInterface(env, curr);
     }
 
+    // release the interface list
     freeif(ifs);
+
     return obj;
 }
 
@@ -317,13 +331,11 @@
   (JNIEnv *env, jclass cls, jobject iaObj)
 {
     netif *ifs, *curr;
-
 #if defined(AF_INET6)
     int family = (getInetAddress_family(env, iaObj) == IPv4) ? AF_INET : AF_INET6;
 #else
     int family =  AF_INET;
 #endif
-
     jobject obj = NULL;
     jboolean match = JNI_FALSE;
 
@@ -342,7 +354,7 @@
             if (family == addrP->family) {
                 if (family == AF_INET) {
                     int address1 = htonl(
-                        ((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr);
+                        ((struct sockaddr_in *)addrP->addr)->sin_addr.s_addr);
                     int address2 = getInetAddress_addr(env, iaObj);
 
                     if (address1 == address2) {
@@ -350,7 +362,6 @@
                         break;
                     }
                 }
-
 #if defined(AF_INET6)
                 if (family == AF_INET6) {
                     jbyte *bytes = (jbyte *)&(
@@ -390,7 +401,9 @@
         obj = createNetworkInterface(env, curr);
     }
 
+    // release the interface list
     freeif(ifs);
+
     return obj;
 }
 
@@ -411,7 +424,7 @@
         return NULL;
     }
 
-    // count the interface
+    // count the interfaces
     ifCount = 0;
     curr = ifs;
     while (curr != NULL) {
@@ -426,8 +439,8 @@
         return NULL;
     }
 
-    // Iterate through the interfaces, create a NetworkInterface instance
-    // for each array element and populate the object.
+    // iterate through the interfaces, create a NetworkInterface instance
+    // for each array element and populate the object
     curr = ifs;
     arr_index = 0;
     while (curr != NULL) {
@@ -445,7 +458,9 @@
         curr = curr->next;
     }
 
+    // release the interface list
     freeif(ifs);
+
     return netIFArr;
 }
 
@@ -511,46 +526,45 @@
     jbyteArray ret = NULL;
     unsigned char mac[16];
     int len;
-    int sock;
     jboolean isCopy;
-    const char* name_utf;
+    const char *name_utf;
 
-    name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
+    if (name != NULL) {
+        name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
+    } else {
+        JNU_ThrowNullPointerException(env, "network interface name is NULL");
+        return NULL;
+    }
+
     if (name_utf == NULL) {
-       if (!(*env)->ExceptionCheck(env))
-           JNU_ThrowOutOfMemoryError(env, NULL);
-       return NULL;
-    }
-    if ((sock = openSocketWithFallback(env, name_utf)) < 0) {
-       (*env)->ReleaseStringUTFChars(env, name, name_utf);
-       return NULL;
+        if (!(*env)->ExceptionCheck(env))
+            JNU_ThrowOutOfMemoryError(env, NULL);
+        return NULL;
     }
 
     if (!IS_NULL(addrArray)) {
-       (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr);
-       addr = ((caddr[0]<<24) & 0xff000000);
-       addr |= ((caddr[1] <<16) & 0xff0000);
-       addr |= ((caddr[2] <<8) & 0xff00);
-       addr |= (caddr[3] & 0xff);
-       iaddr.s_addr = htonl(addr);
-       len = getMacAddress(env, sock, name_utf, &iaddr, mac);
+        (*env)->GetByteArrayRegion(env, addrArray, 0, 4, caddr);
+        addr = ((caddr[0]<<24) & 0xff000000);
+        addr |= ((caddr[1] <<16) & 0xff0000);
+        addr |= ((caddr[2] <<8) & 0xff00);
+        addr |= (caddr[3] & 0xff);
+        iaddr.s_addr = htonl(addr);
+        len = getMacAddress(env, name_utf, &iaddr, mac);
     } else {
-       len = getMacAddress(env, sock, name_utf, NULL, mac);
+        len = getMacAddress(env, name_utf, NULL, mac);
     }
+
     if (len > 0) {
-       ret = (*env)->NewByteArray(env, len);
-       if (IS_NULL(ret)) {
-          /* we may have memory to free at the end of this */
-          goto fexit;
-       }
-       (*env)->SetByteArrayRegion(env, ret, 0, len, (jbyte *)(mac));
+        ret = (*env)->NewByteArray(env, len);
+        if (!IS_NULL(ret)) {
+            (*env)->SetByteArrayRegion(env, ret, 0, len, (jbyte *)(mac));
+        }
     }
- fexit:
-   // release the UTF string and interface list
-   (*env)->ReleaseStringUTFChars(env, name, name_utf);
 
-   close(sock);
-   return ret;
+    // release the UTF string and interface list
+    (*env)->ReleaseStringUTFChars(env, name, name_utf);
+
+    return ret;
 }
 
 /*
@@ -562,8 +576,7 @@
   (JNIEnv *env, jclass cls, jstring name, jint index)
 {
     jboolean isCopy;
-    int ret = -1;
-    int sock;
+    int sock, ret = -1;
     const char* name_utf = NULL;
 
     if (name != NULL) {
@@ -572,15 +585,16 @@
         JNU_ThrowNullPointerException(env, "network interface name is NULL");
         return ret;
     }
+
     if (name_utf == NULL) {
-       if (!(*env)->ExceptionCheck(env))
-           JNU_ThrowOutOfMemoryError(env, NULL);
-       return ret;
+        if (!(*env)->ExceptionCheck(env))
+            JNU_ThrowOutOfMemoryError(env, NULL);
+        return ret;
     }
 
     if ((sock = openSocketWithFallback(env, name_utf)) < 0) {
-       (*env)->ReleaseStringUTFChars(env, name, name_utf);
-       return JNI_FALSE;
+        (*env)->ReleaseStringUTFChars(env, name, name_utf);
+        return JNI_FALSE;
     }
 
     ret = getMTU(env, sock, name_utf);
@@ -595,9 +609,8 @@
 
 static int getFlags0(JNIEnv *env, jstring name) {
     jboolean isCopy;
-    int ret, sock;
-    const char* name_utf;
-    int flags = 0;
+    int ret, sock, flags = 0;
+    const char *name_utf;
 
     if (name != NULL) {
         name_utf = (*env)->GetStringUTFChars(env, name, &isCopy);
@@ -607,9 +620,9 @@
     }
 
     if (name_utf == NULL) {
-       if (!(*env)->ExceptionCheck(env))
-           JNU_ThrowOutOfMemoryError(env, NULL);
-       return -1;
+        if (!(*env)->ExceptionCheck(env))
+            JNU_ThrowOutOfMemoryError(env, NULL);
+        return -1;
     }
     if ((sock = openSocketWithFallback(env, name_utf)) < 0) {
         (*env)->ReleaseStringUTFChars(env, name, name_utf);
@@ -648,7 +661,7 @@
     netif *childP;
     jobject tmp;
 
-    // Create a NetworkInterface object and populate it
+    // create a NetworkInterface object and populate it
     netifObj = (*env)->NewObject(env, ni_class, ni_ctrID);
     CHECK_NULL_RETURN(netifObj, NULL);
     name = (*env)->NewStringUTF(env, ifs->name);
@@ -659,7 +672,7 @@
     (*env)->SetBooleanField(env, netifObj, ni_virutalID,
                             ifs->virtual ? JNI_TRUE : JNI_FALSE);
 
-    //Count the number of address on this interface
+    // count the number of addresses on this interface
     addr_count = 0;
     addrP = ifs->addr;
     while (addrP != NULL) {
@@ -667,7 +680,7 @@
         addrP = addrP->next;
     }
 
-    // Create the array of InetAddresses
+    // create the array of InetAddresses
     addrArr = (*env)->NewObjectArray(env, addr_count, ia_class, NULL);
     if (addrArr == NULL) {
         return NULL;
@@ -687,32 +700,31 @@
         if (addrP->family == AF_INET) {
             iaObj = (*env)->NewObject(env, ia4_class, ia4_ctrID);
             if (iaObj) {
-                 setInetAddress_addr(env, iaObj, htonl(
-                     ((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr));
+                setInetAddress_addr(env, iaObj, htonl(
+                    ((struct sockaddr_in*)addrP->addr)->sin_addr.s_addr));
             } else {
                 return NULL;
             }
             ibObj = (*env)->NewObject(env, ni_ibcls, ni_ibctrID);
             if (ibObj) {
-                 (*env)->SetObjectField(env, ibObj, ni_ibaddressID, iaObj);
-                 if (addrP->brdcast) {
+                (*env)->SetObjectField(env, ibObj, ni_ibaddressID, iaObj);
+                if (addrP->brdcast) {
                     jobject ia2Obj = NULL;
                     ia2Obj = (*env)->NewObject(env, ia4_class, ia4_ctrID);
                     if (ia2Obj) {
-                       setInetAddress_addr(env, ia2Obj, htonl(
-                           ((struct sockaddr_in*)addrP->brdcast)->sin_addr.s_addr));
-                       (*env)->SetObjectField(env, ibObj, ni_ib4broadcastID, ia2Obj);
+                        setInetAddress_addr(env, ia2Obj, htonl(
+                            ((struct sockaddr_in*)addrP->brdcast)->sin_addr.s_addr));
+                        (*env)->SetObjectField(env, ibObj, ni_ib4broadcastID, ia2Obj);
                     } else {
                         return NULL;
                     }
-                 }
-                 (*env)->SetShortField(env, ibObj, ni_ib4maskID, addrP->mask);
-                 (*env)->SetObjectArrayElement(env, bindArr, bind_index++, ibObj);
+                }
+                (*env)->SetShortField(env, ibObj, ni_ib4maskID, addrP->mask);
+                (*env)->SetObjectArrayElement(env, bindArr, bind_index++, ibObj);
             } else {
                 return NULL;
             }
         }
-
 #if defined(AF_INET6)
         if (addrP->family == AF_INET6) {
             int scope=0;
@@ -748,7 +760,7 @@
         addrP = addrP->next;
     }
 
-    // See if there is any virtual interface attached to this one.
+    // see if there is any virtual interface attached to this one.
     child_count = 0;
     childP = ifs->childs;
     while (childP) {
@@ -761,17 +773,17 @@
         return NULL;
     }
 
-    // Create the NetworkInterface instances for the sub-interfaces as well.
+    // create the NetworkInterface instances for the sub-interfaces as well
     child_index = 0;
     childP = ifs->childs;
     while(childP) {
-      tmp = createNetworkInterface(env, childP);
-      if (tmp == NULL) {
-         return NULL;
-      }
-      (*env)->SetObjectField(env, tmp, ni_parentID, netifObj);
-      (*env)->SetObjectArrayElement(env, childArr, child_index++, tmp);
-      childP = childP->next;
+        tmp = createNetworkInterface(env, childP);
+        if (tmp == NULL) {
+            return NULL;
+        }
+        (*env)->SetObjectField(env, tmp, ni_parentID, netifObj);
+        (*env)->SetObjectArrayElement(env, childArr, child_index++, tmp);
+        childP = childP->next;
     }
     (*env)->SetObjectField(env, netifObj, ni_addrsID, addrArr);
     (*env)->SetObjectField(env, netifObj, ni_bindsID, bindArr);
@@ -785,46 +797,42 @@
  * Enumerates all interfaces
  */
 static netif *enumInterfaces(JNIEnv *env) {
-    netif *ifs;
+    netif *ifs = NULL;
     int sock;
 
-    // Enumerate IPv4 addresses
     sock = openSocket(env, AF_INET);
     if (sock < 0 && (*env)->ExceptionOccurred(env)) {
         return NULL;
     }
 
+    // enumerate IPv4 addresses
     ifs = enumIPv4Interfaces(env, sock, NULL);
     close(sock);
 
+    // return partial list if an exception occurs in the middle of process ???
     if (ifs == NULL && (*env)->ExceptionOccurred(env)) {
         return NULL;
     }
 
-    // return partial list if an exception occurs in the middle of process ???
-
     // If IPv6 is available then enumerate IPv6 addresses.
 #if defined(AF_INET6)
-
         // User can disable ipv6 explicitly by -Djava.net.preferIPv4Stack=true,
         // so we have to call ipv6_available()
         if (ipv6_available()) {
+            sock = openSocket(env, AF_INET6);
+            if (sock < 0 && (*env)->ExceptionOccurred(env)) {
+                freeif(ifs);
+                return NULL;
+            }
 
-           sock = openSocket(env, AF_INET6);
-           if (sock < 0 && (*env)->ExceptionOccurred(env)) {
-               freeif(ifs);
-               return NULL;
-           }
+            ifs = enumIPv6Interfaces(env, sock, ifs);
+            close(sock);
 
-           ifs = enumIPv6Interfaces(env, sock, ifs);
-           close(sock);
-
-           if ((*env)->ExceptionOccurred(env)) {
-              freeif(ifs);
-              return NULL;
-           }
-
-       }
+            if ((*env)->ExceptionOccurred(env)) {
+                freeif(ifs);
+                return NULL;
+            }
+        }
 #endif
 
     return ifs;
@@ -845,7 +853,7 @@
             addrP = next;
         }
 
-        // Don't forget to free the sub-interfaces.
+        // don't forget to free the sub-interfaces
         if (currif->childs != NULL) {
             freeif(currif->childs);
         }
@@ -863,26 +871,17 @@
 {
     netif *currif = ifs, *parent;
     netaddr *addrP;
-
-#ifdef LIFNAMSIZ
-    int ifnam_size = LIFNAMSIZ;
-    char name[LIFNAMSIZ], vname[LIFNAMSIZ];
-#else
-    int ifnam_size = IFNAMSIZ;
-    char name[IFNAMSIZ], vname[IFNAMSIZ];
-#endif
-
+    char name[IFNAMESIZE], vname[IFNAMESIZE];
     char *name_colonP;
     int isVirtual = 0;
     int addr_size;
-    int flags = 0;
 
     // If the interface name is a logical interface then we remove the unit
     // number so that we have the physical interface (eg: hme0:1 -> hme0).
     // NetworkInterface currently doesn't have any concept of physical vs.
     // logical interfaces.
-    strncpy(name, if_name, ifnam_size);
-    name[ifnam_size - 1] = '\0';
+    strncpy(name, if_name, IFNAMESIZE);
+    name[IFNAMESIZE - 1] = '\0';
     *vname = 0;
 
     // Create and populate the netaddr node. If allocation fails
@@ -917,20 +916,21 @@
     // Deal with virtual interface with colon notation e.g. eth0:1
     name_colonP = strchr(name, ':');
     if (name_colonP != NULL) {
+        int flags = 0;
         // This is a virtual interface. If we are able to access the parent
         // we need to create a new entry if it doesn't exist yet *and* update
         // the 'parent' interface with the new records.
         *name_colonP = 0;
         if (getFlags(sock, name, &flags) < 0 || flags < 0) {
-             // failed to access parent interface do not create parent.
-             // We are a virtual interface with no parent.
-             isVirtual = 1;
-             *name_colonP = ':';
+            // failed to access parent interface do not create parent.
+            // We are a virtual interface with no parent.
+            isVirtual = 1;
+            *name_colonP = ':';
         } else {
-             // Got access to parent, so create it if necessary.
-             // Save original name to vname and truncate name by ':'
-             memcpy(vname, name, sizeof(vname) );
-             vname[name_colonP - name] = ':';
+            // Got access to parent, so create it if necessary.
+            // Save original name to vname and truncate name by ':'
+            memcpy(vname, name, sizeof(vname));
+            vname[name_colonP - name] = ':';
         }
     }
 
@@ -943,12 +943,12 @@
         currif = currif->next;
     }
 
-    // If "new" then create an netif structure and insert it into the list.
+    // If "new" then create a netif structure and insert it into the list.
     if (currif == NULL) {
-         CHECKED_MALLOC3(currif, netif *, sizeof(netif) + ifnam_size);
+         CHECKED_MALLOC3(currif, netif *, sizeof(netif) + IFNAMESIZE);
          currif->name = (char *)currif + sizeof(netif);
-         strncpy(currif->name, name, ifnam_size);
-         currif->name[ifnam_size - 1] = '\0';
+         strncpy(currif->name, name, IFNAMESIZE);
+         currif->name[IFNAMESIZE - 1] = '\0';
          currif->index = getIndex(sock, name);
          currif->addr = NULL;
          currif->childs = NULL;
@@ -977,13 +977,12 @@
         }
 
         if (currif == NULL) {
-            CHECKED_MALLOC3(currif, netif *, sizeof(netif) + ifnam_size);
+            CHECKED_MALLOC3(currif, netif *, sizeof(netif) + IFNAMESIZE);
             currif->name = (char *)currif + sizeof(netif);
-            strncpy(currif->name, vname, ifnam_size);
-            currif->name[ifnam_size - 1] = '\0';
+            strncpy(currif->name, vname, IFNAMESIZE);
+            currif->name[IFNAMESIZE - 1] = '\0';
             currif->index = getIndex(sock, vname);
-            currif->addr = NULL;
-            // Need to duplicate the addr entry?
+            currif->addr = NULL; // Need to duplicate the addr entry?
             currif->virtual = 1;
             currif->childs = NULL;
             currif->next = parent->childs;
@@ -1150,7 +1149,7 @@
         struct sockaddr addr, broadaddr, *broadaddrP = NULL;
         short prefix = 0;
 
-        // ignore non IPv4 interfaces
+        // ignore non IPv4 addresses
         if (ifreqP->ifr_addr.sa_family != AF_INET) {
             continue;
         }
@@ -1264,19 +1263,26 @@
  * MAC address. Returns -1 if there is no hardware address on that interface.
  */
 static int getMacAddress
-  (JNIEnv *env, int sock, const char *ifname, const struct in_addr *addr,
+  (JNIEnv *env, const char *ifname, const struct in_addr *addr,
    unsigned char *buf)
 {
     static struct ifreq ifr;
-    int i;
+    int i, sock;
+
+    if ((sock = openSocketWithFallback(env, ifname)) < 0) {
+        return -1;
+    }
+
     memset((char *)&ifr, 0, sizeof(ifr));
     strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name) - 1);
     if (ioctl(sock, SIOCGIFHWADDR, &ifr) < 0) {
         JNU_ThrowByNameWithMessageAndLastError
             (env, JNU_JAVANETPKG "SocketException", "ioctl(SIOCGIFHWADDR) failed");
+        close(sock);
         return -1;
     }
 
+    close(sock);
     memcpy(buf, &ifr.ifr_hwaddr.sa_data, IFHWADDRLEN);
 
     // all bytes to 0 means no hardware address
@@ -1388,7 +1394,7 @@
         struct sockaddr addr, broadaddr, *broadaddrP = NULL;
         short prefix = 0;
 
-        // ignore non IPv4 interfaces
+        // ignore non IPv4 addresses
         if (ifreqP->ifr_addr.sa_family != AF_INET) {
             continue;
         }
@@ -1444,7 +1450,7 @@
 static netif *enumIPv6Interfaces(JNIEnv *env, int sock, netif *ifs) {
     struct ifconf ifc;
     struct ifreq *ifreqP;
-    char *buf;
+    char *buf, *cp, *cplimit;
 
     // call SIOCGSIZIFCONF to get size for SIOCGIFCONF buffer
     if (ioctl(sock, SIOCGSIZIFCONF, &(ifc.ifc_len)) < 0) {
@@ -1464,8 +1470,9 @@
     }
 
     // iterate through each interface
-    char *cp = (char *)ifc.ifc_req;
-    char *cplimit = cp + ifc.ifc_len;
+    ifreqP = ifc.ifc_req;
+    cp = (char *)ifc.ifc_req;
+    cplimit = cp + ifc.ifc_len;
 
     for (; cp < cplimit;
          cp += (sizeof(ifreqP->ifr_name) +
@@ -1474,7 +1481,7 @@
         ifreqP = (struct ifreq *)cp;
         short prefix = 0;
 
-        // ignore non IPv6 interfaces
+        // ignore non IPv6 addresses
         if (ifreqP->ifr_addr.sa_family != AF_INET6) {
             continue;
         }
@@ -1527,7 +1534,7 @@
  * MAC address. Returns -1 if there is no hardware address on that interface.
  */
 static int getMacAddress
-  (JNIEnv *env, int sock, const char *ifname, const struct in_addr *addr,
+  (JNIEnv *env, const char *ifname, const struct in_addr *addr,
    unsigned char *buf)
 {
     int size;
@@ -1586,20 +1593,20 @@
 }
 
 static int getFlags(int sock, const char *ifname, int *flags) {
-  struct ifreq if2;
-  memset((char *)&if2, 0, sizeof(if2));
-  strncpy(if2.ifr_name, ifname, sizeof(if2.ifr_name) - 1);
+    struct ifreq if2;
+    memset((char *)&if2, 0, sizeof(if2));
+    strncpy(if2.ifr_name, ifname, sizeof(if2.ifr_name) - 1);
 
-  if (ioctl(sock, SIOCGIFFLAGS, (char *)&if2) < 0) {
-      return -1;
-  }
+    if (ioctl(sock, SIOCGIFFLAGS, (char *)&if2) < 0) {
+        return -1;
+    }
 
-  if (sizeof(if2.ifr_flags) == sizeof(short)) {
-      *flags = (if2.ifr_flags & 0xffff);
-  } else {
-      *flags = if2.ifr_flags;
-  }
-  return 0;
+    if (sizeof(if2.ifr_flags) == sizeof(short)) {
+        *flags = (if2.ifr_flags & 0xffff);
+    } else {
+        *flags = if2.ifr_flags;
+    }
+    return 0;
 }
 
 #endif /* _AIX */
@@ -1668,7 +1675,7 @@
     char *buf = NULL;
     unsigned i;
 
-    // call SIOCGLIFNUM to get the size of SIOCGIFCONF buffer
+    // call SIOCGLIFNUM to get the interface count
     numifs.lifn_family = AF_INET;
     numifs.lifn_flags = 0;
     if (ioctl(sock, SIOCGLIFNUM, (char *)&numifs) < 0) {
@@ -1695,7 +1702,7 @@
     for (i = 0; i < numifs.lifn_count; i++, ifreqP++) {
         struct sockaddr addr, *broadaddrP = NULL;
 
-        // ignore non IPv4 interfaces
+        // ignore non IPv4 addresses
         if (ifreqP->lifr_addr.ss_family != AF_INET) {
             continue;
         }
@@ -1744,7 +1751,7 @@
     char *buf = NULL;
     unsigned i;
 
-    // call SIOCGLIFNUM to get the size of SIOCGLIFCONF buffer
+    // call SIOCGLIFNUM to get the interface count
     numifs.lifn_family = AF_INET6;
     numifs.lifn_flags = 0;
     if (ioctl(sock, SIOCGLIFNUM, (char *)&numifs) < 0) {
@@ -1770,7 +1777,7 @@
     ifreqP = ifc.lifc_req;
     for (i = 0; i < numifs.lifn_count; i++, ifreqP++) {
 
-        // ignore non IPv6 interfaces
+        // ignore non IPv6 addresses
         if (ifreqP->lifr_addr.ss_family != AF_INET6) {
             continue;
         }
@@ -1789,7 +1796,7 @@
             free(buf);
             return ifs;
         }
-   }
+    }
 
     // free buffer
     free(buf);
@@ -1834,9 +1841,9 @@
     strcpy(style1dev, DEV_PREFIX);
     strcat(style1dev, ifname);
     if ((fd = open(style1dev, O_RDWR)) < 0) {
-         // Can't open it. We probably are missing the privilege.
-         // We'll have to try something else
-         return 0;
+        // Can't open it. We probably are missing the privilege.
+        // We'll have to try something else
+        return 0;
     }
 
     dlpareq.dl_primitive = DL_PHYS_ADDR_REQ;
@@ -1878,11 +1885,15 @@
  * MAC address. Returns -1 if there is no hardware address on that interface.
  */
 static int getMacAddress
-  (JNIEnv *env, int sock, const char *ifname, const struct in_addr *addr,
+  (JNIEnv *env, const char *ifname, const struct in_addr *addr,
    unsigned char *buf)
 {
     struct lifreq if2;
-    int len, i;
+    int len, i, sock;
+
+    if ((sock = openSocketWithFallback(env, ifname)) < 0) {
+        return -1;
+    }
 
     // First, try the new (S11) SIOCGLIFHWADDR ioctl(). If that fails
     // try the old way.
@@ -1893,40 +1904,36 @@
         struct sockaddr_dl *sp;
         sp = (struct sockaddr_dl *)&if2.lifr_addr;
         memcpy(buf, &sp->sdl_data[0], sp->sdl_alen);
+        close(sock);
         return sp->sdl_alen;
     }
 
     // On Solaris we have to use DLPI, but it will only work if we have
     // privileged access (i.e. root). If that fails, we try a lookup
     // in the ARP table, which requires an IPv4 address.
-    if ((len = getMacFromDevice(env, ifname, buf))  == 0) {
-        // DLPI failed - trying to do arp lookup
-
+    if (((len = getMacFromDevice(env, ifname, buf)) == 0) && (addr != NULL)) {
         struct arpreq arpreq;
         struct sockaddr_in *sin;
         struct sockaddr_in ipAddr;
 
-        if (addr == NULL) {
-             // No IPv4 address for that interface, so can't do an ARP lookup.
-             return -1;
-         }
+        len = 6; //???
 
-         len = 6; //???
+        sin = (struct sockaddr_in *)&arpreq.arp_pa;
+        memset((char *)&arpreq, 0, sizeof(struct arpreq));
+        ipAddr.sin_port = 0;
+        ipAddr.sin_family = AF_INET;
+        memcpy(&ipAddr.sin_addr, addr, sizeof(struct in_addr));
+        memcpy(&arpreq.arp_pa, &ipAddr, sizeof(struct sockaddr_in));
+        arpreq.arp_flags= ATF_PUBL;
 
-         sin = (struct sockaddr_in *)&arpreq.arp_pa;
-         memset((char *)&arpreq, 0, sizeof(struct arpreq));
-         ipAddr.sin_port = 0;
-         ipAddr.sin_family = AF_INET;
-         memcpy(&ipAddr.sin_addr, addr, sizeof(struct in_addr));
-         memcpy(&arpreq.arp_pa, &ipAddr, sizeof(struct sockaddr_in));
-         arpreq.arp_flags= ATF_PUBL;
+        if (ioctl(sock, SIOCGARP, &arpreq) < 0) {
+            close(sock);
+            return -1;
+        }
 
-         if (ioctl(sock, SIOCGARP, &arpreq) < 0) {
-             return -1;
-         }
-
-         memcpy(buf, &arpreq.arp_ha.sa_data[0], len);
+        memcpy(buf, &arpreq.arp_ha.sa_data[0], len);
     }
+    close(sock);
 
     // all bytes to 0 means no hardware address
     for (i = 0; i < len; i++) {
@@ -2014,7 +2021,7 @@
     for (ifa = origifa; ifa != NULL; ifa = ifa->ifa_next) {
         struct sockaddr *broadaddrP = NULL;
 
-        // ignore non IPv4 interfaces
+        // ignore non IPv4 addresses
         if (ifa->ifa_addr == NULL || ifa->ifa_addr->sa_family != AF_INET)
             continue;
 
@@ -2058,7 +2065,7 @@
     }
 
     for (ifa = origifa; ifa != NULL; ifa = ifa->ifa_next) {
-        // ignore non IPv6 interfaces
+        // ignore non IPv6 addresses
         if (ifa->ifa_addr == NULL || ifa->ifa_addr->sa_family != AF_INET6)
             continue;
 
@@ -2113,22 +2120,22 @@
  * MAC address. Returns -1 if there is no hardware address on that interface.
  */
 static int getMacAddress
-  (JNIEnv *env, int sock, const char *ifname, const struct in_addr *addr,
+  (JNIEnv *env, const char *ifname, const struct in_addr *addr,
    unsigned char *buf)
 {
     struct ifaddrs *ifa0, *ifa;
     struct sockaddr *saddr;
     int i;
 
-    // Grab the interface list
+    // grab the interface list
     if (!getifaddrs(&ifa0)) {
-        // Cycle through the interfaces
+        // cycle through the interfaces
         for (i = 0, ifa = ifa0; ifa != NULL; ifa = ifa->ifa_next, i++) {
             saddr = ifa->ifa_addr;
-            // Link layer contains the MAC address
+            // link layer contains the MAC address
             if (saddr->sa_family == AF_LINK && !strcmp(ifname, ifa->ifa_name)) {
                 struct sockaddr_dl *sadl = (struct sockaddr_dl *) saddr;
-                // Check the address is the correct length
+                // check the address has the correct length
                 if (sadl->sdl_alen == ETHER_ADDR_LEN) {
                     memcpy(buf, (sadl->sdl_data + sadl->sdl_nlen), ETHER_ADDR_LEN);
                     freeifaddrs(ifa0);
--- a/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/unix/native/libnio/fs/UnixNativeDispatcher.c	Sat Sep 10 12:23:52 2016 -0700
@@ -52,6 +52,10 @@
 #include <strings.h>
 #endif
 
+#ifdef __linux__
+#include <sys/syscall.h>
+#endif
+
 #if defined(__linux__) || defined(_AIX)
 #include <string.h>
 #endif
@@ -157,14 +161,11 @@
 }
 #endif
 
-#if defined(__linux__) && defined(__x86_64__)
+#if defined(__linux__) && defined(_LP64) && defined(__NR_newfstatat)
 #define FSTATAT64_SYSCALL_AVAILABLE
 static int fstatat64_wrapper(int dfd, const char *path,
                              struct stat64 *statbuf, int flag)
 {
-    #ifndef __NR_newfstatat
-    #define __NR_newfstatat  262
-    #endif
     return syscall(__NR_newfstatat, dfd, path, statbuf, flag);
 }
 #endif
--- a/src/java.base/windows/classes/java/lang/ProcessImpl.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.base/windows/classes/java/lang/ProcessImpl.java	Sat Sep 10 12:23:52 2016 -0700
@@ -564,6 +564,20 @@
     private static native boolean isProcessAlive(long handle);
 
     /**
+     * The {@code toString} method returns a string consisting of
+     * the native process ID of the process and the exit value of the process.
+     *
+     * @return a string representation of the object.
+     */
+    @Override
+    public String toString() {
+        int exitCode = getExitCodeProcess(handle);
+        return new StringBuilder("Process[pid=").append(getPid())
+                .append(", exitValue=").append(exitCode == STILL_ACTIVE ? "\"not exited\"" : exitCode)
+                .append("]").toString();
+    }
+
+    /**
      * Create a process using the win32 function CreateProcess.
      * The method is synchronized due to MS kb315939 problem.
      * All native handles should restore the inherit flag at the end of call.
--- a/src/java.desktop/share/classes/com/sun/media/sound/DLSInfo.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.desktop/share/classes/com/sun/media/sound/DLSInfo.java	Sat Sep 10 12:23:52 2016 -0700
@@ -95,7 +95,7 @@
     public String subject = null;
     /**
      * (ISRC) Name of person or orginization who supplied
-     *        orginal material for the file.
+     *        original material for the file.
      */
     public String source = null;
     /**
--- a/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.management/share/classes/javax/management/remote/rmi/RMIConnector.java	Sat Sep 10 12:23:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -64,6 +64,7 @@
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Map;
+import java.util.Objects;
 import java.util.Set;
 import java.util.WeakHashMap;
 import java.util.stream.Collectors;
@@ -1851,8 +1852,11 @@
     private static final class ObjectInputStreamWithLoader
             extends ObjectInputStream {
         ObjectInputStreamWithLoader(InputStream in, ClassLoader cl)
-        throws IOException {
+        throws IOException, IllegalArgumentException {
             super(in);
+            if (cl == null ) {
+              throw new IllegalArgumentException("class loader is null");
+            }
             this.loader = cl;
         }
 
@@ -1861,7 +1865,7 @@
                 throws IOException, ClassNotFoundException {
             String name = classDesc.getName();
             ReflectUtil.checkPackageAccess(name);
-            return Class.forName(name, false, loader);
+            return Class.forName(name, false, Objects.requireNonNull(loader));
         }
 
         private final ClassLoader loader;
--- a/src/java.management/share/classes/module-info.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.management/share/classes/module-info.java	Sat Sep 10 12:23:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,6 +50,7 @@
     uses javax.management.remote.JMXConnectorProvider;
     uses javax.management.remote.JMXConnectorServerProvider;
     uses sun.management.spi.PlatformMBeanProvider;
+    uses sun.management.spi.AgentProvider;
 
     provides javax.security.auth.spi.LoginModule
         with com.sun.jmx.remote.security.FileLoginModule;
--- a/src/java.management/share/classes/sun/management/Agent.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/java.management/share/classes/sun/management/Agent.java	Sat Sep 10 12:23:52 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
  * 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,17 +31,19 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.lang.management.ManagementFactory;
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.InetAddress;
 import java.net.MalformedURLException;
 import java.net.UnknownHostException;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.text.MessageFormat;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.MissingResourceException;
 import java.util.Properties;
 import java.util.ResourceBundle;
+import java.util.ServiceLoader;
 import java.util.function.Function;
 import java.util.function.Predicate;
 
@@ -53,6 +55,7 @@
 import sun.management.jdp.JdpController;
 import sun.management.jdp.JdpException;
 import jdk.internal.vm.VMSupport;
+import sun.management.spi.AgentProvider;
 
 /**
  * This Agent is started by the VM when -Dcom.sun.management.snmp or
@@ -248,8 +251,8 @@
             "com.sun.management.enableThreadContentionMonitoring";
     private static final String LOCAL_CONNECTOR_ADDRESS_PROP =
             "com.sun.management.jmxremote.localConnectorAddress";
-    private static final String SNMP_ADAPTOR_BOOTSTRAP_CLASS_NAME =
-            "sun.management.snmp.AdaptorBootstrap";
+    private static final String SNMP_AGENT_NAME =
+            "SnmpAgent";
 
     private static final String JDP_DEFAULT_ADDRESS = "224.0.23.178";
     private static final int JDP_DEFAULT_PORT = 7095;
@@ -429,7 +432,7 @@
 
         try {
             if (snmpPort != null) {
-                loadSnmpAgent(snmpPort, props);
+                loadSnmpAgent(props);
             }
 
             /*
@@ -554,28 +557,24 @@
         return mgmtProps;
     }
 
-    private static void loadSnmpAgent(String snmpPort, Properties props) {
-        try {
-            // invoke the following through reflection:
-            //     AdaptorBootstrap.initialize(snmpPort, props);
-            final Class<?> adaptorClass =
-                    Class.forName(SNMP_ADAPTOR_BOOTSTRAP_CLASS_NAME, true, null);
-            final Method initializeMethod =
-                    adaptorClass.getMethod("initialize",
-                    String.class, Properties.class);
-            initializeMethod.invoke(null, snmpPort, props);
-        } catch (ClassNotFoundException | NoSuchMethodException | IllegalAccessException x) {
-            // snmp runtime doesn't exist - initialization fails
-            throw new UnsupportedOperationException("Unsupported management property: " + SNMP_PORT, x);
-        } catch (InvocationTargetException x) {
-            final Throwable cause = x.getCause();
-            if (cause instanceof RuntimeException) {
-                throw (RuntimeException) cause;
-            } else if (cause instanceof Error) {
-                throw (Error) cause;
-            }
-            // should not happen...
-            throw new UnsupportedOperationException("Unsupported management property: " + SNMP_PORT, cause);
+    private static void loadSnmpAgent(Properties props) {
+        /*
+         * Load the jdk.snmp service
+         */
+        AgentProvider provider = AccessController.doPrivileged(
+            (PrivilegedAction<AgentProvider>) () -> {
+                for(AgentProvider aProvider : ServiceLoader.loadInstalled(AgentProvider.class)) {
+                    if(aProvider.getName().equals(SNMP_AGENT_NAME))
+                        return aProvider;
+                }
+                return null;
+            },  null
+        );
+
+        if (provider != null) {
+            provider.startAgent(props);
+         } else { // snmp runtime doesn't exist - initialization fails
+            throw new UnsupportedOperationException("Unsupported management property: " + SNMP_PORT);
         }
     }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/java.management/share/classes/sun/management/spi/AgentProvider.java	Sat Sep 10 12:23:52 2016 -0700
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute 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.management.spi;
+
+import java.util.Properties;
+
+/**
+ * Service interface for management agent
+ */
+public abstract class AgentProvider {
+
+    /**
+     * Instantiates a new AgentProvider.
+     *
+     * @throws SecurityException if the subclass (and calling code) does not
+     * have
+     * {@code RuntimePermission("sun.management.spi.AgentProvider.subclass")}
+     */
+    protected AgentProvider() {
+        this(checkSubclassPermission());
+    }
+
+    private AgentProvider(Void unused) {
+    }
+
+    private static Void checkSubclassPermission() {
+        SecurityManager sm = System.getSecurityManager();
+        if (sm != null) {
+            sm.checkPermission(new RuntimePermission(AgentProvider.class.getName() + ".subclass"));
+        }
+        return null;
+    }
+
+    /**
+     * Gets the name of the agent provider.
+     *
+     * @return name of agent provider
+     */
+    public abstract String getName();
+
+    /**
+     * Initializes and starts the agent.
+     *
+     * @throws IllegalStateException if this agent has already been started.
+     */
+    public abstract void startAgent();
+
+    /**
+     * Initializes and starts the agent at given port and with given properties
+     *
+     * @param props environment variables for agent
+     *
+     * @throws IllegalStateException if this agent has already been started.
+     */
+    public abstract void startAgent(Properties props);
+
+    /**
+     * Checks if agent is started and not terminated.
+     *
+     * @return true if agent is running, false otherwise.
+     */
+    public abstract boolean isActive();
+
+    /**
+     * Stops this agent.
+     *
+     * @throws IllegalStateException if this agent is not started.
+     */
+    public abstract void stopAgent();
+}
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/builder/DefaultImageBuilder.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/builder/DefaultImageBuilder.java	Sat Sep 10 12:23:52 2016 -0700
@@ -189,12 +189,12 @@
             storeFiles(modules, release);
 
             if (Files.getFileStore(root).supportsFileAttributeView(PosixFileAttributeView.class)) {
-                // launchers in the bin directory need execute permission
+                // launchers in the bin directory need execute permission.
+                // On Windows, "bin" also subdirectories containing jvm.dll.
                 if (Files.isDirectory(bin)) {
-                    Files.list(bin)
-                            .filter(f -> !f.toString().endsWith(".diz"))
-                            .filter(f -> Files.isRegularFile(f))
-                            .forEach(this::setExecutable);
+                    Files.find(bin, 2, (path, attrs) -> {
+                        return attrs.isRegularFile() && !path.toString().endsWith(".diz");
+                    }).forEach(this::setExecutable);
                 }
 
                 // jspawnhelper is in lib or lib/<arch>
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeVMPlugin.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/ExcludeVMPlugin.java	Sat Sep 10 12:23:52 2016 -0700
@@ -99,9 +99,15 @@
      * e.g.: /java.base/native/amd64/server/libjvm.so
      * /java.base/native/server/libjvm.dylib
      */
-    private List<ResourcePoolEntry> getVMs(ResourcePoolModule javaBase, String jvmlib) {
+    private List<ResourcePoolEntry> getVMs(ResourcePoolModule javaBase, String[] jvmlibs) {
         List<ResourcePoolEntry> ret = javaBase.entries().filter((t) -> {
-            return t.path().endsWith("/" + jvmlib);
+            String path = t.path();
+            for (String jvmlib : jvmlibs) {
+                if (t.path().endsWith("/" + jvmlib)) {
+                    return true;
+                }
+            }
+            return false;
         }).collect(Collectors.toList());
         return ret;
     }
@@ -109,18 +115,21 @@
     @Override
     public ResourcePool transform(ResourcePool in, ResourcePoolBuilder out) {
         ResourcePoolModule javaBase = in.moduleView().findModule("java.base").get();
-        String jvmlib = jvmlib(javaBase.descriptor().osName().get());
+        String[] jvmlibs = jvmlibs(javaBase.descriptor().osName().get());
         TreeSet<Jvm> existing = new TreeSet<>(new JvmComparator());
         TreeSet<Jvm> removed = new TreeSet<>(new JvmComparator());
         if (!keepAll) {
             // First retrieve all available VM names and removed VM
-            List<ResourcePoolEntry> jvms = getVMs(javaBase, jvmlib);
+            List<ResourcePoolEntry> jvms = getVMs(javaBase, jvmlibs);
             for (Jvm jvm : Jvm.values()) {
                 for (ResourcePoolEntry md : jvms) {
-                    if (md.path().endsWith("/" + jvm.getName() + "/" + jvmlib)) {
-                        existing.add(jvm);
-                        if (isRemoved(md)) {
-                            removed.add(jvm);
+                    String mdPath = md.path();
+                    for (String jvmlib : jvmlibs) {
+                        if (mdPath.endsWith("/" + jvm.getName() + "/" + jvmlib)) {
+                            existing.add(jvm);
+                            if (isRemoved(md)) {
+                                removed.add(jvm);
+                            }
                         }
                     }
                 }
@@ -248,14 +257,14 @@
         return orig.copyWithContent(content);
     }
 
-    private static String jvmlib(String osName) {
-        String lib = "libjvm.so";
+    private static String[] jvmlibs(String osName) {
         if (isWindows(osName)) {
-            lib = "jvm.dll";
+            return new String[] { "jvm.dll" };
         } else if (isMac(osName)) {
-            lib = "libjvm.dylib";
+            return new String[] { "libjvm.dylib", "libjvm.a" };
+        } else {
+            return new String[] { "libjvm.so", "libjvm.a" };
         }
-        return lib;
     }
 
     private static boolean isWindows(String osName) {
--- a/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties	Sat Sep 10 08:27:40 2016 -0400
+++ b/src/jdk.jlink/share/classes/jdk/tools/jlink/resources/plugins.properties	Sat Sep 10 12:23:52 2016 -0700
@@ -139,7 +139,8 @@
 \  --plugin-module-path <modulepath> Custom plugin module path
 
 plugin.opt.c=\
-\  -c, --compress=2                  Enable compression of resources (level 2)
+\  -c, --compress=<0|1|2>            Enable compression of resources\
+\n                                    More details in --list-plugins option
 
 plugin.opt.G=\
 \  -G, --strip-debug                 Strip debug information
--- a/test/ProblemList.txt	Sat Sep 10 08:27:40 2016 -0400
+++ b/test/ProblemList.txt	Sat Sep 10 12:23:52 2016 -0700
@@ -310,8 +310,6 @@
 
 tools/pack200/CommandLineTests.java                             7143279,8059906 generic-all
 
-tools/pack200/Pack200Test.java                                  8059906,8151901 generic-all
-
 tools/launcher/FXLauncherTest.java                              8068049 linux-all,macosx-all
 
 tools/pack200/Pack200Props.java                                 8155857 generic-all
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/ClassLoader/GetDefinedPackage.java	Sat Sep 10 12:23:52 2016 -0700
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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 8165346
+ * @summary Basic test for ClassLoader::getDefinedPackage
+ */
+
+public class GetDefinedPackage {
+    public static void main(String... args) {
+        TestClassLoader loader = new TestClassLoader();
+        Package pkg = loader.getDefinedPackage(TestClassLoader.PKG_NAME);
+        if (pkg == null) {
+            throw new RuntimeException("package foo not found");
+        }
+
+        try {
+            loader.getDefinedPackage(null);
+            throw new RuntimeException("NullPointerException not thrown");
+        } catch (NullPointerException e) {
+        }
+    }
+
+    static class TestClassLoader extends ClassLoader {
+        public static final String PKG_NAME = "foo";
+
+        public TestClassLoader() {
+            super();
+            definePackage(PKG_NAME);
+        }
+
+        public Package definePackage(String name) {
+            return definePackage(name, null, null, null, null, null, null, null);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/java/lang/ClassLoader/ResourcesStreamTest.java	Sat Sep 10 12:23:52 2016 -0700
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please 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.IOException;
+import java.io.UncheckedIOException;
+import java.net.URL;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/*
+ * @test
+ * @bug 8161230
+ * @summary Test java.lang.ClassLoader.resources() method
+ *
+ * @build ResourcesStreamTest
+ * @run main ResourcesStreamTest
+ */
+public class ResourcesStreamTest {
+
+    public static void main(String[] args) throws Exception {
+        testSuccess();
+        testFailure();
+    }
+
+    public static void testSuccess() throws Exception {
+        // failing part first
+        try {
+            ClassLoader cl = new FailingClassLoader();
+            // should create the stream pipe
+            Stream<URL> stream = cl.resources("the name");
+            // expect function to throw an exception when calling the method
+            stream.forEach(System.out::println);
+            throw new Exception("expected UncheckedIOException not thrown");
+        } catch (UncheckedIOException uio) {
+            String causeMessage = uio.getCause().getMessage();
+            if (!"the name".equals(causeMessage))
+                throw new Exception("unexpected cause message: " + causeMessage);
+        }
+    }
+
+    public static void testFailure() throws Exception {
+        ClassLoader cl = new SuccessClassLoader();
+        long count = cl.resources("the name").count();
+        if (count != 1)
+            throw new Exception("expected resource is null or empty");
+
+        cl.resources("the name")
+          .filter(url -> "file:/somefile".equals(url.toExternalForm()))
+          .findFirst()
+          .orElseThrow(() -> new Exception("correct URL not found"));
+    }
+
+    public static class SuccessClassLoader extends ClassLoader {
+        @Override
+        public Enumeration<URL> getResources(String name) throws IOException {
+            URL url = new URL("file:/somefile");
+            return Collections.enumeration(Collections.singleton(url));
+        }
+    }
+
+    public static class FailingClassLoader extends ClassLoader {
+        @Override
+        public Enumeration<URL> getResources(String name) throws IOException {
+            throw new IOException(name);
+        }
+    }
+}
--- a/test/java/lang/ProcessBuilder/Basic.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/test/java/lang/ProcessBuilder/Basic.java	Sat Sep 10 12:23:52 2016 -0700
@@ -2226,6 +2226,33 @@
                     reader.join();
                 }
             }
+
+            //----------------------------------------------------------------
+            // Check the Process toString() method
+            //----------------------------------------------------------------
+            {
+                List<String> childArgs = new ArrayList<String>(javaChildArgs);
+                childArgs.add("testIO");
+                ProcessBuilder pb = new ProcessBuilder(childArgs);
+                pb.redirectInput(Redirect.PIPE);
+                pb.redirectOutput(DISCARD);
+                pb.redirectError(DISCARD);
+                final Process p = pb.start();
+                // Child process waits until it gets input
+                String s = p.toString();
+                check(s.contains("not exited"));
+                check(s.contains("pid=" + p.getPid() + ","));
+
+                new PrintStream(p.getOutputStream()).print("standard input");
+                p.getOutputStream().close();
+
+                // Check the toString after it exits
+                int exitValue = p.waitFor();
+                s = p.toString();
+                check(s.contains("pid=" + p.getPid() + ","));
+                check(s.contains("exitValue=" + exitValue) &&
+                        !s.contains("not exited"));
+            }
         } catch (Throwable t) { unexpected(t); }
 
         //----------------------------------------------------------------
--- a/test/java/lang/invoke/VarHandles/VarHandleBaseTest.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/test/java/lang/invoke/VarHandles/VarHandleBaseTest.java	Sat Sep 10 12:23:52 2016 -0700
@@ -132,7 +132,8 @@
         COMPARE_AND_SET,
         COMPARE_AND_EXCHANGE,
         GET_AND_SET,
-        GET_AND_ADD;
+        GET_AND_ADD,
+        GET_AND_BITWISE;
     }
 
     enum TestAccessMode {
@@ -148,13 +149,26 @@
         COMPARE_AND_EXCHANGE(TestAccessType.COMPARE_AND_EXCHANGE),
         COMPARE_AND_EXCHANGE_ACQUIRE(TestAccessType.COMPARE_AND_EXCHANGE),
         COMPARE_AND_EXCHANGE_RELEASE(TestAccessType.COMPARE_AND_EXCHANGE),
+        WEAK_COMPARE_AND_SET_PLAIN(TestAccessType.COMPARE_AND_SET),
         WEAK_COMPARE_AND_SET(TestAccessType.COMPARE_AND_SET),
-        WEAK_COMPARE_AND_SET_VOLATILE(TestAccessType.COMPARE_AND_SET),
         WEAK_COMPARE_AND_SET_ACQUIRE(TestAccessType.COMPARE_AND_SET),
         WEAK_COMPARE_AND_SET_RELEASE(TestAccessType.COMPARE_AND_SET),
         GET_AND_SET(TestAccessType.GET_AND_SET),
+        GET_AND_SET_ACQUIRE(TestAccessType.GET_AND_SET),
+        GET_AND_SET_RELEASE(TestAccessType.GET_AND_SET),
         GET_AND_ADD(TestAccessType.GET_AND_ADD),
-        ADD_AND_GET(TestAccessType.GET_AND_ADD),;
+        GET_AND_ADD_ACQUIRE(TestAccessType.GET_AND_ADD),
+        GET_AND_ADD_RELEASE(TestAccessType.GET_AND_ADD),
+        GET_AND_BITWISE_OR(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_OR_ACQUIRE(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_OR_RELEASE(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_AND(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_AND_ACQUIRE(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_AND_RELEASE(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_XOR(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_XOR_ACQUIRE(TestAccessType.GET_AND_BITWISE),
+        GET_AND_BITWISE_XOR_RELEASE(TestAccessType.GET_AND_BITWISE),
+        ;
 
         final TestAccessType at;
         final boolean isPolyMorphicInReturnType;
--- a/test/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/test/java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java	Sat Sep 10 12:23:52 2016 -0700
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -266,8 +279,13 @@
         });
 
         checkUOE(() -> {
-            boolean o = (boolean) vh.addAndGet(recv, true);
+            boolean o = (boolean) vh.getAndAddAcquire(recv, true);
         });
+
+        checkUOE(() -> {
+            boolean o = (boolean) vh.getAndAddRelease(recv, true);
+        });
+
     }
 
 
@@ -321,8 +339,13 @@
         });
 
         checkUOE(() -> {
-            boolean o = (boolean) vh.addAndGet(true);
+            boolean o = (boolean) vh.getAndAddAcquire(true);
         });
+
+        checkUOE(() -> {
+            boolean o = (boolean) vh.getAndAddRelease(true);
+        });
+
     }
 
 
@@ -418,11 +441,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, true, false);
+                success = vh.weakCompareAndSetPlain(recv, true, false);
             }
-            assertEquals(success, true, "weakCompareAndSet boolean");
+            assertEquals(success, true, "weakCompareAndSetPlain boolean");
             boolean x = (boolean) vh.get(recv);
-            assertEquals(x, false, "weakCompareAndSet boolean value");
+            assertEquals(x, false, "weakCompareAndSetPlain boolean value");
         }
 
         {
@@ -448,21 +471,125 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, false, true);
+                success = vh.weakCompareAndSet(recv, false, true);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+            assertEquals(success, true, "weakCompareAndSet boolean");
             boolean x = (boolean) vh.get(recv);
-            assertEquals(x, true, "weakCompareAndSetVolatile boolean value");
+            assertEquals(x, true, "weakCompareAndSet boolean value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, true);
+
             boolean o = (boolean) vh.getAndSet(recv, false);
             assertEquals(o, true, "getAndSet boolean");
             boolean x = (boolean) vh.get(recv);
             assertEquals(x, false, "getAndSet boolean value");
         }
 
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndSetAcquire(recv, false);
+            assertEquals(o, true, "getAndSetAcquire boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, false, "getAndSetAcquire boolean value");
+        }
+
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndSetRelease(recv, false);
+            assertEquals(o, true, "getAndSetRelease boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, false, "getAndSetRelease boolean value");
+        }
+
+
+        // get and bitwise or
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseOr(recv, false);
+            assertEquals(o, true, "getAndBitwiseOr boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOr boolean value");
+        }
+
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseOrAcquire(recv, false);
+            assertEquals(o, true, "getAndBitwiseOrAcquire boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOrAcquire boolean value");
+        }
+
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseOrRelease(recv, false);
+            assertEquals(o, true, "getAndBitwiseOrRelease boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOrRelease boolean value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseAnd(recv, false);
+            assertEquals(o, true, "getAndBitwiseAnd boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAnd boolean value");
+        }
+
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseAndAcquire(recv, false);
+            assertEquals(o, true, "getAndBitwiseAndAcquire boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAndAcquire boolean value");
+        }
+
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseAndRelease(recv, false);
+            assertEquals(o, true, "getAndBitwiseAndRelease boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAndRelease boolean value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseXor(recv, false);
+            assertEquals(o, true, "getAndBitwiseXor boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXor boolean value");
+        }
+
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseXorAcquire(recv, false);
+            assertEquals(o, true, "getAndBitwiseXorAcquire boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorAcquire boolean value");
+        }
+
+        {
+            vh.set(recv, true);
+
+            boolean o = (boolean) vh.getAndBitwiseXorRelease(recv, false);
+            assertEquals(o, true, "getAndBitwiseXorRelease boolean");
+            boolean x = (boolean) vh.get(recv);
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorRelease boolean value");
+        }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessBoolean recv, VarHandle vh) {
@@ -472,8 +599,13 @@
         });
 
         checkUOE(() -> {
-            boolean o = (boolean) vh.addAndGet(recv, true);
+            boolean o = (boolean) vh.getAndAddAcquire(recv, true);
         });
+
+        checkUOE(() -> {
+            boolean o = (boolean) vh.getAndAddRelease(recv, true);
+        });
+
     }
 
 
@@ -569,11 +701,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(true, false);
+                success = vh.weakCompareAndSetPlain(true, false);
             }
-            assertEquals(success, true, "weakCompareAndSet boolean");
+            assertEquals(success, true, "weakCompareAndSetPlain boolean");
             boolean x = (boolean) vh.get();
-            assertEquals(x, false, "weakCompareAndSet boolean value");
+            assertEquals(x, false, "weakCompareAndSetPlain boolean value");
         }
 
         {
@@ -599,21 +731,125 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease(false, true);
+                success = vh.weakCompareAndSet(false, true);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+            assertEquals(success, true, "weakCompareAndSet boolean");
             boolean x = (boolean) vh.get();
-            assertEquals(x, true, "weakCompareAndSetVolatile boolean");
+            assertEquals(x, true, "weakCompareAndSet boolean");
         }
 
         // Compare set and get
         {
+            vh.set(true);
+
             boolean o = (boolean) vh.getAndSet(false);
             assertEquals(o, true, "getAndSet boolean");
             boolean x = (boolean) vh.get();
             assertEquals(x, false, "getAndSet boolean value");
         }
 
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndSetAcquire(false);
+            assertEquals(o, true, "getAndSetAcquire boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, false, "getAndSetAcquire boolean value");
+        }
+
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndSetRelease(false);
+            assertEquals(o, true, "getAndSetRelease boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, false, "getAndSetRelease boolean value");
+        }
+
+
+        // get and bitwise or
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseOr(false);
+            assertEquals(o, true, "getAndBitwiseOr boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOr boolean value");
+        }
+
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseOrAcquire(false);
+            assertEquals(o, true, "getAndBitwiseOrAcquire boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOrAcquire boolean value");
+        }
+
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseOrRelease(false);
+            assertEquals(o, true, "getAndBitwiseOrRelease boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true | false), "getAndBitwiseOrRelease boolean value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseAnd(false);
+            assertEquals(o, true, "getAndBitwiseAnd boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAnd boolean value");
+        }
+
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseAndAcquire(false);
+            assertEquals(o, true, "getAndBitwiseAndAcquire boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAndAcquire boolean value");
+        }
+
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseAndRelease(false);
+            assertEquals(o, true, "getAndBitwiseAndRelease boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true & false), "getAndBitwiseAndRelease boolean value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseXor(false);
+            assertEquals(o, true, "getAndBitwiseXor boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXor boolean value");
+        }
+
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseXorAcquire(false);
+            assertEquals(o, true, "getAndBitwiseXorAcquire boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorAcquire boolean value");
+        }
+
+        {
+            vh.set(true);
+
+            boolean o = (boolean) vh.getAndBitwiseXorRelease(false);
+            assertEquals(o, true, "getAndBitwiseXorRelease boolean");
+            boolean x = (boolean) vh.get();
+            assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorRelease boolean value");
+        }
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
@@ -623,8 +859,13 @@
         });
 
         checkUOE(() -> {
-            boolean o = (boolean) vh.addAndGet(true);
+            boolean o = (boolean) vh.getAndAddAcquire(true);
         });
+
+        checkUOE(() -> {
+            boolean o = (boolean) vh.getAndAddRelease(true);
+        });
+
     }
 
 
@@ -723,11 +964,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, true, false);
+                    success = vh.weakCompareAndSetPlain(array, i, true, false);
                 }
-                assertEquals(success, true, "weakCompareAndSet boolean");
+                assertEquals(success, true, "weakCompareAndSetPlain boolean");
                 boolean x = (boolean) vh.get(array, i);
-                assertEquals(x, false, "weakCompareAndSet boolean value");
+                assertEquals(x, false, "weakCompareAndSetPlain boolean value");
             }
 
             {
@@ -753,21 +994,125 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, false, true);
+                    success = vh.weakCompareAndSet(array, i, false, true);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile boolean");
+                assertEquals(success, true, "weakCompareAndSet boolean");
                 boolean x = (boolean) vh.get(array, i);
-                assertEquals(x, true, "weakCompareAndSetVolatile boolean");
+                assertEquals(x, true, "weakCompareAndSet boolean");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, true);
+
                 boolean o = (boolean) vh.getAndSet(array, i, false);
                 assertEquals(o, true, "getAndSet boolean");
                 boolean x = (boolean) vh.get(array, i);
                 assertEquals(x, false, "getAndSet boolean value");
             }
 
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndSetAcquire(array, i, false);
+                assertEquals(o, true, "getAndSetAcquire boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, false, "getAndSetAcquire boolean value");
+            }
+
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndSetRelease(array, i, false);
+                assertEquals(o, true, "getAndSetRelease boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, false, "getAndSetRelease boolean value");
+            }
+
+
+            // get and bitwise or
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseOr(array, i, false);
+                assertEquals(o, true, "getAndBitwiseOr boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true | false), "getAndBitwiseOr boolean value");
+            }
+
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseOrAcquire(array, i, false);
+                assertEquals(o, true, "getAndBitwiseOrAcquire boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true | false), "getAndBitwiseOrAcquire boolean value");
+            }
+
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseOrRelease(array, i, false);
+                assertEquals(o, true, "getAndBitwiseOrRelease boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true | false), "getAndBitwiseOrRelease boolean value");
+            }
+
+            // get and bitwise and
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseAnd(array, i, false);
+                assertEquals(o, true, "getAndBitwiseAnd boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true & false), "getAndBitwiseAnd boolean value");
+            }
+
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseAndAcquire(array, i, false);
+                assertEquals(o, true, "getAndBitwiseAndAcquire boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true & false), "getAndBitwiseAndAcquire boolean value");
+            }
+
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseAndRelease(array, i, false);
+                assertEquals(o, true, "getAndBitwiseAndRelease boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true & false), "getAndBitwiseAndRelease boolean value");
+            }
+
+            // get and bitwise xor
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseXor(array, i, false);
+                assertEquals(o, true, "getAndBitwiseXor boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXor boolean value");
+            }
+
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseXorAcquire(array, i, false);
+                assertEquals(o, true, "getAndBitwiseXorAcquire boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorAcquire boolean value");
+            }
+
+            {
+                vh.set(array, i, true);
+
+                boolean o = (boolean) vh.getAndBitwiseXorRelease(array, i, false);
+                assertEquals(o, true, "getAndBitwiseXorRelease boolean");
+                boolean x = (boolean) vh.get(array, i);
+                assertEquals(x, (boolean)(true ^ false), "getAndBitwiseXorRelease boolean value");
+            }
         }
     }
 
@@ -781,8 +1126,13 @@
         });
 
         checkUOE(() -> {
-            boolean o = (boolean) vh.addAndGet(array, i, true);
+            boolean o = (boolean) vh.getAndAddAcquire(array, i, true);
         });
+
+        checkUOE(() -> {
+            boolean o = (boolean) vh.getAndAddRelease(array, i, true);
+        });
+
     }
 
     static void testArrayIndexOutOfBounds(VarHandle vh) throws Throwable {
@@ -840,11 +1190,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, true, false);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, true, false);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, true, false);
+                boolean r = vh.weakCompareAndSet(array, ci, true, false);
             });
 
             checkIOOBE(() -> {
@@ -859,6 +1209,50 @@
                 boolean o = (boolean) vh.getAndSet(array, ci, true);
             });
 
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndSetAcquire(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndSetRelease(array, ci, true);
+            });
+
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseOr(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseOrAcquire(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseOrRelease(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseAnd(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseAndAcquire(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseAndRelease(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseXor(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseXorAcquire(array, ci, true);
+            });
+
+            checkIOOBE(() -> {
+                boolean o = (boolean) vh.getAndBitwiseXorRelease(array, ci, true);
+            });
         }
     }
 }
--- a/test/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/test/java/lang/invoke/VarHandles/VarHandleTestAccessByte.java	Sat Sep 10 12:23:52 2016 -0700
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -261,6 +274,7 @@
         });
 
 
+
     }
 
 
@@ -309,6 +323,7 @@
         });
 
 
+
     }
 
 
@@ -404,11 +419,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, (byte)0x01, (byte)0x23);
+                success = vh.weakCompareAndSetPlain(recv, (byte)0x01, (byte)0x23);
             }
-            assertEquals(success, true, "weakCompareAndSet byte");
+            assertEquals(success, true, "weakCompareAndSetPlain byte");
             byte x = (byte) vh.get(recv);
-            assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+            assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
         }
 
         {
@@ -434,34 +449,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, (byte)0x23, (byte)0x01);
+                success = vh.weakCompareAndSet(recv, (byte)0x23, (byte)0x01);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile byte");
+            assertEquals(success, true, "weakCompareAndSet byte");
             byte x = (byte) vh.get(recv);
-            assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte value");
+            assertEquals(x, (byte)0x01, "weakCompareAndSet byte value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, (byte)0x01);
+
             byte o = (byte) vh.getAndSet(recv, (byte)0x23);
             assertEquals(o, (byte)0x01, "getAndSet byte");
             byte x = (byte) vh.get(recv);
             assertEquals(x, (byte)0x23, "getAndSet byte value");
         }
 
-        vh.set(recv, (byte)0x01);
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndSetAcquire(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndSetAcquire byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)0x23, "getAndSetAcquire byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndSetRelease(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndSetRelease byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)0x23, "getAndSetRelease byte value");
+        }
 
         // get and add, add and get
         {
-            byte o = (byte) vh.getAndAdd(recv, (byte)0x45);
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndAdd(recv, (byte)0x23);
             assertEquals(o, (byte)0x01, "getAndAdd byte");
-            byte c = (byte) vh.addAndGet(recv, (byte)0x45);
-            assertEquals(c, (byte)((byte)0x01 + (byte)0x45 + (byte)0x45), "getAndAdd byte value");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAdd byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndAddAcquire(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndAddAcquire byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddAcquire byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndAddRelease(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndAddReleasebyte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddRelease byte value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseOr(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOr byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOr byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseOrAcquire(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOrAcquire byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrAcquire byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseOrRelease(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOrRelease byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrRelease byte value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseAnd(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAnd byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAnd byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseAndAcquire(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAndAcquire byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndAcquire byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseAndRelease(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAndRelease byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndRelease byte value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseXor(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXor byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXor byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseXorAcquire(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXorAcquire byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorAcquire byte value");
+        }
+
+        {
+            vh.set(recv, (byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseXorRelease(recv, (byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXorRelease byte");
+            byte x = (byte) vh.get(recv);
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorRelease byte value");
         }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessByte recv, VarHandle vh) {
 
+
     }
 
 
@@ -557,11 +695,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet((byte)0x01, (byte)0x23);
+                success = vh.weakCompareAndSetPlain((byte)0x01, (byte)0x23);
             }
-            assertEquals(success, true, "weakCompareAndSet byte");
+            assertEquals(success, true, "weakCompareAndSetPlain byte");
             byte x = (byte) vh.get();
-            assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+            assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
         }
 
         {
@@ -587,34 +725,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease((byte)0x23, (byte)0x01);
+                success = vh.weakCompareAndSet((byte)0x23, (byte)0x01);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile byte");
+            assertEquals(success, true, "weakCompareAndSet byte");
             byte x = (byte) vh.get();
-            assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte");
+            assertEquals(x, (byte)0x01, "weakCompareAndSet byte");
         }
 
         // Compare set and get
         {
+            vh.set((byte)0x01);
+
             byte o = (byte) vh.getAndSet((byte)0x23);
             assertEquals(o, (byte)0x01, "getAndSet byte");
             byte x = (byte) vh.get();
             assertEquals(x, (byte)0x23, "getAndSet byte value");
         }
 
-        vh.set((byte)0x01);
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndSetAcquire((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndSetAcquire byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)0x23, "getAndSetAcquire byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndSetRelease((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndSetRelease byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)0x23, "getAndSetRelease byte value");
+        }
 
         // get and add, add and get
         {
-            byte o = (byte) vh.getAndAdd( (byte)0x45);
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndAdd((byte)0x23);
             assertEquals(o, (byte)0x01, "getAndAdd byte");
-            byte c = (byte) vh.addAndGet((byte)0x45);
-            assertEquals(c, (byte)((byte)0x01 + (byte)0x45 + (byte)0x45), "getAndAdd byte value");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAdd byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndAddAcquire((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndAddAcquire byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddAcquire byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndAddRelease((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndAddReleasebyte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddRelease byte value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseOr((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOr byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOr byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseOrAcquire((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOrAcquire byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrAcquire byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseOrRelease((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseOrRelease byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrRelease byte value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseAnd((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAnd byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAnd byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseAndAcquire((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAndAcquire byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndAcquire byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseAndRelease((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseAndRelease byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndRelease byte value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseXor((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXor byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXor byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseXorAcquire((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXorAcquire byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorAcquire byte value");
+        }
+
+        {
+            vh.set((byte)0x01);
+
+            byte o = (byte) vh.getAndBitwiseXorRelease((byte)0x23);
+            assertEquals(o, (byte)0x01, "getAndBitwiseXorRelease byte");
+            byte x = (byte) vh.get();
+            assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorRelease byte value");
         }
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
 
+
     }
 
 
@@ -713,11 +974,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, (byte)0x01, (byte)0x23);
+                    success = vh.weakCompareAndSetPlain(array, i, (byte)0x01, (byte)0x23);
                 }
-                assertEquals(success, true, "weakCompareAndSet byte");
+                assertEquals(success, true, "weakCompareAndSetPlain byte");
                 byte x = (byte) vh.get(array, i);
-                assertEquals(x, (byte)0x23, "weakCompareAndSet byte value");
+                assertEquals(x, (byte)0x23, "weakCompareAndSetPlain byte value");
             }
 
             {
@@ -743,29 +1004,151 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, (byte)0x23, (byte)0x01);
+                    success = vh.weakCompareAndSet(array, i, (byte)0x23, (byte)0x01);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile byte");
+                assertEquals(success, true, "weakCompareAndSet byte");
                 byte x = (byte) vh.get(array, i);
-                assertEquals(x, (byte)0x01, "weakCompareAndSetVolatile byte");
+                assertEquals(x, (byte)0x01, "weakCompareAndSet byte");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, (byte)0x01);
+
                 byte o = (byte) vh.getAndSet(array, i, (byte)0x23);
                 assertEquals(o, (byte)0x01, "getAndSet byte");
                 byte x = (byte) vh.get(array, i);
                 assertEquals(x, (byte)0x23, "getAndSet byte value");
             }
 
-            vh.set(array, i, (byte)0x01);
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndSetAcquire(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndSetAcquire byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)0x23, "getAndSetAcquire byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndSetRelease(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndSetRelease byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)0x23, "getAndSetRelease byte value");
+            }
 
             // get and add, add and get
             {
-                byte o = (byte) vh.getAndAdd(array, i, (byte)0x45);
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndAdd(array, i, (byte)0x23);
                 assertEquals(o, (byte)0x01, "getAndAdd byte");
-                byte c = (byte) vh.addAndGet(array, i, (byte)0x45);
-                assertEquals(c, (byte)((byte)0x01 + (byte)0x45 + (byte)0x45), "getAndAdd byte value");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAdd byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndAddAcquire(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndAddAcquire byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddAcquire byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndAddRelease(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndAddReleasebyte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 + (byte)0x23), "getAndAddRelease byte value");
+            }
+
+            // get and bitwise or
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseOr(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseOr byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOr byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseOrAcquire(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseOrAcquire byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrAcquire byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseOrRelease(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseOrRelease byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 | (byte)0x23), "getAndBitwiseOrRelease byte value");
+            }
+
+            // get and bitwise and
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseAnd(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseAnd byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAnd byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseAndAcquire(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseAndAcquire byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndAcquire byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseAndRelease(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseAndRelease byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 & (byte)0x23), "getAndBitwiseAndRelease byte value");
+            }
+
+            // get and bitwise xor
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseXor(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseXor byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXor byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseXorAcquire(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseXorAcquire byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorAcquire byte value");
+            }
+
+            {
+                vh.set(array, i, (byte)0x01);
+
+                byte o = (byte) vh.getAndBitwiseXorRelease(array, i, (byte)0x23);
+                assertEquals(o, (byte)0x01, "getAndBitwiseXorRelease byte");
+                byte x = (byte) vh.get(array, i);
+                assertEquals(x, (byte)((byte)0x01 ^ (byte)0x23), "getAndBitwiseXorRelease byte value");
             }
         }
     }
@@ -775,6 +1158,7 @@
 
         int i = 0;
 
+
     }
 
     static void testArrayIndexOutOfBounds(VarHandle vh) throws Throwable {
@@ -832,11 +1216,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, (byte)0x01, (byte)0x23);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, (byte)0x01, (byte)0x23);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, (byte)0x01, (byte)0x23);
+                boolean r = vh.weakCompareAndSet(array, ci, (byte)0x01, (byte)0x23);
             });
 
             checkIOOBE(() -> {
@@ -852,11 +1236,59 @@
             });
 
             checkIOOBE(() -> {
-                byte o = (byte) vh.getAndAdd(array, ci, (byte)0x45);
+                byte o = (byte) vh.getAndSetAcquire(array, ci, (byte)0x01);
             });
 
             checkIOOBE(() -> {
-                byte o = (byte) vh.addAndGet(array, ci, (byte)0x45);
+                byte o = (byte) vh.getAndSetRelease(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndAdd(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndAddAcquire(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndAddRelease(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseOr(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseOrAcquire(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseOrRelease(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseAnd(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseAndAcquire(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseAndRelease(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseXor(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseXorAcquire(array, ci, (byte)0x01);
+            });
+
+            checkIOOBE(() -> {
+                byte o = (byte) vh.getAndBitwiseXorRelease(array, ci, (byte)0x01);
             });
         }
     }
--- a/test/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/test/java/lang/invoke/VarHandles/VarHandleTestAccessChar.java	Sat Sep 10 12:23:52 2016 -0700
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -261,6 +274,7 @@
         });
 
 
+
     }
 
 
@@ -309,6 +323,7 @@
         });
 
 
+
     }
 
 
@@ -404,11 +419,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, '\u0123', '\u4567');
+                success = vh.weakCompareAndSetPlain(recv, '\u0123', '\u4567');
             }
-            assertEquals(success, true, "weakCompareAndSet char");
+            assertEquals(success, true, "weakCompareAndSetPlain char");
             char x = (char) vh.get(recv);
-            assertEquals(x, '\u4567', "weakCompareAndSet char value");
+            assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
         }
 
         {
@@ -434,34 +449,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, '\u4567', '\u0123');
+                success = vh.weakCompareAndSet(recv, '\u4567', '\u0123');
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile char");
+            assertEquals(success, true, "weakCompareAndSet char");
             char x = (char) vh.get(recv);
-            assertEquals(x, '\u0123', "weakCompareAndSetVolatile char value");
+            assertEquals(x, '\u0123', "weakCompareAndSet char value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, '\u0123');
+
             char o = (char) vh.getAndSet(recv, '\u4567');
             assertEquals(o, '\u0123', "getAndSet char");
             char x = (char) vh.get(recv);
             assertEquals(x, '\u4567', "getAndSet char value");
         }
 
-        vh.set(recv, '\u0123');
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndSetAcquire(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndSetAcquire char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, '\u4567', "getAndSetAcquire char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndSetRelease(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndSetRelease char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, '\u4567', "getAndSetRelease char value");
+        }
 
         // get and add, add and get
         {
-            char o = (char) vh.getAndAdd(recv, '\u89AB');
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndAdd(recv, '\u4567');
             assertEquals(o, '\u0123', "getAndAdd char");
-            char c = (char) vh.addAndGet(recv, '\u89AB');
-            assertEquals(c, (char)('\u0123' + '\u89AB' + '\u89AB'), "getAndAdd char value");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAdd char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndAddAcquire(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndAddAcquire char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddAcquire char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndAddRelease(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndAddReleasechar");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddRelease char value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseOr(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOr char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOr char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseOrAcquire(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOrAcquire char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrAcquire char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseOrRelease(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOrRelease char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrRelease char value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseAnd(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAnd char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAnd char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseAndAcquire(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAndAcquire char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndAcquire char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseAndRelease(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAndRelease char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndRelease char value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseXor(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXor char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXor char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseXorAcquire(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXorAcquire char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorAcquire char value");
+        }
+
+        {
+            vh.set(recv, '\u0123');
+
+            char o = (char) vh.getAndBitwiseXorRelease(recv, '\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXorRelease char");
+            char x = (char) vh.get(recv);
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorRelease char value");
         }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessChar recv, VarHandle vh) {
 
+
     }
 
 
@@ -557,11 +695,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet('\u0123', '\u4567');
+                success = vh.weakCompareAndSetPlain('\u0123', '\u4567');
             }
-            assertEquals(success, true, "weakCompareAndSet char");
+            assertEquals(success, true, "weakCompareAndSetPlain char");
             char x = (char) vh.get();
-            assertEquals(x, '\u4567', "weakCompareAndSet char value");
+            assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
         }
 
         {
@@ -587,34 +725,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease('\u4567', '\u0123');
+                success = vh.weakCompareAndSet('\u4567', '\u0123');
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile char");
+            assertEquals(success, true, "weakCompareAndSet char");
             char x = (char) vh.get();
-            assertEquals(x, '\u0123', "weakCompareAndSetVolatile char");
+            assertEquals(x, '\u0123', "weakCompareAndSet char");
         }
 
         // Compare set and get
         {
+            vh.set('\u0123');
+
             char o = (char) vh.getAndSet('\u4567');
             assertEquals(o, '\u0123', "getAndSet char");
             char x = (char) vh.get();
             assertEquals(x, '\u4567', "getAndSet char value");
         }
 
-        vh.set('\u0123');
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndSetAcquire('\u4567');
+            assertEquals(o, '\u0123', "getAndSetAcquire char");
+            char x = (char) vh.get();
+            assertEquals(x, '\u4567', "getAndSetAcquire char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndSetRelease('\u4567');
+            assertEquals(o, '\u0123', "getAndSetRelease char");
+            char x = (char) vh.get();
+            assertEquals(x, '\u4567', "getAndSetRelease char value");
+        }
 
         // get and add, add and get
         {
-            char o = (char) vh.getAndAdd( '\u89AB');
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndAdd('\u4567');
             assertEquals(o, '\u0123', "getAndAdd char");
-            char c = (char) vh.addAndGet('\u89AB');
-            assertEquals(c, (char)('\u0123' + '\u89AB' + '\u89AB'), "getAndAdd char value");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAdd char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndAddAcquire('\u4567');
+            assertEquals(o, '\u0123', "getAndAddAcquire char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddAcquire char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndAddRelease('\u4567');
+            assertEquals(o, '\u0123', "getAndAddReleasechar");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddRelease char value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseOr('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOr char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOr char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseOrAcquire('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOrAcquire char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrAcquire char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseOrRelease('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseOrRelease char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrRelease char value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseAnd('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAnd char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAnd char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseAndAcquire('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAndAcquire char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndAcquire char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseAndRelease('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseAndRelease char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndRelease char value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseXor('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXor char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXor char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseXorAcquire('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXorAcquire char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorAcquire char value");
+        }
+
+        {
+            vh.set('\u0123');
+
+            char o = (char) vh.getAndBitwiseXorRelease('\u4567');
+            assertEquals(o, '\u0123', "getAndBitwiseXorRelease char");
+            char x = (char) vh.get();
+            assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorRelease char value");
         }
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
 
+
     }
 
 
@@ -713,11 +974,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, '\u0123', '\u4567');
+                    success = vh.weakCompareAndSetPlain(array, i, '\u0123', '\u4567');
                 }
-                assertEquals(success, true, "weakCompareAndSet char");
+                assertEquals(success, true, "weakCompareAndSetPlain char");
                 char x = (char) vh.get(array, i);
-                assertEquals(x, '\u4567', "weakCompareAndSet char value");
+                assertEquals(x, '\u4567', "weakCompareAndSetPlain char value");
             }
 
             {
@@ -743,29 +1004,151 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, '\u4567', '\u0123');
+                    success = vh.weakCompareAndSet(array, i, '\u4567', '\u0123');
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile char");
+                assertEquals(success, true, "weakCompareAndSet char");
                 char x = (char) vh.get(array, i);
-                assertEquals(x, '\u0123', "weakCompareAndSetVolatile char");
+                assertEquals(x, '\u0123', "weakCompareAndSet char");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, '\u0123');
+
                 char o = (char) vh.getAndSet(array, i, '\u4567');
                 assertEquals(o, '\u0123', "getAndSet char");
                 char x = (char) vh.get(array, i);
                 assertEquals(x, '\u4567', "getAndSet char value");
             }
 
-            vh.set(array, i, '\u0123');
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndSetAcquire(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndSetAcquire char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, '\u4567', "getAndSetAcquire char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndSetRelease(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndSetRelease char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, '\u4567', "getAndSetRelease char value");
+            }
 
             // get and add, add and get
             {
-                char o = (char) vh.getAndAdd(array, i, '\u89AB');
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndAdd(array, i, '\u4567');
                 assertEquals(o, '\u0123', "getAndAdd char");
-                char c = (char) vh.addAndGet(array, i, '\u89AB');
-                assertEquals(c, (char)('\u0123' + '\u89AB' + '\u89AB'), "getAndAdd char value");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAdd char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndAddAcquire(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndAddAcquire char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddAcquire char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndAddRelease(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndAddReleasechar");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' + '\u4567'), "getAndAddRelease char value");
+            }
+
+            // get and bitwise or
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseOr(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseOr char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOr char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseOrAcquire(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseOrAcquire char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrAcquire char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseOrRelease(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseOrRelease char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' | '\u4567'), "getAndBitwiseOrRelease char value");
+            }
+
+            // get and bitwise and
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseAnd(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseAnd char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAnd char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseAndAcquire(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseAndAcquire char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndAcquire char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseAndRelease(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseAndRelease char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' & '\u4567'), "getAndBitwiseAndRelease char value");
+            }
+
+            // get and bitwise xor
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseXor(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseXor char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXor char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseXorAcquire(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseXorAcquire char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorAcquire char value");
+            }
+
+            {
+                vh.set(array, i, '\u0123');
+
+                char o = (char) vh.getAndBitwiseXorRelease(array, i, '\u4567');
+                assertEquals(o, '\u0123', "getAndBitwiseXorRelease char");
+                char x = (char) vh.get(array, i);
+                assertEquals(x, (char)('\u0123' ^ '\u4567'), "getAndBitwiseXorRelease char value");
             }
         }
     }
@@ -775,6 +1158,7 @@
 
         int i = 0;
 
+
     }
 
     static void testArrayIndexOutOfBounds(VarHandle vh) throws Throwable {
@@ -832,11 +1216,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, '\u0123', '\u4567');
+                boolean r = vh.weakCompareAndSetPlain(array, ci, '\u0123', '\u4567');
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, '\u0123', '\u4567');
+                boolean r = vh.weakCompareAndSet(array, ci, '\u0123', '\u4567');
             });
 
             checkIOOBE(() -> {
@@ -852,11 +1236,59 @@
             });
 
             checkIOOBE(() -> {
-                char o = (char) vh.getAndAdd(array, ci, '\u89AB');
+                char o = (char) vh.getAndSetAcquire(array, ci, '\u0123');
             });
 
             checkIOOBE(() -> {
-                char o = (char) vh.addAndGet(array, ci, '\u89AB');
+                char o = (char) vh.getAndSetRelease(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndAdd(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndAddAcquire(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndAddRelease(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseOr(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseOrAcquire(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseOrRelease(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseAnd(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseAndAcquire(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseAndRelease(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseXor(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseXorAcquire(array, ci, '\u0123');
+            });
+
+            checkIOOBE(() -> {
+                char o = (char) vh.getAndBitwiseXorRelease(array, ci, '\u0123');
             });
         }
     }
--- a/test/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/test/java/lang/invoke/VarHandles/VarHandleTestAccessDouble.java	Sat Sep 10 12:23:52 2016 -0700
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -261,6 +274,42 @@
         });
 
 
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOr(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrAcquire(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrRelease(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAnd(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndAcquire(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndRelease(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXor(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorAcquire(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorRelease(recv, 1.0d);
+        });
     }
 
 
@@ -309,6 +358,42 @@
         });
 
 
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOr(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrAcquire(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrRelease(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAnd(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndAcquire(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndRelease(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXor(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorAcquire(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorRelease(1.0d);
+        });
     }
 
 
@@ -404,11 +489,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, 1.0d, 2.0d);
+                success = vh.weakCompareAndSetPlain(recv, 1.0d, 2.0d);
             }
-            assertEquals(success, true, "weakCompareAndSet double");
+            assertEquals(success, true, "weakCompareAndSetPlain double");
             double x = (double) vh.get(recv);
-            assertEquals(x, 2.0d, "weakCompareAndSet double value");
+            assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
         }
 
         {
@@ -434,34 +519,109 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, 2.0d, 1.0d);
+                success = vh.weakCompareAndSet(recv, 2.0d, 1.0d);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile double");
+            assertEquals(success, true, "weakCompareAndSet double");
             double x = (double) vh.get(recv);
-            assertEquals(x, 1.0d, "weakCompareAndSetVolatile double value");
+            assertEquals(x, 1.0d, "weakCompareAndSet double value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, 1.0d);
+
             double o = (double) vh.getAndSet(recv, 2.0d);
             assertEquals(o, 1.0d, "getAndSet double");
             double x = (double) vh.get(recv);
             assertEquals(x, 2.0d, "getAndSet double value");
         }
 
-        vh.set(recv, 1.0d);
+        {
+            vh.set(recv, 1.0d);
+
+            double o = (double) vh.getAndSetAcquire(recv, 2.0d);
+            assertEquals(o, 1.0d, "getAndSetAcquire double");
+            double x = (double) vh.get(recv);
+            assertEquals(x, 2.0d, "getAndSetAcquire double value");
+        }
+
+        {
+            vh.set(recv, 1.0d);
+
+            double o = (double) vh.getAndSetRelease(recv, 2.0d);
+            assertEquals(o, 1.0d, "getAndSetRelease double");
+            double x = (double) vh.get(recv);
+            assertEquals(x, 2.0d, "getAndSetRelease double value");
+        }
 
         // get and add, add and get
         {
-            double o = (double) vh.getAndAdd(recv, 3.0d);
+            vh.set(recv, 1.0d);
+
+            double o = (double) vh.getAndAdd(recv, 2.0d);
             assertEquals(o, 1.0d, "getAndAdd double");
-            double c = (double) vh.addAndGet(recv, 3.0d);
-            assertEquals(c, (double)(1.0d + 3.0d + 3.0d), "getAndAdd double value");
+            double x = (double) vh.get(recv);
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAdd double value");
         }
+
+        {
+            vh.set(recv, 1.0d);
+
+            double o = (double) vh.getAndAddAcquire(recv, 2.0d);
+            assertEquals(o, 1.0d, "getAndAddAcquire double");
+            double x = (double) vh.get(recv);
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAddAcquire double value");
+        }
+
+        {
+            vh.set(recv, 1.0d);
+
+            double o = (double) vh.getAndAddRelease(recv, 2.0d);
+            assertEquals(o, 1.0d, "getAndAddReleasedouble");
+            double x = (double) vh.get(recv);
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAddRelease double value");
+        }
+
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessDouble recv, VarHandle vh) {
 
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOr(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrAcquire(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrRelease(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAnd(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndAcquire(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndRelease(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXor(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorAcquire(recv, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorRelease(recv, 1.0d);
+        });
     }
 
 
@@ -557,11 +717,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(1.0d, 2.0d);
+                success = vh.weakCompareAndSetPlain(1.0d, 2.0d);
             }
-            assertEquals(success, true, "weakCompareAndSet double");
+            assertEquals(success, true, "weakCompareAndSetPlain double");
             double x = (double) vh.get();
-            assertEquals(x, 2.0d, "weakCompareAndSet double value");
+            assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
         }
 
         {
@@ -587,34 +747,109 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease(2.0d, 1.0d);
+                success = vh.weakCompareAndSet(2.0d, 1.0d);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile double");
+            assertEquals(success, true, "weakCompareAndSet double");
             double x = (double) vh.get();
-            assertEquals(x, 1.0d, "weakCompareAndSetVolatile double");
+            assertEquals(x, 1.0d, "weakCompareAndSet double");
         }
 
         // Compare set and get
         {
+            vh.set(1.0d);
+
             double o = (double) vh.getAndSet(2.0d);
             assertEquals(o, 1.0d, "getAndSet double");
             double x = (double) vh.get();
             assertEquals(x, 2.0d, "getAndSet double value");
         }
 
-        vh.set(1.0d);
+        {
+            vh.set(1.0d);
+
+            double o = (double) vh.getAndSetAcquire(2.0d);
+            assertEquals(o, 1.0d, "getAndSetAcquire double");
+            double x = (double) vh.get();
+            assertEquals(x, 2.0d, "getAndSetAcquire double value");
+        }
+
+        {
+            vh.set(1.0d);
+
+            double o = (double) vh.getAndSetRelease(2.0d);
+            assertEquals(o, 1.0d, "getAndSetRelease double");
+            double x = (double) vh.get();
+            assertEquals(x, 2.0d, "getAndSetRelease double value");
+        }
 
         // get and add, add and get
         {
-            double o = (double) vh.getAndAdd( 3.0d);
+            vh.set(1.0d);
+
+            double o = (double) vh.getAndAdd(2.0d);
             assertEquals(o, 1.0d, "getAndAdd double");
-            double c = (double) vh.addAndGet(3.0d);
-            assertEquals(c, (double)(1.0d + 3.0d + 3.0d), "getAndAdd double value");
+            double x = (double) vh.get();
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAdd double value");
         }
+
+        {
+            vh.set(1.0d);
+
+            double o = (double) vh.getAndAddAcquire(2.0d);
+            assertEquals(o, 1.0d, "getAndAddAcquire double");
+            double x = (double) vh.get();
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAddAcquire double value");
+        }
+
+        {
+            vh.set(1.0d);
+
+            double o = (double) vh.getAndAddRelease(2.0d);
+            assertEquals(o, 1.0d, "getAndAddReleasedouble");
+            double x = (double) vh.get();
+            assertEquals(x, (double)(1.0d + 2.0d), "getAndAddRelease double value");
+        }
+
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
 
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOr(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrAcquire(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrRelease(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAnd(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndAcquire(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndRelease(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXor(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorAcquire(1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorRelease(1.0d);
+        });
     }
 
 
@@ -713,11 +948,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, 1.0d, 2.0d);
+                    success = vh.weakCompareAndSetPlain(array, i, 1.0d, 2.0d);
                 }
-                assertEquals(success, true, "weakCompareAndSet double");
+                assertEquals(success, true, "weakCompareAndSetPlain double");
                 double x = (double) vh.get(array, i);
-                assertEquals(x, 2.0d, "weakCompareAndSet double value");
+                assertEquals(x, 2.0d, "weakCompareAndSetPlain double value");
             }
 
             {
@@ -743,30 +978,69 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, 2.0d, 1.0d);
+                    success = vh.weakCompareAndSet(array, i, 2.0d, 1.0d);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile double");
+                assertEquals(success, true, "weakCompareAndSet double");
                 double x = (double) vh.get(array, i);
-                assertEquals(x, 1.0d, "weakCompareAndSetVolatile double");
+                assertEquals(x, 1.0d, "weakCompareAndSet double");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, 1.0d);
+
                 double o = (double) vh.getAndSet(array, i, 2.0d);
                 assertEquals(o, 1.0d, "getAndSet double");
                 double x = (double) vh.get(array, i);
                 assertEquals(x, 2.0d, "getAndSet double value");
             }
 
-            vh.set(array, i, 1.0d);
+            {
+                vh.set(array, i, 1.0d);
+
+                double o = (double) vh.getAndSetAcquire(array, i, 2.0d);
+                assertEquals(o, 1.0d, "getAndSetAcquire double");
+                double x = (double) vh.get(array, i);
+                assertEquals(x, 2.0d, "getAndSetAcquire double value");
+            }
+
+            {
+                vh.set(array, i, 1.0d);
+
+                double o = (double) vh.getAndSetRelease(array, i, 2.0d);
+                assertEquals(o, 1.0d, "getAndSetRelease double");
+                double x = (double) vh.get(array, i);
+                assertEquals(x, 2.0d, "getAndSetRelease double value");
+            }
 
             // get and add, add and get
             {
-                double o = (double) vh.getAndAdd(array, i, 3.0d);
+                vh.set(array, i, 1.0d);
+
+                double o = (double) vh.getAndAdd(array, i, 2.0d);
                 assertEquals(o, 1.0d, "getAndAdd double");
-                double c = (double) vh.addAndGet(array, i, 3.0d);
-                assertEquals(c, (double)(1.0d + 3.0d + 3.0d), "getAndAdd double value");
+                double x = (double) vh.get(array, i);
+                assertEquals(x, (double)(1.0d + 2.0d), "getAndAdd double value");
             }
+
+            {
+                vh.set(array, i, 1.0d);
+
+                double o = (double) vh.getAndAddAcquire(array, i, 2.0d);
+                assertEquals(o, 1.0d, "getAndAddAcquire double");
+                double x = (double) vh.get(array, i);
+                assertEquals(x, (double)(1.0d + 2.0d), "getAndAddAcquire double value");
+            }
+
+            {
+                vh.set(array, i, 1.0d);
+
+                double o = (double) vh.getAndAddRelease(array, i, 2.0d);
+                assertEquals(o, 1.0d, "getAndAddReleasedouble");
+                double x = (double) vh.get(array, i);
+                assertEquals(x, (double)(1.0d + 2.0d), "getAndAddRelease double value");
+            }
+
         }
     }
 
@@ -775,6 +1049,42 @@
 
         int i = 0;
 
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOr(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrAcquire(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseOrRelease(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAnd(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndAcquire(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseAndRelease(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXor(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorAcquire(array, i, 1.0d);
+        });
+
+        checkUOE(() -> {
+            double o = (double) vh.getAndBitwiseXorRelease(array, i, 1.0d);
+        });
     }
 
     static void testArrayIndexOutOfBounds(VarHandle vh) throws Throwable {
@@ -832,11 +1142,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, 1.0d, 2.0d);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, 1.0d, 2.0d);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, 1.0d, 2.0d);
+                boolean r = vh.weakCompareAndSet(array, ci, 1.0d, 2.0d);
             });
 
             checkIOOBE(() -> {
@@ -852,12 +1162,25 @@
             });
 
             checkIOOBE(() -> {
-                double o = (double) vh.getAndAdd(array, ci, 3.0d);
+                double o = (double) vh.getAndSetAcquire(array, ci, 1.0d);
             });
 
             checkIOOBE(() -> {
-                double o = (double) vh.addAndGet(array, ci, 3.0d);
+                double o = (double) vh.getAndSetRelease(array, ci, 1.0d);
             });
+
+            checkIOOBE(() -> {
+                double o = (double) vh.getAndAdd(array, ci, 1.0d);
+            });
+
+            checkIOOBE(() -> {
+                double o = (double) vh.getAndAddAcquire(array, ci, 1.0d);
+            });
+
+            checkIOOBE(() -> {
+                double o = (double) vh.getAndAddRelease(array, ci, 1.0d);
+            });
+
         }
     }
 }
--- a/test/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/test/java/lang/invoke/VarHandles/VarHandleTestAccessFloat.java	Sat Sep 10 12:23:52 2016 -0700
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertFalse(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -261,6 +274,42 @@
         });
 
 
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOr(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrAcquire(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrRelease(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAnd(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndAcquire(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndRelease(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXor(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorAcquire(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorRelease(recv, 1.0f);
+        });
     }
 
 
@@ -309,6 +358,42 @@
         });
 
 
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOr(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrAcquire(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrRelease(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAnd(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndAcquire(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndRelease(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXor(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorAcquire(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorRelease(1.0f);
+        });
     }
 
 
@@ -404,11 +489,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, 1.0f, 2.0f);
+                success = vh.weakCompareAndSetPlain(recv, 1.0f, 2.0f);
             }
-            assertEquals(success, true, "weakCompareAndSet float");
+            assertEquals(success, true, "weakCompareAndSetPlain float");
             float x = (float) vh.get(recv);
-            assertEquals(x, 2.0f, "weakCompareAndSet float value");
+            assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
         }
 
         {
@@ -434,34 +519,109 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, 2.0f, 1.0f);
+                success = vh.weakCompareAndSet(recv, 2.0f, 1.0f);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile float");
+            assertEquals(success, true, "weakCompareAndSet float");
             float x = (float) vh.get(recv);
-            assertEquals(x, 1.0f, "weakCompareAndSetVolatile float value");
+            assertEquals(x, 1.0f, "weakCompareAndSet float value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, 1.0f);
+
             float o = (float) vh.getAndSet(recv, 2.0f);
             assertEquals(o, 1.0f, "getAndSet float");
             float x = (float) vh.get(recv);
             assertEquals(x, 2.0f, "getAndSet float value");
         }
 
-        vh.set(recv, 1.0f);
+        {
+            vh.set(recv, 1.0f);
+
+            float o = (float) vh.getAndSetAcquire(recv, 2.0f);
+            assertEquals(o, 1.0f, "getAndSetAcquire float");
+            float x = (float) vh.get(recv);
+            assertEquals(x, 2.0f, "getAndSetAcquire float value");
+        }
+
+        {
+            vh.set(recv, 1.0f);
+
+            float o = (float) vh.getAndSetRelease(recv, 2.0f);
+            assertEquals(o, 1.0f, "getAndSetRelease float");
+            float x = (float) vh.get(recv);
+            assertEquals(x, 2.0f, "getAndSetRelease float value");
+        }
 
         // get and add, add and get
         {
-            float o = (float) vh.getAndAdd(recv, 3.0f);
+            vh.set(recv, 1.0f);
+
+            float o = (float) vh.getAndAdd(recv, 2.0f);
             assertEquals(o, 1.0f, "getAndAdd float");
-            float c = (float) vh.addAndGet(recv, 3.0f);
-            assertEquals(c, (float)(1.0f + 3.0f + 3.0f), "getAndAdd float value");
+            float x = (float) vh.get(recv);
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAdd float value");
         }
+
+        {
+            vh.set(recv, 1.0f);
+
+            float o = (float) vh.getAndAddAcquire(recv, 2.0f);
+            assertEquals(o, 1.0f, "getAndAddAcquire float");
+            float x = (float) vh.get(recv);
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAddAcquire float value");
+        }
+
+        {
+            vh.set(recv, 1.0f);
+
+            float o = (float) vh.getAndAddRelease(recv, 2.0f);
+            assertEquals(o, 1.0f, "getAndAddReleasefloat");
+            float x = (float) vh.get(recv);
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAddRelease float value");
+        }
+
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessFloat recv, VarHandle vh) {
 
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOr(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrAcquire(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrRelease(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAnd(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndAcquire(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndRelease(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXor(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorAcquire(recv, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorRelease(recv, 1.0f);
+        });
     }
 
 
@@ -557,11 +717,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(1.0f, 2.0f);
+                success = vh.weakCompareAndSetPlain(1.0f, 2.0f);
             }
-            assertEquals(success, true, "weakCompareAndSet float");
+            assertEquals(success, true, "weakCompareAndSetPlain float");
             float x = (float) vh.get();
-            assertEquals(x, 2.0f, "weakCompareAndSet float value");
+            assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
         }
 
         {
@@ -587,34 +747,109 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease(2.0f, 1.0f);
+                success = vh.weakCompareAndSet(2.0f, 1.0f);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile float");
+            assertEquals(success, true, "weakCompareAndSet float");
             float x = (float) vh.get();
-            assertEquals(x, 1.0f, "weakCompareAndSetVolatile float");
+            assertEquals(x, 1.0f, "weakCompareAndSet float");
         }
 
         // Compare set and get
         {
+            vh.set(1.0f);
+
             float o = (float) vh.getAndSet(2.0f);
             assertEquals(o, 1.0f, "getAndSet float");
             float x = (float) vh.get();
             assertEquals(x, 2.0f, "getAndSet float value");
         }
 
-        vh.set(1.0f);
+        {
+            vh.set(1.0f);
+
+            float o = (float) vh.getAndSetAcquire(2.0f);
+            assertEquals(o, 1.0f, "getAndSetAcquire float");
+            float x = (float) vh.get();
+            assertEquals(x, 2.0f, "getAndSetAcquire float value");
+        }
+
+        {
+            vh.set(1.0f);
+
+            float o = (float) vh.getAndSetRelease(2.0f);
+            assertEquals(o, 1.0f, "getAndSetRelease float");
+            float x = (float) vh.get();
+            assertEquals(x, 2.0f, "getAndSetRelease float value");
+        }
 
         // get and add, add and get
         {
-            float o = (float) vh.getAndAdd( 3.0f);
+            vh.set(1.0f);
+
+            float o = (float) vh.getAndAdd(2.0f);
             assertEquals(o, 1.0f, "getAndAdd float");
-            float c = (float) vh.addAndGet(3.0f);
-            assertEquals(c, (float)(1.0f + 3.0f + 3.0f), "getAndAdd float value");
+            float x = (float) vh.get();
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAdd float value");
         }
+
+        {
+            vh.set(1.0f);
+
+            float o = (float) vh.getAndAddAcquire(2.0f);
+            assertEquals(o, 1.0f, "getAndAddAcquire float");
+            float x = (float) vh.get();
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAddAcquire float value");
+        }
+
+        {
+            vh.set(1.0f);
+
+            float o = (float) vh.getAndAddRelease(2.0f);
+            assertEquals(o, 1.0f, "getAndAddReleasefloat");
+            float x = (float) vh.get();
+            assertEquals(x, (float)(1.0f + 2.0f), "getAndAddRelease float value");
+        }
+
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
 
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOr(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrAcquire(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrRelease(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAnd(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndAcquire(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndRelease(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXor(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorAcquire(1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorRelease(1.0f);
+        });
     }
 
 
@@ -713,11 +948,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, 1.0f, 2.0f);
+                    success = vh.weakCompareAndSetPlain(array, i, 1.0f, 2.0f);
                 }
-                assertEquals(success, true, "weakCompareAndSet float");
+                assertEquals(success, true, "weakCompareAndSetPlain float");
                 float x = (float) vh.get(array, i);
-                assertEquals(x, 2.0f, "weakCompareAndSet float value");
+                assertEquals(x, 2.0f, "weakCompareAndSetPlain float value");
             }
 
             {
@@ -743,30 +978,69 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, 2.0f, 1.0f);
+                    success = vh.weakCompareAndSet(array, i, 2.0f, 1.0f);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile float");
+                assertEquals(success, true, "weakCompareAndSet float");
                 float x = (float) vh.get(array, i);
-                assertEquals(x, 1.0f, "weakCompareAndSetVolatile float");
+                assertEquals(x, 1.0f, "weakCompareAndSet float");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, 1.0f);
+
                 float o = (float) vh.getAndSet(array, i, 2.0f);
                 assertEquals(o, 1.0f, "getAndSet float");
                 float x = (float) vh.get(array, i);
                 assertEquals(x, 2.0f, "getAndSet float value");
             }
 
-            vh.set(array, i, 1.0f);
+            {
+                vh.set(array, i, 1.0f);
+
+                float o = (float) vh.getAndSetAcquire(array, i, 2.0f);
+                assertEquals(o, 1.0f, "getAndSetAcquire float");
+                float x = (float) vh.get(array, i);
+                assertEquals(x, 2.0f, "getAndSetAcquire float value");
+            }
+
+            {
+                vh.set(array, i, 1.0f);
+
+                float o = (float) vh.getAndSetRelease(array, i, 2.0f);
+                assertEquals(o, 1.0f, "getAndSetRelease float");
+                float x = (float) vh.get(array, i);
+                assertEquals(x, 2.0f, "getAndSetRelease float value");
+            }
 
             // get and add, add and get
             {
-                float o = (float) vh.getAndAdd(array, i, 3.0f);
+                vh.set(array, i, 1.0f);
+
+                float o = (float) vh.getAndAdd(array, i, 2.0f);
                 assertEquals(o, 1.0f, "getAndAdd float");
-                float c = (float) vh.addAndGet(array, i, 3.0f);
-                assertEquals(c, (float)(1.0f + 3.0f + 3.0f), "getAndAdd float value");
+                float x = (float) vh.get(array, i);
+                assertEquals(x, (float)(1.0f + 2.0f), "getAndAdd float value");
             }
+
+            {
+                vh.set(array, i, 1.0f);
+
+                float o = (float) vh.getAndAddAcquire(array, i, 2.0f);
+                assertEquals(o, 1.0f, "getAndAddAcquire float");
+                float x = (float) vh.get(array, i);
+                assertEquals(x, (float)(1.0f + 2.0f), "getAndAddAcquire float value");
+            }
+
+            {
+                vh.set(array, i, 1.0f);
+
+                float o = (float) vh.getAndAddRelease(array, i, 2.0f);
+                assertEquals(o, 1.0f, "getAndAddReleasefloat");
+                float x = (float) vh.get(array, i);
+                assertEquals(x, (float)(1.0f + 2.0f), "getAndAddRelease float value");
+            }
+
         }
     }
 
@@ -775,6 +1049,42 @@
 
         int i = 0;
 
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOr(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrAcquire(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseOrRelease(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAnd(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndAcquire(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseAndRelease(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXor(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorAcquire(array, i, 1.0f);
+        });
+
+        checkUOE(() -> {
+            float o = (float) vh.getAndBitwiseXorRelease(array, i, 1.0f);
+        });
     }
 
     static void testArrayIndexOutOfBounds(VarHandle vh) throws Throwable {
@@ -832,11 +1142,11 @@
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSet(array, ci, 1.0f, 2.0f);
+                boolean r = vh.weakCompareAndSetPlain(array, ci, 1.0f, 2.0f);
             });
 
             checkIOOBE(() -> {
-                boolean r = vh.weakCompareAndSetVolatile(array, ci, 1.0f, 2.0f);
+                boolean r = vh.weakCompareAndSet(array, ci, 1.0f, 2.0f);
             });
 
             checkIOOBE(() -> {
@@ -852,12 +1162,25 @@
             });
 
             checkIOOBE(() -> {
-                float o = (float) vh.getAndAdd(array, ci, 3.0f);
+                float o = (float) vh.getAndSetAcquire(array, ci, 1.0f);
             });
 
             checkIOOBE(() -> {
-                float o = (float) vh.addAndGet(array, ci, 3.0f);
+                float o = (float) vh.getAndSetRelease(array, ci, 1.0f);
             });
+
+            checkIOOBE(() -> {
+                float o = (float) vh.getAndAdd(array, ci, 1.0f);
+            });
+
+            checkIOOBE(() -> {
+                float o = (float) vh.getAndAddAcquire(array, ci, 1.0f);
+            });
+
+            checkIOOBE(() -> {
+                float o = (float) vh.getAndAddRelease(array, ci, 1.0f);
+            });
+
         }
     }
 }
--- a/test/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java	Sat Sep 10 08:27:40 2016 -0400
+++ b/test/java/lang/invoke/VarHandles/VarHandleTestAccessInt.java	Sat Sep 10 12:23:52 2016 -0700
@@ -103,14 +103,27 @@
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.COMPARE_AND_EXCHANGE_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_PLAIN));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_VOLATILE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_ACQUIRE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.WEAK_COMPARE_AND_SET_RELEASE));
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_SET_RELEASE));
 
         assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD));
-        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.ADD_AND_GET));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_ADD_RELEASE));
+
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_OR_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_AND_RELEASE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_ACQUIRE));
+        assertTrue(vh.isAccessModeSupported(VarHandle.AccessMode.GET_AND_BITWISE_XOR_RELEASE));
     }
 
 
@@ -261,6 +274,7 @@
         });
 
 
+
     }
 
 
@@ -309,6 +323,7 @@
         });
 
 
+
     }
 
 
@@ -404,11 +419,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(recv, 0x01234567, 0x89ABCDEF);
+                success = vh.weakCompareAndSetPlain(recv, 0x01234567, 0x89ABCDEF);
             }
-            assertEquals(success, true, "weakCompareAndSet int");
+            assertEquals(success, true, "weakCompareAndSetPlain int");
             int x = (int) vh.get(recv);
-            assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+            assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
         }
 
         {
@@ -434,34 +449,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetVolatile(recv, 0x89ABCDEF, 0x01234567);
+                success = vh.weakCompareAndSet(recv, 0x89ABCDEF, 0x01234567);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile int");
+            assertEquals(success, true, "weakCompareAndSet int");
             int x = (int) vh.get(recv);
-            assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int value");
+            assertEquals(x, 0x01234567, "weakCompareAndSet int value");
         }
 
         // Compare set and get
         {
+            vh.set(recv, 0x01234567);
+
             int o = (int) vh.getAndSet(recv, 0x89ABCDEF);
             assertEquals(o, 0x01234567, "getAndSet int");
             int x = (int) vh.get(recv);
             assertEquals(x, 0x89ABCDEF, "getAndSet int value");
         }
 
-        vh.set(recv, 0x01234567);
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndSetAcquire(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndSetAcquire int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, 0x89ABCDEF, "getAndSetAcquire int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndSetRelease(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndSetRelease int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, 0x89ABCDEF, "getAndSetRelease int value");
+        }
 
         // get and add, add and get
         {
-            int o = (int) vh.getAndAdd(recv, 0xCAFEBABE);
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndAdd(recv, 0x89ABCDEF);
             assertEquals(o, 0x01234567, "getAndAdd int");
-            int c = (int) vh.addAndGet(recv, 0xCAFEBABE);
-            assertEquals(c, (int)(0x01234567 + 0xCAFEBABE + 0xCAFEBABE), "getAndAdd int value");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAdd int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndAddAcquire(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndAddAcquire int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddAcquire int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndAddRelease(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndAddReleaseint");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddRelease int value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseOr(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOr int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOr int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseOrAcquire(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOrAcquire int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrAcquire int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseOrRelease(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOrRelease int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrRelease int value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseAnd(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAnd int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAnd int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseAndAcquire(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAndAcquire int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndAcquire int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseAndRelease(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAndRelease int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndRelease int value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseXor(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXor int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXor int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseXorAcquire(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXorAcquire int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorAcquire int value");
+        }
+
+        {
+            vh.set(recv, 0x01234567);
+
+            int o = (int) vh.getAndBitwiseXorRelease(recv, 0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXorRelease int");
+            int x = (int) vh.get(recv);
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorRelease int value");
         }
     }
 
     static void testInstanceFieldUnsupported(VarHandleTestAccessInt recv, VarHandle vh) {
 
+
     }
 
 
@@ -557,11 +695,11 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSet(0x01234567, 0x89ABCDEF);
+                success = vh.weakCompareAndSetPlain(0x01234567, 0x89ABCDEF);
             }
-            assertEquals(success, true, "weakCompareAndSet int");
+            assertEquals(success, true, "weakCompareAndSetPlain int");
             int x = (int) vh.get();
-            assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+            assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
         }
 
         {
@@ -587,34 +725,157 @@
         {
             boolean success = false;
             for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                success = vh.weakCompareAndSetRelease(0x89ABCDEF, 0x01234567);
+                success = vh.weakCompareAndSet(0x89ABCDEF, 0x01234567);
             }
-            assertEquals(success, true, "weakCompareAndSetVolatile int");
+            assertEquals(success, true, "weakCompareAndSet int");
             int x = (int) vh.get();
-            assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int");
+            assertEquals(x, 0x01234567, "weakCompareAndSet int");
         }
 
         // Compare set and get
         {
+            vh.set(0x01234567);
+
             int o = (int) vh.getAndSet(0x89ABCDEF);
             assertEquals(o, 0x01234567, "getAndSet int");
             int x = (int) vh.get();
             assertEquals(x, 0x89ABCDEF, "getAndSet int value");
         }
 
-        vh.set(0x01234567);
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndSetAcquire(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndSetAcquire int");
+            int x = (int) vh.get();
+            assertEquals(x, 0x89ABCDEF, "getAndSetAcquire int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndSetRelease(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndSetRelease int");
+            int x = (int) vh.get();
+            assertEquals(x, 0x89ABCDEF, "getAndSetRelease int value");
+        }
 
         // get and add, add and get
         {
-            int o = (int) vh.getAndAdd( 0xCAFEBABE);
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndAdd(0x89ABCDEF);
             assertEquals(o, 0x01234567, "getAndAdd int");
-            int c = (int) vh.addAndGet(0xCAFEBABE);
-            assertEquals(c, (int)(0x01234567 + 0xCAFEBABE + 0xCAFEBABE), "getAndAdd int value");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAdd int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndAddAcquire(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndAddAcquire int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddAcquire int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndAddRelease(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndAddReleaseint");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddRelease int value");
+        }
+
+        // get and bitwise or
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseOr(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOr int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOr int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseOrAcquire(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOrAcquire int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrAcquire int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseOrRelease(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseOrRelease int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 | 0x89ABCDEF), "getAndBitwiseOrRelease int value");
+        }
+
+        // get and bitwise and
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseAnd(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAnd int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAnd int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseAndAcquire(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAndAcquire int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndAcquire int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseAndRelease(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseAndRelease int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 & 0x89ABCDEF), "getAndBitwiseAndRelease int value");
+        }
+
+        // get and bitwise xor
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseXor(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXor int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXor int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseXorAcquire(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXorAcquire int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorAcquire int value");
+        }
+
+        {
+            vh.set(0x01234567);
+
+            int o = (int) vh.getAndBitwiseXorRelease(0x89ABCDEF);
+            assertEquals(o, 0x01234567, "getAndBitwiseXorRelease int");
+            int x = (int) vh.get();
+            assertEquals(x, (int)(0x01234567 ^ 0x89ABCDEF), "getAndBitwiseXorRelease int value");
         }
     }
 
     static void testStaticFieldUnsupported(VarHandle vh) {
 
+
     }
 
 
@@ -713,11 +974,11 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSet(array, i, 0x01234567, 0x89ABCDEF);
+                    success = vh.weakCompareAndSetPlain(array, i, 0x01234567, 0x89ABCDEF);
                 }
-                assertEquals(success, true, "weakCompareAndSet int");
+                assertEquals(success, true, "weakCompareAndSetPlain int");
                 int x = (int) vh.get(array, i);
-                assertEquals(x, 0x89ABCDEF, "weakCompareAndSet int value");
+                assertEquals(x, 0x89ABCDEF, "weakCompareAndSetPlain int value");
             }
 
             {
@@ -743,29 +1004,151 @@
             {
                 boolean success = false;
                 for (int c = 0; c < WEAK_ATTEMPTS && !success; c++) {
-                    success = vh.weakCompareAndSetVolatile(array, i, 0x89ABCDEF, 0x01234567);
+                    success = vh.weakCompareAndSet(array, i, 0x89ABCDEF, 0x01234567);
                 }
-                assertEquals(success, true, "weakCompareAndSetVolatile int");
+                assertEquals(success, true, "weakCompareAndSet int");
                 int x = (int) vh.get(array, i);
-                assertEquals(x, 0x01234567, "weakCompareAndSetVolatile int");
+                assertEquals(x, 0x01234567, "weakCompareAndSet int");
             }
 
             // Compare set and get
             {
+                vh.set(array, i, 0x01234567);
+
                 int o = (int) vh.getAndSet(array, i, 0x89ABCDEF);
                 assertEquals(o, 0x01234567, "getAndSet int");
                 int x = (int) vh.get(array, i);
                 assertEquals(x, 0x89ABCDEF, "getAndSet int value");
             }
 
-            vh.set(array, i, 0x01234567);
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndSetAcquire(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndSetAcquire int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, 0x89ABCDEF, "getAndSetAcquire int value");
+            }
+
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndSetRelease(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndSetRelease int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, 0x89ABCDEF, "getAndSetRelease int value");
+            }
 
             // get and add, add and get
             {
-                int o = (int) vh.getAndAdd(array, i, 0xCAFEBABE);
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndAdd(array, i, 0x89ABCDEF);
                 assertEquals(o, 0x01234567, "getAndAdd int");
-                int c = (int) vh.addAndGet(array, i, 0xCAFEBABE);
-                assertEquals(c, (int)(0x01234567 + 0xCAFEBABE + 0xCAFEBABE), "getAndAdd int value");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAdd int value");
+            }
+
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndAddAcquire(array, i, 0x89ABCDEF);
+                assertEquals(o, 0x01234567, "getAndAddAcquire int");
+                int x = (int) vh.get(array, i);
+                assertEquals(x, (int)(0x01234567 + 0x89ABCDEF), "getAndAddAcquire int value");
+            }
+
+            {
+                vh.set(array, i, 0x01234567);
+
+                int o = (int) vh.getAndAddRelease(array, i, 0x89ABCDEF);
+                asse