This commit is contained in:
Prasanta Sadhukhan 2019-01-07 11:02:11 +05:30
commit f6fcaf0f7d
1139 changed files with 23321 additions and 126709 deletions

View File

@ -526,3 +526,8 @@ dc1f9dec2018a37fedba47d8a2aedef99faaec64 jdk-12+19
f8fb0c86f2b3d24294d39c5685a628e1beb14ba7 jdk-12+21
732bec44c89e8b93a38296bf690f97b7230c5b6d jdk-12+22
eef755718cb24813031a842bbfc716a6cea18e9a jdk-12+23
cc4098b3bc10d1c390384289025fea7b0d4b9e93 jdk-13+0
7d4397b43fa305806160785a4c7210600d59581a jdk-12+24
11033c4ada542f9c9a873314b6ecf60af19e8256 jdk-13+1
7496df94b3b79f3da53925d2d137317715f11d97 jdk-12+25
50677f43ac3df9a8684222b8893543c60f3aa0bd jdk-13+2

View File

@ -145,7 +145,7 @@
<li><p>Do not check out the source code in a path which contains spaces. Chances are the build will not work. This is most likely to be an issue on Windows systems.</p></li>
<li><p>Do not check out the source code in a path which has a very long name or is nested many levels deep. Chances are you will hit an OS limitation during the build.</p></li>
<li><p>Put the source code on a local disk, not a network share. If possible, use an SSD. The build process is very disk intensive, and having slow disk access will significantly increase build times. If you need to use a network share for the source code, see below for suggestions on how to keep the build artifacts on a local disk.</p></li>
<li><p>On Windows, extra care must be taken to make sure the <a href="#cygwin">Cygwin</a> environment is consistent. It is recommended that you follow this procedure:</p>
<li><p>On Windows, if using <a href="#cygwin">Cygwin</a>, extra care must be taken to make sure the environment is consistent. It is recommended that you follow this procedure:</p>
<ul>
<li><p>Create the directory that is going to contain the top directory of the JDK clone by using the <code>mkdir</code> command in the Cygwin bash shell. That is, do <em>not</em> create it using Windows Explorer. This will ensure that it will have proper Cygwin attributes, and that it's children will inherit those attributes.</p></li>
<li><p>Do not put the JDK clone in a path under your Cygwin home directory. This is especially important if your user name contains spaces and/or mixed upper and lower case letters.</p></li>
@ -201,12 +201,12 @@
<h3 id="windows">Windows</h3>
<p>Windows XP is not a supported platform, but all newer Windows should be able to build the JDK.</p>
<p>On Windows, it is important that you pay attention to the instructions in the <a href="#special-considerations">Special Considerations</a>.</p>
<p>Windows is the only non-POSIX OS supported by the JDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. Currently, the only supported such layer is Cygwin. (Msys is no longer supported due to a too old bash; msys2 and the new Windows Subsystem for Linux (WSL) would likely be possible to support in a future version but that would require effort to implement.)</p>
<p>Windows is the only non-POSIX OS supported by the JDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. Currently, the only supported such layers are Cygwin and Windows Subsystem for Linux (WSL). (Msys is no longer supported due to a too old bash; msys2 would likely be possible to support in a future version but that would require effort to implement.)</p>
<p>Internally in the build system, all paths are represented as Unix-style paths, e.g. <code>/cygdrive/c/hg/jdk9/Makefile</code> rather than <code>C:\hg\jdk9\Makefile</code>. This rule also applies to input to the build system, e.g. in arguments to <code>configure</code>. So, use <code>--with-msvcr-dll=/cygdrive/c/msvcr100.dll</code> rather than <code>--with-msvcr-dll=c:\msvcr100.dll</code>. For details on this conversion, see the section on <a href="#fixpath">Fixpath</a>.</p>
<h4 id="cygwin">Cygwin</h4>
<p>A functioning <a href="http://www.cygwin.com/">Cygwin</a> environment is thus required for building the JDK on Windows. If you have a 64-bit OS, we strongly recommend using the 64-bit version of Cygwin.</p>
<p>A functioning <a href="http://www.cygwin.com/">Cygwin</a> environment is required for building the JDK on Windows. If you have a 64-bit OS, we strongly recommend using the 64-bit version of Cygwin.</p>
<p><strong>Note:</strong> Cygwin has a model of continuously updating all packages without any easy way to install or revert to a specific version of a package. This means that whenever you add or update a package in Cygwin, you might (inadvertently) update tools that are used by the JDK build process, and that can cause unexpected build problems.</p>
<p>The JDK requires GNU Make 4.0 or greater on Windows. This is usually not a problem, since Cygwin currently only distributes GNU Make at a version above 4.0.</p>
<p>The JDK requires GNU Make 4.0 or greater in Cygwin. This is usually not a problem, since Cygwin currently only distributes GNU Make at a version above 4.0.</p>
<p>Apart from the basic Cygwin installation, the following packages must also be installed:</p>
<ul>
<li><code>autoconf</code></li>
@ -217,6 +217,11 @@
<p>Often, you can install these packages using the following command line:</p>
<pre><code>&lt;path to Cygwin setup&gt;/setup-x86_64 -q -P autoconf -P make -P unzip -P zip</code></pre>
<p>Unfortunately, Cygwin can be unreliable in certain circumstances. If you experience build tool crashes or strange issues when building on Windows, please check the Cygwin FAQ on the <a href="https://cygwin.com/faq/faq.html#faq.using.bloda">&quot;BLODA&quot; list</a> and the section on <a href="https://cygwin.com/faq/faq.html#faq.using.fixing-fork-failures">fork() failures</a>.</p>
<h4 id="windows-subsystem-for-linux-wsl">Windows Subsystem for Linux (WSL)</h4>
<p>Windows 10 1809 or newer is supported due to a dependency on the wslpath utility and support for environment variable sharing through WSLENV. Version 1803 can work but intermittent build failures have been observed.</p>
<p>It's possible to build both Windows and Linux binaries from WSL. To build Windows binaries, you must use a Windows boot JDK (located in a Windows-accessible directory). To build Linux binaries, you must use a Linux boot JDK. The default behavior is to build for Windows. To build for Linux, pass <code>--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu</code> to <code>configure</code>.</p>
<p>If building Windows binaries, the source code must be located in a Windows- accessible directory. This is because Windows executables (such as Visual Studio and the boot JDK) must be able to access the source code. Also, the drive where the source is stored must be mounted as case-insensitive by changing either /etc/fstab or /etc/wsl.conf in WSL. Individual directories may be corrected using the fsutil tool in case the source was cloned before changing the mount options.</p>
<p>Note that while it's possible to build on WSL, testing is still not fully supported.</p>
<h3 id="solaris">Solaris</h3>
<p>See <code>make/devkit/solaris11.1-package-list.txt</code> for a list of recommended packages to install when building on Solaris. The versions specified in this list is the versions used by the daily builds at Oracle, and is likely to work properly.</p>
<p>Older versions of Solaris shipped a broken version of <code>objcopy</code>. At least version 2.21.1 is needed, which is provided by Solaris 11 Update 1. Objcopy is needed if you want to have external debug symbols. Please make sure you are using at least version 2.21.1 of objcopy, or that you disable external debug symbols.</p>

View File

