changeset 55375:26cf984698d7 patterns-stage-1

Automatic merge with default
author mcimadamore
date Thu, 14 Mar 2019 22:05:02 +0100
parents 285e83b11b53 943cfab99051
children cedb78b3192e f95285563b00 f9d570e2ba6a
files make/devkit/createMacosxDevkit6.sh make/devkit/createMacosxDevkit9.sh make/devkit/createWindowsDevkit2013.sh make/devkit/createWindowsDevkit2015.sh src/hotspot/os_cpu/linux_aarch64/linux_aarch64.ad src/hotspot/os_cpu/linux_sparc/linux_sparc.ad src/hotspot/share/classfile/dictionary.inline.hpp src/hotspot/share/gc/z/zAddressRangeMap.hpp src/hotspot/share/gc/z/zAddressRangeMap.inline.hpp src/java.base/share/classes/com/sun/net/ssl/HostnameVerifier.java src/java.base/share/classes/com/sun/net/ssl/HttpsURLConnection.java src/java.base/share/classes/com/sun/net/ssl/KeyManager.java src/java.base/share/classes/com/sun/net/ssl/KeyManagerFactory.java src/java.base/share/classes/com/sun/net/ssl/KeyManagerFactorySpi.java src/java.base/share/classes/com/sun/net/ssl/SSLContext.java src/java.base/share/classes/com/sun/net/ssl/SSLContextSpi.java src/java.base/share/classes/com/sun/net/ssl/SSLPermission.java src/java.base/share/classes/com/sun/net/ssl/SSLSecurity.java src/java.base/share/classes/com/sun/net/ssl/TrustManager.java src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactory.java src/java.base/share/classes/com/sun/net/ssl/TrustManagerFactorySpi.java src/java.base/share/classes/com/sun/net/ssl/X509KeyManager.java src/java.base/share/classes/com/sun/net/ssl/X509TrustManager.java src/java.base/share/classes/com/sun/net/ssl/internal/ssl/Provider.java src/java.base/share/classes/com/sun/net/ssl/internal/ssl/X509ExtendedTrustManager.java src/java.base/share/classes/com/sun/net/ssl/internal/www/protocol/https/DelegateHttpsURLConnection.java src/java.base/share/classes/com/sun/net/ssl/internal/www/protocol/https/Handler.java src/java.base/share/classes/com/sun/net/ssl/internal/www/protocol/https/HttpsURLConnectionOldImpl.java src/java.base/share/classes/com/sun/net/ssl/package-info.java src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/BaseStructure.java src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/Marshaller.java src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XmlWriter.java src/java.xml.crypto/share/classes/org/jcp/xml/dsig/internal/dom/XmlWriterToTree.java src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/gc/z/ZAddressRangeMapForPageTable.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot.amd64/src/org/graalvm/compiler/hotspot/amd64/AMD64HotSpotMaths.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ArrayRangeWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePostWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ArrayRangePreWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PostWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1PreWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/G1ReferentFieldReadBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/ObjectWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialArrayRangeWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.hotspot/src/org/graalvm/compiler/hotspot/nodes/SerialWriteBarrier.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.java/src/org/graalvm/compiler/java/IntegerExactOpSpeculation.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.phases.common/src/org/graalvm/compiler/phases/common/ConvertDeoptimizeToGuardPhase.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements.amd64/src/org/graalvm/compiler/replacements/amd64/AMD64MathSubstitutions.java src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.replacements/src/org/graalvm/compiler/replacements/nodes/arithmetic/IntegerMulHighNode.java src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlConstants.java src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlVersion.java test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/libHeapMonitorTest.c test/jdk/com/sun/net/ssl/SSLSecurity/ComKeyManagerFactoryImpl.java test/jdk/com/sun/net/ssl/SSLSecurity/ComSSLContextImpl.java test/jdk/com/sun/net/ssl/SSLSecurity/ComTrustManagerFactoryImpl.java test/jdk/com/sun/net/ssl/SSLSecurity/JavaxKeyManagerFactoryImpl.java test/jdk/com/sun/net/ssl/SSLSecurity/JavaxSSLContextImpl.java test/jdk/com/sun/net/ssl/SSLSecurity/JavaxTrustManagerFactoryImpl.java test/jdk/com/sun/net/ssl/SSLSecurity/ProviderTest.java test/jdk/com/sun/net/ssl/SSLSecurity/TruncateArray.java test/jdk/javax/net/ssl/FixingJavadocs/ComURLNulls.java test/jdk/javax/net/ssl/SSLSession/CheckMyTrustedKeystore.java test/jdk/sun/net/www/protocol/https/NewImpl/ComHTTPSConnection.java test/jdk/sun/net/www/protocol/https/NewImpl/ComHostnameVerifier.java test/jdk/sun/security/ssl/X509TrustManagerImpl/ClientServer.java test/langtools/jdk/javadoc/tool/doclint/ImplicitHeadersTest.java test/langtools/jdk/javadoc/tool/removeOldDoclet/OldDoclet.jasm test/langtools/tools/javac/doclint/ImplicitHeadersTest.java
diffstat 1096 files changed, 32200 insertions(+), 25093 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Mar 07 11:43:14 2019 +0100
+++ b/.hgtags	Thu Mar 14 22:05:02 2019 +0100
@@ -547,3 +547,5 @@
 c081f3ea6b9300265a4a34e38f970b1e3ddaae9f jdk-13+9
 b67884871b5fff79c5ef3eb8ac74dd48d71ea9b1 jdk-12+33
 8e069f7b4fabfe05d9f500783e6d56cb0196d25c jdk-13+10
+21ea4076a275a0f498afa517e9ee1b94a9cf0255 jdk-13+11
+1d7aec80147a6d92b101a76aef92f3ddc88bedf4 jdk-13+12
--- a/doc/building.html	Thu Mar 07 11:43:14 2019 +0100
+++ b/doc/building.html	Thu Mar 14 22:05:02 2019 +0100
@@ -237,7 +237,7 @@
 <p>For rpm-based distributions (Fedora, Red Hat, etc), try this:</p>
 <pre><code>sudo yum groupinstall &quot;Development Tools&quot;</code></pre>
 <h3 id="aix">AIX</h3>
-<p>The regular builds by SAP is using AIX version 7.1, but AIX 5.3 is also supported. See the <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port">OpenJDK PowerPC Port Status Page</a> for details.</p>
+<p>Please consult the AIX section of the <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of AIX are supported.</p>
 <h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requirements</h2>
 <p>Large portions of the JDK consists of native code, that needs to be compiled to be able to run on the target platform. In theory, toolchain and operating system should be independent factors, but in practice there's more or less a one-to-one correlation between target operating system and toolchain.</p>
 <table>
@@ -373,8 +373,7 @@
 <p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2015</code>.</p>
 <p>If you get <code>LINK: fatal error LNK1123: failure during conversion to COFF: file invalid</code> when building using Visual Studio 2010, you have encountered <a href="http://support.microsoft.com/kb/2757355">KB2757355</a>, a bug triggered by a specific installation order. However, the solution suggested by the KB article does not always resolve the problem. See <a href="https://stackoverflow.com/questions/10888391">this stackoverflow discussion</a> for other suggestions.</p>
 <h3 id="ibm-xl-cc">IBM XL C/C++</h3>
-<p>The regular builds by SAP is using version 12.1, described as <code>IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0017</code>.</p>
-<p>See the <a href="http://cr.openjdk.java.net/~simonis/ppc-aix-port">OpenJDK PowerPC Port Status Page</a> for details.</p>
+<p>Please consult the AIX section of the <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of XLC are supported.</p>
 <h2 id="boot-jdk-requirements">Boot JDK Requirements</h2>
 <p>Paradoxically, building the JDK requires a pre-existing JDK. This is called the &quot;boot JDK&quot;. The boot JDK does not, however, have to be a JDK built directly from the source code available in the OpenJDK Community. If you are porting the JDK to a new platform, chances are that there already exists another JDK for that platform that is usable as boot JDK.</p>
 <p>The rule of thumb is that the boot JDK for building JDK major version <em>N</em> should be a JDK of major version <em>N-1</em>, so for building JDK 9 a JDK 8 would be suitable as boot JDK. However, the JDK should be able to &quot;build itself&quot;, so an up-to-date build of the current JDK source is an acceptable alternative. If you are following the <em>N-1</em> rule, make sure you've got the latest update version, since JDK 8 GA might not be able to build JDK 9 on all platforms.</p>
--- a/doc/building.md	Thu Mar 07 11:43:14 2019 +0100
+++ b/doc/building.md	Thu Mar 14 22:05:02 2019 +0100
@@ -295,9 +295,9 @@
 
 ### AIX
 
