This commit is contained in:
Jesper Wilhelmsson 2016-02-22 19:25:32 +00:00
commit 8c7980f33a
1007 changed files with 15774 additions and 5423 deletions

View file

@ -347,3 +347,5 @@ f9bcdce2df26678c3fe468130b535c0342c69b89 jdk-9+99
2dc4c11fe48831854916d53c3913bdb7d49023ea jdk-9+102 2dc4c11fe48831854916d53c3913bdb7d49023ea jdk-9+102
4a652e4ca9523422149958673033e0ac740d5e1e jdk-9+103 4a652e4ca9523422149958673033e0ac740d5e1e jdk-9+103
086c682bd8c5f195c324f61e2c61fbcd0226d63b jdk-9+104 086c682bd8c5f195c324f61e2c61fbcd0226d63b jdk-9+104
db483b34fa7148d257a429acddbde9c13687dcae jdk-9+105
6c644cca3f3fc2763e2ff7d669849a75d34543ba jdk-9+106

View file

@ -347,3 +347,5 @@ c4d72a1620835b5d657b7b6792c2879367d0154f jdk-9+101
6406ecf5d39482623225bb1b3098c2cac6f7d450 jdk-9+102 6406ecf5d39482623225bb1b3098c2cac6f7d450 jdk-9+102
47d6462e514b2097663305a57d9c844c15d5b609 jdk-9+103 47d6462e514b2097663305a57d9c844c15d5b609 jdk-9+103
9a38f8b4ba220708db198d08d82fd2144a64777d jdk-9+104 9a38f8b4ba220708db198d08d82fd2144a64777d jdk-9+104
be58b02c11f90b88c67e4d0e2cb5e4cf2d9b3c57 jdk-9+105
54575d8783b3a39a2d710c28cda675d44261f9d9 jdk-9+106

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -36,11 +36,11 @@
# "ARG_FOO". # "ARG_FOO".
# #
# The generated function can be called like this: # The generated function can be called like this:
# MYFUNC(FOO: [foo-val], BAR: # MYFUNC(FOO: [foo-val],
# [ # BAR: [
# $ECHO hello world # $ECHO hello world
# ]) # ])
# # Note that the argument value must start on the same line as the argument name.
# #
# Argument 1: Name of the function to define # Argument 1: Name of the function to define
# Argument 2: List of legal named arguments, with a * prefix for required arguments # Argument 2: List of legal named arguments, with a * prefix for required arguments

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -72,7 +72,7 @@ AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
FOUND_MEM=yes FOUND_MEM=yes
elif test -x /usr/sbin/prtconf; then elif test -x /usr/sbin/prtconf; then
# Looks like a Solaris or AIX system # Looks like a Solaris or AIX system
MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [[Ss]]ize" | awk '{ print [$]3 }'` MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [[Ss]]ize" | awk '{ print [$]3 }'`
FOUND_MEM=yes FOUND_MEM=yes
elif test -x /usr/sbin/sysctl; then elif test -x /usr/sbin/sysctl; then
# Looks like a MacOSX system # Looks like a MacOSX system
@ -260,8 +260,8 @@ AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
# #
AC_DEFUN([BPERF_RUN_ICECC_CREATE_ENV], AC_DEFUN([BPERF_RUN_ICECC_CREATE_ENV],
[ [
cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \ ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
&& ${ICECC_CREATE_ENV} $1 > $2 2>&1 && ${ICECC_CREATE_ENV} $1 > $2 2>&1 )
if test "$?" != "0"; then if test "$?" != "0"; then
AC_MSG_NOTICE([icecc-create-env output:]) AC_MSG_NOTICE([icecc-create-env output:])
cat $2 cat $2

View file

@ -33,6 +33,7 @@ export LEGACY_BUILD_DIR=@OPENJDK_TARGET_OS@-@OPENJDK_TARGET_CPU_LEGACY@
export OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@" export OPENJDK_TARGET_OS="@OPENJDK_TARGET_OS@"
export OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@" export OPENJDK_TARGET_CPU="@OPENJDK_TARGET_CPU@"
export OPENJDK_TARGET_CPU_LIBDIR="@OPENJDK_TARGET_CPU_LIBDIR@"
export AWK="@AWK@" export AWK="@AWK@"
export BASH="@BASH@" export BASH="@BASH@"

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -283,8 +283,9 @@ Additional (non-autoconf) OpenJDK Options:
EOT EOT
# Print list of toolchains. This must be done by the autoconf script. # Print additional help, e.g. a list of toolchains.
( CONFIGURE_PRINT_TOOLCHAIN_LIST=true . $conf_script_to_run PRINTF=printf ) # This must be done by the autoconf script.
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $conf_script_to_run PRINTF=printf )
cat <<EOT cat <<EOT

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -189,8 +189,6 @@ TOOLCHAIN_SETUP_JTREG
FLAGS_SETUP_INIT_FLAGS FLAGS_SETUP_INIT_FLAGS
# FIXME: Currently we must test this after toolchain but before flags. Fix!
# Now we can test some aspects on the target using configure macros. # Now we can test some aspects on the target using configure macros.
PLATFORM_SETUP_OPENJDK_TARGET_BITS PLATFORM_SETUP_OPENJDK_TARGET_BITS
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS

View file

@ -206,7 +206,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
# On Windows, we need to set RC flags. # On Windows, we need to set RC flags.
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
RC_FLAGS="-nologo -l0x409" RC_FLAGS="-nologo -l0x409"
if test "x$VARIANT" = xOPT; then if test "x$DEBUG_LEVEL" = xrelease; then
RC_FLAGS="$RC_FLAGS -DNDEBUG" RC_FLAGS="$RC_FLAGS -DNDEBUG"
fi fi
@ -254,7 +254,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.' SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN" SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1' SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
SET_SHARED_LIBRARY_MAPFILE='' SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
else else
# Default works for linux, might work on other platforms as well. # Default works for linux, might work on other platforms as well.
SHARED_LIBRARY_FLAGS='-shared' SHARED_LIBRARY_FLAGS='-shared'
@ -274,7 +274,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.' SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN" SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1' SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/[$]1'
SET_SHARED_LIBRARY_MAPFILE='' SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,[$]1'
else else
# Default works for linux, might work on other platforms as well. # Default works for linux, might work on other platforms as well.
PICFLAG='-fPIC' PICFLAG='-fPIC'
@ -310,7 +310,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
SET_EXECUTABLE_ORIGIN='' SET_EXECUTABLE_ORIGIN=''
SET_SHARED_LIBRARY_ORIGIN='' SET_SHARED_LIBRARY_ORIGIN=''
SET_SHARED_LIBRARY_NAME='' SET_SHARED_LIBRARY_NAME=''
SET_SHARED_LIBRARY_MAPFILE='' SET_SHARED_LIBRARY_MAPFILE='-def:[$]1'
fi fi
AC_SUBST(C_FLAG_REORDER) AC_SUBST(C_FLAG_REORDER)
@ -423,6 +423,10 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
# no adjustment # no adjustment
;; ;;
slowdebug ) slowdebug )
# FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS it
# get's added conditionally on whether we produce debug symbols or not.
# This is most likely not really correct.
# Add runtime stack smashing and undefined behavior checks. # Add runtime stack smashing and undefined behavior checks.
# Not all versions of gcc support -fstack-protector # Not all versions of gcc support -fstack-protector
STACK_PROTECTOR_CFLAG="-fstack-protector-all" STACK_PROTECTOR_CFLAG="-fstack-protector-all"
@ -463,7 +467,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
C_O_FLAG_DEBUG="" CXX_O_FLAG_DEBUG=""
CXX_O_FLAG_NONE="" CXX_O_FLAG_NONE=""
fi fi
else else
@ -646,8 +650,8 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
# avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
# studio. # studio.
if test "x$TOOLCHAIN_VERSION" = "x2010"; then if test "x$TOOLCHAIN_VERSION" = "x2010"; then
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \ STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB" COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
fi fi
fi fi
@ -715,9 +719,6 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
# Set some additional per-OS defines. # Set some additional per-OS defines.
if test "x$OPENJDK_TARGET_OS" = xmacosx; then if test "x$OPENJDK_TARGET_OS" = xmacosx; then
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT" COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
elif test "x$OPENJDK_TARGET_OS" = xaix; then
# FIXME: PPC64 should not be here.
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
elif test "x$OPENJDK_TARGET_OS" = xbsd; then elif test "x$OPENJDK_TARGET_OS" = xbsd; then
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE" COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
fi fi
@ -775,36 +776,34 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
# Setup LDFLAGS et al. # Setup LDFLAGS et al.
# #
# Now this is odd. The JDK native libraries have to link against libjvm.so
# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
# is identical for client and server? Yes. Which is picked at runtime (client or server)?
# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
# libraries will link to whatever is in memory. Yuck.
#
# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no" LDFLAGS_MICROSOFT="-nologo -opt:ref"
LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
LDFLAGS_JDK="$LDFLAGS_JDK -safeseh" LDFLAGS_SAFESH="-safeseh"
LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
fi fi
# TODO: make -debug optional "--disable-full-debug-symbols" # TODO: make -debug optional "--disable-full-debug-symbols"
LDFLAGS_JDK="$LDFLAGS_JDK -debug" LDFLAGS_MICROSOFT_DEBUG="-debug"
LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT_DEBUG"
elif test "x$TOOLCHAIN_TYPE" = xgcc; then elif test "x$TOOLCHAIN_TYPE" = xgcc; then
# If this is a --hash-style=gnu system, use --hash-style=both, why? # If this is a --hash-style=gnu system, use --hash-style=both, why?
# We have previously set HAS_GNU_HASH if this is the case # We have previously set HAS_GNU_HASH if this is the case
if test -n "$HAS_GNU_HASH"; then if test -n "$HAS_GNU_HASH"; then
LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,--hash-style=both" LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
fi fi
if test "x$OPENJDK_TARGET_OS" = xlinux; then if test "x$OPENJDK_TARGET_OS" = xlinux; then
# And since we now know that the linker is gnu, then add -z defs, to forbid # And since we now know that the linker is gnu, then add -z defs, to forbid
# undefined symbols in object files. # undefined symbols in object files.
LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,defs" LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
case $DEBUG_LEVEL in case $DEBUG_LEVEL in
release ) release )
# tell linker to optimize libraries. # tell linker to optimize libraries.
# Should this be supplied to the OSS linker as well? # Should this be supplied to the OSS linker as well?
LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-O1" LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
;; ;;
slowdebug ) slowdebug )
if test "x$HAS_LINKER_NOW" = "xtrue"; then if test "x$HAS_LINKER_NOW" = "xtrue"; then
@ -831,10 +830,13 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
esac esac
fi fi
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,defs -xildoff -ztext" LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib" LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
LDFLAGS_CXX_SOLSTUDIO="-norunpath"
LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
elif test "x$TOOLCHAIN_TYPE" = xxlc; then elif test "x$TOOLCHAIN_TYPE" = xxlc; then
LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok" LDFLAGS_XLC="-brtl -bnolibpath -bexpall -bernotok"
LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
fi fi
# Customize LDFLAGS for executables # Customize LDFLAGS for executables
@ -1048,6 +1050,10 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_MISC],
DISABLE_WARNING_PREFIX="-Wno-" DISABLE_WARNING_PREFIX="-Wno-"
CFLAGS_WARNINGS_ARE_ERRORS="-Werror" CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
;; ;;
xlc)
DISABLE_WARNING_PREFIX="-qsuppress="
CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
;;
esac esac
AC_SUBST(DISABLE_WARNING_PREFIX) AC_SUBST(DISABLE_WARNING_PREFIX)
AC_SUBST(CFLAGS_WARNINGS_ARE_ERRORS) AC_SUBST(CFLAGS_WARNINGS_ARE_ERRORS)

View file

@ -784,6 +784,8 @@ LDCXX
LD LD
CXXCPP CXXCPP
CPP CPP
CXX_VERSION_NUMBER
CC_VERSION_NUMBER
ac_ct_CXX ac_ct_CXX
CXXFLAGS CXXFLAGS
CXX CXX
@ -860,6 +862,7 @@ LAUNCHER_NAME
TEST_IN_BUILD TEST_IN_BUILD
COPYRIGHT_YEAR COPYRIGHT_YEAR
COMPRESS_JARS COMPRESS_JARS
INCLUDE_SA
UNLIMITED_CRYPTO UNLIMITED_CRYPTO
CACERTS_FILE CACERTS_FILE
BUILD_HEADLESS BUILD_HEADLESS
@ -906,7 +909,6 @@ FASTDEBUG
VARIANT VARIANT
DEBUG_LEVEL DEBUG_LEVEL
MACOSX_UNIVERSAL MACOSX_UNIVERSAL
INCLUDE_SA
JVM_VARIANT_CORE JVM_VARIANT_CORE
JVM_VARIANT_ZEROSHARK JVM_VARIANT_ZEROSHARK
JVM_VARIANT_ZERO JVM_VARIANT_ZERO
@ -1926,7 +1928,7 @@ Optional Packages:
--with-jvm-variants JVM variants (separated by commas) to build (server, --with-jvm-variants JVM variants (separated by commas) to build (server,
client, minimal1, zero, zeroshark, core) [server] client, minimal1, zero, zeroshark, core) [server]
--with-debug-level set the debug level (release, fastdebug, slowdebug, --with-debug-level set the debug level (release, fastdebug, slowdebug,
optimized (HotSpot build only)) [release] optimized) [release]
--with-devkit use this devkit for compilers, tools and resources --with-devkit use this devkit for compilers, tools and resources
--with-sys-root alias for --with-sysroot for backwards compatability --with-sys-root alias for --with-sysroot for backwards compatability
--with-sysroot use this directory as sysroot --with-sysroot use this directory as sysroot
@ -2008,7 +2010,7 @@ Optional Packages:
--with-jtreg Regression Test Harness [probed] --with-jtreg Regression Test Harness [probed]
--with-native-debug-symbols --with-native-debug-symbols
set the native debug symbol configuration (none, set the native debug symbol configuration (none,
internal, external, zipped) [zipped] internal, external, zipped) [varying]
--with-stdc++lib=<static>,<dynamic>,<default> --with-stdc++lib=<static>,<dynamic>,<default>
force linking of the C++ runtime on Linux to either force linking of the C++ runtime on Linux to either
static or dynamic, default is static with dynamic as static or dynamic, default is static with dynamic as
@ -3424,7 +3426,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# Include these first... # Include these first...
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -3461,11 +3463,11 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# "ARG_FOO". # "ARG_FOO".
# #
# The generated function can be called like this: # The generated function can be called like this:
# MYFUNC(FOO: [foo-val], BAR: # MYFUNC(FOO: [foo-val],
# [ # BAR: [
# $ECHO hello world # $ECHO hello world
# ]) # ])
# # Note that the argument value must start on the same line as the argument name.
# #
# Argument 1: Name of the function to define # Argument 1: Name of the function to define
# Argument 2: List of legal named arguments, with a * prefix for required arguments # Argument 2: List of legal named arguments, with a * prefix for required arguments
@ -3774,7 +3776,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -3927,7 +3929,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -4059,7 +4061,7 @@ pkgadd_help() {
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -4117,7 +4119,7 @@ pkgadd_help() {
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -4625,7 +4627,7 @@ pkgadd_help() {
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -4676,6 +4678,28 @@ TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio" TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++" TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
# Minimum supported versions, empty means unspecified
TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
TOOLCHAIN_MINIMUM_VERSION_microsoft=""
TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
TOOLCHAIN_MINIMUM_VERSION_xlc=""
# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
# Check if the configured compiler (C and C++) is of a specific version or
# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
#
# Arguments:
# VERSION: The version string to check against the found version
# IF_AT_LEAST: block to run if the compiler is at least this version (>=)
# IF_OLDER_THAN: block to run if the compiler is older than this version (<)
# Setup a number of variables describing how native output files are # Setup a number of variables describing how native output files are
# named on this platform/toolchain. # named on this platform/toolchain.
@ -4836,7 +4860,7 @@ VS_SDK_PLATFORM_NAME_2013=
#CUSTOM_AUTOCONF_INCLUDE #CUSTOM_AUTOCONF_INCLUDE
# Do not change or remove the following line, it is needed for consistency checks: # Do not change or remove the following line, it is needed for consistency checks:
DATE_WHEN_GENERATED=1454926898 DATE_WHEN_GENERATED=1455271513
############################################################################### ###############################################################################
# #
@ -4850,7 +4874,9 @@ DATE_WHEN_GENERATED=1454926898
# If we are requested to print additional help, do that and then exit. # If we are requested to print additional help, do that and then exit.
# This must be the very first call. # This must be the very first call.
if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
# Print available toolchains
$PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n" $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
$PRINTF "Which are valid to use depends on the build platform.\n" $PRINTF "Which are valid to use depends on the build platform.\n"
for toolchain in $VALID_TOOLCHAINS_all; do for toolchain in $VALID_TOOLCHAINS_all; do
@ -15826,21 +15852,6 @@ $as_echo "$with_jvm_variants" >&6; }
INCLUDE_SA=true
if test "x$JVM_VARIANT_ZERO" = xtrue ; then
INCLUDE_SA=false
fi
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
INCLUDE_SA=false
fi
if test "x$OPENJDK_TARGET_OS" = xaix ; then
INCLUDE_SA=false
fi
if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
INCLUDE_SA=false
fi
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
MACOSX_UNIVERSAL="true" MACOSX_UNIVERSAL="true"
fi fi
@ -15880,7 +15891,7 @@ $as_echo "$DEBUG_LEVEL" >&6; }
test "x$DEBUG_LEVEL" != xoptimized && \ test "x$DEBUG_LEVEL" != xoptimized && \
test "x$DEBUG_LEVEL" != xfastdebug && \ test "x$DEBUG_LEVEL" != xfastdebug && \
test "x$DEBUG_LEVEL" != xslowdebug; then test "x$DEBUG_LEVEL" != xslowdebug; then
as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5 as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
fi fi
@ -23244,6 +23255,22 @@ fi
fi fi
# Should we build the serviceability agent (SA)?
INCLUDE_SA=true
if test "x$JVM_VARIANT_ZERO" = xtrue ; then
INCLUDE_SA=false
fi
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
INCLUDE_SA=false
fi
if test "x$OPENJDK_TARGET_OS" = xaix ; then
INCLUDE_SA=false
fi
if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
INCLUDE_SA=false
fi
# Compress jars # Compress jars
COMPRESS_JARS=false COMPRESS_JARS=false
@ -29850,6 +29877,8 @@ $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
# Use indirect variable referencing # Use indirect variable referencing
toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
TOOLCHAIN_DESCRIPTION=${!toolchain_var_name} TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
TOOLCHAIN_CC_BINARY=${!toolchain_var_name} TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
@ -31482,10 +31511,16 @@ $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run c
# The microsoft toolchain also requires INCLUDE and LIB to be set. # The microsoft toolchain also requires INCLUDE and LIB to be set.
export INCLUDE="$VS_INCLUDE" export INCLUDE="$VS_INCLUDE"
export LIB="$VS_LIB" export LIB="$VS_LIB"
else
if test "x$XCODE_VERSION_OUTPUT" != x; then
# For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
else else
# Currently we do not define this for other toolchains. This might change as the need arise. # Currently we do not define this for other toolchains. This might change as the need arise.
TOOLCHAIN_VERSION= TOOLCHAIN_VERSION=
fi fi
fi
# For solaris we really need solaris tools, and not the GNU equivalent. # For solaris we really need solaris tools, and not the GNU equivalent.
@ -32191,7 +32226,7 @@ $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSIO
# Collapse compiler output into a single line # Collapse compiler output into a single line
COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT` COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \ COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
$SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'` $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
else else
as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5 as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
fi fi
@ -33488,7 +33523,7 @@ $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSIO
# Collapse compiler output into a single line # Collapse compiler output into a single line
COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT` COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \ COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
$SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'` $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
else else
as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5 as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
fi fi
@ -33760,6 +33795,116 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ex
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
# This is the compiler version number on the form X.Y[.Z]
if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
$as_echo "$as_me: WARNING: C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
fi
# We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
if [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
fi
if [[ "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
fi
COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
# Execute function body
# Need to assign to a variable since m4 is blocked from modifying parts in [].
REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
if [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
as_fn_error $? "Internal errror: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
fi
if [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
as_fn_error $? "Internal errror: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
fi
# Version comparison method inspired by http://stackoverflow.com/a/24067243
COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
:
else
:
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
fi
fi
# #
# Setup the preprocessor (CPP and CXXCPP) # Setup the preprocessor (CPP and CXXCPP)
# #
@ -45332,7 +45477,7 @@ $as_echo "no" >&6; }
# On Windows, we need to set RC flags. # On Windows, we need to set RC flags.
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
RC_FLAGS="-nologo -l0x409" RC_FLAGS="-nologo -l0x409"
if test "x$VARIANT" = xOPT; then if test "x$DEBUG_LEVEL" = xrelease; then
RC_FLAGS="$RC_FLAGS -DNDEBUG" RC_FLAGS="$RC_FLAGS -DNDEBUG"
fi fi
@ -45358,8 +45503,6 @@ $as_echo "no" >&6; }
fi fi
# FIXME: Currently we must test this after toolchain but before flags. Fix!
# Now we can test some aspects on the target using configure macros. # Now we can test some aspects on the target using configure macros.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
@ -46015,7 +46158,7 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.' SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN" SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1' SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
SET_SHARED_LIBRARY_MAPFILE='' SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
else else
# Default works for linux, might work on other platforms as well. # Default works for linux, might work on other platforms as well.
SHARED_LIBRARY_FLAGS='-shared' SHARED_LIBRARY_FLAGS='-shared'
@ -46035,7 +46178,7 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.' SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN" SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1' SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
SET_SHARED_LIBRARY_MAPFILE='' SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
else else
# Default works for linux, might work on other platforms as well. # Default works for linux, might work on other platforms as well.
PICFLAG='-fPIC' PICFLAG='-fPIC'
@ -46071,7 +46214,7 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
SET_EXECUTABLE_ORIGIN='' SET_EXECUTABLE_ORIGIN=''
SET_SHARED_LIBRARY_ORIGIN='' SET_SHARED_LIBRARY_ORIGIN=''
SET_SHARED_LIBRARY_NAME='' SET_SHARED_LIBRARY_NAME=''
SET_SHARED_LIBRARY_MAPFILE='' SET_SHARED_LIBRARY_MAPFILE='-def:$1'
fi fi
@ -46151,6 +46294,10 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
# no adjustment # no adjustment
;; ;;
slowdebug ) slowdebug )
# FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS it
# get's added conditionally on whether we produce debug symbols or not.
# This is most likely not really correct.
# Add runtime stack smashing and undefined behavior checks. # Add runtime stack smashing and undefined behavior checks.
# Not all versions of gcc support -fstack-protector # Not all versions of gcc support -fstack-protector
STACK_PROTECTOR_CFLAG="-fstack-protector-all" STACK_PROTECTOR_CFLAG="-fstack-protector-all"
@ -46311,7 +46458,7 @@ $as_echo "$supports" >&6; }
CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
C_O_FLAG_DEBUG="" CXX_O_FLAG_DEBUG=""
CXX_O_FLAG_NONE="" CXX_O_FLAG_NONE=""
fi fi
else else
@ -46492,8 +46639,8 @@ $as_echo "$supports" >&6; }
# avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
# studio. # studio.
if test "x$TOOLCHAIN_VERSION" = "x2010"; then if test "x$TOOLCHAIN_VERSION" = "x2010"; then
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \ STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB" COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
fi fi
fi fi
@ -46561,9 +46708,6 @@ $as_echo "$supports" >&6; }
# Set some additional per-OS defines. # Set some additional per-OS defines.
if test "x$OPENJDK_TARGET_OS" = xmacosx; then if test "x$OPENJDK_TARGET_OS" = xmacosx; then
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT" COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
elif test "x$OPENJDK_TARGET_OS" = xaix; then
# FIXME: PPC64 should not be here.
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
elif test "x$OPENJDK_TARGET_OS" = xbsd; then elif test "x$OPENJDK_TARGET_OS" = xbsd; then
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE" COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
fi fi
@ -46621,36 +46765,34 @@ $as_echo "$supports" >&6; }
# Setup LDFLAGS et al. # Setup LDFLAGS et al.
# #
# Now this is odd. The JDK native libraries have to link against libjvm.so
# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
# is identical for client and server? Yes. Which is picked at runtime (client or server)?
# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
# libraries will link to whatever is in memory. Yuck.
#
# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no" LDFLAGS_MICROSOFT="-nologo -opt:ref"
LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
LDFLAGS_JDK="$LDFLAGS_JDK -safeseh" LDFLAGS_SAFESH="-safeseh"
LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
fi fi
# TODO: make -debug optional "--disable-full-debug-symbols" # TODO: make -debug optional "--disable-full-debug-symbols"
LDFLAGS_JDK="$LDFLAGS_JDK -debug" LDFLAGS_MICROSOFT_DEBUG="-debug"
LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT_DEBUG"
elif test "x$TOOLCHAIN_TYPE" = xgcc; then elif test "x$TOOLCHAIN_TYPE" = xgcc; then
# If this is a --hash-style=gnu system, use --hash-style=both, why? # If this is a --hash-style=gnu system, use --hash-style=both, why?
# We have previously set HAS_GNU_HASH if this is the case # We have previously set HAS_GNU_HASH if this is the case
if test -n "$HAS_GNU_HASH"; then if test -n "$HAS_GNU_HASH"; then
LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,--hash-style=both" LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
fi fi
if test "x$OPENJDK_TARGET_OS" = xlinux; then if test "x$OPENJDK_TARGET_OS" = xlinux; then
# And since we now know that the linker is gnu, then add -z defs, to forbid # And since we now know that the linker is gnu, then add -z defs, to forbid
# undefined symbols in object files. # undefined symbols in object files.
LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-z,defs" LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
case $DEBUG_LEVEL in case $DEBUG_LEVEL in
release ) release )
# tell linker to optimize libraries. # tell linker to optimize libraries.
# Should this be supplied to the OSS linker as well? # Should this be supplied to the OSS linker as well?
LDFLAGS_JDK="${LDFLAGS_JDK} -Wl,-O1" LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
;; ;;
slowdebug ) slowdebug )
if test "x$HAS_LINKER_NOW" = "xtrue"; then if test "x$HAS_LINKER_NOW" = "xtrue"; then
@ -46677,10 +46819,13 @@ $as_echo "$supports" >&6; }
esac esac
fi fi
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
LDFLAGS_JDK="$LDFLAGS_JDK -Wl,-z,defs -xildoff -ztext" LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib" LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
LDFLAGS_CXX_SOLSTUDIO="-norunpath"
LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
elif test "x$TOOLCHAIN_TYPE" = xxlc; then elif test "x$TOOLCHAIN_TYPE" = xxlc; then
LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -bexpall -bernotok" LDFLAGS_XLC="-brtl -bnolibpath -bexpall -bernotok"
LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
fi fi
# Customize LDFLAGS for executables # Customize LDFLAGS for executables
@ -47324,6 +47469,10 @@ $as_echo "$supports" >&6; }
DISABLE_WARNING_PREFIX="-Wno-" DISABLE_WARNING_PREFIX="-Wno-"
CFLAGS_WARNINGS_ARE_ERRORS="-Werror" CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
;; ;;
xlc)
DISABLE_WARNING_PREFIX="-qsuppress="
CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
;;
esac esac
@ -47352,9 +47501,13 @@ else
if test "x$OPENJDK_TARGET_OS" = xaix; then if test "x$OPENJDK_TARGET_OS" = xaix; then
# AIX doesn't support 'zipped' so use 'internal' as default # AIX doesn't support 'zipped' so use 'internal' as default
with_native_debug_symbols="internal" with_native_debug_symbols="internal"
else
if test "x$STATIC_BUILD" = xtrue; then
with_native_debug_symbols="none"
else else
with_native_debug_symbols="zipped" with_native_debug_symbols="zipped"
fi fi
fi
fi fi
@ -55353,6 +55506,349 @@ $as_echo "$FREETYPE_LIB_PATH" >&6; }
fi fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
if test "x$FOUND_FREETYPE" != xyes; then
# Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
METHOD="well-known location"
# Let's start with an optimistic view of the world :-)
FOUND_FREETYPE=yes
# First look for the canonical freetype main include file ft2build.h.
if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
# Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
# Fail.
FOUND_FREETYPE=no
fi
fi
if test "x$FOUND_FREETYPE" = xyes; then
# Include file found, let's continue the sanity check.
{ $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
# Reset to default value
FREETYPE_BASE_NAME=freetype
FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
if test "x$OPENJDK_TARGET_OS" = xmacosx \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
# On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
# for the .6 version explicitly.
FREETYPE_BASE_NAME=freetype.6
FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
FOUND_FREETYPE=no
fi
else
if test "x$OPENJDK_TARGET_OS" = xwindows; then
# On Windows, we will need both .lib and .dll file.
if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
FOUND_FREETYPE=no
fi
elif test "x$OPENJDK_TARGET_OS" = xsolaris \
&& test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
# Found lib in isa dir, use that instead.
POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
fi
fi
fi
if test "x$FOUND_FREETYPE" = xyes; then
# Only process if variable expands to non-empty
if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# Input might be given as Windows format, start by converting to
# unix format.
path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
new_path=`$CYGPATH -u "$path"`
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file precense.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
input_path="$new_path"
# 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 \)
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
fi
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
# As a simple fix, exclude /usr/bin since it's not a real path.
if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
# a path prefixed by /cygdrive for fixpath to work.
new_path="$CYGWIN_ROOT_PATH$input_path"
fi
fi
if test "x$path" != "x$new_path"; then
POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
fi
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
has_colon=`$ECHO $path | $GREP ^.:`
new_path="$path"
if test "x$has_colon" = x; then
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $path`
fi
input_path="$new_path"
# 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 \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$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'`
new_path="$unix_path"
fi
if test "x$path" != "x$new_path"; then
POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
fi
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
else
# We're on a unix platform. Hooray! :)
path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
has_space=`$ECHO "$path" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
fi
# Use eval to expand a potential ~
eval path="$path"
if test ! -f "$path" && test ! -d "$path"; then
as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
fi
if test -d "$path"; then
POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
else
dir="`$DIRNAME "$path"`"
base="`$BASENAME "$path"`"
POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
fi
fi
fi
# Only process if variable expands to non-empty
if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
# Input might be given as Windows format, start by converting to
# unix format.
path="$POTENTIAL_FREETYPE_LIB_PATH"
new_path=`$CYGPATH -u "$path"`
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
# the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
# "foo.exe" is OK but "foo" is an error.
#
# This test is therefore slightly more accurate than "test -f" to check for file precense.
# It is also a way to make sure we got the proper file name for the real test later on.
test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
if test "x$test_shortpath" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
fi
# Call helper function which possibly converts this using DOS-style short mode.
# If so, the updated path is stored in $new_path.
input_path="$new_path"
# 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 \)
shortmode_path=`$CYGPATH -s -m -a "$input_path"`
path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
# Going to short mode and back again did indeed matter. Since short mode is
# case insensitive, let's make it lowercase to improve readability.
shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
# Now convert it back to Unix-style (cygpath)
input_path=`$CYGPATH -u "$shortmode_path"`
new_path="$input_path"
fi
fi
test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
if test "x$test_cygdrive_prefix" = x; then
# As a simple fix, exclude /usr/bin since it's not a real path.
if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
# The path is in a Cygwin special directory (e.g. /home). We need this converted to
# a path prefixed by /cygdrive for fixpath to work.
new_path="$CYGWIN_ROOT_PATH$input_path"
fi
fi
if test "x$path" != "x$new_path"; then
POTENTIAL_FREETYPE_LIB_PATH="$new_path"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
fi
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
path="$POTENTIAL_FREETYPE_LIB_PATH"
has_colon=`$ECHO $path | $GREP ^.:`
new_path="$path"
if test "x$has_colon" = x; then
# Not in mixed or Windows style, start by that.
new_path=`cmd //c echo $path`
fi
input_path="$new_path"
# 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 \)
new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
windows_path="$new_path"
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
unix_path=`$CYGPATH -u "$windows_path"`
new_path="$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'`
new_path="$unix_path"
fi
if test "x$path" != "x$new_path"; then
POTENTIAL_FREETYPE_LIB_PATH="$new_path"
{ $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
fi
# Save the first 10 bytes of this path to the storage, so fixpath can work.
all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
else
# We're on a unix platform. Hooray! :)
path="$POTENTIAL_FREETYPE_LIB_PATH"
has_space=`$ECHO "$path" | $GREP " "`
if test "x$has_space" != x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
fi
# Use eval to expand a potential ~
eval path="$path"
if test ! -f "$path" && test ! -d "$path"; then
as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
fi
if test -d "$path"; then
POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
else
dir="`$DIRNAME "$path"`"
base="`$BASENAME "$path"`"
POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
fi
fi
fi
FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
$as_echo_n "checking for freetype includes... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
$as_echo_n "checking for freetype libraries... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
$as_echo "$FREETYPE_LIB_PATH" >&6; }
fi
fi
fi
if test "x$FOUND_FREETYPE" != xyes; then if test "x$FOUND_FREETYPE" != xyes; then
FREETYPE_BASE_DIR="$SYSROOT/usr/sfw" FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
@ -58396,7 +58892,7 @@ $as_echo_n "checking for memory size... " >&6; }
FOUND_MEM=yes FOUND_MEM=yes
elif test -x /usr/sbin/prtconf; then elif test -x /usr/sbin/prtconf; then
# Looks like a Solaris or AIX system # Looks like a Solaris or AIX system
MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'` MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
FOUND_MEM=yes FOUND_MEM=yes
elif test -x /usr/sbin/sysctl; then elif test -x /usr/sbin/sysctl; then
# Looks like a MacOSX system # Looks like a MacOSX system
@ -59224,9 +59720,9 @@ $as_echo "$tool_specified" >&6; }
fi fi
if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \ ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
&& ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \ && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
${icecc_create_env_log} 2>&1 ${icecc_create_env_log} 2>&1 )
if test "$?" != "0"; then if test "$?" != "0"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
$as_echo "$as_me: icecc-create-env output:" >&6;} $as_echo "$as_me: icecc-create-env output:" >&6;}
@ -59443,8 +59939,8 @@ $as_echo "$tool_specified" >&6; }
cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \ ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
&& ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
if test "$?" != "0"; then if test "$?" != "0"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
$as_echo "$as_me: icecc-create-env output:" >&6;} $as_echo "$as_me: icecc-create-env output:" >&6;}
@ -59475,9 +59971,9 @@ $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log" icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
if test "x${BUILD_CC##*/}" = "xgcc" || test "x${BUILD_CC##*/}" = "xcc"; then if test "x${BUILD_CC##*/}" = "xgcc" || test "x${BUILD_CC##*/}" = "xcc"; then
cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \ ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
&& ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \ && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
${icecc_create_env_log_build} 2>&1 ${icecc_create_env_log_build} 2>&1 )
if test "$?" != "0"; then if test "$?" != "0"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
$as_echo "$as_me: icecc-create-env output:" >&6;} $as_echo "$as_me: icecc-create-env output:" >&6;}
@ -59488,8 +59984,8 @@ $as_echo "$as_me: icecc-create-env output:" >&6;}
elif test "x${BUILD_CC##*/}" = "xclang"; then elif test "x${BUILD_CC##*/}" = "xclang"; then
cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \ ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
&& ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
if test "$?" != "0"; then if test "$?" != "0"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
$as_echo "$as_me: icecc-create-env output:" >&6;} $as_echo "$as_me: icecc-create-env output:" >&6;}

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -159,7 +159,9 @@ pkgadd_help() {
# called at the very beginning in configure.ac. # called at the very beginning in configure.ac.
AC_DEFUN_ONCE([HELP_PRINT_ADDITIONAL_HELP_AND_EXIT], AC_DEFUN_ONCE([HELP_PRINT_ADDITIONAL_HELP_AND_EXIT],
[ [
if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
# Print available toolchains
$PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n" $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
$PRINTF "Which are valid to use depends on the build platform.\n" $PRINTF "Which are valid to use depends on the build platform.\n"
for toolchain in $VALID_TOOLCHAINS_all; do for toolchain in $VALID_TOOLCHAINS_all; do

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -114,21 +114,6 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
AC_SUBST(JVM_VARIANT_ZEROSHARK) AC_SUBST(JVM_VARIANT_ZEROSHARK)
AC_SUBST(JVM_VARIANT_CORE) AC_SUBST(JVM_VARIANT_CORE)
INCLUDE_SA=true
if test "x$JVM_VARIANT_ZERO" = xtrue ; then
INCLUDE_SA=false
fi
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
INCLUDE_SA=false
fi
if test "x$OPENJDK_TARGET_OS" = xaix ; then
INCLUDE_SA=false
fi
if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
INCLUDE_SA=false
fi
AC_SUBST(INCLUDE_SA)
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
MACOSX_UNIVERSAL="true" MACOSX_UNIVERSAL="true"
fi fi

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -66,7 +66,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
], [ENABLE_DEBUG="no"]) ], [ENABLE_DEBUG="no"])
AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level], AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level],
[set the debug level (release, fastdebug, slowdebug, optimized (HotSpot build only)) @<:@release@:>@])], [set the debug level (release, fastdebug, slowdebug, optimized) @<:@release@:>@])],
[ [
DEBUG_LEVEL="${withval}" DEBUG_LEVEL="${withval}"
if test "x$ENABLE_DEBUG" = xyes; then if test "x$ENABLE_DEBUG" = xyes; then
@ -79,7 +79,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_LEVEL],
test "x$DEBUG_LEVEL" != xoptimized && \ test "x$DEBUG_LEVEL" != xoptimized && \
test "x$DEBUG_LEVEL" != xfastdebug && \ test "x$DEBUG_LEVEL" != xfastdebug && \
test "x$DEBUG_LEVEL" != xslowdebug; then test "x$DEBUG_LEVEL" != xslowdebug; then
AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug]) AC_MSG_ERROR([Allowed debug levels are: release, fastdebug, slowdebug and optimized])
fi fi
]) ])
@ -176,6 +176,22 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
fi fi
AC_SUBST(UNLIMITED_CRYPTO) AC_SUBST(UNLIMITED_CRYPTO)
# Should we build the serviceability agent (SA)?
INCLUDE_SA=true
if test "x$JVM_VARIANT_ZERO" = xtrue ; then
INCLUDE_SA=false
fi
if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
INCLUDE_SA=false
fi
if test "x$OPENJDK_TARGET_OS" = xaix ; then
INCLUDE_SA=false
fi
if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
INCLUDE_SA=false
fi
AC_SUBST(INCLUDE_SA)
# Compress jars # Compress jars
COMPRESS_JARS=false COMPRESS_JARS=false
@ -222,7 +238,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
AC_MSG_CHECKING([what type of native debug symbols to use]) AC_MSG_CHECKING([what type of native debug symbols to use])
AC_ARG_WITH([native-debug-symbols], AC_ARG_WITH([native-debug-symbols],
[AS_HELP_STRING([--with-native-debug-symbols], [AS_HELP_STRING([--with-native-debug-symbols],
[set the native debug symbol configuration (none, internal, external, zipped) @<:@zipped@:>@])], [set the native debug symbol configuration (none, internal, external, zipped) @<:@varying@:>@])],
[ [
if test "x$OPENJDK_TARGET_OS" = xaix; then if test "x$OPENJDK_TARGET_OS" = xaix; then
if test "x$withval" = xexternal || test "x$withval" = xzipped; then if test "x$withval" = xexternal || test "x$withval" = xzipped; then
@ -234,9 +250,13 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
if test "x$OPENJDK_TARGET_OS" = xaix; then if test "x$OPENJDK_TARGET_OS" = xaix; then
# AIX doesn't support 'zipped' so use 'internal' as default # AIX doesn't support 'zipped' so use 'internal' as default
with_native_debug_symbols="internal" with_native_debug_symbols="internal"
else
if test "x$STATIC_BUILD" = xtrue; then
with_native_debug_symbols="none"
else else
with_native_debug_symbols="zipped" with_native_debug_symbols="zipped"
fi fi
fi
]) ])
NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
AC_MSG_RESULT([$NATIVE_DEBUG_SYMBOLS]) AC_MSG_RESULT([$NATIVE_DEBUG_SYMBOLS])