@ -75,8 +75,8 @@ on where and how to check out the source code.
network share for the source code, see below for suggestions on how to keep
the build artifacts on a local disk.
* On Windows, extra care must be taken to make sure the [Cygwin](#cygwin)
environment is consistent. It is recommended that you follow this
* On Windows, if using [Cygwin](#cygwin), extra care must be taken to make sure
the environment is consistent. It is recommended that you follow this
procedure:
* Create the directory that is going to contain the top directory of the
@ -174,10 +174,10 @@ On Windows, it is important that you pay attention to the instructions in the
Windows is the only non-POSIX OS supported by the JDK, and as such, requires
some extra care. A POSIX support layer is required to build on Windows.
Currently, the only supported such layer is Cygwin. (Msys is no longer
supported due to a too old bash; msys2 and the new Windows Subsystem for Linux
(WSL) would likely be possible to support in a future version but that would
require effort to implement.)
Currently, the only supported such layers are Cygwin and Windows Subsystem for
Linux (WSL). (Msys is no longer supported due to a too old bash; msys2 would
likely be possible to support in a future version but that would require effort
to implement.)
Internally in the build system, all paths are represented as Unix-style paths,
e.g. `/cygdrive/c/hg/jdk9/Makefile` rather than `C:\hg\jdk9\Makefile`. This
@ -188,7 +188,7 @@ on [Fixpath](#fixpath).
#### Cygwin
A functioning [Cygwin](http://www.cygwin.com/) environment is thus required for
A functioning [Cygwin](http://www.cygwin.com/) environment is required for
building the JDK on Windows. If you have a 64-bit OS, we strongly recommend
using the 64-bit version of Cygwin.
@ -198,7 +198,7 @@ that whenever you add or update a package in Cygwin, you might (inadvertently)
update tools that are used by the JDK build process, and that can cause
unexpected build problems.
The JDK requires GNU Make 4.0 or greater on Windows. This is usually not a
The JDK requires GNU Make 4.0 or greater in Cygwin. This is usually not a
problem, since Cygwin currently only distributes GNU Make at a version above
4.0.
@ -221,6 +221,30 @@ please check the Cygwin FAQ on the ["BLODA" list](
https://cygwin.com/faq/faq.html#faq.using.bloda) and the section on [fork()
failures](https://cygwin.com/faq/faq.html#faq.using.fixing-fork-failures).
#### Windows Subsystem for Linux (WSL)
Windows 10 1809 or newer is supported due to a dependency on the wslpath utility
and support for environment variable sharing through WSLENV. Version 1803 can
work but intermittent build failures have been observed.
It's possible to build both Windows and Linux binaries from WSL. To build
Windows binaries, you must use a Windows boot JDK (located in a
Windows-accessible directory). To build Linux binaries, you must use a Linux
boot JDK. The default behavior is to build for Windows. To build for Linux, pass
`--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu` to
`configure`.
If building Windows binaries, the source code must be located in a Windows-
accessible directory. This is because Windows executables (such as Visual Studio
and the boot JDK) must be able to access the source code. Also, the drive where
the source is stored must be mounted as case-insensitive by changing either
/etc/fstab or /etc/wsl.conf in WSL. Individual directories may be corrected
using the fsutil tool in case the source was cloned before changing the mount
options.
Note that while it's possible to build on WSL, testing is still not fully
supported.
### Solaris
See `make/devkit/solaris11.1-package-list.txt` for a list of recommended

View File

@ -168,14 +168,6 @@ JAVADOC_TOP := \
font-family: DejaVu Sans, Arial, Helvetica, sans-serif; \
font-weight: normal;">$(DRAFT_TEXT)</div>
JDK_INDEX_CONTENT := \
<!DOCTYPE html> \
<html lang="en"> \
<head> \
<meta http-equiv="refresh" content="0;url=api/index.html"> \
</head> \
</html>
################################################################################
# JDK javadoc titles/text snippets
@ -485,14 +477,7 @@ $(eval $(call SetupApiDocsGeneration, REFERENCE_API, \
################################################################################
JDK_INDEX_HTML := $(DOCS_OUTPUTDIR)/index.html
$(JDK_INDEX_HTML):
$(ECHO) '$(JDK_INDEX_CONTENT)' > $@
JDK_INDEX_TARGETS += $(JDK_INDEX_HTML)
# Copy the global resources
# Copy the global resources, including the top-level redirect index.html
GLOBAL_SPECS_RESOURCES_DIR := $(TOPDIR)/make/data/docs-resources/
$(eval $(call SetupCopyFiles, COPY_GLOBAL_RESOURCES, \
SRC := $(GLOBAL_SPECS_RESOURCES_DIR), \
@ -532,9 +517,9 @@ $(foreach m, $(ALL_MODULES), \
) \
)
ifeq ($(ENABLE_FULL_DOCS), true)
ifeq ($(ENABLE_PANDOC), true)
# For all markdown files in $module/share/specs directories, convert them to
# html.
# html, if we have pandoc (otherwise we'll just skip this).
GLOBAL_SPECS_DEFAULT_CSS_FILE := $(DOCS_OUTPUTDIR)/resources/jdk-default.css

View File

@ -36,7 +36,7 @@ JRE_TARGETS :=
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, Images-pre.gmk))
############################################################################
################################################################################
# All modules for the current target platform.
ALL_MODULES := $(call FindAllModules)
@ -57,7 +57,7 @@ BASE_RELEASE_FILE := $(JDK_OUTPUTDIR)/release
JMODS := $(wildcard $(IMAGES_OUTPUTDIR)/jmods/*.jmod)
# Use this file inside the image as target for make rule
JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX)
JIMAGE_TARGET_FILE := release
JLINK_ORDER_RESOURCES := **module-info.class
JLINK_JLI_CLASSES :=
@ -99,7 +99,8 @@ $(JDK_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
)
ifeq ($(BUILD_CDS_ARCHIVE), true)
$(call LogWarn, Creating CDS archive for jdk image)
$(JDK_IMAGE_DIR)/bin/java -Xshare:dump -Xmx128M -Xms128M $(LOG_INFO)
$(FIXPATH) $(JDK_IMAGE_DIR)/bin/java \
-Xshare:dump -Xmx128M -Xms128M $(LOG_INFO)
endif
$(TOUCH) $@
@ -114,7 +115,8 @@ $(JRE_IMAGE_DIR)/$(JIMAGE_TARGET_FILE): $(JMODS) \
)
ifeq ($(BUILD_CDS_ARCHIVE), true)
$(call LogWarn, Creating CDS archive for jre image)
$(JRE_IMAGE_DIR)/bin/java -Xshare:dump -Xmx128M -Xms128M $(LOG_INFO)
$(FIXPATH) $(JRE_IMAGE_DIR)/bin/java \
-Xshare:dump -Xmx128M -Xms128M $(LOG_INFO)
endif
$(TOUCH) $@

View File

@ -862,8 +862,6 @@ else
docs-jdk-specs: $(JVM_DOCS_TARGETS) jdk.jdi-gensrc \
docs-jdk-index
docs-jdk-index: exploded-image buildtools-modules
docs-zip: docs-jdk
# Tests

View File

@ -223,6 +223,8 @@ AC_DEFUN([BASIC_FIXUP_PATH],
BASIC_FIXUP_PATH_CYGWIN($1)
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
BASIC_FIXUP_PATH_MSYS($1)
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
BASIC_FIXUP_PATH_WSL($1)
else
# We're on a unix platform. Hooray! :)
path="[$]$1"
@ -270,6 +272,8 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE],
BASIC_FIXUP_EXECUTABLE_CYGWIN($1)
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
BASIC_FIXUP_EXECUTABLE_MSYS($1)
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
BASIC_FIXUP_EXECUTABLE_WSL($1)
else
# We're on a unix platform. Hooray! :)
# First separate the path from the arguments. This will split at the first
@ -607,10 +611,21 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
# These are not required on all platforms
BASIC_PATH_PROGS(CYGPATH, cygpath)
BASIC_PATH_PROGS(WSLPATH, wslpath)
BASIC_PATH_PROGS(DF, df)
BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
BASIC_PATH_PROGS(NICE, nice)
BASIC_PATH_PROGS(PANDOC, pandoc)
if test -n "$PANDOC"; then
ENABLE_PANDOC="true"
else
ENABLE_PANDOC="false"
fi
AC_SUBST(ENABLE_PANDOC)
BASIC_PATH_PROGS(LSB_RELEASE, lsb_release)
BASIC_PATH_PROGS(CMD, [cmd.exe /mnt/c/Windows/System32/cmd.exe])
])
###############################################################################
@ -631,11 +646,14 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
PATH_SEP=";"
EXE_SUFFIX=".exe"
BASIC_CHECK_PATHS_WINDOWS
else
PATH_SEP=":"
EXE_SUFFIX=""
fi
AC_SUBST(PATH_SEP)
AC_SUBST(EXE_SUFFIX)
# We get the top-level directory from the supporting wrappers.
AC_MSG_CHECKING([for top-level directory])
@ -980,6 +998,8 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
MAKE_EXPECTED_ENV='cygwin'
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
MAKE_EXPECTED_ENV='msys'
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
MAKE_EXPECTED_ENV='x86_64-pc-linux-gnu'
else
AC_MSG_ERROR([Unknown Windows environment])
fi
@ -1267,7 +1287,18 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
if $DF $DF_LOCAL_ONLY_OPTION $1 > /dev/null 2>&1; then
$2
else
$3
# In WSL, local Windows drives are considered remote by df, but we are
# required to build into a directory accessible from windows, so consider
# them local here.
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
if $DF $1 | $GREP -q "^[[A-Z]]:"; then
$2
else
$3
fi
else
$3
fi
fi
fi
])

View File

@ -32,6 +32,13 @@ AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_UNIX_PATH],
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
$1="$unix_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
# wslpath does not check the input, only call if an actual windows path was
# given.
if $ECHO "$windows_path" | $GREP -q ["^[a-zA-Z]:[\\\\/]"]; then
unix_path=`$WSLPATH -u "$windows_path"`
$1="$unix_path"
fi
fi
])
@ -44,6 +51,9 @@ AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH],
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
windows_path=`cmd //c echo $unix_path`
$1="$windows_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
windows_path=`$WSLPATH -m "$unix_path"`
$1="$windows_path"
fi
])
@ -100,6 +110,31 @@ AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS],
fi
])
# Helper function which possibly converts a path using DOS-style short mode.
# If so, the updated path is stored in $new_path.
# $1: The path to check
AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_WSL],
[
input_path="$1"
# Check if we need to convert this using DOS-style short mode. If the path
# contains just simple characters, use it. Otherwise (spaces, weird characters),
# take no chances and rewrite it.
# Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
has_forbidden_chars=`$ECHO "$input_path" | $GREP [[^-_/:a-zA-Z0-9\\.]]`
if test "x$has_forbidden_chars" != x; then
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
TOPDIR_windows="$TOPDIR"
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([TOPDIR_windows])
# First convert to Windows path to make input valid for cmd
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([input_path])
new_path=`$CMD /c $TOPDIR_windows/make/scripts/windowsShortName.bat "$input_path" \
| $SED -e 's|\r||g' \
| $TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Rewrite back to unix style
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([new_path])
fi
])
# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
# and could probably be heavily simplified. However, all changes in this
# area tend to need lot of testing in different scenarios, and in lack of
@ -157,6 +192,23 @@ AC_DEFUN([BASIC_FIXUP_PATH_MSYS],
all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
])
AC_DEFUN([BASIC_FIXUP_PATH_WSL],
[
# Input might be given as Windows format, start by converting to
# unix format.
new_path="[$]$1"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([new_path])
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
BASIC_MAKE_WINDOWS_SPACE_SAFE_WSL([$new_path])
if test "x$path" != "x$new_path"; then
$1="$new_path"
AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
fi
])
AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
[
# First separate the path from the arguments. This will split at the first
@ -305,6 +357,79 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
fi
])
AC_DEFUN([BASIC_FIXUP_EXECUTABLE_WSL],
[
# First separate the path from the arguments. This will split at the first
# space.
complete="[$]$1"
path="${complete%% *}"
tmp="$complete EOL"
arguments="${tmp#* }"
# Input might be given as Windows format, start by converting to
# unix format.
new_path="$path"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([new_path])
# Now try to locate executable using which
new_path_bak="$new_path"
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not considered executable in WSL
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path="$new_path_back"
fi
if test "x$new_path" = x; then
# Oops. Which didn't find the executable.
# The splitting of arguments from the executable at a space might have been incorrect,
# since paths with space are more likely in Windows. Give it another try with the whole
# argument.
path="$complete"
arguments="EOL"
new_path="$path"
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([new_path])
new_path_bak="$new_path"
new_path=`$WHICH "$new_path" 2> /dev/null`
# bat and cmd files are not considered executable in WSL
if test "x$new_path" = x \
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
new_path="$new_path_bak"
fi
if test "x$new_path" = x; then
# It's still not found. Now this is an unrecoverable error.
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
has_space=`$ECHO "$complete" | $GREP " "`
if test "x$has_space" != x; then
AC_MSG_NOTICE([You might be mixing spaces in the path and extra arguments, which is not allowed.])
fi
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
fi
# In WSL, suffixes must be present for Windows executables
if test ! -f "$new_path"; then
# Try adding .exe or .cmd
if test -f "${new_path}.exe"; then
input_to_shortpath="${new_path}.exe"
elif test -f "${new_path}.cmd"; then
input_to_shortpath="${new_path}.cmd"
else
AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.])
AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found])
AC_MSG_ERROR([Cannot locate the the path of $1])
fi
else
input_to_shortpath="$new_path"
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
new_path="$input_to_shortpath"
BASIC_MAKE_WINDOWS_SPACE_SAFE_WSL([$input_to_shortpath])
])
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
[
@ -353,8 +478,28 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(MSYS_ROOT_PATH)
AC_MSG_RESULT([$MSYS_ROOT_PATH])
WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
AC_MSG_CHECKING([Windows version])
# m4 replaces [ and ] so we use @<:@ and @:>@ instead
WINDOWS_VERSION=`$CMD /c ver.exe | $EGREP -o '(@<:@0-9@:>@+\.)+@<:@0-9@:>@+'`
AC_MSG_RESULT([$WINDOWS_VERSION])
AC_MSG_CHECKING([WSL kernel version])
WSL_KERNEL_VERSION=`$UNAME -v`
AC_MSG_RESULT([$WSL_KERNEL_VERSION])
AC_MSG_CHECKING([WSL kernel release])
WSL_KERNEL_RELEASE=`$UNAME -r`
AC_MSG_RESULT([$WSL_KERNEL_RELEASE])
AC_MSG_CHECKING([WSL distribution])
WSL_DISTRIBUTION=`$LSB_RELEASE -d | sed 's/Description:\t//'`
AC_MSG_RESULT([$WSL_DISTRIBUTION])
WINDOWS_ENV_VENDOR='WSL'
WINDOWS_ENV_VERSION="$WSL_DISTRIBUTION $WSL_KERNEL_VERSION $WSL_KERNEL_RELEASE (on Windows build $WINDOWS_VERSION)"
else
AC_MSG_ERROR([Unknown Windows environment. Neither cygwin nor msys was detected.])
AC_MSG_ERROR([Unknown Windows environment. Neither cygwin, msys, nor wsl was detected.])
fi
# Test if windows or unix (cygwin/msys) find is first in path.
@ -395,6 +540,8 @@ AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
| tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'`
FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.wsl; then
FIXPATH="$FIXPATH_BIN -w"
fi
FIXPATH_SRC_W="$FIXPATH_SRC"
FIXPATH_BIN_W="$FIXPATH_BIN"
@ -412,6 +559,17 @@ AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
AC_MSG_ERROR([Could not create $FIXPATH_BIN])
fi
AC_MSG_RESULT([yes])
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
OLD_WSLENV="$WSLENV"
WSLENV=`$ECHO $WSLENV | $SED 's/PATH\/l://'`
BASIC_APPEND_TO_PATH(WSLENV, "FIXPATH_PATH")
export WSLENV
export FIXPATH_PATH=$VS_PATH_WINDOWS
AC_MSG_NOTICE([FIXPATH_PATH is $FIXPATH_PATH])
AC_MSG_NOTICE([Rewriting WSLENV from $OLD_WSLENV to $WSLENV])
fi
AC_MSG_CHECKING([if fixpath.exe works])
cd $FIXPATH_DIR
$FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \

View File

@ -63,18 +63,18 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
# If previous step claimed to have found a JDK, check it to see if it seems to be valid.
if test "x$BOOT_JDK_FOUND" = xmaybe; then
# Do we have a bin/java?
if test ! -x "$BOOT_JDK/bin/java"; then
if test ! -x "$BOOT_JDK/bin/java$EXE_SUFFIX"; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring])
BOOT_JDK_FOUND=no
else
# Do we have a bin/javac?
if test ! -x "$BOOT_JDK/bin/javac"; then
if test ! -x "$BOOT_JDK/bin/javac$EXE_SUFFIX"; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring])
AC_MSG_NOTICE([(This might be an JRE instead of an JDK)])
BOOT_JDK_FOUND=no
else
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" $USER_BOOT_JDK_OPTIONS -version 2>&1 | $HEAD -n 1`
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java$EXE_SUFFIX" $USER_BOOT_JDK_OPTIONS -version 2>&1 | $HEAD -n 1`
if [ [[ "$BOOT_JDK_VERSION" =~ "Picked up" ]] ]; then
AC_MSG_NOTICE([You have _JAVA_OPTIONS or JAVA_TOOL_OPTIONS set. This can mess up the build. Please use --with-boot-jdk-jvmargs instead.])
AC_MSG_NOTICE([Java reports: "$BOOT_JDK_VERSION".])
@ -101,7 +101,7 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
AC_MSG_CHECKING([for Boot JDK])
AC_MSG_RESULT([$BOOT_JDK])
AC_MSG_CHECKING([Boot JDK version])
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" $USER_BOOT_JDK_OPTIONS -version 2>&1 | $TR '\n\r' ' '`
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java$EXE_SUFFIX" $USER_BOOT_JDK_OPTIONS -version 2>&1 | $TR '\n\r' ' '`
AC_MSG_RESULT([$BOOT_JDK_VERSION])
fi # end check jdk version
fi # end check javac
@ -335,11 +335,11 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
AC_SUBST(BOOT_JDK)
# Setup tools from the Boot JDK.
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA, java)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC, javac)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVADOC, javadoc)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR, jar)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JARSIGNER, jarsigner)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA, java$EXE_SUFFIX)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC, javac$EXE_SUFFIX)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVADOC, javadoc$EXE_SUFFIX)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR, jar$EXE_SUFFIX)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JARSIGNER, jarsigner$EXE_SUFFIX)
# Finally, set some other options...

View File

@ -60,6 +60,15 @@ if test $? = 0; then
esac
fi
# Test and fix wsl
echo $OUT | grep x86_64-unknown-linux-gnu > /dev/null 2> /dev/null
if test $? = 0; then
uname -r | grep Microsoft > /dev/null 2> /dev/null
if test $? = 0; then
OUT="x86_64-pc-wsl"
fi
fi
# Test and fix architecture string on AIX
# On AIX 'config.guess' returns 'powerpc' as architecture but 'powerpc' is
# implicitely handled as 32-bit architecture in 'platform.m4' so we check

View File

@ -29,7 +29,13 @@
DIR=`dirname $0`
# First, filter out everything that doesn't begin with "aarch64-"
# Allow wsl
if echo $* | grep x86_64-pc-wsl >/dev/null ; then
echo $*
exit
fi
# Filter out everything that doesn't begin with "aarch64-"
if ! echo $* | grep '^aarch64-' >/dev/null ; then
. $DIR/autoconf-config.sub "$@"
# autoconf-config.sub exits, so we never reach here, but just in

View File

@ -31,6 +31,7 @@
export LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@
export OPENJDK_BUILD_OS_ENV="@OPENJDK_BUILD_OS_ENV@"
export OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
export OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@"
export DEBUG_LEVEL="@DEBUG_LEVEL@"
@ -73,18 +74,23 @@ export TOPDIR="@TOPDIR@"
export OUTPUTDIR="@OUTPUTDIR@"
if [ "@COMPILE_TYPE@" != "cross" ]; then
export JAVAP="@FIXPATH@ $OUTPUTDIR/jdk/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
export JIMAGE="@FIXPATH@ $OUTPUTDIR/jdk/bin/jimage"
export JAVAP="@FIXPATH@ $OUTPUTDIR/jdk/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
export JIMAGE="@FIXPATH@ $OUTPUTDIR/jdk/bin/jimage"
elif [ "@CREATE_BUILDJDK@" = "true" ]; then
export JAVAP="@FIXPATH@ $OUTPUTDIR/buildjdk/jdk/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
export JIMAGE="@FIXPATH@ $OUTPUTDIR/buildjdk/jdk/bin/jimage"
export JAVAP="@FIXPATH@ $OUTPUTDIR/buildjdk/jdk/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
export JIMAGE="@FIXPATH@ $OUTPUTDIR/buildjdk/jdk/bin/jimage"
else
export JAVAP="@FIXPATH@ @BUILD_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
export JIMAGE="@FIXPATH@ @BUILD_JDK@/bin/jimage"
export JAVAP="@FIXPATH@ @BUILD_JDK@/bin/javap @JAVA_TOOL_FLAGS_SMALL@"
export JIMAGE="@FIXPATH@ @BUILD_JDK@/bin/jimage"
fi
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
export PATH="@VS_PATH@"
if [ "$OPENJDK_BUILD_OS_ENV" = "windows.wsl" ]; then
export FIXPATH_PATH="@VS_PATH_WINDOWS@"
export WSLENV="$WSLENV:FIXPATH_PATH:DEBUG_FIXPATH"
else
export PATH="@VS_PATH@"
fi
fi
# Now locate the main script and run it.

View File

@ -559,7 +559,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
TOOLCHAIN_CFLAGS="-errshort=tags"
TOOLCHAIN_CFLAGS_JDK="-mt $TOOLCHAIN_FLAGS"
TOOLCHAIN_CFLAGS_JDK_CONLY="-xc99=%none -xCC -Xa -W0,-noglobal $TOOLCHAIN_CFLAGS" # C only
TOOLCHAIN_CFLAGS_JDK_CONLY="-xCC -Xa -W0,-noglobal $TOOLCHAIN_CFLAGS" # C only
TOOLCHAIN_CFLAGS_JDK_CXXONLY="-features=no%except -norunpath -xnolib" # CXX only
TOOLCHAIN_CFLAGS_JVM="-template=no%extdef -features=no%split_init \
-library=stlport4 -mt -features=no%except $TOOLCHAIN_FLAGS"

View File

@ -327,7 +327,7 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
# Only enable Shenandoah on supported arches
AC_MSG_CHECKING([if shenandoah can be built])
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86" || test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
AC_MSG_RESULT([yes])
else
DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES shenandoahgc"

View File

@ -188,6 +188,10 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_OS],
VAR_OS=windows
VAR_OS_ENV=windows.cygwin
;;
*wsl*)
VAR_OS=windows
VAR_OS_ENV=windows.wsl
;;
*mingw*)
VAR_OS=windows
VAR_OS_ENV=windows.msys

View File

@ -122,7 +122,12 @@ ORIGINAL_PATH:=@ORIGINAL_PATH@
ifeq ($(OPENJDK_TARGET_OS), windows)
# On Windows, the Visual Studio toolchain needs the PATH to be adjusted
# to include Visual Studio tools (this needs to be in cygwin/msys style).
export PATH:=@VS_PATH@
ifeq ($(OPENJDK_TARGET_OS_ENV), windows.wsl)
export FIXPATH_PATH:=@VS_PATH_WINDOWS@
export WSLENV:=$(WSLENV):FIXPATH_PATH:DEBUG_FIXPATH
else
export PATH:=@VS_PATH@
endif
endif
SYSROOT_CFLAGS := @SYSROOT_CFLAGS@
@ -761,6 +766,7 @@ MSVCR_DLL:=@MSVCR_DLL@
MSVCP_DLL:=@MSVCP_DLL@
UCRT_DLL_DIR:=@UCRT_DLL_DIR@
STLPORT_LIB:=@STLPORT_LIB@
ENABLE_PANDOC:=@ENABLE_PANDOC@
####################################################
#

View File

@ -180,7 +180,6 @@ AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
SHARED_LIBRARY='[$]1.dll'
STATIC_LIBRARY='[$]1.lib'
OBJ_SUFFIX='.obj'
EXE_SUFFIX='.exe'
else
LIBRARY_PREFIX=lib
SHARED_LIBRARY_SUFFIX='.so'
@ -188,7 +187,6 @@ AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
SHARED_LIBRARY='lib[$]1.so'
STATIC_LIBRARY='lib[$]1.a'
OBJ_SUFFIX='.o'
EXE_SUFFIX=''
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# For full static builds, we're overloading the SHARED_LIBRARY
# variables in order to limit the amount of changes required.
@ -212,7 +210,6 @@ AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
AC_SUBST(SHARED_LIBRARY)
AC_SUBST(STATIC_LIBRARY)
AC_SUBST(OBJ_SUFFIX)
AC_SUBST(EXE_SUFFIX)
])
# Determine which toolchain type to use, and make sure it is valid for this
@ -281,13 +278,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
TOOLCHAIN_CC_BINARY_clang="clang"
TOOLCHAIN_CC_BINARY_gcc="gcc"
TOOLCHAIN_CC_BINARY_microsoft="cl"
TOOLCHAIN_CC_BINARY_microsoft="cl$EXE_SUFFIX"
TOOLCHAIN_CC_BINARY_solstudio="cc"
TOOLCHAIN_CC_BINARY_xlc="xlc_r"
TOOLCHAIN_CXX_BINARY_clang="clang++"
TOOLCHAIN_CXX_BINARY_gcc="g++"
TOOLCHAIN_CXX_BINARY_microsoft="cl"
TOOLCHAIN_CXX_BINARY_microsoft="cl$EXE_SUFFIX"
TOOLCHAIN_CXX_BINARY_solstudio="CC"
TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
@ -333,9 +330,17 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
if test "x$OPENJDK_BUILD_OS" = "xwindows" \
&& test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
# Reset path to VS_PATH. It will include everything that was on PATH at the time we
# ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
PATH="$VS_PATH"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
# Append VS_PATH. In WSL, VS_PATH will not contain the WSL env path needed
# for using basic Unix tools, so need to keep the original PATH.
BASIC_APPEND_TO_PATH(PATH, $VS_PATH)
BASIC_APPEND_TO_PATH(WSLENV, "PATH/l:LIB:INCLUDE")
export WSLENV
else
# Reset path to VS_PATH. It will include everything that was on PATH at the time we
# ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
PATH="$VS_PATH"
fi
# The microsoft toolchain also requires INCLUDE and LIB to be set.
export INCLUDE="$VS_INCLUDE"
export LIB="$VS_LIB"
@ -430,7 +435,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
# There is no specific version flag, but all output starts with a version string.
# First line typically looks something like:
# Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
COMPILER_VERSION_OUTPUT=`"$COMPILER" 2>&1 | $GREP -v 'ERROR.*UtilTranslatePathList' | $HEAD -n 1 | $TR -d '\r'`
# Check that this is likely to be Microsoft CL.EXE.
$ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
if test $? -ne 0; then
@ -698,7 +703,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
# In the Microsoft toolchain we have a separate LD command "link".
# Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
# a cygwin program for something completely different.
AC_CHECK_PROG([LD], [link],[link],,, [$CYGWIN_LINK])
AC_CHECK_PROG([LD], [link$EXE_SUFFIX],[link$EXE_SUFFIX],,, [$CYGWIN_LINK])
BASIC_FIXUP_EXECUTABLE(LD)
# Verify that we indeed succeeded with this trick.
AC_MSG_CHECKING([if the found link.exe is actually the Visual Studio linker])
@ -750,7 +755,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
#
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# The corresponding ar tool is lib.exe (used to create static libraries)
AC_CHECK_PROG([AR], [lib],[lib],,,)
AC_CHECK_PROG([AR], [lib$EXE_SUFFIX],[lib$EXE_SUFFIX],,,)
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
BASIC_CHECK_TOOLS(AR, ar gcc-ar)
else
@ -774,12 +779,12 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
fi
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
AC_CHECK_PROG([MT], [mt], [mt],,, [/usr/bin/mt])
AC_CHECK_PROG([MT], [mt$EXE_SUFFIX], [mt$EXE_SUFFIX],,, [/usr/bin/mt])
BASIC_FIXUP_EXECUTABLE(MT)
# Setup the resource compiler (RC)
AC_CHECK_PROG([RC], [rc], [rc],,, [/usr/bin/rc])
AC_CHECK_PROG([RC], [rc$EXE_SUFFIX], [rc$EXE_SUFFIX],,, [/usr/bin/rc])
BASIC_FIXUP_EXECUTABLE(RC)
AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,)
AC_CHECK_PROG([DUMPBIN], [dumpbin$EXE_SUFFIX], [dumpbin$EXE_SUFFIX],,,)
BASIC_FIXUP_EXECUTABLE(DUMPBIN)
# We need to check for 'msbuild.exe' because at the place where we expect to
# find 'msbuild.exe' there's also a directory called 'msbuild' and configure
@ -788,7 +793,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
# Notice that we intentionally don't fix up the path to MSBUILD because we
# will call it in a DOS shell during freetype detection on Windows (see
# 'LIB_SETUP_FREETYPE' in "libraries.m4"
AC_CHECK_PROG([MSBUILD], [msbuild.exe], [msbuild.exe],,,)
AC_CHECK_PROG([MSBUILD], [msbuild$EXE_SUFFIX], [msbuild$EXE_SUFFIX],,,)
fi
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
@ -999,7 +1004,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
# Check for extra potential brokenness.
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# On Windows, double-check that we got the right compiler.
CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
CC_VERSION_OUTPUT=`$CC 2>&1 | $GREP -v 'ERROR.*UtilTranslatePathList' | $HEAD -n 1 | $TR -d '\r'`
COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then

View File

@ -115,7 +115,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
else
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
VC/Auxiliary/Build/vcvarsx86_amd64.bat VC/Auxiliary/Build/vcvars64.bat"
fi
for VCVARSFILE in $VCVARSFILES; do
@ -222,7 +222,6 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
[C:/Program Files/$VS_INSTALL_DIR], [well-known name])
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
[C:/Program Files (x86)/$VS_INSTALL_DIR], [well-known name])
if test "x$SDK_INSTALL_DIR" != x; then
if test "x$ProgramW6432" != x; then
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
@ -339,7 +338,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
[
# Store path to cygwin link.exe to help excluding it when searching for
# VS linker. This must be done before changing the PATH when looking for VS.
AC_PATH_PROG(CYGWIN_LINK, link)
AC_PATH_PROG(CYGWIN_LINK, link.exe)
if test "x$CYGWIN_LINK" != x; then
AC_MSG_CHECKING([if the first found link.exe is actually the Cygwin link tool])
"$CYGWIN_LINK" --version > /dev/null
@ -372,8 +371,13 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
# Instead create a shell script which will set the relevant variables when run.
WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])
WINPATH_BASH="$BASH"
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
WINPATH_BASH="bash"
else
WINPATH_BASH="$BASH"
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
fi
# Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
# script (executable by bash) that will setup the important variables.
@ -381,41 +385,65 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
$ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
# This will end up something like:
# call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
$ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "call \"$WINPATH_VS_ENV_CMD\" $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
# In some cases, the VS_ENV_CMD will change directory, change back so
# the set-vs-env.sh ends up in the right place.
$ECHO 'cd %~dp0' >> $EXTRACT_VC_ENV_BAT_FILE
# These will end up something like:
# C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
# The trailing space for everyone except PATH is no typo, but is needed due
# to trailing \ in the Windows paths. These will be stripped later.
$ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
# These will end up something like:
# echo VS_PATH=\"$PATH\" > set-vs-env.sh
# The trailing space for everyone except PATH is no typo, but is needed due
# to trailing \ in the Windows paths. These will be stripped later.
# Trying pure CMD extract. This results in windows paths that need to
# be converted post extraction, but a simpler script.
$ECHO 'echo VS_PATH="%PATH%" > set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO 'echo VS_INCLUDE="%INCLUDE% " >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO 'echo VS_LIB="%LIB% " >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO 'echo VCINSTALLDIR="%VCINSTALLDIR% " >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO 'echo WindowsSdkDir="%WindowsSdkDir% " >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO 'echo WINDOWSSDKDIR="%WINDOWSSDKDIR% " >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
else
# These will end up something like:
# C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
# The trailing space for everyone except PATH is no typo, but is needed due
# to trailing \ in the Windows paths. These will be stripped later.
$ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
>> $EXTRACT_VC_ENV_BAT_FILE
fi
# Now execute the newly created bat file.
# The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
# Change directory so we don't need to mess with Windows paths in redirects.
cd $VS_ENV_TMP_DIR
cmd /c extract-vs-env.bat | $CAT
$CMD /c extract-vs-env.bat | $CAT
cd $CURDIR
if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.])
AC_MSG_NOTICE([Could not succesfully extract the environment variables needed for the VS setup.])
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
AC_MSG_ERROR([Cannot continue])
fi
# Remove windows line endings
$SED -i -e 's|\r||g' $VS_ENV_TMP_DIR/set-vs-env.sh
# Now set all paths and other env variables. This will allow the rest of
# the configure script to find and run the compiler in the proper way.
AC_MSG_NOTICE([Setting extracted environment variables])
@ -455,9 +483,29 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
AC_SUBST(VS_INCLUDE)
AC_SUBST(VS_LIB)
# Convert VS_INCLUDE into SYSROOT_CFLAGS
OLDIFS="$IFS"
IFS=";"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
# Convert VS_PATH to unix style
VS_PATH_WINDOWS="$VS_PATH"
VS_PATH=""
for i in $VS_PATH_WINDOWS; do
path=$i
# Only process non-empty elements
if test "x$path" != x; then
IFS="$OLDIFS"
# Check that directory exists before calling fixup_path
testpath=$path
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([testpath])
if test -d "$testpath"; then
BASIC_FIXUP_PATH([path])
BASIC_APPEND_TO_PATH(VS_PATH, $path)
fi
IFS=";"
fi
done
fi
# Convert VS_INCLUDE into SYSROOT_CFLAGS
for i in $VS_INCLUDE; do
ipath=$i
# Only process non-empty elements
@ -490,6 +538,8 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
fi
done
IFS="$OLDIFS"
AC_SUBST(VS_PATH_WINDOWS)
fi
else
AC_MSG_RESULT([not found])
@ -600,10 +650,10 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VS_TOOLS_DIR)
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
| $GREP -i /x64/ | $HEAD --lines 1`
| $GREP -i /x64/ | $HEAD --lines 1`
else
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
| $GREP -i /x86/ | $HEAD --lines 1`
| $GREP -i /x86/ | $HEAD --lines 1`
fi
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
[search of VS100COMNTOOLS])
@ -616,14 +666,14 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
| $GREP x64 | $HEAD --lines 1`
| $GREP x64 | $HEAD --lines 1`
else
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
| $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
| $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
if test "x$POSSIBLE_MSVC_DLL" = x; then
# We're grasping at straws now...
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
| $HEAD --lines 1`
| $HEAD --lines 1`
fi
fi
@ -693,7 +743,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
if test "x$USE_UCRT" = "xtrue"; then
AC_MSG_CHECKING([for UCRT DLL dir])
if test "x$with_ucrt_dll_dir" != x; then
if test -z "$(ls -d "$with_ucrt_dll_dir/*.dll" 2> /dev/null)"; then
if test -z "$(ls -d $with_ucrt_dll_dir/*.dll 2> /dev/null)"; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([Could not find any dlls in $with_ucrt_dll_dir])
else
@ -713,8 +763,16 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
fi
UCRT_DLL_DIR="$CYGWIN_WINDOWSSDKDIR/Redist/ucrt/DLLs/$dll_subdir"
if test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([Could not find any dlls in $UCRT_DLL_DIR])
# Try with version subdir
UCRT_DLL_DIR="`ls -d $CYGWIN_WINDOWSSDKDIR/Redist/*/ucrt/DLLs/$dll_subdir \
2> /dev/null | $SORT -d | $HEAD -n1`"
if test -z "$UCRT_DLL_DIR" \
|| test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([Could not find any dlls in $UCRT_DLL_DIR])
else
AC_MSG_RESULT($UCRT_DLL_DIR)
fi
else
AC_MSG_RESULT($UCRT_DLL_DIR)
fi

View File

@ -25,17 +25,17 @@
# Default version numbers to use unless overridden by configure
DEFAULT_VERSION_FEATURE=12
DEFAULT_VERSION_FEATURE=13
DEFAULT_VERSION_INTERIM=0
DEFAULT_VERSION_UPDATE=0
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_EXTRA1=0
DEFAULT_VERSION_EXTRA2=0
DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2019-03-19
DEFAULT_VERSION_CLASSFILE_MAJOR=56 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_DATE=2019-09-17
DEFAULT_VERSION_CLASSFILE_MAJOR=57 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="11 12"
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="11 12 13"
LAUNCHER_NAME=openjdk
PRODUCT_NAME=OpenJDK

View File

@ -72,7 +72,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_OLDBYTECODE, \
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
JVM := $(JAVA_JAVAC), \
JAVAC := $(NEW_JAVAC), \
FLAGS := -source 12 -target 12 --doclint-format html5 \
FLAGS := -source 13 -target 13 --doclint-format html5 \
-encoding ascii -XDignore.symbol.file=true $(JAVAC_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
@ -82,7 +82,7 @@ $(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE, \
$(eval $(call SetupJavaCompiler,GENERATE_JDKBYTECODE_NOWARNINGS, \
JVM := $(JAVA_JAVAC), \
JAVAC := $(NEW_JAVAC), \
FLAGS := -source 12 -target 12 \
FLAGS := -source 13 -target 13 \
-encoding ascii -XDignore.symbol.file=true $(DISABLE_WARNINGS), \
SERVER_DIR := $(SJAVAC_SERVER_DIR), \
SERVER_JVM := $(SJAVAC_SERVER_JAVA)))

View File

@ -754,6 +754,21 @@ class CharacterData00 extends CharacterData {
return retval;
}
boolean isDigit(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.DECIMAL_DIGIT_NUMBER;
}
boolean isLowerCase(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.LOWERCASE_LETTER;
}
boolean isUpperCase(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.UPPERCASE_LETTER;
}
boolean isWhitespace(int ch) {
int props = getProperties(ch);
return ((props & $$maskIdentifierInfo) == $$valueJavaWhitespace);

View File

@ -460,6 +460,21 @@ class CharacterData01 extends CharacterData {
return retval;
}
boolean isDigit(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.DECIMAL_DIGIT_NUMBER;
}
boolean isLowerCase(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.LOWERCASE_LETTER;
}
boolean isUpperCase(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.UPPERCASE_LETTER;
}
boolean isWhitespace(int ch) {
int props = getProperties(ch);
return ((props & $$maskIdentifierInfo) == $$valueJavaWhitespace);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -217,6 +217,21 @@ class CharacterData02 extends CharacterData {
return retval;
}
boolean isDigit(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.DECIMAL_DIGIT_NUMBER;
}
boolean isLowerCase(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.LOWERCASE_LETTER;
}
boolean isUpperCase(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.UPPERCASE_LETTER;
}
boolean isWhitespace(int ch) {
return (getProperties(ch) & $$maskIdentifierInfo) == $$valueJavaWhitespace;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -217,6 +217,21 @@ class CharacterData0E extends CharacterData {
return retval;
}
boolean isDigit(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.DECIMAL_DIGIT_NUMBER;
}
boolean isLowerCase(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.LOWERCASE_LETTER;
}
boolean isUpperCase(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.UPPERCASE_LETTER;
}
boolean isWhitespace(int ch) {
int props = getProperties(ch);
return ((props & $$maskIdentifierInfo) == $$valueJavaWhitespace);

View File

@ -25,6 +25,8 @@
package java.lang;
import jdk.internal.HotSpotIntrinsicCandidate;
/** The CharacterData class encapsulates the large tables found in
Java.lang.Character. */
@ -78,6 +80,23 @@ class CharacterDataLatin1 extends CharacterData {
return props;
}
@HotSpotIntrinsicCandidate
boolean isDigit(int ch) {
return '0' <= ch && ch <= '9';
}
@HotSpotIntrinsicCandidate
boolean isLowerCase(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.LOWERCASE_LETTER;
}
@HotSpotIntrinsicCandidate
boolean isUpperCase(int ch) {
int props = getProperties(ch);
return (props & $$maskType) == Character.UPPERCASE_LETTER;
}
boolean isOtherLowercase(int ch) {
int props = getPropertiesEx(ch);
return (props & $$maskOtherLowercase) != 0;
@ -214,6 +233,7 @@ class CharacterDataLatin1 extends CharacterData {
return retval;
}
@HotSpotIntrinsicCandidate
boolean isWhitespace(int ch) {
int props = getProperties(ch);
return ((props & $$maskIdentifierInfo) == $$valueJavaWhitespace);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -41,47 +41,59 @@ class CharacterDataPrivateUse extends CharacterData {
}
boolean isJavaIdentifierStart(int ch) {
return false;
return false;
}
boolean isJavaIdentifierPart(int ch) {
return false;
return false;
}
boolean isUnicodeIdentifierStart(int ch) {
return false;
return false;
}
boolean isUnicodeIdentifierPart(int ch) {
return false;
return false;
}
boolean isIdentifierIgnorable(int ch) {
return false;
return false;
}
int toLowerCase(int ch) {
return ch;
return ch;
}
int toUpperCase(int ch) {
return ch;
return ch;
}
int toTitleCase(int ch) {
return ch;
return ch;
}
int digit(int ch, int radix) {
return -1;
return -1;
}
int getNumericValue(int ch) {
return -1;
return -1;
}
boolean isDigit(int ch) {
return false;
}
boolean isLowerCase(int ch) {
return false;
}
boolean isUpperCase(int ch) {
return false;
}
boolean isWhitespace(int ch) {
return false;
return false;
}
byte getDirectionality(int ch) {
@ -91,7 +103,7 @@ class CharacterDataPrivateUse extends CharacterData {
}
boolean isMirrored(int ch) {
return false;
return false;
}
static final CharacterData instance = new CharacterDataPrivateUse();

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -35,59 +35,71 @@ class CharacterDataUndefined extends CharacterData {
}
int getType(int ch) {
return Character.UNASSIGNED;
return Character.UNASSIGNED;
}
boolean isJavaIdentifierStart(int ch) {
return false;
return false;
}
boolean isJavaIdentifierPart(int ch) {
return false;
return false;
}
boolean isUnicodeIdentifierStart(int ch) {
return false;
return false;
}
boolean isUnicodeIdentifierPart(int ch) {
return false;
return false;
}
boolean isIdentifierIgnorable(int ch) {
return false;
return false;
}
int toLowerCase(int ch) {
return ch;
return ch;
}
int toUpperCase(int ch) {
return ch;
return ch;
}
int toTitleCase(int ch) {
return ch;
return ch;
}
int digit(int ch, int radix) {
return -1;
return -1;
}
int getNumericValue(int ch) {
return -1;
return -1;
}
boolean isDigit(int ch) {
return false;
}
boolean isLowerCase(int ch) {
return false;
}
boolean isUpperCase(int ch) {
return false;
}
boolean isWhitespace(int ch) {
return false;
return false;
}
byte getDirectionality(int ch) {
return Character.DIRECTIONALITY_UNDEFINED;
return Character.DIRECTIONALITY_UNDEFINED;
}
boolean isMirrored(int ch) {
return false;
return false;
}
static final CharacterData instance = new CharacterDataUndefined();

View File

@ -1,5 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<!--
Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
Copyright (c) 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
@ -22,34 +23,11 @@
or visit www.oracle.com if you need additional information or have any
questions.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<body bgcolor="white">
Provides classes and interface for RMI distributed
garbage-collection (DGC). When the RMI server returns an object to
its client (caller of the remote method), it tracks the remote
object's usage in the client. When there are no more references to the
remote object on the client, or if the reference's ``lease'' expires and
not renewed, the server garbage-collects the remote object.
<!--
<h2>Package Specification</h2>
##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT #####
<ul>
<li><a href="">##### REFER TO ANY FRAMEMAKER SPECIFICATION HERE #####</a>
</ul>
<h2>Related Documentation</h2>
For overviews, tutorials, examples, guides, and tool documentation, please see:
<ul>
<li><a href="">##### REFER TO NON-SPEC DOCUMENTATION HERE #####</a>
</ul>
-->
@since 1.1
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;url=api/index.html">
<title>Java API Documentation redirect</title>
</head>
<body>
</body>
</html>

View File

@ -1,6 +1,6 @@
#!/bin/bash
#
# 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,7 +25,7 @@
#
# This script copies parts of a Visual Studio installation into a devkit
# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin or WSL.
# erik.joelsson@oracle.com
VS_VERSION="2017"
@ -34,6 +34,8 @@ VS_DLL_VERSION="140"
SDK_VERSION="10"
SDK_FULL_VERSION="10.0.16299.0"
MSVC_DIR="Microsoft.VC141.CRT"
MSVC_FULL_VERSION="14.12.25827"
REDIST_FULL_VERSION="14.12.25810"
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
@ -41,22 +43,42 @@ BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
################################################################################
# Prepare settings
UNAME_SYSTEM=`uname -s`
UNAME_RELEASE=`uname -r`
# Detect cygwin or WSL
IS_CYGWIN=`echo $UNAME_SYSTEM | grep -i CYGWIN`
IS_WSL=`echo $UNAME_RELEASE | grep Microsoft`
if test "x$IS_CYGWIN" != "x"; then
BUILD_ENV="cygwin"
elif test "x$IS_WSL" != "x"; then
BUILD_ENV="wsl"
else
echo "Unknown environment; only Cygwin and WSL are supported."
exit 1
fi
if test "x$BUILD_ENV" = "xcygwin"; then
WINDOWS_PATH_TO_UNIX_PATH="cygpath -u"
elif test "x$BUILD_ENV" = "xwsl"; then
WINDOWS_PATH_TO_UNIX_PATH="wslpath -u"
fi
# Work around the insanely named ProgramFiles(x86) env variable
PROGRAMFILES_X86="$(cygpath "$(env | sed -n 's/^ProgramFiles(x86)=//p')")"
PROGRAMFILES_X86="$($WINDOWS_PATH_TO_UNIX_PATH "$(cmd.exe /c set | sed -n 's/^ProgramFiles(x86)=//p' | tr -d '\r')")"
# Find Visual Studio installation dir
eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
VSNNNCOMNTOOLS=`cmd.exe /c echo %VS${VS_VERSION_NUM_NODOT}COMNTOOLS% | tr -d '\r'`
if [ -d "$VSNNNCOMNTOOLS" ]; then
VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
VS_INSTALL_DIR="$($WINDOWS_PATH_TO_UNIX_PATH "$VSNNNCOMNTOOLS/../..")"
else
VS_INSTALL_DIR="${PROGRAMFILES_X86}/Microsoft Visual Studio/2017"
VS_INSTALL_DIR="$(ls -d "${VS_INSTALL_DIR}/"{Community,Professional} 2>/dev/null | head -n1)"
VS_INSTALL_DIR="$(cygpath "$VS_INSTALL_DIR")"
VS_INSTALL_DIR="$(ls -d "${VS_INSTALL_DIR}/"{Community,Professional,Enterprise} 2>/dev/null | head -n1)"
fi
echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
# Extract semantic version
POTENTIAL_INI_FILES="Common7\IDE\wdexpress.isolation.ini Common7\IDE\devenv.isolation.ini"
POTENTIAL_INI_FILES="Common7/IDE/wdexpress.isolation.ini Common7/IDE/devenv.isolation.ini"
for f in $POTENTIAL_INI_FILES; do
if [ -f "$VS_INSTALL_DIR/$f" ]; then
VS_VERSION_SP="$(grep ^SemanticVersion= "$VS_INSTALL_DIR/$f")"
@ -86,8 +108,8 @@ MSVCP_DLL=${MSVC_DIR}/msvcp${VS_DLL_VERSION}.dll
# Copy Visual Studio files
if [ ! -d $DEVKIT_ROOT/VC ]; then
VC_SUBDIR="VC/Tools/MSVC/14.12.25827"
REDIST_SUBDIR="VC/Redist/MSVC/14.12.25810"
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/
@ -117,7 +139,7 @@ fi
################################################################################
# Copy SDK files
SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
SDK_INSTALL_DIR="$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION"
echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then

View File

@ -55,7 +55,7 @@ GENDATA_CURDATA := $(JDK_OUTPUTDIR)/modules/java.base/java/util/currency.data
$(GENDATA_CURDATA): $(TOPDIR)/make/data/currency/CurrencyData.properties $(BUILD_TOOLS_JDK)
$(call MakeDir, $(@D))
$(RM) $@
$(TOOL_GENERATECURRENCYDATA) -o $@.tmp < $<
$(TOOL_GENERATECURRENCYDATA) -o $@.tmp -i $<
$(MV) $@.tmp $@
$(CHMOD) 444 $@

View File

@ -230,7 +230,8 @@ define SetupGenBuffer
endif
$$($1_DST): $$($1_DEP) $(GENSRC_BUFFER_DST)/_the.buffer.dir
$(TOOL_SPP) < $$($1_SRC) > $$($1_OUT).tmp \
$(RM) $$($1_OUT).tmp
$(TOOL_SPP) -i$$($1_SRC) -o$$($1_OUT).tmp \
-K$$($1_type) \
-K$$($1_category) \
-K$$($1_streams) \
@ -260,12 +261,12 @@ define SetupGenBuffer
ifeq ($$($1_BIN), 1)
$(SED) -e '/#BIN/,$$$$d' < $$($1_OUT) > $$($1_DST).tmp
$(RM) $$($1_OUT)
$$($1_char_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
$$($1_short_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
$$($1_int_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
$$($1_long_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
$$($1_float_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
$$($1_double_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
$$($1_char_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
$$($1_short_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
$$($1_int_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
$$($1_long_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
$$($1_float_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
$$($1_double_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
$(PRINTF) "}\n" >> $$($1_DST).tmp
mv $$($1_DST).tmp $$($1_DST)
endif

View File

@ -36,7 +36,7 @@ GENSRC_CHARSETCODER_TEMPLATE := $(GENSRC_CHARSETCODER_SRC)/charset/Charset-X-Cod
$(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
$(call MakeTargetDir)
$(RM) $@.tmp
$(TOOL_SPP) < $< >$@.tmp \
$(TOOL_SPP) -i$< -o$@.tmp \
-Kdecoder \
-DA='A' \
-Da='a' \
@ -71,7 +71,7 @@ GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java
$(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
$(call MakeTargetDir)
$(RM) $@.tmp
$(TOOL_SPP) < $< >$@.tmp \
$(TOOL_SPP) -i$< -o$@.tmp \
-Kencoder \
-DA='An' \
-Da='an' \

View File

@ -59,8 +59,9 @@ define GenerateVarHandle
$$(eval $1_type := $$$$(shell $(TR) '[:upper:]' '[:lower:]' <<< $$$$($1_Type)))
endif
$$(call MakeDir, $$(@D))
$(RM) $$@
$(TOOL_SPP) -nel -K$$($1_type) -Dtype=$$($1_type) -DType=$$($1_Type) \
$$($1_ARGS) < $$< > $$@
$$($1_ARGS) -i$$< -o$$@
GENSRC_VARHANDLES += $$($1_FILENAME)
endef
@ -147,10 +148,11 @@ define GenerateVarHandleByteArray
$$($1_FILENAME): $(VARHANDLES_SRC_DIR)/X-VarHandleByteArrayView.java.template $(BUILD_TOOLS_JDK)
$$(call MakeDir, $$(@D))
$(RM) $$@
$(TOOL_SPP) -nel -K$$($1_type) \
-Dtype=$$($1_type) -DType=$$($1_Type) -DBoxType=$$($1_BoxType) \
-DrawType=$$($1_rawType) -DRawType=$$($1_RawType) -DRawBoxType=$$($1_RawBoxType) \
$$($1_ARGS) < $$< > $$@
$$($1_ARGS) -i$$< -o$$@
GENSRC_VARHANDLES += $$($1_FILENAME)
endef

View File

@ -28,7 +28,9 @@ package build.tools.generatecurrencydata;
import java.io.IOException;
import java.io.FileNotFoundException;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
@ -134,18 +136,43 @@ public class GenerateCurrencyData {
private static String currenciesWithMinorUnitsUndefined;
public static void main(String[] args) {
InputStream in = System.in;
// Look for "-o outputfilename" option
if ( args.length == 2 && args[0].equals("-o") ) {
try {
out = new DataOutputStream(new FileOutputStream(args[1]));
} catch ( FileNotFoundException e ) {
System.err.println("Error: " + e.getMessage());
e.printStackTrace(System.err);
for (int n = 0; n < args.length; ++n) {
if (args[n].equals("-o")) {
++n;
if (n >= args.length) {
System.err.println("Error: Invalid argument format");
System.exit(1);
}
try {
out = new DataOutputStream(new FileOutputStream(args[n]));
} catch ( FileNotFoundException e ) {
System.err.println("Error: " + e.getMessage());
e.printStackTrace(System.err);
System.exit(1);
}
} else if (args[n].equals("-i")) {
++n;
if (n >= args.length) {
System.err.println("Error: Invalid argument format");
System.exit(1);
}
try {
in = new FileInputStream(args[n]);
} catch ( FileNotFoundException e ) {
System.err.println("Error: " + e.getMessage());
e.printStackTrace(System.err);
System.exit(1);
}
} else {
System.err.println("Error: Invalid argument " + args[n]);
System.exit(1);
}
} else {
System.err.println("Error: Illegal arg count");
}
if (out == null) {
System.err.println("Error: Invalid argument format");
System.exit(1);
}
@ -154,7 +181,7 @@ public class GenerateCurrencyData {
format.setLenient(false);
try {
readInput();
readInput(in);
buildMainAndSpecialCaseTables();
buildOtherTables();
writeOutput();
@ -167,9 +194,9 @@ public class GenerateCurrencyData {
}
}
private static void readInput() throws IOException {
private static void readInput(InputStream in) throws IOException {
currencyData = new Properties();
currencyData.load(System.in);
currencyData.load(in);
// initialize other lookup strings
formatVersion = (String) currencyData.get("formatVersion");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 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
@ -36,11 +36,13 @@ import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
@ -552,6 +554,21 @@ public class ModuleSummary {
return sb.toString();
}
private String providesEntry(Provides p) {
StringBuilder sb = new StringBuilder();
sb.append(String.format("provides %s<br>\n", p.service()));
List<String> pvs = new ArrayList<>(p.providers());
pvs.sort(Comparator.naturalOrder());
for (int i = 0; i < pvs.size(); i++) { // My kingdom for Stream::zip ...
String fmt = ((i == 0)
? "&nbsp;&nbsp;&nbsp;&nbsp;with %s"
: ",<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; %s");
sb.append(String.format(fmt, pvs.get(i)));
}
sb.append("\n");
return sb.toString();
}
public String servicesColumn() {
StringBuilder sb = new StringBuilder();
sb.append(String.format(" <td class=\"%s\">", CODE));
@ -560,8 +577,7 @@ public class ModuleSummary {
.forEach(s -> sb.append("uses ").append(s).append("<br>").append("\n"));
ms.descriptor().provides().stream()
.sorted(Comparator.comparing(Provides::service))
.map(p -> String.format("provides %s<br>&nbsp;&nbsp;&nbsp;&nbsp;with %s",
p.service(), p.providers()))
.map(this::providesEntry)
.forEach(p -> sb.append(p).append("<br>").append("\n"));
sb.append("</td>");
return sb.toString();

View File

@ -25,6 +25,8 @@
package build.tools.spp;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.*;
import java.util.regex.*;
@ -69,6 +71,8 @@ public class Spp {
Set<String> keys = new HashSet<>();
boolean be = false;
boolean el = true;
String inputFile = null;
String outputFile = null;
for (String arg:args) {
if (arg.startsWith("-D")) {
@ -76,6 +80,10 @@ public class Spp {
vars.put(arg.substring(2, i),arg.substring(i+1));
} else if (arg.startsWith("-K")) {
keys.add(arg.substring(2));
} else if (arg.startsWith("-i")) {
inputFile = arg.substring(2);
} else if (arg.startsWith("-o")) {
outputFile = arg.substring(2);
} else if ("-be".equals(arg)) {
be = true;
} else if ("-nel".equals(arg)) {
@ -87,11 +95,11 @@ public class Spp {
}
StringBuffer out = new StringBuffer();
new Spp().spp(new Scanner(System.in),
new Spp().spp(new Scanner(new FileInputStream(inputFile)),
out, "",
keys, vars, be, el,
false);
System.out.print(out.toString());
new FileOutputStream(outputFile, true).write(out.toString().getBytes());
}
static final String LNSEP = System.getProperty("line.separator");

View File

@ -203,7 +203,7 @@ ifeq ($(OPENJDK_TARGET_OS_TYPE), unix)
ifneq ($(MAN_FILES_MD), )
# If we got markdown files, ignore the troff files
ifeq ($(PANDOC), )
ifeq ($(ENABLE_PANDOC), false)
$(info Warning: pandoc not found. Not generating man pages)
else
# Create dynamic man pages from markdown using pandoc. We need

View File

@ -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
@ -519,7 +519,7 @@ else
DISABLED_WARNINGS_solstudio := \
E_STATEMENT_NOT_REACHED \
E_END_OF_LOOP_CODE_NOT_REACHED, \
DISABLED_WARNINGS_microsoft := 4267 4244 4312, \
DISABLED_WARNINGS_microsoft := 4267 4244 4312 4819, \
DISABLED_WARNINGS_gcc := implicit-fallthrough, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \

View File

@ -2538,7 +2538,6 @@
<in>arguments.cpp</in>
<in>arguments.hpp</in>
<in>arguments_ext.cpp</in>
<in>arguments_ext.hpp</in>
<in>atomic.hpp</in>
<in>basicLock.cpp</in>
<in>basicLock.hpp</in>
@ -2702,7 +2701,6 @@
<in>diagnosticArgument.hpp</in>
<in>diagnosticCommand.cpp</in>
<in>diagnosticCommand.hpp</in>
<in>diagnosticCommand_ext.hpp</in>
<in>diagnosticFramework.cpp</in>
<in>diagnosticFramework.hpp</in>
<in>dtraceAttacher.cpp</in>
@ -13687,11 +13685,6 @@
tool="1"
flavor2="0">
</item>
<item path="../../src/hotspot/share/runtime/arguments_ext.hpp"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="../../src/hotspot/share/runtime/atomic.hpp"
ex="false"
tool="3"
@ -14497,11 +14490,6 @@
tool="3"
flavor2="0">
</item>
<item path="../../src/hotspot/share/services/diagnosticCommand_ext.hpp"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="../../src/hotspot/share/services/diagnosticFramework.cpp"
ex="false"
tool="1"
@ -27454,11 +27442,6 @@
tool="1"
flavor2="0">
</item>
<item path="../../src/hotspot/share/runtime/arguments_ext.hpp"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="../../src/hotspot/share/runtime/atomic.hpp"
ex="false"
tool="3"
@ -28264,11 +28247,6 @@
tool="3"
flavor2="0">
</item>
<item path="../../src/hotspot/share/services/diagnosticCommand_ext.hpp"
ex="false"
tool="3"
flavor2="0">
</item>
<item path="../../src/hotspot/share/services/diagnosticFramework.cpp"
ex="false"
tool="1"

View File

@ -0,0 +1,24 @@
@echo off
REM
REM Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
REM
REM This code is free software; you can redistribute it and/or modify it
REM under the terms of the GNU General Public License version 2 only, as
REM published by the Free Software Foundation.
REM
REM This code is distributed in the hope that it will be useful, but WITHOUT
REM ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
REM FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
REM version 2 for more details (a copy is included in the LICENSE file that
REM accompanied this code).
REM
REM You should have received a copy of the GNU General Public License version
REM 2 along with this work; if not, write to the Free Software Foundation,
REM Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
REM
REM Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
REM or visit www.oracle.com if you need additional information or have any
REM questions.
REM
if '%1' NEQ '' echo %~s1

View File

@ -24,6 +24,7 @@
*/
#include <Windows.h>
#include <stdbool.h>
#include <io.h>
#include <stdio.h>
#include <string.h>
@ -53,25 +54,16 @@ void report_error(char const * msg)
}
/*
* Test if pos points to /cygdrive/_/ where _ can
* Test if pos points to /prefix/_/ where _ can
* be any character.
*/
int is_cygdrive_here(int pos, char const *in, int len)
int is_prefix_here(int pos, char const *in, int len, const char* prefix)
{
// Length of /cygdrive/c/ is 12
if (pos+12 > len) return 0;
if (in[pos+11]=='/' &&
in[pos+9]=='/' &&
in[pos+8]=='e' &&
in[pos+7]=='v' &&
in[pos+6]=='i' &&
in[pos+5]=='r' &&
in[pos+4]=='d' &&
in[pos+3]=='g' &&
in[pos+2]=='y' &&
in[pos+1]=='c' &&
in[pos+0]=='/') {
return 1;
// Length of c/ is 2
int prefix_size = strlen(prefix);
if (pos+prefix_size+2 > len) return 0;
if (in[pos+prefix_size+1]=='/') {
return strncmp(in + pos, prefix, prefix_size) == 0;
}
return 0;
}
@ -93,7 +85,7 @@ char *replace_cygdrive_cygwin(char const *in)
}
for (i = 0, j = 0; i<len;) {
if (is_cygdrive_here(i, in, len)) {
if (is_prefix_here(i, in, len, "/cygdrive/")) {
out[j++] = in[i+10];
out[j++] = ':';
i+=11;
@ -196,7 +188,39 @@ char *replace_cygdrive_msys(char const *in)
return str;
}
/*
* Replace /mnt/_/ with _:/
* Works in place since drive letter is always
* shorter than /mnt/
*/
char *replace_cygdrive_wsl(char const *in)
{
size_t len = strlen(in);
char *out = (char*) malloc(len+1);
int i,j;
if (len < 7) {
memmove(out, in, len + 1);
return out;
}
for (i = 0, j = 0; i<len;) {
if (is_prefix_here(i, in, len, "/mnt/")) {
out[j++] = in[i+5];
out[j++] = ':';
i+=6;
} else {
out[j] = in[i];
i++;
j++;
}
}
out[j] = '\0';
return out;
}
char*(*replace_cygdrive)(char const *in) = NULL;
bool debug_fixpath = false;
char *files_to_delete[1024];
int num_files_to_delete = 0;
@ -250,11 +274,11 @@ char *fix_at_file(char const *in)
append(&buffer, &buflen, &used, block, blocklen);
}
buffer[used] = 0;
if (getenv("DEBUG_FIXPATH") != NULL) {
if (debug_fixpath) {
fprintf(stderr, "fixpath input from @-file %s: %s\n", &in[1], buffer);
}
fixed = replace_cygdrive(buffer);
if (getenv("DEBUG_FIXPATH") != NULL) {
if (debug_fixpath) {
fprintf(stderr, "fixpath converted to @-file %s is: %s\n", name, fixed);
}
fwrite(fixed, strlen(fixed), 1, atout);
@ -362,28 +386,36 @@ int main(int argc, char const ** argv)
DWORD processFlags = 0;
BOOL processInheritHandles = TRUE;
BOOL waitForChild = TRUE;
char* fixpathPath;
if (argc<2 || argv[1][0] != '-' || (argv[1][1] != 'c' && argv[1][1] != 'm')) {
fprintf(stderr, "Usage: fixpath -c|m<path@path@...> [--detach] /cygdrive/c/WINDOWS/notepad.exe [/cygdrive/c/x/test.txt|@/cygdrive/c/x/atfile]\n");
debug_fixpath = (getenv("DEBUG_FIXPATH") != NULL);
if (argc<2 || argv[1][0] != '-' || (argv[1][1] != 'c' && argv[1][1] != 'm' && argv[1][1] != 'w')) {
fprintf(stderr, "Usage: fixpath -c|m|w<path@path@...> [--detach] /cygdrive/c/WINDOWS/notepad.exe [/cygdrive/c/x/test.txt|@/cygdrive/c/x/atfile]\n");
exit(0);
}
if (getenv("DEBUG_FIXPATH") != NULL) {
if (debug_fixpath) {
char const * cmdline = GetCommandLine();
fprintf(stderr, "fixpath input line >%s<\n", strstr(cmdline, argv[1]));
}
if (argv[1][1] == 'c' && argv[1][2] == '\0') {
if (getenv("DEBUG_FIXPATH") != NULL) {
if (debug_fixpath) {
fprintf(stderr, "fixpath using cygwin mode\n");
}
replace_cygdrive = replace_cygdrive_cygwin;
} else if (argv[1][1] == 'm') {
if (getenv("DEBUG_FIXPATH") != NULL) {
if (debug_fixpath) {
fprintf(stderr, "fixpath using msys mode, with path list: %s\n", &argv[1][2]);
}
setup_msys_path_list(argv[1]);
replace_cygdrive = replace_cygdrive_msys;
} else if (argv[1][1] == 'w') {
if (debug_fixpath) {
fprintf(stderr, "fixpath using wsl mode, with path list: %s\n", &argv[1][2]);
}
replace_cygdrive = replace_cygdrive_wsl;
} else {
fprintf(stderr, "fixpath Unknown mode: %s\n", argv[1]);
exit(-1);
@ -391,7 +423,7 @@ int main(int argc, char const ** argv)
if (argv[2][0] == '-') {
if (strcmp(argv[2], "--detach") == 0) {
if (getenv("DEBUG_FIXPATH") != NULL) {
if (debug_fixpath) {
fprintf(stderr, "fixpath in detached mode\n");
}
processFlags |= DETACHED_PROCESS;
@ -417,7 +449,7 @@ int main(int argc, char const ** argv)
var[var_len - 1] = '\0';
strupr(var);
if (getenv("DEBUG_FIXPATH") != NULL) {
if (debug_fixpath) {
fprintf(stderr, "fixpath setting var >%s< to >%s<\n", var, val);
}
@ -480,15 +512,15 @@ int main(int argc, char const ** argv)
}
*current = '\0';
if (getenv("DEBUG_FIXPATH") != NULL) {
if (debug_fixpath) {
fprintf(stderr, "fixpath converted line >%s<\n", line);
}
if (cmd == argc) {
if (getenv("DEBUG_FIXPATH") != NULL) {
fprintf(stderr, "fixpath no command provided!\n");
}
exit(0);
if (debug_fixpath) {
fprintf(stderr, "fixpath no command provided!\n");
}
exit(0);
}
ZeroMemory(&si, sizeof(si));
@ -498,6 +530,23 @@ int main(int argc, char const ** argv)
fflush(stderr);
fflush(stdout);
fixpathPath = calloc(32767, sizeof(char));
rc = GetEnvironmentVariable("FIXPATH_PATH", fixpathPath, 32767);
if (rc) {
if (debug_fixpath) {
fprintf(stderr, "Setting Path to FIXPATH_PATH: %s\n", fixpathPath);
}
rc = SetEnvironmentVariable("Path", fixpathPath);
if (!rc) {
// Could not set Path for some reason. Try to report why.
const int msg_len = 80 + strlen(fixpathPath);
char * msg = (char *)alloca(msg_len);
_snprintf_s(msg, msg_len, _TRUNCATE, "Could not set environment variable [Path=%s]", fixpathPath);
report_error(msg);
exit(1);
}
}
rc = CreateProcess(NULL,
line,
0,
@ -518,7 +567,7 @@ int main(int argc, char const ** argv)
WaitForSingleObject(pi.hProcess, INFINITE);
GetExitCodeProcess(pi.hProcess, &exitCode);
if (getenv("DEBUG_FIXPATH") != NULL) {
if (debug_fixpath) {
for (i=0; i<num_files_to_delete; ++i) {
fprintf(stderr, "fixpath Not deleting temporary file %s\n",
files_to_delete[i]);
@ -530,13 +579,13 @@ int main(int argc, char const ** argv)
}
if (exitCode != 0) {
if (getenv("DEBUG_FIXPATH") != NULL) {
if (debug_fixpath) {
fprintf(stderr, "fixpath exit code %d\n",
exitCode);
}
}
} else {
if (getenv("DEBUG_FIXPATH") != NULL) {
if (debug_fixpath) {
fprintf(stderr, "fixpath Not waiting for child process");
}
}

View File

@ -2133,7 +2133,12 @@ const uint Matcher::vector_ideal_reg(int len) {
}
const uint Matcher::vector_shift_count_ideal_reg(int size) {
return Op_VecX;
switch(size) {
case 8: return Op_VecD;
case 16: return Op_VecX;
}
ShouldNotReachHere();
return 0;
}
// AES support not yet implemented
@ -12601,6 +12606,63 @@ instruct mnsubD_reg_reg(vRegD dst, vRegD src1, vRegD src2, vRegD src3, immD0 zer
%}
// Math.max(FF)F
instruct maxF_reg_reg(vRegF dst, vRegF src1, vRegF src2) %{
match(Set dst (MaxF src1 src2));
format %{ "fmaxs $dst, $src1, $src2" %}
ins_encode %{
__ fmaxs(as_FloatRegister($dst$$reg),
as_FloatRegister($src1$$reg),
as_FloatRegister($src2$$reg));
%}
ins_pipe(fp_dop_reg_reg_s);
%}
// Math.min(FF)F
instruct minF_reg_reg(vRegF dst, vRegF src1, vRegF src2) %{
match(Set dst (MinF src1 src2));
format %{ "fmins $dst, $src1, $src2" %}
ins_encode %{
__ fmins(as_FloatRegister($dst$$reg),
as_FloatRegister($src1$$reg),
as_FloatRegister($src2$$reg));
%}
ins_pipe(fp_dop_reg_reg_s);
%}
// Math.max(DD)D
instruct maxD_reg_reg(vRegD dst, vRegD src1, vRegD src2) %{
match(Set dst (MaxD src1 src2));
format %{ "fmaxd $dst, $src1, $src2" %}
ins_encode %{
__ fmaxd(as_FloatRegister($dst$$reg),
as_FloatRegister($src1$$reg),
as_FloatRegister($src2$$reg));
%}
ins_pipe(fp_dop_reg_reg_d);
%}
// Math.min(DD)D
instruct minD_reg_reg(vRegD dst, vRegD src1, vRegD src2) %{
match(Set dst (MinD src1 src2));
format %{ "fmind $dst, $src1, $src2" %}
ins_encode %{
__ fmind(as_FloatRegister($dst$$reg),
as_FloatRegister($src1$$reg),
as_FloatRegister($src2$$reg));
%}
ins_pipe(fp_dop_reg_reg_d);
%}
instruct divF_reg_reg(vRegF dst, vRegF src1, vRegF src2) %{
match(Set dst (DivF src1 src2));
@ -16524,32 +16586,32 @@ instruct vxor16B(vecX dst, vecX src1, vecX src2)
%}
// ------------------------------ Shift ---------------------------------------
instruct vshiftcntL(vecX dst, iRegIorL2I cnt) %{
instruct vshiftcnt8B(vecD dst, iRegIorL2I cnt) %{
predicate(n->as_Vector()->length_in_bytes() == 8);
match(Set dst (LShiftCntV cnt));
format %{ "dup $dst, $cnt\t# shift count (vecX)" %}
ins_encode %{
__ dup(as_FloatRegister($dst$$reg), __ T16B, as_Register($cnt$$reg));
%}
ins_pipe(vdup_reg_reg128);
%}
// Right shifts on aarch64 SIMD are implemented as left shift by -ve amount
instruct vshiftcntR(vecX dst, iRegIorL2I cnt) %{
match(Set dst (RShiftCntV cnt));
format %{ "dup $dst, $cnt\t# shift count (vecX)\n\tneg $dst, $dst\t T16B" %}
format %{ "dup $dst, $cnt\t# shift count vector (8B)" %}
ins_encode %{
__ dup(as_FloatRegister($dst$$reg), __ T8B, as_Register($cnt$$reg));
%}
ins_pipe(vdup_reg_reg64);
%}
instruct vshiftcnt16B(vecX dst, iRegIorL2I cnt) %{
predicate(n->as_Vector()->length_in_bytes() == 16);
match(Set dst (LShiftCntV cnt));
match(Set dst (RShiftCntV cnt));
format %{ "dup $dst, $cnt\t# shift count vector (16B)" %}
ins_encode %{
__ dup(as_FloatRegister($dst$$reg), __ T16B, as_Register($cnt$$reg));
__ negr(as_FloatRegister($dst$$reg), __ T16B, as_FloatRegister($dst$$reg));
%}
ins_pipe(vdup_reg_reg128);
%}
instruct vsll8B(vecD dst, vecD src, vecX shift) %{
instruct vsll8B(vecD dst, vecD src, vecD shift) %{
predicate(n->as_Vector()->length() == 4 ||
n->as_Vector()->length() == 8);
match(Set dst (LShiftVB src shift));
match(Set dst (RShiftVB src shift));
ins_cost(INSN_COST);
format %{ "sshl $dst,$src,$shift\t# vector (8B)" %}
ins_encode %{
@ -16563,7 +16625,6 @@ instruct vsll8B(vecD dst, vecD src, vecX shift) %{
instruct vsll16B(vecX dst, vecX src, vecX shift) %{
predicate(n->as_Vector()->length() == 16);
match(Set dst (LShiftVB src shift));
match(Set dst (RShiftVB src shift));
ins_cost(INSN_COST);
format %{ "sshl $dst,$src,$shift\t# vector (16B)" %}
ins_encode %{
@ -16574,29 +16635,93 @@ instruct vsll16B(vecX dst, vecX src, vecX shift) %{
ins_pipe(vshift128);
%}
instruct vsrl8B(vecD dst, vecD src, vecX shift) %{
// Right shifts with vector shift count on aarch64 SIMD are implemented
// as left shift by negative shift count.
// There are two cases for vector shift count.
//
// Case 1: The vector shift count is from replication.
// | |
// LoadVector RShiftCntV
// | /
// RShiftVI
// Note: In inner loop, multiple neg instructions are used, which can be
// moved to outer loop and merge into one neg instruction.
//
// Case 2: The vector shift count is from loading.
// This case isn't supported by middle-end now. But it's supported by
// panama/vectorIntrinsics(JEP 338: Vector API).
// | |
// LoadVector LoadVector
// | /
// RShiftVI
//
instruct vsra8B(vecD dst, vecD src, vecD shift, vecD tmp) %{
predicate(n->as_Vector()->length() == 4 ||
n->as_Vector()->length() == 8);
match(Set dst (URShiftVB src shift));
match(Set dst (RShiftVB src shift));
ins_cost(INSN_COST);
format %{ "ushl $dst,$src,$shift\t# vector (8B)" %}
effect(TEMP tmp);
format %{ "negr $tmp,$shift\t"
"sshl $dst,$src,$tmp\t# vector (8B)" %}
ins_encode %{
__ ushl(as_FloatRegister($dst$$reg), __ T8B,
as_FloatRegister($src$$reg),
__ negr(as_FloatRegister($tmp$$reg), __ T8B,
as_FloatRegister($shift$$reg));
__ sshl(as_FloatRegister($dst$$reg), __ T8B,
as_FloatRegister($src$$reg),
as_FloatRegister($tmp$$reg));
%}
ins_pipe(vshift64);
%}
instruct vsrl16B(vecX dst, vecX src, vecX shift) %{
instruct vsra16B(vecX dst, vecX src, vecX shift, vecX tmp) %{
predicate(n->as_Vector()->length() == 16);
match(Set dst (RShiftVB src shift));
ins_cost(INSN_COST);
effect(TEMP tmp);
format %{ "negr $tmp,$shift\t"
"sshl $dst,$src,$tmp\t# vector (16B)" %}
ins_encode %{
__ negr(as_FloatRegister($tmp$$reg), __ T16B,
as_FloatRegister($shift$$reg));
__ sshl(as_FloatRegister($dst$$reg), __ T16B,
as_FloatRegister($src$$reg),
as_FloatRegister($tmp$$reg));
%}
ins_pipe(vshift128);
%}
instruct vsrl8B(vecD dst, vecD src, vecD shift, vecD tmp) %{
predicate(n->as_Vector()->length() == 4 ||
n->as_Vector()->length() == 8);
match(Set dst (URShiftVB src shift));
ins_cost(INSN_COST);
effect(TEMP tmp);
format %{ "negr $tmp,$shift\t"
"ushl $dst,$src,$tmp\t# vector (8B)" %}
ins_encode %{
__ negr(as_FloatRegister($tmp$$reg), __ T8B,
as_FloatRegister($shift$$reg));
__ ushl(as_FloatRegister($dst$$reg), __ T8B,
as_FloatRegister($src$$reg),
as_FloatRegister($tmp$$reg));
%}
ins_pipe(vshift64);
%}
instruct vsrl16B(vecX dst, vecX src, vecX shift, vecX tmp) %{
predicate(n->as_Vector()->length() == 16);
match(Set dst (URShiftVB src shift));
ins_cost(INSN_COST);
format %{ "ushl $dst,$src,$shift\t# vector (16B)" %}
effect(TEMP tmp);
format %{ "negr $tmp,$shift\t"
"ushl $dst,$src,$tmp\t# vector (16B)" %}
ins_encode %{
__ negr(as_FloatRegister($tmp$$reg), __ T16B,
as_FloatRegister($shift$$reg));
__ ushl(as_FloatRegister($dst$$reg), __ T16B,
as_FloatRegister($src$$reg),
as_FloatRegister($shift$$reg));
as_FloatRegister($tmp$$reg));
%}
ins_pipe(vshift128);
%}
@ -16708,11 +16833,10 @@ instruct vsrl16B_imm(vecX dst, vecX src, immI shift) %{
ins_pipe(vshift128_imm);
%}
instruct vsll4S(vecD dst, vecD src, vecX shift) %{
instruct vsll4S(vecD dst, vecD src, vecD shift) %{
predicate(n->as_Vector()->length() == 2 ||
n->as_Vector()->length() == 4);
match(Set dst (LShiftVS src shift));
match(Set dst (RShiftVS src shift));
ins_cost(INSN_COST);
format %{ "sshl $dst,$src,$shift\t# vector (4H)" %}
ins_encode %{
@ -16726,7 +16850,6 @@ instruct vsll4S(vecD dst, vecD src, vecX shift) %{
instruct vsll8S(vecX dst, vecX src, vecX shift) %{
predicate(n->as_Vector()->length() == 8);
match(Set dst (LShiftVS src shift));
match(Set dst (RShiftVS src shift));
ins_cost(INSN_COST);
format %{ "sshl $dst,$src,$shift\t# vector (8H)" %}
ins_encode %{
@ -16737,29 +16860,72 @@ instruct vsll8S(vecX dst, vecX src, vecX shift) %{
ins_pipe(vshift128);
%}
instruct vsrl4S(vecD dst, vecD src, vecX shift) %{
instruct vsra4S(vecD dst, vecD src, vecD shift, vecD tmp) %{
predicate(n->as_Vector()->length() == 2 ||
n->as_Vector()->length() == 4);
match(Set dst (URShiftVS src shift));
match(Set dst (RShiftVS src shift));
ins_cost(INSN_COST);
format %{ "ushl $dst,$src,$shift\t# vector (4H)" %}
effect(TEMP tmp);
format %{ "negr $tmp,$shift\t"
"sshl $dst,$src,$tmp\t# vector (4H)" %}
ins_encode %{
__ ushl(as_FloatRegister($dst$$reg), __ T4H,
as_FloatRegister($src$$reg),
__ negr(as_FloatRegister($tmp$$reg), __ T8B,
as_FloatRegister($shift$$reg));
__ sshl(as_FloatRegister($dst$$reg), __ T4H,
as_FloatRegister($src$$reg),
as_FloatRegister($tmp$$reg));
%}
ins_pipe(vshift64);
%}
instruct vsrl8S(vecX dst, vecX src, vecX shift) %{
instruct vsra8S(vecX dst, vecX src, vecX shift, vecX tmp) %{
predicate(n->as_Vector()->length() == 8);
match(Set dst (RShiftVS src shift));
ins_cost(INSN_COST);
effect(TEMP tmp);
format %{ "negr $tmp,$shift\t"
"sshl $dst,$src,$tmp\t# vector (8H)" %}
ins_encode %{
__ negr(as_FloatRegister($tmp$$reg), __ T16B,
as_FloatRegister($shift$$reg));
__ sshl(as_FloatRegister($dst$$reg), __ T8H,
as_FloatRegister($src$$reg),
as_FloatRegister($tmp$$reg));
%}
ins_pipe(vshift128);
%}
instruct vsrl4S(vecD dst, vecD src, vecD shift, vecD tmp) %{
predicate(n->as_Vector()->length() == 2 ||
n->as_Vector()->length() == 4);
match(Set dst (URShiftVS src shift));
ins_cost(INSN_COST);
effect(TEMP tmp);
format %{ "negr $tmp,$shift\t"
"ushl $dst,$src,$tmp\t# vector (4H)" %}
ins_encode %{
__ negr(as_FloatRegister($tmp$$reg), __ T8B,
as_FloatRegister($shift$$reg));
__ ushl(as_FloatRegister($dst$$reg), __ T4H,
as_FloatRegister($src$$reg),
as_FloatRegister($tmp$$reg));
%}
ins_pipe(vshift64);
%}
instruct vsrl8S(vecX dst, vecX src, vecX shift, vecX tmp) %{
predicate(n->as_Vector()->length() == 8);
match(Set dst (URShiftVS src shift));
ins_cost(INSN_COST);
format %{ "ushl $dst,$src,$shift\t# vector (8H)" %}
effect(TEMP tmp);
format %{ "negr $tmp,$shift\t"
"ushl $dst,$src,$tmp\t# vector (8H)" %}
ins_encode %{
__ negr(as_FloatRegister($tmp$$reg), __ T16B,
as_FloatRegister($shift$$reg));
__ ushl(as_FloatRegister($dst$$reg), __ T8H,
as_FloatRegister($src$$reg),
as_FloatRegister($shift$$reg));
as_FloatRegister($tmp$$reg));
%}
ins_pipe(vshift128);
%}
@ -16871,10 +17037,9 @@ instruct vsrl8S_imm(vecX dst, vecX src, immI shift) %{
ins_pipe(vshift128_imm);
%}
instruct vsll2I(vecD dst, vecD src, vecX shift) %{
instruct vsll2I(vecD dst, vecD src, vecD shift) %{
predicate(n->as_Vector()->length() == 2);
match(Set dst (LShiftVI src shift));
match(Set dst (RShiftVI src shift));
ins_cost(INSN_COST);
format %{ "sshl $dst,$src,$shift\t# vector (2S)" %}
ins_encode %{
@ -16888,7 +17053,6 @@ instruct vsll2I(vecD dst, vecD src, vecX shift) %{
instruct vsll4I(vecX dst, vecX src, vecX shift) %{
predicate(n->as_Vector()->length() == 4);
match(Set dst (LShiftVI src shift));
match(Set dst (RShiftVI src shift));
ins_cost(INSN_COST);
format %{ "sshl $dst,$src,$shift\t# vector (4S)" %}
ins_encode %{
@ -16899,28 +17063,70 @@ instruct vsll4I(vecX dst, vecX src, vecX shift) %{
ins_pipe(vshift128);
%}
instruct vsrl2I(vecD dst, vecD src, vecX shift) %{
instruct vsra2I(vecD dst, vecD src, vecD shift, vecD tmp) %{
predicate(n->as_Vector()->length() == 2);
match(Set dst (URShiftVI src shift));
match(Set dst (RShiftVI src shift));
ins_cost(INSN_COST);
format %{ "ushl $dst,$src,$shift\t# vector (2S)" %}
effect(TEMP tmp);
format %{ "negr $tmp,$shift\t"
"sshl $dst,$src,$tmp\t# vector (2S)" %}
ins_encode %{
__ ushl(as_FloatRegister($dst$$reg), __ T2S,
as_FloatRegister($src$$reg),
__ negr(as_FloatRegister($tmp$$reg), __ T8B,
as_FloatRegister($shift$$reg));
__ sshl(as_FloatRegister($dst$$reg), __ T2S,
as_FloatRegister($src$$reg),
as_FloatRegister($tmp$$reg));
%}
ins_pipe(vshift64);
%}
instruct vsrl4I(vecX dst, vecX src, vecX shift) %{
instruct vsra4I(vecX dst, vecX src, vecX shift, vecX tmp) %{
predicate(n->as_Vector()->length() == 4);
match(Set dst (RShiftVI src shift));
ins_cost(INSN_COST);
effect(TEMP tmp);
format %{ "negr $tmp,$shift\t"
"sshl $dst,$src,$tmp\t# vector (4S)" %}
ins_encode %{
__ negr(as_FloatRegister($tmp$$reg), __ T16B,
as_FloatRegister($shift$$reg));
__ sshl(as_FloatRegister($dst$$reg), __ T4S,
as_FloatRegister($src$$reg),
as_FloatRegister($tmp$$reg));
%}
ins_pipe(vshift128);
%}
instruct vsrl2I(vecD dst, vecD src, vecD shift, vecD tmp) %{
predicate(n->as_Vector()->length() == 2);
match(Set dst (URShiftVI src shift));
ins_cost(INSN_COST);
effect(TEMP tmp);
format %{ "negr $tmp,$shift\t"
"ushl $dst,$src,$tmp\t# vector (2S)" %}
ins_encode %{
__ negr(as_FloatRegister($tmp$$reg), __ T8B,
as_FloatRegister($shift$$reg));
__ ushl(as_FloatRegister($dst$$reg), __ T2S,
as_FloatRegister($src$$reg),
as_FloatRegister($tmp$$reg));
%}
ins_pipe(vshift64);
%}
instruct vsrl4I(vecX dst, vecX src, vecX shift, vecX tmp) %{
predicate(n->as_Vector()->length() == 4);
match(Set dst (URShiftVI src shift));
ins_cost(INSN_COST);
format %{ "ushl $dst,$src,$shift\t# vector (4S)" %}
effect(TEMP tmp);
format %{ "negr $tmp,$shift\t"
"ushl $dst,$src,$tmp\t# vector (4S)" %}
ins_encode %{
__ negr(as_FloatRegister($tmp$$reg), __ T16B,
as_FloatRegister($shift$$reg));
__ ushl(as_FloatRegister($dst$$reg), __ T4S,
as_FloatRegister($src$$reg),
as_FloatRegister($shift$$reg));
as_FloatRegister($tmp$$reg));
%}
ins_pipe(vshift128);
%}
@ -17006,7 +17212,6 @@ instruct vsrl4I_imm(vecX dst, vecX src, immI shift) %{
instruct vsll2L(vecX dst, vecX src, vecX shift) %{
predicate(n->as_Vector()->length() == 2);
match(Set dst (LShiftVL src shift));
match(Set dst (RShiftVL src shift));
ins_cost(INSN_COST);
format %{ "sshl $dst,$src,$shift\t# vector (2D)" %}
ins_encode %{
@ -17017,15 +17222,36 @@ instruct vsll2L(vecX dst, vecX src, vecX shift) %{
ins_pipe(vshift128);
%}
instruct vsrl2L(vecX dst, vecX src, vecX shift) %{
instruct vsra2L(vecX dst, vecX src, vecX shift, vecX tmp) %{
predicate(n->as_Vector()->length() == 2);
match(Set dst (RShiftVL src shift));
ins_cost(INSN_COST);
effect(TEMP tmp);
format %{ "negr $tmp,$shift\t"
"sshl $dst,$src,$tmp\t# vector (2D)" %}
ins_encode %{
__ negr(as_FloatRegister($tmp$$reg), __ T16B,
as_FloatRegister($shift$$reg));
__ sshl(as_FloatRegister($dst$$reg), __ T2D,
as_FloatRegister($src$$reg),
as_FloatRegister($tmp$$reg));
%}
ins_pipe(vshift128);
%}
instruct vsrl2L(vecX dst, vecX src, vecX shift, vecX tmp) %{
predicate(n->as_Vector()->length() == 2);
match(Set dst (URShiftVL src shift));
ins_cost(INSN_COST);
format %{ "ushl $dst,$src,$shift\t# vector (2D)" %}
effect(TEMP tmp);
format %{ "negr $tmp,$shift\t"
"ushl $dst,$src,$tmp\t# vector (2D)" %}
ins_encode %{
__ negr(as_FloatRegister($tmp$$reg), __ T16B,
as_FloatRegister($shift$$reg));
__ ushl(as_FloatRegister($dst$$reg), __ T2D,
as_FloatRegister($src$$reg),
as_FloatRegister($shift$$reg));
as_FloatRegister($tmp$$reg));
%}
ins_pipe(vshift128);
%}

View File

@ -1826,12 +1826,16 @@ public:
INSN(fdivs, 0b000, 0b00, 0b0001);
INSN(fadds, 0b000, 0b00, 0b0010);
INSN(fsubs, 0b000, 0b00, 0b0011);
INSN(fmaxs, 0b000, 0b00, 0b0100);
INSN(fmins, 0b000, 0b00, 0b0101);
INSN(fnmuls, 0b000, 0b00, 0b1000);
INSN(fmuld, 0b000, 0b01, 0b0000);
INSN(fdivd, 0b000, 0b01, 0b0001);
INSN(faddd, 0b000, 0b01, 0b0010);
INSN(fsubd, 0b000, 0b01, 0b0011);
INSN(fmaxd, 0b000, 0b01, 0b0100);
INSN(fmind, 0b000, 0b01, 0b0101);
INSN(fnmuld, 0b000, 0b01, 0b1000);
#undef INSN

View File

@ -4896,7 +4896,7 @@ void MacroAssembler::string_compare(Register str1, Register str2,
// A very short string
cmpw(cnt2, minCharsInWord);
br(Assembler::LT, SHORT_STRING);
br(Assembler::LE, SHORT_STRING);
// Compare longwords
// load first parts of strings and finish initialization while loading
@ -4920,8 +4920,7 @@ void MacroAssembler::string_compare(Register str1, Register str2,
ldr(tmp2, Address(str2));
cmp(cnt2, STUB_THRESHOLD);
br(GE, STUB);
subsw(cnt2, cnt2, 4);
br(EQ, TAIL_CHECK);
subw(cnt2, cnt2, 4);
eor(vtmpZ, T16B, vtmpZ, vtmpZ);
lea(str1, Address(str1, cnt2, Address::uxtw(str1_chr_shift)));
lea(str2, Address(str2, cnt2, Address::uxtw(str2_chr_shift)));
@ -4937,8 +4936,7 @@ void MacroAssembler::string_compare(Register str1, Register str2,
ldrs(vtmp, Address(str2));
cmp(cnt2, STUB_THRESHOLD);
br(GE, STUB);
subsw(cnt2, cnt2, 4);
br(EQ, TAIL_CHECK);
subw(cnt2, cnt2, 4);
lea(str1, Address(str1, cnt2, Address::uxtw(str1_chr_shift)));
eor(vtmpZ, T16B, vtmpZ, vtmpZ);
lea(str2, Address(str2, cnt2, Address::uxtw(str2_chr_shift)));
@ -5650,12 +5648,12 @@ void MacroAssembler::encode_iso_array(Register src, Register dst,
orr(v5, T16B, Vtmp3, Vtmp4);
uzp1(Vtmp1, T16B, Vtmp1, Vtmp2);
uzp1(Vtmp3, T16B, Vtmp3, Vtmp4);
stpq(Vtmp1, Vtmp3, dst);
uzp2(v5, T16B, v4, v5); // high bytes
umov(tmp2, v5, D, 1);
fmovd(tmp1, v5);
orr(tmp1, tmp1, tmp2);
cbnz(tmp1, LOOP_8);
stpq(Vtmp1, Vtmp3, dst);
sub(len, len, 32);
add(dst, dst, 32);
add(src, src, 64);
@ -5673,7 +5671,6 @@ void MacroAssembler::encode_iso_array(Register src, Register dst,
prfm(Address(src, SoftwarePrefetchHintDistance));
uzp1(v4, T16B, Vtmp1, Vtmp2);
uzp1(v5, T16B, Vtmp3, Vtmp4);
stpq(v4, v5, dst);
orr(Vtmp1, T16B, Vtmp1, Vtmp2);
orr(Vtmp3, T16B, Vtmp3, Vtmp4);
uzp2(Vtmp1, T16B, Vtmp1, Vtmp3); // high bytes
@ -5681,6 +5678,7 @@ void MacroAssembler::encode_iso_array(Register src, Register dst,
fmovd(tmp1, Vtmp1);
orr(tmp1, tmp1, tmp2);
cbnz(tmp1, LOOP_8);
stpq(v4, v5, dst);
sub(len, len, 32);
add(dst, dst, 32);
add(src, src, 64);
@ -5695,9 +5693,9 @@ void MacroAssembler::encode_iso_array(Register src, Register dst,
ld1(Vtmp1, T8H, src);
uzp1(Vtmp2, T16B, Vtmp1, Vtmp1); // low bytes
uzp2(Vtmp3, T16B, Vtmp1, Vtmp1); // high bytes
strd(Vtmp2, dst);
fmovd(tmp1, Vtmp3);
cbnz(tmp1, NEXT_1);
strd(Vtmp2, dst);
sub(len, len, 8);
add(dst, dst, 8);
@ -5710,9 +5708,9 @@ void MacroAssembler::encode_iso_array(Register src, Register dst,
cbz(len, DONE);
BIND(NEXT_1);
ldrh(tmp1, Address(post(src, 2)));
strb(tmp1, Address(post(dst, 1)));
tst(tmp1, 0xff00);
br(NE, SET_RESULT);
strb(tmp1, Address(post(dst, 1)));
subs(len, len, 1);
br(GT, NEXT_1);

View File

@ -105,8 +105,8 @@ void MethodHandles::jump_from_method_handle(MacroAssembler* _masm, Register meth
// compiled code in threads for which the event is enabled. Check here for
// interp_only_mode if these events CAN be enabled.
__ ldrb(rscratch1, Address(rthread, JavaThread::interp_only_mode_offset()));
__ cbnz(rscratch1, run_compiled_code);
__ ldrw(rscratch1, Address(rthread, JavaThread::interp_only_mode_offset()));
__ cbzw(rscratch1, run_compiled_code);
__ ldr(rscratch1, Address(method, Method::interpreter_entry_offset()));
__ br(rscratch1);
__ BIND(run_compiled_code);

View File

@ -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.
* Copyright (c) 2014, 2108, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -48,6 +48,8 @@
// The base class for different kinds of native instruction abstractions.
// Provides the primitive operations to manipulate code relative to this.
class NativeCall;
class NativeInstruction {
friend class Relocation;
friend bool is_NativeCallTrampolineStub_at(address);

View File

@ -725,8 +725,11 @@ class StubGenerator: public StubCodeGenerator {
stub_name = "forward_copy_longs";
else
stub_name = "backward_copy_longs";
StubCodeMark mark(this, "StubRoutines", stub_name);
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines", stub_name);
__ bind(start);
Label unaligned_copy_long;
@ -1976,9 +1979,10 @@ class StubGenerator: public StubCodeGenerator {
const Register dst_pos = c_rarg3; // destination position
const Register length = c_rarg4;
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines", name);
__ align(CodeEntryAlignment);
address start = __ pc();
__ enter(); // required for proper stackwalking of RuntimeStub frame
@ -3653,7 +3657,6 @@ class StubGenerator: public StubCodeGenerator {
}
address generate_has_negatives(address &has_negatives_long) {
StubCodeMark mark(this, "StubRoutines", "has_negatives");
const u1 large_loop_size = 64;
const uint64_t UPPER_BIT_MASK=0x8080808080808080;
int dcache_line = VM_Version::dcache_line_size();
@ -3661,6 +3664,9 @@ class StubGenerator: public StubCodeGenerator {
Register ary1 = r1, len = r2, result = r0;
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines", "has_negatives");
address entry = __ pc();
__ enter();
@ -3900,7 +3906,6 @@ class StubGenerator: public StubCodeGenerator {
// cnt1 = r10 - amount of elements left to check, reduced by wordSize
// r3-r5 are reserved temporary registers
address generate_large_array_equals() {
StubCodeMark mark(this, "StubRoutines", "large_array_equals");
Register a1 = r1, a2 = r2, result = r0, cnt1 = r10, tmp1 = rscratch1,
tmp2 = rscratch2, tmp3 = r3, tmp4 = r4, tmp5 = r5, tmp6 = r11,
tmp7 = r12, tmp8 = r13;
@ -3915,6 +3920,9 @@ class StubGenerator: public StubCodeGenerator {
tmp5, tmp6, tmp7, tmp8);
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines", "large_array_equals");
address entry = __ pc();
__ enter();
__ sub(cnt1, cnt1, wordSize); // first 8 bytes were loaded outside of stub

View File

@ -1886,6 +1886,7 @@ void TemplateInterpreterGenerator::generate_throw_exception() {
__ restore_locals();
__ restore_constant_pool_cache();
__ get_method(rmethod);
__ get_dispatch();
// The method data pointer was incremented already during
// call profiling. We have to restore the mdp for the current bcp.

View File

@ -50,7 +50,7 @@ void VM_Version_Ext::initialize_cpu_information(void) {
_no_of_threads = _no_of_cores;
_no_of_sockets = _no_of_cores;
snprintf(_cpu_name, CPU_TYPE_DESC_BUF_SIZE - 1, "AArch64");
snprintf(_cpu_desc, CPU_DETAILED_DESC_BUF_SIZE, "%s", _features_string);
snprintf(_cpu_desc, CPU_DETAILED_DESC_BUF_SIZE, "AArch64 %s", _features_string);
_initialized = true;
}

View File

@ -8945,9 +8945,10 @@ instruct partialSubtypeCheck( R0RegP index, R1RegP sub, R2RegP super, flagsRegP
instruct cmpFastLock(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2, iRegP scratch )
%{
match(Set pcc (FastLock object box));
predicate(!(UseBiasedLocking && !UseOptoBiasInlining));
effect(TEMP scratch, TEMP scratch2);
ins_cost(100);
ins_cost(DEFAULT_COST*3);
format %{ "FASTLOCK $object, $box; KILL $scratch, $scratch2" %}
ins_encode %{
@ -8956,6 +8957,21 @@ instruct cmpFastLock(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2, iRe
ins_pipe(long_memory_op);
%}
instruct cmpFastLock_noBiasInline(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2,
iRegP scratch, iRegP scratch3) %{
match(Set pcc (FastLock object box));
predicate(UseBiasedLocking && !UseOptoBiasInlining);
effect(TEMP scratch, TEMP scratch2, TEMP scratch3);
ins_cost(DEFAULT_COST*5);
format %{ "FASTLOCK $object, $box; KILL $scratch, $scratch2, $scratch3" %}
ins_encode %{
__ fast_lock($object$$Register, $box$$Register, $scratch$$Register, $scratch2$$Register, $scratch3$$Register);
%}
ins_pipe(long_memory_op);
%}
instruct cmpFastUnlock(flagsRegP pcc, iRegP object, iRegP box, iRegP scratch2, iRegP scratch ) %{
match(Set pcc (FastUnlock object box));

View File

@ -1971,7 +1971,7 @@ void MacroAssembler::resolve(DecoratorSet decorators, Register obj) {
#ifdef COMPILER2
void MacroAssembler::fast_lock(Register Roop, Register Rbox, Register Rscratch, Register Rscratch2)
void MacroAssembler::fast_lock(Register Roop, Register Rbox, Register Rscratch, Register Rscratch2, Register scratch3)
{
assert(VM_Version::supports_ldrex(), "unsupported, yet?");
@ -1985,11 +1985,13 @@ void MacroAssembler::fast_lock(Register Roop, Register Rbox, Register Rscratch,
Label fast_lock, done;
if (UseBiasedLocking && !UseOptoBiasInlining) {
Label failed;
biased_locking_enter(Roop, Rmark, Rscratch, false, noreg, done, failed);
bind(failed);
assert(scratch3 != noreg, "need extra temporary for -XX:-UseOptoBiasInlining");
biased_locking_enter(Roop, Rmark, Rscratch, false, scratch3, done, done);
// Fall through if lock not biased otherwise branch to done
}
// Invariant: Rmark loaded below does not contain biased lock pattern
ldr(Rmark, Address(Roop, oopDesc::mark_offset_in_bytes()));
tst(Rmark, markOopDesc::unlocked_value);
b(fast_lock, ne);
@ -2016,6 +2018,9 @@ void MacroAssembler::fast_lock(Register Roop, Register Rbox, Register Rscratch,
bind(done);
// At this point flags are set as follows:
// EQ -> Success
// NE -> Failure, branch to slow path
}
void MacroAssembler::fast_unlock(Register Roop, Register Rbox, Register Rscratch, Register Rscratch2)

View File

@ -371,10 +371,10 @@ public:
// lock_reg and obj_reg must be loaded up with the appropriate values.
// swap_reg must be supplied.
// tmp_reg must be supplied.
// Optional slow case is for implementations (interpreter and C1) which branch to
// slow case directly. If slow_case is NULL, then leaves condition
// codes set (for C2's Fast_Lock node) and jumps to done label.
// Falls through for the fast locking attempt.
// Done label is branched to with condition code EQ set if the lock is
// biased and we acquired it. Slow case label is branched to with
// condition code NE set if the lock is biased but we failed to acquire
// it. Otherwise fall through.
// Returns offset of first potentially-faulting instruction for null
// check info (currently consumed only by C1). If
// swap_reg_contains_mark is true then returns -1 as it is assumed
@ -1073,7 +1073,7 @@ public:
void restore_default_fp_mode();
#ifdef COMPILER2
void fast_lock(Register obj, Register box, Register scratch, Register scratch2);
void fast_lock(Register obj, Register box, Register scratch, Register scratch2, Register scratch3 = noreg);
void fast_unlock(Register obj, Register box, Register scratch, Register scratch2);
#endif

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 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
@ -45,6 +45,7 @@
// The non-raw classes are the front-end entry point, hiding potential
// back-end extensions or the actual instructions size.
class NativeInstruction;
class NativeCall;
class RawNativeInstruction {
public:

View File

@ -1,6 +1,6 @@
/*
* Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2017 SAP SE. All rights reserved.
* Copyright (c) 2012, 2018 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
@ -299,6 +299,8 @@ class Assembler : public AbstractAssembler {
CMPI_OPCODE = (11u << OPCODE_SHIFT),
CMPL_OPCODE = (31u << OPCODE_SHIFT | 32u << 1),
CMPLI_OPCODE = (10u << OPCODE_SHIFT),
CMPRB_OPCODE = (31u << OPCODE_SHIFT | 192u << 1),
CMPEQB_OPCODE = (31u << OPCODE_SHIFT | 224u << 1),
ISEL_OPCODE = (31u << OPCODE_SHIFT | 15u << 1),
@ -336,6 +338,7 @@ class Assembler : public AbstractAssembler {
MTCRF_OPCODE = (31u << OPCODE_SHIFT | 144u << 1),
MFCR_OPCODE = (31u << OPCODE_SHIFT | 19u << 1),
MCRF_OPCODE = (19u << OPCODE_SHIFT | 0u << 1),
SETB_OPCODE = (31u << OPCODE_SHIFT | 128u << 1),
// condition register logic instructions
CRAND_OPCODE = (19u << OPCODE_SHIFT | 257u << 1),
@ -536,6 +539,12 @@ class Assembler : public AbstractAssembler {
XVSUBDP_OPCODE = (60u << OPCODE_SHIFT | 104u << 3),
XVMULSP_OPCODE = (60u << OPCODE_SHIFT | 80u << 3),
XVMULDP_OPCODE = (60u << OPCODE_SHIFT | 112u << 3),
XVMADDASP_OPCODE=(60u << OPCODE_SHIFT | 65u << 3),
XVMADDADP_OPCODE=(60u << OPCODE_SHIFT | 97u << 3),
XVMSUBASP_OPCODE=(60u << OPCODE_SHIFT | 81u << 3),
XVMSUBADP_OPCODE=(60u << OPCODE_SHIFT | 113u << 3),
XVNMSUBASP_OPCODE=(60u<< OPCODE_SHIFT | 209u << 3),
XVNMSUBADP_OPCODE=(60u<< OPCODE_SHIFT | 241u << 3),
// Deliver A Random Number (introduced with POWER9)
DARN_OPCODE = (31u << OPCODE_SHIFT | 755u << 1),
@ -1076,7 +1085,7 @@ class Assembler : public AbstractAssembler {
static int frs( int x) { return opp_u_field(x, 10, 6); }
static int frt( int x) { return opp_u_field(x, 10, 6); }
static int fxm( int x) { return opp_u_field(x, 19, 12); }
static int l10( int x) { return opp_u_field(x, 10, 10); }
static int l10( int x) { assert(x == 0 || x == 1, "must be 0 or 1"); return opp_u_field(x, 10, 10); }
static int l14( int x) { return opp_u_field(x, 15, 14); }
static int l15( int x) { return opp_u_field(x, 15, 15); }
static int l910( int x) { return opp_u_field(x, 10, 9); }
@ -1443,6 +1452,10 @@ class Assembler : public AbstractAssembler {
inline void cmplw( ConditionRegister crx, Register a, Register b);
inline void cmpld( ConditionRegister crx, Register a, Register b);
// >= Power9
inline void cmprb( ConditionRegister bf, int l, Register a, Register b);
inline void cmpeqb(ConditionRegister bf, Register a, Register b);
inline void isel( Register d, Register a, Register b, int bc);
// Convenient version which takes: Condition register, Condition code and invert flag. Omit b to keep old value.
inline void isel( Register d, ConditionRegister cr, Condition cc, bool inv, Register a, Register b = noreg);
@ -1642,6 +1655,8 @@ class Assembler : public AbstractAssembler {
inline void mfcr( Register d);
inline void mcrf( ConditionRegister crd, ConditionRegister cra);
inline void mtcr( Register s);
// >= Power9
inline void setb( Register d, ConditionRegister cra);
// Special purpose registers
// Exception Register
@ -2218,6 +2233,12 @@ class Assembler : public AbstractAssembler {
inline void xvsubdp( VectorSRegister d, VectorSRegister a, VectorSRegister b);
inline void xvmulsp( VectorSRegister d, VectorSRegister a, VectorSRegister b);
inline void xvmuldp( VectorSRegister d, VectorSRegister a, VectorSRegister b);
inline void xvmaddasp(VectorSRegister d, VectorSRegister a, VectorSRegister b);
inline void xvmaddadp(VectorSRegister d, VectorSRegister a, VectorSRegister b);
inline void xvmsubasp(VectorSRegister d, VectorSRegister a, VectorSRegister b);
inline void xvmsubadp(VectorSRegister d, VectorSRegister a, VectorSRegister b);
inline void xvnmsubasp(VectorSRegister d, VectorSRegister a, VectorSRegister b);
inline void xvnmsubadp(VectorSRegister d, VectorSRegister a, VectorSRegister b);
// VSX Extended Mnemonics
inline void xxspltd( VectorSRegister d, VectorSRegister a, int x);

View File

@ -171,6 +171,8 @@ inline void Assembler::cmpi( ConditionRegister f, int l, Register a, int si16)
inline void Assembler::cmp( ConditionRegister f, int l, Register a, Register b) { emit_int32( CMP_OPCODE | bf(f) | l10(l) | ra(a) | rb(b)); }
inline void Assembler::cmpli( ConditionRegister f, int l, Register a, int ui16) { emit_int32( CMPLI_OPCODE | bf(f) | l10(l) | ra(a) | uimm(ui16,16)); }
inline void Assembler::cmpl( ConditionRegister f, int l, Register a, Register b) { emit_int32( CMPL_OPCODE | bf(f) | l10(l) | ra(a) | rb(b)); }
inline void Assembler::cmprb( ConditionRegister f, int l, Register a, Register b) { emit_int32( CMPRB_OPCODE | bf(f) | l10(l) | ra(a) | rb(b)); }
inline void Assembler::cmpeqb(ConditionRegister f, Register a, Register b) { emit_int32( CMPEQB_OPCODE| bf(f) | ra(a) | rb(b)); }
// extended mnemonics of Compare Instructions
inline void Assembler::cmpwi( ConditionRegister crx, Register a, int si16) { Assembler::cmpi( crx, 0, a, si16); }
@ -371,6 +373,8 @@ inline void Assembler::mfcr( Register d ) { emit_int32(MFCR_OPCODE | rt
inline void Assembler::mcrf( ConditionRegister crd, ConditionRegister cra)
{ emit_int32(MCRF_OPCODE | bf(crd) | bfa(cra)); }
inline void Assembler::mtcr( Register s) { Assembler::mtcrf(0xff, s); }
inline void Assembler::setb(Register d, ConditionRegister cra)
{ emit_int32(SETB_OPCODE | rt(d) | bfa(cra)); }
// Special purpose registers
// Exception Register
@ -786,6 +790,12 @@ inline void Assembler::xvadddp( VectorSRegister d, VectorSRegister a, VectorSReg
inline void Assembler::xvsubdp( VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XVSUBDP_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::xvmulsp( VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XVMULSP_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::xvmuldp( VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XVMULDP_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::xvmaddasp( VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XVMADDASP_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::xvmaddadp( VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XVMADDADP_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::xvmsubasp( VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XVMSUBASP_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::xvmsubadp( VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XVMSUBADP_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::xvnmsubasp(VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XVNMSUBASP_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::xvnmsubadp(VectorSRegister d, VectorSRegister a, VectorSRegister b) { emit_int32( XVNMSUBADP_OPCODE | vsrt(d) | vsra(a) | vsrb(b)); }
inline void Assembler::mtvrd( VectorRegister d, Register a) { emit_int32( MTVSRD_OPCODE | vsrt(d->to_vsr()) | ra(a)); }
inline void Assembler::mfvrd( Register a, VectorRegister d) { emit_int32( MFVSRD_OPCODE | vsrt(d->to_vsr()) | ra(a)); }
inline void Assembler::mtvrwz( VectorRegister d, Register a) { emit_int32( MTVSRWZ_OPCODE | vsrt(d->to_vsr()) | ra(a)); }

View File

@ -2257,6 +2257,14 @@ const bool Matcher::match_rule_supported(int opcode) {
return SuperwordUseVSX;
case Op_PopCountVI:
return (SuperwordUseVSX && UsePopCountInstruction);
case Op_FmaVF:
case Op_FmaVD:
return (SuperwordUseVSX && UseFMA);
case Op_Digit:
case Op_LowerCase:
case Op_UpperCase:
case Op_Whitespace:
return UseCharacterCompareIntrinsics;
}
return true; // Per default match rules are supported.
@ -12400,6 +12408,132 @@ instruct cmpD3_reg_reg_ExEx(iRegIdst dst, regD src1, regD src2) %{
%}
%}
// Compare char
instruct cmprb_Digit_reg_reg(iRegIdst dst, iRegIsrc src1, iRegIsrc src2, flagsReg crx) %{
match(Set dst (Digit src1));
effect(TEMP src2, TEMP crx);
ins_cost(3 * DEFAULT_COST);
format %{ "LI $src2, 0x3930\n\t"
"CMPRB $crx, 0, $src1, $src2\n\t"
"SETB $dst, $crx" %}
size(12);
ins_encode %{
// 0x30: 0, 0x39: 9
__ li($src2$$Register, 0x3930);
// compare src1 with ranges 0x30 to 0x39
__ cmprb($crx$$CondRegister, 0, $src1$$Register, $src2$$Register);
__ setb($dst$$Register, $crx$$CondRegister);
%}
ins_pipe(pipe_class_default);
%}
instruct cmprb_LowerCase_reg_reg(iRegIdst dst, iRegIsrc src1, iRegIsrc src2, flagsReg crx) %{
match(Set dst (LowerCase src1));
effect(TEMP src2, TEMP crx);
ins_cost(12 * DEFAULT_COST);
format %{ "LI $src2, 0x7A61\n\t"
"CMPRB $crx, 0, $src1, $src2\n\t"
"BGT $crx, done\n\t"
"LIS $src2, (signed short)0xF6DF\n\t"
"ORI $src2, $src2, 0xFFF8\n\t"
"CMPRB $crx, 1, $src1, $src2\n\t"
"BGT $crx, done\n\t"
"LIS $src2, (signed short)0xAAB5\n\t"
"ORI $src2, $src2, 0xBABA\n\t"
"INSRDI $src2, $src2, 32, 0\n\t"
"CMPEQB $crx, 1, $src1, $src2\n"
"done:\n\t"
"SETB $dst, $crx" %}
size(48);
ins_encode %{
Label done;
// 0x61: a, 0x7A: z
__ li($src2$$Register, 0x7A61);
// compare src1 with ranges 0x61 to 0x7A
__ cmprb($crx$$CondRegister, 0, $src1$$Register, $src2$$Register);
__ bgt($crx$$CondRegister, done);
// 0xDF: sharp s, 0xFF: y with diaeresis, 0xF7 is not the lower case
__ lis($src2$$Register, (signed short)0xF6DF);
__ ori($src2$$Register, $src2$$Register, 0xFFF8);
// compare src1 with ranges 0xDF to 0xF6 and 0xF8 to 0xFF
__ cmprb($crx$$CondRegister, 1, $src1$$Register, $src2$$Register);
__ bgt($crx$$CondRegister, done);
// 0xAA: feminine ordinal indicator
// 0xB5: micro sign
// 0xBA: masculine ordinal indicator
__ lis($src2$$Register, (signed short)0xAAB5);
__ ori($src2$$Register, $src2$$Register, 0xBABA);
__ insrdi($src2$$Register, $src2$$Register, 32, 0);
// compare src1 with 0xAA, 0xB5, and 0xBA
__ cmpeqb($crx$$CondRegister, $src1$$Register, $src2$$Register);
__ bind(done);
__ setb($dst$$Register, $crx$$CondRegister);
%}
ins_pipe(pipe_class_default);
%}
instruct cmprb_UpperCase_reg_reg(iRegIdst dst, iRegIsrc src1, iRegIsrc src2, flagsReg crx) %{
match(Set dst (UpperCase src1));
effect(TEMP src2, TEMP crx);
ins_cost(7 * DEFAULT_COST);
format %{ "LI $src2, 0x5A41\n\t"
"CMPRB $crx, 0, $src1, $src2\n\t"
"BGT $crx, done\n\t"
"LIS $src2, (signed short)0xD6C0\n\t"
"ORI $src2, $src2, 0xDED8\n\t"
"CMPRB $crx, 1, $src1, $src2\n"
"done:\n\t"
"SETB $dst, $crx" %}
size(28);
ins_encode %{
Label done;
// 0x41: A, 0x5A: Z
__ li($src2$$Register, 0x5A41);
// compare src1 with a range 0x41 to 0x5A
__ cmprb($crx$$CondRegister, 0, $src1$$Register, $src2$$Register);
__ bgt($crx$$CondRegister, done);
// 0xC0: a with grave, 0xDE: thorn, 0xD7 is not the upper case
__ lis($src2$$Register, (signed short)0xD6C0);
__ ori($src2$$Register, $src2$$Register, 0xDED8);
// compare src1 with ranges 0xC0 to 0xD6 and 0xD8 to 0xDE
__ cmprb($crx$$CondRegister, 1, $src1$$Register, $src2$$Register);
__ bind(done);
__ setb($dst$$Register, $crx$$CondRegister);
%}
ins_pipe(pipe_class_default);
%}
instruct cmprb_Whitespace_reg_reg(iRegIdst dst, iRegIsrc src1, iRegIsrc src2, flagsReg crx) %{
match(Set dst (Whitespace src1));
effect(TEMP src2, TEMP crx);
ins_cost(4 * DEFAULT_COST);
format %{ "LI $src2, 0x0D09\n\t"
"ADDIS $src2, 0x201C\n\t"
"CMPRB $crx, 1, $src1, $src2\n\t"
"SETB $dst, $crx" %}
size(16);
ins_encode %{
// 0x09 to 0x0D, 0x1C to 0x20
__ li($src2$$Register, 0x0D09);
__ addis($src2$$Register, $src2$$Register, 0x0201C);
// compare src with ranges 0x09 to 0x0D and 0x1C to 0x20
__ cmprb($crx$$CondRegister, 1, $src1$$Register, $src2$$Register);
__ setb($dst$$Register, $crx$$CondRegister);
%}
ins_pipe(pipe_class_default);
%}
//----------Branches---------------------------------------------------------
// Jump
@ -14344,6 +14478,92 @@ instruct vpopcnt4I_reg(vecX dst, vecX src) %{
ins_pipe(pipe_class_default);
%}
// --------------------------------- FMA --------------------------------------
// dst + src1 * src2
instruct vfma4F(vecX dst, vecX src1, vecX src2) %{
match(Set dst (FmaVF dst (Binary src1 src2)));
predicate(n->as_Vector()->length() == 4);
format %{ "XVMADDASP $dst, $src1, $src2" %}
size(4);
ins_encode %{
__ xvmaddasp($dst$$VectorSRegister, $src1$$VectorSRegister, $src2$$VectorSRegister);
%}
ins_pipe(pipe_class_default);
%}
// dst - src1 * src2
instruct vfma4F_neg1(vecX dst, vecX src1, vecX src2) %{
match(Set dst (FmaVF dst (Binary (NegVF src1) src2)));
match(Set dst (FmaVF dst (Binary src1 (NegVF src2))));
predicate(n->as_Vector()->length() == 4);
format %{ "XVNMSUBASP $dst, $src1, $src2" %}
size(4);
ins_encode %{
__ xvnmsubasp($dst$$VectorSRegister, $src1$$VectorSRegister, $src2$$VectorSRegister);
%}
ins_pipe(pipe_class_default);
%}
// - dst + src1 * src2
instruct vfma4F_neg2(vecX dst, vecX src1, vecX src2) %{
match(Set dst (FmaVF (NegVF dst) (Binary src1 src2)));
predicate(n->as_Vector()->length() == 4);
format %{ "XVMSUBASP $dst, $src1, $src2" %}
size(4);
ins_encode %{
__ xvmsubasp($dst$$VectorSRegister, $src1$$VectorSRegister, $src2$$VectorSRegister);
%}
ins_pipe(pipe_class_default);
%}
// dst + src1 * src2
instruct vfma2D(vecX dst, vecX src1, vecX src2) %{
match(Set dst (FmaVD dst (Binary src1 src2)));
predicate(n->as_Vector()->length() == 2);
format %{ "XVMADDADP $dst, $src1, $src2" %}
size(4);
ins_encode %{
__ xvmaddadp($dst$$VectorSRegister, $src1$$VectorSRegister, $src2$$VectorSRegister);
%}
ins_pipe(pipe_class_default);
%}
// dst - src1 * src2
instruct vfma2D_neg1(vecX dst, vecX src1, vecX src2) %{
match(Set dst (FmaVD dst (Binary (NegVD src1) src2)));
match(Set dst (FmaVD dst (Binary src1 (NegVD src2))));
predicate(n->as_Vector()->length() == 2);
format %{ "XVNMSUBADP $dst, $src1, $src2" %}
size(4);
ins_encode %{
__ xvnmsubadp($dst$$VectorSRegister, $src1$$VectorSRegister, $src2$$VectorSRegister);
%}
ins_pipe(pipe_class_default);
%}
// - dst + src1 * src2
instruct vfma2D_neg2(vecX dst, vecX src1, vecX src2) %{
match(Set dst (FmaVD (NegVD dst) (Binary src1 src2)));
predicate(n->as_Vector()->length() == 2);
format %{ "XVMSUBADP $dst, $src1, $src2" %}
size(4);
ins_encode %{
__ xvmsubadp($dst$$VectorSRegister, $src1$$VectorSRegister, $src2$$VectorSRegister);
%}
ins_pipe(pipe_class_default);
%}
//----------Overflow Math Instructions-----------------------------------------

View File

@ -134,11 +134,18 @@ void VM_Version::initialize() {
if (FLAG_IS_DEFAULT(UseCountTrailingZerosInstructionsPPC64)) {
FLAG_SET_ERGO(bool, UseCountTrailingZerosInstructionsPPC64, true);
}
if (FLAG_IS_DEFAULT(UseCharacterCompareIntrinsics)) {
FLAG_SET_ERGO(bool, UseCharacterCompareIntrinsics, true);
}
} else {
if (UseCountTrailingZerosInstructionsPPC64) {
warning("UseCountTrailingZerosInstructionsPPC64 specified, but needs at least Power9.");
FLAG_SET_DEFAULT(UseCountTrailingZerosInstructionsPPC64, false);
}
if (UseCharacterCompareIntrinsics) {
warning("UseCharacterCompareIntrinsics specified, but needs at least Power9.");
FLAG_SET_DEFAULT(UseCharacterCompareIntrinsics, false);
}
}
#endif

View File

@ -46,7 +46,7 @@ void VM_Version_Ext::initialize_cpu_information(void) {
_no_of_threads = _no_of_cores;
_no_of_sockets = _no_of_cores;
snprintf(_cpu_name, CPU_TYPE_DESC_BUF_SIZE, "s390 %s", VM_Version::get_model_string());
snprintf(_cpu_desc, CPU_DETAILED_DESC_BUF_SIZE, "zArch %s", features_string());
snprintf(_cpu_desc, CPU_DETAILED_DESC_BUF_SIZE, "s390 %s", features_string());
_initialized = true;
}

View File

@ -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
@ -311,6 +311,8 @@ inline NativeInstruction* nativeInstruction_at(address address) {
// The NativeCall is an abstraction for accessing/manipulating native call imm32 instructions.
// (used to manipulate inline caches, primitive & dll calls, etc.)
class NativeCall;
inline NativeCall* nativeCall_at(address instr);
inline NativeCall* nativeCall_overwriting_at(address instr,
address destination);

View File

@ -3966,6 +3966,34 @@ void Assembler::vpmovzxwd(XMMRegister dst, XMMRegister src, int vector_len) {
emit_int8((unsigned char)(0xC0 | encode));
}
void Assembler::pmaddwd(XMMRegister dst, XMMRegister src) {
NOT_LP64(assert(VM_Version::supports_sse2(), ""));
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
emit_int8((unsigned char)0xF5);
emit_int8((unsigned char)(0xC0 | encode));
}
void Assembler::vpmaddwd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
assert(vector_len == AVX_128bit ? VM_Version::supports_avx() :
(vector_len == AVX_256bit ? VM_Version::supports_avx2() :
(vector_len == AVX_512bit ? VM_Version::supports_evex() : 0)), "");
InstructionAttr attributes(vector_len, /* rex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* 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)0xF5);
emit_int8((unsigned char)(0xC0 | encode));
}
void Assembler::evpdpwssd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
assert(VM_Version::supports_evex(), "");
assert(VM_Version::supports_vnni(), "must support vnni");
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true);
attributes.set_is_evex_instruction();
int encode = vex_prefix_and_encode(dst->encoding(), nds->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
emit_int8(0x52);
emit_int8((unsigned char)(0xC0 | encode));
}
// generic
void Assembler::pop(Register dst) {
int encode = prefix_and_encode(dst->encoding());
@ -4178,6 +4206,17 @@ void Assembler::psrldq(XMMRegister dst, int shift) {
emit_int8(shift);
}
void Assembler::vpsrldq(XMMRegister dst, XMMRegister src, int shift, int vector_len) {
assert(vector_len == AVX_128bit ? VM_Version::supports_avx() :
vector_len == AVX_256bit ? VM_Version::supports_avx2() :
vector_len == AVX_512bit ? VM_Version::supports_avx512bw() : 0, "");
InstructionAttr attributes(vector_len, /*vex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
int encode = vex_prefix_and_encode(xmm3->encoding(), dst->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
emit_int8(0x73);
emit_int8((unsigned char)(0xC0 | encode));
emit_int8(shift & 0xFF);
}
void Assembler::pslldq(XMMRegister dst, int shift) {
// Shift left 128 bit value in dst XMMRegister by shift number of bytes.
NOT_LP64(assert(VM_Version::supports_sse2(), ""));
@ -4189,6 +4228,17 @@ void Assembler::pslldq(XMMRegister dst, int shift) {
emit_int8(shift);
}
void Assembler::vpslldq(XMMRegister dst, XMMRegister src, int shift, int vector_len) {
assert(vector_len == AVX_128bit ? VM_Version::supports_avx() :
vector_len == AVX_256bit ? VM_Version::supports_avx2() :
vector_len == AVX_512bit ? VM_Version::supports_avx512bw() : 0, "");
InstructionAttr attributes(vector_len, /*vex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
int encode = vex_prefix_and_encode(xmm7->encoding(), dst->encoding(), src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F, &attributes);
emit_int8(0x73);
emit_int8((unsigned char)(0xC0 | encode));
emit_int8(shift & 0xFF);
}
void Assembler::ptest(XMMRegister dst, Address src) {
assert(VM_Version::supports_sse4_1(), "");
assert((UseAVX > 0), "SSE mode requires address alignment 16 bytes");
@ -4200,7 +4250,7 @@ void Assembler::ptest(XMMRegister dst, Address src) {
}
void Assembler::ptest(XMMRegister dst, XMMRegister src) {
assert(VM_Version::supports_sse4_1(), "");
assert(VM_Version::supports_sse4_1() || VM_Version::supports_avx(), "");
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ true, /* no_mask_reg */ true, /* uses_vl */ false);
int encode = simd_prefix_and_encode(dst, xnoreg, src, VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
emit_int8(0x17);

View File

@ -1668,6 +1668,12 @@ private:
void evpmovdb(Address dst, XMMRegister src, int vector_len);
// Multiply add
void pmaddwd(XMMRegister dst, XMMRegister src);
void vpmaddwd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len);
// Multiply add accumulate
void evpdpwssd(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len);
#ifndef _LP64 // no 32bit push/pop on amd64
void popl(Address dst);
#endif
@ -2055,6 +2061,7 @@ private:
void vpsllw(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len);
void vpslld(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len);
void vpsllq(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len);
void vpslldq(XMMRegister dst, XMMRegister src, int shift, int vector_len);
// Logical shift right packed integers
void psrlw(XMMRegister dst, int shift);
@ -2069,6 +2076,7 @@ private:
void vpsrlw(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len);
void vpsrld(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len);
void vpsrlq(XMMRegister dst, XMMRegister src, XMMRegister shift, int vector_len);
void vpsrldq(XMMRegister dst, XMMRegister src, int shift, int vector_len);
void evpsrlvw(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len);
void evpsllvw(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len);

View File

@ -943,12 +943,17 @@ class MacroAssembler: public Assembler {
int iter);
void addm(int disp, Register r1, Register r2);
void gfmul(XMMRegister tmp0, XMMRegister t);
void schoolbookAAD(int i, Register subkeyH, XMMRegister data, XMMRegister tmp0,
XMMRegister tmp1, XMMRegister tmp2, XMMRegister tmp3);
void generateHtbl_one_block(Register htbl);
void generateHtbl_eight_blocks(Register htbl);
public:
void sha256_AVX2(XMMRegister msg, XMMRegister state0, XMMRegister state1, XMMRegister msgtmp0,
XMMRegister msgtmp1, XMMRegister msgtmp2, XMMRegister msgtmp3, XMMRegister msgtmp4,
Register buf, Register state, Register ofs, Register limit, Register rsp,
bool multi_block, XMMRegister shuf_mask);
void avx_ghash(Register state, Register htbl, Register data, Register blocks);
#endif
#ifdef _LP64
@ -1498,6 +1503,15 @@ public:
// 0x11 - multiply upper 64 bits [64:127]
Assembler::vpclmulqdq(dst, nds, src, 0x11);
}
void vpclmullqhqdq(XMMRegister dst, XMMRegister nds, XMMRegister src) {
// 0x10 - multiply nds[0:63] and src[64:127]
Assembler::vpclmulqdq(dst, nds, src, 0x10);
}
void vpclmulhqlqdq(XMMRegister dst, XMMRegister nds, XMMRegister src) {
//0x01 - multiply nds[64:127] and src[0:63]
Assembler::vpclmulqdq(dst, nds, src, 0x01);
}
void evpclmulldq(XMMRegister dst, XMMRegister nds, XMMRegister src, int vector_len) {
// 0x00 - multiply lower 64 bits [0:63]
Assembler::evpclmulqdq(dst, nds, src, 0x00, vector_len);

View File

@ -0,0 +1,324 @@
/*
* Copyright (c) 2018, Intel Corporation.
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "asm/assembler.hpp"
#include "asm/assembler.inline.hpp"
#include "runtime/stubRoutines.hpp"
#include "macroAssembler_x86.hpp"
#ifdef _LP64
// Multiply 128 x 128 bits, using 4 pclmulqdq operations
void MacroAssembler::schoolbookAAD(int i, Register htbl, XMMRegister data,
XMMRegister tmp0, XMMRegister tmp1, XMMRegister tmp2, XMMRegister tmp3) {
movdqu(xmm15, Address(htbl, i * 16));
vpclmulhqlqdq(tmp3, data, xmm15); // 0x01
vpxor(tmp2, tmp2, tmp3, Assembler::AVX_128bit);
vpclmulldq(tmp3, data, xmm15); // 0x00
vpxor(tmp0, tmp0, tmp3, Assembler::AVX_128bit);
vpclmulhdq(tmp3, data, xmm15); // 0x11
vpxor(tmp1, tmp1, tmp3, Assembler::AVX_128bit);
vpclmullqhqdq(tmp3, data, xmm15); // 0x10
vpxor(tmp2, tmp2, tmp3, Assembler::AVX_128bit);
}
// Multiply two 128 bit numbers resulting in a 256 bit value
// Result of the multiplication followed by reduction stored in state
void MacroAssembler::gfmul(XMMRegister tmp0, XMMRegister state) {
const XMMRegister tmp1 = xmm4;
const XMMRegister tmp2 = xmm5;
const XMMRegister tmp3 = xmm6;
const XMMRegister tmp4 = xmm7;
vpclmulldq(tmp1, state, tmp0); //0x00 (a0 * b0)
vpclmulhdq(tmp4, state, tmp0);//0x11 (a1 * b1)
vpclmullqhqdq(tmp2, state, tmp0);//0x10 (a1 * b0)
vpclmulhqlqdq(tmp3, state, tmp0); //0x01 (a0 * b1)
vpxor(tmp2, tmp2, tmp3, Assembler::AVX_128bit); // (a0 * b1) + (a1 * b0)
vpslldq(tmp3, tmp2, 8, Assembler::AVX_128bit);
vpsrldq(tmp2, tmp2, 8, Assembler::AVX_128bit);
vpxor(tmp1, tmp1, tmp3, Assembler::AVX_128bit); // tmp1 and tmp4 hold the result
vpxor(tmp4, tmp4, tmp2, Assembler::AVX_128bit); // of carryless multiplication
// Follows the reduction technique mentioned in
// Shift-XOR reduction described in Gueron-Kounavis May 2010
// First phase of reduction
//
vpslld(xmm8, tmp1, 31, Assembler::AVX_128bit); // packed right shift shifting << 31
vpslld(xmm9, tmp1, 30, Assembler::AVX_128bit); // packed right shift shifting << 30
vpslld(xmm10, tmp1, 25, Assembler::AVX_128bit);// packed right shift shifting << 25
// xor the shifted versions
vpxor(xmm8, xmm8, xmm9, Assembler::AVX_128bit);
vpxor(xmm8, xmm8, xmm10, Assembler::AVX_128bit);
vpslldq(xmm9, xmm8, 12, Assembler::AVX_128bit);
vpsrldq(xmm8, xmm8, 4, Assembler::AVX_128bit);
vpxor(tmp1, tmp1, xmm9, Assembler::AVX_128bit);// first phase of the reduction complete
//
// Second phase of the reduction
//
vpsrld(xmm9, tmp1, 1, Assembler::AVX_128bit);// packed left shifting >> 1
vpsrld(xmm10, tmp1, 2, Assembler::AVX_128bit);// packed left shifting >> 2
vpsrld(xmm11, tmp1, 7, Assembler::AVX_128bit);// packed left shifting >> 7
vpxor(xmm9, xmm9, xmm10, Assembler::AVX_128bit);// xor the shifted versions
vpxor(xmm9, xmm9, xmm11, Assembler::AVX_128bit);
vpxor(xmm9, xmm9, xmm8, Assembler::AVX_128bit);
vpxor(tmp1, tmp1, xmm9, Assembler::AVX_128bit);
vpxor(state, tmp4, tmp1, Assembler::AVX_128bit);// the result is in state
ret(0);
}
// This method takes the subkey after expansion as input and generates 1 * 16 power of subkey H.
// The power of H is used in reduction process for one block ghash
void MacroAssembler::generateHtbl_one_block(Register htbl) {
const XMMRegister t = xmm13;
// load the original subkey hash
movdqu(t, Address(htbl, 0));
// shuffle using long swap mask
movdqu(xmm10, ExternalAddress(StubRoutines::x86::ghash_long_swap_mask_addr()));
vpshufb(t, t, xmm10, Assembler::AVX_128bit);
// Compute H' = GFMUL(H, 2)
vpsrld(xmm3, t, 7, Assembler::AVX_128bit);
movdqu(xmm4, ExternalAddress(StubRoutines::x86::ghash_shufflemask_addr()));
vpshufb(xmm3, xmm3, xmm4, Assembler::AVX_128bit);
movl(rax, 0xff00);
movdl(xmm4, rax);
vpshufb(xmm4, xmm4, xmm3, Assembler::AVX_128bit);
movdqu(xmm5, ExternalAddress(StubRoutines::x86::ghash_polynomial_addr()));
vpand(xmm5, xmm5, xmm4, Assembler::AVX_128bit);
vpsrld(xmm3, t, 31, Assembler::AVX_128bit);
vpslld(xmm4, t, 1, Assembler::AVX_128bit);
vpslldq(xmm3, xmm3, 4, Assembler::AVX_128bit);
vpxor(t, xmm4, xmm3, Assembler::AVX_128bit);// t holds p(x) <<1 or H * 2
//Adding p(x)<<1 to xmm5 which holds the reduction polynomial
vpxor(t, t, xmm5, Assembler::AVX_128bit);
movdqu(Address(htbl, 1 * 16), t); // H * 2
ret(0);
}
// This method takes the subkey after expansion as input and generates the remaining powers of subkey H.
// The power of H is used in reduction process for eight block ghash
void MacroAssembler::generateHtbl_eight_blocks(Register htbl) {
const XMMRegister t = xmm13;
const XMMRegister tmp0 = xmm1;
Label GFMUL;
movdqu(t, Address(htbl, 1 * 16));
movdqu(tmp0, t);
// tmp0 and t hold H. Now we compute powers of H by using GFMUL(H, H)
call(GFMUL, relocInfo::none);
movdqu(Address(htbl, 2 * 16), t); //H ^ 2 * 2
call(GFMUL, relocInfo::none);
movdqu(Address(htbl, 3 * 16), t); //H ^ 3 * 2
call(GFMUL, relocInfo::none);
movdqu(Address(htbl, 4 * 16), t); //H ^ 4 * 2
call(GFMUL, relocInfo::none);
movdqu(Address(htbl, 5 * 16), t); //H ^ 5 * 2
call(GFMUL, relocInfo::none);
movdqu(Address(htbl, 6 * 16), t); //H ^ 6 * 2
call(GFMUL, relocInfo::none);
movdqu(Address(htbl, 7 * 16), t); //H ^ 7 * 2
call(GFMUL, relocInfo::none);
movdqu(Address(htbl, 8 * 16), t); //H ^ 8 * 2
ret(0);
bind(GFMUL);
gfmul(tmp0, t);
}
// Multiblock and single block GHASH computation using Shift XOR reduction technique
void MacroAssembler::avx_ghash(Register input_state, Register htbl,
Register input_data, Register blocks) {
// temporary variables to hold input data and input state
const XMMRegister data = xmm1;
const XMMRegister state = xmm0;
// temporary variables to hold intermediate results
const XMMRegister tmp0 = xmm3;
const XMMRegister tmp1 = xmm4;
const XMMRegister tmp2 = xmm5;
const XMMRegister tmp3 = xmm6;
// temporary variables to hold byte and long swap masks
const XMMRegister bswap_mask = xmm2;
const XMMRegister lswap_mask = xmm14;
Label GENERATE_HTBL_1_BLK, GENERATE_HTBL_8_BLKS, BEGIN_PROCESS, GFMUL, BLOCK8_REDUCTION,
ONE_BLK_INIT, PROCESS_1_BLOCK, PROCESS_8_BLOCKS, SAVE_STATE, EXIT_GHASH;
testptr(blocks, blocks);
jcc(Assembler::zero, EXIT_GHASH);
// Check if Hashtable (1*16) has been already generated
// For anything less than 8 blocks, we generate only the first power of H.
movdqu(tmp2, Address(htbl, 1 * 16));
ptest(tmp2, tmp2);
jcc(Assembler::notZero, BEGIN_PROCESS);
call(GENERATE_HTBL_1_BLK, relocInfo::none);
// Shuffle the input state
bind(BEGIN_PROCESS);
movdqu(lswap_mask, ExternalAddress(StubRoutines::x86::ghash_long_swap_mask_addr()));
movdqu(state, Address(input_state, 0));
vpshufb(state, state, lswap_mask, Assembler::AVX_128bit);
cmpl(blocks, 8);
jcc(Assembler::below, ONE_BLK_INIT);
// If we have 8 blocks or more data, then generate remaining powers of H
movdqu(tmp2, Address(htbl, 8 * 16));
ptest(tmp2, tmp2);
jcc(Assembler::notZero, PROCESS_8_BLOCKS);
call(GENERATE_HTBL_8_BLKS, relocInfo::none);
//Do 8 multiplies followed by a reduction processing 8 blocks of data at a time
//Each block = 16 bytes.
bind(PROCESS_8_BLOCKS);
subl(blocks, 8);
movdqu(bswap_mask, ExternalAddress(StubRoutines::x86::ghash_byte_swap_mask_addr()));
movdqu(data, Address(input_data, 16 * 7));
vpshufb(data, data, bswap_mask, Assembler::AVX_128bit);
//Loading 1*16 as calculated powers of H required starts at that location.
movdqu(xmm15, Address(htbl, 1 * 16));
//Perform carryless multiplication of (H*2, data block #7)
vpclmulhqlqdq(tmp2, data, xmm15);//a0 * b1
vpclmulldq(tmp0, data, xmm15);//a0 * b0
vpclmulhdq(tmp1, data, xmm15);//a1 * b1
vpclmullqhqdq(tmp3, data, xmm15);//a1* b0
vpxor(tmp2, tmp2, tmp3, Assembler::AVX_128bit);// (a0 * b1) + (a1 * b0)
movdqu(data, Address(input_data, 16 * 6));
vpshufb(data, data, bswap_mask, Assembler::AVX_128bit);
// Perform carryless multiplication of (H^2 * 2, data block #6)
schoolbookAAD(2, htbl, data, tmp0, tmp1, tmp2, tmp3);
movdqu(data, Address(input_data, 16 * 5));
vpshufb(data, data, bswap_mask, Assembler::AVX_128bit);
// Perform carryless multiplication of (H^3 * 2, data block #5)
schoolbookAAD(3, htbl, data, tmp0, tmp1, tmp2, tmp3);
movdqu(data, Address(input_data, 16 * 4));
vpshufb(data, data, bswap_mask, Assembler::AVX_128bit);
// Perform carryless multiplication of (H^4 * 2, data block #4)
schoolbookAAD(4, htbl, data, tmp0, tmp1, tmp2, tmp3);
movdqu(data, Address(input_data, 16 * 3));
vpshufb(data, data, bswap_mask, Assembler::AVX_128bit);
// Perform carryless multiplication of (H^5 * 2, data block #3)
schoolbookAAD(5, htbl, data, tmp0, tmp1, tmp2, tmp3);
movdqu(data, Address(input_data, 16 * 2));
vpshufb(data, data, bswap_mask, Assembler::AVX_128bit);
// Perform carryless multiplication of (H^6 * 2, data block #2)
schoolbookAAD(6, htbl, data, tmp0, tmp1, tmp2, tmp3);
movdqu(data, Address(input_data, 16 * 1));
vpshufb(data, data, bswap_mask, Assembler::AVX_128bit);
// Perform carryless multiplication of (H^7 * 2, data block #1)
schoolbookAAD(7, htbl, data, tmp0, tmp1, tmp2, tmp3);
movdqu(data, Address(input_data, 16 * 0));
// xor data block#0 with input state before perfoming carry-less multiplication
vpshufb(data, data, bswap_mask, Assembler::AVX_128bit);
vpxor(data, data, state, Assembler::AVX_128bit);
// Perform carryless multiplication of (H^8 * 2, data block #0)
schoolbookAAD(8, htbl, data, tmp0, tmp1, tmp2, tmp3);
vpslldq(tmp3, tmp2, 8, Assembler::AVX_128bit);
vpsrldq(tmp2, tmp2, 8, Assembler::AVX_128bit);
vpxor(tmp0, tmp0, tmp3, Assembler::AVX_128bit);// tmp0, tmp1 contains aggregated results of
vpxor(tmp1, tmp1, tmp2, Assembler::AVX_128bit);// the multiplication operation
// we have the 2 128-bit partially accumulated multiplication results in tmp0:tmp1
// with higher 128-bit in tmp1 and lower 128-bit in corresponding tmp0
// Follows the reduction technique mentioned in
// Shift-XOR reduction described in Gueron-Kounavis May 2010
bind(BLOCK8_REDUCTION);
// First Phase of the reduction
vpslld(xmm8, tmp0, 31, Assembler::AVX_128bit); // packed right shifting << 31
vpslld(xmm9, tmp0, 30, Assembler::AVX_128bit); // packed right shifting << 30
vpslld(xmm10, tmp0, 25, Assembler::AVX_128bit); // packed right shifting << 25
// xor the shifted versions
vpxor(xmm8, xmm8, xmm10, Assembler::AVX_128bit);
vpxor(xmm8, xmm8, xmm9, Assembler::AVX_128bit);
vpslldq(xmm9, xmm8, 12, Assembler::AVX_128bit);
vpsrldq(xmm8, xmm8, 4, Assembler::AVX_128bit);
vpxor(tmp0, tmp0, xmm9, Assembler::AVX_128bit); // first phase of reduction is complete
// second phase of the reduction
vpsrld(xmm9, tmp0, 1, Assembler::AVX_128bit); // packed left shifting >> 1
vpsrld(xmm10, tmp0, 2, Assembler::AVX_128bit); // packed left shifting >> 2
vpsrld(tmp2, tmp0, 7, Assembler::AVX_128bit); // packed left shifting >> 7
// xor the shifted versions
vpxor(xmm9, xmm9, xmm10, Assembler::AVX_128bit);
vpxor(xmm9, xmm9, tmp2, Assembler::AVX_128bit);
vpxor(xmm9, xmm9, xmm8, Assembler::AVX_128bit);
vpxor(tmp0, xmm9, tmp0, Assembler::AVX_128bit);
// Final result is in state
vpxor(state, tmp0, tmp1, Assembler::AVX_128bit);
lea(input_data, Address(input_data, 16 * 8));
cmpl(blocks, 8);
jcc(Assembler::below, ONE_BLK_INIT);
jmp(PROCESS_8_BLOCKS);
// Since this is one block operation we will only use H * 2 i.e. the first power of H
bind(ONE_BLK_INIT);
movdqu(tmp0, Address(htbl, 1 * 16));
movdqu(bswap_mask, ExternalAddress(StubRoutines::x86::ghash_byte_swap_mask_addr()));
//Do one (128 bit x 128 bit) carry-less multiplication at a time followed by a reduction.
bind(PROCESS_1_BLOCK);
cmpl(blocks, 0);
jcc(Assembler::equal, SAVE_STATE);
subl(blocks, 1);
movdqu(data, Address(input_data, 0));
vpshufb(data, data, bswap_mask, Assembler::AVX_128bit);
vpxor(state, state, data, Assembler::AVX_128bit);
// gfmul(H*2, state)
call(GFMUL, relocInfo::none);
addptr(input_data, 16);
jmp(PROCESS_1_BLOCK);
bind(SAVE_STATE);
vpshufb(state, state, lswap_mask, Assembler::AVX_128bit);
movdqu(Address(input_state, 0), state);
jmp(EXIT_GHASH);
bind(GFMUL);
gfmul(tmp0, state);
bind(GENERATE_HTBL_1_BLK);
generateHtbl_one_block(htbl);
bind(GENERATE_HTBL_8_BLKS);
generateHtbl_eight_blocks(htbl);
bind(EXIT_GHASH);
// zero out xmm registers used for Htbl storage
vpxor(xmm0, xmm0, xmm0, Assembler::AVX_128bit);
vpxor(xmm1, xmm1, xmm1, Assembler::AVX_128bit);
vpxor(xmm3, xmm3, xmm3, Assembler::AVX_128bit);
vpxor(xmm15, xmm15, xmm15, Assembler::AVX_128bit);
}
#endif // _LP64

View File

@ -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
@ -149,6 +149,7 @@ inline NativePltCall* nativePltCall_before(address addr) {
return nativePltCall_at(at);
}
class NativeCall;
inline NativeCall* nativeCall_at(address address);
// The NativeCall is an abstraction for accessing/manipulating native call imm32/rel32off
// instructions (used to manipulate inline caches, primitive & dll calls, etc.).

View File

@ -4388,6 +4388,45 @@ address generate_cipherBlockChaining_decryptVectorAESCrypt() {
return start;
}
// Polynomial x^128+x^127+x^126+x^121+1
address ghash_polynomial_addr() {
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines", "_ghash_poly_addr");
address start = __ pc();
__ emit_data64(0x0000000000000001, relocInfo::none);
__ emit_data64(0xc200000000000000, relocInfo::none);
return start;
}
address ghash_shufflemask_addr() {
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines", "_ghash_shuffmask_addr");
address start = __ pc();
__ emit_data64(0x0f0f0f0f0f0f0f0f, relocInfo::none);
__ emit_data64(0x0f0f0f0f0f0f0f0f, relocInfo::none);
return start;
}
// Ghash single and multi block operations using AVX instructions
address generate_avx_ghash_processBlocks() {
__ align(CodeEntryAlignment);
StubCodeMark mark(this, "StubRoutines", "ghash_processBlocks");
address start = __ pc();
// arguments
const Register state = c_rarg0;
const Register htbl = c_rarg1;
const Register data = c_rarg2;
const Register blocks = c_rarg3;
__ enter();
// Save state before entering routine
__ avx_ghash(state, htbl, data, blocks);
__ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0);
return start;
}
// byte swap x86 long
address generate_ghash_long_swap_mask() {
__ align(CodeEntryAlignment);
@ -5886,9 +5925,15 @@ address generate_cipherBlockChaining_decryptVectorAESCrypt() {
// Generate GHASH intrinsics code
if (UseGHASHIntrinsics) {
StubRoutines::x86::_ghash_long_swap_mask_addr = generate_ghash_long_swap_mask();
StubRoutines::x86::_ghash_byte_swap_mask_addr = generate_ghash_byte_swap_mask();
StubRoutines::_ghash_processBlocks = generate_ghash_processBlocks();
StubRoutines::x86::_ghash_long_swap_mask_addr = generate_ghash_long_swap_mask();
StubRoutines::x86::_ghash_byte_swap_mask_addr = generate_ghash_byte_swap_mask();
if (VM_Version::supports_avx()) {
StubRoutines::x86::_ghash_shuffmask_addr = ghash_shufflemask_addr();
StubRoutines::x86::_ghash_poly_addr = ghash_polynomial_addr();
StubRoutines::_ghash_processBlocks = generate_avx_ghash_processBlocks();
} else {
StubRoutines::_ghash_processBlocks = generate_ghash_processBlocks();
}
}
if (UseBASE64Intrinsics) {

View File

@ -38,6 +38,8 @@ address StubRoutines::x86::_key_shuffle_mask_addr = NULL;
address StubRoutines::x86::_counter_shuffle_mask_addr = NULL;
address StubRoutines::x86::_ghash_long_swap_mask_addr = NULL;
address StubRoutines::x86::_ghash_byte_swap_mask_addr = NULL;
address StubRoutines::x86::_ghash_poly_addr = NULL;
address StubRoutines::x86::_ghash_shuffmask_addr = NULL;
address StubRoutines::x86::_upper_word_mask_addr = NULL;
address StubRoutines::x86::_shuffle_byte_flip_mask_addr = NULL;
address StubRoutines::x86::_k256_adr = NULL;

View File

@ -128,6 +128,8 @@ class x86 {
// swap mask for ghash
static address _ghash_long_swap_mask_addr;
static address _ghash_byte_swap_mask_addr;
static address _ghash_poly_addr;
static address _ghash_shuffmask_addr;
// upper word mask for sha1
static address _upper_word_mask_addr;
@ -205,6 +207,8 @@ class x86 {
static address crc_by128_masks_addr() { return (address)_crc_by128_masks; }
static address ghash_long_swap_mask_addr() { return _ghash_long_swap_mask_addr; }
static address ghash_byte_swap_mask_addr() { return _ghash_byte_swap_mask_addr; }
static address ghash_shufflemask_addr() { return _ghash_shuffmask_addr; }
static address ghash_polynomial_addr() { return _ghash_poly_addr; }
static address upper_word_mask_addr() { return _upper_word_mask_addr; }
static address shuffle_byte_flip_mask_addr() { return _shuffle_byte_flip_mask_addr; }
static address k256_addr() { return _k256_adr; }

View File

@ -582,8 +582,9 @@ void TemplateTable::condy_helper(Label& Done) {
__ cmpl(flags, ltos);
__ jcc(Assembler::notEqual, notLong);
// ltos
__ movptr(rax, field);
// Loading high word first because movptr clobbers rax
NOT_LP64(__ movptr(rdx, field.plus_disp(4)));
__ movptr(rax, field);
__ push(ltos);
__ jmp(Done);

View File

@ -1289,7 +1289,7 @@ void VM_Version::get_processor_features() {
if (FLAG_IS_DEFAULT(UseXMMForArrayCopy)) {
UseXMMForArrayCopy = true; // use SSE2 movq on new Intel cpus
}
if (supports_sse4_2() && supports_ht()) { // Newest Intel cpus
if ((supports_sse4_2() && supports_ht()) || supports_avx()) { // Newest Intel cpus
if (FLAG_IS_DEFAULT(UseUnalignedLoadStores)) {
UseUnalignedLoadStores = true; // use movdqu on newest Intel cpus
}

View File

@ -336,6 +336,7 @@ protected:
#define CPU_AVX512_VPOPCNTDQ ((uint64_t)UCONST64(0x2000000000)) // Vector popcount
#define CPU_VPCLMULQDQ ((uint64_t)UCONST64(0x4000000000)) //Vector carryless multiplication
#define CPU_VAES ((uint64_t)UCONST64(0x8000000000)) // Vector AES instructions
#define CPU_VNNI ((uint64_t)UCONST64(0x16000000000)) // Vector Neural Network Instructions
enum Extended_Family {
// AMD
@ -548,6 +549,8 @@ protected:
result |= CPU_VPCLMULQDQ;
if (_cpuid_info.sef_cpuid7_ecx.bits.vaes != 0)
result |= CPU_VAES;
if (_cpuid_info.sef_cpuid7_ecx.bits.avx512_vnni != 0)
result |= CPU_VNNI;
}
}
if(_cpuid_info.sef_cpuid7_ebx.bits.bmi1 != 0)
@ -828,6 +831,7 @@ public:
static bool supports_vpopcntdq() { return (_features & CPU_AVX512_VPOPCNTDQ) != 0; }
static bool supports_vpclmulqdq() { return (_features & CPU_VPCLMULQDQ) != 0; }
static bool supports_vaes() { return (_features & CPU_VAES) != 0; }
static bool supports_vnni() { return (_features & CPU_VNNI) != 0; }
// Intel features
static bool is_intel_family_core() { return is_intel() &&

View File

@ -1446,6 +1446,10 @@ const bool Matcher::match_rule_supported(int opcode) {
if (VM_Version::supports_on_spin_wait() == false)
ret_value = false;
break;
case Op_MulAddVS2VI:
if (UseSSE < 2)
ret_value = false;
break;
}
return ret_value; // Per default match rules are supported.
@ -9855,6 +9859,118 @@ instruct vfma16F_mem(vecZ a, memory b, vecZ c) %{
ins_pipe( pipe_slow );
%}
// --------------------------------- Vector Multiply Add --------------------------------------
instruct smuladd4S2I_reg(vecD dst, vecD src1) %{
predicate(UseSSE >= 2 && UseAVX == 0 && n->as_Vector()->length() == 2);
match(Set dst (MulAddVS2VI dst src1));
format %{ "pmaddwd $dst,$dst,$src1\t! muladd packed4Sto2I" %}
ins_encode %{
__ pmaddwd($dst$$XMMRegister, $src1$$XMMRegister);
%}
ins_pipe( pipe_slow );
%}
instruct vmuladd4S2I_reg(vecD dst, vecD src1, vecD src2) %{
predicate(UseAVX > 0 && n->as_Vector()->length() == 2);
match(Set dst (MulAddVS2VI src1 src2));
format %{ "vpmaddwd $dst,$src1,$src2\t! muladd packed4Sto2I" %}
ins_encode %{
int vector_len = 0;
__ vpmaddwd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister, vector_len);
%}
ins_pipe( pipe_slow );
%}
instruct smuladd8S4I_reg(vecX dst, vecX src1) %{
predicate(UseSSE >= 2 && UseAVX == 0 && n->as_Vector()->length() == 4);
match(Set dst (MulAddVS2VI dst src1));
format %{ "pmaddwd $dst,$dst,$src1\t! muladd packed8Sto4I" %}
ins_encode %{
__ pmaddwd($dst$$XMMRegister, $src1$$XMMRegister);
%}
ins_pipe( pipe_slow );
%}
instruct vmuladd8S4I_reg(vecX dst, vecX src1, vecX src2) %{
predicate(UseAVX > 0 && n->as_Vector()->length() == 4);
match(Set dst (MulAddVS2VI src1 src2));
format %{ "vpmaddwd $dst,$src1,$src2\t! muladd packed8Sto4I" %}
ins_encode %{
int vector_len = 0;
__ vpmaddwd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister, vector_len);
%}
ins_pipe( pipe_slow );
%}
instruct vmuladd16S8I_reg(vecY dst, vecY src1, vecY src2) %{
predicate(UseAVX > 1 && n->as_Vector()->length() == 8);
match(Set dst (MulAddVS2VI src1 src2));
format %{ "vpmaddwd $dst,$src1,$src2\t! muladd packed16Sto8I" %}
ins_encode %{
int vector_len = 1;
__ vpmaddwd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister, vector_len);
%}
ins_pipe( pipe_slow );
%}
instruct vmuladd32S16I_reg(vecZ dst, vecZ src1, vecZ src2) %{
predicate(UseAVX > 2 && n->as_Vector()->length() == 16);
match(Set dst (MulAddVS2VI src1 src2));
format %{ "vpmaddwd $dst,$src1,$src2\t! muladd packed32Sto16I" %}
ins_encode %{
int vector_len = 2;
__ vpmaddwd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister, vector_len);
%}
ins_pipe( pipe_slow );
%}
// --------------------------------- Vector Multiply Add Add ----------------------------------
instruct vmuladdadd4S2I_reg(vecD dst, vecD src1, vecD src2) %{
predicate(VM_Version::supports_vnni() && UseAVX > 2 && n->as_Vector()->length() == 2);
match(Set dst (AddVI (MulAddVS2VI src1 src2) dst));
format %{ "evpdpwssd $dst,$src1,$src2\t! muladdadd packed4Sto2I" %}
ins_encode %{
int vector_len = 0;
__ evpdpwssd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister, vector_len);
%}
ins_pipe( pipe_slow );
%}
instruct vmuladdadd8S4I_reg(vecX dst, vecX src1, vecX src2) %{
predicate(VM_Version::supports_vnni() && UseAVX > 2 && n->as_Vector()->length() == 4);
match(Set dst (AddVI (MulAddVS2VI src1 src2) dst));
format %{ "evpdpwssd $dst,$src1,$src2\t! muladdadd packed8Sto4I" %}
ins_encode %{
int vector_len = 0;
__ evpdpwssd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister, vector_len);
%}
ins_pipe( pipe_slow );
%}
instruct vmuladdadd16S8I_reg(vecY dst, vecY src1, vecY src2) %{
predicate(VM_Version::supports_vnni() && UseAVX > 2 && n->as_Vector()->length() == 8);
match(Set dst (AddVI (MulAddVS2VI src1 src2) dst));
format %{ "evpdpwssd $dst,$src1,$src2\t! muladdadd packed16Sto8I" %}
ins_encode %{
int vector_len = 1;
__ evpdpwssd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister, vector_len);
%}
ins_pipe( pipe_slow );
%}
instruct vmuladdadd32S16I_reg(vecZ dst, vecZ src1, vecZ src2) %{
predicate(VM_Version::supports_vnni() && UseAVX > 2 && n->as_Vector()->length() == 16);
match(Set dst (AddVI (MulAddVS2VI src1 src2) dst));
format %{ "evpdpwssd $dst,$src1,$src2\t! muladdadd packed32Sto16I" %}
ins_encode %{
int vector_len = 2;
__ evpdpwssd($dst$$XMMRegister, $src1$$XMMRegister, $src2$$XMMRegister, vector_len);
%}
ins_pipe( pipe_slow );
%}
// --------------------------------- PopCount --------------------------------------
instruct vpopcount2I(vecD dst, vecD src) %{

View File

@ -7755,6 +7755,16 @@ instruct mulI(rRegI dst, memory src, eFlagsReg cr) %{
ins_pipe( ialu_reg_mem_alu0 );
%}
instruct mulAddS2I_rReg(rRegI dst, rRegI src1, rRegI src2, rRegI src3, eFlagsReg cr)
%{
match(Set dst (MulAddS2I (Binary dst src1) (Binary src2 src3)));
effect(KILL cr, KILL src2);
expand %{ mulI_eReg(dst, src1, cr);
mulI_eReg(src2, src3, cr);
addI_eReg(dst, src2, cr); %}
%}
// Multiply Register Int to Long
instruct mulI2L(eADXRegL dst, eAXRegI src, nadxRegI src1, eFlagsReg flags) %{
// Basic Idea: long = (long)int * (long)int

View File

@ -4265,132 +4265,196 @@ operand cmpOpUCF2() %{
// Operands for bound floating pointer register arguments
operand rxmm0() %{
constraint(ALLOC_IN_RC(xmm0_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX<= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm0_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm1() %{
constraint(ALLOC_IN_RC(xmm1_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm1_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm2() %{
constraint(ALLOC_IN_RC(xmm2_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm2_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm3() %{
constraint(ALLOC_IN_RC(xmm3_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm3_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm4() %{
constraint(ALLOC_IN_RC(xmm4_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm4_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm5() %{
constraint(ALLOC_IN_RC(xmm5_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm5_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm6() %{
constraint(ALLOC_IN_RC(xmm6_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm6_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm7() %{
constraint(ALLOC_IN_RC(xmm7_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm7_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm8() %{
constraint(ALLOC_IN_RC(xmm8_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm8_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm9() %{
constraint(ALLOC_IN_RC(xmm9_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm9_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm10() %{
constraint(ALLOC_IN_RC(xmm10_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm10_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm11() %{
constraint(ALLOC_IN_RC(xmm11_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm11_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm12() %{
constraint(ALLOC_IN_RC(xmm12_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm12_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm13() %{
constraint(ALLOC_IN_RC(xmm13_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm13_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm14() %{
constraint(ALLOC_IN_RC(xmm14_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm14_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm15() %{
constraint(ALLOC_IN_RC(xmm15_reg)); match(VecX);
predicate((UseSSE > 0) && (UseAVX <= 2)); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm15_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm16() %{
constraint(ALLOC_IN_RC(xmm16_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm16_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm17() %{
constraint(ALLOC_IN_RC(xmm17_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm17_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm18() %{
constraint(ALLOC_IN_RC(xmm18_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm18_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm19() %{
constraint(ALLOC_IN_RC(xmm19_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm19_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm20() %{
constraint(ALLOC_IN_RC(xmm20_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm20_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm21() %{
constraint(ALLOC_IN_RC(xmm21_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm21_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm22() %{
constraint(ALLOC_IN_RC(xmm22_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm22_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm23() %{
constraint(ALLOC_IN_RC(xmm23_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm23_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm24() %{
constraint(ALLOC_IN_RC(xmm24_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm24_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm25() %{
constraint(ALLOC_IN_RC(xmm25_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm25_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm26() %{
constraint(ALLOC_IN_RC(xmm26_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm26_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm27() %{
constraint(ALLOC_IN_RC(xmm27_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm27_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm28() %{
constraint(ALLOC_IN_RC(xmm28_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm28_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm29() %{
constraint(ALLOC_IN_RC(xmm29_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm29_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm30() %{
constraint(ALLOC_IN_RC(xmm30_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm30_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
operand rxmm31() %{
constraint(ALLOC_IN_RC(xmm31_reg)); match(VecX);
predicate(UseAVX == 3); format%{%} interface(REG_INTER);
constraint(ALLOC_IN_RC(xmm31_reg));
match(VecX);
format%{%}
interface(REG_INTER);
%}
//----------OPERAND CLASSES----------------------------------------------------
@ -8175,6 +8239,16 @@ instruct mulI_mem_imm(rRegI dst, memory src, immI imm, rFlagsReg cr)
ins_pipe(ialu_reg_mem_alu0);
%}
instruct mulAddS2I_rReg(rRegI dst, rRegI src1, rRegI src2, rRegI src3, rFlagsReg cr)
%{
match(Set dst (MulAddS2I (Binary dst src1) (Binary src2 src3)));
effect(KILL cr, KILL src2);
expand %{ mulI_rReg(dst, src1, cr);
mulI_rReg(src2, src3, cr);
addI_rReg(dst, src2, cr); %}
%}
instruct mulL_rReg(rRegL dst, rRegL src, rFlagsReg cr)
%{
match(Set dst (MulL dst src));
@ -12641,33 +12715,6 @@ instruct RethrowException()
// Execute ZGC load barrier (strong) slow path
//
// When running without XMM regs
instruct loadBarrierSlowRegNoVec(rRegP dst, memory mem, rFlagsReg cr) %{
match(Set dst (LoadBarrierSlowReg mem));
predicate(MaxVectorSize < 16);
effect(DEF dst, KILL cr);
format %{"LoadBarrierSlowRegNoVec $dst, $mem" %}
ins_encode %{
#if INCLUDE_ZGC
Register d = $dst$$Register;
ZBarrierSetAssembler* bs = (ZBarrierSetAssembler*)BarrierSet::barrier_set()->barrier_set_assembler();
assert(d != r12, "Can't be R12!");
assert(d != r15, "Can't be R15!");
assert(d != rsp, "Can't be RSP!");
__ lea(d, $mem$$Address);
__ call(RuntimeAddress(bs->load_barrier_slow_stub(d)));
#else
ShouldNotReachHere();
#endif
%}
ins_pipe(pipe_slow);
%}
// For XMM and YMM enabled processors
instruct loadBarrierSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
@ -12676,7 +12723,7 @@ instruct loadBarrierSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15) %{
match(Set dst (LoadBarrierSlowReg mem));
predicate((UseSSE > 0) && (UseAVX <= 2) && (MaxVectorSize >= 16));
predicate(UseAVX <= 2);
effect(DEF dst, KILL cr,
KILL x0, KILL x1, KILL x2, KILL x3,
@ -12684,7 +12731,7 @@ instruct loadBarrierSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
KILL x8, KILL x9, KILL x10, KILL x11,
KILL x12, KILL x13, KILL x14, KILL x15);
format %{"LoadBarrierSlowRegXmm $dst, $mem" %}
format %{"LoadBarrierSlowRegXmmAndYmm $dst, $mem" %}
ins_encode %{
#if INCLUDE_ZGC
Register d = $dst$$Register;
@ -12715,7 +12762,7 @@ instruct loadBarrierSlowRegZmm(rRegP dst, memory mem, rFlagsReg cr,
rxmm28 x28, rxmm29 x29, rxmm30 x30, rxmm31 x31) %{
match(Set dst (LoadBarrierSlowReg mem));
predicate((UseAVX == 3) && (MaxVectorSize >= 16));
predicate(UseAVX == 3);
effect(DEF dst, KILL cr,
KILL x0, KILL x1, KILL x2, KILL x3,
@ -12750,33 +12797,6 @@ instruct loadBarrierSlowRegZmm(rRegP dst, memory mem, rFlagsReg cr,
// Execute ZGC load barrier (weak) slow path
//
// When running without XMM regs
instruct loadBarrierWeakSlowRegNoVec(rRegP dst, memory mem, rFlagsReg cr) %{
match(Set dst (LoadBarrierSlowReg mem));
predicate(MaxVectorSize < 16);
effect(DEF dst, KILL cr);
format %{"LoadBarrierSlowRegNoVec $dst, $mem" %}
ins_encode %{
#if INCLUDE_ZGC
Register d = $dst$$Register;
ZBarrierSetAssembler* bs = (ZBarrierSetAssembler*)BarrierSet::barrier_set()->barrier_set_assembler();
assert(d != r12, "Can't be R12!");
assert(d != r15, "Can't be R15!");
assert(d != rsp, "Can't be RSP!");
__ lea(d, $mem$$Address);
__ call(RuntimeAddress(bs->load_barrier_weak_slow_stub(d)));
#else
ShouldNotReachHere();
#endif
%}
ins_pipe(pipe_slow);
%}
// For XMM and YMM enabled processors
instruct loadBarrierWeakSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
rxmm0 x0, rxmm1 x1, rxmm2 x2,rxmm3 x3,
@ -12785,7 +12805,7 @@ instruct loadBarrierWeakSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
rxmm12 x12, rxmm13 x13, rxmm14 x14, rxmm15 x15) %{
match(Set dst (LoadBarrierWeakSlowReg mem));
predicate((UseSSE > 0) && (UseAVX <= 2) && (MaxVectorSize >= 16));
predicate(UseAVX <= 2);
effect(DEF dst, KILL cr,
KILL x0, KILL x1, KILL x2, KILL x3,
@ -12793,7 +12813,7 @@ instruct loadBarrierWeakSlowRegXmmAndYmm(rRegP dst, memory mem, rFlagsReg cr,
KILL x8, KILL x9, KILL x10, KILL x11,
KILL x12, KILL x13, KILL x14, KILL x15);
format %{"LoadBarrierWeakSlowRegXmm $dst, $mem" %}
format %{"LoadBarrierWeakSlowRegXmmAndYmm $dst, $mem" %}
ins_encode %{
#if INCLUDE_ZGC
Register d = $dst$$Register;
@ -12824,7 +12844,7 @@ instruct loadBarrierWeakSlowRegZmm(rRegP dst, memory mem, rFlagsReg cr,
rxmm28 x28, rxmm29 x29, rxmm30 x30, rxmm31 x31) %{
match(Set dst (LoadBarrierWeakSlowReg mem));
predicate((UseAVX == 3) && (MaxVectorSize >= 16));
predicate(UseAVX == 3);
effect(DEF dst, KILL cr,
KILL x0, KILL x1, KILL x2, KILL x3,

View File

@ -2602,23 +2602,6 @@ size_t os::read_at(int fd, void *buf, unsigned int nBytes, jlong offset) {
return ::pread(fd, buf, nBytes, offset);
}
void os::naked_short_sleep(jlong ms) {
struct timespec req;
assert(ms < 1000, "Un-interruptable sleep, short time use only");
req.tv_sec = 0;
if (ms > 0) {
req.tv_nsec = (ms % 1000) * 1000000;
}
else {
req.tv_nsec = 1;
}
nanosleep(&req, NULL);
return;
}
// Sleep forever; naked call to OS-specific sleep; use with CAUTION
void os::infinite_sleep() {
while (true) { // sleep forever ...

View File

@ -2225,22 +2225,6 @@ size_t os::read_at(int fd, void *buf, unsigned int nBytes, jlong offset) {
RESTARTABLE_RETURN_INT(::pread(fd, buf, nBytes, offset));
}
void os::naked_short_sleep(jlong ms) {
struct timespec req;
assert(ms < 1000, "Un-interruptable sleep, short time use only");
req.tv_sec = 0;
if (ms > 0) {
req.tv_nsec = (ms % 1000) * 1000000;
} else {
req.tv_nsec = 1;
}
nanosleep(&req, NULL);
return;
}
// Sleep forever; naked call to OS-specific sleep; use with CAUTION
void os::infinite_sleep() {
while (true) { // sleep forever ...
@ -2346,14 +2330,13 @@ OSReturn os::set_native_priority(Thread* thread, int newpri) {
#elif defined(__APPLE__) || defined(__NetBSD__)
struct sched_param sp;
int policy;
pthread_t self = pthread_self();
if (pthread_getschedparam(self, &policy, &sp) != 0) {
if (pthread_getschedparam(thread->osthread()->pthread_id(), &policy, &sp) != 0) {
return OS_ERR;
}
sp.sched_priority = newpri;
if (pthread_setschedparam(self, policy, &sp) != 0) {
if (pthread_setschedparam(thread->osthread()->pthread_id(), policy, &sp) != 0) {
return OS_ERR;
}
@ -2377,8 +2360,14 @@ OSReturn os::get_native_priority(const Thread* const thread, int *priority_ptr)
int policy;
struct sched_param sp;
pthread_getschedparam(pthread_self(), &policy, &sp);
*priority_ptr = sp.sched_priority;
int res = pthread_getschedparam(thread->osthread()->pthread_id(), &policy, &sp);
if (res != 0) {
*priority_ptr = -1;
return OS_ERR;
} else {
*priority_ptr = sp.sched_priority;
return OS_OK;
}
#else
*priority_ptr = getpriority(PRIO_PROCESS, thread->osthread()->thread_id());
#endif

View File

@ -705,6 +705,8 @@ static void *thread_native_entry(Thread *thread) {
}
}
assert(osthread->pthread_id() != 0, "pthread_id was not set as expected");
// call one more level start routine
thread->call_run();
@ -1354,9 +1356,11 @@ void os::shutdown() {
void os::abort(bool dump_core, void* siginfo, const void* context) {
os::shutdown();
if (dump_core) {
#if INCLUDE_CDS
if (UseSharedSpaces && DumpPrivateMappingsInCore) {
ClassLoader::close_jrt_image();
}
#endif
#ifndef PRODUCT
fdStream out(defaultStream::output_fd());
out.print_raw("Current thread is ");
@ -4031,33 +4035,6 @@ size_t os::read_at(int fd, void *buf, unsigned int nBytes, jlong offset) {
return ::pread(fd, buf, nBytes, offset);
}
// Short sleep, direct OS call.
//
// Note: certain versions of Linux CFS scheduler (since 2.6.23) do not guarantee
// sched_yield(2) will actually give up the CPU:
//
// * Alone on this pariticular CPU, keeps running.
// * Before the introduction of "skip_buddy" with "compat_yield" disabled
// (pre 2.6.39).
//
// So calling this with 0 is an alternative.
//
void os::naked_short_sleep(jlong ms) {
struct timespec req;
assert(ms < 1000, "Un-interruptable sleep, short time use only");
req.tv_sec = 0;
if (ms > 0) {
req.tv_nsec = (ms % 1000) * 1000000;
} else {
req.tv_nsec = 1;
}
nanosleep(&req, NULL);
return;
}
// Sleep forever; naked call to OS-specific sleep; use with CAUTION
void os::infinite_sleep() {
while (true) { // sleep forever ...
@ -4070,6 +4047,16 @@ bool os::dont_yield() {
return DontYieldALot;
}
// Linux CFS scheduler (since 2.6.23) does not guarantee sched_yield(2) will
// actually give up the CPU. Since skip buddy (v2.6.28):
//
// * Sets the yielding task as skip buddy for current CPU's run queue.
// * Picks next from run queue, if empty, picks a skip buddy (can be the yielding task).
// * Clears skip buddies for this run queue (yielding task no longer a skip buddy).
//
// An alternative is calling os::naked_short_nanosleep with a small number to avoid
// getting re-scheduled immediately.
//
void os::naked_yield() {
sched_yield();
}
@ -5071,13 +5058,15 @@ jint os::init_2(void) {
// initialize thread priority policy
prio_init();
if (!FLAG_IS_DEFAULT(AllocateHeapAt)) {
if (!FLAG_IS_DEFAULT(AllocateHeapAt) || !FLAG_IS_DEFAULT(AllocateOldGenAt)) {
set_coredump_filter(DAX_SHARED_BIT);
}
#if INCLUDE_CDS
if (UseSharedSpaces && DumpPrivateMappingsInCore) {
set_coredump_filter(FILE_BACKED_PVT_BIT);
}
#endif
return JNI_OK;
}

View File

@ -695,6 +695,21 @@ int os::sleep(Thread* thread, jlong millis, bool interruptible) {
}
}
void os::naked_short_nanosleep(jlong ns) {
struct timespec req;
assert(ns > -1 && ns < NANOUNITS, "Un-interruptable sleep, short time use only");
req.tv_sec = 0;
req.tv_nsec = ns;
::nanosleep(&req, NULL);
return;
}
void os::naked_short_sleep(jlong ms) {
assert(ms < MILLIUNITS, "Un-interruptable sleep, short time use only");
os::naked_short_nanosleep(ms * (NANOUNITS / MILLIUNITS));
return;
}
////////////////////////////////////////////////////////////////////////////////
// interrupt support

View File

@ -2871,16 +2871,6 @@ size_t os::restartable_read(int fd, void *buf, unsigned int nBytes) {
return res;
}
void os::naked_short_sleep(jlong ms) {
assert(ms < 1000, "Un-interruptable sleep, short time use only");
// usleep is deprecated and removed from POSIX, in favour of nanosleep, but
// Solaris requires -lrt for this.
usleep((ms * 1000));
return;
}
// Sleep forever; naked call to OS-specific sleep; use with CAUTION
void os::infinite_sleep() {
while (true) { // sleep forever ...

View File

@ -3512,6 +3512,43 @@ void os::naked_short_sleep(jlong ms) {
Sleep(ms);
}
void os::naked_short_nanosleep(jlong ns) {
assert(ns > -1 && ns < NANOUNITS, "Un-interruptable sleep, short time use only");
LARGE_INTEGER hundreds_nanos = { 0 };
HANDLE wait_timer = ::CreateWaitableTimer(NULL /* attributes*/,
true /* manual reset */,
NULL /* name */ );
if (wait_timer == NULL) {
log_warning(os)("Failed to CreateWaitableTimer: %u", GetLastError());
return;
}
// We need a minimum of one hundred nanos.
ns = ns > 100 ? ns : 100;
// Round ns to the nearst hundred of nanos.
// Negative values indicate relative time.
hundreds_nanos.QuadPart = -((ns + 50) / 100);
if (::SetWaitableTimer(wait_timer /* handle */,
&hundreds_nanos /* due time */,
0 /* period */,
NULL /* comp func */,
NULL /* comp func args */,
FALSE /* resume */)) {
DWORD res = ::WaitForSingleObject(wait_timer /* handle */, INFINITE /* timeout */);
if (res != WAIT_OBJECT_0) {
if (res == WAIT_FAILED) {
log_warning(os)("Failed to WaitForSingleObject: %u", GetLastError());
} else {
log_warning(os)("Unexpected return from WaitForSingleObject: %s",
res == WAIT_ABANDONED ? "WAIT_ABANDONED" : "WAIT_TIMEOUT");
}
}
}
::CloseHandle(wait_timer /* handle */);
}
// Sleep forever; naked call to OS-specific sleep; use with CAUTION
void os::infinite_sleep() {
while (true) { // sleep forever ...

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2019, 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.
*
@ -40,6 +40,7 @@ define_pd_global(uintx,JVMInvokeMethodSlack, 8192);
// Used on 64 bit platforms for UseCompressedOops base address
define_pd_global(uintx,HeapBaseMinAddress, 2*G);
class Thread;
extern __thread Thread *aarch64_currentThread;
#endif // OS_CPU_LINUX_AARCH64_VM_GLOBALS_LINUX_AARCH64_HPP

View File

@ -370,7 +370,6 @@ JVM_handle_linux_signal(int sig,
if (thread->on_local_stack(addr)) {
// stack overflow
if (thread->in_stack_yellow_reserved_zone(addr)) {
thread->disable_stack_yellow_reserved_zone();
if (thread->thread_state() == _thread_in_Java) {
if (thread->in_stack_reserved_zone(addr)) {
frame fr;
@ -392,9 +391,11 @@ JVM_handle_linux_signal(int sig,
}
// Throw a stack overflow exception. Guard pages will be reenabled
// while unwinding the stack.
thread->disable_stack_yellow_reserved_zone();
stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::STACK_OVERFLOW);
} else {
// Thread was in the vm or native code. Return and try to finish.
thread->disable_stack_yellow_reserved_zone();
return 1;
}
} else if (thread->in_stack_red_zone(addr)) {

View File

@ -0,0 +1,40 @@
/*
* Copyright (c) 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.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "precompiled.hpp"
#include "gc/z/zArguments.hpp"
#include "runtime/globals.hpp"
#include "runtime/globals_extension.hpp"
#include "utilities/debug.hpp"
void ZArguments::initialize_platform() {
// The C2 barrier slow path expects vector registers to be least
// 16 bytes wide, which is the minimum width available on all
// x86-64 systems. However, the user could have speficied a lower
// number on the command-line, in which case we print a warning
// and raise it to 16.
if (MaxVectorSize < 16) {
warning("ZGC requires MaxVectorSize to be at least 16");
FLAG_SET_DEFAULT(MaxVectorSize, 16);
}
}

View File

@ -3801,7 +3801,7 @@ void MatchNode::count_commutative_op(int& count) {
"AddVB","AddVS","AddVI","AddVL","AddVF","AddVD",
"AndI","AndL",
"AndV",
"MaxI","MinI",
"MaxI","MinI","MaxF","MinF","MaxD","MinD",
"MulI","MulL","MulF","MulD",
"MulVS","MulVI","MulVL","MulVF","MulVD",
"OrI","OrL",
@ -4181,6 +4181,7 @@ bool MatchRule::is_vector() const {
"AddReductionVF", "AddReductionVD",
"MulReductionVI", "MulReductionVL",
"MulReductionVF", "MulReductionVD",
"MulAddVS2VI",
"LShiftCntV","RShiftCntV",
"LShiftVB","LShiftVS","LShiftVI","LShiftVL",
"RShiftVB","RShiftVS","RShiftVI","RShiftVL",

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 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
@ -41,6 +41,7 @@
#include "runtime/safepointVerifiers.hpp"
#include "runtime/sharedRuntime.hpp"
#include "runtime/vmOperations.hpp"
#include "utilities/sizes.hpp"
bool AOTLib::_narrow_oop_shift_initialized = false;
int AOTLib::_narrow_oop_shift = 0;
@ -395,7 +396,7 @@ void AOTCodeHeap::register_stubs() {
int code_id = stub_offsets[i]._code_id;
assert(code_id < _method_count, "sanity");
jlong* state_adr = &_method_state[code_id];
int len = build_u2_from((address)stub_name);
int len = Bytes::get_Java_u2((address)stub_name);
stub_name += 2;
char* full_name = NEW_C_HEAP_ARRAY(char, len+5, mtCode);
if (full_name == NULL) { // No memory?
@ -606,10 +607,10 @@ void AOTCodeHeap::print_statistics() {
#endif
Method* AOTCodeHeap::find_method(Klass* klass, Thread* thread, const char* method_name) {
int method_name_len = build_u2_from((address)method_name);
int method_name_len = Bytes::get_Java_u2((address)method_name);
method_name += 2;
const char* signature_name = method_name + method_name_len;
int signature_name_len = build_u2_from((address)signature_name);
int signature_name_len = Bytes::get_Java_u2((address)signature_name);
signature_name += 2;
// The class should have been loaded so the method and signature should already be
// in the symbol table. If they're not there, the method doesn't exist.
@ -821,7 +822,7 @@ bool AOTCodeHeap::load_klass_data(InstanceKlass* ik, Thread* thread) {
method_data->_metadata_table = (address)_metadata_got + method_offsets->_metadata_got_offset;
method_data->_metadata_size = method_offsets->_metadata_got_size;
// aot_name format: "<u2_size>Ljava/lang/ThreadGroup;<u2_size>addUnstarted<u2_size>()V"
int klass_len = build_u2_from((address)aot_name);
int klass_len = Bytes::get_Java_u2((address)aot_name);
const char* method_name = aot_name + 2 + klass_len;
Method* m = AOTCodeHeap::find_method(ik, thread, method_name);
methodHandle mh(thread, m);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 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
@ -41,6 +41,7 @@
#include "runtime/os.hpp"
#include "runtime/safepointVerifiers.hpp"
#include "runtime/sharedRuntime.hpp"
#include "utilities/sizes.hpp"
#include "utilities/xmlstream.hpp"
#include <stdio.h>
@ -88,7 +89,7 @@ oop AOTCompiledMethod::oop_at(int index) const {
}
// The entry is string which we need to resolve.
const char* meta_name = _heap->get_name_at((int)meta);
int klass_len = build_u2_from((address)meta_name);
int klass_len = Bytes::get_Java_u2((address)meta_name);
const char* klass_name = meta_name + 2;
// Quick check the current method's holder.
Klass* k = _method->method_holder();
@ -98,7 +99,7 @@ oop AOTCompiledMethod::oop_at(int index) const {
// Search klass in got cells in DSO which have this compiled method.
k = _heap->get_klass_from_got(klass_name, klass_len, _method);
}
int method_name_len = build_u2_from((address)klass_name + klass_len);
int method_name_len = Bytes::get_Java_u2((address)klass_name + klass_len);
guarantee(method_name_len == 0, "only klass is expected here");
meta = ((intptr_t)k) | 1;
*entry = (Metadata*)meta; // Should be atomic on x64
@ -120,7 +121,7 @@ Metadata* AOTCompiledMethod::metadata_at(int index) const {
}
// The entry is string which we need to resolve.
const char* meta_name = _heap->get_name_at((int)meta);
int klass_len = build_u2_from((address)meta_name);
int klass_len = Bytes::get_Java_u2((address)meta_name);
const char* klass_name = meta_name + 2;
// Quick check the current method's holder.
Klass* k = _method->method_holder();
@ -132,7 +133,7 @@ Metadata* AOTCompiledMethod::metadata_at(int index) const {
k = _heap->get_klass_from_got(klass_name, klass_len, _method);
klass_matched = false;
}
int method_name_len = build_u2_from((address)klass_name + klass_len);
int method_name_len = Bytes::get_Java_u2((address)klass_name + klass_len);
if (method_name_len == 0) { // Array or Klass name only?
meta = ((intptr_t)k) | 1;
*entry = (Metadata*)meta; // Should be atomic on x64
@ -140,7 +141,7 @@ Metadata* AOTCompiledMethod::metadata_at(int index) const {
} else { // Method
// Quick check the current method's name.
Method* m = _method;
int signature_len = build_u2_from((address)klass_name + klass_len + 2 + method_name_len);
int signature_len = Bytes::get_Java_u2((address)klass_name + klass_len + 2 + method_name_len);
int full_len = 2 + klass_len + 2 + method_name_len + 2 + signature_len;
if (!klass_matched || memcmp(_name, meta_name, full_len) != 0) { // Does not match?
Thread* thread = Thread::current();

View File

@ -827,9 +827,16 @@ bool BlockBegin::try_merge(ValueStack* new_state) {
for_each_local_value(existing_state, index, existing_value) {
Value new_value = new_state->local_at(index);
if (new_value == NULL || new_value->type()->tag() != existing_value->type()->tag()) {
// The old code invalidated the phi function here
// Because dead locals are replaced with NULL, this is a very rare case now, so simply bail out
return false; // BAILOUT in caller
Phi* existing_phi = existing_value->as_Phi();
if (existing_phi == NULL) {
return false; // BAILOUT in caller
}
// Invalidate the phi function here. This case is very rare except for
// JVMTI capability "can_access_local_variables".
// In really rare cases we will bail out in LIRGenerator::move_to_phi.
existing_phi->make_illegal();
existing_state->invalidate_local(index);
TRACE_PHI(tty->print_cr("invalidating local %d because of type mismatch", index));
}
}

View File

@ -1113,7 +1113,7 @@ void LIRGenerator::do_ExceptionObject(ExceptionObject* x) {
// no moves are created for phi functions at the begin of exception
// handlers, so assign operands manually here
for_each_phi_fun(block(), phi,
operand_for_instruction(phi));
if (!phi->is_illegal()) { operand_for_instruction(phi); });
LIR_Opr thread_reg = getThreadPointer();
__ move_wide(new LIR_Address(thread_reg, in_bytes(JavaThread::exception_oop_offset()), T_OBJECT),

View File

@ -574,7 +574,7 @@ void LinearScan::compute_local_live_sets() {
// Phi functions at the begin of an exception handler are
// implicitly defined (= killed) at the beginning of the block.
for_each_phi_fun(block, phi,
live_kill.set_bit(phi->operand()->vreg_number())
if (!phi->is_illegal()) { live_kill.set_bit(phi->operand()->vreg_number()); }
);
}
@ -1904,7 +1904,7 @@ void LinearScan::resolve_exception_entry(BlockBegin* block, MoveResolver &move_r
// the live_in bits are not set for phi functions of the xhandler entry, so iterate them separately
for_each_phi_fun(block, phi,
resolve_exception_entry(block, phi->operand()->vreg_number(), move_resolver)
if (!phi->is_illegal()) { resolve_exception_entry(block, phi->operand()->vreg_number(), move_resolver); }
);
if (move_resolver.has_mappings()) {
@ -1978,7 +1978,7 @@ void LinearScan::resolve_exception_edge(XHandler* handler, int throwing_op_id, M
// the live_in bits are not set for phi functions of the xhandler entry, so iterate them separately
for_each_phi_fun(block, phi,
resolve_exception_edge(handler, throwing_op_id, phi->operand()->vreg_number(), phi, move_resolver)
if (!phi->is_illegal()) { resolve_exception_edge(handler, throwing_op_id, phi->operand()->vreg_number(), phi, move_resolver); }
);
if (move_resolver.has_mappings()) {

View File

@ -299,7 +299,7 @@ class ValueStack: public CompilationResourceObj {
}
// Macro definition for simple iteration of all phif functions of a block, i.e all
// Macro definition for simple iteration of all phi functions of a block, i.e all
// phi functions of the ValueStack where the block matches.
// Use the following code pattern to iterate all phi functions of a block:
//
@ -315,7 +315,7 @@ class ValueStack: public CompilationResourceObj {
Value value; \
{ \
for_each_stack_value(cur_state, cur_index, value) { \
Phi* v_phi = value->as_Phi(); \
Phi* v_phi = value->as_Phi(); \
if (v_phi != NULL && v_phi->block() == v_block) { \
v_code; \
} \
@ -323,7 +323,7 @@ class ValueStack: public CompilationResourceObj {
} \
{ \
for_each_local_value(cur_state, cur_index, value) { \
Phi* v_phi = value->as_Phi(); \
Phi* v_phi = value->as_Phi(); \
if (v_phi != NULL && v_phi->block() == v_block) { \
v_code; \
} \

View File

@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
#include "classfile/javaClasses.inline.hpp"
#include "ci/ciConstant.hpp"
#include "ci/ciField.hpp"
#include "ci/ciInstance.hpp"

View File

@ -26,7 +26,7 @@
#include "ci/ciInstance.hpp"
#include "ci/ciMethodType.hpp"
#include "ci/ciUtilities.inline.hpp"
#include "classfile/javaClasses.hpp"
#include "classfile/javaClasses.inline.hpp"
ciType* ciMethodType::class_to_citype(oop klass_oop) const {
if (java_lang_Class::is_primitive(klass_oop)) {

View File

@ -119,6 +119,8 @@
#define JAVA_12_VERSION 56
#define JAVA_13_VERSION 57
void ClassFileParser::set_class_bad_constant_seen(short bad_constant) {
assert((bad_constant == 19 || bad_constant == 20) && _major_version >= JAVA_9_VERSION,
"Unexpected bad constant pool entry");

View File

@ -173,7 +173,7 @@ class DictionaryEntry : public HashtableEntry<InstanceKlass*, mtClass> {
for (ProtectionDomainEntry* current = pd_set(); // accessed at a safepoint
current != NULL;
current = current->_next) {
guarantee(oopDesc::is_oop(current->_pd_cache->object_no_keepalive()), "Invalid oop");
guarantee(oopDesc::is_oop_or_null(current->_pd_cache->object_no_keepalive()), "Invalid oop");
}
}

View File

@ -1462,23 +1462,6 @@ void java_lang_Class::release_set_array_klass(oop java_class, Klass* klass) {
}
bool java_lang_Class::is_primitive(oop java_class) {
// should assert:
//assert(java_lang_Class::is_instance(java_class), "must be a Class object");
bool is_primitive = (java_class->metadata_field(_klass_offset) == NULL);
#ifdef ASSERT
if (is_primitive) {
Klass* k = ((Klass*)java_class->metadata_field(_array_klass_offset));
assert(k == NULL || is_java_primitive(ArrayKlass::cast(k)->element_type()),
"Should be either the T_VOID primitive or a java primitive");
}
#endif
return is_primitive;
}
BasicType java_lang_Class::primitive_type(oop java_class) {
assert(java_lang_Class::is_primitive(java_class), "just checking");
Klass* ak = ((Klass*)java_class->metadata_field(_array_klass_offset));

View File

@ -174,6 +174,22 @@ inline bool java_lang_Class::is_instance(oop obj) {
return obj != NULL && obj->klass() == SystemDictionary::Class_klass();
}
inline bool java_lang_Class::is_primitive(oop java_class) {
// should assert:
//assert(java_lang_Class::is_instance(java_class), "must be a Class object");
bool is_primitive = (java_class->metadata_field(_klass_offset) == NULL);
#ifdef ASSERT
if (is_primitive) {
Klass* k = ((Klass*)java_class->metadata_field(_array_klass_offset));
assert(k == NULL || is_java_primitive(ArrayKlass::cast(k)->element_type()),
"Should be either the T_VOID primitive or a java primitive");
}
#endif
return is_primitive;
}
inline bool java_lang_invoke_DirectMethodHandle::is_instance(oop obj) {
return obj != NULL && is_subclass(obj->klass());
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 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
@ -63,6 +63,7 @@ class StackMapFrame : public ResourceObj {
ClassVerifier* _verifier; // the verifier verifying this method
StackMapFrame(const StackMapFrame& cp) :
ResourceObj(cp),
_offset(cp._offset), _locals_size(cp._locals_size),
_stack_size(cp._stack_size), _stack_mark(cp._stack_mark),
_max_locals(cp._max_locals), _max_stack(cp._max_stack),

View File

@ -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
@ -31,6 +31,8 @@
#include "utilities/concurrentHashTable.hpp"
#include "utilities/hashtable.hpp"
class JavaThread;
// TempNewSymbol acts as a handle class in a handle/body idiom and is
// responsible for proper resource management of the body (which is a Symbol*).
// The body is resource managed by a reference counting scheme.

View File

@ -71,7 +71,6 @@
#include "prims/resolvedMethodTable.hpp"
#include "prims/methodHandles.hpp"
#include "runtime/arguments.hpp"
#include "runtime/arguments_ext.hpp"
#include "runtime/biasedLocking.hpp"
#include "runtime/fieldType.hpp"
#include "runtime/handles.inline.hpp"

View File

@ -379,6 +379,10 @@ bool vmIntrinsics::preserves_state(vmIntrinsics::ID id) {
case vmIntrinsics::_vectorizedMismatch:
case vmIntrinsics::_fmaD:
case vmIntrinsics::_fmaF:
case vmIntrinsics::_isDigit:
case vmIntrinsics::_isLowerCase:
case vmIntrinsics::_isUpperCase:
case vmIntrinsics::_isWhitespace:
return true;
default:
return false;
@ -576,6 +580,10 @@ bool vmIntrinsics::is_disabled_by_flags(vmIntrinsics::ID id) {
case vmIntrinsics::_max:
case vmIntrinsics::_floatToIntBits:
case vmIntrinsics::_doubleToLongBits:
case vmIntrinsics::_maxF:
case vmIntrinsics::_minF:
case vmIntrinsics::_maxD:
case vmIntrinsics::_minD:
if (!InlineMathNatives) return true;
break;
case vmIntrinsics::_fmaD:
@ -828,6 +836,12 @@ bool vmIntrinsics::is_disabled_by_flags(vmIntrinsics::ID id) {
case vmIntrinsics::_subtractExactL:
if (!UseMathExactIntrinsics || !InlineMathNatives) return true;
break;
case vmIntrinsics::_isDigit:
case vmIntrinsics::_isLowerCase:
case vmIntrinsics::_isUpperCase:
case vmIntrinsics::_isWhitespace:
if (!UseCharacterCompareIntrinsics) return true;
break;
#endif // COMPILER2
default:
return false;

View File

@ -71,6 +71,7 @@
template(java_lang_Boolean, "java/lang/Boolean") \
template(java_lang_Character, "java/lang/Character") \
template(java_lang_Character_CharacterCache, "java/lang/Character$CharacterCache") \
template(java_lang_CharacterDataLatin1, "java/lang/CharacterDataLatin1") \
template(java_lang_Float, "java/lang/Float") \
template(java_lang_Double, "java/lang/Double") \
template(java_lang_Byte, "java/lang/Byte") \
@ -747,6 +748,7 @@
do_class(java_lang_StrictMath, "java/lang/StrictMath") \
do_signature(double2_double_signature, "(DD)D") \
do_signature(double3_double_signature, "(DDD)D") \
do_signature(float2_float_signature, "(FF)F") \
do_signature(float3_float_signature, "(FFF)F") \
do_signature(int2_int_signature, "(II)I") \
do_signature(long2_long_signature, "(JJ)J") \
@ -793,6 +795,10 @@
do_intrinsic(_subtractExactL, java_lang_Math, subtractExact_name, long2_long_signature, F_S) \
do_intrinsic(_fmaD, java_lang_Math, fma_name, double3_double_signature, F_S) \
do_intrinsic(_fmaF, java_lang_Math, fma_name, float3_float_signature, F_S) \
do_intrinsic(_maxF, java_lang_Math, max_name, float2_float_signature, F_S) \
do_intrinsic(_minF, java_lang_Math, min_name, float2_float_signature, F_S) \
do_intrinsic(_maxD, java_lang_Math, max_name, double2_double_signature, F_S) \
do_intrinsic(_minD, java_lang_Math, min_name, double2_double_signature, F_S) \
\
do_intrinsic(_floatToRawIntBits, java_lang_Float, floatToRawIntBits_name, float_int_signature, F_S) \
do_name( floatToRawIntBits_name, "floatToRawIntBits") \
@ -933,6 +939,15 @@
do_intrinsic(_equalsL, java_lang_StringLatin1,equals_name, equalsB_signature, F_S) \
do_intrinsic(_equalsU, java_lang_StringUTF16, equals_name, equalsB_signature, F_S) \
\
do_intrinsic(_isDigit, java_lang_CharacterDataLatin1, isDigit_name, int_bool_signature, F_R) \
do_name( isDigit_name, "isDigit") \
do_intrinsic(_isLowerCase, java_lang_CharacterDataLatin1, isLowerCase_name, int_bool_signature, F_R) \
do_name( isLowerCase_name, "isLowerCase") \
do_intrinsic(_isUpperCase, java_lang_CharacterDataLatin1, isUpperCase_name, int_bool_signature, F_R) \
do_name( isUpperCase_name, "isUpperCase") \
do_intrinsic(_isWhitespace, java_lang_CharacterDataLatin1, isWhitespace_name, int_bool_signature, F_R) \
do_name( isWhitespace_name, "isWhitespace") \
\
do_intrinsic(_Preconditions_checkIndex, jdk_internal_util_Preconditions, checkIndex_name, Preconditions_checkIndex_signature, F_S) \
do_signature(Preconditions_checkIndex_signature, "(IILjava/util/function/BiFunction;)I") \
\

Some files were not shown because too many files have changed in this diff Show More