-The regular builds by SAP is using AIX version 7.1, but AIX 5.3 is also
-supported. See the [OpenJDK PowerPC Port Status Page](
-http://cr.openjdk.java.net/~simonis/ppc-aix-port) for details.
+Please consult the AIX section of the [Supported Build Platforms](
+https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms) OpenJDK
+Build Wiki page for details about which versions of AIX are supported.
 
 ## Native Compiler (Toolchain) Requirements
 
@@ -419,11 +419,10 @@
 
 ### IBM XL C/C++
 
-The regular builds by SAP is using version 12.1, described as `IBM XL C/C++ for
-AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0017`.
+Please consult the AIX section of the [Supported Build Platforms](
+https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms) OpenJDK
+Build Wiki page for details about which versions of XLC are supported.
 
-See the [OpenJDK PowerPC Port Status Page](
-http://cr.openjdk.java.net/~simonis/ppc-aix-port) for details.
 
 ## Boot JDK Requirements
 
--- a/doc/testing.html	Thu Mar 07 11:43:14 2019 +0100
+++ b/doc/testing.html	Thu Mar 14 22:05:02 2019 +0100
@@ -1,24 +1,19 @@
 <!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
+<html>
 <head>
-  <meta charset="utf-8" />
-  <meta name="generator" content="pandoc" />
-  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
+  <meta charset="utf-8">
+  <meta name="generator" content="pandoc">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
   <title>Testing the JDK</title>
-  <style type="text/css">
-      code{white-space: pre-wrap;}
-      span.smallcaps{font-variant: small-caps;}
-      span.underline{text-decoration: underline;}
-      div.column{display: inline-block; vertical-align: top; width: 50%;}
-  </style>
-  <link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css" />
+  <style type="text/css">code{white-space: pre;}</style>
+  <link rel="stylesheet" href="../make/data/docs-resources/resources/jdk-default.css">
   <!--[if lt IE 9]>
     <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
   <![endif]-->
   <style type="text/css">pre, code, tt { color: #1d6ae5; }</style>
 </head>
 <body>
-<header id="title-block-header">
+<header>
 <h1 class="title">Testing the JDK</h1>
 </header>
 <nav id="TOC">
@@ -124,7 +119,7 @@
 <h3 id="jtreg-keywords">JTReg keywords</h3>
 <h4 id="jobs-1">JOBS</h4>
 <p>The test concurrency (<code>-concurrency</code>).</p>
-<p>Defaults to TEST_JOBS (if set by <code>--with-test-jobs=</code>), otherwise it defaults to JOBS, except for Hotspot, where the default is <em>number of CPU cores/2</em>, but never more than 12.</p>
+<p>Defaults to TEST_JOBS (if set by <code>--with-test-jobs=</code>), otherwise it defaults to JOBS, except for Hotspot, where the default is <em>number of CPU cores/2</em> (for sparc, if more than 16 cpus, then <em>number of CPU cores/5</em>, otherwise <em>number of CPU cores/4</em>), but never more than <em>memory size in GB/2</em>.</p>
 <h4 id="timeout_factor-1">TIMEOUT_FACTOR</h4>
 <p>The timeout factor (<code>-timeoutFactor</code>).</p>
 <p>Defaults to 4.</p>
--- a/doc/testing.md	Thu Mar 07 11:43:14 2019 +0100
+++ b/doc/testing.md	Thu Mar 14 22:05:02 2019 +0100
@@ -252,8 +252,9 @@
 The test concurrency (`-concurrency`).
 
 Defaults to TEST_JOBS (if set by `--with-test-jobs=`), otherwise it defaults to
-JOBS, except for Hotspot, where the default is *number of CPU cores/2*, but
-never more than 12.
+JOBS, except for Hotspot, where the default is *number of CPU cores/2* (for
+sparc, if more than 16 cpus, then *number of CPU cores/5*, otherwise *number of
+CPU cores/4*), but never more than *memory size in GB/2*.
 
 #### TIMEOUT_FACTOR
 The timeout factor (`-timeoutFactor`).
--- a/make/CompileJavaModules.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/CompileJavaModules.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,7 @@
 ################################################################################
 # Module specific build settings
 
-java.base_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline
+java.base_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference,-accessibility '-Xdoclint/package:java.*,javax.*' -XDstringConcat=inline
 java.base_COPY += .icu .dat .spp content-types.properties hijrah-config-islamic-umalqura.properties
 java.base_CLEAN += intrinsic.properties
 
@@ -70,7 +70,7 @@
 
 ################################################################################
 
-java.compiler_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.compiler_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*'
 
 ################################################################################
 
@@ -79,7 +79,7 @@
 
 ################################################################################
 
-java.desktop_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference \
+java.desktop_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference,-accessibility \
     '-Xdoclint/package:java.*,javax.*' -Xlint:exports \
     --doclint-format html4
 java.desktop_COPY += .gif .png .wav .txt .xml .css .pf
@@ -220,15 +220,15 @@
 
 ################################################################################
 
-java.instrument_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.instrument_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*'
 
 ################################################################################
 
-java.logging_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
+java.logging_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference,-accessibility '-Xdoclint/package:java.*,javax.*'
 
 ################################################################################
 
-java.management_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference '-Xdoclint/package:java.*,javax.*'
+java.management_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-reference,-accessibility '-Xdoclint/package:java.*,javax.*'
 
 ################################################################################
 
@@ -249,7 +249,7 @@
 
 ################################################################################
 
-java.sql.rowset_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.sql.rowset_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*'
 java.sql.rowset_CLEAN_FILES += $(wildcard \
     $(TOPDIR)/src/java.sql.rowset/share/classes/com/sun/rowset/*.properties \
     $(TOPDIR)/src/java.sql.rowset/share/classes/javax/sql/rowset/*.properties)
@@ -263,14 +263,14 @@
 
 ################################################################################
 
-java.xml_ADD_JAVAC_FLAGS += -Xdoclint:all/protected \
+java.xml_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility \
     '-Xdoclint/package:$(call CommaList, javax.xml.catalog javax.xml.datatype \
     javax.xml.transform javax.xml.validation javax.xml.xpath)'
 java.xml_CLEAN += .properties
 
 ################################################################################
 
-java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*' -Xlint:-exports
+java.naming_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*' -Xlint:-exports
 java.naming_CLEAN += jndiprovider.properties
 
 ################################################################################
@@ -279,7 +279,7 @@
 
 ################################################################################
 
-java.smartcardio_ADD_JAVAC_FLAGS += -Xdoclint:all/protected '-Xdoclint/package:java.*,javax.*'
+java.smartcardio_ADD_JAVAC_FLAGS += -Xdoclint:all/protected,-accessibility '-Xdoclint/package:java.*,javax.*'
 
 ################################################################################
 
@@ -461,6 +461,7 @@
     org.graalvm.compiler.debug.test \
     org.graalvm.compiler.graph.test \
     org.graalvm.compiler.hotspot.amd64.test \
+    org.graalvm.compiler.hotspot.jdk9.test \
     org.graalvm.compiler.hotspot.lir.test \
     org.graalvm.compiler.hotspot.sparc.test \
     org.graalvm.compiler.hotspot.test \
@@ -538,8 +539,13 @@
 ################################################################################
 # If this is an imported module that has prebuilt classes, only compile
 # module-info.java.
-ifneq ($(wildcard $(IMPORT_MODULES_CLASSES)/$(MODULE)), )
-  $(MODULE)_INCLUDE_FILES := module-info.java
+ifneq ($(IMPORT_MODULES_CLASSES), )
+  IMPORT_MODULE_DIR := $(IMPORT_MODULES_CLASSES)/$(MODULE)
+  ifneq ($(wildcard $(IMPORT_MODULE_DIR)), )
+    $(MODULE)_INCLUDE_FILES := module-info.java
+  endif
+else
+  IMPORT_MODULE_DIR :=
 endif
 
 ################################################################################
@@ -645,13 +651,13 @@
 # If this is an imported module, copy the pre built classes and resources into
 # the modules output dir
 
-ifneq ($(wildcard $(IMPORT_MODULES_CLASSES)/$(MODULE)), )
+ifneq ($(wildcard $(IMPORT_MODULE_DIR)), )
   $(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker: \
-      $(call CacheFind, $(IMPORT_MODULES_CLASSES)/$(MODULE))
+      $(call CacheFind, $(IMPORT_MODULE_DIR))
 	$(call MakeDir, $(@D))
         # Do not delete marker and build meta data files
 	$(RM) -r $(filter-out $(@D)/_%, $(wildcard $(@D)/*))
-	$(CP) -R $(IMPORT_MODULES_CLASSES)/$(MODULE)/* $(@D)/
+	$(CP) -R $(IMPORT_MODULE_DIR)/* $(@D)/
 	$(TOUCH) $@
 
   TARGETS += $(JDK_OUTPUTDIR)/modules/$(MODULE)/_imported.marker
--- a/make/CreateJmods.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/CreateJmods.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -1,4 +1,4 @@
-# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 
 include $(SPEC)
 include MakeBase.gmk
+include Execute.gmk
 include Modules.gmk
 
 ifeq ($(MODULE), )
@@ -37,7 +38,8 @@
 ################################################################################
 
 JMODS_DIR := $(IMAGES_OUTPUTDIR)/jmods
-JMODS_TEMPDIR := $(SUPPORT_OUTPUTDIR)/jmods
+JMODS_SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jmods
+JMOD_FILE := $(MODULE).jmod
 
 LIBS_DIR ?= $(firstword $(wildcard $(addsuffix /$(MODULE), \
     $(SUPPORT_OUTPUTDIR)/modules_libs $(IMPORT_MODULES_LIBS))))
@@ -152,26 +154,27 @@
 # to avoid false incremental rebuilds.
 ifeq ($(INTERIM_JMOD), true)
   DEPS := $(filter-out $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/classlist, $(DEPS))
+  INTERIM_MSG := interim$(SPACE)
 endif
 
 JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}'
 
-# Create jmods in a temp dir and then move them into place to keep the
+# Create jmods in the support dir and then move them into place to keep the
 # module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
-$(JMODS_DIR)/$(MODULE).jmod: $(DEPS)
-	$(call LogWarn, Creating $(patsubst $(OUTPUTDIR)/%, %, $@))
-	$(call MakeDir, $(JMODS_DIR) $(JMODS_TEMPDIR))
-	$(RM) $@ $(JMODS_TEMPDIR)/$(notdir $@)
-	$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/jmods/$(MODULE).jmod, \
-	    $(JMOD) create \
-	        --module-version $(VERSION_SHORT) \
-	        --target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
-	        --module-path $(JMODS_DIR) \
-	        $(JMOD_FLAGS) $(JMODS_TEMPDIR)/$(notdir $@) \
-	)
-	$(MV) $(JMODS_TEMPDIR)/$(notdir $@) $@
+$(eval $(call SetupExecute, create_$(JMOD_FILE), \
+    WARN := Creating $(INTERIM_MSG)$(JMOD_FILE), \
+    DEPS := $(DEPS), \
+    OUTPUT_FILE := $(JMODS_DIR)/$(JMOD_FILE), \
+    SUPPORT_DIR := $(JMODS_SUPPORT_DIR), \
+    PRE_COMMAND := $(RM) $(JMODS_DIR)/$(JMOD_FILE) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
+    COMMAND := $(JMOD) create --module-version $(VERSION_SHORT) \
+        --target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
+        --module-path $(JMODS_DIR) $(JMOD_FLAGS) \
+        $(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
+    POST_COMMAND := $(MV) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE) $(JMODS_DIR)/$(JMOD_FILE), \
+))
 
-TARGETS += $(JMODS_DIR)/$(MODULE).jmod
+TARGETS += $(create_$(JMOD_FILE))
 
 ################################################################################
 
--- a/make/Docs.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/Docs.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -1,4 +1,4 @@
-# Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -26,6 +26,7 @@
 
 include $(SPEC)
 include MakeBase.gmk
+include Execute.gmk
 include Modules.gmk
 include ModuleTools.gmk
 include ProcessMarkdown.gmk
@@ -195,10 +196,13 @@
 
     # For each module needing a graph, create a png file from the dot file
     # generated by the GenGraphs tool and store it in the target dir.
-    $$($1_$2_PNG_TARGET): $$($1_GENGRAPHS_MARKER)
-	$$(call MakeDir, $$(@D))
-	$$(call ExecuteWithLog, $$($1_$2_DOT_SRC), \
-	    $$(DOT) -Tpng -o $$($1_$2_PNG_TARGET) $$($1_$2_DOT_SRC))
+    $$(eval $$(call SetupExecute, gengraphs_png_$1_$2, \
+        INFO := Running dot for module graphs for $2, \
+        DEPS := $$(gengraphs_$1_TARGET), \
+        OUTPUT_FILE := $$($1_$2_PNG_TARGET), \
+        SUPPORT_DIR := $$($1_GENGRAPHS_DIR), \
+        COMMAND := $$(DOT) -Tpng -o $$($1_$2_PNG_TARGET) $$($1_$2_DOT_SRC), \
+    ))
 
   $1_MODULEGRAPH_TARGETS += $$($1_$2_PNG_TARGET)
 endef
@@ -336,18 +340,18 @@
   $1_SOURCE_DEPS := $$(call CacheFind, $$(wildcard $$(foreach module, \
       $$($1_ALL_MODULES), $$(call FindModuleSrcDirs, $$(module)))))
 
-  # Javadoc creates a lot of files but use index.html as a marker
-  $$($1_TARGET_DIR)/index.html: $$(BUILD_TOOLS_JDK) $$($1_VARDEPS_FILE) \
-      $$($1_SOURCE_DEPS) $$($1_OVERVIEW)
-	$$(call LogWarn, Generating $1 javadoc for \
-	    $$(words $$($1_ALL_MODULES)) modules)
-	$$(call LogInfo, Javadoc modules: $$($1_ALL_MODULES))
-	$$(call MakeDir, $$($1_TARGET_DIR))
-	$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/docs/$1, \
-	    $$($1_JAVADOC_CMD) -d $$($1_TARGET_DIR) \
-	        $$($1_OPTIONS) $$($1_LOG_OPTION))
+  $$(eval $$(call SetupExecute, javadoc_$1, \
+      WARN := Generating $1 javadoc for $$(words $$($1_ALL_MODULES)) modules, \
+      INFO := Javadoc modules: $$($1_ALL_MODULES), \
+      DEPS := $$(BUILD_TOOLS_JDK) $$($1_VARDEPS_FILE) $$($1_SOURCE_DEPS) \
+          $$($1_OVERVIEW), \
+      OUTPUT_DIR := $$($1_TARGET_DIR), \
+      SUPPORT_DIR := $$(SUPPORT_OUTPUTDIR)/docs, \
+      COMMAND := $$($1_JAVADOC_CMD) -d $$($1_TARGET_DIR) $$($1_OPTIONS) \
+          $$($1_LOG_OPTION), \
+  ))
 
-  $1_JAVADOC_TARGETS := $$($1_TARGET_DIR)/index.html
+  $1_JAVADOC_TARGETS := $$(javadoc_$1_TARGET)
 
   ifeq ($$(ENABLE_FULL_DOCS), true)
     # We have asked ModuleGraph to generate links to png files. Now we must
@@ -367,19 +371,18 @@
         $$(TOPDIR)/make/jdk/src/classes/build/tools/jigsaw/javadoc-graphs.properties
 
     $1_GENGRAPHS_DIR := $$(SUPPORT_OUTPUTDIR)/docs/$1-gengraphs
-    $1_GENGRAPHS_MARKER := $$($1_GENGRAPHS_DIR)/_gengraphs_run.marker
 
-    $$($1_GENGRAPHS_MARKER): $$(BUILD_JIGSAW_TOOLS) $$(GENGRAPHS_PROPS)
-	$$(call LogInfo, Running gengraphs for $1 documentation)
-	$$(call MakeDir, $$($1_GENGRAPHS_DIR))
-	$$(call ExecuteWithLog, $$($1_GENGRAPHS_DIR)/gengraphs, \
-	    $$(TOOL_GENGRAPHS) --spec --output $$($1_GENGRAPHS_DIR) \
-	    --dot-attributes $$(GENGRAPHS_PROPS) && \
-	    $$(TOUCH) $$($1_GENGRAPHS_MARKER))
+    $$(eval $$(call SetupExecute, gengraphs_$1, \
+        INFO := Running gengraphs for $1 documentation, \
+        DEPS := $$(BUILD_JIGSAW_TOOLS) $$(GENGRAPHS_PROPS), \
+        OUTPUT_DIR := $$($1_GENGRAPHS_DIR), \
+        COMMAND := $$(TOOL_GENGRAPHS) --spec --output $$($1_GENGRAPHS_DIR) \
+            --dot-attributes $$(GENGRAPHS_PROPS), \
+    ))
 
     # For each module needing a graph, create a png file from the dot file
     # generated by the GenGraphs tool and store it in the target dir.
-    # They will depend on $1_GENGRAPHS_MARKER, and will be added to $1.
+    # They will depend on gengraphs_$1_TARGET, and will be added to $1.
     $$(foreach m, $$($1_MODULES_NEEDING_GRAPH), \
       $$(eval $$(call setup_gengraph_dot_to_png,$1,$$m)) \
     )
--- a/make/ExplodedImageOptimize.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/ExplodedImageOptimize.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -29,19 +29,21 @@
 
 include $(SPEC)
 include MakeBase.gmk
+include Execute.gmk
 include $(TOPDIR)/make/ModuleTools.gmk
 
 ################################################################################
 
-PACKAGES_ATTRIBUTE_TARGET := $(JDK_OUTPUTDIR)/_packages_attribute.done
 ALL_MODULEINFO_CLASSES := $(wildcard $(JDK_OUTPUTDIR)/modules/*/module-info.class)
 
-$(PACKAGES_ATTRIBUTE_TARGET): $(ALL_MODULEINFO_CLASSES) $(BUILD_JIGSAW_CLASSES)
-	$(call LogInfo, Optimizing the exploded image)
-	$(call ExecuteWithLog, $@, $(TOOL_ADD_PACKAGES_ATTRIBUTE) $(JDK_OUTPUTDIR))
-	$(TOUCH) $@
+$(eval $(call SetupExecute, optimize_image, \
+    INFO := Optimizing the exploded image, \
+    DEPS := $(ALL_MODULEINFO_CLASSES) $(BUILD_JIGSAW_CLASSES), \
+    OUTPUT_DIR := $(JDK_OUTPUTDIR), \
+    COMMAND := $(TOOL_ADD_PACKAGES_ATTRIBUTE) $(JDK_OUTPUTDIR), \
+))
 
-TARGETS := $(PACKAGES_ATTRIBUTE_TARGET)
+TARGETS := $(optimize_image_TARGET)
 
 ################################################################################
 
--- a/make/Images.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/Images.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -27,9 +27,9 @@
 
 include $(SPEC)
 include MakeBase.gmk
+include Execute.gmk
 include Modules.gmk
 
-TOOL_TARGETS :=
 JDK_TARGETS :=
 JRE_TARGETS :=
 
@@ -56,9 +56,6 @@
 
 JMODS := $(wildcard $(IMAGES_OUTPUTDIR)/jmods/*.jmod)
 
-# Use this file inside the image as target for make rule
-JIMAGE_TARGET_FILE := release
-
 JLINK_ORDER_RESOURCES := **module-info.class
 JLINK_JLI_CLASSES :=
 ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
@@ -88,40 +85,61 @@
   JLINK_JDK_EXTRA_OPTS := --keep-packaged-modules $(JDK_IMAGE_DIR)/jmods
 endif
 
-$(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
-    $(call DependOnVariable, JDK_MODULES_LIST) $(BASE_RELEASE_FILE)
-	$(call LogWarn, Creating jdk image)
-	$(RM) -r $(JDK_IMAGE_DIR)
-	$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jdk, \
-	    $(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \
-	        $(JLINK_JDK_EXTRA_OPTS) \
-	        --output $(JDK_IMAGE_DIR) \
-	)
-        ifeq ($(BUILD_CDS_ARCHIVE), true)
-	  $(call LogWarn, Creating CDS archive for jdk image)
-	  $(FIXPATH) $(JDK_IMAGE_DIR)/bin/java \
-	      -Xshare:dump -Xmx128M -Xms128M $(LOG_INFO)
-        endif
-	$(TOUCH) $@
+$(eval $(call SetupExecute, jlink_jdk, \
+    WARN := Creating jdk image, \
+    DEPS := $(JMODS) $(BASE_RELEASE_FILE) \
+        $(call DependOnVariable, JDK_MODULES_LIST), \
+    OUTPUT_DIR := $(JDK_IMAGE_DIR), \
+    SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \
+    PRE_COMMAND := $(RM) -r $(JDK_IMAGE_DIR), \
+    COMMAND := $(JLINK_TOOL) --add-modules $(JDK_MODULES_LIST) \
+        $(JLINK_JDK_EXTRA_OPTS) --output $(JDK_IMAGE_DIR), \
+))
 
-$(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
-    $(call DependOnVariable, JRE_MODULES_LIST) $(BASE_RELEASE_FILE)
-	$(call LogWarn, Creating legacy jre image)
-	$(RM) -r $(JRE_IMAGE_DIR)
-	$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/images/jre, \
-	    $(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \
-	        $(JLINK_JRE_EXTRA_OPTS) \
-	        --output $(JRE_IMAGE_DIR) \
-	)
-        ifeq ($(BUILD_CDS_ARCHIVE), true)
-	  $(call LogWarn, Creating CDS archive for jre image)
-	  $(FIXPATH) $(JRE_IMAGE_DIR)/bin/java \
-	      -Xshare:dump -Xmx128M -Xms128M $(LOG_INFO)
-        endif
-	$(TOUCH) $@
+JLINK_JDK_TARGETS := $(jlink_jdk)
 
-TOOL_JRE_TARGETS := $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
-TOOL_JDK_TARGETS := $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE)
+$(eval $(call SetupExecute, jlink_jre, \
+    WARN := Creating legacy jre image, \
+    DEPS := $(JMODS) $(BASE_RELEASE_FILE) \
+        $(call DependOnVariable, JDK_MODULES_LIST), \
+    OUTPUT_DIR := $(JDK_IMAGE_DIR), \
+    SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre, \
+    PRE_COMMAND := $(RM) -r $(JRE_IMAGE_DIR), \
+    COMMAND := $(JLINK_TOOL) --add-modules $(JRE_MODULES_LIST) \
+        $(JLINK_JRE_EXTRA_OPTS) --output $(JRE_IMAGE_DIR), \
+))
+
+JLINK_JRE_TARGETS := $(jlink_jre)
+
+ifeq ($(BUILD_CDS_ARCHIVE), true)
+  ifeq ($(OPENJDK_TARGET_OS), windows)
+    CDS_ARCHIVE := bin/server/classes.jsa
+  else
+    CDS_ARCHIVE := lib/server/classes.jsa
+  endif
+
+  $(eval $(call SetupExecute, gen_cds_archive_jdk, \
+      WARN := Creating CDS archive for jdk image, \
+      DEPS := $(jlink_jdk), \
+      OUTPUT_FILE := $(JDK_IMAGE_DIR)/$(CDS_ARCHIVE), \
+      SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \
+      COMMAND := $(FIXPATH) $(JDK_IMAGE_DIR)/bin/java -Xshare:dump \
+          -Xmx128M -Xms128M $(LOG_INFO), \
+  ))
+
+  JDK_TARGETS += $(gen_cds_archive_jdk)
+
+  $(eval $(call SetupExecute, gen_cds_archive_jre, \
+      WARN := Creating CDS archive for jre image, \
+      DEPS := $(jlink_jre), \
+      OUTPUT_FILE := $(JRE_IMAGE_DIR)/$(CDS_ARCHIVE), \
+      SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre, \
+      COMMAND := $(FIXPATH) $(JRE_IMAGE_DIR)/bin/java -Xshare:dump \
+          -Xmx128M -Xms128M $(LOG_INFO), \
+  ))
+
+  JDK_TARGETS += $(gen_cds_archive_jdk)
+endif
 
 ################################################################################
 # src.zip
@@ -244,11 +262,11 @@
 
 ################################################################################
 
-$(JRE_TARGETS): $(TOOL_JRE_TARGETS)
-$(JDK_TARGETS): $(TOOL_JDK_TARGETS)
+$(JRE_TARGETS): $(JLINK_JRE_TARGETS)
+$(JDK_TARGETS): $(JLINK_JDK_TARGETS)
 
-jdk: $(TOOL_JDK_TARGETS) $(JDK_TARGETS)
-jre: $(TOOL_JRE_TARGETS) $(JRE_TARGETS)
+jdk: $(JLINK_JDK_TARGETS) $(JDK_TARGETS)
+jre: $(JLINK_JRE_TARGETS) $(JRE_TARGETS)
 symbols: $(SYMBOLS_TARGETS)
 
 all: jdk jre symbols
--- a/make/Main.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/Main.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -456,7 +456,7 @@
 	+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CreateJmods.gmk \
 	    MODULE=$1 \
 	    JMODS_DIR=$(INTERIM_JMODS_DIR) \
-	    JMODS_TEMPDIR=$(INTERIM_JMODS_DIR)/temp \
+	    JMODS_SUPPORT_DIR=$(INTERIM_JMODS_DIR)/support \
 	    INTERIM_JMOD=true \
 	)
 endef
@@ -1120,7 +1120,8 @@
 # file.
 
 CLEAN_DIRS += hotspot jdk bootcycle-build test buildtools support \
-    images make-support test-make bundles buildjdk test-results test-support
+    images make-support test-make bundles buildjdk test-results test-support \
+    support/images
 CLEAN_DIR_TARGETS := $(addprefix clean-, $(CLEAN_DIRS))
 CLEAN_SUPPORT_DIRS += demos
 CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS))
@@ -1170,6 +1171,9 @@
 
 clean-test: clean-test-results clean-test-support
 
+# When cleaning images, also clean the support/images directory.
+clean-images: clean-support/images
+
 # Remove everything, including configure configuration. If the output
 # directory was created by configure and now becomes empty, remove it as well.
 dist-clean: clean
--- a/make/UpdateX11Wrappers.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/UpdateX11Wrappers.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -29,6 +29,7 @@
 
 include $(SPEC)
 include MakeBase.gmk
+include Execute.gmk
 include NativeCompilation.gmk
 include ToolsJdk.gmk
 
@@ -47,17 +48,21 @@
 endif
 
 X11WRAPPERS_OUTPUT := $(SUPPORT_OUTPUTDIR)/x11wrappers
+GENERATOR_SOURCE_FILE := $(X11WRAPPERS_OUTPUT)/src/data_generator.c
 
 GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen
+WRAPPER_OUTPUT_FILE := $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt
 
 BITS := $(OPENJDK_TARGET_CPU_BITS)
 
 # Generate the C code for the program that will output the offset file.
-$(X11WRAPPERS_OUTPUT)/src/data_generator.c: $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BUILD_TOOLS_JDK)
-	$(call LogInfo, Generating X11 wrapper data generator source code)
-	$(call MakeDir, $(@D))
-	$(call ExecuteWithLog, $@, \
-	    $(TOOL_WRAPPERGENERATOR) gen_c_source $@ $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BITS))
+$(eval $(call SetupExecute, gensrc_generator, \
+    INFO := Generating X11 wrapper data generator source code, \
+    DEPS := $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BUILD_TOOLS_JDK), \
+    OUTPUT_FILE := $(GENERATOR_SOURCE_FILE), \
+    COMMAND := $(TOOL_WRAPPERGENERATOR) gen_c_source $(GENERATOR_SOURCE_FILE) \
+        $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(BITS), \
+))
 
 DATA_GENERATOR_INCLUDES := \
     -I$(TOPDIR)/src/hotspot/share/include \
@@ -75,7 +80,7 @@
 $(eval $(call SetupNativeCompilation, BUILD_DATA_GENERATOR, \
     PROGRAM := data_generator, \
     OUTPUT_DIR := $(X11WRAPPERS_OUTPUT)/bin, \
-    EXTRA_FILES := $(X11WRAPPERS_OUTPUT)/src/data_generator.c, \
+    EXTRA_FILES := $(GENERATOR_SOURCE_FILE), \
     CFLAGS := $(X_CFLAGS) $(DATA_GENERATOR_INCLUDES) $(CFLAGS_JDKEXE), \
     LDFLAGS := $(LDFLAGS_JDKEXE), \
     LIBS := $(X_LIBS), \
@@ -83,16 +88,19 @@
 ))
 
 # Run the executable to create the data file.
-$(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt: $(BUILD_DATA_GENERATOR_TARGET)
-	$(call LogInfo, Generating X11 wrapper data files)
-	$(call MakeDir, $(@D))
-	$(call ExecuteWithLog, $(X11WRAPPERS_OUTPUT)/generation, \
-	    $(BUILD_DATA_GENERATOR_TARGET) | $(SORT) > $@)
+$(eval $(call SetupExecute, run_wrappergen, \
+    INFO := Generating X11 wrapper data files, \
+    DEPS := $(BUILD_DATA_GENERATOR), \
+    OUTPUT_FILE := $(WRAPPER_OUTPUT_FILE), \
+    COMMAND := $(BUILD_DATA_GENERATOR_TARGET) | $(SORT) > $(WRAPPER_OUTPUT_FILE), \
+))
+
+wrapper-information: $(run_wrappergen)
 	$(ECHO) IMPORTANT: If you update the X11 wrapper data files, they most certainly
 	$(ECHO) need to be updated for both 32 and 64 bit platforms. You have now
 	$(ECHO) updated them for $(BITS) bit platforms only.
 
-TARGETS += $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt
+TARGETS += $(run_wrappergen) wrapper-information
 
 ################################################################################
 
--- a/make/autoconf/configure	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/autoconf/configure	Thu Mar 14 22:05:02 2019 +0100
@@ -1,6 +1,6 @@
 #!/bin/bash
 #
-# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -78,9 +78,12 @@
   APT_GET="`which apt-get 2> /dev/null | grep -v '^no apt-get in'`"
   YUM="`which yum 2> /dev/null | grep -v '^no yum in'`"
   BREW="`which brew 2> /dev/null | grep -v '^no brew in'`"
+  ZYPPER="`which zypper 2> /dev/null | grep -v '^no zypper in'`"
   CYGWIN="`which cygpath 2> /dev/null | grep -v '^no cygpath in'`"
 
-  if test "x$APT_GET" != x; then
+  if test "x$ZYPPER" != x; then
+    PKGHANDLER_COMMAND="sudo zypper install autoconf"
+  elif test "x$APT_GET" != x; then
     PKGHANDLER_COMMAND="sudo apt-get install autoconf"
   elif test "x$YUM" != x; then
     PKGHANDLER_COMMAND="sudo yum install autoconf"
--- a/make/autoconf/help.m4	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/autoconf/help.m4	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
 
 AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
 [
-  AC_CHECK_PROGS(PKGHANDLER, apt-get yum brew port pkgutil pkgadd)
+  AC_CHECK_PROGS(PKGHANDLER, zypper apt-get yum brew port pkgutil pkgadd)
 ])
 
 AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
@@ -54,6 +54,8 @@
         pkgutil_help $MISSING_DEPENDENCY ;;
       pkgadd)
         pkgadd_help  $MISSING_DEPENDENCY ;;
+      zypper)
+        zypper_help  $MISSING_DEPENDENCY ;;
     esac
 
     if test "x$PKGHANDLER_COMMAND" != x; then
@@ -110,6 +112,25 @@
   esac
 }
 
+zypper_help() {
+  case $1 in
+    devkit)
+      PKGHANDLER_COMMAND="sudo zypper install gcc gcc-c++" ;;
+    alsa)
+      PKGHANDLER_COMMAND="sudo zypper install alsa-devel" ;;
+    cups)
+      PKGHANDLER_COMMAND="sudo zypper install cups-devel" ;;
+    fontconfig)
+      PKGHANDLER_COMMAND="sudo zypper install fontconfig-devel" ;;
+    freetype)
+      PKGHANDLER_COMMAND="sudo zypper install freetype-devel" ;;
+    x11)
+      PKGHANDLER_COMMAND="sudo zypper install libX11-devel libXext-devel libXrender-devel libXrandr-devel libXtst-devel libXt-devel libXi-devel" ;;
+    ccache)
+      PKGHANDLER_COMMAND="sudo zypper install ccache" ;;
+  esac
+}
+
 yum_help() {
   case $1 in
     devkit)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/common/Execute.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -0,0 +1,198 @@
+#
+# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute 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.
+#
+
+ifeq (,$(_MAKEBASE_GMK))
+  $(error You must include MakeBase.gmk prior to including Execute.gmk)
+endif
+
+################################################################################
+#
+# Code for handling the SetupExecute macro.
+#
+################################################################################
+
+
+################################################################################
+# Setup make rules for executing an arbitrary command.
+#
+# Parameter 1 is the name of the rule. This name is used as variable prefix,
+# and the targets generated are listed in a variable by that name.
+#
+# You need to specify a COMMAND, the actual command line to execute. You are
+# strongly recommended to provide a INFO with the text to display for LOG=info
+# on what operation is performed. You can use DEPS to provide additional
+# dependencies for your command to run. You can optionally include a PRE_COMMAND
+# and a POST_COMMAND, intended for simple pre- and post-processing. The latter
+# might be e.g. a mv from a temporary file to the final destination, the former
+# e.g. a simple sed replacement on the input file. If the operations are
+# unrelated to the main COMMAND, this is not a suitable solution.
+#
+# If your command outputs a variety of files, or if it's really a single file
+# but you don't really care about the output from the perspective, you can just
+# supply an OUTPUT_DIR. You are supposed to make sure the command creates files
+# in this directory (which will be created for you if it does not exist), but
+# this can't be enforced by SetupExecute. Additional support files (like logs
+# and markers) are created in this directory. If you want support files in a
+# separate directory (e.g. if you're targeting an OUTPUT_DIR in the image
+# directly), you can specify a SUPPORT_DIR. If your command outputs only a
+# single file, you can get rid of the marker files (but not the log files) by
+# specifying OUTPUT_FILE. Note that if you specify an OUTPUT_FILE, support log
+# files will be placed in the same directory as the OUTPUT_FILE. If you do not
+# want that, use SUPPORT_DIR as well.
+#
+# After the call to SetupExecute, $1 will contain references to all generated
+# files (that make knows about), and $1_TARGET will contain a reference to the
+# final target (that is OUTPUT_FILE if it exists, or the $1_exec.marker file
+# otherwise).
+#
+# All the above keep functioning as expected even if PRE_COMMAND and
+# POST_COMMAND are given. One special case worth noting is that if OUTPUT_FILE
+# and POST_COMMAND is both given, the actual OUTPUT_FILE is considered to be a
+# result of running the POST_COMMAND.
+#
+# Remaining parameters are named arguments. These include:
+#   COMMAND     : The command to execute
+#   PRE_COMMAND : A helper command to execute before COMMAND
+#   POST_COMMAND: A helper command to execute after COMMAND
+#   OUTPUT_DIR  : The directory that will contain the result from the command
+#   OUTPUT_FILE : Use this if the command results in a single output file
+#   SUPPORT_DIR : Where to store generated support files
+#   INFO        : Message to display at LOG=info level when running command (optional)
+#   WARN        : Message to display at LOG=warn level when running command (optional)
+#   DEPS        : Dependencies for the execution to take place
+#
+
+# Setup make rules for copying files, with an option to do more complex
+SetupExecute = $(NamedParamsMacroTemplate)
+define SetupExecuteBody
+  ifeq ($$($1_COMMAND), )
+    $$(error COMMAND is missing in SetupExecute $1)
+  endif
+
+  ifneq ($$($1_OUTPUT_FILE), )
+    ifneq ($$($1_OUTPUT_DIR), )
+      $$(error Cannot specify both OUTPUT_DIR and OUTPUT_FILE in SetupExecute $1)
+    endif
+    # We need to know output dir since we will make sure it is created.
+    $1_OUTPUT_DIR := $$(patsubst %/,%, $$(dir $$($1_OUTPUT_FILE)))
+    ifeq ($$($1_SUPPORT_DIR), )
+      # If support dir is not given, use base dir of output file.
+      $1_SUPPORT_DIR := $$($1_OUTPUT_DIR)
+    endif
+  else ifneq ($$($1_OUTPUT_DIR), )
+    ifeq ($$($1_SUPPORT_DIR), )
+      # If support dir is not given, use output dir.
+      $1_SUPPORT_DIR := $$($1_OUTPUT_DIR)
+    endif
+  else
+    $$(error OUTPUT_DIR or OUTPUT_FILE is required in SetupExecute $1)
+  endif
+
+  $1_BASE := $$($1_SUPPORT_DIR)/_$1
+  $1_PRE_MARKER := $$($1_BASE)_pre.marker
+  $1_EXEC_MARKER := $$($1_BASE)_exec.marker
+  $1_POST_MARKER := $$($1_BASE)_post.marker
+
+  ifeq ($$($1_OUTPUT_FILE), )
+    # No specified output file, use markers everywhere
+    $1_EXEC_RESULT := $$($1_EXEC_MARKER)
+    ifeq ($$($1_POST_COMMAND), )
+      $1_FINAL_RESULT := $$($1_EXEC_MARKER)
+    else
+      $1_FINAL_RESULT := $$($1_POST_MARKER)
+    endif
+
+  else
+    # If we have a single output file, we don't need a separate marker
+
+    ifeq ($$($1_POST_COMMAND), )
+      $1_EXEC_RESULT := $$($1_OUTPUT_FILE)
+      $1_FINAL_RESULT := $$($1_EXEC_RESULT)
+    else
+      $1_EXEC_RESULT := $$($1_EXEC_MARKER)
+      $1_FINAL_RESULT := $$($1_OUTPUT_FILE)
+    endif
+
+  endif
+
+  ifeq ($$($1_INFO)$$($1_WARN), )
+    # If neither info nor warn is provided, add basic info text.
+    $1_INFO := Running commands for $1
+  endif
+
+  ifneq ($$($1_PRE_COMMAND), )
+
+    $$($1_PRE_MARKER): $$($1_DEPS)
+        ifneq ($$($1_WARN), )
+	  $$(call LogWarn, $$($1_WARN))
+        endif
+        ifneq ($$($1_INFO), )
+	  $$(call LogInfo, $$($1_INFO))
+        endif
+	$$(call MakeDir, $$($1_SUPPORT_DIR) $$($1_OUTPUT_DIR))
+	$$(call ExecuteWithLog, $$($1_BASE)_pre, \
+	    $$($1_PRE_COMMAND))
+	$$(TOUCH) $$@
+
+    $$($1_EXEC_RESULT): $$($1_PRE_MARKER)
+	$$(call ExecuteWithLog, $$($1_BASE)_exec, \
+	    $$($1_COMMAND))
+        ifeq ($$($1_EXEC_RESULT), $$($1_EXEC_MARKER))
+	  $$(TOUCH) $$@
+        endif
+
+    $1 := $$($1_PRE_MARKER) $$($1_EXEC_RESULT)
+  else
+    $$($1_EXEC_RESULT): $$($1_DEPS)
+        ifneq ($$($1_WARN), )
+	  $$(call LogWarn, $$($1_WARN))
+        endif
+        ifneq ($$($1_INFO), )
+	  $$(call LogInfo, $$($1_INFO))
+        endif
+	$$(call MakeDir, $$(call EncodeSpace, $$($1_SUPPORT_DIR)) $$(call EncodeSpace, $$($1_OUTPUT_DIR)))
+	$$(call ExecuteWithLog, $$($1_BASE)_exec, \
+	    $$($1_COMMAND))
+        ifeq ($$($1_EXEC_RESULT), $$($1_EXEC_MARKER))
+	  $$(TOUCH) $$@
+        endif
+
+    $1 := $$($1_EXEC_RESULT)
+  endif
+
+  ifneq ($$($1_POST_COMMAND), )
+
+    $$($1_FINAL_RESULT): $$($1_EXEC_RESULT)
+	$$(call ExecuteWithLog, $$($1_BASE)_post, \
+	    $$($1_POST_COMMAND))
+	$$(TOUCH) $$@
+
+    $1 += $$($1_FINAL_RESULT)
+  endif
+
+  # Export all our generated targets in $1, and the final target in $1_TARGET.
+  $1_TARGET := $$($1_FINAL_RESULT)
+
+endef
--- a/make/common/NativeCompilation.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/common/NativeCompilation.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -505,8 +505,9 @@
   $$(foreach d, $$($1_SRC), $$(if $$(wildcard $$d), , \
       $$(error SRC specified to SetupNativeCompilation $1 contains missing directory $$d)))
 
-  # Find all files in the source trees. Preserve order.
-  $1_SRCS := $$(foreach s, $$($1_SRC), $$(call CacheFind, $$(s)))
+  $1_SRCS_RAW = $$(call CacheFind, $$($1_SRC))
+  # Order src files according to the order of the src dirs
+  $1_SRCS := $$(foreach d, $$($1_SRC), $$(filter $$d%, $$($1_SRCS_RAW)))
   $1_SRCS := $$(filter $$(NATIVE_SOURCE_EXTENSIONS), $$($1_SRCS))
   # Extract the C/C++ files.
   ifneq ($$($1_EXCLUDE_PATTERNS), )
@@ -970,10 +971,9 @@
           $$(shell $(RM) $$($1_TARGET))
         endif
         $$($1_IMPORT_LIBRARY): $$($1_TARGET)
-		$$(if $$(CORRECT_FUNCTION_IN_RECIPE_EVALUATION), \
-		  $$(if $$(wildcard $$@), , $$(error $$@ was not created for $$<)) \
-		)
 		$(TOUCH) $$@
+
+        $1 += $$($1_IMPORT_LIBRARY)
       endif
     endif
 
--- a/make/common/ProcessMarkdown.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/common/ProcessMarkdown.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -65,10 +65,13 @@
     endif
   endif
 
-  $1_$2_OPTIONS := $$(shell $$(GREP) _pandoc-options_: $3/$2 | $$(CUT) -d : -f 2-)
+  # This does not need to be included in VARDEPS since it's from the actual
+  # source file. Only run the shell if the recipe gets executed below.
+  $1_$2_OPTIONS_FROM_SRC = \
+      $$(shell $$(GREP) _pandoc-options_: $3/$2 | $$(CUT) -d : -f 2-)
 
   ifneq ($$($1_FILTER), )
-    $1_$2_OPTIONS += --filter $$($1_FILTER)
+    $1_$2_OPTIONS := --filter $$($1_FILTER)
   endif
 
   $1_$2_VARDEPS := $$($1_OPTIONS) $$($1_$2_OPTIONS) $$($1_CSS) \
@@ -82,8 +85,8 @@
 	$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER), \
 	    $$(PANDOC) $$($1_OPTIONS) -f $$(PANDOC_MARKDOWN_FLAG) \
 	    -t $$($1_FORMAT) --standalone \
-	    $$($1_$2_CSS_OPTION) $$($1_$2_OPTIONS) '$$($1_$2_PANDOC_INPUT)' \
-	    -o '$$($1_$2_PANDOC_OUTPUT)')
+	    $$($1_$2_CSS_OPTION) $$($1_$2_OPTIONS_FROM_SRC) $$($1_$2_OPTIONS) \
+	    '$$($1_$2_PANDOC_INPUT)' -o '$$($1_$2_PANDOC_OUTPUT)')
         ifneq ($$(findstring $$(LOG_LEVEL), debug trace),)
 	  TOO_LONG_LINES=`$$(GREP) -E -e '^.{80}.+$$$$' $$<` || true ; \
 	  if [ "x$$$$TOO_LONG_LINES" != x ]; then \
--- a/make/common/TestFilesCompilation.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/common/TestFilesCompilation.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -90,8 +90,7 @@
     $$(eval $$(call SetupNativeCompilation, BUILD_TEST_$$(name), \
         NAME := $$(unprefixed_name), \
         TYPE := $$($1_COMPILATION_TYPE), \
-        SRC := $$(patsubst %/,%,$$(dir $$(file))), \
-        INCLUDE_FILES := $$(notdir $$(file)), \
+        EXTRA_FILES := $$(file), \
         OBJECT_DIR := $$($1_OUTPUT_DIR)/support/$$(name), \
         OUTPUT_DIR := $$($1_OUTPUT_DIR)/$$($1_OUTPUT_SUBDIR), \
         CFLAGS := $$($1_BASE_CFLAGS) $$($1_CFLAGS) $$($1_CFLAGS_$$(name)), \
--- a/make/conf/jib-profiles.js	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/conf/jib-profiles.js	Thu Mar 14 22:05:02 2019 +0100
@@ -940,10 +940,10 @@
 
     var devkit_platform_revisions = {
         linux_x64: "gcc7.3.0-OEL6.4+1.2",
-        macosx_x64: "Xcode9.4-MacOSX10.13+1.0",
+        macosx_x64: "Xcode10.1-MacOSX10.14+1.0",
         solaris_x64: "SS12u4-Solaris11u1+1.0",
         solaris_sparcv9: "SS12u6-Solaris11u3+1.0",
-        windows_x64: "VS2017-15.5.5+1.0",
+        windows_x64: "VS2017-15.9.6+1.0",
         linux_aarch64: "gcc7.3.0-Fedora27+1.2",
         linux_arm: "gcc7.3.0-Fedora27+1.2",
         linux_ppc64le: "gcc7.3.0-Fedora27+1.0",
--- a/make/data/charsetmapping/charsets	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/data/charsetmapping/charsets	Thu Mar 14 22:05:02 2019 +0100
@@ -440,6 +440,8 @@
     alias   cp00858
     alias   858
     alias   PC-Multilingual-850+euro
+    alias   ibm858
+    alias   ibm-858
 
 charset IBM862 IBM862
     package sun.nio.cs
@@ -1389,6 +1391,7 @@
      alias   cp833
      alias   ibm833
      alias   ibm-833
+     alias   833
 
 
 charset x-IBM834 IBM834 # EBCDIC DBCS-only Korean
@@ -1590,6 +1593,8 @@
     alias   cp01140
     alias   1140
     alias   ebcdic-us-037+euro
+    alias   ibm1140
+    alias   ibm-1140
 
 charset IBM01141 IBM1141
     package sun.nio.cs.ext
@@ -1601,6 +1606,8 @@
     alias   cp01141
     alias   1141
     alias   ebcdic-de-273+euro
+    alias   ibm1141
+    alias   ibm-1141
 
 charset IBM01142 IBM1142
     package sun.nio.cs.ext
@@ -1613,6 +1620,8 @@
     alias   1142
     alias   ebcdic-no-277+euro
     alias   ebcdic-dk-277+euro
+    alias   ibm1142
+    alias   ibm-1142
 
 charset IBM01143 IBM1143
     package sun.nio.cs.ext
@@ -1625,6 +1634,8 @@
     alias   1143
     alias   ebcdic-fi-278+euro
     alias   ebcdic-se-278+euro
+    alias   ibm1143
+    alias   ibm-1143
 
 charset IBM01144 IBM1144
     package sun.nio.cs.ext
@@ -1636,6 +1647,8 @@
     alias   cp01144
     alias   1144
     alias   ebcdic-it-280+euro
+    alias   ibm1144
+    alias   ibm-1144
 
 charset IBM01145 IBM1145
     package sun.nio.cs.ext
@@ -1647,6 +1660,8 @@
     alias   cp01145
     alias   1145
     alias   ebcdic-es-284+euro
+    alias   ibm1145
+    alias   ibm-1145
 
 charset IBM01146 IBM1146
     package sun.nio.cs.ext
@@ -1658,6 +1673,8 @@
     alias   cp01146
     alias   1146
     alias   ebcdic-gb-285+euro
+    alias   ibm1146
+    alias   ibm-1146
 
 charset IBM01147 IBM1147
     package sun.nio.cs.ext
@@ -1669,6 +1686,8 @@
     alias   cp01147
     alias   1147
     alias   ebcdic-fr-277+euro
+    alias   ibm1147
+    alias   ibm-1147
 
 charset IBM01148 IBM1148
     package sun.nio.cs.ext
@@ -1680,6 +1699,8 @@
     alias   cp01148
     alias   1148
     alias   ebcdic-international-500+euro
+    alias   ibm1148
+    alias   ibm-1148
 
 charset IBM01149 IBM1149
     package sun.nio.cs.ext
@@ -1691,6 +1712,8 @@
     alias   cp01149
     alias   1149
     alias   ebcdic-s-871+euro
+    alias   ibm1149
+    alias   ibm-1149
 
 charset IBM290 IBM290
     package sun.nio.cs.ext
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/make/devkit/createMacosxDevkit.sh	Thu Mar 14 22:05:02 2019 +0100
@@ -0,0 +1,144 @@
+#!/bin/bash
+#
+# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute 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.
+#
+
+# This script copies parts of an Xcode installation into a devkit suitable
+# for building OpenJDK and OracleJDK. The installation Xcode_X.X.xip needs
+# to be either installed or extracted using for example Archive Utility.
+# The easiest way to accomplish this is to right click the file in Finder
+# and choose "Open With -> Archive Utility", or possible typing
+# "open Xcode_9.2.xip" in a terminal.
+# erik.joelsson@oracle.com
+
+USAGE="$0 <Xcode.app>"
+
+if [ "$1" = "" ]; then
+    echo $USAGE
+    exit 1
+fi
+
+XCODE_APP="$1"
+XCODE_APP_DIR_NAME="${XCODE_APP##*/}"
+
+SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
+BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
+
+# Find the version of Xcode
+XCODE_VERSION="$($XCODE_APP/Contents/Developer/usr/bin/xcodebuild -version \
+    | awk '/Xcode/ { print $2 }' )"
+SDK_VERSION="$(ls $XCODE_APP/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
+    | grep [0-9] | sort -r | head -n1 | sed 's/\.sdk//')"
+
+DEVKIT_ROOT="${BUILD_DIR}/Xcode${XCODE_VERSION}-${SDK_VERSION}"
+DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
+
+echo "Xcode version: $XCODE_VERSION"
+echo "SDK version: $SDK_VERSION"
+echo "Creating devkit in $DEVKIT_ROOT"
+
+mkdir -p $DEVKIT_ROOT
+
+################################################################################
+# Copy the relevant parts of Xcode.app, removing things that are both big and
+# unecessary for our purposes, without building an impossibly long exclude list.
+#
+# Not including WatchSimulator.platform makes ibtool crashes in some situations.
+# It doesn't seem to matter which extra platform is included, but that is the
+# smallest one.
+
+EXCLUDE_DIRS=" \
+    Contents/_CodeSignature \
+    $XCODE_APP_DIR_NAME/Contents/Applications \
+    $XCODE_APP_DIR_NAME/Contents/Resources \
+    $XCODE_APP_DIR_NAME/Contents/Library \
+    $XCODE_APP_DIR_NAME/Contents/XPCServices \
+    $XCODE_APP_DIR_NAME/Contents/OtherFrameworks \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Documentation \
+    $XCODE_APP_DIR_NAME/Contents/Developer/usr/share \
+    $XCODE_APP_DIR_NAME/Contents/Developer/usr/libexec/git-core \
+    $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/git* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/svn* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libgit* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libsvn* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/share/man \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/usr \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/swift* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/swift* \
+    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/arc \
+    Platforms/AppleTVSimulator.platform \
+    Platforms/iPhoneSimulator.platform \
+    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/LLDB.framework \
+    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/ModelIO.framework \
+    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCSUI.framework \
+    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/SceneKit.framework \
+    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCBuild.framework \
+    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/GPUTools.framework \
+    $(cd $XCODE_APP/.. && ls -d $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/* \
+        | grep -v MacOSX.platform | grep -v WatchSimulator.platform) \
+"
+
+for ex in $EXCLUDE_DIRS; do
+    EXCLUDE_ARGS+="--exclude=$ex "
+done
+
+echo "Copying Xcode.app..."
+echo rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
+rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
+
+################################################################################
+
+echo-info() {
+    echo "$1" >> $DEVKIT_ROOT/devkit.info
+}
+
+echo "Generating devkit.info..."
+rm -f $DEVKIT_ROOT/devkit.info
+echo-info "# This file describes to configure how to interpret the contents of this devkit"
+echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\""
+echo-info "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:\$DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/bin\""
+echo-info "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/$SDK_VERSION.sdk\""
+echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_TOOLCHAIN_PATH\""
+
+################################################################################
+# Copy this script
+
+echo "Copying this script..."
+cp $0 $DEVKIT_ROOT/
+
+################################################################################
+# Create bundle
+
+echo "Creating bundle..."
+GZIP=$(command -v pigz)
+if [ -z "$GZIP" ]; then
+    GZIP="gzip"
+fi
+(cd $DEVKIT_ROOT && tar c - . | $GZIP - > "$DEVKIT_BUNDLE")
--- a/make/devkit/createMacosxDevkit6.sh	Thu Mar 07 11:43:14 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute 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.
-#
-
-# This script copies part of an Xcode installer into a devkit suitable
-# for building OpenJDK and OracleJDK. The installation .dmg files for Xcode
-# and the aux tools need to be available.
-# erik.joelsson@oracle.com
-
-USAGE="$0 <Xcode.dmg> <XQuartz.dmg> <gnu make binary> [<auxtools.dmg>]"
-
-if [ "$1" = "" ] || [ "$2" = "" ]; then
-    echo $USAGE
-    exit 1
-fi
-
-XCODE_DMG="$1"
-XQUARTZ_DMG="$2"
-GNU_MAKE="$3"
-AUXTOOLS_DMG="$4"
-
-SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
-BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
-
-# Mount XCODE_DMG
-if [ -e "/Volumes/Xcode" ]; then
-    hdiutil detach /Volumes/Xcode
-fi
-hdiutil attach $XCODE_DMG
-
-# Find the version of Xcode
-XCODE_VERSION="$(/Volumes/Xcode/Xcode.app/Contents/Developer/usr/bin/xcodebuild -version \
-    | awk '/Xcode/ { print $2 }' )"
-SDK_VERSION="MacOSX10.9"
-if [ ! -e "/Volumes/Xcode/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk" ]; then
-    echo "Expected SDK version not found: ${SDK_VERSION}"
-    exit 1
-fi
-
-DEVKIT_ROOT="${BUILD_DIR}/Xcode${XCODE_VERSION}-${SDK_VERSION}"
-DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
-
-echo "Xcode version: $XCODE_VERSION"
-echo "Creating devkit in $DEVKIT_ROOT"
-
-################################################################################
-# Copy files to root
-mkdir -p $DEVKIT_ROOT
-if [ ! -d $DEVKIT_ROOT/Xcode.app ]; then
-    echo "Copying Xcode.app..."
-    cp -RH "/Volumes/Xcode/Xcode.app" $DEVKIT_ROOT/
-fi
-# Trim out some seemingly unneeded parts to save space.
-rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Applications
-rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/iPhone*
-rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Documentation
-rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/share/man
-( cd $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs \
-    && rm -rf `ls | grep -v ${SDK_VERSION}` )
-rm -rf $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man
-
-hdiutil detach /Volumes/Xcode
-
-################################################################################
-# Copy Freetype into sysroot
-if [ -e "/Volumes/XQuartz-*" ]; then
-    hdiutil detach /Volumes/XQuartz-*
-fi
-hdiutil attach $XQUARTZ_DMG
-
-echo "Copying freetype..."
-rm -rf /tmp/XQuartz
-pkgutil --expand /Volumes/XQuartz-*/XQuartz.pkg /tmp/XQuartz/
-rm -rf /tmp/x11
-mkdir /tmp/x11
-cd /tmp/x11
-cat /tmp/XQuartz/x11.pkg/Payload | gunzip -dc | cpio -i
-
-mkdir -p $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/include/
-mkdir -p $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/lib/
-cp -RH opt/X11/include/freetype2 \
-    $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/include/
-cp -RH opt/X11/include/ft2build.h \
-    $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/include/
-cp -RH opt/X11/lib/libfreetype.* \
-    $DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/X11/lib/
-
-cd -
-
-hdiutil detach /Volumes/XQuartz-*
-
-################################################################################
-# Copy gnu make
-mkdir -p $DEVKIT_ROOT/bin
-cp $GNU_MAKE $DEVKIT_ROOT/bin
-
-################################################################################
-# Optionally copy PackageMaker
-
-if [ -e "$AUXTOOLS_DMG" ]; then
-    if [ -e "/Volumes/Auxiliary Tools" ]; then
-        hdiutil detach "/Volumes/Auxiliary Tools"
-    fi
-    hdiutil attach $AUXTOOLS_DMG
-
-    echo "Copying PackageMaker.app..."
-    cp -RH "/Volumes/Auxiliary Tools/PackageMaker.app" $DEVKIT_ROOT/
-
-    hdiutil detach "/Volumes/Auxiliary Tools"
-fi
-
-################################################################################
-# Generate devkit.info
-
-echo-info() {
-    echo "$1" >> $DEVKIT_ROOT/devkit.info
-}
-
-echo "Generating devkit.info..."
-rm -f $DEVKIT_ROOT/devkit.info
-echo-info "# This file describes to configure how to interpret the contents of this devkit"
-echo-info "# The parameters used to create this devkit were:"
-echo-info "# $*"
-echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\""
-echo-info "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:\$DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/bin\""
-echo-info "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk\""
-echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_ROOT/bin:\$DEVKIT_ROOT/PackageMaker.app/Contents/MacOS:\$DEVKIT_TOOLCHAIN_PATH\""
-
-################################################################################
-# Copy this script
-
-echo "Copying this script..."
-cp $0 $DEVKIT_ROOT/
-
-################################################################################
-# Create bundle
-
-echo "Creating bundle..."
-(cd $DEVKIT_ROOT && tar c - . | gzip - > "$DEVKIT_BUNDLE")
--- a/make/devkit/createMacosxDevkit9.sh	Thu Mar 07 11:43:14 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute 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.
-#
-
-# This script copies parts of an Xcode installation into a devkit suitable
-# for building OpenJDK and OracleJDK. The installation Xcode_X.X.xip needs
-# to be either installed or extracted using for example Archive Utility.
-# The easiest way to accomplish this is to right click the file in Finder
-# and choose "Open With -> Archive Utility", or possible typing
-# "open Xcode_9.2.xip" in a terminal.
-# erik.joelsson@oracle.com
-
-USAGE="$0 <Xcode.app>"
-
-if [ "$1" = "" ]; then
-    echo $USAGE
-    exit 1
-fi
-
-XCODE_APP="$1"
-XCODE_APP_DIR_NAME="${XCODE_APP##*/}"
-
-SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
-BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
-
-# Find the version of Xcode
-XCODE_VERSION="$($XCODE_APP/Contents/Developer/usr/bin/xcodebuild -version \
-    | awk '/Xcode/ { print $2 }' )"
-SDK_VERSION="MacOSX10.13"
-if [ ! -e "$XCODE_APP/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk" ]; then
-    echo "Expected SDK version not found: ${SDK_VERSION}"
-    exit 1
-fi
-
-DEVKIT_ROOT="${BUILD_DIR}/Xcode${XCODE_VERSION}-${SDK_VERSION}"
-DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
-
-echo "Xcode version: $XCODE_VERSION"
-echo "Creating devkit in $DEVKIT_ROOT"
-
-mkdir -p $DEVKIT_ROOT
-
-################################################################################
-# Copy the relevant parts of Xcode.app, removing things that are both big and
-# unecessary for our purposes, without building an impossibly long exclude list.
-#
-# Not including WatchSimulator.platform makes ibtool crashes in some situations.
-# It doesn't seem to matter which extra platform is included, but that is the
-# smallest one.
-
-EXCLUDE_DIRS=" \
-    Contents/_CodeSignature \
-    $XCODE_APP_DIR_NAME/Contents/Applications \
-    $XCODE_APP_DIR_NAME/Contents/Resources \
-    $XCODE_APP_DIR_NAME/Contents/Library \
-    $XCODE_APP_DIR_NAME/Contents/XPCServices \
-    $XCODE_APP_DIR_NAME/Contents/OtherFrameworks \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Documentation \
-    $XCODE_APP_DIR_NAME/Contents/Developer/usr/share \
-    $XCODE_APP_DIR_NAME/Contents/Developer/usr/libexec/git-core \
-    $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/git* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/usr/bin/svn* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libgit* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/usr/lib/libsvn* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/share/man \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/${SDK_VERSION}.sdk/usr/share/man \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/Developer/usr/share/man \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/MacOSX.platform/usr \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/sourcekitd.framework \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/swift* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/swift* \
-    $XCODE_APP_DIR_NAME/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/arc \
-    Platforms/AppleTVSimulator.platform \
-    Platforms/iPhoneSimulator.platform \
-    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/LLDB.framework \
-    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/ModelIO.framework \
-    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCSUI.framework \
-    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/SceneKit.framework \
-    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/XCBuild.framework \
-    $XCODE_APP_DIR_NAME/Contents/SharedFrameworks/GPUTools.framework \
-    $(cd $XCODE_APP/.. && ls -d $XCODE_APP_DIR_NAME/Contents/Developer/Platforms/* \
-        | grep -v MacOSX.platform | grep -v WatchSimulator.platform) \
-"
-
-for ex in $EXCLUDE_DIRS; do
-    EXCLUDE_ARGS+="--exclude=$ex "
-done
-
-echo "Copying Xcode.app..."
-echo rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
-rsync -rlH $INCLUDE_ARGS $EXCLUDE_ARGS "$XCODE_APP" $DEVKIT_ROOT/
-
-################################################################################
-
-echo-info() {
-    echo "$1" >> $DEVKIT_ROOT/devkit.info
-}
-
-echo "Generating devkit.info..."
-rm -f $DEVKIT_ROOT/devkit.info
-echo-info "# This file describes to configure how to interpret the contents of this devkit"
-echo-info "DEVKIT_NAME=\"Xcode $XCODE_VERSION (devkit)\""
-echo-info "DEVKIT_TOOLCHAIN_PATH=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin:\$DEVKIT_ROOT/Xcode.app/Contents/Developer/usr/bin\""
-echo-info "DEVKIT_SYSROOT=\"\$DEVKIT_ROOT/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/$SDK_VERSION.sdk\""
-echo-info "DEVKIT_EXTRA_PATH=\"\$DEVKIT_TOOLCHAIN_PATH\""
-
-################################################################################
-# Copy this script
-
-echo "Copying this script..."
-cp $0 $DEVKIT_ROOT/
-
-################################################################################
-# Create bundle
-
-echo "Creating bundle..."
-GZIP=$(command -v pigz)
-if [ -z "$GZIP" ]; then
-    GZIP="gzip"
-fi
-(cd $DEVKIT_ROOT && tar c - . | $GZIP - > "$DEVKIT_BUNDLE")
--- a/make/devkit/createWindowsDevkit2013.sh	Thu Mar 07 11:43:14 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute 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.
-#
-
-# This script copies parts of a Visual Studio 2013 installation into a devkit
-# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
-# erik.joelsson@oracle.com
-
-VS_VERSION="2013"
-VS_VERSION_NUM="12.0"
-VS_VERSION_NUM_NODOT="120"
-SDK_VERSION="8.1"
-VS_VERSION_SP="SP4"
-
-SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
-BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
-DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}${VS_VERSION_SP}-devkit"
-DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
-
-echo "Creating devkit in $DEVKIT_ROOT"
-
-MSVCR_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcr${VS_VERSION_NUM_NODOT}.dll
-MSVCP_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcp${VS_VERSION_NUM_NODOT}.dll
-
-################################################################################
-# Copy Visual Studio files
-
-eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
-VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
-echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
-
-if [ ! -d $DEVKIT_ROOT/VC ]; then
-    echo "Copying VC..."
-    mkdir -p $DEVKIT_ROOT/VC/bin
-    cp -r "$VS_INSTALL_DIR/VC/bin/amd64" $DEVKIT_ROOT/VC/bin/
-    cp    "$VS_INSTALL_DIR/VC/bin/"*.* $DEVKIT_ROOT/VC/bin/
-    cp -r "$VS_INSTALL_DIR/VC/bin/1033/" $DEVKIT_ROOT/VC/bin/
-    mkdir -p $DEVKIT_ROOT/VC/lib
-    cp -r "$VS_INSTALL_DIR/VC/lib/amd64" $DEVKIT_ROOT/VC/lib/
-    cp    "$VS_INSTALL_DIR/VC/lib/"*.* $DEVKIT_ROOT/VC/lib/
-    cp -r "$VS_INSTALL_DIR/VC/include" $DEVKIT_ROOT/VC/
-    mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
-    cp -r "$VS_INSTALL_DIR/VC/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
-    cp -r "$VS_INSTALL_DIR/VC/atlmfc/lib/amd64" $DEVKIT_ROOT/VC/atlmfc/lib/
-    cp    "$VS_INSTALL_DIR/VC/atlmfc/lib/"*.* $DEVKIT_ROOT/VC/atlmfc/lib/
-    mkdir -p $DEVKIT_ROOT/VC/redist
-    cp -r "$VS_INSTALL_DIR/VC/redist/x64" $DEVKIT_ROOT/VC/redist/
-    cp -r "$VS_INSTALL_DIR/VC/redist/x86" $DEVKIT_ROOT/VC/redist/
-    # The redist runtime libs are needed to run the compiler but may not be
-    # installed on the machine where the devkit will be used.
-    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/
-    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/
-    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/amd64/
-    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/amd64/
-    # The msvcdis dll is needed to run some of the tools in VC/bin but is not
-    # shipped in that directory. Copy it from the common dir.
-    cp "$VS_INSTALL_DIR/Common7/IDE/msvcdis${VS_VERSION_NUM_NODOT}.dll" \
-        $DEVKIT_ROOT/VC/bin/
-fi
-
-################################################################################
-# Copy SDK files
-
-PROGRAMFILES_X86="`env | sed -n 's/^ProgramFiles(x86)=//p'`"
-SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
-echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
-
-if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
-    echo "Copying SDK..."
-    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
-    cp -r "$SDK_INSTALL_DIR/bin/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
-    cp -r "$SDK_INSTALL_DIR/bin/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
-    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
-    cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x64 $DEVKIT_ROOT/$SDK_VERSION/lib/
-    cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x86 $DEVKIT_ROOT/$SDK_VERSION/lib/
-    cp -r "$SDK_INSTALL_DIR/include" $DEVKIT_ROOT/$SDK_VERSION/
-fi
-
-################################################################################
-# Generate devkit.info
-
-echo-info() {
-    echo "$1" >> $DEVKIT_ROOT/devkit.info
-}
-
-echo "Generating devkit.info..."
-rm -f $DEVKIT_ROOT/devkit.info
-echo-info "# This file describes to configure how to interpret the contents of this devkit"
-echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION $VS_VERSION_SP (devkit)\""
-echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
-echo-info ""
-echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
-echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
-echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib;\$DEVKIT_ROOT/VC/atlmfc/lib;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86\""
-echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
-echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
-echo-info ""
-echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/amd64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
-echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
-echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/amd64;\$DEVKIT_ROOT/VC/atlmfc/lib/amd64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64\""
-echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
-echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
-
-################################################################################
-# Copy this script
-
-echo "Copying this script..."
-cp $0 $DEVKIT_ROOT/
-
-################################################################################
-# Create bundle
-
-echo "Creating bundle: $DEVKIT_BUNDLE"
-(cd "$DEVKIT_ROOT" && tar zcf "$DEVKIT_BUNDLE" .)
--- a/make/devkit/createWindowsDevkit2015.sh	Thu Mar 07 11:43:14 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-#!/bin/bash
-#
-# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute 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.
-#
-
-# This script copies parts of a Visual Studio installation into a devkit
-# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
-# erik.joelsson@oracle.com
-
-VS_VERSION="2015"
-VS_VERSION_NUM="14.0"
-VS_VERSION_NUM_NODOT="140"
-SDK_VERSION="8.1"
-VS_VERSION_SP="update3"
-
-SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
-BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
-DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}${VS_VERSION_SP}-devkit"
-DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
-
-echo "Creating devkit in $DEVKIT_ROOT"
-
-MSVCR_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/vcruntime${VS_VERSION_NUM_NODOT}.dll
-MSVCP_DLL=Microsoft.VC${VS_VERSION_NUM_NODOT}.CRT/msvcp${VS_VERSION_NUM_NODOT}.dll
-
-################################################################################
-# Copy Visual Studio files
-
-eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
-VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
-echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
-
-if [ ! -d $DEVKIT_ROOT/VC ]; then
-    echo "Copying VC..."
-    mkdir -p $DEVKIT_ROOT/VC/bin
-    cp -r "$VS_INSTALL_DIR/VC/bin/amd64" $DEVKIT_ROOT/VC/bin/
-    cp    "$VS_INSTALL_DIR/VC/bin/"*.* $DEVKIT_ROOT/VC/bin/
-    cp -r "$VS_INSTALL_DIR/VC/bin/1033/" $DEVKIT_ROOT/VC/bin/
-    mkdir -p $DEVKIT_ROOT/VC/lib
-    cp -r "$VS_INSTALL_DIR/VC/lib/amd64" $DEVKIT_ROOT/VC/lib/
-    cp    "$VS_INSTALL_DIR/VC/lib/"*.* $DEVKIT_ROOT/VC/lib/
-    cp -r "$VS_INSTALL_DIR/VC/include" $DEVKIT_ROOT/VC/
-    mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
-    cp -r "$VS_INSTALL_DIR/VC/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
-    cp -r "$VS_INSTALL_DIR/VC/atlmfc/lib/amd64" $DEVKIT_ROOT/VC/atlmfc/lib/
-    cp    "$VS_INSTALL_DIR/VC/atlmfc/lib/"*.* $DEVKIT_ROOT/VC/atlmfc/lib/
-    mkdir -p $DEVKIT_ROOT/VC/redist
-    cp -r "$VS_INSTALL_DIR/VC/redist/x64" $DEVKIT_ROOT/VC/redist/
-    cp -r "$VS_INSTALL_DIR/VC/redist/x86" $DEVKIT_ROOT/VC/redist/
-    # The redist runtime libs are needed to run the compiler but may not be
-    # installed on the machine where the devkit will be used.
-    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/
-    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/
-    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/amd64/
-    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/amd64/
-    # The msvcdis dll is needed to run some of the tools in VC/bin but is not
-    # shipped in that directory. Copy it from the common dir.
-    cp "$VS_INSTALL_DIR/Common7/IDE/msvcdis${VS_VERSION_NUM_NODOT}.dll" \
-        $DEVKIT_ROOT/VC/bin/
-fi
-
-################################################################################
-# Copy SDK files
-
-PROGRAMFILES_X86="`env | sed -n 's/^ProgramFiles(x86)=//p'`"
-SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
-echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
-
-if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
-    echo "Copying SDK..."
-    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
-    cp -r "$SDK_INSTALL_DIR/bin/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
-    cp -r "$SDK_INSTALL_DIR/bin/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
-    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
-    cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x64 $DEVKIT_ROOT/$SDK_VERSION/lib/
-    cp -r "$SDK_INSTALL_DIR/lib/"winv*/um/x86 $DEVKIT_ROOT/$SDK_VERSION/lib/
-    cp -r "$SDK_INSTALL_DIR/include" $DEVKIT_ROOT/$SDK_VERSION/
-    # In 2015, the new Universal CRT is delivered in the sdk 10 directory
-    # so need to include that as well.
-    mkdir -p $DEVKIT_ROOT/10/lib
-    cp -r "$SDK_INSTALL_DIR/../10/lib/10.0.10240.0/ucrt" $DEVKIT_ROOT/10/lib/
-    mkdir -p $DEVKIT_ROOT/10/include
-    cp -r "$SDK_INSTALL_DIR/../10/include/10.0.10240.0/ucrt" $DEVKIT_ROOT/10/include/
-fi
-
-################################################################################
-# Generate devkit.info
-
-echo-info() {
-    echo "$1" >> $DEVKIT_ROOT/devkit.info
-}
-
-echo "Generating devkit.info..."
-rm -f $DEVKIT_ROOT/devkit.info
-echo-info "# This file describes to configure how to interpret the contents of this devkit"
-echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION $VS_VERSION_SP (devkit)\""
-echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
-echo-info ""
-echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
-echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt;\$DEVKIT_ROOT/10/include/ucrt\""
-echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib;\$DEVKIT_ROOT/VC/atlmfc/lib;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86;\$DEVKIT_ROOT/10/lib/ucrt/x86\""
-echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
-echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
-echo-info ""
-echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/amd64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
-echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt;\$DEVKIT_ROOT/10/include/ucrt\""
-echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/amd64;\$DEVKIT_ROOT/VC/atlmfc/lib/amd64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64;\$DEVKIT_ROOT/10/lib/ucrt/x64\""
-echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
-echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
-
-################################################################################
-# Copy this script
-
-echo "Copying this script..."
-cp $0 $DEVKIT_ROOT/
-
-################################################################################
-# Create bundle
-
-echo "Creating bundle: $DEVKIT_BUNDLE"
-(cd "$DEVKIT_ROOT" && tar zcf "$DEVKIT_BUNDLE" .)
--- a/make/devkit/createWindowsDevkit2017.sh	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/devkit/createWindowsDevkit2017.sh	Thu Mar 14 22:05:02 2019 +0100
@@ -107,34 +107,37 @@
 ################################################################################
 # Copy Visual Studio files
 