View file

@ -349,6 +349,14 @@ AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
fi fi
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
if test "x$FOUND_FREETYPE" != xyes; then
# Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
fi
fi
if test "x$FOUND_FREETYPE" != xyes; then if test "x$FOUND_FREETYPE" != xyes; then
FREETYPE_BASE_DIR="$SYSROOT/usr/sfw" FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -36,10 +36,12 @@ CONFIGURE_COMMAND_LINE:=@CONFIGURE_COMMAND_LINE@
# A self-referential reference to this file. # A self-referential reference to this file.
SPEC:=@SPEC@ SPEC:=@SPEC@
# SPACE is defined in MakeBase.gmk, but it is also used in := rules here for some # SPACE and COMMA are defined in MakeBase.gmk, but they are also used in
# toolchains, and is needed if MakeBase.gmk is not included before this file. # some definitions here, and are needed if MakeBase.gmk is not included before
# this file.
X:= X:=
SPACE:=$(X) $(X) SPACE:=$(X) $(X)
COMMA:=,
# What make to use for main processing, after bootstrapping top-level Makefile. # What make to use for main processing, after bootstrapping top-level Makefile.
MAKE := @MAKE@ MAKE := @MAKE@
@ -350,10 +352,8 @@ CFLAGS_JDKEXE:=@CFLAGS_JDKEXE@
CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@ CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@
CXX:=@FIXPATH@ @CCACHE@ @ICECC@ @CXX@ CXX:=@FIXPATH@ @CCACHE@ @ICECC@ @CXX@
#CXXFLAGS:=@CXXFLAGS@
CPP:=@FIXPATH@ @CPP@ CPP:=@FIXPATH@ @CPP@
#CPPFLAGS:=@CPPFLAGS@
# The linker can be gcc or ld on unix systems, or link.exe on windows systems. # The linker can be gcc or ld on unix systems, or link.exe on windows systems.
LD:=@FIXPATH@ @LD@ LD:=@FIXPATH@ @LD@

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -50,6 +50,67 @@ TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio" TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++" TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
# Minimum supported versions, empty means unspecified
TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
TOOLCHAIN_MINIMUM_VERSION_microsoft=""
TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
TOOLCHAIN_MINIMUM_VERSION_xlc=""
# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
AC_DEFUN([TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS],
[
if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
AC_MSG_WARN([C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER.])
AC_MSG_WARN([This typically indicates a broken setup, and is not supported])
fi
# We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
if [ [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ]; then
AC_MSG_WARN([C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong.])
fi
if [ [[ "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ]; then
AC_MSG_WARN([C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong.])
fi
COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", [$]1, [$]2, [$]3) }' <<< "$CC_VERSION_NUMBER"`
])
# Check if the configured compiler (C and C++) is of a specific version or
# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
#
# Arguments:
# VERSION: The version string to check against the found version
# IF_AT_LEAST: block to run if the compiler is at least this version (>=)
# IF_OLDER_THAN: block to run if the compiler is older than this version (<)
BASIC_DEFUN_NAMED([TOOLCHAIN_CHECK_COMPILER_VERSION],
[*VERSION IF_AT_LEAST IF_OLDER_THAN], [$@],
[
# Need to assign to a variable since m4 is blocked from modifying parts in [].
REFERENCE_VERSION=ARG_VERSION
if [ [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ]; then
AC_MSG_ERROR([Internal errror: Cannot compare to ARG_VERSION, only three parts (X.Y.Z) is supported])
fi
if [ [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ]; then
AC_MSG_ERROR([Internal errror: Cannot compare to ARG_VERSION, only parts < 99999 is supported])
fi
# Version comparison method inspired by http://stackoverflow.com/a/24067243
COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", [$]1, [$]2, [$]3) }' <<< "$REFERENCE_VERSION"`
if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
:
ARG_IF_AT_LEAST
else
:
ARG_IF_OLDER_THAN
fi
])
# Setup a number of variables describing how native output files are # Setup a number of variables describing how native output files are
# named on this platform/toolchain. # named on this platform/toolchain.
AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS], AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
@ -175,6 +236,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
# Use indirect variable referencing # Use indirect variable referencing
toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
TOOLCHAIN_DESCRIPTION=${!toolchain_var_name} TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
TOOLCHAIN_CC_BINARY=${!toolchain_var_name} TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
@ -216,10 +279,16 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
# The microsoft toolchain also requires INCLUDE and LIB to be set. # The microsoft toolchain also requires INCLUDE and LIB to be set.
export INCLUDE="$VS_INCLUDE" export INCLUDE="$VS_INCLUDE"
export LIB="$VS_LIB" export LIB="$VS_LIB"
else
if test "x$XCODE_VERSION_OUTPUT" != x; then
# For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
else else
# Currently we do not define this for other toolchains. This might change as the need arise. # Currently we do not define this for other toolchains. This might change as the need arise.
TOOLCHAIN_VERSION= TOOLCHAIN_VERSION=
fi fi
fi
AC_SUBST(TOOLCHAIN_VERSION) AC_SUBST(TOOLCHAIN_VERSION)
# For solaris we really need solaris tools, and not the GNU equivalent. # For solaris we really need solaris tools, and not the GNU equivalent.
@ -257,7 +326,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
# #
# $1 = compiler to test (CC or CXX) # $1 = compiler to test (CC or CXX)
# $2 = human readable name of compiler (C or C++) # $2 = human readable name of compiler (C or C++)
AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION], AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION],
[ [
COMPILER=[$]$1 COMPILER=[$]$1
COMPILER_NAME=$2 COMPILER_NAME=$2
@ -354,7 +423,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION],
# Collapse compiler output into a single line # Collapse compiler output into a single line
COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT` COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \ COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
$SED -e 's/^.*clang version \(@<:@1-9@:>@@<:@0-9.@:>@*\).*$/\1/'` $SED -e 's/^.* version \(@<:@1-9@:>@@<:@0-9.@:>@*\).*$/\1/'`
else else
AC_MSG_ERROR([Unknown toolchain type $TOOLCHAIN_TYPE.]) AC_MSG_ERROR([Unknown toolchain type $TOOLCHAIN_TYPE.])
fi fi
@ -451,7 +520,7 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
fi fi
fi fi
TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME]) TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME])
]) ])
# Detect the core components of the toolchain, i.e. the compilers (CC and CXX), # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
@ -471,6 +540,20 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
# Now that we have resolved CXX ourself, let autoconf have its go at it # Now that we have resolved CXX ourself, let autoconf have its go at it
AC_PROG_CXX([$CXX]) AC_PROG_CXX([$CXX])
# This is the compiler version number on the form X.Y[.Z]
AC_SUBST(CC_VERSION_NUMBER)
AC_SUBST(CXX_VERSION_NUMBER)
TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS
if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: $TOOLCHAIN_MINIMUM_VERSION,
IF_OLDER_THAN: [
AC_MSG_WARN([You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration.])
]
)
fi
# #
# Setup the preprocessor (CPP and CXXCPP) # Setup the preprocessor (CPP and CXXCPP)
# #

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -102,32 +102,21 @@ diff_text() {
if test "x$SUFFIX" = "xclass"; then if test "x$SUFFIX" = "xclass"; then
# To improve performance when large diffs are found, do a rough filtering of classes # To improve performance when large diffs are found, do a rough filtering of classes
# elibeble for these exceptions # elibeble for these exceptions
if $GREP -R -e '[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}' \ if $GREP -R -e '[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}-[0-9]\{6\}' \
-e '[0-9]\{2\}/[0-9]\{2\}/[0-9]\{4\}' \
-e 'lambda\$[a-zA-Z0-9]*\$[0-9]' ${THIS_FILE} > /dev/null; then -e 'lambda\$[a-zA-Z0-9]*\$[0-9]' ${THIS_FILE} > /dev/null; then
$JAVAP -c -constants -l -p "${OTHER_FILE}" > ${OTHER_FILE}.javap $JAVAP -c -constants -l -p "${OTHER_FILE}" > ${OTHER_FILE}.javap
$JAVAP -c -constants -l -p "${THIS_FILE}" > ${THIS_FILE}.javap $JAVAP -c -constants -l -p "${THIS_FILE}" > ${THIS_FILE}.javap
TMP=$($DIFF ${OTHER_FILE}.javap ${THIS_FILE}.javap | \ TMP=$($DIFF ${OTHER_FILE}.javap ${THIS_FILE}.javap | \
$GREP '^[<>]' | \ $GREP '^[<>]' | \
$SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d' \ $SED -e '/[<>].*[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}-[0-9]\{6\}.*/d' \
-e '/[0-9]\{2\}\/[0-9]\{2\}\/[0-9]\{4\}/d' \
-e '/[<>].*lambda\$[a-zA-Z0-9]*\$[0-9]*/d') -e '/[<>].*lambda\$[a-zA-Z0-9]*\$[0-9]*/d')
fi fi
fi fi
if test "x$SUFFIX" = "xproperties"; then if test "x$SUFFIX" = "xproperties"; then
# Run through nawk to add possibly missing newline at end of file.
$CAT $OTHER_FILE | $NAWK '{ print }' | LC_ALL=C $SORT > $OTHER_FILE.cleaned
# Disable this exception since we aren't changing the properties cleaning method yet.
# $CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
# | $SED -f "$SRC_ROOT/common/makefiles/support/unicode2x.sed" \
# | $SED -e '/^#/d' -e '/^$/d' \
# -e :a -e '/\\$/N; s/\\\n//; ta' \
# -e 's/^[ \t]*//;s/[ \t]*$//' \
# -e 's/\\=/=/' | LC_ALL=C $SORT > $OTHER_FILE.cleaned
# Filter out date string differences. # Filter out date string differences.
TMP=$(LC_ALL=C $DIFF $OTHER_FILE.cleaned $THIS_FILE | \ TMP=$(LC_ALL=C $DIFF $OTHER_FILE $THIS_FILE | \
$GREP '^[<>]' | \ $GREP '^[<>]' | \
$SED -e '/[<>].*[0-9]\{4\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}_[0-9]\{2\}-b[0-9]\{2\}.*/d') $SED -e '/[<>].*[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}-[0-9]\{6\}.*/d')
fi fi
if test "x$SUFFIX" = "xhtml"; then if test "x$SUFFIX" = "xhtml"; then
# Some javadoc versions do not put quotes around font size # Some javadoc versions do not put quotes around font size
@ -306,7 +295,8 @@ compare_general_files() {
! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" \ ! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" \
! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" \ ! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" \
! -name "JavaUpdater" ! -name "JavaWSApplicationStub" \ ! -name "JavaUpdater" ! -name "JavaWSApplicationStub" \
! -name "jspawnhelper" ! -name "*.a" \ ! -name "jspawnhelper" ! -name "JavawsLauncher" ! -name "*.a" \
! -name "finish_installation" ! -name "Sparkle" \
| $GREP -v "./bin/" | $SORT | $FILTER) | $GREP -v "./bin/" | $SORT | $FILTER)
echo Other files with binary differences... echo Other files with binary differences...
@ -320,29 +310,28 @@ compare_general_files() {
THIS_FILE=$WORK_DIR/$f.this THIS_FILE=$WORK_DIR/$f.this
$MKDIR -p $(dirname $OTHER_FILE) $MKDIR -p $(dirname $OTHER_FILE)
$MKDIR -p $(dirname $THIS_FILE) $MKDIR -p $(dirname $THIS_FILE)
$CAT $OTHER_DIR/$f | $SED 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' > $OTHER_FILE RELEASE_FILTER="$SED \
$CAT $THIS_DIR/$f | $SED 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' > $THIS_FILE -e 's/\:[0-9a-f]\{12,12\}/:CHANGE/g' \
-e 's/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}-[0-9]\{6\}/<DATE>/g'
"
$CAT $OTHER_DIR/$f | eval "$RELEASE_FILTER" > $OTHER_FILE
$CAT $THIS_DIR/$f | eval "$RELEASE_FILTER" > $THIS_FILE
elif [ "x$SUFFIX" = "xhtml" ]; then elif [ "x$SUFFIX" = "xhtml" ]; then
# Ignore time stamps in docs files # Ignore time stamps in docs files
OTHER_FILE=$WORK_DIR/$f.other OTHER_FILE=$WORK_DIR/$f.other
THIS_FILE=$WORK_DIR/$f.this THIS_FILE=$WORK_DIR/$f.this
$MKDIR -p $(dirname $OTHER_FILE) $MKDIR -p $(dirname $OTHER_FILE) $(dirname $THIS_FILE)
$MKDIR -p $(dirname $THIS_FILE) # Older versions of compare might have left soft links with
# these names.
$RM $OTHER_FILE $THIS_FILE
#Note that | doesn't work on mac sed. #Note that | doesn't work on mac sed.
$CAT $OTHER_DIR/$f | $SED -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \ HTML_FILTER="$SED \
-e 's/\(<meta name="date" content="\).*\(">\)/\1(removed)\2/' \ -e 's/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}-[0-9]\{6\}/<DATE>/g' \
-e 's/[A-Z][a-z]*, [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* [AMP]\{2,2\} [A-Z][A-Z]*/(removed)/' \ -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \
-e 's/[A-Z][a-z]* [A-Z][a-z]* [0-9][0-9] [0-9][0-9:]* [A-Z][A-Z]* [12][0-9]*/(removed)/' \ -e 's/[A-Z][a-z]*, [A-Z][a-z]* [0-9][0-9]*, [0-9]\{4\} [0-9][0-9:]* [AMP]\{2,2\} [A-Z][A-Z]*/<DATE>/'
-e 's/^\( from \).*\(\.idl\)$/\1(removed)\2/' \ "
-e 's/^\(.*\)\( o'"'"'clock \)\([A-Z][A-Z][A-Z]\)/(removed)\2(removed)/' \ $CAT $OTHER_DIR/$f | eval "$HTML_FILTER" > $OTHER_FILE
> $OTHER_FILE $CAT $THIS_DIR/$f | eval "$HTML_FILTER" > $THIS_FILE
$CAT $THIS_DIR/$f | $SED -e 's/\(-- Generated by javadoc \).*\( --\)/\1(removed)\2/' \
-e 's/\(<meta name="date" content="\).*\(">\)/\1(removed)\2/' \
-e 's/[A-Z][a-z]*, [A-Z][a-z]* [0-9][0-9]*, [12][0-9]* [0-9][0-9:]* [AMP]\{2,2\} [A-Z][A-Z]*/(removed)/' \
-e 's/[A-Z][a-z]* [A-Z][a-z]* [0-9][0-9] [0-9][0-9:]* [A-Z][A-Z]* [12][0-9]*/(removed)/' \
-e 's/^\( from \).*\(\.idl\)$/\1(removed)\2/' \
-e 's/^\(.*\)\( o'"'"'clock \)\([A-Z][A-Z][A-Z]\)/(removed)\2(removed)/' \
> $THIS_FILE
else else
OTHER_FILE=$OTHER_DIR/$f OTHER_FILE=$OTHER_DIR/$f
THIS_FILE=$THIS_DIR/$f THIS_FILE=$THIS_DIR/$f
@ -605,11 +594,17 @@ compare_bin_file() {
OTHER_FILE_BASE=${OTHER_FILE_BASE/.exe/} OTHER_FILE_BASE=${OTHER_FILE_BASE/.exe/}
OTHER_FILE_BASE=${OTHER_FILE_BASE/.cpl/} OTHER_FILE_BASE=${OTHER_FILE_BASE/.cpl/}
DIZ_NAME=$(basename $OTHER_FILE_BASE).diz DIZ_NAME=$(basename $OTHER_FILE_BASE).diz
# java.exe and java.dll diz files will have the same name. Have to # Some .exe files have the same name as a .dll file. Make sure the exe
# make sure java.exe gets the right one. This is only needed for # files get the right debug symbols.
# OTHER since in the new build, all pdb files are left around. if [ "$NAME" = "java.exe" ] \
if [ "$NAME" = "java.exe" ] && [ -f "$OTHER/tmp/java/java/obj64/java.diz" ]; then && [ -f "$OTHER/support/native/java.base/java_objs/java.diz" ]; then
OTHER_DIZ_FILE="$OTHER/tmp/java/java/obj64/java.diz" OTHER_DIZ_FILE="$OTHER/support/native/java.base/java_objs/java.diz"
elif [ "$NAME" = "jimage.exe" ] \
&& [ -f "$OTHER/support/native/jdk.dev/jimage_objs/jimage.diz" ]; then
OTHER_DIZ_FILE="$OTHER/support/native/jdk.dev/jimage_objs/jimage.diz"
elif [ "$NAME" = "javacpl.exe" ] \
&& [ -f "$OTHER/support/native/jdk.plugin/javacpl/javacpl.diz" ]; then
OTHER_DIZ_FILE="$OTHER/support/native/jdk.plugin/javacpl/javacpl.diz"
elif [ -f "${OTHER_FILE_BASE}.diz" ]; then elif [ -f "${OTHER_FILE_BASE}.diz" ]; then
OTHER_DIZ_FILE=${OTHER_FILE_BASE}.diz OTHER_DIZ_FILE=${OTHER_FILE_BASE}.diz
else else
@ -627,9 +622,22 @@ compare_bin_file() {
(cd $FILE_WORK_DIR/other ; $UNARCHIVE -o $OTHER_DIZ_FILE) (cd $FILE_WORK_DIR/other ; $UNARCHIVE -o $OTHER_DIZ_FILE)
export _NT_SYMBOL_PATH="$FILE_WORK_DIR/other" export _NT_SYMBOL_PATH="$FILE_WORK_DIR/other"
fi fi
THIS_FILE_BASE=${THIS_FILE/.dll/} THIS_FILE_BASE=${THIS_FILE/.dll/}
THIS_FILE_BASE=${THIS_FILE_BASE/.exe/} THIS_FILE_BASE=${THIS_FILE_BASE/.exe/}
if [ -f "${THIS_FILE/.dll/}.diz" ]; then THIS_FILE_BASE=${THIS_FILE_BASE/.cpl/}
# Some .exe files have the same name as a .dll file. Make sure the exe
# files get the right debug symbols.
if [ "$NAME" = "java.exe" ] \
&& [ -f "$THIS/support/native/java.base/java_objs/java.diz" ]; then
THIS_DIZ_FILE="$THIS/support/native/java.base/java_objs/java.diz"
elif [ "$NAME" = "jimage.exe" ] \
&& [ -f "$THIS/support/native/jdk.dev/jimage_objs/jimage.diz" ]; then
THIS_DIZ_FILE="$THIS/support/native/jdk.dev/jimage_objs/jimage.diz"
elif [ "$NAME" = "javacpl.exe" ] \
&& [ -f "$THIS/support/native/jdk.plugin/javacpl/javacpl.diz" ]; then
THIS_DIZ_FILE="$THIS/support/native/jdk.plugin/javacpl/javacpl.diz"
elif [ -f "${THIS_FILE_BASE}.diz" ]; then
THIS_DIZ_FILE=${THIS_FILE/.dll/}.diz THIS_DIZ_FILE=${THIS_FILE/.dll/}.diz
else else
THIS_DIZ_FILE="$($FIND $THIS_DIR -name $DIZ_NAME | $SED 1q)" THIS_DIZ_FILE="$($FIND $THIS_DIR -name $DIZ_NAME | $SED 1q)"
@ -738,6 +746,9 @@ compare_bin_file() {
elif [ "$OPENJDK_TARGET_OS" = "aix" ]; then elif [ "$OPENJDK_TARGET_OS" = "aix" ]; then
$OBJDUMP -T $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other $OBJDUMP -T $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
$OBJDUMP -T $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this $OBJDUMP -T $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
elif [ "$OPENJDK_TARGET_OS" = "macosx" ]; then
$NM -j $ORIG_OTHER_FILE 2> /dev/null | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
$NM -j $ORIG_THIS_FILE 2> /dev/null | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
else else
$NM -a $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other $NM -a $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other
$NM -a $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this $NM -a $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this
@ -856,8 +867,15 @@ compare_bin_file() {
if [ -z "$DIS_DIFF_FILTER" ]; then if [ -z "$DIS_DIFF_FILTER" ]; then
DIS_DIFF_FILTER="$GREP -v ' # .* <.*>$' | $SED -r -e 's/(\b|x)([0-9a-fA-F]+)(\b|:|>)/X/g'" DIS_DIFF_FILTER="$GREP -v ' # .* <.*>$' | $SED -r -e 's/(\b|x)([0-9a-fA-F]+)(\b|:|>)/X/g'"
fi fi
$DIS_CMD $OTHER_FILE | $GREP -v $NAME | eval "$DIS_DIFF_FILTER" > $WORK_FILE_BASE.dis.other 2>&1 if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
$DIS_CMD $THIS_FILE | $GREP -v $NAME | eval "$DIS_DIFF_FILTER" > $WORK_FILE_BASE.dis.this 2>&1 DIS_GREP_ARG=-a
else
DIS_GREP_ARG=
fi
$DIS_CMD $OTHER_FILE | $GREP $DIS_GREP_ARG -v $NAME \
| eval "$DIS_DIFF_FILTER" > $WORK_FILE_BASE.dis.other 2>&1
$DIS_CMD $THIS_FILE | $GREP $DIS_GREP_ARG -v $NAME \
| eval "$DIS_DIFF_FILTER" > $WORK_FILE_BASE.dis.this 2>&1
LC_ALL=C $DIFF $WORK_FILE_BASE.dis.other $WORK_FILE_BASE.dis.this > $WORK_FILE_BASE.dis.diff LC_ALL=C $DIFF $WORK_FILE_BASE.dis.other $WORK_FILE_BASE.dis.this > $WORK_FILE_BASE.dis.diff
@ -974,6 +992,15 @@ compare_all_execs() {
-o -name '*.jar' -o -name '*.diz' -o -name 'jcontrol' -o -name '*.properties' \ -o -name '*.jar' -o -name '*.diz' -o -name 'jcontrol' -o -name '*.properties' \
-o -name '*.data' -o -name '*.bfc' -o -name '*.src' -o -name '*.txt' \ -o -name '*.data' -o -name '*.bfc' -o -name '*.src' -o -name '*.txt' \
-o -name '*.cfg' -o -name 'meta-index' -o -name '*.properties.ja' \ -o -name '*.cfg' -o -name 'meta-index' -o -name '*.properties.ja' \
-o -name '*.xml' -o -name '*.html' -o -name '*.png' -o -name 'README' \
-o -name '*.zip' -o -name '*.jimage' -o -name '*.java' -o -name '*.mf' \
-o -name '*.jpg' -o -name '*.wsdl' -o -name '*.js' -o -name '*.sh' \
-o -name '*.bat' -o -name '*LICENSE' -o -name '*.d' -o -name '*store' \
-o -name 'blacklist' -o -name '*certs' -o -name '*.ttf' \
-o -name '*.jfc' -o -name '*.dat' -o -name 'release' -o -name '*.dir'\
-o -name '*.sym' -o -name '*.idl' -o -name '*.h' -o -name '*.access' \
-o -name '*.template' -o -name '*.policy' -o -name '*.security' \
-o -name 'COPYRIGHT' -o -name '*.1' \
-o -name 'classlist' \) | $SORT | $FILTER) -o -name 'classlist' \) | $SORT | $FILTER)
fi fi
@ -996,14 +1023,6 @@ compare_all_execs() {
################################################################################ ################################################################################
# Initiate configuration # Initiate configuration
COMPARE_ROOT=/tmp/cimages.$USER
$MKDIR -p $COMPARE_ROOT
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
if [ "$(uname -o)" = "Cygwin" ]; then
COMPARE_ROOT=$(cygpath -msa $COMPARE_ROOT)
fi
fi
THIS="$SCRIPT_DIR" THIS="$SCRIPT_DIR"
echo "$THIS" echo "$THIS"
THIS_SCRIPT="$0" THIS_SCRIPT="$0"
@ -1026,6 +1045,7 @@ if [ -z "$1" ] || [ "$1" = "-h" ] || [ "$1" = "-?" ] || [ "$1" = "/h" ] || [ "$1
echo "" echo ""
echo "--sort-symbols Sort all symbols before comparing" echo "--sort-symbols Sort all symbols before comparing"
echo "--strip Strip all binaries before comparing" echo "--strip Strip all binaries before comparing"
echo "--clean Clean all previous comparison results first"
echo "" echo ""
echo "[FILTER] List filenames in the image to compare, works for jars, zips, libs and execs" echo "[FILTER] List filenames in the image to compare, works for jars, zips, libs and execs"
echo "Example:" echo "Example:"
@ -1125,6 +1145,9 @@ while [ -n "$1" ]; do
--strip) --strip)
STRIP_ALL=true STRIP_ALL=true
;; ;;
--clean)
CLEAN_OUTPUT=true
;;
*) *)
CMP_NAMES=false CMP_NAMES=false
CMP_PERMS=false CMP_PERMS=false
@ -1143,6 +1166,23 @@ while [ -n "$1" ]; do
shift shift
done done
if [ "$STRIP_ALL" = "true" ] && [ -z "$STRIP" ]; then
echo Warning: Not stripping even with --strip, since strip is missing on this platform
STRIP_ALL=false
fi
COMPARE_ROOT=/tmp/cimages.$USER
if [ "$CLEAN_OUTPUT" = "true" ]; then
echo Cleaning old output in $COMPARE_ROOT.
$RM -rf $COMPARE_ROOT
fi
$MKDIR -p $COMPARE_ROOT
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
if [ "$(uname -o)" = "Cygwin" ]; then
COMPARE_ROOT=$(cygpath -msa $COMPARE_ROOT)
fi
fi
if [ "$CMP_2_ZIPS" = "true" ]; then if [ "$CMP_2_ZIPS" = "true" ]; then
THIS_DIR="$(dirname $THIS_FILE)" THIS_DIR="$(dirname $THIS_FILE)"
THIS_DIR="$(cd "$THIS_DIR" > /dev/null && pwd )" THIS_DIR="$(cd "$THIS_DIR" > /dev/null && pwd )"
@ -1278,6 +1318,15 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
echo " $OTHER_DEPLOY_APPLET_PLUGIN_DIR" echo " $OTHER_DEPLOY_APPLET_PLUGIN_DIR"
fi fi
if [ -d "$THIS/install/sparkle/Sparkle.framework" ] \
&& [ -d "$OTHER/install/sparkle/Sparkle.framework" ]; then
THIS_SPARKLE_DIR="$THIS/install/sparkle/Sparkle.framework"
OTHER_SPARKLE_DIR="$OTHER/install/sparkle/Sparkle.framework"
echo "Also comparing install sparkle framework"
echo " $THIS_SPARKLE_DIR"
echo " $OTHER_SPARKLE_DIR"
fi
if [ -d "$OTHER/images" ]; then if [ -d "$OTHER/images" ]; then
OTHER_SEC_DIR="$OTHER/images" OTHER_SEC_DIR="$OTHER/images"
else else
@ -1298,9 +1347,9 @@ if [ "$SKIP_DEFAULT" != "true" ]; then
THIS_JGSS_WINDOWS_BIN="$THIS_SEC_DIR/$JGSS_WINDOWS_BIN" THIS_JGSS_WINDOWS_BIN="$THIS_SEC_DIR/$JGSS_WINDOWS_BIN"
fi fi
if [ -d "$THIS/docs" ] && [ -d "$OTHER/docs" ]; then if [ -d "$THIS/images/docs" ] && [ -d "$OTHER/images/docs" ]; then
THIS_DOCS="$THIS/docs" THIS_DOCS="$THIS/images/docs"
OTHER_DOCS="$OTHER/docs" OTHER_DOCS="$OTHER/images/docs"
echo "Also comparing docs" echo "Also comparing docs"
else else
echo "WARNING! Docs haven't been built and won't be compared." echo "WARNING! Docs haven't been built and won't be compared."
@ -1349,6 +1398,12 @@ if [ "$CMP_NAMES" = "true" ]; then
echo -n "JavaAppletPlugin " echo -n "JavaAppletPlugin "
compare_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin compare_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi fi
if [ -n "$THIS_SPARKLE_DIR" ] && [ -n "$OTHER_SPARKLE_DIR" ]; then
echo -n "Sparkle.framework "
compare_dirs $THIS_SPARKLE_DIR $OTHER_SPARKLE_DIR $COMPARE_ROOT/sparkle
echo -n "Sparkle.framework "
compare_files $THIS_SPARKLE_DIR $OTHER_SPARKLE_DIR $COMPARE_ROOT/sparkle
fi
fi fi
if [ "$CMP_PERMS" = "true" ]; then if [ "$CMP_PERMS" = "true" ]; then
@ -1365,6 +1420,10 @@ if [ "$CMP_PERMS" = "true" ]; then
echo -n "JavaAppletPlugin " echo -n "JavaAppletPlugin "
compare_permissions $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin compare_permissions $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi fi
if [ -n "$THIS_SPARKLE_DIR" ] && [ -n "$OTHER_SPARKLE_DIR" ]; then
echo -n "Sparkle.framework "
compare_permissions $THIS_SPARKLE_DIR $OTHER_SPARKLE_DIR $COMPARE_ROOT/sparkle
fi
fi fi
if [ "$CMP_TYPES" = "true" ]; then if [ "$CMP_TYPES" = "true" ]; then
@ -1387,6 +1446,10 @@ if [ "$CMP_TYPES" = "true" ]; then
echo -n "JavaAppletPlugin " echo -n "JavaAppletPlugin "
compare_file_types $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin compare_file_types $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi fi
if [ -n "$THIS_SPARKLE_DIR" ] && [ -n "$OTHER_SPARKLE_DIR" ]; then
echo -n "Sparkle.framework "
compare_file_types $THIS_SPARKLE_DIR $OTHER_SPARKLE_DIR $COMPARE_ROOT/sparkle
fi
fi fi
if [ "$CMP_GENERAL" = "true" ]; then if [ "$CMP_GENERAL" = "true" ]; then
@ -1413,6 +1476,10 @@ if [ "$CMP_GENERAL" = "true" ]; then
echo -n "JavaAppletPlugin " echo -n "JavaAppletPlugin "
compare_general_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin compare_general_files $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi fi
if [ -n "$THIS_SPARKLE_DIR" ] && [ -n "$OTHER_SPARKLE_DIR" ]; then
echo -n "Sparkle.framework "
compare_general_files $THIS_SPARKLE_DIR $OTHER_SPARKLE_DIR $COMPARE_ROOT/sparkle
fi
fi fi
if [ "$CMP_ZIPS" = "true" ]; then if [ "$CMP_ZIPS" = "true" ]; then
@ -1476,6 +1543,10 @@ if [ "$CMP_LIBS" = "true" ]; then
echo -n "JavaAppletPlugin " echo -n "JavaAppletPlugin "
compare_all_libs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin compare_all_libs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi fi
if [ -n "$THIS_SPARKLE_DIR" ] && [ -n "$OTHER_SPARKLE_DIR" ]; then
echo -n "Sparkle.framework "
compare_all_libs $THIS_SPARKLE_DIR $OTHER_SPARKLE_DIR $COMPARE_ROOT/sparkle
fi
fi fi
if [ "$CMP_EXECS" = "true" ]; then if [ "$CMP_EXECS" = "true" ]; then
@ -1493,6 +1564,10 @@ if [ "$CMP_EXECS" = "true" ]; then
echo -n "JavaAppletPlugin " echo -n "JavaAppletPlugin "
compare_all_execs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin compare_all_execs $THIS_DEPLOY_APPLET_PLUGIN_DIR $OTHER_DEPLOY_APPLET_PLUGIN_DIR $COMPARE_ROOT/plugin
fi fi
if [ -n "$THIS_SPARKLE_DIR" ] && [ -n "$OTHER_SPARKLE_DIR" ]; then
echo -n "Sparkle.framework "
compare_all_execs $THIS_SPARKLE_DIR $OTHER_SPARKLE_DIR $COMPARE_ROOT/sparkle
fi
fi fi
echo echo

File diff suppressed because it is too large Load diff

View file

@ -347,3 +347,5 @@ ea285530245cf4e0edf0479121a41347d3030eba jdk-9+98
9c4662334d933d299928d1f599d02ff50777cbf8 jdk-9+102 9c4662334d933d299928d1f599d02ff50777cbf8 jdk-9+102
0680fb7dae4da1ee6cf783c4b74184e3e08d3179 jdk-9+103 0680fb7dae4da1ee6cf783c4b74184e3e08d3179 jdk-9+103
e385e95e6101711d5c63e7b1a827e99b6ec7a1cc jdk-9+104 e385e95e6101711d5c63e7b1a827e99b6ec7a1cc jdk-9+104
64006ae915b3aa85ac7e6fac679024d2da7fe526 jdk-9+105
8ec4f97943fe56f93e4621f622b56b7144c0181a jdk-9+106

View file

@ -54,11 +54,17 @@ public class CorbaInboundConnectionCacheImpl
{ {
protected Collection connectionCache; protected Collection connectionCache;
private Acceptor acceptor;
public CorbaInboundConnectionCacheImpl(ORB orb, Acceptor acceptor) public CorbaInboundConnectionCacheImpl(ORB orb, Acceptor acceptor)
{ {
super(orb, acceptor.getConnectionCacheType(), super(orb, acceptor.getConnectionCacheType(),
((CorbaAcceptor)acceptor).getMonitoringName()); ((CorbaAcceptor)acceptor).getMonitoringName());
this.connectionCache = new ArrayList(); this.connectionCache = new ArrayList();
this.acceptor = acceptor;
if (orb.transportDebugFlag) {
dprint(": " + acceptor );
}
} }
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
@ -66,11 +72,25 @@ public class CorbaInboundConnectionCacheImpl
// pept.transport.InboundConnectionCache // pept.transport.InboundConnectionCache
// //
public void close () {
super.close();
if (orb.transportDebugFlag) {
dprint(".close: " + acceptor );
}
this.acceptor.close();
}
public Connection get(Acceptor acceptor) public Connection get(Acceptor acceptor)
{ {
throw wrapper.methodShouldNotBeCalled(); throw wrapper.methodShouldNotBeCalled();
} }
public Acceptor getAcceptor () {
return acceptor;
}
public void put(Acceptor acceptor, Connection connection) public void put(Acceptor acceptor, Connection connection)
{ {
if (orb.transportDebugFlag) { if (orb.transportDebugFlag) {

View file

@ -188,8 +188,9 @@ public class CorbaTransportManagerImpl
for (Object cc : outboundConnectionCaches.values()) { for (Object cc : outboundConnectionCaches.values()) {
((ConnectionCache)cc).close() ; ((ConnectionCache)cc).close() ;
} }
for (Object cc : inboundConnectionCaches.values()) { for (Object icc : inboundConnectionCaches.values()) {
((ConnectionCache)cc).close() ; ((ConnectionCache)icc).close() ;
unregisterAcceptor(((InboundConnectionCache)icc).getAcceptor());
} }
getSelector(0).close(); getSelector(0).close();
} finally { } finally {

View file

@ -26,16 +26,20 @@
package com.sun.corba.se.impl.transport; package com.sun.corba.se.impl.transport;
import java.io.IOException; import java.io.IOException;
import java.net.ServerSocket;
import java.nio.channels.ClosedChannelException; import java.nio.channels.ClosedChannelException;
import java.nio.channels.SelectableChannel; import java.nio.channels.SelectableChannel;
import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SelectionKey; import java.nio.channels.SelectionKey;
import java.nio.channels.Selector; import java.nio.channels.Selector;
import java.nio.channels.ClosedSelectorException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import com.sun.corba.se.pept.broker.Broker; import com.sun.corba.se.pept.broker.Broker;
import com.sun.corba.se.pept.transport.Acceptor; import com.sun.corba.se.pept.transport.Acceptor;
import com.sun.corba.se.pept.transport.Connection; import com.sun.corba.se.pept.transport.Connection;
@ -111,8 +115,17 @@ class SelectorImpl
interestOpsList.add(keyAndOp); interestOpsList.add(keyAndOp);
} }
// tell Selector Thread there's an update to a SelectorKey's Ops // tell Selector Thread there's an update to a SelectorKey's Ops
try {
if (selector != null) {
// wakeup Selector thread to process close request
selector.wakeup(); selector.wakeup();
} }
} catch (Throwable t) {
if (orb.transportDebugFlag) {
dprint(".registerInterestOps: selector.wakeup: ", t);
}
}
}
else { else {
wrapper.selectionKeyInvalid(eventHandler.toString()); wrapper.selectionKeyInvalid(eventHandler.toString());
if (orb.transportDebugFlag) { if (orb.transportDebugFlag) {
@ -186,7 +199,9 @@ class SelectorImpl
if (selectionKey != null) { if (selectionKey != null) {
selectionKey.cancel(); selectionKey.cancel();
} }
if (selector != null) {
selector.wakeup(); selector.wakeup();
}
return; return;
} }
@ -239,6 +254,8 @@ class SelectorImpl
readerThread.close(); readerThread.close();
} }
clearDeferredRegistrations();
// Selector // Selector
try { try {
@ -248,7 +265,7 @@ class SelectorImpl
} }
} catch (Throwable t) { } catch (Throwable t) {
if (orb.transportDebugFlag) { if (orb.transportDebugFlag) {
dprint(".close: selector.close: " + t); dprint(".close: selector.wakeup: ", t);
} }
} }
} }
@ -273,15 +290,16 @@ class SelectorImpl
n = selector.select(timeout); n = selector.select(timeout);
} catch (IOException e) { } catch (IOException e) {
if (orb.transportDebugFlag) { if (orb.transportDebugFlag) {
dprint(".run: selector.select: " + e); dprint(".run: selector.select: ", e);
} }
} catch (ClosedSelectorException csEx) {
if (orb.transportDebugFlag) {
dprint(".run: selector.select: ", csEx);
}
break;
} }
if (closed) { if (closed) {
selector.close(); break;
if (orb.transportDebugFlag) {
dprint(".run: closed - .run return");
}
return;
} }
/* /*
if (timeout == 0 && orb.transportDebugFlag) { if (timeout == 0 && orb.transportDebugFlag) {
@ -321,6 +339,18 @@ class SelectorImpl
} }
} }
} }
try {
if (selector != null) {
if (orb.transportDebugFlag) {
dprint(".run: selector.close ");
}
selector.close();
}
} catch (Throwable t) {
if (orb.transportDebugFlag) {
dprint(".run: selector.close: ", t);
}
}
} }
///////////////////////////////////////////////////// /////////////////////////////////////////////////////
@ -328,6 +358,44 @@ class SelectorImpl
// Implementation. // Implementation.
// //
private void clearDeferredRegistrations() {
synchronized (deferredRegistrations) {
int deferredListSize = deferredRegistrations.size();
if (orb.transportDebugFlag) {
dprint(".clearDeferredRegistrations:deferred list size == " + deferredListSize);
}
for (int i = 0; i < deferredListSize; i++) {
EventHandler eventHandler =
(EventHandler)deferredRegistrations.get(i);
if (orb.transportDebugFlag) {
dprint(".clearDeferredRegistrations: " + eventHandler);
}
SelectableChannel channel = eventHandler.getChannel();
SelectionKey selectionKey = null;
try {
if (orb.transportDebugFlag) {
dprint(".clearDeferredRegistrations:close channel == "
+ channel);
dprint(".clearDeferredRegistrations:close channel class == "
+ channel.getClass().getName());
}
channel.close();
selectionKey = eventHandler.getSelectionKey();
if (selectionKey != null) {
selectionKey.cancel();
selectionKey.attach(null);
}
} catch (IOException ioEx) {
if (orb.transportDebugFlag) {
dprint(".clearDeferredRegistrations: ", ioEx);
}
}
}
deferredRegistrations.clear();
}
}
private synchronized boolean isClosed () private synchronized boolean isClosed ()
{ {
return closed; return closed;
@ -344,7 +412,7 @@ class SelectorImpl
selector = Selector.open(); selector = Selector.open();
} catch (IOException e) { } catch (IOException e) {
if (orb.transportDebugFlag) { if (orb.transportDebugFlag) {
dprint(".startSelector: Selector.open: IOException: " + e); dprint(".startSelector: Selector.open: IOException: ", e);
} }
// REVISIT - better handling/reporting // REVISIT - better handling/reporting
RuntimeException rte = RuntimeException rte =
@ -379,7 +447,7 @@ class SelectorImpl
(Object)eventHandler); (Object)eventHandler);
} catch (ClosedChannelException e) { } catch (ClosedChannelException e) {
if (orb.transportDebugFlag) { if (orb.transportDebugFlag) {
dprint(".handleDeferredRegistrations: " + e); dprint(".handleDeferredRegistrations: ", e);
} }
} }
eventHandler.setSelectionKey(selectionKey); eventHandler.setSelectionKey(selectionKey);

View file

@ -264,8 +264,13 @@ public class SocketOrChannelAcceptorImpl
if (connection.shouldRegisterServerReadEvent()) { if (connection.shouldRegisterServerReadEvent()) {
Selector selector = orb.getTransportManager().getSelector(0); Selector selector = orb.getTransportManager().getSelector(0);
if (selector != null) {
if (orb.transportDebugFlag) {
dprint(".accept: registerForEvent: " + connection);
}
selector.registerForEvent(connection.getEventHandler()); selector.registerForEvent(connection.getEventHandler());
} }
}
getConnectionCache().reclaim(); getConnectionCache().reclaim();
@ -273,14 +278,17 @@ public class SocketOrChannelAcceptorImpl
if (orb.transportDebugFlag) { if (orb.transportDebugFlag) {
dprint(".accept:", e); dprint(".accept:", e);
} }
orb.getTransportManager().getSelector(0).unregisterForEvent(this); Selector selector = orb.getTransportManager().getSelector(0);
if (selector != null) {
selector.unregisterForEvent(this);
// REVISIT - need to close - recreate - then register new one. // REVISIT - need to close - recreate - then register new one.
orb.getTransportManager().getSelector(0).registerForEvent(this); selector.registerForEvent(this);
// NOTE: if register cycling we do not want to shut down ORB // NOTE: if register cycling we do not want to shut down ORB
// since local beans will still work. Instead one will see // since local beans will still work. Instead one will see
// a growing log file to alert admin of problem. // a growing log file to alert admin of problem.
} }
} }
}
public void close () public void close ()
{ {
@ -289,7 +297,9 @@ public class SocketOrChannelAcceptorImpl
dprint(".close->:"); dprint(".close->:");
} }
Selector selector = orb.getTransportManager().getSelector(0); Selector selector = orb.getTransportManager().getSelector(0);
if (selector != null) {
selector.unregisterForEvent(this); selector.unregisterForEvent(this);
}
if (serverSocketChannel != null) { if (serverSocketChannel != null) {
serverSocketChannel.close(); serverSocketChannel.close();
} }
@ -480,7 +490,9 @@ public class SocketOrChannelAcceptorImpl
// of calling SelectionKey.interestOps(<interest op>). // of calling SelectionKey.interestOps(<interest op>).
Selector selector = orb.getTransportManager().getSelector(0); Selector selector = orb.getTransportManager().getSelector(0);
if (selector != null) {
selector.registerInterestOps(this); selector.registerInterestOps(this);
}
if (orb.transportDebugFlag) { if (orb.transportDebugFlag) {
dprint(".doWork<-:" + this); dprint(".doWork<-:" + this);

View file

@ -367,7 +367,10 @@ public class SocketOrChannelConnectionImpl
} }
} }
// REVISIT - make sure reader thread is killed. // REVISIT - make sure reader thread is killed.
orb.getTransportManager().getSelector(0).unregisterForEvent(this); Selector selector = orb.getTransportManager().getSelector(0);
if (selector != null) {
selector.unregisterForEvent(this);
}
// Notify anyone waiting. // Notify anyone waiting.
purgeCalls(wrapper.connectionAbort(ex), true, false); purgeCalls(wrapper.connectionAbort(ex), true, false);
// REVISIT // REVISIT
@ -801,7 +804,9 @@ public class SocketOrChannelConnectionImpl
} }
try { try {
Selector selector = orb.getTransportManager().getSelector(0); Selector selector = orb.getTransportManager().getSelector(0);
if (selector != null) {
selector.unregisterForEvent(this); selector.unregisterForEvent(this);
}
if (socketChannel != null) { if (socketChannel != null) {
socketChannel.close(); socketChannel.close();
} }
@ -824,7 +829,9 @@ public class SocketOrChannelConnectionImpl
dprint(".closeConnectionResources->: " + this); dprint(".closeConnectionResources->: " + this);
} }
Selector selector = orb.getTransportManager().getSelector(0); Selector selector = orb.getTransportManager().getSelector(0);
if (selector != null) {
selector.unregisterForEvent(this); selector.unregisterForEvent(this);
}
try { try {
if (socketChannel != null) if (socketChannel != null)
socketChannel.close() ; socketChannel.close() ;

View file

@ -36,6 +36,8 @@ public interface InboundConnectionCache
public void put(Acceptor acceptor, Connection connection); public void put(Acceptor acceptor, Connection connection);
public void remove(Connection connection); public void remove(Connection connection);
public Acceptor getAcceptor();
} }
// End of file. // End of file.

View file

@ -507,3 +507,5 @@ bdb0acafc63c42e84d9d8195bf2e2b25ee9c3306 jdk-9+100
d5239fc1b69749ae50793c61b899fcdacf3df857 jdk-9+102 d5239fc1b69749ae50793c61b899fcdacf3df857 jdk-9+102
c5f55130b1b69510d9a6f4a3105b58e21cd7ffe1 jdk-9+103 c5f55130b1b69510d9a6f4a3105b58e21cd7ffe1 jdk-9+103
534c50395957c6025fb6627e93b35756f8d48a08 jdk-9+104 534c50395957c6025fb6627e93b35756f8d48a08 jdk-9+104
266fa9bb5297bf02cb2a7b038b10a109817d2b48 jdk-9+105
7232de4c17c37f60aecec4f3191090bd3d41d334 jdk-9+106

View file

@ -1,5 +1,5 @@
# #
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# #
# This code is free software; you can redistribute it and/or modify it # This code is free software; you can redistribute it and/or modify it
@ -29,6 +29,10 @@ $(eval $(call IncludeCustomExtension, hotspot, lib/Lib-jdk.hotspot.agent.gmk))
################################################################################ ################################################################################
ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx windows), )
DISABLE_MAPFILES := true
endif
SA_TOPDIR := $(HOTSPOT_TOPDIR)/src/jdk.hotspot.agent SA_TOPDIR := $(HOTSPOT_TOPDIR)/src/jdk.hotspot.agent
# Defaults for most platforms # Defaults for most platforms

View file

@ -54,6 +54,7 @@ define_pd_global(intx, INTPRESSURE, 25);
define_pd_global(intx, InteriorEntryAlignment, 16); define_pd_global(intx, InteriorEntryAlignment, 16);
define_pd_global(intx, NewSizeThreadIncrease, ScaleForWordSize(4*K)); define_pd_global(intx, NewSizeThreadIncrease, ScaleForWordSize(4*K));
define_pd_global(intx, LoopUnrollLimit, 60); define_pd_global(intx, LoopUnrollLimit, 60);
define_pd_global(intx, LoopPercentProfileLimit, 10);
// InitialCodeCacheSize derived from specjbb2000 run. // InitialCodeCacheSize derived from specjbb2000 run.
define_pd_global(intx, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize define_pd_global(intx, InitialCodeCacheSize, 2496*K); // Integral multiple of CodeCacheExpansionSize
define_pd_global(intx, CodeCacheExpansionSize, 64*K); define_pd_global(intx, CodeCacheExpansionSize, 64*K);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -30,39 +30,151 @@
#include "vmreg_aarch64.inline.hpp" #include "vmreg_aarch64.inline.hpp"
jint CodeInstaller::pd_next_offset(NativeInstruction* inst, jint pc_offset, Handle method, TRAPS) { jint CodeInstaller::pd_next_offset(NativeInstruction* inst, jint pc_offset, Handle method, TRAPS) {
Unimplemented(); if (inst->is_call() || inst->is_jump() || inst->is_blr()) {
return 0; return pc_offset + NativeCall::instruction_size;
} else if (inst->is_general_jump()) {
return pc_offset + NativeGeneralJump::instruction_size;
} else {
JVMCI_ERROR_0("unsupported type of instruction for call site");
}
} }
void CodeInstaller::pd_patch_OopConstant(int pc_offset, Handle constant, TRAPS) { void CodeInstaller::pd_patch_OopConstant(int pc_offset, Handle constant, TRAPS) {
address pc = _instructions->start() + pc_offset;
Handle obj = HotSpotObjectConstantImpl::object(constant);
jobject value = JNIHandles::make_local(obj());
if (HotSpotObjectConstantImpl::compressed(constant)) {
int oop_index = _oop_recorder->find_index(value);
RelocationHolder rspec = oop_Relocation::spec(oop_index);
_instructions->relocate(pc, rspec, 1);
Unimplemented(); Unimplemented();
} else {
NativeMovConstReg* move = nativeMovConstReg_at(pc);
move->set_data((intptr_t) value);
int oop_index = _oop_recorder->find_index(value);
RelocationHolder rspec = oop_Relocation::spec(oop_index);
_instructions->relocate(pc, rspec);
}
} }
void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, Handle constant, TRAPS) { void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, Handle constant, TRAPS) {
address pc = _instructions->start() + pc_offset;
if (HotSpotMetaspaceConstantImpl::compressed(constant)) {
narrowKlass narrowOop = record_narrow_metadata_reference(constant, CHECK);
TRACE_jvmci_3("relocating (narrow metaspace constant) at " PTR_FORMAT "/0x%x", p2i(pc), narrowOop);
Unimplemented(); Unimplemented();
} else {
NativeMovConstReg* move = nativeMovConstReg_at(pc);
Metadata* reference = record_metadata_reference(constant, CHECK);
move->set_data((intptr_t) reference);
TRACE_jvmci_3("relocating (metaspace constant) at " PTR_FORMAT "/" PTR_FORMAT, p2i(pc), p2i(reference));
}
} }
void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset) { void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS) {
Unimplemented(); address pc = _instructions->start() + pc_offset;
NativeInstruction* inst = nativeInstruction_at(pc);
if (inst->is_adr_aligned()) {
address dest = _constants->start() + data_offset;
_instructions->relocate(pc, section_word_Relocation::spec((address) dest, CodeBuffer::SECT_CONSTS));
TRACE_jvmci_3("relocating at " PTR_FORMAT " (+%d) with destination at %d", p2i(pc), pc_offset, data_offset);
} else {
JVMCI_ERROR("unknown load or move instruction at " PTR_FORMAT, p2i(pc));
}
} }
void CodeInstaller::pd_relocate_ForeignCall(NativeInstruction* inst, jlong foreign_call_destination, TRAPS) { void CodeInstaller::pd_relocate_ForeignCall(NativeInstruction* inst, jlong foreign_call_destination, TRAPS) {
Unimplemented(); address pc = (address) inst;
if (inst->is_call()) {
NativeCall* call = nativeCall_at(pc);
call->set_destination((address) foreign_call_destination);
_instructions->relocate(call->instruction_address(), runtime_call_Relocation::spec());
} else if (inst->is_jump()) {
NativeJump* jump = nativeJump_at(pc);
jump->set_jump_destination((address) foreign_call_destination);
_instructions->relocate(jump->instruction_address(), runtime_call_Relocation::spec());
} else if (inst->is_general_jump()) {
NativeGeneralJump* jump = nativeGeneralJump_at(pc);
jump->set_jump_destination((address) foreign_call_destination);
_instructions->relocate(jump->instruction_address(), runtime_call_Relocation::spec());
} else {
JVMCI_ERROR("unknown call or jump instruction at " PTR_FORMAT, p2i(pc));
}
TRACE_jvmci_3("relocating (foreign call) at " PTR_FORMAT, p2i(inst));
} }
void CodeInstaller::pd_relocate_JavaMethod(Handle hotspot_method, jint pc_offset, TRAPS) { void CodeInstaller::pd_relocate_JavaMethod(Handle hotspot_method, jint pc_offset, TRAPS) {
Unimplemented(); #ifdef ASSERT
Method* method = NULL;
// we need to check, this might also be an unresolved method
if (hotspot_method->is_a(HotSpotResolvedJavaMethodImpl::klass())) {
method = getMethodFromHotSpotMethod(hotspot_method());
}
#endif
switch (_next_call_type) {
case INLINE_INVOKE:
break;
case INVOKEVIRTUAL:
case INVOKEINTERFACE: {
assert(method == NULL || !method->is_static(), "cannot call static method with invokeinterface");
NativeCall* call = nativeCall_at(_instructions->start() + pc_offset);
call->set_destination(SharedRuntime::get_resolve_virtual_call_stub());
_instructions->relocate(call->instruction_address(), virtual_call_Relocation::spec(_invoke_mark_pc));
break;
}
case INVOKESTATIC: {
assert(method == NULL || method->is_static(), "cannot call non-static method with invokestatic");
NativeCall* call = nativeCall_at(_instructions->start() + pc_offset);
call->set_destination(SharedRuntime::get_resolve_static_call_stub());
_instructions->relocate(call->instruction_address(), relocInfo::static_call_type);
break;
}
case INVOKESPECIAL: {
assert(method == NULL || !method->is_static(), "cannot call static method with invokespecial");
NativeCall* call = nativeCall_at(_instructions->start() + pc_offset);
call->set_destination(SharedRuntime::get_resolve_opt_virtual_call_stub());
_instructions->relocate(call->instruction_address(), relocInfo::opt_virtual_call_type);
break;
}
default:
JVMCI_ERROR("invalid _next_call_type value");
break;
}
} }
void CodeInstaller::pd_relocate_poll(address pc, jint mark, TRAPS) { void CodeInstaller::pd_relocate_poll(address pc, jint mark, TRAPS) {
Unimplemented(); switch (mark) {
case POLL_NEAR:
JVMCI_ERROR("unimplemented");
break;
case POLL_FAR:
_instructions->relocate(pc, relocInfo::poll_type);
break;
case POLL_RETURN_NEAR:
JVMCI_ERROR("unimplemented");
break;
case POLL_RETURN_FAR:
_instructions->relocate(pc, relocInfo::poll_return_type);
break;
default:
JVMCI_ERROR("invalid mark value");
break;
}
} }
// convert JVMCI register indices (as used in oop maps) to HotSpot registers // convert JVMCI register indices (as used in oop maps) to HotSpot registers
VMReg CodeInstaller::get_hotspot_reg(jint jvmci_reg, TRAPS) { VMReg CodeInstaller::get_hotspot_reg(jint jvmci_reg, TRAPS) {
return NULL; if (jvmci_reg < RegisterImpl::number_of_registers) {
return as_Register(jvmci_reg)->as_VMReg();
} else {
jint floatRegisterNumber = jvmci_reg - RegisterImpl::number_of_registers;
if (floatRegisterNumber < FloatRegisterImpl::number_of_registers) {
return as_FloatRegister(floatRegisterNumber)->as_VMReg();
}
JVMCI_ERROR_NULL("invalid register number: %d", jvmci_reg);
}
} }
bool CodeInstaller::is_general_purpose_reg(VMReg hotspotRegister) { bool CodeInstaller::is_general_purpose_reg(VMReg hotspotRegister) {
return false; return !hotspotRegister->is_FloatRegister();
} }

View file

@ -136,7 +136,7 @@ void NativeMovConstReg::set_data(intptr_t x) {
MacroAssembler::pd_patch_instruction(instruction_address(), (address)x); MacroAssembler::pd_patch_instruction(instruction_address(), (address)x);
ICache::invalidate_range(instruction_address(), instruction_size); ICache::invalidate_range(instruction_address(), instruction_size);
} }
}; }
void NativeMovConstReg::print() { void NativeMovConstReg::print() {
tty->print_cr(PTR_FORMAT ": mov reg, " INTPTR_FORMAT, tty->print_cr(PTR_FORMAT ": mov reg, " INTPTR_FORMAT,
@ -208,6 +208,32 @@ void NativeJump::set_jump_destination(address dest) {
//------------------------------------------------------------------- //-------------------------------------------------------------------
address NativeGeneralJump::jump_destination() const {
NativeMovConstReg* move = nativeMovConstReg_at(instruction_address());
address dest = (address) move->data();
// We use jump to self as the unresolved address which the inline
// cache code (and relocs) know about
// return -1 if jump to self
dest = (dest == (address) this) ? (address) -1 : dest;
return dest;
}
void NativeGeneralJump::set_jump_destination(address dest) {
NativeMovConstReg* move = nativeMovConstReg_at(instruction_address());
// We use jump to self as the unresolved address which the inline
// cache code (and relocs) know about
if (dest == (address) -1) {
dest = instruction_address();
}
move->set_data((uintptr_t) dest);
};
//-------------------------------------------------------------------
bool NativeInstruction::is_safepoint_poll() { bool NativeInstruction::is_safepoint_poll() {
// a safepoint_poll is implemented in two steps as either // a safepoint_poll is implemented in two steps as either
// //
@ -249,6 +275,22 @@ bool NativeInstruction::is_ldrw_to_zr(address instr) {
Instruction_aarch64::extract(insn, 4, 0) == 0b11111); Instruction_aarch64::extract(insn, 4, 0) == 0b11111);
} }
bool NativeInstruction::is_general_jump() {
if (is_movz()) {
NativeInstruction* inst1 = nativeInstruction_at(addr_at(instruction_size * 1));
if (inst1->is_movk()) {
NativeInstruction* inst2 = nativeInstruction_at(addr_at(instruction_size * 2));
if (inst2->is_movk()) {
NativeInstruction* inst3 = nativeInstruction_at(addr_at(instruction_size * 3));
if (inst3->is_blr()) {
return true;
}
}
}
}
return false;
}
bool NativeInstruction::is_movz() { bool NativeInstruction::is_movz() {
return Instruction_aarch64::extract(int_at(0), 30, 23) == 0b10100101; return Instruction_aarch64::extract(int_at(0), 30, 23) == 0b10100101;
} }

View file

@ -54,11 +54,22 @@ class NativeInstruction VALUE_OBJ_CLASS_SPEC {
friend class Relocation; friend class Relocation;
friend bool is_NativeCallTrampolineStub_at(address); friend bool is_NativeCallTrampolineStub_at(address);
public: public:
enum { instruction_size = 4 }; enum {
instruction_size = 4
};
juint encoding() const {
return uint_at(0);
}
bool is_blr() const { return (encoding() & 0xfffffc1f) == 0xd63f0000; }
bool is_adr_aligned() const { return (encoding() & 0xff000000) == 0x10000000; } // adr Xn, <label>, where label is aligned to 4 bytes (address of instruction).
inline bool is_nop(); inline bool is_nop();
inline bool is_illegal(); inline bool is_illegal();
inline bool is_return(); inline bool is_return();
bool is_jump(); bool is_jump();
bool is_general_jump();
inline bool is_jump_or_nop(); inline bool is_jump_or_nop();
inline bool is_cond_jump(); inline bool is_cond_jump();
bool is_safepoint_poll(); bool is_safepoint_poll();
@ -341,11 +352,15 @@ class NativeMovRegMemPatching: public NativeMovRegMem {
// An interface for accessing/manipulating native leal instruction of form: // An interface for accessing/manipulating native leal instruction of form:
// leal reg, [reg + offset] // leal reg, [reg + offset]
class NativeLoadAddress: public NativeMovRegMem { class NativeLoadAddress: public NativeInstruction {
static const bool has_rex = true; enum AArch64_specific_constants {
static const int rex_size = 1; instruction_size = 4,
public: instruction_offset = 0,
data_offset = 0,
next_instruction_offset = 4
};
public:
void verify(); void verify();
void print (); void print ();
@ -398,6 +413,10 @@ public:
data_offset = 0, data_offset = 0,
next_instruction_offset = 4 * 4 next_instruction_offset = 4 * 4
}; };
address jump_destination() const;
void set_jump_destination(address dest);
static void insert_unconditional(address code_pos, address entry); static void insert_unconditional(address code_pos, address entry);
static void replace_mt_safe(address instr_addr, address code_buffer); static void replace_mt_safe(address instr_addr, address code_buffer);
static void verify(); static void verify();

View file

@ -54,6 +54,7 @@ define_pd_global(intx, RegisterCostAreaRatio, 16000);
define_pd_global(bool, UseTLAB, true); define_pd_global(bool, UseTLAB, true);
define_pd_global(bool, ResizeTLAB, true); define_pd_global(bool, ResizeTLAB, true);
define_pd_global(intx, LoopUnrollLimit, 60); define_pd_global(intx, LoopUnrollLimit, 60);
define_pd_global(intx, LoopPercentProfileLimit, 10);
// Peephole and CISC spilling both break the graph, and so make the // Peephole and CISC spilling both break the graph, and so make the
// scheduler sick. // scheduler sick.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -42,7 +42,7 @@ void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, Handle constant, T
Unimplemented(); Unimplemented();
} }
void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset) { void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS) {
Unimplemented(); Unimplemented();
} }

View file

@ -52,6 +52,7 @@ define_pd_global(intx, RegisterCostAreaRatio, 12000);
define_pd_global(bool, UseTLAB, true); define_pd_global(bool, UseTLAB, true);
define_pd_global(bool, ResizeTLAB, true); define_pd_global(bool, ResizeTLAB, true);
define_pd_global(intx, LoopUnrollLimit, 60); // Design center runs on 1.3.1 define_pd_global(intx, LoopUnrollLimit, 60); // Design center runs on 1.3.1
define_pd_global(intx, LoopPercentProfileLimit, 10);
define_pd_global(intx, MinJumpTableSize, 5); define_pd_global(intx, MinJumpTableSize, 5);
// Peephole and CISC spilling both break the graph, and so makes the // Peephole and CISC spilling both break the graph, and so makes the

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -85,7 +85,7 @@ void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, Handle constant, T
} }
} }
void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset) { void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS) {
address pc = _instructions->start() + pc_offset; address pc = _instructions->start() + pc_offset;
NativeInstruction* inst = nativeInstruction_at(pc); NativeInstruction* inst = nativeInstruction_at(pc);
NativeInstruction* inst1 = nativeInstruction_at(pc + 4); NativeInstruction* inst1 = nativeInstruction_at(pc + 4);

View file

@ -2015,23 +2015,33 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
int vep_offset = ((intptr_t)__ pc()) - start; int vep_offset = ((intptr_t)__ pc()) - start;
#ifdef COMPILER1 #ifdef COMPILER1
if (InlineObjectHash && method->intrinsic_id() == vmIntrinsics::_hashCode) { if ((InlineObjectHash && method->intrinsic_id() == vmIntrinsics::_hashCode) || (method->intrinsic_id() == vmIntrinsics::_identityHashCode)) {
// Object.hashCode can pull the hashCode from the header word // Object.hashCode, System.identityHashCode can pull the hashCode from the
// instead of doing a full VM transition once it's been computed. // header word instead of doing a full VM transition once it's been computed.
// Since hashCode is usually polymorphic at call sites we can't do // Since hashCode is usually polymorphic at call sites we can't do this
// this optimization at the call site without a lot of work. // optimization at the call site without a lot of work.
Label slowCase; Label slowCase;
Register receiver = O0; Label done;
Register obj_reg = O0;
Register result = O0; Register result = O0;
Register header = G3_scratch; Register header = G3_scratch;
Register hash = G3_scratch; // overwrite header value with hash value Register hash = G3_scratch; // overwrite header value with hash value
Register mask = G1; // to get hash field from header Register mask = G1; // to get hash field from header
// Unlike for Object.hashCode, System.identityHashCode is static method and
// gets object as argument instead of the receiver.
if (method->intrinsic_id() == vmIntrinsics::_identityHashCode) {
assert(method->is_static(), "method should be static");
// return 0 for null reference input
__ br_null(obj_reg, false, Assembler::pn, done);
__ delayed()->mov(obj_reg, hash);
}
// Read the header and build a mask to get its hash field. Give up if the object is not unlocked. // Read the header and build a mask to get its hash field. Give up if the object is not unlocked.
// We depend on hash_mask being at most 32 bits and avoid the use of // We depend on hash_mask being at most 32 bits and avoid the use of
// hash_mask_in_place because it could be larger than 32 bits in a 64-bit // hash_mask_in_place because it could be larger than 32 bits in a 64-bit
// vm: see markOop.hpp. // vm: see markOop.hpp.
__ ld_ptr(receiver, oopDesc::mark_offset_in_bytes(), header); __ ld_ptr(obj_reg, oopDesc::mark_offset_in_bytes(), header);
__ sethi(markOopDesc::hash_mask, mask); __ sethi(markOopDesc::hash_mask, mask);
__ btst(markOopDesc::unlocked_value, header); __ btst(markOopDesc::unlocked_value, header);
__ br(Assembler::zero, false, Assembler::pn, slowCase); __ br(Assembler::zero, false, Assembler::pn, slowCase);
@ -2054,6 +2064,7 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
__ delayed()->nop(); __ delayed()->nop();
// leaf return. // leaf return.
__ bind(done);
__ retl(); __ retl();
__ delayed()->mov(hash, result); __ delayed()->mov(hash, result);
__ bind(slowCase); __ bind(slowCase);

View file

@ -2361,7 +2361,7 @@ void Assembler::movdqa(XMMRegister dst, Address src) {
void Assembler::movdqu(XMMRegister dst, Address src) { void Assembler::movdqu(XMMRegister dst, Address src) {
NOT_LP64(assert(VM_Version::supports_sse2(), "")); NOT_LP64(assert(VM_Version::supports_sse2(), ""));
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit); attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit);
simd_prefix(dst, xnoreg, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); simd_prefix(dst, xnoreg, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x6F); emit_int8(0x6F);
@ -2398,7 +2398,7 @@ void Assembler::vmovdqu(XMMRegister dst, XMMRegister src) {
void Assembler::vmovdqu(XMMRegister dst, Address src) { void Assembler::vmovdqu(XMMRegister dst, Address src) {
assert(UseAVX > 0, ""); assert(UseAVX > 0, "");
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_256bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); InstructionAttr attributes(AVX_256bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit); attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit);
vex_prefix(src, 0, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); vex_prefix(src, 0, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x6F); emit_int8(0x6F);
@ -2486,7 +2486,7 @@ void Assembler::evmovdqul(XMMRegister dst, XMMRegister src, int vector_len) {
void Assembler::evmovdqul(XMMRegister dst, Address src, int vector_len) { void Assembler::evmovdqul(XMMRegister dst, Address src, int vector_len) {
assert(VM_Version::supports_evex(), ""); assert(VM_Version::supports_evex(), "");
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false , /* uses_vl */ true);
attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit); attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit);
vex_prefix(src, 0, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); vex_prefix(src, 0, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x6F); emit_int8(0x6F);
@ -2515,7 +2515,7 @@ void Assembler::evmovdquq(XMMRegister dst, XMMRegister src, int vector_len) {
void Assembler::evmovdquq(XMMRegister dst, Address src, int vector_len) { void Assembler::evmovdquq(XMMRegister dst, Address src, int vector_len) {
assert(VM_Version::supports_evex(), ""); assert(VM_Version::supports_evex(), "");
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ true); InstructionAttr attributes(vector_len, /* vex_w */ true, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true);
attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit); attributes.set_address_attributes(/* tuple_type */ EVEX_FVM, /* input_size_in_bits */ EVEX_NObit);
vex_prefix(src, 0, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); vex_prefix(src, 0, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x6F); emit_int8(0x6F);
@ -2640,7 +2640,7 @@ void Assembler::movsbl(Register dst, Register src) { // movsxb
void Assembler::movsd(XMMRegister dst, XMMRegister src) { void Assembler::movsd(XMMRegister dst, XMMRegister src) {
NOT_LP64(assert(VM_Version::supports_sse2(), "")); NOT_LP64(assert(VM_Version::supports_sse2(), ""));
InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
emit_int8(0x10); emit_int8(0x10);
emit_int8((unsigned char)(0xC0 | encode)); emit_int8((unsigned char)(0xC0 | encode));
@ -2649,7 +2649,7 @@ void Assembler::movsd(XMMRegister dst, XMMRegister src) {
void Assembler::movsd(XMMRegister dst, Address src) { void Assembler::movsd(XMMRegister dst, Address src) {
NOT_LP64(assert(VM_Version::supports_sse2(), "")); NOT_LP64(assert(VM_Version::supports_sse2(), ""));
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
simd_prefix(dst, xnoreg, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); simd_prefix(dst, xnoreg, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
emit_int8(0x10); emit_int8(0x10);
@ -2668,7 +2668,7 @@ void Assembler::movsd(Address dst, XMMRegister src) {
void Assembler::movss(XMMRegister dst, XMMRegister src) { void Assembler::movss(XMMRegister dst, XMMRegister src) {
NOT_LP64(assert(VM_Version::supports_sse(), "")); NOT_LP64(assert(VM_Version::supports_sse(), ""));
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x10); emit_int8(0x10);
emit_int8((unsigned char)(0xC0 | encode)); emit_int8((unsigned char)(0xC0 | encode));
@ -2677,7 +2677,7 @@ void Assembler::movss(XMMRegister dst, XMMRegister src) {
void Assembler::movss(XMMRegister dst, Address src) { void Assembler::movss(XMMRegister dst, Address src) {
NOT_LP64(assert(VM_Version::supports_sse(), "")); NOT_LP64(assert(VM_Version::supports_sse(), ""));
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit);
simd_prefix(dst, xnoreg, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); simd_prefix(dst, xnoreg, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x10); emit_int8(0x10);
@ -2782,7 +2782,7 @@ void Assembler::mull(Register src) {
void Assembler::mulsd(XMMRegister dst, Address src) { void Assembler::mulsd(XMMRegister dst, Address src) {
NOT_LP64(assert(VM_Version::supports_sse2(), "")); NOT_LP64(assert(VM_Version::supports_sse2(), ""));
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
simd_prefix(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); simd_prefix(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
emit_int8(0x59); emit_int8(0x59);
@ -2791,7 +2791,7 @@ void Assembler::mulsd(XMMRegister dst, Address src) {
void Assembler::mulsd(XMMRegister dst, XMMRegister src) { void Assembler::mulsd(XMMRegister dst, XMMRegister src) {
NOT_LP64(assert(VM_Version::supports_sse2(), "")); NOT_LP64(assert(VM_Version::supports_sse2(), ""));
InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
emit_int8(0x59); emit_int8(0x59);
emit_int8((unsigned char)(0xC0 | encode)); emit_int8((unsigned char)(0xC0 | encode));
@ -2800,7 +2800,7 @@ void Assembler::mulsd(XMMRegister dst, XMMRegister src) {
void Assembler::mulss(XMMRegister dst, Address src) { void Assembler::mulss(XMMRegister dst, Address src) {
NOT_LP64(assert(VM_Version::supports_sse(), "")); NOT_LP64(assert(VM_Version::supports_sse(), ""));
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit);
simd_prefix(dst, dst, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); simd_prefix(dst, dst, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x59); emit_int8(0x59);
@ -2809,7 +2809,7 @@ void Assembler::mulss(XMMRegister dst, Address src) {
void Assembler::mulss(XMMRegister dst, XMMRegister src) { void Assembler::mulss(XMMRegister dst, XMMRegister src) {
NOT_LP64(assert(VM_Version::supports_sse(), "")); NOT_LP64(assert(VM_Version::supports_sse(), ""));
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x59); emit_int8(0x59);
emit_int8((unsigned char)(0xC0 | encode)); emit_int8((unsigned char)(0xC0 | encode));
@ -3993,7 +3993,7 @@ void Assembler::smovl() {
void Assembler::sqrtsd(XMMRegister dst, XMMRegister src) { void Assembler::sqrtsd(XMMRegister dst, XMMRegister src) {
NOT_LP64(assert(VM_Version::supports_sse2(), "")); NOT_LP64(assert(VM_Version::supports_sse2(), ""));
InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
emit_int8(0x51); emit_int8(0x51);
emit_int8((unsigned char)(0xC0 | encode)); emit_int8((unsigned char)(0xC0 | encode));
@ -4002,7 +4002,7 @@ void Assembler::sqrtsd(XMMRegister dst, XMMRegister src) {
void Assembler::sqrtsd(XMMRegister dst, Address src) { void Assembler::sqrtsd(XMMRegister dst, Address src) {
NOT_LP64(assert(VM_Version::supports_sse2(), "")); NOT_LP64(assert(VM_Version::supports_sse2(), ""));
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
simd_prefix(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); simd_prefix(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
emit_int8(0x51); emit_int8(0x51);
@ -4011,7 +4011,7 @@ void Assembler::sqrtsd(XMMRegister dst, Address src) {
void Assembler::sqrtss(XMMRegister dst, XMMRegister src) { void Assembler::sqrtss(XMMRegister dst, XMMRegister src) {
NOT_LP64(assert(VM_Version::supports_sse(), "")); NOT_LP64(assert(VM_Version::supports_sse(), ""));
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x51); emit_int8(0x51);
emit_int8((unsigned char)(0xC0 | encode)); emit_int8((unsigned char)(0xC0 | encode));
@ -4024,7 +4024,7 @@ void Assembler::std() {
void Assembler::sqrtss(XMMRegister dst, Address src) { void Assembler::sqrtss(XMMRegister dst, Address src) {
NOT_LP64(assert(VM_Version::supports_sse(), "")); NOT_LP64(assert(VM_Version::supports_sse(), ""));
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit);
simd_prefix(dst, dst, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); simd_prefix(dst, dst, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x51); emit_int8(0x51);
@ -4078,7 +4078,7 @@ void Assembler::subl(Register dst, Register src) {
void Assembler::subsd(XMMRegister dst, XMMRegister src) { void Assembler::subsd(XMMRegister dst, XMMRegister src) {
NOT_LP64(assert(VM_Version::supports_sse2(), "")); NOT_LP64(assert(VM_Version::supports_sse2(), ""));
InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
emit_int8(0x5C); emit_int8(0x5C);
emit_int8((unsigned char)(0xC0 | encode)); emit_int8((unsigned char)(0xC0 | encode));
@ -4087,7 +4087,7 @@ void Assembler::subsd(XMMRegister dst, XMMRegister src) {
void Assembler::subsd(XMMRegister dst, Address src) { void Assembler::subsd(XMMRegister dst, Address src) {
NOT_LP64(assert(VM_Version::supports_sse2(), "")); NOT_LP64(assert(VM_Version::supports_sse2(), ""));
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
simd_prefix(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); simd_prefix(dst, dst, src, VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
emit_int8(0x5C); emit_int8(0x5C);
@ -4096,7 +4096,7 @@ void Assembler::subsd(XMMRegister dst, Address src) {
void Assembler::subss(XMMRegister dst, XMMRegister src) { void Assembler::subss(XMMRegister dst, XMMRegister src) {
NOT_LP64(assert(VM_Version::supports_sse(), "")); NOT_LP64(assert(VM_Version::supports_sse(), ""));
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false , /* uses_vl */ false);
int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); int encode = simd_prefix_and_encode(dst, dst, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x5C); emit_int8(0x5C);
emit_int8((unsigned char)(0xC0 | encode)); emit_int8((unsigned char)(0xC0 | encode));
@ -4105,7 +4105,7 @@ void Assembler::subss(XMMRegister dst, XMMRegister src) {
void Assembler::subss(XMMRegister dst, Address src) { void Assembler::subss(XMMRegister dst, Address src) {
NOT_LP64(assert(VM_Version::supports_sse(), "")); NOT_LP64(assert(VM_Version::supports_sse(), ""));
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* rex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit);
simd_prefix(dst, dst, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); simd_prefix(dst, dst, src, VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x5C); emit_int8(0x5C);
@ -4293,7 +4293,7 @@ void Assembler::xorb(Register dst, Address src) {
void Assembler::vaddsd(XMMRegister dst, XMMRegister nds, Address src) { void Assembler::vaddsd(XMMRegister dst, XMMRegister nds, Address src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
@ -4303,7 +4303,7 @@ void Assembler::vaddsd(XMMRegister dst, XMMRegister nds, Address src) {
void Assembler::vaddsd(XMMRegister dst, XMMRegister nds, XMMRegister src) { void Assembler::vaddsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
emit_int8(0x58); emit_int8(0x58);
@ -4313,7 +4313,7 @@ void Assembler::vaddsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
void Assembler::vaddss(XMMRegister dst, XMMRegister nds, Address src) { void Assembler::vaddss(XMMRegister dst, XMMRegister nds, Address src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
@ -4323,7 +4323,7 @@ void Assembler::vaddss(XMMRegister dst, XMMRegister nds, Address src) {
void Assembler::vaddss(XMMRegister dst, XMMRegister nds, XMMRegister src) { void Assembler::vaddss(XMMRegister dst, XMMRegister nds, XMMRegister src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x58); emit_int8(0x58);
@ -4333,7 +4333,7 @@ void Assembler::vaddss(XMMRegister dst, XMMRegister nds, XMMRegister src) {
void Assembler::vdivsd(XMMRegister dst, XMMRegister nds, Address src) { void Assembler::vdivsd(XMMRegister dst, XMMRegister nds, Address src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
@ -4343,7 +4343,7 @@ void Assembler::vdivsd(XMMRegister dst, XMMRegister nds, Address src) {
void Assembler::vdivsd(XMMRegister dst, XMMRegister nds, XMMRegister src) { void Assembler::vdivsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
emit_int8(0x5E); emit_int8(0x5E);
@ -4353,7 +4353,7 @@ void Assembler::vdivsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
void Assembler::vdivss(XMMRegister dst, XMMRegister nds, Address src) { void Assembler::vdivss(XMMRegister dst, XMMRegister nds, Address src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
@ -4363,7 +4363,7 @@ void Assembler::vdivss(XMMRegister dst, XMMRegister nds, Address src) {
void Assembler::vdivss(XMMRegister dst, XMMRegister nds, XMMRegister src) { void Assembler::vdivss(XMMRegister dst, XMMRegister nds, XMMRegister src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x5E); emit_int8(0x5E);
@ -4373,7 +4373,7 @@ void Assembler::vdivss(XMMRegister dst, XMMRegister nds, XMMRegister src) {
void Assembler::vmulsd(XMMRegister dst, XMMRegister nds, Address src) { void Assembler::vmulsd(XMMRegister dst, XMMRegister nds, Address src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
@ -4383,7 +4383,7 @@ void Assembler::vmulsd(XMMRegister dst, XMMRegister nds, Address src) {
void Assembler::vmulsd(XMMRegister dst, XMMRegister nds, XMMRegister src) { void Assembler::vmulsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
emit_int8(0x59); emit_int8(0x59);
@ -4393,7 +4393,7 @@ void Assembler::vmulsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
void Assembler::vmulss(XMMRegister dst, XMMRegister nds, Address src) { void Assembler::vmulss(XMMRegister dst, XMMRegister nds, Address src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
@ -4403,7 +4403,7 @@ void Assembler::vmulss(XMMRegister dst, XMMRegister nds, Address src) {
void Assembler::vmulss(XMMRegister dst, XMMRegister nds, XMMRegister src) { void Assembler::vmulss(XMMRegister dst, XMMRegister nds, XMMRegister src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x59); emit_int8(0x59);
@ -4413,7 +4413,7 @@ void Assembler::vmulss(XMMRegister dst, XMMRegister nds, XMMRegister src) {
void Assembler::vsubsd(XMMRegister dst, XMMRegister nds, Address src) { void Assembler::vsubsd(XMMRegister dst, XMMRegister nds, Address src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_64bit);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
@ -4423,7 +4423,7 @@ void Assembler::vsubsd(XMMRegister dst, XMMRegister nds, Address src) {
void Assembler::vsubsd(XMMRegister dst, XMMRegister nds, XMMRegister src) { void Assembler::vsubsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ VM_Version::supports_evex(), /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes); int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F2, VEX_OPCODE_0F, &attributes);
emit_int8(0x5C); emit_int8(0x5C);
@ -4433,7 +4433,7 @@ void Assembler::vsubsd(XMMRegister dst, XMMRegister nds, XMMRegister src) {
void Assembler::vsubss(XMMRegister dst, XMMRegister nds, Address src) { void Assembler::vsubss(XMMRegister dst, XMMRegister nds, Address src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_32bit);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); vex_prefix(src, nds_enc, dst->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
@ -4443,7 +4443,7 @@ void Assembler::vsubss(XMMRegister dst, XMMRegister nds, Address src) {
void Assembler::vsubss(XMMRegister dst, XMMRegister nds, XMMRegister src) { void Assembler::vsubss(XMMRegister dst, XMMRegister nds, XMMRegister src) {
assert(VM_Version::supports_avx(), ""); assert(VM_Version::supports_avx(), "");
InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ true, /* uses_vl */ false); InstructionAttr attributes(AVX_128bit, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ false);
int nds_enc = nds->is_valid() ? nds->encoding() : 0; int nds_enc = nds->is_valid() ? nds->encoding() : 0;
int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes); int encode = vex_prefix_and_encode(dst->encoding(), nds_enc, src->encoding(), VEX_SIMD_F3, VEX_OPCODE_0F, &attributes);
emit_int8(0x5C); emit_int8(0x5C);
@ -5901,7 +5901,7 @@ void Assembler::vpbroadcastw(XMMRegister dst, XMMRegister src) {
// duplicate 1-byte integer data from src into 16||32|64 locations in dest : requires AVX512BW and AVX512VL // duplicate 1-byte integer data from src into 16||32|64 locations in dest : requires AVX512BW and AVX512VL
void Assembler::evpbroadcastb(XMMRegister dst, XMMRegister src, int vector_len) { void Assembler::evpbroadcastb(XMMRegister dst, XMMRegister src, int vector_len) {
assert(VM_Version::supports_evex(), ""); assert(VM_Version::supports_evex(), "");
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true); 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(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes); int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
emit_int8(0x78); emit_int8(0x78);
emit_int8((unsigned char)(0xC0 | encode)); emit_int8((unsigned char)(0xC0 | encode));
@ -5911,7 +5911,7 @@ void Assembler::evpbroadcastb(XMMRegister dst, Address src, int vector_len) {
assert(VM_Version::supports_evex(), ""); assert(VM_Version::supports_evex(), "");
assert(dst != xnoreg, "sanity"); assert(dst != xnoreg, "sanity");
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true); InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_8bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_8bit);
// swap src<->dst for encoding // swap src<->dst for encoding
vex_prefix(src, dst->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes); vex_prefix(src, dst->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
@ -5922,7 +5922,7 @@ void Assembler::evpbroadcastb(XMMRegister dst, Address src, int vector_len) {
// duplicate 2-byte integer data from src into 8|16||32 locations in dest : requires AVX512BW and AVX512VL // duplicate 2-byte integer data from src into 8|16||32 locations in dest : requires AVX512BW and AVX512VL
void Assembler::evpbroadcastw(XMMRegister dst, XMMRegister src, int vector_len) { void Assembler::evpbroadcastw(XMMRegister dst, XMMRegister src, int vector_len) {
assert(VM_Version::supports_evex(), ""); assert(VM_Version::supports_evex(), "");
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true); 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(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes); int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
emit_int8(0x79); emit_int8(0x79);
emit_int8((unsigned char)(0xC0 | encode)); emit_int8((unsigned char)(0xC0 | encode));
@ -5932,7 +5932,7 @@ void Assembler::evpbroadcastw(XMMRegister dst, Address src, int vector_len) {
assert(VM_Version::supports_evex(), ""); assert(VM_Version::supports_evex(), "");
assert(dst != xnoreg, "sanity"); assert(dst != xnoreg, "sanity");
InstructionMark im(this); InstructionMark im(this);
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true); InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ _legacy_mode_bw, /* no_mask_reg */ true, /* uses_vl */ true);
attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_16bit); attributes.set_address_attributes(/* tuple_type */ EVEX_T1S, /* input_size_in_bits */ EVEX_16bit);
// swap src<->dst for encoding // swap src<->dst for encoding
vex_prefix(src, dst->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes); vex_prefix(src, dst->encoding(), dst->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
@ -6027,7 +6027,7 @@ void Assembler::evpbroadcastsd(XMMRegister dst, Address src, int vector_len) {
// duplicate 1-byte integer data from src into 16||32|64 locations in dest : requires AVX512BW and AVX512VL // duplicate 1-byte integer data from src into 16||32|64 locations in dest : requires AVX512BW and AVX512VL
void Assembler::evpbroadcastb(XMMRegister dst, Register src, int vector_len) { void Assembler::evpbroadcastb(XMMRegister dst, Register src, int vector_len) {
assert(VM_Version::supports_evex(), ""); assert(VM_Version::supports_evex(), "");
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true); 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(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes); int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
emit_int8(0x7A); emit_int8(0x7A);
emit_int8((unsigned char)(0xC0 | encode)); emit_int8((unsigned char)(0xC0 | encode));
@ -6036,7 +6036,7 @@ void Assembler::evpbroadcastb(XMMRegister dst, Register src, int vector_len) {
// duplicate 2-byte integer data from src into 8|16||32 locations in dest : requires AVX512BW and AVX512VL // duplicate 2-byte integer data from src into 8|16||32 locations in dest : requires AVX512BW and AVX512VL
void Assembler::evpbroadcastw(XMMRegister dst, Register src, int vector_len) { void Assembler::evpbroadcastw(XMMRegister dst, Register src, int vector_len) {
assert(VM_Version::supports_evex(), ""); assert(VM_Version::supports_evex(), "");
InstructionAttr attributes(vector_len, /* vex_w */ false, /* legacy_mode */ false, /* no_mask_reg */ false, /* uses_vl */ true); 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(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes); int encode = vex_prefix_and_encode(dst->encoding(), 0, src->encoding(), VEX_SIMD_66, VEX_OPCODE_0F_38, &attributes);
emit_int8(0x7B); emit_int8(0x7B);
emit_int8((unsigned char)(0xC0 | encode)); emit_int8((unsigned char)(0xC0 | encode));

View file

@ -2044,11 +2044,11 @@ private:
class InstructionAttr { class InstructionAttr {
public: public:
InstructionAttr( InstructionAttr(
int vector_len, int vector_len, // The length of vector to be applied in encoding - for both AVX and EVEX
bool rex_vex_w, bool rex_vex_w, // Width of data: if 32-bits or less, false, else if 64-bit or specially defined, true
bool legacy_mode, bool legacy_mode, // Details if either this instruction is conditionally encoded to AVX or earlier if true else possibly EVEX
bool no_reg_mask, bool no_reg_mask, // when true, k0 is used when EVEX encoding is chosen, else k1 is used under the same condition
bool uses_vl) bool uses_vl) // This instruction may have legacy constraints based on vector length for EVEX
: :
_avx_vector_len(vector_len), _avx_vector_len(vector_len),
_rex_vex_w(rex_vex_w), _rex_vex_w(rex_vex_w),

View file

@ -46,6 +46,7 @@ define_pd_global(intx, OnStackReplacePercentage, 140);
define_pd_global(intx, ConditionalMoveLimit, 3); define_pd_global(intx, ConditionalMoveLimit, 3);
define_pd_global(intx, FreqInlineSize, 325); define_pd_global(intx, FreqInlineSize, 325);
define_pd_global(intx, MinJumpTableSize, 10); define_pd_global(intx, MinJumpTableSize, 10);
define_pd_global(intx, LoopPercentProfileLimit, 30);
#ifdef AMD64 #ifdef AMD64
define_pd_global(intx, INTPRESSURE, 13); define_pd_global(intx, INTPRESSURE, 13);
define_pd_global(intx, FLOATPRESSURE, 14); define_pd_global(intx, FLOATPRESSURE, 14);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -101,7 +101,7 @@ void CodeInstaller::pd_patch_MetaspaceConstant(int pc_offset, Handle constant, T
} }
} }
void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset) { void CodeInstaller::pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS) {
address pc = _instructions->start() + pc_offset; address pc = _instructions->start() + pc_offset;
address operand = Assembler::locate_operand(pc, Assembler::disp32_operand); address operand = Assembler::locate_operand(pc, Assembler::disp32_operand);

View file

@ -7840,7 +7840,9 @@ void MacroAssembler::string_compare(Register str1, Register str2,
Label COMPARE_WIDE_VECTORS_LOOP_FAILED; // used only _LP64 && AVX3 Label COMPARE_WIDE_VECTORS_LOOP_FAILED; // used only _LP64 && AVX3
int stride, stride2, adr_stride, adr_stride1, adr_stride2; int stride, stride2, adr_stride, adr_stride1, adr_stride2;
int stride2x2 = 0x40; int stride2x2 = 0x40;
Address::ScaleFactor scale, scale1, scale2; Address::ScaleFactor scale = Address::no_scale;
Address::ScaleFactor scale1 = Address::no_scale;
Address::ScaleFactor scale2 = Address::no_scale;
if (ae != StrIntrinsicNode::LL) { if (ae != StrIntrinsicNode::LL) {
stride2x2 = 0x20; stride2x2 = 0x20;
@ -7894,9 +7896,9 @@ void MacroAssembler::string_compare(Register str1, Register str2,
stride = 8; stride = 8;
} }
} else { } else {
scale = Address::no_scale; // not used
scale1 = Address::times_1; scale1 = Address::times_1;
scale2 = Address::times_2; scale2 = Address::times_2;
// scale not used
stride = 8; stride = 8;
} }

View file

@ -0,0 +1,91 @@
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "asm/macroAssembler.hpp"
#include "runtime/sharedRuntime.hpp"
#include "vmreg_x86.inline.hpp"
#ifdef COMPILER1
#include "c1/c1_Runtime1.hpp"
#endif //COMPILER1
#define __ masm->
#ifdef COMPILER1
// ---------------------------------------------------------------------------
// Object.hashCode, System.identityHashCode can pull the hashCode from the
// header word instead of doing a full VM transition once it's been computed.
// Since hashCode is usually polymorphic at call sites we can't do this
// optimization at the call site without a lot of work.
void SharedRuntime::inline_check_hashcode_from_object_header(MacroAssembler* masm,
methodHandle method,
Register obj_reg,
Register result) {
Label slowCase;
// Unlike for Object.hashCode, System.identityHashCode is static method and
// gets object as argument instead of the receiver.
if (method->intrinsic_id() == vmIntrinsics::_identityHashCode) {
Label Continue;
// return 0 for null reference input
__ cmpptr(obj_reg, (int32_t)NULL_WORD);
__ jcc(Assembler::notEqual, Continue);
__ xorptr(result, result);
__ ret(0);
__ bind(Continue);
}
__ movptr(result, Address(obj_reg, oopDesc::mark_offset_in_bytes()));
// check if locked
__ testptr(result, markOopDesc::unlocked_value);
__ jcc(Assembler::zero, slowCase);
if (UseBiasedLocking) {
// Check if biased and fall through to runtime if so
__ testptr(result, markOopDesc::biased_lock_bit_in_place);
__ jcc(Assembler::notZero, slowCase);
}
// get hash
#ifdef _LP64
// Read the header and build a mask to get its hash field.
// Depend on hash_mask being at most 32 bits and avoid the use of hash_mask_in_place
// because it could be larger than 32 bits in a 64-bit vm. See markOop.hpp.
__ shrptr(result, markOopDesc::hash_shift);
__ andptr(result, markOopDesc::hash_mask);
#else
__ andptr(result, markOopDesc::hash_mask_in_place);
#endif //_LP64
// test if hashCode exists
__ jcc(Assembler::zero, slowCase);
#ifndef _LP64
__ shrptr(result, markOopDesc::hash_shift);
#endif
__ ret(0);
__ bind(slowCase);
}
#endif //COMPILER1

View file

@ -1754,33 +1754,9 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
int vep_offset = ((intptr_t)__ pc()) - start; int vep_offset = ((intptr_t)__ pc()) - start;
#ifdef COMPILER1 #ifdef COMPILER1
if (InlineObjectHash && method->intrinsic_id() == vmIntrinsics::_hashCode) { // For Object.hashCode, System.identityHashCode try to pull hashCode from object header if available.
// Object.hashCode can pull the hashCode from the header word if ((InlineObjectHash && method->intrinsic_id() == vmIntrinsics::_hashCode) || (method->intrinsic_id() == vmIntrinsics::_identityHashCode)) {
// instead of doing a full VM transition once it's been computed. inline_check_hashcode_from_object_header(masm, method, rcx /*obj_reg*/, rax /*result*/);
// Since hashCode is usually polymorphic at call sites we can't do
// this optimization at the call site without a lot of work.
Label slowCase;
Register receiver = rcx;
Register result = rax;
__ movptr(result, Address(receiver, oopDesc::mark_offset_in_bytes()));
// check if locked
__ testptr(result, markOopDesc::unlocked_value);
__ jcc (Assembler::zero, slowCase);
if (UseBiasedLocking) {
// Check if biased and fall through to runtime if so
__ testptr(result, markOopDesc::biased_lock_bit_in_place);
__ jcc (Assembler::notZero, slowCase);
}
// get hash
__ andptr(result, markOopDesc::hash_mask_in_place);
// test if hashCode exists
__ jcc (Assembler::zero, slowCase);
__ shrptr(result, markOopDesc::hash_shift);
__ ret(0);
__ bind (slowCase);
} }
#endif // COMPILER1 #endif // COMPILER1

View file

@ -2058,6 +2058,13 @@ nmethod* SharedRuntime::generate_native_wrapper(MacroAssembler* masm,
int vep_offset = ((intptr_t)__ pc()) - start; int vep_offset = ((intptr_t)__ pc()) - start;
#ifdef COMPILER1
// For Object.hashCode, System.identityHashCode try to pull hashCode from object header if available.
if ((InlineObjectHash && method->intrinsic_id() == vmIntrinsics::_hashCode) || (method->intrinsic_id() == vmIntrinsics::_identityHashCode)) {
inline_check_hashcode_from_object_header(masm, method, j_rarg0 /*obj_reg*/, rax /*result*/);
}
#endif // COMPILER1
// The instruction at the verified entry point must be 5 bytes or longer // The instruction at the verified entry point must be 5 bytes or longer
// because it can be patched on the fly by make_non_entrant. The stack bang // because it can be patched on the fly by make_non_entrant. The stack bang
// instruction fits that requirement. // instruction fits that requirement.

View file

@ -70,56 +70,64 @@ public class AArch64 extends Architecture {
public static final Register r28 = new Register(28, 28, "r28", CPU); public static final Register r28 = new Register(28, 28, "r28", CPU);
public static final Register r29 = new Register(29, 29, "r29", CPU); public static final Register r29 = new Register(29, 29, "r29", CPU);
public static final Register r30 = new Register(30, 30, "r30", CPU); public static final Register r30 = new Register(30, 30, "r30", CPU);
/*
* r31 is not a general purpose register, but represents either the stackpointer or the
* zero/discard register depending on the instruction. So we represent those two uses as two
* different registers. The register numbers are kept in sync with register_aarch64.hpp and have
* to be sequential, hence we also need a general r31 register here, which is never used.
*/
public static final Register r31 = new Register(31, 31, "r31", CPU); public static final Register r31 = new Register(31, 31, "r31", CPU);
public static final Register zr = new Register(32, 31, "zr", CPU);
public static final Register sp = new Register(33, 31, "sp", CPU);
public static final Register lr = r30; public static final Register lr = r30;
public static final Register zr = r31;
public static final Register sp = r31;
// @formatter:off // @formatter:off
public static final Register[] cpuRegisters = { public static final Register[] cpuRegisters = {
r0, r1, r2, r3, r4, r5, r6, r7, r0, r1, r2, r3, r4, r5, r6, r7,
r8, r9, r10, r11, r12, r13, r14, r15, r8, r9, r10, r11, r12, r13, r14, r15,
r16, r17, r18, r19, r20, r21, r22, r23, r16, r17, r18, r19, r20, r21, r22, r23,
r24, r25, r26, r27, r28, r29, r30, r31 r24, r25, r26, r27, r28, r29, r30, r31,
zr, sp
}; };
// @formatter:on // @formatter:on
public static final RegisterCategory SIMD = new RegisterCategory("SIMD"); public static final RegisterCategory SIMD = new RegisterCategory("SIMD");
// Simd registers // Simd registers
public static final Register v0 = new Register(32, 0, "v0", SIMD); public static final Register v0 = new Register(34, 0, "v0", SIMD);
public static final Register v1 = new Register(33, 1, "v1", SIMD); public static final Register v1 = new Register(35, 1, "v1", SIMD);
public static final Register v2 = new Register(34, 2, "v2", SIMD); public static final Register v2 = new Register(36, 2, "v2", SIMD);
public static final Register v3 = new Register(35, 3, "v3", SIMD); public static final Register v3 = new Register(37, 3, "v3", SIMD);
public static final Register v4 = new Register(36, 4, "v4", SIMD); public static final Register v4 = new Register(38, 4, "v4", SIMD);
public static final Register v5 = new Register(37, 5, "v5", SIMD); public static final Register v5 = new Register(39, 5, "v5", SIMD);
public static final Register v6 = new Register(38, 6, "v6", SIMD); public static final Register v6 = new Register(40, 6, "v6", SIMD);
public static final Register v7 = new Register(39, 7, "v7", SIMD); public static final Register v7 = new Register(41, 7, "v7", SIMD);
public static final Register v8 = new Register(40, 8, "v8", SIMD); public static final Register v8 = new Register(42, 8, "v8", SIMD);
public static final Register v9 = new Register(41, 9, "v9", SIMD); public static final Register v9 = new Register(43, 9, "v9", SIMD);
public static final Register v10 = new Register(42, 10, "v10", SIMD); public static final Register v10 = new Register(44, 10, "v10", SIMD);
public static final Register v11 = new Register(43, 11, "v11", SIMD); public static final Register v11 = new Register(45, 11, "v11", SIMD);
public static final Register v12 = new Register(44, 12, "v12", SIMD); public static final Register v12 = new Register(46, 12, "v12", SIMD);
public static final Register v13 = new Register(45, 13, "v13", SIMD); public static final Register v13 = new Register(47, 13, "v13", SIMD);
public static final Register v14 = new Register(46, 14, "v14", SIMD); public static final Register v14 = new Register(48, 14, "v14", SIMD);
public static final Register v15 = new Register(47, 15, "v15", SIMD); public static final Register v15 = new Register(49, 15, "v15", SIMD);
public static final Register v16 = new Register(48, 16, "v16", SIMD); public static final Register v16 = new Register(50, 16, "v16", SIMD);
public static final Register v17 = new Register(49, 17, "v17", SIMD); public static final Register v17 = new Register(51, 17, "v17", SIMD);
public static final Register v18 = new Register(50, 18, "v18", SIMD); public static final Register v18 = new Register(52, 18, "v18", SIMD);
public static final Register v19 = new Register(51, 19, "v19", SIMD); public static final Register v19 = new Register(53, 19, "v19", SIMD);
public static final Register v20 = new Register(52, 20, "v20", SIMD); public static final Register v20 = new Register(54, 20, "v20", SIMD);
public static final Register v21 = new Register(53, 21, "v21", SIMD); public static final Register v21 = new Register(55, 21, "v21", SIMD);
public static final Register v22 = new Register(54, 22, "v22", SIMD); public static final Register v22 = new Register(56, 22, "v22", SIMD);
public static final Register v23 = new Register(55, 23, "v23", SIMD); public static final Register v23 = new Register(57, 23, "v23", SIMD);
public static final Register v24 = new Register(56, 24, "v24", SIMD); public static final Register v24 = new Register(58, 24, "v24", SIMD);
public static final Register v25 = new Register(57, 25, "v25", SIMD); public static final Register v25 = new Register(59, 25, "v25", SIMD);
public static final Register v26 = new Register(58, 26, "v26", SIMD); public static final Register v26 = new Register(60, 26, "v26", SIMD);
public static final Register v27 = new Register(59, 27, "v27", SIMD); public static final Register v27 = new Register(61, 27, "v27", SIMD);
public static final Register v28 = new Register(60, 28, "v28", SIMD); public static final Register v28 = new Register(62, 28, "v28", SIMD);
public static final Register v29 = new Register(61, 29, "v29", SIMD); public static final Register v29 = new Register(63, 29, "v29", SIMD);
public static final Register v30 = new Register(62, 30, "v30", SIMD); public static final Register v30 = new Register(64, 30, "v30", SIMD);
public static final Register v31 = new Register(63, 31, "v31", SIMD); public static final Register v31 = new Register(65, 31, "v31", SIMD);
// @formatter:off // @formatter:off
public static final Register[] simdRegisters = { public static final Register[] simdRegisters = {
@ -136,6 +144,7 @@ public class AArch64 extends Architecture {
r8, r9, r10, r11, r12, r13, r14, r15, r8, r9, r10, r11, r12, r13, r14, r15,
r16, r17, r18, r19, r20, r21, r22, r23, r16, r17, r18, r19, r20, r21, r22, r23,
r24, r25, r26, r27, r28, r29, r30, r31, r24, r25, r26, r27, r28, r29, r30, r31,
zr, sp,
v0, v1, v2, v3, v4, v5, v6, v7, v0, v1, v2, v3, v4, v5, v6, v7,
v8, v9, v10, v11, v12, v13, v14, v15, v8, v9, v10, v11, v12, v13, v14, v15,

View file

@ -31,6 +31,7 @@ import static jdk.vm.ci.aarch64.AArch64.r27;
import static jdk.vm.ci.aarch64.AArch64.r28; import static jdk.vm.ci.aarch64.AArch64.r28;
import static jdk.vm.ci.aarch64.AArch64.r29; import static jdk.vm.ci.aarch64.AArch64.r29;
import static jdk.vm.ci.aarch64.AArch64.r3; import static jdk.vm.ci.aarch64.AArch64.r3;
import static jdk.vm.ci.aarch64.AArch64.r31;
import static jdk.vm.ci.aarch64.AArch64.r4; import static jdk.vm.ci.aarch64.AArch64.r4;
import static jdk.vm.ci.aarch64.AArch64.r5; import static jdk.vm.ci.aarch64.AArch64.r5;
import static jdk.vm.ci.aarch64.AArch64.r6; import static jdk.vm.ci.aarch64.AArch64.r6;
@ -45,11 +46,13 @@ import static jdk.vm.ci.aarch64.AArch64.v4;
import static jdk.vm.ci.aarch64.AArch64.v5; import static jdk.vm.ci.aarch64.AArch64.v5;
import static jdk.vm.ci.aarch64.AArch64.v6; import static jdk.vm.ci.aarch64.AArch64.v6;
import static jdk.vm.ci.aarch64.AArch64.v7; import static jdk.vm.ci.aarch64.AArch64.v7;
import static jdk.vm.ci.aarch64.AArch64.zr;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.List;
import java.util.Set; import java.util.Set;
import jdk.vm.ci.aarch64.AArch64; import jdk.vm.ci.aarch64.AArch64;
@ -130,16 +133,20 @@ public class AArch64HotSpotRegisterConfig implements RegisterConfig {
public static final Register threadRegister = r28; public static final Register threadRegister = r28;
public static final Register fp = r29; public static final Register fp = r29;
private static final Register[] reservedRegisters = {threadRegister, fp, lr, r31, zr, sp};
private static Register[] initAllocatable(Architecture arch, boolean reserveForHeapBase) { private static Register[] initAllocatable(Architecture arch, boolean reserveForHeapBase) {
Register[] allRegisters = arch.getAvailableValueRegisters(); Register[] allRegisters = arch.getAvailableValueRegisters();
Register[] registers = new Register[allRegisters.length - (reserveForHeapBase ? 5 : 4)]; Register[] registers = new Register[allRegisters.length - reservedRegisters.length - (reserveForHeapBase ? 1 : 0)];
List<Register> reservedRegistersList = Arrays.asList(reservedRegisters);
int idx = 0; int idx = 0;
for (Register reg : allRegisters) { for (Register reg : allRegisters) {
if (reg.equals(threadRegister) || reg.equals(fp) || reg.equals(lr) || reg.equals(sp)) { if (reservedRegistersList.contains(reg)) {
// skip thread register, frame pointer, link register and stack pointer // skip reserved registers
continue; continue;
} }
assert !(reg.equals(threadRegister) || reg.equals(fp) || reg.equals(lr) || reg.equals(r31) || reg.equals(zr) || reg.equals(sp));
if (reserveForHeapBase && reg.equals(heapBaseRegister)) { if (reserveForHeapBase && reg.equals(heapBaseRegister)) {
// skip heap base register // skip heap base register
continue; continue;

View file

@ -45,6 +45,7 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.List;
import java.util.Set; import java.util.Set;
import jdk.vm.ci.code.Architecture; import jdk.vm.ci.code.Architecture;
@ -119,14 +120,17 @@ public class AMD64HotSpotRegisterConfig implements RegisterConfig {
*/ */
private final boolean needsNativeStackHomeSpace; private final boolean needsNativeStackHomeSpace;
private static final Register[] reservedRegisters = {rsp, r15};
private static Register[] initAllocatable(Architecture arch, boolean reserveForHeapBase) { private static Register[] initAllocatable(Architecture arch, boolean reserveForHeapBase) {
Register[] allRegisters = arch.getAvailableValueRegisters(); Register[] allRegisters = arch.getAvailableValueRegisters();
Register[] registers = new Register[allRegisters.length - (reserveForHeapBase ? 3 : 2)]; Register[] registers = new Register[allRegisters.length - reservedRegisters.length - (reserveForHeapBase ? 1 : 0)];
List<Register> reservedRegistersList = Arrays.asList(reservedRegisters);
int idx = 0; int idx = 0;
for (Register reg : allRegisters) { for (Register reg : allRegisters) {
if (reg.equals(rsp) || reg.equals(r15)) { if (reservedRegistersList.contains(reg)) {
// skip stack pointer and thread register // skip reserved registers
continue; continue;
} }
if (reserveForHeapBase && reg.equals(r12)) { if (reserveForHeapBase && reg.equals(r12)) {

View file

@ -68,6 +68,7 @@ import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet; import java.util.HashSet;
import java.util.List;
import jdk.vm.ci.code.Architecture; import jdk.vm.ci.code.Architecture;
import jdk.vm.ci.code.CallingConvention; import jdk.vm.ci.code.CallingConvention;
@ -140,14 +141,17 @@ public class SPARCHotSpotRegisterConfig implements RegisterConfig {
i0, i1, i2, i3, i4, i5, i6, i7}; i0, i1, i2, i3, i4, i5, i6, i7};
// @formatter:on // @formatter:on
private static final Register[] reservedRegisters = {sp, g0, g2};
private static Register[] initAllocatable(Architecture arch, boolean reserveForHeapBase) { private static Register[] initAllocatable(Architecture arch, boolean reserveForHeapBase) {
Register[] allRegisters = arch.getAvailableValueRegisters(); Register[] allRegisters = arch.getAvailableValueRegisters();
Register[] registers = new Register[allRegisters.length - (reserveForHeapBase ? 4 : 3)]; Register[] registers = new Register[allRegisters.length - reservedRegisters.length - (reserveForHeapBase ? 1 : 0)];
List<Register> reservedRegistersList = Arrays.asList(reservedRegisters);
int idx = 0; int idx = 0;
for (Register reg : allRegisters) { for (Register reg : allRegisters) {
if (reg.equals(sp) || reg.equals(g2) || reg.equals(g0)) { if (reservedRegistersList.contains(reg)) {
// skip g0, stack pointer and thread register // skip reserved registers
continue; continue;
} }
if (reserveForHeapBase && reg.equals(g6)) { if (reserveForHeapBase && reg.equals(g6)) {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -26,6 +26,7 @@ import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayBaseOffset;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayIndexScale; import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntimeProvider.getArrayIndexScale;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import java.util.Objects;
import jdk.vm.ci.common.JVMCIError; import jdk.vm.ci.common.JVMCIError;
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.Option; import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.Option;
@ -70,13 +71,13 @@ public class HotSpotConstantReflectionProvider implements ConstantReflectionProv
} else if (x instanceof HotSpotObjectConstantImpl) { } else if (x instanceof HotSpotObjectConstantImpl) {
return y instanceof HotSpotObjectConstantImpl && ((HotSpotObjectConstantImpl) x).object() == ((HotSpotObjectConstantImpl) y).object(); return y instanceof HotSpotObjectConstantImpl && ((HotSpotObjectConstantImpl) x).object() == ((HotSpotObjectConstantImpl) y).object();
} else { } else {
return x.equals(y); return Objects.equals(x, y);
} }
} }
@Override @Override
public Integer readArrayLength(JavaConstant array) { public Integer readArrayLength(JavaConstant array) {
if (array.getJavaKind() != JavaKind.Object || array.isNull()) { if (array == null || array.getJavaKind() != JavaKind.Object || array.isNull()) {
return null; return null;
} }
@ -133,12 +134,12 @@ public class HotSpotConstantReflectionProvider implements ConstantReflectionProv
@Override @Override
public JavaConstant readArrayElement(JavaConstant array, int index) { public JavaConstant readArrayElement(JavaConstant array, int index) {
if (array.getJavaKind() != JavaKind.Object || array.isNull()) { if (array == null || array.getJavaKind() != JavaKind.Object || array.isNull()) {
return null; return null;
} }
Object a = ((HotSpotObjectConstantImpl) array).object(); Object a = ((HotSpotObjectConstantImpl) array).object();
if (index < 0 || index >= Array.getLength(a)) { if (!a.getClass().isArray() || index < 0 || index >= Array.getLength(a)) {
return null; return null;
} }
@ -184,7 +185,7 @@ public class HotSpotConstantReflectionProvider implements ConstantReflectionProv
@Override @Override
public JavaConstant boxPrimitive(JavaConstant source) { public JavaConstant boxPrimitive(JavaConstant source) {
if (!source.getJavaKind().isPrimitive() || !isBoxCached(source)) { if (source == null || !source.getJavaKind().isPrimitive() || !isBoxCached(source)) {
return null; return null;
} }
return HotSpotObjectConstantImpl.forObject(source.asBoxedPrimitive()); return HotSpotObjectConstantImpl.forObject(source.asBoxedPrimitive());
@ -192,7 +193,7 @@ public class HotSpotConstantReflectionProvider implements ConstantReflectionProv
@Override @Override
public JavaConstant unboxPrimitive(JavaConstant source) { public JavaConstant unboxPrimitive(JavaConstant source) {
if (!source.getJavaKind().isObject()) { if (source == null || !source.getJavaKind().isObject()) {
return null; return null;
} }
if (source.isNull()) { if (source.isNull()) {

View file

@ -56,6 +56,13 @@ public interface HotSpotResolvedJavaMethod extends ResolvedJavaMethod {
*/ */
boolean isDontInline(); boolean isDontInline();
/**
* Returns true if this method has a {@code ReservedStackAccess} annotation.
*
* @return true if ReservedStackAccess annotation present, false otherwise
*/
boolean hasReservedStackAccess();
/** /**
* Manually adds a DontInline annotation to this method. * Manually adds a DontInline annotation to this method.
*/ */

View file

@ -308,6 +308,15 @@ final class HotSpotResolvedJavaMethodImpl extends HotSpotMethod implements HotSp
return (getFlags() & config().methodFlagsDontInline) != 0; return (getFlags() & config().methodFlagsDontInline) != 0;
} }
/**
* Returns true if this method has a {@code ReservedStackAccess} annotation.
*
* @return true if ReservedStackAccess annotation present, false otherwise
*/
public boolean hasReservedStackAccess() {
return (getFlags() & config().methodFlagsReservedStackAccess) != 0;
}
/** /**
* Manually adds a DontInline annotation to this method. * Manually adds a DontInline annotation to this method.
*/ */

View file

@ -850,6 +850,7 @@ public class HotSpotVMConfig {
@HotSpotVMFlag(name = "DontCompileHugeMethods") @Stable public boolean dontCompileHugeMethods; @HotSpotVMFlag(name = "DontCompileHugeMethods") @Stable public boolean dontCompileHugeMethods;
@HotSpotVMFlag(name = "HugeMethodLimit") @Stable public int hugeMethodLimit; @HotSpotVMFlag(name = "HugeMethodLimit") @Stable public int hugeMethodLimit;
@HotSpotVMFlag(name = "PrintInlining") @Stable public boolean printInlining; @HotSpotVMFlag(name = "PrintInlining") @Stable public boolean printInlining;
@HotSpotVMFlag(name = "Inline") @Stable public boolean inline;
@HotSpotVMFlag(name = "JVMCIUseFastLocking") @Stable public boolean useFastLocking; @HotSpotVMFlag(name = "JVMCIUseFastLocking") @Stable public boolean useFastLocking;
@HotSpotVMFlag(name = "ForceUnreachable") @Stable public boolean forceUnreachable; @HotSpotVMFlag(name = "ForceUnreachable") @Stable public boolean forceUnreachable;
@HotSpotVMFlag(name = "CodeCacheSegmentSize") @Stable public int codeSegmentSize; @HotSpotVMFlag(name = "CodeCacheSegmentSize") @Stable public int codeSegmentSize;
@ -974,6 +975,7 @@ public class HotSpotVMConfig {
@HotSpotVMFlag(name = "BlockZeroingLowLimit", archs = {"sparc"}) @Stable public int blockZeroingLowLimit; @HotSpotVMFlag(name = "BlockZeroingLowLimit", archs = {"sparc"}) @Stable public int blockZeroingLowLimit;
@HotSpotVMFlag(name = "StackShadowPages") @Stable public int stackShadowPages; @HotSpotVMFlag(name = "StackShadowPages") @Stable public int stackShadowPages;
@HotSpotVMFlag(name = "StackReservedPages") @Stable public int stackReservedPages;
@HotSpotVMFlag(name = "UseStackBanging") @Stable public boolean useStackBanging; @HotSpotVMFlag(name = "UseStackBanging") @Stable public boolean useStackBanging;
@HotSpotVMConstant(name = "STACK_BIAS") @Stable public int stackBias; @HotSpotVMConstant(name = "STACK_BIAS") @Stable public int stackBias;
@HotSpotVMField(name = "CompilerToVM::Data::vm_page_size", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int vmPageSize; @HotSpotVMField(name = "CompilerToVM::Data::vm_page_size", type = "int", get = HotSpotVMField.Type.VALUE) @Stable public int vmPageSize;
@ -1092,6 +1094,7 @@ public class HotSpotVMConfig {
@HotSpotVMField(name = "JavaThread::_satb_mark_queue", type = "SATBMarkQueue", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadSatbMarkQueueOffset; @HotSpotVMField(name = "JavaThread::_satb_mark_queue", type = "SATBMarkQueue", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadSatbMarkQueueOffset;
@HotSpotVMField(name = "JavaThread::_vm_result", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int threadObjectResultOffset; @HotSpotVMField(name = "JavaThread::_vm_result", type = "oop", get = HotSpotVMField.Type.OFFSET) @Stable public int threadObjectResultOffset;
@HotSpotVMField(name = "JavaThread::_jvmci_counters", type = "jlong*", get = HotSpotVMField.Type.OFFSET) @Stable public int jvmciCountersThreadOffset; @HotSpotVMField(name = "JavaThread::_jvmci_counters", type = "jlong*", get = HotSpotVMField.Type.OFFSET) @Stable public int jvmciCountersThreadOffset;
@HotSpotVMField(name = "JavaThread::_reserved_stack_activation", type = "address", get = HotSpotVMField.Type.OFFSET) @Stable public int javaThreadReservedStackActivationOffset;
/** /**
* An invalid value for {@link #rtldDefault}. * An invalid value for {@link #rtldDefault}.
@ -1235,6 +1238,7 @@ public class HotSpotVMConfig {
@HotSpotVMConstant(name = "Method::_force_inline") @Stable public int methodFlagsForceInline; @HotSpotVMConstant(name = "Method::_force_inline") @Stable public int methodFlagsForceInline;
@HotSpotVMConstant(name = "Method::_dont_inline") @Stable public int methodFlagsDontInline; @HotSpotVMConstant(name = "Method::_dont_inline") @Stable public int methodFlagsDontInline;
@HotSpotVMConstant(name = "Method::_hidden") @Stable public int methodFlagsHidden; @HotSpotVMConstant(name = "Method::_hidden") @Stable public int methodFlagsHidden;
@HotSpotVMConstant(name = "Method::_reserved_stack_access") @Stable public int methodFlagsReservedStackAccess;
@HotSpotVMConstant(name = "Method::nonvirtual_vtable_index") @Stable public int nonvirtualVtableIndex; @HotSpotVMConstant(name = "Method::nonvirtual_vtable_index") @Stable public int nonvirtualVtableIndex;
@HotSpotVMConstant(name = "Method::invalid_vtable_index") @Stable public int invalidVtableIndex; @HotSpotVMConstant(name = "Method::invalid_vtable_index") @Stable public int invalidVtableIndex;
@ -1491,6 +1495,8 @@ public class HotSpotVMConfig {
@HotSpotVMField(name = "StubRoutines::_updateBytesCRC32", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long updateBytesCRC32Stub; @HotSpotVMField(name = "StubRoutines::_updateBytesCRC32", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long updateBytesCRC32Stub;
@HotSpotVMField(name = "StubRoutines::_crc_table_adr", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long crcTableAddress; @HotSpotVMField(name = "StubRoutines::_crc_table_adr", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long crcTableAddress;
@HotSpotVMField(name = "StubRoutines::_throw_delayed_StackOverflowError_entry", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long throwDelayedStackOverflowErrorEntry;
@HotSpotVMField(name = "StubRoutines::_jbyte_arraycopy", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long jbyteArraycopy; @HotSpotVMField(name = "StubRoutines::_jbyte_arraycopy", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long jbyteArraycopy;
@HotSpotVMField(name = "StubRoutines::_jshort_arraycopy", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long jshortArraycopy; @HotSpotVMField(name = "StubRoutines::_jshort_arraycopy", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long jshortArraycopy;
@HotSpotVMField(name = "StubRoutines::_jint_arraycopy", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long jintArraycopy; @HotSpotVMField(name = "StubRoutines::_jint_arraycopy", type = "address", get = HotSpotVMField.Type.VALUE) @Stable public long jintArraycopy;
@ -1548,6 +1554,7 @@ public class HotSpotVMConfig {
@HotSpotVMAddress(name = "SharedRuntime::register_finalizer") @Stable public long registerFinalizerAddress; @HotSpotVMAddress(name = "SharedRuntime::register_finalizer") @Stable public long registerFinalizerAddress;
@HotSpotVMAddress(name = "SharedRuntime::exception_handler_for_return_address") @Stable public long exceptionHandlerForReturnAddressAddress; @HotSpotVMAddress(name = "SharedRuntime::exception_handler_for_return_address") @Stable public long exceptionHandlerForReturnAddressAddress;
@HotSpotVMAddress(name = "SharedRuntime::OSR_migration_end") @Stable public long osrMigrationEndAddress; @HotSpotVMAddress(name = "SharedRuntime::OSR_migration_end") @Stable public long osrMigrationEndAddress;
@HotSpotVMAddress(name = "SharedRuntime::enable_stack_reserved_zone") @Stable public long enableStackReservedZoneAddress;
@HotSpotVMAddress(name = "os::javaTimeMillis") @Stable public long javaTimeMillisAddress; @HotSpotVMAddress(name = "os::javaTimeMillis") @Stable public long javaTimeMillisAddress;
@HotSpotVMAddress(name = "os::javaTimeNanos") @Stable public long javaTimeNanosAddress; @HotSpotVMAddress(name = "os::javaTimeNanos") @Stable public long javaTimeNanosAddress;

View file

@ -0,0 +1,213 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
Checkstyle-Configuration: Checks
Description: none
-->
<module name="Checker">
<property name="severity" value="error"/>
<module name="TreeWalker">
<property name="tabWidth" value="4"/>
<module name="FileContentsHolder"/>
<module name="JavadocStyle">
<property name="checkHtml" value="false"/>
</module>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName">
<property name="format" value="^(([a-z][a-zA-Z0-9]*$)|(_[A-Z][a-zA-Z0-9]*_[a-z][a-zA-Z0-9]*$))"/>
</module>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="TypeName">
<property name="format" value="^[A-Z][_a-zA-Z0-9]*$"/>
</module>
<module name="RedundantImport"/>
<module name="LineLength">
<property name="max" value="250"/>
</module>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter">
<property name="tokens" value="ARRAY_INIT,BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
</module>
<module name="AvoidStarImport">
<property name="allowClassImports" value="false"/>
<property name="allowStaticMemberImports" value="false"/>
</module>
<module name="NoWhitespaceBefore">
<property name="tokens" value="SEMI,DOT,POST_DEC,POST_INC"/>
</module>
<module name="ParenPad"/>
<module name="TypecastParenPad">
<property name="tokens" value="RPAREN,TYPECAST"/>
</module>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround">
<property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND"/>
</module>
<module name="RedundantModifier"/>
<module name="AvoidNestedBlocks">
<property name="allowInSwitchCase" value="true"/>
</module>
<module name="EmptyBlock">
<property name="option" value="text"/>
<property name="tokens" value="LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_IF,LITERAL_TRY,LITERAL_WHILE,STATIC_INIT"/>
</module>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>
<module name="EmptyStatement"/>
<module name="HiddenField">
<property name="severity" value="ignore"/>
<property name="ignoreConstructorParameter" value="true"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="ArrayTypeStyle"/>
<module name="UpperEll"/>
<module name="FallThrough"/>
<module name="FinalLocalVariable">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="MultipleVariableDeclarations"/>
<module name="StringLiteralEquality">
<property name="severity" value="error"/>
</module>
<module name="SuperFinalize"/>
<module name="UnnecessaryParentheses">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="Indentation">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="StaticVariableName">
<property name="format" value="^[A-Za-z][a-zA-Z0-9]*$"/>
</module>
<module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad"/>
<module name="ModifierOrder"/>
<module name="DefaultComesLast"/>
<module name="InnerAssignment">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="ModifiedControlVariable"/>
<module name="MutableException">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="ParameterAssignment">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="RegexpSinglelineJava">
<metadata name="net.sf.eclipsecs.core.comment" value="Illegal trailing whitespace(s) at the end of the line."/>
<property name="format" value="\s$"/>
<property name="message" value="Illegal trailing whitespace(s) at the end of the line."/>
<property name="ignoreComments" value="true"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Checks for trailing spaces at the end of a line"/>
</module>
<module name="RegexpSinglelineJava">
<metadata name="net.sf.eclipsecs.core.comment" value="illegal space before a comma"/>
<property name="format" value=" ,"/>
<property name="message" value="illegal space before a comma"/>
<property name="ignoreComments" value="true"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Checks for whitespace before a comma."/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.customMessage" value="Illegal whitespace before a comma."/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="[^\x00-\x7F]"/>
<property name="message" value="Only use ASCII characters."/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="new (Hashtable|Vector|Stack|StringBuffer)[^\w]"/>
<property name="message" value="Don't use old synchronized collection classes"/>
</module>
</module>
<module name="RegexpHeader">
<property name="header" value="/\*\n \* Copyright \(c\) (20[0-9][0-9], )?20[0-9][0-9], Oracle and/or its affiliates. All rights reserved.\n \* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n \*\n \* This code is free software; you can redistribute it and/or modify it\n \* under the terms of the GNU General Public License version 2 only, as\n \* published by the Free Software Foundation.\n \*\n \* This code is distributed in the hope that it will be useful, but WITHOUT\n \* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n \* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n \* version 2 for more details \(a copy is included in the LICENSE file that\n \* accompanied this code\).\n \*\n \* You should have received a copy of the GNU General Public License version\n \* 2 along with this work; if not, write to the Free Software Foundation,\n \* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n \*\n \* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n \* or visit www.oracle.com if you need additional information or have any\n \* questions.\n \*/\n"/>
<property name="fileExtensions" value="java"/>
</module>
<module name="FileTabCharacter">
<property name="severity" value="error"/>
<property name="fileExtensions" value="java"/>
</module>
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf"/>
</module>
<module name="Translation"/>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="Checkstyle: stop constant name check"/>
<property name="onCommentFormat" value="Checkstyle: resume constant name check"/>
<property name="checkFormat" value="ConstantNameCheck"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Allow non-conforming constant names"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="Checkstyle: stop method name check"/>
<property name="onCommentFormat" value="Checkstyle: resume method name check"/>
<property name="checkFormat" value="MethodName"/>
<property name="checkC" value="false"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable method name checks"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CheckStyle: stop parameter assignment check"/>
<property name="onCommentFormat" value="CheckStyle: resume parameter assignment check"/>
<property name="checkFormat" value="ParameterAssignment"/>
<property name="checkC" value="false"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable Parameter Assignment"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="Checkstyle: stop final variable check"/>
<property name="onCommentFormat" value="Checkstyle: resume final variable check"/>
<property name="checkFormat" value="FinalLocalVariable"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable final variable checks"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="Checkstyle: stop"/>
<property name="onCommentFormat" value="Checkstyle: resume"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable all checks"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CheckStyle: stop inner assignment check"/>
<property name="onCommentFormat" value="CheckStyle: resume inner assignment check"/>
<property name="checkFormat" value="InnerAssignment"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable inner assignment checks"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="Checkstyle: stop field name check"/>
<property name="onCommentFormat" value="Checkstyle: resume field name check"/>
<property name="checkFormat" value="MemberName"/>
<property name="checkC" value="false"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable field name checks"/>
</module>
<module name="RegexpMultiline">
<metadata name="net.sf.eclipsecs.core.comment" value="illegal Windows line ending"/>
<property name="format" value="\r\n"/>
<property name="message" value="illegal Windows line ending"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CheckStyle: stop header check"/>
<property name="onCommentFormat" value="CheckStyle: resume header check"/>
<property name="checkFormat" value=".*Header"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable header checks"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CheckStyle: stop line length check"/>
<property name="onCommentFormat" value="CheckStyle: resume line length check"/>
<property name="checkFormat" value="LineLength"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CheckStyle: start generated"/>
<property name="onCommentFormat" value="CheckStyle: stop generated"/>
<property name="checkFormat" value=".*Name|.*LineLength|.*Header"/>
</module>
</module>

View file

@ -1,5 +1,5 @@
// //
// Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. // Copyright (c) 2004, 2016, Oracle and/or its affiliates. All rights reserved.
// DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. // DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
// //
// This code is free software; you can redistribute it and/or modify it // This code is free software; you can redistribute it and/or modify it
@ -36,7 +36,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION HS_VER FILEVERSION JDK_VER
PRODUCTVERSION JDK_VER PRODUCTVERSION JDK_VER
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
@ -56,7 +56,7 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", XSTR(HS_COMPANY) "\0" VALUE "CompanyName", XSTR(HS_COMPANY) "\0"
VALUE "FileDescription", XSTR(HS_FILEDESC) "\0" VALUE "FileDescription", XSTR(HS_FILEDESC) "\0"
VALUE "FileVersion", XSTR(HS_DOTVER) "\0" VALUE "FileVersion", XSTR(JDK_DOTVER) "\0"
VALUE "Full Version", XSTR(HS_BUILD_ID) "\0" VALUE "Full Version", XSTR(HS_BUILD_ID) "\0"
VALUE "InternalName", XSTR(HS_INTERNAL_NAME) "\0" VALUE "InternalName", XSTR(HS_INTERNAL_NAME) "\0"
VALUE "LegalCopyright", XSTR(HS_COPYRIGHT) "\0" VALUE "LegalCopyright", XSTR(HS_COPYRIGHT) "\0"

View file

@ -730,7 +730,7 @@ void Canonicalizer::do_If(If* x) {
} }
} else if (rt == objectNull && } else if (rt == objectNull &&
(l->as_NewInstance() || l->as_NewArray() || (l->as_NewInstance() || l->as_NewArray() ||
(UseNewCode && l->as_Local() && l->as_Local()->is_receiver()))) { (l->as_Local() && l->as_Local()->is_receiver()))) {
if (x->cond() == Instruction::eql) { if (x->cond() == Instruction::eql) {
BlockBegin* sux = x->fsux(); BlockBegin* sux = x->fsux();
set_canonical(new Goto(sux, x->state_before(), is_safepoint(x, sux))); set_canonical(new Goto(sux, x->state_before(), is_safepoint(x, sux)));

View file

@ -211,6 +211,12 @@ static bool trust_final_non_static_fields(ciInstanceKlass* holder) {
// so there is no hacking of finals going on with them. // so there is no hacking of finals going on with them.
if (holder->is_anonymous()) if (holder->is_anonymous())
return true; return true;
// Trust final fields in all boxed classes
if (holder->is_box_klass())
return true;
// Trust final fields in String
if (holder->name() == ciSymbol::java_lang_String())
return true;
// Trust Atomic*FieldUpdaters: they are very important for performance, and make up one // Trust Atomic*FieldUpdaters: they are very important for performance, and make up one
// more reason not to use Unsafe, if their final fields are trusted. See more in JDK-8140483. // more reason not to use Unsafe, if their final fields are trusted. See more in JDK-8140483.
if (holder->name() == ciSymbol::java_util_concurrent_atomic_AtomicIntegerFieldUpdater_Impl() || if (holder->name() == ciSymbol::java_util_concurrent_atomic_AtomicIntegerFieldUpdater_Impl() ||

View file

@ -115,7 +115,7 @@
template(java_util_AbstractList, "java/util/AbstractList") \ template(java_util_AbstractList, "java/util/AbstractList") \
template(java_util_Hashtable, "java/util/Hashtable") \ template(java_util_Hashtable, "java/util/Hashtable") \
template(java_lang_Compiler, "java/lang/Compiler") \ template(java_lang_Compiler, "java/lang/Compiler") \
template(sun_misc_Signal, "sun/misc/Signal") \ template(jdk_internal_misc_Signal, "jdk/internal/misc/Signal") \
template(sun_misc_Launcher, "sun/misc/Launcher") \ template(sun_misc_Launcher, "sun/misc/Launcher") \
template(java_lang_AssertionStatusDirectives, "java/lang/AssertionStatusDirectives") \ template(java_lang_AssertionStatusDirectives, "java/lang/AssertionStatusDirectives") \
template(getBootClassPathEntryForClass_name, "getBootClassPathEntryForClass") \ template(getBootClassPathEntryForClass_name, "getBootClassPathEntryForClass") \

View file

@ -291,6 +291,9 @@ MethodHandlesAdapterBlob* MethodHandlesAdapterBlob::create(int buffer_size) {
{ {
MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag); MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
blob = new (size) MethodHandlesAdapterBlob(size); blob = new (size) MethodHandlesAdapterBlob(size);
if (blob == NULL) {
vm_exit_out_of_memory(size, OOM_MALLOC_ERROR, "CodeCache: no room for method handle adapter blob");
}
} }
// Track memory usage statistic after releasing CodeCache_lock // Track memory usage statistic after releasing CodeCache_lock
MemoryService::track_code_cache_memory_usage(); MemoryService::track_code_cache_memory_usage();

View file

@ -33,6 +33,7 @@
#include "compiler/compileBroker.hpp" #include "compiler/compileBroker.hpp"
#include "compiler/compileLog.hpp" #include "compiler/compileLog.hpp"
#include "compiler/compilerDirectives.hpp" #include "compiler/compilerDirectives.hpp"
#include "compiler/directivesParser.hpp"
#include "compiler/disassembler.hpp" #include "compiler/disassembler.hpp"
#include "interpreter/bytecode.hpp" #include "interpreter/bytecode.hpp"
#include "oops/methodData.hpp" #include "oops/methodData.hpp"
@ -965,6 +966,12 @@ void nmethod::print_on(outputStream* st, const char* msg) const {
} }
} }
void nmethod::maybe_print_nmethod(DirectiveSet* directive) {
bool printnmethods = directive->PrintAssemblyOption || directive->PrintNMethodsOption;
if (printnmethods || PrintDebugInfo || PrintRelocations || PrintDependencies || PrintExceptionHandlers) {
print_nmethod(printnmethods);
}
}
void nmethod::print_nmethod(bool printmethod) { void nmethod::print_nmethod(bool printmethod) {
ttyLocker ttyl; // keep the following output all in one block ttyLocker ttyl; // keep the following output all in one block

View file

@ -29,6 +29,8 @@
#include "code/pcDesc.hpp" #include "code/pcDesc.hpp"
#include "oops/metadata.hpp" #include "oops/metadata.hpp"
class DirectiveSet;
// This class is used internally by nmethods, to cache // This class is used internally by nmethods, to cache
// exception/pc/handler information. // exception/pc/handler information.
@ -714,6 +716,8 @@ public:
void print_nul_chk_table() PRODUCT_RETURN; void print_nul_chk_table() PRODUCT_RETURN;
void print_recorded_oops() PRODUCT_RETURN; void print_recorded_oops() PRODUCT_RETURN;
void print_recorded_metadata() PRODUCT_RETURN; void print_recorded_metadata() PRODUCT_RETURN;
void maybe_print_nmethod(DirectiveSet* directive);
void print_nmethod(bool print_code); void print_nmethod(bool print_code);
// need to re-define this from CodeBlob else the overload hides it // need to re-define this from CodeBlob else the overload hides it

View file

@ -1919,12 +1919,9 @@ void CompileBroker::invoke_compiler_on_method(CompileTask* task) {
collect_statistics(thread, time, task); collect_statistics(thread, time, task);
bool printnmethods = directive->PrintAssemblyOption || directive->PrintNMethodsOption;
if (printnmethods || PrintDebugInfo || PrintRelocations || PrintDependencies || PrintExceptionHandlers) {
nmethod* nm = task->code(); nmethod* nm = task->code();
if (nm != NULL) { if (nm != NULL) {
nm->print_nmethod(printnmethods); nm->maybe_print_nmethod(directive);
}
} }
DirectivesStack::release(directive); DirectivesStack::release(directive);

View file

@ -34,7 +34,7 @@
#if INCLUDE_ALL_GCS #if INCLUDE_ALL_GCS
// Unit test // Unit test
#ifdef ASSERT #ifndef PRODUCT
static unsigned line_byte(const char* line, size_t i) { static unsigned line_byte(const char* line, size_t i) {
return unsigned(line[i]) & 0xFF; return unsigned(line[i]) & 0xFF;

View file

@ -1091,7 +1091,7 @@ void CodeInstaller::site_DataPatch(CodeBuffer& buffer, jint pc_offset, Handle si
} else if (reference->is_a(site_DataSectionReference::klass())) { } else if (reference->is_a(site_DataSectionReference::klass())) {
int data_offset = site_DataSectionReference::offset(reference); int data_offset = site_DataSectionReference::offset(reference);
if (0 <= data_offset && data_offset < _constants_size) { if (0 <= data_offset && data_offset < _constants_size) {
pd_patch_DataSectionReference(pc_offset, data_offset); pd_patch_DataSectionReference(pc_offset, data_offset, CHECK);
} else { } else {
JVMCI_ERROR("data offset 0x%X points outside data section (size 0x%X)", data_offset, _constants_size); JVMCI_ERROR("data offset 0x%X points outside data section (size 0x%X)", data_offset, _constants_size);
} }

View file

@ -156,7 +156,7 @@ private:
jint pd_next_offset(NativeInstruction* inst, jint pc_offset, Handle method, TRAPS); jint pd_next_offset(NativeInstruction* inst, jint pc_offset, Handle method, TRAPS);
void pd_patch_OopConstant(int pc_offset, Handle constant, TRAPS); void pd_patch_OopConstant(int pc_offset, Handle constant, TRAPS);
void pd_patch_MetaspaceConstant(int pc_offset, Handle constant, TRAPS); void pd_patch_MetaspaceConstant(int pc_offset, Handle constant, TRAPS);
void pd_patch_DataSectionReference(int pc_offset, int data_offset); void pd_patch_DataSectionReference(int pc_offset, int data_offset, TRAPS);
void pd_relocate_ForeignCall(NativeInstruction* inst, jlong foreign_call_destination, TRAPS); void pd_relocate_ForeignCall(NativeInstruction* inst, jlong foreign_call_destination, TRAPS);
void pd_relocate_JavaMethod(Handle method, jint pc_offset, TRAPS); void pd_relocate_JavaMethod(Handle method, jint pc_offset, TRAPS);
void pd_relocate_poll(address pc, jint mark, TRAPS); void pd_relocate_poll(address pc, jint mark, TRAPS);

View file

@ -591,6 +591,13 @@ JVMCIEnv::CodeInstallResult JVMCIEnv::register_method(
// JVMTI -- compiled method notification (must be done outside lock) // JVMTI -- compiled method notification (must be done outside lock)
if (nm != NULL) { if (nm != NULL) {
nm->post_compiled_method_load_event(); nm->post_compiled_method_load_event();
if (env == NULL) {
// This compile didn't come through the CompileBroker so perform the printing here
DirectiveSet* directive = DirectivesStack::getMatchingDirective(method, compiler);
nm->maybe_print_nmethod(directive);
DirectivesStack::release(directive);
}
} }
return result; return result;

View file

@ -151,6 +151,7 @@
nonstatic_field(JavaThread, _pending_failed_speculation, oop) \ nonstatic_field(JavaThread, _pending_failed_speculation, oop) \
nonstatic_field(JavaThread, _pending_transfer_to_interpreter, bool) \ nonstatic_field(JavaThread, _pending_transfer_to_interpreter, bool) \
nonstatic_field(JavaThread, _jvmci_counters, jlong*) \ nonstatic_field(JavaThread, _jvmci_counters, jlong*) \
nonstatic_field(JavaThread, _reserved_stack_activation, address) \
\ \
static_field(java_lang_Class, _klass_offset, int) \ static_field(java_lang_Class, _klass_offset, int) \
static_field(java_lang_Class, _array_klass_offset, int) \ static_field(java_lang_Class, _array_klass_offset, int) \
@ -210,6 +211,8 @@
\ \
static_field(StubRoutines, _verify_oop_count, jint) \ static_field(StubRoutines, _verify_oop_count, jint) \
\ \
static_field(StubRoutines, _throw_delayed_StackOverflowError_entry, address) \
\
static_field(StubRoutines, _jbyte_arraycopy, address) \ static_field(StubRoutines, _jbyte_arraycopy, address) \
static_field(StubRoutines, _jshort_arraycopy, address) \ static_field(StubRoutines, _jshort_arraycopy, address) \
static_field(StubRoutines, _jint_arraycopy, address) \ static_field(StubRoutines, _jint_arraycopy, address) \
@ -471,6 +474,7 @@
declare_constant(Method::_force_inline) \ declare_constant(Method::_force_inline) \
declare_constant(Method::_dont_inline) \ declare_constant(Method::_dont_inline) \
declare_constant(Method::_hidden) \ declare_constant(Method::_hidden) \
declare_constant(Method::_reserved_stack_access) \
\ \
declare_constant(Method::nonvirtual_vtable_index) \ declare_constant(Method::nonvirtual_vtable_index) \
declare_constant(Method::invalid_vtable_index) \ declare_constant(Method::invalid_vtable_index) \
@ -517,6 +521,7 @@
declare_function(SharedRuntime::register_finalizer) \ declare_function(SharedRuntime::register_finalizer) \
declare_function(SharedRuntime::exception_handler_for_return_address) \ declare_function(SharedRuntime::exception_handler_for_return_address) \
declare_function(SharedRuntime::OSR_migration_end) \ declare_function(SharedRuntime::OSR_migration_end) \
declare_function(SharedRuntime::enable_stack_reserved_zone) \
declare_function(SharedRuntime::dsin) \ declare_function(SharedRuntime::dsin) \
declare_function(SharedRuntime::dcos) \ declare_function(SharedRuntime::dcos) \
declare_function(SharedRuntime::dtan) \ declare_function(SharedRuntime::dtan) \

View file

@ -182,6 +182,10 @@
"Unroll loop bodies with node count less than this") \ "Unroll loop bodies with node count less than this") \
range(0, max_jint / 4) \ range(0, max_jint / 4) \
\ \
product_pd(intx, LoopPercentProfileLimit, \
"Unroll loop bodies with % node count of profile limit") \
range(10, 100) \
\
product(intx, LoopMaxUnroll, 16, \ product(intx, LoopMaxUnroll, 16, \
"Maximum number of unrolls for main loop") \ "Maximum number of unrolls for main loop") \
range(0, max_jint) \ range(0, max_jint) \

View file

@ -825,10 +825,12 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod*
input_not_const = false; input_not_const = false;
const TypeOopPtr* oop_ptr = receiver->bottom_type()->is_oopptr(); const TypeOopPtr* oop_ptr = receiver->bottom_type()->is_oopptr();
ciMethod* target = oop_ptr->const_oop()->as_method_handle()->get_vmtarget(); ciMethod* target = oop_ptr->const_oop()->as_method_handle()->get_vmtarget();
guarantee(!target->is_method_handle_intrinsic(), "should not happen"); // XXX remove
const int vtable_index = Method::invalid_vtable_index; const int vtable_index = Method::invalid_vtable_index;
CallGenerator* cg = C->call_generator(target, vtable_index, false, jvms, true, PROB_ALWAYS, NULL, true, true); CallGenerator* cg = C->call_generator(target, vtable_index,
assert(cg == NULL || !cg->is_late_inline() || cg->is_mh_late_inline(), "no late inline here"); false /* call_does_dispatch */,
jvms,
true /* allow_inline */,
PROB_ALWAYS);
return cg; return cg;
} else { } else {
const char* msg = "receiver not constant"; const char* msg = "receiver not constant";
@ -899,13 +901,15 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod*
target = C->optimize_virtual_call(caller, jvms->bci(), klass, klass, target = C->optimize_virtual_call(caller, jvms->bci(), klass, klass,
target, receiver_type, is_virtual, target, receiver_type, is_virtual,
call_does_dispatch, vtable_index, // out-parameters call_does_dispatch, vtable_index, // out-parameters
/*check_access=*/false); false /* check_access */);
// We lack profiling at this call but type speculation may // We lack profiling at this call but type speculation may
// provide us with a type // provide us with a type
speculative_receiver_type = (receiver_type != NULL) ? receiver_type->speculative_type() : NULL; speculative_receiver_type = (receiver_type != NULL) ? receiver_type->speculative_type() : NULL;
} }
CallGenerator* cg = C->call_generator(target, vtable_index, call_does_dispatch, jvms, /*allow_inline=*/true, PROB_ALWAYS, speculative_receiver_type, true, true); CallGenerator* cg = C->call_generator(target, vtable_index, call_does_dispatch, jvms,
assert(cg == NULL || !cg->is_late_inline() || cg->is_mh_late_inline(), "no late inline here"); true /* allow_inline */,
PROB_ALWAYS,
speculative_receiver_type);
return cg; return cg;
} else { } else {
const char* msg = "member_name not constant"; const char* msg = "member_name not constant";

View file

@ -37,7 +37,6 @@
Node* ConstraintCastNode::Identity(PhaseGVN* phase) { Node* ConstraintCastNode::Identity(PhaseGVN* phase) {
Node* dom = dominating_cast(phase); Node* dom = dominating_cast(phase);
if (dom != NULL) { if (dom != NULL) {
assert(_carry_dependency, "only for casts that carry a dependency");
return dom; return dom;
} }
if (_carry_dependency) { if (_carry_dependency) {
@ -110,18 +109,22 @@ Node* ConstraintCastNode::make_cast(int opcode, Node* c, Node *n, const Type *t,
} }
TypeNode* ConstraintCastNode::dominating_cast(PhaseTransform *phase) const { TypeNode* ConstraintCastNode::dominating_cast(PhaseTransform *phase) const {
if (!carry_dependency()) {
return NULL;
}
Node* val = in(1); Node* val = in(1);
Node* ctl = in(0); Node* ctl = in(0);
int opc = Opcode(); int opc = Opcode();
if (ctl == NULL) { if (ctl == NULL) {
return NULL; return NULL;
} }
// Range check CastIIs may all end up under a single range check and
// in that case only the narrower CastII would be kept by the code
// below which would be incorrect.
if (is_CastII() && as_CastII()->has_range_check()) {
return NULL;
}
for (DUIterator_Fast imax, i = val->fast_outs(imax); i < imax; i++) { for (DUIterator_Fast imax, i = val->fast_outs(imax); i < imax; i++) {
Node* u = val->fast_out(i); Node* u = val->fast_out(i);
if (u != this && if (u != this &&
u->outcnt() > 0 &&
u->Opcode() == opc && u->Opcode() == opc &&
u->in(0) != NULL && u->in(0) != NULL &&
u->bottom_type()->higher_equal(type())) { u->bottom_type()->higher_equal(type())) {
@ -300,7 +303,6 @@ void CastIINode::dump_spec(outputStream* st) const {
Node* CheckCastPPNode::Identity(PhaseGVN* phase) { Node* CheckCastPPNode::Identity(PhaseGVN* phase) {
Node* dom = dominating_cast(phase); Node* dom = dominating_cast(phase);
if (dom != NULL) { if (dom != NULL) {
assert(_carry_dependency, "only for casts that carry a dependency");
return dom; return dom;
} }
if (_carry_dependency) { if (_carry_dependency) {

View file

@ -666,7 +666,8 @@ bool IdealLoopTree::policy_unroll(PhaseIdealLoop *phase) {
if (future_unroll_ct > LoopMaxUnroll) return false; if (future_unroll_ct > LoopMaxUnroll) return false;
} else { } else {
// obey user constraints on vector mapped loops with additional unrolling applied // obey user constraints on vector mapped loops with additional unrolling applied
if ((future_unroll_ct / cl->slp_max_unroll()) > LoopMaxUnroll) return false; int unroll_constraint = (cl->slp_max_unroll()) ? cl->slp_max_unroll() : 1;
if ((future_unroll_ct / unroll_constraint) > LoopMaxUnroll) return false;
} }
// Check for initial stride being a small enough constant // Check for initial stride being a small enough constant
@ -689,7 +690,7 @@ bool IdealLoopTree::policy_unroll(PhaseIdealLoop *phase) {
// Progress defined as current size less than 20% larger than previous size. // Progress defined as current size less than 20% larger than previous size.
if (UseSuperWord && cl->node_count_before_unroll() > 0 && if (UseSuperWord && cl->node_count_before_unroll() > 0 &&
future_unroll_ct > LoopUnrollMin && future_unroll_ct > LoopUnrollMin &&
(future_unroll_ct - 1) * 10.0 > cl->profile_trip_cnt() && (future_unroll_ct - 1) * (100 / LoopPercentProfileLimit) > cl->profile_trip_cnt() &&
1.2 * cl->node_count_before_unroll() < (double)_body.size()) { 1.2 * cl->node_count_before_unroll() < (double)_body.size()) {
return false; return false;
} }
@ -1260,6 +1261,146 @@ void PhaseIdealLoop::insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_
loop->record_for_igvn(); loop->record_for_igvn();
} }
//------------------------------insert_vector_post_loop------------------------
// Insert a copy of the atomic unrolled vectorized main loop as a post loop,
// unroll_policy has already informed us that more unrolling is about to happen to
// the main loop. The resultant post loop will serve as a vectorized drain loop.
void PhaseIdealLoop::insert_vector_post_loop(IdealLoopTree *loop, Node_List &old_new) {
if (!loop->_head->is_CountedLoop()) return;
CountedLoopNode *cl = loop->_head->as_CountedLoop();
// only process vectorized main loops
if (!cl->is_vectorized_loop() || !cl->is_main_loop()) return;
int slp_max_unroll_factor = cl->slp_max_unroll();
int cur_unroll = cl->unrolled_count();
if (slp_max_unroll_factor == 0) return;
// only process atomic unroll vector loops (not super unrolled after vectorization)
if (cur_unroll != slp_max_unroll_factor) return;
// we only ever process this one time
if (cl->has_atomic_post_loop()) return;
#ifndef PRODUCT
if (TraceLoopOpts) {
tty->print("PostVector ");
loop->dump_head();
}
#endif
C->set_major_progress();
// Find common pieces of the loop being guarded with pre & post loops
CountedLoopNode *main_head = loop->_head->as_CountedLoop();
CountedLoopEndNode *main_end = main_head->loopexit();
guarantee(main_end != NULL, "no loop exit node");
// diagnostic to show loop end is not properly formed
assert(main_end->outcnt() == 2, "1 true, 1 false path only");
uint dd_main_head = dom_depth(main_head);
uint max = main_head->outcnt();
// mark this loop as processed
main_head->mark_has_atomic_post_loop();
Node *pre_header = main_head->in(LoopNode::EntryControl);
Node *init = main_head->init_trip();
Node *incr = main_end->incr();
Node *limit = main_end->limit();
Node *stride = main_end->stride();
Node *cmp = main_end->cmp_node();
BoolTest::mask b_test = main_end->test_trip();
//------------------------------
// Step A: Create a new post-Loop.
Node* main_exit = main_end->proj_out(false);
assert(main_exit->Opcode() == Op_IfFalse, "");
int dd_main_exit = dom_depth(main_exit);
// Step A1: Clone the loop body of main. The clone becomes the vector post-loop.
// The main loop pre-header illegally has 2 control users (old & new loops).
clone_loop(loop, old_new, dd_main_exit);
assert(old_new[main_end->_idx]->Opcode() == Op_CountedLoopEnd, "");
CountedLoopNode *post_head = old_new[main_head->_idx]->as_CountedLoop();
post_head->set_normal_loop();
post_head->set_post_loop(main_head);
// Reduce the post-loop trip count.
CountedLoopEndNode* post_end = old_new[main_end->_idx]->as_CountedLoopEnd();
post_end->_prob = PROB_FAIR;
// Build the main-loop normal exit.
IfFalseNode *new_main_exit = new IfFalseNode(main_end);
_igvn.register_new_node_with_optimizer(new_main_exit);
set_idom(new_main_exit, main_end, dd_main_exit);
set_loop(new_main_exit, loop->_parent);
// Step A2: Build a zero-trip guard for the vector post-loop. After leaving the
// main-loop, the vector post-loop may not execute at all. We 'opaque' the incr
// (the vectorized main-loop trip-counter exit value) because we will be changing
// the exit value (via additional unrolling) so we cannot constant-fold away the zero
// trip guard until all unrolling is done.
Node *zer_opaq = new Opaque1Node(C, incr);
Node *zer_cmp = new CmpINode(zer_opaq, limit);
Node *zer_bol = new BoolNode(zer_cmp, b_test);
register_new_node(zer_opaq, new_main_exit);
register_new_node(zer_cmp, new_main_exit);
register_new_node(zer_bol, new_main_exit);
// Build the IfNode
IfNode *zer_iff = new IfNode(new_main_exit, zer_bol, PROB_FAIR, COUNT_UNKNOWN);
_igvn.register_new_node_with_optimizer(zer_iff);
set_idom(zer_iff, new_main_exit, dd_main_exit);
set_loop(zer_iff, loop->_parent);
// Plug in the false-path, taken if we need to skip vector post-loop
_igvn.replace_input_of(main_exit, 0, zer_iff);
set_idom(main_exit, zer_iff, dd_main_exit);
set_idom(main_exit->unique_out(), zer_iff, dd_main_exit);
// Make the true-path, must enter the vector post loop
Node *zer_taken = new IfTrueNode(zer_iff);
_igvn.register_new_node_with_optimizer(zer_taken);
set_idom(zer_taken, zer_iff, dd_main_exit);
set_loop(zer_taken, loop->_parent);
// Plug in the true path
_igvn.hash_delete(post_head);
post_head->set_req(LoopNode::EntryControl, zer_taken);
set_idom(post_head, zer_taken, dd_main_exit);
Arena *a = Thread::current()->resource_area();
VectorSet visited(a);
Node_Stack clones(a, main_head->back_control()->outcnt());
// Step A3: Make the fall-in values to the vector post-loop come from the
// fall-out values of the main-loop.
for (DUIterator_Fast imax, i = main_head->fast_outs(imax); i < imax; i++) {
Node* main_phi = main_head->fast_out(i);
if (main_phi->is_Phi() && main_phi->in(0) == main_head && main_phi->outcnt() >0) {
Node *cur_phi = old_new[main_phi->_idx];
Node *fallnew = clone_up_backedge_goo(main_head->back_control(),
post_head->init_control(),
main_phi->in(LoopNode::LoopBackControl),
visited, clones);
_igvn.hash_delete(cur_phi);
cur_phi->set_req(LoopNode::EntryControl, fallnew);
}
}
// CastII for the new post loop:
bool inserted = cast_incr_before_loop(zer_opaq->in(1), zer_taken, post_head);
assert(inserted, "no castII inserted");
// It's difficult to be precise about the trip-counts
// for post loops. They are usually very short,
// so guess that unit vector trips is a reasonable value.
post_head->set_profile_trip_cnt((float)slp_max_unroll_factor);
// Now force out all loop-invariant dominating tests. The optimizer
// finds some, but we _know_ they are all useless.
peeled_dom_test_elim(loop, old_new);
loop->record_for_igvn();
}
//------------------------------is_invariant----------------------------- //------------------------------is_invariant-----------------------------
// Return true if n is invariant // Return true if n is invariant
bool IdealLoopTree::is_invariant(Node* n) const { bool IdealLoopTree::is_invariant(Node* n) const {
@ -2608,6 +2749,9 @@ bool IdealLoopTree::iteration_split_impl( PhaseIdealLoop *phase, Node_List &old_
// and we'd rather unroll the post-RCE'd loop SO... do not unroll if // and we'd rather unroll the post-RCE'd loop SO... do not unroll if
// peeling. // peeling.
if (should_unroll && !should_peel) { if (should_unroll && !should_peel) {
if (SuperWordLoopUnrollAnalysis) {
phase->insert_vector_post_loop(this, old_new);
}
phase->do_unroll(this, old_new, true); phase->do_unroll(this, old_new, true);
} }

View file

@ -67,7 +67,9 @@ protected:
HasReductions=128, HasReductions=128,
WasSlpAnalyzed=256, WasSlpAnalyzed=256,
PassedSlpAnalysis=512, PassedSlpAnalysis=512,
DoUnrollOnly=1024 }; DoUnrollOnly=1024,
VectorizedLoop=2048,
HasAtomicPostLoop=4096 };
char _unswitch_count; char _unswitch_count;
enum { _unswitch_max=3 }; enum { _unswitch_max=3 };
@ -86,6 +88,8 @@ public:
void mark_was_slp() { _loop_flags |= WasSlpAnalyzed; } void mark_was_slp() { _loop_flags |= WasSlpAnalyzed; }
void mark_passed_slp() { _loop_flags |= PassedSlpAnalysis; } void mark_passed_slp() { _loop_flags |= PassedSlpAnalysis; }
void mark_do_unroll_only() { _loop_flags |= DoUnrollOnly; } void mark_do_unroll_only() { _loop_flags |= DoUnrollOnly; }
void mark_loop_vectorized() { _loop_flags |= VectorizedLoop; }
void mark_has_atomic_post_loop() { _loop_flags |= HasAtomicPostLoop; }
int unswitch_max() { return _unswitch_max; } int unswitch_max() { return _unswitch_max; }
int unswitch_count() { return _unswitch_count; } int unswitch_count() { return _unswitch_count; }
@ -221,6 +225,8 @@ public:
int has_passed_slp () const { return (_loop_flags&PassedSlpAnalysis) == PassedSlpAnalysis; } int has_passed_slp () const { return (_loop_flags&PassedSlpAnalysis) == PassedSlpAnalysis; }
int do_unroll_only () const { return (_loop_flags&DoUnrollOnly) == DoUnrollOnly; } int do_unroll_only () const { return (_loop_flags&DoUnrollOnly) == DoUnrollOnly; }
int is_main_no_pre_loop() const { return _loop_flags & MainHasNoPreLoop; } int is_main_no_pre_loop() const { return _loop_flags & MainHasNoPreLoop; }
int is_vectorized_loop () const { return (_loop_flags & VectorizedLoop) == VectorizedLoop; }
int has_atomic_post_loop () const { return (_loop_flags & HasAtomicPostLoop) == HasAtomicPostLoop; }
void set_main_no_pre_loop() { _loop_flags |= MainHasNoPreLoop; } void set_main_no_pre_loop() { _loop_flags |= MainHasNoPreLoop; }
int main_idx() const { return _main_idx; } int main_idx() const { return _main_idx; }
@ -893,6 +899,8 @@ public:
// Add pre and post loops around the given loop. These loops are used // Add pre and post loops around the given loop. These loops are used
// during RCE, unrolling and aligning loops. // during RCE, unrolling and aligning loops.
void insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_new, bool peel_only ); void insert_pre_post_loops( IdealLoopTree *loop, Node_List &old_new, bool peel_only );
// Add a vector post loop between a vector main loop and the current post loop
void insert_vector_post_loop(IdealLoopTree *loop, Node_List &old_new);
// If Node n lives in the back_ctrl block, we clone a private version of n // If Node n lives in the back_ctrl block, we clone a private version of n
// in preheader_ctrl block and return that, otherwise return n. // in preheader_ctrl block and return that, otherwise return n.
Node *clone_up_backedge_goo( Node *back_ctrl, Node *preheader_ctrl, Node *n, VectorSet &visited, Node_Stack &clones ); Node *clone_up_backedge_goo( Node *back_ctrl, Node *preheader_ctrl, Node *n, VectorSet &visited, Node_Stack &clones );
@ -1105,6 +1113,8 @@ private:
Node *place_near_use( Node *useblock ) const; Node *place_near_use( Node *useblock ) const;
Node* try_move_store_before_loop(Node* n, Node *n_ctrl); Node* try_move_store_before_loop(Node* n, Node *n_ctrl);
void try_move_store_after_loop(Node* n); void try_move_store_after_loop(Node* n);
bool identical_backtoback_ifs(Node *n);
bool can_split_if(Node *n_ctrl);
bool _created_loop_node; bool _created_loop_node;
public: public:

View file

@ -47,6 +47,14 @@ Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) {
return NULL; return NULL;
} }
// Splitting range check CastIIs through a loop induction Phi can
// cause new Phis to be created that are left unrelated to the loop
// induction Phi and prevent optimizations (vectorization)
if (n->Opcode() == Op_CastII && n->as_CastII()->has_range_check() &&
region->is_CountedLoop() && n->in(1) == region->as_CountedLoop()->phi()) {
return NULL;
}
int wins = 0; int wins = 0;
assert(!n->is_CFG(), ""); assert(!n->is_CFG(), "");
assert(region->is_Region(), ""); assert(region->is_Region(), "");
@ -1020,61 +1028,57 @@ Node *PhaseIdealLoop::place_near_use( Node *useblock ) const {
} }
//------------------------------split_if_with_blocks_post---------------------- bool PhaseIdealLoop::identical_backtoback_ifs(Node *n) {
// Do the real work in a non-recursive function. CFG hackery wants to be if (!n->is_If()) {
// in the post-order, so it can dirty the I-DOM info and not use the dirtied return false;
// info. }
void PhaseIdealLoop::split_if_with_blocks_post( Node *n ) { if (!n->in(0)->is_Region()) {
return false;
}
Node* region = n->in(0);
Node* dom = idom(region);
if (!dom->is_If() || dom->in(1) != n->in(1)) {
return false;
}
IfNode* dom_if = dom->as_If();
Node* proj_true = dom_if->proj_out(1);
Node* proj_false = dom_if->proj_out(0);
// Cloning Cmp through Phi's involves the split-if transform. for (uint i = 1; i < region->req(); i++) {
// FastLock is not used by an If if (is_dominator(proj_true, region->in(i))) {
if( n->is_Cmp() && !n->is_FastLock() ) { continue;
if( C->live_nodes() > 35000 ) return; // Method too big }
if (is_dominator(proj_false, region->in(i))) {
continue;
}
return false;
}
return true;
}
bool PhaseIdealLoop::can_split_if(Node *n_ctrl) {
if (C->live_nodes() > 35000) {
return false; // Method too big
}
// Do not do 'split-if' if irreducible loops are present. // Do not do 'split-if' if irreducible loops are present.
if( _has_irreducible_loops ) if (_has_irreducible_loops) {
return; return false;
Node *n_ctrl = get_ctrl(n);
// Determine if the Node has inputs from some local Phi.
// Returns the block to clone thru.
Node *n_blk = has_local_phi_input( n );
if( n_blk != n_ctrl ) return;
if( merge_point_too_heavy(C, n_ctrl) )
return;
if( n->outcnt() != 1 ) return; // Multiple bool's from 1 compare?
Node *bol = n->unique_out();
assert( bol->is_Bool(), "expect a bool here" );
if( bol->outcnt() != 1 ) return;// Multiple branches from 1 compare?
Node *iff = bol->unique_out();
// Check some safety conditions
if( iff->is_If() ) { // Classic split-if?
if( iff->in(0) != n_ctrl ) return; // Compare must be in same blk as if
} else if (iff->is_CMove()) { // Trying to split-up a CMOVE
// Can't split CMove with different control edge.
if (iff->in(0) != NULL && iff->in(0) != n_ctrl ) return;
if( get_ctrl(iff->in(2)) == n_ctrl ||
get_ctrl(iff->in(3)) == n_ctrl )
return; // Inputs not yet split-up
if ( get_loop(n_ctrl) != get_loop(get_ctrl(iff)) ) {
return; // Loop-invar test gates loop-varying CMOVE
} }
} else {
return; // some other kind of node, such as an Allocate if (merge_point_too_heavy(C, n_ctrl)) {
return false;
} }
// Do not do 'split-if' if some paths are dead. First do dead code // Do not do 'split-if' if some paths are dead. First do dead code
// elimination and then see if its still profitable. // elimination and then see if its still profitable.
for( uint i = 1; i < n_ctrl->req(); i++ ) for (uint i = 1; i < n_ctrl->req(); i++) {
if( n_ctrl->in(i) == C->top() ) if (n_ctrl->in(i) == C->top()) {
return; return false;
}
}
// When is split-if profitable? Every 'win' on means some control flow
// goes dead, so it's almost always a win.
int policy = 0;
// If trying to do a 'Split-If' at the loop head, it is only // If trying to do a 'Split-If' at the loop head, it is only
// profitable if the cmp folds up on BOTH paths. Otherwise we // profitable if the cmp folds up on BOTH paths. Otherwise we
// risk peeling a loop forever. // risk peeling a loop forever.
@ -1086,42 +1090,131 @@ void PhaseIdealLoop::split_if_with_blocks_post( Node *n ) {
// because the alternative loop entry points won't be converted // because the alternative loop entry points won't be converted
// into LoopNodes. // into LoopNodes.
IdealLoopTree *n_loop = get_loop(n_ctrl); IdealLoopTree *n_loop = get_loop(n_ctrl);
for( uint j = 1; j < n_ctrl->req(); j++ ) for (uint j = 1; j < n_ctrl->req(); j++) {
if( get_loop(n_ctrl->in(j)) != n_loop ) if (get_loop(n_ctrl->in(j)) != n_loop) {
return; return false;
}
}
// Check for safety of the merge point. // Check for safety of the merge point.
if( !merge_point_safe(n_ctrl) ) { if (!merge_point_safe(n_ctrl)) {
return false;
}
return true;
}
//------------------------------split_if_with_blocks_post----------------------
// Do the real work in a non-recursive function. CFG hackery wants to be
// in the post-order, so it can dirty the I-DOM info and not use the dirtied
// info.
void PhaseIdealLoop::split_if_with_blocks_post(Node *n) {
// Cloning Cmp through Phi's involves the split-if transform.
// FastLock is not used by an If
if (n->is_Cmp() && !n->is_FastLock()) {
Node *n_ctrl = get_ctrl(n);
// Determine if the Node has inputs from some local Phi.
// Returns the block to clone thru.
Node *n_blk = has_local_phi_input(n);
if (n_blk != n_ctrl) {
return; return;
} }
if (!can_split_if(n_ctrl)) {
return;
}
if (n->outcnt() != 1) {
return; // Multiple bool's from 1 compare?
}
Node *bol = n->unique_out();
assert(bol->is_Bool(), "expect a bool here");
if (bol->outcnt() != 1) {
return;// Multiple branches from 1 compare?
}
Node *iff = bol->unique_out();
// Check some safety conditions
if (iff->is_If()) { // Classic split-if?
if (iff->in(0) != n_ctrl) {
return; // Compare must be in same blk as if
}
} else if (iff->is_CMove()) { // Trying to split-up a CMOVE
// Can't split CMove with different control edge.
if (iff->in(0) != NULL && iff->in(0) != n_ctrl ) {
return;
}
if (get_ctrl(iff->in(2)) == n_ctrl ||
get_ctrl(iff->in(3)) == n_ctrl) {
return; // Inputs not yet split-up
}
if (get_loop(n_ctrl) != get_loop(get_ctrl(iff))) {
return; // Loop-invar test gates loop-varying CMOVE
}
} else {
return; // some other kind of node, such as an Allocate
}
// When is split-if profitable? Every 'win' on means some control flow
// goes dead, so it's almost always a win.
int policy = 0;
// Split compare 'n' through the merge point if it is profitable // Split compare 'n' through the merge point if it is profitable
Node *phi = split_thru_phi( n, n_ctrl, policy ); Node *phi = split_thru_phi( n, n_ctrl, policy);
if( !phi ) return; if (!phi) {
return;
}
// Found a Phi to split thru! // Found a Phi to split thru!
// Replace 'n' with the new phi // Replace 'n' with the new phi
_igvn.replace_node( n, phi ); _igvn.replace_node(n, phi);
// Now split the bool up thru the phi // Now split the bool up thru the phi
Node *bolphi = split_thru_phi( bol, n_ctrl, -1 ); Node *bolphi = split_thru_phi(bol, n_ctrl, -1);
guarantee(bolphi != NULL, "null boolean phi node"); guarantee(bolphi != NULL, "null boolean phi node");
_igvn.replace_node( bol, bolphi ); _igvn.replace_node(bol, bolphi);
assert( iff->in(1) == bolphi, "" ); assert(iff->in(1) == bolphi, "");
if( bolphi->Value(&_igvn)->singleton() ) if (bolphi->Value(&_igvn)->singleton()) {
return; return;
}
// Conditional-move? Must split up now // Conditional-move? Must split up now
if( !iff->is_If() ) { if (!iff->is_If()) {
Node *cmovphi = split_thru_phi( iff, n_ctrl, -1 ); Node *cmovphi = split_thru_phi(iff, n_ctrl, -1);
_igvn.replace_node( iff, cmovphi ); _igvn.replace_node(iff, cmovphi);
return; return;
} }
// Now split the IF // Now split the IF
do_split_if( iff ); do_split_if(iff);
return;
}
// Two identical ifs back to back can be merged
if (identical_backtoback_ifs(n) && can_split_if(n->in(0))) {
Node *n_ctrl = n->in(0);
PhiNode* bolphi = PhiNode::make_blank(n_ctrl, n->in(1));
IfNode* dom_if = idom(n_ctrl)->as_If();
Node* proj_true = dom_if->proj_out(1);
Node* proj_false = dom_if->proj_out(0);
Node* con_true = _igvn.makecon(TypeInt::ONE);
Node* con_false = _igvn.makecon(TypeInt::ZERO);
for (uint i = 1; i < n_ctrl->req(); i++) {
if (is_dominator(proj_true, n_ctrl->in(i))) {
bolphi->init_req(i, con_true);
} else {
assert(is_dominator(proj_false, n_ctrl->in(i)), "bad if");
bolphi->init_req(i, con_false);
}
}
register_new_node(bolphi, n_ctrl);
_igvn.replace_input_of(n, 1, bolphi);
// Now split the IF
do_split_if(n);
return; return;
} }

View file

@ -1709,38 +1709,10 @@ const Type* LoadNode::Value(PhaseGVN* phase) const {
// unsafe field access may not have a constant offset // unsafe field access may not have a constant offset
C->has_unsafe_access(), C->has_unsafe_access(),
"Field accesses must be precise" ); "Field accesses must be precise" );
// For oop loads, we expect the _type to be precise // For oop loads, we expect the _type to be precise.
if (klass == env->String_klass() &&
adr->is_AddP() && off != Type::OffsetBot) {
// For constant Strings treat the final fields as compile time constants.
// While we can list what field types java.lang.String has, it is more
// future-proof to handle all possible field types, anticipating future
// changes and experiments in String code.
Node* base = adr->in(AddPNode::Base);
const TypeOopPtr* t = phase->type(base)->isa_oopptr();
if (t != NULL && t->singleton()) {
ciField* field = env->String_klass()->get_field_by_offset(off, false);
if (field != NULL && field->is_final()) {
ciObject* string = t->const_oop();
ciConstant constant = string->as_instance()->field_value(field);
// Type::make_from_constant does not handle narrow oops, so handle it here.
// Everything else can use the factory method.
if ((constant.basic_type() == T_ARRAY || constant.basic_type() == T_OBJECT)
&& adr->bottom_type()->is_ptr_to_narrowoop()) {
return TypeNarrowOop::make_from_constant(constant.as_object(), true);
} else {
return Type::make_from_constant(constant, true);
}
}
}
}
// Optimizations for constant objects // Optimizations for constant objects
ciObject* const_oop = tinst->const_oop(); ciObject* const_oop = tinst->const_oop();
if (const_oop != NULL) { if (const_oop != NULL) {
// For constant Boxed value treat the target field as a compile time constant.
if (tinst->is_ptr_to_boxed_value()) {
return tinst->get_const_boxed_value();
} else
// For constant CallSites treat the target field as a compile time constant. // For constant CallSites treat the target field as a compile time constant.
if (const_oop->is_call_site()) { if (const_oop->is_call_site()) {
ciCallSite* call_site = const_oop->as_call_site(); ciCallSite* call_site = const_oop->as_call_site();

View file

@ -1552,8 +1552,7 @@ Node* PhaseStringOpts::copy_string(GraphKit& kit, Node* str, Node* dst_array, No
if (str->is_Con()) { if (str->is_Con()) {
// Constant source string // Constant source string
const TypeOopPtr* t = kit.gvn().type(src_array)->isa_oopptr(); ciTypeArray* src_array_type = get_constant_value(kit, str);
ciTypeArray* src_array_type = t->const_oop()->as_type_array();
// Check encoding of constant string // Check encoding of constant string
bool src_is_byte = (get_constant_coder(kit, str) == java_lang_String::CODER_LATIN1); bool src_is_byte = (get_constant_coder(kit, str) == java_lang_String::CODER_LATIN1);
@ -1673,9 +1672,15 @@ jbyte PhaseStringOpts::get_constant_coder(GraphKit& kit, Node* str) {
int PhaseStringOpts::get_constant_length(GraphKit& kit, Node* str) { int PhaseStringOpts::get_constant_length(GraphKit& kit, Node* str) {
assert(str->is_Con(), "String must be constant"); assert(str->is_Con(), "String must be constant");
Node* src_array = kit.load_String_value(kit.control(), str); return get_constant_value(kit, str)->length();
const TypeOopPtr* t = kit.gvn().type(src_array)->isa_oopptr(); }
return t->const_oop()->as_type_array()->length();
ciTypeArray* PhaseStringOpts::get_constant_value(GraphKit& kit, Node* str) {
assert(str->is_Con(), "String must be constant");
const TypeOopPtr* str_type = kit.gvn().type(str)->isa_oopptr();
ciInstance* str_instance = str_type->const_oop()->as_instance();
ciObject* src_array = str_instance->field_value_by_offset(java_lang_String::value_offset_in_bytes()).as_object();
return src_array->as_type_array();
} }
void PhaseStringOpts::replace_string_concat(StringConcat* sc) { void PhaseStringOpts::replace_string_concat(StringConcat* sc) {

View file

@ -97,6 +97,9 @@ class PhaseStringOpts : public Phase {
// Returns the length of a constant string // Returns the length of a constant string
int get_constant_length(GraphKit& kit, Node* str); int get_constant_length(GraphKit& kit, Node* str);
// Returns the value array of a constant string
ciTypeArray* get_constant_value(GraphKit& kit, Node* str);
// Clean up any leftover nodes // Clean up any leftover nodes
void record_dead_node(Node* node); void record_dead_node(Node* node);
void remove_dead_nodes(); void remove_dead_nodes();

View file

@ -2253,6 +2253,9 @@ void SuperWord::output() {
C->set_major_progress(); C->set_major_progress();
} }
cl->mark_do_unroll_only(); cl->mark_do_unroll_only();
if (do_reserve_copy()) {
cl->mark_loop_vectorized();
}
} }
} }
} }

View file

@ -64,30 +64,21 @@
bool MethodHandles::_enabled = false; // set true after successful native linkage bool MethodHandles::_enabled = false; // set true after successful native linkage
MethodHandlesAdapterBlob* MethodHandles::_adapter_code = NULL; MethodHandlesAdapterBlob* MethodHandles::_adapter_code = NULL;
/** /**
* Generates method handle adapters. Returns 'false' if memory allocation * Generates method handle adapters. Returns 'false' if memory allocation
* failed and true otherwise. * failed and true otherwise.
*/ */
bool MethodHandles::generate_adapters() { void MethodHandles::generate_adapters() {
if (SystemDictionary::MethodHandle_klass() == NULL) { assert(SystemDictionary::MethodHandle_klass() != NULL, "should be present");
return true;
}
assert(_adapter_code == NULL, "generate only once"); assert(_adapter_code == NULL, "generate only once");
ResourceMark rm; ResourceMark rm;
TraceStartupTime timer("MethodHandles adapters generation"); TraceStartupTime timer("MethodHandles adapters generation");
_adapter_code = MethodHandlesAdapterBlob::create(adapter_code_size); _adapter_code = MethodHandlesAdapterBlob::create(adapter_code_size);
if (_adapter_code == NULL) {
return false;
}
CodeBuffer code(_adapter_code); CodeBuffer code(_adapter_code);
MethodHandlesAdapterGenerator g(&code); MethodHandlesAdapterGenerator g(&code);
g.generate(); g.generate();
code.log_section_sizes("MethodHandlesAdapterBlob"); code.log_section_sizes("MethodHandlesAdapterBlob");
return true;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -1436,54 +1427,32 @@ static JNINativeMethod MH_methods[] = {
{CC "invokeExact", CC "([" OBJ ")" OBJ, FN_PTR(MH_invokeExact_UOE)} {CC "invokeExact", CC "([" OBJ ")" OBJ, FN_PTR(MH_invokeExact_UOE)}
}; };
/**
* Helper method to register native methods.
*/
static bool register_natives(JNIEnv* env, jclass clazz, const JNINativeMethod* methods, jint nMethods) {
int status = env->RegisterNatives(clazz, methods, nMethods);
if (status != JNI_OK || env->ExceptionOccurred()) {
warning("JSR 292 method handle code is mismatched to this JVM. Disabling support.");
env->ExceptionClear();
return false;
}
return true;
}
/** /**
* This one function is exported, used by NativeLookup. * This one function is exported, used by NativeLookup.
*/ */
JVM_ENTRY(void, JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass MHN_class)) { JVM_ENTRY(void, JVM_RegisterMethodHandleMethods(JNIEnv *env, jclass MHN_class)) {
assert(!MethodHandles::enabled(), "must not be enabled"); assert(!MethodHandles::enabled(), "must not be enabled");
bool enable_MH = true; assert(SystemDictionary::MethodHandle_klass() != NULL, "should be present");
jclass MH_class = NULL;
if (SystemDictionary::MethodHandle_klass() == NULL) {
enable_MH = false;
} else {
oop mirror = SystemDictionary::MethodHandle_klass()->java_mirror(); oop mirror = SystemDictionary::MethodHandle_klass()->java_mirror();
MH_class = (jclass) JNIHandles::make_local(env, mirror); jclass MH_class = (jclass) JNIHandles::make_local(env, mirror);
}
if (enable_MH) { {
ThreadToNativeFromVM ttnfv(thread); ThreadToNativeFromVM ttnfv(thread);
if (enable_MH) { int status = env->RegisterNatives(MHN_class, MHN_methods, sizeof(MHN_methods)/sizeof(JNINativeMethod));
enable_MH = register_natives(env, MHN_class, MHN_methods, sizeof(MHN_methods)/sizeof(JNINativeMethod)); guarantee(status == JNI_OK && !env->ExceptionOccurred(),
} "register java.lang.invoke.MethodHandleNative natives");
if (enable_MH) {
enable_MH = register_natives(env, MH_class, MH_methods, sizeof(MH_methods)/sizeof(JNINativeMethod)); status = env->RegisterNatives(MH_class, MH_methods, sizeof(MH_methods)/sizeof(JNINativeMethod));
} guarantee(status == JNI_OK && !env->ExceptionOccurred(),
"register java.lang.invoke.MethodHandle natives");
} }
if (TraceInvokeDynamic) { if (TraceInvokeDynamic) {
tty->print_cr("MethodHandle support loaded (using LambdaForms)"); tty->print_cr("MethodHandle support loaded (using LambdaForms)");
} }
if (enable_MH) {
if (MethodHandles::generate_adapters() == false) {
THROW_MSG(vmSymbols::java_lang_VirtualMachineError(), "Out of space in CodeCache for method handle adapters");
}
MethodHandles::set_enabled(true); MethodHandles::set_enabled(true);
}
} }
JVM_END JVM_END

View file

@ -81,7 +81,7 @@ class MethodHandles: AllStatic {
static void flush_dependent_nmethods(Handle call_site, Handle target); static void flush_dependent_nmethods(Handle call_site, Handle target);
// Generate MethodHandles adapters. // Generate MethodHandles adapters.
static bool generate_adapters(); static void generate_adapters();
// Called from MethodHandlesAdapterGenerator. // Called from MethodHandlesAdapterGenerator.
static address generate_method_handle_interpreter_entry(MacroAssembler* _masm, vmIntrinsics::ID iid); static address generate_method_handle_interpreter_entry(MacroAssembler* _masm, vmIntrinsics::ID iid);

View file

@ -145,6 +145,7 @@ jint init_globals() {
} }
javaClasses_init(); // must happen after vtable initialization javaClasses_init(); // must happen after vtable initialization
stubRoutines_init2(); // note: StubRoutines need 2-phase init stubRoutines_init2(); // note: StubRoutines need 2-phase init
MethodHandles::generate_adapters();
CodeCacheExtensions::complete_step(CodeCacheExtensionsSteps::StubRoutines2); CodeCacheExtensions::complete_step(CodeCacheExtensionsSteps::StubRoutines2);
#if INCLUDE_NMT #if INCLUDE_NMT

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -273,7 +273,7 @@ static void signal_thread_entry(JavaThread* thread, TRAPS) {
default: { default: {
// Dispatch the signal to java // Dispatch the signal to java
HandleMark hm(THREAD); HandleMark hm(THREAD);
Klass* k = SystemDictionary::resolve_or_null(vmSymbols::sun_misc_Signal(), THREAD); Klass* k = SystemDictionary::resolve_or_null(vmSymbols::jdk_internal_misc_Signal(), THREAD);
KlassHandle klass (THREAD, k); KlassHandle klass (THREAD, k);
if (klass.not_null()) { if (klass.not_null()) {
JavaValue result(T_VOID); JavaValue result(T_VOID);

View file

@ -359,6 +359,11 @@ class SharedRuntime: AllStatic {
static address clean_opt_virtual_call_entry(); static address clean_opt_virtual_call_entry();
static address clean_static_call_entry(); static address clean_static_call_entry();
#if defined(X86) && defined(COMPILER1)
// For Object.hashCode, System.identityHashCode try to pull hashCode from object header if available.
static void inline_check_hashcode_from_object_header(MacroAssembler* masm, methodHandle method, Register obj_reg, Register result);
#endif // X86 && COMPILER1
public: public:
// Read the array of BasicTypes from a Java signature, and compute where // Read the array of BasicTypes from a Java signature, and compute where

View file

@ -37,7 +37,7 @@
StubCodeDesc* StubCodeDesc::_list = NULL; StubCodeDesc* StubCodeDesc::_list = NULL;
int StubCodeDesc::_count = 0; int StubCodeDesc::_count = 0;
bool StubCodeDesc::_frozen = false;
StubCodeDesc* StubCodeDesc::desc_for(address pc) { StubCodeDesc* StubCodeDesc::desc_for(address pc) {
StubCodeDesc* p = _list; StubCodeDesc* p = _list;
@ -46,20 +46,23 @@ StubCodeDesc* StubCodeDesc::desc_for(address pc) {
return p; return p;
} }
StubCodeDesc* StubCodeDesc::desc_for_index(int index) { StubCodeDesc* StubCodeDesc::desc_for_index(int index) {
StubCodeDesc* p = _list; StubCodeDesc* p = _list;
while (p != NULL && p->index() != index) p = p->_next; while (p != NULL && p->index() != index) p = p->_next;
return p; return p;
} }
const char* StubCodeDesc::name_for(address pc) { const char* StubCodeDesc::name_for(address pc) {
StubCodeDesc* p = desc_for(pc); StubCodeDesc* p = desc_for(pc);
return p == NULL ? NULL : p->name(); return p == NULL ? NULL : p->name();
} }
void StubCodeDesc::freeze() {
assert(!_frozen, "repeated freeze operation");
_frozen = true;
}
void StubCodeDesc::print_on(outputStream* st) const { void StubCodeDesc::print_on(outputStream* st) const {
st->print("%s", group()); st->print("%s", group());
st->print("::"); st->print("::");
@ -110,12 +113,10 @@ StubCodeGenerator::~StubCodeGenerator() {
} }
} }
void StubCodeGenerator::stub_prolog(StubCodeDesc* cdesc) { void StubCodeGenerator::stub_prolog(StubCodeDesc* cdesc) {
// default implementation - do nothing // default implementation - do nothing
} }
void StubCodeGenerator::stub_epilog(StubCodeDesc* cdesc) { void StubCodeGenerator::stub_epilog(StubCodeDesc* cdesc) {
// default implementation - record the cdesc // default implementation - record the cdesc
if (_first_stub == NULL) _first_stub = cdesc; if (_first_stub == NULL) _first_stub = cdesc;

View file

@ -28,7 +28,7 @@
#include "asm/assembler.hpp" #include "asm/assembler.hpp"
#include "memory/allocation.hpp" #include "memory/allocation.hpp"
// All the basic framework for stubcode generation/debugging/printing. // All the basic framework for stub code generation/debugging/printing.
// A StubCodeDesc describes a piece of generated code (usually stubs). // A StubCodeDesc describes a piece of generated code (usually stubs).
@ -37,9 +37,10 @@
// this may have to change if searching becomes too slow. // this may have to change if searching becomes too slow.
class StubCodeDesc: public CHeapObj<mtCode> { class StubCodeDesc: public CHeapObj<mtCode> {
protected: private:
static StubCodeDesc* _list; // the list of all descriptors static StubCodeDesc* _list; // the list of all descriptors
static int _count; // length of list static int _count; // length of list
static bool _frozen; // determines whether _list modifications are allowed
StubCodeDesc* _next; // the next element in the linked list StubCodeDesc* _next; // the next element in the linked list
const char* _group; // the group to which the stub code belongs const char* _group; // the group to which the stub code belongs
@ -68,6 +69,7 @@ class StubCodeDesc: public CHeapObj<mtCode> {
static const char* name_for(address pc); // returns the name of the code containing pc or NULL static const char* name_for(address pc); // returns the name of the code containing pc or NULL
StubCodeDesc(const char* group, const char* name, address begin, address end = NULL) { StubCodeDesc(const char* group, const char* name, address begin, address end = NULL) {
assert(!_frozen, "no modifications allowed");
assert(name != NULL, "no name specified"); assert(name != NULL, "no name specified");
_next = _list; _next = _list;
_group = group; _group = group;
@ -78,6 +80,8 @@ class StubCodeDesc: public CHeapObj<mtCode> {
_list = this; _list = this;
}; };
static void freeze();
const char* group() const { return _group; } const char* group() const { return _group; }
const char* name() const { return _name; } const char* name() const { return _name; }
int index() const { return _index; } int index() const { return _index; }
@ -117,7 +121,7 @@ class StubCodeGenerator: public StackObj {
// later via an address pointing into it. // later via an address pointing into it.
class StubCodeMark: public StackObj { class StubCodeMark: public StackObj {
protected: private:
StubCodeGenerator* _cgen; StubCodeGenerator* _cgen;
StubCodeDesc* _cdesc; StubCodeDesc* _cdesc;

View file

@ -3603,6 +3603,9 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
vm_exit_during_initialization("Failed to initialize tracing backend"); vm_exit_during_initialization("Failed to initialize tracing backend");
} }
// No more stub generation allowed after that point.
StubCodeDesc::freeze();
// Set flag that basic initialization has completed. Used by exceptions and various // Set flag that basic initialization has completed. Used by exceptions and various
// debug stuff, that does not work until all basic classes have been initialized. // debug stuff, that does not work until all basic classes have been initialized.
set_init_completed(); set_init_completed();

View file

@ -44,6 +44,31 @@ static int test_comparator(int a, int b) {
} }
return 1; return 1;
} }
static void print_array(const char* prefix, int* array, int length) {
tty->print("%s:", prefix);
for (int i = 0; i < length; i++) {
tty->print(" %d", array[i]);
}
tty->cr();
}
static bool compare_arrays(int* actual, int* expected, int length) {
for (int i = 0; i < length; i++) {
if (actual[i] != expected[i]) {
print_array("Sorted array ", actual, length);
print_array("Expected array", expected, length);
return false;
}
}
return true;
}
template <class C>
static bool sort_and_compare(int* arrayToSort, int* expectedResult, int length, C comparator, bool idempotent = false) {
QuickSort::sort<int, C>(arrayToSort, length, comparator, idempotent);
return compare_arrays(arrayToSort, expectedResult, length);
}
#endif // ASSERT #endif // ASSERT
static int test_even_odd_comparator(int a, int b) { static int test_even_odd_comparator(int a, int b) {
@ -72,31 +97,6 @@ extern "C" {
} }
} }
static void print_array(const char* prefix, int* array, int length) {
tty->print("%s:", prefix);
for (int i = 0; i < length; i++) {
tty->print(" %d", array[i]);
}
tty->cr();
}
static bool compare_arrays(int* actual, int* expected, int length) {
for (int i = 0; i < length; i++) {
if (actual[i] != expected[i]) {
print_array("Sorted array ", actual, length);
print_array("Expected array", expected, length);
return false;
}
}
return true;
}
template <class C>
static bool sort_and_compare(int* arrayToSort, int* expectedResult, int length, C comparator, bool idempotent = false) {
QuickSort::sort<int, C>(arrayToSort, length, comparator, idempotent);
return compare_arrays(arrayToSort, expectedResult, length);
}
void QuickSort_test() { void QuickSort_test() {
{ {
int* test_array = NULL; int* test_array = NULL;

View file

@ -33,9 +33,10 @@
* *
* @run main/othervm * @run main/othervm
* -Xbootclasspath/a:. * -Xbootclasspath/a:.
* -Xmixed
* -XX:+UnlockDiagnosticVMOptions * -XX:+UnlockDiagnosticVMOptions
* -XX:+WhiteBoxAPI * -XX:+WhiteBoxAPI
* -XX:MaxInlineSize=100 * -XX:MaxInlineSize=70
* -XX:MinInliningThreshold=0 * -XX:MinInliningThreshold=0
* TestStringIntrinsics2 * TestStringIntrinsics2
*/ */

View file

@ -26,6 +26,7 @@
* @test * @test
* @bug 8074981 * @bug 8074981
* @summary Add C2 x86 Superword support for scalar product reduction optimizations : float test * @summary Add C2 x86 Superword support for scalar product reduction optimizations : float test
* @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64"
* *
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 ProdRed_Double * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 ProdRed_Double
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 ProdRed_Double * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 ProdRed_Double

View file

@ -26,6 +26,7 @@
* @test * @test
* @bug 8074981 * @bug 8074981
* @summary Add C2 x86 Superword support for scalar product reduction optimizations : float test * @summary Add C2 x86 Superword support for scalar product reduction optimizations : float test
* @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64"
* *
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 ProdRed_Float * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 ProdRed_Float
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 ProdRed_Float * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 ProdRed_Float

View file

@ -26,6 +26,7 @@
* @test * @test
* @bug 8074981 * @bug 8074981
* @summary Add C2 x86 Superword support for scalar product reduction optimizations : int test * @summary Add C2 x86 Superword support for scalar product reduction optimizations : int test
* @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64"
* *
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 ProdRed_Int * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 ProdRed_Int
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 ProdRed_Int * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 ProdRed_Int

View file

@ -26,6 +26,7 @@
* @test * @test
* @bug 8074981 * @bug 8074981
* @summary Add C2 x86 Superword support for scalar product reduction optimizations : int test * @summary Add C2 x86 Superword support for scalar product reduction optimizations : int test
* @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64"
* *
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:CompileThresholdScaling=0.1 -XX:CompileCommand=exclude,ReductionPerf::main ReductionPerf * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:CompileThresholdScaling=0.1 -XX:CompileCommand=exclude,ReductionPerf::main ReductionPerf
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:CompileThresholdScaling=0.1 -XX:CompileCommand=exclude,ReductionPerf::main ReductionPerf * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:CompileThresholdScaling=0.1 -XX:CompileCommand=exclude,ReductionPerf::main ReductionPerf

View file

@ -26,7 +26,7 @@
* @test * @test
* @bug 8135028 * @bug 8135028
* @summary Add C2 x86 Superword support for scalar sum reduction optimizations : double sqrt test * @summary Add C2 x86 Superword support for scalar sum reduction optimizations : double sqrt test
* @requires os.arch=="x86" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64" * @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64"
* *
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRedSqrt_Double * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRedSqrt_Double
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRedSqrt_Double * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRedSqrt_Double

View file

@ -26,6 +26,7 @@
* @test * @test
* @bug 8074981 * @bug 8074981
* @summary Add C2 x86 Superword support for scalar sum reduction optimizations : double test * @summary Add C2 x86 Superword support for scalar sum reduction optimizations : double test
* @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64"
* *
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRed_Double * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRed_Double
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRed_Double * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRed_Double

View file

@ -26,6 +26,7 @@
* @test * @test
* @bug 8074981 * @bug 8074981
* @summary Add C2 x86 Superword support for scalar sum reduction optimizations : float test * @summary Add C2 x86 Superword support for scalar sum reduction optimizations : float test
* @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64"
* *
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRed_Float * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRed_Float
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRed_Float * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRed_Float

View file

@ -26,6 +26,7 @@
* @test * @test
* @bug 8074981 * @bug 8074981
* @summary Add C2 x86 Superword support for scalar sum reduction optimizations : int test * @summary Add C2 x86 Superword support for scalar sum reduction optimizations : int test
* @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64" | os.arch=="aarch64"
* *
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRed_Int * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRed_Int
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRed_Int * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=2 -XX:CompileThresholdScaling=0.1 SumRed_Int

View file

@ -26,6 +26,7 @@
* @test * @test
* @bug 8076276 * @bug 8076276
* @summary Add C2 x86 Superword support for scalar sum reduction optimizations : long test * @summary Add C2 x86 Superword support for scalar sum reduction optimizations : long test
* @requires os.arch=="x86" | os.arch=="i386" | os.arch=="amd64" | os.arch=="x86_64"
* *
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=4 -XX:CompileThresholdScaling=0.1 SumRed_Long * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:+SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=4 -XX:CompileThresholdScaling=0.1 SumRed_Long
* @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=4 -XX:CompileThresholdScaling=0.1 SumRed_Long * @run main/othervm -XX:+IgnoreUnrecognizedVMOptions -XX:-SuperWordReductions -XX:LoopUnrollLimit=250 -XX:LoopMaxUnroll=4 -XX:CompileThresholdScaling=0.1 SumRed_Long

View file

@ -347,3 +347,5 @@ d3e834ff74e724a2b92a558e18e8cbf81c6dbc59 jdk-9+101
9dcf193c0b6cf22c0e89e2dc705a2c0f520ae064 jdk-9+102 9dcf193c0b6cf22c0e89e2dc705a2c0f520ae064 jdk-9+102
bdbf2342b21bd8ecad1b4e6499a0dfb314952bd7 jdk-9+103 bdbf2342b21bd8ecad1b4e6499a0dfb314952bd7 jdk-9+103
58448465334e1d8bf1cfc09052783937b1cc21c0 jdk-9+104 58448465334e1d8bf1cfc09052783937b1cc21c0 jdk-9+104
5acf6071d4d610068a19c79e004ba8e59cf1b087 jdk-9+105
65d615f71e81bae46dcb4d053e590582e5705879 jdk-9+106

View file

@ -123,7 +123,7 @@ import org.xml.sax.ext.LexicalHandler;
* @see Serializer * @see Serializer
* @see org.w3c.dom.ls.LSSerializer * @see org.w3c.dom.ls.LSSerializer
* *
* @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation * @deprecated As of JDK 9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
* is replaced by that of Xalan. Main class * is replaced by that of Xalan. Main class
* {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
* by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}. * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.

View file

@ -37,7 +37,7 @@ import org.w3c.dom.DocumentFragment;
* @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a> * @author <a href="mailto:Scott_Boag/CAM/Lotus@lotus.com">Scott Boag</a>
* @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a> * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
* *
* @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation * @deprecated As of JDK 9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
* is replaced by that of Xalan. Main class * is replaced by that of Xalan. Main class
* {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
* by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}. * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.

View file

@ -72,7 +72,7 @@ import org.w3c.dom.ls.LSSerializerFilter;
* @author Arun Yadav, Sun Microsystems * @author Arun Yadav, Sun Microsystems
* @author Sunitha Reddy, Sun Microsystems * @author Sunitha Reddy, Sun Microsystems
* *
* @deprecated As of JDK 1.9, Xerces 2.9.0, replaced by * @deprecated As of JDK 9, Xerces 2.9.0, replaced by
* {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl} * {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}
*/ */
public class DOMSerializerImpl implements LSSerializer, DOMConfiguration { public class DOMSerializerImpl implements LSSerializer, DOMConfiguration {

View file

@ -31,7 +31,7 @@ import java.util.Map;
* @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a> * @author <a href="mailto:arkin@intalio.com">Assaf Arkin</a>
* @see BaseMarkupSerializer * @see BaseMarkupSerializer
* *
* @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation * @deprecated As of JDK 9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
* is replaced by that of Xalan. Main class * is replaced by that of Xalan. Main class
* {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
* by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}. * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.

View file

@ -32,7 +32,7 @@ import java.nio.charset.CharsetEncoder;
/** /**
* This class represents an encoding. * This class represents an encoding.
* *
* @deprecated As of JDK 1.9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation * @deprecated As of JDK 9, Xerces 2.9.0, Xerces DOM L3 Serializer implementation
* is replaced by that of Xalan. Main class * is replaced by that of Xalan. Main class
* {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced * {@link com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl} is replaced
* by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}. * by {@link com.sun.org.apache.xml.internal.serializer.dom3.LSSerializerImpl}.

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