-if [ ! -d $DEVKIT_ROOT/VC ]; then
-    VC_SUBDIR="VC/Tools/MSVC/$MSVC_FULL_VERSION"
-    REDIST_SUBDIR="VC/Redist/MSVC/$REDIST_FULL_VERSION"
-    echo "Copying VC..."
-    mkdir -p $DEVKIT_ROOT/VC/bin
-    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/x64" $DEVKIT_ROOT/VC/bin/
-    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx86/x86" $DEVKIT_ROOT/VC/bin/
-    mkdir -p $DEVKIT_ROOT/VC/lib
-    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x64" $DEVKIT_ROOT/VC/lib/
-    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x86" $DEVKIT_ROOT/VC/lib/
-    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/include" $DEVKIT_ROOT/VC/
-    mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
-    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x64" $DEVKIT_ROOT/VC/atlmfc/lib/
-    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x86" $DEVKIT_ROOT/VC/atlmfc/lib/
-    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
-    mkdir -p $DEVKIT_ROOT/VC/Auxiliary
-    cp -r "$VS_INSTALL_DIR/VC/Auxiliary/Build" $DEVKIT_ROOT/VC/Auxiliary/
-    mkdir -p $DEVKIT_ROOT/VC/redist
-    cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x64" $DEVKIT_ROOT/VC/redist/
-    cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x86" $DEVKIT_ROOT/VC/redist/
+TOOLS_VERSION="$(ls "$VS_INSTALL_DIR/VC/Tools/MSVC" | sort -r -n | head -n1)"
+echo "Found Tools version: $TOOLS_VERSION"
+VC_SUBDIR="VC/Tools/MSVC/$TOOLS_VERSION"
+REDIST_VERSION="$(ls "$VS_INSTALL_DIR/VC/Redist/MSVC" | sort -r -n | head -n1)"
+echo "Found Redist version: $REDIST_VERSION"
+REDIST_SUBDIR="VC/Redist/MSVC/$REDIST_VERSION"
+echo "Copying VC..."
+rm -rf $DEVKIT_ROOT/VC
+mkdir -p $DEVKIT_ROOT/VC/bin
+cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/x64" $DEVKIT_ROOT/VC/bin/
+cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx86/x86" $DEVKIT_ROOT/VC/bin/
+mkdir -p $DEVKIT_ROOT/VC/lib
+cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x64" $DEVKIT_ROOT/VC/lib/
+cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x86" $DEVKIT_ROOT/VC/lib/
+cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/include" $DEVKIT_ROOT/VC/
+mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
+cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x64" $DEVKIT_ROOT/VC/atlmfc/lib/
+cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x86" $DEVKIT_ROOT/VC/atlmfc/lib/
+cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
+mkdir -p $DEVKIT_ROOT/VC/Auxiliary
+cp -r "$VS_INSTALL_DIR/VC/Auxiliary/Build" $DEVKIT_ROOT/VC/Auxiliary/
+mkdir -p $DEVKIT_ROOT/VC/redist
+cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x64" $DEVKIT_ROOT/VC/redist/
+cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x86" $DEVKIT_ROOT/VC/redist/
 
-    # The redist runtime libs are needed to run the compiler but may not be
-    # installed on the machine where the devkit will be used.
-    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x86
-    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x86
-    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x64
-    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x64
-fi
+# The redist runtime libs are needed to run the compiler but may not be
+# installed on the machine where the devkit will be used.
+cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x86
+cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x86
+cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x64
+cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x64
 
 ################################################################################
 # Copy SDK files
@@ -142,21 +145,24 @@
 SDK_INSTALL_DIR="$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION"
 echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
 
-if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
-    echo "Copying SDK..."
-    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
-    cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
-    cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
-    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
-    cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
-    cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
-    cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
-    cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
-    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/Redist
-    cp -r "$SDK_INSTALL_DIR/Redist/ucrt" $DEVKIT_ROOT/$SDK_VERSION/Redist/
-    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/include
-    cp -r "$SDK_INSTALL_DIR/include/$SDK_FULL_VERSION/"* $DEVKIT_ROOT/$SDK_VERSION/include/
-fi
+SDK_FULL_VERSION="$(ls "$SDK_INSTALL_DIR/bin" | sort -r -n | head -n1)"
+echo "Found SDK version: $SDK_FULL_VERSION"
+UCRT_VERSION="$(ls "$SDK_INSTALL_DIR/Redist" | grep $SDK_VERSION | sort -r -n | head -n1)"
+echo "Found UCRT version: $UCRT_VERSION"
+echo "Copying SDK..."
+rm -rf $DEVKIT_ROOT/$SDK_VERSION
+mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
+cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
+cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
+mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
+cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
+cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
+cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
+cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
+mkdir -p $DEVKIT_ROOT/$SDK_VERSION/Redist
+cp -r "$SDK_INSTALL_DIR/Redist/$UCRT_VERSION/ucrt" $DEVKIT_ROOT/$SDK_VERSION/Redist/
+mkdir -p $DEVKIT_ROOT/$SDK_VERSION/include
+cp -r "$SDK_INSTALL_DIR/include/$SDK_FULL_VERSION/"* $DEVKIT_ROOT/$SDK_VERSION/include/
 
 ################################################################################
 # Generate devkit.info
@@ -184,6 +190,11 @@
 echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
 echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
 echo-info "DEVKIT_UCRT_DLL_DIR_x86_64=\"\$DEVKIT_ROOT/10/Redist/ucrt/DLLs/x64\""
+echo-info ""
+echo-info "DEVKIT_TOOLS_VERSION=\"$TOOLS_VERSION\""
+echo-info "DEVKIT_REDIST_VERSION=\"$REDIST_VERSION\""
+echo-info "DEVKIT_SDK_VERSION=\"$SDK_FULL_VERSION\""
+echo-info "DEVKIT_UCRT_VERSION=\"$UCRT_VERSION\""
 
 ################################################################################
 # Copy this script
--- a/make/gensrc/GensrcCommonJdk.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/gensrc/GensrcCommonJdk.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 
 include $(SPEC)
 include MakeBase.gmk
+include Execute.gmk
 include JavaCompilation.gmk
 include NativeCompilation.gmk
 include TextFileProcessing.gmk
--- a/make/gensrc/GensrcX11Wrappers.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/gensrc/GensrcX11Wrappers.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -26,27 +26,22 @@
 # Generate java sources using the X11 offsets that are precalculated in files
 # make/data/x11wrappergen/sizes-<address size>.txt.
 
-GENSRC_X11WRAPPERS_OUTPUT_TOP := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop
-
-GENSRC_X11WRAPPERS_MARKER := $(GENSRC_X11WRAPPERS_OUTPUT_TOP)/_x11wrappers.marker
-
 # Put the generated Java classes used to interface X11 from awt here.
-GENSRC_X11WRAPPERS_OUTPUTDIR := $(GENSRC_X11WRAPPERS_OUTPUT_TOP)/sun/awt/X11
+GENSRC_X11WRAPPERS_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.desktop/sun/awt/X11
 
 # The pre-calculated offset file are stored here:
 GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen
 GENSRC_X11WRAPPERS_DATA := $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(OPENJDK_TARGET_CPU_BITS).txt
 
 # Run the tool on the offset files to generate several Java classes used in awt.
-$(GENSRC_X11WRAPPERS_MARKER): $(BUILD_TOOLS_JDK) $(GENSRC_X11WRAPPERS_DATA) \
-    $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt
-	$(call MakeDir, $(GENSRC_X11WRAPPERS_OUTPUTDIR))
-	$(call LogInfo, Generating X11 wrapper source files)
-	$(call ExecuteWithLog, $@, \
-	    $(TOOL_WRAPPERGENERATOR) gen_java $(GENSRC_X11WRAPPERS_OUTPUTDIR) \
-	        $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(GENSRC_X11WRAPPERS_DATA) \
-	        $(OPENJDK_TARGET_CPU_BITS))
-	$(TOUCH) $@
+$(eval $(call SetupExecute, gen_x11wrappers, \
+    INFO := Generating X11 wrapper source files, \
+    DEPS := $(BUILD_TOOLS_JDK) $(GENSRC_X11WRAPPERS_DATA) \
+        $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt, \
+    OUTPUT_DIR := $(GENSRC_X11WRAPPERS_OUTPUTDIR), \
+    COMMAND := $(TOOL_WRAPPERGENERATOR) gen_java $(GENSRC_X11WRAPPERS_OUTPUTDIR) \
+        $(GENSRC_X11WRAPPERS_DATADIR)/xlibtypes.txt $(GENSRC_X11WRAPPERS_DATA) \
+        $(OPENJDK_TARGET_CPU_BITS), \
+))
 
-
-GENSRC_JAVA_DESKTOP += $(GENSRC_X11WRAPPERS_MARKER)
+GENSRC_JAVA_DESKTOP += $(gen_x11wrappers_TARGET)
--- a/make/hotspot/gensrc/GenerateSources.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/hotspot/gensrc/GenerateSources.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,7 @@
 
 include $(SPEC)
 include MakeBase.gmk
+include Execute.gmk
 include JavaCompilation.gmk
 include NativeCompilation.gmk
 include TextFileProcessing.gmk
@@ -35,10 +36,10 @@
 
 # The real work is done in these files
 
+include gensrc/GensrcJfr.gmk
 include gensrc/GensrcAdlc.gmk
 include gensrc/GensrcDtrace.gmk
 include gensrc/GensrcJvmti.gmk
-include gensrc/GensrcJfr.gmk
 
 $(eval $(call IncludeCustomExtension, hotspot/gensrc/GenerateSources.gmk))
 
--- a/make/hotspot/gensrc/GensrcAdlc.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/hotspot/gensrc/GensrcAdlc.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -166,18 +166,16 @@
   ##############################################################################
   # Run the adlc tool on the single concatenated ad source file, and store the
   # output in support/adlc for further processing.
-  ADLC_RUN_MARKER := $(ADLC_SUPPORT_DIR)/_adlc_run.marker
-
-  $(ADLC_RUN_MARKER): $(BUILD_ADLC) $(SINGLE_AD_SRCFILE)
-	$(call LogInfo, Generating adlc files)
-	$(call MakeDir, $(@D))
-	$(call ExecuteWithLog, $(ADLC_SUPPORT_DIR)/adlc_run, \
-	    $(FIXPATH) $(ADLC_TOOL) $(ADLCFLAGS) $(SINGLE_AD_SRCFILE) \
-	        -c$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
-	        -h$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU_ARCH).hpp \
-	        -a$(ADLC_SUPPORT_DIR)/dfa_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
-	        -v$(ADLC_SUPPORT_DIR)/adGlobals_$(HOTSPOT_TARGET_CPU_ARCH).hpp)
-	$(TOUCH) $@
+  $(eval $(call SetupExecute, adlc_run, \
+      INFO := Generating adlc files, \
+      DEPS := $(BUILD_ADLC) $(SINGLE_AD_SRCFILE), \
+      OUTPUT_DIR := $(ADLC_SUPPORT_DIR), \
+      COMMAND := $(FIXPATH) $(ADLC_TOOL) $(ADLCFLAGS) $(SINGLE_AD_SRCFILE) \
+          -c$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
+          -h$(ADLC_SUPPORT_DIR)/ad_$(HOTSPOT_TARGET_CPU_ARCH).hpp \
+          -a$(ADLC_SUPPORT_DIR)/dfa_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
+          -v$(ADLC_SUPPORT_DIR)/adGlobals_$(HOTSPOT_TARGET_CPU_ARCH).hpp, \
+  ))
 
   ##############################################################################
   # Finally copy the generated files from support/adlc into gensrc/adfiles,
@@ -197,7 +195,7 @@
       dfa_$(HOTSPOT_TARGET_CPU_ARCH).cpp \
   )
 
-  $(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles/%: $(ADLC_RUN_MARKER)
+  $(JVM_VARIANT_OUTPUTDIR)/gensrc/adfiles/%: $(adlc_run_TARGET)
 	$(call LogInfo, Postprocessing adlc file $*)
 	$(call MakeDir, $(@D))
 	$(NAWK) \
@@ -206,6 +204,6 @@
 	     {print}' \
 	    < $(ADLC_SUPPORT_DIR)/$* > $@
 
-  TARGETS := $(ADLC_GENERATED_FILES)
+  TARGETS += $(ADLC_GENERATED_FILES)
 
 endif
--- a/make/hotspot/gensrc/GensrcDtrace.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/hotspot/gensrc/GensrcDtrace.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
 # 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,9 +64,9 @@
     include lib/JvmFeatures.gmk
     include lib/JvmFlags.gmk
 
-    # We cannot compile until the JVMTI and JFR gensrc has finished
+    # We cannot compile until the JVMTI and JFR gensrc has finished.
+    # JFR_FILES is defined in GensrcJfr.gmk.
     JVMTI_H := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles/jvmti.h
-    JFR_FILES := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jfrfiles/jfrEventClasses.hpp
 
     $(eval $(call SetupNativeCompilation, BUILD_DTRACE_GEN_OFFSETS, \
         NAME := dtraceGenOffsets, \
@@ -87,12 +87,14 @@
     # Argument 1: Output filename
     # Argument 2: dtrace-gen-offset tool command line option
     define SetupDtraceOffsetsGeneration
-      $1: $$(BUILD_DTRACE_GEN_OFFSETS)
-	$$(call LogInfo, Generating dtrace $2 file $$(@F))
-	$$(call MakeDir, $$(@D))
-	$$(call ExecuteWithLog, $$@, ( $$(DTRACE_GEN_OFFSETS_TOOL) -$$(strip $2) > $$@ ) )
+      $$(eval $$(call SetupExecute, dtrace_offset_$$(strip $2), \
+          INFO := Generating dtrace $2 file, \
+          DEPS := $$(BUILD_DTRACE_GEN_OFFSETS), \
+          OUTPUT_FILE := $1, \
+          COMMAND := ( $$(DTRACE_GEN_OFFSETS_TOOL) -$$(strip $2) > $1 ), \
+      ))
 
-      TARGETS += $1
+      TARGETS += $$(dtrace_offset_$$(strip $2)_TARGET)
     endef
 
     JVM_OFFSETS_H := $(DTRACE_GENSRC_DIR)/JvmOffsets.h
--- a/make/hotspot/gensrc/GensrcJfr.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/hotspot/gensrc/GensrcJfr.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -57,11 +57,12 @@
 METADATA_XML := $(JFR_SRCDIR)/metadata.xml
 METADATA_XSD := $(JFR_SRCDIR)/metadata.xsd
 
-$(JFR_OUTPUTDIR)/jfrEventClasses.hpp: $(METADATA_XML) $(METADATA_XSD) \
-    $(BUILD_JFR_TOOLS)
-	$(call LogInfo, Generating $(@F))
-	$(call MakeDir, $(@D))
-	$(call ExecuteWithLog, $@, $(TOOL_JFR_GEN) $(METADATA_XML) $(METADATA_XSD) $(JFR_OUTPUTDIR))
-	test -f $@
+$(eval $(call SetupExecute, jfr_gen, \
+    INFO := Generating JFR header files, \
+    DEPS := $(METADATA_XML) $(METADATA_XSD) $(BUILD_JFR_TOOLS), \
+    OUTPUT_DIR := $(JFR_OUTPUTDIR), \
+    COMMAND := $(TOOL_JFR_GEN) $(METADATA_XML) $(METADATA_XSD) $(JFR_OUTPUTDIR), \
+))
 
-TARGETS += $(JFR_OUTPUTDIR)/jfrEventClasses.hpp
+JFR_FILES := $(jfr_gen_TARGET)
+TARGETS += $(JFR_FILES)
--- a/make/hotspot/gensrc/GensrcJvmti.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/hotspot/gensrc/GensrcJvmti.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
 ################################################################################
 # Build tools needed for the JVMTI source code generation
 
+# FIXME: jvmtiGen.java should move to make/src, jvmtiEnvFill.java should be removed.
 JVMTI_TOOLS_SRCDIR := $(TOPDIR)/src/hotspot/share/prims
 JVMTI_TOOLS_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/tools/jvmti
 
@@ -64,16 +65,17 @@
 #   DEPS -- Additional dependencies
 SetupXslTransform = $(NamedParamsMacroTemplate)
 define SetupXslTransformBody
-  $$($1_OUTPUT_DIR)/$1: $$($1_XML_FILE) $$($1_XSL_FILE) $$($1_DEPS) $$(BUILD_JVMTI_TOOLS)
-	$$(call LogInfo, Generating $$(@F))
-	$$(call MakeDir, $$(@D))
-	$$(call ExecuteWithLog, $$@, $$(TOOL_JVMTI_GEN) -IN $$($1_XML_FILE) \
-	    -XSL $$($1_XSL_FILE) -OUT $$@ $$($1_ARGS))
-        # jvmtiGen does not return error code properly on fail.
-        # NOTE: We should really fix jvmtiGen.java instead.
-	test -f $$@
+  $1_OUTPUT_FILE := $$($1_OUTPUT_DIR)/$1
 
-  TARGETS += $$($1_OUTPUT_DIR)/$1
+  $$(eval $$(call SetupExecute, jvmti_gen_$1, \
+      INFO := Generating jvmti file $1, \
+      DEPS := $$($1_XML_FILE) $$($1_XSL_FILE) $$($1_DEPS) $$(BUILD_JVMTI_TOOLS), \
+      OUTPUT_FILE := $$($1_OUTPUT_FILE), \
+      COMMAND := $$(TOOL_JVMTI_GEN) -IN $$($1_XML_FILE) \
+          -XSL $$($1_XSL_FILE) -OUT $$($1_OUTPUT_FILE) $$($1_ARGS), \
+  ))
+
+  TARGETS += $$(jvmti_gen_$1_TARGET)
 endef
 
 ################################################################################
--- a/make/hotspot/ide/CreateVSProject.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/hotspot/ide/CreateVSProject.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -30,6 +30,7 @@
 include MakeBase.gmk
 include JavaCompilation.gmk
 include SetupJavaCompilers.gmk
+include Execute.gmk
 
 ifeq ($(call isTargetOs, windows), true)
   # The next part is a bit hacky. We include the CompileJvm.gmk to be
@@ -144,14 +145,16 @@
   VCPROJ_VARDEPS_FILE := $(call DependOnVariable, VCPROJ_VARDEPS, \
     $(VCPROJ_FILE).vardeps)
 
-  $(VCPROJ_FILE): $(BUILD_PROJECT_CREATOR) $(VCPROJ_VARDEPS_FILE)
-	$(call MakeDir, $(@D))
-	$(call ExecuteWithLog, $@, \
-	    $(PROJECT_CREATOR_TOOL) $(PROJECT_CREATOR_CLASS) \
-	    $(PROJECT_CREATOR_ARGS) -projectFileName $(call FixPath, $@)) \
-	    $(LOG_INFO)
+  $(eval $(call SetupExecute, vcproj_file, \
+      INFO := Generating Visual Studio project file, \
+      DEPS := $(BUILD_PROJECT_CREATOR) $(VCPROJ_VARDEPS_FILE), \
+      OUTPUT_FILE := $(VCPROJ_FILE), \
+      COMMAND := $(PROJECT_CREATOR_TOOL) $(PROJECT_CREATOR_CLASS) \
+          $(PROJECT_CREATOR_ARGS) -projectFileName $(call FixPath, $(VCPROJ_FILE)) \
+          $(LOG_INFO), \
+  ))
 
-  TARGETS += $(VCPROJ_FILE)
+  TARGETS += $(vcproj_file_TARGET)
 
   all: $(TARGETS)
 
--- a/make/hotspot/lib/CompileJvm.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/hotspot/lib/CompileJvm.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -166,6 +166,9 @@
 # default.
 JVM_STRIPFLAGS ?= $(STRIPFLAGS)
 
+# This source set is reused so save in cache.
+$(eval $(call FillCacheFind, $(JVM_SRC_DIRS)))
+
 ################################################################################
 # Now set up the actual compilation of the main hotspot native library
 
--- a/make/launcher/Launcher-java.base.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/launcher/Launcher-java.base.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -27,6 +27,8 @@
 
 $(eval $(call IncludeCustomExtension, launcher/Launcher-java.base.gmk))
 
+JAVA_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/launcher/java.rc
+
 JAVA_RC_FLAGS += -I$(TOPDIR)/src/java.base/windows/native/common
 JAVA_RC_FLAGS += -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
 
--- a/make/launcher/LauncherCommon.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/launcher/LauncherCommon.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -51,7 +51,6 @@
     -I$(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/native/libjli \
     #
 GLOBAL_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/common/version.rc
-JAVA_VERSION_INFO_RESOURCE := $(TOPDIR)/src/java.base/windows/native/launcher/java.rc
 MACOSX_PLIST_DIR := $(TOPDIR)/src/java.base/macosx/native/launcher
 JAVA_MANIFEST := $(TOPDIR)/src/java.base/windows/native/launcher/java.manifest
 
--- a/make/lib/CoreLibraries.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/lib/CoreLibraries.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -78,8 +78,6 @@
     NAME := verify, \
     OPTIMIZATION := $(LIBVERIFY_OPTIMIZATION), \
     CFLAGS := $(CFLAGS_JDKLIB), \
-    DISABLED_WARNINGS_gcc := implicit-fallthrough unused-function, \
-    DISABLED_WARNINGS_microsoft := 4244 4267, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
         $(call SET_SHARED_LIBRARY_ORIGIN), \
     LIBS_unix := -ljvm, \
--- a/make/test/JtregGraalUnit.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/test/JtregGraalUnit.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -41,115 +41,124 @@
 
 ifeq ($(INCLUDE_GRAAL), true)
   ifneq ($(GRAALUNIT_LIB), )
+
     SRC_DIR := $(TOPDIR)/src/jdk.internal.vm.compiler/share/classes
     TEST_DIR := $(TOPDIR)/test/hotspot/jtreg/compiler/graalunit
     COMPILE_OUTPUTDIR := $(SUPPORT_OUTPUTDIR)/test/graalunit
     LIB_OUTPUTDIR := $(TEST_IMAGE_DIR)/hotspot/jtreg/graal
 
-    TEST_COMPILE_CP := \
-        $(JDK_OUTPUTDIR)/modules/jdk.internal.vm.compiler \
-        $(JDK_OUTPUTDIR)/modules/jdk.internal.vm.ci \
-        $(LIB_OUTPUTDIR)/junit-4.12.jar \
-        $(LIB_OUTPUTDIR)/asm-5.0.4.jar \
-        $(LIB_OUTPUTDIR)/asm-tree-5.0.4.jar \
-        $(LIB_OUTPUTDIR)/java-allocation-instrumenter.jar \
-        $(LIB_OUTPUTDIR)/hamcrest-core-1.3.jar
+    # This evaluation is expensive and should only be done if this target was
+    # explicitly called.
+    ifneq ($(filter build-test-hotspot-jtreg-graal, $(MAKECMDGOALS)), )
 
-    TEST_JAVAC_FLAGS := \
-        -Xlint:none \
-        -processorpath $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar \
-        --add-exports jdk.unsupported/sun.misc=ALL-UNNAMED \
-        --add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
+      TEST_COMPILE_CP := \
+          $(JDK_OUTPUTDIR)/modules/jdk.internal.vm.compiler \
+          $(JDK_OUTPUTDIR)/modules/jdk.internal.vm.ci \
+          $(LIB_OUTPUTDIR)/junit-4.12.jar \
+          $(LIB_OUTPUTDIR)/asm-5.0.4.jar \
+          $(LIB_OUTPUTDIR)/asm-tree-5.0.4.jar \
+          $(LIB_OUTPUTDIR)/java-allocation-instrumenter.jar \
+          $(LIB_OUTPUTDIR)/hamcrest-core-1.3.jar
 
-    ### Copy 3rd party libs
-    $(eval $(call SetupCopyFiles, COPY_GRAALUNIT_LIBS, \
-        FILES := $(wildcard $(GRAALUNIT_LIB)/*.jar), \
-        DEST := $(LIB_OUTPUTDIR), \
-    ))
+      TEST_JAVAC_FLAGS := \
+          -Xlint:none \
+          -processorpath $(BUILDTOOLS_OUTPUTDIR)/jdk.vm.compiler.replacements.verifier.jar \
+          --add-exports jdk.unsupported/sun.misc=ALL-UNNAMED \
+          --add-exports java.base/jdk.internal.misc=ALL-UNNAMED \
 
-    TARGETS_EXTRA_LIB += $(COPY_GRAALUNIT_LIBS)
+      ### Copy 3rd party libs
+      $(eval $(call SetupCopyFiles, COPY_GRAALUNIT_LIBS, \
+          FILES := $(wildcard $(GRAALUNIT_LIB)/*.jar), \
+          DEST := $(LIB_OUTPUTDIR), \
+      ))
 
-    ### Compile graalunit tests
-    $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_TESTS, \
-        SETUP := GENERATE_USINGJDKBYTECODE, \
-        SRC := \
-            $(SRC_DIR)/jdk.internal.vm.compiler.collections.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.api.directives.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.api.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.asm.aarch64.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.asm.amd64.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.asm.sparc.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.asm.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.core.aarch64.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.core.amd64.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.core.jdk9.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.core.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.debug.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.graph.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.hotspot.amd64.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.hotspot.lir.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.hotspot.sparc.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.hotspot.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.jtt/src \
-            $(SRC_DIR)/org.graalvm.compiler.lir.jtt/src \
-            $(SRC_DIR)/org.graalvm.compiler.lir.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.loop.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.nodes.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.options.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.phases.common.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.replacements.jdk12.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.replacements.jdk9.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.replacements.test/src \
-            $(SRC_DIR)/org.graalvm.compiler.test/src \
-            $(SRC_DIR)/org.graalvm.util.test/src \
-            , \
-        EXCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
-        BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
-        CLASSPATH := $(TEST_COMPILE_CP), \
-        ADD_JAVAC_FLAGS := $(TEST_JAVAC_FLAGS), \
-    ))
+      TARGETS_EXTRA_LIB += $(COPY_GRAALUNIT_LIBS)
 
-    TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS)
+      ### Compile graalunit tests
+      $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_TESTS, \
+          SETUP := GENERATE_USINGJDKBYTECODE, \
+          SRC := \
+              $(SRC_DIR)/jdk.internal.vm.compiler.collections.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.api.directives.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.api.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.asm.aarch64.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.asm.amd64.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.asm.sparc.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.asm.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.core.aarch64.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.core.amd64.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.core.jdk9.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.core.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.debug.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.graph.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.hotspot.amd64.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.hotspot.jdk9.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.hotspot.lir.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.hotspot.sparc.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.hotspot.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.jtt/src \
+              $(SRC_DIR)/org.graalvm.compiler.lir.jtt/src \
+              $(SRC_DIR)/org.graalvm.compiler.lir.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.loop.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.nodes.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.options.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.phases.common.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.replacements.jdk12.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.replacements.jdk9.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.replacements.test/src \
+              $(SRC_DIR)/org.graalvm.compiler.test/src \
+              $(SRC_DIR)/org.graalvm.util.test/src \
+              , \
+          EXCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
+          BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
+          CLASSPATH := $(TEST_COMPILE_CP), \
+          ADD_JAVAC_FLAGS := $(TEST_JAVAC_FLAGS), \
+      ))
 
-    ### Compile graalunit tests which require -XDstringConcat=inline
-    $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_TESTS_SET2, \
-        SETUP := GENERATE_USINGJDKBYTECODE, \
-        DEPENDS := $(BUILD_VM_COMPILER_TESTS), \
-        SRC := $(SRC_DIR)/org.graalvm.compiler.core.test/src, \
-        INCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
-        BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
-        CLASSPATH := \
-            $(TEST_COMPILE_CP) \
-            $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests \
-            , \
-        ADD_JAVAC_FLAGS := \
-            $(TEST_JAVAC_FLAGS) \
-            -XDstringConcat=inline \
-            , \
-    ))
+      TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS)
 
-    TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS_SET2)
+      ### Compile graalunit tests which require -XDstringConcat=inline
+      $(eval $(call SetupJavaCompilation, BUILD_VM_COMPILER_TESTS_SET2, \
+          SETUP := GENERATE_USINGJDKBYTECODE, \
+          DEPENDS := $(BUILD_VM_COMPILER_TESTS), \
+          SRC := $(SRC_DIR)/org.graalvm.compiler.core.test/src, \
+          INCLUDE_FILES := org/graalvm/compiler/core/test/VerifyDebugUsageTest.java, \
+          BIN := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
+          CLASSPATH := \
+              $(TEST_COMPILE_CP) \
+              $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests \
+              , \
+          ADD_JAVAC_FLAGS := \
+              $(TEST_JAVAC_FLAGS) \
+              -XDstringConcat=inline \
+              , \
+      ))
 
-    ### Generate jdk.vm.compiler.tests.jar
-    $(eval $(call SetupJarArchive, BUILD_VM_COMPILER_TESTS_JAR, \
-        DEPENDENCIES := $(BUILD_VM_COMPILER_TESTS) $(BUILD_VM_COMPILER_TESTS_SET2), \
-        SRCS := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
-        JAR := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests.jar, \
-    ))
+      TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS_SET2)
 
-    TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS_JAR)
+      ### Generate jdk.vm.compiler.tests.jar
+      $(eval $(call SetupJarArchive, BUILD_VM_COMPILER_TESTS_JAR, \
+          DEPENDENCIES := $(BUILD_VM_COMPILER_TESTS) $(BUILD_VM_COMPILER_TESTS_SET2), \
+          SRCS := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests, \
+          JAR := $(COMPILE_OUTPUTDIR)/jdk.vm.compiler.tests.jar, \
+      ))
 
-    ### Compile and build mxtool
-    $(eval $(call SetupJavaCompilation, BUILD_MXTOOL, \
-        SETUP := GENERATE_USINGJDKBYTECODE, \
-        SRC := $(TEST_DIR)/com.oracle.mxtool.junit, \
-        BIN := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit, \
-        JAR := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit.jar, \
-        CLASSPATH := $(LIB_OUTPUTDIR)/junit-4.12.jar, \
-    ))
+      TARGETS_BUILD += $(BUILD_VM_COMPILER_TESTS_JAR)
 
-    TARGETS_BUILD += $(BUILD_MXTOOL)
+      ### Compile and build mxtool
+      $(eval $(call SetupJavaCompilation, BUILD_MXTOOL, \
+          SETUP := GENERATE_USINGJDKBYTECODE, \
+          SRC := $(TEST_DIR)/com.oracle.mxtool.junit, \
+          BIN := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit, \
+          JAR := $(COMPILE_OUTPUTDIR)/com.oracle.mxtool.junit.jar, \
+          CLASSPATH := $(LIB_OUTPUTDIR)/junit-4.12.jar, \
+      ))
 
+      TARGETS_BUILD += $(BUILD_MXTOOL)
+
+      $(TARGETS_BUILD): $(TARGETS_EXTRA_LIB)
+
+    endif # build-test-hotspot-jtreg-graal
 
     ################################################################################
     # Targets for building test-image.
@@ -168,7 +177,6 @@
   endif
 endif
 
-$(TARGETS_BUILD): $(TARGETS_EXTRA_LIB)
 build-test-hotspot-jtreg-graal: $(TARGETS_BUILD)
 test-image-hotspot-jtreg-graal: $(TARGETS_IMAGE)
 
--- a/make/test/JtregNativeHotspot.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/test/JtregNativeHotspot.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -1513,19 +1513,23 @@
     BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libterminatedThread += -lpthread
 endif
 
-$(eval $(call SetupTestFilesCompilation, BUILD_HOTSPOT_JTREG_LIBRARIES, \
-    TYPE := LIBRARY, \
-    SOURCE_DIRS := $(BUILD_HOTSPOT_JTREG_NATIVE_SRC), \
-    OUTPUT_DIR := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
-    EXCLUDE := $(BUILD_HOTSPOT_JTREG_EXCLUDE), \
-))
+# This evaluation is expensive and should only be done if this target was
+# explicitly called.
+ifneq ($(filter build-test-hotspot-jtreg-native, $(MAKECMDGOALS)), )
+  $(eval $(call SetupTestFilesCompilation, BUILD_HOTSPOT_JTREG_LIBRARIES, \
+      TYPE := LIBRARY, \
+      SOURCE_DIRS := $(BUILD_HOTSPOT_JTREG_NATIVE_SRC), \
+      OUTPUT_DIR := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
+      EXCLUDE := $(BUILD_HOTSPOT_JTREG_EXCLUDE), \
+  ))
 
-$(eval $(call SetupTestFilesCompilation, BUILD_HOTSPOT_JTREG_EXECUTABLES, \
-    TYPE := PROGRAM, \
-    SOURCE_DIRS := $(BUILD_HOTSPOT_JTREG_NATIVE_SRC), \
-    OUTPUT_DIR := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
-    EXCLUDE := $(BUILD_HOTSPOT_JTREG_EXCLUDE), \
-))
+  $(eval $(call SetupTestFilesCompilation, BUILD_HOTSPOT_JTREG_EXECUTABLES, \
+      TYPE := PROGRAM, \
+      SOURCE_DIRS := $(BUILD_HOTSPOT_JTREG_NATIVE_SRC), \
+      OUTPUT_DIR := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
+      EXCLUDE := $(BUILD_HOTSPOT_JTREG_EXCLUDE), \
+  ))
+endif
 
 build-test-hotspot-jtreg-native: $(BUILD_HOTSPOT_JTREG_LIBRARIES) $(BUILD_HOTSPOT_JTREG_EXECUTABLES)
 
@@ -1537,8 +1541,9 @@
 $(eval $(call SetupCopyFiles,COPY_HOTSPOT_JTREG_NATIVE, \
     SRC := $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), \
     DEST := $(TEST_IMAGE_DIR)/hotspot/jtreg/native, \
-    FILES := $(BUILD_HOTSPOT_JTREG_LIBRARIES) $(BUILD_HOTSPOT_JTREG_EXECUTABLES), \
-    FLATTEN := true))
+    FILES := $(wildcard $(addprefix $(BUILD_HOTSPOT_JTREG_OUTPUT_DIR), /bin/* /lib/*)), \
+    FLATTEN := true, \
+))
 
 test-image-hotspot-jtreg-native: $(COPY_HOTSPOT_JTREG_NATIVE)
 
--- a/make/test/JtregNativeJdk.gmk	Thu Mar 07 11:43:14 2019 +0100
+++ b/make/test/JtregNativeJdk.gmk	Thu Mar 14 22:05:02 2019 +0100
@@ -82,19 +82,23 @@
   BUILD_JDK_JTREG_EXCLUDE += exeJniInvocationTest.c
 endif
 
-$(eval $(call SetupTestFilesCompilation, BUILD_JDK_JTREG_LIBRARIES, \
-    TYPE := LIBRARY, \
-    SOURCE_DIRS := $(BUILD_JDK_JTREG_NATIVE_SRC), \
-    OUTPUT_DIR := $(BUILD_JDK_JTREG_OUTPUT_DIR), \
-    EXCLUDE := $(BUILD_JDK_JTREG_EXCLUDE), \
-))
+# This evaluation is expensive and should only be done if this target was
+# explicitly called.
+ifneq ($(filter build-test-jdk-jtreg-native, $(MAKECMDGOALS)), )
+  $(eval $(call SetupTestFilesCompilation, BUILD_JDK_JTREG_LIBRARIES, \
+      TYPE := LIBRARY, \
+      SOURCE_DIRS := $(BUILD_JDK_JTREG_NATIVE_SRC), \
+      OUTPUT_DIR := $(BUILD_JDK_JTREG_OUTPUT_DIR), \
+      EXCLUDE := $(BUILD_JDK_JTREG_EXCLUDE), \
+  ))
 
-$(eval $(call SetupTestFilesCompilation, BUILD_JDK_JTREG_EXECUTABLES, \
-    TYPE := PROGRAM, \
-    SOURCE_DIRS := $(BUILD_JDK_JTREG_NATIVE_SRC), \
-    OUTPUT_DIR := $(BUILD_JDK_JTREG_OUTPUT_DIR), \
-    EXCLUDE := $(BUILD_JDK_JTREG_EXCLUDE), \
-))
+  $(eval $(call SetupTestFilesCompilation, BUILD_JDK_JTREG_EXECUTABLES, \
+      TYPE := PROGRAM, \
+      SOURCE_DIRS := $(BUILD_JDK_JTREG_NATIVE_SRC), \
+      OUTPUT_DIR := $(BUILD_JDK_JTREG_OUTPUT_DIR), \
+      EXCLUDE := $(BUILD_JDK_JTREG_EXCLUDE), \
+  ))
+endif
 
 build-test-jdk-jtreg-native: $(BUILD_JDK_JTREG_LIBRARIES) $(BUILD_JDK_JTREG_EXECUTABLES)
 
@@ -106,8 +110,9 @@
 $(eval $(call SetupCopyFiles,COPY_JDK_JTREG_NATIVE, \
     SRC := $(BUILD_JDK_JTREG_OUTPUT_DIR), \
     DEST := $(TEST_IMAGE_DIR)/jdk/jtreg/native, \
-    FILES := $(BUILD_JDK_JTREG_LIBRARIES) $(BUILD_JDK_JTREG_EXECUTABLES), \
-    FLATTEN := true))
+    FILES := $(wildcard $(addprefix $(BUILD_JDK_JTREG_OUTPUT_DIR), /bin/* /lib/*)), \
+    FLATTEN := true, \
+))
 
 test-image-jdk-jtreg-native: $(COPY_JDK_JTREG_NATIVE)
 
--- a/src/hotspot/cpu/aarch64/aarch64.ad	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/aarch64/aarch64.ad	Thu Mar 14 22:05:02 2019 +0100
@@ -4246,7 +4246,7 @@
 %{
   // Get base of card map
   predicate(BarrierSet::barrier_set()->is_a(BarrierSet::CardTableBarrierSet) &&
-            (jbyte*)n->get_ptr() == ((CardTableBarrierSet*)(BarrierSet::barrier_set()))->card_table()->byte_map_base());
+            (CardTable::CardValue*)n->get_ptr() == ((CardTableBarrierSet*)(BarrierSet::barrier_set()))->card_table()->byte_map_base());
   match(ConP);
 
   op_cost(0);
@@ -15660,6 +15660,98 @@
   ins_pipe(pipe_class_default);
 %}
 
+instruct reduce_max2F(vRegF dst, vRegF src1, vecD src2, vecD tmp) %{
+  predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
+  match(Set dst (MaxReductionV src1 src2));
+  ins_cost(INSN_COST);
+  effect(TEMP_DEF dst, TEMP tmp);
+  format %{ "fmaxs $dst, $src1, $src2\n\t"
+            "ins   $tmp, S, $src2, 0, 1\n\t"
+            "fmaxs $dst, $dst, $tmp\t max reduction2F" %}
+  ins_encode %{
+    __ fmaxs(as_FloatRegister($dst$$reg), as_FloatRegister($src1$$reg), as_FloatRegister($src2$$reg));
+    __ ins(as_FloatRegister($tmp$$reg), __ S, as_FloatRegister($src2$$reg), 0, 1);
+    __ fmaxs(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct reduce_max4F(vRegF dst, vRegF src1, vecX src2) %{
+  predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
+  match(Set dst (MaxReductionV src1 src2));
+  ins_cost(INSN_COST);
+  effect(TEMP_DEF dst);
+  format %{ "fmaxv $dst, T4S, $src2\n\t"
+            "fmaxs $dst, $dst, $src1\t max reduction4F" %}
+  ins_encode %{
+    __ fmaxv(as_FloatRegister($dst$$reg), __ T4S, as_FloatRegister($src2$$reg));
+    __ fmaxs(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($src1$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct reduce_max2D(vRegD dst, vRegD src1, vecX src2, vecX tmp) %{
+  predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_DOUBLE);
+  match(Set dst (MaxReductionV src1 src2));
+  ins_cost(INSN_COST);
+  effect(TEMP_DEF dst, TEMP tmp);
+  format %{ "fmaxd $dst, $src1, $src2\n\t"
+            "ins   $tmp, D, $src2, 0, 1\n\t"
+            "fmaxd $dst, $dst, $tmp\t max reduction2D" %}
+  ins_encode %{
+    __ fmaxd(as_FloatRegister($dst$$reg), as_FloatRegister($src1$$reg), as_FloatRegister($src2$$reg));
+    __ ins(as_FloatRegister($tmp$$reg), __ D, as_FloatRegister($src2$$reg), 0, 1);
+    __ fmaxd(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct reduce_min2F(vRegF dst, vRegF src1, vecD src2, vecD tmp) %{
+  predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
+  match(Set dst (MinReductionV src1 src2));
+  ins_cost(INSN_COST);
+  effect(TEMP_DEF dst, TEMP tmp);
+  format %{ "fmins $dst, $src1, $src2\n\t"
+            "ins   $tmp, S, $src2, 0, 1\n\t"
+            "fmins $dst, $dst, $tmp\t min reduction2F" %}
+  ins_encode %{
+    __ fmins(as_FloatRegister($dst$$reg), as_FloatRegister($src1$$reg), as_FloatRegister($src2$$reg));
+    __ ins(as_FloatRegister($tmp$$reg), __ S, as_FloatRegister($src2$$reg), 0, 1);
+    __ fmins(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct reduce_min4F(vRegF dst, vRegF src1, vecX src2) %{
+  predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
+  match(Set dst (MinReductionV src1 src2));
+  ins_cost(INSN_COST);
+  effect(TEMP_DEF dst);
+  format %{ "fminv $dst, T4S, $src2\n\t"
+            "fmins $dst, $dst, $src1\t min reduction4F" %}
+  ins_encode %{
+    __ fminv(as_FloatRegister($dst$$reg), __ T4S, as_FloatRegister($src2$$reg));
+    __ fmins(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($src1$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
+instruct reduce_min2D(vRegD dst, vRegD src1, vecX src2, vecX tmp) %{
+  predicate(n->in(2)->bottom_type()->is_vect()->element_basic_type() == T_DOUBLE);
+  match(Set dst (MinReductionV src1 src2));
+  ins_cost(INSN_COST);
+  effect(TEMP_DEF dst, TEMP tmp);
+  format %{ "fmind $dst, $src1, $src2\n\t"
+            "ins   $tmp, D, $src2, 0, 1\n\t"
+            "fmind $dst, $dst, $tmp\t min reduction2D" %}
+  ins_encode %{
+    __ fmind(as_FloatRegister($dst$$reg), as_FloatRegister($src1$$reg), as_FloatRegister($src2$$reg));
+    __ ins(as_FloatRegister($tmp$$reg), __ D, as_FloatRegister($src2$$reg), 0, 1);
+    __ fmind(as_FloatRegister($dst$$reg), as_FloatRegister($dst$$reg), as_FloatRegister($tmp$$reg));
+  %}
+  ins_pipe(pipe_class_default);
+%}
+
 // ====================VECTOR ARITHMETIC=======================================
 
 // --------------------------------- ADD --------------------------------------
@@ -17198,6 +17290,90 @@
   ins_pipe(vshift128_imm);
 %}
 
+instruct vmax2F(vecD dst, vecD src1, vecD src2)
+%{
+  predicate(n->as_Vector()->length() == 2 && n->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
+  match(Set dst (MaxV src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "fmax  $dst,$src1,$src2\t# vector (2F)" %}
+  ins_encode %{
+    __ fmax(as_FloatRegister($dst$$reg), __ T2S,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(vdop_fp64);
+%}
+
+instruct vmax4F(vecX dst, vecX src1, vecX src2)
+%{
+  predicate(n->as_Vector()->length() == 4 && n->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
+  match(Set dst (MaxV src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "fmax  $dst,$src1,$src2\t# vector (4S)" %}
+  ins_encode %{
+    __ fmax(as_FloatRegister($dst$$reg), __ T4S,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(vdop_fp128);
+%}
+
+instruct vmax2D(vecX dst, vecX src1, vecX src2)
+%{
+  predicate(n->as_Vector()->length() == 2 && n->bottom_type()->is_vect()->element_basic_type() == T_DOUBLE);
+  match(Set dst (MaxV src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "fmax  $dst,$src1,$src2\t# vector (2D)" %}
+  ins_encode %{
+    __ fmax(as_FloatRegister($dst$$reg), __ T2D,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(vdop_fp128);
+%}
+
+instruct vmin2F(vecD dst, vecD src1, vecD src2)
+%{
+  predicate(n->as_Vector()->length() == 2 && n->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
+  match(Set dst (MinV src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "fmin  $dst,$src1,$src2\t# vector (2F)" %}
+  ins_encode %{
+    __ fmin(as_FloatRegister($dst$$reg), __ T2S,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(vdop_fp64);
+%}
+
+instruct vmin4F(vecX dst, vecX src1, vecX src2)
+%{
+  predicate(n->as_Vector()->length() == 4 && n->bottom_type()->is_vect()->element_basic_type() == T_FLOAT);
+  match(Set dst (MinV src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "fmin  $dst,$src1,$src2\t# vector (4S)" %}
+  ins_encode %{
+    __ fmin(as_FloatRegister($dst$$reg), __ T4S,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(vdop_fp128);
+%}
+
+instruct vmin2D(vecX dst, vecX src1, vecX src2)
+%{
+  predicate(n->as_Vector()->length() == 2 && n->bottom_type()->is_vect()->element_basic_type() == T_DOUBLE);
+  match(Set dst (MinV src1 src2));
+  ins_cost(INSN_COST);
+  format %{ "fmin  $dst,$src1,$src2\t# vector (2D)" %}
+  ins_encode %{
+    __ fmin(as_FloatRegister($dst$$reg), __ T2D,
+            as_FloatRegister($src1$$reg),
+            as_FloatRegister($src2$$reg));
+  %}
+  ins_pipe(vdop_fp128);
+%}
+
 //----------PEEPHOLE RULES-----------------------------------------------------
 // These must follow all instruction definitions as they use the names
 // defined in the instructions definitions.
--- a/src/hotspot/cpu/aarch64/assembler_aarch64.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/aarch64/assembler_aarch64.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -2240,6 +2240,19 @@
 
 #undef INSN
 
+#define INSN(NAME, opc) \
+  void NAME(FloatRegister Vd, SIMD_Arrangement T, FloatRegister Vn) {                  \
+    starti;                                                                            \
+    assert(T == T4S, "arrangement must be T4S");                                       \
+    f(0, 31), f((int)T & 1, 30), f(0b101110, 29, 24), f(opc, 23),                      \
+    f(T == T4S ? 0 : 1, 22), f(0b110000111110, 21, 10); rf(Vn, 5), rf(Vd, 0);          \
+  }
+
+  INSN(fmaxv, 0);
+  INSN(fminv, 1);
+
+#undef INSN
+
 #define INSN(NAME, op0, cmode0) \
   void NAME(FloatRegister Vd, SIMD_Arrangement T, unsigned imm8, unsigned lsl = 0) {   \
     unsigned cmode = cmode0;                                                           \
@@ -2281,6 +2294,8 @@
   INSN(fsub, 0, 1, 0b110101);
   INSN(fmla, 0, 0, 0b110011);
   INSN(fmls, 0, 1, 0b110011);
+  INSN(fmax, 0, 0, 0b111101);
+  INSN(fmin, 0, 1, 0b111101);
 
 #undef INSN
 
--- a/src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/aarch64/gc/g1/g1BarrierSetAssembler_aarch64.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -193,7 +193,6 @@
   BarrierSet* bs = BarrierSet::barrier_set();
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
   CardTable* ct = ctbs->card_table();
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
 
   Label done;
   Label runtime;
@@ -211,7 +210,6 @@
   // storing region crossing non-NULL, is card already dirty?
 
   ExternalAddress cardtable((address) ct->byte_map_base());
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
   const Register card_addr = tmp;
 
   __ lsr(card_addr, store_addr, CardTable::card_shift);
@@ -417,7 +415,6 @@
   BarrierSet* bs = BarrierSet::barrier_set();
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
   CardTable* ct = ctbs->card_table();
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
 
   Label done;
   Label runtime;
--- a/src/hotspot/cpu/aarch64/gc/shared/cardTableBarrierSetAssembler_aarch64.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/aarch64/gc/shared/cardTableBarrierSetAssembler_aarch64.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -32,7 +32,6 @@
 
 #define __ masm->
 
-
 void CardTableBarrierSetAssembler::store_check(MacroAssembler* masm, Register obj, Address dst) {
 
   BarrierSet* bs = BarrierSet::barrier_set();
@@ -40,7 +39,6 @@
 
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
   CardTable* ct = ctbs->card_table();
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
 
   __ lsr(obj, obj, CardTable::card_shift);
 
@@ -68,7 +66,6 @@
   BarrierSet* bs = BarrierSet::barrier_set();
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
   CardTable* ct = ctbs->card_table();
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
 
   Label L_loop;
 
--- a/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -373,15 +373,9 @@
                                          Register last_java_fp,
                                          address  last_java_pc,
                                          Register scratch) {
-  if (last_java_pc != NULL) {
-    adr(scratch, last_java_pc);
-  } else {
-    // FIXME: This is almost never correct.  We should delete all
-    // cases of set_last_Java_frame with last_java_pc=NULL and use the
-    // correct return address instead.
-    adr(scratch, pc());
-  }
-
+  assert(last_java_pc != NULL, "must provide a valid PC");
+
+  adr(scratch, last_java_pc);
   str(scratch, Address(rthread,
                        JavaThread::frame_anchor_offset()
                        + JavaFrameAnchor::last_Java_pc_offset()));
@@ -398,7 +392,7 @@
   } else {
     InstructionMark im(this);
     L.add_patch_at(code(), locator());
-    set_last_Java_frame(last_java_sp, last_java_fp, (address)NULL, scratch);
+    set_last_Java_frame(last_java_sp, last_java_fp, pc() /* Patched later */, scratch);
   }
 }
 
@@ -4311,7 +4305,7 @@
 }
 
 void MacroAssembler::load_byte_map_base(Register reg) {
-  jbyte *byte_map_base =
+  CardTable::CardValue* byte_map_base =
     ((CardTableBarrierSet*)(BarrierSet::barrier_set()))->card_table()->byte_map_base();
 
   if (is_valid_AArch64_address((address)byte_map_base)) {
--- a/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2014, 2018, Red Hat Inc. All rights reserved.
+ * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1782,14 +1782,11 @@
   }
 
   // Change state to native (we save the return address in the thread, since it might not
-  // be pushed on the stack when we do a a stack traversal). It is enough that the pc()
-  // points into the right code segment. It does not have to be the correct return pc.
+  // be pushed on the stack when we do a stack traversal).
   // We use the same pc/oopMap repeatedly when we call out
 
-  intptr_t the_pc = (intptr_t) __ pc();
-  oop_maps->add_gc_map(the_pc - start, map);
-
-  __ set_last_Java_frame(sp, noreg, (address)the_pc, rscratch1);
+  Label native_return;
+  __ set_last_Java_frame(sp, noreg, native_return, rscratch1);
 
   Label dtrace_method_entry, dtrace_method_entry_done;
   {
@@ -1922,6 +1919,11 @@
             return_type);
   }
 
+  __ bind(native_return);
+
+  intptr_t return_pc = (intptr_t) __ pc();
+  oop_maps->add_gc_map(return_pc - start, map);
+
   // Unpack native results.
   switch (ret_type) {
   case T_BOOLEAN: __ c2bool(r0);                     break;
--- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2014, 2015, Red Hat Inc. All rights reserved.
+ * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -4800,7 +4800,7 @@
 
     // Set up last_Java_sp and last_Java_fp
     address the_pc = __ pc();
-    __ set_last_Java_frame(sp, rfp, (address)NULL, rscratch1);
+    __ set_last_Java_frame(sp, rfp, the_pc, rscratch1);
 
     // Call runtime
     if (arg1 != noreg) {
--- a/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/aarch64/templateInterpreterGenerator_aarch64.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2014, 2018, Red Hat Inc. All rights reserved.
+ * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Red Hat Inc. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1351,9 +1351,11 @@
   // pass JNIEnv
   __ add(c_rarg0, rthread, in_bytes(JavaThread::jni_environment_offset()));
 
-  // It is enough that the pc() points into the right code
-  // segment. It does not have to be the correct return pc.
-  __ set_last_Java_frame(esp, rfp, (address)NULL, rscratch1);
+  // Set the last Java PC in the frame anchor to be the return address from
+  // the call to the native method: this will allow the debugger to
+  // generate an accurate stack trace.
+  Label native_return;
+  __ set_last_Java_frame(esp, rfp, native_return, rscratch1);
 
   // change thread state
 #ifdef ASSERT
@@ -1374,6 +1376,7 @@
 
   // Call the native method.
   __ blrt(r10, rscratch1);
+  __ bind(native_return);
   __ maybe_isb();
   __ get_method(rmethod);
   // result potentially in r0 or v0
--- a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -194,6 +194,19 @@
 
   // Enable vendor specific features
 
+  // Ampere eMAG
+  if (_cpu == CPU_AMCC && (_model == 0) && (_variant == 0x3)) {
+    if (FLAG_IS_DEFAULT(AvoidUnalignedAccesses)) {
+      FLAG_SET_DEFAULT(AvoidUnalignedAccesses, true);
+    }
+    if (FLAG_IS_DEFAULT(UseSIMDForMemoryOps)) {
+      FLAG_SET_DEFAULT(UseSIMDForMemoryOps, true);
+    }
+    if (FLAG_IS_DEFAULT(UseSIMDForArrayEquals)) {
+      FLAG_SET_DEFAULT(UseSIMDForArrayEquals, !(_revision == 1 || _revision == 2));
+    }
+  }
+
   // ThunderX
   if (_cpu == CPU_CAVIUM && (_model == 0xA1)) {
     if (_variant == 0) _features |= CPU_DMB_ATOMICS;
@@ -219,6 +232,16 @@
     }
   }
 
+  // HiSilicon TSV110
+  if (_cpu == CPU_HISILICON && _model == 0xd01) {
+    if (FLAG_IS_DEFAULT(AvoidUnalignedAccesses)) {
+      FLAG_SET_DEFAULT(AvoidUnalignedAccesses, true);
+    }
+    if (FLAG_IS_DEFAULT(UseSIMDForMemoryOps)) {
+      FLAG_SET_DEFAULT(UseSIMDForMemoryOps, true);
+    }
+  }
+
   // Cortex A53
   if (_cpu == CPU_ARM && (_model == 0xd03 || _model2 == 0xd03)) {
     _features |= CPU_A53MAC;
--- a/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -72,6 +72,7 @@
     CPU_BROADCOM  = 'B',
     CPU_CAVIUM    = 'C',
     CPU_DEC       = 'D',
+    CPU_HISILICON = 'H',
     CPU_INFINEON  = 'I',
     CPU_MOTOROLA  = 'M',
     CPU_NVIDIA    = 'N',
--- a/src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/arm/gc/g1/g1BarrierSetAssembler_arm.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -216,7 +216,6 @@
 
   // storing region crossing non-NULL, is card already dirty?
   const Register card_addr = tmp1;
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
 
   __ mov_address(tmp2, (address)ct->byte_map_base());
   __ add(card_addr, tmp2, AsmOperand(store_addr, lsr, CardTable::card_shift));
--- a/src/hotspot/cpu/arm/gc/shared/cardTableBarrierSetAssembler_arm.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/arm/gc/shared/cardTableBarrierSetAssembler_arm.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -47,7 +47,6 @@
   BarrierSet* bs = BarrierSet::barrier_set();
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
   CardTable* ct = ctbs->card_table();
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
 
   Label L_cardtable_loop, L_done;
 
@@ -102,7 +101,6 @@
 
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
   CardTable* ct = ctbs->card_table();
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "Adjust store check code");
 
   // Load card table base address.
 
@@ -132,7 +130,6 @@
 
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
   CardTable* ct = ctbs->card_table();
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "Adjust store check code");
 
   assert(CardTable::dirty_card_val() == 0, "Dirty card value must be 0 due to optimizations.");
   Address card_table_addr(card_table_base, obj, lsr, CardTable::card_shift);
--- a/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/ppc/c1_LIRAssembler_ppc.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1,6 +1,6 @@
 /*
- * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2017, SAP SE. All rights reserved.
+ * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2019, SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -2378,23 +2378,28 @@
 
 
 void LIR_Assembler::emit_typecheck_helper(LIR_OpTypeCheck *op, Label* success, Label* failure, Label* obj_is_null) {
-  Register obj = op->object()->as_register();
+  const Register obj = op->object()->as_register(); // Needs to live in this register at safepoint (patching stub).
   Register k_RInfo = op->tmp1()->as_register();
   Register klass_RInfo = op->tmp2()->as_register();
   Register Rtmp1 = op->tmp3()->as_register();
   Register dst = op->result_opr()->as_register();
   ciKlass* k = op->klass();
   bool should_profile = op->should_profile();
-  bool move_obj_to_dst = (op->code() == lir_checkcast);
   // Attention: do_temp(opTypeCheck->_object) is not used, i.e. obj may be same as one of the temps.
-  bool reg_conflict = (obj == k_RInfo || obj == klass_RInfo || obj == Rtmp1);
-  bool restore_obj = move_obj_to_dst && reg_conflict;
+  bool reg_conflict = false;
+  if (obj == k_RInfo) {
+    k_RInfo = dst;
+    reg_conflict = true;
+  } else if (obj == klass_RInfo) {
+    klass_RInfo = dst;
+    reg_conflict = true;
+  } else if (obj == Rtmp1) {
+    Rtmp1 = dst;
+    reg_conflict = true;
+  }
+  assert_different_registers(obj, k_RInfo, klass_RInfo, Rtmp1);
 
   __ cmpdi(CCR0, obj, 0);
-  if (move_obj_to_dst || reg_conflict) {
-    __ mr_if_needed(dst, obj);
-    if (reg_conflict) { obj = dst; }
-  }
 
   ciMethodData* md = NULL;
   ciProfileData* data = NULL;
@@ -2460,12 +2465,27 @@
     } else {
       // Call out-of-line instance of __ check_klass_subtype_slow_path(...):
       address entry = Runtime1::entry_for(Runtime1::slow_subtype_check_id);
-      //__ load_const_optimized(Rtmp1, entry, R0);
-      __ calculate_address_from_global_toc(Rtmp1, entry, true, true, false);
-      __ mtctr(Rtmp1);
+      // Stub needs fixed registers (tmp1-3).
+      Register original_k_RInfo = op->tmp1()->as_register();
+      Register original_klass_RInfo = op->tmp2()->as_register();
+      Register original_Rtmp1 = op->tmp3()->as_register();
+      bool keep_obj_alive = reg_conflict && (op->code() == lir_checkcast);
+      bool keep_klass_RInfo_alive = (obj == original_klass_RInfo) && should_profile;
+      if (keep_obj_alive && (obj != original_Rtmp1)) { __ mr(R0, obj); }
+      __ mr_if_needed(original_k_RInfo, k_RInfo);
+      __ mr_if_needed(original_klass_RInfo, klass_RInfo);
+      if (keep_obj_alive) { __ mr(dst, (obj == original_Rtmp1) ? obj : R0); }
+      //__ load_const_optimized(original_Rtmp1, entry, R0);
+      __ calculate_address_from_global_toc(original_Rtmp1, entry, true, true, false);
+      __ mtctr(original_Rtmp1);
       __ bctrl(); // sets CR0
+      if (keep_obj_alive) {
+        if (keep_klass_RInfo_alive) { __ mr(R0, obj); }
+        __ mr(obj, dst);
+      }
       if (should_profile) {
         __ bne(CCR0, *failure_target);
+        if (keep_klass_RInfo_alive) { __ mr(klass_RInfo, keep_obj_alive ? R0 : obj); }
         // Fall through to success case.
       } else {
         __ beq(CCR0, *success);
@@ -2493,11 +2513,6 @@
   }
 
   __ bind(*failure);
-
-  if (restore_obj) {
-    __ mr(op->object()->as_register(), dst);
-    // Fall through to failure case.
-  }
 }
 
 
@@ -2590,10 +2605,11 @@
 
   } else if (code == lir_checkcast) {
     Label success, failure;
-    emit_typecheck_helper(op, &success, /*fallthru*/&failure, &success); // Moves obj to dst.
+    emit_typecheck_helper(op, &success, /*fallthru*/&failure, &success);
     __ b(*op->stub()->entry());
     __ align(32, 12);
     __ bind(success);
+    __ mr_if_needed(op->result_opr()->as_register(), op->object()->as_register());
   } else if (code == lir_instanceof) {
     Register dst = op->result_opr()->as_register();
     Label success, failure, done;
--- a/src/hotspot/cpu/ppc/gc/g1/g1BarrierSetAssembler_ppc.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/ppc/gc/g1/g1BarrierSetAssembler_ppc.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -213,7 +213,6 @@
   assert_different_registers(store_addr, new_val, tmp1, tmp2);
 
   CardTableBarrierSet* ct = barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
-  assert(sizeof(*ct->card_table()->byte_map_base()) == sizeof(jbyte), "adjust this code");
 
   // Does store cross heap regions?
   __ xorr(tmp1, store_addr, new_val);
@@ -478,7 +477,7 @@
   Register tmp = R0;
   Register addr = R14;
   Register tmp2 = R15;
-  jbyte* byte_map_base = bs->card_table()->byte_map_base();
+  CardTable::CardValue* byte_map_base = bs->card_table()->byte_map_base();
 
   Label restart, refill, ret;
 
--- a/src/hotspot/cpu/ppc/gc/shared/cardTableBarrierSetAssembler_ppc.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/ppc/gc/shared/cardTableBarrierSetAssembler_ppc.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -45,7 +45,6 @@
                                                                     Register count, Register preserve) {
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
   CardTable* ct = ctbs->card_table();
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
   assert_different_registers(addr, count, R0);
 
   Label Lskip_loop, Lstore_loop;
@@ -73,7 +72,7 @@
 }
 
 void CardTableBarrierSetAssembler::card_table_write(MacroAssembler* masm,
-                                                    jbyte* byte_map_base,
+                                                    CardTable::CardValue* byte_map_base,
                                                     Register tmp, Register obj) {
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
   CardTable* ct = ctbs->card_table();
--- a/src/hotspot/cpu/ppc/gc/shared/cardTableBarrierSetAssembler_ppc.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/ppc/gc/shared/cardTableBarrierSetAssembler_ppc.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -34,7 +34,7 @@
   virtual void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
                                                 Register addr, Register count, Register preserve);
 
-  void card_table_write(MacroAssembler* masm, jbyte* byte_map_base, Register tmp, Register obj);
+  void card_table_write(MacroAssembler* masm, CardTable::CardValue* byte_map_base, Register tmp, Register obj);
 
   void card_write_barrier_post(MacroAssembler* masm, Register store_addr, Register tmp);
 
--- a/src/hotspot/cpu/s390/gc/g1/g1BarrierSetAssembler_s390.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/s390/gc/g1/g1BarrierSetAssembler_s390.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -269,7 +269,6 @@
   Label callRuntime, filtered;
 
   CardTableBarrierSet* ct = barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
-  assert(sizeof(*ct->card_table()->byte_map_base()) == sizeof(jbyte), "adjust this code");
 
   BLOCK_COMMENT("g1_write_barrier_post {");
 
@@ -298,7 +297,6 @@
   Rnew_val = noreg; // end of lifetime
 
   // Storing region crossing non-NULL, is card already dirty?
-  assert(sizeof(*ct->card_table()->byte_map_base()) == sizeof(jbyte), "adjust this code");
   assert_different_registers(Rtmp1, Rtmp2, Rtmp3);
   // Make sure not to use Z_R0 for any of these registers.
   Register Rcard_addr = (Rtmp1 != Z_R0_scratch) ? Rtmp1 : Rtmp3;
@@ -311,14 +309,12 @@
   Rbase = noreg; // end of lifetime
 
   // Filter young.
-  assert((unsigned int)G1CardTable::g1_young_card_val() <= 255, "otherwise check this code");
   __ z_cli(0, Rcard_addr, G1CardTable::g1_young_card_val());
   __ z_bre(filtered);
 
   // Check the card value. If dirty, we're done.
   // This also avoids false sharing of the (already dirty) card.
   __ z_sync(); // Required to support concurrent cleaning.
-  assert((unsigned int)G1CardTable::dirty_card_val() <= 255, "otherwise check this code");
   __ z_cli(0, Rcard_addr, G1CardTable::dirty_card_val()); // Reload after membar.
   __ z_bre(filtered);
 
@@ -542,7 +538,7 @@
   Register cardtable = r1;   // Must be non-volatile, because it is used to save addr_card.
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
   CardTable* ct = ctbs->card_table();
-  jbyte* byte_map_base = ct->byte_map_base();
+  CardTable::CardValue* byte_map_base = ct->byte_map_base();
 
   // Save registers used below (see assertion in G1PreBarrierStub::emit_code()).
   __ z_stg(r1, 0*BytesPerWord + FrameMap::first_available_sp_in_frame, Z_SP);
--- a/src/hotspot/cpu/s390/gc/shared/cardTableBarrierSetAssembler_s390.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/s390/gc/shared/cardTableBarrierSetAssembler_s390.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -47,7 +47,6 @@
                                                                     bool do_return) {
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
   CardTable* ct = ctbs->card_table();
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
 
   NearLabel doXC, done;
   assert_different_registers(Z_R0, Z_R1, addr, count);
@@ -144,7 +143,6 @@
   // register obj is destroyed afterwards.
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
   CardTable* ct = ctbs->card_table();
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
 
   assert_different_registers(store_addr, tmp);
 
--- a/src/hotspot/cpu/sparc/gc/g1/g1BarrierSetAssembler_sparc.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/sparc/gc/g1/g1BarrierSetAssembler_sparc.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -275,7 +275,7 @@
 static u_char* dirty_card_log_enqueue_end = 0;
 
 // This gets to assume that o0 contains the object address.
-static void generate_dirty_card_log_enqueue(jbyte* byte_map_base) {
+static void generate_dirty_card_log_enqueue(CardTable::CardValue* byte_map_base) {
   BufferBlob* bb = BufferBlob::create("dirty_card_enqueue", EnqueueCodeSize*2);
   CodeBuffer buf(bb);
   MacroAssembler masm(&buf);
@@ -626,7 +626,7 @@
   Register cardtable = G5;
   Register tmp  = G1_scratch;
   Register tmp2 = G3_scratch;
-  jbyte* byte_map_base = bs->card_table()->byte_map_base();
+  CardTable::CardValue* byte_map_base = bs->card_table()->byte_map_base();
 
   Label not_already_dirty, restart, refill, young_card;
 
--- a/src/hotspot/cpu/sparc/gc/shared/cardTableBarrierSetAssembler_sparc.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/sparc/gc/shared/cardTableBarrierSetAssembler_sparc.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -44,7 +44,6 @@
                                                                     Register addr, Register count, Register tmp) {
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
   CardTable* ct = ctbs->card_table();
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
   assert_different_registers(addr, count, tmp);
 
   Label L_loop, L_done;
@@ -70,7 +69,7 @@
 }
 
 void CardTableBarrierSetAssembler::card_table_write(MacroAssembler* masm,
-                                                    jbyte* byte_map_base,
+                                                    CardTable::CardValue* byte_map_base,
                                                     Register tmp, Register obj) {
   __ srlx(obj, CardTable::card_shift, obj);
   assert(tmp != obj, "need separate temp reg");
--- a/src/hotspot/cpu/sparc/gc/shared/cardTableBarrierSetAssembler_sparc.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/sparc/gc/shared/cardTableBarrierSetAssembler_sparc.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -26,6 +26,7 @@
 #define CPU_SPARC_GC_SHARED_CARDTABLEBARRIERSETASSEMBLER_SPARC_HPP
 
 #include "asm/macroAssembler.hpp"
+#include "gc/shared/cardTable.hpp"
 #include "gc/shared/modRefBarrierSetAssembler.hpp"
 
 class CardTableBarrierSetAssembler: public ModRefBarrierSetAssembler {
@@ -33,7 +34,7 @@
   virtual void gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators,
                                                 Register addr, Register count, Register tmp);
 
-  void card_table_write(MacroAssembler* masm, jbyte* byte_map_base, Register tmp, Register obj);
+  void card_table_write(MacroAssembler* masm, CardTable::CardValue* byte_map_base, Register tmp, Register obj);
 
   void card_write_barrier_post(MacroAssembler* masm, Register store_addr, Register new_val, Register tmp);
 
--- a/src/hotspot/cpu/x86/assembler_x86.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/x86/assembler_x86.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -7765,9 +7765,43 @@
   }
 }
 
+void Assembler::vmaxss(XMMRegister dst, XMMRegister nds, XMMRegister src) {
+  assert(VM_Version::supports_avx(), "");
+  InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
+  int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
+  emit_int8(0x5F);
+  emit_int8((unsigned char)(0xC0 | encode));
+}
+
+void Assembler::vmaxsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
+  assert(VM_Version::supports_avx(), "");
+  InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
+  int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
+  emit_int8(0x5F);
+  emit_int8((unsigned char)(0xC0 | encode));
+}
+
+void Assembler::vminss(XMMRegister dst, XMMRegister nds, XMMRegister src) {
+  assert(VM_Version::supports_avx(), "");
+  InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
+  int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
+  emit_int8(0x5D);
+  emit_int8((unsigned char)(0xC0 | encode));
+}
+
+void Assembler::vminsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
+  assert(VM_Version::supports_avx(), "");
+  InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false);
+  attributes.set_rex_vex_w_reverted();
+  int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
+  emit_int8(0x5D);
+  emit_int8((unsigned char)(0xC0 | encode));
+}
+
 void Assembler::cmppd(XMMRegister dst, XMMRegister nds, XMMRegister src, int cop, int vector_len) {
   assert(VM_Version::supports_avx(), "");
-  assert(!VM_Version::supports_evex(), "");
+  assert(vector_len <= AVX_256bit, "");
   InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ true);
   int encode = simd_prefix_and_encode(dst, nds, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xC2);
@@ -7777,7 +7811,7 @@
 
 void Assembler::blendvpd(XMMRegister dst, XMMRegister nds, XMMRegister src1, XMMRegister src2, int vector_len) {
   assert(VM_Version::supports_avx(), "");
-  assert(!VM_Version::supports_evex(), "");
+  assert(vector_len <= AVX_256bit, "");
   InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ true);
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src1->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_3A, &attributes);
   emit_int8((unsigned char)0x4B);
@@ -7788,7 +7822,7 @@
 
 void Assembler::cmpps(XMMRegister dst, XMMRegister nds, XMMRegister src, int cop, int vector_len) {
   assert(VM_Version::supports_avx(), "");
-  assert(!VM_Version::supports_evex(), "");
+  assert(vector_len <= AVX_256bit, "");
   InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ true);
   int encode = simd_prefix_and_encode(dst, nds, src, VEX_SIMD_NONE, VEX_OPCODE_0F, &attributes);
   emit_int8((unsigned char)0xC2);
@@ -7798,7 +7832,7 @@
 
 void Assembler::blendvps(XMMRegister dst, XMMRegister nds, XMMRegister src1, XMMRegister src2, int vector_len) {
   assert(VM_Version::supports_avx(), "");
-  assert(!VM_Version::supports_evex(), "");
+  assert(vector_len <= AVX_256bit, "");
   InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ true);
   int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src1->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_3A, &attributes);
   emit_int8((unsigned char)0x4A);
--- a/src/hotspot/cpu/x86/assembler_x86.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/x86/assembler_x86.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1934,6 +1934,11 @@
   void vsubss(XMMRegister dst, XMMRegister nds, Address src);
   void vsubss(XMMRegister dst, XMMRegister nds, XMMRegister src);
 
+  void vmaxss(XMMRegister dst, XMMRegister nds, XMMRegister src);
+  void vmaxsd(XMMRegister dst, XMMRegister nds, XMMRegister src);
+  void vminss(XMMRegister dst, XMMRegister nds, XMMRegister src);
+  void vminsd(XMMRegister dst, XMMRegister nds, XMMRegister src);
+
   void shlxl(Register dst, Register src1, Register src2);
   void shlxq(Register dst, Register src1, Register src2);
 
--- a/src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/x86/gc/g1/g1BarrierSetAssembler_x86.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -273,7 +273,6 @@
 
   CardTableBarrierSet* ct =
     barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
-  assert(sizeof(*ct->card_table()->byte_map_base()) == sizeof(jbyte), "adjust this code");
 
   Label done;
   Label runtime;
@@ -522,7 +521,6 @@
 
   CardTableBarrierSet* ct =
     barrier_set_cast<CardTableBarrierSet>(BarrierSet::barrier_set());
-  assert(sizeof(*ct->card_table()->byte_map_base()) == sizeof(jbyte), "adjust this code");
 
   Label done;
   Label enqueued;
--- a/src/hotspot/cpu/x86/gc/shared/cardTableBarrierSetAssembler_x86.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/x86/gc/shared/cardTableBarrierSetAssembler_x86.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -46,7 +46,6 @@
   BarrierSet *bs = BarrierSet::barrier_set();
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
   CardTable* ct = ctbs->card_table();
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
   intptr_t disp = (intptr_t) ct->byte_map_base();
 
   Label L_loop, L_done;
@@ -92,7 +91,6 @@
 
   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
   CardTable* ct = ctbs->card_table();
-  assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
 
   __ shrptr(obj, CardTable::card_shift);
 
--- a/src/hotspot/cpu/x86/macroAssembler_x86.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/x86/macroAssembler_x86.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -165,6 +165,7 @@
 
   // Support optimal SSE move instructions.
   void movflt(XMMRegister dst, XMMRegister src) {
+    if (dst-> encoding() == src->encoding()) return;
     if (UseXmmRegToRegMoveAll) { movaps(dst, src); return; }
     else                       { movss (dst, src); return; }
   }
@@ -173,6 +174,7 @@
   void movflt(Address dst, XMMRegister src) { movss(dst, src); }
 
   void movdbl(XMMRegister dst, XMMRegister src) {
+    if (dst-> encoding() == src->encoding()) return;
     if (UseXmmRegToRegMoveAll) { movapd(dst, src); return; }
     else                       { movsd (dst, src); return; }
   }
--- a/src/hotspot/cpu/x86/x86.ad	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/x86/x86.ad	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+// Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
 // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 //
 // This code is free software; you can redistribute it and/or modify it
@@ -1450,6 +1450,15 @@
       if (UseSSE < 2)
         ret_value = false;
       break;
+#ifdef _LP64
+    case Op_MaxD:
+    case Op_MaxF:
+    case Op_MinD:
+    case Op_MinF:
+      if (UseAVX < 1) // enabled for AVX only
+        ret_value = false;
+      break;
+#endif
   }
 
   return ret_value;  // Per default match rules are supported.
--- a/src/hotspot/cpu/x86/x86_32.ad	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/x86/x86_32.ad	Thu Mar 14 22:05:02 2019 +0100
@@ -391,7 +391,7 @@
         int format) {
 #ifdef ASSERT
   if (rspec.reloc()->type() == relocInfo::oop_type && d32 != 0 && d32 != (int)Universe::non_oop_word()) {
-    assert(oopDesc::is_oop(cast_to_oop(d32)) && (ScavengeRootsInCode || !Universe::heap()->is_scavengable(cast_to_oop(d32))), "cannot embed scavengable oops in code");
+    assert(oopDesc::is_oop(cast_to_oop(d32)), "cannot embed broken oops in code");
   }
 #endif
   cbuf.relocate(cbuf.insts_mark(), rspec, format);
--- a/src/hotspot/cpu/x86/x86_64.ad	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/cpu/x86/x86_64.ad	Thu Mar 14 22:05:02 2019 +0100
@@ -547,7 +547,7 @@
   if (rspec.reloc()->type() == relocInfo::oop_type &&
       d32 != 0 && d32 != (intptr_t) Universe::non_oop_word()) {
     assert(Universe::heap()->is_in_reserved((address)(intptr_t)d32), "should be real oop");
-    assert(oopDesc::is_oop(cast_to_oop((intptr_t)d32)) && (ScavengeRootsInCode || !Universe::heap()->is_scavengable(cast_to_oop((intptr_t)d32))), "cannot embed scavengable oops in code");
+    assert(oopDesc::is_oop(cast_to_oop((intptr_t)d32)), "cannot embed broken oops in code");
   }
 #endif
   cbuf.relocate(cbuf.insts_mark(), rspec, format);
@@ -574,8 +574,7 @@
   if (rspec.reloc()->type() == relocInfo::oop_type &&
       d64 != 0 && d64 != (int64_t) Universe::non_oop_word()) {
     assert(Universe::heap()->is_in_reserved((address)d64), "should be real oop");
-    assert(oopDesc::is_oop(cast_to_oop(d64)) && (ScavengeRootsInCode || !Universe::heap()->is_scavengable(cast_to_oop(d64))),
-           "cannot embed scavengable oops in code");
+    assert(oopDesc::is_oop(cast_to_oop(d64)), "cannot embed broken oops in code");
   }
 #endif
   cbuf.relocate(cbuf.insts_mark(), rspec, format);
@@ -698,6 +697,87 @@
   __ bind(done);
 }
 
+// Math.min()    # Math.max()
+// --------------------------
+// ucomis[s/d]   #
+// ja   -> b     # a
+// jp   -> NaN   # NaN
+// jb   -> a     # b
+// je            #
+// |-jz -> a | b # a & b
+// |    -> a     #
+void emit_fp_min_max(MacroAssembler& _masm, XMMRegister dst,
+                     XMMRegister a, XMMRegister b,
+                     XMMRegister xmmt, Register rt,
+                     bool min, bool single) {
+
+  Label nan, zero, below, above, done;
+
+  if (single)
+    __ ucomiss(a, b);
+  else
+    __ ucomisd(a, b);
+
+  if (dst->encoding() != (min ? b : a)->encoding())
+    __ jccb(Assembler::above, above); // CF=0 & ZF=0
+  else
+    __ jccb(Assembler::above, done);
+
+  __ jccb(Assembler::parity, nan);  // PF=1
+  __ jccb(Assembler::below, below); // CF=1
+
+  // equal
+  __ vpxor(xmmt, xmmt, xmmt, Assembler::AVX_128bit);
+  if (single) {
+    __ ucomiss(a, xmmt);
+    __ jccb(Assembler::equal, zero);
+
+    __ movflt(dst, a);
+    __ jmp(done);
+  }
+  else {
+    __ ucomisd(a, xmmt);
+    __ jccb(Assembler::equal, zero);
+
+    __ movdbl(dst, a);
+    __ jmp(done);
+  }
+
+  __ bind(zero);
+  if (min)
+    __ vpor(dst, a, b, Assembler::AVX_128bit);
+  else
+    __ vpand(dst, a, b, Assembler::AVX_128bit);
+
+  __ jmp(done);
+
+  __ bind(above);
+  if (single)
+    __ movflt(dst, min ? b : a);
+  else
+    __ movdbl(dst, min ? b : a);
+
+  __ jmp(done);
+
+  __ bind(nan);
+  if (single) {
+    __ movl(rt, 0x7fc00000); // Float.NaN
+    __ movdl(dst, rt);
+  }
+  else {
+    __ mov64(rt, 0x7ff8000000000000L); // Double.NaN
+    __ movdq(dst, rt);
+  }
+  __ jmp(done);
+
+  __ bind(below);
+  if (single)
+    __ movflt(dst, min ? a : b);
+  else
+    __ movdbl(dst, min ? a : b);
+
+  __ bind(done);
+}
 
 //=============================================================================
 const RegMask& MachConstantBaseNode::_out_RegMask = RegMask::Empty;
@@ -3548,6 +3628,15 @@
 %}
 
 // Float register operands
+operand legRegF() %{
+   constraint(ALLOC_IN_RC(float_reg_legacy));
+   match(RegF);
+
+   format %{ %}
+   interface(REG_INTER);
+%}
+
+// Float register operands
 operand vlRegF() %{
    constraint(ALLOC_IN_RC(float_reg_vl));
    match(RegF);
@@ -3566,6 +3655,15 @@
 %}
 
 // Double register operands
+operand legRegD() %{
+   constraint(ALLOC_IN_RC(double_reg_legacy));
+   match(RegD);
+
+   format %{ %}
+   interface(REG_INTER);
+%}
+
+// Double register operands
 operand vlRegD() %{
    constraint(ALLOC_IN_RC(double_reg_vl));
    match(RegD);
@@ -5304,6 +5402,16 @@
 %}
 
 // Load Float
+instruct MoveF2LEG(legRegF dst, regF src) %{
+  match(Set dst src);
+  format %{ "movss $dst,$src\t# if src != dst load float (4 bytes)" %}
+  ins_encode %{
+    __ movflt($dst$$XMMRegister, $src$$XMMRegister);
+  %}
+  ins_pipe( fpu_reg_reg );
+%}
+
+// Load Float
 instruct MoveVL2F(regF dst, vlRegF src) %{
   match(Set dst src);
   format %{ "movss $dst,$src\t! load float (4 bytes)" %}
@@ -5313,6 +5421,16 @@
   ins_pipe( fpu_reg_reg );
 %}
 
+// Load Float
+instruct MoveLEG2F(regF dst, legRegF src) %{
+  match(Set dst src);
+  format %{ "movss $dst,$src\t# if src != dst load float (4 bytes)" %}
+  ins_encode %{
+    __ movflt($dst$$XMMRegister, $src$$XMMRegister);
+  %}
+  ins_pipe( fpu_reg_reg );
+%}
+
 // Load Double
 instruct loadD_partial(regD dst, memory mem)
 %{
@@ -5351,6 +5469,16 @@
 %}
 
 // Load Double
+instruct MoveD2LEG(legRegD dst, regD src) %{
+  match(Set dst src);
+  format %{ "movsd $dst,$src\t# if src != dst load double (8 bytes)" %}
+  ins_encode %{
+    __ movdbl($dst$$XMMRegister, $src$$XMMRegister);
+  %}
+  ins_pipe( fpu_reg_reg );
+%}
+
+// Load Double
 instruct MoveVL2D(regD dst, vlRegD src) %{
   match(Set dst src);
   format %{ "movsd $dst,$src\t! load double (8 bytes)" %}
@@ -5360,6 +5488,167 @@
   ins_pipe( fpu_reg_reg );
 %}
 
+// Load Double
+instruct MoveLEG2D(regD dst, legRegD src) %{
+  match(Set dst src);
+  format %{ "movsd $dst,$src\t# if src != dst load double (8 bytes)" %}
+  ins_encode %{
+    __ movdbl($dst$$XMMRegister, $src$$XMMRegister);
+  %}
+  ins_pipe( fpu_reg_reg );
+%}
+
+// Following pseudo code describes the algorithm for max[FD]:
+// Min algorithm is on similar lines
+//  btmp = (b < +0.0) ? a : b
+//  atmp = (b < +0.0) ? b : a
+//  Tmp  = Max_Float(atmp , btmp)
+//  Res  = (atmp == NaN) ? atmp : Tmp
+
+// max = java.lang.Math.max(float a, float b)
+instruct maxF_reg(legRegF dst, legRegF a, legRegF b, legRegF tmp, legRegF atmp, legRegF btmp) %{
+  predicate(UseAVX > 0 && !n->is_reduction());
+  match(Set dst (MaxF a b));
+  effect(USE a, USE b, TEMP tmp, TEMP atmp, TEMP btmp);
+  format %{
+     "blendvps         $btmp,$b,$a,$b           \n\t"
+     "blendvps         $atmp,$a,$b,$b           \n\t"
+     "vmaxss           $tmp,$atmp,$btmp         \n\t"
+     "cmpps.unordered  $btmp,$atmp,$atmp        \n\t"
+     "blendvps         $dst,$tmp,$atmp,$btmp    \n\t"
+  %}
+  ins_encode %{
+    int vector_len = Assembler::AVX_128bit;
+    __ blendvps($btmp$$XMMRegister, $b$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, vector_len);
+    __ blendvps($atmp$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $b$$XMMRegister, vector_len);
+    __ vmaxss($tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister);
+    __ cmpps($btmp$$XMMRegister, $atmp$$XMMRegister, $atmp$$XMMRegister, Assembler::_false, vector_len);
+    __ blendvps($dst$$XMMRegister, $tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister, vector_len);
+ %}
+  ins_pipe( pipe_slow );
+%}
+
+instruct maxF_reduction_reg(regF dst, regF a, regF b, regF xmmt, rRegI tmp, rFlagsReg cr) %{
+  predicate(UseAVX > 0 && n->is_reduction());
+  match(Set dst (MaxF a b));
+  effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
+
+  format %{ "$dst = max($a, $b)\t# intrinsic (float)" %}
+  ins_encode %{
+    emit_fp_min_max(_masm, $dst$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $xmmt$$XMMRegister, $tmp$$Register,
+                    false /*min*/, true /*single*/);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
+// max = java.lang.Math.max(double a, double b)
+instruct maxD_reg(legRegD dst, legRegD a, legRegD b, legRegD tmp, legRegD atmp, legRegD btmp) %{
+  predicate(UseAVX > 0 && !n->is_reduction());
+  match(Set dst (MaxD a b));
+  effect(USE a, USE b, TEMP atmp, TEMP btmp, TEMP tmp);
+  format %{
+     "blendvpd         $btmp,$b,$a,$b            \n\t"
+     "blendvpd         $atmp,$a,$b,$b            \n\t"
+     "vmaxsd           $tmp,$atmp,$btmp          \n\t"
+     "cmppd.unordered  $btmp,$atmp,$atmp         \n\t"
+     "blendvpd         $dst,$tmp,$atmp,$btmp     \n\t"
+  %}
+  ins_encode %{
+    int vector_len = Assembler::AVX_128bit;
+    __ blendvpd($btmp$$XMMRegister, $b$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, vector_len);
+    __ blendvpd($atmp$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $b$$XMMRegister, vector_len);
+    __ vmaxsd($tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister);
+    __ cmppd($btmp$$XMMRegister, $atmp$$XMMRegister, $atmp$$XMMRegister, Assembler::_false, vector_len);
+    __ blendvpd($dst$$XMMRegister, $tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister, vector_len);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
+instruct maxD_reduction_reg(regD dst, regD a, regD b, regD xmmt, rRegL tmp, rFlagsReg cr) %{
+  predicate(UseAVX > 0 && n->is_reduction());
+  match(Set dst (MaxD a b));
+  effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
+
+  format %{ "$dst = max($a, $b)\t# intrinsic (double)" %}
+  ins_encode %{
+    emit_fp_min_max(_masm, $dst$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $xmmt$$XMMRegister, $tmp$$Register,
+                    false /*min*/, false /*single*/);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
+// min = java.lang.Math.min(float a, float b)
+instruct minF_reg(legRegF dst, legRegF a, legRegF b, legRegF tmp, legRegF atmp, legRegF btmp) %{
+  predicate(UseAVX > 0 && !n->is_reduction());
+  match(Set dst (MinF a b));
+  effect(USE a, USE b, TEMP tmp, TEMP atmp, TEMP btmp);
+  format %{
+     "blendvps         $atmp,$a,$b,$a             \n\t"
+     "blendvps         $btmp,$b,$a,$a             \n\t"
+     "vminss           $tmp,$atmp,$btmp           \n\t"
+     "cmpps.unordered  $btmp,$atmp,$atmp          \n\t"
+     "blendvps         $dst,$tmp,$atmp,$btmp      \n\t"
+  %}
+  ins_encode %{
+    int vector_len = Assembler::AVX_128bit;
+    __ blendvps($atmp$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $a$$XMMRegister, vector_len);
+    __ blendvps($btmp$$XMMRegister, $b$$XMMRegister, $a$$XMMRegister, $a$$XMMRegister, vector_len);
+    __ vminss($tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister);
+    __ cmpps($btmp$$XMMRegister, $atmp$$XMMRegister, $atmp$$XMMRegister, Assembler::_false, vector_len);
+    __ blendvps($dst$$XMMRegister, $tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister, vector_len);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
+instruct minF_reduction_reg(regF dst, regF a, regF b, regF xmmt, rRegI tmp, rFlagsReg cr) %{
+  predicate(UseAVX > 0 && n->is_reduction());
+  match(Set dst (MinF a b));
+  effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
+
+  format %{ "$dst = min($a, $b)\t# intrinsic (float)" %}
+  ins_encode %{
+    emit_fp_min_max(_masm, $dst$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $xmmt$$XMMRegister, $tmp$$Register,
+                    true /*min*/, true /*single*/);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
+// min = java.lang.Math.min(double a, double b)
+instruct minD_reg(legRegD dst, legRegD a, legRegD b, legRegD tmp, legRegD atmp, legRegD btmp) %{
+  predicate(UseAVX > 0 && !n->is_reduction());
+  match(Set dst (MinD a b));
+  effect(USE a, USE b, TEMP tmp, TEMP atmp, TEMP btmp);
+  format %{
+     "blendvpd         $atmp,$a,$b,$a           \n\t"
+     "blendvpd         $btmp,$b,$a,$a           \n\t"
+     "vminsd           $tmp,$atmp,$btmp         \n\t"
+     "cmppd.unordered  $btmp,$atmp,$atmp        \n\t"
+     "blendvpd         $dst,$tmp,$atmp,$btmp    \n\t"
+  %}
+  ins_encode %{
+    int vector_len = Assembler::AVX_128bit;
+    __ blendvpd($atmp$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $a$$XMMRegister, vector_len);
+    __ blendvpd($btmp$$XMMRegister, $b$$XMMRegister, $a$$XMMRegister, $a$$XMMRegister, vector_len);
+    __ vminsd($tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister);
+    __ cmppd($btmp$$XMMRegister, $atmp$$XMMRegister, $atmp$$XMMRegister, Assembler::_false, vector_len);
+    __ blendvpd($dst$$XMMRegister, $tmp$$XMMRegister, $atmp$$XMMRegister, $btmp$$XMMRegister, vector_len);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
+instruct minD_reduction_reg(regD dst, regD a, regD b, regD xmmt, rRegL tmp, rFlagsReg cr) %{
+  predicate(UseAVX > 0 && n->is_reduction());
+  match(Set dst (MinD a b));
+  effect(USE a, USE b, TEMP xmmt, TEMP tmp, KILL cr);
+
+  format %{ "$dst = min($a, $b)\t# intrinsic (double)" %}
+  ins_encode %{
+    emit_fp_min_max(_masm, $dst$$XMMRegister, $a$$XMMRegister, $b$$XMMRegister, $xmmt$$XMMRegister, $tmp$$Register,
+                    true /*min*/, false /*single*/);
+  %}
+  ins_pipe( pipe_slow );
+%}
+
 // Load Effective Address
 instruct leaP8(rRegP dst, indOffset8 mem)
 %{
--- a/src/hotspot/os/aix/os_aix.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/os/aix/os_aix.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -2996,8 +2996,6 @@
 bool os::Aix::signal_handlers_are_installed = false;
 
 // For signal-chaining
-struct sigaction sigact[NSIG];
-sigset_t sigs;
 bool os::Aix::libjsig_is_loaded = false;
 typedef struct sigaction *(*get_signal_t)(int);
 get_signal_t os::Aix::get_signal_action = NULL;
@@ -3011,7 +3009,7 @@
   }
   if (actp == NULL) {
     // Retrieve the preinstalled signal handler from jvm
-    actp = get_preinstalled_handler(sig);
+    actp = os::Posix::get_preinstalled_handler(sig);
   }
 
   return actp;
@@ -3074,19 +3072,6 @@
   return chained;
 }
 
-struct sigaction* os::Aix::get_preinstalled_handler(int sig) {
-  if (sigismember(&sigs, sig)) {
-    return &sigact[sig];
-  }
-  return NULL;
-}
-
-void os::Aix::save_preinstalled_handler(int sig, struct sigaction& oldAct) {
-  assert(sig > 0 && sig < NSIG, "vm signal out of expected range");
-  sigact[sig] = oldAct;
-  sigaddset(&sigs, sig);
-}
-
 // for diagnostic
 int sigflags[NSIG];
 
@@ -3118,7 +3103,7 @@
       return;
     } else if (UseSignalChaining) {
       // save the old handler in jvm
-      save_preinstalled_handler(sig, oldAct);
+      os::Posix::save_preinstalled_handler(sig, oldAct);
       // libjsig also interposes the sigaction() call below and saves the
       // old sigaction on it own.
     } else {
@@ -3174,7 +3159,6 @@
       (*begin_signal_setting)();
     }
 
-    ::sigemptyset(&sigs);
     set_signal_handler(SIGSEGV, true);
     set_signal_handler(SIGPIPE, true);
     set_signal_handler(SIGBUS, true);
--- a/src/hotspot/os/aix/os_aix.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/os/aix/os_aix.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -37,8 +37,6 @@
   static bool libjsig_is_loaded;        // libjsig that interposes sigaction(),
                                         // __sigaction(), signal() is loaded
   static struct sigaction *(*get_signal_action)(int);
-  static struct sigaction *get_preinstalled_handler(int);
-  static void save_preinstalled_handler(int, struct sigaction&);
 
   static void check_signal_handler(int sig);
 
--- a/src/hotspot/os/bsd/os_bsd.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/os/bsd/os_bsd.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -2658,11 +2658,6 @@
 bool os::Bsd::signal_handlers_are_installed = false;
 
 // For signal-chaining
-struct sigaction sigact[NSIG];
-uint32_t sigs = 0;
-#if (32 < NSIG-1)
-#error "Not all signals can be encoded in sigs. Adapt its type!"
-#endif
 bool os::Bsd::libjsig_is_loaded = false;
 typedef struct sigaction *(*get_signal_t)(int);
 get_signal_t os::Bsd::get_signal_action = NULL;
@@ -2676,7 +2671,7 @@
   }
   if (actp == NULL) {
     // Retrieve the preinstalled signal handler from jvm
-    actp = get_preinstalled_handler(sig);
+    actp = os::Posix::get_preinstalled_handler(sig);
   }
 
   return actp;
@@ -2739,19 +2734,6 @@
   return chained;
 }
 
-struct sigaction* os::Bsd::get_preinstalled_handler(int sig) {
-  if ((((uint32_t)1 << (sig-1)) & sigs) != 0) {
-    return &sigact[sig];
-  }
-  return NULL;
-}
-
-void os::Bsd::save_preinstalled_handler(int sig, struct sigaction& oldAct) {
-  assert(sig > 0 && sig < NSIG, "vm signal out of expected range");
-  sigact[sig] = oldAct;
-  sigs |= (uint32_t)1 << (sig-1);
-}
-
 // for diagnostic
 int sigflags[NSIG];
 
@@ -2783,7 +2765,7 @@
       return;
     } else if (UseSignalChaining) {
       // save the old handler in jvm
-      save_preinstalled_handler(sig, oldAct);
+      os::Posix::save_preinstalled_handler(sig, oldAct);
       // libjsig also interposes the sigaction() call below and saves the
       // old sigaction on it own.
     } else {
--- a/src/hotspot/os/bsd/os_bsd.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/os/bsd/os_bsd.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -37,8 +37,6 @@
   static bool libjsig_is_loaded;        // libjsig that interposes sigaction(),
                                         // __sigaction(), signal() is loaded
   static struct sigaction *(*get_signal_action)(int);
-  static struct sigaction *get_preinstalled_handler(int);
-  static void save_preinstalled_handler(int, struct sigaction&);
 
   static void check_signal_handler(int sig);
 
--- a/src/hotspot/os/linux/os_linux.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/os/linux/os_linux.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1856,10 +1856,9 @@
   return true;
 }
 
-#if defined(S390)
+#if defined(S390) || defined(PPC64)
 // keywords_to_match - NULL terminated array of keywords
-static bool print_matching_lines_from_sysinfo_file(outputStream* st, const char* keywords_to_match[]) {
-  const char* filename = "/proc/sysinfo";
+static bool print_matching_lines_from_file(const char* filename, outputStream* st, const char* keywords_to_match[]) {
   char* line = NULL;
   size_t length = 0;
   FILE* fp = fopen(filename, "r");
@@ -2191,9 +2190,29 @@
   // - whole "Box" (CPUs )
   // - z/VM / KVM (VM<nn>); this is not available in an LPAR-only setup
   const char* kw[] = { "LPAR", "CPUs", "VM", NULL };
-
-  if (! print_matching_lines_from_sysinfo_file(st, kw)) {
-    st->print_cr("  </proc/sysinfo Not Available>");
+  const char* info_file = "/proc/sysinfo";
+
+  if (!print_matching_lines_from_file(info_file, st, kw)) {
+    st->print_cr("  <%s Not Available>", info_file);
+  }
+#elif defined(PPC64)
+  const char* info_file = "/proc/ppc64/lparcfg";
+  const char* kw[] = { "system_type=", // qemu indicates PowerKVM
+                       "partition_entitled_capacity=", // entitled processor capacity percentage
+                       "partition_max_entitled_capacity=",
+                       "capacity_weight=", // partition CPU weight
+                       "partition_active_processors=",
+                       "partition_potential_processors=",
+                       "entitled_proc_capacity_available=",
+                       "capped=", // 0 - uncapped, 1 - vcpus capped at entitled processor capacity percentage
+                       "shared_processor_mode=", // (non)dedicated partition
+                       "system_potential_processors=",
+                       "pool=", // CPU-pool number
+                       "pool_capacity=",
+                       "NumLpars=", // on non-KVM machines, NumLpars is not found for full partition mode machines
+                       NULL };
+  if (!print_matching_lines_from_file(info_file, st, kw)) {
+    st->print_cr("  <%s Not Available>", info_file);
   }
 #endif
 }
@@ -4444,11 +4463,6 @@
 bool os::Linux::signal_handlers_are_installed = false;
 
 // For signal-chaining
-struct sigaction sigact[NSIG];
-uint64_t sigs = 0;
-#if (64 < NSIG-1)
-#error "Not all signals can be encoded in sigs. Adapt its type!"
-#endif
 bool os::Linux::libjsig_is_loaded = false;
 typedef struct sigaction *(*get_signal_t)(int);
 get_signal_t os::Linux::get_signal_action = NULL;
@@ -4462,7 +4476,7 @@
   }
   if (actp == NULL) {
     // Retrieve the preinstalled signal handler from jvm
-    actp = get_preinstalled_handler(sig);
+    actp = os::Posix::get_preinstalled_handler(sig);
   }
 
   return actp;
@@ -4526,19 +4540,6 @@
   return chained;
 }
 
-struct sigaction* os::Linux::get_preinstalled_handler(int sig) {
-  if ((((uint64_t)1 << (sig-1)) & sigs) != 0) {
-    return &sigact[sig];
-  }
-  return NULL;
-}
-
-void os::Linux::save_preinstalled_handler(int sig, struct sigaction& oldAct) {
-  assert(sig > 0 && sig < NSIG, "vm signal out of expected range");
-  sigact[sig] = oldAct;
-  sigs |= (uint64_t)1 << (sig-1);
-}
-
 // for diagnostic
 int sigflags[NSIG];
 
@@ -4570,7 +4571,7 @@
       return;
     } else if (UseSignalChaining) {
       // save the old handler in jvm
-      save_preinstalled_handler(sig, oldAct);
+      os::Posix::save_preinstalled_handler(sig, oldAct);
       // libjsig also interposes the sigaction() call below and saves the
       // old sigaction on it own.
     } else {
--- a/src/hotspot/os/linux/os_linux.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/os/linux/os_linux.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -38,8 +38,6 @@
   static bool libjsig_is_loaded;        // libjsig that interposes sigaction(),
                                         // __sigaction(), signal() is loaded
   static struct sigaction *(*get_signal_action)(int);
-  static struct sigaction *get_preinstalled_handler(int);
-  static void save_preinstalled_handler(int, struct sigaction&);
 
   static void check_signal_handler(int sig);
 
--- a/src/hotspot/os/posix/os_posix.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/os/posix/os_posix.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -31,6 +31,7 @@
 #include "runtime/interfaceSupport.inline.hpp"
 #include "services/memTracker.hpp"
 #include "utilities/align.hpp"
+#include "utilities/events.hpp"
 #include "utilities/formatBuffer.hpp"
 #include "utilities/macros.hpp"
 #include "utilities/vmError.hpp"
@@ -1269,6 +1270,15 @@
   return true;
 }
 
+bool os::signal_sent_by_kill(const void* siginfo) {
+  const siginfo_t* const si = (const siginfo_t*)siginfo;
+  return si->si_code == SI_USER || si->si_code == SI_QUEUE
+#ifdef SI_TKILL
+         || si->si_code == SI_TKILL
+#endif
+  ;
+}
+
 void os::print_siginfo(outputStream* os, const void* si0) {
 
   const siginfo_t* const si = (const siginfo_t*) si0;
@@ -1299,7 +1309,7 @@
   // so it depends on the context which member to use. For synchronous error signals,
   // we print si_addr, unless the signal was sent by another process or thread, in
   // which case we print out pid or tid of the sender.
-  if (si->si_code == SI_USER || si->si_code == SI_QUEUE) {
+  if (signal_sent_by_kill(si)) {
     const pid_t pid = si->si_pid;
     os->print(", si_pid: %ld", (long) pid);
     if (IS_VALID_PID(pid)) {
@@ -1325,6 +1335,25 @@
 
 }
 
+bool os::signal_thread(Thread* thread, int sig, const char* reason) {
+  OSThread* osthread = thread->osthread();
+  if (osthread) {
+#if defined (SOLARIS)
+    // Note: we cannot use pthread_kill on Solaris - not because
+    // its missing, but because we do not have the pthread_t id.
+    int status = thr_kill(osthread->thread_id(), sig);
+#else
+    int status = pthread_kill(osthread->pthread_id(), sig);
+#endif
+    if (status == 0) {
+      Events::log(Thread::current(), "sent signal %d to Thread " INTPTR_FORMAT " because %s.",
+                  sig, p2i(thread), reason);
+      return true;
+    }
+  }
+  return false;
+}
+
 int os::Posix::unblock_thread_signal_mask(const sigset_t *set) {
   return pthread_sigmask(SIG_UNBLOCK, set, NULL);
 }
@@ -1644,6 +1673,24 @@
   }
 }
 
+#ifndef SOLARIS
+sigset_t sigs;
+struct sigaction sigact[NSIG];
+
+struct sigaction* os::Posix::get_preinstalled_handler(int sig) {
+  if (sigismember(&sigs, sig)) {
+    return &sigact[sig];
+  }
+  return NULL;
+}
+
+void os::Posix::save_preinstalled_handler(int sig, struct sigaction& oldAct) {
+  assert(sig > 0 && sig < NSIG, "vm signal out of expected range");
+  sigact[sig] = oldAct;
+  sigaddset(&sigs, sig);
+}
+#endif
+
 // Not all POSIX types and API's are available on all notionally "posix"
 // platforms. If we have build-time support then we will check for actual
 // runtime support via dlopen/dlsym lookup. This allows for running on an
@@ -1754,6 +1801,7 @@
                (_pthread_condattr_setclock != NULL ? "" : " not"));
   log_info(os)("Relative timed-wait using pthread_cond_timedwait is associated with %s",
                _use_clock_monotonic_condattr ? "CLOCK_MONOTONIC" : "the default clock");
+  sigemptyset(&sigs);
 #endif // !SOLARIS
 }
 
@@ -1768,6 +1816,7 @@
   log_info(os)("Use of CLOCK_MONOTONIC is not supported");
   log_info(os)("Use of pthread_condattr_setclock is not supported");
   log_info(os)("Relative timed-wait using pthread_cond_timedwait is associated with the default clock");
+  sigemptyset(&sigs);
 #endif // !SOLARIS
 }
 
--- a/src/hotspot/os/posix/os_posix.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/os/posix/os_posix.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -117,6 +117,9 @@
   // effective gid, or if given uid is root.
   static bool matches_effective_uid_and_gid_or_root(uid_t uid, gid_t gid);
 
+  static struct sigaction *get_preinstalled_handler(int);
+  static void save_preinstalled_handler(int, struct sigaction&);
+
   static void print_umask(outputStream* st, mode_t umsk);
 
   static void print_user_info(outputStream* st);
--- a/src/hotspot/os/windows/os_windows.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/os/windows/os_windows.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -923,13 +923,9 @@
 }
 
 jlong os::javaTimeMillis() {
-  if (UseFakeTimers) {
-    return fake_time++;
-  } else {
-    FILETIME wt;
-    GetSystemTimeAsFileTime(&wt);
-    return windows_to_java_time(wt);
-  }
+  FILETIME wt;
+  GetSystemTimeAsFileTime(&wt);
+  return windows_to_java_time(wt);
 }
 
 void os::javaTimeSystemUTC(jlong &seconds, jlong &nanos) {
@@ -1801,6 +1797,11 @@
   st->cr();
 }
 
+bool os::signal_sent_by_kill(const void* siginfo) {
+  // TODO: Is this possible?
+  return false;
+}
+
 void os::print_siginfo(outputStream *st, const void* siginfo) {
   const EXCEPTION_RECORD* const er = (EXCEPTION_RECORD*)siginfo;
   st->print("siginfo:");
@@ -1834,6 +1835,11 @@
   st->cr();
 }
 
+bool os::signal_thread(Thread* thread, int sig, const char* reason) {
+  // TODO: Can we kill thread?
+  return false;
+}
+
 void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) {
   // do nothing
 }
--- a/src/hotspot/os_cpu/aix_ppc/atomic_aix_ppc.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/os_cpu/aix_ppc/atomic_aix_ppc.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2018 SAP SE. All rights reserved.
+ * Copyright (c) 2012, 2019 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -70,22 +70,13 @@
 //                          Store|Load
 //
 
-#define strasm_sync                       "\n  sync    \n"
-#define strasm_lwsync                     "\n  lwsync  \n"
-#define strasm_isync                      "\n  isync   \n"
-#define strasm_release                    strasm_lwsync
-#define strasm_acquire                    strasm_lwsync
-#define strasm_fence                      strasm_sync
-#define strasm_nobarrier                  ""
-#define strasm_nobarrier_clobber_memory   ""
-
 inline void pre_membar(atomic_memory_order order) {
   switch (order) {
     case memory_order_relaxed:
     case memory_order_acquire: break;
     case memory_order_release:
-    case memory_order_acq_rel: __asm__ __volatile__ (strasm_lwsync); break;
-    default /*conservative*/ : __asm__ __volatile__ (strasm_sync); break;
+    case memory_order_acq_rel: __asm__ __volatile__ ("lwsync" : : : "memory"); break;
+    default /*conservative*/ : __asm__ __volatile__ ("sync"   : : : "memory"); break;
   }
 }
 
@@ -94,8 +85,8 @@
     case memory_order_relaxed:
     case memory_order_release: break;
     case memory_order_acquire:
-    case memory_order_acq_rel: __asm__ __volatile__ (strasm_isync); break;
-    default /*conservative*/ : __asm__ __volatile__ (strasm_sync); break;
+    case memory_order_acq_rel: __asm__ __volatile__ ("isync"  : : : "memory"); break;
+    default /*conservative*/ : __asm__ __volatile__ ("sync"   : : : "memory"); break;
   }
 }
 
@@ -408,13 +399,4 @@
   return old_value;
 }
 
-#undef strasm_sync
-#undef strasm_lwsync
-#undef strasm_isync
-#undef strasm_release
-#undef strasm_acquire
-#undef strasm_fence
-#undef strasm_nobarrier
-#undef strasm_nobarrier_clobber_memory
-
 #endif // OS_CPU_AIX_PPC_ATOMIC_AIX_PPC_HPP
--- a/src/hotspot/os_cpu/linux_aarch64/linux_aarch64.ad	Thu Mar 07 11:43:14 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-//
-// Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
-// Copyright (c) 2014, Red Hat Inc. All rights reserved.
-// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-//
-// This code is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License version 2 only, as
-// published by the Free Software Foundation.
-//
-// This code is distributed in the hope that it will be useful, but WITHOUT
-// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-// version 2 for more details (a copy is included in the LICENSE file that
-// accompanied this code).
-//
-// You should have received a copy of the GNU General Public License version
-// 2 along with this work; if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-// or visit www.oracle.com if you need additional information or have any
-// questions.
-//
-//
-
-// AArch64 Linux Architecture Description File
-
-//----------OS-DEPENDENT ENCODING BLOCK----------------------------------------
-// This block specifies the encoding classes used by the compiler to
-// output byte streams.  Encoding classes generate functions which are
-// called by Machine Instruction Nodes in order to generate the bit
-// encoding of the instruction.  Operands specify their base encoding
-// interface with the interface keyword.  There are currently
-// supported four interfaces, REG_INTER, CONST_INTER, MEMORY_INTER, &
-// COND_INTER.  REG_INTER causes an operand to generate a function
-// which returns its register number when queried.  CONST_INTER causes
-// an operand to generate a function which returns the value of the
-// constant when queried.  MEMORY_INTER causes an operand to generate
-// four functions which return the Base Register, the Index Register,
-// the Scale Value, and the Offset Value of the operand when queried.
-// COND_INTER causes an operand to generate six functions which return
-// the encoding code (ie - encoding bits for the instruction)
-// associated with each basic boolean condition for a conditional
-// instruction.  Instructions specify two basic values for encoding.
-// They use the ins_encode keyword to specify their encoding class
-// (which must be one of the class names specified in the encoding
-// block), and they use the opcode keyword to specify, in order, their
-// primary, secondary, and tertiary opcode.  Only the opcode sections
-// which a particular instruction needs for encoding need to be
-// specified.
-encode %{
-  // Build emit functions for each basic byte or larger field in the intel
-  // encoding scheme (opcode, rm, sib, immediate), and call them from C++
-  // code in the enc_class source block.  Emit functions will live in the
-  // main source block for now.  In future, we can generalize this by
-  // adding a syntax that specifies the sizes of fields in an order,
-  // so that the adlc can build the emit functions automagically
-
-  enc_class Java_To_Runtime(method meth) %{
-  %}
-
-%}
-
-
-// Platform dependent source
-
-source %{
-
-%}
--- a/src/hotspot/os_cpu/linux_ppc/atomic_linux_ppc.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/os_cpu/linux_ppc/atomic_linux_ppc.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2018 SAP SE. All rights reserved.
+ * Copyright (c) 2012, 2019 SAP SE. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,6 +30,8 @@
 #error "Atomic currently only implemented for PPC64"
 #endif
 
+#include "utilities/debug.hpp"
+
 // Implementation of class atomic
 
 //
@@ -68,22 +70,13 @@
 //                          Store|Load
 //
 
-#define strasm_sync                       "\n  sync    \n"
-#define strasm_lwsync                     "\n  lwsync  \n"
-#define strasm_isync                      "\n  isync   \n"
-#define strasm_release                    strasm_lwsync
-#define strasm_acquire                    strasm_lwsync
-#define strasm_fence                      strasm_sync
-#define strasm_nobarrier                  ""
-#define strasm_nobarrier_clobber_memory   ""
-
 inline void pre_membar(atomic_memory_order order) {
   switch (order) {
     case memory_order_relaxed:
     case memory_order_acquire: break;
     case memory_order_release:
-    case memory_order_acq_rel: __asm__ __volatile__ (strasm_lwsync); break;
-    default /*conservative*/ : __asm__ __volatile__ (strasm_sync); break;
+    case memory_order_acq_rel: __asm__ __volatile__ ("lwsync" : : : "memory"); break;
+    default /*conservative*/ : __asm__ __volatile__ ("sync"   : : : "memory"); break;
   }
 }
 
@@ -92,8 +85,8 @@
     case memory_order_relaxed:
     case memory_order_release: break;
     case memory_order_acquire:
-    case memory_order_acq_rel: __asm__ __volatile__ (strasm_isync); break;
-    default /*conservative*/ : __asm__ __volatile__ (strasm_sync); break;
+    case memory_order_acq_rel: __asm__ __volatile__ ("isync"  : : : "memory"); break;
+    default /*conservative*/ : __asm__ __volatile__ ("sync"   : : : "memory"); break;
   }
 }
 
@@ -406,13 +399,4 @@
   return old_value;
 }
 
-#undef strasm_sync
-#undef strasm_lwsync
-#undef strasm_isync
-#undef strasm_release
-#undef strasm_acquire
-#undef strasm_fence
-#undef strasm_nobarrier
-#undef strasm_nobarrier_clobber_memory
-
 #endif // OS_CPU_LINUX_PPC_ATOMIC_LINUX_PPC_HPP
--- a/src/hotspot/os_cpu/linux_sparc/linux_sparc.ad	Thu Mar 07 11:43:14 2019 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-//
-// Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
-// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-//
-// This code is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License version 2 only, as
-// published by the Free Software Foundation.
-//
-// This code is distributed in the hope that it will be useful, but WITHOUT
-// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-// version 2 for more details (a copy is included in the LICENSE file that
-// accompanied this code).
-//
-// You should have received a copy of the GNU General Public License version
-// 2 along with this work; if not, write to the Free Software Foundation,
-// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-// or visit www.oracle.com if you need additional information or have any
-// questions.
-//
-
-//
-//
-
-// SPARC Linux Architecture Description File
--- a/src/hotspot/os_cpu/linux_x86/gc/z/zGlobals_linux_x86.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/os_cpu/linux_x86/gc/z/zGlobals_linux_x86.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -74,7 +74,7 @@
 //  * 63-47 Fixed (17-bits, always zero)
 //
 
-const size_t    ZPlatformPageSizeSmallShift    = 21; // 2M
+const size_t    ZPlatformGranuleSizeShift      = 21; // 2M
 
 const size_t    ZPlatformAddressOffsetBits     = 42; // 4TB
 
--- a/src/hotspot/os_cpu/linux_x86/gc/z/zPhysicalMemoryBacking_linux_x86.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/os_cpu/linux_x86/gc/z/zPhysicalMemoryBacking_linux_x86.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,7 @@
 #include "gc/z/zAddress.inline.hpp"
 #include "gc/z/zBackingFile_linux_x86.hpp"
 #include "gc/z/zErrno.hpp"
+#include "gc/z/zGlobals.hpp"
 #include "gc/z/zLargePages.inline.hpp"
 #include "gc/z/zMemory.hpp"
 #include "gc/z/zNUMA.hpp"
@@ -47,23 +48,22 @@
 // Proc file entry for max map mount
 #define ZFILENAME_PROC_MAX_MAP_COUNT         "/proc/sys/vm/max_map_count"
 
-ZPhysicalMemoryBacking::ZPhysicalMemoryBacking(size_t max_capacity, size_t granule_size) :
+ZPhysicalMemoryBacking::ZPhysicalMemoryBacking(size_t max_capacity) :
     _manager(),
-    _file(),
-    _granule_size(granule_size) {
+    _file() {
 
   if (!_file.is_initialized()) {
     return;
   }
 
   // Check and warn if max map count is too low
-  check_max_map_count(max_capacity, granule_size);
+  check_max_map_count(max_capacity);
 
   // Check and warn if available space on filesystem is too low
   check_available_space_on_filesystem(max_capacity);
 }
 
-void ZPhysicalMemoryBacking::check_max_map_count(size_t max_capacity, size_t granule_size) const {
+void ZPhysicalMemoryBacking::check_max_map_count(size_t max_capacity) const {
   const char* const filename = ZFILENAME_PROC_MAX_MAP_COUNT;
   FILE* const file = fopen(filename, "r");
   if (file == NULL) {
@@ -86,7 +86,7 @@
   // However, ZGC tends to create the most mappings and dominate the total count.
   // In the worst cases, ZGC will map each granule three times, i.e. once per heap view.
   // We speculate that we need another 20% to allow for non-ZGC subsystems to map memory.
-  const size_t required_max_map_count = (max_capacity / granule_size) * 3 * 1.2;
+  const size_t required_max_map_count = (max_capacity / ZGranuleSize) * 3 * 1.2;
   if (actual_max_map_count < required_max_map_count) {
     log_warning(gc, init)("***** WARNING! INCORRECT SYSTEM CONFIGURATION DETECTED! *****");
     log_warning(gc, init)("The system limit on number of memory mappings per process might be too low "
@@ -135,7 +135,7 @@
 size_t ZPhysicalMemoryBacking::try_expand(size_t old_capacity, size_t new_capacity) {
   assert(old_capacity < new_capacity, "Invalid old/new capacity");
 
-  const size_t capacity = _file.try_expand(old_capacity, new_capacity - old_capacity, _granule_size);
+  const size_t capacity = _file.try_expand(old_capacity, new_capacity - old_capacity, ZGranuleSize);
   if (capacity > old_capacity) {
     // Add expanded capacity to free list
     _manager.free(old_capacity, capacity - old_capacity);
@@ -145,15 +145,15 @@
 }
 
 ZPhysicalMemory ZPhysicalMemoryBacking::alloc(size_t size) {
-  assert(is_aligned(size, _granule_size), "Invalid size");
+  assert(is_aligned(size, ZGranuleSize), "Invalid size");
 
   ZPhysicalMemory pmem;
 
   // Allocate segments
-  for (size_t allocated = 0; allocated < size; allocated += _granule_size) {
-    const uintptr_t start = _manager.alloc_from_front(_granule_size);
+  for (size_t allocated = 0; allocated < size; allocated += ZGranuleSize) {
+    const uintptr_t start = _manager.alloc_from_front(ZGranuleSize);
     assert(start != UINTPTR_MAX, "Allocation should never fail");
-    pmem.add_segment(ZPhysicalMemorySegment(start, _granule_size));
+    pmem.add_segment(ZPhysicalMemorySegment(start, ZGranuleSize));
   }
 
   return pmem;
--- a/src/hotspot/os_cpu/linux_x86/gc/z/zPhysicalMemoryBacking_linux_x86.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/os_cpu/linux_x86/gc/z/zPhysicalMemoryBacking_linux_x86.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -34,9 +34,8 @@
 private:
   ZMemoryManager _manager;
   ZBackingFile   _file;
-  const size_t   _granule_size;
 
-  void check_max_map_count(size_t max_capacity, size_t granule_size) const;
+  void check_max_map_count(size_t max_capacity) const;
   void check_available_space_on_filesystem(size_t max_capacity) const;
   void map_failed(ZErrno err) const;
 
@@ -46,7 +45,7 @@
   void unmap_view(ZPhysicalMemory pmem, uintptr_t addr) const;
 
 public:
-  ZPhysicalMemoryBacking(size_t max_capacity, size_t granule_size);
+  ZPhysicalMemoryBacking(size_t max_capacity);
 
   bool is_initialized() const;
 
--- a/src/hotspot/share/adlc/formssel.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/adlc/formssel.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -3802,6 +3802,7 @@
     "AndI","AndL",
     "AndV",
     "MaxI","MinI","MaxF","MinF","MaxD","MinD",
+    "MaxV", "MinV",
     "MulI","MulL","MulF","MulD",
     "MulVS","MulVI","MulVL","MulVF","MulVD",
     "OrI","OrL",
@@ -4177,6 +4178,7 @@
     "NegVF","NegVD",
     "SqrtVD","SqrtVF",
     "AndV" ,"XorV" ,"OrV",
+    "MaxV", "MinV",
     "AddReductionVI", "AddReductionVL",
     "AddReductionVF", "AddReductionVD",
     "MulReductionVI", "MulReductionVL",
@@ -4186,6 +4188,7 @@
     "LShiftVB","LShiftVS","LShiftVI","LShiftVL",
     "RShiftVB","RShiftVS","RShiftVI","RShiftVL",
     "URShiftVB","URShiftVS","URShiftVI","URShiftVL",
+    "MaxReductionV", "MinReductionV",
     "ReplicateB","ReplicateS","ReplicateI","ReplicateL","ReplicateF","ReplicateD",
     "LoadVector","StoreVector",
     "FmaVD", "FmaVF","PopCountVI",
--- a/src/hotspot/share/asm/codeBuffer.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/asm/codeBuffer.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1029,26 +1029,10 @@
 
 #ifndef PRODUCT
 
-void CodeSection::dump() {
-  address ptr = start();
-  for (csize_t step; ptr < end(); ptr += step) {
-    step = end() - ptr;
-    if (step > jintSize * 4)  step = jintSize * 4;
-    tty->print(INTPTR_FORMAT ": ", p2i(ptr));
-    while (step > 0) {
-      tty->print(" " PTR32_FORMAT, *(jint*)ptr);
-      ptr += jintSize;
-    }
-    tty->cr();
-  }
-}
-
-
 void CodeSection::decode() {
   Disassembler::decode(start(), end());
 }
 
-
 void CodeBuffer::block_comment(intptr_t offset, const char * comment) {
   _code_strings.add_comment(offset, comment);
 }
@@ -1205,26 +1189,6 @@
   _decode_begin = insts_end();
 }
 
-
-void CodeBuffer::skip_decode() {
-  _decode_begin = insts_end();
-}
-
-
-void CodeBuffer::decode_all() {
-  ttyLocker ttyl;
-  for (int n = 0; n < (int)SECT_LIMIT; n++) {
-    // dump contents of each section
-    CodeSection* cs = code_section(n);
-    tty->print_cr("! %s:", code_section_name(n));
-    if (cs != consts())
-      cs->decode();
-    else
-      cs->dump();
-  }
-}
-
-
 void CodeSection::print(const char* name) {
   csize_t locs_size = locs_end() - locs_start();
   tty->print_cr(" %7s.code = " PTR_FORMAT " : " PTR_FORMAT " : " PTR_FORMAT " (%d of %d)%s",
--- a/src/hotspot/share/asm/codeBuffer.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/asm/codeBuffer.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -240,7 +240,6 @@
 
 #ifndef PRODUCT
   void decode();
-  void dump();
   void print(const char* name);
 #endif //PRODUCT
 };
@@ -649,8 +648,6 @@
   // Printing / Decoding
   // decodes from decode_begin() to code_end() and sets decode_begin to end
   void    decode();
-  void    decode_all();         // decodes all the code
-  void    skip_decode();        // sets decode_begin to code_end();
   void    print();
 #endif
 
--- a/src/hotspot/share/c1/c1_LIRGenerator.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/c1/c1_LIRGenerator.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -53,18 +53,13 @@
 #define PATCHED_ADDR  (max_jint)
 #endif
 
-void PhiResolverState::reset(int max_vregs) {
-  // Initialize array sizes
-  _virtual_operands.at_put_grow(max_vregs - 1, NULL, NULL);
-  _virtual_operands.trunc_to(0);
-  _other_operands.at_put_grow(max_vregs - 1, NULL, NULL);
-  _other_operands.trunc_to(0);
-  _vreg_table.at_put_grow(max_vregs - 1, NULL, NULL);
-  _vreg_table.trunc_to(0);
+void PhiResolverState::reset() {
+  _virtual_operands.clear();
+  _other_operands.clear();
+  _vreg_table.clear();
 }
 
 
-
 //--------------------------------------------------------------
 // PhiResolver
 
@@ -78,13 +73,13 @@
 //  r2 := r3  becomes  r1 := r2
 //  r1 := r2           r2 := r3
 
-PhiResolver::PhiResolver(LIRGenerator* gen, int max_vregs)
+PhiResolver::PhiResolver(LIRGenerator* gen)
  : _gen(gen)
  , _state(gen->resolver_state())
  , _temp(LIR_OprFact::illegalOpr)
 {
   // reinitialize the shared state arrays
-  _state.reset(max_vregs);
+  _state.reset();
 }
 
 
@@ -1021,8 +1016,7 @@
 
     // a block with only one predecessor never has phi functions
     if (sux->number_of_preds() > 1) {
-      int max_phis = cur_state->stack_size() + cur_state->locals_size();
-      PhiResolver resolver(this, _virtual_register_number + max_phis * 2);
+      PhiResolver resolver(this);
 
       ValueStack* sux_state = sux->state();
       Value sux_value;
@@ -1653,7 +1647,7 @@
   decorators |= ACCESS_READ;
   decorators |= ACCESS_WRITE;
   // Atomic operations are SEQ_CST by default
-  decorators |= ((decorators & MO_DECORATOR_MASK) != 0) ? MO_SEQ_CST : 0;
+  decorators |= ((decorators & MO_DECORATOR_MASK) == 0) ? MO_SEQ_CST : 0;
   LIRAccess access(this, decorators, base, offset, type);
   if (access.is_raw()) {
     return _barrier_set->BarrierSetC1::atomic_cmpxchg_at(access, cmp_value, new_value);
@@ -1667,7 +1661,7 @@
   decorators |= ACCESS_READ;
   decorators |= ACCESS_WRITE;
   // Atomic operations are SEQ_CST by default
-  decorators |= ((decorators & MO_DECORATOR_MASK) != 0) ? MO_SEQ_CST : 0;
+  decorators |= ((decorators & MO_DECORATOR_MASK) == 0) ? MO_SEQ_CST : 0;
   LIRAccess access(this, decorators, base, offset, type);
   if (access.is_raw()) {
     return _barrier_set->BarrierSetC1::atomic_xchg_at(access, value);
@@ -1681,7 +1675,7 @@
   decorators |= ACCESS_READ;
   decorators |= ACCESS_WRITE;
   // Atomic operations are SEQ_CST by default
-  decorators |= ((decorators & MO_DECORATOR_MASK) != 0) ? MO_SEQ_CST : 0;
+  decorators |= ((decorators & MO_DECORATOR_MASK) == 0) ? MO_SEQ_CST : 0;
   LIRAccess access(this, decorators, base, offset, type);
   if (access.is_raw()) {
     return _barrier_set->BarrierSetC1::atomic_add_at(access, value);
--- a/src/hotspot/share/c1/c1_LIRGenerator.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/c1/c1_LIRGenerator.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -102,7 +102,7 @@
 
 
 // This is shared state to be used by the PhiResolver so the operand
-// arrays don't have to be reallocated for reach resolution.
+// arrays don't have to be reallocated for each resolution.
 class PhiResolverState: public CompilationResourceObj {
   friend class PhiResolver;
 
@@ -114,7 +114,7 @@
  public:
   PhiResolverState() {}
 
-  void reset(int max_vregs);
+  void reset();
 };
 
 
@@ -146,7 +146,7 @@
   }
 
  public:
-  PhiResolver(LIRGenerator* _lir_gen, int max_vregs);
+  PhiResolver(LIRGenerator* _lir_gen);
   ~PhiResolver();
 
   void move(LIR_Opr src, LIR_Opr dest);
--- a/src/hotspot/share/c1/c1_LinearScan.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/c1/c1_LinearScan.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -81,7 +81,7 @@
  , _max_spills(0)
  , _unused_spill_slot(-1)
  , _intervals(0)   // initialized later with correct length
- , _new_intervals_from_allocation(new IntervalList())
+ , _new_intervals_from_allocation(NULL)
  , _sorted_intervals(NULL)
  , _needs_full_resort(false)
  , _lir_ops(0)     // initialized later with correct length
@@ -287,7 +287,11 @@
 void LinearScan::append_interval(Interval* it) {
   it->set_reg_num(_intervals.length());
   _intervals.append(it);
-  _new_intervals_from_allocation->append(it);
+  IntervalList* new_intervals = _new_intervals_from_allocation;
+  if (new_intervals == NULL) {
+    new_intervals = _new_intervals_from_allocation = new IntervalList();
+  }
+  new_intervals->append(it);
 }
 
 // copy the vreg-flags if an interval is split
@@ -1283,7 +1287,7 @@
 
   // temp ranges for fpu registers are only created when the method has
   // virtual fpu operands. Otherwise no allocation for fpu registers is
-  // perfomed and so the temp ranges would be useless
+  // performed and so the temp ranges would be useless
   if (has_fpu_registers()) {
 #ifdef X86
     if (UseSSE < 2) {
@@ -1616,7 +1620,7 @@
   IntervalArray* old_list = _sorted_intervals;
   IntervalList* new_list = _new_intervals_from_allocation;
   int old_len = old_list->length();
-  int new_len = new_list->length();
+  int new_len = new_list == NULL ? 0 : new_list->length();
 
   if (new_len == 0) {
     // no intervals have been added during allocation, so sorted list is already up to date
@@ -1721,13 +1725,12 @@
 void LinearScan::resolve_collect_mappings(BlockBegin* from_block, BlockBegin* to_block, MoveResolver &move_resolver) {
   DEBUG_ONLY(move_resolver.check_empty());
 
-  const int num_regs = num_virtual_regs();
   const int size = live_set_size();
   const ResourceBitMap live_at_edge = to_block->live_in();
 
   // visit all registers where the live_at_edge bit is set
   for (int r = (int)live_at_edge.get_next_one_offset(0, size); r < size; r = (int)live_at_edge.get_next_one_offset(r + 1, size)) {
-    assert(r < num_regs, "live information set for not exisiting interval");
+    assert(r < num_virtual_regs(), "live information set for not exisiting interval");
     assert(from_block->live_out().at(r) && to_block->live_in().at(r), "interval not live at this edge");
 
     Interval* from_interval = interval_at_block_end(from_block, r);
@@ -4124,7 +4127,7 @@
   _cached_to(-1),
   _cached_opr(LIR_OprFact::illegalOpr),
   _cached_vm_reg(VMRegImpl::Bad()),
-  _split_children(0),
+  _split_children(NULL),
   _canonical_spill_slot(-1),
   _insert_move_when_activated(false),
   _spill_state(noDefinitionFound),
@@ -4149,18 +4152,18 @@
 #ifdef ASSERT
 // consistency check of split-children
 void Interval::check_split_children() {
-  if (_split_children.length() > 0) {
+  if (_split_children != NULL && _split_children->length() > 0) {
     assert(is_split_parent(), "only split parents can have children");
 
-    for (int i = 0; i < _split_children.length(); i++) {
-      Interval* i1 = _split_children.at(i);
+    for (int i = 0; i < _split_children->length(); i++) {
+      Interval* i1 = _split_children->at(i);
 
       assert(i1->split_parent() == this, "not a split child of this interval");
       assert(i1->type() == type(), "must be equal for all split children");
       assert(i1->canonical_spill_slot() == canonical_spill_slot(), "must be equal for all split children");
 
-      for (int j = i + 1; j < _split_children.length(); j++) {
-        Interval* i2 = _split_children.at(j);
+      for (int j = i + 1; j < _split_children->length(); j++) {
+        Interval* i2 = _split_children->at(j);
 
         assert(i1->reg_num() != i2->reg_num(), "same register number");
 
@@ -4187,11 +4190,11 @@
     if (_register_hint->assigned_reg() >= 0 && _register_hint->assigned_reg() < LinearScan::nof_regs) {
       return _register_hint;
 
-    } else if (_register_hint->_split_children.length() > 0) {
+    } else if (_register_hint->_split_children != NULL && _register_hint->_split_children->length() > 0) {
       // search the first split child that has a register assigned
-      int len = _register_hint->_split_children.length();
+      int len = _register_hint->_split_children->length();
       for (int i = 0; i < len; i++) {
-        Interval* cur = _register_hint->_split_children.at(i);
+        Interval* cur = _register_hint->_split_children->at(i);
 
         if (cur->assigned_reg() >= 0 && cur->assigned_reg() < LinearScan::nof_regs) {
           return cur;
@@ -4210,23 +4213,23 @@
   assert(op_id >= 0, "invalid op_id (method can not be called for spill moves)");
 
   Interval* result;
-  if (_split_children.length() == 0) {
+  if (_split_children == NULL || _split_children->length() == 0) {
     result = this;
   } else {
     result = NULL;
-    int len = _split_children.length();
+    int len = _split_children->length();
 
     // in outputMode, the end of the interval (op_id == cur->to()) is not valid
     int to_offset = (mode == LIR_OpVisitState::outputMode ? 0 : 1);
 
     int i;
     for (i = 0; i < len; i++) {
-      Interval* cur = _split_children.at(i);
+      Interval* cur = _split_children->at(i);
       if (cur->from() <= op_id && op_id < cur->to() + to_offset) {
         if (i > 0) {
           // exchange current split child to start of list (faster access for next call)
-          _split_children.at_put(i, _split_children.at(0));
-          _split_children.at_put(0, cur);
+          _split_children->at_put(i, _split_children->at(0));
+          _split_children->at_put(0, cur);
         }
 
         // interval found
@@ -4237,7 +4240,7 @@
 
 #ifdef ASSERT
     for (i = 0; i < len; i++) {
-      Interval* tmp = _split_children.at(i);
+      Interval* tmp = _split_children->at(i);
       if (tmp != result && tmp->from() <= op_id && op_id < tmp->to() + to_offset) {
         tty->print_cr("two valid result intervals found for op_id %d: %d and %d", op_id, result->reg_num(), tmp->reg_num());
         result->print();
@@ -4262,11 +4265,12 @@
   Interval* parent = split_parent();
   Interval* result = NULL;
 
-  int len = parent->_split_children.length();
+  assert(parent->_split_children != NULL, "no split children available");
+  int len = parent->_split_children->length();
   assert(len > 0, "no split children available");
 
   for (int i = len - 1; i >= 0; i--) {
-    Interval* cur = parent->_split_children.at(i);
+    Interval* cur = parent->_split_children->at(i);
     if (cur->to() <= op_id && (result == NULL || result->to() < cur->to())) {
       result = cur;
     }
@@ -4277,29 +4281,6 @@
 }
 
 
-// checks if op_id is covered by any split child
-bool Interval::split_child_covers(int op_id, LIR_OpVisitState::OprMode mode) {
-  assert(is_split_parent(), "can only be called for split parents");
-  assert(op_id >= 0, "invalid op_id (method can not be called for spill moves)");
-
-  if (_split_children.length() == 0) {
-    // simple case if interval was not split
-    return covers(op_id, mode);
-
-  } else {
-    // extended case: check all split children
-    int len = _split_children.length();
-    for (int i = 0; i < len; i++) {
-      Interval* cur = _split_children.at(i);
-      if (cur->covers(op_id, mode)) {
-        return true;
-      }
-    }
-    return false;
-  }
-}
-
-
 // Note: use positions are sorted descending -> first use has highest index
 int Interval::first_usage(IntervalUseKind min_use_kind) const {
   assert(LinearScan::is_virtual_interval(this), "cannot access use positions for fixed intervals");
@@ -4404,13 +4385,13 @@
   result->set_register_hint(parent);
 
   // insert new interval in children-list of parent
-  if (parent->_split_children.length() == 0) {
+  if (parent->_split_children == NULL) {
     assert(is_split_parent(), "list must be initialized at first split");
 
-    parent->_split_children = IntervalList(4);
-    parent->_split_children.append(this);
-  }
-  parent->_split_children.append(result);
+    parent->_split_children = new IntervalList(4);
+    parent->_split_children->append(this);
+  }
+  parent->_split_children->append(result);
 
   return result;
 }
@@ -4655,12 +4636,6 @@
 }
 
 
-// append interval at top of list
-void IntervalWalker::append_unsorted(Interval** list, Interval* interval) {
-  interval->set_next(*list); *list = interval;
-}
-
-
 // append interval in order of current range from()
 void IntervalWalker::append_sorted(Interval** list, Interval* interval) {
   Interval* prev = NULL;
@@ -4964,17 +4939,6 @@
   }
 }
 
-void LinearScanWalker::free_collect_unhandled(IntervalKind kind, Interval* cur) {
-  Interval* list = unhandled_first(kind);
-  while (list != Interval::end()) {
-    set_use_pos(list, list->intersects_at(cur), true);
-    if (kind == fixedKind && cur->to() <= list->from()) {
-      set_use_pos(list, list->from(), true);
-    }
-    list = list->next();
-  }
-}
-
 void LinearScanWalker::spill_exclude_active_fixed() {
   Interval* list = active_first(fixedKind);
   while (list != Interval::end()) {
@@ -4983,14 +4947,6 @@
   }
 }
 
-void LinearScanWalker::spill_block_unhandled_fixed(Interval* cur) {
-  Interval* list = unhandled_first(fixedKind);
-  while (list != Interval::end()) {
-    set_block_pos(list, list->intersects_at(cur));
-    list = list->next();
-  }
-}
-
 void LinearScanWalker::spill_block_inactive_fixed(Interval* cur) {
   Interval* list = inactive_first(fixedKind);
   while (list != Interval::end()) {
@@ -5412,7 +5368,6 @@
   free_exclude_active_any();
   free_collect_inactive_fixed(cur);
   free_collect_inactive_any(cur);
-//  free_collect_unhandled(fixedKind, cur);
   assert(unhandled_first(fixedKind) == Interval::end(), "must not have unhandled fixed intervals because all fixed intervals have a use at position 0");
 
   // _use_pos contains the start of the next interval that has this register assigned
@@ -5445,8 +5400,8 @@
   int interval_to = cur->to();
 
   bool need_split = false;
-  int split_pos = -1;
-  int reg = any_reg;
+  int split_pos;
+  int reg;
   int regHi = any_reg;
 
   if (_adjacent_regs) {
@@ -5500,7 +5455,7 @@
 }
 
 
-int LinearScanWalker::find_locked_reg(int reg_needed_until, int interval_to, int hint_reg, int ignore_reg, bool* need_split) {
+int LinearScanWalker::find_locked_reg(int reg_needed_until, int interval_to, int ignore_reg, bool* need_split) {
   int max_reg = any_reg;
 
   for (int i = _first_reg; i <= _last_reg; i++) {
@@ -5508,7 +5463,7 @@
       // this register must be ignored
 
     } else if (_use_pos[i] > reg_needed_until) {
-      if (max_reg == any_reg || i == hint_reg || (_use_pos[i] > _use_pos[max_reg] && max_reg != hint_reg)) {
+      if (max_reg == any_reg || _use_pos[i] > _use_pos[max_reg]) {
         max_reg = i;
       }
     }
@@ -5521,7 +5476,7 @@
   return max_reg;
 }
 
-int LinearScanWalker::find_locked_double_reg(int reg_needed_until, int interval_to, int hint_reg, bool* need_split) {
+int LinearScanWalker::find_locked_double_reg(int reg_needed_until, int interval_to, bool* need_split) {
   assert((_last_reg - _first_reg + 1) % 2 == 0, "adjust algorithm");
 
   int max_reg = any_reg;
@@ -5571,7 +5526,6 @@
   // collect current usage of registers
   init_use_lists(false);
   spill_exclude_active_fixed();
-//  spill_block_unhandled_fixed(cur);
   assert(unhandled_first(fixedKind) == Interval::end(), "must not have unhandled fixed intervals because all fixed intervals have a use at position 0");
   spill_block_inactive_fixed(cur);
   spill_collect_active_any();
@@ -5601,7 +5555,7 @@
   int reg, regHi;
 
   if (_adjacent_regs) {
-    reg = find_locked_double_reg(reg_needed_until, interval_to, any_reg, &need_split);
+    reg = find_locked_double_reg(reg_needed_until, interval_to, &need_split);
     regHi = reg + 1;
 
     if (reg != any_reg) {
@@ -5609,7 +5563,7 @@
       split_pos = MIN2(_block_pos[reg], _block_pos[regHi]);
     }
   } else {
-    reg = find_locked_reg(reg_needed_until, interval_to, any_reg, cur->assigned_reg(), &need_split);
+    reg = find_locked_reg(reg_needed_until, interval_to, cur->assigned_reg(), &need_split);
     regHi = any_reg;
 
     if (reg != any_reg) {
@@ -5621,7 +5575,7 @@
           regHi = reg;
           reg = cur->assigned_reg();
         } else {
-          regHi = find_locked_reg(reg_needed_until, interval_to, any_reg, reg, &need_split);
+          regHi = find_locked_reg(reg_needed_until, interval_to, reg, &need_split);
           if (regHi != any_reg) {
             use_pos = MIN2(use_pos, _use_pos[regHi]);
             split_pos = MIN2(split_pos, _block_pos[regHi]);
--- a/src/hotspot/share/c1/c1_LinearScan.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/c1/c1_LinearScan.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -34,7 +34,6 @@
 #include "utilities/align.hpp"
 #include "utilities/macros.hpp"
 
-class DebugInfoCache;
 class FpuStackAllocator;
 class IRScopeDebugInfo;
 class Interval;
@@ -190,15 +189,12 @@
   int           interval_count() const           { return _intervals.length(); }
   Interval*     interval_at(int reg_num) const   { return _intervals.at(reg_num); }
 
-  IntervalList* new_intervals_from_allocation() const { return _new_intervals_from_allocation; }
-
   // access to LIR_Ops and Blocks indexed by op_id
   int          max_lir_op_id() const                { assert(_lir_ops.length() > 0, "no operations"); return (_lir_ops.length() - 1) << 1; }
   LIR_Op*      lir_op_with_id(int op_id) const      { assert(op_id >= 0 && op_id <= max_lir_op_id() && op_id % 2 == 0, "op_id out of range or not even"); return _lir_ops.at(op_id >> 1); }
   BlockBegin*  block_of_op_with_id(int op_id) const { assert(_block_of_op.length() > 0 && op_id >= 0 && op_id <= max_lir_op_id() + 1, "op_id out of range"); return _block_of_op.at(op_id >> 1); }
 
   bool is_block_begin(int op_id)                    { return op_id == 0 || block_of_op_with_id(op_id) != block_of_op_with_id(op_id - 1); }
-  bool covers_block_begin(int op_id_1, int op_id_2) { return block_of_op_with_id(op_id_1) != block_of_op_with_id(op_id_2); }
 
   bool has_call(int op_id)                          { assert(op_id % 2 == 0, "must be even"); return _has_call.at(op_id >> 1); }
   bool has_info(int op_id)                          { assert(op_id % 2 == 0, "must be even"); return _has_info.at(op_id >> 1); }
@@ -523,7 +519,7 @@
   VMReg            _cached_vm_reg;
 
   Interval*        _split_parent;           // the original interval where this interval is derived from
-  IntervalList     _split_children;         // list of all intervals that are split off from this interval (only available for split parents)
+  IntervalList*    _split_children;         // list of all intervals that are split off from this interval (only available for split parents)
   Interval*        _current_split_child;    // the current split child that has been active or inactive last (always stored in split parents)
 
   int              _canonical_spill_slot;   // the stack slot where all split parts of this interval are spilled to (always stored in split parents)
@@ -549,7 +545,10 @@
   Range*           first() const                 { return _first; }
   int              from() const                  { return _first->from(); }
   int              to()                          { if (_cached_to == -1) _cached_to = calc_to(); assert(_cached_to == calc_to(), "invalid cached value"); return _cached_to; }
+
+#ifndef PRODUCT
   int              num_use_positions() const     { return _use_pos_and_kinds.length() / 2; }
+#endif
 
   Interval*        next() const                  { return _next; }
   Interval**       next_addr()                   { return &_next; }
@@ -572,7 +571,6 @@
   Interval*        split_parent() const          { assert(_split_parent->is_split_parent(), "must be"); return _split_parent; }
   Interval*        split_child_at_op_id(int op_id, LIR_OpVisitState::OprMode mode);
   Interval*        split_child_before_op_id(int op_id);
-  bool             split_child_covers(int op_id, LIR_OpVisitState::OprMode mode);
   DEBUG_ONLY(void  check_split_children();)
 
   // information stored in split parent, but available for all children
@@ -658,7 +656,6 @@
   Interval** active_first_addr(IntervalKind kind)    { check_bounds(kind); return &_active_first[kind]; }
   Interval** inactive_first_addr(IntervalKind kind)  { check_bounds(kind); return &_inactive_first[kind]; }
 
-  void append_unsorted(Interval** first, Interval* interval);
   void append_sorted(Interval** first, Interval* interval);
   void append_to_unhandled(Interval** list, Interval* interval);
 
@@ -733,9 +730,7 @@
   void free_exclude_active_any();
   void free_collect_inactive_fixed(Interval* cur);
   void free_collect_inactive_any(Interval* cur);
-  void free_collect_unhandled(IntervalKind kind, Interval* cur);
   void spill_exclude_active_fixed();
-  void spill_block_unhandled_fixed(Interval* cur);
   void spill_block_inactive_fixed(Interval* cur);
   void spill_collect_active_any();
   void spill_collect_inactive_any(Interval* cur);
@@ -753,13 +748,12 @@
   int  find_free_double_reg(int reg_needed_until, int interval_to, int hint_reg, bool* need_split);
   bool alloc_free_reg(Interval* cur);
 
-  int  find_locked_reg(int reg_needed_until, int interval_to, int hint_reg, int ignore_reg, bool* need_split);
-  int  find_locked_double_reg(int reg_needed_until, int interval_to, int hint_reg, bool* need_split);
+  int  find_locked_reg(int reg_needed_until, int interval_to, int ignore_reg, bool* need_split);
+  int  find_locked_double_reg(int reg_needed_until, int interval_to, bool* need_split);
   void split_and_spill_intersecting_intervals(int reg, int regHi);
   void alloc_locked_reg(Interval* cur);
 
   bool no_allocation_possible(Interval* cur);
-  void update_phys_reg_range(bool requires_cpu_register);
   void init_vars_for_alloc(Interval* cur);
   bool pd_init_regs_for_alloc(Interval* cur);
 
--- a/src/hotspot/share/c1/c1_Runtime1.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/c1/c1_Runtime1.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1264,7 +1264,7 @@
 
   // If we are patching in a non-perm oop, make sure the nmethod
   // is on the right list.
-  if (ScavengeRootsInCode) {
+  {
     MutexLockerEx ml_code (CodeCache_lock, Mutex::_no_safepoint_check_flag);
     nmethod* nm = CodeCache::find_nmethod(caller_frame.pc());
     guarantee(nm != NULL, "only nmethods can contain non-perm oops");
--- a/src/hotspot/share/c1/c1_ValueStack.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/c1/c1_ValueStack.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -37,7 +37,7 @@
 , _kind(Parsing)
 , _locals(scope->method()->max_locals(), scope->method()->max_locals(), NULL)
 , _stack(scope->method()->max_stack())
-, _locks()
+, _locks(NULL)
 {
   verify();
 }
@@ -50,7 +50,7 @@
   , _kind(kind)
   , _locals()
   , _stack()
-  , _locks(copy_from->locks_size())
+  , _locks(copy_from->locks_size() == 0 ? NULL : new Values(copy_from->locks_size()))
 {
   assert(kind != EmptyExceptionState || !Compilation::current()->env()->should_retain_local_variables(), "need locals");
   if (kind != EmptyExceptionState) {
@@ -70,7 +70,9 @@
     _stack.appendAll(&copy_from->_stack);
   }
 
-  _locks.appendAll(&copy_from->_locks);
+  if (copy_from->locks_size() > 0) {
+    _locks->appendAll(copy_from->_locks);
+  }
 
   verify();
 }
@@ -90,8 +92,11 @@
   for_each_stack_value(this, index, value) {
     if (value->type()->tag() != s->stack_at(index)->type()->tag()) return false;
   }
-  for_each_lock_value(this, index, value) {
-    if (value != s->lock_at(index)) return false;
+  for (int i = 0; i < locks_size(); i++) {
+    value = lock_at(i);
+    if (value != NULL && value != s->lock_at(i)) {
+      return false;
+    }
   }
   return true;
 }
@@ -113,7 +118,7 @@
 
 
 // apply function to all values of a list; factored out from values_do(f)
-void ValueStack::apply(Values list, ValueVisitor* f) {
+void ValueStack::apply(const Values& list, ValueVisitor* f) {
   for (int i = 0; i < list.length(); i++) {
     Value* va = list.adr_at(i);
     Value v0 = *va;
@@ -135,7 +140,9 @@
   for_each_state(state) {
     apply(state->_locals, f);
     apply(state->_stack, f);
-    apply(state->_locks, f);
+    if (state->_locks != NULL) {
+      apply(*state->_locks, f);
+    }
   }
 }
 
@@ -160,7 +167,10 @@
 }
 
 int ValueStack::lock(Value obj) {
-  _locks.push(obj);
+  if (_locks == NULL) {
+    _locks = new Values();
+  }
+  _locks->push(obj);
   int num_locks = total_locks_size();
   scope()->set_min_number_of_locks(num_locks);
   return num_locks - 1;
@@ -168,7 +178,8 @@
 
 
 int ValueStack::unlock() {
-  _locks.pop();
+  assert(locks_size() > 0, "sanity");
+  _locks->pop();
   return total_locks_size();
 }
 
--- a/src/hotspot/share/c1/c1_ValueStack.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/c1/c1_ValueStack.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -47,7 +47,7 @@
 
   Values   _locals;                              // the locals
   Values   _stack;                               // the expression stack
-  Values   _locks;                               // the monitor stack (holding the locked values)
+  Values*  _locks;                               // the monitor stack (holding the locked values)
 
   Value check(ValueTag tag, Value t) {
     assert(tag == t->type()->tag() || tag == objectTag && t->type()->tag() == addressTag, "types must correspond");
@@ -60,7 +60,7 @@
   }
 
   // helper routine
-  static void apply(Values list, ValueVisitor* f);
+  static void apply(const Values& list, ValueVisitor* f);
 
   // for simplified copying
   ValueStack(ValueStack* copy_from, Kind kind, int bci);
@@ -90,9 +90,9 @@
 
   int locals_size() const                        { return _locals.length(); }
   int stack_size() const                         { return _stack.length(); }
-  int locks_size() const                         { return _locks.length(); }
+  int locks_size() const                         { return _locks == NULL ? 0 : _locks->length(); }
   bool stack_is_empty() const                    { return _stack.is_empty(); }
-  bool no_active_locks() const                   { return _locks.is_empty(); }
+  bool no_active_locks() const                   { return _locks == NULL || _locks->is_empty(); }
   int total_locks_size() const;
 
   // locals access
@@ -201,7 +201,7 @@
   // locks access
   int lock  (Value obj);
   int unlock();
-  Value lock_at(int i) const                     { return _locks.at(i); }
+  Value lock_at(int i) const                     { return _locks->at(i); }
 
   // SSA form IR support
   void setup_phi_for_stack(BlockBegin* b, int index);
--- a/src/hotspot/share/ci/bcEscapeAnalyzer.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/ci/bcEscapeAnalyzer.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -1197,38 +1197,36 @@
   }
 }
 
-bool BCEscapeAnalyzer::do_analysis() {
+void BCEscapeAnalyzer::do_analysis() {
   Arena* arena = CURRENT_ENV->arena();
   // identify basic blocks
   _methodBlocks = _method->get_method_blocks();
 
   iterate_blocks(arena);
-  // TEMPORARY
-  return true;
 }
 
 vmIntrinsics::ID BCEscapeAnalyzer::known_intrinsic() {
   vmIntrinsics::ID iid = method()->intrinsic_id();
-
   if (iid == vmIntrinsics::_getClass ||
-      iid == vmIntrinsics::_hashCode)
+      iid == vmIntrinsics::_hashCode) {
     return iid;
-  else
+  } else {
     return vmIntrinsics::_none;
+  }
 }
 
-bool BCEscapeAnalyzer::compute_escape_for_intrinsic(vmIntrinsics::ID iid) {
+void BCEscapeAnalyzer::compute_escape_for_intrinsic(vmIntrinsics::ID iid) {
   switch (iid) {
-  case vmIntrinsics::_getClass:
-    _return_local = false;
-    break;
-  case vmIntrinsics::_hashCode:
-    // initialized state is correct
-    break;
+    case vmIntrinsics::_getClass:
+      _return_local = false;
+      _return_allocated = false;
+      break;
+    case vmIntrinsics::_hashCode:
+      // initialized state is correct
+      break;
   default:
     assert(false, "unexpected intrinsic");
   }
-  return true;
 }
 
 void BCEscapeAnalyzer::initialize() {
@@ -1299,7 +1297,7 @@
   vmIntrinsics::ID iid = known_intrinsic();
 
   // check if method can be analyzed
-  if (iid ==  vmIntrinsics::_none && (method()->is_abstract() || method()->is_native() || !method()->holder()->is_initialized()
+  if (iid == vmIntrinsics::_none && (method()->is_abstract() || method()->is_native() || !method()->holder()->is_initialized()
       || _level > MaxBCEAEstimateLevel
       || method()->code_size() > MaxBCEAEstimateSize)) {
     if (BCEATraceLevel >= 1) {
@@ -1332,8 +1330,6 @@
     tty->print_cr(" (%d bytes)", method()->code_size());
   }
 
-  bool success;
-
   initialize();
 
   // Do not scan method if it has no object parameters and
@@ -1349,9 +1345,9 @@
   }
 
   if (iid != vmIntrinsics::_none)
-    success = compute_escape_for_intrinsic(iid);
+    compute_escape_for_intrinsic(iid);
   else {
-    success = do_analysis();
+    do_analysis();
   }
 
   // don't store interprocedural escape information if it introduces
--- a/src/hotspot/share/ci/bcEscapeAnalyzer.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/ci/bcEscapeAnalyzer.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -101,8 +101,8 @@
   void clear_escape_info();
   void compute_escape_info();
   vmIntrinsics::ID known_intrinsic();
-  bool compute_escape_for_intrinsic(vmIntrinsics::ID iid);
-  bool do_analysis();
+  void compute_escape_for_intrinsic(vmIntrinsics::ID iid);
+  void do_analysis();
 
   void read_escape_info();
 
--- a/src/hotspot/share/ci/ciBaseObject.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/ci/ciBaseObject.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -32,9 +32,8 @@
 //
 // Set the unique identity number of a ciBaseObject.
 void ciBaseObject::set_ident(uint id) {
-  assert((_ident >> FLAG_BITS) == 0, "must only initialize once");
-  assert( id < ((uint)1 << (BitsPerInt-FLAG_BITS)), "id too big");
-  _ident = _ident + (id << FLAG_BITS);
+  assert(_ident == 0, "must only initialize once");
+  _ident = id;
 }
 
 // ------------------------------------------------------------------
@@ -42,7 +41,6 @@
 //
 // Report the unique identity number of a ciBaseObject.
 uint ciBaseObject::ident() {
-  uint id = _ident >> FLAG_BITS;
-  assert(id != 0, "must be initialized");
-  return id;
+  assert(_ident != 0, "must be initialized");
+  return _ident;
 }
--- a/src/hotspot/share/ci/ciBaseObject.hpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/ci/ciBaseObject.hpp	Thu Mar 14 22:05:02 2019 +0100
@@ -54,10 +54,6 @@
 protected:
   uint     _ident;
 
-  enum { FLAG_BITS   = 1 };
-  enum {
-         SCAVENGABLE_FLAG = 1
-       };
 protected:
   ciBaseObject(): _ident(0) {}
 
--- a/src/hotspot/share/ci/ciEnv.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/ci/ciEnv.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -119,6 +119,9 @@
   _system_dictionary_modification_counter = system_dictionary_modification_counter;
   _num_inlined_bytecodes = 0;
   assert(task == NULL || thread->task() == task, "sanity");
+  if (task != NULL) {
+    task->mark_started(os::elapsed_counter());
+  }
   _task = task;
   _log = NULL;
 
--- a/src/hotspot/share/ci/ciObject.cpp	Thu Mar 07 11:43:14 2019 +0100
+++ b/src/hotspot/share/ci/ciObject.cpp	Thu Mar 14 22:05:02 2019 +0100
@@ -59,7 +59,7 @@
     _handle = JNIHandles::make_global(obj);
   }
   _klass = NULL;
-  init_flags_from(o);
+  assert(oopDesc::is_oop_or_null(o), "Checking");
 }
 
 // ------------------------------------------------------------------
@@ -73,7 +73,7 @@
     _handle = JNIHandles::make_global(h);
   }
   _klass = NULL;
-  init_flags_from(h());
+  assert(oopDesc::is_oop_or_null(h()), "Checking");
 }
 
 // ------------------------------------------------------------------
@@ -165,18 +165,10 @@
 // to discourage use of the JNI handle.
 jobject ciObject::constant_encoding() {
   assert(is_null_object() || handle() != NULL, "cannot embed null pointer");
-  assert(can_be_constant(), "oop must be NULL or perm");
   return handle();
 }
 
 // ------------------------------------------------------------------
-// ciObject::can_be_constant
-bool ciObject::can_be_constant() {
-  if (ScavengeRootsInCode >= 1)  return true;  // now everybody can encode as a constant
-  return handle() == NULL;
-}
-
-// ------------------------------------------------------------------
 // ciObject::should_be_constant()
 bool ciObject::should_be_constant() {
   if (ScavengeRootsInCode >= 2)  return true;  // force everybody to be a constant
@@ -193,7 +185,6 @@
     }
   if (klass()->is_subclass_of(env->MethodHandle_klass()) ||
       klass()->is_subclass_of(env->CallSite_klass())) {
-    assert(ScavengeRootsInCode >= 1, "must be");
     // We want to treat these aggressively.
     return true;
   }
@@ -202,18 +193,6 @@
 }
 
 // ------------------------------------------------------------------
-// ciObject::should_be_constant()
-void ciObject::init_flags_from(oop x) {
-  int flags = 0;
-  if (x != NULL) {
-    assert(Universe::heap()->is_in_reserved(x), "must be");
-    if (Universe::heap()->is_scavengable(x))
-      flags |= SCAVENGABLE_FLAG;